aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--Godeps/Godeps.json332
-rw-r--r--Godeps/Readme5
-rw-r--r--Godeps/_workspace/.gitignore2
-rw-r--r--Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/cl.go26
-rw-r--r--Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/context.go161
-rw-r--r--Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/device.go510
-rw-r--r--Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/device12.go51
-rw-r--r--Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/cl.h1210
-rw-r--r--Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/cl_ext.h315
-rw-r--r--Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/cl_gl.h158
-rw-r--r--Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/cl_gl_ext.h65
-rw-r--r--Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/cl_platform.h1278
-rw-r--r--Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/opencl.h43
-rw-r--r--Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/image.go83
-rw-r--r--Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/kernel.go127
-rw-r--r--Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/kernel10.go7
-rw-r--r--Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/kernel12.go20
-rw-r--r--Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/platform.go83
-rw-r--r--Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/program.go105
-rw-r--r--Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/queue.go193
-rw-r--r--Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/types.go487
-rw-r--r--Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/types12.go71
-rw-r--r--Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/types_darwin.go45
-rw-r--r--Godeps/_workspace/src/github.com/ethereum/ethash/ethash_opencl.go628
-rw-r--r--Godeps/_workspace/src/github.com/ethereum/ethash/ethash_opencl_kernel_go_str.go600
-rw-r--r--Godeps/_workspace/src/github.com/fatih/color/.travis.yml3
-rw-r--r--Godeps/_workspace/src/github.com/gizak/termui/debug/debuger.go117
-rw-r--r--Godeps/_workspace/src/github.com/gizak/termui/test/runtest.go66
-rw-r--r--Godeps/_workspace/src/github.com/golang/snappy/README7
-rw-r--r--Godeps/_workspace/src/github.com/huin/goupnp/cmd/example_httpu_serving/example_httpu_serving.go20
-rw-r--r--Godeps/_workspace/src/github.com/huin/goupnp/cmd/example_internetgateway1/example_internetgateway1.go67
-rw-r--r--Godeps/_workspace/src/github.com/huin/goupnp/cmd/example_ssdp_registry/example_ssdp_registry.go27
-rw-r--r--Godeps/_workspace/src/github.com/huin/goupnp/dcps/av1/av1.go8452
-rw-r--r--Godeps/_workspace/src/github.com/huin/goupnp/example/example.go6
-rw-r--r--Godeps/_workspace/src/github.com/huin/goupnp/gotasks/specgen_task.go603
-rw-r--r--Godeps/_workspace/src/github.com/jackpal/gateway/LICENSE27
-rw-r--r--Godeps/_workspace/src/github.com/jackpal/gateway/README.md7
-rw-r--r--Godeps/_workspace/src/github.com/jackpal/gateway/gateway_darwin.go40
-rw-r--r--Godeps/_workspace/src/github.com/jackpal/gateway/gateway_linux.go75
-rw-r--r--Godeps/_workspace/src/github.com/jackpal/gateway/gateway_unimplemented.go14
-rw-r--r--Godeps/_workspace/src/github.com/jackpal/gateway/gateway_windows.go43
-rw-r--r--Godeps/_workspace/src/github.com/rcrowley/go-metrics/cmd/metrics-bench/metrics-bench.go20
-rw-r--r--Godeps/_workspace/src/github.com/rcrowley/go-metrics/cmd/metrics-example/metrics-example.go154
-rw-r--r--Godeps/_workspace/src/github.com/rcrowley/go-metrics/cmd/never-read/never-read.go22
-rw-r--r--Godeps/_workspace/src/github.com/rcrowley/go-metrics/librato/client.go102
-rw-r--r--Godeps/_workspace/src/github.com/rcrowley/go-metrics/librato/librato.go235
-rw-r--r--Godeps/_workspace/src/github.com/rcrowley/go-metrics/stathat/stathat.go69
-rw-r--r--Godeps/_workspace/src/github.com/robertkrimen/otto/ast/comments.go92
-rw-r--r--Godeps/_workspace/src/github.com/robertkrimen/otto/otto/Makefile5
-rw-r--r--Godeps/_workspace/src/github.com/robertkrimen/otto/otto/main.go48
-rw-r--r--Godeps/_workspace/src/github.com/robertkrimen/otto/repl/repl.go115
-rw-r--r--Godeps/_workspace/src/github.com/robertkrimen/otto/terst/terst.go669
-rw-r--r--Godeps/_workspace/src/github.com/robertkrimen/otto/test/Makefile26
-rw-r--r--Godeps/_workspace/src/github.com/robertkrimen/otto/test/tester.go196
-rw-r--r--Godeps/_workspace/src/github.com/robertkrimen/otto/type_error.go13
-rw-r--r--Godeps/_workspace/src/github.com/robertkrimen/otto/underscore/Makefile11
-rw-r--r--Godeps/_workspace/src/github.com/robertkrimen/otto/underscore/README.markdown53
-rw-r--r--Godeps/_workspace/src/github.com/robertkrimen/otto/underscore/source.go3463
-rw-r--r--Godeps/_workspace/src/github.com/robertkrimen/otto/underscore/testify84
-rw-r--r--Godeps/_workspace/src/github.com/robertkrimen/otto/underscore/underscore.go49
-rw-r--r--Godeps/_workspace/src/github.com/rs/cors/cors.go308
-rw-r--r--Godeps/_workspace/src/github.com/rs/cors/utils.go27
-rw-r--r--Godeps/_workspace/src/golang.org/x/text/language/index.go762
-rw-r--r--Godeps/_workspace/src/golang.org/x/text/language/tables.go2791
-rw-r--r--Godeps/_workspace/src/gopkg.in/urfave/cli.v1/.travis.yml23
-rw-r--r--Godeps/_workspace/src/gopkg.in/urfave/cli.v1/LICENSE21
-rw-r--r--Godeps/_workspace/src/gopkg.in/urfave/cli.v1/README.md579
-rw-r--r--Godeps/_workspace/src/gopkg.in/urfave/cli.v1/appveyor.yml16
-rw-r--r--build/_vendor/src/golang.org/x/net/LICENSE (renamed from Godeps/_workspace/src/golang.org/x/crypto/LICENSE)0
-rw-r--r--build/_vendor/src/golang.org/x/net/context/context.go (renamed from Godeps/_workspace/src/golang.org/x/net/context/context.go)2
-rw-r--r--build/_vendor/src/golang.org/x/net/context/go17.go (renamed from Godeps/_workspace/src/golang.org/x/net/context/go17.go)0
-rw-r--r--build/_vendor/src/golang.org/x/net/context/pre_go17.go (renamed from Godeps/_workspace/src/golang.org/x/net/context/pre_go17.go)0
-rw-r--r--build/ci-notes.md15
-rw-r--r--build/ci.go17
-rw-r--r--cmd/geth/main.go44
-rw-r--r--cmd/geth/usage.go1
-rw-r--r--cmd/utils/flags.go5
-rw-r--r--common/natspec/natspec.go262
-rw-r--r--common/natspec/natspec_e2e_test.go357
-rw-r--r--common/natspec/natspec_js.go4060
-rw-r--r--common/natspec/natspec_test.go160
-rw-r--r--eth/api.go4
-rw-r--r--eth/backend.go11
-rw-r--r--eth/cpu_mining.go54
-rw-r--r--eth/gpu_mining.go102
-rw-r--r--internal/build/util.go9
-rw-r--r--vendor.conf40
-rw-r--r--vendor/github.com/cespare/cp/LICENSE.txt (renamed from Godeps/_workspace/src/github.com/cespare/cp/LICENSE.txt)0
-rw-r--r--vendor/github.com/cespare/cp/README.md (renamed from Godeps/_workspace/src/github.com/cespare/cp/README.md)0
-rw-r--r--vendor/github.com/cespare/cp/cp.go (renamed from Godeps/_workspace/src/github.com/cespare/cp/cp.go)0
-rw-r--r--vendor/github.com/davecgh/go-spew/.gitignore (renamed from Godeps/_workspace/src/gopkg.in/natefinch/npipe.v2/.gitignore)0
-rw-r--r--vendor/github.com/davecgh/go-spew/.travis.yml14
-rw-r--r--vendor/github.com/davecgh/go-spew/LICENSE (renamed from Godeps/_workspace/src/github.com/davecgh/go-spew/LICENSE)2
-rw-r--r--vendor/github.com/davecgh/go-spew/README.md194
-rw-r--r--vendor/github.com/davecgh/go-spew/cov_report.sh22
-rw-r--r--vendor/github.com/davecgh/go-spew/spew/bypass.go (renamed from Godeps/_workspace/src/github.com/davecgh/go-spew/spew/bypass.go)7
-rw-r--r--vendor/github.com/davecgh/go-spew/spew/bypasssafe.go (renamed from Godeps/_workspace/src/github.com/davecgh/go-spew/spew/bypasssafe.go)7
-rw-r--r--vendor/github.com/davecgh/go-spew/spew/common.go (renamed from Godeps/_workspace/src/github.com/davecgh/go-spew/spew/common.go)0
-rw-r--r--vendor/github.com/davecgh/go-spew/spew/config.go (renamed from Godeps/_workspace/src/github.com/davecgh/go-spew/spew/config.go)2
-rw-r--r--vendor/github.com/davecgh/go-spew/spew/doc.go (renamed from Godeps/_workspace/src/github.com/davecgh/go-spew/spew/doc.go)0
-rw-r--r--vendor/github.com/davecgh/go-spew/spew/dump.go (renamed from Godeps/_workspace/src/github.com/davecgh/go-spew/spew/dump.go)0
-rw-r--r--vendor/github.com/davecgh/go-spew/spew/format.go (renamed from Godeps/_workspace/src/github.com/davecgh/go-spew/spew/format.go)0
-rw-r--r--vendor/github.com/davecgh/go-spew/spew/spew.go (renamed from Godeps/_workspace/src/github.com/davecgh/go-spew/spew/spew.go)0
-rw-r--r--vendor/github.com/davecgh/go-spew/test_coverage.txt61
-rw-r--r--vendor/github.com/ethereum/ethash/.gitignore (renamed from Godeps/_workspace/src/github.com/ethereum/ethash/.gitignore)0
-rw-r--r--vendor/github.com/ethereum/ethash/.travis.yml (renamed from Godeps/_workspace/src/github.com/ethereum/ethash/.travis.yml)0
-rw-r--r--vendor/github.com/ethereum/ethash/CMakeLists.txt (renamed from Godeps/_workspace/src/github.com/ethereum/ethash/CMakeLists.txt)0
-rw-r--r--vendor/github.com/ethereum/ethash/MANIFEST.in (renamed from Godeps/_workspace/src/github.com/ethereum/ethash/MANIFEST.in)0
-rw-r--r--vendor/github.com/ethereum/ethash/Makefile (renamed from Godeps/_workspace/src/github.com/ethereum/ethash/Makefile)0
-rw-r--r--vendor/github.com/ethereum/ethash/README.md (renamed from Godeps/_workspace/src/github.com/ethereum/ethash/README.md)0
-rw-r--r--vendor/github.com/ethereum/ethash/Vagrantfile (renamed from Godeps/_workspace/src/github.com/ethereum/ethash/Vagrantfile)0
-rw-r--r--vendor/github.com/ethereum/ethash/appveyor.yml (renamed from Godeps/_workspace/src/github.com/ethereum/ethash/appveyor.yml)0
-rw-r--r--vendor/github.com/ethereum/ethash/ethash.go (renamed from Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go)0
-rw-r--r--vendor/github.com/ethereum/ethash/ethashc.go (renamed from Godeps/_workspace/src/github.com/ethereum/ethash/ethashc.go)0
-rwxr-xr-xvendor/github.com/ethereum/ethash/setup.py (renamed from Godeps/_workspace/src/github.com/ethereum/ethash/setup.py)0
-rw-r--r--vendor/github.com/ethereum/ethash/src/libethash/CMakeLists.txt (renamed from Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/CMakeLists.txt)0
-rw-r--r--vendor/github.com/ethereum/ethash/src/libethash/compiler.h (renamed from Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/compiler.h)0
-rw-r--r--vendor/github.com/ethereum/ethash/src/libethash/data_sizes.h (renamed from Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/data_sizes.h)0
-rw-r--r--vendor/github.com/ethereum/ethash/src/libethash/endian.h (renamed from Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/endian.h)0
-rw-r--r--vendor/github.com/ethereum/ethash/src/libethash/ethash.h (renamed from Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/ethash.h)0
-rw-r--r--vendor/github.com/ethereum/ethash/src/libethash/fnv.h (renamed from Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/fnv.h)0
-rw-r--r--vendor/github.com/ethereum/ethash/src/libethash/internal.c (renamed from Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/internal.c)0
-rw-r--r--vendor/github.com/ethereum/ethash/src/libethash/internal.h (renamed from Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/internal.h)0
-rw-r--r--vendor/github.com/ethereum/ethash/src/libethash/io.c (renamed from Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/io.c)0
-rw-r--r--vendor/github.com/ethereum/ethash/src/libethash/io.h (renamed from Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/io.h)0
-rw-r--r--vendor/github.com/ethereum/ethash/src/libethash/io_posix.c (renamed from Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/io_posix.c)0
-rw-r--r--vendor/github.com/ethereum/ethash/src/libethash/io_win32.c (renamed from Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/io_win32.c)0
-rw-r--r--vendor/github.com/ethereum/ethash/src/libethash/mmap.h (renamed from Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/mmap.h)0
-rw-r--r--vendor/github.com/ethereum/ethash/src/libethash/mmap_win32.c (renamed from Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/mmap_win32.c)0
-rw-r--r--vendor/github.com/ethereum/ethash/src/libethash/sha3.c (renamed from Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/sha3.c)0
-rw-r--r--vendor/github.com/ethereum/ethash/src/libethash/sha3.h (renamed from Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/sha3.h)0
-rw-r--r--vendor/github.com/ethereum/ethash/src/libethash/sha3_cryptopp.cpp (renamed from Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/sha3_cryptopp.cpp)0
-rw-r--r--vendor/github.com/ethereum/ethash/src/libethash/sha3_cryptopp.h (renamed from Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/sha3_cryptopp.h)0
-rw-r--r--vendor/github.com/ethereum/ethash/src/libethash/util.h (renamed from Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/util.h)0
-rw-r--r--vendor/github.com/ethereum/ethash/src/libethash/util_win32.c (renamed from Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/util_win32.c)0
-rw-r--r--vendor/github.com/fatih/color/.travis.yml5
-rw-r--r--vendor/github.com/fatih/color/LICENSE.md (renamed from Godeps/_workspace/src/github.com/fatih/color/LICENSE.md)0
-rw-r--r--vendor/github.com/fatih/color/README.md (renamed from Godeps/_workspace/src/github.com/fatih/color/README.md)11
-rw-r--r--vendor/github.com/fatih/color/color.go (renamed from Godeps/_workspace/src/github.com/fatih/color/color.go)99
-rw-r--r--vendor/github.com/fatih/color/doc.go (renamed from Godeps/_workspace/src/github.com/fatih/color/doc.go)0
-rw-r--r--vendor/github.com/gizak/termui/.gitignore (renamed from Godeps/_workspace/src/github.com/gizak/termui/.gitignore)1
-rw-r--r--vendor/github.com/gizak/termui/.travis.yml (renamed from Godeps/_workspace/src/github.com/gizak/termui/.travis.yml)0
-rw-r--r--vendor/github.com/gizak/termui/LICENSE (renamed from Godeps/_workspace/src/github.com/gizak/termui/LICENSE)0
-rw-r--r--vendor/github.com/gizak/termui/README.md (renamed from Godeps/_workspace/src/github.com/gizak/termui/README.md)6
-rw-r--r--vendor/github.com/gizak/termui/barchart.go (renamed from Godeps/_workspace/src/github.com/gizak/termui/barchart.go)31
-rw-r--r--vendor/github.com/gizak/termui/block.go (renamed from Godeps/_workspace/src/github.com/gizak/termui/block.go)0
-rw-r--r--vendor/github.com/gizak/termui/block_common.go (renamed from Godeps/_workspace/src/github.com/gizak/termui/block_common.go)0
-rw-r--r--vendor/github.com/gizak/termui/block_windows.go (renamed from Godeps/_workspace/src/github.com/gizak/termui/block_windows.go)0
-rw-r--r--vendor/github.com/gizak/termui/buffer.go (renamed from Godeps/_workspace/src/github.com/gizak/termui/buffer.go)0
-rw-r--r--vendor/github.com/gizak/termui/canvas.go (renamed from Godeps/_workspace/src/github.com/gizak/termui/canvas.go)0
-rwxr-xr-x[-rw-r--r--]vendor/github.com/gizak/termui/config (renamed from Godeps/_workspace/src/github.com/gizak/termui/config)0
-rw-r--r--vendor/github.com/gizak/termui/doc.go (renamed from Godeps/_workspace/src/github.com/gizak/termui/doc.go)4
-rw-r--r--vendor/github.com/gizak/termui/events.go (renamed from Godeps/_workspace/src/github.com/gizak/termui/events.go)7
-rw-r--r--vendor/github.com/gizak/termui/gauge.go (renamed from Godeps/_workspace/src/github.com/gizak/termui/gauge.go)2
-rw-r--r--vendor/github.com/gizak/termui/glide.lock14
-rw-r--r--vendor/github.com/gizak/termui/glide.yaml8
-rw-r--r--vendor/github.com/gizak/termui/grid.go (renamed from Godeps/_workspace/src/github.com/gizak/termui/grid.go)0
-rw-r--r--vendor/github.com/gizak/termui/helper.go (renamed from Godeps/_workspace/src/github.com/gizak/termui/helper.go)8
-rw-r--r--vendor/github.com/gizak/termui/linechart.go (renamed from Godeps/_workspace/src/github.com/gizak/termui/linechart.go)24
-rw-r--r--vendor/github.com/gizak/termui/linechart_others.go (renamed from Godeps/_workspace/src/github.com/gizak/termui/linechart_others.go)0
-rw-r--r--vendor/github.com/gizak/termui/linechart_windows.go (renamed from Godeps/_workspace/src/github.com/gizak/termui/linechart_windows.go)0
-rw-r--r--vendor/github.com/gizak/termui/list.go (renamed from Godeps/_workspace/src/github.com/gizak/termui/list.go)2
-rw-r--r--vendor/github.com/gizak/termui/mbarchart.go (renamed from Godeps/_workspace/src/github.com/gizak/termui/mbarchart.go)2
-rw-r--r--vendor/github.com/gizak/termui/mkdocs.yml28
-rw-r--r--vendor/github.com/gizak/termui/par.go (renamed from Godeps/_workspace/src/github.com/gizak/termui/par.go)11
-rw-r--r--vendor/github.com/gizak/termui/pos.go (renamed from Godeps/_workspace/src/github.com/gizak/termui/pos.go)0
-rw-r--r--vendor/github.com/gizak/termui/render.go (renamed from Godeps/_workspace/src/github.com/gizak/termui/render.go)0
-rw-r--r--vendor/github.com/gizak/termui/sparkline.go (renamed from Godeps/_workspace/src/github.com/gizak/termui/sparkline.go)0
-rw-r--r--vendor/github.com/gizak/termui/textbuilder.go (renamed from Godeps/_workspace/src/github.com/gizak/termui/textbuilder.go)65
-rw-r--r--vendor/github.com/gizak/termui/theme.go (renamed from Godeps/_workspace/src/github.com/gizak/termui/theme.go)0
-rw-r--r--vendor/github.com/gizak/termui/widget.go (renamed from Godeps/_workspace/src/github.com/gizak/termui/widget.go)0
-rw-r--r--vendor/github.com/golang/snappy/.gitignore16
-rw-r--r--vendor/github.com/golang/snappy/AUTHORS (renamed from Godeps/_workspace/src/github.com/golang/snappy/AUTHORS)0
-rw-r--r--vendor/github.com/golang/snappy/CONTRIBUTORS (renamed from Godeps/_workspace/src/github.com/golang/snappy/CONTRIBUTORS)0
-rw-r--r--vendor/github.com/golang/snappy/LICENSE (renamed from Godeps/_workspace/src/github.com/golang/snappy/LICENSE)0
-rw-r--r--vendor/github.com/golang/snappy/README107
-rw-r--r--vendor/github.com/golang/snappy/decode.go (renamed from Godeps/_workspace/src/github.com/golang/snappy/decode.go)121
-rw-r--r--vendor/github.com/golang/snappy/decode_amd64.go14
-rw-r--r--vendor/github.com/golang/snappy/decode_amd64.s490
-rw-r--r--vendor/github.com/golang/snappy/decode_other.go101
-rw-r--r--vendor/github.com/golang/snappy/encode.go (renamed from Godeps/_workspace/src/github.com/golang/snappy/encode.go)185
-rw-r--r--vendor/github.com/golang/snappy/encode_amd64.go29
-rw-r--r--vendor/github.com/golang/snappy/encode_amd64.s730
-rw-r--r--vendor/github.com/golang/snappy/encode_other.go238
-rw-r--r--vendor/github.com/golang/snappy/snappy.go (renamed from Godeps/_workspace/src/github.com/golang/snappy/snappy.go)30
-rw-r--r--vendor/github.com/hashicorp/golang-lru/.gitignore (renamed from Godeps/_workspace/src/github.com/hashicorp/golang-lru/.gitignore)0
-rw-r--r--vendor/github.com/hashicorp/golang-lru/2q.go (renamed from Godeps/_workspace/src/github.com/hashicorp/golang-lru/2q.go)0
-rw-r--r--vendor/github.com/hashicorp/golang-lru/LICENSE (renamed from Godeps/_workspace/src/github.com/hashicorp/golang-lru/LICENSE)0
-rw-r--r--vendor/github.com/hashicorp/golang-lru/README.md (renamed from Godeps/_workspace/src/github.com/hashicorp/golang-lru/README.md)0
-rw-r--r--vendor/github.com/hashicorp/golang-lru/arc.go (renamed from Godeps/_workspace/src/github.com/hashicorp/golang-lru/arc.go)0
-rw-r--r--vendor/github.com/hashicorp/golang-lru/lru.go (renamed from Godeps/_workspace/src/github.com/hashicorp/golang-lru/lru.go)0
-rw-r--r--vendor/github.com/hashicorp/golang-lru/simplelru/lru.go (renamed from Godeps/_workspace/src/github.com/hashicorp/golang-lru/simplelru/lru.go)2
-rw-r--r--vendor/github.com/huin/goupnp/.gitignore (renamed from Godeps/_workspace/src/github.com/huin/goupnp/.gitignore)0
-rw-r--r--vendor/github.com/huin/goupnp/LICENSE (renamed from Godeps/_workspace/src/github.com/huin/goupnp/LICENSE)0
-rw-r--r--vendor/github.com/huin/goupnp/README.md (renamed from Godeps/_workspace/src/github.com/huin/goupnp/README.md)0
-rw-r--r--vendor/github.com/huin/goupnp/dcps/internetgateway1/internetgateway1.go (renamed from Godeps/_workspace/src/github.com/huin/goupnp/dcps/internetgateway1/internetgateway1.go)0
-rw-r--r--vendor/github.com/huin/goupnp/dcps/internetgateway2/internetgateway2.go (renamed from Godeps/_workspace/src/github.com/huin/goupnp/dcps/internetgateway2/internetgateway2.go)0
-rw-r--r--vendor/github.com/huin/goupnp/device.go (renamed from Godeps/_workspace/src/github.com/huin/goupnp/device.go)0
-rw-r--r--vendor/github.com/huin/goupnp/goupnp.go (renamed from Godeps/_workspace/src/github.com/huin/goupnp/goupnp.go)0
-rw-r--r--vendor/github.com/huin/goupnp/httpu/httpu.go (renamed from Godeps/_workspace/src/github.com/huin/goupnp/httpu/httpu.go)15
-rw-r--r--vendor/github.com/huin/goupnp/httpu/serve.go (renamed from Godeps/_workspace/src/github.com/huin/goupnp/httpu/serve.go)0
-rw-r--r--vendor/github.com/huin/goupnp/scpd/scpd.go (renamed from Godeps/_workspace/src/github.com/huin/goupnp/scpd/scpd.go)0
-rw-r--r--vendor/github.com/huin/goupnp/service_client.go (renamed from Godeps/_workspace/src/github.com/huin/goupnp/service_client.go)0
-rw-r--r--vendor/github.com/huin/goupnp/soap/soap.go (renamed from Godeps/_workspace/src/github.com/huin/goupnp/soap/soap.go)0
-rw-r--r--vendor/github.com/huin/goupnp/soap/types.go (renamed from Godeps/_workspace/src/github.com/huin/goupnp/soap/types.go)0
-rw-r--r--vendor/github.com/huin/goupnp/ssdp/registry.go (renamed from Godeps/_workspace/src/github.com/huin/goupnp/ssdp/registry.go)0
-rw-r--r--vendor/github.com/huin/goupnp/ssdp/ssdp.go (renamed from Godeps/_workspace/src/github.com/huin/goupnp/ssdp/ssdp.go)0
-rw-r--r--vendor/github.com/jackpal/go-nat-pmp/.travis.yml13
-rw-r--r--vendor/github.com/jackpal/go-nat-pmp/LICENSE (renamed from Godeps/_workspace/src/github.com/jackpal/go-nat-pmp/LICENSE)0
-rw-r--r--vendor/github.com/jackpal/go-nat-pmp/README.md (renamed from Godeps/_workspace/src/github.com/jackpal/go-nat-pmp/README.md)20
-rw-r--r--vendor/github.com/jackpal/go-nat-pmp/natpmp.go (renamed from Godeps/_workspace/src/github.com/jackpal/go-nat-pmp/natpmp.go)117
-rw-r--r--vendor/github.com/jackpal/go-nat-pmp/network.go89
-rw-r--r--vendor/github.com/jackpal/go-nat-pmp/recorder.go19
-rw-r--r--vendor/github.com/mattn/go-colorable/.travis.yml8
-rw-r--r--vendor/github.com/mattn/go-colorable/LICENSE (renamed from Godeps/_workspace/src/github.com/mattn/go-colorable/LICENSE)0
-rw-r--r--vendor/github.com/mattn/go-colorable/README.md (renamed from Godeps/_workspace/src/github.com/mattn/go-colorable/README.md)0
-rw-r--r--vendor/github.com/mattn/go-colorable/colorable_others.go (renamed from Godeps/_workspace/src/github.com/mattn/go-colorable/colorable_others.go)8
-rw-r--r--vendor/github.com/mattn/go-colorable/colorable_windows.go (renamed from Godeps/_workspace/src/github.com/mattn/go-colorable/colorable_windows.go)96
-rw-r--r--vendor/github.com/mattn/go-colorable/noncolorable.go58
-rw-r--r--vendor/github.com/mattn/go-isatty/LICENSE (renamed from Godeps/_workspace/src/github.com/mattn/go-isatty/LICENSE)0
-rw-r--r--vendor/github.com/mattn/go-isatty/README.md (renamed from Godeps/_workspace/src/github.com/mattn/go-isatty/README.md)0
-rw-r--r--vendor/github.com/mattn/go-isatty/doc.go (renamed from Godeps/_workspace/src/github.com/mattn/go-isatty/doc.go)0
-rw-r--r--vendor/github.com/mattn/go-isatty/isatty_appengine.go (renamed from Godeps/_workspace/src/github.com/mattn/go-isatty/isatty_appengine.go)0
-rw-r--r--vendor/github.com/mattn/go-isatty/isatty_bsd.go (renamed from Godeps/_workspace/src/github.com/mattn/go-isatty/isatty_bsd.go)2
-rw-r--r--vendor/github.com/mattn/go-isatty/isatty_linux.go (renamed from Godeps/_workspace/src/github.com/mattn/go-isatty/isatty_linux.go)0
-rw-r--r--vendor/github.com/mattn/go-isatty/isatty_solaris.go (renamed from Godeps/_workspace/src/github.com/mattn/go-isatty/isatty_solaris.go)0
-rw-r--r--vendor/github.com/mattn/go-isatty/isatty_windows.go (renamed from Godeps/_workspace/src/github.com/mattn/go-isatty/isatty_windows.go)0
-rw-r--r--vendor/github.com/mattn/go-runewidth/.travis.yml (renamed from Godeps/_workspace/src/github.com/mattn/go-runewidth/.travis.yml)1
-rw-r--r--vendor/github.com/mattn/go-runewidth/LICENSE21
-rw-r--r--vendor/github.com/mattn/go-runewidth/README.mkd (renamed from Godeps/_workspace/src/github.com/mattn/go-runewidth/README.mkd)2
-rw-r--r--vendor/github.com/mattn/go-runewidth/runewidth.go (renamed from Godeps/_workspace/src/github.com/mattn/go-runewidth/runewidth.go)23
-rw-r--r--vendor/github.com/mattn/go-runewidth/runewidth_js.go (renamed from Godeps/_workspace/src/github.com/mattn/go-runewidth/runewidth_js.go)0
-rw-r--r--vendor/github.com/mattn/go-runewidth/runewidth_posix.go (renamed from Godeps/_workspace/src/github.com/mattn/go-runewidth/runewidth_posix.go)72
-rw-r--r--vendor/github.com/mattn/go-runewidth/runewidth_windows.go (renamed from Godeps/_workspace/src/github.com/mattn/go-runewidth/runewidth_windows.go)1
-rw-r--r--vendor/github.com/mitchellh/go-wordwrap/LICENSE.md21
-rw-r--r--vendor/github.com/mitchellh/go-wordwrap/README.md39
-rw-r--r--vendor/github.com/mitchellh/go-wordwrap/wordwrap.go73
-rw-r--r--vendor/github.com/nsf/termbox-go/AUTHORS (renamed from Godeps/_workspace/src/github.com/nsf/termbox-go/AUTHORS)0
-rw-r--r--vendor/github.com/nsf/termbox-go/LICENSE (renamed from Godeps/_workspace/src/github.com/nsf/termbox-go/LICENSE)0
-rw-r--r--vendor/github.com/nsf/termbox-go/README.md (renamed from Godeps/_workspace/src/github.com/nsf/termbox-go/README.md)4
-rw-r--r--vendor/github.com/nsf/termbox-go/api.go (renamed from Godeps/_workspace/src/github.com/nsf/termbox-go/api.go)1
-rw-r--r--vendor/github.com/nsf/termbox-go/api_common.go (renamed from Godeps/_workspace/src/github.com/nsf/termbox-go/api_common.go)0
-rw-r--r--vendor/github.com/nsf/termbox-go/api_windows.go (renamed from Godeps/_workspace/src/github.com/nsf/termbox-go/api_windows.go)0
-rwxr-xr-x[-rw-r--r--]vendor/github.com/nsf/termbox-go/collect_terminfo.py (renamed from Godeps/_workspace/src/github.com/nsf/termbox-go/collect_terminfo.py)0
-rw-r--r--vendor/github.com/nsf/termbox-go/syscalls.go (renamed from Godeps/_workspace/src/github.com/nsf/termbox-go/syscalls.go)0
-rw-r--r--vendor/github.com/nsf/termbox-go/syscalls_darwin.go (renamed from Godeps/_workspace/src/github.com/nsf/termbox-go/syscalls_darwin.go)0
-rw-r--r--vendor/github.com/nsf/termbox-go/syscalls_darwin_amd64.go (renamed from Godeps/_workspace/src/github.com/nsf/termbox-go/syscalls_darwin_amd64.go)0
-rw-r--r--vendor/github.com/nsf/termbox-go/syscalls_dragonfly.go (renamed from Godeps/_workspace/src/github.com/nsf/termbox-go/syscalls_freebsd.go)0
-rw-r--r--vendor/github.com/nsf/termbox-go/syscalls_freebsd.go39
-rw-r--r--vendor/github.com/nsf/termbox-go/syscalls_linux.go (renamed from Godeps/_workspace/src/github.com/nsf/termbox-go/syscalls_linux.go)0
-rw-r--r--vendor/github.com/nsf/termbox-go/syscalls_netbsd.go (renamed from Godeps/_workspace/src/github.com/nsf/termbox-go/syscalls_netbsd.go)0
-rw-r--r--vendor/github.com/nsf/termbox-go/syscalls_openbsd.go (renamed from Godeps/_workspace/src/github.com/nsf/termbox-go/syscalls_openbsd.go)0
-rw-r--r--vendor/github.com/nsf/termbox-go/syscalls_windows.go (renamed from Godeps/_workspace/src/github.com/nsf/termbox-go/syscalls_windows.go)0
-rw-r--r--vendor/github.com/nsf/termbox-go/termbox.go (renamed from Godeps/_workspace/src/github.com/nsf/termbox-go/termbox.go)0
-rw-r--r--vendor/github.com/nsf/termbox-go/termbox_common.go (renamed from Godeps/_workspace/src/github.com/nsf/termbox-go/termbox_common.go)0
-rw-r--r--vendor/github.com/nsf/termbox-go/termbox_windows.go (renamed from Godeps/_workspace/src/github.com/nsf/termbox-go/termbox_windows.go)0
-rw-r--r--vendor/github.com/nsf/termbox-go/terminfo.go (renamed from Godeps/_workspace/src/github.com/nsf/termbox-go/terminfo.go)0
-rw-r--r--vendor/github.com/nsf/termbox-go/terminfo_builtin.go (renamed from Godeps/_workspace/src/github.com/nsf/termbox-go/terminfo_builtin.go)0
-rw-r--r--vendor/github.com/pborman/uuid/.travis.yml (renamed from Godeps/_workspace/src/github.com/pborman/uuid/.travis.yml)1
-rw-r--r--vendor/github.com/pborman/uuid/CONTRIBUTING.md10
-rw-r--r--vendor/github.com/pborman/uuid/CONTRIBUTORS (renamed from Godeps/_workspace/src/github.com/pborman/uuid/CONTRIBUTORS)0
-rw-r--r--vendor/github.com/pborman/uuid/LICENSE (renamed from Godeps/_workspace/src/github.com/pborman/uuid/LICENSE)0
-rw-r--r--vendor/github.com/pborman/uuid/README.md (renamed from Godeps/_workspace/src/github.com/pborman/uuid/README.md)0
-rw-r--r--vendor/github.com/pborman/uuid/dce.go (renamed from Godeps/_workspace/src/github.com/pborman/uuid/dce.go)0
-rw-r--r--vendor/github.com/pborman/uuid/doc.go (renamed from Godeps/_workspace/src/github.com/pborman/uuid/doc.go)0
-rw-r--r--vendor/github.com/pborman/uuid/hash.go (renamed from Godeps/_workspace/src/github.com/pborman/uuid/hash.go)0
-rw-r--r--vendor/github.com/pborman/uuid/json.go (renamed from Godeps/_workspace/src/github.com/pborman/uuid/json.go)0
-rw-r--r--vendor/github.com/pborman/uuid/node.go (renamed from Godeps/_workspace/src/github.com/pborman/uuid/node.go)0
-rw-r--r--vendor/github.com/pborman/uuid/sql.go (renamed from Godeps/_workspace/src/github.com/pborman/uuid/sql.go)0
-rw-r--r--vendor/github.com/pborman/uuid/time.go (renamed from Godeps/_workspace/src/github.com/pborman/uuid/time.go)0
-rw-r--r--vendor/github.com/pborman/uuid/util.go (renamed from Godeps/_workspace/src/github.com/pborman/uuid/util.go)0
-rw-r--r--vendor/github.com/pborman/uuid/uuid.go (renamed from Godeps/_workspace/src/github.com/pborman/uuid/uuid.go)27
-rw-r--r--vendor/github.com/pborman/uuid/version1.go (renamed from Godeps/_workspace/src/github.com/pborman/uuid/version1.go)0
-rw-r--r--vendor/github.com/pborman/uuid/version4.go (renamed from Godeps/_workspace/src/github.com/pborman/uuid/version4.go)0
-rw-r--r--vendor/github.com/peterh/liner/COPYING (renamed from Godeps/_workspace/src/github.com/peterh/liner/COPYING)0
-rw-r--r--vendor/github.com/peterh/liner/README.md (renamed from Godeps/_workspace/src/github.com/peterh/liner/README.md)0
-rw-r--r--vendor/github.com/peterh/liner/bsdinput.go (renamed from Godeps/_workspace/src/github.com/peterh/liner/bsdinput.go)2
-rw-r--r--vendor/github.com/peterh/liner/common.go (renamed from Godeps/_workspace/src/github.com/peterh/liner/common.go)0
-rw-r--r--vendor/github.com/peterh/liner/fallbackinput.go (renamed from Godeps/_workspace/src/github.com/peterh/liner/fallbackinput.go)0
-rw-r--r--vendor/github.com/peterh/liner/input.go (renamed from Godeps/_workspace/src/github.com/peterh/liner/input.go)3
-rw-r--r--vendor/github.com/peterh/liner/input_darwin.go (renamed from Godeps/_workspace/src/github.com/peterh/liner/input_darwin.go)4
-rw-r--r--vendor/github.com/peterh/liner/input_linux.go (renamed from Godeps/_workspace/src/github.com/peterh/liner/input_linux.go)2
-rw-r--r--vendor/github.com/peterh/liner/input_windows.go (renamed from Godeps/_workspace/src/github.com/peterh/liner/input_windows.go)3
-rw-r--r--vendor/github.com/peterh/liner/line.go (renamed from Godeps/_workspace/src/github.com/peterh/liner/line.go)19
-rw-r--r--vendor/github.com/peterh/liner/output.go (renamed from Godeps/_workspace/src/github.com/peterh/liner/output.go)10
-rw-r--r--vendor/github.com/peterh/liner/output_windows.go (renamed from Godeps/_workspace/src/github.com/peterh/liner/output_windows.go)4
-rw-r--r--vendor/github.com/peterh/liner/signal.go (renamed from Godeps/_workspace/src/github.com/peterh/liner/signal.go)0
-rw-r--r--vendor/github.com/peterh/liner/signal_legacy.go (renamed from Godeps/_workspace/src/github.com/peterh/liner/signal_legacy.go)0
-rw-r--r--vendor/github.com/peterh/liner/unixmode.go (renamed from Godeps/_workspace/src/github.com/peterh/liner/unixmode.go)0
-rw-r--r--vendor/github.com/peterh/liner/width.go (renamed from Godeps/_workspace/src/github.com/peterh/liner/width.go)0
-rw-r--r--vendor/github.com/rcrowley/go-metrics/.gitignore (renamed from Godeps/_workspace/src/github.com/rcrowley/go-metrics/.gitignore)0
-rw-r--r--vendor/github.com/rcrowley/go-metrics/.travis.yml (renamed from Godeps/_workspace/src/github.com/rcrowley/go-metrics/.travis.yml)0
-rw-r--r--vendor/github.com/rcrowley/go-metrics/LICENSE (renamed from Godeps/_workspace/src/github.com/rcrowley/go-metrics/LICENSE)0
-rw-r--r--vendor/github.com/rcrowley/go-metrics/README.md (renamed from Godeps/_workspace/src/github.com/rcrowley/go-metrics/README.md)16
-rw-r--r--vendor/github.com/rcrowley/go-metrics/counter.go (renamed from Godeps/_workspace/src/github.com/rcrowley/go-metrics/counter.go)0
-rw-r--r--vendor/github.com/rcrowley/go-metrics/debug.go (renamed from Godeps/_workspace/src/github.com/rcrowley/go-metrics/debug.go)0
-rw-r--r--vendor/github.com/rcrowley/go-metrics/ewma.go (renamed from Godeps/_workspace/src/github.com/rcrowley/go-metrics/ewma.go)0
-rw-r--r--vendor/github.com/rcrowley/go-metrics/exp/exp.go (renamed from Godeps/_workspace/src/github.com/rcrowley/go-metrics/exp/exp.go)14
-rw-r--r--vendor/github.com/rcrowley/go-metrics/gauge.go (renamed from Godeps/_workspace/src/github.com/rcrowley/go-metrics/gauge.go)36
-rw-r--r--vendor/github.com/rcrowley/go-metrics/gauge_float64.go (renamed from Godeps/_workspace/src/github.com/rcrowley/go-metrics/gauge_float64.go)36
-rw-r--r--vendor/github.com/rcrowley/go-metrics/graphite.go (renamed from Godeps/_workspace/src/github.com/rcrowley/go-metrics/graphite.go)0
-rw-r--r--vendor/github.com/rcrowley/go-metrics/healthcheck.go (renamed from Godeps/_workspace/src/github.com/rcrowley/go-metrics/healthcheck.go)0
-rw-r--r--vendor/github.com/rcrowley/go-metrics/histogram.go (renamed from Godeps/_workspace/src/github.com/rcrowley/go-metrics/histogram.go)0
-rw-r--r--vendor/github.com/rcrowley/go-metrics/json.go (renamed from Godeps/_workspace/src/github.com/rcrowley/go-metrics/json.go)4
-rw-r--r--vendor/github.com/rcrowley/go-metrics/log.go (renamed from Godeps/_workspace/src/github.com/rcrowley/go-metrics/log.go)9
-rw-r--r--vendor/github.com/rcrowley/go-metrics/memory.md (renamed from Godeps/_workspace/src/github.com/rcrowley/go-metrics/memory.md)0
-rw-r--r--vendor/github.com/rcrowley/go-metrics/meter.go (renamed from Godeps/_workspace/src/github.com/rcrowley/go-metrics/meter.go)0
-rw-r--r--vendor/github.com/rcrowley/go-metrics/metrics.go (renamed from Godeps/_workspace/src/github.com/rcrowley/go-metrics/metrics.go)0
-rw-r--r--vendor/github.com/rcrowley/go-metrics/opentsdb.go (renamed from Godeps/_workspace/src/github.com/rcrowley/go-metrics/opentsdb.go)0
-rw-r--r--vendor/github.com/rcrowley/go-metrics/registry.go (renamed from Godeps/_workspace/src/github.com/rcrowley/go-metrics/registry.go)27
-rw-r--r--vendor/github.com/rcrowley/go-metrics/runtime.go (renamed from Godeps/_workspace/src/github.com/rcrowley/go-metrics/runtime.go)8
-rw-r--r--vendor/github.com/rcrowley/go-metrics/runtime_cgo.go (renamed from Godeps/_workspace/src/github.com/rcrowley/go-metrics/runtime_cgo.go)0
-rw-r--r--vendor/github.com/rcrowley/go-metrics/runtime_gccpufraction.go (renamed from Godeps/_workspace/src/github.com/rcrowley/go-metrics/runtime_gccpufraction.go)0
-rw-r--r--vendor/github.com/rcrowley/go-metrics/runtime_no_cgo.go (renamed from Godeps/_workspace/src/github.com/rcrowley/go-metrics/runtime_no_cgo.go)0
-rw-r--r--vendor/github.com/rcrowley/go-metrics/runtime_no_gccpufraction.go (renamed from Godeps/_workspace/src/github.com/rcrowley/go-metrics/runtime_no_gccpufraction.go)0
-rw-r--r--vendor/github.com/rcrowley/go-metrics/sample.go (renamed from Godeps/_workspace/src/github.com/rcrowley/go-metrics/sample.go)0
-rw-r--r--vendor/github.com/rcrowley/go-metrics/syslog.go (renamed from Godeps/_workspace/src/github.com/rcrowley/go-metrics/syslog.go)0
-rw-r--r--vendor/github.com/rcrowley/go-metrics/timer.go (renamed from Godeps/_workspace/src/github.com/rcrowley/go-metrics/timer.go)0
-rwxr-xr-x[-rw-r--r--]vendor/github.com/rcrowley/go-metrics/validate.sh (renamed from Godeps/_workspace/src/github.com/rcrowley/go-metrics/validate.sh)0
-rw-r--r--vendor/github.com/rcrowley/go-metrics/writer.go (renamed from Godeps/_workspace/src/github.com/rcrowley/go-metrics/writer.go)0
-rw-r--r--vendor/github.com/rjeczalik/notify/.gitignore (renamed from Godeps/_workspace/src/github.com/rjeczalik/notify/.gitignore)0
-rw-r--r--vendor/github.com/rjeczalik/notify/.travis.yml (renamed from Godeps/_workspace/src/github.com/rjeczalik/notify/.travis.yml)0
-rw-r--r--vendor/github.com/rjeczalik/notify/AUTHORS (renamed from Godeps/_workspace/src/github.com/rjeczalik/notify/AUTHORS)0
-rw-r--r--vendor/github.com/rjeczalik/notify/LICENSE (renamed from Godeps/_workspace/src/github.com/rjeczalik/notify/LICENSE)0
-rw-r--r--vendor/github.com/rjeczalik/notify/README.md (renamed from Godeps/_workspace/src/github.com/rjeczalik/notify/README.md)0
-rw-r--r--vendor/github.com/rjeczalik/notify/appveyor.yml (renamed from Godeps/_workspace/src/github.com/rjeczalik/notify/appveyor.yml)0
-rw-r--r--vendor/github.com/rjeczalik/notify/debug.go (renamed from Godeps/_workspace/src/github.com/rjeczalik/notify/debug.go)0
-rw-r--r--vendor/github.com/rjeczalik/notify/debug_debug.go (renamed from Godeps/_workspace/src/github.com/rjeczalik/notify/debug_debug.go)0
-rw-r--r--vendor/github.com/rjeczalik/notify/doc.go (renamed from Godeps/_workspace/src/github.com/rjeczalik/notify/doc.go)0
-rw-r--r--vendor/github.com/rjeczalik/notify/event.go (renamed from Godeps/_workspace/src/github.com/rjeczalik/notify/event.go)0
-rw-r--r--vendor/github.com/rjeczalik/notify/event_fen.go (renamed from Godeps/_workspace/src/github.com/rjeczalik/notify/event_fen.go)0
-rw-r--r--vendor/github.com/rjeczalik/notify/event_fsevents.go (renamed from Godeps/_workspace/src/github.com/rjeczalik/notify/event_fsevents.go)0
-rw-r--r--vendor/github.com/rjeczalik/notify/event_inotify.go (renamed from Godeps/_workspace/src/github.com/rjeczalik/notify/event_inotify.go)0
-rw-r--r--vendor/github.com/rjeczalik/notify/event_kqueue.go (renamed from Godeps/_workspace/src/github.com/rjeczalik/notify/event_kqueue.go)0
-rw-r--r--vendor/github.com/rjeczalik/notify/event_readdcw.go (renamed from Godeps/_workspace/src/github.com/rjeczalik/notify/event_readdcw.go)0
-rw-r--r--vendor/github.com/rjeczalik/notify/event_stub.go (renamed from Godeps/_workspace/src/github.com/rjeczalik/notify/event_stub.go)0
-rw-r--r--vendor/github.com/rjeczalik/notify/event_trigger.go (renamed from Godeps/_workspace/src/github.com/rjeczalik/notify/event_trigger.go)0
-rw-r--r--vendor/github.com/rjeczalik/notify/node.go (renamed from Godeps/_workspace/src/github.com/rjeczalik/notify/node.go)3
-rw-r--r--vendor/github.com/rjeczalik/notify/notify.go (renamed from Godeps/_workspace/src/github.com/rjeczalik/notify/notify.go)0
-rw-r--r--vendor/github.com/rjeczalik/notify/tree.go (renamed from Godeps/_workspace/src/github.com/rjeczalik/notify/tree.go)0
-rw-r--r--vendor/github.com/rjeczalik/notify/tree_nonrecursive.go (renamed from Godeps/_workspace/src/github.com/rjeczalik/notify/tree_nonrecursive.go)0
-rw-r--r--vendor/github.com/rjeczalik/notify/tree_recursive.go (renamed from Godeps/_workspace/src/github.com/rjeczalik/notify/tree_recursive.go)0
-rw-r--r--vendor/github.com/rjeczalik/notify/util.go (renamed from Godeps/_workspace/src/github.com/rjeczalik/notify/util.go)0
-rw-r--r--vendor/github.com/rjeczalik/notify/watcher.go (renamed from Godeps/_workspace/src/github.com/rjeczalik/notify/watcher.go)0
-rw-r--r--vendor/github.com/rjeczalik/notify/watcher_fen.go (renamed from Godeps/_workspace/src/github.com/rjeczalik/notify/watcher_fen.go)0
-rw-r--r--vendor/github.com/rjeczalik/notify/watcher_fen_cgo.go (renamed from Godeps/_workspace/src/github.com/rjeczalik/notify/watcher_fen_cgo.go)0
-rw-r--r--vendor/github.com/rjeczalik/notify/watcher_fsevents.go (renamed from Godeps/_workspace/src/github.com/rjeczalik/notify/watcher_fsevents.go)0
-rw-r--r--vendor/github.com/rjeczalik/notify/watcher_fsevents_cgo.go (renamed from Godeps/_workspace/src/github.com/rjeczalik/notify/watcher_fsevents_cgo.go)0
-rw-r--r--vendor/github.com/rjeczalik/notify/watcher_inotify.go (renamed from Godeps/_workspace/src/github.com/rjeczalik/notify/watcher_inotify.go)0
-rw-r--r--vendor/github.com/rjeczalik/notify/watcher_kqueue.go (renamed from Godeps/_workspace/src/github.com/rjeczalik/notify/watcher_kqueue.go)0
-rw-r--r--vendor/github.com/rjeczalik/notify/watcher_readdcw.go (renamed from Godeps/_workspace/src/github.com/rjeczalik/notify/watcher_readdcw.go)2
-rw-r--r--vendor/github.com/rjeczalik/notify/watcher_stub.go (renamed from Godeps/_workspace/src/github.com/rjeczalik/notify/watcher_stub.go)0
-rw-r--r--vendor/github.com/rjeczalik/notify/watcher_trigger.go (renamed from Godeps/_workspace/src/github.com/rjeczalik/notify/watcher_trigger.go)0
-rw-r--r--vendor/github.com/rjeczalik/notify/watchpoint.go (renamed from Godeps/_workspace/src/github.com/rjeczalik/notify/watchpoint.go)0
-rw-r--r--vendor/github.com/rjeczalik/notify/watchpoint_other.go (renamed from Godeps/_workspace/src/github.com/rjeczalik/notify/watchpoint_other.go)0
-rw-r--r--vendor/github.com/rjeczalik/notify/watchpoint_readdcw.go (renamed from Godeps/_workspace/src/github.com/rjeczalik/notify/watchpoint_readdcw.go)0
-rw-r--r--vendor/github.com/robertkrimen/otto/.gitignore (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/.gitignore)0
-rw-r--r--vendor/github.com/robertkrimen/otto/DESIGN.markdown (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/DESIGN.markdown)0
-rw-r--r--vendor/github.com/robertkrimen/otto/LICENSE (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/LICENSE)0
-rw-r--r--vendor/github.com/robertkrimen/otto/Makefile (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/Makefile)2
-rw-r--r--vendor/github.com/robertkrimen/otto/README.markdown (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/README.markdown)288
-rw-r--r--vendor/github.com/robertkrimen/otto/ast/README.markdown (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/ast/README.markdown)0
-rw-r--r--vendor/github.com/robertkrimen/otto/ast/comments.go278
-rw-r--r--vendor/github.com/robertkrimen/otto/ast/node.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/ast/node.go)11
-rw-r--r--vendor/github.com/robertkrimen/otto/builtin.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/builtin.go)4
-rw-r--r--vendor/github.com/robertkrimen/otto/builtin_array.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/builtin_array.go)25
-rw-r--r--vendor/github.com/robertkrimen/otto/builtin_boolean.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/builtin_boolean.go)0
-rw-r--r--vendor/github.com/robertkrimen/otto/builtin_date.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/builtin_date.go)0
-rw-r--r--vendor/github.com/robertkrimen/otto/builtin_error.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/builtin_error.go)16
-rw-r--r--vendor/github.com/robertkrimen/otto/builtin_function.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/builtin_function.go)0
-rw-r--r--vendor/github.com/robertkrimen/otto/builtin_json.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/builtin_json.go)0
-rw-r--r--vendor/github.com/robertkrimen/otto/builtin_math.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/builtin_math.go)0
-rw-r--r--vendor/github.com/robertkrimen/otto/builtin_number.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/builtin_number.go)6
-rw-r--r--vendor/github.com/robertkrimen/otto/builtin_object.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/builtin_object.go)0
-rw-r--r--vendor/github.com/robertkrimen/otto/builtin_regexp.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/builtin_regexp.go)0
-rw-r--r--vendor/github.com/robertkrimen/otto/builtin_string.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/builtin_string.go)7
-rw-r--r--vendor/github.com/robertkrimen/otto/clone.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/clone.go)8
-rw-r--r--vendor/github.com/robertkrimen/otto/cmpl.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/cmpl.go)0
-rw-r--r--vendor/github.com/robertkrimen/otto/cmpl_evaluate.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/cmpl_evaluate.go)0
-rw-r--r--vendor/github.com/robertkrimen/otto/cmpl_evaluate_expression.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/cmpl_evaluate_expression.go)0
-rw-r--r--vendor/github.com/robertkrimen/otto/cmpl_evaluate_statement.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/cmpl_evaluate_statement.go)0
-rw-r--r--vendor/github.com/robertkrimen/otto/cmpl_parse.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/cmpl_parse.go)3
-rw-r--r--vendor/github.com/robertkrimen/otto/console.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/console.go)0
-rw-r--r--vendor/github.com/robertkrimen/otto/dbg.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/dbg.go)0
-rw-r--r--vendor/github.com/robertkrimen/otto/dbg/dbg.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/dbg/dbg.go)0
-rw-r--r--vendor/github.com/robertkrimen/otto/error.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/error.go)131
-rw-r--r--vendor/github.com/robertkrimen/otto/evaluate.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/evaluate.go)0
-rw-r--r--vendor/github.com/robertkrimen/otto/file/README.markdown (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/file/README.markdown)0
-rw-r--r--vendor/github.com/robertkrimen/otto/file/file.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/file/file.go)53
-rw-r--r--vendor/github.com/robertkrimen/otto/global.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/global.go)8
-rw-r--r--vendor/github.com/robertkrimen/otto/inline.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/inline.go)0
-rwxr-xr-x[-rw-r--r--]vendor/github.com/robertkrimen/otto/inline.pl (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/inline)0
-rw-r--r--vendor/github.com/robertkrimen/otto/object.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/object.go)0
-rw-r--r--vendor/github.com/robertkrimen/otto/object_class.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/object_class.go)0
-rw-r--r--vendor/github.com/robertkrimen/otto/otto.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/otto.go)127
-rw-r--r--vendor/github.com/robertkrimen/otto/otto_.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/otto_.go)0
-rw-r--r--vendor/github.com/robertkrimen/otto/parser/Makefile (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/parser/Makefile)0
-rw-r--r--vendor/github.com/robertkrimen/otto/parser/README.markdown (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/parser/README.markdown)0
-rw-r--r--vendor/github.com/robertkrimen/otto/parser/dbg.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/parser/dbg.go)0
-rw-r--r--vendor/github.com/robertkrimen/otto/parser/error.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/parser/error.go)0
-rw-r--r--vendor/github.com/robertkrimen/otto/parser/expression.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/parser/expression.go)325
-rw-r--r--vendor/github.com/robertkrimen/otto/parser/lexer.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/parser/lexer.go)18
-rw-r--r--vendor/github.com/robertkrimen/otto/parser/parser.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/parser/parser.go)185
-rw-r--r--vendor/github.com/robertkrimen/otto/parser/regexp.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/parser/regexp.go)0
-rw-r--r--vendor/github.com/robertkrimen/otto/parser/scope.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/parser/scope.go)0
-rw-r--r--vendor/github.com/robertkrimen/otto/parser/statement.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/parser/statement.go)439
-rw-r--r--vendor/github.com/robertkrimen/otto/property.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/property.go)0
-rw-r--r--vendor/github.com/robertkrimen/otto/registry/README.markdown (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/registry/README.markdown)0
-rw-r--r--vendor/github.com/robertkrimen/otto/registry/registry.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/registry/registry.go)0
-rw-r--r--vendor/github.com/robertkrimen/otto/result.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/result.go)0
-rw-r--r--vendor/github.com/robertkrimen/otto/runtime.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/runtime.go)440
-rw-r--r--vendor/github.com/robertkrimen/otto/scope.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/scope.go)1
-rw-r--r--vendor/github.com/robertkrimen/otto/script.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/script.go)37
-rw-r--r--vendor/github.com/robertkrimen/otto/stash.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/stash.go)0
-rw-r--r--vendor/github.com/robertkrimen/otto/token/Makefile (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/token/Makefile)0
-rw-r--r--vendor/github.com/robertkrimen/otto/token/README.markdown (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/token/README.markdown)0
-rw-r--r--vendor/github.com/robertkrimen/otto/token/token.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/token/token.go)0
-rw-r--r--vendor/github.com/robertkrimen/otto/token/token_const.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/token/token_const.go)0
-rwxr-xr-x[-rw-r--r--]vendor/github.com/robertkrimen/otto/token/tokenfmt (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/token/tokenfmt)0
-rw-r--r--vendor/github.com/robertkrimen/otto/type_arguments.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/type_arguments.go)0
-rw-r--r--vendor/github.com/robertkrimen/otto/type_array.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/type_array.go)2
-rw-r--r--vendor/github.com/robertkrimen/otto/type_boolean.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/type_boolean.go)0
-rw-r--r--vendor/github.com/robertkrimen/otto/type_date.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/type_date.go)0
-rw-r--r--vendor/github.com/robertkrimen/otto/type_error.go24
-rw-r--r--vendor/github.com/robertkrimen/otto/type_function.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/type_function.go)29
-rw-r--r--vendor/github.com/robertkrimen/otto/type_go_array.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/type_go_array.go)0
-rw-r--r--vendor/github.com/robertkrimen/otto/type_go_map.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/type_go_map.go)0
-rw-r--r--vendor/github.com/robertkrimen/otto/type_go_slice.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/type_go_slice.go)8
-rw-r--r--vendor/github.com/robertkrimen/otto/type_go_struct.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/type_go_struct.go)0
-rw-r--r--vendor/github.com/robertkrimen/otto/type_number.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/type_number.go)0
-rw-r--r--vendor/github.com/robertkrimen/otto/type_reference.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/type_reference.go)0
-rw-r--r--vendor/github.com/robertkrimen/otto/type_regexp.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/type_regexp.go)0
-rw-r--r--vendor/github.com/robertkrimen/otto/type_string.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/type_string.go)0
-rw-r--r--vendor/github.com/robertkrimen/otto/value.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/value.go)26
-rw-r--r--vendor/github.com/robertkrimen/otto/value_boolean.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/value_boolean.go)0
-rw-r--r--vendor/github.com/robertkrimen/otto/value_number.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/value_number.go)20
-rw-r--r--vendor/github.com/robertkrimen/otto/value_primitive.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/value_primitive.go)0
-rw-r--r--vendor/github.com/robertkrimen/otto/value_string.go (renamed from Godeps/_workspace/src/github.com/robertkrimen/otto/value_string.go)0
-rw-r--r--vendor/github.com/rs/cors/.travis.yml (renamed from Godeps/_workspace/src/github.com/rs/cors/.travis.yml)0
-rw-r--r--vendor/github.com/rs/cors/LICENSE (renamed from Godeps/_workspace/src/github.com/rs/cors/LICENSE)0
-rw-r--r--vendor/github.com/rs/cors/README.md (renamed from Godeps/_workspace/src/github.com/rs/cors/README.md)27
-rw-r--r--vendor/github.com/rs/cors/cors.go412
-rw-r--r--vendor/github.com/rs/cors/utils.go70
-rw-r--r--vendor/github.com/rs/xhandler/.travis.yml7
-rw-r--r--vendor/github.com/rs/xhandler/LICENSE19
-rw-r--r--vendor/github.com/rs/xhandler/README.md134
-rw-r--r--vendor/github.com/rs/xhandler/chain.go121
-rw-r--r--vendor/github.com/rs/xhandler/middleware.go59
-rw-r--r--vendor/github.com/rs/xhandler/xhandler.go42
-rw-r--r--vendor/github.com/syndtr/goleveldb/.travis.yml12
-rw-r--r--vendor/github.com/syndtr/goleveldb/LICENSE (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/LICENSE)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/README.md105
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/batch.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/batch.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/cache/cache.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/cache/cache.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/cache/lru.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/cache/lru.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/comparer.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/comparer.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/comparer/bytes_comparer.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/comparer/bytes_comparer.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/comparer/comparer.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/comparer/comparer.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/db.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/db.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/db_compaction.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/db_compaction.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/db_iter.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/db_iter.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/db_snapshot.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/db_snapshot.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/db_state.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/db_state.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/db_transaction.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/db_transaction.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/db_util.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/db_util.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/db_write.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/db_write.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/doc.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/doc.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/errors.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/errors.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/errors/errors.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/errors/errors.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/filter.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/filter.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/filter/bloom.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/filter/bloom.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/filter/filter.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/filter/filter.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/iterator/array_iter.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/iterator/array_iter.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/iterator/indexed_iter.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/iterator/indexed_iter.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/iterator/iter.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/iterator/iter.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/iterator/merged_iter.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/iterator/merged_iter.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/journal/journal.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/journal/journal.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/key.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/key.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/memdb/memdb.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/memdb/memdb.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/opt/options.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/opt/options.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/options.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/options.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/session.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/session.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/session_compaction.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/session_compaction.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/session_record.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/session_record.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/session_util.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/session_util.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/storage/file_storage.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/storage/file_storage.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/storage/file_storage_nacl.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/storage/file_storage_nacl.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/storage/file_storage_plan9.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/storage/file_storage_plan9.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/storage/file_storage_solaris.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/storage/file_storage_solaris.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/storage/file_storage_unix.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/storage/file_storage_unix.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/storage/file_storage_windows.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/storage/file_storage_windows.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/storage/mem_storage.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/storage/mem_storage.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/storage/storage.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/storage/storage.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/table.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/table.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/table/reader.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/table/reader.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/table/table.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/table/table.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/table/writer.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/table/writer.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/util.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/util.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/util/buffer.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/util/buffer.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/util/buffer_pool.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/util/buffer_pool.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/util/crc32.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/util/crc32.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/util/hash.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/util/hash.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/util/range.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/util/range.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/util/util.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/util/util.go)0
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/version.go (renamed from Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/version.go)0
-rw-r--r--vendor/golang.org/x/crypto/.gitattributes10
-rw-r--r--vendor/golang.org/x/crypto/.gitignore2
-rw-r--r--vendor/golang.org/x/crypto/AUTHORS3
-rw-r--r--vendor/golang.org/x/crypto/CONTRIBUTING.md31
-rw-r--r--vendor/golang.org/x/crypto/CONTRIBUTORS3
-rw-r--r--vendor/golang.org/x/crypto/LICENSE (renamed from Godeps/_workspace/src/golang.org/x/net/LICENSE)0
-rw-r--r--vendor/golang.org/x/crypto/PATENTS (renamed from Godeps/_workspace/src/golang.org/x/crypto/PATENTS)0
-rw-r--r--vendor/golang.org/x/crypto/README3
-rw-r--r--vendor/golang.org/x/crypto/codereview.cfg1
-rw-r--r--vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go (renamed from Godeps/_workspace/src/golang.org/x/crypto/pbkdf2/pbkdf2.go)2
-rw-r--r--vendor/golang.org/x/crypto/ripemd160/ripemd160.go (renamed from Godeps/_workspace/src/golang.org/x/crypto/ripemd160/ripemd160.go)2
-rw-r--r--vendor/golang.org/x/crypto/ripemd160/ripemd160block.go (renamed from Godeps/_workspace/src/golang.org/x/crypto/ripemd160/ripemd160block.go)0
-rw-r--r--vendor/golang.org/x/crypto/scrypt/scrypt.go (renamed from Godeps/_workspace/src/golang.org/x/crypto/scrypt/scrypt.go)4
-rw-r--r--vendor/golang.org/x/net/.gitattributes10
-rw-r--r--vendor/golang.org/x/net/.gitignore2
-rw-r--r--vendor/golang.org/x/net/AUTHORS3
-rw-r--r--vendor/golang.org/x/net/CONTRIBUTING.md31
-rw-r--r--vendor/golang.org/x/net/CONTRIBUTORS3
-rw-r--r--vendor/golang.org/x/net/LICENSE (renamed from Godeps/_workspace/src/golang.org/x/sys/LICENSE)0
-rw-r--r--vendor/golang.org/x/net/PATENTS (renamed from Godeps/_workspace/src/golang.org/x/net/PATENTS)0
-rw-r--r--vendor/golang.org/x/net/README3
-rw-r--r--vendor/golang.org/x/net/codereview.cfg1
-rw-r--r--vendor/golang.org/x/net/html/atom/atom.go (renamed from Godeps/_workspace/src/golang.org/x/net/html/atom/atom.go)2
-rw-r--r--vendor/golang.org/x/net/html/atom/gen.go (renamed from Godeps/_workspace/src/golang.org/x/net/html/atom/gen.go)0
-rw-r--r--vendor/golang.org/x/net/html/atom/table.go (renamed from Godeps/_workspace/src/golang.org/x/net/html/atom/table.go)0
-rw-r--r--vendor/golang.org/x/net/html/charset/charset.go (renamed from Godeps/_workspace/src/golang.org/x/net/html/charset/charset.go)2
-rw-r--r--vendor/golang.org/x/net/html/const.go (renamed from Godeps/_workspace/src/golang.org/x/net/html/const.go)0
-rw-r--r--vendor/golang.org/x/net/html/doc.go (renamed from Godeps/_workspace/src/golang.org/x/net/html/doc.go)2
-rw-r--r--vendor/golang.org/x/net/html/doctype.go (renamed from Godeps/_workspace/src/golang.org/x/net/html/doctype.go)0
-rw-r--r--vendor/golang.org/x/net/html/entity.go (renamed from Godeps/_workspace/src/golang.org/x/net/html/entity.go)0
-rw-r--r--vendor/golang.org/x/net/html/escape.go (renamed from Godeps/_workspace/src/golang.org/x/net/html/escape.go)0
-rw-r--r--vendor/golang.org/x/net/html/foreign.go (renamed from Godeps/_workspace/src/golang.org/x/net/html/foreign.go)0
-rw-r--r--vendor/golang.org/x/net/html/node.go (renamed from Godeps/_workspace/src/golang.org/x/net/html/node.go)0
-rw-r--r--vendor/golang.org/x/net/html/parse.go (renamed from Godeps/_workspace/src/golang.org/x/net/html/parse.go)0
-rw-r--r--vendor/golang.org/x/net/html/render.go (renamed from Godeps/_workspace/src/golang.org/x/net/html/render.go)0
-rw-r--r--vendor/golang.org/x/net/html/token.go (renamed from Godeps/_workspace/src/golang.org/x/net/html/token.go)0
-rw-r--r--vendor/golang.org/x/net/websocket/client.go (renamed from Godeps/_workspace/src/golang.org/x/net/websocket/client.go)15
-rw-r--r--vendor/golang.org/x/net/websocket/dial.go24
-rw-r--r--vendor/golang.org/x/net/websocket/hybi.go (renamed from Godeps/_workspace/src/golang.org/x/net/websocket/hybi.go)0
-rw-r--r--vendor/golang.org/x/net/websocket/server.go (renamed from Godeps/_workspace/src/golang.org/x/net/websocket/server.go)0
-rw-r--r--vendor/golang.org/x/net/websocket/websocket.go (renamed from Godeps/_workspace/src/golang.org/x/net/websocket/websocket.go)35
-rw-r--r--vendor/golang.org/x/sys/.gitattributes10
-rw-r--r--vendor/golang.org/x/sys/.gitignore2
-rw-r--r--vendor/golang.org/x/sys/AUTHORS3
-rw-r--r--vendor/golang.org/x/sys/CONTRIBUTING.md31
-rw-r--r--vendor/golang.org/x/sys/CONTRIBUTORS3
-rw-r--r--vendor/golang.org/x/sys/LICENSE (renamed from Godeps/_workspace/src/golang.org/x/text/LICENSE)0
-rw-r--r--vendor/golang.org/x/sys/PATENTS (renamed from Godeps/_workspace/src/golang.org/x/sys/PATENTS)0
-rw-r--r--vendor/golang.org/x/sys/README3
-rw-r--r--vendor/golang.org/x/sys/codereview.cfg1
-rw-r--r--vendor/golang.org/x/sys/unix/.gitignore (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/.gitignore)0
-rw-r--r--vendor/golang.org/x/sys/unix/asm.s (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/asm.s)0
-rw-r--r--vendor/golang.org/x/sys/unix/asm_darwin_386.s (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/asm_darwin_386.s)0
-rw-r--r--vendor/golang.org/x/sys/unix/asm_darwin_amd64.s (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/asm_darwin_amd64.s)0
-rw-r--r--vendor/golang.org/x/sys/unix/asm_darwin_arm.s (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/asm_darwin_arm.s)0
-rw-r--r--vendor/golang.org/x/sys/unix/asm_darwin_arm64.s (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/asm_darwin_arm64.s)0
-rw-r--r--vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/asm_dragonfly_amd64.s)0
-rw-r--r--vendor/golang.org/x/sys/unix/asm_freebsd_386.s (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/asm_freebsd_386.s)0
-rw-r--r--vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/asm_freebsd_amd64.s)0
-rw-r--r--vendor/golang.org/x/sys/unix/asm_freebsd_arm.s (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/asm_freebsd_arm.s)0
-rw-r--r--vendor/golang.org/x/sys/unix/asm_linux_386.s (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/asm_linux_386.s)0
-rw-r--r--vendor/golang.org/x/sys/unix/asm_linux_amd64.s (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/asm_linux_amd64.s)0
-rw-r--r--vendor/golang.org/x/sys/unix/asm_linux_arm.s (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/asm_linux_arm.s)0
-rw-r--r--vendor/golang.org/x/sys/unix/asm_linux_arm64.s (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/asm_linux_arm64.s)0
-rw-r--r--vendor/golang.org/x/sys/unix/asm_linux_mips64x.s (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/asm_linux_mips64x.s)0
-rw-r--r--vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/asm_linux_ppc64x.s)0
-rw-r--r--vendor/golang.org/x/sys/unix/asm_linux_s390x.s (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/asm_linux_s390x.s)0
-rw-r--r--vendor/golang.org/x/sys/unix/asm_netbsd_386.s (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/asm_netbsd_386.s)0
-rw-r--r--vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/asm_netbsd_amd64.s)0
-rw-r--r--vendor/golang.org/x/sys/unix/asm_netbsd_arm.s (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/asm_netbsd_arm.s)0
-rw-r--r--vendor/golang.org/x/sys/unix/asm_openbsd_386.s (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/asm_openbsd_386.s)0
-rw-r--r--vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/asm_openbsd_amd64.s)0
-rw-r--r--vendor/golang.org/x/sys/unix/asm_solaris_amd64.s (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/asm_solaris_amd64.s)0
-rw-r--r--vendor/golang.org/x/sys/unix/bluetooth_linux.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/bluetooth_linux.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/constants.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/constants.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/env_unix.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/env_unix.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/env_unset.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/env_unset.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/flock.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/flock.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/flock_linux_32bit.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/flock_linux_32bit.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/gccgo.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/gccgo.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/gccgo_c.c (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/gccgo_c.c)0
-rw-r--r--vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/gccgo_linux_amd64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/gccgo_linux_sparc64.go20
-rwxr-xr-xvendor/golang.org/x/sys/unix/mkall.sh (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/mkall.sh)7
-rwxr-xr-xvendor/golang.org/x/sys/unix/mkerrors.sh (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/mkerrors.sh)7
-rw-r--r--vendor/golang.org/x/sys/unix/mkpost.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/mkpost.go)0
-rwxr-xr-xvendor/golang.org/x/sys/unix/mksyscall.pl (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/mksyscall.pl)0
-rwxr-xr-xvendor/golang.org/x/sys/unix/mksyscall_solaris.pl (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/mksyscall_solaris.pl)0
-rwxr-xr-xvendor/golang.org/x/sys/unix/mksysctl_openbsd.pl (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/mksysctl_openbsd.pl)0
-rwxr-xr-xvendor/golang.org/x/sys/unix/mksysnum_darwin.pl (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/mksysnum_darwin.pl)0
-rwxr-xr-xvendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/mksysnum_dragonfly.pl)0
-rwxr-xr-xvendor/golang.org/x/sys/unix/mksysnum_freebsd.pl (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/mksysnum_freebsd.pl)0
-rwxr-xr-xvendor/golang.org/x/sys/unix/mksysnum_linux.pl (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/mksysnum_linux.pl)0
-rwxr-xr-xvendor/golang.org/x/sys/unix/mksysnum_netbsd.pl (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/mksysnum_netbsd.pl)0
-rwxr-xr-xvendor/golang.org/x/sys/unix/mksysnum_openbsd.pl (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/mksysnum_openbsd.pl)0
-rw-r--r--vendor/golang.org/x/sys/unix/race.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/race.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/race0.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/race0.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/sockcmsg_linux.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/sockcmsg_linux.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/sockcmsg_unix.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/sockcmsg_unix.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/str.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/str.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/syscall.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/syscall.go)2
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_bsd.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/syscall_bsd.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_darwin.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/syscall_darwin.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_darwin_386.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/syscall_darwin_386.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/syscall_darwin_amd64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_darwin_arm.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/syscall_darwin_arm.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/syscall_darwin_arm64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_dragonfly.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/syscall_dragonfly.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/syscall_dragonfly_amd64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_freebsd.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/syscall_freebsd.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_freebsd_386.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/syscall_freebsd_386.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/syscall_freebsd_amd64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/syscall_freebsd_arm.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/syscall_linux.go)21
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_386.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/syscall_linux_386.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_amd64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/syscall_linux_amd64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_arm.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/syscall_linux_arm.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_arm64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/syscall_linux_arm64.go)2
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/syscall_linux_mips64x.go)7
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/syscall_linux_ppc64x.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_s390x.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/syscall_linux_s390x.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go169
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_netbsd.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/syscall_netbsd.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_netbsd_386.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/syscall_netbsd_386.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/syscall_netbsd_amd64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/syscall_netbsd_arm.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_no_getwd.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/syscall_no_getwd.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_openbsd.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/syscall_openbsd.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_openbsd_386.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/syscall_openbsd_386.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/syscall_openbsd_amd64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_solaris.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/syscall_solaris.go)46
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/syscall_solaris_amd64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_unix.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/syscall_unix.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/types_darwin.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/types_darwin.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/types_dragonfly.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/types_dragonfly.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/types_freebsd.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/types_freebsd.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/types_linux.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/types_linux.go)9
-rw-r--r--vendor/golang.org/x/sys/unix/types_netbsd.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/types_netbsd.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/types_openbsd.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/types_openbsd.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/types_solaris.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/types_solaris.go)2
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_darwin_386.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_darwin_386.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_darwin_amd64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_darwin_arm.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_darwin_arm64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_freebsd_386.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_freebsd_amd64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_freebsd_arm.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_386.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_linux_386.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_linux_amd64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_arm.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_linux_arm.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_linux_arm64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_linux_mips64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_linux_mips64le.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_linux_ppc64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_linux_ppc64le.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_linux_s390x.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go2077
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_netbsd_386.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_netbsd_amd64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_netbsd_arm.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_openbsd_386.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_openbsd_amd64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_solaris_amd64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_darwin_386.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_darwin_amd64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_darwin_arm.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_darwin_arm64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_freebsd_386.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_freebsd_arm.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_386.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_linux_386.go)6
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_linux_amd64.go)6
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_linux_arm.go)6
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_linux_arm64.go)6
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_linux_mips64.go)6
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_linux_mips64le.go)6
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_linux_ppc64.go)6
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go)6
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_linux_s390x.go)6
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go1834
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_netbsd_386.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_netbsd_arm.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_openbsd_386.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_solaris_amd64.go)40
-rw-r--r--vendor/golang.org/x/sys/unix/zsysctl_openbsd.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsysctl_openbsd.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_darwin_386.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_darwin_386.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_darwin_amd64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_darwin_arm.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_darwin_arm64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_freebsd_386.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_freebsd_arm.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_linux_386.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_linux_386.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_linux_amd64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_linux_arm.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_linux_arm64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_linux_mips64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_linux_mips64le.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_linux_ppc64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_linux_s390x.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go348
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_netbsd_386.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_netbsd_arm.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_openbsd_386.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_solaris_amd64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_solaris_amd64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_darwin_386.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_darwin_386.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_darwin_amd64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_darwin_arm.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_darwin_arm64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_freebsd_386.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_freebsd_amd64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_freebsd_arm.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_386.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_linux_386.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_linux_amd64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_arm.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_linux_arm.go)11
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_linux_arm64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_linux_mips64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_linux_mips64le.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_linux_ppc64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_linux_ppc64le.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_linux_s390x.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go640
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_netbsd_386.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_netbsd_amd64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_netbsd_arm.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_openbsd_386.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_openbsd_amd64.go)0
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go (renamed from Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_solaris_amd64.go)3
-rw-r--r--vendor/golang.org/x/text/.gitattributes10
-rw-r--r--vendor/golang.org/x/text/.gitignore3
-rw-r--r--vendor/golang.org/x/text/AUTHORS3
-rw-r--r--vendor/golang.org/x/text/CONTRIBUTING.md31
-rw-r--r--vendor/golang.org/x/text/CONTRIBUTORS3
-rw-r--r--vendor/golang.org/x/text/LICENSE (renamed from Godeps/_workspace/src/golang.org/x/tools/LICENSE)0
-rw-r--r--vendor/golang.org/x/text/PATENTS (renamed from Godeps/_workspace/src/golang.org/x/text/PATENTS)0
-rw-r--r--vendor/golang.org/x/text/README23
-rw-r--r--vendor/golang.org/x/text/codereview.cfg1
-rw-r--r--vendor/golang.org/x/text/encoding/charmap/charmap.go (renamed from Godeps/_workspace/src/golang.org/x/text/encoding/charmap/charmap.go)2
-rw-r--r--vendor/golang.org/x/text/encoding/charmap/maketables.go (renamed from Godeps/_workspace/src/golang.org/x/text/encoding/charmap/maketables.go)24
-rw-r--r--vendor/golang.org/x/text/encoding/charmap/tables.go (renamed from Godeps/_workspace/src/golang.org/x/text/encoding/charmap/tables.go)530
-rw-r--r--vendor/golang.org/x/text/encoding/encoding.go (renamed from Godeps/_workspace/src/golang.org/x/text/encoding/encoding.go)2
-rw-r--r--vendor/golang.org/x/text/encoding/htmlindex/gen.go (renamed from Godeps/_workspace/src/golang.org/x/text/encoding/htmlindex/gen.go)0
-rw-r--r--vendor/golang.org/x/text/encoding/htmlindex/htmlindex.go (renamed from Godeps/_workspace/src/golang.org/x/text/encoding/htmlindex/htmlindex.go)0
-rw-r--r--vendor/golang.org/x/text/encoding/htmlindex/map.go (renamed from Godeps/_workspace/src/golang.org/x/text/encoding/htmlindex/map.go)0
-rw-r--r--vendor/golang.org/x/text/encoding/htmlindex/tables.go (renamed from Godeps/_workspace/src/golang.org/x/text/encoding/htmlindex/tables.go)0
-rw-r--r--vendor/golang.org/x/text/encoding/internal/identifier/gen.go (renamed from Godeps/_workspace/src/golang.org/x/text/encoding/internal/identifier/gen.go)0
-rw-r--r--vendor/golang.org/x/text/encoding/internal/identifier/identifier.go (renamed from Godeps/_workspace/src/golang.org/x/text/encoding/internal/identifier/identifier.go)0
-rw-r--r--vendor/golang.org/x/text/encoding/internal/identifier/mib.go (renamed from Godeps/_workspace/src/golang.org/x/text/encoding/internal/identifier/mib.go)0
-rw-r--r--vendor/golang.org/x/text/encoding/internal/internal.go (renamed from Godeps/_workspace/src/golang.org/x/text/encoding/internal/internal.go)0
-rw-r--r--vendor/golang.org/x/text/encoding/japanese/all.go (renamed from Godeps/_workspace/src/golang.org/x/text/encoding/japanese/all.go)0
-rw-r--r--vendor/golang.org/x/text/encoding/japanese/eucjp.go (renamed from Godeps/_workspace/src/golang.org/x/text/encoding/japanese/eucjp.go)0
-rw-r--r--vendor/golang.org/x/text/encoding/japanese/iso2022jp.go (renamed from Godeps/_workspace/src/golang.org/x/text/encoding/japanese/iso2022jp.go)0
-rw-r--r--vendor/golang.org/x/text/encoding/japanese/maketables.go (renamed from Godeps/_workspace/src/golang.org/x/text/encoding/japanese/maketables.go)0
-rw-r--r--vendor/golang.org/x/text/encoding/japanese/shiftjis.go (renamed from Godeps/_workspace/src/golang.org/x/text/encoding/japanese/shiftjis.go)0
-rw-r--r--vendor/golang.org/x/text/encoding/japanese/tables.go (renamed from Godeps/_workspace/src/golang.org/x/text/encoding/japanese/tables.go)2
-rw-r--r--vendor/golang.org/x/text/encoding/korean/euckr.go (renamed from Godeps/_workspace/src/golang.org/x/text/encoding/korean/euckr.go)0
-rw-r--r--vendor/golang.org/x/text/encoding/korean/maketables.go (renamed from Godeps/_workspace/src/golang.org/x/text/encoding/korean/maketables.go)0
-rw-r--r--vendor/golang.org/x/text/encoding/korean/tables.go (renamed from Godeps/_workspace/src/golang.org/x/text/encoding/korean/tables.go)2
-rw-r--r--vendor/golang.org/x/text/encoding/simplifiedchinese/all.go (renamed from Godeps/_workspace/src/golang.org/x/text/encoding/simplifiedchinese/all.go)0
-rw-r--r--vendor/golang.org/x/text/encoding/simplifiedchinese/gbk.go (renamed from Godeps/_workspace/src/golang.org/x/text/encoding/simplifiedchinese/gbk.go)0
-rw-r--r--vendor/golang.org/x/text/encoding/simplifiedchinese/hzgb2312.go (renamed from Godeps/_workspace/src/golang.org/x/text/encoding/simplifiedchinese/hzgb2312.go)0
-rw-r--r--vendor/golang.org/x/text/encoding/simplifiedchinese/maketables.go (renamed from Godeps/_workspace/src/golang.org/x/text/encoding/simplifiedchinese/maketables.go)0
-rw-r--r--vendor/golang.org/x/text/encoding/simplifiedchinese/tables.go (renamed from Godeps/_workspace/src/golang.org/x/text/encoding/simplifiedchinese/tables.go)2
-rw-r--r--vendor/golang.org/x/text/encoding/traditionalchinese/big5.go (renamed from Godeps/_workspace/src/golang.org/x/text/encoding/traditionalchinese/big5.go)0
-rw-r--r--vendor/golang.org/x/text/encoding/traditionalchinese/maketables.go (renamed from Godeps/_workspace/src/golang.org/x/text/encoding/traditionalchinese/maketables.go)0
-rw-r--r--vendor/golang.org/x/text/encoding/traditionalchinese/tables.go (renamed from Godeps/_workspace/src/golang.org/x/text/encoding/traditionalchinese/tables.go)2
-rw-r--r--vendor/golang.org/x/text/encoding/unicode/override.go (renamed from Godeps/_workspace/src/golang.org/x/text/encoding/unicode/override.go)0
-rw-r--r--vendor/golang.org/x/text/encoding/unicode/unicode.go (renamed from Godeps/_workspace/src/golang.org/x/text/encoding/unicode/unicode.go)2
-rw-r--r--vendor/golang.org/x/text/internal/gen/code.go339
-rw-r--r--vendor/golang.org/x/text/internal/gen/gen.go281
-rw-r--r--vendor/golang.org/x/text/internal/tag/tag.go (renamed from Godeps/_workspace/src/golang.org/x/text/internal/tag/tag.go)2
-rw-r--r--vendor/golang.org/x/text/internal/utf8internal/utf8internal.go (renamed from Godeps/_workspace/src/golang.org/x/text/internal/utf8internal/utf8internal.go)0
-rw-r--r--vendor/golang.org/x/text/language/Makefile (renamed from Godeps/_workspace/src/golang.org/x/text/language/Makefile)0
-rw-r--r--vendor/golang.org/x/text/language/common.go (renamed from Godeps/_workspace/src/golang.org/x/text/language/common.go)0
-rw-r--r--vendor/golang.org/x/text/language/coverage.go (renamed from Godeps/_workspace/src/golang.org/x/text/language/coverage.go)0
-rw-r--r--vendor/golang.org/x/text/language/gen_common.go (renamed from Godeps/_workspace/src/golang.org/x/text/language/gen_common.go)0
-rw-r--r--vendor/golang.org/x/text/language/gen_index.go (renamed from Godeps/_workspace/src/golang.org/x/text/language/gen_index.go)0
-rw-r--r--vendor/golang.org/x/text/language/go1_1.go (renamed from Godeps/_workspace/src/golang.org/x/text/language/go1_1.go)0
-rw-r--r--vendor/golang.org/x/text/language/go1_2.go (renamed from Godeps/_workspace/src/golang.org/x/text/language/go1_2.go)0
-rw-r--r--vendor/golang.org/x/text/language/index.go767
-rw-r--r--vendor/golang.org/x/text/language/language.go (renamed from Godeps/_workspace/src/golang.org/x/text/language/language.go)4
-rw-r--r--vendor/golang.org/x/text/language/lookup.go (renamed from Godeps/_workspace/src/golang.org/x/text/language/lookup.go)0
-rw-r--r--vendor/golang.org/x/text/language/maketables.go (renamed from Godeps/_workspace/src/golang.org/x/text/language/maketables.go)13
-rw-r--r--vendor/golang.org/x/text/language/match.go (renamed from Godeps/_workspace/src/golang.org/x/text/language/match.go)21
-rw-r--r--vendor/golang.org/x/text/language/parse.go (renamed from Godeps/_workspace/src/golang.org/x/text/language/parse.go)0
-rw-r--r--vendor/golang.org/x/text/language/tables.go3547
-rw-r--r--vendor/golang.org/x/text/language/tags.go (renamed from Godeps/_workspace/src/golang.org/x/text/language/tags.go)0
-rw-r--r--vendor/golang.org/x/text/runes/cond.go (renamed from Godeps/_workspace/src/golang.org/x/text/runes/cond.go)77
-rw-r--r--vendor/golang.org/x/text/runes/runes.go (renamed from Godeps/_workspace/src/golang.org/x/text/runes/runes.go)141
-rw-r--r--vendor/golang.org/x/text/transform/transform.go (renamed from Godeps/_workspace/src/golang.org/x/text/transform/transform.go)54
-rw-r--r--vendor/golang.org/x/text/unicode/cldr/base.go100
-rw-r--r--vendor/golang.org/x/text/unicode/cldr/cldr.go130
-rw-r--r--vendor/golang.org/x/text/unicode/cldr/collate.go359
-rw-r--r--vendor/golang.org/x/text/unicode/cldr/decode.go171
-rw-r--r--vendor/golang.org/x/text/unicode/cldr/makexml.go400
-rw-r--r--vendor/golang.org/x/text/unicode/cldr/resolve.go602
-rw-r--r--vendor/golang.org/x/text/unicode/cldr/slice.go144
-rw-r--r--vendor/golang.org/x/text/unicode/cldr/xml.go1456
-rw-r--r--vendor/golang.org/x/tools/.gitattributes10
-rw-r--r--vendor/golang.org/x/tools/.gitignore2
-rw-r--r--vendor/golang.org/x/tools/AUTHORS3
-rw-r--r--vendor/golang.org/x/tools/CONTRIBUTING.md31
-rw-r--r--vendor/golang.org/x/tools/CONTRIBUTORS3
-rw-r--r--vendor/golang.org/x/tools/LICENSE (renamed from Godeps/_workspace/src/github.com/syndtr/gosnappy/LICENSE)2
-rw-r--r--vendor/golang.org/x/tools/PATENTS (renamed from Godeps/_workspace/src/golang.org/x/tools/PATENTS)0
-rw-r--r--vendor/golang.org/x/tools/README10
-rw-r--r--vendor/golang.org/x/tools/codereview.cfg1
-rw-r--r--vendor/golang.org/x/tools/go/ast/astutil/enclosing.go (renamed from Godeps/_workspace/src/golang.org/x/tools/go/ast/astutil/enclosing.go)0
-rw-r--r--vendor/golang.org/x/tools/go/ast/astutil/imports.go (renamed from Godeps/_workspace/src/golang.org/x/tools/go/ast/astutil/imports.go)55
-rw-r--r--vendor/golang.org/x/tools/go/ast/astutil/util.go (renamed from Godeps/_workspace/src/golang.org/x/tools/go/ast/astutil/util.go)0
-rw-r--r--vendor/golang.org/x/tools/imports/fastwalk.go (renamed from Godeps/_workspace/src/golang.org/x/tools/imports/fastwalk.go)0
-rw-r--r--vendor/golang.org/x/tools/imports/fastwalk_dirent_fileno.go (renamed from Godeps/_workspace/src/golang.org/x/tools/imports/fastwalk_dirent_fileno.go)0
-rw-r--r--vendor/golang.org/x/tools/imports/fastwalk_dirent_ino.go (renamed from Godeps/_workspace/src/golang.org/x/tools/imports/fastwalk_dirent_ino.go)0
-rw-r--r--vendor/golang.org/x/tools/imports/fastwalk_portable.go (renamed from Godeps/_workspace/src/golang.org/x/tools/imports/fastwalk_portable.go)0
-rw-r--r--vendor/golang.org/x/tools/imports/fastwalk_unix.go (renamed from Godeps/_workspace/src/golang.org/x/tools/imports/fastwalk_unix.go)0
-rw-r--r--vendor/golang.org/x/tools/imports/fix.go (renamed from Godeps/_workspace/src/golang.org/x/tools/imports/fix.go)0
-rw-r--r--vendor/golang.org/x/tools/imports/imports.go (renamed from Godeps/_workspace/src/golang.org/x/tools/imports/imports.go)2
-rw-r--r--vendor/golang.org/x/tools/imports/mkindex.go (renamed from Godeps/_workspace/src/golang.org/x/tools/imports/mkindex.go)0
-rw-r--r--vendor/golang.org/x/tools/imports/mkstdlib.go (renamed from Godeps/_workspace/src/golang.org/x/tools/imports/mkstdlib.go)0
-rw-r--r--vendor/golang.org/x/tools/imports/sortimports.go (renamed from Godeps/_workspace/src/golang.org/x/tools/imports/sortimports.go)0
-rw-r--r--vendor/golang.org/x/tools/imports/zstdlib.go (renamed from Godeps/_workspace/src/golang.org/x/tools/imports/zstdlib.go)0
-rw-r--r--vendor/gopkg.in/check.v1/.gitignore (renamed from Godeps/_workspace/src/gopkg.in/check.v1/.gitignore)0
-rw-r--r--vendor/gopkg.in/check.v1/LICENSE (renamed from Godeps/_workspace/src/gopkg.in/check.v1/LICENSE)0
-rw-r--r--vendor/gopkg.in/check.v1/README.md (renamed from Godeps/_workspace/src/gopkg.in/check.v1/README.md)0
-rw-r--r--vendor/gopkg.in/check.v1/TODO (renamed from Godeps/_workspace/src/gopkg.in/check.v1/TODO)0
-rw-r--r--vendor/gopkg.in/check.v1/benchmark.go (renamed from Godeps/_workspace/src/gopkg.in/check.v1/benchmark.go)0
-rw-r--r--vendor/gopkg.in/check.v1/check.go (renamed from Godeps/_workspace/src/gopkg.in/check.v1/check.go)0
-rw-r--r--vendor/gopkg.in/check.v1/checkers.go (renamed from Godeps/_workspace/src/gopkg.in/check.v1/checkers.go)0
-rw-r--r--vendor/gopkg.in/check.v1/helpers.go (renamed from Godeps/_workspace/src/gopkg.in/check.v1/helpers.go)0
-rw-r--r--vendor/gopkg.in/check.v1/printer.go (renamed from Godeps/_workspace/src/gopkg.in/check.v1/printer.go)0
-rw-r--r--vendor/gopkg.in/check.v1/reporter.go (renamed from Godeps/_workspace/src/gopkg.in/check.v1/reporter.go)0
-rw-r--r--vendor/gopkg.in/check.v1/run.go (renamed from Godeps/_workspace/src/gopkg.in/check.v1/run.go)0
-rw-r--r--vendor/gopkg.in/fatih/set.v0/.travis.yml (renamed from Godeps/_workspace/src/gopkg.in/fatih/set.v0/.travis.yml)0
-rw-r--r--vendor/gopkg.in/fatih/set.v0/LICENSE.md (renamed from Godeps/_workspace/src/gopkg.in/fatih/set.v0/LICENSE.md)0
-rw-r--r--vendor/gopkg.in/fatih/set.v0/README.md (renamed from Godeps/_workspace/src/gopkg.in/fatih/set.v0/README.md)0
-rw-r--r--vendor/gopkg.in/fatih/set.v0/set.go (renamed from Godeps/_workspace/src/gopkg.in/fatih/set.v0/set.go)0
-rw-r--r--vendor/gopkg.in/fatih/set.v0/set_nots.go (renamed from Godeps/_workspace/src/gopkg.in/fatih/set.v0/set_nots.go)0
-rw-r--r--vendor/gopkg.in/fatih/set.v0/set_ts.go (renamed from Godeps/_workspace/src/gopkg.in/fatih/set.v0/set_ts.go)0
-rwxr-xr-x[-rw-r--r--]vendor/gopkg.in/karalabe/cookiejar.v2/LICENSE (renamed from Godeps/_workspace/src/gopkg.in/karalabe/cookiejar.v2/LICENSE)0
-rwxr-xr-xvendor/gopkg.in/karalabe/cookiejar.v2/README.md109
-rwxr-xr-x[-rw-r--r--]vendor/gopkg.in/karalabe/cookiejar.v2/collections/prque/prque.go (renamed from Godeps/_workspace/src/gopkg.in/karalabe/cookiejar.v2/collections/prque/prque.go)0
-rwxr-xr-x[-rw-r--r--]vendor/gopkg.in/karalabe/cookiejar.v2/collections/prque/sstack.go (renamed from Godeps/_workspace/src/gopkg.in/karalabe/cookiejar.v2/collections/prque/sstack.go)0
-rw-r--r--vendor/gopkg.in/natefinch/npipe.v2/.gitignore22
-rw-r--r--vendor/gopkg.in/natefinch/npipe.v2/LICENSE.txt (renamed from Godeps/_workspace/src/gopkg.in/natefinch/npipe.v2/LICENSE.txt)0
-rw-r--r--vendor/gopkg.in/natefinch/npipe.v2/README.md (renamed from Godeps/_workspace/src/gopkg.in/natefinch/npipe.v2/README.md)0
-rw-r--r--vendor/gopkg.in/natefinch/npipe.v2/doc.go (renamed from Godeps/_workspace/src/gopkg.in/natefinch/npipe.v2/doc.go)0
-rwxr-xr-xvendor/gopkg.in/natefinch/npipe.v2/npipe_windows.go (renamed from Godeps/_workspace/src/gopkg.in/natefinch/npipe.v2/npipe_windows.go)0
-rw-r--r--vendor/gopkg.in/natefinch/npipe.v2/znpipe_windows_386.go (renamed from Godeps/_workspace/src/gopkg.in/natefinch/npipe.v2/znpipe_windows_386.go)0
-rw-r--r--vendor/gopkg.in/natefinch/npipe.v2/znpipe_windows_amd64.go (renamed from Godeps/_workspace/src/gopkg.in/natefinch/npipe.v2/znpipe_windows_amd64.go)0
-rw-r--r--vendor/gopkg.in/sourcemap.v1/.travis.yml12
-rw-r--r--vendor/gopkg.in/sourcemap.v1/LICENSE25
-rw-r--r--vendor/gopkg.in/sourcemap.v1/Makefile3
-rw-r--r--vendor/gopkg.in/sourcemap.v1/README.md35
-rw-r--r--vendor/gopkg.in/sourcemap.v1/base64vlq/base64_vlq.go95
-rw-r--r--vendor/gopkg.in/sourcemap.v1/consumer.go312
-rw-r--r--vendor/gopkg.in/urfave/cli.v1/.gitignore2
-rw-r--r--vendor/gopkg.in/urfave/cli.v1/.travis.yml40
-rw-r--r--vendor/gopkg.in/urfave/cli.v1/CHANGELOG.md (renamed from Godeps/_workspace/src/gopkg.in/urfave/cli.v1/CHANGELOG.md)83
-rw-r--r--vendor/gopkg.in/urfave/cli.v1/LICENSE21
-rw-r--r--vendor/gopkg.in/urfave/cli.v1/README.md1309
-rw-r--r--vendor/gopkg.in/urfave/cli.v1/app.go (renamed from Godeps/_workspace/src/gopkg.in/urfave/cli.v1/app.go)45
-rw-r--r--vendor/gopkg.in/urfave/cli.v1/appveyor.yml25
-rw-r--r--vendor/gopkg.in/urfave/cli.v1/category.go (renamed from Godeps/_workspace/src/gopkg.in/urfave/cli.v1/category.go)0
-rw-r--r--vendor/gopkg.in/urfave/cli.v1/cli.go (renamed from Godeps/_workspace/src/gopkg.in/urfave/cli.v1/cli.go)0
-rw-r--r--vendor/gopkg.in/urfave/cli.v1/command.go (renamed from Godeps/_workspace/src/gopkg.in/urfave/cli.v1/command.go)0
-rw-r--r--vendor/gopkg.in/urfave/cli.v1/context.go (renamed from Godeps/_workspace/src/gopkg.in/urfave/cli.v1/context.go)105
-rw-r--r--vendor/gopkg.in/urfave/cli.v1/errors.go (renamed from Godeps/_workspace/src/gopkg.in/urfave/cli.v1/errors.go)0
-rw-r--r--vendor/gopkg.in/urfave/cli.v1/flag.go (renamed from Godeps/_workspace/src/gopkg.in/urfave/cli.v1/flag.go)233
-rw-r--r--vendor/gopkg.in/urfave/cli.v1/funcs.go (renamed from Godeps/_workspace/src/gopkg.in/urfave/cli.v1/funcs.go)0
-rw-r--r--vendor/gopkg.in/urfave/cli.v1/help.go (renamed from Godeps/_workspace/src/gopkg.in/urfave/cli.v1/help.go)9
-rwxr-xr-xvendor/gopkg.in/urfave/cli.v1/runtests105
886 files changed, 23166 insertions, 32828 deletions
diff --git a/.gitignore b/.gitignore
index 21dbd28c5..e53e461dc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,8 +13,7 @@
.ethtest
*/**/*tx_database*
*/**/*dapps*
-Godeps/_workspace/pkg
-Godeps/_workspace/bin
+build/_vendor/pkg
#*
.#*
diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json
deleted file mode 100644
index 0fc91e877..000000000
--- a/Godeps/Godeps.json
+++ /dev/null
@@ -1,332 +0,0 @@
-{
- "ImportPath": "github.com/ethereum/go-ethereum",
- "GoVersion": "go1.7",
- "GodepVersion": "v74",
- "Packages": [
- "./..."
- ],
- "Deps": [
- {
- "ImportPath": "github.com/Gustav-Simonsson/go-opencl/cl",
- "Rev": "593e01cfc4f3353585015321e01951d4a907d3ef"
- },
- {
- "ImportPath": "github.com/cespare/cp",
- "Rev": "165db2f241fd235aec29ba6d9b1ccd5f1c14637c"
- },
- {
- "ImportPath": "github.com/davecgh/go-spew/spew",
- "Rev": "5215b55f46b2b919f50a1df0eaa5886afe4e3b3d"
- },
- {
- "ImportPath": "github.com/ethereum/ethash",
- "Comment": "v23.1-247-g2e80de5",
- "Rev": "2e80de5022370cfe632195b1720db52d07ff8a77"
- },
- {
- "ImportPath": "github.com/fatih/color",
- "Comment": "v0.1-12-g9aae6aa",
- "Rev": "9aae6aaa22315390f03959adca2c4d395b02fcef"
- },
- {
- "ImportPath": "github.com/gizak/termui",
- "Rev": "08a5d3f67b7d9ec87830ea39c48e570a1f18531f"
- },
- {
- "ImportPath": "github.com/golang/snappy",
- "Rev": "799c780093d646c1b79d30894e22512c319fa137"
- },
- {
- "ImportPath": "github.com/hashicorp/golang-lru",
- "Rev": "a0d98a5f288019575c6d1f4bb1573fef2d1fcdc4"
- },
- {
- "ImportPath": "github.com/hashicorp/golang-lru/simplelru",
- "Rev": "a0d98a5f288019575c6d1f4bb1573fef2d1fcdc4"
- },
- {
- "ImportPath": "github.com/huin/goupnp",
- "Rev": "46bde78b11f3f021f2a511df138be9e2fc7506e8"
- },
- {
- "ImportPath": "github.com/huin/goupnp/dcps/internetgateway1",
- "Rev": "46bde78b11f3f021f2a511df138be9e2fc7506e8"
- },
- {
- "ImportPath": "github.com/huin/goupnp/dcps/internetgateway2",
- "Rev": "46bde78b11f3f021f2a511df138be9e2fc7506e8"
- },
- {
- "ImportPath": "github.com/huin/goupnp/httpu",
- "Rev": "46bde78b11f3f021f2a511df138be9e2fc7506e8"
- },
- {
- "ImportPath": "github.com/huin/goupnp/scpd",
- "Rev": "46bde78b11f3f021f2a511df138be9e2fc7506e8"
- },
- {
- "ImportPath": "github.com/huin/goupnp/soap",
- "Rev": "46bde78b11f3f021f2a511df138be9e2fc7506e8"
- },
- {
- "ImportPath": "github.com/huin/goupnp/ssdp",
- "Rev": "46bde78b11f3f021f2a511df138be9e2fc7506e8"
- },
- {
- "ImportPath": "github.com/jackpal/gateway",
- "Rev": "192609c58b8985e645cbe82ddcb28a4362ca0fdc"
- },
- {
- "ImportPath": "github.com/jackpal/go-nat-pmp",
- "Rev": "46523a463303c6ede3ddfe45bde1c7ed52ebaacd"
- },
- {
- "ImportPath": "github.com/mattn/go-colorable",
- "Rev": "9fdad7c47650b7d2e1da50644c1f4ba7f172f252"
- },
- {
- "ImportPath": "github.com/mattn/go-isatty",
- "Rev": "56b76bdf51f7708750eac80fa38b952bb9f32639"
- },
- {
- "ImportPath": "github.com/mattn/go-runewidth",
- "Comment": "travisish-44-ge882a96",
- "Rev": "e882a96ec18dd43fa283187b66af74497c9101c0"
- },
- {
- "ImportPath": "github.com/nsf/termbox-go",
- "Rev": "362329b0aa6447eadd52edd8d660ec1dff470295"
- },
- {
- "ImportPath": "github.com/pborman/uuid",
- "Comment": "v1.0-6-g0f1a469",
- "Rev": "0f1a46960a86dcdf5dd30d3e6568a497a997909f"
- },
- {
- "ImportPath": "github.com/peterh/liner",
- "Rev": "ad1edfd30321d8f006ccf05f1e0524adeb943060"
- },
- {
- "ImportPath": "github.com/rcrowley/go-metrics",
- "Rev": "51425a2415d21afadfd55cd93432c0bc69e9598d"
- },
- {
- "ImportPath": "github.com/rcrowley/go-metrics/exp",
- "Rev": "51425a2415d21afadfd55cd93432c0bc69e9598d"
- },
- {
- "ImportPath": "github.com/rjeczalik/notify",
- "Rev": "f627deca7a510d96f0ef9388f2d0e8b16d21f87f"
- },
- {
- "ImportPath": "github.com/robertkrimen/otto",
- "Rev": "53221230c215611a90762720c9042ac782ef74ee"
- },
- {
- "ImportPath": "github.com/robertkrimen/otto/ast",
- "Rev": "53221230c215611a90762720c9042ac782ef74ee"
- },
- {
- "ImportPath": "github.com/robertkrimen/otto/dbg",
- "Rev": "53221230c215611a90762720c9042ac782ef74ee"
- },
- {
- "ImportPath": "github.com/robertkrimen/otto/file",
- "Rev": "53221230c215611a90762720c9042ac782ef74ee"
- },
- {
- "ImportPath": "github.com/robertkrimen/otto/parser",
- "Rev": "53221230c215611a90762720c9042ac782ef74ee"
- },
- {
- "ImportPath": "github.com/robertkrimen/otto/registry",
- "Rev": "53221230c215611a90762720c9042ac782ef74ee"
- },
- {
- "ImportPath": "github.com/robertkrimen/otto/token",
- "Rev": "53221230c215611a90762720c9042ac782ef74ee"
- },
- {
- "ImportPath": "github.com/rs/cors",
- "Rev": "5950cf11d77f8a61b432a25dd4d444b4ced01379"
- },
- {
- "ImportPath": "github.com/rs/xhandler",
- "Rev": "d9d9599b6aaf6a058cb7b1f48291ded2cbd13390"
- },
- {
- "ImportPath": "github.com/syndtr/goleveldb/leveldb",
- "Rev": "6b4daa5362b502898ddf367c5c11deb9e7a5c727"
- },
- {
- "ImportPath": "github.com/syndtr/goleveldb/leveldb/cache",
- "Rev": "6b4daa5362b502898ddf367c5c11deb9e7a5c727"
- },
- {
- "ImportPath": "github.com/syndtr/goleveldb/leveldb/comparer",
- "Rev": "6b4daa5362b502898ddf367c5c11deb9e7a5c727"
- },
- {
- "ImportPath": "github.com/syndtr/goleveldb/leveldb/errors",
- "Rev": "6b4daa5362b502898ddf367c5c11deb9e7a5c727"
- },
- {
- "ImportPath": "github.com/syndtr/goleveldb/leveldb/filter",
- "Rev": "6b4daa5362b502898ddf367c5c11deb9e7a5c727"
- },
- {
- "ImportPath": "github.com/syndtr/goleveldb/leveldb/iterator",
- "Rev": "6b4daa5362b502898ddf367c5c11deb9e7a5c727"
- },
- {
- "ImportPath": "github.com/syndtr/goleveldb/leveldb/journal",
- "Rev": "6b4daa5362b502898ddf367c5c11deb9e7a5c727"
- },
- {
- "ImportPath": "github.com/syndtr/goleveldb/leveldb/memdb",
- "Rev": "6b4daa5362b502898ddf367c5c11deb9e7a5c727"
- },
- {
- "ImportPath": "github.com/syndtr/goleveldb/leveldb/opt",
- "Rev": "6b4daa5362b502898ddf367c5c11deb9e7a5c727"
- },
- {
- "ImportPath": "github.com/syndtr/goleveldb/leveldb/storage",
- "Rev": "6b4daa5362b502898ddf367c5c11deb9e7a5c727"
- },
- {
- "ImportPath": "github.com/syndtr/goleveldb/leveldb/table",
- "Rev": "6b4daa5362b502898ddf367c5c11deb9e7a5c727"
- },
- {
- "ImportPath": "github.com/syndtr/goleveldb/leveldb/util",
- "Rev": "6b4daa5362b502898ddf367c5c11deb9e7a5c727"
- },
- {
- "ImportPath": "golang.org/x/crypto/pbkdf2",
- "Rev": "351dc6a5bf92a5f2ae22fadeee08eb6a45aa2d93"
- },
- {
- "ImportPath": "golang.org/x/crypto/ripemd160",
- "Rev": "351dc6a5bf92a5f2ae22fadeee08eb6a45aa2d93"
- },
- {
- "ImportPath": "golang.org/x/crypto/scrypt",
- "Rev": "351dc6a5bf92a5f2ae22fadeee08eb6a45aa2d93"
- },
- {
- "ImportPath": "golang.org/x/net/context",
- "Rev": "6250b412798208e6c90b03b7c4f226de5aa299e2"
- },
- {
- "ImportPath": "golang.org/x/net/html",
- "Rev": "6250b412798208e6c90b03b7c4f226de5aa299e2"
- },
- {
- "ImportPath": "golang.org/x/net/html/atom",
- "Rev": "6250b412798208e6c90b03b7c4f226de5aa299e2"
- },
- {
- "ImportPath": "golang.org/x/net/html/charset",
- "Rev": "6250b412798208e6c90b03b7c4f226de5aa299e2"
- },
- {
- "ImportPath": "golang.org/x/net/websocket",
- "Rev": "6250b412798208e6c90b03b7c4f226de5aa299e2"
- },
- {
- "ImportPath": "golang.org/x/sys/unix",
- "Rev": "a646d33e2ee3172a661fc09bca23bb4889a41bc8"
- },
- {
- "ImportPath": "golang.org/x/text/encoding",
- "Rev": "d69c40b4be55797923cec7457fac7a244d91a9b6"
- },
- {
- "ImportPath": "golang.org/x/text/encoding/charmap",
- "Rev": "d69c40b4be55797923cec7457fac7a244d91a9b6"
- },
- {
- "ImportPath": "golang.org/x/text/encoding/htmlindex",
- "Rev": "d69c40b4be55797923cec7457fac7a244d91a9b6"
- },
- {
- "ImportPath": "golang.org/x/text/encoding/internal",
- "Rev": "d69c40b4be55797923cec7457fac7a244d91a9b6"
- },
- {
- "ImportPath": "golang.org/x/text/encoding/internal/identifier",
- "Rev": "d69c40b4be55797923cec7457fac7a244d91a9b6"
- },
- {
- "ImportPath": "golang.org/x/text/encoding/japanese",
- "Rev": "d69c40b4be55797923cec7457fac7a244d91a9b6"
- },
- {
- "ImportPath": "golang.org/x/text/encoding/korean",
- "Rev": "d69c40b4be55797923cec7457fac7a244d91a9b6"
- },
- {
- "ImportPath": "golang.org/x/text/encoding/simplifiedchinese",
- "Rev": "d69c40b4be55797923cec7457fac7a244d91a9b6"
- },
- {
- "ImportPath": "golang.org/x/text/encoding/traditionalchinese",
- "Rev": "d69c40b4be55797923cec7457fac7a244d91a9b6"
- },
- {
- "ImportPath": "golang.org/x/text/encoding/unicode",
- "Rev": "d69c40b4be55797923cec7457fac7a244d91a9b6"
- },
- {
- "ImportPath": "golang.org/x/text/internal/tag",
- "Rev": "d69c40b4be55797923cec7457fac7a244d91a9b6"
- },
- {
- "ImportPath": "golang.org/x/text/internal/utf8internal",
- "Rev": "d69c40b4be55797923cec7457fac7a244d91a9b6"
- },
- {
- "ImportPath": "golang.org/x/text/language",
- "Rev": "d69c40b4be55797923cec7457fac7a244d91a9b6"
- },
- {
- "ImportPath": "golang.org/x/text/runes",
- "Rev": "d69c40b4be55797923cec7457fac7a244d91a9b6"
- },
- {
- "ImportPath": "golang.org/x/text/transform",
- "Rev": "d69c40b4be55797923cec7457fac7a244d91a9b6"
- },
- {
- "ImportPath": "golang.org/x/tools/go/ast/astutil",
- "Rev": "9deed8c6c1c89e0b6d68d727f215de8e851d1064"
- },
- {
- "ImportPath": "golang.org/x/tools/imports",
- "Rev": "9deed8c6c1c89e0b6d68d727f215de8e851d1064"
- },
- {
- "ImportPath": "gopkg.in/check.v1",
- "Rev": "4f90aeace3a26ad7021961c297b22c42160c7b25"
- },
- {
- "ImportPath": "gopkg.in/fatih/set.v0",
- "Comment": "v0.1.0-3-g27c4092",
- "Rev": "27c40922c40b43fe04554d8223a402af3ea333f3"
- },
- {
- "ImportPath": "gopkg.in/karalabe/cookiejar.v2/collections/prque",
- "Rev": "8dcd6a7f4951f6ff3ee9cbb919a06d8925822e57"
- },
- {
- "ImportPath": "gopkg.in/natefinch/npipe.v2",
- "Rev": "c1b8fa8bdccecb0b8db834ee0b92fdbcfa606dd6"
- },
- {
- "ImportPath": "gopkg.in/urfave/cli.v1",
- "Comment": "v1.17.0",
- "Rev": "01857ac33766ce0c93856370626f9799281c14f4"
- }
- ]
-}
diff --git a/Godeps/Readme b/Godeps/Readme
deleted file mode 100644
index 4cdaa53d5..000000000
--- a/Godeps/Readme
+++ /dev/null
@@ -1,5 +0,0 @@
-This directory tree is generated automatically by godep.
-
-Please do not edit.
-
-See https://github.com/tools/godep for more information.
diff --git a/Godeps/_workspace/.gitignore b/Godeps/_workspace/.gitignore
deleted file mode 100644
index f037d684e..000000000
--- a/Godeps/_workspace/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/pkg
-/bin
diff --git a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/cl.go b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/cl.go
deleted file mode 100644
index 3d577b2b6..000000000
--- a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/cl.go
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
-Package cl provides a binding to the OpenCL api. It's mostly a low-level
-wrapper that avoids adding functionality while still making the interface
-a little more friendly and easy to use.
-
-Resource life-cycle management:
-
-For any CL object that gets created (buffer, queue, kernel, etc..) you should
-call object.Release() when finished with it to free the CL resources. This
-explicitely calls the related clXXXRelease method for the type. However,
-as a fallback there is a finalizer set for every resource item that takes
-care of it (eventually) if Release isn't called. In this way you can have
-better control over the life cycle of resources while having a fall back
-to avoid leaks. This is similar to how file handles and such are handled
-in the Go standard packages.
-*/
-package cl
-
-// #include "headers/1.2/opencl.h"
-// #cgo CFLAGS: -Iheaders/1.2
-// #cgo darwin LDFLAGS: -framework OpenCL
-// #cgo linux LDFLAGS: -lOpenCL
-import "C"
-import "errors"
-
-var ErrUnsupported = errors.New("cl: unsupported")
diff --git a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/context.go b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/context.go
deleted file mode 100644
index 67441bb5f..000000000
--- a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/context.go
+++ /dev/null
@@ -1,161 +0,0 @@
-package cl
-
-// #include <stdlib.h>
-// #ifdef __APPLE__
-// #include "OpenCL/opencl.h"
-// #else
-// #include "cl.h"
-// #endif
-import "C"
-
-import (
- "runtime"
- "unsafe"
-)
-
-const maxImageFormats = 256
-
-type Context struct {
- clContext C.cl_context
- devices []*Device
-}
-
-type MemObject struct {
- clMem C.cl_mem
- size int
-}
-
-func releaseContext(c *Context) {
- if c.clContext != nil {
- C.clReleaseContext(c.clContext)
- c.clContext = nil
- }
-}
-
-func releaseMemObject(b *MemObject) {
- if b.clMem != nil {
- C.clReleaseMemObject(b.clMem)
- b.clMem = nil
- }
-}
-
-func newMemObject(mo C.cl_mem, size int) *MemObject {
- memObject := &MemObject{clMem: mo, size: size}
- runtime.SetFinalizer(memObject, releaseMemObject)
- return memObject
-}
-
-func (b *MemObject) Release() {
- releaseMemObject(b)
-}
-
-// TODO: properties
-func CreateContext(devices []*Device) (*Context, error) {
- deviceIds := buildDeviceIdList(devices)
- var err C.cl_int
- clContext := C.clCreateContext(nil, C.cl_uint(len(devices)), &deviceIds[0], nil, nil, &err)
- if err != C.CL_SUCCESS {
- return nil, toError(err)
- }
- if clContext == nil {
- return nil, ErrUnknown
- }
- context := &Context{clContext: clContext, devices: devices}
- runtime.SetFinalizer(context, releaseContext)
- return context, nil
-}
-
-func (ctx *Context) GetSupportedImageFormats(flags MemFlag, imageType MemObjectType) ([]ImageFormat, error) {
- var formats [maxImageFormats]C.cl_image_format
- var nFormats C.cl_uint
- if err := C.clGetSupportedImageFormats(ctx.clContext, C.cl_mem_flags(flags), C.cl_mem_object_type(imageType), maxImageFormats, &formats[0], &nFormats); err != C.CL_SUCCESS {
- return nil, toError(err)
- }
- fmts := make([]ImageFormat, nFormats)
- for i, f := range formats[:nFormats] {
- fmts[i] = ImageFormat{
- ChannelOrder: ChannelOrder(f.image_channel_order),
- ChannelDataType: ChannelDataType(f.image_channel_data_type),
- }
- }
- return fmts, nil
-}
-
-func (ctx *Context) CreateCommandQueue(device *Device, properties CommandQueueProperty) (*CommandQueue, error) {
- var err C.cl_int
- clQueue := C.clCreateCommandQueue(ctx.clContext, device.id, C.cl_command_queue_properties(properties), &err)
- if err != C.CL_SUCCESS {
- return nil, toError(err)
- }
- if clQueue == nil {
- return nil, ErrUnknown
- }
- commandQueue := &CommandQueue{clQueue: clQueue, device: device}
- runtime.SetFinalizer(commandQueue, releaseCommandQueue)
- return commandQueue, nil
-}
-
-func (ctx *Context) CreateProgramWithSource(sources []string) (*Program, error) {
- cSources := make([]*C.char, len(sources))
- for i, s := range sources {
- cs := C.CString(s)
- cSources[i] = cs
- defer C.free(unsafe.Pointer(cs))
- }
- var err C.cl_int
- clProgram := C.clCreateProgramWithSource(ctx.clContext, C.cl_uint(len(sources)), &cSources[0], nil, &err)
- if err != C.CL_SUCCESS {
- return nil, toError(err)
- }
- if clProgram == nil {
- return nil, ErrUnknown
- }
- program := &Program{clProgram: clProgram, devices: ctx.devices}
- runtime.SetFinalizer(program, releaseProgram)
- return program, nil
-}
-
-func (ctx *Context) CreateBufferUnsafe(flags MemFlag, size int, dataPtr unsafe.Pointer) (*MemObject, error) {
- var err C.cl_int
- clBuffer := C.clCreateBuffer(ctx.clContext, C.cl_mem_flags(flags), C.size_t(size), dataPtr, &err)
- if err != C.CL_SUCCESS {
- return nil, toError(err)
- }
- if clBuffer == nil {
- return nil, ErrUnknown
- }
- return newMemObject(clBuffer, size), nil
-}
-
-func (ctx *Context) CreateEmptyBuffer(flags MemFlag, size int) (*MemObject, error) {
- return ctx.CreateBufferUnsafe(flags, size, nil)
-}
-
-func (ctx *Context) CreateEmptyBufferFloat32(flags MemFlag, size int) (*MemObject, error) {
- return ctx.CreateBufferUnsafe(flags, 4*size, nil)
-}
-
-func (ctx *Context) CreateBuffer(flags MemFlag, data []byte) (*MemObject, error) {
- return ctx.CreateBufferUnsafe(flags, len(data), unsafe.Pointer(&data[0]))
-}
-
-//float64
-func (ctx *Context) CreateBufferFloat32(flags MemFlag, data []float32) (*MemObject, error) {
- return ctx.CreateBufferUnsafe(flags, 4*len(data), unsafe.Pointer(&data[0]))
-}
-
-func (ctx *Context) CreateUserEvent() (*Event, error) {
- var err C.cl_int
- clEvent := C.clCreateUserEvent(ctx.clContext, &err)
- if err != C.CL_SUCCESS {
- return nil, toError(err)
- }
- return newEvent(clEvent), nil
-}
-
-func (ctx *Context) Release() {
- releaseContext(ctx)
-}
-
-// http://www.khronos.org/registry/cl/sdk/1.2/docs/man/xhtml/clCreateSubBuffer.html
-// func (memObject *MemObject) CreateSubBuffer(flags MemFlag, bufferCreateType BufferCreateType, )
diff --git a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/device.go b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/device.go
deleted file mode 100644
index d62a6fb71..000000000
--- a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/device.go
+++ /dev/null
@@ -1,510 +0,0 @@
-package cl
-
-// #ifdef __APPLE__
-// #include "OpenCL/opencl.h"
-// #else
-// #include "cl.h"
-// #include "cl_ext.h"
-// #endif
-import "C"
-
-import (
- "strings"
- "unsafe"
-)
-
-const maxDeviceCount = 64
-
-type DeviceType uint
-
-const (
- DeviceTypeCPU DeviceType = C.CL_DEVICE_TYPE_CPU
- DeviceTypeGPU DeviceType = C.CL_DEVICE_TYPE_GPU
- DeviceTypeAccelerator DeviceType = C.CL_DEVICE_TYPE_ACCELERATOR
- DeviceTypeDefault DeviceType = C.CL_DEVICE_TYPE_DEFAULT
- DeviceTypeAll DeviceType = C.CL_DEVICE_TYPE_ALL
-)
-
-type FPConfig int
-
-const (
- FPConfigDenorm FPConfig = C.CL_FP_DENORM // denorms are supported
- FPConfigInfNaN FPConfig = C.CL_FP_INF_NAN // INF and NaNs are supported
- FPConfigRoundToNearest FPConfig = C.CL_FP_ROUND_TO_NEAREST // round to nearest even rounding mode supported
- FPConfigRoundToZero FPConfig = C.CL_FP_ROUND_TO_ZERO // round to zero rounding mode supported
- FPConfigRoundToInf FPConfig = C.CL_FP_ROUND_TO_INF // round to positive and negative infinity rounding modes supported
- FPConfigFMA FPConfig = C.CL_FP_FMA // IEEE754-2008 fused multiply-add is supported
- FPConfigSoftFloat FPConfig = C.CL_FP_SOFT_FLOAT // Basic floating-point operations (such as addition, subtraction, multiplication) are implemented in software
-)
-
-var fpConfigNameMap = map[FPConfig]string{
- FPConfigDenorm: "Denorm",
- FPConfigInfNaN: "InfNaN",
- FPConfigRoundToNearest: "RoundToNearest",
- FPConfigRoundToZero: "RoundToZero",
- FPConfigRoundToInf: "RoundToInf",
- FPConfigFMA: "FMA",
- FPConfigSoftFloat: "SoftFloat",
-}
-
-func (c FPConfig) String() string {
- var parts []string
- for bit, name := range fpConfigNameMap {
- if c&bit != 0 {
- parts = append(parts, name)
- }
- }
- if parts == nil {
- return ""
- }
- return strings.Join(parts, "|")
-}
-
-func (dt DeviceType) String() string {
- var parts []string
- if dt&DeviceTypeCPU != 0 {
- parts = append(parts, "CPU")
- }
- if dt&DeviceTypeGPU != 0 {
- parts = append(parts, "GPU")
- }
- if dt&DeviceTypeAccelerator != 0 {
- parts = append(parts, "Accelerator")
- }
- if dt&DeviceTypeDefault != 0 {
- parts = append(parts, "Default")
- }
- if parts == nil {
- parts = append(parts, "None")
- }
- return strings.Join(parts, "|")
-}
-
-type Device struct {
- id C.cl_device_id
-}
-
-func buildDeviceIdList(devices []*Device) []C.cl_device_id {
- deviceIds := make([]C.cl_device_id, len(devices))
- for i, d := range devices {
- deviceIds[i] = d.id
- }
- return deviceIds
-}
-
-// Obtain the list of devices available on a platform. 'platform' refers
-// to the platform returned by GetPlatforms or can be nil. If platform
-// is nil, the behavior is implementation-defined.
-func GetDevices(platform *Platform, deviceType DeviceType) ([]*Device, error) {
- var deviceIds [maxDeviceCount]C.cl_device_id
- var numDevices C.cl_uint
- var platformId C.cl_platform_id
- if platform != nil {
- platformId = platform.id
- }
- if err := C.clGetDeviceIDs(platformId, C.cl_device_type(deviceType), C.cl_uint(maxDeviceCount), &deviceIds[0], &numDevices); err != C.CL_SUCCESS {
- return nil, toError(err)
- }
- if numDevices > maxDeviceCount {
- numDevices = maxDeviceCount
- }
- devices := make([]*Device, numDevices)
- for i := 0; i < int(numDevices); i++ {
- devices[i] = &Device{id: deviceIds[i]}
- }
- return devices, nil
-}
-
-func (d *Device) nullableId() C.cl_device_id {
- if d == nil {
- return nil
- }
- return d.id
-}
-
-func (d *Device) GetInfoString(param C.cl_device_info, panicOnError bool) (string, error) {
- var strC [1024]C.char
- var strN C.size_t
- if err := C.clGetDeviceInfo(d.id, param, 1024, unsafe.Pointer(&strC), &strN); err != C.CL_SUCCESS {
- if panicOnError {
- panic("Should never fail")
- }
- return "", toError(err)
- }
-
- // OpenCL strings are NUL-terminated, and the terminator is included in strN
- // Go strings aren't NUL-terminated, so subtract 1 from the length
- return C.GoStringN((*C.char)(unsafe.Pointer(&strC)), C.int(strN-1)), nil
-}
-
-func (d *Device) getInfoUint(param C.cl_device_info, panicOnError bool) (uint, error) {
- var val C.cl_uint
- if err := C.clGetDeviceInfo(d.id, param, C.size_t(unsafe.Sizeof(val)), unsafe.Pointer(&val), nil); err != C.CL_SUCCESS {
- if panicOnError {
- panic("Should never fail")
- }
- return 0, toError(err)
- }
- return uint(val), nil
-}
-
-func (d *Device) getInfoSize(param C.cl_device_info, panicOnError bool) (int, error) {
- var val C.size_t
- if err := C.clGetDeviceInfo(d.id, param, C.size_t(unsafe.Sizeof(val)), unsafe.Pointer(&val), nil); err != C.CL_SUCCESS {
- if panicOnError {
- panic("Should never fail")
- }
- return 0, toError(err)
- }
- return int(val), nil
-}
-
-func (d *Device) getInfoUlong(param C.cl_device_info, panicOnError bool) (int64, error) {
- var val C.cl_ulong
- if err := C.clGetDeviceInfo(d.id, param, C.size_t(unsafe.Sizeof(val)), unsafe.Pointer(&val), nil); err != C.CL_SUCCESS {
- if panicOnError {
- panic("Should never fail")
- }
- return 0, toError(err)
- }
- return int64(val), nil
-}
-
-func (d *Device) getInfoBool(param C.cl_device_info, panicOnError bool) (bool, error) {
- var val C.cl_bool
- if err := C.clGetDeviceInfo(d.id, param, C.size_t(unsafe.Sizeof(val)), unsafe.Pointer(&val), nil); err != C.CL_SUCCESS {
- if panicOnError {
- panic("Should never fail")
- }
- return false, toError(err)
- }
- return val == C.CL_TRUE, nil
-}
-
-func (d *Device) Name() string {
- str, _ := d.GetInfoString(C.CL_DEVICE_NAME, true)
- return str
-}
-
-func (d *Device) Vendor() string {
- str, _ := d.GetInfoString(C.CL_DEVICE_VENDOR, true)
- return str
-}
-
-func (d *Device) Extensions() string {
- str, _ := d.GetInfoString(C.CL_DEVICE_EXTENSIONS, true)
- return str
-}
-
-func (d *Device) OpenCLCVersion() string {
- str, _ := d.GetInfoString(C.CL_DEVICE_OPENCL_C_VERSION, true)
- return str
-}
-
-func (d *Device) Profile() string {
- str, _ := d.GetInfoString(C.CL_DEVICE_PROFILE, true)
- return str
-}
-
-func (d *Device) Version() string {
- str, _ := d.GetInfoString(C.CL_DEVICE_VERSION, true)
- return str
-}
-
-func (d *Device) DriverVersion() string {
- str, _ := d.GetInfoString(C.CL_DRIVER_VERSION, true)
- return str
-}
-
-// The default compute device address space size specified as an
-// unsigned integer value in bits. Currently supported values are 32 or 64 bits.
-func (d *Device) AddressBits() int {
- val, _ := d.getInfoUint(C.CL_DEVICE_ADDRESS_BITS, true)
- return int(val)
-}
-
-// Size of global memory cache line in bytes.
-func (d *Device) GlobalMemCachelineSize() int {
- val, _ := d.getInfoUint(C.CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE, true)
- return int(val)
-}
-
-// Maximum configured clock frequency of the device in MHz.
-func (d *Device) MaxClockFrequency() int {
- val, _ := d.getInfoUint(C.CL_DEVICE_MAX_CLOCK_FREQUENCY, true)
- return int(val)
-}
-
-// The number of parallel compute units on the OpenCL device.
-// A work-group executes on a single compute unit. The minimum value is 1.
-func (d *Device) MaxComputeUnits() int {
- val, _ := d.getInfoUint(C.CL_DEVICE_MAX_COMPUTE_UNITS, true)
- return int(val)
-}
-
-// Max number of arguments declared with the __constant qualifier in a kernel.
-// The minimum value is 8 for devices that are not of type CL_DEVICE_TYPE_CUSTOM.
-func (d *Device) MaxConstantArgs() int {
- val, _ := d.getInfoUint(C.CL_DEVICE_MAX_CONSTANT_ARGS, true)
- return int(val)
-}
-
-// Max number of simultaneous image objects that can be read by a kernel.
-// The minimum value is 128 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE.
-func (d *Device) MaxReadImageArgs() int {
- val, _ := d.getInfoUint(C.CL_DEVICE_MAX_READ_IMAGE_ARGS, true)
- return int(val)
-}
-
-// Maximum number of samplers that can be used in a kernel. The minimum
-// value is 16 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE. (Also see sampler_t.)
-func (d *Device) MaxSamplers() int {
- val, _ := d.getInfoUint(C.CL_DEVICE_MAX_SAMPLERS, true)
- return int(val)
-}
-
-// Maximum dimensions that specify the global and local work-item IDs used
-// by the data parallel execution model. (Refer to clEnqueueNDRangeKernel).
-// The minimum value is 3 for devices that are not of type CL_DEVICE_TYPE_CUSTOM.
-func (d *Device) MaxWorkItemDimensions() int {
- val, _ := d.getInfoUint(C.CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS, true)
- return int(val)
-}
-
-// Max number of simultaneous image objects that can be written to by a
-// kernel. The minimum value is 8 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE.
-func (d *Device) MaxWriteImageArgs() int {
- val, _ := d.getInfoUint(C.CL_DEVICE_MAX_WRITE_IMAGE_ARGS, true)
- return int(val)
-}
-
-// The minimum value is the size (in bits) of the largest OpenCL built-in
-// data type supported by the device (long16 in FULL profile, long16 or
-// int16 in EMBEDDED profile) for devices that are not of type CL_DEVICE_TYPE_CUSTOM.
-func (d *Device) MemBaseAddrAlign() int {
- val, _ := d.getInfoUint(C.CL_DEVICE_MEM_BASE_ADDR_ALIGN, true)
- return int(val)
-}
-
-func (d *Device) NativeVectorWidthChar() int {
- val, _ := d.getInfoUint(C.CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR, true)
- return int(val)
-}
-
-func (d *Device) NativeVectorWidthShort() int {
- val, _ := d.getInfoUint(C.CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT, true)
- return int(val)
-}
-
-func (d *Device) NativeVectorWidthInt() int {
- val, _ := d.getInfoUint(C.CL_DEVICE_NATIVE_VECTOR_WIDTH_INT, true)
- return int(val)
-}
-
-func (d *Device) NativeVectorWidthLong() int {
- val, _ := d.getInfoUint(C.CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG, true)
- return int(val)
-}
-
-func (d *Device) NativeVectorWidthFloat() int {
- val, _ := d.getInfoUint(C.CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT, true)
- return int(val)
-}
-
-func (d *Device) NativeVectorWidthDouble() int {
- val, _ := d.getInfoUint(C.CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE, true)
- return int(val)
-}
-
-func (d *Device) NativeVectorWidthHalf() int {
- val, _ := d.getInfoUint(C.CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF, true)
- return int(val)
-}
-
-// Max height of 2D image in pixels. The minimum value is 8192
-// if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE.
-func (d *Device) Image2DMaxHeight() int {
- val, _ := d.getInfoSize(C.CL_DEVICE_IMAGE2D_MAX_HEIGHT, true)
- return int(val)
-}
-
-// Max width of 2D image or 1D image not created from a buffer object in
-// pixels. The minimum value is 8192 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE.
-func (d *Device) Image2DMaxWidth() int {
- val, _ := d.getInfoSize(C.CL_DEVICE_IMAGE2D_MAX_WIDTH, true)
- return int(val)
-}
-
-// Max depth of 3D image in pixels. The minimum value is 2048 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE.
-func (d *Device) Image3DMaxDepth() int {
- val, _ := d.getInfoSize(C.CL_DEVICE_IMAGE3D_MAX_DEPTH, true)
- return int(val)
-}
-
-// Max height of 3D image in pixels. The minimum value is 2048 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE.
-func (d *Device) Image3DMaxHeight() int {
- val, _ := d.getInfoSize(C.CL_DEVICE_IMAGE3D_MAX_HEIGHT, true)
- return int(val)
-}
-
-// Max width of 3D image in pixels. The minimum value is 2048 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE.
-func (d *Device) Image3DMaxWidth() int {
- val, _ := d.getInfoSize(C.CL_DEVICE_IMAGE3D_MAX_WIDTH, true)
- return int(val)
-}
-
-// Max size in bytes of the arguments that can be passed to a kernel. The
-// minimum value is 1024 for devices that are not of type CL_DEVICE_TYPE_CUSTOM.
-// For this minimum value, only a maximum of 128 arguments can be passed to a kernel.
-func (d *Device) MaxParameterSize() int {
- val, _ := d.getInfoSize(C.CL_DEVICE_MAX_PARAMETER_SIZE, true)
- return int(val)
-}
-
-// Maximum number of work-items in a work-group executing a kernel on a
-// single compute unit, using the data parallel execution model. (Refer
-// to clEnqueueNDRangeKernel). The minimum value is 1.
-func (d *Device) MaxWorkGroupSize() int {
- val, _ := d.getInfoSize(C.CL_DEVICE_MAX_WORK_GROUP_SIZE, true)
- return int(val)
-}
-
-// Describes the resolution of device timer. This is measured in nanoseconds.
-func (d *Device) ProfilingTimerResolution() int {
- val, _ := d.getInfoSize(C.CL_DEVICE_PROFILING_TIMER_RESOLUTION, true)
- return int(val)
-}
-
-// Size of local memory arena in bytes. The minimum value is 32 KB for
-// devices that are not of type CL_DEVICE_TYPE_CUSTOM.
-func (d *Device) LocalMemSize() int64 {
- val, _ := d.getInfoUlong(C.CL_DEVICE_LOCAL_MEM_SIZE, true)
- return val
-}
-
-// Max size in bytes of a constant buffer allocation. The minimum value is
-// 64 KB for devices that are not of type CL_DEVICE_TYPE_CUSTOM.
-func (d *Device) MaxConstantBufferSize() int64 {
- val, _ := d.getInfoUlong(C.CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE, true)
- return val
-}
-
-// Max size of memory object allocation in bytes. The minimum value is max
-// (1/4th of CL_DEVICE_GLOBAL_MEM_SIZE, 128*1024*1024) for devices that are
-// not of type CL_DEVICE_TYPE_CUSTOM.
-func (d *Device) MaxMemAllocSize() int64 {
- val, _ := d.getInfoUlong(C.CL_DEVICE_MAX_MEM_ALLOC_SIZE, true)
- return val
-}
-
-// Size of global device memory in bytes.
-func (d *Device) GlobalMemSize() int64 {
- val, _ := d.getInfoUlong(C.CL_DEVICE_GLOBAL_MEM_SIZE, true)
- return val
-}
-
-func (d *Device) Available() bool {
- val, _ := d.getInfoBool(C.CL_DEVICE_AVAILABLE, true)
- return val
-}
-
-func (d *Device) CompilerAvailable() bool {
- val, _ := d.getInfoBool(C.CL_DEVICE_COMPILER_AVAILABLE, true)
- return val
-}
-
-func (d *Device) EndianLittle() bool {
- val, _ := d.getInfoBool(C.CL_DEVICE_ENDIAN_LITTLE, true)
- return val
-}
-
-// Is CL_TRUE if the device implements error correction for all
-// accesses to compute device memory (global and constant). Is
-// CL_FALSE if the device does not implement such error correction.
-func (d *Device) ErrorCorrectionSupport() bool {
- val, _ := d.getInfoBool(C.CL_DEVICE_ERROR_CORRECTION_SUPPORT, true)
- return val
-}
-
-func (d *Device) HostUnifiedMemory() bool {
- val, _ := d.getInfoBool(C.CL_DEVICE_HOST_UNIFIED_MEMORY, true)
- return val
-}
-
-func (d *Device) ImageSupport() bool {
- val, _ := d.getInfoBool(C.CL_DEVICE_IMAGE_SUPPORT, true)
- return val
-}
-
-func (d *Device) Type() DeviceType {
- var deviceType C.cl_device_type
- if err := C.clGetDeviceInfo(d.id, C.CL_DEVICE_TYPE, C.size_t(unsafe.Sizeof(deviceType)), unsafe.Pointer(&deviceType), nil); err != C.CL_SUCCESS {
- panic("Failed to get device type")
- }
- return DeviceType(deviceType)
-}
-
-// Describes double precision floating-point capability of the OpenCL device
-func (d *Device) DoubleFPConfig() FPConfig {
- var fpConfig C.cl_device_fp_config
- if err := C.clGetDeviceInfo(d.id, C.CL_DEVICE_DOUBLE_FP_CONFIG, C.size_t(unsafe.Sizeof(fpConfig)), unsafe.Pointer(&fpConfig), nil); err != C.CL_SUCCESS {
- panic("Failed to get double FP config")
- }
- return FPConfig(fpConfig)
-}
-
-// Describes the OPTIONAL half precision floating-point capability of the OpenCL device
-func (d *Device) HalfFPConfig() FPConfig {
- var fpConfig C.cl_device_fp_config
- err := C.clGetDeviceInfo(d.id, C.CL_DEVICE_HALF_FP_CONFIG, C.size_t(unsafe.Sizeof(fpConfig)), unsafe.Pointer(&fpConfig), nil)
- if err != C.CL_SUCCESS {
- return FPConfig(0)
- }
- return FPConfig(fpConfig)
-}
-
-// Type of local memory supported. This can be set to CL_LOCAL implying dedicated
-// local memory storage such as SRAM, or CL_GLOBAL. For custom devices, CL_NONE
-// can also be returned indicating no local memory support.
-func (d *Device) LocalMemType() LocalMemType {
- var memType C.cl_device_local_mem_type
- if err := C.clGetDeviceInfo(d.id, C.CL_DEVICE_LOCAL_MEM_TYPE, C.size_t(unsafe.Sizeof(memType)), unsafe.Pointer(&memType), nil); err != C.CL_SUCCESS {
- return LocalMemType(C.CL_NONE)
- }
- return LocalMemType(memType)
-}
-
-// Describes the execution capabilities of the device. The mandated minimum capability is CL_EXEC_KERNEL.
-func (d *Device) ExecutionCapabilities() ExecCapability {
- var execCap C.cl_device_exec_capabilities
- if err := C.clGetDeviceInfo(d.id, C.CL_DEVICE_EXECUTION_CAPABILITIES, C.size_t(unsafe.Sizeof(execCap)), unsafe.Pointer(&execCap), nil); err != C.CL_SUCCESS {
- panic("Failed to get execution capabilities")
- }
- return ExecCapability(execCap)
-}
-
-func (d *Device) GlobalMemCacheType() MemCacheType {
- var memType C.cl_device_mem_cache_type
- if err := C.clGetDeviceInfo(d.id, C.CL_DEVICE_GLOBAL_MEM_CACHE_TYPE, C.size_t(unsafe.Sizeof(memType)), unsafe.Pointer(&memType), nil); err != C.CL_SUCCESS {
- return MemCacheType(C.CL_NONE)
- }
- return MemCacheType(memType)
-}
-
-// Maximum number of work-items that can be specified in each dimension of the work-group to clEnqueueNDRangeKernel.
-//
-// Returns n size_t entries, where n is the value returned by the query for CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS.
-//
-// The minimum value is (1, 1, 1) for devices that are not of type CL_DEVICE_TYPE_CUSTOM.
-func (d *Device) MaxWorkItemSizes() []int {
- dims := d.MaxWorkItemDimensions()
- sizes := make([]C.size_t, dims)
- if err := C.clGetDeviceInfo(d.id, C.CL_DEVICE_MAX_WORK_ITEM_SIZES, C.size_t(int(unsafe.Sizeof(sizes[0]))*dims), unsafe.Pointer(&sizes[0]), nil); err != C.CL_SUCCESS {
- panic("Failed to get max work item sizes")
- }
- intSizes := make([]int, dims)
- for i, s := range sizes {
- intSizes[i] = int(s)
- }
- return intSizes
-}
diff --git a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/device12.go b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/device12.go
deleted file mode 100644
index b4b559a6a..000000000
--- a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/device12.go
+++ /dev/null
@@ -1,51 +0,0 @@
-// +build cl12
-
-package cl
-
-// #ifdef __APPLE__
-// #include "OpenCL/opencl.h"
-// #else
-// #include "cl.h"
-// #endif
-import "C"
-import "unsafe"
-
-const FPConfigCorrectlyRoundedDivideSqrt FPConfig = C.CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT
-
-func init() {
- fpConfigNameMap[FPConfigCorrectlyRoundedDivideSqrt] = "CorrectlyRoundedDivideSqrt"
-}
-
-func (d *Device) BuiltInKernels() string {
- str, _ := d.getInfoString(C.CL_DEVICE_BUILT_IN_KERNELS, true)
- return str
-}
-
-// Is CL_FALSE if the implementation does not have a linker available. Is CL_TRUE if the linker is available. This can be CL_FALSE for the embedded platform profile only. This must be CL_TRUE if CL_DEVICE_COMPILER_AVAILABLE is CL_TRUE
-func (d *Device) LinkerAvailable() bool {
- val, _ := d.getInfoBool(C.CL_DEVICE_LINKER_AVAILABLE, true)
- return val
-}
-
-func (d *Device) ParentDevice() *Device {
- var deviceId C.cl_device_id
- if err := C.clGetDeviceInfo(d.id, C.CL_DEVICE_PARENT_DEVICE, C.size_t(unsafe.Sizeof(deviceId)), unsafe.Pointer(&deviceId), nil); err != C.CL_SUCCESS {
- panic("ParentDevice failed")
- }
- if deviceId == nil {
- return nil
- }
- return &Device{id: deviceId}
-}
-
-// Max number of pixels for a 1D image created from a buffer object. The minimum value is 65536 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE.
-func (d *Device) ImageMaxBufferSize() int {
- val, _ := d.getInfoSize(C.CL_DEVICE_IMAGE_MAX_BUFFER_SIZE, true)
- return int(val)
-}
-
-// Max number of images in a 1D or 2D image array. The minimum value is 2048 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE
-func (d *Device) ImageMaxArraySize() int {
- val, _ := d.getInfoSize(C.CL_DEVICE_IMAGE_MAX_ARRAY_SIZE, true)
- return int(val)
-}
diff --git a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/cl.h b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/cl.h
deleted file mode 100644
index c38aa1eda..000000000
--- a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/cl.h
+++ /dev/null
@@ -1,1210 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 - 2012 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and/or associated documentation files (the
- * "Materials"), to deal in the Materials without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Materials, and to
- * permit persons to whom the Materials are furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Materials.
- *
- * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
- ******************************************************************************/
-
-#ifndef __OPENCL_CL_H
-#define __OPENCL_CL_H
-
-#include <cl_platform.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/******************************************************************************/
-
-typedef struct _cl_platform_id * cl_platform_id;
-typedef struct _cl_device_id * cl_device_id;
-typedef struct _cl_context * cl_context;
-typedef struct _cl_command_queue * cl_command_queue;
-typedef struct _cl_mem * cl_mem;
-typedef struct _cl_program * cl_program;
-typedef struct _cl_kernel * cl_kernel;
-typedef struct _cl_event * cl_event;
-typedef struct _cl_sampler * cl_sampler;
-
-typedef cl_uint cl_bool; /* WARNING! Unlike cl_ types in cl_platform.h, cl_bool is not guaranteed to be the same size as the bool in kernels. */
-typedef cl_ulong cl_bitfield;
-typedef cl_bitfield cl_device_type;
-typedef cl_uint cl_platform_info;
-typedef cl_uint cl_device_info;
-typedef cl_bitfield cl_device_fp_config;
-typedef cl_uint cl_device_mem_cache_type;
-typedef cl_uint cl_device_local_mem_type;
-typedef cl_bitfield cl_device_exec_capabilities;
-typedef cl_bitfield cl_command_queue_properties;
-typedef intptr_t cl_device_partition_property;
-typedef cl_bitfield cl_device_affinity_domain;
-
-typedef intptr_t cl_context_properties;
-typedef cl_uint cl_context_info;
-typedef cl_uint cl_command_queue_info;
-typedef cl_uint cl_channel_order;
-typedef cl_uint cl_channel_type;
-typedef cl_bitfield cl_mem_flags;
-typedef cl_uint cl_mem_object_type;
-typedef cl_uint cl_mem_info;
-typedef cl_bitfield cl_mem_migration_flags;
-typedef cl_uint cl_image_info;
-typedef cl_uint cl_buffer_create_type;
-typedef cl_uint cl_addressing_mode;
-typedef cl_uint cl_filter_mode;
-typedef cl_uint cl_sampler_info;
-typedef cl_bitfield cl_map_flags;
-typedef cl_uint cl_program_info;
-typedef cl_uint cl_program_build_info;
-typedef cl_uint cl_program_binary_type;
-typedef cl_int cl_build_status;
-typedef cl_uint cl_kernel_info;
-typedef cl_uint cl_kernel_arg_info;
-typedef cl_uint cl_kernel_arg_address_qualifier;
-typedef cl_uint cl_kernel_arg_access_qualifier;
-typedef cl_bitfield cl_kernel_arg_type_qualifier;
-typedef cl_uint cl_kernel_work_group_info;
-typedef cl_uint cl_event_info;
-typedef cl_uint cl_command_type;
-typedef cl_uint cl_profiling_info;
-
-
-typedef struct _cl_image_format {
- cl_channel_order image_channel_order;
- cl_channel_type image_channel_data_type;
-} cl_image_format;
-
-typedef struct _cl_image_desc {
- cl_mem_object_type image_type;
- size_t image_width;
- size_t image_height;
- size_t image_depth;
- size_t image_array_size;
- size_t image_row_pitch;
- size_t image_slice_pitch;
- cl_uint num_mip_levels;
- cl_uint num_samples;
- cl_mem buffer;
-} cl_image_desc;
-
-typedef struct _cl_buffer_region {
- size_t origin;
- size_t size;
-} cl_buffer_region;
-
-
-/******************************************************************************/
-
-/* Error Codes */
-#define CL_SUCCESS 0
-#define CL_DEVICE_NOT_FOUND -1
-#define CL_DEVICE_NOT_AVAILABLE -2
-#define CL_COMPILER_NOT_AVAILABLE -3
-#define CL_MEM_OBJECT_ALLOCATION_FAILURE -4
-#define CL_OUT_OF_RESOURCES -5
-#define CL_OUT_OF_HOST_MEMORY -6
-#define CL_PROFILING_INFO_NOT_AVAILABLE -7
-#define CL_MEM_COPY_OVERLAP -8
-#define CL_IMAGE_FORMAT_MISMATCH -9
-#define CL_IMAGE_FORMAT_NOT_SUPPORTED -10
-#define CL_BUILD_PROGRAM_FAILURE -11
-#define CL_MAP_FAILURE -12
-#define CL_MISALIGNED_SUB_BUFFER_OFFSET -13
-#define CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST -14
-#define CL_COMPILE_PROGRAM_FAILURE -15
-#define CL_LINKER_NOT_AVAILABLE -16
-#define CL_LINK_PROGRAM_FAILURE -17
-#define CL_DEVICE_PARTITION_FAILED -18
-#define CL_KERNEL_ARG_INFO_NOT_AVAILABLE -19
-
-#define CL_INVALID_VALUE -30
-#define CL_INVALID_DEVICE_TYPE -31
-#define CL_INVALID_PLATFORM -32
-#define CL_INVALID_DEVICE -33
-#define CL_INVALID_CONTEXT -34
-#define CL_INVALID_QUEUE_PROPERTIES -35
-#define CL_INVALID_COMMAND_QUEUE -36
-#define CL_INVALID_HOST_PTR -37
-#define CL_INVALID_MEM_OBJECT -38
-#define CL_INVALID_IMAGE_FORMAT_DESCRIPTOR -39
-#define CL_INVALID_IMAGE_SIZE -40
-#define CL_INVALID_SAMPLER -41
-#define CL_INVALID_BINARY -42
-#define CL_INVALID_BUILD_OPTIONS -43
-#define CL_INVALID_PROGRAM -44
-#define CL_INVALID_PROGRAM_EXECUTABLE -45
-#define CL_INVALID_KERNEL_NAME -46
-#define CL_INVALID_KERNEL_DEFINITION -47
-#define CL_INVALID_KERNEL -48
-#define CL_INVALID_ARG_INDEX -49
-#define CL_INVALID_ARG_VALUE -50
-#define CL_INVALID_ARG_SIZE -51
-#define CL_INVALID_KERNEL_ARGS -52
-#define CL_INVALID_WORK_DIMENSION -53
-#define CL_INVALID_WORK_GROUP_SIZE -54
-#define CL_INVALID_WORK_ITEM_SIZE -55
-#define CL_INVALID_GLOBAL_OFFSET -56
-#define CL_INVALID_EVENT_WAIT_LIST -57
-#define CL_INVALID_EVENT -58
-#define CL_INVALID_OPERATION -59
-#define CL_INVALID_GL_OBJECT -60
-#define CL_INVALID_BUFFER_SIZE -61
-#define CL_INVALID_MIP_LEVEL -62
-#define CL_INVALID_GLOBAL_WORK_SIZE -63
-#define CL_INVALID_PROPERTY -64
-#define CL_INVALID_IMAGE_DESCRIPTOR -65
-#define CL_INVALID_COMPILER_OPTIONS -66
-#define CL_INVALID_LINKER_OPTIONS -67
-#define CL_INVALID_DEVICE_PARTITION_COUNT -68
-
-/* OpenCL Version */
-#define CL_VERSION_1_0 1
-#define CL_VERSION_1_1 1
-#define CL_VERSION_1_2 1
-
-/* cl_bool */
-#define CL_FALSE 0
-#define CL_TRUE 1
-#define CL_BLOCKING CL_TRUE
-#define CL_NON_BLOCKING CL_FALSE
-
-/* cl_platform_info */
-#define CL_PLATFORM_PROFILE 0x0900
-#define CL_PLATFORM_VERSION 0x0901
-#define CL_PLATFORM_NAME 0x0902
-#define CL_PLATFORM_VENDOR 0x0903
-#define CL_PLATFORM_EXTENSIONS 0x0904
-
-/* cl_device_type - bitfield */
-#define CL_DEVICE_TYPE_DEFAULT (1 << 0)
-#define CL_DEVICE_TYPE_CPU (1 << 1)
-#define CL_DEVICE_TYPE_GPU (1 << 2)
-#define CL_DEVICE_TYPE_ACCELERATOR (1 << 3)
-#define CL_DEVICE_TYPE_CUSTOM (1 << 4)
-#define CL_DEVICE_TYPE_ALL 0xFFFFFFFF
-
-/* cl_device_info */
-#define CL_DEVICE_TYPE 0x1000
-#define CL_DEVICE_VENDOR_ID 0x1001
-#define CL_DEVICE_MAX_COMPUTE_UNITS 0x1002
-#define CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS 0x1003
-#define CL_DEVICE_MAX_WORK_GROUP_SIZE 0x1004
-#define CL_DEVICE_MAX_WORK_ITEM_SIZES 0x1005
-#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR 0x1006
-#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT 0x1007
-#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT 0x1008
-#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG 0x1009
-#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT 0x100A
-#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE 0x100B
-#define CL_DEVICE_MAX_CLOCK_FREQUENCY 0x100C
-#define CL_DEVICE_ADDRESS_BITS 0x100D
-#define CL_DEVICE_MAX_READ_IMAGE_ARGS 0x100E
-#define CL_DEVICE_MAX_WRITE_IMAGE_ARGS 0x100F
-#define CL_DEVICE_MAX_MEM_ALLOC_SIZE 0x1010
-#define CL_DEVICE_IMAGE2D_MAX_WIDTH 0x1011
-#define CL_DEVICE_IMAGE2D_MAX_HEIGHT 0x1012
-#define CL_DEVICE_IMAGE3D_MAX_WIDTH 0x1013
-#define CL_DEVICE_IMAGE3D_MAX_HEIGHT 0x1014
-#define CL_DEVICE_IMAGE3D_MAX_DEPTH 0x1015
-#define CL_DEVICE_IMAGE_SUPPORT 0x1016
-#define CL_DEVICE_MAX_PARAMETER_SIZE 0x1017
-#define CL_DEVICE_MAX_SAMPLERS 0x1018
-#define CL_DEVICE_MEM_BASE_ADDR_ALIGN 0x1019
-#define CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE 0x101A
-#define CL_DEVICE_SINGLE_FP_CONFIG 0x101B
-#define CL_DEVICE_GLOBAL_MEM_CACHE_TYPE 0x101C
-#define CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE 0x101D
-#define CL_DEVICE_GLOBAL_MEM_CACHE_SIZE 0x101E
-#define CL_DEVICE_GLOBAL_MEM_SIZE 0x101F
-#define CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE 0x1020
-#define CL_DEVICE_MAX_CONSTANT_ARGS 0x1021
-#define CL_DEVICE_LOCAL_MEM_TYPE 0x1022
-#define CL_DEVICE_LOCAL_MEM_SIZE 0x1023
-#define CL_DEVICE_ERROR_CORRECTION_SUPPORT 0x1024
-#define CL_DEVICE_PROFILING_TIMER_RESOLUTION 0x1025
-#define CL_DEVICE_ENDIAN_LITTLE 0x1026
-#define CL_DEVICE_AVAILABLE 0x1027
-#define CL_DEVICE_COMPILER_AVAILABLE 0x1028
-#define CL_DEVICE_EXECUTION_CAPABILITIES 0x1029
-#define CL_DEVICE_QUEUE_PROPERTIES 0x102A
-#define CL_DEVICE_NAME 0x102B
-#define CL_DEVICE_VENDOR 0x102C
-#define CL_DRIVER_VERSION 0x102D
-#define CL_DEVICE_PROFILE 0x102E
-#define CL_DEVICE_VERSION 0x102F
-#define CL_DEVICE_EXTENSIONS 0x1030
-#define CL_DEVICE_PLATFORM 0x1031
-#define CL_DEVICE_DOUBLE_FP_CONFIG 0x1032
-/* 0x1033 reserved for CL_DEVICE_HALF_FP_CONFIG */
-#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF 0x1034
-#define CL_DEVICE_HOST_UNIFIED_MEMORY 0x1035
-#define CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR 0x1036
-#define CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT 0x1037
-#define CL_DEVICE_NATIVE_VECTOR_WIDTH_INT 0x1038
-#define CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG 0x1039
-#define CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT 0x103A
-#define CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE 0x103B
-#define CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF 0x103C
-#define CL_DEVICE_OPENCL_C_VERSION 0x103D
-#define CL_DEVICE_LINKER_AVAILABLE 0x103E
-#define CL_DEVICE_BUILT_IN_KERNELS 0x103F
-#define CL_DEVICE_IMAGE_MAX_BUFFER_SIZE 0x1040
-#define CL_DEVICE_IMAGE_MAX_ARRAY_SIZE 0x1041
-#define CL_DEVICE_PARENT_DEVICE 0x1042
-#define CL_DEVICE_PARTITION_MAX_SUB_DEVICES 0x1043
-#define CL_DEVICE_PARTITION_PROPERTIES 0x1044
-#define CL_DEVICE_PARTITION_AFFINITY_DOMAIN 0x1045
-#define CL_DEVICE_PARTITION_TYPE 0x1046
-#define CL_DEVICE_REFERENCE_COUNT 0x1047
-#define CL_DEVICE_PREFERRED_INTEROP_USER_SYNC 0x1048
-#define CL_DEVICE_PRINTF_BUFFER_SIZE 0x1049
-#define CL_DEVICE_IMAGE_PITCH_ALIGNMENT 0x104A
-#define CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT 0x104B
-
-/* cl_device_fp_config - bitfield */
-#define CL_FP_DENORM (1 << 0)
-#define CL_FP_INF_NAN (1 << 1)
-#define CL_FP_ROUND_TO_NEAREST (1 << 2)
-#define CL_FP_ROUND_TO_ZERO (1 << 3)
-#define CL_FP_ROUND_TO_INF (1 << 4)
-#define CL_FP_FMA (1 << 5)
-#define CL_FP_SOFT_FLOAT (1 << 6)
-#define CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT (1 << 7)
-
-/* cl_device_mem_cache_type */
-#define CL_NONE 0x0
-#define CL_READ_ONLY_CACHE 0x1
-#define CL_READ_WRITE_CACHE 0x2
-
-/* cl_device_local_mem_type */
-#define CL_LOCAL 0x1
-#define CL_GLOBAL 0x2
-
-/* cl_device_exec_capabilities - bitfield */
-#define CL_EXEC_KERNEL (1 << 0)
-#define CL_EXEC_NATIVE_KERNEL (1 << 1)
-
-/* cl_command_queue_properties - bitfield */
-#define CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE (1 << 0)
-#define CL_QUEUE_PROFILING_ENABLE (1 << 1)
-
-/* cl_context_info */
-#define CL_CONTEXT_REFERENCE_COUNT 0x1080
-#define CL_CONTEXT_DEVICES 0x1081
-#define CL_CONTEXT_PROPERTIES 0x1082
-#define CL_CONTEXT_NUM_DEVICES 0x1083
-
-/* cl_context_properties */
-#define CL_CONTEXT_PLATFORM 0x1084
-#define CL_CONTEXT_INTEROP_USER_SYNC 0x1085
-
-/* cl_device_partition_property */
-#define CL_DEVICE_PARTITION_EQUALLY 0x1086
-#define CL_DEVICE_PARTITION_BY_COUNTS 0x1087
-#define CL_DEVICE_PARTITION_BY_COUNTS_LIST_END 0x0
-#define CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN 0x1088
-
-/* cl_device_affinity_domain */
-#define CL_DEVICE_AFFINITY_DOMAIN_NUMA (1 << 0)
-#define CL_DEVICE_AFFINITY_DOMAIN_L4_CACHE (1 << 1)
-#define CL_DEVICE_AFFINITY_DOMAIN_L3_CACHE (1 << 2)
-#define CL_DEVICE_AFFINITY_DOMAIN_L2_CACHE (1 << 3)
-#define CL_DEVICE_AFFINITY_DOMAIN_L1_CACHE (1 << 4)
-#define CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE (1 << 5)
-
-/* cl_command_queue_info */
-#define CL_QUEUE_CONTEXT 0x1090
-#define CL_QUEUE_DEVICE 0x1091
-#define CL_QUEUE_REFERENCE_COUNT 0x1092
-#define CL_QUEUE_PROPERTIES 0x1093
-
-/* cl_mem_flags - bitfield */
-#define CL_MEM_READ_WRITE (1 << 0)
-#define CL_MEM_WRITE_ONLY (1 << 1)
-#define CL_MEM_READ_ONLY (1 << 2)
-#define CL_MEM_USE_HOST_PTR (1 << 3)
-#define CL_MEM_ALLOC_HOST_PTR (1 << 4)
-#define CL_MEM_COPY_HOST_PTR (1 << 5)
-/* reserved (1 << 6) */
-#define CL_MEM_HOST_WRITE_ONLY (1 << 7)
-#define CL_MEM_HOST_READ_ONLY (1 << 8)
-#define CL_MEM_HOST_NO_ACCESS (1 << 9)
-
-/* cl_mem_migration_flags - bitfield */
-#define CL_MIGRATE_MEM_OBJECT_HOST (1 << 0)
-#define CL_MIGRATE_MEM_OBJECT_CONTENT_UNDEFINED (1 << 1)
-
-/* cl_channel_order */
-#define CL_R 0x10B0
-#define CL_A 0x10B1
-#define CL_RG 0x10B2
-#define CL_RA 0x10B3
-#define CL_RGB 0x10B4
-#define CL_RGBA 0x10B5
-#define CL_BGRA 0x10B6
-#define CL_ARGB 0x10B7
-#define CL_INTENSITY 0x10B8
-#define CL_LUMINANCE 0x10B9
-#define CL_Rx 0x10BA
-#define CL_RGx 0x10BB
-#define CL_RGBx 0x10BC
-#define CL_DEPTH 0x10BD
-#define CL_DEPTH_STENCIL 0x10BE
-
-/* cl_channel_type */
-#define CL_SNORM_INT8 0x10D0
-#define CL_SNORM_INT16 0x10D1
-#define CL_UNORM_INT8 0x10D2
-#define CL_UNORM_INT16 0x10D3
-#define CL_UNORM_SHORT_565 0x10D4
-#define CL_UNORM_SHORT_555 0x10D5
-#define CL_UNORM_INT_101010 0x10D6
-#define CL_SIGNED_INT8 0x10D7
-#define CL_SIGNED_INT16 0x10D8
-#define CL_SIGNED_INT32 0x10D9
-#define CL_UNSIGNED_INT8 0x10DA
-#define CL_UNSIGNED_INT16 0x10DB
-#define CL_UNSIGNED_INT32 0x10DC
-#define CL_HALF_FLOAT 0x10DD
-#define CL_FLOAT 0x10DE
-#define CL_UNORM_INT24 0x10DF
-
-/* cl_mem_object_type */
-#define CL_MEM_OBJECT_BUFFER 0x10F0
-#define CL_MEM_OBJECT_IMAGE2D 0x10F1
-#define CL_MEM_OBJECT_IMAGE3D 0x10F2
-#define CL_MEM_OBJECT_IMAGE2D_ARRAY 0x10F3
-#define CL_MEM_OBJECT_IMAGE1D 0x10F4
-#define CL_MEM_OBJECT_IMAGE1D_ARRAY 0x10F5
-#define CL_MEM_OBJECT_IMAGE1D_BUFFER 0x10F6
-
-/* cl_mem_info */
-#define CL_MEM_TYPE 0x1100
-#define CL_MEM_FLAGS 0x1101
-#define CL_MEM_SIZE 0x1102
-#define CL_MEM_HOST_PTR 0x1103
-#define CL_MEM_MAP_COUNT 0x1104
-#define CL_MEM_REFERENCE_COUNT 0x1105
-#define CL_MEM_CONTEXT 0x1106
-#define CL_MEM_ASSOCIATED_MEMOBJECT 0x1107
-#define CL_MEM_OFFSET 0x1108
-
-/* cl_image_info */
-#define CL_IMAGE_FORMAT 0x1110
-#define CL_IMAGE_ELEMENT_SIZE 0x1111
-#define CL_IMAGE_ROW_PITCH 0x1112
-#define CL_IMAGE_SLICE_PITCH 0x1113
-#define CL_IMAGE_WIDTH 0x1114
-#define CL_IMAGE_HEIGHT 0x1115
-#define CL_IMAGE_DEPTH 0x1116
-#define CL_IMAGE_ARRAY_SIZE 0x1117
-#define CL_IMAGE_BUFFER 0x1118
-#define CL_IMAGE_NUM_MIP_LEVELS 0x1119
-#define CL_IMAGE_NUM_SAMPLES 0x111A
-
-/* cl_addressing_mode */
-#define CL_ADDRESS_NONE 0x1130
-#define CL_ADDRESS_CLAMP_TO_EDGE 0x1131
-#define CL_ADDRESS_CLAMP 0x1132
-#define CL_ADDRESS_REPEAT 0x1133
-#define CL_ADDRESS_MIRRORED_REPEAT 0x1134
-
-/* cl_filter_mode */
-#define CL_FILTER_NEAREST 0x1140
-#define CL_FILTER_LINEAR 0x1141
-
-/* cl_sampler_info */
-#define CL_SAMPLER_REFERENCE_COUNT 0x1150
-#define CL_SAMPLER_CONTEXT 0x1151
-#define CL_SAMPLER_NORMALIZED_COORDS 0x1152
-#define CL_SAMPLER_ADDRESSING_MODE 0x1153
-#define CL_SAMPLER_FILTER_MODE 0x1154
-
-/* cl_map_flags - bitfield */
-#define CL_MAP_READ (1 << 0)
-#define CL_MAP_WRITE (1 << 1)
-#define CL_MAP_WRITE_INVALIDATE_REGION (1 << 2)
-
-/* cl_program_info */
-#define CL_PROGRAM_REFERENCE_COUNT 0x1160
-#define CL_PROGRAM_CONTEXT 0x1161
-#define CL_PROGRAM_NUM_DEVICES 0x1162
-#define CL_PROGRAM_DEVICES 0x1163
-#define CL_PROGRAM_SOURCE 0x1164
-#define CL_PROGRAM_BINARY_SIZES 0x1165
-#define CL_PROGRAM_BINARIES 0x1166
-#define CL_PROGRAM_NUM_KERNELS 0x1167
-#define CL_PROGRAM_KERNEL_NAMES 0x1168
-
-/* cl_program_build_info */
-#define CL_PROGRAM_BUILD_STATUS 0x1181
-#define CL_PROGRAM_BUILD_OPTIONS 0x1182
-#define CL_PROGRAM_BUILD_LOG 0x1183
-#define CL_PROGRAM_BINARY_TYPE 0x1184
-
-/* cl_program_binary_type */
-#define CL_PROGRAM_BINARY_TYPE_NONE 0x0
-#define CL_PROGRAM_BINARY_TYPE_COMPILED_OBJECT 0x1
-#define CL_PROGRAM_BINARY_TYPE_LIBRARY 0x2
-#define CL_PROGRAM_BINARY_TYPE_EXECUTABLE 0x4
-
-/* cl_build_status */
-#define CL_BUILD_SUCCESS 0
-#define CL_BUILD_NONE -1
-#define CL_BUILD_ERROR -2
-#define CL_BUILD_IN_PROGRESS -3
-
-/* cl_kernel_info */
-#define CL_KERNEL_FUNCTION_NAME 0x1190
-#define CL_KERNEL_NUM_ARGS 0x1191
-#define CL_KERNEL_REFERENCE_COUNT 0x1192
-#define CL_KERNEL_CONTEXT 0x1193
-#define CL_KERNEL_PROGRAM 0x1194
-#define CL_KERNEL_ATTRIBUTES 0x1195
-
-/* cl_kernel_arg_info */
-#define CL_KERNEL_ARG_ADDRESS_QUALIFIER 0x1196
-#define CL_KERNEL_ARG_ACCESS_QUALIFIER 0x1197
-#define CL_KERNEL_ARG_TYPE_NAME 0x1198
-#define CL_KERNEL_ARG_TYPE_QUALIFIER 0x1199
-#define CL_KERNEL_ARG_NAME 0x119A
-
-/* cl_kernel_arg_address_qualifier */
-#define CL_KERNEL_ARG_ADDRESS_GLOBAL 0x119B
-#define CL_KERNEL_ARG_ADDRESS_LOCAL 0x119C
-#define CL_KERNEL_ARG_ADDRESS_CONSTANT 0x119D
-#define CL_KERNEL_ARG_ADDRESS_PRIVATE 0x119E
-
-/* cl_kernel_arg_access_qualifier */
-#define CL_KERNEL_ARG_ACCESS_READ_ONLY 0x11A0
-#define CL_KERNEL_ARG_ACCESS_WRITE_ONLY 0x11A1
-#define CL_KERNEL_ARG_ACCESS_READ_WRITE 0x11A2
-#define CL_KERNEL_ARG_ACCESS_NONE 0x11A3
-
-/* cl_kernel_arg_type_qualifer */
-#define CL_KERNEL_ARG_TYPE_NONE 0
-#define CL_KERNEL_ARG_TYPE_CONST (1 << 0)
-#define CL_KERNEL_ARG_TYPE_RESTRICT (1 << 1)
-#define CL_KERNEL_ARG_TYPE_VOLATILE (1 << 2)
-
-/* cl_kernel_work_group_info */
-#define CL_KERNEL_WORK_GROUP_SIZE 0x11B0
-#define CL_KERNEL_COMPILE_WORK_GROUP_SIZE 0x11B1
-#define CL_KERNEL_LOCAL_MEM_SIZE 0x11B2
-#define CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE 0x11B3
-#define CL_KERNEL_PRIVATE_MEM_SIZE 0x11B4
-#define CL_KERNEL_GLOBAL_WORK_SIZE 0x11B5
-
-/* cl_event_info */
-#define CL_EVENT_COMMAND_QUEUE 0x11D0
-#define CL_EVENT_COMMAND_TYPE 0x11D1
-#define CL_EVENT_REFERENCE_COUNT 0x11D2
-#define CL_EVENT_COMMAND_EXECUTION_STATUS 0x11D3
-#define CL_EVENT_CONTEXT 0x11D4
-
-/* cl_command_type */
-#define CL_COMMAND_NDRANGE_KERNEL 0x11F0
-#define CL_COMMAND_TASK 0x11F1
-#define CL_COMMAND_NATIVE_KERNEL 0x11F2
-#define CL_COMMAND_READ_BUFFER 0x11F3
-#define CL_COMMAND_WRITE_BUFFER 0x11F4
-#define CL_COMMAND_COPY_BUFFER 0x11F5
-#define CL_COMMAND_READ_IMAGE 0x11F6
-#define CL_COMMAND_WRITE_IMAGE 0x11F7
-#define CL_COMMAND_COPY_IMAGE 0x11F8
-#define CL_COMMAND_COPY_IMAGE_TO_BUFFER 0x11F9
-#define CL_COMMAND_COPY_BUFFER_TO_IMAGE 0x11FA
-#define CL_COMMAND_MAP_BUFFER 0x11FB
-#define CL_COMMAND_MAP_IMAGE 0x11FC
-#define CL_COMMAND_UNMAP_MEM_OBJECT 0x11FD
-#define CL_COMMAND_MARKER 0x11FE
-#define CL_COMMAND_ACQUIRE_GL_OBJECTS 0x11FF
-#define CL_COMMAND_RELEASE_GL_OBJECTS 0x1200
-#define CL_COMMAND_READ_BUFFER_RECT 0x1201
-#define CL_COMMAND_WRITE_BUFFER_RECT 0x1202
-#define CL_COMMAND_COPY_BUFFER_RECT 0x1203
-#define CL_COMMAND_USER 0x1204
-#define CL_COMMAND_BARRIER 0x1205
-#define CL_COMMAND_MIGRATE_MEM_OBJECTS 0x1206
-#define CL_COMMAND_FILL_BUFFER 0x1207
-#define CL_COMMAND_FILL_IMAGE 0x1208
-
-/* command execution status */
-#define CL_COMPLETE 0x0
-#define CL_RUNNING 0x1
-#define CL_SUBMITTED 0x2
-#define CL_QUEUED 0x3
-
-/* cl_buffer_create_type */
-#define CL_BUFFER_CREATE_TYPE_REGION 0x1220
-
-/* cl_profiling_info */
-#define CL_PROFILING_COMMAND_QUEUED 0x1280
-#define CL_PROFILING_COMMAND_SUBMIT 0x1281
-#define CL_PROFILING_COMMAND_START 0x1282
-#define CL_PROFILING_COMMAND_END 0x1283
-
-/********************************************************************************************************/
-
-/* Platform API */
-extern CL_API_ENTRY cl_int CL_API_CALL
-clGetPlatformIDs(cl_uint /* num_entries */,
- cl_platform_id * /* platforms */,
- cl_uint * /* num_platforms */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clGetPlatformInfo(cl_platform_id /* platform */,
- cl_platform_info /* param_name */,
- size_t /* param_value_size */,
- void * /* param_value */,
- size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
-
-/* Device APIs */
-extern CL_API_ENTRY cl_int CL_API_CALL
-clGetDeviceIDs(cl_platform_id /* platform */,
- cl_device_type /* device_type */,
- cl_uint /* num_entries */,
- cl_device_id * /* devices */,
- cl_uint * /* num_devices */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clGetDeviceInfo(cl_device_id /* device */,
- cl_device_info /* param_name */,
- size_t /* param_value_size */,
- void * /* param_value */,
- size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clCreateSubDevices(cl_device_id /* in_device */,
- const cl_device_partition_property * /* properties */,
- cl_uint /* num_devices */,
- cl_device_id * /* out_devices */,
- cl_uint * /* num_devices_ret */) CL_API_SUFFIX__VERSION_1_2;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clRetainDevice(cl_device_id /* device */) CL_API_SUFFIX__VERSION_1_2;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clReleaseDevice(cl_device_id /* device */) CL_API_SUFFIX__VERSION_1_2;
-
-/* Context APIs */
-extern CL_API_ENTRY cl_context CL_API_CALL
-clCreateContext(const cl_context_properties * /* properties */,
- cl_uint /* num_devices */,
- const cl_device_id * /* devices */,
- void (CL_CALLBACK * /* pfn_notify */)(const char *, const void *, size_t, void *),
- void * /* user_data */,
- cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_context CL_API_CALL
-clCreateContextFromType(const cl_context_properties * /* properties */,
- cl_device_type /* device_type */,
- void (CL_CALLBACK * /* pfn_notify*/ )(const char *, const void *, size_t, void *),
- void * /* user_data */,
- cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clRetainContext(cl_context /* context */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clReleaseContext(cl_context /* context */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clGetContextInfo(cl_context /* context */,
- cl_context_info /* param_name */,
- size_t /* param_value_size */,
- void * /* param_value */,
- size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
-
-/* Command Queue APIs */
-extern CL_API_ENTRY cl_command_queue CL_API_CALL
-clCreateCommandQueue(cl_context /* context */,
- cl_device_id /* device */,
- cl_command_queue_properties /* properties */,
- cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clRetainCommandQueue(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clReleaseCommandQueue(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clGetCommandQueueInfo(cl_command_queue /* command_queue */,
- cl_command_queue_info /* param_name */,
- size_t /* param_value_size */,
- void * /* param_value */,
- size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
-
-/* Memory Object APIs */
-extern CL_API_ENTRY cl_mem CL_API_CALL
-clCreateBuffer(cl_context /* context */,
- cl_mem_flags /* flags */,
- size_t /* size */,
- void * /* host_ptr */,
- cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_mem CL_API_CALL
-clCreateSubBuffer(cl_mem /* buffer */,
- cl_mem_flags /* flags */,
- cl_buffer_create_type /* buffer_create_type */,
- const void * /* buffer_create_info */,
- cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1;
-
-extern CL_API_ENTRY cl_mem CL_API_CALL
-clCreateImage(cl_context /* context */,
- cl_mem_flags /* flags */,
- const cl_image_format * /* image_format */,
- const cl_image_desc * /* image_desc */,
- void * /* host_ptr */,
- cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_2;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clRetainMemObject(cl_mem /* memobj */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clReleaseMemObject(cl_mem /* memobj */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clGetSupportedImageFormats(cl_context /* context */,
- cl_mem_flags /* flags */,
- cl_mem_object_type /* image_type */,
- cl_uint /* num_entries */,
- cl_image_format * /* image_formats */,
- cl_uint * /* num_image_formats */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clGetMemObjectInfo(cl_mem /* memobj */,
- cl_mem_info /* param_name */,
- size_t /* param_value_size */,
- void * /* param_value */,
- size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clGetImageInfo(cl_mem /* image */,
- cl_image_info /* param_name */,
- size_t /* param_value_size */,
- void * /* param_value */,
- size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clSetMemObjectDestructorCallback( cl_mem /* memobj */,
- void (CL_CALLBACK * /*pfn_notify*/)( cl_mem /* memobj */, void* /*user_data*/),
- void * /*user_data */ ) CL_API_SUFFIX__VERSION_1_1;
-
-/* Sampler APIs */
-extern CL_API_ENTRY cl_sampler CL_API_CALL
-clCreateSampler(cl_context /* context */,
- cl_bool /* normalized_coords */,
- cl_addressing_mode /* addressing_mode */,
- cl_filter_mode /* filter_mode */,
- cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clRetainSampler(cl_sampler /* sampler */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clReleaseSampler(cl_sampler /* sampler */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clGetSamplerInfo(cl_sampler /* sampler */,
- cl_sampler_info /* param_name */,
- size_t /* param_value_size */,
- void * /* param_value */,
- size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
-
-/* Program Object APIs */
-extern CL_API_ENTRY cl_program CL_API_CALL
-clCreateProgramWithSource(cl_context /* context */,
- cl_uint /* count */,
- const char ** /* strings */,
- const size_t * /* lengths */,
- cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_program CL_API_CALL
-clCreateProgramWithBinary(cl_context /* context */,
- cl_uint /* num_devices */,
- const cl_device_id * /* device_list */,
- const size_t * /* lengths */,
- const unsigned char ** /* binaries */,
- cl_int * /* binary_status */,
- cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_program CL_API_CALL
-clCreateProgramWithBuiltInKernels(cl_context /* context */,
- cl_uint /* num_devices */,
- const cl_device_id * /* device_list */,
- const char * /* kernel_names */,
- cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_2;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clRetainProgram(cl_program /* program */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clReleaseProgram(cl_program /* program */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clBuildProgram(cl_program /* program */,
- cl_uint /* num_devices */,
- const cl_device_id * /* device_list */,
- const char * /* options */,
- void (CL_CALLBACK * /* pfn_notify */)(cl_program /* program */, void * /* user_data */),
- void * /* user_data */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clCompileProgram(cl_program /* program */,
- cl_uint /* num_devices */,
- const cl_device_id * /* device_list */,
- const char * /* options */,
- cl_uint /* num_input_headers */,
- const cl_program * /* input_headers */,
- const char ** /* header_include_names */,
- void (CL_CALLBACK * /* pfn_notify */)(cl_program /* program */, void * /* user_data */),
- void * /* user_data */) CL_API_SUFFIX__VERSION_1_2;
-
-extern CL_API_ENTRY cl_program CL_API_CALL
-clLinkProgram(cl_context /* context */,
- cl_uint /* num_devices */,
- const cl_device_id * /* device_list */,
- const char * /* options */,
- cl_uint /* num_input_programs */,
- const cl_program * /* input_programs */,
- void (CL_CALLBACK * /* pfn_notify */)(cl_program /* program */, void * /* user_data */),
- void * /* user_data */,
- cl_int * /* errcode_ret */ ) CL_API_SUFFIX__VERSION_1_2;
-
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clUnloadPlatformCompiler(cl_platform_id /* platform */) CL_API_SUFFIX__VERSION_1_2;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clGetProgramInfo(cl_program /* program */,
- cl_program_info /* param_name */,
- size_t /* param_value_size */,
- void * /* param_value */,
- size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clGetProgramBuildInfo(cl_program /* program */,
- cl_device_id /* device */,
- cl_program_build_info /* param_name */,
- size_t /* param_value_size */,
- void * /* param_value */,
- size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
-
-/* Kernel Object APIs */
-extern CL_API_ENTRY cl_kernel CL_API_CALL
-clCreateKernel(cl_program /* program */,
- const char * /* kernel_name */,
- cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clCreateKernelsInProgram(cl_program /* program */,
- cl_uint /* num_kernels */,
- cl_kernel * /* kernels */,
- cl_uint * /* num_kernels_ret */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clRetainKernel(cl_kernel /* kernel */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clReleaseKernel(cl_kernel /* kernel */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clSetKernelArg(cl_kernel /* kernel */,
- cl_uint /* arg_index */,
- size_t /* arg_size */,
- const void * /* arg_value */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clGetKernelInfo(cl_kernel /* kernel */,
- cl_kernel_info /* param_name */,
- size_t /* param_value_size */,
- void * /* param_value */,
- size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clGetKernelArgInfo(cl_kernel /* kernel */,
- cl_uint /* arg_indx */,
- cl_kernel_arg_info /* param_name */,
- size_t /* param_value_size */,
- void * /* param_value */,
- size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_2;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clGetKernelWorkGroupInfo(cl_kernel /* kernel */,
- cl_device_id /* device */,
- cl_kernel_work_group_info /* param_name */,
- size_t /* param_value_size */,
- void * /* param_value */,
- size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
-
-/* Event Object APIs */
-extern CL_API_ENTRY cl_int CL_API_CALL
-clWaitForEvents(cl_uint /* num_events */,
- const cl_event * /* event_list */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clGetEventInfo(cl_event /* event */,
- cl_event_info /* param_name */,
- size_t /* param_value_size */,
- void * /* param_value */,
- size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_event CL_API_CALL
-clCreateUserEvent(cl_context /* context */,
- cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clRetainEvent(cl_event /* event */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clReleaseEvent(cl_event /* event */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clSetUserEventStatus(cl_event /* event */,
- cl_int /* execution_status */) CL_API_SUFFIX__VERSION_1_1;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clSetEventCallback( cl_event /* event */,
- cl_int /* command_exec_callback_type */,
- void (CL_CALLBACK * /* pfn_notify */)(cl_event, cl_int, void *),
- void * /* user_data */) CL_API_SUFFIX__VERSION_1_1;
-
-/* Profiling APIs */
-extern CL_API_ENTRY cl_int CL_API_CALL
-clGetEventProfilingInfo(cl_event /* event */,
- cl_profiling_info /* param_name */,
- size_t /* param_value_size */,
- void * /* param_value */,
- size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
-
-/* Flush and Finish APIs */
-extern CL_API_ENTRY cl_int CL_API_CALL
-clFlush(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clFinish(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0;
-
-/* Enqueued Commands APIs */
-extern CL_API_ENTRY cl_int CL_API_CALL
-clEnqueueReadBuffer(cl_command_queue /* command_queue */,
- cl_mem /* buffer */,
- cl_bool /* blocking_read */,
- size_t /* offset */,
- size_t /* size */,
- void * /* ptr */,
- cl_uint /* num_events_in_wait_list */,
- const cl_event * /* event_wait_list */,
- cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clEnqueueReadBufferRect(cl_command_queue /* command_queue */,
- cl_mem /* buffer */,
- cl_bool /* blocking_read */,
- const size_t * /* buffer_offset */,
- const size_t * /* host_offset */,
- const size_t * /* region */,
- size_t /* buffer_row_pitch */,
- size_t /* buffer_slice_pitch */,
- size_t /* host_row_pitch */,
- size_t /* host_slice_pitch */,
- void * /* ptr */,
- cl_uint /* num_events_in_wait_list */,
- const cl_event * /* event_wait_list */,
- cl_event * /* event */) CL_API_SUFFIX__VERSION_1_1;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clEnqueueWriteBuffer(cl_command_queue /* command_queue */,
- cl_mem /* buffer */,
- cl_bool /* blocking_write */,
- size_t /* offset */,
- size_t /* size */,
- const void * /* ptr */,
- cl_uint /* num_events_in_wait_list */,
- const cl_event * /* event_wait_list */,
- cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clEnqueueWriteBufferRect(cl_command_queue /* command_queue */,
- cl_mem /* buffer */,
- cl_bool /* blocking_write */,
- const size_t * /* buffer_offset */,
- const size_t * /* host_offset */,
- const size_t * /* region */,
- size_t /* buffer_row_pitch */,
- size_t /* buffer_slice_pitch */,
- size_t /* host_row_pitch */,
- size_t /* host_slice_pitch */,
- const void * /* ptr */,
- cl_uint /* num_events_in_wait_list */,
- const cl_event * /* event_wait_list */,
- cl_event * /* event */) CL_API_SUFFIX__VERSION_1_1;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clEnqueueFillBuffer(cl_command_queue /* command_queue */,
- cl_mem /* buffer */,
- const void * /* pattern */,
- size_t /* pattern_size */,
- size_t /* offset */,
- size_t /* size */,
- cl_uint /* num_events_in_wait_list */,
- const cl_event * /* event_wait_list */,
- cl_event * /* event */) CL_API_SUFFIX__VERSION_1_2;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clEnqueueCopyBuffer(cl_command_queue /* command_queue */,
- cl_mem /* src_buffer */,
- cl_mem /* dst_buffer */,
- size_t /* src_offset */,
- size_t /* dst_offset */,
- size_t /* size */,
- cl_uint /* num_events_in_wait_list */,
- const cl_event * /* event_wait_list */,
- cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clEnqueueCopyBufferRect(cl_command_queue /* command_queue */,
- cl_mem /* src_buffer */,
- cl_mem /* dst_buffer */,
- const size_t * /* src_origin */,
- const size_t * /* dst_origin */,
- const size_t * /* region */,
- size_t /* src_row_pitch */,
- size_t /* src_slice_pitch */,
- size_t /* dst_row_pitch */,
- size_t /* dst_slice_pitch */,
- cl_uint /* num_events_in_wait_list */,
- const cl_event * /* event_wait_list */,
- cl_event * /* event */) CL_API_SUFFIX__VERSION_1_1;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clEnqueueReadImage(cl_command_queue /* command_queue */,
- cl_mem /* image */,
- cl_bool /* blocking_read */,
- const size_t * /* origin[3] */,
- const size_t * /* region[3] */,
- size_t /* row_pitch */,
- size_t /* slice_pitch */,
- void * /* ptr */,
- cl_uint /* num_events_in_wait_list */,
- const cl_event * /* event_wait_list */,
- cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clEnqueueWriteImage(cl_command_queue /* command_queue */,
- cl_mem /* image */,
- cl_bool /* blocking_write */,
- const size_t * /* origin[3] */,
- const size_t * /* region[3] */,
- size_t /* input_row_pitch */,
- size_t /* input_slice_pitch */,
- const void * /* ptr */,
- cl_uint /* num_events_in_wait_list */,
- const cl_event * /* event_wait_list */,
- cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clEnqueueFillImage(cl_command_queue /* command_queue */,
- cl_mem /* image */,
- const void * /* fill_color */,
- const size_t * /* origin[3] */,
- const size_t * /* region[3] */,
- cl_uint /* num_events_in_wait_list */,
- const cl_event * /* event_wait_list */,
- cl_event * /* event */) CL_API_SUFFIX__VERSION_1_2;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clEnqueueCopyImage(cl_command_queue /* command_queue */,
- cl_mem /* src_image */,
- cl_mem /* dst_image */,
- const size_t * /* src_origin[3] */,
- const size_t * /* dst_origin[3] */,
- const size_t * /* region[3] */,
- cl_uint /* num_events_in_wait_list */,
- const cl_event * /* event_wait_list */,
- cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clEnqueueCopyImageToBuffer(cl_command_queue /* command_queue */,
- cl_mem /* src_image */,
- cl_mem /* dst_buffer */,
- const size_t * /* src_origin[3] */,
- const size_t * /* region[3] */,
- size_t /* dst_offset */,
- cl_uint /* num_events_in_wait_list */,
- const cl_event * /* event_wait_list */,
- cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clEnqueueCopyBufferToImage(cl_command_queue /* command_queue */,
- cl_mem /* src_buffer */,
- cl_mem /* dst_image */,
- size_t /* src_offset */,
- const size_t * /* dst_origin[3] */,
- const size_t * /* region[3] */,
- cl_uint /* num_events_in_wait_list */,
- const cl_event * /* event_wait_list */,
- cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY void * CL_API_CALL
-clEnqueueMapBuffer(cl_command_queue /* command_queue */,
- cl_mem /* buffer */,
- cl_bool /* blocking_map */,
- cl_map_flags /* map_flags */,
- size_t /* offset */,
- size_t /* size */,
- cl_uint /* num_events_in_wait_list */,
- const cl_event * /* event_wait_list */,
- cl_event * /* event */,
- cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY void * CL_API_CALL
-clEnqueueMapImage(cl_command_queue /* command_queue */,
- cl_mem /* image */,
- cl_bool /* blocking_map */,
- cl_map_flags /* map_flags */,
- const size_t * /* origin[3] */,
- const size_t * /* region[3] */,
- size_t * /* image_row_pitch */,
- size_t * /* image_slice_pitch */,
- cl_uint /* num_events_in_wait_list */,
- const cl_event * /* event_wait_list */,
- cl_event * /* event */,
- cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clEnqueueUnmapMemObject(cl_command_queue /* command_queue */,
- cl_mem /* memobj */,
- void * /* mapped_ptr */,
- cl_uint /* num_events_in_wait_list */,
- const cl_event * /* event_wait_list */,
- cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clEnqueueMigrateMemObjects(cl_command_queue /* command_queue */,
- cl_uint /* num_mem_objects */,
- const cl_mem * /* mem_objects */,
- cl_mem_migration_flags /* flags */,
- cl_uint /* num_events_in_wait_list */,
- const cl_event * /* event_wait_list */,
- cl_event * /* event */) CL_API_SUFFIX__VERSION_1_2;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clEnqueueNDRangeKernel(cl_command_queue /* command_queue */,
- cl_kernel /* kernel */,
- cl_uint /* work_dim */,
- const size_t * /* global_work_offset */,
- const size_t * /* global_work_size */,
- const size_t * /* local_work_size */,
- cl_uint /* num_events_in_wait_list */,
- const cl_event * /* event_wait_list */,
- cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clEnqueueTask(cl_command_queue /* command_queue */,
- cl_kernel /* kernel */,
- cl_uint /* num_events_in_wait_list */,
- const cl_event * /* event_wait_list */,
- cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clEnqueueNativeKernel(cl_command_queue /* command_queue */,
- void (CL_CALLBACK * /*user_func*/)(void *),
- void * /* args */,
- size_t /* cb_args */,
- cl_uint /* num_mem_objects */,
- const cl_mem * /* mem_list */,
- const void ** /* args_mem_loc */,
- cl_uint /* num_events_in_wait_list */,
- const cl_event * /* event_wait_list */,
- cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clEnqueueMarkerWithWaitList(cl_command_queue /* command_queue */,
- cl_uint /* num_events_in_wait_list */,
- const cl_event * /* event_wait_list */,
- cl_event * /* event */) CL_API_SUFFIX__VERSION_1_2;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clEnqueueBarrierWithWaitList(cl_command_queue /* command_queue */,
- cl_uint /* num_events_in_wait_list */,
- const cl_event * /* event_wait_list */,
- cl_event * /* event */) CL_API_SUFFIX__VERSION_1_2;
-
-
-/* Extension function access
- *
- * Returns the extension function address for the given function name,
- * or NULL if a valid function can not be found. The client must
- * check to make sure the address is not NULL, before using or
- * calling the returned function address.
- */
-extern CL_API_ENTRY void * CL_API_CALL
-clGetExtensionFunctionAddressForPlatform(cl_platform_id /* platform */,
- const char * /* func_name */) CL_API_SUFFIX__VERSION_1_2;
-
-
-/* Deprecated OpenCL 1.1 APIs */
-extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
-clCreateImage2D(cl_context /* context */,
- cl_mem_flags /* flags */,
- const cl_image_format * /* image_format */,
- size_t /* image_width */,
- size_t /* image_height */,
- size_t /* image_row_pitch */,
- void * /* host_ptr */,
- cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
-
-extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
-clCreateImage3D(cl_context /* context */,
- cl_mem_flags /* flags */,
- const cl_image_format * /* image_format */,
- size_t /* image_width */,
- size_t /* image_height */,
- size_t /* image_depth */,
- size_t /* image_row_pitch */,
- size_t /* image_slice_pitch */,
- void * /* host_ptr */,
- cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
-
-extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
-clEnqueueMarker(cl_command_queue /* command_queue */,
- cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
-
-extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
-clEnqueueWaitForEvents(cl_command_queue /* command_queue */,
- cl_uint /* num_events */,
- const cl_event * /* event_list */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
-
-extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
-clEnqueueBarrier(cl_command_queue /* command_queue */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
-
-extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
-clUnloadCompiler(void) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
-
-extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED void * CL_API_CALL
-clGetExtensionFunctionAddress(const char * /* func_name */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __OPENCL_CL_H */
-
diff --git a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/cl_ext.h b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/cl_ext.h
deleted file mode 100644
index a998c9c51..000000000
--- a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/cl_ext.h
+++ /dev/null
@@ -1,315 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008-2013 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and/or associated documentation files (the
- * "Materials"), to deal in the Materials without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Materials, and to
- * permit persons to whom the Materials are furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Materials.
- *
- * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
- ******************************************************************************/
-
-/* $Revision: 11928 $ on $Date: 2010-07-13 09:04:56 -0700 (Tue, 13 Jul 2010) $ */
-
-/* cl_ext.h contains OpenCL extensions which don't have external */
-/* (OpenGL, D3D) dependencies. */
-
-#ifndef __CL_EXT_H
-#define __CL_EXT_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __APPLE__
-#include <AvailabilityMacros.h>
-#endif
-
-#include <cl.h>
-
-/* cl_khr_fp16 extension - no extension #define since it has no functions */
-#define CL_DEVICE_HALF_FP_CONFIG 0x1033
-
-/* Memory object destruction
- *
- * Apple extension for use to manage externally allocated buffers used with cl_mem objects with CL_MEM_USE_HOST_PTR
- *
- * Registers a user callback function that will be called when the memory object is deleted and its resources
- * freed. Each call to clSetMemObjectCallbackFn registers the specified user callback function on a callback
- * stack associated with memobj. The registered user callback functions are called in the reverse order in
- * which they were registered. The user callback functions are called and then the memory object is deleted
- * and its resources freed. This provides a mechanism for the application (and libraries) using memobj to be
- * notified when the memory referenced by host_ptr, specified when the memory object is created and used as
- * the storage bits for the memory object, can be reused or freed.
- *
- * The application may not call CL api's with the cl_mem object passed to the pfn_notify.
- *
- * Please check for the "cl_APPLE_SetMemObjectDestructor" extension using clGetDeviceInfo(CL_DEVICE_EXTENSIONS)
- * before using.
- */
-#define cl_APPLE_SetMemObjectDestructor 1
-cl_int CL_API_ENTRY clSetMemObjectDestructorAPPLE( cl_mem /* memobj */,
- void (* /*pfn_notify*/)( cl_mem /* memobj */, void* /*user_data*/),
- void * /*user_data */ ) CL_EXT_SUFFIX__VERSION_1_0;
-
-
-/* Context Logging Functions
- *
- * The next three convenience functions are intended to be used as the pfn_notify parameter to clCreateContext().
- * Please check for the "cl_APPLE_ContextLoggingFunctions" extension using clGetDeviceInfo(CL_DEVICE_EXTENSIONS)
- * before using.
- *
- * clLogMessagesToSystemLog fowards on all log messages to the Apple System Logger
- */
-#define cl_APPLE_ContextLoggingFunctions 1
-extern void CL_API_ENTRY clLogMessagesToSystemLogAPPLE( const char * /* errstr */,
- const void * /* private_info */,
- size_t /* cb */,
- void * /* user_data */ ) CL_EXT_SUFFIX__VERSION_1_0;
-
-/* clLogMessagesToStdout sends all log messages to the file descriptor stdout */
-extern void CL_API_ENTRY clLogMessagesToStdoutAPPLE( const char * /* errstr */,
- const void * /* private_info */,
- size_t /* cb */,
- void * /* user_data */ ) CL_EXT_SUFFIX__VERSION_1_0;
-
-/* clLogMessagesToStderr sends all log messages to the file descriptor stderr */
-extern void CL_API_ENTRY clLogMessagesToStderrAPPLE( const char * /* errstr */,
- const void * /* private_info */,
- size_t /* cb */,
- void * /* user_data */ ) CL_EXT_SUFFIX__VERSION_1_0;
-
-
-/************************
-* cl_khr_icd extension *
-************************/
-#define cl_khr_icd 1
-
-/* cl_platform_info */
-#define CL_PLATFORM_ICD_SUFFIX_KHR 0x0920
-
-/* Additional Error Codes */
-#define CL_PLATFORM_NOT_FOUND_KHR -1001
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clIcdGetPlatformIDsKHR(cl_uint /* num_entries */,
- cl_platform_id * /* platforms */,
- cl_uint * /* num_platforms */);
-
-typedef CL_API_ENTRY cl_int (CL_API_CALL *clIcdGetPlatformIDsKHR_fn)(
- cl_uint /* num_entries */,
- cl_platform_id * /* platforms */,
- cl_uint * /* num_platforms */);
-
-
-/* Extension: cl_khr_image2D_buffer
- *
- * This extension allows a 2D image to be created from a cl_mem buffer without a copy.
- * The type associated with a 2D image created from a buffer in an OpenCL program is image2d_t.
- * Both the sampler and sampler-less read_image built-in functions are supported for 2D images
- * and 2D images created from a buffer. Similarly, the write_image built-ins are also supported
- * for 2D images created from a buffer.
- *
- * When the 2D image from buffer is created, the client must specify the width,
- * height, image format (i.e. channel order and channel data type) and optionally the row pitch
- *
- * The pitch specified must be a multiple of CL_DEVICE_IMAGE_PITCH_ALIGNMENT pixels.
- * The base address of the buffer must be aligned to CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT pixels.
- */
-
-/*************************************
- * cl_khr_initalize_memory extension *
- *************************************/
-
-#define CL_CONTEXT_MEMORY_INITIALIZE_KHR 0x200E
-
-
-/**************************************
- * cl_khr_terminate_context extension *
- **************************************/
-
-#define CL_DEVICE_TERMINATE_CAPABILITY_KHR 0x200F
-#define CL_CONTEXT_TERMINATE_KHR 0x2010
-
-#define cl_khr_terminate_context 1
-extern CL_API_ENTRY cl_int CL_API_CALL clTerminateContextKHR(cl_context /* context */) CL_EXT_SUFFIX__VERSION_1_2;
-
-typedef CL_API_ENTRY cl_int (CL_API_CALL *clTerminateContextKHR_fn)(cl_context /* context */) CL_EXT_SUFFIX__VERSION_1_2;
-
-
-/*
- * Extension: cl_khr_spir
- *
- * This extension adds support to create an OpenCL program object from a
- * Standard Portable Intermediate Representation (SPIR) instance
- */
-
-#define CL_DEVICE_SPIR_VERSIONS 0x40E0
-#define CL_PROGRAM_BINARY_TYPE_INTERMEDIATE 0x40E1
-
-
-/******************************************
-* cl_nv_device_attribute_query extension *
-******************************************/
-/* cl_nv_device_attribute_query extension - no extension #define since it has no functions */
-#define CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV 0x4000
-#define CL_DEVICE_COMPUTE_CAPABILITY_MINOR_NV 0x4001
-#define CL_DEVICE_REGISTERS_PER_BLOCK_NV 0x4002
-#define CL_DEVICE_WARP_SIZE_NV 0x4003
-#define CL_DEVICE_GPU_OVERLAP_NV 0x4004
-#define CL_DEVICE_KERNEL_EXEC_TIMEOUT_NV 0x4005
-#define CL_DEVICE_INTEGRATED_MEMORY_NV 0x4006
-
-/*********************************
-* cl_amd_device_attribute_query *
-*********************************/
-#define CL_DEVICE_PROFILING_TIMER_OFFSET_AMD 0x4036
-
-/*********************************
-* cl_arm_printf extension
-*********************************/
-#define CL_PRINTF_CALLBACK_ARM 0x40B0
-#define CL_PRINTF_BUFFERSIZE_ARM 0x40B1
-
-#ifdef CL_VERSION_1_1
- /***********************************
- * cl_ext_device_fission extension *
- ***********************************/
- #define cl_ext_device_fission 1
-
- extern CL_API_ENTRY cl_int CL_API_CALL
- clReleaseDeviceEXT( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1;
-
- typedef CL_API_ENTRY cl_int
- (CL_API_CALL *clReleaseDeviceEXT_fn)( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1;
-
- extern CL_API_ENTRY cl_int CL_API_CALL
- clRetainDeviceEXT( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1;
-
- typedef CL_API_ENTRY cl_int
- (CL_API_CALL *clRetainDeviceEXT_fn)( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1;
-
- typedef cl_ulong cl_device_partition_property_ext;
- extern CL_API_ENTRY cl_int CL_API_CALL
- clCreateSubDevicesEXT( cl_device_id /*in_device*/,
- const cl_device_partition_property_ext * /* properties */,
- cl_uint /*num_entries*/,
- cl_device_id * /*out_devices*/,
- cl_uint * /*num_devices*/ ) CL_EXT_SUFFIX__VERSION_1_1;
-
- typedef CL_API_ENTRY cl_int
- ( CL_API_CALL * clCreateSubDevicesEXT_fn)( cl_device_id /*in_device*/,
- const cl_device_partition_property_ext * /* properties */,
- cl_uint /*num_entries*/,
- cl_device_id * /*out_devices*/,
- cl_uint * /*num_devices*/ ) CL_EXT_SUFFIX__VERSION_1_1;
-
- /* cl_device_partition_property_ext */
- #define CL_DEVICE_PARTITION_EQUALLY_EXT 0x4050
- #define CL_DEVICE_PARTITION_BY_COUNTS_EXT 0x4051
- #define CL_DEVICE_PARTITION_BY_NAMES_EXT 0x4052
- #define CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN_EXT 0x4053
-
- /* clDeviceGetInfo selectors */
- #define CL_DEVICE_PARENT_DEVICE_EXT 0x4054
- #define CL_DEVICE_PARTITION_TYPES_EXT 0x4055
- #define CL_DEVICE_AFFINITY_DOMAINS_EXT 0x4056
- #define CL_DEVICE_REFERENCE_COUNT_EXT 0x4057
- #define CL_DEVICE_PARTITION_STYLE_EXT 0x4058
-
- /* error codes */
- #define CL_DEVICE_PARTITION_FAILED_EXT -1057
- #define CL_INVALID_PARTITION_COUNT_EXT -1058
- #define CL_INVALID_PARTITION_NAME_EXT -1059
-
- /* CL_AFFINITY_DOMAINs */
- #define CL_AFFINITY_DOMAIN_L1_CACHE_EXT 0x1
- #define CL_AFFINITY_DOMAIN_L2_CACHE_EXT 0x2
- #define CL_AFFINITY_DOMAIN_L3_CACHE_EXT 0x3
- #define CL_AFFINITY_DOMAIN_L4_CACHE_EXT 0x4
- #define CL_AFFINITY_DOMAIN_NUMA_EXT 0x10
- #define CL_AFFINITY_DOMAIN_NEXT_FISSIONABLE_EXT 0x100
-
- /* cl_device_partition_property_ext list terminators */
- #define CL_PROPERTIES_LIST_END_EXT ((cl_device_partition_property_ext) 0)
- #define CL_PARTITION_BY_COUNTS_LIST_END_EXT ((cl_device_partition_property_ext) 0)
- #define CL_PARTITION_BY_NAMES_LIST_END_EXT ((cl_device_partition_property_ext) 0 - 1)
-
-/*********************************
-* cl_qcom_ext_host_ptr extension
-*********************************/
-
-#define CL_MEM_EXT_HOST_PTR_QCOM (1 << 29)
-
-#define CL_DEVICE_EXT_MEM_PADDING_IN_BYTES_QCOM 0x40A0
-#define CL_DEVICE_PAGE_SIZE_QCOM 0x40A1
-#define CL_IMAGE_ROW_ALIGNMENT_QCOM 0x40A2
-#define CL_IMAGE_SLICE_ALIGNMENT_QCOM 0x40A3
-#define CL_MEM_HOST_UNCACHED_QCOM 0x40A4
-#define CL_MEM_HOST_WRITEBACK_QCOM 0x40A5
-#define CL_MEM_HOST_WRITETHROUGH_QCOM 0x40A6
-#define CL_MEM_HOST_WRITE_COMBINING_QCOM 0x40A7
-
-typedef cl_uint cl_image_pitch_info_qcom;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clGetDeviceImageInfoQCOM(cl_device_id device,
- size_t image_width,
- size_t image_height,
- const cl_image_format *image_format,
- cl_image_pitch_info_qcom param_name,
- size_t param_value_size,
- void *param_value,
- size_t *param_value_size_ret);
-
-typedef struct _cl_mem_ext_host_ptr
-{
- /* Type of external memory allocation. */
- /* Legal values will be defined in layered extensions. */
- cl_uint allocation_type;
-
- /* Host cache policy for this external memory allocation. */
- cl_uint host_cache_policy;
-
-} cl_mem_ext_host_ptr;
-
-/*********************************
-* cl_qcom_ion_host_ptr extension
-*********************************/
-
-#define CL_MEM_ION_HOST_PTR_QCOM 0x40A8
-
-typedef struct _cl_mem_ion_host_ptr
-{
- /* Type of external memory allocation. */
- /* Must be CL_MEM_ION_HOST_PTR_QCOM for ION allocations. */
- cl_mem_ext_host_ptr ext_host_ptr;
-
- /* ION file descriptor */
- int ion_filedesc;
-
- /* Host pointer to the ION allocated memory */
- void* ion_hostptr;
-
-} cl_mem_ion_host_ptr;
-
-#endif /* CL_VERSION_1_1 */
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* __CL_EXT_H */
diff --git a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/cl_gl.h b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/cl_gl.h
deleted file mode 100644
index ad914cbd4..000000000
--- a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/cl_gl.h
+++ /dev/null
@@ -1,158 +0,0 @@
-/**********************************************************************************
- * Copyright (c) 2008 - 2012 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and/or associated documentation files (the
- * "Materials"), to deal in the Materials without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Materials, and to
- * permit persons to whom the Materials are furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Materials.
- *
- * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
- **********************************************************************************/
-
-#ifndef __OPENCL_CL_GL_H
-#define __OPENCL_CL_GL_H
-
-#include <cl.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef cl_uint cl_gl_object_type;
-typedef cl_uint cl_gl_texture_info;
-typedef cl_uint cl_gl_platform_info;
-typedef struct __GLsync *cl_GLsync;
-
-/* cl_gl_object_type = 0x2000 - 0x200F enum values are currently taken */
-#define CL_GL_OBJECT_BUFFER 0x2000
-#define CL_GL_OBJECT_TEXTURE2D 0x2001
-#define CL_GL_OBJECT_TEXTURE3D 0x2002
-#define CL_GL_OBJECT_RENDERBUFFER 0x2003
-#define CL_GL_OBJECT_TEXTURE2D_ARRAY 0x200E
-#define CL_GL_OBJECT_TEXTURE1D 0x200F
-#define CL_GL_OBJECT_TEXTURE1D_ARRAY 0x2010
-#define CL_GL_OBJECT_TEXTURE_BUFFER 0x2011
-
-/* cl_gl_texture_info */
-#define CL_GL_TEXTURE_TARGET 0x2004
-#define CL_GL_MIPMAP_LEVEL 0x2005
-#define CL_GL_NUM_SAMPLES 0x2012
-
-
-extern CL_API_ENTRY cl_mem CL_API_CALL
-clCreateFromGLBuffer(cl_context /* context */,
- cl_mem_flags /* flags */,
- cl_GLuint /* bufobj */,
- int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_mem CL_API_CALL
-clCreateFromGLTexture(cl_context /* context */,
- cl_mem_flags /* flags */,
- cl_GLenum /* target */,
- cl_GLint /* miplevel */,
- cl_GLuint /* texture */,
- cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_2;
-
-extern CL_API_ENTRY cl_mem CL_API_CALL
-clCreateFromGLRenderbuffer(cl_context /* context */,
- cl_mem_flags /* flags */,
- cl_GLuint /* renderbuffer */,
- cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clGetGLObjectInfo(cl_mem /* memobj */,
- cl_gl_object_type * /* gl_object_type */,
- cl_GLuint * /* gl_object_name */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clGetGLTextureInfo(cl_mem /* memobj */,
- cl_gl_texture_info /* param_name */,
- size_t /* param_value_size */,
- void * /* param_value */,
- size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clEnqueueAcquireGLObjects(cl_command_queue /* command_queue */,
- cl_uint /* num_objects */,
- const cl_mem * /* mem_objects */,
- cl_uint /* num_events_in_wait_list */,
- const cl_event * /* event_wait_list */,
- cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clEnqueueReleaseGLObjects(cl_command_queue /* command_queue */,
- cl_uint /* num_objects */,
- const cl_mem * /* mem_objects */,
- cl_uint /* num_events_in_wait_list */,
- const cl_event * /* event_wait_list */,
- cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
-
-
-/* Deprecated OpenCL 1.1 APIs */
-extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
-clCreateFromGLTexture2D(cl_context /* context */,
- cl_mem_flags /* flags */,
- cl_GLenum /* target */,
- cl_GLint /* miplevel */,
- cl_GLuint /* texture */,
- cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
-
-extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
-clCreateFromGLTexture3D(cl_context /* context */,
- cl_mem_flags /* flags */,
- cl_GLenum /* target */,
- cl_GLint /* miplevel */,
- cl_GLuint /* texture */,
- cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
-
-/* cl_khr_gl_sharing extension */
-
-#define cl_khr_gl_sharing 1
-
-typedef cl_uint cl_gl_context_info;
-
-/* Additional Error Codes */
-#define CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR -1000
-
-/* cl_gl_context_info */
-#define CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR 0x2006
-#define CL_DEVICES_FOR_GL_CONTEXT_KHR 0x2007
-
-/* Additional cl_context_properties */
-#define CL_GL_CONTEXT_KHR 0x2008
-#define CL_EGL_DISPLAY_KHR 0x2009
-#define CL_GLX_DISPLAY_KHR 0x200A
-#define CL_WGL_HDC_KHR 0x200B
-#define CL_CGL_SHAREGROUP_KHR 0x200C
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clGetGLContextInfoKHR(const cl_context_properties * /* properties */,
- cl_gl_context_info /* param_name */,
- size_t /* param_value_size */,
- void * /* param_value */,
- size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
-
-typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetGLContextInfoKHR_fn)(
- const cl_context_properties * properties,
- cl_gl_context_info param_name,
- size_t param_value_size,
- void * param_value,
- size_t * param_value_size_ret);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __OPENCL_CL_GL_H */
diff --git a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/cl_gl_ext.h b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/cl_gl_ext.h
deleted file mode 100644
index 0c10fedfa..000000000
--- a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/cl_gl_ext.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/**********************************************************************************
- * Copyright (c) 2008-2012 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and/or associated documentation files (the
- * "Materials"), to deal in the Materials without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Materials, and to
- * permit persons to whom the Materials are furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Materials.
- *
- * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
- **********************************************************************************/
-
-/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */
-
-/* cl_gl_ext.h contains vendor (non-KHR) OpenCL extensions which have */
-/* OpenGL dependencies. */
-
-#ifndef __OPENCL_CL_GL_EXT_H
-#define __OPENCL_CL_GL_EXT_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <cl_gl.h>
-
-/*
- * For each extension, follow this template
- * cl_VEN_extname extension */
-/* #define cl_VEN_extname 1
- * ... define new types, if any
- * ... define new tokens, if any
- * ... define new APIs, if any
- *
- * If you need GLtypes here, mirror them with a cl_GLtype, rather than including a GL header
- * This allows us to avoid having to decide whether to include GL headers or GLES here.
- */
-
-/*
- * cl_khr_gl_event extension
- * See section 9.9 in the OpenCL 1.1 spec for more information
- */
-#define CL_COMMAND_GL_FENCE_SYNC_OBJECT_KHR 0x200D
-
-extern CL_API_ENTRY cl_event CL_API_CALL
-clCreateEventFromGLsyncKHR(cl_context /* context */,
- cl_GLsync /* cl_GLsync */,
- cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __OPENCL_CL_GL_EXT_H */
diff --git a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/cl_platform.h b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/cl_platform.h
deleted file mode 100644
index 7f6f5e8a7..000000000
--- a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/cl_platform.h
+++ /dev/null
@@ -1,1278 +0,0 @@
-/**********************************************************************************
- * Copyright (c) 2008-2012 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and/or associated documentation files (the
- * "Materials"), to deal in the Materials without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Materials, and to
- * permit persons to whom the Materials are furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Materials.
- *
- * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
- **********************************************************************************/
-
-/* $Revision: 11803 $ on $Date: 2010-06-25 10:02:12 -0700 (Fri, 25 Jun 2010) $ */
-
-#ifndef __CL_PLATFORM_H
-#define __CL_PLATFORM_H
-
-#ifdef __APPLE__
- /* Contains #defines for AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER below */
- #include <AvailabilityMacros.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if defined(_WIN32)
- #define CL_API_ENTRY
- #define CL_API_CALL __stdcall
- #define CL_CALLBACK __stdcall
-#else
- #define CL_API_ENTRY
- #define CL_API_CALL
- #define CL_CALLBACK
-#endif
-
-#ifdef __APPLE__
- #define CL_EXTENSION_WEAK_LINK __attribute__((weak_import))
- #define CL_API_SUFFIX__VERSION_1_0 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
- #define CL_EXT_SUFFIX__VERSION_1_0 CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
- #define CL_API_SUFFIX__VERSION_1_1 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
- #define GCL_API_SUFFIX__VERSION_1_1 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
- #define CL_EXT_SUFFIX__VERSION_1_1 CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
- #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7
-
- #ifdef AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER
- #define CL_API_SUFFIX__VERSION_1_2 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER
- #define GCL_API_SUFFIX__VERSION_1_2 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER
- #define CL_EXT_SUFFIX__VERSION_1_2 CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER
- #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED
- #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8
- #else
- #warning This path should never happen outside of internal operating system development. AvailabilityMacros do not function correctly here!
- #define CL_API_SUFFIX__VERSION_1_2 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
- #define GCL_API_SUFFIX__VERSION_1_2 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
- #define CL_EXT_SUFFIX__VERSION_1_2 CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
- #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
- #endif
-#else
- #define CL_EXTENSION_WEAK_LINK
- #define CL_API_SUFFIX__VERSION_1_0
- #define CL_EXT_SUFFIX__VERSION_1_0
- #define CL_API_SUFFIX__VERSION_1_1
- #define CL_EXT_SUFFIX__VERSION_1_1
- #define CL_API_SUFFIX__VERSION_1_2
- #define CL_EXT_SUFFIX__VERSION_1_2
-
- #ifdef __GNUC__
- #ifdef CL_USE_DEPRECATED_OPENCL_1_0_APIS
- #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED
- #define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED
- #else
- #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED __attribute__((deprecated))
- #define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED
- #endif
-
- #ifdef CL_USE_DEPRECATED_OPENCL_1_1_APIS
- #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
- #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED
- #else
- #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED __attribute__((deprecated))
- #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED
- #endif
- #elif _WIN32
- #ifdef CL_USE_DEPRECATED_OPENCL_1_0_APIS
- #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED
- #define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED
- #else
- #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED
- #define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED __declspec(deprecated)
- #endif
-
- #ifdef CL_USE_DEPRECATED_OPENCL_1_1_APIS
- #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
- #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED
- #else
- #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
- #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED __declspec(deprecated)
- #endif
- #else
- #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED
- #define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED
-
- #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
- #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED
- #endif
-#endif
-
-#if (defined (_WIN32) && defined(_MSC_VER))
-
-/* scalar types */
-typedef signed __int8 cl_char;
-typedef unsigned __int8 cl_uchar;
-typedef signed __int16 cl_short;
-typedef unsigned __int16 cl_ushort;
-typedef signed __int32 cl_int;
-typedef unsigned __int32 cl_uint;
-typedef signed __int64 cl_long;
-typedef unsigned __int64 cl_ulong;
-
-typedef unsigned __int16 cl_half;
-typedef float cl_float;
-typedef double cl_double;
-
-/* Macro names and corresponding values defined by OpenCL */
-#define CL_CHAR_BIT 8
-#define CL_SCHAR_MAX 127
-#define CL_SCHAR_MIN (-127-1)
-#define CL_CHAR_MAX CL_SCHAR_MAX
-#define CL_CHAR_MIN CL_SCHAR_MIN
-#define CL_UCHAR_MAX 255
-#define CL_SHRT_MAX 32767
-#define CL_SHRT_MIN (-32767-1)
-#define CL_USHRT_MAX 65535
-#define CL_INT_MAX 2147483647
-#define CL_INT_MIN (-2147483647-1)
-#define CL_UINT_MAX 0xffffffffU
-#define CL_LONG_MAX ((cl_long) 0x7FFFFFFFFFFFFFFFLL)
-#define CL_LONG_MIN ((cl_long) -0x7FFFFFFFFFFFFFFFLL - 1LL)
-#define CL_ULONG_MAX ((cl_ulong) 0xFFFFFFFFFFFFFFFFULL)
-
-#define CL_FLT_DIG 6
-#define CL_FLT_MANT_DIG 24
-#define CL_FLT_MAX_10_EXP +38
-#define CL_FLT_MAX_EXP +128
-#define CL_FLT_MIN_10_EXP -37
-#define CL_FLT_MIN_EXP -125
-#define CL_FLT_RADIX 2
-#define CL_FLT_MAX 340282346638528859811704183484516925440.0f
-#define CL_FLT_MIN 1.175494350822287507969e-38f
-#define CL_FLT_EPSILON 0x1.0p-23f
-
-#define CL_DBL_DIG 15
-#define CL_DBL_MANT_DIG 53
-#define CL_DBL_MAX_10_EXP +308
-#define CL_DBL_MAX_EXP +1024
-#define CL_DBL_MIN_10_EXP -307
-#define CL_DBL_MIN_EXP -1021
-#define CL_DBL_RADIX 2
-#define CL_DBL_MAX 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0
-#define CL_DBL_MIN 2.225073858507201383090e-308
-#define CL_DBL_EPSILON 2.220446049250313080847e-16
-
-#define CL_M_E 2.718281828459045090796
-#define CL_M_LOG2E 1.442695040888963387005
-#define CL_M_LOG10E 0.434294481903251816668
-#define CL_M_LN2 0.693147180559945286227
-#define CL_M_LN10 2.302585092994045901094
-#define CL_M_PI 3.141592653589793115998
-#define CL_M_PI_2 1.570796326794896557999
-#define CL_M_PI_4 0.785398163397448278999
-#define CL_M_1_PI 0.318309886183790691216
-#define CL_M_2_PI 0.636619772367581382433
-#define CL_M_2_SQRTPI 1.128379167095512558561
-#define CL_M_SQRT2 1.414213562373095145475
-#define CL_M_SQRT1_2 0.707106781186547572737
-
-#define CL_M_E_F 2.71828174591064f
-#define CL_M_LOG2E_F 1.44269502162933f
-#define CL_M_LOG10E_F 0.43429449200630f
-#define CL_M_LN2_F 0.69314718246460f
-#define CL_M_LN10_F 2.30258512496948f
-#define CL_M_PI_F 3.14159274101257f
-#define CL_M_PI_2_F 1.57079637050629f
-#define CL_M_PI_4_F 0.78539818525314f
-#define CL_M_1_PI_F 0.31830987334251f
-#define CL_M_2_PI_F 0.63661974668503f
-#define CL_M_2_SQRTPI_F 1.12837922573090f
-#define CL_M_SQRT2_F 1.41421353816986f
-#define CL_M_SQRT1_2_F 0.70710676908493f
-
-#define CL_NAN (CL_INFINITY - CL_INFINITY)
-#define CL_HUGE_VALF ((cl_float) 1e50)
-#define CL_HUGE_VAL ((cl_double) 1e500)
-#define CL_MAXFLOAT CL_FLT_MAX
-#define CL_INFINITY CL_HUGE_VALF
-
-#else
-
-#include <stdint.h>
-
-/* scalar types */
-typedef int8_t cl_char;
-typedef uint8_t cl_uchar;
-typedef int16_t cl_short __attribute__((aligned(2)));
-typedef uint16_t cl_ushort __attribute__((aligned(2)));
-typedef int32_t cl_int __attribute__((aligned(4)));
-typedef uint32_t cl_uint __attribute__((aligned(4)));
-typedef int64_t cl_long __attribute__((aligned(8)));
-typedef uint64_t cl_ulong __attribute__((aligned(8)));
-
-typedef uint16_t cl_half __attribute__((aligned(2)));
-typedef float cl_float __attribute__((aligned(4)));
-typedef double cl_double __attribute__((aligned(8)));
-
-/* Macro names and corresponding values defined by OpenCL */
-#define CL_CHAR_BIT 8
-#define CL_SCHAR_MAX 127
-#define CL_SCHAR_MIN (-127-1)
-#define CL_CHAR_MAX CL_SCHAR_MAX
-#define CL_CHAR_MIN CL_SCHAR_MIN
-#define CL_UCHAR_MAX 255
-#define CL_SHRT_MAX 32767
-#define CL_SHRT_MIN (-32767-1)
-#define CL_USHRT_MAX 65535
-#define CL_INT_MAX 2147483647
-#define CL_INT_MIN (-2147483647-1)
-#define CL_UINT_MAX 0xffffffffU
-#define CL_LONG_MAX ((cl_long) 0x7FFFFFFFFFFFFFFFLL)
-#define CL_LONG_MIN ((cl_long) -0x7FFFFFFFFFFFFFFFLL - 1LL)
-#define CL_ULONG_MAX ((cl_ulong) 0xFFFFFFFFFFFFFFFFULL)
-
-#define CL_FLT_DIG 6
-#define CL_FLT_MANT_DIG 24
-#define CL_FLT_MAX_10_EXP +38
-#define CL_FLT_MAX_EXP +128
-#define CL_FLT_MIN_10_EXP -37
-#define CL_FLT_MIN_EXP -125
-#define CL_FLT_RADIX 2
-#define CL_FLT_MAX 0x1.fffffep127f
-#define CL_FLT_MIN 0x1.0p-126f
-#define CL_FLT_EPSILON 0x1.0p-23f
-
-#define CL_DBL_DIG 15
-#define CL_DBL_MANT_DIG 53
-#define CL_DBL_MAX_10_EXP +308
-#define CL_DBL_MAX_EXP +1024
-#define CL_DBL_MIN_10_EXP -307
-#define CL_DBL_MIN_EXP -1021
-#define CL_DBL_RADIX 2
-#define CL_DBL_MAX 0x1.fffffffffffffp1023
-#define CL_DBL_MIN 0x1.0p-1022
-#define CL_DBL_EPSILON 0x1.0p-52
-
-#define CL_M_E 2.718281828459045090796
-#define CL_M_LOG2E 1.442695040888963387005
-#define CL_M_LOG10E 0.434294481903251816668
-#define CL_M_LN2 0.693147180559945286227
-#define CL_M_LN10 2.302585092994045901094
-#define CL_M_PI 3.141592653589793115998
-#define CL_M_PI_2 1.570796326794896557999
-#define CL_M_PI_4 0.785398163397448278999
-#define CL_M_1_PI 0.318309886183790691216
-#define CL_M_2_PI 0.636619772367581382433
-#define CL_M_2_SQRTPI 1.128379167095512558561
-#define CL_M_SQRT2 1.414213562373095145475
-#define CL_M_SQRT1_2 0.707106781186547572737
-
-#define CL_M_E_F 2.71828174591064f
-#define CL_M_LOG2E_F 1.44269502162933f
-#define CL_M_LOG10E_F 0.43429449200630f
-#define CL_M_LN2_F 0.69314718246460f
-#define CL_M_LN10_F 2.30258512496948f
-#define CL_M_PI_F 3.14159274101257f
-#define CL_M_PI_2_F 1.57079637050629f
-#define CL_M_PI_4_F 0.78539818525314f
-#define CL_M_1_PI_F 0.31830987334251f
-#define CL_M_2_PI_F 0.63661974668503f
-#define CL_M_2_SQRTPI_F 1.12837922573090f
-#define CL_M_SQRT2_F 1.41421353816986f
-#define CL_M_SQRT1_2_F 0.70710676908493f
-
-#if defined( __GNUC__ )
- #define CL_HUGE_VALF __builtin_huge_valf()
- #define CL_HUGE_VAL __builtin_huge_val()
- #define CL_NAN __builtin_nanf( "" )
-#else
- #define CL_HUGE_VALF ((cl_float) 1e50)
- #define CL_HUGE_VAL ((cl_double) 1e500)
- float nanf( const char * );
- #define CL_NAN nanf( "" )
-#endif
-#define CL_MAXFLOAT CL_FLT_MAX
-#define CL_INFINITY CL_HUGE_VALF
-
-#endif
-
-#include <stddef.h>
-
-/* Mirror types to GL types. Mirror types allow us to avoid deciding which 87s to load based on whether we are using GL or GLES here. */
-typedef unsigned int cl_GLuint;
-typedef int cl_GLint;
-typedef unsigned int cl_GLenum;
-
-/*
- * Vector types
- *
- * Note: OpenCL requires that all types be naturally aligned.
- * This means that vector types must be naturally aligned.
- * For example, a vector of four floats must be aligned to
- * a 16 byte boundary (calculated as 4 * the natural 4-byte
- * alignment of the float). The alignment qualifiers here
- * will only function properly if your compiler supports them
- * and if you don't actively work to defeat them. For example,
- * in order for a cl_float4 to be 16 byte aligned in a struct,
- * the start of the struct must itself be 16-byte aligned.
- *
- * Maintaining proper alignment is the user's responsibility.
- */
-
-/* Define basic vector types */
-#if defined( __VEC__ )
- #include <altivec.h> /* may be omitted depending on compiler. AltiVec spec provides no way to detect whether the header is required. */
- typedef vector unsigned char __cl_uchar16;
- typedef vector signed char __cl_char16;
- typedef vector unsigned short __cl_ushort8;
- typedef vector signed short __cl_short8;
- typedef vector unsigned int __cl_uint4;
- typedef vector signed int __cl_int4;
- typedef vector float __cl_float4;
- #define __CL_UCHAR16__ 1
- #define __CL_CHAR16__ 1
- #define __CL_USHORT8__ 1
- #define __CL_SHORT8__ 1
- #define __CL_UINT4__ 1
- #define __CL_INT4__ 1
- #define __CL_FLOAT4__ 1
-#endif
-
-#if defined( __SSE__ )
- #if defined( __MINGW64__ )
- #include <intrin.h>
- #else
- #include <xmmintrin.h>
- #endif
- #if defined( __GNUC__ )
- typedef float __cl_float4 __attribute__((vector_size(16)));
- #else
- typedef __m128 __cl_float4;
- #endif
- #define __CL_FLOAT4__ 1
-#endif
-
-#if defined( __SSE2__ )
- #if defined( __MINGW64__ )
- #include <intrin.h>
- #else
- #include <emmintrin.h>
- #endif
- #if defined( __GNUC__ )
- typedef cl_uchar __cl_uchar16 __attribute__((vector_size(16)));
- typedef cl_char __cl_char16 __attribute__((vector_size(16)));
- typedef cl_ushort __cl_ushort8 __attribute__((vector_size(16)));
- typedef cl_short __cl_short8 __attribute__((vector_size(16)));
- typedef cl_uint __cl_uint4 __attribute__((vector_size(16)));
- typedef cl_int __cl_int4 __attribute__((vector_size(16)));
- typedef cl_ulong __cl_ulong2 __attribute__((vector_size(16)));
- typedef cl_long __cl_long2 __attribute__((vector_size(16)));
- typedef cl_double __cl_double2 __attribute__((vector_size(16)));
- #else
- typedef __m128i __cl_uchar16;
- typedef __m128i __cl_char16;
- typedef __m128i __cl_ushort8;
- typedef __m128i __cl_short8;
- typedef __m128i __cl_uint4;
- typedef __m128i __cl_int4;
- typedef __m128i __cl_ulong2;
- typedef __m128i __cl_long2;
- typedef __m128d __cl_double2;
- #endif
- #define __CL_UCHAR16__ 1
- #define __CL_CHAR16__ 1
- #define __CL_USHORT8__ 1
- #define __CL_SHORT8__ 1
- #define __CL_INT4__ 1
- #define __CL_UINT4__ 1
- #define __CL_ULONG2__ 1
- #define __CL_LONG2__ 1
- #define __CL_DOUBLE2__ 1
-#endif
-
-#if defined( __MMX__ )
- #include <mmintrin.h>
- #if defined( __GNUC__ )
- typedef cl_uchar __cl_uchar8 __attribute__((vector_size(8)));
- typedef cl_char __cl_char8 __attribute__((vector_size(8)));
- typedef cl_ushort __cl_ushort4 __attribute__((vector_size(8)));
- typedef cl_short __cl_short4 __attribute__((vector_size(8)));
- typedef cl_uint __cl_uint2 __attribute__((vector_size(8)));
- typedef cl_int __cl_int2 __attribute__((vector_size(8)));
- typedef cl_ulong __cl_ulong1 __attribute__((vector_size(8)));
- typedef cl_long __cl_long1 __attribute__((vector_size(8)));
- typedef cl_float __cl_float2 __attribute__((vector_size(8)));
- #else
- typedef __m64 __cl_uchar8;
- typedef __m64 __cl_char8;
- typedef __m64 __cl_ushort4;
- typedef __m64 __cl_short4;
- typedef __m64 __cl_uint2;
- typedef __m64 __cl_int2;
- typedef __m64 __cl_ulong1;
- typedef __m64 __cl_long1;
- typedef __m64 __cl_float2;
- #endif
- #define __CL_UCHAR8__ 1
- #define __CL_CHAR8__ 1
- #define __CL_USHORT4__ 1
- #define __CL_SHORT4__ 1
- #define __CL_INT2__ 1
- #define __CL_UINT2__ 1
- #define __CL_ULONG1__ 1
- #define __CL_LONG1__ 1
- #define __CL_FLOAT2__ 1
-#endif
-
-#if defined( __AVX__ )
- #if defined( __MINGW64__ )
- #include <intrin.h>
- #else
- #include <immintrin.h>
- #endif
- #if defined( __GNUC__ )
- typedef cl_float __cl_float8 __attribute__((vector_size(32)));
- typedef cl_double __cl_double4 __attribute__((vector_size(32)));
- #else
- typedef __m256 __cl_float8;
- typedef __m256d __cl_double4;
- #endif
- #define __CL_FLOAT8__ 1
- #define __CL_DOUBLE4__ 1
-#endif
-
-/* Define capabilities for anonymous struct members. */
-#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
-#define __CL_HAS_ANON_STRUCT__ 1
-#define __CL_ANON_STRUCT__ __extension__
-#elif defined( _WIN32) && (_MSC_VER >= 1500)
- /* Microsoft Developer Studio 2008 supports anonymous structs, but
- * complains by default. */
-#define __CL_HAS_ANON_STRUCT__ 1
-#define __CL_ANON_STRUCT__
- /* Disable warning C4201: nonstandard extension used : nameless
- * struct/union */
-#pragma warning( push )
-#pragma warning( disable : 4201 )
-#else
-#define __CL_HAS_ANON_STRUCT__ 0
-#define __CL_ANON_STRUCT__
-#endif
-
-/* Define alignment keys */
-#if defined( __GNUC__ )
- #define CL_ALIGNED(_x) __attribute__ ((aligned(_x)))
-#elif defined( _WIN32) && (_MSC_VER)
- /* Alignment keys neutered on windows because MSVC can't swallow function arguments with alignment requirements */
- /* http://msdn.microsoft.com/en-us/library/373ak2y1%28VS.71%29.aspx */
- /* #include <crtdefs.h> */
- /* #define CL_ALIGNED(_x) _CRT_ALIGN(_x) */
- #define CL_ALIGNED(_x)
-#else
- #warning Need to implement some method to align data here
- #define CL_ALIGNED(_x)
-#endif
-
-/* Indicate whether .xyzw, .s0123 and .hi.lo are supported */
-#if __CL_HAS_ANON_STRUCT__
- /* .xyzw and .s0123...{f|F} are supported */
- #define CL_HAS_NAMED_VECTOR_FIELDS 1
- /* .hi and .lo are supported */
- #define CL_HAS_HI_LO_VECTOR_FIELDS 1
-#endif
-
-/* Define cl_vector types */
-
-/* ---- cl_charn ---- */
-typedef union
-{
- cl_char CL_ALIGNED(2) s[2];
-#if __CL_HAS_ANON_STRUCT__
- __CL_ANON_STRUCT__ struct{ cl_char x, y; };
- __CL_ANON_STRUCT__ struct{ cl_char s0, s1; };
- __CL_ANON_STRUCT__ struct{ cl_char lo, hi; };
-#endif
-#if defined( __CL_CHAR2__)
- __cl_char2 v2;
-#endif
-}cl_char2;
-
-typedef union
-{
- cl_char CL_ALIGNED(4) s[4];
-#if __CL_HAS_ANON_STRUCT__
- __CL_ANON_STRUCT__ struct{ cl_char x, y, z, w; };
- __CL_ANON_STRUCT__ struct{ cl_char s0, s1, s2, s3; };
- __CL_ANON_STRUCT__ struct{ cl_char2 lo, hi; };
-#endif
-#if defined( __CL_CHAR2__)
- __cl_char2 v2[2];
-#endif
-#if defined( __CL_CHAR4__)
- __cl_char4 v4;
-#endif
-}cl_char4;
-
-/* cl_char3 is identical in size, alignment and behavior to cl_char4. See section 6.1.5. */
-typedef cl_char4 cl_char3;
-
-typedef union
-{
- cl_char CL_ALIGNED(8) s[8];
-#if __CL_HAS_ANON_STRUCT__
- __CL_ANON_STRUCT__ struct{ cl_char x, y, z, w; };
- __CL_ANON_STRUCT__ struct{ cl_char s0, s1, s2, s3, s4, s5, s6, s7; };
- __CL_ANON_STRUCT__ struct{ cl_char4 lo, hi; };
-#endif
-#if defined( __CL_CHAR2__)
- __cl_char2 v2[4];
-#endif
-#if defined( __CL_CHAR4__)
- __cl_char4 v4[2];
-#endif
-#if defined( __CL_CHAR8__ )
- __cl_char8 v8;
-#endif
-}cl_char8;
-
-typedef union
-{
- cl_char CL_ALIGNED(16) s[16];
-#if __CL_HAS_ANON_STRUCT__
- __CL_ANON_STRUCT__ struct{ cl_char x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
- __CL_ANON_STRUCT__ struct{ cl_char s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
- __CL_ANON_STRUCT__ struct{ cl_char8 lo, hi; };
-#endif
-#if defined( __CL_CHAR2__)
- __cl_char2 v2[8];
-#endif
-#if defined( __CL_CHAR4__)
- __cl_char4 v4[4];
-#endif
-#if defined( __CL_CHAR8__ )
- __cl_char8 v8[2];
-#endif
-#if defined( __CL_CHAR16__ )
- __cl_char16 v16;
-#endif
-}cl_char16;
-
-
-/* ---- cl_ucharn ---- */
-typedef union
-{
- cl_uchar CL_ALIGNED(2) s[2];
-#if __CL_HAS_ANON_STRUCT__
- __CL_ANON_STRUCT__ struct{ cl_uchar x, y; };
- __CL_ANON_STRUCT__ struct{ cl_uchar s0, s1; };
- __CL_ANON_STRUCT__ struct{ cl_uchar lo, hi; };
-#endif
-#if defined( __cl_uchar2__)
- __cl_uchar2 v2;
-#endif
-}cl_uchar2;
-
-typedef union
-{
- cl_uchar CL_ALIGNED(4) s[4];
-#if __CL_HAS_ANON_STRUCT__
- __CL_ANON_STRUCT__ struct{ cl_uchar x, y, z, w; };
- __CL_ANON_STRUCT__ struct{ cl_uchar s0, s1, s2, s3; };
- __CL_ANON_STRUCT__ struct{ cl_uchar2 lo, hi; };
-#endif
-#if defined( __CL_UCHAR2__)
- __cl_uchar2 v2[2];
-#endif
-#if defined( __CL_UCHAR4__)
- __cl_uchar4 v4;
-#endif
-}cl_uchar4;
-
-/* cl_uchar3 is identical in size, alignment and behavior to cl_uchar4. See section 6.1.5. */
-typedef cl_uchar4 cl_uchar3;
-
-typedef union
-{
- cl_uchar CL_ALIGNED(8) s[8];
-#if __CL_HAS_ANON_STRUCT__
- __CL_ANON_STRUCT__ struct{ cl_uchar x, y, z, w; };
- __CL_ANON_STRUCT__ struct{ cl_uchar s0, s1, s2, s3, s4, s5, s6, s7; };
- __CL_ANON_STRUCT__ struct{ cl_uchar4 lo, hi; };
-#endif
-#if defined( __CL_UCHAR2__)
- __cl_uchar2 v2[4];
-#endif
-#if defined( __CL_UCHAR4__)
- __cl_uchar4 v4[2];
-#endif
-#if defined( __CL_UCHAR8__ )
- __cl_uchar8 v8;
-#endif
-}cl_uchar8;
-
-typedef union
-{
- cl_uchar CL_ALIGNED(16) s[16];
-#if __CL_HAS_ANON_STRUCT__
- __CL_ANON_STRUCT__ struct{ cl_uchar x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
- __CL_ANON_STRUCT__ struct{ cl_uchar s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
- __CL_ANON_STRUCT__ struct{ cl_uchar8 lo, hi; };
-#endif
-#if defined( __CL_UCHAR2__)
- __cl_uchar2 v2[8];
-#endif
-#if defined( __CL_UCHAR4__)
- __cl_uchar4 v4[4];
-#endif
-#if defined( __CL_UCHAR8__ )
- __cl_uchar8 v8[2];
-#endif
-#if defined( __CL_UCHAR16__ )
- __cl_uchar16 v16;
-#endif
-}cl_uchar16;
-
-
-/* ---- cl_shortn ---- */
-typedef union
-{
- cl_short CL_ALIGNED(4) s[2];
-#if __CL_HAS_ANON_STRUCT__
- __CL_ANON_STRUCT__ struct{ cl_short x, y; };
- __CL_ANON_STRUCT__ struct{ cl_short s0, s1; };
- __CL_ANON_STRUCT__ struct{ cl_short lo, hi; };
-#endif
-#if defined( __CL_SHORT2__)
- __cl_short2 v2;
-#endif
-}cl_short2;
-
-typedef union
-{
- cl_short CL_ALIGNED(8) s[4];
-#if __CL_HAS_ANON_STRUCT__
- __CL_ANON_STRUCT__ struct{ cl_short x, y, z, w; };
- __CL_ANON_STRUCT__ struct{ cl_short s0, s1, s2, s3; };
- __CL_ANON_STRUCT__ struct{ cl_short2 lo, hi; };
-#endif
-#if defined( __CL_SHORT2__)
- __cl_short2 v2[2];
-#endif
-#if defined( __CL_SHORT4__)
- __cl_short4 v4;
-#endif
-}cl_short4;
-
-/* cl_short3 is identical in size, alignment and behavior to cl_short4. See section 6.1.5. */
-typedef cl_short4 cl_short3;
-
-typedef union
-{
- cl_short CL_ALIGNED(16) s[8];
-#if __CL_HAS_ANON_STRUCT__
- __CL_ANON_STRUCT__ struct{ cl_short x, y, z, w; };
- __CL_ANON_STRUCT__ struct{ cl_short s0, s1, s2, s3, s4, s5, s6, s7; };
- __CL_ANON_STRUCT__ struct{ cl_short4 lo, hi; };
-#endif
-#if defined( __CL_SHORT2__)
- __cl_short2 v2[4];
-#endif
-#if defined( __CL_SHORT4__)
- __cl_short4 v4[2];
-#endif
-#if defined( __CL_SHORT8__ )
- __cl_short8 v8;
-#endif
-}cl_short8;
-
-typedef union
-{
- cl_short CL_ALIGNED(32) s[16];
-#if __CL_HAS_ANON_STRUCT__
- __CL_ANON_STRUCT__ struct{ cl_short x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
- __CL_ANON_STRUCT__ struct{ cl_short s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
- __CL_ANON_STRUCT__ struct{ cl_short8 lo, hi; };
-#endif
-#if defined( __CL_SHORT2__)
- __cl_short2 v2[8];
-#endif
-#if defined( __CL_SHORT4__)
- __cl_short4 v4[4];
-#endif
-#if defined( __CL_SHORT8__ )
- __cl_short8 v8[2];
-#endif
-#if defined( __CL_SHORT16__ )
- __cl_short16 v16;
-#endif
-}cl_short16;
-
-
-/* ---- cl_ushortn ---- */
-typedef union
-{
- cl_ushort CL_ALIGNED(4) s[2];
-#if __CL_HAS_ANON_STRUCT__
- __CL_ANON_STRUCT__ struct{ cl_ushort x, y; };
- __CL_ANON_STRUCT__ struct{ cl_ushort s0, s1; };
- __CL_ANON_STRUCT__ struct{ cl_ushort lo, hi; };
-#endif
-#if defined( __CL_USHORT2__)
- __cl_ushort2 v2;
-#endif
-}cl_ushort2;
-
-typedef union
-{
- cl_ushort CL_ALIGNED(8) s[4];
-#if __CL_HAS_ANON_STRUCT__
- __CL_ANON_STRUCT__ struct{ cl_ushort x, y, z, w; };
- __CL_ANON_STRUCT__ struct{ cl_ushort s0, s1, s2, s3; };
- __CL_ANON_STRUCT__ struct{ cl_ushort2 lo, hi; };
-#endif
-#if defined( __CL_USHORT2__)
- __cl_ushort2 v2[2];
-#endif
-#if defined( __CL_USHORT4__)
- __cl_ushort4 v4;
-#endif
-}cl_ushort4;
-
-/* cl_ushort3 is identical in size, alignment and behavior to cl_ushort4. See section 6.1.5. */
-typedef cl_ushort4 cl_ushort3;
-
-typedef union
-{
- cl_ushort CL_ALIGNED(16) s[8];
-#if __CL_HAS_ANON_STRUCT__
- __CL_ANON_STRUCT__ struct{ cl_ushort x, y, z, w; };
- __CL_ANON_STRUCT__ struct{ cl_ushort s0, s1, s2, s3, s4, s5, s6, s7; };
- __CL_ANON_STRUCT__ struct{ cl_ushort4 lo, hi; };
-#endif
-#if defined( __CL_USHORT2__)
- __cl_ushort2 v2[4];
-#endif
-#if defined( __CL_USHORT4__)
- __cl_ushort4 v4[2];
-#endif
-#if defined( __CL_USHORT8__ )
- __cl_ushort8 v8;
-#endif
-}cl_ushort8;
-
-typedef union
-{
- cl_ushort CL_ALIGNED(32) s[16];
-#if __CL_HAS_ANON_STRUCT__
- __CL_ANON_STRUCT__ struct{ cl_ushort x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
- __CL_ANON_STRUCT__ struct{ cl_ushort s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
- __CL_ANON_STRUCT__ struct{ cl_ushort8 lo, hi; };
-#endif
-#if defined( __CL_USHORT2__)
- __cl_ushort2 v2[8];
-#endif
-#if defined( __CL_USHORT4__)
- __cl_ushort4 v4[4];
-#endif
-#if defined( __CL_USHORT8__ )
- __cl_ushort8 v8[2];
-#endif
-#if defined( __CL_USHORT16__ )
- __cl_ushort16 v16;
-#endif
-}cl_ushort16;
-
-/* ---- cl_intn ---- */
-typedef union
-{
- cl_int CL_ALIGNED(8) s[2];
-#if __CL_HAS_ANON_STRUCT__
- __CL_ANON_STRUCT__ struct{ cl_int x, y; };
- __CL_ANON_STRUCT__ struct{ cl_int s0, s1; };
- __CL_ANON_STRUCT__ struct{ cl_int lo, hi; };
-#endif
-#if defined( __CL_INT2__)
- __cl_int2 v2;
-#endif
-}cl_int2;
-
-typedef union
-{
- cl_int CL_ALIGNED(16) s[4];
-#if __CL_HAS_ANON_STRUCT__
- __CL_ANON_STRUCT__ struct{ cl_int x, y, z, w; };
- __CL_ANON_STRUCT__ struct{ cl_int s0, s1, s2, s3; };
- __CL_ANON_STRUCT__ struct{ cl_int2 lo, hi; };
-#endif
-#if defined( __CL_INT2__)
- __cl_int2 v2[2];
-#endif
-#if defined( __CL_INT4__)
- __cl_int4 v4;
-#endif
-}cl_int4;
-
-/* cl_int3 is identical in size, alignment and behavior to cl_int4. See section 6.1.5. */
-typedef cl_int4 cl_int3;
-
-typedef union
-{
- cl_int CL_ALIGNED(32) s[8];
-#if __CL_HAS_ANON_STRUCT__
- __CL_ANON_STRUCT__ struct{ cl_int x, y, z, w; };
- __CL_ANON_STRUCT__ struct{ cl_int s0, s1, s2, s3, s4, s5, s6, s7; };
- __CL_ANON_STRUCT__ struct{ cl_int4 lo, hi; };
-#endif
-#if defined( __CL_INT2__)
- __cl_int2 v2[4];
-#endif
-#if defined( __CL_INT4__)
- __cl_int4 v4[2];
-#endif
-#if defined( __CL_INT8__ )
- __cl_int8 v8;
-#endif
-}cl_int8;
-
-typedef union
-{
- cl_int CL_ALIGNED(64) s[16];
-#if __CL_HAS_ANON_STRUCT__
- __CL_ANON_STRUCT__ struct{ cl_int x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
- __CL_ANON_STRUCT__ struct{ cl_int s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
- __CL_ANON_STRUCT__ struct{ cl_int8 lo, hi; };
-#endif
-#if defined( __CL_INT2__)
- __cl_int2 v2[8];
-#endif
-#if defined( __CL_INT4__)
- __cl_int4 v4[4];
-#endif
-#if defined( __CL_INT8__ )
- __cl_int8 v8[2];
-#endif
-#if defined( __CL_INT16__ )
- __cl_int16 v16;
-#endif
-}cl_int16;
-
-
-/* ---- cl_uintn ---- */
-typedef union
-{
- cl_uint CL_ALIGNED(8) s[2];
-#if __CL_HAS_ANON_STRUCT__
- __CL_ANON_STRUCT__ struct{ cl_uint x, y; };
- __CL_ANON_STRUCT__ struct{ cl_uint s0, s1; };
- __CL_ANON_STRUCT__ struct{ cl_uint lo, hi; };
-#endif
-#if defined( __CL_UINT2__)
- __cl_uint2 v2;
-#endif
-}cl_uint2;
-
-typedef union
-{
- cl_uint CL_ALIGNED(16) s[4];
-#if __CL_HAS_ANON_STRUCT__
- __CL_ANON_STRUCT__ struct{ cl_uint x, y, z, w; };
- __CL_ANON_STRUCT__ struct{ cl_uint s0, s1, s2, s3; };
- __CL_ANON_STRUCT__ struct{ cl_uint2 lo, hi; };
-#endif
-#if defined( __CL_UINT2__)
- __cl_uint2 v2[2];
-#endif
-#if defined( __CL_UINT4__)
- __cl_uint4 v4;
-#endif
-}cl_uint4;
-
-/* cl_uint3 is identical in size, alignment and behavior to cl_uint4. See section 6.1.5. */
-typedef cl_uint4 cl_uint3;
-
-typedef union
-{
- cl_uint CL_ALIGNED(32) s[8];
-#if __CL_HAS_ANON_STRUCT__
- __CL_ANON_STRUCT__ struct{ cl_uint x, y, z, w; };
- __CL_ANON_STRUCT__ struct{ cl_uint s0, s1, s2, s3, s4, s5, s6, s7; };
- __CL_ANON_STRUCT__ struct{ cl_uint4 lo, hi; };
-#endif
-#if defined( __CL_UINT2__)
- __cl_uint2 v2[4];
-#endif
-#if defined( __CL_UINT4__)
- __cl_uint4 v4[2];
-#endif
-#if defined( __CL_UINT8__ )
- __cl_uint8 v8;
-#endif
-}cl_uint8;
-
-typedef union
-{
- cl_uint CL_ALIGNED(64) s[16];
-#if __CL_HAS_ANON_STRUCT__
- __CL_ANON_STRUCT__ struct{ cl_uint x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
- __CL_ANON_STRUCT__ struct{ cl_uint s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
- __CL_ANON_STRUCT__ struct{ cl_uint8 lo, hi; };
-#endif
-#if defined( __CL_UINT2__)
- __cl_uint2 v2[8];
-#endif
-#if defined( __CL_UINT4__)
- __cl_uint4 v4[4];
-#endif
-#if defined( __CL_UINT8__ )
- __cl_uint8 v8[2];
-#endif
-#if defined( __CL_UINT16__ )
- __cl_uint16 v16;
-#endif
-}cl_uint16;
-
-/* ---- cl_longn ---- */
-typedef union
-{
- cl_long CL_ALIGNED(16) s[2];
-#if __CL_HAS_ANON_STRUCT__
- __CL_ANON_STRUCT__ struct{ cl_long x, y; };
- __CL_ANON_STRUCT__ struct{ cl_long s0, s1; };
- __CL_ANON_STRUCT__ struct{ cl_long lo, hi; };
-#endif
-#if defined( __CL_LONG2__)
- __cl_long2 v2;
-#endif
-}cl_long2;
-
-typedef union
-{
- cl_long CL_ALIGNED(32) s[4];
-#if __CL_HAS_ANON_STRUCT__
- __CL_ANON_STRUCT__ struct{ cl_long x, y, z, w; };
- __CL_ANON_STRUCT__ struct{ cl_long s0, s1, s2, s3; };
- __CL_ANON_STRUCT__ struct{ cl_long2 lo, hi; };
-#endif
-#if defined( __CL_LONG2__)
- __cl_long2 v2[2];
-#endif
-#if defined( __CL_LONG4__)
- __cl_long4 v4;
-#endif
-}cl_long4;
-
-/* cl_long3 is identical in size, alignment and behavior to cl_long4. See section 6.1.5. */
-typedef cl_long4 cl_long3;
-
-typedef union
-{
- cl_long CL_ALIGNED(64) s[8];
-#if __CL_HAS_ANON_STRUCT__
- __CL_ANON_STRUCT__ struct{ cl_long x, y, z, w; };
- __CL_ANON_STRUCT__ struct{ cl_long s0, s1, s2, s3, s4, s5, s6, s7; };
- __CL_ANON_STRUCT__ struct{ cl_long4 lo, hi; };
-#endif
-#if defined( __CL_LONG2__)
- __cl_long2 v2[4];
-#endif
-#if defined( __CL_LONG4__)
- __cl_long4 v4[2];
-#endif
-#if defined( __CL_LONG8__ )
- __cl_long8 v8;
-#endif
-}cl_long8;
-
-typedef union
-{
- cl_long CL_ALIGNED(128) s[16];
-#if __CL_HAS_ANON_STRUCT__
- __CL_ANON_STRUCT__ struct{ cl_long x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
- __CL_ANON_STRUCT__ struct{ cl_long s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
- __CL_ANON_STRUCT__ struct{ cl_long8 lo, hi; };
-#endif
-#if defined( __CL_LONG2__)
- __cl_long2 v2[8];
-#endif
-#if defined( __CL_LONG4__)
- __cl_long4 v4[4];
-#endif
-#if defined( __CL_LONG8__ )
- __cl_long8 v8[2];
-#endif
-#if defined( __CL_LONG16__ )
- __cl_long16 v16;
-#endif
-}cl_long16;
-
-
-/* ---- cl_ulongn ---- */
-typedef union
-{
- cl_ulong CL_ALIGNED(16) s[2];
-#if __CL_HAS_ANON_STRUCT__
- __CL_ANON_STRUCT__ struct{ cl_ulong x, y; };
- __CL_ANON_STRUCT__ struct{ cl_ulong s0, s1; };
- __CL_ANON_STRUCT__ struct{ cl_ulong lo, hi; };
-#endif
-#if defined( __CL_ULONG2__)
- __cl_ulong2 v2;
-#endif
-}cl_ulong2;
-
-typedef union
-{
- cl_ulong CL_ALIGNED(32) s[4];
-#if __CL_HAS_ANON_STRUCT__
- __CL_ANON_STRUCT__ struct{ cl_ulong x, y, z, w; };
- __CL_ANON_STRUCT__ struct{ cl_ulong s0, s1, s2, s3; };
- __CL_ANON_STRUCT__ struct{ cl_ulong2 lo, hi; };
-#endif
-#if defined( __CL_ULONG2__)
- __cl_ulong2 v2[2];
-#endif
-#if defined( __CL_ULONG4__)
- __cl_ulong4 v4;
-#endif
-}cl_ulong4;
-
-/* cl_ulong3 is identical in size, alignment and behavior to cl_ulong4. See section 6.1.5. */
-typedef cl_ulong4 cl_ulong3;
-
-typedef union
-{
- cl_ulong CL_ALIGNED(64) s[8];
-#if __CL_HAS_ANON_STRUCT__
- __CL_ANON_STRUCT__ struct{ cl_ulong x, y, z, w; };
- __CL_ANON_STRUCT__ struct{ cl_ulong s0, s1, s2, s3, s4, s5, s6, s7; };
- __CL_ANON_STRUCT__ struct{ cl_ulong4 lo, hi; };
-#endif
-#if defined( __CL_ULONG2__)
- __cl_ulong2 v2[4];
-#endif
-#if defined( __CL_ULONG4__)
- __cl_ulong4 v4[2];
-#endif
-#if defined( __CL_ULONG8__ )
- __cl_ulong8 v8;
-#endif
-}cl_ulong8;
-
-typedef union
-{
- cl_ulong CL_ALIGNED(128) s[16];
-#if __CL_HAS_ANON_STRUCT__
- __CL_ANON_STRUCT__ struct{ cl_ulong x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
- __CL_ANON_STRUCT__ struct{ cl_ulong s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
- __CL_ANON_STRUCT__ struct{ cl_ulong8 lo, hi; };
-#endif
-#if defined( __CL_ULONG2__)
- __cl_ulong2 v2[8];
-#endif
-#if defined( __CL_ULONG4__)
- __cl_ulong4 v4[4];
-#endif
-#if defined( __CL_ULONG8__ )
- __cl_ulong8 v8[2];
-#endif
-#if defined( __CL_ULONG16__ )
- __cl_ulong16 v16;
-#endif
-}cl_ulong16;
-
-
-/* --- cl_floatn ---- */
-
-typedef union
-{
- cl_float CL_ALIGNED(8) s[2];
-#if __CL_HAS_ANON_STRUCT__
- __CL_ANON_STRUCT__ struct{ cl_float x, y; };
- __CL_ANON_STRUCT__ struct{ cl_float s0, s1; };
- __CL_ANON_STRUCT__ struct{ cl_float lo, hi; };
-#endif
-#if defined( __CL_FLOAT2__)
- __cl_float2 v2;
-#endif
-}cl_float2;
-
-typedef union
-{
- cl_float CL_ALIGNED(16) s[4];
-#if __CL_HAS_ANON_STRUCT__
- __CL_ANON_STRUCT__ struct{ cl_float x, y, z, w; };
- __CL_ANON_STRUCT__ struct{ cl_float s0, s1, s2, s3; };
- __CL_ANON_STRUCT__ struct{ cl_float2 lo, hi; };
-#endif
-#if defined( __CL_FLOAT2__)
- __cl_float2 v2[2];
-#endif
-#if defined( __CL_FLOAT4__)
- __cl_float4 v4;
-#endif
-}cl_float4;
-
-/* cl_float3 is identical in size, alignment and behavior to cl_float4. See section 6.1.5. */
-typedef cl_float4 cl_float3;
-
-typedef union
-{
- cl_float CL_ALIGNED(32) s[8];
-#if __CL_HAS_ANON_STRUCT__
- __CL_ANON_STRUCT__ struct{ cl_float x, y, z, w; };
- __CL_ANON_STRUCT__ struct{ cl_float s0, s1, s2, s3, s4, s5, s6, s7; };
- __CL_ANON_STRUCT__ struct{ cl_float4 lo, hi; };
-#endif
-#if defined( __CL_FLOAT2__)
- __cl_float2 v2[4];
-#endif
-#if defined( __CL_FLOAT4__)
- __cl_float4 v4[2];
-#endif
-#if defined( __CL_FLOAT8__ )
- __cl_float8 v8;
-#endif
-}cl_float8;
-
-typedef union
-{
- cl_float CL_ALIGNED(64) s[16];
-#if __CL_HAS_ANON_STRUCT__
- __CL_ANON_STRUCT__ struct{ cl_float x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
- __CL_ANON_STRUCT__ struct{ cl_float s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
- __CL_ANON_STRUCT__ struct{ cl_float8 lo, hi; };
-#endif
-#if defined( __CL_FLOAT2__)
- __cl_float2 v2[8];
-#endif
-#if defined( __CL_FLOAT4__)
- __cl_float4 v4[4];
-#endif
-#if defined( __CL_FLOAT8__ )
- __cl_float8 v8[2];
-#endif
-#if defined( __CL_FLOAT16__ )
- __cl_float16 v16;
-#endif
-}cl_float16;
-
-/* --- cl_doublen ---- */
-
-typedef union
-{
- cl_double CL_ALIGNED(16) s[2];
-#if __CL_HAS_ANON_STRUCT__
- __CL_ANON_STRUCT__ struct{ cl_double x, y; };
- __CL_ANON_STRUCT__ struct{ cl_double s0, s1; };
- __CL_ANON_STRUCT__ struct{ cl_double lo, hi; };
-#endif
-#if defined( __CL_DOUBLE2__)
- __cl_double2 v2;
-#endif
-}cl_double2;
-
-typedef union
-{
- cl_double CL_ALIGNED(32) s[4];
-#if __CL_HAS_ANON_STRUCT__
- __CL_ANON_STRUCT__ struct{ cl_double x, y, z, w; };
- __CL_ANON_STRUCT__ struct{ cl_double s0, s1, s2, s3; };
- __CL_ANON_STRUCT__ struct{ cl_double2 lo, hi; };
-#endif
-#if defined( __CL_DOUBLE2__)
- __cl_double2 v2[2];
-#endif
-#if defined( __CL_DOUBLE4__)
- __cl_double4 v4;
-#endif
-}cl_double4;
-
-/* cl_double3 is identical in size, alignment and behavior to cl_double4. See section 6.1.5. */
-typedef cl_double4 cl_double3;
-
-typedef union
-{
- cl_double CL_ALIGNED(64) s[8];
-#if __CL_HAS_ANON_STRUCT__
- __CL_ANON_STRUCT__ struct{ cl_double x, y, z, w; };
- __CL_ANON_STRUCT__ struct{ cl_double s0, s1, s2, s3, s4, s5, s6, s7; };
- __CL_ANON_STRUCT__ struct{ cl_double4 lo, hi; };
-#endif
-#if defined( __CL_DOUBLE2__)
- __cl_double2 v2[4];
-#endif
-#if defined( __CL_DOUBLE4__)
- __cl_double4 v4[2];
-#endif
-#if defined( __CL_DOUBLE8__ )
- __cl_double8 v8;
-#endif
-}cl_double8;
-
-typedef union
-{
- cl_double CL_ALIGNED(128) s[16];
-#if __CL_HAS_ANON_STRUCT__
- __CL_ANON_STRUCT__ struct{ cl_double x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
- __CL_ANON_STRUCT__ struct{ cl_double s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
- __CL_ANON_STRUCT__ struct{ cl_double8 lo, hi; };
-#endif
-#if defined( __CL_DOUBLE2__)
- __cl_double2 v2[8];
-#endif
-#if defined( __CL_DOUBLE4__)
- __cl_double4 v4[4];
-#endif
-#if defined( __CL_DOUBLE8__ )
- __cl_double8 v8[2];
-#endif
-#if defined( __CL_DOUBLE16__ )
- __cl_double16 v16;
-#endif
-}cl_double16;
-
-/* Macro to facilitate debugging
- * Usage:
- * Place CL_PROGRAM_STRING_DEBUG_INFO on the line before the first line of your source.
- * The first line ends with: CL_PROGRAM_STRING_DEBUG_INFO \"
- * Each line thereafter of OpenCL C source must end with: \n\
- * The last line ends in ";
- *
- * Example:
- *
- * const char *my_program = CL_PROGRAM_STRING_DEBUG_INFO "\
- * kernel void foo( int a, float * b ) \n\
- * { \n\
- * // my comment \n\
- * *b[ get_global_id(0)] = a; \n\
- * } \n\
- * ";
- *
- * This should correctly set up the line, (column) and file information for your source
- * string so you can do source level debugging.
- */
-#define __CL_STRINGIFY( _x ) # _x
-#define _CL_STRINGIFY( _x ) __CL_STRINGIFY( _x )
-#define CL_PROGRAM_STRING_DEBUG_INFO "#line " _CL_STRINGIFY(__LINE__) " \"" __FILE__ "\" \n\n"
-
-#ifdef __cplusplus
-}
-#endif
-
-#undef __CL_HAS_ANON_STRUCT__
-#undef __CL_ANON_STRUCT__
-#if defined( _WIN32) && (_MSC_VER >= 1500)
-#pragma warning( pop )
-#endif
-
-#endif /* __CL_PLATFORM_H */
diff --git a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/opencl.h b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/opencl.h
deleted file mode 100644
index fccacd168..000000000
--- a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/opencl.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008-2012 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and/or associated documentation files (the
- * "Materials"), to deal in the Materials without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Materials, and to
- * permit persons to whom the Materials are furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Materials.
- *
- * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
- ******************************************************************************/
-
-/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */
-
-#ifndef __OPENCL_H
-#define __OPENCL_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <cl.h>
-#include <cl_gl.h>
-#include <cl_gl_ext.h>
-#include <cl_ext.h>
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __OPENCL_H */
-
diff --git a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/image.go b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/image.go
deleted file mode 100644
index d6a996377..000000000
--- a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/image.go
+++ /dev/null
@@ -1,83 +0,0 @@
-// +build cl12
-
-package cl
-
-// #ifdef __APPLE__
-// #include "OpenCL/opencl.h"
-// #else
-// #include "cl.h"
-// #endif
-import "C"
-import (
- "image"
- "unsafe"
-)
-
-func (ctx *Context) CreateImage(flags MemFlag, imageFormat ImageFormat, imageDesc ImageDescription, data []byte) (*MemObject, error) {
- format := imageFormat.toCl()
- desc := imageDesc.toCl()
- var dataPtr unsafe.Pointer
- if data != nil {
- dataPtr = unsafe.Pointer(&data[0])
- }
- var err C.cl_int
- clBuffer := C.clCreateImage(ctx.clContext, C.cl_mem_flags(flags), &format, &desc, dataPtr, &err)
- if err != C.CL_SUCCESS {
- return nil, toError(err)
- }
- if clBuffer == nil {
- return nil, ErrUnknown
- }
- return newMemObject(clBuffer, len(data)), nil
-}
-
-func (ctx *Context) CreateImageSimple(flags MemFlag, width, height int, channelOrder ChannelOrder, channelDataType ChannelDataType, data []byte) (*MemObject, error) {
- format := ImageFormat{channelOrder, channelDataType}
- desc := ImageDescription{
- Type: MemObjectTypeImage2D,
- Width: width,
- Height: height,
- }
- return ctx.CreateImage(flags, format, desc, data)
-}
-
-func (ctx *Context) CreateImageFromImage(flags MemFlag, img image.Image) (*MemObject, error) {
- switch m := img.(type) {
- case *image.Gray:
- format := ImageFormat{ChannelOrderIntensity, ChannelDataTypeUNormInt8}
- desc := ImageDescription{
- Type: MemObjectTypeImage2D,
- Width: m.Bounds().Dx(),
- Height: m.Bounds().Dy(),
- RowPitch: m.Stride,
- }
- return ctx.CreateImage(flags, format, desc, m.Pix)
- case *image.RGBA:
- format := ImageFormat{ChannelOrderRGBA, ChannelDataTypeUNormInt8}
- desc := ImageDescription{
- Type: MemObjectTypeImage2D,
- Width: m.Bounds().Dx(),
- Height: m.Bounds().Dy(),
- RowPitch: m.Stride,
- }
- return ctx.CreateImage(flags, format, desc, m.Pix)
- }
-
- b := img.Bounds()
- w := b.Dx()
- h := b.Dy()
- data := make([]byte, w*h*4)
- dataOffset := 0
- for y := 0; y < h; y++ {
- for x := 0; x < w; x++ {
- c := img.At(x+b.Min.X, y+b.Min.Y)
- r, g, b, a := c.RGBA()
- data[dataOffset] = uint8(r >> 8)
- data[dataOffset+1] = uint8(g >> 8)
- data[dataOffset+2] = uint8(b >> 8)
- data[dataOffset+3] = uint8(a >> 8)
- dataOffset += 4
- }
- }
- return ctx.CreateImageSimple(flags, w, h, ChannelOrderRGBA, ChannelDataTypeUNormInt8, data)
-}
diff --git a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/kernel.go b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/kernel.go
deleted file mode 100644
index 894a775e8..000000000
--- a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/kernel.go
+++ /dev/null
@@ -1,127 +0,0 @@
-package cl
-
-// #ifdef __APPLE__
-// #include "OpenCL/opencl.h"
-// #else
-// #include "cl.h"
-// #endif
-import "C"
-
-import (
- "fmt"
- "unsafe"
-)
-
-type ErrUnsupportedArgumentType struct {
- Index int
- Value interface{}
-}
-
-func (e ErrUnsupportedArgumentType) Error() string {
- return fmt.Sprintf("cl: unsupported argument type for index %d: %+v", e.Index, e.Value)
-}
-
-type Kernel struct {
- clKernel C.cl_kernel
- name string
-}
-
-type LocalBuffer int
-
-func releaseKernel(k *Kernel) {
- if k.clKernel != nil {
- C.clReleaseKernel(k.clKernel)
- k.clKernel = nil
- }
-}
-
-func (k *Kernel) Release() {
- releaseKernel(k)
-}
-
-func (k *Kernel) SetArgs(args ...interface{}) error {
- for index, arg := range args {
- if err := k.SetArg(index, arg); err != nil {
- return err
- }
- }
- return nil
-}
-
-func (k *Kernel) SetArg(index int, arg interface{}) error {
- switch val := arg.(type) {
- case uint8:
- return k.SetArgUint8(index, val)
- case int8:
- return k.SetArgInt8(index, val)
- case uint32:
- return k.SetArgUint32(index, val)
- case uint64:
- return k.SetArgUint64(index, val)
- case int32:
- return k.SetArgInt32(index, val)
- case float32:
- return k.SetArgFloat32(index, val)
- case *MemObject:
- return k.SetArgBuffer(index, val)
- case LocalBuffer:
- return k.SetArgLocal(index, int(val))
- default:
- return ErrUnsupportedArgumentType{Index: index, Value: arg}
- }
-}
-
-func (k *Kernel) SetArgBuffer(index int, buffer *MemObject) error {
- return k.SetArgUnsafe(index, int(unsafe.Sizeof(buffer.clMem)), unsafe.Pointer(&buffer.clMem))
-}
-
-func (k *Kernel) SetArgFloat32(index int, val float32) error {
- return k.SetArgUnsafe(index, int(unsafe.Sizeof(val)), unsafe.Pointer(&val))
-}
-
-func (k *Kernel) SetArgInt8(index int, val int8) error {
- return k.SetArgUnsafe(index, int(unsafe.Sizeof(val)), unsafe.Pointer(&val))
-}
-
-func (k *Kernel) SetArgUint8(index int, val uint8) error {
- return k.SetArgUnsafe(index, int(unsafe.Sizeof(val)), unsafe.Pointer(&val))
-}
-
-func (k *Kernel) SetArgInt32(index int, val int32) error {
- return k.SetArgUnsafe(index, int(unsafe.Sizeof(val)), unsafe.Pointer(&val))
-}
-
-func (k *Kernel) SetArgUint32(index int, val uint32) error {
- return k.SetArgUnsafe(index, int(unsafe.Sizeof(val)), unsafe.Pointer(&val))
-}
-
-func (k *Kernel) SetArgUint64(index int, val uint64) error {
- return k.SetArgUnsafe(index, int(unsafe.Sizeof(val)), unsafe.Pointer(&val))
-}
-
-func (k *Kernel) SetArgLocal(index int, size int) error {
- return k.SetArgUnsafe(index, size, nil)
-}
-
-func (k *Kernel) SetArgUnsafe(index, argSize int, arg unsafe.Pointer) error {
- //fmt.Println("FUNKY: ", index, argSize)
- return toError(C.clSetKernelArg(k.clKernel, C.cl_uint(index), C.size_t(argSize), arg))
-}
-
-func (k *Kernel) PreferredWorkGroupSizeMultiple(device *Device) (int, error) {
- var size C.size_t
- err := C.clGetKernelWorkGroupInfo(k.clKernel, device.nullableId(), C.CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE, C.size_t(unsafe.Sizeof(size)), unsafe.Pointer(&size), nil)
- return int(size), toError(err)
-}
-
-func (k *Kernel) WorkGroupSize(device *Device) (int, error) {
- var size C.size_t
- err := C.clGetKernelWorkGroupInfo(k.clKernel, device.nullableId(), C.CL_KERNEL_WORK_GROUP_SIZE, C.size_t(unsafe.Sizeof(size)), unsafe.Pointer(&size), nil)
- return int(size), toError(err)
-}
-
-func (k *Kernel) NumArgs() (int, error) {
- var num C.cl_uint
- err := C.clGetKernelInfo(k.clKernel, C.CL_KERNEL_NUM_ARGS, C.size_t(unsafe.Sizeof(num)), unsafe.Pointer(&num), nil)
- return int(num), toError(err)
-}
diff --git a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/kernel10.go b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/kernel10.go
deleted file mode 100644
index 579946068..000000000
--- a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/kernel10.go
+++ /dev/null
@@ -1,7 +0,0 @@
-// +build !cl12
-
-package cl
-
-func (k *Kernel) ArgName(index int) (string, error) {
- return "", ErrUnsupported
-}
diff --git a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/kernel12.go b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/kernel12.go
deleted file mode 100644
index d9e6f3546..000000000
--- a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/kernel12.go
+++ /dev/null
@@ -1,20 +0,0 @@
-// +build cl12
-
-package cl
-
-// #ifdef __APPLE__
-// #include "OpenCL/opencl.h"
-// #else
-// #include "cl.h"
-// #endif
-import "C"
-import "unsafe"
-
-func (k *Kernel) ArgName(index int) (string, error) {
- var strC [1024]byte
- var strN C.size_t
- if err := C.clGetKernelArgInfo(k.clKernel, C.cl_uint(index), C.CL_KERNEL_ARG_NAME, 1024, unsafe.Pointer(&strC[0]), &strN); err != C.CL_SUCCESS {
- return "", toError(err)
- }
- return string(strC[:strN]), nil
-}
diff --git a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/platform.go b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/platform.go
deleted file mode 100644
index fd1d162cf..000000000
--- a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/platform.go
+++ /dev/null
@@ -1,83 +0,0 @@
-package cl
-
-// #ifdef __APPLE__
-// #include "OpenCL/opencl.h"
-// #else
-// #include "cl.h"
-// #endif
-import "C"
-
-import "unsafe"
-
-const maxPlatforms = 32
-
-type Platform struct {
- id C.cl_platform_id
-}
-
-// Obtain the list of platforms available.
-func GetPlatforms() ([]*Platform, error) {
- var platformIds [maxPlatforms]C.cl_platform_id
- var nPlatforms C.cl_uint
- if err := C.clGetPlatformIDs(C.cl_uint(maxPlatforms), &platformIds[0], &nPlatforms); err != C.CL_SUCCESS {
- return nil, toError(err)
- }
- platforms := make([]*Platform, nPlatforms)
- for i := 0; i < int(nPlatforms); i++ {
- platforms[i] = &Platform{id: platformIds[i]}
- }
- return platforms, nil
-}
-
-func (p *Platform) GetDevices(deviceType DeviceType) ([]*Device, error) {
- return GetDevices(p, deviceType)
-}
-
-func (p *Platform) getInfoString(param C.cl_platform_info) (string, error) {
- var strC [2048]byte
- var strN C.size_t
- if err := C.clGetPlatformInfo(p.id, param, 2048, unsafe.Pointer(&strC[0]), &strN); err != C.CL_SUCCESS {
- return "", toError(err)
- }
- return string(strC[:(strN - 1)]), nil
-}
-
-func (p *Platform) Name() string {
- if str, err := p.getInfoString(C.CL_PLATFORM_NAME); err != nil {
- panic("Platform.Name() should never fail")
- } else {
- return str
- }
-}
-
-func (p *Platform) Vendor() string {
- if str, err := p.getInfoString(C.CL_PLATFORM_VENDOR); err != nil {
- panic("Platform.Vendor() should never fail")
- } else {
- return str
- }
-}
-
-func (p *Platform) Profile() string {
- if str, err := p.getInfoString(C.CL_PLATFORM_PROFILE); err != nil {
- panic("Platform.Profile() should never fail")
- } else {
- return str
- }
-}
-
-func (p *Platform) Version() string {
- if str, err := p.getInfoString(C.CL_PLATFORM_VERSION); err != nil {
- panic("Platform.Version() should never fail")
- } else {
- return str
- }
-}
-
-func (p *Platform) Extensions() string {
- if str, err := p.getInfoString(C.CL_PLATFORM_EXTENSIONS); err != nil {
- panic("Platform.Extensions() should never fail")
- } else {
- return str
- }
-}
diff --git a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/program.go b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/program.go
deleted file mode 100644
index e75f7ee0e..000000000
--- a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/program.go
+++ /dev/null
@@ -1,105 +0,0 @@
-package cl
-
-// #include <stdlib.h>
-// #ifdef __APPLE__
-// #include "OpenCL/opencl.h"
-// #else
-// #include "cl.h"
-// #endif
-import "C"
-
-import (
- "fmt"
- "runtime"
- "unsafe"
-)
-
-type BuildError struct {
- Message string
- Device *Device
-}
-
-func (e BuildError) Error() string {
- if e.Device != nil {
- return fmt.Sprintf("cl: build error on %q: %s", e.Device.Name(), e.Message)
- } else {
- return fmt.Sprintf("cl: build error: %s", e.Message)
- }
-}
-
-type Program struct {
- clProgram C.cl_program
- devices []*Device
-}
-
-func releaseProgram(p *Program) {
- if p.clProgram != nil {
- C.clReleaseProgram(p.clProgram)
- p.clProgram = nil
- }
-}
-
-func (p *Program) Release() {
- releaseProgram(p)
-}
-
-func (p *Program) BuildProgram(devices []*Device, options string) error {
- var cOptions *C.char
- if options != "" {
- cOptions = C.CString(options)
- defer C.free(unsafe.Pointer(cOptions))
- }
- var deviceList []C.cl_device_id
- var deviceListPtr *C.cl_device_id
- numDevices := C.cl_uint(len(devices))
- if devices != nil && len(devices) > 0 {
- deviceList = buildDeviceIdList(devices)
- deviceListPtr = &deviceList[0]
- }
- if err := C.clBuildProgram(p.clProgram, numDevices, deviceListPtr, cOptions, nil, nil); err != C.CL_SUCCESS {
- buffer := make([]byte, 4096)
- var bLen C.size_t
- var err C.cl_int
-
- for _, dev := range p.devices {
- for i := 2; i >= 0; i-- {
- err = C.clGetProgramBuildInfo(p.clProgram, dev.id, C.CL_PROGRAM_BUILD_LOG, C.size_t(len(buffer)), unsafe.Pointer(&buffer[0]), &bLen)
- if err == C.CL_INVALID_VALUE && i > 0 && bLen < 1024*1024 {
- // INVALID_VALUE probably means our buffer isn't large enough
- buffer = make([]byte, bLen)
- } else {
- break
- }
- }
- if err != C.CL_SUCCESS {
- return toError(err)
- }
-
- if bLen > 1 {
- return BuildError{
- Device: dev,
- Message: string(buffer[:bLen-1]),
- }
- }
- }
-
- return BuildError{
- Device: nil,
- Message: "build failed and produced no log entries",
- }
- }
- return nil
-}
-
-func (p *Program) CreateKernel(name string) (*Kernel, error) {
- cName := C.CString(name)
- defer C.free(unsafe.Pointer(cName))
- var err C.cl_int
- clKernel := C.clCreateKernel(p.clProgram, cName, &err)
- if err != C.CL_SUCCESS {
- return nil, toError(err)
- }
- kernel := &Kernel{clKernel: clKernel, name: name}
- runtime.SetFinalizer(kernel, releaseKernel)
- return kernel, nil
-}
diff --git a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/queue.go b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/queue.go
deleted file mode 100644
index 7762746da..000000000
--- a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/queue.go
+++ /dev/null
@@ -1,193 +0,0 @@
-package cl
-
-// #ifdef __APPLE__
-// #include "OpenCL/opencl.h"
-// #else
-// #include "cl.h"
-// #endif
-import "C"
-
-import "unsafe"
-
-type CommandQueueProperty int
-
-const (
- CommandQueueOutOfOrderExecModeEnable CommandQueueProperty = C.CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE
- CommandQueueProfilingEnable CommandQueueProperty = C.CL_QUEUE_PROFILING_ENABLE
-)
-
-type CommandQueue struct {
- clQueue C.cl_command_queue
- device *Device
-}
-
-func releaseCommandQueue(q *CommandQueue) {
- if q.clQueue != nil {
- C.clReleaseCommandQueue(q.clQueue)
- q.clQueue = nil
- }
-}
-
-// Call clReleaseCommandQueue on the CommandQueue. Using the CommandQueue after Release will cause a panick.
-func (q *CommandQueue) Release() {
- releaseCommandQueue(q)
-}
-
-// Blocks until all previously queued OpenCL commands in a command-queue are issued to the associated device and have completed.
-func (q *CommandQueue) Finish() error {
- return toError(C.clFinish(q.clQueue))
-}
-
-// Issues all previously queued OpenCL commands in a command-queue to the device associated with the command-queue.
-func (q *CommandQueue) Flush() error {
- return toError(C.clFlush(q.clQueue))
-}
-
-// Enqueues a command to map a region of the buffer object given by buffer into the host address space and returns a pointer to this mapped region.
-func (q *CommandQueue) EnqueueMapBuffer(buffer *MemObject, blocking bool, flags MapFlag, offset, size int, eventWaitList []*Event) (*MappedMemObject, *Event, error) {
- var event C.cl_event
- var err C.cl_int
- ptr := C.clEnqueueMapBuffer(q.clQueue, buffer.clMem, clBool(blocking), flags.toCl(), C.size_t(offset), C.size_t(size), C.cl_uint(len(eventWaitList)), eventListPtr(eventWaitList), &event, &err)
- if err != C.CL_SUCCESS {
- return nil, nil, toError(err)
- }
- ev := newEvent(event)
- if ptr == nil {
- return nil, ev, ErrUnknown
- }
- return &MappedMemObject{ptr: ptr, size: size}, ev, nil
-}
-
-// Enqueues a command to map a region of an image object into the host address space and returns a pointer to this mapped region.
-func (q *CommandQueue) EnqueueMapImage(buffer *MemObject, blocking bool, flags MapFlag, origin, region [3]int, eventWaitList []*Event) (*MappedMemObject, *Event, error) {
- cOrigin := sizeT3(origin)
- cRegion := sizeT3(region)
- var event C.cl_event
- var err C.cl_int
- var rowPitch, slicePitch C.size_t
- ptr := C.clEnqueueMapImage(q.clQueue, buffer.clMem, clBool(blocking), flags.toCl(), &cOrigin[0], &cRegion[0], &rowPitch, &slicePitch, C.cl_uint(len(eventWaitList)), eventListPtr(eventWaitList), &event, &err)
- if err != C.CL_SUCCESS {
- return nil, nil, toError(err)
- }
- ev := newEvent(event)
- if ptr == nil {
- return nil, ev, ErrUnknown
- }
- size := 0 // TODO: could calculate this
- return &MappedMemObject{ptr: ptr, size: size, rowPitch: int(rowPitch), slicePitch: int(slicePitch)}, ev, nil
-}
-
-// Enqueues a command to unmap a previously mapped region of a memory object.
-func (q *CommandQueue) EnqueueUnmapMemObject(buffer *MemObject, mappedObj *MappedMemObject, eventWaitList []*Event) (*Event, error) {
- var event C.cl_event
- if err := C.clEnqueueUnmapMemObject(q.clQueue, buffer.clMem, mappedObj.ptr, C.cl_uint(len(eventWaitList)), eventListPtr(eventWaitList), &event); err != C.CL_SUCCESS {
- return nil, toError(err)
- }
- return newEvent(event), nil
-}
-
-// Enqueues a command to copy a buffer object to another buffer object.
-func (q *CommandQueue) EnqueueCopyBuffer(srcBuffer, dstBuffer *MemObject, srcOffset, dstOffset, byteCount int, eventWaitList []*Event) (*Event, error) {
- var event C.cl_event
- err := toError(C.clEnqueueCopyBuffer(q.clQueue, srcBuffer.clMem, dstBuffer.clMem, C.size_t(srcOffset), C.size_t(dstOffset), C.size_t(byteCount), C.cl_uint(len(eventWaitList)), eventListPtr(eventWaitList), &event))
- return newEvent(event), err
-}
-
-// Enqueue commands to write to a buffer object from host memory.
-func (q *CommandQueue) EnqueueWriteBuffer(buffer *MemObject, blocking bool, offset, dataSize int, dataPtr unsafe.Pointer, eventWaitList []*Event) (*Event, error) {
- var event C.cl_event
- err := toError(C.clEnqueueWriteBuffer(q.clQueue, buffer.clMem, clBool(blocking), C.size_t(offset), C.size_t(dataSize), dataPtr, C.cl_uint(len(eventWaitList)), eventListPtr(eventWaitList), &event))
- return newEvent(event), err
-}
-
-func (q *CommandQueue) EnqueueWriteBufferFloat32(buffer *MemObject, blocking bool, offset int, data []float32, eventWaitList []*Event) (*Event, error) {
- dataPtr := unsafe.Pointer(&data[0])
- dataSize := int(unsafe.Sizeof(data[0])) * len(data)
- return q.EnqueueWriteBuffer(buffer, blocking, offset, dataSize, dataPtr, eventWaitList)
-}
-
-// Enqueue commands to read from a buffer object to host memory.
-func (q *CommandQueue) EnqueueReadBuffer(buffer *MemObject, blocking bool, offset, dataSize int, dataPtr unsafe.Pointer, eventWaitList []*Event) (*Event, error) {
- var event C.cl_event
- err := toError(C.clEnqueueReadBuffer(q.clQueue, buffer.clMem, clBool(blocking), C.size_t(offset), C.size_t(dataSize), dataPtr, C.cl_uint(len(eventWaitList)), eventListPtr(eventWaitList), &event))
- return newEvent(event), err
-}
-
-func (q *CommandQueue) EnqueueReadBufferFloat32(buffer *MemObject, blocking bool, offset int, data []float32, eventWaitList []*Event) (*Event, error) {
- dataPtr := unsafe.Pointer(&data[0])
- dataSize := int(unsafe.Sizeof(data[0])) * len(data)
- return q.EnqueueReadBuffer(buffer, blocking, offset, dataSize, dataPtr, eventWaitList)
-}
-
-// Enqueues a command to execute a kernel on a device.
-func (q *CommandQueue) EnqueueNDRangeKernel(kernel *Kernel, globalWorkOffset, globalWorkSize, localWorkSize []int, eventWaitList []*Event) (*Event, error) {
- workDim := len(globalWorkSize)
- var globalWorkOffsetList []C.size_t
- var globalWorkOffsetPtr *C.size_t
- if globalWorkOffset != nil {
- globalWorkOffsetList = make([]C.size_t, len(globalWorkOffset))
- for i, off := range globalWorkOffset {
- globalWorkOffsetList[i] = C.size_t(off)
- }
- globalWorkOffsetPtr = &globalWorkOffsetList[0]
- }
- var globalWorkSizeList []C.size_t
- var globalWorkSizePtr *C.size_t
- if globalWorkSize != nil {
- globalWorkSizeList = make([]C.size_t, len(globalWorkSize))
- for i, off := range globalWorkSize {
- globalWorkSizeList[i] = C.size_t(off)
- }
- globalWorkSizePtr = &globalWorkSizeList[0]
- }
- var localWorkSizeList []C.size_t
- var localWorkSizePtr *C.size_t
- if localWorkSize != nil {
- localWorkSizeList = make([]C.size_t, len(localWorkSize))
- for i, off := range localWorkSize {
- localWorkSizeList[i] = C.size_t(off)
- }
- localWorkSizePtr = &localWorkSizeList[0]
- }
- var event C.cl_event
- err := toError(C.clEnqueueNDRangeKernel(q.clQueue, kernel.clKernel, C.cl_uint(workDim), globalWorkOffsetPtr, globalWorkSizePtr, localWorkSizePtr, C.cl_uint(len(eventWaitList)), eventListPtr(eventWaitList), &event))
- return newEvent(event), err
-}
-
-// Enqueues a command to read from a 2D or 3D image object to host memory.
-func (q *CommandQueue) EnqueueReadImage(image *MemObject, blocking bool, origin, region [3]int, rowPitch, slicePitch int, data []byte, eventWaitList []*Event) (*Event, error) {
- cOrigin := sizeT3(origin)
- cRegion := sizeT3(region)
- var event C.cl_event
- err := toError(C.clEnqueueReadImage(q.clQueue, image.clMem, clBool(blocking), &cOrigin[0], &cRegion[0], C.size_t(rowPitch), C.size_t(slicePitch), unsafe.Pointer(&data[0]), C.cl_uint(len(eventWaitList)), eventListPtr(eventWaitList), &event))
- return newEvent(event), err
-}
-
-// Enqueues a command to write from a 2D or 3D image object to host memory.
-func (q *CommandQueue) EnqueueWriteImage(image *MemObject, blocking bool, origin, region [3]int, rowPitch, slicePitch int, data []byte, eventWaitList []*Event) (*Event, error) {
- cOrigin := sizeT3(origin)
- cRegion := sizeT3(region)
- var event C.cl_event
- err := toError(C.clEnqueueWriteImage(q.clQueue, image.clMem, clBool(blocking), &cOrigin[0], &cRegion[0], C.size_t(rowPitch), C.size_t(slicePitch), unsafe.Pointer(&data[0]), C.cl_uint(len(eventWaitList)), eventListPtr(eventWaitList), &event))
- return newEvent(event), err
-}
-
-func (q *CommandQueue) EnqueueFillBuffer(buffer *MemObject, pattern unsafe.Pointer, patternSize, offset, size int, eventWaitList []*Event) (*Event, error) {
- var event C.cl_event
- err := toError(C.clEnqueueFillBuffer(q.clQueue, buffer.clMem, pattern, C.size_t(patternSize), C.size_t(offset), C.size_t(size), C.cl_uint(len(eventWaitList)), eventListPtr(eventWaitList), &event))
- return newEvent(event), err
-}
-
-// A synchronization point that enqueues a barrier operation.
-func (q *CommandQueue) EnqueueBarrierWithWaitList(eventWaitList []*Event) (*Event, error) {
- var event C.cl_event
- err := toError(C.clEnqueueBarrierWithWaitList(q.clQueue, C.cl_uint(len(eventWaitList)), eventListPtr(eventWaitList), &event))
- return newEvent(event), err
-}
-
-// Enqueues a marker command which waits for either a list of events to complete, or all previously enqueued commands to complete.
-func (q *CommandQueue) EnqueueMarkerWithWaitList(eventWaitList []*Event) (*Event, error) {
- var event C.cl_event
- err := toError(C.clEnqueueMarkerWithWaitList(q.clQueue, C.cl_uint(len(eventWaitList)), eventListPtr(eventWaitList), &event))
- return newEvent(event), err
-}
diff --git a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/types.go b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/types.go
deleted file mode 100644
index 00c846ce7..000000000
--- a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/types.go
+++ /dev/null
@@ -1,487 +0,0 @@
-package cl
-
-// #ifdef __APPLE__
-// #include "OpenCL/opencl.h"
-// #else
-// #include "cl.h"
-// #endif
-import "C"
-
-import (
- "errors"
- "fmt"
- "reflect"
- "runtime"
- "strings"
- "unsafe"
-)
-
-var (
- ErrUnknown = errors.New("cl: unknown error") // Generally an unexpected result from an OpenCL function (e.g. CL_SUCCESS but null pointer)
-)
-
-type ErrOther int
-
-func (e ErrOther) Error() string {
- return fmt.Sprintf("cl: error %d", int(e))
-}
-
-var (
- ErrDeviceNotFound = errors.New("cl: Device Not Found")
- ErrDeviceNotAvailable = errors.New("cl: Device Not Available")
- ErrCompilerNotAvailable = errors.New("cl: Compiler Not Available")
- ErrMemObjectAllocationFailure = errors.New("cl: Mem Object Allocation Failure")
- ErrOutOfResources = errors.New("cl: Out Of Resources")
- ErrOutOfHostMemory = errors.New("cl: Out Of Host Memory")
- ErrProfilingInfoNotAvailable = errors.New("cl: Profiling Info Not Available")
- ErrMemCopyOverlap = errors.New("cl: Mem Copy Overlap")
- ErrImageFormatMismatch = errors.New("cl: Image Format Mismatch")
- ErrImageFormatNotSupported = errors.New("cl: Image Format Not Supported")
- ErrBuildProgramFailure = errors.New("cl: Build Program Failure")
- ErrMapFailure = errors.New("cl: Map Failure")
- ErrMisalignedSubBufferOffset = errors.New("cl: Misaligned Sub Buffer Offset")
- ErrExecStatusErrorForEventsInWaitList = errors.New("cl: Exec Status Error For Events In Wait List")
- ErrCompileProgramFailure = errors.New("cl: Compile Program Failure")
- ErrLinkerNotAvailable = errors.New("cl: Linker Not Available")
- ErrLinkProgramFailure = errors.New("cl: Link Program Failure")
- ErrDevicePartitionFailed = errors.New("cl: Device Partition Failed")
- ErrKernelArgInfoNotAvailable = errors.New("cl: Kernel Arg Info Not Available")
- ErrInvalidValue = errors.New("cl: Invalid Value")
- ErrInvalidDeviceType = errors.New("cl: Invalid Device Type")
- ErrInvalidPlatform = errors.New("cl: Invalid Platform")
- ErrInvalidDevice = errors.New("cl: Invalid Device")
- ErrInvalidContext = errors.New("cl: Invalid Context")
- ErrInvalidQueueProperties = errors.New("cl: Invalid Queue Properties")
- ErrInvalidCommandQueue = errors.New("cl: Invalid Command Queue")
- ErrInvalidHostPtr = errors.New("cl: Invalid Host Ptr")
- ErrInvalidMemObject = errors.New("cl: Invalid Mem Object")
- ErrInvalidImageFormatDescriptor = errors.New("cl: Invalid Image Format Descriptor")
- ErrInvalidImageSize = errors.New("cl: Invalid Image Size")
- ErrInvalidSampler = errors.New("cl: Invalid Sampler")
- ErrInvalidBinary = errors.New("cl: Invalid Binary")
- ErrInvalidBuildOptions = errors.New("cl: Invalid Build Options")
- ErrInvalidProgram = errors.New("cl: Invalid Program")
- ErrInvalidProgramExecutable = errors.New("cl: Invalid Program Executable")
- ErrInvalidKernelName = errors.New("cl: Invalid Kernel Name")
- ErrInvalidKernelDefinition = errors.New("cl: Invalid Kernel Definition")
- ErrInvalidKernel = errors.New("cl: Invalid Kernel")
- ErrInvalidArgIndex = errors.New("cl: Invalid Arg Index")
- ErrInvalidArgValue = errors.New("cl: Invalid Arg Value")
- ErrInvalidArgSize = errors.New("cl: Invalid Arg Size")
- ErrInvalidKernelArgs = errors.New("cl: Invalid Kernel Args")
- ErrInvalidWorkDimension = errors.New("cl: Invalid Work Dimension")
- ErrInvalidWorkGroupSize = errors.New("cl: Invalid Work Group Size")
- ErrInvalidWorkItemSize = errors.New("cl: Invalid Work Item Size")
- ErrInvalidGlobalOffset = errors.New("cl: Invalid Global Offset")
- ErrInvalidEventWaitList = errors.New("cl: Invalid Event Wait List")
- ErrInvalidEvent = errors.New("cl: Invalid Event")
- ErrInvalidOperation = errors.New("cl: Invalid Operation")
- ErrInvalidGlObject = errors.New("cl: Invalid Gl Object")
- ErrInvalidBufferSize = errors.New("cl: Invalid Buffer Size")
- ErrInvalidMipLevel = errors.New("cl: Invalid Mip Level")
- ErrInvalidGlobalWorkSize = errors.New("cl: Invalid Global Work Size")
- ErrInvalidProperty = errors.New("cl: Invalid Property")
- ErrInvalidImageDescriptor = errors.New("cl: Invalid Image Descriptor")
- ErrInvalidCompilerOptions = errors.New("cl: Invalid Compiler Options")
- ErrInvalidLinkerOptions = errors.New("cl: Invalid Linker Options")
- ErrInvalidDevicePartitionCount = errors.New("cl: Invalid Device Partition Count")
-)
-var errorMap = map[C.cl_int]error{
- C.CL_SUCCESS: nil,
- C.CL_DEVICE_NOT_FOUND: ErrDeviceNotFound,
- C.CL_DEVICE_NOT_AVAILABLE: ErrDeviceNotAvailable,
- C.CL_COMPILER_NOT_AVAILABLE: ErrCompilerNotAvailable,
- C.CL_MEM_OBJECT_ALLOCATION_FAILURE: ErrMemObjectAllocationFailure,
- C.CL_OUT_OF_RESOURCES: ErrOutOfResources,
- C.CL_OUT_OF_HOST_MEMORY: ErrOutOfHostMemory,
- C.CL_PROFILING_INFO_NOT_AVAILABLE: ErrProfilingInfoNotAvailable,
- C.CL_MEM_COPY_OVERLAP: ErrMemCopyOverlap,
- C.CL_IMAGE_FORMAT_MISMATCH: ErrImageFormatMismatch,
- C.CL_IMAGE_FORMAT_NOT_SUPPORTED: ErrImageFormatNotSupported,
- C.CL_BUILD_PROGRAM_FAILURE: ErrBuildProgramFailure,
- C.CL_MAP_FAILURE: ErrMapFailure,
- C.CL_MISALIGNED_SUB_BUFFER_OFFSET: ErrMisalignedSubBufferOffset,
- C.CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST: ErrExecStatusErrorForEventsInWaitList,
- C.CL_INVALID_VALUE: ErrInvalidValue,
- C.CL_INVALID_DEVICE_TYPE: ErrInvalidDeviceType,
- C.CL_INVALID_PLATFORM: ErrInvalidPlatform,
- C.CL_INVALID_DEVICE: ErrInvalidDevice,
- C.CL_INVALID_CONTEXT: ErrInvalidContext,
- C.CL_INVALID_QUEUE_PROPERTIES: ErrInvalidQueueProperties,
- C.CL_INVALID_COMMAND_QUEUE: ErrInvalidCommandQueue,
- C.CL_INVALID_HOST_PTR: ErrInvalidHostPtr,
- C.CL_INVALID_MEM_OBJECT: ErrInvalidMemObject,
- C.CL_INVALID_IMAGE_FORMAT_DESCRIPTOR: ErrInvalidImageFormatDescriptor,
- C.CL_INVALID_IMAGE_SIZE: ErrInvalidImageSize,
- C.CL_INVALID_SAMPLER: ErrInvalidSampler,
- C.CL_INVALID_BINARY: ErrInvalidBinary,
- C.CL_INVALID_BUILD_OPTIONS: ErrInvalidBuildOptions,
- C.CL_INVALID_PROGRAM: ErrInvalidProgram,
- C.CL_INVALID_PROGRAM_EXECUTABLE: ErrInvalidProgramExecutable,
- C.CL_INVALID_KERNEL_NAME: ErrInvalidKernelName,
- C.CL_INVALID_KERNEL_DEFINITION: ErrInvalidKernelDefinition,
- C.CL_INVALID_KERNEL: ErrInvalidKernel,
- C.CL_INVALID_ARG_INDEX: ErrInvalidArgIndex,
- C.CL_INVALID_ARG_VALUE: ErrInvalidArgValue,
- C.CL_INVALID_ARG_SIZE: ErrInvalidArgSize,
- C.CL_INVALID_KERNEL_ARGS: ErrInvalidKernelArgs,
- C.CL_INVALID_WORK_DIMENSION: ErrInvalidWorkDimension,
- C.CL_INVALID_WORK_GROUP_SIZE: ErrInvalidWorkGroupSize,
- C.CL_INVALID_WORK_ITEM_SIZE: ErrInvalidWorkItemSize,
- C.CL_INVALID_GLOBAL_OFFSET: ErrInvalidGlobalOffset,
- C.CL_INVALID_EVENT_WAIT_LIST: ErrInvalidEventWaitList,
- C.CL_INVALID_EVENT: ErrInvalidEvent,
- C.CL_INVALID_OPERATION: ErrInvalidOperation,
- C.CL_INVALID_GL_OBJECT: ErrInvalidGlObject,
- C.CL_INVALID_BUFFER_SIZE: ErrInvalidBufferSize,
- C.CL_INVALID_MIP_LEVEL: ErrInvalidMipLevel,
- C.CL_INVALID_GLOBAL_WORK_SIZE: ErrInvalidGlobalWorkSize,
- C.CL_INVALID_PROPERTY: ErrInvalidProperty,
-}
-
-func toError(code C.cl_int) error {
- if err, ok := errorMap[code]; ok {
- return err
- }
- return ErrOther(code)
-}
-
-type LocalMemType int
-
-const (
- LocalMemTypeNone LocalMemType = C.CL_NONE
- LocalMemTypeGlobal LocalMemType = C.CL_GLOBAL
- LocalMemTypeLocal LocalMemType = C.CL_LOCAL
-)
-
-var localMemTypeMap = map[LocalMemType]string{
- LocalMemTypeNone: "None",
- LocalMemTypeGlobal: "Global",
- LocalMemTypeLocal: "Local",
-}
-
-func (t LocalMemType) String() string {
- name := localMemTypeMap[t]
- if name == "" {
- name = "Unknown"
- }
- return name
-}
-
-type ExecCapability int
-
-const (
- ExecCapabilityKernel ExecCapability = C.CL_EXEC_KERNEL // The OpenCL device can execute OpenCL kernels.
- ExecCapabilityNativeKernel ExecCapability = C.CL_EXEC_NATIVE_KERNEL // The OpenCL device can execute native kernels.
-)
-
-func (ec ExecCapability) String() string {
- var parts []string
- if ec&ExecCapabilityKernel != 0 {
- parts = append(parts, "Kernel")
- }
- if ec&ExecCapabilityNativeKernel != 0 {
- parts = append(parts, "NativeKernel")
- }
- if parts == nil {
- return ""
- }
- return strings.Join(parts, "|")
-}
-
-type MemCacheType int
-
-const (
- MemCacheTypeNone MemCacheType = C.CL_NONE
- MemCacheTypeReadOnlyCache MemCacheType = C.CL_READ_ONLY_CACHE
- MemCacheTypeReadWriteCache MemCacheType = C.CL_READ_WRITE_CACHE
-)
-
-func (ct MemCacheType) String() string {
- switch ct {
- case MemCacheTypeNone:
- return "None"
- case MemCacheTypeReadOnlyCache:
- return "ReadOnly"
- case MemCacheTypeReadWriteCache:
- return "ReadWrite"
- }
- return fmt.Sprintf("Unknown(%x)", int(ct))
-}
-
-type MemFlag int
-
-const (
- MemReadWrite MemFlag = C.CL_MEM_READ_WRITE
- MemWriteOnly MemFlag = C.CL_MEM_WRITE_ONLY
- MemReadOnly MemFlag = C.CL_MEM_READ_ONLY
- MemUseHostPtr MemFlag = C.CL_MEM_USE_HOST_PTR
- MemAllocHostPtr MemFlag = C.CL_MEM_ALLOC_HOST_PTR
- MemCopyHostPtr MemFlag = C.CL_MEM_COPY_HOST_PTR
-
- MemWriteOnlyHost MemFlag = C.CL_MEM_HOST_WRITE_ONLY
- MemReadOnlyHost MemFlag = C.CL_MEM_HOST_READ_ONLY
- MemNoAccessHost MemFlag = C.CL_MEM_HOST_NO_ACCESS
-)
-
-type MemObjectType int
-
-const (
- MemObjectTypeBuffer MemObjectType = C.CL_MEM_OBJECT_BUFFER
- MemObjectTypeImage2D MemObjectType = C.CL_MEM_OBJECT_IMAGE2D
- MemObjectTypeImage3D MemObjectType = C.CL_MEM_OBJECT_IMAGE3D
-)
-
-type MapFlag int
-
-const (
- // This flag specifies that the region being mapped in the memory object is being mapped for reading.
- MapFlagRead MapFlag = C.CL_MAP_READ
- MapFlagWrite MapFlag = C.CL_MAP_WRITE
- MapFlagWriteInvalidateRegion MapFlag = C.CL_MAP_WRITE_INVALIDATE_REGION
-)
-
-func (mf MapFlag) toCl() C.cl_map_flags {
- return C.cl_map_flags(mf)
-}
-
-type ChannelOrder int
-
-const (
- ChannelOrderR ChannelOrder = C.CL_R
- ChannelOrderA ChannelOrder = C.CL_A
- ChannelOrderRG ChannelOrder = C.CL_RG
- ChannelOrderRA ChannelOrder = C.CL_RA
- ChannelOrderRGB ChannelOrder = C.CL_RGB
- ChannelOrderRGBA ChannelOrder = C.CL_RGBA
- ChannelOrderBGRA ChannelOrder = C.CL_BGRA
- ChannelOrderARGB ChannelOrder = C.CL_ARGB
- ChannelOrderIntensity ChannelOrder = C.CL_INTENSITY
- ChannelOrderLuminance ChannelOrder = C.CL_LUMINANCE
- ChannelOrderRx ChannelOrder = C.CL_Rx
- ChannelOrderRGx ChannelOrder = C.CL_RGx
- ChannelOrderRGBx ChannelOrder = C.CL_RGBx
-)
-
-var channelOrderNameMap = map[ChannelOrder]string{
- ChannelOrderR: "R",
- ChannelOrderA: "A",
- ChannelOrderRG: "RG",
- ChannelOrderRA: "RA",
- ChannelOrderRGB: "RGB",
- ChannelOrderRGBA: "RGBA",
- ChannelOrderBGRA: "BGRA",
- ChannelOrderARGB: "ARGB",
- ChannelOrderIntensity: "Intensity",
- ChannelOrderLuminance: "Luminance",
- ChannelOrderRx: "Rx",
- ChannelOrderRGx: "RGx",
- ChannelOrderRGBx: "RGBx",
-}
-
-func (co ChannelOrder) String() string {
- name := channelOrderNameMap[co]
- if name == "" {
- name = fmt.Sprintf("Unknown(%x)", int(co))
- }
- return name
-}
-
-type ChannelDataType int
-
-const (
- ChannelDataTypeSNormInt8 ChannelDataType = C.CL_SNORM_INT8
- ChannelDataTypeSNormInt16 ChannelDataType = C.CL_SNORM_INT16
- ChannelDataTypeUNormInt8 ChannelDataType = C.CL_UNORM_INT8
- ChannelDataTypeUNormInt16 ChannelDataType = C.CL_UNORM_INT16
- ChannelDataTypeUNormShort565 ChannelDataType = C.CL_UNORM_SHORT_565
- ChannelDataTypeUNormShort555 ChannelDataType = C.CL_UNORM_SHORT_555
- ChannelDataTypeUNormInt101010 ChannelDataType = C.CL_UNORM_INT_101010
- ChannelDataTypeSignedInt8 ChannelDataType = C.CL_SIGNED_INT8
- ChannelDataTypeSignedInt16 ChannelDataType = C.CL_SIGNED_INT16
- ChannelDataTypeSignedInt32 ChannelDataType = C.CL_SIGNED_INT32
- ChannelDataTypeUnsignedInt8 ChannelDataType = C.CL_UNSIGNED_INT8
- ChannelDataTypeUnsignedInt16 ChannelDataType = C.CL_UNSIGNED_INT16
- ChannelDataTypeUnsignedInt32 ChannelDataType = C.CL_UNSIGNED_INT32
- ChannelDataTypeHalfFloat ChannelDataType = C.CL_HALF_FLOAT
- ChannelDataTypeFloat ChannelDataType = C.CL_FLOAT
-)
-
-var channelDataTypeNameMap = map[ChannelDataType]string{
- ChannelDataTypeSNormInt8: "SNormInt8",
- ChannelDataTypeSNormInt16: "SNormInt16",
- ChannelDataTypeUNormInt8: "UNormInt8",
- ChannelDataTypeUNormInt16: "UNormInt16",
- ChannelDataTypeUNormShort565: "UNormShort565",
- ChannelDataTypeUNormShort555: "UNormShort555",
- ChannelDataTypeUNormInt101010: "UNormInt101010",
- ChannelDataTypeSignedInt8: "SignedInt8",
- ChannelDataTypeSignedInt16: "SignedInt16",
- ChannelDataTypeSignedInt32: "SignedInt32",
- ChannelDataTypeUnsignedInt8: "UnsignedInt8",
- ChannelDataTypeUnsignedInt16: "UnsignedInt16",
- ChannelDataTypeUnsignedInt32: "UnsignedInt32",
- ChannelDataTypeHalfFloat: "HalfFloat",
- ChannelDataTypeFloat: "Float",
-}
-
-func (ct ChannelDataType) String() string {
- name := channelDataTypeNameMap[ct]
- if name == "" {
- name = fmt.Sprintf("Unknown(%x)", int(ct))
- }
- return name
-}
-
-type ImageFormat struct {
- ChannelOrder ChannelOrder
- ChannelDataType ChannelDataType
-}
-
-func (f ImageFormat) toCl() C.cl_image_format {
- var format C.cl_image_format
- format.image_channel_order = C.cl_channel_order(f.ChannelOrder)
- format.image_channel_data_type = C.cl_channel_type(f.ChannelDataType)
- return format
-}
-
-type ProfilingInfo int
-
-const (
- // A 64-bit value that describes the current device time counter in
- // nanoseconds when the command identified by event is enqueued in
- // a command-queue by the host.
- ProfilingInfoCommandQueued ProfilingInfo = C.CL_PROFILING_COMMAND_QUEUED
- // A 64-bit value that describes the current device time counter in
- // nanoseconds when the command identified by event that has been
- // enqueued is submitted by the host to the device associated with the command-queue.
- ProfilingInfoCommandSubmit ProfilingInfo = C.CL_PROFILING_COMMAND_SUBMIT
- // A 64-bit value that describes the current device time counter in
- // nanoseconds when the command identified by event starts execution on the device.
- ProfilingInfoCommandStart ProfilingInfo = C.CL_PROFILING_COMMAND_START
- // A 64-bit value that describes the current device time counter in
- // nanoseconds when the command identified by event has finished
- // execution on the device.
- ProfilingInfoCommandEnd ProfilingInfo = C.CL_PROFILING_COMMAND_END
-)
-
-type CommmandExecStatus int
-
-const (
- CommmandExecStatusComplete CommmandExecStatus = C.CL_COMPLETE
- CommmandExecStatusRunning CommmandExecStatus = C.CL_RUNNING
- CommmandExecStatusSubmitted CommmandExecStatus = C.CL_SUBMITTED
- CommmandExecStatusQueued CommmandExecStatus = C.CL_QUEUED
-)
-
-type Event struct {
- clEvent C.cl_event
-}
-
-func releaseEvent(ev *Event) {
- if ev.clEvent != nil {
- C.clReleaseEvent(ev.clEvent)
- ev.clEvent = nil
- }
-}
-
-func (e *Event) Release() {
- releaseEvent(e)
-}
-
-func (e *Event) GetEventProfilingInfo(paramName ProfilingInfo) (int64, error) {
- var paramValue C.cl_ulong
- if err := C.clGetEventProfilingInfo(e.clEvent, C.cl_profiling_info(paramName), C.size_t(unsafe.Sizeof(paramValue)), unsafe.Pointer(&paramValue), nil); err != C.CL_SUCCESS {
- return 0, toError(err)
- }
- return int64(paramValue), nil
-}
-
-// Sets the execution status of a user event object.
-//
-// `status` specifies the new execution status to be set and
-// can be CL_COMPLETE or a negative integer value to indicate
-// an error. A negative integer value causes all enqueued commands
-// that wait on this user event to be terminated. clSetUserEventStatus
-// can only be called once to change the execution status of event.
-func (e *Event) SetUserEventStatus(status int) error {
- return toError(C.clSetUserEventStatus(e.clEvent, C.cl_int(status)))
-}
-
-// Waits on the host thread for commands identified by event objects in
-// events to complete. A command is considered complete if its execution
-// status is CL_COMPLETE or a negative value. The events specified in
-// event_list act as synchronization points.
-//
-// If the cl_khr_gl_event extension is enabled, event objects can also be
-// used to reflect the status of an OpenGL sync object. The sync object
-// in turn refers to a fence command executing in an OpenGL command
-// stream. This provides another method of coordinating sharing of buffers
-// and images between OpenGL and OpenCL.
-func WaitForEvents(events []*Event) error {
- return toError(C.clWaitForEvents(C.cl_uint(len(events)), eventListPtr(events)))
-}
-
-func newEvent(clEvent C.cl_event) *Event {
- ev := &Event{clEvent: clEvent}
- runtime.SetFinalizer(ev, releaseEvent)
- return ev
-}
-
-func eventListPtr(el []*Event) *C.cl_event {
- if el == nil {
- return nil
- }
- elist := make([]C.cl_event, len(el))
- for i, e := range el {
- elist[i] = e.clEvent
- }
- return (*C.cl_event)(&elist[0])
-}
-
-func clBool(b bool) C.cl_bool {
- if b {
- return C.CL_TRUE
- }
- return C.CL_FALSE
-}
-
-func sizeT3(i3 [3]int) [3]C.size_t {
- var val [3]C.size_t
- val[0] = C.size_t(i3[0])
- val[1] = C.size_t(i3[1])
- val[2] = C.size_t(i3[2])
- return val
-}
-
-type MappedMemObject struct {
- ptr unsafe.Pointer
- size int
- rowPitch int
- slicePitch int
-}
-
-func (mb *MappedMemObject) ByteSlice() []byte {
- var byteSlice []byte
- sliceHeader := (*reflect.SliceHeader)(unsafe.Pointer(&byteSlice))
- sliceHeader.Cap = mb.size
- sliceHeader.Len = mb.size
- sliceHeader.Data = uintptr(mb.ptr)
- return byteSlice
-}
-
-func (mb *MappedMemObject) Ptr() unsafe.Pointer {
- return mb.ptr
-}
-
-func (mb *MappedMemObject) Size() int {
- return mb.size
-}
-
-func (mb *MappedMemObject) RowPitch() int {
- return mb.rowPitch
-}
-
-func (mb *MappedMemObject) SlicePitch() int {
- return mb.slicePitch
-}
diff --git a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/types12.go b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/types12.go
deleted file mode 100644
index 58023cb60..000000000
--- a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/types12.go
+++ /dev/null
@@ -1,71 +0,0 @@
-// +build cl12
-
-package cl
-
-// #ifdef __APPLE__
-// #include "OpenCL/opencl.h"
-// #else
-// #include "cl.h"
-// #endif
-import "C"
-
-const (
- ChannelDataTypeUNormInt24 ChannelDataType = C.CL_UNORM_INT24
- ChannelOrderDepth ChannelOrder = C.CL_DEPTH
- ChannelOrderDepthStencil ChannelOrder = C.CL_DEPTH_STENCIL
- MemHostNoAccess MemFlag = C.CL_MEM_HOST_NO_ACCESS // OpenCL 1.2
- MemHostReadOnly MemFlag = C.CL_MEM_HOST_READ_ONLY // OpenCL 1.2
- MemHostWriteOnly MemFlag = C.CL_MEM_HOST_WRITE_ONLY // OpenCL 1.2
- MemObjectTypeImage1D MemObjectType = C.CL_MEM_OBJECT_IMAGE1D
- MemObjectTypeImage1DArray MemObjectType = C.CL_MEM_OBJECT_IMAGE1D_ARRAY
- MemObjectTypeImage1DBuffer MemObjectType = C.CL_MEM_OBJECT_IMAGE1D_BUFFER
- MemObjectTypeImage2DArray MemObjectType = C.CL_MEM_OBJECT_IMAGE2D_ARRAY
- // This flag specifies that the region being mapped in the memory object is being mapped for writing.
- //
- // The contents of the region being mapped are to be discarded. This is typically the case when the
- // region being mapped is overwritten by the host. This flag allows the implementation to no longer
- // guarantee that the pointer returned by clEnqueueMapBuffer or clEnqueueMapImage contains the
- // latest bits in the region being mapped which can be a significant performance enhancement.
- MapFlagWriteInvalidateRegion MapFlag = C.CL_MAP_WRITE_INVALIDATE_REGION
-)
-
-func init() {
- errorMap[C.CL_COMPILE_PROGRAM_FAILURE] = ErrCompileProgramFailure
- errorMap[C.CL_DEVICE_PARTITION_FAILED] = ErrDevicePartitionFailed
- errorMap[C.CL_INVALID_COMPILER_OPTIONS] = ErrInvalidCompilerOptions
- errorMap[C.CL_INVALID_DEVICE_PARTITION_COUNT] = ErrInvalidDevicePartitionCount
- errorMap[C.CL_INVALID_IMAGE_DESCRIPTOR] = ErrInvalidImageDescriptor
- errorMap[C.CL_INVALID_LINKER_OPTIONS] = ErrInvalidLinkerOptions
- errorMap[C.CL_KERNEL_ARG_INFO_NOT_AVAILABLE] = ErrKernelArgInfoNotAvailable
- errorMap[C.CL_LINK_PROGRAM_FAILURE] = ErrLinkProgramFailure
- errorMap[C.CL_LINKER_NOT_AVAILABLE] = ErrLinkerNotAvailable
- channelOrderNameMap[ChannelOrderDepth] = "Depth"
- channelOrderNameMap[ChannelOrderDepthStencil] = "DepthStencil"
- channelDataTypeNameMap[ChannelDataTypeUNormInt24] = "UNormInt24"
-}
-
-type ImageDescription struct {
- Type MemObjectType
- Width, Height, Depth int
- ArraySize, RowPitch, SlicePitch int
- NumMipLevels, NumSamples int
- Buffer *MemObject
-}
-
-func (d ImageDescription) toCl() C.cl_image_desc {
- var desc C.cl_image_desc
- desc.image_type = C.cl_mem_object_type(d.Type)
- desc.image_width = C.size_t(d.Width)
- desc.image_height = C.size_t(d.Height)
- desc.image_depth = C.size_t(d.Depth)
- desc.image_array_size = C.size_t(d.ArraySize)
- desc.image_row_pitch = C.size_t(d.RowPitch)
- desc.image_slice_pitch = C.size_t(d.SlicePitch)
- desc.num_mip_levels = C.cl_uint(d.NumMipLevels)
- desc.num_samples = C.cl_uint(d.NumSamples)
- desc.buffer = nil
- if d.Buffer != nil {
- desc.buffer = d.Buffer.clMem
- }
- return desc
-}
diff --git a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/types_darwin.go b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/types_darwin.go
deleted file mode 100644
index ddcf74906..000000000
--- a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/types_darwin.go
+++ /dev/null
@@ -1,45 +0,0 @@
-package cl
-
-// #ifdef __APPLE__
-// #include "OpenCL/opencl.h"
-// #else
-// #include "cl.h"
-// #endif
-import "C"
-
-// Extension: cl_APPLE_fixed_alpha_channel_orders
-//
-// These selectors may be passed to clCreateImage2D() in the cl_image_format.image_channel_order field.
-// They are like CL_BGRA and CL_ARGB except that the alpha channel to be ignored. On calls to read_imagef,
-// the alpha will be 0xff (1.0f) if the sample falls in the image and 0 if it does not fall in the image.
-// On calls to write_imagef, the alpha value is ignored and 0xff (1.0f) is written. These formats are
-// currently only available for the CL_UNORM_INT8 cl_channel_type. They are intended to support legacy
-// image formats.
-const (
- ChannelOrder1RGBApple ChannelOrder = C.CL_1RGB_APPLE // Introduced in MacOS X.7.
- ChannelOrderBGR1Apple ChannelOrder = C.CL_BGR1_APPLE // Introduced in MacOS X.7.
-)
-
-// Extension: cl_APPLE_biased_fixed_point_image_formats
-//
-// This selector may be passed to clCreateImage2D() in the cl_image_format.image_channel_data_type field.
-// It defines a biased signed 1.14 fixed point storage format, with range [-1, 3). The conversion from
-// float to this fixed point format is defined as follows:
-//
-// ushort float_to_sfixed14( float x ){
-// int i = convert_int_sat_rte( x * 0x1.0p14f ); // scale [-1, 3.0) to [-16384, 3*16384), round to nearest integer
-// i = add_sat( i, 0x4000 ); // apply bias, to convert to [0, 65535) range
-// return convert_ushort_sat(i); // clamp to destination size
-// }
-//
-// The inverse conversion is the reverse process. The formats are currently only available on the CPU with
-// the CL_RGBA channel layout.
-const (
- ChannelDataTypeSFixed14Apple ChannelDataType = C.CL_SFIXED14_APPLE // Introduced in MacOS X.7.
-)
-
-func init() {
- channelOrderNameMap[ChannelOrder1RGBApple] = "1RGBApple"
- channelOrderNameMap[ChannelOrderBGR1Apple] = "RGB1Apple"
- channelDataTypeNameMap[ChannelDataTypeSFixed14Apple] = "SFixed14Apple"
-}
diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/ethash_opencl.go b/Godeps/_workspace/src/github.com/ethereum/ethash/ethash_opencl.go
deleted file mode 100644
index 451049eae..000000000
--- a/Godeps/_workspace/src/github.com/ethereum/ethash/ethash_opencl.go
+++ /dev/null
@@ -1,628 +0,0 @@
-// Copyright 2014 The go-ethereum Authors
-// This file is part of the go-ethereum library.
-//
-// The go-ethereum library is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Lesser General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// The go-ethereum library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
-
-// +build opencl
-
-package ethash
-
-//#cgo LDFLAGS: -w
-//#include <stdint.h>
-//#include <string.h>
-//#include "src/libethash/internal.h"
-import "C"
-
-import (
- crand "crypto/rand"
- "encoding/binary"
- "fmt"
- "math"
- "math/big"
- mrand "math/rand"
- "strconv"
- "strings"
- "sync"
- "sync/atomic"
- "time"
- "unsafe"
-
- "github.com/Gustav-Simonsson/go-opencl/cl"
- "github.com/ethereum/go-ethereum/common"
- "github.com/ethereum/go-ethereum/pow"
-)
-
-/*
-
- This code have two main entry points:
-
- 1. The initCL(...) function configures one or more OpenCL device
- (for now only GPU) and loads the Ethash DAG onto device memory
-
- 2. The Search(...) function loads a Ethash nonce into device(s) memory and
- executes the Ethash OpenCL kernel.
-
- Throughout the code, we refer to "host memory" and "device memory".
- For most systems (e.g. regular PC GPU miner) the host memory is RAM and
- device memory is the GPU global memory (e.g. GDDR5).
-
- References mentioned in code comments:
-
- 1. https://github.com/ethereum/wiki/wiki/Ethash
- 2. https://github.com/ethereum/cpp-ethereum/blob/develop/libethash-cl/ethash_cl_miner.cpp
- 3. https://www.khronos.org/registry/cl/sdk/1.2/docs/man/xhtml/
- 4. http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2013/12/AMD_OpenCL_Programming_User_Guide.pdf
-
-*/
-
-type OpenCLDevice struct {
- deviceId int
- device *cl.Device
- openCL11 bool // OpenCL version 1.1 and 1.2 are handled a bit different
- openCL12 bool
-
- dagBuf *cl.MemObject // Ethash full DAG in device mem
- headerBuf *cl.MemObject // Hash of block-to-mine in device mem
- searchBuffers []*cl.MemObject
-
- searchKernel *cl.Kernel
- hashKernel *cl.Kernel
-
- queue *cl.CommandQueue
- ctx *cl.Context
- workGroupSize int
-
- nonceRand *mrand.Rand // seeded by crypto/rand, see comments where it's initialised
- result common.Hash
-}
-
-type OpenCLMiner struct {
- mu sync.Mutex
-
- ethash *Ethash // Ethash full DAG & cache in host mem
-
- deviceIds []int
- devices []*OpenCLDevice
-
- dagSize uint64
-
- hashRate int32 // Go atomics & uint64 have some issues; int32 is supported on all platforms
-}
-
-type pendingSearch struct {
- bufIndex uint32
- startNonce uint64
-}
-
-const (
- SIZEOF_UINT32 = 4
-
- // See [1]
- ethashMixBytesLen = 128
- ethashAccesses = 64
-
- // See [4]
- workGroupSize = 32 // must be multiple of 8
- maxSearchResults = 63
- searchBufSize = 2
- globalWorkSize = 1024 * 256
-)
-
-func NewCL(deviceIds []int) *OpenCLMiner {
- ids := make([]int, len(deviceIds))
- copy(ids, deviceIds)
- return &OpenCLMiner{
- ethash: New(),
- dagSize: 0, // to see if we need to update DAG.
- deviceIds: ids,
- }
-}
-
-func PrintDevices() {
- fmt.Println("=============================================")
- fmt.Println("============ OpenCL Device Info =============")
- fmt.Println("=============================================")
-
- var found []*cl.Device
-
- platforms, err := cl.GetPlatforms()
- if err != nil {
- fmt.Println("Plaform error (check your OpenCL installation):", err)
- return
- }
-
- for i, p := range platforms {
- fmt.Println("Platform id ", i)
- fmt.Println("Platform Name ", p.Name())
- fmt.Println("Platform Vendor ", p.Vendor())
- fmt.Println("Platform Version ", p.Version())
- fmt.Println("Platform Extensions ", p.Extensions())
- fmt.Println("Platform Profile ", p.Profile())
- fmt.Println("")
-
- devices, err := cl.GetDevices(p, cl.DeviceTypeGPU)
- if err != nil {
- fmt.Println("Device error (check your GPU drivers) :", err)
- return
- }
-
- for _, d := range devices {
- fmt.Println("Device OpenCL id ", i)
- fmt.Println("Device id for mining ", len(found))
- fmt.Println("Device Name ", d.Name())
- fmt.Println("Vendor ", d.Vendor())
- fmt.Println("Version ", d.Version())
- fmt.Println("Driver version ", d.DriverVersion())
- fmt.Println("Address bits ", d.AddressBits())
- fmt.Println("Max clock freq ", d.MaxClockFrequency())
- fmt.Println("Global mem size ", d.GlobalMemSize())
- fmt.Println("Max constant buffer size", d.MaxConstantBufferSize())
- fmt.Println("Max mem alloc size ", d.MaxMemAllocSize())
- fmt.Println("Max compute units ", d.MaxComputeUnits())
- fmt.Println("Max work group size ", d.MaxWorkGroupSize())
- fmt.Println("Max work item sizes ", d.MaxWorkItemSizes())
- fmt.Println("=============================================")
-
- found = append(found, d)
- }
- }
- if len(found) == 0 {
- fmt.Println("Found no GPU(s). Check that your OS can see the GPU(s)")
- } else {
- var idsFormat string
- for i := 0; i < len(found); i++ {
- idsFormat += strconv.Itoa(i)
- if i != len(found)-1 {
- idsFormat += ","
- }
- }
- fmt.Printf("Found %v devices. Benchmark first GPU: geth gpubench 0\n", len(found))
- fmt.Printf("Mine using all GPUs: geth --minegpu %v\n", idsFormat)
- }
-}
-
-// See [2]. We basically do the same here, but the Go OpenCL bindings
-// are at a slightly higher abtraction level.
-func InitCL(blockNum uint64, c *OpenCLMiner) error {
- platforms, err := cl.GetPlatforms()
- if err != nil {
- return fmt.Errorf("Plaform error: %v\nCheck your OpenCL installation and then run geth gpuinfo", err)
- }
-
- var devices []*cl.Device
- for _, p := range platforms {
- ds, err := cl.GetDevices(p, cl.DeviceTypeGPU)
- if err != nil {
- return fmt.Errorf("Devices error: %v\nCheck your GPU drivers and then run geth gpuinfo", err)
- }
- for _, d := range ds {
- devices = append(devices, d)
- }
- }
-
- pow := New()
- _ = pow.getDAG(blockNum) // generates DAG if we don't have it
- pow.Light.getCache(blockNum) // and cache
-
- c.ethash = pow
- dagSize := uint64(C.ethash_get_datasize(C.uint64_t(blockNum)))
- c.dagSize = dagSize
-
- for _, id := range c.deviceIds {
- if id > len(devices)-1 {
- return fmt.Errorf("Device id not found. See available device ids with: geth gpuinfo")
- } else {
- err := initCLDevice(id, devices[id], c)
- if err != nil {
- return err
- }
- }
- }
- if len(c.devices) == 0 {
- return fmt.Errorf("No GPU devices found")
- }
- return nil
-}
-
-func initCLDevice(deviceId int, device *cl.Device, c *OpenCLMiner) error {
- devMaxAlloc := uint64(device.MaxMemAllocSize())
- devGlobalMem := uint64(device.GlobalMemSize())
-
- // TODO: more fine grained version logic
- if device.Version() == "OpenCL 1.0" {
- fmt.Println("Device OpenCL version not supported: ", device.Version())
- return fmt.Errorf("opencl version not supported")
- }
-
- var cl11, cl12 bool
- if device.Version() == "OpenCL 1.1" {
- cl11 = true
- }
- if device.Version() == "OpenCL 1.2" {
- cl12 = true
- }
-
- // log warnings but carry on; some device drivers report inaccurate values
- if c.dagSize > devGlobalMem {
- fmt.Printf("WARNING: device memory may be insufficient: %v. DAG size: %v.\n", devGlobalMem, c.dagSize)
- }
-
- if c.dagSize > devMaxAlloc {
- fmt.Printf("WARNING: DAG size (%v) larger than device max memory allocation size (%v).\n", c.dagSize, devMaxAlloc)
- fmt.Printf("You probably have to export GPU_MAX_ALLOC_PERCENT=95\n")
- }
-
- fmt.Printf("Initialising device %v: %v\n", deviceId, device.Name())
-
- context, err := cl.CreateContext([]*cl.Device{device})
- if err != nil {
- return fmt.Errorf("failed creating context: %v", err)
- }
-
- // TODO: test running with CL_QUEUE_PROFILING_ENABLE for profiling?
- queue, err := context.CreateCommandQueue(device, 0)
- if err != nil {
- return fmt.Errorf("command queue err: %v", err)
- }
-
- // See [4] section 3.2 and [3] "clBuildProgram".
- // The OpenCL kernel code is compiled at run-time.
- kvs := make(map[string]string, 4)
- kvs["GROUP_SIZE"] = strconv.FormatUint(workGroupSize, 10)
- kvs["DAG_SIZE"] = strconv.FormatUint(c.dagSize/ethashMixBytesLen, 10)
- kvs["ACCESSES"] = strconv.FormatUint(ethashAccesses, 10)
- kvs["MAX_OUTPUTS"] = strconv.FormatUint(maxSearchResults, 10)
- kernelCode := replaceWords(kernel, kvs)
-
- program, err := context.CreateProgramWithSource([]string{kernelCode})
- if err != nil {
- return fmt.Errorf("program err: %v", err)
- }
-
- /* if using AMD OpenCL impl, you can set this to debug on x86 CPU device.
- see AMD OpenCL programming guide section 4.2
-
- export in shell before running:
- export AMD_OCL_BUILD_OPTIONS_APPEND="-g -O0"
- export CPU_MAX_COMPUTE_UNITS=1
-
- buildOpts := "-g -cl-opt-disable"
-
- */
- buildOpts := ""
- err = program.BuildProgram([]*cl.Device{device}, buildOpts)
- if err != nil {
- return fmt.Errorf("program build err: %v", err)
- }
-
- var searchKernelName, hashKernelName string
- searchKernelName = "ethash_search"
- hashKernelName = "ethash_hash"
-
- searchKernel, err := program.CreateKernel(searchKernelName)
- hashKernel, err := program.CreateKernel(hashKernelName)
- if err != nil {
- return fmt.Errorf("kernel err: %v", err)
- }
-
- // TODO: when this DAG size appears, patch the Go bindings
- // (context.go) to work with uint64 as size_t
- if c.dagSize > math.MaxInt32 {
- fmt.Println("DAG too large for allocation.")
- return fmt.Errorf("DAG too large for alloc")
- }
-
- // TODO: patch up Go bindings to work with size_t, will overflow if > maxint32
- // TODO: fuck. shit's gonna overflow around 2017-06-09 12:17:02
- dagBuf := *(new(*cl.MemObject))
- dagBuf, err = context.CreateEmptyBuffer(cl.MemReadOnly, int(c.dagSize))
- if err != nil {
- return fmt.Errorf("allocating dag buf failed: %v", err)
- }
-
- // write DAG to device mem
- dagPtr := unsafe.Pointer(c.ethash.Full.current.ptr.data)
- _, err = queue.EnqueueWriteBuffer(dagBuf, true, 0, int(c.dagSize), dagPtr, nil)
- if err != nil {
- return fmt.Errorf("writing to dag buf failed: %v", err)
- }
-
- searchBuffers := make([]*cl.MemObject, searchBufSize)
- for i := 0; i < searchBufSize; i++ {
- searchBuff, err := context.CreateEmptyBuffer(cl.MemWriteOnly, (1+maxSearchResults)*SIZEOF_UINT32)
- if err != nil {
- return fmt.Errorf("search buffer err: %v", err)
- }
- searchBuffers[i] = searchBuff
- }
-
- headerBuf, err := context.CreateEmptyBuffer(cl.MemReadOnly, 32)
- if err != nil {
- return fmt.Errorf("header buffer err: %v", err)
- }
-
- // Unique, random nonces are crucial for mining efficieny.
- // While we do not need cryptographically secure PRNG for nonces,
- // we want to have uniform distribution and minimal repetition of nonces.
- // We could guarantee strict uniqueness of nonces by generating unique ranges,
- // but a int64 seed from crypto/rand should be good enough.
- // we then use math/rand for speed and to avoid draining OS entropy pool
- seed, err := crand.Int(crand.Reader, big.NewInt(math.MaxInt64))
- if err != nil {
- return err
- }
- nonceRand := mrand.New(mrand.NewSource(seed.Int64()))
-
- deviceStruct := &OpenCLDevice{
- deviceId: deviceId,
- device: device,
- openCL11: cl11,
- openCL12: cl12,
-
- dagBuf: dagBuf,
- headerBuf: headerBuf,
- searchBuffers: searchBuffers,
-
- searchKernel: searchKernel,
- hashKernel: hashKernel,
-
- queue: queue,
- ctx: context,
-
- workGroupSize: workGroupSize,
-
- nonceRand: nonceRand,
- }
- c.devices = append(c.devices, deviceStruct)
-
- return nil
-}
-
-func (c *OpenCLMiner) Search(block pow.Block, stop <-chan struct{}, index int) (uint64, []byte) {
- c.mu.Lock()
- newDagSize := uint64(C.ethash_get_datasize(C.uint64_t(block.NumberU64())))
- if newDagSize > c.dagSize {
- // TODO: clean up buffers from previous DAG?
- err := InitCL(block.NumberU64(), c)
- if err != nil {
- fmt.Println("OpenCL init error: ", err)
- return 0, []byte{0}
- }
- }
- defer c.mu.Unlock()
-
- // Avoid unneeded OpenCL initialisation if we received stop while running InitCL
- select {
- case <-stop:
- return 0, []byte{0}
- default:
- }
-
- headerHash := block.HashNoNonce()
- diff := block.Difficulty()
- target256 := new(big.Int).Div(maxUint256, diff)
- target64 := new(big.Int).Rsh(target256, 192).Uint64()
- var zero uint32 = 0
-
- d := c.devices[index]
-
- _, err := d.queue.EnqueueWriteBuffer(d.headerBuf, false, 0, 32, unsafe.Pointer(&headerHash[0]), nil)
- if err != nil {
- fmt.Println("Error in Search clEnqueueWriterBuffer : ", err)
- return 0, []byte{0}
- }
-
- for i := 0; i < searchBufSize; i++ {
- _, err := d.queue.EnqueueWriteBuffer(d.searchBuffers[i], false, 0, 4, unsafe.Pointer(&zero), nil)
- if err != nil {
- fmt.Println("Error in Search clEnqueueWriterBuffer : ", err)
- return 0, []byte{0}
- }
- }
-
- // wait for all search buffers to complete
- err = d.queue.Finish()
- if err != nil {
- fmt.Println("Error in Search clFinish : ", err)
- return 0, []byte{0}
- }
-
- err = d.searchKernel.SetArg(1, d.headerBuf)
- if err != nil {
- fmt.Println("Error in Search clSetKernelArg : ", err)
- return 0, []byte{0}
- }
-
- err = d.searchKernel.SetArg(2, d.dagBuf)
- if err != nil {
- fmt.Println("Error in Search clSetKernelArg : ", err)
- return 0, []byte{0}
- }
-
- err = d.searchKernel.SetArg(4, target64)
- if err != nil {
- fmt.Println("Error in Search clSetKernelArg : ", err)
- return 0, []byte{0}
- }
- err = d.searchKernel.SetArg(5, uint32(math.MaxUint32))
- if err != nil {
- fmt.Println("Error in Search clSetKernelArg : ", err)
- return 0, []byte{0}
- }
-
- // wait on this before returning
- var preReturnEvent *cl.Event
- if d.openCL12 {
- preReturnEvent, err = d.ctx.CreateUserEvent()
- if err != nil {
- fmt.Println("Error in Search create CL user event : ", err)
- return 0, []byte{0}
- }
- }
-
- pending := make([]pendingSearch, 0, searchBufSize)
- var p *pendingSearch
- searchBufIndex := uint32(0)
- var checkNonce uint64
- loops := int64(0)
- prevHashRate := int32(0)
- start := time.Now().UnixNano()
- // we grab a single random nonce and sets this as argument to the kernel search function
- // the device will then add each local threads gid to the nonce, creating a unique nonce
- // for each device computing unit executing in parallel
- initNonce := uint64(d.nonceRand.Int63())
- for nonce := initNonce; ; nonce += uint64(globalWorkSize) {
- select {
- case <-stop:
-
- /*
- if d.openCL12 {
- err = cl.WaitForEvents([]*cl.Event{preReturnEvent})
- if err != nil {
- fmt.Println("Error in Search WaitForEvents: ", err)
- }
- }
- */
-
- atomic.AddInt32(&c.hashRate, -prevHashRate)
- return 0, []byte{0}
- default:
- }
-
- if (loops % (1 << 7)) == 0 {
- elapsed := time.Now().UnixNano() - start
- // TODO: verify if this is correct hash rate calculation
- hashes := (float64(1e9) / float64(elapsed)) * float64(loops*1024*256)
- hashrateDiff := int32(hashes) - prevHashRate
- prevHashRate = int32(hashes)
- atomic.AddInt32(&c.hashRate, hashrateDiff)
- }
- loops++
-
- err = d.searchKernel.SetArg(0, d.searchBuffers[searchBufIndex])
- if err != nil {
- fmt.Println("Error in Search clSetKernelArg : ", err)
- return 0, []byte{0}
- }
- err = d.searchKernel.SetArg(3, nonce)
- if err != nil {
- fmt.Println("Error in Search clSetKernelArg : ", err)
- return 0, []byte{0}
- }
-
- // execute kernel
- _, err := d.queue.EnqueueNDRangeKernel(
- d.searchKernel,
- []int{0},
- []int{globalWorkSize},
- []int{d.workGroupSize},
- nil)
- if err != nil {
- fmt.Println("Error in Search clEnqueueNDRangeKernel : ", err)
- return 0, []byte{0}
- }
-
- pending = append(pending, pendingSearch{bufIndex: searchBufIndex, startNonce: nonce})
- searchBufIndex = (searchBufIndex + 1) % searchBufSize
-
- if len(pending) == searchBufSize {
- p = &(pending[searchBufIndex])
- cres, _, err := d.queue.EnqueueMapBuffer(d.searchBuffers[p.bufIndex], true,
- cl.MapFlagRead, 0, (1+maxSearchResults)*SIZEOF_UINT32,
- nil)
- if err != nil {
- fmt.Println("Error in Search clEnqueueMapBuffer: ", err)
- return 0, []byte{0}
- }
-
- results := cres.ByteSlice()
- nfound := binary.LittleEndian.Uint32(results)
- nfound = uint32(math.Min(float64(nfound), float64(maxSearchResults)))
- // OpenCL returns the offsets from the start nonce
- for i := uint32(0); i < nfound; i++ {
- lo := (i + 1) * SIZEOF_UINT32
- hi := (i + 2) * SIZEOF_UINT32
- upperNonce := uint64(binary.LittleEndian.Uint32(results[lo:hi]))
- checkNonce = p.startNonce + upperNonce
- if checkNonce != 0 {
- // We verify that the nonce is indeed a solution by
- // executing the Ethash verification function (on the CPU).
- cache := c.ethash.Light.getCache(block.NumberU64())
- ok, mixDigest, result := cache.compute(c.dagSize, headerHash, checkNonce)
-
- // TODO: return result first
- if ok && result.Big().Cmp(target256) <= 0 {
- _, err = d.queue.EnqueueUnmapMemObject(d.searchBuffers[p.bufIndex], cres, nil)
- if err != nil {
- fmt.Println("Error in Search clEnqueueUnmapMemObject: ", err)
- }
- if d.openCL12 {
- err = cl.WaitForEvents([]*cl.Event{preReturnEvent})
- if err != nil {
- fmt.Println("Error in Search WaitForEvents: ", err)
- }
- }
- return checkNonce, mixDigest.Bytes()
- }
- _, err := d.queue.EnqueueWriteBuffer(d.searchBuffers[p.bufIndex], false, 0, 4, unsafe.Pointer(&zero), nil)
- if err != nil {
- fmt.Println("Error in Search cl: EnqueueWriteBuffer", err)
- return 0, []byte{0}
- }
- }
- }
- _, err = d.queue.EnqueueUnmapMemObject(d.searchBuffers[p.bufIndex], cres, nil)
- if err != nil {
- fmt.Println("Error in Search clEnqueueUnMapMemObject: ", err)
- return 0, []byte{0}
- }
- pending = append(pending[:searchBufIndex], pending[searchBufIndex+1:]...)
- }
- }
- if d.openCL12 {
- err := cl.WaitForEvents([]*cl.Event{preReturnEvent})
- if err != nil {
- fmt.Println("Error in Search clWaitForEvents: ", err)
- return 0, []byte{0}
- }
- }
- return 0, []byte{0}
-}
-
-func (c *OpenCLMiner) Verify(block pow.Block) bool {
- return c.ethash.Light.Verify(block)
-}
-func (c *OpenCLMiner) GetHashrate() int64 {
- return int64(atomic.LoadInt32(&c.hashRate))
-}
-func (c *OpenCLMiner) Turbo(on bool) {
- // This is GPU mining. Always be turbo.
-}
-
-func replaceWords(text string, kvs map[string]string) string {
- for k, v := range kvs {
- text = strings.Replace(text, k, v, -1)
- }
- return text
-}
-
-func logErr(err error) {
- if err != nil {
- fmt.Println("Error in OpenCL call:", err)
- }
-}
-
-func argErr(err error) error {
- return fmt.Errorf("arg err: %v", err)
-}
diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/ethash_opencl_kernel_go_str.go b/Godeps/_workspace/src/github.com/ethereum/ethash/ethash_opencl_kernel_go_str.go
deleted file mode 100644
index 695ff1829..000000000
--- a/Godeps/_workspace/src/github.com/ethereum/ethash/ethash_opencl_kernel_go_str.go
+++ /dev/null
@@ -1,600 +0,0 @@
-package ethash
-
-/* DO NOT EDIT!!!
-
- This code is version controlled at
- https://github.com/ethereum/cpp-ethereum/blob/develop/libethash-cl/ethash_cl_miner_kernel.cl
-
- If needed change it there first, then copy over here.
-*/
-
-const kernel = `
-// author Tim Hughes <tim@twistedfury.com>
-// Tested on Radeon HD 7850
-// Hashrate: 15940347 hashes/s
-// Bandwidth: 124533 MB/s
-// search kernel should fit in <= 84 VGPRS (3 wavefronts)
-
-#define THREADS_PER_HASH (128 / 16)
-#define HASHES_PER_LOOP (GROUP_SIZE / THREADS_PER_HASH)
-
-#define FNV_PRIME 0x01000193
-
-__constant uint2 const Keccak_f1600_RC[24] = {
- (uint2)(0x00000001, 0x00000000),
- (uint2)(0x00008082, 0x00000000),
- (uint2)(0x0000808a, 0x80000000),
- (uint2)(0x80008000, 0x80000000),
- (uint2)(0x0000808b, 0x00000000),
- (uint2)(0x80000001, 0x00000000),
- (uint2)(0x80008081, 0x80000000),
- (uint2)(0x00008009, 0x80000000),
- (uint2)(0x0000008a, 0x00000000),
- (uint2)(0x00000088, 0x00000000),
- (uint2)(0x80008009, 0x00000000),
- (uint2)(0x8000000a, 0x00000000),
- (uint2)(0x8000808b, 0x00000000),
- (uint2)(0x0000008b, 0x80000000),
- (uint2)(0x00008089, 0x80000000),
- (uint2)(0x00008003, 0x80000000),
- (uint2)(0x00008002, 0x80000000),
- (uint2)(0x00000080, 0x80000000),
- (uint2)(0x0000800a, 0x00000000),
- (uint2)(0x8000000a, 0x80000000),
- (uint2)(0x80008081, 0x80000000),
- (uint2)(0x00008080, 0x80000000),
- (uint2)(0x80000001, 0x00000000),
- (uint2)(0x80008008, 0x80000000),
-};
-
-void keccak_f1600_round(uint2* a, uint r, uint out_size)
-{
- #if !__ENDIAN_LITTLE__
- for (uint i = 0; i != 25; ++i)
- a[i] = a[i].yx;
- #endif
-
- uint2 b[25];
- uint2 t;
-
- // Theta
- b[0] = a[0] ^ a[5] ^ a[10] ^ a[15] ^ a[20];
- b[1] = a[1] ^ a[6] ^ a[11] ^ a[16] ^ a[21];
- b[2] = a[2] ^ a[7] ^ a[12] ^ a[17] ^ a[22];
- b[3] = a[3] ^ a[8] ^ a[13] ^ a[18] ^ a[23];
- b[4] = a[4] ^ a[9] ^ a[14] ^ a[19] ^ a[24];
- t = b[4] ^ (uint2)(b[1].x << 1 | b[1].y >> 31, b[1].y << 1 | b[1].x >> 31);
- a[0] ^= t;
- a[5] ^= t;
- a[10] ^= t;
- a[15] ^= t;
- a[20] ^= t;
- t = b[0] ^ (uint2)(b[2].x << 1 | b[2].y >> 31, b[2].y << 1 | b[2].x >> 31);
- a[1] ^= t;
- a[6] ^= t;
- a[11] ^= t;
- a[16] ^= t;
- a[21] ^= t;
- t = b[1] ^ (uint2)(b[3].x << 1 | b[3].y >> 31, b[3].y << 1 | b[3].x >> 31);
- a[2] ^= t;
- a[7] ^= t;
- a[12] ^= t;
- a[17] ^= t;
- a[22] ^= t;
- t = b[2] ^ (uint2)(b[4].x << 1 | b[4].y >> 31, b[4].y << 1 | b[4].x >> 31);
- a[3] ^= t;
- a[8] ^= t;
- a[13] ^= t;
- a[18] ^= t;
- a[23] ^= t;
- t = b[3] ^ (uint2)(b[0].x << 1 | b[0].y >> 31, b[0].y << 1 | b[0].x >> 31);
- a[4] ^= t;
- a[9] ^= t;
- a[14] ^= t;
- a[19] ^= t;
- a[24] ^= t;
-
- // Rho Pi
- b[0] = a[0];
- b[10] = (uint2)(a[1].x << 1 | a[1].y >> 31, a[1].y << 1 | a[1].x >> 31);
- b[7] = (uint2)(a[10].x << 3 | a[10].y >> 29, a[10].y << 3 | a[10].x >> 29);
- b[11] = (uint2)(a[7].x << 6 | a[7].y >> 26, a[7].y << 6 | a[7].x >> 26);
- b[17] = (uint2)(a[11].x << 10 | a[11].y >> 22, a[11].y << 10 | a[11].x >> 22);
- b[18] = (uint2)(a[17].x << 15 | a[17].y >> 17, a[17].y << 15 | a[17].x >> 17);
- b[3] = (uint2)(a[18].x << 21 | a[18].y >> 11, a[18].y << 21 | a[18].x >> 11);
- b[5] = (uint2)(a[3].x << 28 | a[3].y >> 4, a[3].y << 28 | a[3].x >> 4);
- b[16] = (uint2)(a[5].y << 4 | a[5].x >> 28, a[5].x << 4 | a[5].y >> 28);
- b[8] = (uint2)(a[16].y << 13 | a[16].x >> 19, a[16].x << 13 | a[16].y >> 19);
- b[21] = (uint2)(a[8].y << 23 | a[8].x >> 9, a[8].x << 23 | a[8].y >> 9);
- b[24] = (uint2)(a[21].x << 2 | a[21].y >> 30, a[21].y << 2 | a[21].x >> 30);
- b[4] = (uint2)(a[24].x << 14 | a[24].y >> 18, a[24].y << 14 | a[24].x >> 18);
- b[15] = (uint2)(a[4].x << 27 | a[4].y >> 5, a[4].y << 27 | a[4].x >> 5);
- b[23] = (uint2)(a[15].y << 9 | a[15].x >> 23, a[15].x << 9 | a[15].y >> 23);
- b[19] = (uint2)(a[23].y << 24 | a[23].x >> 8, a[23].x << 24 | a[23].y >> 8);
- b[13] = (uint2)(a[19].x << 8 | a[19].y >> 24, a[19].y << 8 | a[19].x >> 24);
- b[12] = (uint2)(a[13].x << 25 | a[13].y >> 7, a[13].y << 25 | a[13].x >> 7);
- b[2] = (uint2)(a[12].y << 11 | a[12].x >> 21, a[12].x << 11 | a[12].y >> 21);
- b[20] = (uint2)(a[2].y << 30 | a[2].x >> 2, a[2].x << 30 | a[2].y >> 2);
- b[14] = (uint2)(a[20].x << 18 | a[20].y >> 14, a[20].y << 18 | a[20].x >> 14);
- b[22] = (uint2)(a[14].y << 7 | a[14].x >> 25, a[14].x << 7 | a[14].y >> 25);
- b[9] = (uint2)(a[22].y << 29 | a[22].x >> 3, a[22].x << 29 | a[22].y >> 3);
- b[6] = (uint2)(a[9].x << 20 | a[9].y >> 12, a[9].y << 20 | a[9].x >> 12);
- b[1] = (uint2)(a[6].y << 12 | a[6].x >> 20, a[6].x << 12 | a[6].y >> 20);
-
- // Chi
- a[0] = bitselect(b[0] ^ b[2], b[0], b[1]);
- a[1] = bitselect(b[1] ^ b[3], b[1], b[2]);
- a[2] = bitselect(b[2] ^ b[4], b[2], b[3]);
- a[3] = bitselect(b[3] ^ b[0], b[3], b[4]);
- if (out_size >= 4)
- {
- a[4] = bitselect(b[4] ^ b[1], b[4], b[0]);
- a[5] = bitselect(b[5] ^ b[7], b[5], b[6]);
- a[6] = bitselect(b[6] ^ b[8], b[6], b[7]);
- a[7] = bitselect(b[7] ^ b[9], b[7], b[8]);
- a[8] = bitselect(b[8] ^ b[5], b[8], b[9]);
- if (out_size >= 8)
- {
- a[9] = bitselect(b[9] ^ b[6], b[9], b[5]);
- a[10] = bitselect(b[10] ^ b[12], b[10], b[11]);
- a[11] = bitselect(b[11] ^ b[13], b[11], b[12]);
- a[12] = bitselect(b[12] ^ b[14], b[12], b[13]);
- a[13] = bitselect(b[13] ^ b[10], b[13], b[14]);
- a[14] = bitselect(b[14] ^ b[11], b[14], b[10]);
- a[15] = bitselect(b[15] ^ b[17], b[15], b[16]);
- a[16] = bitselect(b[16] ^ b[18], b[16], b[17]);
- a[17] = bitselect(b[17] ^ b[19], b[17], b[18]);
- a[18] = bitselect(b[18] ^ b[15], b[18], b[19]);
- a[19] = bitselect(b[19] ^ b[16], b[19], b[15]);
- a[20] = bitselect(b[20] ^ b[22], b[20], b[21]);
- a[21] = bitselect(b[21] ^ b[23], b[21], b[22]);
- a[22] = bitselect(b[22] ^ b[24], b[22], b[23]);
- a[23] = bitselect(b[23] ^ b[20], b[23], b[24]);
- a[24] = bitselect(b[24] ^ b[21], b[24], b[20]);
- }
- }
-
- // Iota
- a[0] ^= Keccak_f1600_RC[r];
-
- #if !__ENDIAN_LITTLE__
- for (uint i = 0; i != 25; ++i)
- a[i] = a[i].yx;
- #endif
-}
-
-void keccak_f1600_no_absorb(ulong* a, uint in_size, uint out_size, uint isolate)
-{
- for (uint i = in_size; i != 25; ++i)
- {
- a[i] = 0;
- }
-#if __ENDIAN_LITTLE__
- a[in_size] ^= 0x0000000000000001;
- a[24-out_size*2] ^= 0x8000000000000000;
-#else
- a[in_size] ^= 0x0100000000000000;
- a[24-out_size*2] ^= 0x0000000000000080;
-#endif
-
- // Originally I unrolled the first and last rounds to interface
- // better with surrounding code, however I haven't done this
- // without causing the AMD compiler to blow up the VGPR usage.
- uint r = 0;
- do
- {
- // This dynamic branch stops the AMD compiler unrolling the loop
- // and additionally saves about 33% of the VGPRs, enough to gain another
- // wavefront. Ideally we'd get 4 in flight, but 3 is the best I can
- // massage out of the compiler. It doesn't really seem to matter how
- // much we try and help the compiler save VGPRs because it seems to throw
- // that information away, hence the implementation of keccak here
- // doesn't bother.
- if (isolate)
- {
- keccak_f1600_round((uint2*)a, r++, 25);
- }
- }
- while (r < 23);
-
- // final round optimised for digest size
- keccak_f1600_round((uint2*)a, r++, out_size);
-}
-
-#define copy(dst, src, count) for (uint i = 0; i != count; ++i) { (dst)[i] = (src)[i]; }
-
-#define countof(x) (sizeof(x) / sizeof(x[0]))
-
-uint fnv(uint x, uint y)
-{
- return x * FNV_PRIME ^ y;
-}
-
-uint4 fnv4(uint4 x, uint4 y)
-{
- return x * FNV_PRIME ^ y;
-}
-
-uint fnv_reduce(uint4 v)
-{
- return fnv(fnv(fnv(v.x, v.y), v.z), v.w);
-}
-
-typedef union
-{
- ulong ulongs[32 / sizeof(ulong)];
- uint uints[32 / sizeof(uint)];
-} hash32_t;
-
-typedef union
-{
- ulong ulongs[64 / sizeof(ulong)];
- uint4 uint4s[64 / sizeof(uint4)];
-} hash64_t;
-
-typedef union
-{
- uint uints[128 / sizeof(uint)];
- uint4 uint4s[128 / sizeof(uint4)];
-} hash128_t;
-
-hash64_t init_hash(__constant hash32_t const* header, ulong nonce, uint isolate)
-{
- hash64_t init;
- uint const init_size = countof(init.ulongs);
- uint const hash_size = countof(header->ulongs);
-
- // sha3_512(header .. nonce)
- ulong state[25];
- copy(state, header->ulongs, hash_size);
- state[hash_size] = nonce;
- keccak_f1600_no_absorb(state, hash_size + 1, init_size, isolate);
-
- copy(init.ulongs, state, init_size);
- return init;
-}
-
-uint inner_loop_chunks(uint4 init, uint thread_id, __local uint* share, __global hash128_t const* g_dag, __global hash128_t const* g_dag1, __global hash128_t const* g_dag2, __global hash128_t const* g_dag3, uint isolate)
-{
- uint4 mix = init;
-
- // share init0
- if (thread_id == 0)
- *share = mix.x;
- barrier(CLK_LOCAL_MEM_FENCE);
- uint init0 = *share;
-
- uint a = 0;
- do
- {
- bool update_share = thread_id == (a/4) % THREADS_PER_HASH;
-
- #pragma unroll
- for (uint i = 0; i != 4; ++i)
- {
- if (update_share)
- {
- uint m[4] = { mix.x, mix.y, mix.z, mix.w };
- *share = fnv(init0 ^ (a+i), m[i]) % DAG_SIZE;
- }
- barrier(CLK_LOCAL_MEM_FENCE);
-
- mix = fnv4(mix, *share>=3 * DAG_SIZE / 4 ? g_dag3[*share - 3 * DAG_SIZE / 4].uint4s[thread_id] : *share>=DAG_SIZE / 2 ? g_dag2[*share - DAG_SIZE / 2].uint4s[thread_id] : *share>=DAG_SIZE / 4 ? g_dag1[*share - DAG_SIZE / 4].uint4s[thread_id]:g_dag[*share].uint4s[thread_id]);
- }
- } while ((a += 4) != (ACCESSES & isolate));
-
- return fnv_reduce(mix);
-}
-
-
-
-uint inner_loop(uint4 init, uint thread_id, __local uint* share, __global hash128_t const* g_dag, uint isolate)
-{
- uint4 mix = init;
-
- // share init0
- if (thread_id == 0)
- *share = mix.x;
- barrier(CLK_LOCAL_MEM_FENCE);
- uint init0 = *share;
-
- uint a = 0;
- do
- {
- bool update_share = thread_id == (a/4) % THREADS_PER_HASH;
-
- #pragma unroll
- for (uint i = 0; i != 4; ++i)
- {
- if (update_share)
- {
- uint m[4] = { mix.x, mix.y, mix.z, mix.w };
- *share = fnv(init0 ^ (a+i), m[i]) % DAG_SIZE;
- }
- barrier(CLK_LOCAL_MEM_FENCE);
-
- mix = fnv4(mix, g_dag[*share].uint4s[thread_id]);
- }
- }
- while ((a += 4) != (ACCESSES & isolate));
-
- return fnv_reduce(mix);
-}
-
-
-hash32_t final_hash(hash64_t const* init, hash32_t const* mix, uint isolate)
-{
- ulong state[25];
-
- hash32_t hash;
- uint const hash_size = countof(hash.ulongs);
- uint const init_size = countof(init->ulongs);
- uint const mix_size = countof(mix->ulongs);
-
- // keccak_256(keccak_512(header..nonce) .. mix);
- copy(state, init->ulongs, init_size);
- copy(state + init_size, mix->ulongs, mix_size);
- keccak_f1600_no_absorb(state, init_size+mix_size, hash_size, isolate);
-
- // copy out
- copy(hash.ulongs, state, hash_size);
- return hash;
-}
-
-hash32_t compute_hash_simple(
- __constant hash32_t const* g_header,
- __global hash128_t const* g_dag,
- ulong nonce,
- uint isolate
- )
-{
- hash64_t init = init_hash(g_header, nonce, isolate);
-
- hash128_t mix;
- for (uint i = 0; i != countof(mix.uint4s); ++i)
- {
- mix.uint4s[i] = init.uint4s[i % countof(init.uint4s)];
- }
-
- uint mix_val = mix.uints[0];
- uint init0 = mix.uints[0];
- uint a = 0;
- do
- {
- uint pi = fnv(init0 ^ a, mix_val) % DAG_SIZE;
- uint n = (a+1) % countof(mix.uints);
-
- #pragma unroll
- for (uint i = 0; i != countof(mix.uints); ++i)
- {
- mix.uints[i] = fnv(mix.uints[i], g_dag[pi].uints[i]);
- mix_val = i == n ? mix.uints[i] : mix_val;
- }
- }
- while (++a != (ACCESSES & isolate));
-
- // reduce to output
- hash32_t fnv_mix;
- for (uint i = 0; i != countof(fnv_mix.uints); ++i)
- {
- fnv_mix.uints[i] = fnv_reduce(mix.uint4s[i]);
- }
-
- return final_hash(&init, &fnv_mix, isolate);
-}
-
-typedef union
-{
- struct
- {
- hash64_t init;
- uint pad; // avoid lds bank conflicts
- };
- hash32_t mix;
-} compute_hash_share;
-
-
-hash32_t compute_hash(
- __local compute_hash_share* share,
- __constant hash32_t const* g_header,
- __global hash128_t const* g_dag,
- ulong nonce,
- uint isolate
- )
-{
- uint const gid = get_global_id(0);
-
- // Compute one init hash per work item.
- hash64_t init = init_hash(g_header, nonce, isolate);
-
- // Threads work together in this phase in groups of 8.
- uint const thread_id = gid % THREADS_PER_HASH;
- uint const hash_id = (gid % GROUP_SIZE) / THREADS_PER_HASH;
-
- hash32_t mix;
- uint i = 0;
- do
- {
- // share init with other threads
- if (i == thread_id)
- share[hash_id].init = init;
- barrier(CLK_LOCAL_MEM_FENCE);
-
- uint4 thread_init = share[hash_id].init.uint4s[thread_id % (64 / sizeof(uint4))];
- barrier(CLK_LOCAL_MEM_FENCE);
-
- uint thread_mix = inner_loop(thread_init, thread_id, share[hash_id].mix.uints, g_dag, isolate);
-
- share[hash_id].mix.uints[thread_id] = thread_mix;
- barrier(CLK_LOCAL_MEM_FENCE);
-
- if (i == thread_id)
- mix = share[hash_id].mix;
- barrier(CLK_LOCAL_MEM_FENCE);
- }
- while (++i != (THREADS_PER_HASH & isolate));
-
- return final_hash(&init, &mix, isolate);
-}
-
-
-hash32_t compute_hash_chunks(
- __local compute_hash_share* share,
- __constant hash32_t const* g_header,
- __global hash128_t const* g_dag,
- __global hash128_t const* g_dag1,
- __global hash128_t const* g_dag2,
- __global hash128_t const* g_dag3,
- ulong nonce,
- uint isolate
- )
-{
- uint const gid = get_global_id(0);
-
- // Compute one init hash per work item.
- hash64_t init = init_hash(g_header, nonce, isolate);
-
- // Threads work together in this phase in groups of 8.
- uint const thread_id = gid % THREADS_PER_HASH;
- uint const hash_id = (gid % GROUP_SIZE) / THREADS_PER_HASH;
-
- hash32_t mix;
- uint i = 0;
- do
- {
- // share init with other threads
- if (i == thread_id)
- share[hash_id].init = init;
- barrier(CLK_LOCAL_MEM_FENCE);
-
- uint4 thread_init = share[hash_id].init.uint4s[thread_id % (64 / sizeof(uint4))];
- barrier(CLK_LOCAL_MEM_FENCE);
-
- uint thread_mix = inner_loop_chunks(thread_init, thread_id, share[hash_id].mix.uints, g_dag, g_dag1, g_dag2, g_dag3, isolate);
-
- share[hash_id].mix.uints[thread_id] = thread_mix;
- barrier(CLK_LOCAL_MEM_FENCE);
-
- if (i == thread_id)
- mix = share[hash_id].mix;
- barrier(CLK_LOCAL_MEM_FENCE);
- }
- while (++i != (THREADS_PER_HASH & isolate));
-
- return final_hash(&init, &mix, isolate);
-}
-
-__attribute__((reqd_work_group_size(GROUP_SIZE, 1, 1)))
-__kernel void ethash_hash_simple(
- __global hash32_t* g_hashes,
- __constant hash32_t const* g_header,
- __global hash128_t const* g_dag,
- ulong start_nonce,
- uint isolate
- )
-{
- uint const gid = get_global_id(0);
- g_hashes[gid] = compute_hash_simple(g_header, g_dag, start_nonce + gid, isolate);
-}
-
-__attribute__((reqd_work_group_size(GROUP_SIZE, 1, 1)))
-__kernel void ethash_search_simple(
- __global volatile uint* restrict g_output,
- __constant hash32_t const* g_header,
- __global hash128_t const* g_dag,
- ulong start_nonce,
- ulong target,
- uint isolate
- )
-{
- uint const gid = get_global_id(0);
- hash32_t hash = compute_hash_simple(g_header, g_dag, start_nonce + gid, isolate);
-
- if (hash.ulongs[countof(hash.ulongs)-1] < target)
- {
- uint slot = min(convert_uint(MAX_OUTPUTS), convert_uint(atomic_inc(&g_output[0]) + 1));
- g_output[slot] = gid;
- }
-}
-
-
-__attribute__((reqd_work_group_size(GROUP_SIZE, 1, 1)))
-__kernel void ethash_hash(
- __global hash32_t* g_hashes,
- __constant hash32_t const* g_header,
- __global hash128_t const* g_dag,
- ulong start_nonce,
- uint isolate
- )
-{
- __local compute_hash_share share[HASHES_PER_LOOP];
-
- uint const gid = get_global_id(0);
- g_hashes[gid] = compute_hash(share, g_header, g_dag, start_nonce + gid, isolate);
-}
-
-__attribute__((reqd_work_group_size(GROUP_SIZE, 1, 1)))
-__kernel void ethash_search(
- __global volatile uint* restrict g_output,
- __constant hash32_t const* g_header,
- __global hash128_t const* g_dag,
- ulong start_nonce,
- ulong target,
- uint isolate
- )
-{
- __local compute_hash_share share[HASHES_PER_LOOP];
-
- uint const gid = get_global_id(0);
- hash32_t hash = compute_hash(share, g_header, g_dag, start_nonce + gid, isolate);
-
- if (as_ulong(as_uchar8(hash.ulongs[0]).s76543210) < target)
- {
- uint slot = min((uint)MAX_OUTPUTS, atomic_inc(&g_output[0]) + 1);
- g_output[slot] = gid;
- }
-}
-
-__attribute__((reqd_work_group_size(GROUP_SIZE, 1, 1)))
-__kernel void ethash_hash_chunks(
- __global hash32_t* g_hashes,
- __constant hash32_t const* g_header,
- __global hash128_t const* g_dag,
- __global hash128_t const* g_dag1,
- __global hash128_t const* g_dag2,
- __global hash128_t const* g_dag3,
- ulong start_nonce,
- uint isolate
- )
-{
- __local compute_hash_share share[HASHES_PER_LOOP];
-
- uint const gid = get_global_id(0);
- g_hashes[gid] = compute_hash_chunks(share, g_header, g_dag, g_dag1, g_dag2, g_dag3,start_nonce + gid, isolate);
-}
-
-__attribute__((reqd_work_group_size(GROUP_SIZE, 1, 1)))
-__kernel void ethash_search_chunks(
- __global volatile uint* restrict g_output,
- __constant hash32_t const* g_header,
- __global hash128_t const* g_dag,
- __global hash128_t const* g_dag1,
- __global hash128_t const* g_dag2,
- __global hash128_t const* g_dag3,
- ulong start_nonce,
- ulong target,
- uint isolate
- )
-{
- __local compute_hash_share share[HASHES_PER_LOOP];
-
- uint const gid = get_global_id(0);
- hash32_t hash = compute_hash_chunks(share, g_header, g_dag, g_dag1, g_dag2, g_dag3, start_nonce + gid, isolate);
-
- if (as_ulong(as_uchar8(hash.ulongs[0]).s76543210) < target)
- {
- uint slot = min(convert_uint(MAX_OUTPUTS), convert_uint(atomic_inc(&g_output[0]) + 1));
- g_output[slot] = gid;
- }
-}
-`
diff --git a/Godeps/_workspace/src/github.com/fatih/color/.travis.yml b/Godeps/_workspace/src/github.com/fatih/color/.travis.yml
deleted file mode 100644
index 2405aef3a..000000000
--- a/Godeps/_workspace/src/github.com/fatih/color/.travis.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-language: go
-go: 1.3
-
diff --git a/Godeps/_workspace/src/github.com/gizak/termui/debug/debuger.go b/Godeps/_workspace/src/github.com/gizak/termui/debug/debuger.go
deleted file mode 100644
index f723b9686..000000000
--- a/Godeps/_workspace/src/github.com/gizak/termui/debug/debuger.go
+++ /dev/null
@@ -1,117 +0,0 @@
-// Copyright 2016 Zack Guo <gizak@icloud.com>. All rights reserved.
-// Use of this source code is governed by a MIT license that can
-// be found in the LICENSE file.
-
-package debug
-
-import (
- "fmt"
- "net/http"
-
- "golang.org/x/net/websocket"
-)
-
-type Server struct {
- Port string
- Addr string
- Path string
- Msg chan string
- chs []chan string
-}
-
-type Client struct {
- Port string
- Addr string
- Path string
- ws *websocket.Conn
-}
-
-var defaultPort = ":8080"
-
-func NewServer() *Server {
- return &Server{
- Port: defaultPort,
- Addr: "localhost",
- Path: "/echo",
- Msg: make(chan string),
- chs: make([]chan string, 0),
- }
-}
-
-func NewClient() Client {
- return Client{
- Port: defaultPort,
- Addr: "localhost",
- Path: "/echo",
- }
-}
-
-func (c Client) ConnectAndListen() error {
- ws, err := websocket.Dial("ws://"+c.Addr+c.Port+c.Path, "", "http://"+c.Addr)
- if err != nil {
- return err
- }
- defer ws.Close()
-
- var m string
- for {
- err := websocket.Message.Receive(ws, &m)
- if err != nil {
- fmt.Print(err)
- return err
- }
- fmt.Print(m)
- }
-}
-
-func (s *Server) ListenAndServe() error {
- http.Handle(s.Path, websocket.Handler(func(ws *websocket.Conn) {
- defer ws.Close()
-
- mc := make(chan string)
- s.chs = append(s.chs, mc)
-
- for m := range mc {
- websocket.Message.Send(ws, m)
- }
- }))
-
- go func() {
- for msg := range s.Msg {
- for _, c := range s.chs {
- go func(a chan string) {
- a <- msg
- }(c)
- }
- }
- }()
-
- return http.ListenAndServe(s.Port, nil)
-}
-
-func (s *Server) Log(msg string) {
- go func() { s.Msg <- msg }()
-}
-
-func (s *Server) Logf(format string, a ...interface{}) {
- s.Log(fmt.Sprintf(format, a...))
-}
-
-var DefaultServer = NewServer()
-var DefaultClient = NewClient()
-
-func ListenAndServe() error {
- return DefaultServer.ListenAndServe()
-}
-
-func ConnectAndListen() error {
- return DefaultClient.ConnectAndListen()
-}
-
-func Log(msg string) {
- DefaultServer.Log(msg)
-}
-
-func Logf(format string, a ...interface{}) {
- DefaultServer.Logf(format, a...)
-}
diff --git a/Godeps/_workspace/src/github.com/gizak/termui/test/runtest.go b/Godeps/_workspace/src/github.com/gizak/termui/test/runtest.go
deleted file mode 100644
index 99794c4db..000000000
--- a/Godeps/_workspace/src/github.com/gizak/termui/test/runtest.go
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright 2016 Zack Guo <gizak@icloud.com>. All rights reserved.
-// Use of this source code is governed by a MIT license that can
-// be found in the LICENSE file.
-
-package main
-
-import (
- "fmt"
- "os"
-
- "github.com/gizak/termui"
- "github.com/gizak/termui/debug"
-)
-
-func main() {
- // run as client
- if len(os.Args) > 1 {
- fmt.Print(debug.ConnectAndListen())
- return
- }
-
- // run as server
- go func() { panic(debug.ListenAndServe()) }()
-
- if err := termui.Init(); err != nil {
- panic(err)
- }
- defer termui.Close()
-
- //termui.UseTheme("helloworld")
- b := termui.NewBlock()
- b.Width = 20
- b.Height = 20
- b.Float = termui.AlignCenter
- b.BorderLabel = "[HELLO](fg-red,bg-white) [WORLD](fg-blue,bg-green)"
-
- termui.Render(b)
-
- termui.Handle("/sys", func(e termui.Event) {
- k, ok := e.Data.(termui.EvtKbd)
- debug.Logf("->%v\n", e)
- if ok && k.KeyStr == "q" {
- termui.StopLoop()
- }
- })
-
- termui.Handle(("/usr"), func(e termui.Event) {
- debug.Logf("->%v\n", e)
- })
-
- termui.Handle("/timer/1s", func(e termui.Event) {
- t := e.Data.(termui.EvtTimer)
- termui.SendCustomEvt("/usr/t", t.Count)
-
- if t.Count%2 == 0 {
- b.BorderLabel = "[HELLO](fg-red,bg-green) [WORLD](fg-blue,bg-white)"
- } else {
- b.BorderLabel = "[HELLO](fg-blue,bg-white) [WORLD](fg-red,bg-green)"
- }
-
- termui.Render(b)
-
- })
-
- termui.Loop()
-}
diff --git a/Godeps/_workspace/src/github.com/golang/snappy/README b/Godeps/_workspace/src/github.com/golang/snappy/README
deleted file mode 100644
index 5074bbab8..000000000
--- a/Godeps/_workspace/src/github.com/golang/snappy/README
+++ /dev/null
@@ -1,7 +0,0 @@
-The Snappy compression format in the Go programming language.
-
-To download and install from source:
-$ go get github.com/golang/snappy
-
-Unless otherwise noted, the Snappy-Go source files are distributed
-under the BSD-style license found in the LICENSE file.
diff --git a/Godeps/_workspace/src/github.com/huin/goupnp/cmd/example_httpu_serving/example_httpu_serving.go b/Godeps/_workspace/src/github.com/huin/goupnp/cmd/example_httpu_serving/example_httpu_serving.go
deleted file mode 100644
index d9d9daa93..000000000
--- a/Godeps/_workspace/src/github.com/huin/goupnp/cmd/example_httpu_serving/example_httpu_serving.go
+++ /dev/null
@@ -1,20 +0,0 @@
-package main
-
-import (
- "log"
- "net/http"
-
- "github.com/huin/goupnp/httpu"
-)
-
-func main() {
- srv := httpu.Server{
- Addr: "239.255.255.250:1900",
- Multicast: true,
- Handler: httpu.HandlerFunc(func(r *http.Request) {
- log.Printf("Got %s %s message from %v: %v", r.Method, r.URL.Path, r.RemoteAddr, r.Header)
- }),
- }
- err := srv.ListenAndServe()
- log.Printf("Serving failed with error: %v", err)
-}
diff --git a/Godeps/_workspace/src/github.com/huin/goupnp/cmd/example_internetgateway1/example_internetgateway1.go b/Godeps/_workspace/src/github.com/huin/goupnp/cmd/example_internetgateway1/example_internetgateway1.go
deleted file mode 100644
index 29e8adc8b..000000000
--- a/Godeps/_workspace/src/github.com/huin/goupnp/cmd/example_internetgateway1/example_internetgateway1.go
+++ /dev/null
@@ -1,67 +0,0 @@
-package main
-
-import (
- "fmt"
- "log"
-
- "github.com/huin/goupnp/dcps/internetgateway1"
-)
-
-func main() {
- clients, errors, err := internetgateway1.NewWANPPPConnection1Clients()
- if err != nil {
- log.Fatal(err)
- }
-
- fmt.Printf("Got %d errors finding servers and %d successfully discovered.\n",
- len(errors), len(clients))
- for i, e := range errors {
- fmt.Printf("Error finding server #%d: %v\n", i+1, e)
- }
-
- for _, c := range clients {
- dev := &c.ServiceClient.RootDevice.Device
- srv := c.ServiceClient.Service
- fmt.Println(dev.FriendlyName, " :: ", srv.String())
- scpd, err := srv.RequestSCDP()
- if err != nil {
- fmt.Printf(" Error requesting service SCPD: %v\n", err)
- } else {
- fmt.Println(" Available actions:")
- for _, action := range scpd.Actions {
- fmt.Printf(" * %s\n", action.Name)
- for _, arg := range action.Arguments {
- var varDesc string
- if stateVar := scpd.GetStateVariable(arg.RelatedStateVariable); stateVar != nil {
- varDesc = fmt.Sprintf(" (%s)", stateVar.DataType.Name)
- }
- fmt.Printf(" * [%s] %s%s\n", arg.Direction, arg.Name, varDesc)
- }
- }
- }
-
- if scpd == nil || scpd.GetAction("GetExternalIPAddress") != nil {
- ip, err := c.GetExternalIPAddress()
- fmt.Println("GetExternalIPAddress: ", ip, err)
- }
-
- if scpd == nil || scpd.GetAction("GetStatusInfo") != nil {
- status, lastErr, uptime, err := c.GetStatusInfo()
- fmt.Println("GetStatusInfo: ", status, lastErr, uptime, err)
- }
-
- if scpd == nil || scpd.GetAction("GetIdleDisconnectTime") != nil {
- idleTime, err := c.GetIdleDisconnectTime()
- fmt.Println("GetIdleDisconnectTime: ", idleTime, err)
- }
-
- if scpd == nil || scpd.GetAction("AddPortMapping") != nil {
- err := c.AddPortMapping("", 5000, "TCP", 5001, "192.168.1.2", true, "Test port mapping", 0)
- fmt.Println("AddPortMapping: ", err)
- }
- if scpd == nil || scpd.GetAction("DeletePortMapping") != nil {
- err := c.DeletePortMapping("", 5000, "TCP")
- fmt.Println("DeletePortMapping: ", err)
- }
- }
-}
diff --git a/Godeps/_workspace/src/github.com/huin/goupnp/cmd/example_ssdp_registry/example_ssdp_registry.go b/Godeps/_workspace/src/github.com/huin/goupnp/cmd/example_ssdp_registry/example_ssdp_registry.go
deleted file mode 100644
index 05f0df003..000000000
--- a/Godeps/_workspace/src/github.com/huin/goupnp/cmd/example_ssdp_registry/example_ssdp_registry.go
+++ /dev/null
@@ -1,27 +0,0 @@
-package main
-
-import (
- "log"
-
- "github.com/huin/goupnp/ssdp"
-)
-
-func main() {
- c := make(chan ssdp.Update)
- srv, reg := ssdp.NewServerAndRegistry()
- reg.AddListener(c)
- go listener(c)
- if err := srv.ListenAndServe(); err != nil {
- log.Print("ListenAndServe failed: ", err)
- }
-}
-
-func listener(c <-chan ssdp.Update) {
- for u := range c {
- if u.Entry != nil {
- log.Printf("Event: %v USN: %s Entry: %#v", u.EventType, u.USN, *u.Entry)
- } else {
- log.Printf("Event: %v USN: %s Entry: <nil>", u.EventType, u.USN)
- }
- }
-}
diff --git a/Godeps/_workspace/src/github.com/huin/goupnp/dcps/av1/av1.go b/Godeps/_workspace/src/github.com/huin/goupnp/dcps/av1/av1.go
deleted file mode 100644
index 5f9683d1f..000000000
--- a/Godeps/_workspace/src/github.com/huin/goupnp/dcps/av1/av1.go
+++ /dev/null
@@ -1,8452 +0,0 @@
-// Client for UPnP Device Control Protocol MediaServer v1 and MediaRenderer v1.
-//
-// This DCP is documented in detail at: http://upnp.org/specs/av/av1/
-//
-// Typically, use one of the New* functions to create clients for services.
-package av1
-
-// Generated file - do not edit by hand. See README.md
-
-import (
- "net/url"
- "time"
-
- "github.com/huin/goupnp"
- "github.com/huin/goupnp/soap"
-)
-
-// Hack to avoid Go complaining if time isn't used.
-var _ time.Time
-
-// Device URNs:
-const ()
-
-// Service URNs:
-const (
- URN_AVTransport_1 = "urn:schemas-upnp-org:service:AVTransport:1"
- URN_AVTransport_2 = "urn:schemas-upnp-org:service:AVTransport:2"
- URN_ConnectionManager_1 = "urn:schemas-upnp-org:service:ConnectionManager:1"
- URN_ConnectionManager_2 = "urn:schemas-upnp-org:service:ConnectionManager:2"
- URN_ContentDirectory_1 = "urn:schemas-upnp-org:service:ContentDirectory:1"
- URN_ContentDirectory_2 = "urn:schemas-upnp-org:service:ContentDirectory:2"
- URN_ContentDirectory_3 = "urn:schemas-upnp-org:service:ContentDirectory:3"
- URN_RenderingControl_1 = "urn:schemas-upnp-org:service:RenderingControl:1"
- URN_RenderingControl_2 = "urn:schemas-upnp-org:service:RenderingControl:2"
- URN_ScheduledRecording_1 = "urn:schemas-upnp-org:service:ScheduledRecording:1"
- URN_ScheduledRecording_2 = "urn:schemas-upnp-org:service:ScheduledRecording:2"
-)
-
-// AVTransport1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:AVTransport:1". See
-// goupnp.ServiceClient, which contains RootDevice and Service attributes which
-// are provided for informational value.
-type AVTransport1 struct {
- goupnp.ServiceClient
-}
-
-// NewAVTransport1Clients discovers instances of the service on the network,
-// and returns clients to any that are found. errors will contain an error for
-// any devices that replied but which could not be queried, and err will be set
-// if the discovery process failed outright.
-//
-// This is a typical entry calling point into this package.
-func NewAVTransport1Clients() (clients []*AVTransport1, errors []error, err error) {
- var genericClients []goupnp.ServiceClient
- if genericClients, errors, err = goupnp.NewServiceClients(URN_AVTransport_1); err != nil {
- return
- }
- clients = newAVTransport1ClientsFromGenericClients(genericClients)
- return
-}
-
-// NewAVTransport1ClientsByURL discovers instances of the service at the given
-// URL, and returns clients to any that are found. An error is returned if
-// there was an error probing the service.
-//
-// This is a typical entry calling point into this package when reusing an
-// previously discovered service URL.
-func NewAVTransport1ClientsByURL(loc *url.URL) ([]*AVTransport1, error) {
- genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_AVTransport_1)
- if err != nil {
- return nil, err
- }
- return newAVTransport1ClientsFromGenericClients(genericClients), nil
-}
-
-// NewAVTransport1ClientsFromRootDevice discovers instances of the service in
-// a given root device, and returns clients to any that are found. An error is
-// returned if there was not at least one instance of the service within the
-// device. The location parameter is simply assigned to the Location attribute
-// of the wrapped ServiceClient(s).
-//
-// This is a typical entry calling point into this package when reusing an
-// previously discovered root device.
-func NewAVTransport1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*AVTransport1, error) {
- genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_AVTransport_1)
- if err != nil {
- return nil, err
- }
- return newAVTransport1ClientsFromGenericClients(genericClients), nil
-}
-
-func newAVTransport1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*AVTransport1 {
- clients := make([]*AVTransport1, len(genericClients))
- for i := range genericClients {
- clients[i] = &AVTransport1{genericClients[i]}
- }
- return clients
-}
-
-func (client *AVTransport1) SetAVTransportURI(InstanceID uint32, CurrentURI string, CurrentURIMetaData string) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- CurrentURI string
-
- CurrentURIMetaData string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.CurrentURI, err = soap.MarshalString(CurrentURI); err != nil {
- return
- }
- if request.CurrentURIMetaData, err = soap.MarshalString(CurrentURIMetaData); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "SetAVTransportURI", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *AVTransport1) SetNextAVTransportURI(InstanceID uint32, NextURI string, NextURIMetaData string) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- NextURI string
-
- NextURIMetaData string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.NextURI, err = soap.MarshalString(NextURI); err != nil {
- return
- }
- if request.NextURIMetaData, err = soap.MarshalString(NextURIMetaData); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "SetNextAVTransportURI", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Return values:
-//
-// * NrTracks: allowed value range: minimum=0
-func (client *AVTransport1) GetMediaInfo(InstanceID uint32) (NrTracks uint32, MediaDuration string, CurrentURI string, CurrentURIMetaData string, NextURI string, NextURIMetaData string, PlayMedium string, RecordMedium string, WriteStatus string, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- NrTracks string
-
- MediaDuration string
-
- CurrentURI string
-
- CurrentURIMetaData string
-
- NextURI string
-
- NextURIMetaData string
-
- PlayMedium string
-
- RecordMedium string
-
- WriteStatus string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "GetMediaInfo", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if NrTracks, err = soap.UnmarshalUi4(response.NrTracks); err != nil {
- return
- }
- if MediaDuration, err = soap.UnmarshalString(response.MediaDuration); err != nil {
- return
- }
- if CurrentURI, err = soap.UnmarshalString(response.CurrentURI); err != nil {
- return
- }
- if CurrentURIMetaData, err = soap.UnmarshalString(response.CurrentURIMetaData); err != nil {
- return
- }
- if NextURI, err = soap.UnmarshalString(response.NextURI); err != nil {
- return
- }
- if NextURIMetaData, err = soap.UnmarshalString(response.NextURIMetaData); err != nil {
- return
- }
- if PlayMedium, err = soap.UnmarshalString(response.PlayMedium); err != nil {
- return
- }
- if RecordMedium, err = soap.UnmarshalString(response.RecordMedium); err != nil {
- return
- }
- if WriteStatus, err = soap.UnmarshalString(response.WriteStatus); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Return values:
-//
-// * CurrentTransportState: allowed values: STOPPED, PLAYING
-//
-// * CurrentTransportStatus: allowed values: OK, ERROR_OCCURRED
-//
-// * CurrentSpeed: allowed values: 1
-func (client *AVTransport1) GetTransportInfo(InstanceID uint32) (CurrentTransportState string, CurrentTransportStatus string, CurrentSpeed string, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- CurrentTransportState string
-
- CurrentTransportStatus string
-
- CurrentSpeed string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "GetTransportInfo", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if CurrentTransportState, err = soap.UnmarshalString(response.CurrentTransportState); err != nil {
- return
- }
- if CurrentTransportStatus, err = soap.UnmarshalString(response.CurrentTransportStatus); err != nil {
- return
- }
- if CurrentSpeed, err = soap.UnmarshalString(response.CurrentSpeed); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Return values:
-//
-// * Track: allowed value range: minimum=0, step=1
-func (client *AVTransport1) GetPositionInfo(InstanceID uint32) (Track uint32, TrackDuration string, TrackMetaData string, TrackURI string, RelTime string, AbsTime string, RelCount int32, AbsCount int32, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- Track string
-
- TrackDuration string
-
- TrackMetaData string
-
- TrackURI string
-
- RelTime string
-
- AbsTime string
-
- RelCount string
-
- AbsCount string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "GetPositionInfo", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if Track, err = soap.UnmarshalUi4(response.Track); err != nil {
- return
- }
- if TrackDuration, err = soap.UnmarshalString(response.TrackDuration); err != nil {
- return
- }
- if TrackMetaData, err = soap.UnmarshalString(response.TrackMetaData); err != nil {
- return
- }
- if TrackURI, err = soap.UnmarshalString(response.TrackURI); err != nil {
- return
- }
- if RelTime, err = soap.UnmarshalString(response.RelTime); err != nil {
- return
- }
- if AbsTime, err = soap.UnmarshalString(response.AbsTime); err != nil {
- return
- }
- if RelCount, err = soap.UnmarshalI4(response.RelCount); err != nil {
- return
- }
- if AbsCount, err = soap.UnmarshalI4(response.AbsCount); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *AVTransport1) GetDeviceCapabilities(InstanceID uint32) (PlayMedia string, RecMedia string, RecQualityModes string, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- PlayMedia string
-
- RecMedia string
-
- RecQualityModes string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "GetDeviceCapabilities", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if PlayMedia, err = soap.UnmarshalString(response.PlayMedia); err != nil {
- return
- }
- if RecMedia, err = soap.UnmarshalString(response.RecMedia); err != nil {
- return
- }
- if RecQualityModes, err = soap.UnmarshalString(response.RecQualityModes); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Return values:
-//
-// * PlayMode: allowed values: NORMAL
-func (client *AVTransport1) GetTransportSettings(InstanceID uint32) (PlayMode string, RecQualityMode string, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- PlayMode string
-
- RecQualityMode string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "GetTransportSettings", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if PlayMode, err = soap.UnmarshalString(response.PlayMode); err != nil {
- return
- }
- if RecQualityMode, err = soap.UnmarshalString(response.RecQualityMode); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *AVTransport1) Stop(InstanceID uint32) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "Stop", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * Speed: allowed values: 1
-
-func (client *AVTransport1) Play(InstanceID uint32, Speed string) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- Speed string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.Speed, err = soap.MarshalString(Speed); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "Play", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *AVTransport1) Pause(InstanceID uint32) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "Pause", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *AVTransport1) Record(InstanceID uint32) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "Record", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * Unit: allowed values: TRACK_NR
-
-func (client *AVTransport1) Seek(InstanceID uint32, Unit string, Target string) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- Unit string
-
- Target string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.Unit, err = soap.MarshalString(Unit); err != nil {
- return
- }
- if request.Target, err = soap.MarshalString(Target); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "Seek", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *AVTransport1) Next(InstanceID uint32) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "Next", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *AVTransport1) Previous(InstanceID uint32) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "Previous", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * NewPlayMode: allowed values: NORMAL
-
-func (client *AVTransport1) SetPlayMode(InstanceID uint32, NewPlayMode string) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- NewPlayMode string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.NewPlayMode, err = soap.MarshalString(NewPlayMode); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "SetPlayMode", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *AVTransport1) SetRecordQualityMode(InstanceID uint32, NewRecordQualityMode string) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- NewRecordQualityMode string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.NewRecordQualityMode, err = soap.MarshalString(NewRecordQualityMode); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "SetRecordQualityMode", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *AVTransport1) GetCurrentTransportActions(InstanceID uint32) (Actions string, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- Actions string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "GetCurrentTransportActions", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if Actions, err = soap.UnmarshalString(response.Actions); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-// AVTransport2 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:AVTransport:2". See
-// goupnp.ServiceClient, which contains RootDevice and Service attributes which
-// are provided for informational value.
-type AVTransport2 struct {
- goupnp.ServiceClient
-}
-
-// NewAVTransport2Clients discovers instances of the service on the network,
-// and returns clients to any that are found. errors will contain an error for
-// any devices that replied but which could not be queried, and err will be set
-// if the discovery process failed outright.
-//
-// This is a typical entry calling point into this package.
-func NewAVTransport2Clients() (clients []*AVTransport2, errors []error, err error) {
- var genericClients []goupnp.ServiceClient
- if genericClients, errors, err = goupnp.NewServiceClients(URN_AVTransport_2); err != nil {
- return
- }
- clients = newAVTransport2ClientsFromGenericClients(genericClients)
- return
-}
-
-// NewAVTransport2ClientsByURL discovers instances of the service at the given
-// URL, and returns clients to any that are found. An error is returned if
-// there was an error probing the service.
-//
-// This is a typical entry calling point into this package when reusing an
-// previously discovered service URL.
-func NewAVTransport2ClientsByURL(loc *url.URL) ([]*AVTransport2, error) {
- genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_AVTransport_2)
- if err != nil {
- return nil, err
- }
- return newAVTransport2ClientsFromGenericClients(genericClients), nil
-}
-
-// NewAVTransport2ClientsFromRootDevice discovers instances of the service in
-// a given root device, and returns clients to any that are found. An error is
-// returned if there was not at least one instance of the service within the
-// device. The location parameter is simply assigned to the Location attribute
-// of the wrapped ServiceClient(s).
-//
-// This is a typical entry calling point into this package when reusing an
-// previously discovered root device.
-func NewAVTransport2ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*AVTransport2, error) {
- genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_AVTransport_2)
- if err != nil {
- return nil, err
- }
- return newAVTransport2ClientsFromGenericClients(genericClients), nil
-}
-
-func newAVTransport2ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*AVTransport2 {
- clients := make([]*AVTransport2, len(genericClients))
- for i := range genericClients {
- clients[i] = &AVTransport2{genericClients[i]}
- }
- return clients
-}
-
-func (client *AVTransport2) SetAVTransportURI(InstanceID uint32, CurrentURI string, CurrentURIMetaData string) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- CurrentURI string
-
- CurrentURIMetaData string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.CurrentURI, err = soap.MarshalString(CurrentURI); err != nil {
- return
- }
- if request.CurrentURIMetaData, err = soap.MarshalString(CurrentURIMetaData); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "SetAVTransportURI", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *AVTransport2) SetNextAVTransportURI(InstanceID uint32, NextURI string, NextURIMetaData string) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- NextURI string
-
- NextURIMetaData string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.NextURI, err = soap.MarshalString(NextURI); err != nil {
- return
- }
- if request.NextURIMetaData, err = soap.MarshalString(NextURIMetaData); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "SetNextAVTransportURI", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Return values:
-//
-// * NrTracks: allowed value range: minimum=0
-func (client *AVTransport2) GetMediaInfo(InstanceID uint32) (NrTracks uint32, MediaDuration string, CurrentURI string, CurrentURIMetaData string, NextURI string, NextURIMetaData string, PlayMedium string, RecordMedium string, WriteStatus string, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- NrTracks string
-
- MediaDuration string
-
- CurrentURI string
-
- CurrentURIMetaData string
-
- NextURI string
-
- NextURIMetaData string
-
- PlayMedium string
-
- RecordMedium string
-
- WriteStatus string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "GetMediaInfo", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if NrTracks, err = soap.UnmarshalUi4(response.NrTracks); err != nil {
- return
- }
- if MediaDuration, err = soap.UnmarshalString(response.MediaDuration); err != nil {
- return
- }
- if CurrentURI, err = soap.UnmarshalString(response.CurrentURI); err != nil {
- return
- }
- if CurrentURIMetaData, err = soap.UnmarshalString(response.CurrentURIMetaData); err != nil {
- return
- }
- if NextURI, err = soap.UnmarshalString(response.NextURI); err != nil {
- return
- }
- if NextURIMetaData, err = soap.UnmarshalString(response.NextURIMetaData); err != nil {
- return
- }
- if PlayMedium, err = soap.UnmarshalString(response.PlayMedium); err != nil {
- return
- }
- if RecordMedium, err = soap.UnmarshalString(response.RecordMedium); err != nil {
- return
- }
- if WriteStatus, err = soap.UnmarshalString(response.WriteStatus); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Return values:
-//
-// * CurrentType: allowed values: NO_MEDIA, TRACK_AWARE, TRACK_UNAWARE
-//
-// * NrTracks: allowed value range: minimum=0
-func (client *AVTransport2) GetMediaInfo_Ext(InstanceID uint32) (CurrentType string, NrTracks uint32, MediaDuration string, CurrentURI string, CurrentURIMetaData string, NextURI string, NextURIMetaData string, PlayMedium string, RecordMedium string, WriteStatus string, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- CurrentType string
-
- NrTracks string
-
- MediaDuration string
-
- CurrentURI string
-
- CurrentURIMetaData string
-
- NextURI string
-
- NextURIMetaData string
-
- PlayMedium string
-
- RecordMedium string
-
- WriteStatus string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "GetMediaInfo_Ext", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if CurrentType, err = soap.UnmarshalString(response.CurrentType); err != nil {
- return
- }
- if NrTracks, err = soap.UnmarshalUi4(response.NrTracks); err != nil {
- return
- }
- if MediaDuration, err = soap.UnmarshalString(response.MediaDuration); err != nil {
- return
- }
- if CurrentURI, err = soap.UnmarshalString(response.CurrentURI); err != nil {
- return
- }
- if CurrentURIMetaData, err = soap.UnmarshalString(response.CurrentURIMetaData); err != nil {
- return
- }
- if NextURI, err = soap.UnmarshalString(response.NextURI); err != nil {
- return
- }
- if NextURIMetaData, err = soap.UnmarshalString(response.NextURIMetaData); err != nil {
- return
- }
- if PlayMedium, err = soap.UnmarshalString(response.PlayMedium); err != nil {
- return
- }
- if RecordMedium, err = soap.UnmarshalString(response.RecordMedium); err != nil {
- return
- }
- if WriteStatus, err = soap.UnmarshalString(response.WriteStatus); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Return values:
-//
-// * CurrentTransportState: allowed values: STOPPED, PLAYING
-//
-// * CurrentTransportStatus: allowed values: OK, ERROR_OCCURRED
-//
-// * CurrentSpeed: allowed values: 1
-func (client *AVTransport2) GetTransportInfo(InstanceID uint32) (CurrentTransportState string, CurrentTransportStatus string, CurrentSpeed string, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- CurrentTransportState string
-
- CurrentTransportStatus string
-
- CurrentSpeed string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "GetTransportInfo", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if CurrentTransportState, err = soap.UnmarshalString(response.CurrentTransportState); err != nil {
- return
- }
- if CurrentTransportStatus, err = soap.UnmarshalString(response.CurrentTransportStatus); err != nil {
- return
- }
- if CurrentSpeed, err = soap.UnmarshalString(response.CurrentSpeed); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Return values:
-//
-// * Track: allowed value range: minimum=0, step=1
-func (client *AVTransport2) GetPositionInfo(InstanceID uint32) (Track uint32, TrackDuration string, TrackMetaData string, TrackURI string, RelTime string, AbsTime string, RelCount int32, AbsCount int32, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- Track string
-
- TrackDuration string
-
- TrackMetaData string
-
- TrackURI string
-
- RelTime string
-
- AbsTime string
-
- RelCount string
-
- AbsCount string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "GetPositionInfo", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if Track, err = soap.UnmarshalUi4(response.Track); err != nil {
- return
- }
- if TrackDuration, err = soap.UnmarshalString(response.TrackDuration); err != nil {
- return
- }
- if TrackMetaData, err = soap.UnmarshalString(response.TrackMetaData); err != nil {
- return
- }
- if TrackURI, err = soap.UnmarshalString(response.TrackURI); err != nil {
- return
- }
- if RelTime, err = soap.UnmarshalString(response.RelTime); err != nil {
- return
- }
- if AbsTime, err = soap.UnmarshalString(response.AbsTime); err != nil {
- return
- }
- if RelCount, err = soap.UnmarshalI4(response.RelCount); err != nil {
- return
- }
- if AbsCount, err = soap.UnmarshalI4(response.AbsCount); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *AVTransport2) GetDeviceCapabilities(InstanceID uint32) (PlayMedia string, RecMedia string, RecQualityModes string, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- PlayMedia string
-
- RecMedia string
-
- RecQualityModes string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "GetDeviceCapabilities", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if PlayMedia, err = soap.UnmarshalString(response.PlayMedia); err != nil {
- return
- }
- if RecMedia, err = soap.UnmarshalString(response.RecMedia); err != nil {
- return
- }
- if RecQualityModes, err = soap.UnmarshalString(response.RecQualityModes); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Return values:
-//
-// * PlayMode: allowed values: NORMAL
-func (client *AVTransport2) GetTransportSettings(InstanceID uint32) (PlayMode string, RecQualityMode string, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- PlayMode string
-
- RecQualityMode string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "GetTransportSettings", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if PlayMode, err = soap.UnmarshalString(response.PlayMode); err != nil {
- return
- }
- if RecQualityMode, err = soap.UnmarshalString(response.RecQualityMode); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *AVTransport2) Stop(InstanceID uint32) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "Stop", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * Speed: allowed values: 1
-
-func (client *AVTransport2) Play(InstanceID uint32, Speed string) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- Speed string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.Speed, err = soap.MarshalString(Speed); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "Play", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *AVTransport2) Pause(InstanceID uint32) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "Pause", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *AVTransport2) Record(InstanceID uint32) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "Record", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * Unit: allowed values: TRACK_NR
-
-func (client *AVTransport2) Seek(InstanceID uint32, Unit string, Target string) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- Unit string
-
- Target string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.Unit, err = soap.MarshalString(Unit); err != nil {
- return
- }
- if request.Target, err = soap.MarshalString(Target); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "Seek", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *AVTransport2) Next(InstanceID uint32) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "Next", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *AVTransport2) Previous(InstanceID uint32) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "Previous", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * NewPlayMode: allowed values: NORMAL
-
-func (client *AVTransport2) SetPlayMode(InstanceID uint32, NewPlayMode string) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- NewPlayMode string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.NewPlayMode, err = soap.MarshalString(NewPlayMode); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "SetPlayMode", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *AVTransport2) SetRecordQualityMode(InstanceID uint32, NewRecordQualityMode string) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- NewRecordQualityMode string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.NewRecordQualityMode, err = soap.MarshalString(NewRecordQualityMode); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "SetRecordQualityMode", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *AVTransport2) GetCurrentTransportActions(InstanceID uint32) (Actions string, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- Actions string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "GetCurrentTransportActions", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if Actions, err = soap.UnmarshalString(response.Actions); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Return values:
-//
-// * CurrentDRMState: allowed values: OK
-func (client *AVTransport2) GetDRMState(InstanceID uint32) (CurrentDRMState string, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- CurrentDRMState string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "GetDRMState", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if CurrentDRMState, err = soap.UnmarshalString(response.CurrentDRMState); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *AVTransport2) GetStateVariables(InstanceID uint32, StateVariableList string) (StateVariableValuePairs string, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- StateVariableList string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.StateVariableList, err = soap.MarshalString(StateVariableList); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- StateVariableValuePairs string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "GetStateVariables", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if StateVariableValuePairs, err = soap.UnmarshalString(response.StateVariableValuePairs); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *AVTransport2) SetStateVariables(InstanceID uint32, AVTransportUDN string, ServiceType string, ServiceId string, StateVariableValuePairs string) (StateVariableList string, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- AVTransportUDN string
-
- ServiceType string
-
- ServiceId string
-
- StateVariableValuePairs string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.AVTransportUDN, err = soap.MarshalString(AVTransportUDN); err != nil {
- return
- }
- if request.ServiceType, err = soap.MarshalString(ServiceType); err != nil {
- return
- }
- if request.ServiceId, err = soap.MarshalString(ServiceId); err != nil {
- return
- }
- if request.StateVariableValuePairs, err = soap.MarshalString(StateVariableValuePairs); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- StateVariableList string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "SetStateVariables", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if StateVariableList, err = soap.UnmarshalString(response.StateVariableList); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-// ConnectionManager1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:ConnectionManager:1". See
-// goupnp.ServiceClient, which contains RootDevice and Service attributes which
-// are provided for informational value.
-type ConnectionManager1 struct {
- goupnp.ServiceClient
-}
-
-// NewConnectionManager1Clients discovers instances of the service on the network,
-// and returns clients to any that are found. errors will contain an error for
-// any devices that replied but which could not be queried, and err will be set
-// if the discovery process failed outright.
-//
-// This is a typical entry calling point into this package.
-func NewConnectionManager1Clients() (clients []*ConnectionManager1, errors []error, err error) {
- var genericClients []goupnp.ServiceClient
- if genericClients, errors, err = goupnp.NewServiceClients(URN_ConnectionManager_1); err != nil {
- return
- }
- clients = newConnectionManager1ClientsFromGenericClients(genericClients)
- return
-}
-
-// NewConnectionManager1ClientsByURL discovers instances of the service at the given
-// URL, and returns clients to any that are found. An error is returned if
-// there was an error probing the service.
-//
-// This is a typical entry calling point into this package when reusing an
-// previously discovered service URL.
-func NewConnectionManager1ClientsByURL(loc *url.URL) ([]*ConnectionManager1, error) {
- genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_ConnectionManager_1)
- if err != nil {
- return nil, err
- }
- return newConnectionManager1ClientsFromGenericClients(genericClients), nil
-}
-
-// NewConnectionManager1ClientsFromRootDevice discovers instances of the service in
-// a given root device, and returns clients to any that are found. An error is
-// returned if there was not at least one instance of the service within the
-// device. The location parameter is simply assigned to the Location attribute
-// of the wrapped ServiceClient(s).
-//
-// This is a typical entry calling point into this package when reusing an
-// previously discovered root device.
-func NewConnectionManager1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*ConnectionManager1, error) {
- genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_ConnectionManager_1)
- if err != nil {
- return nil, err
- }
- return newConnectionManager1ClientsFromGenericClients(genericClients), nil
-}
-
-func newConnectionManager1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*ConnectionManager1 {
- clients := make([]*ConnectionManager1, len(genericClients))
- for i := range genericClients {
- clients[i] = &ConnectionManager1{genericClients[i]}
- }
- return clients
-}
-
-func (client *ConnectionManager1) GetProtocolInfo() (Source string, Sink string, err error) {
- // Request structure.
- request := interface{}(nil)
- // BEGIN Marshal arguments into request.
-
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- Source string
-
- Sink string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ConnectionManager_1, "GetProtocolInfo", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if Source, err = soap.UnmarshalString(response.Source); err != nil {
- return
- }
- if Sink, err = soap.UnmarshalString(response.Sink); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * Direction: allowed values: Input, Output
-
-func (client *ConnectionManager1) PrepareForConnection(RemoteProtocolInfo string, PeerConnectionManager string, PeerConnectionID int32, Direction string) (ConnectionID int32, AVTransportID int32, RcsID int32, err error) {
- // Request structure.
- request := &struct {
- RemoteProtocolInfo string
-
- PeerConnectionManager string
-
- PeerConnectionID string
-
- Direction string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.RemoteProtocolInfo, err = soap.MarshalString(RemoteProtocolInfo); err != nil {
- return
- }
- if request.PeerConnectionManager, err = soap.MarshalString(PeerConnectionManager); err != nil {
- return
- }
- if request.PeerConnectionID, err = soap.MarshalI4(PeerConnectionID); err != nil {
- return
- }
- if request.Direction, err = soap.MarshalString(Direction); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- ConnectionID string
-
- AVTransportID string
-
- RcsID string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ConnectionManager_1, "PrepareForConnection", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if ConnectionID, err = soap.UnmarshalI4(response.ConnectionID); err != nil {
- return
- }
- if AVTransportID, err = soap.UnmarshalI4(response.AVTransportID); err != nil {
- return
- }
- if RcsID, err = soap.UnmarshalI4(response.RcsID); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ConnectionManager1) ConnectionComplete(ConnectionID int32) (err error) {
- // Request structure.
- request := &struct {
- ConnectionID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.ConnectionID, err = soap.MarshalI4(ConnectionID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ConnectionManager_1, "ConnectionComplete", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ConnectionManager1) GetCurrentConnectionIDs() (ConnectionIDs string, err error) {
- // Request structure.
- request := interface{}(nil)
- // BEGIN Marshal arguments into request.
-
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- ConnectionIDs string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ConnectionManager_1, "GetCurrentConnectionIDs", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if ConnectionIDs, err = soap.UnmarshalString(response.ConnectionIDs); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Return values:
-//
-// * Direction: allowed values: Input, Output
-//
-// * Status: allowed values: OK, ContentFormatMismatch, InsufficientBandwidth, UnreliableChannel, Unknown
-func (client *ConnectionManager1) GetCurrentConnectionInfo(ConnectionID int32) (RcsID int32, AVTransportID int32, ProtocolInfo string, PeerConnectionManager string, PeerConnectionID int32, Direction string, Status string, err error) {
- // Request structure.
- request := &struct {
- ConnectionID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.ConnectionID, err = soap.MarshalI4(ConnectionID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- RcsID string
-
- AVTransportID string
-
- ProtocolInfo string
-
- PeerConnectionManager string
-
- PeerConnectionID string
-
- Direction string
-
- Status string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ConnectionManager_1, "GetCurrentConnectionInfo", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if RcsID, err = soap.UnmarshalI4(response.RcsID); err != nil {
- return
- }
- if AVTransportID, err = soap.UnmarshalI4(response.AVTransportID); err != nil {
- return
- }
- if ProtocolInfo, err = soap.UnmarshalString(response.ProtocolInfo); err != nil {
- return
- }
- if PeerConnectionManager, err = soap.UnmarshalString(response.PeerConnectionManager); err != nil {
- return
- }
- if PeerConnectionID, err = soap.UnmarshalI4(response.PeerConnectionID); err != nil {
- return
- }
- if Direction, err = soap.UnmarshalString(response.Direction); err != nil {
- return
- }
- if Status, err = soap.UnmarshalString(response.Status); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-// ConnectionManager2 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:ConnectionManager:2". See
-// goupnp.ServiceClient, which contains RootDevice and Service attributes which
-// are provided for informational value.
-type ConnectionManager2 struct {
- goupnp.ServiceClient
-}
-
-// NewConnectionManager2Clients discovers instances of the service on the network,
-// and returns clients to any that are found. errors will contain an error for
-// any devices that replied but which could not be queried, and err will be set
-// if the discovery process failed outright.
-//
-// This is a typical entry calling point into this package.
-func NewConnectionManager2Clients() (clients []*ConnectionManager2, errors []error, err error) {
- var genericClients []goupnp.ServiceClient
- if genericClients, errors, err = goupnp.NewServiceClients(URN_ConnectionManager_2); err != nil {
- return
- }
- clients = newConnectionManager2ClientsFromGenericClients(genericClients)
- return
-}
-
-// NewConnectionManager2ClientsByURL discovers instances of the service at the given
-// URL, and returns clients to any that are found. An error is returned if
-// there was an error probing the service.
-//
-// This is a typical entry calling point into this package when reusing an
-// previously discovered service URL.
-func NewConnectionManager2ClientsByURL(loc *url.URL) ([]*ConnectionManager2, error) {
- genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_ConnectionManager_2)
- if err != nil {
- return nil, err
- }
- return newConnectionManager2ClientsFromGenericClients(genericClients), nil
-}
-
-// NewConnectionManager2ClientsFromRootDevice discovers instances of the service in
-// a given root device, and returns clients to any that are found. An error is
-// returned if there was not at least one instance of the service within the
-// device. The location parameter is simply assigned to the Location attribute
-// of the wrapped ServiceClient(s).
-//
-// This is a typical entry calling point into this package when reusing an
-// previously discovered root device.
-func NewConnectionManager2ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*ConnectionManager2, error) {
- genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_ConnectionManager_2)
- if err != nil {
- return nil, err
- }
- return newConnectionManager2ClientsFromGenericClients(genericClients), nil
-}
-
-func newConnectionManager2ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*ConnectionManager2 {
- clients := make([]*ConnectionManager2, len(genericClients))
- for i := range genericClients {
- clients[i] = &ConnectionManager2{genericClients[i]}
- }
- return clients
-}
-
-func (client *ConnectionManager2) GetProtocolInfo() (Source string, Sink string, err error) {
- // Request structure.
- request := interface{}(nil)
- // BEGIN Marshal arguments into request.
-
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- Source string
-
- Sink string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ConnectionManager_2, "GetProtocolInfo", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if Source, err = soap.UnmarshalString(response.Source); err != nil {
- return
- }
- if Sink, err = soap.UnmarshalString(response.Sink); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * Direction: allowed values: Input, Output
-
-func (client *ConnectionManager2) PrepareForConnection(RemoteProtocolInfo string, PeerConnectionManager string, PeerConnectionID int32, Direction string) (ConnectionID int32, AVTransportID int32, RcsID int32, err error) {
- // Request structure.
- request := &struct {
- RemoteProtocolInfo string
-
- PeerConnectionManager string
-
- PeerConnectionID string
-
- Direction string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.RemoteProtocolInfo, err = soap.MarshalString(RemoteProtocolInfo); err != nil {
- return
- }
- if request.PeerConnectionManager, err = soap.MarshalString(PeerConnectionManager); err != nil {
- return
- }
- if request.PeerConnectionID, err = soap.MarshalI4(PeerConnectionID); err != nil {
- return
- }
- if request.Direction, err = soap.MarshalString(Direction); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- ConnectionID string
-
- AVTransportID string
-
- RcsID string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ConnectionManager_2, "PrepareForConnection", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if ConnectionID, err = soap.UnmarshalI4(response.ConnectionID); err != nil {
- return
- }
- if AVTransportID, err = soap.UnmarshalI4(response.AVTransportID); err != nil {
- return
- }
- if RcsID, err = soap.UnmarshalI4(response.RcsID); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ConnectionManager2) ConnectionComplete(ConnectionID int32) (err error) {
- // Request structure.
- request := &struct {
- ConnectionID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.ConnectionID, err = soap.MarshalI4(ConnectionID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ConnectionManager_2, "ConnectionComplete", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ConnectionManager2) GetCurrentConnectionIDs() (ConnectionIDs string, err error) {
- // Request structure.
- request := interface{}(nil)
- // BEGIN Marshal arguments into request.
-
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- ConnectionIDs string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ConnectionManager_2, "GetCurrentConnectionIDs", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if ConnectionIDs, err = soap.UnmarshalString(response.ConnectionIDs); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Return values:
-//
-// * Direction: allowed values: Input, Output
-//
-// * Status: allowed values: OK, ContentFormatMismatch, InsufficientBandwidth, UnreliableChannel, Unknown
-func (client *ConnectionManager2) GetCurrentConnectionInfo(ConnectionID int32) (RcsID int32, AVTransportID int32, ProtocolInfo string, PeerConnectionManager string, PeerConnectionID int32, Direction string, Status string, err error) {
- // Request structure.
- request := &struct {
- ConnectionID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.ConnectionID, err = soap.MarshalI4(ConnectionID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- RcsID string
-
- AVTransportID string
-
- ProtocolInfo string
-
- PeerConnectionManager string
-
- PeerConnectionID string
-
- Direction string
-
- Status string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ConnectionManager_2, "GetCurrentConnectionInfo", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if RcsID, err = soap.UnmarshalI4(response.RcsID); err != nil {
- return
- }
- if AVTransportID, err = soap.UnmarshalI4(response.AVTransportID); err != nil {
- return
- }
- if ProtocolInfo, err = soap.UnmarshalString(response.ProtocolInfo); err != nil {
- return
- }
- if PeerConnectionManager, err = soap.UnmarshalString(response.PeerConnectionManager); err != nil {
- return
- }
- if PeerConnectionID, err = soap.UnmarshalI4(response.PeerConnectionID); err != nil {
- return
- }
- if Direction, err = soap.UnmarshalString(response.Direction); err != nil {
- return
- }
- if Status, err = soap.UnmarshalString(response.Status); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-// ContentDirectory1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:ContentDirectory:1". See
-// goupnp.ServiceClient, which contains RootDevice and Service attributes which
-// are provided for informational value.
-type ContentDirectory1 struct {
- goupnp.ServiceClient
-}
-
-// NewContentDirectory1Clients discovers instances of the service on the network,
-// and returns clients to any that are found. errors will contain an error for
-// any devices that replied but which could not be queried, and err will be set
-// if the discovery process failed outright.
-//
-// This is a typical entry calling point into this package.
-func NewContentDirectory1Clients() (clients []*ContentDirectory1, errors []error, err error) {
- var genericClients []goupnp.ServiceClient
- if genericClients, errors, err = goupnp.NewServiceClients(URN_ContentDirectory_1); err != nil {
- return
- }
- clients = newContentDirectory1ClientsFromGenericClients(genericClients)
- return
-}
-
-// NewContentDirectory1ClientsByURL discovers instances of the service at the given
-// URL, and returns clients to any that are found. An error is returned if
-// there was an error probing the service.
-//
-// This is a typical entry calling point into this package when reusing an
-// previously discovered service URL.
-func NewContentDirectory1ClientsByURL(loc *url.URL) ([]*ContentDirectory1, error) {
- genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_ContentDirectory_1)
- if err != nil {
- return nil, err
- }
- return newContentDirectory1ClientsFromGenericClients(genericClients), nil
-}
-
-// NewContentDirectory1ClientsFromRootDevice discovers instances of the service in
-// a given root device, and returns clients to any that are found. An error is
-// returned if there was not at least one instance of the service within the
-// device. The location parameter is simply assigned to the Location attribute
-// of the wrapped ServiceClient(s).
-//
-// This is a typical entry calling point into this package when reusing an
-// previously discovered root device.
-func NewContentDirectory1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*ContentDirectory1, error) {
- genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_ContentDirectory_1)
- if err != nil {
- return nil, err
- }
- return newContentDirectory1ClientsFromGenericClients(genericClients), nil
-}
-
-func newContentDirectory1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*ContentDirectory1 {
- clients := make([]*ContentDirectory1, len(genericClients))
- for i := range genericClients {
- clients[i] = &ContentDirectory1{genericClients[i]}
- }
- return clients
-}
-
-func (client *ContentDirectory1) GetSearchCapabilities() (SearchCaps string, err error) {
- // Request structure.
- request := interface{}(nil)
- // BEGIN Marshal arguments into request.
-
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- SearchCaps string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_1, "GetSearchCapabilities", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if SearchCaps, err = soap.UnmarshalString(response.SearchCaps); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ContentDirectory1) GetSortCapabilities() (SortCaps string, err error) {
- // Request structure.
- request := interface{}(nil)
- // BEGIN Marshal arguments into request.
-
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- SortCaps string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_1, "GetSortCapabilities", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if SortCaps, err = soap.UnmarshalString(response.SortCaps); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ContentDirectory1) GetSystemUpdateID() (Id uint32, err error) {
- // Request structure.
- request := interface{}(nil)
- // BEGIN Marshal arguments into request.
-
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- Id string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_1, "GetSystemUpdateID", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if Id, err = soap.UnmarshalUi4(response.Id); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * BrowseFlag: allowed values: BrowseMetadata, BrowseDirectChildren
-
-func (client *ContentDirectory1) Browse(ObjectID string, BrowseFlag string, Filter string, StartingIndex uint32, RequestedCount uint32, SortCriteria string) (Result string, NumberReturned uint32, TotalMatches uint32, UpdateID uint32, err error) {
- // Request structure.
- request := &struct {
- ObjectID string
-
- BrowseFlag string
-
- Filter string
-
- StartingIndex string
-
- RequestedCount string
-
- SortCriteria string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil {
- return
- }
- if request.BrowseFlag, err = soap.MarshalString(BrowseFlag); err != nil {
- return
- }
- if request.Filter, err = soap.MarshalString(Filter); err != nil {
- return
- }
- if request.StartingIndex, err = soap.MarshalUi4(StartingIndex); err != nil {
- return
- }
- if request.RequestedCount, err = soap.MarshalUi4(RequestedCount); err != nil {
- return
- }
- if request.SortCriteria, err = soap.MarshalString(SortCriteria); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- Result string
-
- NumberReturned string
-
- TotalMatches string
-
- UpdateID string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_1, "Browse", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if Result, err = soap.UnmarshalString(response.Result); err != nil {
- return
- }
- if NumberReturned, err = soap.UnmarshalUi4(response.NumberReturned); err != nil {
- return
- }
- if TotalMatches, err = soap.UnmarshalUi4(response.TotalMatches); err != nil {
- return
- }
- if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ContentDirectory1) Search(ContainerID string, SearchCriteria string, Filter string, StartingIndex uint32, RequestedCount uint32, SortCriteria string) (Result string, NumberReturned uint32, TotalMatches uint32, UpdateID uint32, err error) {
- // Request structure.
- request := &struct {
- ContainerID string
-
- SearchCriteria string
-
- Filter string
-
- StartingIndex string
-
- RequestedCount string
-
- SortCriteria string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.ContainerID, err = soap.MarshalString(ContainerID); err != nil {
- return
- }
- if request.SearchCriteria, err = soap.MarshalString(SearchCriteria); err != nil {
- return
- }
- if request.Filter, err = soap.MarshalString(Filter); err != nil {
- return
- }
- if request.StartingIndex, err = soap.MarshalUi4(StartingIndex); err != nil {
- return
- }
- if request.RequestedCount, err = soap.MarshalUi4(RequestedCount); err != nil {
- return
- }
- if request.SortCriteria, err = soap.MarshalString(SortCriteria); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- Result string
-
- NumberReturned string
-
- TotalMatches string
-
- UpdateID string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_1, "Search", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if Result, err = soap.UnmarshalString(response.Result); err != nil {
- return
- }
- if NumberReturned, err = soap.UnmarshalUi4(response.NumberReturned); err != nil {
- return
- }
- if TotalMatches, err = soap.UnmarshalUi4(response.TotalMatches); err != nil {
- return
- }
- if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ContentDirectory1) CreateObject(ContainerID string, Elements string) (ObjectID string, Result string, err error) {
- // Request structure.
- request := &struct {
- ContainerID string
-
- Elements string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.ContainerID, err = soap.MarshalString(ContainerID); err != nil {
- return
- }
- if request.Elements, err = soap.MarshalString(Elements); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- ObjectID string
-
- Result string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_1, "CreateObject", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if ObjectID, err = soap.UnmarshalString(response.ObjectID); err != nil {
- return
- }
- if Result, err = soap.UnmarshalString(response.Result); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ContentDirectory1) DestroyObject(ObjectID string) (err error) {
- // Request structure.
- request := &struct {
- ObjectID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_1, "DestroyObject", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ContentDirectory1) UpdateObject(ObjectID string, CurrentTagValue string, NewTagValue string) (err error) {
- // Request structure.
- request := &struct {
- ObjectID string
-
- CurrentTagValue string
-
- NewTagValue string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil {
- return
- }
- if request.CurrentTagValue, err = soap.MarshalString(CurrentTagValue); err != nil {
- return
- }
- if request.NewTagValue, err = soap.MarshalString(NewTagValue); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_1, "UpdateObject", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ContentDirectory1) ImportResource(SourceURI *url.URL, DestinationURI *url.URL) (TransferID uint32, err error) {
- // Request structure.
- request := &struct {
- SourceURI string
-
- DestinationURI string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.SourceURI, err = soap.MarshalURI(SourceURI); err != nil {
- return
- }
- if request.DestinationURI, err = soap.MarshalURI(DestinationURI); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- TransferID string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_1, "ImportResource", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if TransferID, err = soap.UnmarshalUi4(response.TransferID); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ContentDirectory1) ExportResource(SourceURI *url.URL, DestinationURI *url.URL) (TransferID uint32, err error) {
- // Request structure.
- request := &struct {
- SourceURI string
-
- DestinationURI string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.SourceURI, err = soap.MarshalURI(SourceURI); err != nil {
- return
- }
- if request.DestinationURI, err = soap.MarshalURI(DestinationURI); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- TransferID string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_1, "ExportResource", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if TransferID, err = soap.UnmarshalUi4(response.TransferID); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ContentDirectory1) StopTransferResource(TransferID uint32) (err error) {
- // Request structure.
- request := &struct {
- TransferID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.TransferID, err = soap.MarshalUi4(TransferID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_1, "StopTransferResource", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Return values:
-//
-// * TransferStatus: allowed values: COMPLETED, ERROR, IN_PROGRESS, STOPPED
-func (client *ContentDirectory1) GetTransferProgress(TransferID uint32) (TransferStatus string, TransferLength string, TransferTotal string, err error) {
- // Request structure.
- request := &struct {
- TransferID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.TransferID, err = soap.MarshalUi4(TransferID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- TransferStatus string
-
- TransferLength string
-
- TransferTotal string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_1, "GetTransferProgress", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if TransferStatus, err = soap.UnmarshalString(response.TransferStatus); err != nil {
- return
- }
- if TransferLength, err = soap.UnmarshalString(response.TransferLength); err != nil {
- return
- }
- if TransferTotal, err = soap.UnmarshalString(response.TransferTotal); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ContentDirectory1) DeleteResource(ResourceURI *url.URL) (err error) {
- // Request structure.
- request := &struct {
- ResourceURI string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.ResourceURI, err = soap.MarshalURI(ResourceURI); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_1, "DeleteResource", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ContentDirectory1) CreateReference(ContainerID string, ObjectID string) (NewID string, err error) {
- // Request structure.
- request := &struct {
- ContainerID string
-
- ObjectID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.ContainerID, err = soap.MarshalString(ContainerID); err != nil {
- return
- }
- if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- NewID string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_1, "CreateReference", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if NewID, err = soap.UnmarshalString(response.NewID); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-// ContentDirectory2 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:ContentDirectory:2". See
-// goupnp.ServiceClient, which contains RootDevice and Service attributes which
-// are provided for informational value.
-type ContentDirectory2 struct {
- goupnp.ServiceClient
-}
-
-// NewContentDirectory2Clients discovers instances of the service on the network,
-// and returns clients to any that are found. errors will contain an error for
-// any devices that replied but which could not be queried, and err will be set
-// if the discovery process failed outright.
-//
-// This is a typical entry calling point into this package.
-func NewContentDirectory2Clients() (clients []*ContentDirectory2, errors []error, err error) {
- var genericClients []goupnp.ServiceClient
- if genericClients, errors, err = goupnp.NewServiceClients(URN_ContentDirectory_2); err != nil {
- return
- }
- clients = newContentDirectory2ClientsFromGenericClients(genericClients)
- return
-}
-
-// NewContentDirectory2ClientsByURL discovers instances of the service at the given
-// URL, and returns clients to any that are found. An error is returned if
-// there was an error probing the service.
-//
-// This is a typical entry calling point into this package when reusing an
-// previously discovered service URL.
-func NewContentDirectory2ClientsByURL(loc *url.URL) ([]*ContentDirectory2, error) {
- genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_ContentDirectory_2)
- if err != nil {
- return nil, err
- }
- return newContentDirectory2ClientsFromGenericClients(genericClients), nil
-}
-
-// NewContentDirectory2ClientsFromRootDevice discovers instances of the service in
-// a given root device, and returns clients to any that are found. An error is
-// returned if there was not at least one instance of the service within the
-// device. The location parameter is simply assigned to the Location attribute
-// of the wrapped ServiceClient(s).
-//
-// This is a typical entry calling point into this package when reusing an
-// previously discovered root device.
-func NewContentDirectory2ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*ContentDirectory2, error) {
- genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_ContentDirectory_2)
- if err != nil {
- return nil, err
- }
- return newContentDirectory2ClientsFromGenericClients(genericClients), nil
-}
-
-func newContentDirectory2ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*ContentDirectory2 {
- clients := make([]*ContentDirectory2, len(genericClients))
- for i := range genericClients {
- clients[i] = &ContentDirectory2{genericClients[i]}
- }
- return clients
-}
-
-func (client *ContentDirectory2) GetSearchCapabilities() (SearchCaps string, err error) {
- // Request structure.
- request := interface{}(nil)
- // BEGIN Marshal arguments into request.
-
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- SearchCaps string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "GetSearchCapabilities", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if SearchCaps, err = soap.UnmarshalString(response.SearchCaps); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ContentDirectory2) GetSortCapabilities() (SortCaps string, err error) {
- // Request structure.
- request := interface{}(nil)
- // BEGIN Marshal arguments into request.
-
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- SortCaps string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "GetSortCapabilities", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if SortCaps, err = soap.UnmarshalString(response.SortCaps); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ContentDirectory2) GetSortExtensionCapabilities() (SortExtensionCaps string, err error) {
- // Request structure.
- request := interface{}(nil)
- // BEGIN Marshal arguments into request.
-
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- SortExtensionCaps string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "GetSortExtensionCapabilities", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if SortExtensionCaps, err = soap.UnmarshalString(response.SortExtensionCaps); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ContentDirectory2) GetFeatureList() (FeatureList string, err error) {
- // Request structure.
- request := interface{}(nil)
- // BEGIN Marshal arguments into request.
-
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- FeatureList string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "GetFeatureList", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if FeatureList, err = soap.UnmarshalString(response.FeatureList); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ContentDirectory2) GetSystemUpdateID() (Id uint32, err error) {
- // Request structure.
- request := interface{}(nil)
- // BEGIN Marshal arguments into request.
-
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- Id string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "GetSystemUpdateID", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if Id, err = soap.UnmarshalUi4(response.Id); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * BrowseFlag: allowed values: BrowseMetadata, BrowseDirectChildren
-
-func (client *ContentDirectory2) Browse(ObjectID string, BrowseFlag string, Filter string, StartingIndex uint32, RequestedCount uint32, SortCriteria string) (Result string, NumberReturned uint32, TotalMatches uint32, UpdateID uint32, err error) {
- // Request structure.
- request := &struct {
- ObjectID string
-
- BrowseFlag string
-
- Filter string
-
- StartingIndex string
-
- RequestedCount string
-
- SortCriteria string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil {
- return
- }
- if request.BrowseFlag, err = soap.MarshalString(BrowseFlag); err != nil {
- return
- }
- if request.Filter, err = soap.MarshalString(Filter); err != nil {
- return
- }
- if request.StartingIndex, err = soap.MarshalUi4(StartingIndex); err != nil {
- return
- }
- if request.RequestedCount, err = soap.MarshalUi4(RequestedCount); err != nil {
- return
- }
- if request.SortCriteria, err = soap.MarshalString(SortCriteria); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- Result string
-
- NumberReturned string
-
- TotalMatches string
-
- UpdateID string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "Browse", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if Result, err = soap.UnmarshalString(response.Result); err != nil {
- return
- }
- if NumberReturned, err = soap.UnmarshalUi4(response.NumberReturned); err != nil {
- return
- }
- if TotalMatches, err = soap.UnmarshalUi4(response.TotalMatches); err != nil {
- return
- }
- if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ContentDirectory2) Search(ContainerID string, SearchCriteria string, Filter string, StartingIndex uint32, RequestedCount uint32, SortCriteria string) (Result string, NumberReturned uint32, TotalMatches uint32, UpdateID uint32, err error) {
- // Request structure.
- request := &struct {
- ContainerID string
-
- SearchCriteria string
-
- Filter string
-
- StartingIndex string
-
- RequestedCount string
-
- SortCriteria string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.ContainerID, err = soap.MarshalString(ContainerID); err != nil {
- return
- }
- if request.SearchCriteria, err = soap.MarshalString(SearchCriteria); err != nil {
- return
- }
- if request.Filter, err = soap.MarshalString(Filter); err != nil {
- return
- }
- if request.StartingIndex, err = soap.MarshalUi4(StartingIndex); err != nil {
- return
- }
- if request.RequestedCount, err = soap.MarshalUi4(RequestedCount); err != nil {
- return
- }
- if request.SortCriteria, err = soap.MarshalString(SortCriteria); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- Result string
-
- NumberReturned string
-
- TotalMatches string
-
- UpdateID string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "Search", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if Result, err = soap.UnmarshalString(response.Result); err != nil {
- return
- }
- if NumberReturned, err = soap.UnmarshalUi4(response.NumberReturned); err != nil {
- return
- }
- if TotalMatches, err = soap.UnmarshalUi4(response.TotalMatches); err != nil {
- return
- }
- if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ContentDirectory2) CreateObject(ContainerID string, Elements string) (ObjectID string, Result string, err error) {
- // Request structure.
- request := &struct {
- ContainerID string
-
- Elements string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.ContainerID, err = soap.MarshalString(ContainerID); err != nil {
- return
- }
- if request.Elements, err = soap.MarshalString(Elements); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- ObjectID string
-
- Result string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "CreateObject", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if ObjectID, err = soap.UnmarshalString(response.ObjectID); err != nil {
- return
- }
- if Result, err = soap.UnmarshalString(response.Result); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ContentDirectory2) DestroyObject(ObjectID string) (err error) {
- // Request structure.
- request := &struct {
- ObjectID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "DestroyObject", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ContentDirectory2) UpdateObject(ObjectID string, CurrentTagValue string, NewTagValue string) (err error) {
- // Request structure.
- request := &struct {
- ObjectID string
-
- CurrentTagValue string
-
- NewTagValue string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil {
- return
- }
- if request.CurrentTagValue, err = soap.MarshalString(CurrentTagValue); err != nil {
- return
- }
- if request.NewTagValue, err = soap.MarshalString(NewTagValue); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "UpdateObject", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ContentDirectory2) MoveObject(ObjectID string, NewParentID string) (NewObjectID string, err error) {
- // Request structure.
- request := &struct {
- ObjectID string
-
- NewParentID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil {
- return
- }
- if request.NewParentID, err = soap.MarshalString(NewParentID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- NewObjectID string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "MoveObject", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if NewObjectID, err = soap.UnmarshalString(response.NewObjectID); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ContentDirectory2) ImportResource(SourceURI *url.URL, DestinationURI *url.URL) (TransferID uint32, err error) {
- // Request structure.
- request := &struct {
- SourceURI string
-
- DestinationURI string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.SourceURI, err = soap.MarshalURI(SourceURI); err != nil {
- return
- }
- if request.DestinationURI, err = soap.MarshalURI(DestinationURI); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- TransferID string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "ImportResource", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if TransferID, err = soap.UnmarshalUi4(response.TransferID); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ContentDirectory2) ExportResource(SourceURI *url.URL, DestinationURI *url.URL) (TransferID uint32, err error) {
- // Request structure.
- request := &struct {
- SourceURI string
-
- DestinationURI string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.SourceURI, err = soap.MarshalURI(SourceURI); err != nil {
- return
- }
- if request.DestinationURI, err = soap.MarshalURI(DestinationURI); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- TransferID string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "ExportResource", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if TransferID, err = soap.UnmarshalUi4(response.TransferID); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ContentDirectory2) DeleteResource(ResourceURI *url.URL) (err error) {
- // Request structure.
- request := &struct {
- ResourceURI string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.ResourceURI, err = soap.MarshalURI(ResourceURI); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "DeleteResource", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ContentDirectory2) StopTransferResource(TransferID uint32) (err error) {
- // Request structure.
- request := &struct {
- TransferID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.TransferID, err = soap.MarshalUi4(TransferID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "StopTransferResource", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Return values:
-//
-// * TransferStatus: allowed values: COMPLETED, ERROR, IN_PROGRESS, STOPPED
-func (client *ContentDirectory2) GetTransferProgress(TransferID uint32) (TransferStatus string, TransferLength string, TransferTotal string, err error) {
- // Request structure.
- request := &struct {
- TransferID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.TransferID, err = soap.MarshalUi4(TransferID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- TransferStatus string
-
- TransferLength string
-
- TransferTotal string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "GetTransferProgress", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if TransferStatus, err = soap.UnmarshalString(response.TransferStatus); err != nil {
- return
- }
- if TransferLength, err = soap.UnmarshalString(response.TransferLength); err != nil {
- return
- }
- if TransferTotal, err = soap.UnmarshalString(response.TransferTotal); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ContentDirectory2) CreateReference(ContainerID string, ObjectID string) (NewID string, err error) {
- // Request structure.
- request := &struct {
- ContainerID string
-
- ObjectID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.ContainerID, err = soap.MarshalString(ContainerID); err != nil {
- return
- }
- if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- NewID string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "CreateReference", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if NewID, err = soap.UnmarshalString(response.NewID); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-// ContentDirectory3 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:ContentDirectory:3". See
-// goupnp.ServiceClient, which contains RootDevice and Service attributes which
-// are provided for informational value.
-type ContentDirectory3 struct {
- goupnp.ServiceClient
-}
-
-// NewContentDirectory3Clients discovers instances of the service on the network,
-// and returns clients to any that are found. errors will contain an error for
-// any devices that replied but which could not be queried, and err will be set
-// if the discovery process failed outright.
-//
-// This is a typical entry calling point into this package.
-func NewContentDirectory3Clients() (clients []*ContentDirectory3, errors []error, err error) {
- var genericClients []goupnp.ServiceClient
- if genericClients, errors, err = goupnp.NewServiceClients(URN_ContentDirectory_3); err != nil {
- return
- }
- clients = newContentDirectory3ClientsFromGenericClients(genericClients)
- return
-}
-
-// NewContentDirectory3ClientsByURL discovers instances of the service at the given
-// URL, and returns clients to any that are found. An error is returned if
-// there was an error probing the service.
-//
-// This is a typical entry calling point into this package when reusing an
-// previously discovered service URL.
-func NewContentDirectory3ClientsByURL(loc *url.URL) ([]*ContentDirectory3, error) {
- genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_ContentDirectory_3)
- if err != nil {
- return nil, err
- }
- return newContentDirectory3ClientsFromGenericClients(genericClients), nil
-}
-
-// NewContentDirectory3ClientsFromRootDevice discovers instances of the service in
-// a given root device, and returns clients to any that are found. An error is
-// returned if there was not at least one instance of the service within the
-// device. The location parameter is simply assigned to the Location attribute
-// of the wrapped ServiceClient(s).
-//
-// This is a typical entry calling point into this package when reusing an
-// previously discovered root device.
-func NewContentDirectory3ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*ContentDirectory3, error) {
- genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_ContentDirectory_3)
- if err != nil {
- return nil, err
- }
- return newContentDirectory3ClientsFromGenericClients(genericClients), nil
-}
-
-func newContentDirectory3ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*ContentDirectory3 {
- clients := make([]*ContentDirectory3, len(genericClients))
- for i := range genericClients {
- clients[i] = &ContentDirectory3{genericClients[i]}
- }
- return clients
-}
-
-func (client *ContentDirectory3) GetSearchCapabilities() (SearchCaps string, err error) {
- // Request structure.
- request := interface{}(nil)
- // BEGIN Marshal arguments into request.
-
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- SearchCaps string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "GetSearchCapabilities", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if SearchCaps, err = soap.UnmarshalString(response.SearchCaps); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ContentDirectory3) GetSortCapabilities() (SortCaps string, err error) {
- // Request structure.
- request := interface{}(nil)
- // BEGIN Marshal arguments into request.
-
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- SortCaps string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "GetSortCapabilities", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if SortCaps, err = soap.UnmarshalString(response.SortCaps); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ContentDirectory3) GetSortExtensionCapabilities() (SortExtensionCaps string, err error) {
- // Request structure.
- request := interface{}(nil)
- // BEGIN Marshal arguments into request.
-
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- SortExtensionCaps string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "GetSortExtensionCapabilities", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if SortExtensionCaps, err = soap.UnmarshalString(response.SortExtensionCaps); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ContentDirectory3) GetFeatureList() (FeatureList string, err error) {
- // Request structure.
- request := interface{}(nil)
- // BEGIN Marshal arguments into request.
-
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- FeatureList string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "GetFeatureList", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if FeatureList, err = soap.UnmarshalString(response.FeatureList); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ContentDirectory3) GetSystemUpdateID() (Id uint32, err error) {
- // Request structure.
- request := interface{}(nil)
- // BEGIN Marshal arguments into request.
-
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- Id string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "GetSystemUpdateID", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if Id, err = soap.UnmarshalUi4(response.Id); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ContentDirectory3) GetServiceResetToken() (ResetToken string, err error) {
- // Request structure.
- request := interface{}(nil)
- // BEGIN Marshal arguments into request.
-
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- ResetToken string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "GetServiceResetToken", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if ResetToken, err = soap.UnmarshalString(response.ResetToken); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * BrowseFlag: allowed values: BrowseMetadata, BrowseDirectChildren
-
-func (client *ContentDirectory3) Browse(ObjectID string, BrowseFlag string, Filter string, StartingIndex uint32, RequestedCount uint32, SortCriteria string) (Result string, NumberReturned uint32, TotalMatches uint32, UpdateID uint32, err error) {
- // Request structure.
- request := &struct {
- ObjectID string
-
- BrowseFlag string
-
- Filter string
-
- StartingIndex string
-
- RequestedCount string
-
- SortCriteria string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil {
- return
- }
- if request.BrowseFlag, err = soap.MarshalString(BrowseFlag); err != nil {
- return
- }
- if request.Filter, err = soap.MarshalString(Filter); err != nil {
- return
- }
- if request.StartingIndex, err = soap.MarshalUi4(StartingIndex); err != nil {
- return
- }
- if request.RequestedCount, err = soap.MarshalUi4(RequestedCount); err != nil {
- return
- }
- if request.SortCriteria, err = soap.MarshalString(SortCriteria); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- Result string
-
- NumberReturned string
-
- TotalMatches string
-
- UpdateID string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "Browse", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if Result, err = soap.UnmarshalString(response.Result); err != nil {
- return
- }
- if NumberReturned, err = soap.UnmarshalUi4(response.NumberReturned); err != nil {
- return
- }
- if TotalMatches, err = soap.UnmarshalUi4(response.TotalMatches); err != nil {
- return
- }
- if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ContentDirectory3) Search(ContainerID string, SearchCriteria string, Filter string, StartingIndex uint32, RequestedCount uint32, SortCriteria string) (Result string, NumberReturned uint32, TotalMatches uint32, UpdateID uint32, err error) {
- // Request structure.
- request := &struct {
- ContainerID string
-
- SearchCriteria string
-
- Filter string
-
- StartingIndex string
-
- RequestedCount string
-
- SortCriteria string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.ContainerID, err = soap.MarshalString(ContainerID); err != nil {
- return
- }
- if request.SearchCriteria, err = soap.MarshalString(SearchCriteria); err != nil {
- return
- }
- if request.Filter, err = soap.MarshalString(Filter); err != nil {
- return
- }
- if request.StartingIndex, err = soap.MarshalUi4(StartingIndex); err != nil {
- return
- }
- if request.RequestedCount, err = soap.MarshalUi4(RequestedCount); err != nil {
- return
- }
- if request.SortCriteria, err = soap.MarshalString(SortCriteria); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- Result string
-
- NumberReturned string
-
- TotalMatches string
-
- UpdateID string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "Search", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if Result, err = soap.UnmarshalString(response.Result); err != nil {
- return
- }
- if NumberReturned, err = soap.UnmarshalUi4(response.NumberReturned); err != nil {
- return
- }
- if TotalMatches, err = soap.UnmarshalUi4(response.TotalMatches); err != nil {
- return
- }
- if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ContentDirectory3) CreateObject(ContainerID string, Elements string) (ObjectID string, Result string, err error) {
- // Request structure.
- request := &struct {
- ContainerID string
-
- Elements string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.ContainerID, err = soap.MarshalString(ContainerID); err != nil {
- return
- }
- if request.Elements, err = soap.MarshalString(Elements); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- ObjectID string
-
- Result string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "CreateObject", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if ObjectID, err = soap.UnmarshalString(response.ObjectID); err != nil {
- return
- }
- if Result, err = soap.UnmarshalString(response.Result); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ContentDirectory3) DestroyObject(ObjectID string) (err error) {
- // Request structure.
- request := &struct {
- ObjectID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "DestroyObject", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ContentDirectory3) UpdateObject(ObjectID string, CurrentTagValue string, NewTagValue string) (err error) {
- // Request structure.
- request := &struct {
- ObjectID string
-
- CurrentTagValue string
-
- NewTagValue string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil {
- return
- }
- if request.CurrentTagValue, err = soap.MarshalString(CurrentTagValue); err != nil {
- return
- }
- if request.NewTagValue, err = soap.MarshalString(NewTagValue); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "UpdateObject", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ContentDirectory3) MoveObject(ObjectID string, NewParentID string) (NewObjectID string, err error) {
- // Request structure.
- request := &struct {
- ObjectID string
-
- NewParentID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil {
- return
- }
- if request.NewParentID, err = soap.MarshalString(NewParentID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- NewObjectID string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "MoveObject", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if NewObjectID, err = soap.UnmarshalString(response.NewObjectID); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ContentDirectory3) ImportResource(SourceURI *url.URL, DestinationURI *url.URL) (TransferID uint32, err error) {
- // Request structure.
- request := &struct {
- SourceURI string
-
- DestinationURI string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.SourceURI, err = soap.MarshalURI(SourceURI); err != nil {
- return
- }
- if request.DestinationURI, err = soap.MarshalURI(DestinationURI); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- TransferID string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "ImportResource", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if TransferID, err = soap.UnmarshalUi4(response.TransferID); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ContentDirectory3) ExportResource(SourceURI *url.URL, DestinationURI *url.URL) (TransferID uint32, err error) {
- // Request structure.
- request := &struct {
- SourceURI string
-
- DestinationURI string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.SourceURI, err = soap.MarshalURI(SourceURI); err != nil {
- return
- }
- if request.DestinationURI, err = soap.MarshalURI(DestinationURI); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- TransferID string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "ExportResource", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if TransferID, err = soap.UnmarshalUi4(response.TransferID); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ContentDirectory3) DeleteResource(ResourceURI *url.URL) (err error) {
- // Request structure.
- request := &struct {
- ResourceURI string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.ResourceURI, err = soap.MarshalURI(ResourceURI); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "DeleteResource", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ContentDirectory3) StopTransferResource(TransferID uint32) (err error) {
- // Request structure.
- request := &struct {
- TransferID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.TransferID, err = soap.MarshalUi4(TransferID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "StopTransferResource", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Return values:
-//
-// * TransferStatus: allowed values: COMPLETED, ERROR, IN_PROGRESS, STOPPED
-func (client *ContentDirectory3) GetTransferProgress(TransferID uint32) (TransferStatus string, TransferLength string, TransferTotal string, err error) {
- // Request structure.
- request := &struct {
- TransferID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.TransferID, err = soap.MarshalUi4(TransferID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- TransferStatus string
-
- TransferLength string
-
- TransferTotal string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "GetTransferProgress", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if TransferStatus, err = soap.UnmarshalString(response.TransferStatus); err != nil {
- return
- }
- if TransferLength, err = soap.UnmarshalString(response.TransferLength); err != nil {
- return
- }
- if TransferTotal, err = soap.UnmarshalString(response.TransferTotal); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ContentDirectory3) CreateReference(ContainerID string, ObjectID string) (NewID string, err error) {
- // Request structure.
- request := &struct {
- ContainerID string
-
- ObjectID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.ContainerID, err = soap.MarshalString(ContainerID); err != nil {
- return
- }
- if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- NewID string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "CreateReference", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if NewID, err = soap.UnmarshalString(response.NewID); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ContentDirectory3) FreeFormQuery(ContainerID string, CDSView uint32, QueryRequest string) (QueryResult string, UpdateID uint32, err error) {
- // Request structure.
- request := &struct {
- ContainerID string
-
- CDSView string
-
- QueryRequest string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.ContainerID, err = soap.MarshalString(ContainerID); err != nil {
- return
- }
- if request.CDSView, err = soap.MarshalUi4(CDSView); err != nil {
- return
- }
- if request.QueryRequest, err = soap.MarshalString(QueryRequest); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- QueryResult string
-
- UpdateID string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "FreeFormQuery", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if QueryResult, err = soap.UnmarshalString(response.QueryResult); err != nil {
- return
- }
- if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ContentDirectory3) GetFreeFormQueryCapabilities() (FFQCapabilities string, err error) {
- // Request structure.
- request := interface{}(nil)
- // BEGIN Marshal arguments into request.
-
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- FFQCapabilities string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "GetFreeFormQueryCapabilities", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if FFQCapabilities, err = soap.UnmarshalString(response.FFQCapabilities); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-// RenderingControl1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:RenderingControl:1". See
-// goupnp.ServiceClient, which contains RootDevice and Service attributes which
-// are provided for informational value.
-type RenderingControl1 struct {
- goupnp.ServiceClient
-}
-
-// NewRenderingControl1Clients discovers instances of the service on the network,
-// and returns clients to any that are found. errors will contain an error for
-// any devices that replied but which could not be queried, and err will be set
-// if the discovery process failed outright.
-//
-// This is a typical entry calling point into this package.
-func NewRenderingControl1Clients() (clients []*RenderingControl1, errors []error, err error) {
- var genericClients []goupnp.ServiceClient
- if genericClients, errors, err = goupnp.NewServiceClients(URN_RenderingControl_1); err != nil {
- return
- }
- clients = newRenderingControl1ClientsFromGenericClients(genericClients)
- return
-}
-
-// NewRenderingControl1ClientsByURL discovers instances of the service at the given
-// URL, and returns clients to any that are found. An error is returned if
-// there was an error probing the service.
-//
-// This is a typical entry calling point into this package when reusing an
-// previously discovered service URL.
-func NewRenderingControl1ClientsByURL(loc *url.URL) ([]*RenderingControl1, error) {
- genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_RenderingControl_1)
- if err != nil {
- return nil, err
- }
- return newRenderingControl1ClientsFromGenericClients(genericClients), nil
-}
-
-// NewRenderingControl1ClientsFromRootDevice discovers instances of the service in
-// a given root device, and returns clients to any that are found. An error is
-// returned if there was not at least one instance of the service within the
-// device. The location parameter is simply assigned to the Location attribute
-// of the wrapped ServiceClient(s).
-//
-// This is a typical entry calling point into this package when reusing an
-// previously discovered root device.
-func NewRenderingControl1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*RenderingControl1, error) {
- genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_RenderingControl_1)
- if err != nil {
- return nil, err
- }
- return newRenderingControl1ClientsFromGenericClients(genericClients), nil
-}
-
-func newRenderingControl1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*RenderingControl1 {
- clients := make([]*RenderingControl1, len(genericClients))
- for i := range genericClients {
- clients[i] = &RenderingControl1{genericClients[i]}
- }
- return clients
-}
-
-func (client *RenderingControl1) ListPresets(InstanceID uint32) (CurrentPresetNameList string, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- CurrentPresetNameList string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "ListPresets", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if CurrentPresetNameList, err = soap.UnmarshalString(response.CurrentPresetNameList); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * PresetName: allowed values: FactoryDefaults
-
-func (client *RenderingControl1) SelectPreset(InstanceID uint32, PresetName string) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- PresetName string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.PresetName, err = soap.MarshalString(PresetName); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SelectPreset", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Return values:
-//
-// * CurrentBrightness: allowed value range: minimum=0, step=1
-func (client *RenderingControl1) GetBrightness(InstanceID uint32) (CurrentBrightness uint16, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- CurrentBrightness string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetBrightness", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if CurrentBrightness, err = soap.UnmarshalUi2(response.CurrentBrightness); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * DesiredBrightness: allowed value range: minimum=0, step=1
-
-func (client *RenderingControl1) SetBrightness(InstanceID uint32, DesiredBrightness uint16) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- DesiredBrightness string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.DesiredBrightness, err = soap.MarshalUi2(DesiredBrightness); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetBrightness", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Return values:
-//
-// * CurrentContrast: allowed value range: minimum=0, step=1
-func (client *RenderingControl1) GetContrast(InstanceID uint32) (CurrentContrast uint16, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- CurrentContrast string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetContrast", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if CurrentContrast, err = soap.UnmarshalUi2(response.CurrentContrast); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * DesiredContrast: allowed value range: minimum=0, step=1
-
-func (client *RenderingControl1) SetContrast(InstanceID uint32, DesiredContrast uint16) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- DesiredContrast string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.DesiredContrast, err = soap.MarshalUi2(DesiredContrast); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetContrast", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Return values:
-//
-// * CurrentSharpness: allowed value range: minimum=0, step=1
-func (client *RenderingControl1) GetSharpness(InstanceID uint32) (CurrentSharpness uint16, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- CurrentSharpness string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetSharpness", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if CurrentSharpness, err = soap.UnmarshalUi2(response.CurrentSharpness); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * DesiredSharpness: allowed value range: minimum=0, step=1
-
-func (client *RenderingControl1) SetSharpness(InstanceID uint32, DesiredSharpness uint16) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- DesiredSharpness string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.DesiredSharpness, err = soap.MarshalUi2(DesiredSharpness); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetSharpness", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *RenderingControl1) GetRedVideoGain(InstanceID uint32) (CurrentRedVideoGain uint16, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- CurrentRedVideoGain string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetRedVideoGain", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if CurrentRedVideoGain, err = soap.UnmarshalUi2(response.CurrentRedVideoGain); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *RenderingControl1) SetRedVideoGain(InstanceID uint32, DesiredRedVideoGain uint16) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- DesiredRedVideoGain string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.DesiredRedVideoGain, err = soap.MarshalUi2(DesiredRedVideoGain); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetRedVideoGain", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Return values:
-//
-// * CurrentGreenVideoGain: allowed value range: minimum=0, step=1
-func (client *RenderingControl1) GetGreenVideoGain(InstanceID uint32) (CurrentGreenVideoGain uint16, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- CurrentGreenVideoGain string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetGreenVideoGain", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if CurrentGreenVideoGain, err = soap.UnmarshalUi2(response.CurrentGreenVideoGain); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * DesiredGreenVideoGain: allowed value range: minimum=0, step=1
-
-func (client *RenderingControl1) SetGreenVideoGain(InstanceID uint32, DesiredGreenVideoGain uint16) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- DesiredGreenVideoGain string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.DesiredGreenVideoGain, err = soap.MarshalUi2(DesiredGreenVideoGain); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetGreenVideoGain", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Return values:
-//
-// * CurrentBlueVideoGain: allowed value range: minimum=0, step=1
-func (client *RenderingControl1) GetBlueVideoGain(InstanceID uint32) (CurrentBlueVideoGain uint16, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- CurrentBlueVideoGain string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetBlueVideoGain", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if CurrentBlueVideoGain, err = soap.UnmarshalUi2(response.CurrentBlueVideoGain); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * DesiredBlueVideoGain: allowed value range: minimum=0, step=1
-
-func (client *RenderingControl1) SetBlueVideoGain(InstanceID uint32, DesiredBlueVideoGain uint16) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- DesiredBlueVideoGain string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.DesiredBlueVideoGain, err = soap.MarshalUi2(DesiredBlueVideoGain); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetBlueVideoGain", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Return values:
-//
-// * CurrentRedVideoBlackLevel: allowed value range: minimum=0, step=1
-func (client *RenderingControl1) GetRedVideoBlackLevel(InstanceID uint32) (CurrentRedVideoBlackLevel uint16, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- CurrentRedVideoBlackLevel string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetRedVideoBlackLevel", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if CurrentRedVideoBlackLevel, err = soap.UnmarshalUi2(response.CurrentRedVideoBlackLevel); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * DesiredRedVideoBlackLevel: allowed value range: minimum=0, step=1
-
-func (client *RenderingControl1) SetRedVideoBlackLevel(InstanceID uint32, DesiredRedVideoBlackLevel uint16) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- DesiredRedVideoBlackLevel string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.DesiredRedVideoBlackLevel, err = soap.MarshalUi2(DesiredRedVideoBlackLevel); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetRedVideoBlackLevel", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Return values:
-//
-// * CurrentGreenVideoBlackLevel: allowed value range: minimum=0, step=1
-func (client *RenderingControl1) GetGreenVideoBlackLevel(InstanceID uint32) (CurrentGreenVideoBlackLevel uint16, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- CurrentGreenVideoBlackLevel string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetGreenVideoBlackLevel", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if CurrentGreenVideoBlackLevel, err = soap.UnmarshalUi2(response.CurrentGreenVideoBlackLevel); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * DesiredGreenVideoBlackLevel: allowed value range: minimum=0, step=1
-
-func (client *RenderingControl1) SetGreenVideoBlackLevel(InstanceID uint32, DesiredGreenVideoBlackLevel uint16) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- DesiredGreenVideoBlackLevel string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.DesiredGreenVideoBlackLevel, err = soap.MarshalUi2(DesiredGreenVideoBlackLevel); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetGreenVideoBlackLevel", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Return values:
-//
-// * CurrentBlueVideoBlackLevel: allowed value range: minimum=0, step=1
-func (client *RenderingControl1) GetBlueVideoBlackLevel(InstanceID uint32) (CurrentBlueVideoBlackLevel uint16, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- CurrentBlueVideoBlackLevel string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetBlueVideoBlackLevel", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if CurrentBlueVideoBlackLevel, err = soap.UnmarshalUi2(response.CurrentBlueVideoBlackLevel); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * DesiredBlueVideoBlackLevel: allowed value range: minimum=0, step=1
-
-func (client *RenderingControl1) SetBlueVideoBlackLevel(InstanceID uint32, DesiredBlueVideoBlackLevel uint16) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- DesiredBlueVideoBlackLevel string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.DesiredBlueVideoBlackLevel, err = soap.MarshalUi2(DesiredBlueVideoBlackLevel); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetBlueVideoBlackLevel", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Return values:
-//
-// * CurrentColorTemperature: allowed value range: minimum=0, step=1
-func (client *RenderingControl1) GetColorTemperature(InstanceID uint32) (CurrentColorTemperature uint16, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- CurrentColorTemperature string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetColorTemperature", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if CurrentColorTemperature, err = soap.UnmarshalUi2(response.CurrentColorTemperature); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * DesiredColorTemperature: allowed value range: minimum=0, step=1
-
-func (client *RenderingControl1) SetColorTemperature(InstanceID uint32, DesiredColorTemperature uint16) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- DesiredColorTemperature string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.DesiredColorTemperature, err = soap.MarshalUi2(DesiredColorTemperature); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetColorTemperature", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Return values:
-//
-// * CurrentHorizontalKeystone: allowed value range: step=1
-func (client *RenderingControl1) GetHorizontalKeystone(InstanceID uint32) (CurrentHorizontalKeystone int16, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- CurrentHorizontalKeystone string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetHorizontalKeystone", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if CurrentHorizontalKeystone, err = soap.UnmarshalI2(response.CurrentHorizontalKeystone); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * DesiredHorizontalKeystone: allowed value range: step=1
-
-func (client *RenderingControl1) SetHorizontalKeystone(InstanceID uint32, DesiredHorizontalKeystone int16) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- DesiredHorizontalKeystone string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.DesiredHorizontalKeystone, err = soap.MarshalI2(DesiredHorizontalKeystone); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetHorizontalKeystone", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Return values:
-//
-// * CurrentVerticalKeystone: allowed value range: step=1
-func (client *RenderingControl1) GetVerticalKeystone(InstanceID uint32) (CurrentVerticalKeystone int16, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- CurrentVerticalKeystone string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetVerticalKeystone", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if CurrentVerticalKeystone, err = soap.UnmarshalI2(response.CurrentVerticalKeystone); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * DesiredVerticalKeystone: allowed value range: step=1
-
-func (client *RenderingControl1) SetVerticalKeystone(InstanceID uint32, DesiredVerticalKeystone int16) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- DesiredVerticalKeystone string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.DesiredVerticalKeystone, err = soap.MarshalI2(DesiredVerticalKeystone); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetVerticalKeystone", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * Channel: allowed values: Master
-
-func (client *RenderingControl1) GetMute(InstanceID uint32, Channel string) (CurrentMute bool, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- Channel string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.Channel, err = soap.MarshalString(Channel); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- CurrentMute string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetMute", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if CurrentMute, err = soap.UnmarshalBoolean(response.CurrentMute); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * Channel: allowed values: Master
-
-func (client *RenderingControl1) SetMute(InstanceID uint32, Channel string, DesiredMute bool) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- Channel string
-
- DesiredMute string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.Channel, err = soap.MarshalString(Channel); err != nil {
- return
- }
- if request.DesiredMute, err = soap.MarshalBoolean(DesiredMute); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetMute", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * Channel: allowed values: Master
-
-//
-// Return values:
-//
-// * CurrentVolume: allowed value range: minimum=0, step=1
-func (client *RenderingControl1) GetVolume(InstanceID uint32, Channel string) (CurrentVolume uint16, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- Channel string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.Channel, err = soap.MarshalString(Channel); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- CurrentVolume string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetVolume", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if CurrentVolume, err = soap.UnmarshalUi2(response.CurrentVolume); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * Channel: allowed values: Master
-//
-// * DesiredVolume: allowed value range: minimum=0, step=1
-
-func (client *RenderingControl1) SetVolume(InstanceID uint32, Channel string, DesiredVolume uint16) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- Channel string
-
- DesiredVolume string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.Channel, err = soap.MarshalString(Channel); err != nil {
- return
- }
- if request.DesiredVolume, err = soap.MarshalUi2(DesiredVolume); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetVolume", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * Channel: allowed values: Master
-
-func (client *RenderingControl1) GetVolumeDB(InstanceID uint32, Channel string) (CurrentVolume int16, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- Channel string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.Channel, err = soap.MarshalString(Channel); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- CurrentVolume string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetVolumeDB", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if CurrentVolume, err = soap.UnmarshalI2(response.CurrentVolume); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * Channel: allowed values: Master
-
-func (client *RenderingControl1) SetVolumeDB(InstanceID uint32, Channel string, DesiredVolume int16) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- Channel string
-
- DesiredVolume string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.Channel, err = soap.MarshalString(Channel); err != nil {
- return
- }
- if request.DesiredVolume, err = soap.MarshalI2(DesiredVolume); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetVolumeDB", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * Channel: allowed values: Master
-
-func (client *RenderingControl1) GetVolumeDBRange(InstanceID uint32, Channel string) (MinValue int16, MaxValue int16, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- Channel string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.Channel, err = soap.MarshalString(Channel); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- MinValue string
-
- MaxValue string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetVolumeDBRange", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if MinValue, err = soap.UnmarshalI2(response.MinValue); err != nil {
- return
- }
- if MaxValue, err = soap.UnmarshalI2(response.MaxValue); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * Channel: allowed values: Master
-
-func (client *RenderingControl1) GetLoudness(InstanceID uint32, Channel string) (CurrentLoudness bool, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- Channel string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.Channel, err = soap.MarshalString(Channel); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- CurrentLoudness string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetLoudness", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if CurrentLoudness, err = soap.UnmarshalBoolean(response.CurrentLoudness); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * Channel: allowed values: Master
-
-func (client *RenderingControl1) SetLoudness(InstanceID uint32, Channel string, DesiredLoudness bool) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- Channel string
-
- DesiredLoudness string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.Channel, err = soap.MarshalString(Channel); err != nil {
- return
- }
- if request.DesiredLoudness, err = soap.MarshalBoolean(DesiredLoudness); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetLoudness", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-// RenderingControl2 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:RenderingControl:2". See
-// goupnp.ServiceClient, which contains RootDevice and Service attributes which
-// are provided for informational value.
-type RenderingControl2 struct {
- goupnp.ServiceClient
-}
-
-// NewRenderingControl2Clients discovers instances of the service on the network,
-// and returns clients to any that are found. errors will contain an error for
-// any devices that replied but which could not be queried, and err will be set
-// if the discovery process failed outright.
-//
-// This is a typical entry calling point into this package.
-func NewRenderingControl2Clients() (clients []*RenderingControl2, errors []error, err error) {
- var genericClients []goupnp.ServiceClient
- if genericClients, errors, err = goupnp.NewServiceClients(URN_RenderingControl_2); err != nil {
- return
- }
- clients = newRenderingControl2ClientsFromGenericClients(genericClients)
- return
-}
-
-// NewRenderingControl2ClientsByURL discovers instances of the service at the given
-// URL, and returns clients to any that are found. An error is returned if
-// there was an error probing the service.
-//
-// This is a typical entry calling point into this package when reusing an
-// previously discovered service URL.
-func NewRenderingControl2ClientsByURL(loc *url.URL) ([]*RenderingControl2, error) {
- genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_RenderingControl_2)
- if err != nil {
- return nil, err
- }
- return newRenderingControl2ClientsFromGenericClients(genericClients), nil
-}
-
-// NewRenderingControl2ClientsFromRootDevice discovers instances of the service in
-// a given root device, and returns clients to any that are found. An error is
-// returned if there was not at least one instance of the service within the
-// device. The location parameter is simply assigned to the Location attribute
-// of the wrapped ServiceClient(s).
-//
-// This is a typical entry calling point into this package when reusing an
-// previously discovered root device.
-func NewRenderingControl2ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*RenderingControl2, error) {
- genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_RenderingControl_2)
- if err != nil {
- return nil, err
- }
- return newRenderingControl2ClientsFromGenericClients(genericClients), nil
-}
-
-func newRenderingControl2ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*RenderingControl2 {
- clients := make([]*RenderingControl2, len(genericClients))
- for i := range genericClients {
- clients[i] = &RenderingControl2{genericClients[i]}
- }
- return clients
-}
-
-func (client *RenderingControl2) ListPresets(InstanceID uint32) (CurrentPresetNameList string, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- CurrentPresetNameList string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "ListPresets", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if CurrentPresetNameList, err = soap.UnmarshalString(response.CurrentPresetNameList); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * PresetName: allowed values: FactoryDefaults
-
-func (client *RenderingControl2) SelectPreset(InstanceID uint32, PresetName string) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- PresetName string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.PresetName, err = soap.MarshalString(PresetName); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SelectPreset", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Return values:
-//
-// * CurrentBrightness: allowed value range: minimum=0, step=1
-func (client *RenderingControl2) GetBrightness(InstanceID uint32) (CurrentBrightness uint16, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- CurrentBrightness string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetBrightness", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if CurrentBrightness, err = soap.UnmarshalUi2(response.CurrentBrightness); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * DesiredBrightness: allowed value range: minimum=0, step=1
-
-func (client *RenderingControl2) SetBrightness(InstanceID uint32, DesiredBrightness uint16) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- DesiredBrightness string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.DesiredBrightness, err = soap.MarshalUi2(DesiredBrightness); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetBrightness", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Return values:
-//
-// * CurrentContrast: allowed value range: minimum=0, step=1
-func (client *RenderingControl2) GetContrast(InstanceID uint32) (CurrentContrast uint16, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- CurrentContrast string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetContrast", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if CurrentContrast, err = soap.UnmarshalUi2(response.CurrentContrast); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * DesiredContrast: allowed value range: minimum=0, step=1
-
-func (client *RenderingControl2) SetContrast(InstanceID uint32, DesiredContrast uint16) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- DesiredContrast string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.DesiredContrast, err = soap.MarshalUi2(DesiredContrast); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetContrast", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Return values:
-//
-// * CurrentSharpness: allowed value range: minimum=0, step=1
-func (client *RenderingControl2) GetSharpness(InstanceID uint32) (CurrentSharpness uint16, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- CurrentSharpness string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetSharpness", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if CurrentSharpness, err = soap.UnmarshalUi2(response.CurrentSharpness); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * DesiredSharpness: allowed value range: minimum=0, step=1
-
-func (client *RenderingControl2) SetSharpness(InstanceID uint32, DesiredSharpness uint16) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- DesiredSharpness string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.DesiredSharpness, err = soap.MarshalUi2(DesiredSharpness); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetSharpness", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Return values:
-//
-// * CurrentRedVideoGain: allowed value range: minimum=0, step=1
-func (client *RenderingControl2) GetRedVideoGain(InstanceID uint32) (CurrentRedVideoGain uint16, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- CurrentRedVideoGain string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetRedVideoGain", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if CurrentRedVideoGain, err = soap.UnmarshalUi2(response.CurrentRedVideoGain); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * DesiredRedVideoGain: allowed value range: minimum=0, step=1
-
-func (client *RenderingControl2) SetRedVideoGain(InstanceID uint32, DesiredRedVideoGain uint16) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- DesiredRedVideoGain string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.DesiredRedVideoGain, err = soap.MarshalUi2(DesiredRedVideoGain); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetRedVideoGain", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Return values:
-//
-// * CurrentGreenVideoGain: allowed value range: minimum=0, step=1
-func (client *RenderingControl2) GetGreenVideoGain(InstanceID uint32) (CurrentGreenVideoGain uint16, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- CurrentGreenVideoGain string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetGreenVideoGain", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if CurrentGreenVideoGain, err = soap.UnmarshalUi2(response.CurrentGreenVideoGain); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * DesiredGreenVideoGain: allowed value range: minimum=0, step=1
-
-func (client *RenderingControl2) SetGreenVideoGain(InstanceID uint32, DesiredGreenVideoGain uint16) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- DesiredGreenVideoGain string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.DesiredGreenVideoGain, err = soap.MarshalUi2(DesiredGreenVideoGain); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetGreenVideoGain", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Return values:
-//
-// * CurrentBlueVideoGain: allowed value range: minimum=0, step=1
-func (client *RenderingControl2) GetBlueVideoGain(InstanceID uint32) (CurrentBlueVideoGain uint16, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- CurrentBlueVideoGain string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetBlueVideoGain", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if CurrentBlueVideoGain, err = soap.UnmarshalUi2(response.CurrentBlueVideoGain); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * DesiredBlueVideoGain: allowed value range: minimum=0, step=1
-
-func (client *RenderingControl2) SetBlueVideoGain(InstanceID uint32, DesiredBlueVideoGain uint16) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- DesiredBlueVideoGain string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.DesiredBlueVideoGain, err = soap.MarshalUi2(DesiredBlueVideoGain); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetBlueVideoGain", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Return values:
-//
-// * CurrentRedVideoBlackLevel: allowed value range: minimum=0, step=1
-func (client *RenderingControl2) GetRedVideoBlackLevel(InstanceID uint32) (CurrentRedVideoBlackLevel uint16, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- CurrentRedVideoBlackLevel string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetRedVideoBlackLevel", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if CurrentRedVideoBlackLevel, err = soap.UnmarshalUi2(response.CurrentRedVideoBlackLevel); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * DesiredRedVideoBlackLevel: allowed value range: minimum=0, step=1
-
-func (client *RenderingControl2) SetRedVideoBlackLevel(InstanceID uint32, DesiredRedVideoBlackLevel uint16) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- DesiredRedVideoBlackLevel string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.DesiredRedVideoBlackLevel, err = soap.MarshalUi2(DesiredRedVideoBlackLevel); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetRedVideoBlackLevel", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Return values:
-//
-// * CurrentGreenVideoBlackLevel: allowed value range: minimum=0, step=1
-func (client *RenderingControl2) GetGreenVideoBlackLevel(InstanceID uint32) (CurrentGreenVideoBlackLevel uint16, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- CurrentGreenVideoBlackLevel string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetGreenVideoBlackLevel", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if CurrentGreenVideoBlackLevel, err = soap.UnmarshalUi2(response.CurrentGreenVideoBlackLevel); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * DesiredGreenVideoBlackLevel: allowed value range: minimum=0, step=1
-
-func (client *RenderingControl2) SetGreenVideoBlackLevel(InstanceID uint32, DesiredGreenVideoBlackLevel uint16) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- DesiredGreenVideoBlackLevel string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.DesiredGreenVideoBlackLevel, err = soap.MarshalUi2(DesiredGreenVideoBlackLevel); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetGreenVideoBlackLevel", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Return values:
-//
-// * CurrentBlueVideoBlackLevel: allowed value range: minimum=0, step=1
-func (client *RenderingControl2) GetBlueVideoBlackLevel(InstanceID uint32) (CurrentBlueVideoBlackLevel uint16, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- CurrentBlueVideoBlackLevel string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetBlueVideoBlackLevel", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if CurrentBlueVideoBlackLevel, err = soap.UnmarshalUi2(response.CurrentBlueVideoBlackLevel); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * DesiredBlueVideoBlackLevel: allowed value range: minimum=0, step=1
-
-func (client *RenderingControl2) SetBlueVideoBlackLevel(InstanceID uint32, DesiredBlueVideoBlackLevel uint16) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- DesiredBlueVideoBlackLevel string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.DesiredBlueVideoBlackLevel, err = soap.MarshalUi2(DesiredBlueVideoBlackLevel); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetBlueVideoBlackLevel", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Return values:
-//
-// * CurrentColorTemperature: allowed value range: minimum=0, step=1
-func (client *RenderingControl2) GetColorTemperature(InstanceID uint32) (CurrentColorTemperature uint16, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- CurrentColorTemperature string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetColorTemperature", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if CurrentColorTemperature, err = soap.UnmarshalUi2(response.CurrentColorTemperature); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * DesiredColorTemperature: allowed value range: minimum=0, step=1
-
-func (client *RenderingControl2) SetColorTemperature(InstanceID uint32, DesiredColorTemperature uint16) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- DesiredColorTemperature string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.DesiredColorTemperature, err = soap.MarshalUi2(DesiredColorTemperature); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetColorTemperature", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Return values:
-//
-// * CurrentHorizontalKeystone: allowed value range: step=1
-func (client *RenderingControl2) GetHorizontalKeystone(InstanceID uint32) (CurrentHorizontalKeystone int16, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- CurrentHorizontalKeystone string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetHorizontalKeystone", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if CurrentHorizontalKeystone, err = soap.UnmarshalI2(response.CurrentHorizontalKeystone); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * DesiredHorizontalKeystone: allowed value range: step=1
-
-func (client *RenderingControl2) SetHorizontalKeystone(InstanceID uint32, DesiredHorizontalKeystone int16) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- DesiredHorizontalKeystone string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.DesiredHorizontalKeystone, err = soap.MarshalI2(DesiredHorizontalKeystone); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetHorizontalKeystone", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Return values:
-//
-// * CurrentVerticalKeystone: allowed value range: step=1
-func (client *RenderingControl2) GetVerticalKeystone(InstanceID uint32) (CurrentVerticalKeystone int16, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- CurrentVerticalKeystone string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetVerticalKeystone", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if CurrentVerticalKeystone, err = soap.UnmarshalI2(response.CurrentVerticalKeystone); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * DesiredVerticalKeystone: allowed value range: step=1
-
-func (client *RenderingControl2) SetVerticalKeystone(InstanceID uint32, DesiredVerticalKeystone int16) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- DesiredVerticalKeystone string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.DesiredVerticalKeystone, err = soap.MarshalI2(DesiredVerticalKeystone); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetVerticalKeystone", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * Channel: allowed values: Master
-
-func (client *RenderingControl2) GetMute(InstanceID uint32, Channel string) (CurrentMute bool, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- Channel string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.Channel, err = soap.MarshalString(Channel); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- CurrentMute string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetMute", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if CurrentMute, err = soap.UnmarshalBoolean(response.CurrentMute); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * Channel: allowed values: Master
-
-func (client *RenderingControl2) SetMute(InstanceID uint32, Channel string, DesiredMute bool) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- Channel string
-
- DesiredMute string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.Channel, err = soap.MarshalString(Channel); err != nil {
- return
- }
- if request.DesiredMute, err = soap.MarshalBoolean(DesiredMute); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetMute", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * Channel: allowed values: Master
-
-//
-// Return values:
-//
-// * CurrentVolume: allowed value range: minimum=0, step=1
-func (client *RenderingControl2) GetVolume(InstanceID uint32, Channel string) (CurrentVolume uint16, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- Channel string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.Channel, err = soap.MarshalString(Channel); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- CurrentVolume string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetVolume", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if CurrentVolume, err = soap.UnmarshalUi2(response.CurrentVolume); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * Channel: allowed values: Master
-//
-// * DesiredVolume: allowed value range: minimum=0, step=1
-
-func (client *RenderingControl2) SetVolume(InstanceID uint32, Channel string, DesiredVolume uint16) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- Channel string
-
- DesiredVolume string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.Channel, err = soap.MarshalString(Channel); err != nil {
- return
- }
- if request.DesiredVolume, err = soap.MarshalUi2(DesiredVolume); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetVolume", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * Channel: allowed values: Master
-
-func (client *RenderingControl2) GetVolumeDB(InstanceID uint32, Channel string) (CurrentVolume int16, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- Channel string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.Channel, err = soap.MarshalString(Channel); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- CurrentVolume string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetVolumeDB", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if CurrentVolume, err = soap.UnmarshalI2(response.CurrentVolume); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * Channel: allowed values: Master
-
-func (client *RenderingControl2) SetVolumeDB(InstanceID uint32, Channel string, DesiredVolume int16) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- Channel string
-
- DesiredVolume string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.Channel, err = soap.MarshalString(Channel); err != nil {
- return
- }
- if request.DesiredVolume, err = soap.MarshalI2(DesiredVolume); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetVolumeDB", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * Channel: allowed values: Master
-
-func (client *RenderingControl2) GetVolumeDBRange(InstanceID uint32, Channel string) (MinValue int16, MaxValue int16, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- Channel string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.Channel, err = soap.MarshalString(Channel); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- MinValue string
-
- MaxValue string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetVolumeDBRange", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if MinValue, err = soap.UnmarshalI2(response.MinValue); err != nil {
- return
- }
- if MaxValue, err = soap.UnmarshalI2(response.MaxValue); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * Channel: allowed values: Master
-
-func (client *RenderingControl2) GetLoudness(InstanceID uint32, Channel string) (CurrentLoudness bool, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- Channel string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.Channel, err = soap.MarshalString(Channel); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- CurrentLoudness string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetLoudness", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if CurrentLoudness, err = soap.UnmarshalBoolean(response.CurrentLoudness); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * Channel: allowed values: Master
-
-func (client *RenderingControl2) SetLoudness(InstanceID uint32, Channel string, DesiredLoudness bool) (err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- Channel string
-
- DesiredLoudness string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.Channel, err = soap.MarshalString(Channel); err != nil {
- return
- }
- if request.DesiredLoudness, err = soap.MarshalBoolean(DesiredLoudness); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetLoudness", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *RenderingControl2) GetStateVariables(InstanceID uint32, StateVariableList string) (StateVariableValuePairs string, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- StateVariableList string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.StateVariableList, err = soap.MarshalString(StateVariableList); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- StateVariableValuePairs string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetStateVariables", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if StateVariableValuePairs, err = soap.UnmarshalString(response.StateVariableValuePairs); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *RenderingControl2) SetStateVariables(InstanceID uint32, RenderingControlUDN string, ServiceType string, ServiceId string, StateVariableValuePairs string) (StateVariableList string, err error) {
- // Request structure.
- request := &struct {
- InstanceID string
-
- RenderingControlUDN string
-
- ServiceType string
-
- ServiceId string
-
- StateVariableValuePairs string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
- return
- }
- if request.RenderingControlUDN, err = soap.MarshalString(RenderingControlUDN); err != nil {
- return
- }
- if request.ServiceType, err = soap.MarshalString(ServiceType); err != nil {
- return
- }
- if request.ServiceId, err = soap.MarshalString(ServiceId); err != nil {
- return
- }
- if request.StateVariableValuePairs, err = soap.MarshalString(StateVariableValuePairs); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- StateVariableList string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetStateVariables", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if StateVariableList, err = soap.UnmarshalString(response.StateVariableList); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-// ScheduledRecording1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:ScheduledRecording:1". See
-// goupnp.ServiceClient, which contains RootDevice and Service attributes which
-// are provided for informational value.
-type ScheduledRecording1 struct {
- goupnp.ServiceClient
-}
-
-// NewScheduledRecording1Clients discovers instances of the service on the network,
-// and returns clients to any that are found. errors will contain an error for
-// any devices that replied but which could not be queried, and err will be set
-// if the discovery process failed outright.
-//
-// This is a typical entry calling point into this package.
-func NewScheduledRecording1Clients() (clients []*ScheduledRecording1, errors []error, err error) {
- var genericClients []goupnp.ServiceClient
- if genericClients, errors, err = goupnp.NewServiceClients(URN_ScheduledRecording_1); err != nil {
- return
- }
- clients = newScheduledRecording1ClientsFromGenericClients(genericClients)
- return
-}
-
-// NewScheduledRecording1ClientsByURL discovers instances of the service at the given
-// URL, and returns clients to any that are found. An error is returned if
-// there was an error probing the service.
-//
-// This is a typical entry calling point into this package when reusing an
-// previously discovered service URL.
-func NewScheduledRecording1ClientsByURL(loc *url.URL) ([]*ScheduledRecording1, error) {
- genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_ScheduledRecording_1)
- if err != nil {
- return nil, err
- }
- return newScheduledRecording1ClientsFromGenericClients(genericClients), nil
-}
-
-// NewScheduledRecording1ClientsFromRootDevice discovers instances of the service in
-// a given root device, and returns clients to any that are found. An error is
-// returned if there was not at least one instance of the service within the
-// device. The location parameter is simply assigned to the Location attribute
-// of the wrapped ServiceClient(s).
-//
-// This is a typical entry calling point into this package when reusing an
-// previously discovered root device.
-func NewScheduledRecording1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*ScheduledRecording1, error) {
- genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_ScheduledRecording_1)
- if err != nil {
- return nil, err
- }
- return newScheduledRecording1ClientsFromGenericClients(genericClients), nil
-}
-
-func newScheduledRecording1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*ScheduledRecording1 {
- clients := make([]*ScheduledRecording1, len(genericClients))
- for i := range genericClients {
- clients[i] = &ScheduledRecording1{genericClients[i]}
- }
- return clients
-}
-
-func (client *ScheduledRecording1) GetSortCapabilities() (SortCaps string, SortLevelCap uint32, err error) {
- // Request structure.
- request := interface{}(nil)
- // BEGIN Marshal arguments into request.
-
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- SortCaps string
-
- SortLevelCap string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "GetSortCapabilities", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if SortCaps, err = soap.UnmarshalString(response.SortCaps); err != nil {
- return
- }
- if SortLevelCap, err = soap.UnmarshalUi4(response.SortLevelCap); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * DataTypeID: allowed values: A_ARG_TYPE_RecordSchedule, A_ARG_TYPE_RecordTask, A_ARG_TYPE_RecordScheduleParts
-
-func (client *ScheduledRecording1) GetPropertyList(DataTypeID string) (PropertyList string, err error) {
- // Request structure.
- request := &struct {
- DataTypeID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.DataTypeID, err = soap.MarshalString(DataTypeID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- PropertyList string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "GetPropertyList", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if PropertyList, err = soap.UnmarshalString(response.PropertyList); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * DataTypeID: allowed values: A_ARG_TYPE_RecordSchedule, A_ARG_TYPE_RecordTask, A_ARG_TYPE_RecordScheduleParts
-
-func (client *ScheduledRecording1) GetAllowedValues(DataTypeID string, Filter string) (PropertyInfo string, err error) {
- // Request structure.
- request := &struct {
- DataTypeID string
-
- Filter string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.DataTypeID, err = soap.MarshalString(DataTypeID); err != nil {
- return
- }
- if request.Filter, err = soap.MarshalString(Filter); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- PropertyInfo string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "GetAllowedValues", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if PropertyInfo, err = soap.UnmarshalString(response.PropertyInfo); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ScheduledRecording1) GetStateUpdateID() (Id uint32, err error) {
- // Request structure.
- request := interface{}(nil)
- // BEGIN Marshal arguments into request.
-
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- Id string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "GetStateUpdateID", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if Id, err = soap.UnmarshalUi4(response.Id); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ScheduledRecording1) BrowseRecordSchedules(Filter string, StartingIndex uint32, RequestedCount uint32, SortCriteria string) (Result string, NumberReturned uint32, TotalMatches uint32, UpdateID uint32, err error) {
- // Request structure.
- request := &struct {
- Filter string
-
- StartingIndex string
-
- RequestedCount string
-
- SortCriteria string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.Filter, err = soap.MarshalString(Filter); err != nil {
- return
- }
- if request.StartingIndex, err = soap.MarshalUi4(StartingIndex); err != nil {
- return
- }
- if request.RequestedCount, err = soap.MarshalUi4(RequestedCount); err != nil {
- return
- }
- if request.SortCriteria, err = soap.MarshalString(SortCriteria); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- Result string
-
- NumberReturned string
-
- TotalMatches string
-
- UpdateID string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "BrowseRecordSchedules", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if Result, err = soap.UnmarshalString(response.Result); err != nil {
- return
- }
- if NumberReturned, err = soap.UnmarshalUi4(response.NumberReturned); err != nil {
- return
- }
- if TotalMatches, err = soap.UnmarshalUi4(response.TotalMatches); err != nil {
- return
- }
- if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ScheduledRecording1) BrowseRecordTasks(RecordScheduleID string, Filter string, StartingIndex uint32, RequestedCount uint32, SortCriteria string) (Result string, NumberReturned uint32, TotalMatches uint32, UpdateID uint32, err error) {
- // Request structure.
- request := &struct {
- RecordScheduleID string
-
- Filter string
-
- StartingIndex string
-
- RequestedCount string
-
- SortCriteria string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.RecordScheduleID, err = soap.MarshalString(RecordScheduleID); err != nil {
- return
- }
- if request.Filter, err = soap.MarshalString(Filter); err != nil {
- return
- }
- if request.StartingIndex, err = soap.MarshalUi4(StartingIndex); err != nil {
- return
- }
- if request.RequestedCount, err = soap.MarshalUi4(RequestedCount); err != nil {
- return
- }
- if request.SortCriteria, err = soap.MarshalString(SortCriteria); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- Result string
-
- NumberReturned string
-
- TotalMatches string
-
- UpdateID string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "BrowseRecordTasks", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if Result, err = soap.UnmarshalString(response.Result); err != nil {
- return
- }
- if NumberReturned, err = soap.UnmarshalUi4(response.NumberReturned); err != nil {
- return
- }
- if TotalMatches, err = soap.UnmarshalUi4(response.TotalMatches); err != nil {
- return
- }
- if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ScheduledRecording1) CreateRecordSchedule(Elements string) (RecordScheduleID string, Result string, UpdateID uint32, err error) {
- // Request structure.
- request := &struct {
- Elements string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.Elements, err = soap.MarshalString(Elements); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- RecordScheduleID string
-
- Result string
-
- UpdateID string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "CreateRecordSchedule", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if RecordScheduleID, err = soap.UnmarshalString(response.RecordScheduleID); err != nil {
- return
- }
- if Result, err = soap.UnmarshalString(response.Result); err != nil {
- return
- }
- if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ScheduledRecording1) DeleteRecordSchedule(RecordScheduleID string) (err error) {
- // Request structure.
- request := &struct {
- RecordScheduleID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.RecordScheduleID, err = soap.MarshalString(RecordScheduleID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "DeleteRecordSchedule", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ScheduledRecording1) GetRecordSchedule(RecordScheduleID string, Filter string) (Result string, UpdateID uint32, err error) {
- // Request structure.
- request := &struct {
- RecordScheduleID string
-
- Filter string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.RecordScheduleID, err = soap.MarshalString(RecordScheduleID); err != nil {
- return
- }
- if request.Filter, err = soap.MarshalString(Filter); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- Result string
-
- UpdateID string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "GetRecordSchedule", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if Result, err = soap.UnmarshalString(response.Result); err != nil {
- return
- }
- if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ScheduledRecording1) EnableRecordSchedule(RecordScheduleID string) (err error) {
- // Request structure.
- request := &struct {
- RecordScheduleID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.RecordScheduleID, err = soap.MarshalString(RecordScheduleID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "EnableRecordSchedule", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ScheduledRecording1) DisableRecordSchedule(RecordScheduleID string) (err error) {
- // Request structure.
- request := &struct {
- RecordScheduleID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.RecordScheduleID, err = soap.MarshalString(RecordScheduleID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "DisableRecordSchedule", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ScheduledRecording1) DeleteRecordTask(RecordTaskID string) (err error) {
- // Request structure.
- request := &struct {
- RecordTaskID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "DeleteRecordTask", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ScheduledRecording1) GetRecordTask(RecordTaskID string, Filter string) (Result string, UpdateID uint32, err error) {
- // Request structure.
- request := &struct {
- RecordTaskID string
-
- Filter string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil {
- return
- }
- if request.Filter, err = soap.MarshalString(Filter); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- Result string
-
- UpdateID string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "GetRecordTask", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if Result, err = soap.UnmarshalString(response.Result); err != nil {
- return
- }
- if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ScheduledRecording1) EnableRecordTask(RecordTaskID string) (err error) {
- // Request structure.
- request := &struct {
- RecordTaskID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "EnableRecordTask", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ScheduledRecording1) DisableRecordTask(RecordTaskID string) (err error) {
- // Request structure.
- request := &struct {
- RecordTaskID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "DisableRecordTask", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ScheduledRecording1) ResetRecordTask(RecordTaskID string) (err error) {
- // Request structure.
- request := &struct {
- RecordTaskID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "ResetRecordTask", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ScheduledRecording1) GetRecordScheduleConflicts(RecordScheduleID string) (RecordScheduleConflictIDList string, UpdateID uint32, err error) {
- // Request structure.
- request := &struct {
- RecordScheduleID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.RecordScheduleID, err = soap.MarshalString(RecordScheduleID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- RecordScheduleConflictIDList string
-
- UpdateID string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "GetRecordScheduleConflicts", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if RecordScheduleConflictIDList, err = soap.UnmarshalString(response.RecordScheduleConflictIDList); err != nil {
- return
- }
- if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ScheduledRecording1) GetRecordTaskConflicts(RecordTaskID string) (RecordTaskConflictIDList string, UpdateID uint32, err error) {
- // Request structure.
- request := &struct {
- RecordTaskID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- RecordTaskConflictIDList string
-
- UpdateID string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "GetRecordTaskConflicts", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if RecordTaskConflictIDList, err = soap.UnmarshalString(response.RecordTaskConflictIDList); err != nil {
- return
- }
- if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-// ScheduledRecording2 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:ScheduledRecording:2". See
-// goupnp.ServiceClient, which contains RootDevice and Service attributes which
-// are provided for informational value.
-type ScheduledRecording2 struct {
- goupnp.ServiceClient
-}
-
-// NewScheduledRecording2Clients discovers instances of the service on the network,
-// and returns clients to any that are found. errors will contain an error for
-// any devices that replied but which could not be queried, and err will be set
-// if the discovery process failed outright.
-//
-// This is a typical entry calling point into this package.
-func NewScheduledRecording2Clients() (clients []*ScheduledRecording2, errors []error, err error) {
- var genericClients []goupnp.ServiceClient
- if genericClients, errors, err = goupnp.NewServiceClients(URN_ScheduledRecording_2); err != nil {
- return
- }
- clients = newScheduledRecording2ClientsFromGenericClients(genericClients)
- return
-}
-
-// NewScheduledRecording2ClientsByURL discovers instances of the service at the given
-// URL, and returns clients to any that are found. An error is returned if
-// there was an error probing the service.
-//
-// This is a typical entry calling point into this package when reusing an
-// previously discovered service URL.
-func NewScheduledRecording2ClientsByURL(loc *url.URL) ([]*ScheduledRecording2, error) {
- genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_ScheduledRecording_2)
- if err != nil {
- return nil, err
- }
- return newScheduledRecording2ClientsFromGenericClients(genericClients), nil
-}
-
-// NewScheduledRecording2ClientsFromRootDevice discovers instances of the service in
-// a given root device, and returns clients to any that are found. An error is
-// returned if there was not at least one instance of the service within the
-// device. The location parameter is simply assigned to the Location attribute
-// of the wrapped ServiceClient(s).
-//
-// This is a typical entry calling point into this package when reusing an
-// previously discovered root device.
-func NewScheduledRecording2ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*ScheduledRecording2, error) {
- genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_ScheduledRecording_2)
- if err != nil {
- return nil, err
- }
- return newScheduledRecording2ClientsFromGenericClients(genericClients), nil
-}
-
-func newScheduledRecording2ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*ScheduledRecording2 {
- clients := make([]*ScheduledRecording2, len(genericClients))
- for i := range genericClients {
- clients[i] = &ScheduledRecording2{genericClients[i]}
- }
- return clients
-}
-
-func (client *ScheduledRecording2) GetSortCapabilities() (SortCaps string, SortLevelCap uint32, err error) {
- // Request structure.
- request := interface{}(nil)
- // BEGIN Marshal arguments into request.
-
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- SortCaps string
-
- SortLevelCap string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "GetSortCapabilities", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if SortCaps, err = soap.UnmarshalString(response.SortCaps); err != nil {
- return
- }
- if SortLevelCap, err = soap.UnmarshalUi4(response.SortLevelCap); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * DataTypeID: allowed values: A_ARG_TYPE_RecordSchedule, A_ARG_TYPE_RecordTask, A_ARG_TYPE_RecordScheduleParts
-
-func (client *ScheduledRecording2) GetPropertyList(DataTypeID string) (PropertyList string, err error) {
- // Request structure.
- request := &struct {
- DataTypeID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.DataTypeID, err = soap.MarshalString(DataTypeID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- PropertyList string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "GetPropertyList", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if PropertyList, err = soap.UnmarshalString(response.PropertyList); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-//
-// Arguments:
-//
-// * DataTypeID: allowed values: A_ARG_TYPE_RecordSchedule, A_ARG_TYPE_RecordTask, A_ARG_TYPE_RecordScheduleParts
-
-func (client *ScheduledRecording2) GetAllowedValues(DataTypeID string, Filter string) (PropertyInfo string, err error) {
- // Request structure.
- request := &struct {
- DataTypeID string
-
- Filter string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.DataTypeID, err = soap.MarshalString(DataTypeID); err != nil {
- return
- }
- if request.Filter, err = soap.MarshalString(Filter); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- PropertyInfo string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "GetAllowedValues", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if PropertyInfo, err = soap.UnmarshalString(response.PropertyInfo); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ScheduledRecording2) GetStateUpdateID() (Id uint32, err error) {
- // Request structure.
- request := interface{}(nil)
- // BEGIN Marshal arguments into request.
-
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- Id string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "GetStateUpdateID", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if Id, err = soap.UnmarshalUi4(response.Id); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ScheduledRecording2) BrowseRecordSchedules(Filter string, StartingIndex uint32, RequestedCount uint32, SortCriteria string) (Result string, NumberReturned uint32, TotalMatches uint32, UpdateID uint32, err error) {
- // Request structure.
- request := &struct {
- Filter string
-
- StartingIndex string
-
- RequestedCount string
-
- SortCriteria string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.Filter, err = soap.MarshalString(Filter); err != nil {
- return
- }
- if request.StartingIndex, err = soap.MarshalUi4(StartingIndex); err != nil {
- return
- }
- if request.RequestedCount, err = soap.MarshalUi4(RequestedCount); err != nil {
- return
- }
- if request.SortCriteria, err = soap.MarshalString(SortCriteria); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- Result string
-
- NumberReturned string
-
- TotalMatches string
-
- UpdateID string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "BrowseRecordSchedules", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if Result, err = soap.UnmarshalString(response.Result); err != nil {
- return
- }
- if NumberReturned, err = soap.UnmarshalUi4(response.NumberReturned); err != nil {
- return
- }
- if TotalMatches, err = soap.UnmarshalUi4(response.TotalMatches); err != nil {
- return
- }
- if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ScheduledRecording2) BrowseRecordTasks(RecordScheduleID string, Filter string, StartingIndex uint32, RequestedCount uint32, SortCriteria string) (Result string, NumberReturned uint32, TotalMatches uint32, UpdateID uint32, err error) {
- // Request structure.
- request := &struct {
- RecordScheduleID string
-
- Filter string
-
- StartingIndex string
-
- RequestedCount string
-
- SortCriteria string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.RecordScheduleID, err = soap.MarshalString(RecordScheduleID); err != nil {
- return
- }
- if request.Filter, err = soap.MarshalString(Filter); err != nil {
- return
- }
- if request.StartingIndex, err = soap.MarshalUi4(StartingIndex); err != nil {
- return
- }
- if request.RequestedCount, err = soap.MarshalUi4(RequestedCount); err != nil {
- return
- }
- if request.SortCriteria, err = soap.MarshalString(SortCriteria); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- Result string
-
- NumberReturned string
-
- TotalMatches string
-
- UpdateID string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "BrowseRecordTasks", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if Result, err = soap.UnmarshalString(response.Result); err != nil {
- return
- }
- if NumberReturned, err = soap.UnmarshalUi4(response.NumberReturned); err != nil {
- return
- }
- if TotalMatches, err = soap.UnmarshalUi4(response.TotalMatches); err != nil {
- return
- }
- if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ScheduledRecording2) CreateRecordSchedule(Elements string) (RecordScheduleID string, Result string, UpdateID uint32, err error) {
- // Request structure.
- request := &struct {
- Elements string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.Elements, err = soap.MarshalString(Elements); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- RecordScheduleID string
-
- Result string
-
- UpdateID string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "CreateRecordSchedule", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if RecordScheduleID, err = soap.UnmarshalString(response.RecordScheduleID); err != nil {
- return
- }
- if Result, err = soap.UnmarshalString(response.Result); err != nil {
- return
- }
- if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ScheduledRecording2) DeleteRecordSchedule(RecordScheduleID string) (err error) {
- // Request structure.
- request := &struct {
- RecordScheduleID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.RecordScheduleID, err = soap.MarshalString(RecordScheduleID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "DeleteRecordSchedule", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ScheduledRecording2) GetRecordSchedule(RecordScheduleID string, Filter string) (Result string, UpdateID uint32, err error) {
- // Request structure.
- request := &struct {
- RecordScheduleID string
-
- Filter string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.RecordScheduleID, err = soap.MarshalString(RecordScheduleID); err != nil {
- return
- }
- if request.Filter, err = soap.MarshalString(Filter); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- Result string
-
- UpdateID string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "GetRecordSchedule", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if Result, err = soap.UnmarshalString(response.Result); err != nil {
- return
- }
- if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ScheduledRecording2) EnableRecordSchedule(RecordScheduleID string) (err error) {
- // Request structure.
- request := &struct {
- RecordScheduleID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.RecordScheduleID, err = soap.MarshalString(RecordScheduleID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "EnableRecordSchedule", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ScheduledRecording2) DisableRecordSchedule(RecordScheduleID string) (err error) {
- // Request structure.
- request := &struct {
- RecordScheduleID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.RecordScheduleID, err = soap.MarshalString(RecordScheduleID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "DisableRecordSchedule", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ScheduledRecording2) DeleteRecordTask(RecordTaskID string) (err error) {
- // Request structure.
- request := &struct {
- RecordTaskID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "DeleteRecordTask", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ScheduledRecording2) GetRecordTask(RecordTaskID string, Filter string) (Result string, UpdateID uint32, err error) {
- // Request structure.
- request := &struct {
- RecordTaskID string
-
- Filter string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil {
- return
- }
- if request.Filter, err = soap.MarshalString(Filter); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- Result string
-
- UpdateID string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "GetRecordTask", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if Result, err = soap.UnmarshalString(response.Result); err != nil {
- return
- }
- if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ScheduledRecording2) EnableRecordTask(RecordTaskID string) (err error) {
- // Request structure.
- request := &struct {
- RecordTaskID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "EnableRecordTask", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ScheduledRecording2) DisableRecordTask(RecordTaskID string) (err error) {
- // Request structure.
- request := &struct {
- RecordTaskID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "DisableRecordTask", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ScheduledRecording2) ResetRecordTask(RecordTaskID string) (err error) {
- // Request structure.
- request := &struct {
- RecordTaskID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := interface{}(nil)
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "ResetRecordTask", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ScheduledRecording2) GetRecordScheduleConflicts(RecordScheduleID string) (RecordScheduleConflictIDList string, UpdateID uint32, err error) {
- // Request structure.
- request := &struct {
- RecordScheduleID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.RecordScheduleID, err = soap.MarshalString(RecordScheduleID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- RecordScheduleConflictIDList string
-
- UpdateID string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "GetRecordScheduleConflicts", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if RecordScheduleConflictIDList, err = soap.UnmarshalString(response.RecordScheduleConflictIDList); err != nil {
- return
- }
- if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
-
-func (client *ScheduledRecording2) GetRecordTaskConflicts(RecordTaskID string) (RecordTaskConflictIDList string, UpdateID uint32, err error) {
- // Request structure.
- request := &struct {
- RecordTaskID string
- }{}
- // BEGIN Marshal arguments into request.
-
- if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil {
- return
- }
- // END Marshal arguments into request.
-
- // Response structure.
- response := &struct {
- RecordTaskConflictIDList string
-
- UpdateID string
- }{}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "GetRecordTaskConflicts", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-
- if RecordTaskConflictIDList, err = soap.UnmarshalString(response.RecordTaskConflictIDList); err != nil {
- return
- }
- if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil {
- return
- }
- // END Unmarshal arguments from response.
- return
-}
diff --git a/Godeps/_workspace/src/github.com/huin/goupnp/example/example.go b/Godeps/_workspace/src/github.com/huin/goupnp/example/example.go
deleted file mode 100644
index df7420226..000000000
--- a/Godeps/_workspace/src/github.com/huin/goupnp/example/example.go
+++ /dev/null
@@ -1,6 +0,0 @@
-// Serves as examples of using the goupnp library.
-//
-// To run examples and see the output for your local network, run the following
-// command (specifically including the -v flag):
-// go test -v github.com/huin/goupnp/example
-package example
diff --git a/Godeps/_workspace/src/github.com/huin/goupnp/gotasks/specgen_task.go b/Godeps/_workspace/src/github.com/huin/goupnp/gotasks/specgen_task.go
deleted file mode 100644
index 921e8c857..000000000
--- a/Godeps/_workspace/src/github.com/huin/goupnp/gotasks/specgen_task.go
+++ /dev/null
@@ -1,603 +0,0 @@
-// +build gotask
-
-package gotasks
-
-import (
- "archive/zip"
- "encoding/xml"
- "fmt"
- "io"
- "log"
- "net/http"
- "os"
- "path"
- "path/filepath"
- "regexp"
- "strings"
- "text/template"
-
- "github.com/huin/goupnp"
- "github.com/huin/goupnp/scpd"
- "github.com/huin/goutil/codegen"
- "github.com/jingweno/gotask/tasking"
-)
-
-var (
- deviceURNPrefix = "urn:schemas-upnp-org:device:"
- serviceURNPrefix = "urn:schemas-upnp-org:service:"
-)
-
-// DCP contains extra metadata to use when generating DCP source files.
-type DCPMetadata struct {
- Name string // What to name the Go DCP package.
- OfficialName string // Official name for the DCP.
- DocURL string // Optional - URL for futher documentation about the DCP.
- XMLSpecURL string // Where to download the XML spec from.
- // Any special-case functions to run against the DCP before writing it out.
- Hacks []DCPHackFn
-}
-
-var dcpMetadata = []DCPMetadata{
- {
- Name: "internetgateway1",
- OfficialName: "Internet Gateway Device v1",
- DocURL: "http://upnp.org/specs/gw/UPnP-gw-InternetGatewayDevice-v1-Device.pdf",
- XMLSpecURL: "http://upnp.org/specs/gw/UPnP-gw-IGD-TestFiles-20010921.zip",
- },
- {
- Name: "internetgateway2",
- OfficialName: "Internet Gateway Device v2",
- DocURL: "http://upnp.org/specs/gw/UPnP-gw-InternetGatewayDevice-v2-Device.pdf",
- XMLSpecURL: "http://upnp.org/specs/gw/UPnP-gw-IGD-Testfiles-20110224.zip",
- Hacks: []DCPHackFn{
- func(dcp *DCP) error {
- missingURN := "urn:schemas-upnp-org:service:WANIPv6FirewallControl:1"
- if _, ok := dcp.ServiceTypes[missingURN]; ok {
- return nil
- }
- urnParts, err := extractURNParts(missingURN, serviceURNPrefix)
- if err != nil {
- return err
- }
- dcp.ServiceTypes[missingURN] = urnParts
- return nil
- },
- },
- },
- {
- Name: "av1",
- OfficialName: "MediaServer v1 and MediaRenderer v1",
- DocURL: "http://upnp.org/specs/av/av1/",
- XMLSpecURL: "http://upnp.org/specs/av/UPnP-av-TestFiles-20070927.zip",
- },
-}
-
-type DCPHackFn func(*DCP) error
-
-// NAME
-// specgen - generates Go code from the UPnP specification files.
-//
-// DESCRIPTION
-// The specification is available for download from:
-//
-// OPTIONS
-// -s, --specs_dir=<spec directory>
-// Path to the specification storage directory. This is used to find (and download if not present) the specification ZIP files. Defaults to 'specs'
-// -o, --out_dir=<output directory>
-// Path to the output directory. This is is where the DCP source files will be placed. Should normally correspond to the directory for github.com/huin/goupnp/dcps. Defaults to '../dcps'
-// --nogofmt
-// Disable passing the output through gofmt. Do this if debugging code output problems and needing to see the generated code prior to being passed through gofmt.
-func TaskSpecgen(t *tasking.T) {
- specsDir := fallbackStrValue("specs", t.Flags.String("specs_dir"), t.Flags.String("s"))
- if err := os.MkdirAll(specsDir, os.ModePerm); err != nil {
- t.Fatalf("Could not create specs-dir %q: %v\n", specsDir, err)
- }
- outDir := fallbackStrValue("../dcps", t.Flags.String("out_dir"), t.Flags.String("o"))
- useGofmt := !t.Flags.Bool("nogofmt")
-
-NEXT_DCP:
- for _, d := range dcpMetadata {
- specFilename := filepath.Join(specsDir, d.Name+".zip")
- err := acquireFile(specFilename, d.XMLSpecURL)
- if err != nil {
- t.Logf("Could not acquire spec for %s, skipping: %v\n", d.Name, err)
- continue NEXT_DCP
- }
- dcp := newDCP(d)
- if err := dcp.processZipFile(specFilename); err != nil {
- log.Printf("Error processing spec for %s in file %q: %v", d.Name, specFilename, err)
- continue NEXT_DCP
- }
- for i, hack := range d.Hacks {
- if err := hack(dcp); err != nil {
- log.Printf("Error with Hack[%d] for %s: %v", i, d.Name, err)
- continue NEXT_DCP
- }
- }
- dcp.writePackage(outDir, useGofmt)
- if err := dcp.writePackage(outDir, useGofmt); err != nil {
- log.Printf("Error writing package %q: %v", dcp.Metadata.Name, err)
- continue NEXT_DCP
- }
- }
-}
-
-func fallbackStrValue(defaultValue string, values ...string) string {
- for _, v := range values {
- if v != "" {
- return v
- }
- }
- return defaultValue
-}
-
-func acquireFile(specFilename string, xmlSpecURL string) error {
- if f, err := os.Open(specFilename); err != nil {
- if !os.IsNotExist(err) {
- return err
- }
- } else {
- f.Close()
- return nil
- }
-
- resp, err := http.Get(xmlSpecURL)
- if err != nil {
- return err
- }
- defer resp.Body.Close()
-
- if resp.StatusCode != http.StatusOK {
- return fmt.Errorf("could not download spec %q from %q: ",
- specFilename, xmlSpecURL, resp.Status)
- }
-
- tmpFilename := specFilename + ".download"
- w, err := os.Create(tmpFilename)
- if err != nil {
- return err
- }
- defer w.Close()
-
- _, err = io.Copy(w, resp.Body)
- if err != nil {
- return err
- }
-
- return os.Rename(tmpFilename, specFilename)
-}
-
-// DCP collects together information about a UPnP Device Control Protocol.
-type DCP struct {
- Metadata DCPMetadata
- DeviceTypes map[string]*URNParts
- ServiceTypes map[string]*URNParts
- Services []SCPDWithURN
-}
-
-func newDCP(metadata DCPMetadata) *DCP {
- return &DCP{
- Metadata: metadata,
- DeviceTypes: make(map[string]*URNParts),
- ServiceTypes: make(map[string]*URNParts),
- }
-}
-
-func (dcp *DCP) processZipFile(filename string) error {
- archive, err := zip.OpenReader(filename)
- if err != nil {
- return fmt.Errorf("error reading zip file %q: %v", filename, err)
- }
- defer archive.Close()
- for _, deviceFile := range globFiles("*/device/*.xml", archive) {
- if err := dcp.processDeviceFile(deviceFile); err != nil {
- return err
- }
- }
- for _, scpdFile := range globFiles("*/service/*.xml", archive) {
- if err := dcp.processSCPDFile(scpdFile); err != nil {
- return err
- }
- }
- return nil
-}
-
-func (dcp *DCP) processDeviceFile(file *zip.File) error {
- var device goupnp.Device
- if err := unmarshalXmlFile(file, &device); err != nil {
- return fmt.Errorf("error decoding device XML from file %q: %v", file.Name, err)
- }
- var mainErr error
- device.VisitDevices(func(d *goupnp.Device) {
- t := strings.TrimSpace(d.DeviceType)
- if t != "" {
- u, err := extractURNParts(t, deviceURNPrefix)
- if err != nil {
- mainErr = err
- }
- dcp.DeviceTypes[t] = u
- }
- })
- device.VisitServices(func(s *goupnp.Service) {
- u, err := extractURNParts(s.ServiceType, serviceURNPrefix)
- if err != nil {
- mainErr = err
- }
- dcp.ServiceTypes[s.ServiceType] = u
- })
- return mainErr
-}
-
-func (dcp *DCP) writePackage(outDir string, useGofmt bool) error {
- packageDirname := filepath.Join(outDir, dcp.Metadata.Name)
- err := os.MkdirAll(packageDirname, os.ModePerm)
- if err != nil && !os.IsExist(err) {
- return err
- }
- packageFilename := filepath.Join(packageDirname, dcp.Metadata.Name+".go")
- packageFile, err := os.Create(packageFilename)
- if err != nil {
- return err
- }
- var output io.WriteCloser = packageFile
- if useGofmt {
- if output, err = codegen.NewGofmtWriteCloser(output); err != nil {
- packageFile.Close()
- return err
- }
- }
- if err = packageTmpl.Execute(output, dcp); err != nil {
- output.Close()
- return err
- }
- return output.Close()
-}
-
-func (dcp *DCP) processSCPDFile(file *zip.File) error {
- scpd := new(scpd.SCPD)
- if err := unmarshalXmlFile(file, scpd); err != nil {
- return fmt.Errorf("error decoding SCPD XML from file %q: %v", file.Name, err)
- }
- scpd.Clean()
- urnParts, err := urnPartsFromSCPDFilename(file.Name)
- if err != nil {
- return fmt.Errorf("could not recognize SCPD filename %q: %v", file.Name, err)
- }
- dcp.Services = append(dcp.Services, SCPDWithURN{
- URNParts: urnParts,
- SCPD: scpd,
- })
- return nil
-}
-
-type SCPDWithURN struct {
- *URNParts
- SCPD *scpd.SCPD
-}
-
-func (s *SCPDWithURN) WrapArguments(args []*scpd.Argument) (argumentWrapperList, error) {
- wrappedArgs := make(argumentWrapperList, len(args))
- for i, arg := range args {
- wa, err := s.wrapArgument(arg)
- if err != nil {
- return nil, err
- }
- wrappedArgs[i] = wa
- }
- return wrappedArgs, nil
-}
-
-func (s *SCPDWithURN) wrapArgument(arg *scpd.Argument) (*argumentWrapper, error) {
- relVar := s.SCPD.GetStateVariable(arg.RelatedStateVariable)
- if relVar == nil {
- return nil, fmt.Errorf("no such state variable: %q, for argument %q", arg.RelatedStateVariable, arg.Name)
- }
- cnv, ok := typeConvs[relVar.DataType.Name]
- if !ok {
- return nil, fmt.Errorf("unknown data type: %q, for state variable %q, for argument %q", relVar.DataType.Type, arg.RelatedStateVariable, arg.Name)
- }
- return &argumentWrapper{
- Argument: *arg,
- relVar: relVar,
- conv: cnv,
- }, nil
-}
-
-type argumentWrapper struct {
- scpd.Argument
- relVar *scpd.StateVariable
- conv conv
-}
-
-func (arg *argumentWrapper) AsParameter() string {
- return fmt.Sprintf("%s %s", arg.Name, arg.conv.ExtType)
-}
-
-func (arg *argumentWrapper) HasDoc() bool {
- rng := arg.relVar.AllowedValueRange
- return ((rng != nil && (rng.Minimum != "" || rng.Maximum != "" || rng.Step != "")) ||
- len(arg.relVar.AllowedValues) > 0)
-}
-
-func (arg *argumentWrapper) Document() string {
- relVar := arg.relVar
- if rng := relVar.AllowedValueRange; rng != nil {
- var parts []string
- if rng.Minimum != "" {
- parts = append(parts, fmt.Sprintf("minimum=%s", rng.Minimum))
- }
- if rng.Maximum != "" {
- parts = append(parts, fmt.Sprintf("maximum=%s", rng.Maximum))
- }
- if rng.Step != "" {
- parts = append(parts, fmt.Sprintf("step=%s", rng.Step))
- }
- return "allowed value range: " + strings.Join(parts, ", ")
- }
- if len(relVar.AllowedValues) != 0 {
- return "allowed values: " + strings.Join(relVar.AllowedValues, ", ")
- }
- return ""
-}
-
-func (arg *argumentWrapper) Marshal() string {
- return fmt.Sprintf("soap.Marshal%s(%s)", arg.conv.FuncSuffix, arg.Name)
-}
-
-func (arg *argumentWrapper) Unmarshal(objVar string) string {
- return fmt.Sprintf("soap.Unmarshal%s(%s.%s)", arg.conv.FuncSuffix, objVar, arg.Name)
-}
-
-type argumentWrapperList []*argumentWrapper
-
-func (args argumentWrapperList) HasDoc() bool {
- for _, arg := range args {
- if arg.HasDoc() {
- return true
- }
- }
- return false
-}
-
-type conv struct {
- FuncSuffix string
- ExtType string
-}
-
-// typeConvs maps from a SOAP type (e.g "fixed.14.4") to the function name
-// suffix inside the soap module (e.g "Fixed14_4") and the Go type.
-var typeConvs = map[string]conv{
- "ui1": conv{"Ui1", "uint8"},
- "ui2": conv{"Ui2", "uint16"},
- "ui4": conv{"Ui4", "uint32"},
- "i1": conv{"I1", "int8"},
- "i2": conv{"I2", "int16"},
- "i4": conv{"I4", "int32"},
- "int": conv{"Int", "int64"},
- "r4": conv{"R4", "float32"},
- "r8": conv{"R8", "float64"},
- "number": conv{"R8", "float64"}, // Alias for r8.
- "fixed.14.4": conv{"Fixed14_4", "float64"},
- "float": conv{"R8", "float64"},
- "char": conv{"Char", "rune"},
- "string": conv{"String", "string"},
- "date": conv{"Date", "time.Time"},
- "dateTime": conv{"DateTime", "time.Time"},
- "dateTime.tz": conv{"DateTimeTz", "time.Time"},
- "time": conv{"TimeOfDay", "soap.TimeOfDay"},
- "time.tz": conv{"TimeOfDayTz", "soap.TimeOfDay"},
- "boolean": conv{"Boolean", "bool"},
- "bin.base64": conv{"BinBase64", "[]byte"},
- "bin.hex": conv{"BinHex", "[]byte"},
- "uri": conv{"URI", "*url.URL"},
-}
-
-func globFiles(pattern string, archive *zip.ReadCloser) []*zip.File {
- var files []*zip.File
- for _, f := range archive.File {
- if matched, err := path.Match(pattern, f.Name); err != nil {
- // This shouldn't happen - all patterns are hard-coded, errors in them
- // are a programming error.
- panic(err)
- } else if matched {
- files = append(files, f)
- }
- }
- return files
-}
-
-func unmarshalXmlFile(file *zip.File, data interface{}) error {
- r, err := file.Open()
- if err != nil {
- return err
- }
- decoder := xml.NewDecoder(r)
- r.Close()
- return decoder.Decode(data)
-}
-
-type URNParts struct {
- URN string
- Name string
- Version string
-}
-
-func (u *URNParts) Const() string {
- return fmt.Sprintf("URN_%s_%s", u.Name, u.Version)
-}
-
-// extractURNParts extracts the name and version from a URN string.
-func extractURNParts(urn, expectedPrefix string) (*URNParts, error) {
- if !strings.HasPrefix(urn, expectedPrefix) {
- return nil, fmt.Errorf("%q does not have expected prefix %q", urn, expectedPrefix)
- }
- parts := strings.SplitN(strings.TrimPrefix(urn, expectedPrefix), ":", 2)
- if len(parts) != 2 {
- return nil, fmt.Errorf("%q does not have a name and version", urn)
- }
- name, version := parts[0], parts[1]
- return &URNParts{urn, name, version}, nil
-}
-
-var scpdFilenameRe = regexp.MustCompile(
- `.*/([a-zA-Z0-9]+)([0-9]+)\.xml`)
-
-func urnPartsFromSCPDFilename(filename string) (*URNParts, error) {
- parts := scpdFilenameRe.FindStringSubmatch(filename)
- if len(parts) != 3 {
- return nil, fmt.Errorf("SCPD filename %q does not have expected number of parts", filename)
- }
- name, version := parts[1], parts[2]
- return &URNParts{
- URN: serviceURNPrefix + name + ":" + version,
- Name: name,
- Version: version,
- }, nil
-}
-
-var packageTmpl = template.Must(template.New("package").Parse(`{{$name := .Metadata.Name}}
-// Client for UPnP Device Control Protocol {{.Metadata.OfficialName}}.
-// {{if .Metadata.DocURL}}
-// This DCP is documented in detail at: {{.Metadata.DocURL}}{{end}}
-//
-// Typically, use one of the New* functions to create clients for services.
-package {{$name}}
-
-// Generated file - do not edit by hand. See README.md
-
-
-import (
- "net/url"
- "time"
-
- "github.com/huin/goupnp"
- "github.com/huin/goupnp/soap"
-)
-
-// Hack to avoid Go complaining if time isn't used.
-var _ time.Time
-
-// Device URNs:
-const ({{range .DeviceTypes}}
- {{.Const}} = "{{.URN}}"{{end}}
-)
-
-// Service URNs:
-const ({{range .ServiceTypes}}
- {{.Const}} = "{{.URN}}"{{end}}
-)
-
-{{range .Services}}
-{{$srv := .}}
-{{$srvIdent := printf "%s%s" .Name .Version}}
-
-// {{$srvIdent}} is a client for UPnP SOAP service with URN "{{.URN}}". See
-// goupnp.ServiceClient, which contains RootDevice and Service attributes which
-// are provided for informational value.
-type {{$srvIdent}} struct {
- goupnp.ServiceClient
-}
-
-// New{{$srvIdent}}Clients discovers instances of the service on the network,
-// and returns clients to any that are found. errors will contain an error for
-// any devices that replied but which could not be queried, and err will be set
-// if the discovery process failed outright.
-//
-// This is a typical entry calling point into this package.
-func New{{$srvIdent}}Clients() (clients []*{{$srvIdent}}, errors []error, err error) {
- var genericClients []goupnp.ServiceClient
- if genericClients, errors, err = goupnp.NewServiceClients({{$srv.Const}}); err != nil {
- return
- }
- clients = new{{$srvIdent}}ClientsFromGenericClients(genericClients)
- return
-}
-
-// New{{$srvIdent}}ClientsByURL discovers instances of the service at the given
-// URL, and returns clients to any that are found. An error is returned if
-// there was an error probing the service.
-//
-// This is a typical entry calling point into this package when reusing an
-// previously discovered service URL.
-func New{{$srvIdent}}ClientsByURL(loc *url.URL) ([]*{{$srvIdent}}, error) {
- genericClients, err := goupnp.NewServiceClientsByURL(loc, {{$srv.Const}})
- if err != nil {
- return nil, err
- }
- return new{{$srvIdent}}ClientsFromGenericClients(genericClients), nil
-}
-
-// New{{$srvIdent}}ClientsFromRootDevice discovers instances of the service in
-// a given root device, and returns clients to any that are found. An error is
-// returned if there was not at least one instance of the service within the
-// device. The location parameter is simply assigned to the Location attribute
-// of the wrapped ServiceClient(s).
-//
-// This is a typical entry calling point into this package when reusing an
-// previously discovered root device.
-func New{{$srvIdent}}ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*{{$srvIdent}}, error) {
- genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, {{$srv.Const}})
- if err != nil {
- return nil, err
- }
- return new{{$srvIdent}}ClientsFromGenericClients(genericClients), nil
-}
-
-func new{{$srvIdent}}ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*{{$srvIdent}} {
- clients := make([]*{{$srvIdent}}, len(genericClients))
- for i := range genericClients {
- clients[i] = &{{$srvIdent}}{genericClients[i]}
- }
- return clients
-}
-
-{{range .SCPD.Actions}}{{/* loops over *SCPDWithURN values */}}
-
-{{$winargs := $srv.WrapArguments .InputArguments}}
-{{$woutargs := $srv.WrapArguments .OutputArguments}}
-{{if $winargs.HasDoc}}
-//
-// Arguments:{{range $winargs}}{{if .HasDoc}}
-//
-// * {{.Name}}: {{.Document}}{{end}}{{end}}{{end}}
-{{if $woutargs.HasDoc}}
-//
-// Return values:{{range $woutargs}}{{if .HasDoc}}
-//
-// * {{.Name}}: {{.Document}}{{end}}{{end}}{{end}}
-func (client *{{$srvIdent}}) {{.Name}}({{range $winargs}}{{/*
-*/}}{{.AsParameter}}, {{end}}{{/*
-*/}}) ({{range $woutargs}}{{/*
-*/}}{{.AsParameter}}, {{end}} err error) {
- // Request structure.
- request := {{if $winargs}}&{{template "argstruct" $winargs}}{{"{}"}}{{else}}{{"interface{}(nil)"}}{{end}}
- // BEGIN Marshal arguments into request.
-{{range $winargs}}
- if request.{{.Name}}, err = {{.Marshal}}; err != nil {
- return
- }{{end}}
- // END Marshal arguments into request.
-
- // Response structure.
- response := {{if $woutargs}}&{{template "argstruct" $woutargs}}{{"{}"}}{{else}}{{"interface{}(nil)"}}{{end}}
-
- // Perform the SOAP call.
- if err = client.SOAPClient.PerformAction({{$srv.URNParts.Const}}, "{{.Name}}", request, response); err != nil {
- return
- }
-
- // BEGIN Unmarshal arguments from response.
-{{range $woutargs}}
- if {{.Name}}, err = {{.Unmarshal "response"}}; err != nil {
- return
- }{{end}}
- // END Unmarshal arguments from response.
- return
-}
-{{end}}{{/* range .SCPD.Actions */}}
-{{end}}{{/* range .Services */}}
-
-{{define "argstruct"}}struct {{"{"}}{{range .}}
-{{.Name}} string
-{{end}}{{"}"}}{{end}}
-`))
diff --git a/Godeps/_workspace/src/github.com/jackpal/gateway/LICENSE b/Godeps/_workspace/src/github.com/jackpal/gateway/LICENSE
deleted file mode 100644
index c9efac32e..000000000
--- a/Godeps/_workspace/src/github.com/jackpal/gateway/LICENSE
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) 2010 Jack Palevich. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/Godeps/_workspace/src/github.com/jackpal/gateway/README.md b/Godeps/_workspace/src/github.com/jackpal/gateway/README.md
deleted file mode 100644
index 49cc0b85c..000000000
--- a/Godeps/_workspace/src/github.com/jackpal/gateway/README.md
+++ /dev/null
@@ -1,7 +0,0 @@
-# gateway
-
-A very simple library for discovering the IP address of the local LAN gateway.
-
-Provides implementations for Linux, OS X (Darwin) and Windows.
-
-Pull requests for other OSs happily considered!
diff --git a/Godeps/_workspace/src/github.com/jackpal/gateway/gateway_darwin.go b/Godeps/_workspace/src/github.com/jackpal/gateway/gateway_darwin.go
deleted file mode 100644
index fc6ef68d9..000000000
--- a/Godeps/_workspace/src/github.com/jackpal/gateway/gateway_darwin.go
+++ /dev/null
@@ -1,40 +0,0 @@
-package gateway
-
-import (
- "bytes"
- "io/ioutil"
- "net"
- "os/exec"
-)
-
-func DiscoverGateway() (ip net.IP, err error) {
- routeCmd := exec.Command("route", "-n", "get", "0.0.0.0")
- stdOut, err := routeCmd.StdoutPipe()
- if err != nil {
- return
- }
- if err = routeCmd.Start(); err != nil {
- return
- }
- output, err := ioutil.ReadAll(stdOut)
- if err != nil {
- return
- }
-
- // Darwin route out format is always like this:
- // route to: default
- // destination: default
- // mask: default
- // gateway: 192.168.1.1
- outputLines := bytes.Split(output, []byte("\n"))
- for _, line := range outputLines {
- if bytes.Contains(line, []byte("gateway:")) {
- gatewayFields := bytes.Fields(line)
- ip = net.ParseIP(string(gatewayFields[1]))
- break
- }
- }
-
- err = routeCmd.Wait()
- return
-}
diff --git a/Godeps/_workspace/src/github.com/jackpal/gateway/gateway_linux.go b/Godeps/_workspace/src/github.com/jackpal/gateway/gateway_linux.go
deleted file mode 100644
index 333bde1dc..000000000
--- a/Godeps/_workspace/src/github.com/jackpal/gateway/gateway_linux.go
+++ /dev/null
@@ -1,75 +0,0 @@
-package gateway
-
-import (
- "bytes"
- "io/ioutil"
- "net"
- "os/exec"
-)
-
-func discoverGatewayUsingIp() (ip net.IP, err error) {
- routeCmd := exec.Command("ip", "route", "show")
- stdOut, err := routeCmd.StdoutPipe()
- if err != nil {
- return
- }
- if err = routeCmd.Start(); err != nil {
- return
- }
- output, err := ioutil.ReadAll(stdOut)
- if err != nil {
- return
- }
-
- // Linux 'ip route show' format looks like this:
- // default via 192.168.178.1 dev wlp3s0 metric 303
- // 192.168.178.0/24 dev wlp3s0 proto kernel scope link src 192.168.178.76 metric 303
- outputLines := bytes.Split(output, []byte("\n"))
- for _, line := range outputLines {
- if bytes.Contains(line, []byte("default")) {
- ipFields := bytes.Fields(line)
- ip = net.ParseIP(string(ipFields[2]))
- break
- }
- }
- err = routeCmd.Wait()
- return
-}
-
-func discoverGatewayUsingRoute() (ip net.IP, err error) {
- routeCmd := exec.Command("route", "-n")
- stdOut, err := routeCmd.StdoutPipe()
- if err != nil {
- return
- }
- if err = routeCmd.Start(); err != nil {
- return
- }
- output, err := ioutil.ReadAll(stdOut)
- if err != nil {
- return
- }
-
- // Linux route out format is always like this:
- // Kernel IP routing table
- // Destination Gateway Genmask Flags Metric Ref Use Iface
- // 0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
- outputLines := bytes.Split(output, []byte("\n"))
- for _, line := range outputLines {
- if bytes.Contains(line, []byte("0.0.0.0")) {
- ipFields := bytes.Fields(line)
- ip = net.ParseIP(string(ipFields[1]))
- break
- }
- }
- err = routeCmd.Wait()
- return
-}
-
-func DiscoverGateway() (ip net.IP, err error) {
- ip, err = discoverGatewayUsingRoute()
- if err != nil {
- ip, err = discoverGatewayUsingIp()
- }
- return
-}
diff --git a/Godeps/_workspace/src/github.com/jackpal/gateway/gateway_unimplemented.go b/Godeps/_workspace/src/github.com/jackpal/gateway/gateway_unimplemented.go
deleted file mode 100644
index 35042b910..000000000
--- a/Godeps/_workspace/src/github.com/jackpal/gateway/gateway_unimplemented.go
+++ /dev/null
@@ -1,14 +0,0 @@
-// +build !darwin,!linux,!windows
-
-package gateway
-
-import (
- "fmt"
- "net"
- "runtime"
-)
-
-func DiscoverGateway() (ip net.IP, err error) {
- err = fmt.Errorf("DiscoverGateway not implemented for OS %s", runtime.GOOS)
- return
-}
diff --git a/Godeps/_workspace/src/github.com/jackpal/gateway/gateway_windows.go b/Godeps/_workspace/src/github.com/jackpal/gateway/gateway_windows.go
deleted file mode 100644
index 282c8f685..000000000
--- a/Godeps/_workspace/src/github.com/jackpal/gateway/gateway_windows.go
+++ /dev/null
@@ -1,43 +0,0 @@
-package gateway
-
-import (
- "bytes"
- "io/ioutil"
- "net"
- "os/exec"
-)
-
-func DiscoverGateway() (ip net.IP, err error) {
- routeCmd := exec.Command("route", "print", "0.0.0.0")
- stdOut, err := routeCmd.StdoutPipe()
- if err != nil {
- return
- }
- if err = routeCmd.Start(); err != nil {
- return
- }
- output, err := ioutil.ReadAll(stdOut)
- if err != nil {
- return
- }
-
- // Windows route output format is always like this:
- // ===========================================================================
- // Active Routes:
- // Network Destination Netmask Gateway Interface Metric
- // 0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.100 20
- // ===========================================================================
- // I'm trying to pick the active route,
- // then jump 2 lines and pick the third IP
- // Not using regex because output is quite standard from Windows XP to 8 (NEEDS TESTING)
- outputLines := bytes.Split(output, []byte("\n"))
- for idx, line := range outputLines {
- if bytes.Contains(line, []byte("Active Routes:")) {
- ipFields := bytes.Fields(outputLines[idx+2])
- ip = net.ParseIP(string(ipFields[2]))
- break
- }
- }
- err = routeCmd.Wait()
- return
-}
diff --git a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/cmd/metrics-bench/metrics-bench.go b/Godeps/_workspace/src/github.com/rcrowley/go-metrics/cmd/metrics-bench/metrics-bench.go
deleted file mode 100644
index dddaf4b12..000000000
--- a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/cmd/metrics-bench/metrics-bench.go
+++ /dev/null
@@ -1,20 +0,0 @@
-package main
-
-import (
- "fmt"
- "github.com/rcrowley/go-metrics"
- "time"
-)
-
-func main() {
- r := metrics.NewRegistry()
- for i := 0; i < 10000; i++ {
- r.Register(fmt.Sprintf("counter-%d", i), metrics.NewCounter())
- r.Register(fmt.Sprintf("gauge-%d", i), metrics.NewGauge())
- r.Register(fmt.Sprintf("gaugefloat64-%d", i), metrics.NewGaugeFloat64())
- r.Register(fmt.Sprintf("histogram-uniform-%d", i), metrics.NewHistogram(metrics.NewUniformSample(1028)))
- r.Register(fmt.Sprintf("histogram-exp-%d", i), metrics.NewHistogram(metrics.NewExpDecaySample(1028, 0.015)))
- r.Register(fmt.Sprintf("meter-%d", i), metrics.NewMeter())
- }
- time.Sleep(600e9)
-}
diff --git a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/cmd/metrics-example/metrics-example.go b/Godeps/_workspace/src/github.com/rcrowley/go-metrics/cmd/metrics-example/metrics-example.go
deleted file mode 100644
index 66f42c046..000000000
--- a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/cmd/metrics-example/metrics-example.go
+++ /dev/null
@@ -1,154 +0,0 @@
-package main
-
-import (
- "errors"
- "github.com/rcrowley/go-metrics"
- // "github.com/rcrowley/go-metrics/stathat"
- "log"
- "math/rand"
- "os"
- // "syslog"
- "time"
-)
-
-const fanout = 10
-
-func main() {
-
- r := metrics.NewRegistry()
-
- c := metrics.NewCounter()
- r.Register("foo", c)
- for i := 0; i < fanout; i++ {
- go func() {
- for {
- c.Dec(19)
- time.Sleep(300e6)
- }
- }()
- go func() {
- for {
- c.Inc(47)
- time.Sleep(400e6)
- }
- }()
- }
-
- g := metrics.NewGauge()
- r.Register("bar", g)
- for i := 0; i < fanout; i++ {
- go func() {
- for {
- g.Update(19)
- time.Sleep(300e6)
- }
- }()
- go func() {
- for {
- g.Update(47)
- time.Sleep(400e6)
- }
- }()
- }
-
- gf := metrics.NewGaugeFloat64()
- r.Register("barfloat64", gf)
- for i := 0; i < fanout; i++ {
- go func() {
- for {
- g.Update(19.0)
- time.Sleep(300e6)
- }
- }()
- go func() {
- for {
- g.Update(47.0)
- time.Sleep(400e6)
- }
- }()
- }
-
- hc := metrics.NewHealthcheck(func(h metrics.Healthcheck) {
- if 0 < rand.Intn(2) {
- h.Healthy()
- } else {
- h.Unhealthy(errors.New("baz"))
- }
- })
- r.Register("baz", hc)
-
- s := metrics.NewExpDecaySample(1028, 0.015)
- //s := metrics.NewUniformSample(1028)
- h := metrics.NewHistogram(s)
- r.Register("bang", h)
- for i := 0; i < fanout; i++ {
- go func() {
- for {
- h.Update(19)
- time.Sleep(300e6)
- }
- }()
- go func() {
- for {
- h.Update(47)
- time.Sleep(400e6)
- }
- }()
- }
-
- m := metrics.NewMeter()
- r.Register("quux", m)
- for i := 0; i < fanout; i++ {
- go func() {
- for {
- m.Mark(19)
- time.Sleep(300e6)
- }
- }()
- go func() {
- for {
- m.Mark(47)
- time.Sleep(400e6)
- }
- }()
- }
-
- t := metrics.NewTimer()
- r.Register("hooah", t)
- for i := 0; i < fanout; i++ {
- go func() {
- for {
- t.Time(func() { time.Sleep(300e6) })
- }
- }()
- go func() {
- for {
- t.Time(func() { time.Sleep(400e6) })
- }
- }()
- }
-
- metrics.RegisterDebugGCStats(r)
- go metrics.CaptureDebugGCStats(r, 5e9)
-
- metrics.RegisterRuntimeMemStats(r)
- go metrics.CaptureRuntimeMemStats(r, 5e9)
-
- metrics.Log(r, 60e9, log.New(os.Stderr, "metrics: ", log.Lmicroseconds))
-
- /*
- w, err := syslog.Dial("unixgram", "/dev/log", syslog.LOG_INFO, "metrics")
- if nil != err { log.Fatalln(err) }
- metrics.Syslog(r, 60e9, w)
- */
-
- /*
- addr, _ := net.ResolveTCPAddr("tcp", "127.0.0.1:2003")
- metrics.Graphite(r, 10e9, "metrics", addr)
- */
-
- /*
- stathat.Stathat(r, 10e9, "example@example.com")
- */
-
-}
diff --git a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/cmd/never-read/never-read.go b/Godeps/_workspace/src/github.com/rcrowley/go-metrics/cmd/never-read/never-read.go
deleted file mode 100644
index dc175b778..000000000
--- a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/cmd/never-read/never-read.go
+++ /dev/null
@@ -1,22 +0,0 @@
-package main
-
-import (
- "log"
- "net"
-)
-
-func main() {
- addr, _ := net.ResolveTCPAddr("tcp", "127.0.0.1:2003")
- l, err := net.ListenTCP("tcp", addr)
- if nil != err {
- log.Fatalln(err)
- }
- log.Println("listening", l.Addr())
- for {
- c, err := l.AcceptTCP()
- if nil != err {
- log.Fatalln(err)
- }
- log.Println("accepted", c.RemoteAddr())
- }
-}
diff --git a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/librato/client.go b/Godeps/_workspace/src/github.com/rcrowley/go-metrics/librato/client.go
deleted file mode 100644
index 8c0c850e3..000000000
--- a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/librato/client.go
+++ /dev/null
@@ -1,102 +0,0 @@
-package librato
-
-import (
- "bytes"
- "encoding/json"
- "fmt"
- "io/ioutil"
- "net/http"
-)
-
-const Operations = "operations"
-const OperationsShort = "ops"
-
-type LibratoClient struct {
- Email, Token string
-}
-
-// property strings
-const (
- // display attributes
- Color = "color"
- DisplayMax = "display_max"
- DisplayMin = "display_min"
- DisplayUnitsLong = "display_units_long"
- DisplayUnitsShort = "display_units_short"
- DisplayStacked = "display_stacked"
- DisplayTransform = "display_transform"
- // special gauge display attributes
- SummarizeFunction = "summarize_function"
- Aggregate = "aggregate"
-
- // metric keys
- Name = "name"
- Period = "period"
- Description = "description"
- DisplayName = "display_name"
- Attributes = "attributes"
-
- // measurement keys
- MeasureTime = "measure_time"
- Source = "source"
- Value = "value"
-
- // special gauge keys
- Count = "count"
- Sum = "sum"
- Max = "max"
- Min = "min"
- SumSquares = "sum_squares"
-
- // batch keys
- Counters = "counters"
- Gauges = "gauges"
-
- MetricsPostUrl = "https://metrics-api.librato.com/v1/metrics"
-)
-
-type Measurement map[string]interface{}
-type Metric map[string]interface{}
-
-type Batch struct {
- Gauges []Measurement `json:"gauges,omitempty"`
- Counters []Measurement `json:"counters,omitempty"`
- MeasureTime int64 `json:"measure_time"`
- Source string `json:"source"`
-}
-
-func (self *LibratoClient) PostMetrics(batch Batch) (err error) {
- var (
- js []byte
- req *http.Request
- resp *http.Response
- )
-
- if len(batch.Counters) == 0 && len(batch.Gauges) == 0 {
- return nil
- }
-
- if js, err = json.Marshal(batch); err != nil {
- return
- }
-
- if req, err = http.NewRequest("POST", MetricsPostUrl, bytes.NewBuffer(js)); err != nil {
- return
- }
-
- req.Header.Set("Content-Type", "application/json")
- req.SetBasicAuth(self.Email, self.Token)
-
- if resp, err = http.DefaultClient.Do(req); err != nil {
- return
- }
-
- if resp.StatusCode != http.StatusOK {
- var body []byte
- if body, err = ioutil.ReadAll(resp.Body); err != nil {
- body = []byte(fmt.Sprintf("(could not fetch response body for error: %s)", err))
- }
- err = fmt.Errorf("Unable to post to Librato: %d %s %s", resp.StatusCode, resp.Status, string(body))
- }
- return
-}
diff --git a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/librato/librato.go b/Godeps/_workspace/src/github.com/rcrowley/go-metrics/librato/librato.go
deleted file mode 100644
index d7c057468..000000000
--- a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/librato/librato.go
+++ /dev/null
@@ -1,235 +0,0 @@
-package librato
-
-import (
- "fmt"
- "log"
- "math"
- "regexp"
- "time"
-
- "github.com/rcrowley/go-metrics"
-)
-
-// a regexp for extracting the unit from time.Duration.String
-var unitRegexp = regexp.MustCompile("[^\\d]+$")
-
-// a helper that turns a time.Duration into librato display attributes for timer metrics
-func translateTimerAttributes(d time.Duration) (attrs map[string]interface{}) {
- attrs = make(map[string]interface{})
- attrs[DisplayTransform] = fmt.Sprintf("x/%d", int64(d))
- attrs[DisplayUnitsShort] = string(unitRegexp.Find([]byte(d.String())))
- return
-}
-
-type Reporter struct {
- Email, Token string
- Namespace string
- Source string
- Interval time.Duration
- Registry metrics.Registry
- Percentiles []float64 // percentiles to report on histogram metrics
- TimerAttributes map[string]interface{} // units in which timers will be displayed
- intervalSec int64
-}
-
-func NewReporter(r metrics.Registry, d time.Duration, e string, t string, s string, p []float64, u time.Duration) *Reporter {
- return &Reporter{e, t, "", s, d, r, p, translateTimerAttributes(u), int64(d / time.Second)}
-}
-
-func Librato(r metrics.Registry, d time.Duration, e string, t string, s string, p []float64, u time.Duration) {
- NewReporter(r, d, e, t, s, p, u).Run()
-}
-
-func (self *Reporter) Run() {
- log.Printf("WARNING: This client has been DEPRECATED! It has been moved to https://github.com/mihasya/go-metrics-librato and will be removed from rcrowley/go-metrics on August 5th 2015")
- ticker := time.Tick(self.Interval)
- metricsApi := &LibratoClient{self.Email, self.Token}
- for now := range ticker {
- var metrics Batch
- var err error
- if metrics, err = self.BuildRequest(now, self.Registry); err != nil {
- log.Printf("ERROR constructing librato request body %s", err)
- continue
- }
- if err := metricsApi.PostMetrics(metrics); err != nil {
- log.Printf("ERROR sending metrics to librato %s", err)
- continue
- }
- }
-}
-
-// calculate sum of squares from data provided by metrics.Histogram
-// see http://en.wikipedia.org/wiki/Standard_deviation#Rapid_calculation_methods
-func sumSquares(s metrics.Sample) float64 {
- count := float64(s.Count())
- sumSquared := math.Pow(count*s.Mean(), 2)
- sumSquares := math.Pow(count*s.StdDev(), 2) + sumSquared/count
- if math.IsNaN(sumSquares) {
- return 0.0
- }
- return sumSquares
-}
-func sumSquaresTimer(t metrics.Timer) float64 {
- count := float64(t.Count())
- sumSquared := math.Pow(count*t.Mean(), 2)
- sumSquares := math.Pow(count*t.StdDev(), 2) + sumSquared/count
- if math.IsNaN(sumSquares) {
- return 0.0
- }
- return sumSquares
-}
-
-func (self *Reporter) BuildRequest(now time.Time, r metrics.Registry) (snapshot Batch, err error) {
- snapshot = Batch{
- // coerce timestamps to a stepping fn so that they line up in Librato graphs
- MeasureTime: (now.Unix() / self.intervalSec) * self.intervalSec,
- Source: self.Source,
- }
- snapshot.Gauges = make([]Measurement, 0)
- snapshot.Counters = make([]Measurement, 0)
- histogramGaugeCount := 1 + len(self.Percentiles)
- r.Each(func(name string, metric interface{}) {
- if self.Namespace != "" {
- name = fmt.Sprintf("%s.%s", self.Namespace, name)
- }
- measurement := Measurement{}
- measurement[Period] = self.Interval.Seconds()
- switch m := metric.(type) {
- case metrics.Counter:
- if m.Count() > 0 {
- measurement[Name] = fmt.Sprintf("%s.%s", name, "count")
- measurement[Value] = float64(m.Count())
- measurement[Attributes] = map[string]interface{}{
- DisplayUnitsLong: Operations,
- DisplayUnitsShort: OperationsShort,
- DisplayMin: "0",
- }
- snapshot.Counters = append(snapshot.Counters, measurement)
- }
- case metrics.Gauge:
- measurement[Name] = name
- measurement[Value] = float64(m.Value())
- snapshot.Gauges = append(snapshot.Gauges, measurement)
- case metrics.GaugeFloat64:
- measurement[Name] = name
- measurement[Value] = float64(m.Value())
- snapshot.Gauges = append(snapshot.Gauges, measurement)
- case metrics.Histogram:
- if m.Count() > 0 {
- gauges := make([]Measurement, histogramGaugeCount, histogramGaugeCount)
- s := m.Sample()
- measurement[Name] = fmt.Sprintf("%s.%s", name, "hist")
- measurement[Count] = uint64(s.Count())
- measurement[Max] = float64(s.Max())
- measurement[Min] = float64(s.Min())
- measurement[Sum] = float64(s.Sum())
- measurement[SumSquares] = sumSquares(s)
- gauges[0] = measurement
- for i, p := range self.Percentiles {
- gauges[i+1] = Measurement{
- Name: fmt.Sprintf("%s.%.2f", measurement[Name], p),
- Value: s.Percentile(p),
- Period: measurement[Period],
- }
- }
- snapshot.Gauges = append(snapshot.Gauges, gauges...)
- }
- case metrics.Meter:
- measurement[Name] = name
- measurement[Value] = float64(m.Count())
- snapshot.Counters = append(snapshot.Counters, measurement)
- snapshot.Gauges = append(snapshot.Gauges,
- Measurement{
- Name: fmt.Sprintf("%s.%s", name, "1min"),
- Value: m.Rate1(),
- Period: int64(self.Interval.Seconds()),
- Attributes: map[string]interface{}{
- DisplayUnitsLong: Operations,
- DisplayUnitsShort: OperationsShort,
- DisplayMin: "0",
- },
- },
- Measurement{
- Name: fmt.Sprintf("%s.%s", name, "5min"),
- Value: m.Rate5(),
- Period: int64(self.Interval.Seconds()),
- Attributes: map[string]interface{}{
- DisplayUnitsLong: Operations,
- DisplayUnitsShort: OperationsShort,
- DisplayMin: "0",
- },
- },
- Measurement{
- Name: fmt.Sprintf("%s.%s", name, "15min"),
- Value: m.Rate15(),
- Period: int64(self.Interval.Seconds()),
- Attributes: map[string]interface{}{
- DisplayUnitsLong: Operations,
- DisplayUnitsShort: OperationsShort,
- DisplayMin: "0",
- },
- },
- )
- case metrics.Timer:
- measurement[Name] = name
- measurement[Value] = float64(m.Count())
- snapshot.Counters = append(snapshot.Counters, measurement)
- if m.Count() > 0 {
- libratoName := fmt.Sprintf("%s.%s", name, "timer.mean")
- gauges := make([]Measurement, histogramGaugeCount, histogramGaugeCount)
- gauges[0] = Measurement{
- Name: libratoName,
- Count: uint64(m.Count()),
- Sum: m.Mean() * float64(m.Count()),
- Max: float64(m.Max()),
- Min: float64(m.Min()),
- SumSquares: sumSquaresTimer(m),
- Period: int64(self.Interval.Seconds()),
- Attributes: self.TimerAttributes,
- }
- for i, p := range self.Percentiles {
- gauges[i+1] = Measurement{
- Name: fmt.Sprintf("%s.timer.%2.0f", name, p*100),
- Value: m.Percentile(p),
- Period: int64(self.Interval.Seconds()),
- Attributes: self.TimerAttributes,
- }
- }
- snapshot.Gauges = append(snapshot.Gauges, gauges...)
- snapshot.Gauges = append(snapshot.Gauges,
- Measurement{
- Name: fmt.Sprintf("%s.%s", name, "rate.1min"),
- Value: m.Rate1(),
- Period: int64(self.Interval.Seconds()),
- Attributes: map[string]interface{}{
- DisplayUnitsLong: Operations,
- DisplayUnitsShort: OperationsShort,
- DisplayMin: "0",
- },
- },
- Measurement{
- Name: fmt.Sprintf("%s.%s", name, "rate.5min"),
- Value: m.Rate5(),
- Period: int64(self.Interval.Seconds()),
- Attributes: map[string]interface{}{
- DisplayUnitsLong: Operations,
- DisplayUnitsShort: OperationsShort,
- DisplayMin: "0",
- },
- },
- Measurement{
- Name: fmt.Sprintf("%s.%s", name, "rate.15min"),
- Value: m.Rate15(),
- Period: int64(self.Interval.Seconds()),
- Attributes: map[string]interface{}{
- DisplayUnitsLong: Operations,
- DisplayUnitsShort: OperationsShort,
- DisplayMin: "0",
- },
- },
- )
- }
- }
- })
- return
-}
diff --git a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/stathat/stathat.go b/Godeps/_workspace/src/github.com/rcrowley/go-metrics/stathat/stathat.go
deleted file mode 100644
index 0afcb4848..000000000
--- a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/stathat/stathat.go
+++ /dev/null
@@ -1,69 +0,0 @@
-// Metrics output to StatHat.
-package stathat
-
-import (
- "github.com/rcrowley/go-metrics"
- "github.com/stathat/go"
- "log"
- "time"
-)
-
-func Stathat(r metrics.Registry, d time.Duration, userkey string) {
- for {
- if err := sh(r, userkey); nil != err {
- log.Println(err)
- }
- time.Sleep(d)
- }
-}
-
-func sh(r metrics.Registry, userkey string) error {
- r.Each(func(name string, i interface{}) {
- switch metric := i.(type) {
- case metrics.Counter:
- stathat.PostEZCount(name, userkey, int(metric.Count()))
- case metrics.Gauge:
- stathat.PostEZValue(name, userkey, float64(metric.Value()))
- case metrics.GaugeFloat64:
- stathat.PostEZValue(name, userkey, float64(metric.Value()))
- case metrics.Histogram:
- h := metric.Snapshot()
- ps := h.Percentiles([]float64{0.5, 0.75, 0.95, 0.99, 0.999})
- stathat.PostEZCount(name+".count", userkey, int(h.Count()))
- stathat.PostEZValue(name+".min", userkey, float64(h.Min()))
- stathat.PostEZValue(name+".max", userkey, float64(h.Max()))
- stathat.PostEZValue(name+".mean", userkey, float64(h.Mean()))
- stathat.PostEZValue(name+".std-dev", userkey, float64(h.StdDev()))
- stathat.PostEZValue(name+".50-percentile", userkey, float64(ps[0]))
- stathat.PostEZValue(name+".75-percentile", userkey, float64(ps[1]))
- stathat.PostEZValue(name+".95-percentile", userkey, float64(ps[2]))
- stathat.PostEZValue(name+".99-percentile", userkey, float64(ps[3]))
- stathat.PostEZValue(name+".999-percentile", userkey, float64(ps[4]))
- case metrics.Meter:
- m := metric.Snapshot()
- stathat.PostEZCount(name+".count", userkey, int(m.Count()))
- stathat.PostEZValue(name+".one-minute", userkey, float64(m.Rate1()))
- stathat.PostEZValue(name+".five-minute", userkey, float64(m.Rate5()))
- stathat.PostEZValue(name+".fifteen-minute", userkey, float64(m.Rate15()))
- stathat.PostEZValue(name+".mean", userkey, float64(m.RateMean()))
- case metrics.Timer:
- t := metric.Snapshot()
- ps := t.Percentiles([]float64{0.5, 0.75, 0.95, 0.99, 0.999})
- stathat.PostEZCount(name+".count", userkey, int(t.Count()))
- stathat.PostEZValue(name+".min", userkey, float64(t.Min()))
- stathat.PostEZValue(name+".max", userkey, float64(t.Max()))
- stathat.PostEZValue(name+".mean", userkey, float64(t.Mean()))
- stathat.PostEZValue(name+".std-dev", userkey, float64(t.StdDev()))
- stathat.PostEZValue(name+".50-percentile", userkey, float64(ps[0]))
- stathat.PostEZValue(name+".75-percentile", userkey, float64(ps[1]))
- stathat.PostEZValue(name+".95-percentile", userkey, float64(ps[2]))
- stathat.PostEZValue(name+".99-percentile", userkey, float64(ps[3]))
- stathat.PostEZValue(name+".999-percentile", userkey, float64(ps[4]))
- stathat.PostEZValue(name+".one-minute", userkey, float64(t.Rate1()))
- stathat.PostEZValue(name+".five-minute", userkey, float64(t.Rate5()))
- stathat.PostEZValue(name+".fifteen-minute", userkey, float64(t.Rate15()))
- stathat.PostEZValue(name+".mean-rate", userkey, float64(t.RateMean()))
- }
- })
- return nil
-}
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/ast/comments.go b/Godeps/_workspace/src/github.com/robertkrimen/otto/ast/comments.go
deleted file mode 100644
index 227e34ecb..000000000
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/ast/comments.go
+++ /dev/null
@@ -1,92 +0,0 @@
-package ast
-
-import (
- "fmt"
- "github.com/robertkrimen/otto/file"
-)
-
-// CommentPosition determines where the comment is in a given context
-type CommentPosition int
-
-const (
- _ CommentPosition = iota
- LEADING // Before the pertinent expression
- TRAILING // After the pertinent expression
- KEY // After a key or keyword
- COLON // After a colon in a field declaration
- FINAL // Final comments in a block, not belonging to a specific expression or the comment after a trailing , in an array or object literal
- TBD
-)
-
-// Comment contains the data of the comment
-type Comment struct {
- Begin file.Idx
- Text string
- Position CommentPosition
-}
-
-// String returns a stringified version of the position
-func (cp CommentPosition) String() string {
- switch cp {
- case LEADING:
- return "Leading"
- case TRAILING:
- return "Trailing"
- case KEY:
- return "Key"
- case COLON:
- return "Colon"
- case FINAL:
- return "Final"
- default:
- return "???"
- }
-}
-
-// String returns a stringified version of the comment
-func (c Comment) String() string {
- return fmt.Sprintf("Comment: %v", c.Text)
-}
-
-// CommentMap is the data structure where all found comments are stored
-type CommentMap map[Node][]*Comment
-
-// AddComment adds a single comment to the map
-func (cm CommentMap) AddComment(node Node, comment *Comment) {
- list := cm[node]
- list = append(list, comment)
-
- cm[node] = list
-}
-
-// AddComments adds a slice of comments, given a node and an updated position
-func (cm CommentMap) AddComments(node Node, comments []*Comment, position CommentPosition) {
- for _, comment := range comments {
- comment.Position = position
- cm.AddComment(node, comment)
- }
-}
-
-// Size returns the size of the map
-func (cm CommentMap) Size() int {
- size := 0
- for _, comments := range cm {
- size += len(comments)
- }
-
- return size
-}
-
-// MoveComments moves comments with a given position from a node to another
-func (cm CommentMap) MoveComments(from, to Node, position CommentPosition) {
- for i, c := range cm[from] {
- if c.Position == position {
- cm.AddComment(to, c)
-
- // Remove the comment from the "from" slice
- cm[from][i] = cm[from][len(cm[from])-1]
- cm[from][len(cm[from])-1] = nil
- cm[from] = cm[from][:len(cm[from])-1]
- }
- }
-}
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/otto/Makefile b/Godeps/_workspace/src/github.com/robertkrimen/otto/otto/Makefile
deleted file mode 100644
index bac5cd4a5..000000000
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/otto/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-.PHONY: build
-
-build:
- go build -a
- -gxc build-darwin-386 -a
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/otto/main.go b/Godeps/_workspace/src/github.com/robertkrimen/otto/otto/main.go
deleted file mode 100644
index f379e42a9..000000000
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/otto/main.go
+++ /dev/null
@@ -1,48 +0,0 @@
-package main
-
-import (
- "flag"
- "fmt"
- "io/ioutil"
- "os"
-
- "github.com/robertkrimen/otto"
- "github.com/robertkrimen/otto/underscore"
-)
-
-var flag_underscore *bool = flag.Bool("underscore", true, "Load underscore into the runtime environment")
-
-func readSource(filename string) ([]byte, error) {
- if filename == "" || filename == "-" {
- return ioutil.ReadAll(os.Stdin)
- }
- return ioutil.ReadFile(filename)
-}
-
-func main() {
- flag.Parse()
-
- if !*flag_underscore {
- underscore.Disable()
- }
-
- err := func() error {
- src, err := readSource(flag.Arg(0))
- if err != nil {
- return err
- }
-
- vm := otto.New()
- _, err = vm.Run(src)
- return err
- }()
- if err != nil {
- switch err := err.(type) {
- case *otto.Error:
- fmt.Print(err.String())
- default:
- fmt.Println(err)
- }
- os.Exit(64)
- }
-}
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/repl/repl.go b/Godeps/_workspace/src/github.com/robertkrimen/otto/repl/repl.go
deleted file mode 100644
index 0d70cc051..000000000
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/repl/repl.go
+++ /dev/null
@@ -1,115 +0,0 @@
-// Package repl implements a REPL (read-eval-print loop) for otto.
-package repl
-
-import (
- "fmt"
- "io"
- "strings"
- "sync/atomic"
-
- "github.com/robertkrimen/otto"
- "gopkg.in/readline.v1"
-)
-
-var counter uint32
-
-// DebuggerHandler implements otto's debugger handler signature, providing a
-// simple drop-in debugger implementation.
-func DebuggerHandler(vm *otto.Otto) {
- i := atomic.AddUint32(&counter, 1)
-
- // purposefully ignoring the error here - we can't do anything useful with
- // it except panicking, and that'd be pretty rude. it'd be easy enough for a
- // consumer to define an equivalent function that _does_ panic if desired.
- _ = RunWithPrompt(vm, fmt.Sprintf("DEBUGGER[%d]>", i))
-}
-
-// Run creates a REPL with the default prompt and no prelude.
-func Run(vm *otto.Otto) error {
- return RunWithPromptAndPrelude(vm, "", "")
-}
-
-// RunWithPrompt runs a REPL with the given prompt and no prelude.
-func RunWithPrompt(vm *otto.Otto, prompt string) error {
- return RunWithPromptAndPrelude(vm, prompt, "")
-}
-
-// RunWithPrelude runs a REPL with the default prompt and the given prelude.
-func RunWithPrelude(vm *otto.Otto, prelude string) error {
- return RunWithPromptAndPrelude(vm, "", prelude)
-}
-
-// RunWithPromptAndPrelude runs a REPL with the given prompt and prelude.
-func RunWithPromptAndPrelude(vm *otto.Otto, prompt, prelude string) error {
- if prompt == "" {
- prompt = ">"
- }
-
- prompt = strings.Trim(prompt, " ")
- prompt += " "
-
- rl, err := readline.New(prompt)
- if err != nil {
- return err
- }
-
- if prelude != "" {
- if _, err := io.Copy(rl.Stderr(), strings.NewReader(prelude+"\n")); err != nil {
- return err
- }
-
- rl.Refresh()
- }
-
- var d []string
-
- for {
- l, err := rl.Readline()
- if err != nil {
- if err == readline.ErrInterrupt {
- if d != nil {
- d = nil
-
- rl.SetPrompt(prompt)
- rl.Refresh()
-
- continue
- }
-
- break
- }
-
- return err
- }
-
- if l == "" {
- continue
- }
-
- d = append(d, l)
-
- s, err := vm.Compile("repl", strings.Join(d, "\n"))
- if err != nil {
- rl.SetPrompt(strings.Repeat(" ", len(prompt)))
- } else {
- rl.SetPrompt(prompt)
-
- d = nil
-
- v, err := vm.Eval(s)
- if err != nil {
- if oerr, ok := err.(*otto.Error); ok {
- io.Copy(rl.Stdout(), strings.NewReader(oerr.String()))
- } else {
- io.Copy(rl.Stdout(), strings.NewReader(err.Error()))
- }
- } else {
- rl.Stdout().Write([]byte(v.String() + "\n"))
- }
- }
-
- rl.Refresh()
- }
-
- return rl.Close()
-}
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/terst/terst.go b/Godeps/_workspace/src/github.com/robertkrimen/otto/terst/terst.go
deleted file mode 100644
index a25ca8b9c..000000000
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/terst/terst.go
+++ /dev/null
@@ -1,669 +0,0 @@
-// This file was AUTOMATICALLY GENERATED by terst-import (smuggol) from github.com/robertkrimen/terst
-
-/*
-Package terst is a terse (terst = test + terse), easy-to-use testing library for Go.
-
-terst is compatible with (and works via) the standard testing package: http://golang.org/pkg/testing
-
- var is = terst.Is
-
- func Test(t *testing.T) {
- terst.Terst(t, func() {
- is("abc", "abc")
-
- is(1, ">", 0)
-
- var abc []int
- is(abc, nil)
- }
- }
-
-Do not import terst directly, instead use `terst-import` to copy it into your testing environment:
-
-https://github.com/robertkrimen/terst/tree/master/terst-import
-
- $ go get github.com/robertkrimen/terst/terst-import
-
- $ terst-import
-
-*/
-package terst
-
-import (
- "bytes"
- "errors"
- "fmt"
- "math/big"
- "reflect"
- "regexp"
- "runtime"
- "strings"
- "sync"
- "testing"
- "time"
-)
-
-// Is compares two values (got & expect) and returns true if the comparison is true,
-// false otherwise. In addition, if the comparison is false, Is will report the error
-// in a manner similar to testing.T.Error(...). Is also takes an optional argument,
-// a comparator, that changes how the comparison is made. The following
-// comparators are available:
-//
-// == # got == expect (default)
-// != # got != expect
-//
-// > # got > expect (float32, uint, uint16, int, int64, ...)
-// >= # got >= expect
-// < # got < expect
-// <= # got <= expect
-//
-// =~ # regexp.MustCompile(expect).Match{String}(got)
-// !~ # !regexp.MustCompile(expect).Match{String}(got)
-//
-// Basic usage with the default comparator (==):
-//
-// Is(<got>, <expect>)
-//
-// Specifying a different comparator:
-//
-// Is(<got>, <comparator>, <expect>)
-//
-// A simple comparison:
-//
-// Is(2 + 2, 4)
-//
-// A bit trickier:
-//
-// Is(1, ">", 0)
-// Is(2 + 2, "!=", 5)
-// Is("Nothing happens.", "=~", `ing(\s+)happens\.$`)
-//
-// Is should only be called under a Terst(t, ...) call. For a standalone version,
-// use IsErr. If no scope is found and the comparison is false, then Is will panic the error.
-//
-func Is(arguments ...interface{}) bool {
- err := IsErr(arguments...)
- if err != nil {
- call := Caller()
- if call == nil {
- panic(err)
- }
- call.Error(err)
- return false
- }
- return true
-}
-
-type (
- // ErrFail indicates a comparison failure (e.g. 0 > 1).
- ErrFail error
-
- // ErrInvalid indicates an invalid comparison (e.g. bool == string).
- ErrInvalid error
-)
-
-var errInvalid = errors.New("invalid")
-
-var registry = struct {
- table map[uintptr]*_scope
- lock sync.RWMutex
-}{
- table: map[uintptr]*_scope{},
-}
-
-func registerScope(pc uintptr, scope *_scope) {
- registry.lock.Lock()
- defer registry.lock.Unlock()
- registry.table[pc] = scope
-}
-
-func scope() *_scope {
- scope, _ := findScope()
- return scope
-}
-
-func floatCompare(a float64, b float64) int {
- if a > b {
- return 1
- } else if a < b {
- return -1
- }
- // NaN == NaN
- return 0
-}
-
-func bigIntCompare(a *big.Int, b *big.Int) int {
- return a.Cmp(b)
-}
-
-func bigInt(value int64) *big.Int {
- return big.NewInt(value)
-}
-
-func bigUint(value uint64) *big.Int {
- return big.NewInt(0).SetUint64(value)
-}
-
-type _toString interface {
- String() string
-}
-
-func toString(value interface{}) (string, error) {
- switch value := value.(type) {
- case string:
- return value, nil
- case _toString:
- return value.String(), nil
- case error:
- return value.Error(), nil
- }
- return "", errInvalid
-}
-
-func matchString(got string, expect *regexp.Regexp) (int, error) {
- if expect.MatchString(got) {
- return 0, nil
- }
- return -1, nil
-}
-
-func match(got []byte, expect *regexp.Regexp) (int, error) {
- if expect.Match(got) {
- return 0, nil
- }
- return -1, nil
-}
-
-func compareMatch(got, expect interface{}) (int, error) {
- switch got := got.(type) {
- case []byte:
- switch expect := expect.(type) {
- case string:
- matcher, err := regexp.Compile(expect)
- if err != nil {
- return 0, err
- }
- return match(got, matcher)
- case *regexp.Regexp:
- return match(got, expect)
- }
- default:
- if got, err := toString(got); err == nil {
- switch expect := expect.(type) {
- case string:
- matcher, err := regexp.Compile(expect)
- if err != nil {
- return 0, err
- }
- return matchString(got, matcher)
- case *regexp.Regexp:
- return matchString(got, expect)
- }
- } else {
- return 0, err
- }
- }
- return 0, errInvalid
-}
-
-func floatPromote(value reflect.Value) (float64, error) {
- kind := value.Kind()
- if reflect.Int <= kind && kind <= reflect.Int64 {
- return float64(value.Int()), nil
- }
- if reflect.Uint <= kind && kind <= reflect.Uint64 {
- return float64(value.Uint()), nil
- }
- if reflect.Float32 <= kind && kind <= reflect.Float64 {
- return value.Float(), nil
- }
- return 0, errInvalid
-}
-
-func bigIntPromote(value reflect.Value) (*big.Int, error) {
- kind := value.Kind()
- if reflect.Int <= kind && kind <= reflect.Int64 {
- return bigInt(value.Int()), nil
- }
- if reflect.Uint <= kind && kind <= reflect.Uint64 {
- return bigUint(value.Uint()), nil
- }
- return nil, errInvalid
-}
-
-func compareOther(got, expect interface{}) (int, error) {
- {
- switch expect.(type) {
- case float32, float64:
- return compareNumber(got, expect)
- case uint, uint8, uint16, uint32, uint64:
- return compareNumber(got, expect)
- case int, int8, int16, int32, int64:
- return compareNumber(got, expect)
- case string:
- var err error
- got, err = toString(got)
- if err != nil {
- return 0, err
- }
- case nil:
- got := reflect.ValueOf(got)
- switch got.Kind() {
- case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.Slice, reflect.Interface:
- if got.IsNil() {
- return 0, nil
- }
- return -1, nil
- case reflect.Invalid: // reflect.Invalid: var abc interface{} = nil
- return 0, nil
- }
- return 0, errInvalid
- }
- }
-
- if reflect.ValueOf(got).Type() != reflect.ValueOf(expect).Type() {
- return 0, errInvalid
- }
-
- if reflect.DeepEqual(got, expect) {
- return 0, nil
- }
- return -1, nil
-}
-
-func compareNumber(got, expect interface{}) (int, error) {
- {
- got := reflect.ValueOf(got)
- k0 := got.Kind()
- expect := reflect.ValueOf(expect)
- k1 := expect.Kind()
- if reflect.Float32 <= k0 && k0 <= reflect.Float64 ||
- reflect.Float32 <= k1 && k1 <= reflect.Float64 {
- got, err := floatPromote(got)
- if err != nil {
- return 0, err
- }
- expect, err := floatPromote(expect)
- if err != nil {
- return 0, err
- }
- return floatCompare(got, expect), nil
- } else {
- got, err := bigIntPromote(got)
- if err != nil {
- return 0, err
- }
- expect, err := bigIntPromote(expect)
- if err != nil {
- return 0, err
- }
- return got.Cmp(expect), nil
- }
- }
-
- return 0, errInvalid
-}
-
-// IsErr compares two values (got & expect) and returns nil if the comparison is true, an ErrFail if
-// the comparison is false, or an ErrInvalid if the comparison is invalid. IsErr also
-// takes an optional argument, a comparator, that changes how the comparison is made.
-//
-// Is & IsErr are similar but different:
-//
-// Is(...) // Should only be called within a Terst(...) call
-// IsErr(...) // A standalone comparator, the same as Is, just without the automatic reporting
-//
-func IsErr(arguments ...interface{}) error {
- var got, expect interface{}
- comparator := "=="
- switch len(arguments) {
- case 0, 1:
- return fmt.Errorf("invalid number of arguments to IsErr: %d", len(arguments))
- case 2:
- got, expect = arguments[0], arguments[1]
- default:
- if value, ok := arguments[1].(string); ok {
- comparator = value
- } else {
- return fmt.Errorf("invalid comparator: %v", arguments[1])
- }
- got, expect = arguments[0], arguments[2]
- }
-
- var result int
- var err error
-
- switch comparator {
- case "<", "<=", ">", ">=":
- result, err = compareNumber(got, expect)
- case "=~", "!~":
- result, err = compareMatch(got, expect)
- case "==", "!=":
- result, err = compareOther(got, expect)
- default:
- return fmt.Errorf("invalid comparator: %s", comparator)
- }
-
- if err == errInvalid {
- return ErrInvalid(fmt.Errorf(
- "\nINVALID (%s):\n got: %v (%T)\n expected: %v (%T)",
- comparator,
- got, got,
- expect, expect,
- ))
- } else if err != nil {
- return err
- }
-
- equality, pass := false, false
-
- switch comparator {
- case "==", "=~":
- equality = true
- pass = result == 0
- case "!=", "!~":
- equality = true
- pass = result != 0
- case "<":
- pass = result < 0
- case "<=":
- pass = result <= 0
- case ">":
- pass = result > 0
- case ">=":
- pass = result >= 0
- }
-
- if !pass {
- if equality {
- if comparator[1] == '~' {
- if value, ok := got.([]byte); ok {
- return ErrFail(fmt.Errorf(
- "\nFAIL (%s)\n got: %s %v%s\nexpected: %v%s",
- comparator,
- value, got, typeKindString(got),
- expect, typeKindString(expect),
- ))
- }
- }
- return ErrFail(fmt.Errorf(
- "\nFAIL (%s)\n got: %v%s\nexpected: %v%s",
- comparator,
- got, typeKindString(got),
- expect, typeKindString(expect),
- ))
- }
- return ErrFail(fmt.Errorf(
- "\nFAIL (%s)\n got: %v%s\nexpected: %s %v%s",
- comparator,
- got, typeKindString(got),
- comparator, expect, typeKindString(expect),
- ))
- }
-
- return nil
-}
-
-func typeKindString(value interface{}) string {
- reflectValue := reflect.ValueOf(value)
- kind := reflectValue.Kind().String()
- result := fmt.Sprintf("%T", value)
- if kind == result {
- if kind == "string" {
- return ""
- }
- return fmt.Sprintf(" (%T)", value)
- }
- return fmt.Sprintf(" (%T=%s)", value, kind)
-}
-
-func (scope *_scope) reset() {
- scope.name = ""
- scope.output = scope.output[:]
- scope.start = time.Time{}
- scope.duration = 0
-}
-
-// Terst creates a testing scope, where Is can be called and errors will be reported
-// according to the top-level location of the comparison, and not where the Is call
-// actually takes place. For example:
-//
-// func test(value int) {
-// Is(value, 5) // <--- This failure is reported below.
-// }
-//
-// Terst(t, func(){
-//
-// Is(2, ">", 3) // <--- An error is reported here.
-//
-// test(5) // <--- An error is reported here.
-//
-// })
-//
-func Terst(t *testing.T, arguments ...func()) {
- scope := &_scope{
- t: t,
- }
-
- pc, _, _, ok := runtime.Caller(1) // TODO Associate with the Test... func
- if !ok {
- panic("Here be dragons.")
- }
-
- _, scope.testFunc = findTestFunc()
-
- registerScope(pc, scope)
-
- for _, fn := range arguments {
- func() {
- scope.reset()
- name := scope.testFunc.Name()
- index := strings.LastIndex(scope.testFunc.Name(), ".")
- if index >= 0 {
- name = name[index+1:] + "(Terst)"
- } else {
- name = "(Terst)"
- }
- name = "(Terst)"
- scope.name = name
- scope.start = time.Now()
- defer func() {
- scope.duration = time.Now().Sub(scope.start)
- if err := recover(); err != nil {
- scope.t.Fail()
- scope.report()
- panic(err)
- }
- scope.report()
- }()
- fn()
- }()
- }
-}
-
-// From "testing"
-func (scope *_scope) report() {
- format := "~~~ %s: (Terst)\n%s"
- if scope.t.Failed() {
- fmt.Printf(format, "FAIL", scope.output)
- } else if testing.Verbose() && len(scope.output) > 0 {
- fmt.Printf(format, "PASS", scope.output)
- }
-}
-
-func (scope *_scope) log(call _entry, str string) {
- scope.mu.Lock()
- defer scope.mu.Unlock()
- scope.output = append(scope.output, decorate(call, str)...)
-}
-
-// decorate prefixes the string with the file and line of the call site
-// and inserts the final newline if needed and indentation tabs for formascing.
-func decorate(call _entry, s string) string {
-
- file, line := call.File, call.Line
- if call.PC > 0 {
- // Truncate file name at last file name separator.
- if index := strings.LastIndex(file, "/"); index >= 0 {
- file = file[index+1:]
- } else if index = strings.LastIndex(file, "\\"); index >= 0 {
- file = file[index+1:]
- }
- } else {
- file = "???"
- line = 1
- }
- buf := new(bytes.Buffer)
- // Every line is indented at least one tab.
- buf.WriteByte('\t')
- fmt.Fprintf(buf, "%s:%d: ", file, line)
- lines := strings.Split(s, "\n")
- if l := len(lines); l > 1 && lines[l-1] == "" {
- lines = lines[:l-1]
- }
- for i, line := range lines {
- if i > 0 {
- // Second and subsequent lines are indented an extra tab.
- buf.WriteString("\n\t\t")
- }
- buf.WriteString(line)
- }
- buf.WriteByte('\n')
- return buf.String()
-}
-
-func findScope() (*_scope, _entry) {
- registry.lock.RLock()
- defer registry.lock.RUnlock()
- table := registry.table
- depth := 2 // Starting depth
- call := _entry{}
- for {
- pc, _, _, ok := runtime.Caller(depth)
- if !ok {
- break
- }
- if scope, exists := table[pc]; exists {
- pc, file, line, _ := runtime.Caller(depth - 3) // Terst(...) + func(){}() + fn() => ???()
- call.PC = pc
- call.File = file
- call.Line = line
- return scope, call
- }
- depth++
- }
- return nil, _entry{}
-}
-
-// Call is a reference to a line immediately under a Terst testing scope.
-type Call struct {
- scope *_scope
- entry _entry
-}
-
-// Caller will search the stack, looking for a Terst testing scope. If a scope
-// is found, then Caller returns a Call for logging errors, accessing testing.T, etc.
-// If no scope is found, Caller returns nil.
-func Caller() *Call {
- scope, entry := findScope()
- if scope == nil {
- return nil
- }
- return &Call{
- scope: scope,
- entry: entry,
- }
-}
-
-// TestFunc returns the *runtime.Func entry for the top-level Test...(t testing.T)
-// function.
-func (cl *Call) TestFunc() *runtime.Func {
- return cl.scope.testFunc
-}
-
-// T returns the original testing.T passed to Terst(...)
-func (cl *Call) T() *testing.T {
- return cl.scope.t
-}
-
-// Log is the terst version of `testing.T.Log`
-func (cl *Call) Log(arguments ...interface{}) {
- cl.scope.log(cl.entry, fmt.Sprintln(arguments...))
-}
-
-// Logf is the terst version of `testing.T.Logf`
-func (cl *Call) Logf(format string, arguments ...interface{}) {
- cl.scope.log(cl.entry, fmt.Sprintf(format, arguments...))
-}
-
-// Error is the terst version of `testing.T.Error`
-func (cl *Call) Error(arguments ...interface{}) {
- cl.scope.log(cl.entry, fmt.Sprintln(arguments...))
- cl.scope.t.Fail()
-}
-
-// Errorf is the terst version of `testing.T.Errorf`
-func (cl *Call) Errorf(format string, arguments ...interface{}) {
- cl.scope.log(cl.entry, fmt.Sprintf(format, arguments...))
- cl.scope.t.Fail()
-}
-
-// Skip is the terst version of `testing.T.Skip`
-func (cl *Call) Skip(arguments ...interface{}) {
- cl.scope.log(cl.entry, fmt.Sprintln(arguments...))
- cl.scope.t.SkipNow()
-}
-
-// Skipf is the terst version of `testing.T.Skipf`
-func (cl *Call) Skipf(format string, arguments ...interface{}) {
- cl.scope.log(cl.entry, fmt.Sprintf(format, arguments...))
- cl.scope.t.SkipNow()
-}
-
-type _scope struct {
- t *testing.T
- testFunc *runtime.Func
- name string
- mu sync.RWMutex
- output []byte
- start time.Time
- duration time.Duration
-}
-
-type _entry struct {
- PC uintptr
- File string
- Line int
- Func *runtime.Func
-}
-
-func _findFunc(match string) (_entry, *runtime.Func) {
- depth := 2 // Starting depth
- for {
- pc, file, line, ok := runtime.Caller(depth)
- if !ok {
- break
- }
- fn := runtime.FuncForPC(pc)
- name := fn.Name()
- if index := strings.LastIndex(name, match); index >= 0 {
- // Assume we have an instance of TestXyzzy in a _test file
- return _entry{
- PC: pc,
- File: file,
- Line: line,
- Func: fn,
- }, fn
- }
- depth++
- }
- return _entry{}, nil
-}
-
-func findTestFunc() (_entry, *runtime.Func) {
- return _findFunc(".Test")
-}
-
-func findTerstFunc() (_entry, *runtime.Func) {
- return _findFunc(".Terst")
-}
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/test/Makefile b/Godeps/_workspace/src/github.com/robertkrimen/otto/test/Makefile
deleted file mode 100644
index ac76fdeac..000000000
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/test/Makefile
+++ /dev/null
@@ -1,26 +0,0 @@
-.PHONY: test fetch clean build err report
-
-TESTER := tester
-
-test: $(TESTER)
- for test in test-*.js; do ./$^ -test=true $$test 1>/dev/null || exit 1; done
- @echo PASS
-
-report: $(TESTER)
- ./$^ -report | grep -v "MT READY"
-
-fetch: $(TESTER)
- ./$^ fetch
-
-build:
- go build -a -o $(TESTER)
-
-$(TESTER): tester.go
- $(MAKE) build
-
-clean:
- rm -f test-*.js
- rm -f $(TESTER)
-
-err: $(TESTER)
- for test in test-*.js; do ./$^ $$test; done 2>$@
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/test/tester.go b/Godeps/_workspace/src/github.com/robertkrimen/otto/test/tester.go
deleted file mode 100644
index ea694fd8d..000000000
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/test/tester.go
+++ /dev/null
@@ -1,196 +0,0 @@
-package main
-
-import (
- "encoding/json"
- "flag"
- "fmt"
- "io/ioutil"
- "net/http"
- "os"
- "regexp"
- "strings"
- "sync"
- "text/tabwriter"
-
- "github.com/robertkrimen/otto"
- "github.com/robertkrimen/otto/parser"
-)
-
-var flag_test *bool = flag.Bool("test", false, "")
-var flag_report *bool = flag.Bool("report", false, "")
-
-var match_ReferenceError_not_defined = regexp.MustCompile(`^ReferenceError: \S+ is not defined$`)
-var match_lookahead = regexp.MustCompile(`Invalid regular expression: re2: Invalid \(\?[=!]\) <lookahead>`)
-var match_backreference = regexp.MustCompile(`Invalid regular expression: re2: Invalid \\\d <backreference>`)
-var match_TypeError_undefined = regexp.MustCompile(`^TypeError: Cannot access member '[^']+' of undefined$`)
-
-var target = map[string]string{
- "test-angular-bindonce.js": "fail", // (anonymous): Line 1:944 Unexpected token ( (and 40 more errors)
- "test-jsforce.js": "fail", // (anonymous): Line 9:28329 RuneError (and 5 more errors)
- "test-chaplin.js": "parse", // Error: Chaplin requires Common.js or AMD modules
- "test-dropbox.js.js": "parse", // Error: dropbox.js loaded in an unsupported JavaScript environment.
- "test-epitome.js": "parse", // TypeError: undefined is not a function
- "test-portal.js": "parse", // TypeError
- "test-reactive-coffee.js": "parse", // Dependencies are not met for reactive: _ and $ not found
- "test-scriptaculous.js": "parse", // script.aculo.us requires the Prototype JavaScript framework >= 1.6.0.3
- "test-waypoints.js": "parse", // TypeError: undefined is not a function
- "test-webuploader.js": "parse", // Error: `jQuery` is undefined
- "test-xuijs.js": "parse", // TypeError: undefined is not a function
-}
-
-// http://cdnjs.com/
-// http://api.cdnjs.com/libraries
-
-func fetch(name, location string) error {
- response, err := http.Get(location)
- if err != nil {
- return err
- }
- defer response.Body.Close()
- body, err := ioutil.ReadAll(response.Body)
- if err != nil {
- return err
- }
-
- if !strings.HasSuffix(location, ".js") {
- return nil
- }
-
- filename := "test-" + name + ".js"
- fmt.Println(filename, len(body))
- return ioutil.WriteFile(filename, body, 0644)
-}
-
-func test(filename string) error {
- script, err := ioutil.ReadFile(filename)
- if err != nil {
- return err
- }
-
- if !*flag_report {
- fmt.Fprintln(os.Stdout, filename, len(script))
- }
-
- parse := false
- option := target[filename]
-
- if option != "parse" {
- vm := otto.New()
- _, err = vm.Run(string(script))
- if err != nil {
- value := err.Error()
- switch {
- case match_ReferenceError_not_defined.MatchString(value):
- case match_TypeError_undefined.MatchString(value):
- case match_lookahead.MatchString(value):
- case match_backreference.MatchString(value):
- default:
- return err
- }
- parse = true
- }
- }
-
- if parse {
- _, err = parser.ParseFile(nil, filename, string(script), parser.IgnoreRegExpErrors)
- if err != nil {
- return err
- }
- target[filename] = "parse"
- }
-
- return nil
-}
-
-func main() {
- flag.Parse()
-
- filename := ""
-
- err := func() error {
-
- if flag.Arg(0) == "fetch" {
- response, err := http.Get("http://api.cdnjs.com/libraries")
- if err != nil {
- return err
- }
- defer response.Body.Close()
- body, err := ioutil.ReadAll(response.Body)
- if err != nil {
- return err
- }
-
- var tmp map[string]interface{}
-
- err = json.Unmarshal(body, &tmp)
- if err != nil {
- return err
- }
-
- var wg sync.WaitGroup
-
- for _, value := range tmp["results"].([]interface{}) {
- wg.Add(1)
- library := value.(map[string]interface{})
- go func() {
- defer wg.Done()
- fetch(library["name"].(string), library["latest"].(string))
- }()
- }
-
- wg.Wait()
-
- return nil
- }
-
- if *flag_report {
- files, err := ioutil.ReadDir(".")
- if err != nil {
- return err
- }
- writer := tabwriter.NewWriter(os.Stdout, 0, 8, 0, '\t', 0)
- fmt.Fprintln(writer, "", "\t| Status")
- fmt.Fprintln(writer, "---", "\t| ---")
- for _, file := range files {
- filename := file.Name()
- if !strings.HasPrefix(filename, "test-") {
- continue
- }
- err := test(filename)
- option := target[filename]
- name := strings.TrimPrefix(strings.TrimSuffix(filename, ".js"), "test-")
- if err == nil {
- switch option {
- case "":
- fmt.Fprintln(writer, name, "\t| pass")
- case "parse":
- fmt.Fprintln(writer, name, "\t| pass (parse)")
- case "re2":
- continue
- fmt.Fprintln(writer, name, "\t| unknown (re2)")
- }
- } else {
- fmt.Fprintln(writer, name, "\t| fail")
- }
- }
- writer.Flush()
- return nil
- }
-
- filename = flag.Arg(0)
- return test(filename)
-
- }()
- if err != nil {
- if filename != "" {
- if *flag_test && target[filename] == "fail" {
- goto exit
- }
- fmt.Fprintf(os.Stderr, "%s: %s\n", filename, err.Error())
- } else {
- fmt.Fprintln(os.Stderr, err)
- }
- os.Exit(64)
- }
-exit:
-}
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/type_error.go b/Godeps/_workspace/src/github.com/robertkrimen/otto/type_error.go
deleted file mode 100644
index c469f5fcb..000000000
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/type_error.go
+++ /dev/null
@@ -1,13 +0,0 @@
-package otto
-
-func (rt *_runtime) newErrorObject(name string, message Value) *_object {
- self := rt.newClassObject("Error")
- if message.IsDefined() {
- msg := message.string()
- self.defineProperty("message", toValue_string(msg), 0111, false)
- self.value = newError(rt, name, msg)
- } else {
- self.value = newError(rt, name)
- }
- return self
-}
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/underscore/Makefile b/Godeps/_workspace/src/github.com/robertkrimen/otto/underscore/Makefile
deleted file mode 100644
index fc872917f..000000000
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/underscore/Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
-.PHONY: source
-
-source: source.go
-
-underscore.js:
- curl -kL http://underscorejs.org/underscore.js > $@
-
-source.go: underscore.js
- go-bindata -f underscore -p underscore -u true < $< 2>/dev/null | grep -v '^//' | gofmt > $@
- head -4 $< >> $@
- mv $< ..
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/underscore/README.markdown b/Godeps/_workspace/src/github.com/robertkrimen/otto/underscore/README.markdown
deleted file mode 100644
index bce37b695..000000000
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/underscore/README.markdown
+++ /dev/null
@@ -1,53 +0,0 @@
-# underscore
---
- import "github.com/robertkrimen/otto/underscore"
-
-Package underscore contains the source for the JavaScript utility-belt library.
-
- import (
- _ "github.com/robertkrimen/otto/underscore"
- )
- // Every Otto runtime will now include underscore
-
-http://underscorejs.org
-
-https://github.com/documentcloud/underscore
-
-By importing this package, you'll automatically load underscore every time you
-create a new Otto runtime.
-
-To prevent this behavior, you can do the following:
-
- import (
- "github.com/robertkrimen/otto/underscore"
- )
-
- func init() {
- underscore.Disable()
- }
-
-## Usage
-
-#### func Disable
-
-```go
-func Disable()
-```
-Disable underscore runtime inclusion.
-
-#### func Enable
-
-```go
-func Enable()
-```
-Enable underscore runtime inclusion.
-
-#### func Source
-
-```go
-func Source() string
-```
-Source returns the underscore source.
-
---
-**godocdown** http://github.com/robertkrimen/godocdown
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/underscore/source.go b/Godeps/_workspace/src/github.com/robertkrimen/otto/underscore/source.go
deleted file mode 100644
index 7c5df9714..000000000
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/underscore/source.go
+++ /dev/null
@@ -1,3463 +0,0 @@
-package underscore
-
-func underscore() []byte {
- return []byte{
- 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x55, 0x6e, 0x64, 0x65, 0x72,
- 0x73, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x6a, 0x73, 0x20, 0x31, 0x2e, 0x34,
- 0x2e, 0x34, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x68, 0x74,
- 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x73, 0x63,
- 0x6f, 0x72, 0x65, 0x6a, 0x73, 0x2e, 0x6f, 0x72, 0x67, 0x0a, 0x2f, 0x2f,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x28, 0x63, 0x29, 0x20, 0x32, 0x30, 0x30,
- 0x39, 0x2d, 0x32, 0x30, 0x31, 0x33, 0x20, 0x4a, 0x65, 0x72, 0x65, 0x6d,
- 0x79, 0x20, 0x41, 0x73, 0x68, 0x6b, 0x65, 0x6e, 0x61, 0x73, 0x2c, 0x20,
- 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6c, 0x6f, 0x75,
- 0x64, 0x20, 0x49, 0x6e, 0x63, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x55, 0x6e, 0x64, 0x65, 0x72, 0x73, 0x63, 0x6f, 0x72, 0x65,
- 0x20, 0x6d, 0x61, 0x79, 0x20, 0x62, 0x65, 0x20, 0x66, 0x72, 0x65, 0x65,
- 0x6c, 0x79, 0x20, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
- 0x65, 0x64, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65,
- 0x20, 0x4d, 0x49, 0x54, 0x20, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65,
- 0x2e, 0x0a, 0x0a, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e,
- 0x28, 0x29, 0x20, 0x7b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x42,
- 0x61, 0x73, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x73, 0x65, 0x74, 0x75,
- 0x70, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d,
- 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x0a, 0x20,
- 0x20, 0x2f, 0x2f, 0x20, 0x45, 0x73, 0x74, 0x61, 0x62, 0x6c, 0x69, 0x73,
- 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x6f, 0x6f, 0x74, 0x20, 0x6f,
- 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x20, 0x60, 0x77, 0x69, 0x6e, 0x64,
- 0x6f, 0x77, 0x60, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62,
- 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x60,
- 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x60, 0x20, 0x6f, 0x6e, 0x20, 0x74,
- 0x68, 0x65, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x0a, 0x20,
- 0x20, 0x76, 0x61, 0x72, 0x20, 0x72, 0x6f, 0x6f, 0x74, 0x20, 0x3d, 0x20,
- 0x74, 0x68, 0x69, 0x73, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20,
- 0x53, 0x61, 0x76, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x65,
- 0x76, 0x69, 0x6f, 0x75, 0x73, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20,
- 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x60, 0x5f, 0x60, 0x20, 0x76,
- 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x76,
- 0x61, 0x72, 0x20, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x55,
- 0x6e, 0x64, 0x65, 0x72, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x20, 0x3d, 0x20,
- 0x72, 0x6f, 0x6f, 0x74, 0x2e, 0x5f, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f,
- 0x2f, 0x20, 0x45, 0x73, 0x74, 0x61, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x20,
- 0x74, 0x68, 0x65, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x74,
- 0x68, 0x61, 0x74, 0x20, 0x67, 0x65, 0x74, 0x73, 0x20, 0x72, 0x65, 0x74,
- 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x72, 0x65,
- 0x61, 0x6b, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20,
- 0x6c, 0x6f, 0x6f, 0x70, 0x20, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x2e, 0x0a, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x62, 0x72,
- 0x65, 0x61, 0x6b, 0x65, 0x72, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x3b, 0x0a,
- 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x53, 0x61, 0x76, 0x65, 0x20, 0x62,
- 0x79, 0x74, 0x65, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20,
- 0x6d, 0x69, 0x6e, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x28, 0x62, 0x75,
- 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x67, 0x7a, 0x69, 0x70, 0x70, 0x65,
- 0x64, 0x29, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3a, 0x0a,
- 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x41, 0x72, 0x72, 0x61, 0x79, 0x50,
- 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x3d, 0x20, 0x41, 0x72, 0x72, 0x61, 0x79,
- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x74, 0x79, 0x70, 0x65, 0x2c, 0x20,
- 0x4f, 0x62, 0x6a, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x3d, 0x20, 0x4f,
- 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x74,
- 0x79, 0x70, 0x65, 0x2c, 0x20, 0x46, 0x75, 0x6e, 0x63, 0x50, 0x72, 0x6f,
- 0x74, 0x6f, 0x20, 0x3d, 0x20, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
- 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x74, 0x79, 0x70, 0x65, 0x3b,
- 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x43, 0x72, 0x65, 0x61, 0x74,
- 0x65, 0x20, 0x71, 0x75, 0x69, 0x63, 0x6b, 0x20, 0x72, 0x65, 0x66, 0x65,
- 0x72, 0x65, 0x6e, 0x63, 0x65, 0x20, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62,
- 0x6c, 0x65, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x73, 0x70, 0x65, 0x65,
- 0x64, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, 0x6f, 0x20,
- 0x63, 0x6f, 0x72, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x74, 0x79,
- 0x70, 0x65, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x70,
- 0x75, 0x73, 0x68, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x3d, 0x20, 0x41, 0x72, 0x72, 0x61, 0x79, 0x50,
- 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x75, 0x73, 0x68, 0x2c, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3d, 0x20,
- 0x41, 0x72, 0x72, 0x61, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73,
- 0x6c, 0x69, 0x63, 0x65, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x63, 0x6f, 0x6e, 0x63, 0x61, 0x74, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x3d, 0x20, 0x41, 0x72, 0x72, 0x61, 0x79,
- 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6e, 0x63, 0x61, 0x74,
- 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x74, 0x6f, 0x53, 0x74,
- 0x72, 0x69, 0x6e, 0x67, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x3d, 0x20, 0x4f, 0x62, 0x6a, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e,
- 0x74, 0x6f, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2c, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x68, 0x61, 0x73, 0x4f, 0x77, 0x6e, 0x50, 0x72,
- 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x20, 0x20, 0x3d, 0x20, 0x4f,
- 0x62, 0x6a, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x68, 0x61, 0x73, 0x4f,
- 0x77, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3b, 0x0a,
- 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x41, 0x6c, 0x6c, 0x20, 0x2a, 0x2a,
- 0x45, 0x43, 0x4d, 0x41, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x20, 0x35,
- 0x2a, 0x2a, 0x20, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x20, 0x66, 0x75,
- 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6d, 0x70, 0x6c, 0x65,
- 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x74,
- 0x68, 0x61, 0x74, 0x20, 0x77, 0x65, 0x20, 0x68, 0x6f, 0x70, 0x65, 0x20,
- 0x74, 0x6f, 0x20, 0x75, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20,
- 0x61, 0x72, 0x65, 0x20, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x64,
- 0x20, 0x68, 0x65, 0x72, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x76, 0x61, 0x72,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x46,
- 0x6f, 0x72, 0x45, 0x61, 0x63, 0x68, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x3d, 0x20, 0x41, 0x72, 0x72, 0x61, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f,
- 0x2e, 0x66, 0x6f, 0x72, 0x45, 0x61, 0x63, 0x68, 0x2c, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x4d, 0x61, 0x70, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3d, 0x20, 0x41,
- 0x72, 0x72, 0x61, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x6d, 0x61,
- 0x70, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6e, 0x61, 0x74, 0x69, 0x76,
- 0x65, 0x52, 0x65, 0x64, 0x75, 0x63, 0x65, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x3d, 0x20, 0x41, 0x72, 0x72, 0x61, 0x79, 0x50, 0x72, 0x6f,
- 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x2c, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x64,
- 0x75, 0x63, 0x65, 0x52, 0x69, 0x67, 0x68, 0x74, 0x20, 0x20, 0x3d, 0x20,
- 0x41, 0x72, 0x72, 0x61, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72,
- 0x65, 0x64, 0x75, 0x63, 0x65, 0x52, 0x69, 0x67, 0x68, 0x74, 0x2c, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x46, 0x69,
- 0x6c, 0x74, 0x65, 0x72, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3d,
- 0x20, 0x41, 0x72, 0x72, 0x61, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e,
- 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x45, 0x76, 0x65, 0x72, 0x79, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3d, 0x20, 0x41, 0x72, 0x72,
- 0x61, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x65, 0x76, 0x65, 0x72,
- 0x79, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6e, 0x61, 0x74, 0x69, 0x76,
- 0x65, 0x53, 0x6f, 0x6d, 0x65, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x3d, 0x20, 0x41, 0x72, 0x72, 0x61, 0x79, 0x50, 0x72, 0x6f,
- 0x74, 0x6f, 0x2e, 0x73, 0x6f, 0x6d, 0x65, 0x2c, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78,
- 0x4f, 0x66, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3d, 0x20, 0x41, 0x72,
- 0x72, 0x61, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x69, 0x6e, 0x64,
- 0x65, 0x78, 0x4f, 0x66, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6e, 0x61,
- 0x74, 0x69, 0x76, 0x65, 0x4c, 0x61, 0x73, 0x74, 0x49, 0x6e, 0x64, 0x65,
- 0x78, 0x4f, 0x66, 0x20, 0x20, 0x3d, 0x20, 0x41, 0x72, 0x72, 0x61, 0x79,
- 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x6c, 0x61, 0x73, 0x74, 0x49, 0x6e,
- 0x64, 0x65, 0x78, 0x4f, 0x66, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6e,
- 0x61, 0x74, 0x69, 0x76, 0x65, 0x49, 0x73, 0x41, 0x72, 0x72, 0x61, 0x79,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3d, 0x20, 0x41, 0x72, 0x72, 0x61,
- 0x79, 0x2e, 0x69, 0x73, 0x41, 0x72, 0x72, 0x61, 0x79, 0x2c, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x4b, 0x65, 0x79,
- 0x73, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3d, 0x20,
- 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x6b, 0x65, 0x79, 0x73, 0x2c,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x42,
- 0x69, 0x6e, 0x64, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x3d, 0x20, 0x46, 0x75, 0x6e, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e,
- 0x62, 0x69, 0x6e, 0x64, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20,
- 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x61, 0x20, 0x73, 0x61, 0x66,
- 0x65, 0x20, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x20,
- 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x55, 0x6e, 0x64, 0x65, 0x72,
- 0x73, 0x63, 0x6f, 0x72, 0x65, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74,
- 0x20, 0x66, 0x6f, 0x72, 0x20, 0x75, 0x73, 0x65, 0x20, 0x62, 0x65, 0x6c,
- 0x6f, 0x77, 0x2e, 0x0a, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x5f, 0x20,
- 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6f,
- 0x62, 0x6a, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66,
- 0x20, 0x28, 0x6f, 0x62, 0x6a, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e,
- 0x63, 0x65, 0x6f, 0x66, 0x20, 0x5f, 0x29, 0x20, 0x72, 0x65, 0x74, 0x75,
- 0x72, 0x6e, 0x20, 0x6f, 0x62, 0x6a, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x69, 0x66, 0x20, 0x28, 0x21, 0x28, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69,
- 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x6f, 0x66, 0x20, 0x5f, 0x29,
- 0x29, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x65, 0x77,
- 0x20, 0x5f, 0x28, 0x6f, 0x62, 0x6a, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x5f, 0x77, 0x72, 0x61, 0x70, 0x70,
- 0x65, 0x64, 0x20, 0x3d, 0x20, 0x6f, 0x62, 0x6a, 0x3b, 0x0a, 0x20, 0x20,
- 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x45, 0x78, 0x70,
- 0x6f, 0x72, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x55, 0x6e, 0x64, 0x65,
- 0x72, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63,
- 0x74, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x2a, 0x2a, 0x4e, 0x6f, 0x64, 0x65,
- 0x2e, 0x6a, 0x73, 0x2a, 0x2a, 0x2c, 0x20, 0x77, 0x69, 0x74, 0x68, 0x0a,
- 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x62, 0x61, 0x63, 0x6b, 0x77, 0x61, 0x72,
- 0x64, 0x73, 0x2d, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x69,
- 0x6c, 0x69, 0x74, 0x79, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65,
- 0x20, 0x6f, 0x6c, 0x64, 0x20, 0x60, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72,
- 0x65, 0x28, 0x29, 0x60, 0x20, 0x41, 0x50, 0x49, 0x2e, 0x20, 0x49, 0x66,
- 0x20, 0x77, 0x65, 0x27, 0x72, 0x65, 0x20, 0x69, 0x6e, 0x0a, 0x20, 0x20,
- 0x2f, 0x2f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x72, 0x6f, 0x77, 0x73,
- 0x65, 0x72, 0x2c, 0x20, 0x61, 0x64, 0x64, 0x20, 0x60, 0x5f, 0x60, 0x20,
- 0x61, 0x73, 0x20, 0x61, 0x20, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x20,
- 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x76, 0x69, 0x61, 0x20, 0x61,
- 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x64, 0x65, 0x6e,
- 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x2c, 0x0a, 0x20, 0x20, 0x2f, 0x2f,
- 0x20, 0x66, 0x6f, 0x72, 0x20, 0x43, 0x6c, 0x6f, 0x73, 0x75, 0x72, 0x65,
- 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x22, 0x61,
- 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x22, 0x20, 0x6d, 0x6f, 0x64,
- 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x74, 0x79, 0x70,
- 0x65, 0x6f, 0x66, 0x20, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x20,
- 0x21, 0x3d, 0x3d, 0x20, 0x27, 0x75, 0x6e, 0x64, 0x65, 0x66, 0x69, 0x6e,
- 0x65, 0x64, 0x27, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69,
- 0x66, 0x20, 0x28, 0x74, 0x79, 0x70, 0x65, 0x6f, 0x66, 0x20, 0x6d, 0x6f,
- 0x64, 0x75, 0x6c, 0x65, 0x20, 0x21, 0x3d, 0x3d, 0x20, 0x27, 0x75, 0x6e,
- 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x27, 0x20, 0x26, 0x26, 0x20,
- 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x65, 0x78, 0x70, 0x6f, 0x72,
- 0x74, 0x73, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x20, 0x3d, 0x20, 0x6d, 0x6f,
- 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x73,
- 0x20, 0x3d, 0x20, 0x5f, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x2e,
- 0x5f, 0x20, 0x3d, 0x20, 0x5f, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x20, 0x65,
- 0x6c, 0x73, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x6f,
- 0x6f, 0x74, 0x2e, 0x5f, 0x20, 0x3d, 0x20, 0x5f, 0x3b, 0x0a, 0x20, 0x20,
- 0x7d, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x43, 0x75, 0x72, 0x72,
- 0x65, 0x6e, 0x74, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2e,
- 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e,
- 0x20, 0x3d, 0x20, 0x27, 0x31, 0x2e, 0x34, 0x2e, 0x34, 0x27, 0x3b, 0x0a,
- 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63,
- 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
- 0x6e, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x2d, 0x2d, 0x2d, 0x2d,
- 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d,
- 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54,
- 0x68, 0x65, 0x20, 0x63, 0x6f, 0x72, 0x6e, 0x65, 0x72, 0x73, 0x74, 0x6f,
- 0x6e, 0x65, 0x2c, 0x20, 0x61, 0x6e, 0x20, 0x60, 0x65, 0x61, 0x63, 0x68,
- 0x60, 0x20, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x61, 0x6b, 0x61, 0x20, 0x60, 0x66,
- 0x6f, 0x72, 0x45, 0x61, 0x63, 0x68, 0x60, 0x2e, 0x0a, 0x20, 0x20, 0x2f,
- 0x2f, 0x20, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x20, 0x6f, 0x62,
- 0x6a, 0x65, 0x63, 0x74, 0x73, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74,
- 0x68, 0x65, 0x20, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x2d, 0x69, 0x6e, 0x20,
- 0x60, 0x66, 0x6f, 0x72, 0x45, 0x61, 0x63, 0x68, 0x60, 0x2c, 0x20, 0x61,
- 0x72, 0x72, 0x61, 0x79, 0x73, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x72,
- 0x61, 0x77, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2e, 0x0a,
- 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74,
- 0x65, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x2a, 0x2a, 0x45, 0x43, 0x4d, 0x41,
- 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x20, 0x35, 0x2a, 0x2a, 0x27, 0x73,
- 0x20, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x20, 0x60, 0x66, 0x6f, 0x72,
- 0x45, 0x61, 0x63, 0x68, 0x60, 0x20, 0x69, 0x66, 0x20, 0x61, 0x76, 0x61,
- 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x76, 0x61,
- 0x72, 0x20, 0x65, 0x61, 0x63, 0x68, 0x20, 0x3d, 0x20, 0x5f, 0x2e, 0x65,
- 0x61, 0x63, 0x68, 0x20, 0x3d, 0x20, 0x5f, 0x2e, 0x66, 0x6f, 0x72, 0x45,
- 0x61, 0x63, 0x68, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69,
- 0x6f, 0x6e, 0x28, 0x6f, 0x62, 0x6a, 0x2c, 0x20, 0x69, 0x74, 0x65, 0x72,
- 0x61, 0x74, 0x6f, 0x72, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78,
- 0x74, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20,
- 0x28, 0x6f, 0x62, 0x6a, 0x20, 0x3d, 0x3d, 0x20, 0x6e, 0x75, 0x6c, 0x6c,
- 0x29, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x3b, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65,
- 0x46, 0x6f, 0x72, 0x45, 0x61, 0x63, 0x68, 0x20, 0x26, 0x26, 0x20, 0x6f,
- 0x62, 0x6a, 0x2e, 0x66, 0x6f, 0x72, 0x45, 0x61, 0x63, 0x68, 0x20, 0x3d,
- 0x3d, 0x3d, 0x20, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x46, 0x6f, 0x72,
- 0x45, 0x61, 0x63, 0x68, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x6f, 0x62, 0x6a, 0x2e, 0x66, 0x6f, 0x72, 0x45, 0x61, 0x63,
- 0x68, 0x28, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2c, 0x20,
- 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x29, 0x3b, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x7d, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x69, 0x66, 0x20,
- 0x28, 0x6f, 0x62, 0x6a, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20,
- 0x3d, 0x3d, 0x3d, 0x20, 0x2b, 0x6f, 0x62, 0x6a, 0x2e, 0x6c, 0x65, 0x6e,
- 0x67, 0x74, 0x68, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x66, 0x6f, 0x72, 0x20, 0x28, 0x76, 0x61, 0x72, 0x20, 0x69, 0x20,
- 0x3d, 0x20, 0x30, 0x2c, 0x20, 0x6c, 0x20, 0x3d, 0x20, 0x6f, 0x62, 0x6a,
- 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3b, 0x20, 0x69, 0x20, 0x3c,
- 0x20, 0x6c, 0x3b, 0x20, 0x69, 0x2b, 0x2b, 0x29, 0x20, 0x7b, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x69,
- 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x63, 0x61, 0x6c, 0x6c,
- 0x28, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2c, 0x20, 0x6f, 0x62,
- 0x6a, 0x5b, 0x69, 0x5d, 0x2c, 0x20, 0x69, 0x2c, 0x20, 0x6f, 0x62, 0x6a,
- 0x29, 0x20, 0x3d, 0x3d, 0x3d, 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x65,
- 0x72, 0x29, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x3b, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d,
- 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x28, 0x76, 0x61, 0x72, 0x20, 0x6b,
- 0x65, 0x79, 0x20, 0x69, 0x6e, 0x20, 0x6f, 0x62, 0x6a, 0x29, 0x20, 0x7b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20,
- 0x28, 0x5f, 0x2e, 0x68, 0x61, 0x73, 0x28, 0x6f, 0x62, 0x6a, 0x2c, 0x20,
- 0x6b, 0x65, 0x79, 0x29, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x69, 0x74,
- 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x28,
- 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2c, 0x20, 0x6f, 0x62, 0x6a,
- 0x5b, 0x6b, 0x65, 0x79, 0x5d, 0x2c, 0x20, 0x6b, 0x65, 0x79, 0x2c, 0x20,
- 0x6f, 0x62, 0x6a, 0x29, 0x20, 0x3d, 0x3d, 0x3d, 0x20, 0x62, 0x72, 0x65,
- 0x61, 0x6b, 0x65, 0x72, 0x29, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e,
- 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x7d, 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f,
- 0x20, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20,
- 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x61,
- 0x70, 0x70, 0x6c, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20,
- 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x20, 0x74, 0x6f, 0x20,
- 0x65, 0x61, 0x63, 0x68, 0x20, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74,
- 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x44, 0x65, 0x6c, 0x65, 0x67,
- 0x61, 0x74, 0x65, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x2a, 0x2a, 0x45, 0x43,
- 0x4d, 0x41, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x20, 0x35, 0x2a, 0x2a,
- 0x27, 0x73, 0x20, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x20, 0x60, 0x6d,
- 0x61, 0x70, 0x60, 0x20, 0x69, 0x66, 0x20, 0x61, 0x76, 0x61, 0x69, 0x6c,
- 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x6d, 0x61,
- 0x70, 0x20, 0x3d, 0x20, 0x5f, 0x2e, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63,
- 0x74, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e,
- 0x28, 0x6f, 0x62, 0x6a, 0x2c, 0x20, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74,
- 0x6f, 0x72, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x29,
- 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x72,
- 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x20, 0x3d, 0x20, 0x5b, 0x5d, 0x3b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x6f, 0x62, 0x6a,
- 0x20, 0x3d, 0x3d, 0x20, 0x6e, 0x75, 0x6c, 0x6c, 0x29, 0x20, 0x72, 0x65,
- 0x74, 0x75, 0x72, 0x6e, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73,
- 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x6e, 0x61,
- 0x74, 0x69, 0x76, 0x65, 0x4d, 0x61, 0x70, 0x20, 0x26, 0x26, 0x20, 0x6f,
- 0x62, 0x6a, 0x2e, 0x6d, 0x61, 0x70, 0x20, 0x3d, 0x3d, 0x3d, 0x20, 0x6e,
- 0x61, 0x74, 0x69, 0x76, 0x65, 0x4d, 0x61, 0x70, 0x29, 0x20, 0x72, 0x65,
- 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6f, 0x62, 0x6a, 0x2e, 0x6d, 0x61, 0x70,
- 0x28, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2c, 0x20, 0x63,
- 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x65, 0x61, 0x63, 0x68, 0x28, 0x6f, 0x62, 0x6a, 0x2c, 0x20, 0x66,
- 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x76, 0x61, 0x6c, 0x75,
- 0x65, 0x2c, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2c, 0x20, 0x6c, 0x69,
- 0x73, 0x74, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x5b, 0x72, 0x65, 0x73, 0x75,
- 0x6c, 0x74, 0x73, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x5d, 0x20,
- 0x3d, 0x20, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x63,
- 0x61, 0x6c, 0x6c, 0x28, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2c,
- 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2c, 0x20, 0x69, 0x6e, 0x64, 0x65,
- 0x78, 0x2c, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x29, 0x3b, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x7d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65,
- 0x74, 0x75, 0x72, 0x6e, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73,
- 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x76, 0x61,
- 0x72, 0x20, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x45, 0x72, 0x72, 0x6f,
- 0x72, 0x20, 0x3d, 0x20, 0x27, 0x52, 0x65, 0x64, 0x75, 0x63, 0x65, 0x20,
- 0x6f, 0x66, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x20, 0x61, 0x72, 0x72,
- 0x61, 0x79, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x6e, 0x6f, 0x20, 0x69,
- 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65,
- 0x27, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x2a, 0x2a, 0x52,
- 0x65, 0x64, 0x75, 0x63, 0x65, 0x2a, 0x2a, 0x20, 0x62, 0x75, 0x69, 0x6c,
- 0x64, 0x73, 0x20, 0x75, 0x70, 0x20, 0x61, 0x20, 0x73, 0x69, 0x6e, 0x67,
- 0x6c, 0x65, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x20, 0x66, 0x72,
- 0x6f, 0x6d, 0x20, 0x61, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66,
- 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2c, 0x20, 0x61, 0x6b, 0x61,
- 0x20, 0x60, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x60, 0x2c, 0x0a, 0x20,
- 0x20, 0x2f, 0x2f, 0x20, 0x6f, 0x72, 0x20, 0x60, 0x66, 0x6f, 0x6c, 0x64,
- 0x6c, 0x60, 0x2e, 0x20, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65,
- 0x73, 0x20, 0x74, 0x6f, 0x20, 0x2a, 0x2a, 0x45, 0x43, 0x4d, 0x41, 0x53,
- 0x63, 0x72, 0x69, 0x70, 0x74, 0x20, 0x35, 0x2a, 0x2a, 0x27, 0x73, 0x20,
- 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x20, 0x60, 0x72, 0x65, 0x64, 0x75,
- 0x63, 0x65, 0x60, 0x20, 0x69, 0x66, 0x20, 0x61, 0x76, 0x61, 0x69, 0x6c,
- 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x72, 0x65,
- 0x64, 0x75, 0x63, 0x65, 0x20, 0x3d, 0x20, 0x5f, 0x2e, 0x66, 0x6f, 0x6c,
- 0x64, 0x6c, 0x20, 0x3d, 0x20, 0x5f, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63,
- 0x74, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e,
- 0x28, 0x6f, 0x62, 0x6a, 0x2c, 0x20, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74,
- 0x6f, 0x72, 0x2c, 0x20, 0x6d, 0x65, 0x6d, 0x6f, 0x2c, 0x20, 0x63, 0x6f,
- 0x6e, 0x74, 0x65, 0x78, 0x74, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x76, 0x61, 0x72, 0x20, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c,
- 0x20, 0x3d, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73,
- 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x3e, 0x20, 0x32, 0x3b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x6f, 0x62, 0x6a,
- 0x20, 0x3d, 0x3d, 0x20, 0x6e, 0x75, 0x6c, 0x6c, 0x29, 0x20, 0x6f, 0x62,
- 0x6a, 0x20, 0x3d, 0x20, 0x5b, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x69, 0x66, 0x20, 0x28, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65,
- 0x64, 0x75, 0x63, 0x65, 0x20, 0x26, 0x26, 0x20, 0x6f, 0x62, 0x6a, 0x2e,
- 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x20, 0x3d, 0x3d, 0x3d, 0x20, 0x6e,
- 0x61, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x64, 0x75, 0x63, 0x65, 0x29,
- 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20,
- 0x28, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x29, 0x20, 0x69, 0x74,
- 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x5f, 0x2e, 0x62,
- 0x69, 0x6e, 0x64, 0x28, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72,
- 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x29, 0x3b, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e,
- 0x20, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x20, 0x3f, 0x20, 0x6f,
- 0x62, 0x6a, 0x2e, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x28, 0x69, 0x74,
- 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2c, 0x20, 0x6d, 0x65, 0x6d, 0x6f,
- 0x29, 0x20, 0x3a, 0x20, 0x6f, 0x62, 0x6a, 0x2e, 0x72, 0x65, 0x64, 0x75,
- 0x63, 0x65, 0x28, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x29,
- 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x65, 0x61, 0x63, 0x68, 0x28, 0x6f, 0x62, 0x6a, 0x2c, 0x20, 0x66, 0x75,
- 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x76, 0x61, 0x6c, 0x75, 0x65,
- 0x2c, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2c, 0x20, 0x6c, 0x69, 0x73,
- 0x74, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69,
- 0x66, 0x20, 0x28, 0x21, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x29,
- 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d,
- 0x65, 0x6d, 0x6f, 0x20, 0x3d, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x6e, 0x69,
- 0x74, 0x69, 0x61, 0x6c, 0x20, 0x3d, 0x20, 0x74, 0x72, 0x75, 0x65, 0x3b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x20, 0x65, 0x6c, 0x73,
- 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x6d, 0x65, 0x6d, 0x6f, 0x20, 0x3d, 0x20, 0x69, 0x74, 0x65, 0x72, 0x61,
- 0x74, 0x6f, 0x72, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x63, 0x6f, 0x6e,
- 0x74, 0x65, 0x78, 0x74, 0x2c, 0x20, 0x6d, 0x65, 0x6d, 0x6f, 0x2c, 0x20,
- 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2c, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x78,
- 0x2c, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x29, 0x3b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x21, 0x69, 0x6e,
- 0x69, 0x74, 0x69, 0x61, 0x6c, 0x29, 0x20, 0x74, 0x68, 0x72, 0x6f, 0x77,
- 0x20, 0x6e, 0x65, 0x77, 0x20, 0x54, 0x79, 0x70, 0x65, 0x45, 0x72, 0x72,
- 0x6f, 0x72, 0x28, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x45, 0x72, 0x72,
- 0x6f, 0x72, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74,
- 0x75, 0x72, 0x6e, 0x20, 0x6d, 0x65, 0x6d, 0x6f, 0x3b, 0x0a, 0x20, 0x20,
- 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65,
- 0x20, 0x72, 0x69, 0x67, 0x68, 0x74, 0x2d, 0x61, 0x73, 0x73, 0x6f, 0x63,
- 0x69, 0x61, 0x74, 0x69, 0x76, 0x65, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69,
- 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65,
- 0x2c, 0x20, 0x61, 0x6c, 0x73, 0x6f, 0x20, 0x6b, 0x6e, 0x6f, 0x77, 0x6e,
- 0x20, 0x61, 0x73, 0x20, 0x60, 0x66, 0x6f, 0x6c, 0x64, 0x72, 0x60, 0x2e,
- 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61,
- 0x74, 0x65, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x2a, 0x2a, 0x45, 0x43, 0x4d,
- 0x41, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x20, 0x35, 0x2a, 0x2a, 0x27,
- 0x73, 0x20, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x20, 0x60, 0x72, 0x65,
- 0x64, 0x75, 0x63, 0x65, 0x52, 0x69, 0x67, 0x68, 0x74, 0x60, 0x20, 0x69,
- 0x66, 0x20, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x2e,
- 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x52,
- 0x69, 0x67, 0x68, 0x74, 0x20, 0x3d, 0x20, 0x5f, 0x2e, 0x66, 0x6f, 0x6c,
- 0x64, 0x72, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
- 0x6e, 0x28, 0x6f, 0x62, 0x6a, 0x2c, 0x20, 0x69, 0x74, 0x65, 0x72, 0x61,
- 0x74, 0x6f, 0x72, 0x2c, 0x20, 0x6d, 0x65, 0x6d, 0x6f, 0x2c, 0x20, 0x63,
- 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61,
- 0x6c, 0x20, 0x3d, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74,
- 0x73, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x3e, 0x20, 0x32,
- 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x6f, 0x62,
- 0x6a, 0x20, 0x3d, 0x3d, 0x20, 0x6e, 0x75, 0x6c, 0x6c, 0x29, 0x20, 0x6f,
- 0x62, 0x6a, 0x20, 0x3d, 0x20, 0x5b, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x69, 0x66, 0x20, 0x28, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x52,
- 0x65, 0x64, 0x75, 0x63, 0x65, 0x52, 0x69, 0x67, 0x68, 0x74, 0x20, 0x26,
- 0x26, 0x20, 0x6f, 0x62, 0x6a, 0x2e, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65,
- 0x52, 0x69, 0x67, 0x68, 0x74, 0x20, 0x3d, 0x3d, 0x3d, 0x20, 0x6e, 0x61,
- 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x64, 0x75, 0x63, 0x65, 0x52, 0x69,
- 0x67, 0x68, 0x74, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x69, 0x66, 0x20, 0x28, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74,
- 0x29, 0x20, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x20, 0x3d,
- 0x20, 0x5f, 0x2e, 0x62, 0x69, 0x6e, 0x64, 0x28, 0x69, 0x74, 0x65, 0x72,
- 0x61, 0x74, 0x6f, 0x72, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78,
- 0x74, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65,
- 0x74, 0x75, 0x72, 0x6e, 0x20, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c,
- 0x20, 0x3f, 0x20, 0x6f, 0x62, 0x6a, 0x2e, 0x72, 0x65, 0x64, 0x75, 0x63,
- 0x65, 0x52, 0x69, 0x67, 0x68, 0x74, 0x28, 0x69, 0x74, 0x65, 0x72, 0x61,
- 0x74, 0x6f, 0x72, 0x2c, 0x20, 0x6d, 0x65, 0x6d, 0x6f, 0x29, 0x20, 0x3a,
- 0x20, 0x6f, 0x62, 0x6a, 0x2e, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x52,
- 0x69, 0x67, 0x68, 0x74, 0x28, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f,
- 0x72, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68,
- 0x20, 0x3d, 0x20, 0x6f, 0x62, 0x6a, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74,
- 0x68, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x6c,
- 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x21, 0x3d, 0x3d, 0x20, 0x2b, 0x6c,
- 0x65, 0x6e, 0x67, 0x74, 0x68, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x6b, 0x65, 0x79, 0x73, 0x20,
- 0x3d, 0x20, 0x5f, 0x2e, 0x6b, 0x65, 0x79, 0x73, 0x28, 0x6f, 0x62, 0x6a,
- 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x65, 0x6e,
- 0x67, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x6b, 0x65, 0x79, 0x73, 0x2e, 0x6c,
- 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x61, 0x63, 0x68, 0x28, 0x6f, 0x62,
- 0x6a, 0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28,
- 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2c, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x78,
- 0x2c, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x3d, 0x20,
- 0x6b, 0x65, 0x79, 0x73, 0x20, 0x3f, 0x20, 0x6b, 0x65, 0x79, 0x73, 0x5b,
- 0x2d, 0x2d, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x5d, 0x20, 0x3a, 0x20,
- 0x2d, 0x2d, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3b, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x21, 0x69, 0x6e, 0x69,
- 0x74, 0x69, 0x61, 0x6c, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x6d, 0x6f, 0x20, 0x3d, 0x20, 0x6f,
- 0x62, 0x6a, 0x5b, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5d, 0x3b, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x6e, 0x69, 0x74, 0x69,
- 0x61, 0x6c, 0x20, 0x3d, 0x20, 0x74, 0x72, 0x75, 0x65, 0x3b, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20,
- 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65,
- 0x6d, 0x6f, 0x20, 0x3d, 0x20, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f,
- 0x72, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x63, 0x6f, 0x6e, 0x74, 0x65,
- 0x78, 0x74, 0x2c, 0x20, 0x6d, 0x65, 0x6d, 0x6f, 0x2c, 0x20, 0x6f, 0x62,
- 0x6a, 0x5b, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5d, 0x2c, 0x20, 0x69, 0x6e,
- 0x64, 0x65, 0x78, 0x2c, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x29, 0x3b, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x7d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28,
- 0x21, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x29, 0x20, 0x74, 0x68,
- 0x72, 0x6f, 0x77, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x54, 0x79, 0x70, 0x65,
- 0x45, 0x72, 0x72, 0x6f, 0x72, 0x28, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65,
- 0x45, 0x72, 0x72, 0x6f, 0x72, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6d, 0x65, 0x6d, 0x6f, 0x3b,
- 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20,
- 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66,
- 0x69, 0x72, 0x73, 0x74, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x77,
- 0x68, 0x69, 0x63, 0x68, 0x20, 0x70, 0x61, 0x73, 0x73, 0x65, 0x73, 0x20,
- 0x61, 0x20, 0x74, 0x72, 0x75, 0x74, 0x68, 0x20, 0x74, 0x65, 0x73, 0x74,
- 0x2e, 0x20, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x64, 0x20, 0x61, 0x73,
- 0x20, 0x60, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x60, 0x2e, 0x0a, 0x20,
- 0x20, 0x5f, 0x2e, 0x66, 0x69, 0x6e, 0x64, 0x20, 0x3d, 0x20, 0x5f, 0x2e,
- 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e,
- 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6f, 0x62, 0x6a, 0x2c, 0x20, 0x69,
- 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2c, 0x20, 0x63, 0x6f, 0x6e,
- 0x74, 0x65, 0x78, 0x74, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x76, 0x61, 0x72, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x3b, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x61, 0x6e, 0x79, 0x28, 0x6f, 0x62, 0x6a, 0x2c,
- 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x76, 0x61,
- 0x6c, 0x75, 0x65, 0x2c, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2c, 0x20,
- 0x6c, 0x69, 0x73, 0x74, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74,
- 0x6f, 0x72, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x63, 0x6f, 0x6e, 0x74,
- 0x65, 0x78, 0x74, 0x2c, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2c, 0x20,
- 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2c, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x29,
- 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x76, 0x61, 0x6c,
- 0x75, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x72, 0x75, 0x65, 0x3b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x7d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74,
- 0x75, 0x72, 0x6e, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x3b, 0x0a,
- 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x52,
- 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x74, 0x68,
- 0x65, 0x20, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x74,
- 0x68, 0x61, 0x74, 0x20, 0x70, 0x61, 0x73, 0x73, 0x20, 0x61, 0x20, 0x74,
- 0x72, 0x75, 0x74, 0x68, 0x20, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x0a, 0x20,
- 0x20, 0x2f, 0x2f, 0x20, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65,
- 0x73, 0x20, 0x74, 0x6f, 0x20, 0x2a, 0x2a, 0x45, 0x43, 0x4d, 0x41, 0x53,
- 0x63, 0x72, 0x69, 0x70, 0x74, 0x20, 0x35, 0x2a, 0x2a, 0x27, 0x73, 0x20,
- 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x20, 0x60, 0x66, 0x69, 0x6c, 0x74,
- 0x65, 0x72, 0x60, 0x20, 0x69, 0x66, 0x20, 0x61, 0x76, 0x61, 0x69, 0x6c,
- 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x41,
- 0x6c, 0x69, 0x61, 0x73, 0x65, 0x64, 0x20, 0x61, 0x73, 0x20, 0x60, 0x73,
- 0x65, 0x6c, 0x65, 0x63, 0x74, 0x60, 0x2e, 0x0a, 0x20, 0x20, 0x5f, 0x2e,
- 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x20, 0x3d, 0x20, 0x5f, 0x2e, 0x73,
- 0x65, 0x6c, 0x65, 0x63, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63,
- 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6f, 0x62, 0x6a, 0x2c, 0x20, 0x69, 0x74,
- 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x74,
- 0x65, 0x78, 0x74, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76,
- 0x61, 0x72, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x20, 0x3d,
- 0x20, 0x5b, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20,
- 0x28, 0x6f, 0x62, 0x6a, 0x20, 0x3d, 0x3d, 0x20, 0x6e, 0x75, 0x6c, 0x6c,
- 0x29, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x72, 0x65, 0x73,
- 0x75, 0x6c, 0x74, 0x73, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66,
- 0x20, 0x28, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x46, 0x69, 0x6c, 0x74,
- 0x65, 0x72, 0x20, 0x26, 0x26, 0x20, 0x6f, 0x62, 0x6a, 0x2e, 0x66, 0x69,
- 0x6c, 0x74, 0x65, 0x72, 0x20, 0x3d, 0x3d, 0x3d, 0x20, 0x6e, 0x61, 0x74,
- 0x69, 0x76, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x29, 0x20, 0x72,
- 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6f, 0x62, 0x6a, 0x2e, 0x66, 0x69,
- 0x6c, 0x74, 0x65, 0x72, 0x28, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f,
- 0x72, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x29, 0x3b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x61, 0x63, 0x68, 0x28, 0x6f, 0x62,
- 0x6a, 0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28,
- 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2c, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x78,
- 0x2c, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x69, 0x74, 0x65, 0x72,
- 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x63, 0x6f,
- 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2c, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65,
- 0x2c, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2c, 0x20, 0x6c, 0x69, 0x73,
- 0x74, 0x29, 0x29, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x5b,
- 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x6c, 0x65, 0x6e, 0x67,
- 0x74, 0x68, 0x5d, 0x20, 0x3d, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x72, 0x65, 0x73, 0x75,
- 0x6c, 0x74, 0x73, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20,
- 0x20, 0x2f, 0x2f, 0x20, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x61,
- 0x6c, 0x6c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x6c, 0x65, 0x6d, 0x65,
- 0x6e, 0x74, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x77, 0x68, 0x69, 0x63,
- 0x68, 0x20, 0x61, 0x20, 0x74, 0x72, 0x75, 0x74, 0x68, 0x20, 0x74, 0x65,
- 0x73, 0x74, 0x20, 0x66, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x0a, 0x20, 0x20,
- 0x5f, 0x2e, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x3d, 0x20, 0x66,
- 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6f, 0x62, 0x6a, 0x2c,
- 0x20, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2c, 0x20, 0x63,
- 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x2e, 0x66,
- 0x69, 0x6c, 0x74, 0x65, 0x72, 0x28, 0x6f, 0x62, 0x6a, 0x2c, 0x20, 0x66,
- 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x76, 0x61, 0x6c, 0x75,
- 0x65, 0x2c, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2c, 0x20, 0x6c, 0x69,
- 0x73, 0x74, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x21, 0x69, 0x74, 0x65, 0x72,
- 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x63, 0x6f,
- 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2c, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65,
- 0x2c, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2c, 0x20, 0x6c, 0x69, 0x73,
- 0x74, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0x20, 0x63,
- 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x7d,
- 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x44, 0x65, 0x74, 0x65,
- 0x72, 0x6d, 0x69, 0x6e, 0x65, 0x20, 0x77, 0x68, 0x65, 0x74, 0x68, 0x65,
- 0x72, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65,
- 0x20, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x6d, 0x61,
- 0x74, 0x63, 0x68, 0x20, 0x61, 0x20, 0x74, 0x72, 0x75, 0x74, 0x68, 0x20,
- 0x74, 0x65, 0x73, 0x74, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x44,
- 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x73, 0x20, 0x74, 0x6f, 0x20,
- 0x2a, 0x2a, 0x45, 0x43, 0x4d, 0x41, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74,
- 0x20, 0x35, 0x2a, 0x2a, 0x27, 0x73, 0x20, 0x6e, 0x61, 0x74, 0x69, 0x76,
- 0x65, 0x20, 0x60, 0x65, 0x76, 0x65, 0x72, 0x79, 0x60, 0x20, 0x69, 0x66,
- 0x20, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x0a,
- 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x64,
- 0x20, 0x61, 0x73, 0x20, 0x60, 0x61, 0x6c, 0x6c, 0x60, 0x2e, 0x0a, 0x20,
- 0x20, 0x5f, 0x2e, 0x65, 0x76, 0x65, 0x72, 0x79, 0x20, 0x3d, 0x20, 0x5f,
- 0x2e, 0x61, 0x6c, 0x6c, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74,
- 0x69, 0x6f, 0x6e, 0x28, 0x6f, 0x62, 0x6a, 0x2c, 0x20, 0x69, 0x74, 0x65,
- 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65,
- 0x78, 0x74, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x74,
- 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x20, 0x7c, 0x7c, 0x20, 0x28, 0x69,
- 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x5f, 0x2e,
- 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x29, 0x3b, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c,
- 0x74, 0x20, 0x3d, 0x20, 0x74, 0x72, 0x75, 0x65, 0x3b, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x6f, 0x62, 0x6a, 0x20, 0x3d, 0x3d,
- 0x20, 0x6e, 0x75, 0x6c, 0x6c, 0x29, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72,
- 0x6e, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x3b, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65,
- 0x45, 0x76, 0x65, 0x72, 0x79, 0x20, 0x26, 0x26, 0x20, 0x6f, 0x62, 0x6a,
- 0x2e, 0x65, 0x76, 0x65, 0x72, 0x79, 0x20, 0x3d, 0x3d, 0x3d, 0x20, 0x6e,
- 0x61, 0x74, 0x69, 0x76, 0x65, 0x45, 0x76, 0x65, 0x72, 0x79, 0x29, 0x20,
- 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6f, 0x62, 0x6a, 0x2e, 0x65,
- 0x76, 0x65, 0x72, 0x79, 0x28, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f,
- 0x72, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x29, 0x3b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x61, 0x63, 0x68, 0x28, 0x6f, 0x62,
- 0x6a, 0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28,
- 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2c, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x78,
- 0x2c, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x21, 0x28, 0x72, 0x65,
- 0x73, 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c,
- 0x74, 0x20, 0x26, 0x26, 0x20, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f,
- 0x72, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x63, 0x6f, 0x6e, 0x74, 0x65,
- 0x78, 0x74, 0x2c, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2c, 0x20, 0x69,
- 0x6e, 0x64, 0x65, 0x78, 0x2c, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x29, 0x29,
- 0x29, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x62, 0x72, 0x65,
- 0x61, 0x6b, 0x65, 0x72, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x29,
- 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e,
- 0x20, 0x21, 0x21, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x3b, 0x0a, 0x20,
- 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x44, 0x65,
- 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x65, 0x20, 0x69, 0x66, 0x20, 0x61,
- 0x74, 0x20, 0x6c, 0x65, 0x61, 0x73, 0x74, 0x20, 0x6f, 0x6e, 0x65, 0x20,
- 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x69, 0x6e, 0x20, 0x74,
- 0x68, 0x65, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x6d, 0x61,
- 0x74, 0x63, 0x68, 0x65, 0x73, 0x20, 0x61, 0x20, 0x74, 0x72, 0x75, 0x74,
- 0x68, 0x20, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f,
- 0x20, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x73, 0x20, 0x74,
- 0x6f, 0x20, 0x2a, 0x2a, 0x45, 0x43, 0x4d, 0x41, 0x53, 0x63, 0x72, 0x69,
- 0x70, 0x74, 0x20, 0x35, 0x2a, 0x2a, 0x27, 0x73, 0x20, 0x6e, 0x61, 0x74,
- 0x69, 0x76, 0x65, 0x20, 0x60, 0x73, 0x6f, 0x6d, 0x65, 0x60, 0x20, 0x69,
- 0x66, 0x20, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x2e,
- 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65,
- 0x64, 0x20, 0x61, 0x73, 0x20, 0x60, 0x61, 0x6e, 0x79, 0x60, 0x2e, 0x0a,
- 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x3d, 0x20,
- 0x5f, 0x2e, 0x73, 0x6f, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x5f, 0x2e, 0x61,
- 0x6e, 0x79, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
- 0x6e, 0x28, 0x6f, 0x62, 0x6a, 0x2c, 0x20, 0x69, 0x74, 0x65, 0x72, 0x61,
- 0x74, 0x6f, 0x72, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74,
- 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x74, 0x65, 0x72,
- 0x61, 0x74, 0x6f, 0x72, 0x20, 0x7c, 0x7c, 0x20, 0x28, 0x69, 0x74, 0x65,
- 0x72, 0x61, 0x74, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x5f, 0x2e, 0x69, 0x64,
- 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x76, 0x61, 0x72, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x20,
- 0x3d, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x69, 0x66, 0x20, 0x28, 0x6f, 0x62, 0x6a, 0x20, 0x3d, 0x3d, 0x20,
- 0x6e, 0x75, 0x6c, 0x6c, 0x29, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e,
- 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x3b, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x69, 0x66, 0x20, 0x28, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x53,
- 0x6f, 0x6d, 0x65, 0x20, 0x26, 0x26, 0x20, 0x6f, 0x62, 0x6a, 0x2e, 0x73,
- 0x6f, 0x6d, 0x65, 0x20, 0x3d, 0x3d, 0x3d, 0x20, 0x6e, 0x61, 0x74, 0x69,
- 0x76, 0x65, 0x53, 0x6f, 0x6d, 0x65, 0x29, 0x20, 0x72, 0x65, 0x74, 0x75,
- 0x72, 0x6e, 0x20, 0x6f, 0x62, 0x6a, 0x2e, 0x73, 0x6f, 0x6d, 0x65, 0x28,
- 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2c, 0x20, 0x63, 0x6f,
- 0x6e, 0x74, 0x65, 0x78, 0x74, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x65, 0x61, 0x63, 0x68, 0x28, 0x6f, 0x62, 0x6a, 0x2c, 0x20, 0x66, 0x75,
- 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x76, 0x61, 0x6c, 0x75, 0x65,
- 0x2c, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2c, 0x20, 0x6c, 0x69, 0x73,
- 0x74, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69,
- 0x66, 0x20, 0x28, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x20, 0x7c, 0x7c,
- 0x20, 0x28, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x69,
- 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x63, 0x61, 0x6c, 0x6c,
- 0x28, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2c, 0x20, 0x76, 0x61,
- 0x6c, 0x75, 0x65, 0x2c, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2c, 0x20,
- 0x6c, 0x69, 0x73, 0x74, 0x29, 0x29, 0x29, 0x20, 0x72, 0x65, 0x74, 0x75,
- 0x72, 0x6e, 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x3b, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x7d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x21, 0x21, 0x72, 0x65, 0x73,
- 0x75, 0x6c, 0x74, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20,
- 0x20, 0x2f, 0x2f, 0x20, 0x44, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e,
- 0x65, 0x20, 0x69, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x72, 0x72,
- 0x61, 0x79, 0x20, 0x6f, 0x72, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74,
- 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x20, 0x61, 0x20,
- 0x67, 0x69, 0x76, 0x65, 0x6e, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20,
- 0x28, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x60, 0x3d, 0x3d, 0x3d, 0x60,
- 0x29, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x41, 0x6c, 0x69, 0x61,
- 0x73, 0x65, 0x64, 0x20, 0x61, 0x73, 0x20, 0x60, 0x69, 0x6e, 0x63, 0x6c,
- 0x75, 0x64, 0x65, 0x60, 0x2e, 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x63, 0x6f,
- 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x20, 0x3d, 0x20, 0x5f, 0x2e, 0x69,
- 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e,
- 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6f, 0x62, 0x6a, 0x2c, 0x20, 0x74,
- 0x61, 0x72, 0x67, 0x65, 0x74, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x69, 0x66, 0x20, 0x28, 0x6f, 0x62, 0x6a, 0x20, 0x3d, 0x3d, 0x20,
- 0x6e, 0x75, 0x6c, 0x6c, 0x29, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e,
- 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x69, 0x66, 0x20, 0x28, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e,
- 0x64, 0x65, 0x78, 0x4f, 0x66, 0x20, 0x26, 0x26, 0x20, 0x6f, 0x62, 0x6a,
- 0x2e, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x4f, 0x66, 0x20, 0x3d, 0x3d, 0x3d,
- 0x20, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78,
- 0x4f, 0x66, 0x29, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6f,
- 0x62, 0x6a, 0x2e, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x4f, 0x66, 0x28, 0x74,
- 0x61, 0x72, 0x67, 0x65, 0x74, 0x29, 0x20, 0x21, 0x3d, 0x20, 0x2d, 0x31,
- 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e,
- 0x20, 0x61, 0x6e, 0x79, 0x28, 0x6f, 0x62, 0x6a, 0x2c, 0x20, 0x66, 0x75,
- 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x76, 0x61, 0x6c, 0x75, 0x65,
- 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65,
- 0x74, 0x75, 0x72, 0x6e, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x3d,
- 0x3d, 0x3d, 0x20, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x3b, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x7d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a,
- 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65,
- 0x20, 0x61, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x20, 0x28, 0x77,
- 0x69, 0x74, 0x68, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74,
- 0x73, 0x29, 0x20, 0x6f, 0x6e, 0x20, 0x65, 0x76, 0x65, 0x72, 0x79, 0x20,
- 0x69, 0x74, 0x65, 0x6d, 0x20, 0x69, 0x6e, 0x20, 0x61, 0x20, 0x63, 0x6f,
- 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x20, 0x20,
- 0x5f, 0x2e, 0x69, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x20, 0x3d, 0x20, 0x66,
- 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6f, 0x62, 0x6a, 0x2c,
- 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x29, 0x20, 0x7b, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x61, 0x72, 0x67, 0x73, 0x20,
- 0x3d, 0x20, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x2e, 0x63, 0x61, 0x6c, 0x6c,
- 0x28, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2c, 0x20,
- 0x32, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20,
- 0x69, 0x73, 0x46, 0x75, 0x6e, 0x63, 0x20, 0x3d, 0x20, 0x5f, 0x2e, 0x69,
- 0x73, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6d, 0x65,
- 0x74, 0x68, 0x6f, 0x64, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72,
- 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x2e, 0x6d, 0x61, 0x70, 0x28,
- 0x6f, 0x62, 0x6a, 0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
- 0x6e, 0x28, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x29, 0x20, 0x7b, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20,
- 0x28, 0x69, 0x73, 0x46, 0x75, 0x6e, 0x63, 0x20, 0x3f, 0x20, 0x6d, 0x65,
- 0x74, 0x68, 0x6f, 0x64, 0x20, 0x3a, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65,
- 0x5b, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5d, 0x29, 0x2e, 0x61, 0x70,
- 0x70, 0x6c, 0x79, 0x28, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2c, 0x20, 0x61,
- 0x72, 0x67, 0x73, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x29,
- 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f,
- 0x20, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x6e, 0x69, 0x65, 0x6e, 0x63, 0x65,
- 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20,
- 0x61, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x20, 0x75, 0x73, 0x65,
- 0x20, 0x63, 0x61, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x60, 0x6d, 0x61,
- 0x70, 0x60, 0x3a, 0x20, 0x66, 0x65, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67,
- 0x20, 0x61, 0x20, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x2e,
- 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x70, 0x6c, 0x75, 0x63, 0x6b, 0x20, 0x3d,
- 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6f, 0x62,
- 0x6a, 0x2c, 0x20, 0x6b, 0x65, 0x79, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x2e, 0x6d,
- 0x61, 0x70, 0x28, 0x6f, 0x62, 0x6a, 0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63,
- 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x29, 0x7b,
- 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x76, 0x61, 0x6c, 0x75,
- 0x65, 0x5b, 0x6b, 0x65, 0x79, 0x5d, 0x3b, 0x20, 0x7d, 0x29, 0x3b, 0x0a,
- 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x43,
- 0x6f, 0x6e, 0x76, 0x65, 0x6e, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x20, 0x76,
- 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20,
- 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x20, 0x75, 0x73, 0x65, 0x20, 0x63,
- 0x61, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x60, 0x66, 0x69, 0x6c, 0x74,
- 0x65, 0x72, 0x60, 0x3a, 0x20, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69,
- 0x6e, 0x67, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x6f, 0x62, 0x6a, 0x65,
- 0x63, 0x74, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x63, 0x6f, 0x6e,
- 0x74, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x73, 0x70, 0x65, 0x63,
- 0x69, 0x66, 0x69, 0x63, 0x20, 0x60, 0x6b, 0x65, 0x79, 0x3a, 0x76, 0x61,
- 0x6c, 0x75, 0x65, 0x60, 0x20, 0x70, 0x61, 0x69, 0x72, 0x73, 0x2e, 0x0a,
- 0x20, 0x20, 0x5f, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x20, 0x3d, 0x20,
- 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6f, 0x62, 0x6a,
- 0x2c, 0x20, 0x61, 0x74, 0x74, 0x72, 0x73, 0x2c, 0x20, 0x66, 0x69, 0x72,
- 0x73, 0x74, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66,
- 0x20, 0x28, 0x5f, 0x2e, 0x69, 0x73, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x28,
- 0x61, 0x74, 0x74, 0x72, 0x73, 0x29, 0x29, 0x20, 0x72, 0x65, 0x74, 0x75,
- 0x72, 0x6e, 0x20, 0x66, 0x69, 0x72, 0x73, 0x74, 0x20, 0x3f, 0x20, 0x6e,
- 0x75, 0x6c, 0x6c, 0x20, 0x3a, 0x20, 0x5b, 0x5d, 0x3b, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x5b, 0x66,
- 0x69, 0x72, 0x73, 0x74, 0x20, 0x3f, 0x20, 0x27, 0x66, 0x69, 0x6e, 0x64,
- 0x27, 0x20, 0x3a, 0x20, 0x27, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x27,
- 0x5d, 0x28, 0x6f, 0x62, 0x6a, 0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74,
- 0x69, 0x6f, 0x6e, 0x28, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x29, 0x20, 0x7b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x28,
- 0x76, 0x61, 0x72, 0x20, 0x6b, 0x65, 0x79, 0x20, 0x69, 0x6e, 0x20, 0x61,
- 0x74, 0x74, 0x72, 0x73, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x61, 0x74, 0x74, 0x72,
- 0x73, 0x5b, 0x6b, 0x65, 0x79, 0x5d, 0x20, 0x21, 0x3d, 0x3d, 0x20, 0x76,
- 0x61, 0x6c, 0x75, 0x65, 0x5b, 0x6b, 0x65, 0x79, 0x5d, 0x29, 0x20, 0x72,
- 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x3b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x72,
- 0x75, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x29, 0x3b, 0x0a,
- 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x43,
- 0x6f, 0x6e, 0x76, 0x65, 0x6e, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x20, 0x76,
- 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20,
- 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x20, 0x75, 0x73, 0x65, 0x20, 0x63,
- 0x61, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x60, 0x66, 0x69, 0x6e, 0x64,
- 0x60, 0x3a, 0x20, 0x67, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x74,
- 0x68, 0x65, 0x20, 0x66, 0x69, 0x72, 0x73, 0x74, 0x20, 0x6f, 0x62, 0x6a,
- 0x65, 0x63, 0x74, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x63, 0x6f, 0x6e,
- 0x74, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x73, 0x70, 0x65, 0x63,
- 0x69, 0x66, 0x69, 0x63, 0x20, 0x60, 0x6b, 0x65, 0x79, 0x3a, 0x76, 0x61,
- 0x6c, 0x75, 0x65, 0x60, 0x20, 0x70, 0x61, 0x69, 0x72, 0x73, 0x2e, 0x0a,
- 0x20, 0x20, 0x5f, 0x2e, 0x66, 0x69, 0x6e, 0x64, 0x57, 0x68, 0x65, 0x72,
- 0x65, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e,
- 0x28, 0x6f, 0x62, 0x6a, 0x2c, 0x20, 0x61, 0x74, 0x74, 0x72, 0x73, 0x29,
- 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72,
- 0x6e, 0x20, 0x5f, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x28, 0x6f, 0x62,
- 0x6a, 0x2c, 0x20, 0x61, 0x74, 0x74, 0x72, 0x73, 0x2c, 0x20, 0x74, 0x72,
- 0x75, 0x65, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20,
- 0x20, 0x2f, 0x2f, 0x20, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74,
- 0x68, 0x65, 0x20, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x20, 0x65,
- 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x72, 0x20, 0x28, 0x65,
- 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x64,
- 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
- 0x29, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x43, 0x61, 0x6e, 0x27,
- 0x74, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x20, 0x61,
- 0x72, 0x72, 0x61, 0x79, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x69, 0x6e, 0x74,
- 0x65, 0x67, 0x65, 0x72, 0x73, 0x20, 0x6c, 0x6f, 0x6e, 0x67, 0x65, 0x72,
- 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x36, 0x35, 0x2c, 0x35, 0x33, 0x35,
- 0x20, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x0a, 0x20,
- 0x20, 0x2f, 0x2f, 0x20, 0x53, 0x65, 0x65, 0x3a, 0x20, 0x68, 0x74, 0x74,
- 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x62, 0x75, 0x67, 0x73, 0x2e, 0x77, 0x65,
- 0x62, 0x6b, 0x69, 0x74, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x73, 0x68, 0x6f,
- 0x77, 0x5f, 0x62, 0x75, 0x67, 0x2e, 0x63, 0x67, 0x69, 0x3f, 0x69, 0x64,
- 0x3d, 0x38, 0x30, 0x37, 0x39, 0x37, 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x6d,
- 0x61, 0x78, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
- 0x6e, 0x28, 0x6f, 0x62, 0x6a, 0x2c, 0x20, 0x69, 0x74, 0x65, 0x72, 0x61,
- 0x74, 0x6f, 0x72, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74,
- 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28,
- 0x21, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x20, 0x26, 0x26,
- 0x20, 0x5f, 0x2e, 0x69, 0x73, 0x41, 0x72, 0x72, 0x61, 0x79, 0x28, 0x6f,
- 0x62, 0x6a, 0x29, 0x20, 0x26, 0x26, 0x20, 0x6f, 0x62, 0x6a, 0x5b, 0x30,
- 0x5d, 0x20, 0x3d, 0x3d, 0x3d, 0x20, 0x2b, 0x6f, 0x62, 0x6a, 0x5b, 0x30,
- 0x5d, 0x20, 0x26, 0x26, 0x20, 0x6f, 0x62, 0x6a, 0x2e, 0x6c, 0x65, 0x6e,
- 0x67, 0x74, 0x68, 0x20, 0x3c, 0x20, 0x36, 0x35, 0x35, 0x33, 0x35, 0x29,
- 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74,
- 0x75, 0x72, 0x6e, 0x20, 0x4d, 0x61, 0x74, 0x68, 0x2e, 0x6d, 0x61, 0x78,
- 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x28, 0x4d, 0x61, 0x74, 0x68, 0x2c,
- 0x20, 0x6f, 0x62, 0x6a, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x21, 0x69, 0x74,
- 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x20, 0x26, 0x26, 0x20, 0x5f, 0x2e,
- 0x69, 0x73, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x28, 0x6f, 0x62, 0x6a, 0x29,
- 0x29, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x2d, 0x49, 0x6e,
- 0x66, 0x69, 0x6e, 0x69, 0x74, 0x79, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x76, 0x61, 0x72, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x20, 0x3d,
- 0x20, 0x7b, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x20, 0x3a,
- 0x20, 0x2d, 0x49, 0x6e, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x79, 0x2c, 0x20,
- 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x20, 0x2d, 0x49, 0x6e, 0x66, 0x69,
- 0x6e, 0x69, 0x74, 0x79, 0x7d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65,
- 0x61, 0x63, 0x68, 0x28, 0x6f, 0x62, 0x6a, 0x2c, 0x20, 0x66, 0x75, 0x6e,
- 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2c,
- 0x20, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2c, 0x20, 0x6c, 0x69, 0x73, 0x74,
- 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61,
- 0x72, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x20, 0x3d,
- 0x20, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x20, 0x3f, 0x20,
- 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x63, 0x61, 0x6c,
- 0x6c, 0x28, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2c, 0x20, 0x76,
- 0x61, 0x6c, 0x75, 0x65, 0x2c, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2c,
- 0x20, 0x6c, 0x69, 0x73, 0x74, 0x29, 0x20, 0x3a, 0x20, 0x76, 0x61, 0x6c,
- 0x75, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x63, 0x6f,
- 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x65,
- 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65,
- 0x64, 0x20, 0x26, 0x26, 0x20, 0x28, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74,
- 0x20, 0x3d, 0x20, 0x7b, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x3a, 0x20,
- 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2c, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x75,
- 0x74, 0x65, 0x64, 0x20, 0x3a, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74,
- 0x65, 0x64, 0x7d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x29,
- 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e,
- 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x61, 0x6c, 0x75,
- 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f,
- 0x2f, 0x20, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x68, 0x65,
- 0x20, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x20, 0x65, 0x6c, 0x65,
- 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x28, 0x6f, 0x72, 0x20, 0x65, 0x6c, 0x65,
- 0x6d, 0x65, 0x6e, 0x74, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x64, 0x20, 0x63,
- 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x29, 0x2e,
- 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x6d, 0x69, 0x6e, 0x20, 0x3d, 0x20, 0x66,
- 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6f, 0x62, 0x6a, 0x2c,
- 0x20, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2c, 0x20, 0x63,
- 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x21, 0x69, 0x74, 0x65, 0x72, 0x61,
- 0x74, 0x6f, 0x72, 0x20, 0x26, 0x26, 0x20, 0x5f, 0x2e, 0x69, 0x73, 0x41,
- 0x72, 0x72, 0x61, 0x79, 0x28, 0x6f, 0x62, 0x6a, 0x29, 0x20, 0x26, 0x26,
- 0x20, 0x6f, 0x62, 0x6a, 0x5b, 0x30, 0x5d, 0x20, 0x3d, 0x3d, 0x3d, 0x20,
- 0x2b, 0x6f, 0x62, 0x6a, 0x5b, 0x30, 0x5d, 0x20, 0x26, 0x26, 0x20, 0x6f,
- 0x62, 0x6a, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x3c, 0x20,
- 0x36, 0x35, 0x35, 0x33, 0x35, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x4d, 0x61,
- 0x74, 0x68, 0x2e, 0x6d, 0x69, 0x6e, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x79,
- 0x28, 0x4d, 0x61, 0x74, 0x68, 0x2c, 0x20, 0x6f, 0x62, 0x6a, 0x29, 0x3b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69,
- 0x66, 0x20, 0x28, 0x21, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72,
- 0x20, 0x26, 0x26, 0x20, 0x5f, 0x2e, 0x69, 0x73, 0x45, 0x6d, 0x70, 0x74,
- 0x79, 0x28, 0x6f, 0x62, 0x6a, 0x29, 0x29, 0x20, 0x72, 0x65, 0x74, 0x75,
- 0x72, 0x6e, 0x20, 0x49, 0x6e, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x79, 0x3b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x72, 0x65, 0x73,
- 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x7b, 0x63, 0x6f, 0x6d, 0x70, 0x75,
- 0x74, 0x65, 0x64, 0x20, 0x3a, 0x20, 0x49, 0x6e, 0x66, 0x69, 0x6e, 0x69,
- 0x74, 0x79, 0x2c, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x20, 0x49,
- 0x6e, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x79, 0x7d, 0x3b, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x65, 0x61, 0x63, 0x68, 0x28, 0x6f, 0x62, 0x6a, 0x2c, 0x20,
- 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x76, 0x61, 0x6c,
- 0x75, 0x65, 0x2c, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2c, 0x20, 0x6c,
- 0x69, 0x73, 0x74, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x76, 0x61, 0x72, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65,
- 0x64, 0x20, 0x3d, 0x20, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72,
- 0x20, 0x3f, 0x20, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e,
- 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74,
- 0x2c, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2c, 0x20, 0x69, 0x6e, 0x64,
- 0x65, 0x78, 0x2c, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x29, 0x20, 0x3a, 0x20,
- 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x20, 0x3c, 0x20,
- 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75,
- 0x74, 0x65, 0x64, 0x20, 0x26, 0x26, 0x20, 0x28, 0x72, 0x65, 0x73, 0x75,
- 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x7b, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20,
- 0x3a, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2c, 0x20, 0x63, 0x6f, 0x6d,
- 0x70, 0x75, 0x74, 0x65, 0x64, 0x20, 0x3a, 0x20, 0x63, 0x6f, 0x6d, 0x70,
- 0x75, 0x74, 0x65, 0x64, 0x7d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x7d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75,
- 0x72, 0x6e, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x61,
- 0x6c, 0x75, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20,
- 0x20, 0x2f, 0x2f, 0x20, 0x53, 0x68, 0x75, 0x66, 0x66, 0x6c, 0x65, 0x20,
- 0x61, 0x6e, 0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x2e, 0x0a, 0x20, 0x20,
- 0x5f, 0x2e, 0x73, 0x68, 0x75, 0x66, 0x66, 0x6c, 0x65, 0x20, 0x3d, 0x20,
- 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6f, 0x62, 0x6a,
- 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20,
- 0x72, 0x61, 0x6e, 0x64, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61,
- 0x72, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x3d, 0x20, 0x30, 0x3b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x73, 0x68, 0x75,
- 0x66, 0x66, 0x6c, 0x65, 0x64, 0x20, 0x3d, 0x20, 0x5b, 0x5d, 0x3b, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x65, 0x61, 0x63, 0x68, 0x28, 0x6f, 0x62, 0x6a,
- 0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x76,
- 0x61, 0x6c, 0x75, 0x65, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x72, 0x61, 0x6e, 0x64, 0x20, 0x3d, 0x20, 0x5f, 0x2e, 0x72,
- 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x28, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2b,
- 0x2b, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x68,
- 0x75, 0x66, 0x66, 0x6c, 0x65, 0x64, 0x5b, 0x69, 0x6e, 0x64, 0x65, 0x78,
- 0x20, 0x2d, 0x20, 0x31, 0x5d, 0x20, 0x3d, 0x20, 0x73, 0x68, 0x75, 0x66,
- 0x66, 0x6c, 0x65, 0x64, 0x5b, 0x72, 0x61, 0x6e, 0x64, 0x5d, 0x3b, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x68, 0x75, 0x66, 0x66, 0x6c,
- 0x65, 0x64, 0x5b, 0x72, 0x61, 0x6e, 0x64, 0x5d, 0x20, 0x3d, 0x20, 0x76,
- 0x61, 0x6c, 0x75, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x29,
- 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e,
- 0x20, 0x73, 0x68, 0x75, 0x66, 0x66, 0x6c, 0x65, 0x64, 0x3b, 0x0a, 0x20,
- 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x41, 0x6e,
- 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x20, 0x66, 0x75,
- 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x67, 0x65,
- 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x20, 0x6c, 0x6f, 0x6f, 0x6b, 0x75,
- 0x70, 0x20, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2e,
- 0x0a, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x6c, 0x6f, 0x6f, 0x6b, 0x75,
- 0x70, 0x49, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x20, 0x3d, 0x20,
- 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x76, 0x61, 0x6c,
- 0x75, 0x65, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65,
- 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x2e, 0x69, 0x73, 0x46, 0x75, 0x6e,
- 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x29,
- 0x20, 0x3f, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x3a, 0x20, 0x66,
- 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6f, 0x62, 0x6a, 0x29,
- 0x7b, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6f, 0x62, 0x6a,
- 0x5b, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5d, 0x3b, 0x20, 0x7d, 0x3b, 0x0a,
- 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x53,
- 0x6f, 0x72, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x62, 0x6a, 0x65,
- 0x63, 0x74, 0x27, 0x73, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x20,
- 0x62, 0x79, 0x20, 0x61, 0x20, 0x63, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69,
- 0x6f, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64, 0x20,
- 0x62, 0x79, 0x20, 0x61, 0x6e, 0x20, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74,
- 0x6f, 0x72, 0x2e, 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x73, 0x6f, 0x72, 0x74,
- 0x42, 0x79, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
- 0x6e, 0x28, 0x6f, 0x62, 0x6a, 0x2c, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65,
- 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x29, 0x20, 0x7b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x69, 0x74, 0x65,
- 0x72, 0x61, 0x74, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x6c, 0x6f, 0x6f, 0x6b,
- 0x75, 0x70, 0x49, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x28, 0x76,
- 0x61, 0x6c, 0x75, 0x65, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72,
- 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x2e, 0x70, 0x6c, 0x75, 0x63,
- 0x6b, 0x28, 0x5f, 0x2e, 0x6d, 0x61, 0x70, 0x28, 0x6f, 0x62, 0x6a, 0x2c,
- 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x76, 0x61,
- 0x6c, 0x75, 0x65, 0x2c, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2c, 0x20,
- 0x6c, 0x69, 0x73, 0x74, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x7b, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65,
- 0x20, 0x3a, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2c, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x20,
- 0x3a, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2c, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x63, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69,
- 0x61, 0x20, 0x3a, 0x20, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72,
- 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78,
- 0x74, 0x2c, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2c, 0x20, 0x69, 0x6e,
- 0x64, 0x65, 0x78, 0x2c, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x29, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x7d, 0x29, 0x2e, 0x73, 0x6f, 0x72, 0x74, 0x28, 0x66, 0x75, 0x6e, 0x63,
- 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6c, 0x65, 0x66, 0x74, 0x2c, 0x20, 0x72,
- 0x69, 0x67, 0x68, 0x74, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x61, 0x20, 0x3d, 0x20, 0x6c, 0x65,
- 0x66, 0x74, 0x2e, 0x63, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, 0x3b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x62,
- 0x20, 0x3d, 0x20, 0x72, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x63, 0x72, 0x69,
- 0x74, 0x65, 0x72, 0x69, 0x61, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x69, 0x66, 0x20, 0x28, 0x61, 0x20, 0x21, 0x3d, 0x3d, 0x20, 0x62,
- 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x69, 0x66, 0x20, 0x28, 0x61, 0x20, 0x3e, 0x20, 0x62, 0x20, 0x7c, 0x7c,
- 0x20, 0x61, 0x20, 0x3d, 0x3d, 0x3d, 0x20, 0x76, 0x6f, 0x69, 0x64, 0x20,
- 0x30, 0x29, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x31, 0x3b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20,
- 0x28, 0x61, 0x20, 0x3c, 0x20, 0x62, 0x20, 0x7c, 0x7c, 0x20, 0x62, 0x20,
- 0x3d, 0x3d, 0x3d, 0x20, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x30, 0x29, 0x20,
- 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x2d, 0x31, 0x3b, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6c, 0x65, 0x66, 0x74,
- 0x2e, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x3c, 0x20, 0x72, 0x69, 0x67,
- 0x68, 0x74, 0x2e, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x3f, 0x20, 0x2d,
- 0x31, 0x20, 0x3a, 0x20, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d,
- 0x29, 0x2c, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x27, 0x29, 0x3b,
- 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20,
- 0x41, 0x6e, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x20,
- 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x75, 0x73, 0x65,
- 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67,
- 0x61, 0x74, 0x65, 0x20, 0x22, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x62,
- 0x79, 0x22, 0x20, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
- 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x67, 0x72, 0x6f,
- 0x75, 0x70, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
- 0x6e, 0x28, 0x6f, 0x62, 0x6a, 0x2c, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65,
- 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2c, 0x20, 0x62,
- 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x29, 0x20, 0x7b, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c,
- 0x74, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x76, 0x61, 0x72, 0x20, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72,
- 0x20, 0x3d, 0x20, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x49, 0x74, 0x65,
- 0x72, 0x61, 0x74, 0x6f, 0x72, 0x28, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20,
- 0x7c, 0x7c, 0x20, 0x5f, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74,
- 0x79, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x61, 0x63, 0x68,
- 0x28, 0x6f, 0x62, 0x6a, 0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69,
- 0x6f, 0x6e, 0x28, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2c, 0x20, 0x69, 0x6e,
- 0x64, 0x65, 0x78, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x76, 0x61, 0x72, 0x20, 0x6b, 0x65, 0x79, 0x20, 0x3d, 0x20, 0x69,
- 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x63, 0x61, 0x6c, 0x6c,
- 0x28, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2c, 0x20, 0x76, 0x61,
- 0x6c, 0x75, 0x65, 0x2c, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2c, 0x20,
- 0x6f, 0x62, 0x6a, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x28, 0x72, 0x65, 0x73,
- 0x75, 0x6c, 0x74, 0x2c, 0x20, 0x6b, 0x65, 0x79, 0x2c, 0x20, 0x76, 0x61,
- 0x6c, 0x75, 0x65, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x29,
- 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e,
- 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x3b, 0x0a, 0x20, 0x20, 0x7d,
- 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x47, 0x72, 0x6f, 0x75,
- 0x70, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63,
- 0x74, 0x27, 0x73, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x20, 0x62,
- 0x79, 0x20, 0x61, 0x20, 0x63, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x6f,
- 0x6e, 0x2e, 0x20, 0x50, 0x61, 0x73, 0x73, 0x20, 0x65, 0x69, 0x74, 0x68,
- 0x65, 0x72, 0x20, 0x61, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20,
- 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x0a, 0x20, 0x20,
- 0x2f, 0x2f, 0x20, 0x74, 0x6f, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20,
- 0x62, 0x79, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x61, 0x20, 0x66, 0x75, 0x6e,
- 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x72,
- 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63,
- 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x20, 0x20,
- 0x5f, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x79, 0x20, 0x3d, 0x20,
- 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6f, 0x62, 0x6a,
- 0x2c, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2c, 0x20, 0x63, 0x6f, 0x6e,
- 0x74, 0x65, 0x78, 0x74, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70,
- 0x28, 0x6f, 0x62, 0x6a, 0x2c, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2c,
- 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2c, 0x20, 0x66, 0x75,
- 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x72, 0x65, 0x73, 0x75, 0x6c,
- 0x74, 0x2c, 0x20, 0x6b, 0x65, 0x79, 0x2c, 0x20, 0x76, 0x61, 0x6c, 0x75,
- 0x65, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x28,
- 0x5f, 0x2e, 0x68, 0x61, 0x73, 0x28, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74,
- 0x2c, 0x20, 0x6b, 0x65, 0x79, 0x29, 0x20, 0x3f, 0x20, 0x72, 0x65, 0x73,
- 0x75, 0x6c, 0x74, 0x5b, 0x6b, 0x65, 0x79, 0x5d, 0x20, 0x3a, 0x20, 0x28,
- 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x5b, 0x6b, 0x65, 0x79, 0x5d, 0x20,
- 0x3d, 0x20, 0x5b, 0x5d, 0x29, 0x29, 0x2e, 0x70, 0x75, 0x73, 0x68, 0x28,
- 0x76, 0x61, 0x6c, 0x75, 0x65, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x7d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20,
- 0x2f, 0x2f, 0x20, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x20, 0x69, 0x6e,
- 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x61,
- 0x6e, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x74, 0x68, 0x61,
- 0x74, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x62, 0x79, 0x20, 0x61,
- 0x20, 0x63, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x63, 0x72, 0x69,
- 0x74, 0x65, 0x72, 0x69, 0x6f, 0x6e, 0x2e, 0x20, 0x50, 0x61, 0x73, 0x73,
- 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x65, 0x69, 0x74, 0x68, 0x65, 0x72,
- 0x20, 0x61, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x74,
- 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x63,
- 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x62, 0x79, 0x2c, 0x20, 0x6f, 0x72, 0x20,
- 0x61, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74,
- 0x68, 0x61, 0x74, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20,
- 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x63, 0x72, 0x69,
- 0x74, 0x65, 0x72, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x20, 0x20, 0x5f, 0x2e,
- 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x79, 0x20, 0x3d, 0x20, 0x66, 0x75,
- 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6f, 0x62, 0x6a, 0x2c, 0x20,
- 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65,
- 0x78, 0x74, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65,
- 0x74, 0x75, 0x72, 0x6e, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x28, 0x6f,
- 0x62, 0x6a, 0x2c, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2c, 0x20, 0x63,
- 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63,
- 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2c,
- 0x20, 0x6b, 0x65, 0x79, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x21, 0x5f, 0x2e, 0x68, 0x61, 0x73,
- 0x28, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2c, 0x20, 0x6b, 0x65, 0x79,
- 0x29, 0x29, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x5b, 0x6b, 0x65,
- 0x79, 0x5d, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x5b, 0x6b, 0x65, 0x79,
- 0x5d, 0x2b, 0x2b, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x29, 0x3b,
- 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20,
- 0x55, 0x73, 0x65, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x72,
- 0x61, 0x74, 0x6f, 0x72, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
- 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x20,
- 0x6f, 0x75, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x6d, 0x61, 0x6c,
- 0x6c, 0x65, 0x73, 0x74, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x61,
- 0x74, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x0a, 0x20, 0x20, 0x2f, 0x2f,
- 0x20, 0x61, 0x6e, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x73,
- 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x62, 0x65, 0x20, 0x69, 0x6e, 0x73,
- 0x65, 0x72, 0x74, 0x65, 0x64, 0x20, 0x73, 0x6f, 0x20, 0x61, 0x73, 0x20,
- 0x74, 0x6f, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x20,
- 0x6f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x20, 0x55, 0x73, 0x65, 0x73, 0x20,
- 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x20, 0x73, 0x65, 0x61, 0x72, 0x63,
- 0x68, 0x2e, 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x73, 0x6f, 0x72, 0x74, 0x65,
- 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e,
- 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x61, 0x72, 0x72, 0x61, 0x79, 0x2c,
- 0x20, 0x6f, 0x62, 0x6a, 0x2c, 0x20, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74,
- 0x6f, 0x72, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x29,
- 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x74, 0x65, 0x72, 0x61,
- 0x74, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74,
- 0x6f, 0x72, 0x20, 0x3d, 0x3d, 0x20, 0x6e, 0x75, 0x6c, 0x6c, 0x20, 0x3f,
- 0x20, 0x5f, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x20,
- 0x3a, 0x20, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x49, 0x74, 0x65, 0x72,
- 0x61, 0x74, 0x6f, 0x72, 0x28, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f,
- 0x72, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20,
- 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x3d, 0x20, 0x69, 0x74, 0x65, 0x72,
- 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x63, 0x6f,
- 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2c, 0x20, 0x6f, 0x62, 0x6a, 0x29, 0x3b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x6c, 0x6f, 0x77,
- 0x20, 0x3d, 0x20, 0x30, 0x2c, 0x20, 0x68, 0x69, 0x67, 0x68, 0x20, 0x3d,
- 0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74,
- 0x68, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x77, 0x68, 0x69, 0x6c, 0x65,
- 0x20, 0x28, 0x6c, 0x6f, 0x77, 0x20, 0x3c, 0x20, 0x68, 0x69, 0x67, 0x68,
- 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61,
- 0x72, 0x20, 0x6d, 0x69, 0x64, 0x20, 0x3d, 0x20, 0x28, 0x6c, 0x6f, 0x77,
- 0x20, 0x2b, 0x20, 0x68, 0x69, 0x67, 0x68, 0x29, 0x20, 0x3e, 0x3e, 0x3e,
- 0x20, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x74,
- 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x28,
- 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2c, 0x20, 0x61, 0x72, 0x72,
- 0x61, 0x79, 0x5b, 0x6d, 0x69, 0x64, 0x5d, 0x29, 0x20, 0x3c, 0x20, 0x76,
- 0x61, 0x6c, 0x75, 0x65, 0x20, 0x3f, 0x20, 0x6c, 0x6f, 0x77, 0x20, 0x3d,
- 0x20, 0x6d, 0x69, 0x64, 0x20, 0x2b, 0x20, 0x31, 0x20, 0x3a, 0x20, 0x68,
- 0x69, 0x67, 0x68, 0x20, 0x3d, 0x20, 0x6d, 0x69, 0x64, 0x3b, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74,
- 0x75, 0x72, 0x6e, 0x20, 0x6c, 0x6f, 0x77, 0x3b, 0x0a, 0x20, 0x20, 0x7d,
- 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x53, 0x61, 0x66, 0x65,
- 0x6c, 0x79, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x20, 0x61,
- 0x6e, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x74, 0x65, 0x72,
- 0x61, 0x62, 0x6c, 0x65, 0x20, 0x69, 0x6e, 0x74, 0x6f, 0x20, 0x61, 0x20,
- 0x72, 0x65, 0x61, 0x6c, 0x2c, 0x20, 0x6c, 0x69, 0x76, 0x65, 0x20, 0x61,
- 0x72, 0x72, 0x61, 0x79, 0x2e, 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x74, 0x6f,
- 0x41, 0x72, 0x72, 0x61, 0x79, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63,
- 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6f, 0x62, 0x6a, 0x29, 0x20, 0x7b, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x21, 0x6f, 0x62, 0x6a,
- 0x29, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5b, 0x5d, 0x3b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x5f, 0x2e, 0x69,
- 0x73, 0x41, 0x72, 0x72, 0x61, 0x79, 0x28, 0x6f, 0x62, 0x6a, 0x29, 0x29,
- 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x6c, 0x69, 0x63,
- 0x65, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x6f, 0x62, 0x6a, 0x29, 0x3b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x6f, 0x62, 0x6a,
- 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x3d, 0x3d, 0x3d, 0x20,
- 0x2b, 0x6f, 0x62, 0x6a, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x29,
- 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x2e, 0x6d, 0x61,
- 0x70, 0x28, 0x6f, 0x62, 0x6a, 0x2c, 0x20, 0x5f, 0x2e, 0x69, 0x64, 0x65,
- 0x6e, 0x74, 0x69, 0x74, 0x79, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x2e, 0x76, 0x61, 0x6c,
- 0x75, 0x65, 0x73, 0x28, 0x6f, 0x62, 0x6a, 0x29, 0x3b, 0x0a, 0x20, 0x20,
- 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x52, 0x65, 0x74,
- 0x75, 0x72, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x75, 0x6d, 0x62,
- 0x65, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e,
- 0x74, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x61, 0x6e, 0x20, 0x6f, 0x62, 0x6a,
- 0x65, 0x63, 0x74, 0x2e, 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x73, 0x69, 0x7a,
- 0x65, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e,
- 0x28, 0x6f, 0x62, 0x6a, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x69, 0x66, 0x20, 0x28, 0x6f, 0x62, 0x6a, 0x20, 0x3d, 0x3d, 0x20, 0x6e,
- 0x75, 0x6c, 0x6c, 0x29, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20,
- 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72,
- 0x6e, 0x20, 0x28, 0x6f, 0x62, 0x6a, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74,
- 0x68, 0x20, 0x3d, 0x3d, 0x3d, 0x20, 0x2b, 0x6f, 0x62, 0x6a, 0x2e, 0x6c,
- 0x65, 0x6e, 0x67, 0x74, 0x68, 0x29, 0x20, 0x3f, 0x20, 0x6f, 0x62, 0x6a,
- 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x3a, 0x20, 0x5f, 0x2e,
- 0x6b, 0x65, 0x79, 0x73, 0x28, 0x6f, 0x62, 0x6a, 0x29, 0x2e, 0x6c, 0x65,
- 0x6e, 0x67, 0x74, 0x68, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a,
- 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x41, 0x72, 0x72, 0x61, 0x79, 0x20, 0x46,
- 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x0a, 0x20, 0x20, 0x2f,
- 0x2f, 0x20, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d,
- 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20,
- 0x47, 0x65, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x69, 0x72, 0x73,
- 0x74, 0x20, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x66,
- 0x20, 0x61, 0x6e, 0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x2e, 0x20, 0x50,
- 0x61, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x2a, 0x2a, 0x6e, 0x2a, 0x2a,
- 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e,
- 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x69, 0x72, 0x73, 0x74, 0x20, 0x4e,
- 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73,
- 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x72, 0x72, 0x61,
- 0x79, 0x2e, 0x20, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x64, 0x20, 0x61,
- 0x73, 0x20, 0x60, 0x68, 0x65, 0x61, 0x64, 0x60, 0x20, 0x61, 0x6e, 0x64,
- 0x20, 0x60, 0x74, 0x61, 0x6b, 0x65, 0x60, 0x2e, 0x20, 0x54, 0x68, 0x65,
- 0x20, 0x2a, 0x2a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x2a, 0x2a, 0x20, 0x63,
- 0x68, 0x65, 0x63, 0x6b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x61, 0x6c,
- 0x6c, 0x6f, 0x77, 0x73, 0x20, 0x69, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x77,
- 0x6f, 0x72, 0x6b, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x60, 0x5f, 0x2e,
- 0x6d, 0x61, 0x70, 0x60, 0x2e, 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x66, 0x69,
- 0x72, 0x73, 0x74, 0x20, 0x3d, 0x20, 0x5f, 0x2e, 0x68, 0x65, 0x61, 0x64,
- 0x20, 0x3d, 0x20, 0x5f, 0x2e, 0x74, 0x61, 0x6b, 0x65, 0x20, 0x3d, 0x20,
- 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x61, 0x72, 0x72,
- 0x61, 0x79, 0x2c, 0x20, 0x6e, 0x2c, 0x20, 0x67, 0x75, 0x61, 0x72, 0x64,
- 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28,
- 0x61, 0x72, 0x72, 0x61, 0x79, 0x20, 0x3d, 0x3d, 0x20, 0x6e, 0x75, 0x6c,
- 0x6c, 0x29, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x76, 0x6f,
- 0x69, 0x64, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65,
- 0x74, 0x75, 0x72, 0x6e, 0x20, 0x28, 0x6e, 0x20, 0x21, 0x3d, 0x20, 0x6e,
- 0x75, 0x6c, 0x6c, 0x29, 0x20, 0x26, 0x26, 0x20, 0x21, 0x67, 0x75, 0x61,
- 0x72, 0x64, 0x20, 0x3f, 0x20, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x2e, 0x63,
- 0x61, 0x6c, 0x6c, 0x28, 0x61, 0x72, 0x72, 0x61, 0x79, 0x2c, 0x20, 0x30,
- 0x2c, 0x20, 0x6e, 0x29, 0x20, 0x3a, 0x20, 0x61, 0x72, 0x72, 0x61, 0x79,
- 0x5b, 0x30, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20,
- 0x20, 0x2f, 0x2f, 0x20, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20,
- 0x65, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x62,
- 0x75, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x20,
- 0x65, 0x6e, 0x74, 0x72, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65,
- 0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x2e, 0x20, 0x45, 0x73, 0x70, 0x65,
- 0x63, 0x69, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x75, 0x73, 0x65, 0x66, 0x75,
- 0x6c, 0x20, 0x6f, 0x6e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x74, 0x68,
- 0x65, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x20,
- 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x20, 0x50, 0x61, 0x73, 0x73,
- 0x69, 0x6e, 0x67, 0x20, 0x2a, 0x2a, 0x6e, 0x2a, 0x2a, 0x20, 0x77, 0x69,
- 0x6c, 0x6c, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x61, 0x6c,
- 0x6c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73,
- 0x20, 0x69, 0x6e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x74, 0x68, 0x65,
- 0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x2c, 0x20, 0x65, 0x78, 0x63, 0x6c,
- 0x75, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x61,
- 0x73, 0x74, 0x20, 0x4e, 0x2e, 0x20, 0x54, 0x68, 0x65, 0x20, 0x2a, 0x2a,
- 0x67, 0x75, 0x61, 0x72, 0x64, 0x2a, 0x2a, 0x20, 0x63, 0x68, 0x65, 0x63,
- 0x6b, 0x20, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x73, 0x20, 0x69, 0x74, 0x20,
- 0x74, 0x6f, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x77, 0x69, 0x74, 0x68,
- 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x60, 0x5f, 0x2e, 0x6d, 0x61, 0x70,
- 0x60, 0x2e, 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x69, 0x6e, 0x69, 0x74, 0x69,
- 0x61, 0x6c, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
- 0x6e, 0x28, 0x61, 0x72, 0x72, 0x61, 0x79, 0x2c, 0x20, 0x6e, 0x2c, 0x20,
- 0x67, 0x75, 0x61, 0x72, 0x64, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x6c, 0x69, 0x63,
- 0x65, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x61, 0x72, 0x72, 0x61, 0x79,
- 0x2c, 0x20, 0x30, 0x2c, 0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x2e, 0x6c,
- 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x2d, 0x20, 0x28, 0x28, 0x6e, 0x20,
- 0x3d, 0x3d, 0x20, 0x6e, 0x75, 0x6c, 0x6c, 0x29, 0x20, 0x7c, 0x7c, 0x20,
- 0x67, 0x75, 0x61, 0x72, 0x64, 0x20, 0x3f, 0x20, 0x31, 0x20, 0x3a, 0x20,
- 0x6e, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20,
- 0x20, 0x2f, 0x2f, 0x20, 0x47, 0x65, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20,
- 0x6c, 0x61, 0x73, 0x74, 0x20, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74,
- 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x72, 0x72, 0x61, 0x79,
- 0x2e, 0x20, 0x50, 0x61, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x2a, 0x2a,
- 0x6e, 0x2a, 0x2a, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x72, 0x65, 0x74,
- 0x75, 0x72, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x61, 0x73, 0x74,
- 0x20, 0x4e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x76, 0x61, 0x6c, 0x75,
- 0x65, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x72,
- 0x72, 0x61, 0x79, 0x2e, 0x20, 0x54, 0x68, 0x65, 0x20, 0x2a, 0x2a, 0x67,
- 0x75, 0x61, 0x72, 0x64, 0x2a, 0x2a, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b,
- 0x20, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x73, 0x20, 0x69, 0x74, 0x20, 0x74,
- 0x6f, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20,
- 0x60, 0x5f, 0x2e, 0x6d, 0x61, 0x70, 0x60, 0x2e, 0x0a, 0x20, 0x20, 0x5f,
- 0x2e, 0x6c, 0x61, 0x73, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63,
- 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x61, 0x72, 0x72, 0x61, 0x79, 0x2c, 0x20,
- 0x6e, 0x2c, 0x20, 0x67, 0x75, 0x61, 0x72, 0x64, 0x29, 0x20, 0x7b, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x61, 0x72, 0x72, 0x61,
- 0x79, 0x20, 0x3d, 0x3d, 0x20, 0x6e, 0x75, 0x6c, 0x6c, 0x29, 0x20, 0x72,
- 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x30,
- 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x28, 0x6e,
- 0x20, 0x21, 0x3d, 0x20, 0x6e, 0x75, 0x6c, 0x6c, 0x29, 0x20, 0x26, 0x26,
- 0x20, 0x21, 0x67, 0x75, 0x61, 0x72, 0x64, 0x29, 0x20, 0x7b, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20,
- 0x73, 0x6c, 0x69, 0x63, 0x65, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x61,
- 0x72, 0x72, 0x61, 0x79, 0x2c, 0x20, 0x4d, 0x61, 0x74, 0x68, 0x2e, 0x6d,
- 0x61, 0x78, 0x28, 0x61, 0x72, 0x72, 0x61, 0x79, 0x2e, 0x6c, 0x65, 0x6e,
- 0x67, 0x74, 0x68, 0x20, 0x2d, 0x20, 0x6e, 0x2c, 0x20, 0x30, 0x29, 0x29,
- 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x20, 0x65, 0x6c, 0x73, 0x65,
- 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74,
- 0x75, 0x72, 0x6e, 0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x5b, 0x61, 0x72,
- 0x72, 0x61, 0x79, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x2d,
- 0x20, 0x31, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20,
- 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x52, 0x65,
- 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x65, 0x76, 0x65, 0x72, 0x79, 0x74,
- 0x68, 0x69, 0x6e, 0x67, 0x20, 0x62, 0x75, 0x74, 0x20, 0x74, 0x68, 0x65,
- 0x20, 0x66, 0x69, 0x72, 0x73, 0x74, 0x20, 0x65, 0x6e, 0x74, 0x72, 0x79,
- 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x72, 0x72, 0x61,
- 0x79, 0x2e, 0x20, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x64, 0x20, 0x61,
- 0x73, 0x20, 0x60, 0x74, 0x61, 0x69, 0x6c, 0x60, 0x20, 0x61, 0x6e, 0x64,
- 0x20, 0x60, 0x64, 0x72, 0x6f, 0x70, 0x60, 0x2e, 0x0a, 0x20, 0x20, 0x2f,
- 0x2f, 0x20, 0x45, 0x73, 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, 0x6c, 0x79,
- 0x20, 0x75, 0x73, 0x65, 0x66, 0x75, 0x6c, 0x20, 0x6f, 0x6e, 0x20, 0x74,
- 0x68, 0x65, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73,
- 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x20, 0x50, 0x61, 0x73,
- 0x73, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x6e, 0x20, 0x2a, 0x2a, 0x6e, 0x2a,
- 0x2a, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72,
- 0x6e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72,
- 0x65, 0x73, 0x74, 0x20, 0x4e, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73,
- 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x72, 0x72, 0x61,
- 0x79, 0x2e, 0x20, 0x54, 0x68, 0x65, 0x20, 0x2a, 0x2a, 0x67, 0x75, 0x61,
- 0x72, 0x64, 0x2a, 0x2a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x63, 0x68,
- 0x65, 0x63, 0x6b, 0x20, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x73, 0x20, 0x69,
- 0x74, 0x20, 0x74, 0x6f, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x77, 0x69,
- 0x74, 0x68, 0x20, 0x60, 0x5f, 0x2e, 0x6d, 0x61, 0x70, 0x60, 0x2e, 0x0a,
- 0x20, 0x20, 0x5f, 0x2e, 0x72, 0x65, 0x73, 0x74, 0x20, 0x3d, 0x20, 0x5f,
- 0x2e, 0x74, 0x61, 0x69, 0x6c, 0x20, 0x3d, 0x20, 0x5f, 0x2e, 0x64, 0x72,
- 0x6f, 0x70, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
- 0x6e, 0x28, 0x61, 0x72, 0x72, 0x61, 0x79, 0x2c, 0x20, 0x6e, 0x2c, 0x20,
- 0x67, 0x75, 0x61, 0x72, 0x64, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x6c, 0x69, 0x63,
- 0x65, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x61, 0x72, 0x72, 0x61, 0x79,
- 0x2c, 0x20, 0x28, 0x6e, 0x20, 0x3d, 0x3d, 0x20, 0x6e, 0x75, 0x6c, 0x6c,
- 0x29, 0x20, 0x7c, 0x7c, 0x20, 0x67, 0x75, 0x61, 0x72, 0x64, 0x20, 0x3f,
- 0x20, 0x31, 0x20, 0x3a, 0x20, 0x6e, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x7d,
- 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x72, 0x69, 0x6d,
- 0x20, 0x6f, 0x75, 0x74, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x66, 0x61, 0x6c,
- 0x73, 0x79, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x20, 0x66, 0x72,
- 0x6f, 0x6d, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x2e,
- 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x63, 0x74,
- 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28,
- 0x61, 0x72, 0x72, 0x61, 0x79, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x2e, 0x66, 0x69,
- 0x6c, 0x74, 0x65, 0x72, 0x28, 0x61, 0x72, 0x72, 0x61, 0x79, 0x2c, 0x20,
- 0x5f, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x29, 0x3b,
- 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20,
- 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x20, 0x69, 0x6d, 0x70,
- 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20,
- 0x6f, 0x66, 0x20, 0x61, 0x20, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69,
- 0x76, 0x65, 0x20, 0x60, 0x66, 0x6c, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x60,
- 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x20,
- 0x20, 0x76, 0x61, 0x72, 0x20, 0x66, 0x6c, 0x61, 0x74, 0x74, 0x65, 0x6e,
- 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28,
- 0x69, 0x6e, 0x70, 0x75, 0x74, 0x2c, 0x20, 0x73, 0x68, 0x61, 0x6c, 0x6c,
- 0x6f, 0x77, 0x2c, 0x20, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x29, 0x20,
- 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x61, 0x63, 0x68, 0x28, 0x69,
- 0x6e, 0x70, 0x75, 0x74, 0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69,
- 0x6f, 0x6e, 0x28, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x29, 0x20, 0x7b, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x5f, 0x2e,
- 0x69, 0x73, 0x41, 0x72, 0x72, 0x61, 0x79, 0x28, 0x76, 0x61, 0x6c, 0x75,
- 0x65, 0x29, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x73, 0x68, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x20, 0x3f, 0x20,
- 0x70, 0x75, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x28, 0x6f,
- 0x75, 0x74, 0x70, 0x75, 0x74, 0x2c, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65,
- 0x29, 0x20, 0x3a, 0x20, 0x66, 0x6c, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x28,
- 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2c, 0x20, 0x73, 0x68, 0x61, 0x6c, 0x6c,
- 0x6f, 0x77, 0x2c, 0x20, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x29, 0x3b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x20, 0x65, 0x6c, 0x73,
- 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x70, 0x75, 0x73, 0x68, 0x28,
- 0x76, 0x61, 0x6c, 0x75, 0x65, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x29, 0x3b, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6f,
- 0x75, 0x74, 0x70, 0x75, 0x74, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a,
- 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e,
- 0x20, 0x61, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x6c,
- 0x79, 0x20, 0x66, 0x6c, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x65, 0x64, 0x20,
- 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x61,
- 0x6e, 0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x2e, 0x0a, 0x20, 0x20, 0x5f,
- 0x2e, 0x66, 0x6c, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x20, 0x3d, 0x20, 0x66,
- 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x61, 0x72, 0x72, 0x61,
- 0x79, 0x2c, 0x20, 0x73, 0x68, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x29, 0x20,
- 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e,
- 0x20, 0x66, 0x6c, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x28, 0x61, 0x72, 0x72,
- 0x61, 0x79, 0x2c, 0x20, 0x73, 0x68, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x2c,
- 0x20, 0x5b, 0x5d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a,
- 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20,
- 0x61, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66,
- 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x20, 0x74,
- 0x68, 0x61, 0x74, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74,
- 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65,
- 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x76,
- 0x61, 0x6c, 0x75, 0x65, 0x28, 0x73, 0x29, 0x2e, 0x0a, 0x20, 0x20, 0x5f,
- 0x2e, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x20, 0x3d, 0x20, 0x66,
- 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x61, 0x72, 0x72, 0x61,
- 0x79, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74,
- 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x2e, 0x64, 0x69, 0x66, 0x66, 0x65, 0x72,
- 0x65, 0x6e, 0x63, 0x65, 0x28, 0x61, 0x72, 0x72, 0x61, 0x79, 0x2c, 0x20,
- 0x73, 0x6c, 0x69, 0x63, 0x65, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x61,
- 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2c, 0x20, 0x31, 0x29,
- 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f,
- 0x2f, 0x20, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x20, 0x61, 0x20,
- 0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2d, 0x66, 0x72,
- 0x65, 0x65, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f,
- 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x2e,
- 0x20, 0x49, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x72, 0x72, 0x61,
- 0x79, 0x20, 0x68, 0x61, 0x73, 0x20, 0x61, 0x6c, 0x72, 0x65, 0x61, 0x64,
- 0x79, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x62, 0x65, 0x65, 0x6e, 0x20,
- 0x73, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x2c, 0x20, 0x79, 0x6f, 0x75, 0x20,
- 0x68, 0x61, 0x76, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x70, 0x74,
- 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x75, 0x73, 0x69, 0x6e, 0x67,
- 0x20, 0x61, 0x20, 0x66, 0x61, 0x73, 0x74, 0x65, 0x72, 0x20, 0x61, 0x6c,
- 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x2e, 0x0a, 0x20, 0x20, 0x2f,
- 0x2f, 0x20, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x64, 0x20, 0x61, 0x73,
- 0x20, 0x60, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x60, 0x2e, 0x0a, 0x20,
- 0x20, 0x5f, 0x2e, 0x75, 0x6e, 0x69, 0x71, 0x20, 0x3d, 0x20, 0x5f, 0x2e,
- 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e,
- 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x61, 0x72, 0x72, 0x61, 0x79, 0x2c,
- 0x20, 0x69, 0x73, 0x53, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x2c, 0x20, 0x69,
- 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2c, 0x20, 0x63, 0x6f, 0x6e,
- 0x74, 0x65, 0x78, 0x74, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x69, 0x66, 0x20, 0x28, 0x5f, 0x2e, 0x69, 0x73, 0x46, 0x75, 0x6e, 0x63,
- 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x69, 0x73, 0x53, 0x6f, 0x72, 0x74, 0x65,
- 0x64, 0x29, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x20, 0x3d, 0x20, 0x69, 0x74,
- 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x20, 0x3d,
- 0x20, 0x69, 0x73, 0x53, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x3b, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x73, 0x53, 0x6f, 0x72, 0x74, 0x65,
- 0x64, 0x20, 0x3d, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x3b, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72,
- 0x20, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x20, 0x3d, 0x20, 0x69,
- 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x20, 0x3f, 0x20, 0x5f, 0x2e,
- 0x6d, 0x61, 0x70, 0x28, 0x61, 0x72, 0x72, 0x61, 0x79, 0x2c, 0x20, 0x69,
- 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2c, 0x20, 0x63, 0x6f, 0x6e,
- 0x74, 0x65, 0x78, 0x74, 0x29, 0x20, 0x3a, 0x20, 0x61, 0x72, 0x72, 0x61,
- 0x79, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x72,
- 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x20, 0x3d, 0x20, 0x5b, 0x5d, 0x3b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x73, 0x65, 0x65,
- 0x6e, 0x20, 0x3d, 0x20, 0x5b, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x65, 0x61, 0x63, 0x68, 0x28, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c,
- 0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x76,
- 0x61, 0x6c, 0x75, 0x65, 0x2c, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x29,
- 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20,
- 0x28, 0x69, 0x73, 0x53, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x20, 0x3f, 0x20,
- 0x28, 0x21, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x7c, 0x7c, 0x20, 0x73,
- 0x65, 0x65, 0x6e, 0x5b, 0x73, 0x65, 0x65, 0x6e, 0x2e, 0x6c, 0x65, 0x6e,
- 0x67, 0x74, 0x68, 0x20, 0x2d, 0x20, 0x31, 0x5d, 0x20, 0x21, 0x3d, 0x3d,
- 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x29, 0x20, 0x3a, 0x20, 0x21, 0x5f,
- 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x28, 0x73, 0x65,
- 0x65, 0x6e, 0x2c, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x29, 0x29, 0x20,
- 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65,
- 0x65, 0x6e, 0x2e, 0x70, 0x75, 0x73, 0x68, 0x28, 0x76, 0x61, 0x6c, 0x75,
- 0x65, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x70, 0x75, 0x73, 0x68,
- 0x28, 0x61, 0x72, 0x72, 0x61, 0x79, 0x5b, 0x69, 0x6e, 0x64, 0x65, 0x78,
- 0x5d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x7d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c,
- 0x74, 0x73, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20,
- 0x2f, 0x2f, 0x20, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x20, 0x61,
- 0x6e, 0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x20, 0x74, 0x68, 0x61, 0x74,
- 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x20, 0x74, 0x68,
- 0x65, 0x20, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x65, 0x61, 0x63,
- 0x68, 0x20, 0x64, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x63, 0x74, 0x20, 0x65,
- 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20,
- 0x61, 0x6c, 0x6c, 0x20, 0x6f, 0x66, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20,
- 0x74, 0x68, 0x65, 0x20, 0x70, 0x61, 0x73, 0x73, 0x65, 0x64, 0x2d, 0x69,
- 0x6e, 0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x73, 0x2e, 0x0a, 0x20, 0x20,
- 0x5f, 0x2e, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x66, 0x75,
- 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x20, 0x7b, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x2e,
- 0x75, 0x6e, 0x69, 0x71, 0x28, 0x63, 0x6f, 0x6e, 0x63, 0x61, 0x74, 0x2e,
- 0x61, 0x70, 0x70, 0x6c, 0x79, 0x28, 0x41, 0x72, 0x72, 0x61, 0x79, 0x50,
- 0x72, 0x6f, 0x74, 0x6f, 0x2c, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65,
- 0x6e, 0x74, 0x73, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a,
- 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63,
- 0x65, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x20, 0x74,
- 0x68, 0x61, 0x74, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73,
- 0x20, 0x65, 0x76, 0x65, 0x72, 0x79, 0x20, 0x69, 0x74, 0x65, 0x6d, 0x20,
- 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x20, 0x62, 0x65, 0x74, 0x77, 0x65,
- 0x65, 0x6e, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20,
- 0x20, 0x2f, 0x2f, 0x20, 0x70, 0x61, 0x73, 0x73, 0x65, 0x64, 0x2d, 0x69,
- 0x6e, 0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x73, 0x2e, 0x0a, 0x20, 0x20,
- 0x5f, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x65, 0x63, 0x74, 0x69,
- 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
- 0x6e, 0x28, 0x61, 0x72, 0x72, 0x61, 0x79, 0x29, 0x20, 0x7b, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x72, 0x65, 0x73, 0x74, 0x20,
- 0x3d, 0x20, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x2e, 0x63, 0x61, 0x6c, 0x6c,
- 0x28, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2c, 0x20,
- 0x31, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75,
- 0x72, 0x6e, 0x20, 0x5f, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x28,
- 0x5f, 0x2e, 0x75, 0x6e, 0x69, 0x71, 0x28, 0x61, 0x72, 0x72, 0x61, 0x79,
- 0x29, 0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28,
- 0x69, 0x74, 0x65, 0x6d, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x2e, 0x65,
- 0x76, 0x65, 0x72, 0x79, 0x28, 0x72, 0x65, 0x73, 0x74, 0x2c, 0x20, 0x66,
- 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6f, 0x74, 0x68, 0x65,
- 0x72, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x2e, 0x69, 0x6e,
- 0x64, 0x65, 0x78, 0x4f, 0x66, 0x28, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x2c,
- 0x20, 0x69, 0x74, 0x65, 0x6d, 0x29, 0x20, 0x3e, 0x3d, 0x20, 0x30, 0x3b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x29, 0x3b, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x7d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a,
- 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x61, 0x6b, 0x65, 0x20, 0x74,
- 0x68, 0x65, 0x20, 0x64, 0x69, 0x66, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63,
- 0x65, 0x20, 0x62, 0x65, 0x74, 0x77, 0x65, 0x65, 0x6e, 0x20, 0x6f, 0x6e,
- 0x65, 0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x20, 0x61, 0x6e, 0x64, 0x20,
- 0x61, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x6f, 0x66, 0x20,
- 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x73,
- 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x4f, 0x6e, 0x6c, 0x79, 0x20,
- 0x74, 0x68, 0x65, 0x20, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73,
- 0x20, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x20, 0x69, 0x6e, 0x20,
- 0x6a, 0x75, 0x73, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x69, 0x72,
- 0x73, 0x74, 0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x20, 0x77, 0x69, 0x6c,
- 0x6c, 0x20, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x0a, 0x20, 0x20,
- 0x5f, 0x2e, 0x64, 0x69, 0x66, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65,
- 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28,
- 0x61, 0x72, 0x72, 0x61, 0x79, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x76, 0x61, 0x72, 0x20, 0x72, 0x65, 0x73, 0x74, 0x20, 0x3d, 0x20,
- 0x63, 0x6f, 0x6e, 0x63, 0x61, 0x74, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x79,
- 0x28, 0x41, 0x72, 0x72, 0x61, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2c,
- 0x20, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x28,
- 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2c, 0x20, 0x31,
- 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75,
- 0x72, 0x6e, 0x20, 0x5f, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x28,
- 0x61, 0x72, 0x72, 0x61, 0x79, 0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74,
- 0x69, 0x6f, 0x6e, 0x28, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x29, 0x7b, 0x20,
- 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x21, 0x5f, 0x2e, 0x63, 0x6f,
- 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x28, 0x72, 0x65, 0x73, 0x74, 0x2c,
- 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x29, 0x3b, 0x20, 0x7d, 0x29, 0x3b,
- 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20,
- 0x5a, 0x69, 0x70, 0x20, 0x74, 0x6f, 0x67, 0x65, 0x74, 0x68, 0x65, 0x72,
- 0x20, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x20, 0x6c, 0x69,
- 0x73, 0x74, 0x73, 0x20, 0x69, 0x6e, 0x74, 0x6f, 0x20, 0x61, 0x20, 0x73,
- 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x20,
- 0x2d, 0x2d, 0x20, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x20,
- 0x74, 0x68, 0x61, 0x74, 0x20, 0x73, 0x68, 0x61, 0x72, 0x65, 0x0a, 0x20,
- 0x20, 0x2f, 0x2f, 0x20, 0x61, 0x6e, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x78,
- 0x20, 0x67, 0x6f, 0x20, 0x74, 0x6f, 0x67, 0x65, 0x74, 0x68, 0x65, 0x72,
- 0x2e, 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x7a, 0x69, 0x70, 0x20, 0x3d, 0x20,
- 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x20, 0x7b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x61, 0x72, 0x67,
- 0x73, 0x20, 0x3d, 0x20, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x2e, 0x63, 0x61,
- 0x6c, 0x6c, 0x28, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73,
- 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x6c,
- 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x5f, 0x2e, 0x6d, 0x61,
- 0x78, 0x28, 0x5f, 0x2e, 0x70, 0x6c, 0x75, 0x63, 0x6b, 0x28, 0x61, 0x72,
- 0x67, 0x73, 0x2c, 0x20, 0x27, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x27,
- 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20,
- 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x20, 0x3d, 0x20, 0x6e, 0x65,
- 0x77, 0x20, 0x41, 0x72, 0x72, 0x61, 0x79, 0x28, 0x6c, 0x65, 0x6e, 0x67,
- 0x74, 0x68, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72,
- 0x20, 0x28, 0x76, 0x61, 0x72, 0x20, 0x69, 0x20, 0x3d, 0x20, 0x30, 0x3b,
- 0x20, 0x69, 0x20, 0x3c, 0x20, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3b,
- 0x20, 0x69, 0x2b, 0x2b, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x5b, 0x69, 0x5d,
- 0x20, 0x3d, 0x20, 0x5f, 0x2e, 0x70, 0x6c, 0x75, 0x63, 0x6b, 0x28, 0x61,
- 0x72, 0x67, 0x73, 0x2c, 0x20, 0x22, 0x22, 0x20, 0x2b, 0x20, 0x69, 0x29,
- 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c,
- 0x74, 0x73, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20,
- 0x2f, 0x2f, 0x20, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x73, 0x20,
- 0x6c, 0x69, 0x73, 0x74, 0x73, 0x20, 0x69, 0x6e, 0x74, 0x6f, 0x20, 0x6f,
- 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2e, 0x20, 0x50, 0x61, 0x73, 0x73,
- 0x20, 0x65, 0x69, 0x74, 0x68, 0x65, 0x72, 0x20, 0x61, 0x20, 0x73, 0x69,
- 0x6e, 0x67, 0x6c, 0x65, 0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x20, 0x6f,
- 0x66, 0x20, 0x60, 0x5b, 0x6b, 0x65, 0x79, 0x2c, 0x20, 0x76, 0x61, 0x6c,
- 0x75, 0x65, 0x5d, 0x60, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x70, 0x61,
- 0x69, 0x72, 0x73, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x74, 0x77, 0x6f, 0x20,
- 0x70, 0x61, 0x72, 0x61, 0x6c, 0x6c, 0x65, 0x6c, 0x20, 0x61, 0x72, 0x72,
- 0x61, 0x79, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73,
- 0x61, 0x6d, 0x65, 0x20, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x2d,
- 0x2d, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x6b, 0x65, 0x79,
- 0x73, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x6f,
- 0x66, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63,
- 0x6f, 0x72, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67,
- 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x5f,
- 0x2e, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x75,
- 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6c, 0x69, 0x73, 0x74, 0x2c,
- 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x29, 0x20, 0x7b, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x6c, 0x69, 0x73, 0x74, 0x20,
- 0x3d, 0x3d, 0x20, 0x6e, 0x75, 0x6c, 0x6c, 0x29, 0x20, 0x72, 0x65, 0x74,
- 0x75, 0x72, 0x6e, 0x20, 0x7b, 0x7d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x76, 0x61, 0x72, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x20, 0x3d,
- 0x20, 0x7b, 0x7d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72,
- 0x20, 0x28, 0x76, 0x61, 0x72, 0x20, 0x69, 0x20, 0x3d, 0x20, 0x30, 0x2c,
- 0x20, 0x6c, 0x20, 0x3d, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x2e, 0x6c, 0x65,
- 0x6e, 0x67, 0x74, 0x68, 0x3b, 0x20, 0x69, 0x20, 0x3c, 0x20, 0x6c, 0x3b,
- 0x20, 0x69, 0x2b, 0x2b, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73,
- 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x5b, 0x6c, 0x69, 0x73, 0x74, 0x5b,
- 0x69, 0x5d, 0x5d, 0x20, 0x3d, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73,
- 0x5b, 0x69, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d,
- 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x5b, 0x6c,
- 0x69, 0x73, 0x74, 0x5b, 0x69, 0x5d, 0x5b, 0x30, 0x5d, 0x5d, 0x20, 0x3d,
- 0x20, 0x6c, 0x69, 0x73, 0x74, 0x5b, 0x69, 0x5d, 0x5b, 0x31, 0x5d, 0x3b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72,
- 0x6e, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x3b, 0x0a, 0x20, 0x20,
- 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x66, 0x20,
- 0x74, 0x68, 0x65, 0x20, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x20,
- 0x64, 0x6f, 0x65, 0x73, 0x6e, 0x27, 0x74, 0x20, 0x73, 0x75, 0x70, 0x70,
- 0x6c, 0x79, 0x20, 0x75, 0x73, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x69,
- 0x6e, 0x64, 0x65, 0x78, 0x4f, 0x66, 0x20, 0x28, 0x49, 0x27, 0x6d, 0x20,
- 0x6c, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x74, 0x20, 0x79,
- 0x6f, 0x75, 0x2c, 0x20, 0x2a, 0x2a, 0x4d, 0x53, 0x49, 0x45, 0x2a, 0x2a,
- 0x29, 0x2c, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x77, 0x65, 0x20, 0x6e,
- 0x65, 0x65, 0x64, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x66, 0x75, 0x6e,
- 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x20, 0x52, 0x65, 0x74, 0x75, 0x72,
- 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69,
- 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x69,
- 0x72, 0x73, 0x74, 0x20, 0x6f, 0x63, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e,
- 0x63, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x0a, 0x20, 0x20, 0x2f,
- 0x2f, 0x20, 0x69, 0x74, 0x65, 0x6d, 0x20, 0x69, 0x6e, 0x20, 0x61, 0x6e,
- 0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x2d,
- 0x31, 0x20, 0x69, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x69, 0x74, 0x65,
- 0x6d, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x69, 0x6e, 0x63,
- 0x6c, 0x75, 0x64, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65,
- 0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f,
- 0x20, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x73, 0x20, 0x74,
- 0x6f, 0x20, 0x2a, 0x2a, 0x45, 0x43, 0x4d, 0x41, 0x53, 0x63, 0x72, 0x69,
- 0x70, 0x74, 0x20, 0x35, 0x2a, 0x2a, 0x27, 0x73, 0x20, 0x6e, 0x61, 0x74,
- 0x69, 0x76, 0x65, 0x20, 0x60, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x4f, 0x66,
- 0x60, 0x20, 0x69, 0x66, 0x20, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62,
- 0x6c, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x66, 0x20,
- 0x74, 0x68, 0x65, 0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x20, 0x69, 0x73,
- 0x20, 0x6c, 0x61, 0x72, 0x67, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61,
- 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, 0x20, 0x69, 0x6e, 0x20, 0x73, 0x6f,
- 0x72, 0x74, 0x20, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x2c, 0x20, 0x70, 0x61,
- 0x73, 0x73, 0x20, 0x60, 0x74, 0x72, 0x75, 0x65, 0x60, 0x0a, 0x20, 0x20,
- 0x2f, 0x2f, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x2a, 0x2a, 0x69, 0x73, 0x53,
- 0x6f, 0x72, 0x74, 0x65, 0x64, 0x2a, 0x2a, 0x20, 0x74, 0x6f, 0x20, 0x75,
- 0x73, 0x65, 0x20, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x20, 0x73, 0x65,
- 0x61, 0x72, 0x63, 0x68, 0x2e, 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x69, 0x6e,
- 0x64, 0x65, 0x78, 0x4f, 0x66, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63,
- 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x61, 0x72, 0x72, 0x61, 0x79, 0x2c, 0x20,
- 0x69, 0x74, 0x65, 0x6d, 0x2c, 0x20, 0x69, 0x73, 0x53, 0x6f, 0x72, 0x74,
- 0x65, 0x64, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66,
- 0x20, 0x28, 0x61, 0x72, 0x72, 0x61, 0x79, 0x20, 0x3d, 0x3d, 0x20, 0x6e,
- 0x75, 0x6c, 0x6c, 0x29, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20,
- 0x2d, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20,
- 0x69, 0x20, 0x3d, 0x20, 0x30, 0x2c, 0x20, 0x6c, 0x20, 0x3d, 0x20, 0x61,
- 0x72, 0x72, 0x61, 0x79, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x69, 0x73, 0x53,
- 0x6f, 0x72, 0x74, 0x65, 0x64, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x74, 0x79, 0x70, 0x65, 0x6f,
- 0x66, 0x20, 0x69, 0x73, 0x53, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x20, 0x3d,
- 0x3d, 0x20, 0x27, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x27, 0x29, 0x20,
- 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x20,
- 0x3d, 0x20, 0x28, 0x69, 0x73, 0x53, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x20,
- 0x3c, 0x20, 0x30, 0x20, 0x3f, 0x20, 0x4d, 0x61, 0x74, 0x68, 0x2e, 0x6d,
- 0x61, 0x78, 0x28, 0x30, 0x2c, 0x20, 0x6c, 0x20, 0x2b, 0x20, 0x69, 0x73,
- 0x53, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x29, 0x20, 0x3a, 0x20, 0x69, 0x73,
- 0x53, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x7d, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x7b, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x20, 0x3d, 0x20,
- 0x5f, 0x2e, 0x73, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x49, 0x6e, 0x64, 0x65,
- 0x78, 0x28, 0x61, 0x72, 0x72, 0x61, 0x79, 0x2c, 0x20, 0x69, 0x74, 0x65,
- 0x6d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x61, 0x72, 0x72, 0x61, 0x79,
- 0x5b, 0x69, 0x5d, 0x20, 0x3d, 0x3d, 0x3d, 0x20, 0x69, 0x74, 0x65, 0x6d,
- 0x20, 0x3f, 0x20, 0x69, 0x20, 0x3a, 0x20, 0x2d, 0x31, 0x3b, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x6e, 0x61, 0x74,
- 0x69, 0x76, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x4f, 0x66, 0x20, 0x26,
- 0x26, 0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x2e, 0x69, 0x6e, 0x64, 0x65,
- 0x78, 0x4f, 0x66, 0x20, 0x3d, 0x3d, 0x3d, 0x20, 0x6e, 0x61, 0x74, 0x69,
- 0x76, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x4f, 0x66, 0x29, 0x20, 0x72,
- 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x2e,
- 0x69, 0x6e, 0x64, 0x65, 0x78, 0x4f, 0x66, 0x28, 0x69, 0x74, 0x65, 0x6d,
- 0x2c, 0x20, 0x69, 0x73, 0x53, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x29, 0x3b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x28, 0x3b, 0x20,
- 0x69, 0x20, 0x3c, 0x20, 0x6c, 0x3b, 0x20, 0x69, 0x2b, 0x2b, 0x29, 0x20,
- 0x69, 0x66, 0x20, 0x28, 0x61, 0x72, 0x72, 0x61, 0x79, 0x5b, 0x69, 0x5d,
- 0x20, 0x3d, 0x3d, 0x3d, 0x20, 0x69, 0x74, 0x65, 0x6d, 0x29, 0x20, 0x72,
- 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x69, 0x3b, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x2d, 0x31, 0x3b, 0x0a,
- 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x44,
- 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x73, 0x20, 0x74, 0x6f, 0x20,
- 0x2a, 0x2a, 0x45, 0x43, 0x4d, 0x41, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74,
- 0x20, 0x35, 0x2a, 0x2a, 0x27, 0x73, 0x20, 0x6e, 0x61, 0x74, 0x69, 0x76,
- 0x65, 0x20, 0x60, 0x6c, 0x61, 0x73, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78,
- 0x4f, 0x66, 0x60, 0x20, 0x69, 0x66, 0x20, 0x61, 0x76, 0x61, 0x69, 0x6c,
- 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x6c, 0x61,
- 0x73, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x4f, 0x66, 0x20, 0x3d, 0x20,
- 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x61, 0x72, 0x72,
- 0x61, 0x79, 0x2c, 0x20, 0x69, 0x74, 0x65, 0x6d, 0x2c, 0x20, 0x66, 0x72,
- 0x6f, 0x6d, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66,
- 0x20, 0x28, 0x61, 0x72, 0x72, 0x61, 0x79, 0x20, 0x3d, 0x3d, 0x20, 0x6e,
- 0x75, 0x6c, 0x6c, 0x29, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20,
- 0x2d, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20,
- 0x68, 0x61, 0x73, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x3d, 0x20, 0x66,
- 0x72, 0x6f, 0x6d, 0x20, 0x21, 0x3d, 0x20, 0x6e, 0x75, 0x6c, 0x6c, 0x3b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x6e, 0x61, 0x74,
- 0x69, 0x76, 0x65, 0x4c, 0x61, 0x73, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78,
- 0x4f, 0x66, 0x20, 0x26, 0x26, 0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x2e,
- 0x6c, 0x61, 0x73, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x4f, 0x66, 0x20,
- 0x3d, 0x3d, 0x3d, 0x20, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x4c, 0x61,
- 0x73, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x4f, 0x66, 0x29, 0x20, 0x7b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72,
- 0x6e, 0x20, 0x68, 0x61, 0x73, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x3f,
- 0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x2e, 0x6c, 0x61, 0x73, 0x74, 0x49,
- 0x6e, 0x64, 0x65, 0x78, 0x4f, 0x66, 0x28, 0x69, 0x74, 0x65, 0x6d, 0x2c,
- 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x29, 0x20, 0x3a, 0x20, 0x61, 0x72, 0x72,
- 0x61, 0x79, 0x2e, 0x6c, 0x61, 0x73, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78,
- 0x4f, 0x66, 0x28, 0x69, 0x74, 0x65, 0x6d, 0x29, 0x3b, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20,
- 0x69, 0x20, 0x3d, 0x20, 0x28, 0x68, 0x61, 0x73, 0x49, 0x6e, 0x64, 0x65,
- 0x78, 0x20, 0x3f, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x3a, 0x20, 0x61,
- 0x72, 0x72, 0x61, 0x79, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x29,
- 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x77, 0x68, 0x69, 0x6c, 0x65, 0x20,
- 0x28, 0x69, 0x2d, 0x2d, 0x29, 0x20, 0x69, 0x66, 0x20, 0x28, 0x61, 0x72,
- 0x72, 0x61, 0x79, 0x5b, 0x69, 0x5d, 0x20, 0x3d, 0x3d, 0x3d, 0x20, 0x69,
- 0x74, 0x65, 0x6d, 0x29, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20,
- 0x69, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72,
- 0x6e, 0x20, 0x2d, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a,
- 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74,
- 0x65, 0x20, 0x61, 0x6e, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72,
- 0x20, 0x41, 0x72, 0x72, 0x61, 0x79, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61,
- 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x72, 0x69,
- 0x74, 0x68, 0x6d, 0x65, 0x74, 0x69, 0x63, 0x20, 0x70, 0x72, 0x6f, 0x67,
- 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x20, 0x41, 0x20, 0x70,
- 0x6f, 0x72, 0x74, 0x20, 0x6f, 0x66, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20,
- 0x74, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x20, 0x50,
- 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x20, 0x60, 0x72, 0x61, 0x6e, 0x67, 0x65,
- 0x28, 0x29, 0x60, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e,
- 0x2e, 0x20, 0x53, 0x65, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x5b,
- 0x74, 0x68, 0x65, 0x20, 0x50, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x20, 0x64,
- 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
- 0x5d, 0x28, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x64, 0x6f, 0x63,
- 0x73, 0x2e, 0x70, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x2e, 0x6f, 0x72, 0x67,
- 0x2f, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x2f, 0x66, 0x75, 0x6e,
- 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x23,
- 0x72, 0x61, 0x6e, 0x67, 0x65, 0x29, 0x2e, 0x0a, 0x20, 0x20, 0x5f, 0x2e,
- 0x72, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63,
- 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x73, 0x74, 0x61, 0x72, 0x74, 0x2c, 0x20,
- 0x73, 0x74, 0x6f, 0x70, 0x2c, 0x20, 0x73, 0x74, 0x65, 0x70, 0x29, 0x20,
- 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x61, 0x72,
- 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x6c, 0x65, 0x6e, 0x67,
- 0x74, 0x68, 0x20, 0x3c, 0x3d, 0x20, 0x31, 0x29, 0x20, 0x7b, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x6f, 0x70, 0x20, 0x3d, 0x20,
- 0x73, 0x74, 0x61, 0x72, 0x74, 0x20, 0x7c, 0x7c, 0x20, 0x30, 0x3b, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x20,
- 0x3d, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x73, 0x74, 0x65, 0x70, 0x20, 0x3d, 0x20, 0x61, 0x72,
- 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x5b, 0x32, 0x5d, 0x20, 0x7c,
- 0x7c, 0x20, 0x31, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61,
- 0x72, 0x20, 0x6c, 0x65, 0x6e, 0x20, 0x3d, 0x20, 0x4d, 0x61, 0x74, 0x68,
- 0x2e, 0x6d, 0x61, 0x78, 0x28, 0x4d, 0x61, 0x74, 0x68, 0x2e, 0x63, 0x65,
- 0x69, 0x6c, 0x28, 0x28, 0x73, 0x74, 0x6f, 0x70, 0x20, 0x2d, 0x20, 0x73,
- 0x74, 0x61, 0x72, 0x74, 0x29, 0x20, 0x2f, 0x20, 0x73, 0x74, 0x65, 0x70,
- 0x29, 0x2c, 0x20, 0x30, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76,
- 0x61, 0x72, 0x20, 0x69, 0x64, 0x78, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x72, 0x61, 0x6e, 0x67,
- 0x65, 0x20, 0x3d, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x41, 0x72, 0x72, 0x61,
- 0x79, 0x28, 0x6c, 0x65, 0x6e, 0x29, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x77, 0x68, 0x69, 0x6c, 0x65, 0x28, 0x69, 0x64, 0x78, 0x20, 0x3c,
- 0x20, 0x6c, 0x65, 0x6e, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5b, 0x69, 0x64, 0x78, 0x2b,
- 0x2b, 0x5d, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x3b, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x20,
- 0x2b, 0x3d, 0x20, 0x73, 0x74, 0x65, 0x70, 0x3b, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x7d, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75,
- 0x72, 0x6e, 0x20, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x3b, 0x0a, 0x20, 0x20,
- 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x46, 0x75, 0x6e,
- 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x28, 0x61, 0x68, 0x65, 0x6d, 0x29,
- 0x20, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x0a, 0x20,
- 0x20, 0x2f, 0x2f, 0x20, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d,
- 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x0a,
- 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20,
- 0x61, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x62,
- 0x6f, 0x75, 0x6e, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x20, 0x67, 0x69,
- 0x76, 0x65, 0x6e, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x28,
- 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x60, 0x74,
- 0x68, 0x69, 0x73, 0x60, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x72,
- 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2c, 0x0a, 0x20, 0x20, 0x2f,
- 0x2f, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x6c, 0x79,
- 0x29, 0x2e, 0x20, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x73,
- 0x20, 0x74, 0x6f, 0x20, 0x2a, 0x2a, 0x45, 0x43, 0x4d, 0x41, 0x53, 0x63,
- 0x72, 0x69, 0x70, 0x74, 0x20, 0x35, 0x2a, 0x2a, 0x27, 0x73, 0x20, 0x6e,
- 0x61, 0x74, 0x69, 0x76, 0x65, 0x20, 0x60, 0x46, 0x75, 0x6e, 0x63, 0x74,
- 0x69, 0x6f, 0x6e, 0x2e, 0x62, 0x69, 0x6e, 0x64, 0x60, 0x20, 0x69, 0x66,
- 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61,
- 0x62, 0x6c, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x62, 0x69, 0x6e,
- 0x64, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e,
- 0x28, 0x66, 0x75, 0x6e, 0x63, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65,
- 0x78, 0x74, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66,
- 0x20, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x2e, 0x62, 0x69, 0x6e, 0x64, 0x20,
- 0x3d, 0x3d, 0x3d, 0x20, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x42, 0x69,
- 0x6e, 0x64, 0x20, 0x26, 0x26, 0x20, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65,
- 0x42, 0x69, 0x6e, 0x64, 0x29, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e,
- 0x20, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x2e,
- 0x61, 0x70, 0x70, 0x6c, 0x79, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x2c, 0x20,
- 0x73, 0x6c, 0x69, 0x63, 0x65, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x61,
- 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2c, 0x20, 0x31, 0x29,
- 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x61,
- 0x72, 0x67, 0x73, 0x20, 0x3d, 0x20, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x2e,
- 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e,
- 0x74, 0x73, 0x2c, 0x20, 0x32, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74,
- 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x75, 0x6e,
- 0x63, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x28, 0x63, 0x6f, 0x6e, 0x74,
- 0x65, 0x78, 0x74, 0x2c, 0x20, 0x61, 0x72, 0x67, 0x73, 0x2e, 0x63, 0x6f,
- 0x6e, 0x63, 0x61, 0x74, 0x28, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x2e, 0x63,
- 0x61, 0x6c, 0x6c, 0x28, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74,
- 0x73, 0x29, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x3b,
- 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20,
- 0x50, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x61, 0x70,
- 0x70, 0x6c, 0x79, 0x20, 0x61, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69,
- 0x6f, 0x6e, 0x20, 0x62, 0x79, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69,
- 0x6e, 0x67, 0x20, 0x61, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
- 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x68, 0x61, 0x73, 0x20, 0x68, 0x61,
- 0x64, 0x20, 0x73, 0x6f, 0x6d, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x69, 0x74,
- 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d,
- 0x65, 0x6e, 0x74, 0x73, 0x20, 0x70, 0x72, 0x65, 0x2d, 0x66, 0x69, 0x6c,
- 0x6c, 0x65, 0x64, 0x2c, 0x20, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74,
- 0x20, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x74,
- 0x73, 0x20, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x20, 0x60, 0x74,
- 0x68, 0x69, 0x73, 0x60, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74,
- 0x2e, 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61,
- 0x6c, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e,
- 0x28, 0x66, 0x75, 0x6e, 0x63, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x76, 0x61, 0x72, 0x20, 0x61, 0x72, 0x67, 0x73, 0x20, 0x3d, 0x20,
- 0x73, 0x6c, 0x69, 0x63, 0x65, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x61,
- 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2c, 0x20, 0x31, 0x29,
- 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e,
- 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x20,
- 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75,
- 0x72, 0x6e, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x2e, 0x61, 0x70, 0x70, 0x6c,
- 0x79, 0x28, 0x74, 0x68, 0x69, 0x73, 0x2c, 0x20, 0x61, 0x72, 0x67, 0x73,
- 0x2e, 0x63, 0x6f, 0x6e, 0x63, 0x61, 0x74, 0x28, 0x73, 0x6c, 0x69, 0x63,
- 0x65, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x61, 0x72, 0x67, 0x75, 0x6d,
- 0x65, 0x6e, 0x74, 0x73, 0x29, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x7d, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20,
- 0x2f, 0x2f, 0x20, 0x42, 0x69, 0x6e, 0x64, 0x20, 0x61, 0x6c, 0x6c, 0x20,
- 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74,
- 0x27, 0x73, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x20, 0x74,
- 0x6f, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63,
- 0x74, 0x2e, 0x20, 0x55, 0x73, 0x65, 0x66, 0x75, 0x6c, 0x20, 0x66, 0x6f,
- 0x72, 0x20, 0x65, 0x6e, 0x73, 0x75, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x74,
- 0x68, 0x61, 0x74, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x61, 0x6c, 0x6c,
- 0x20, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x20, 0x64,
- 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x20, 0x61, 0x6e,
- 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x62, 0x65, 0x6c, 0x6f,
- 0x6e, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x74, 0x2e, 0x0a, 0x20, 0x20,
- 0x5f, 0x2e, 0x62, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x20, 0x3d, 0x20,
- 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6f, 0x62, 0x6a,
- 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20,
- 0x66, 0x75, 0x6e, 0x63, 0x73, 0x20, 0x3d, 0x20, 0x73, 0x6c, 0x69, 0x63,
- 0x65, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x61, 0x72, 0x67, 0x75, 0x6d,
- 0x65, 0x6e, 0x74, 0x73, 0x2c, 0x20, 0x31, 0x29, 0x3b, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x73, 0x2e,
- 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x3d, 0x3d, 0x3d, 0x20, 0x30,
- 0x29, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x73, 0x20, 0x3d, 0x20, 0x5f, 0x2e,
- 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x28, 0x6f, 0x62,
- 0x6a, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x61, 0x63, 0x68,
- 0x28, 0x66, 0x75, 0x6e, 0x63, 0x73, 0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63,
- 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x66, 0x29, 0x20, 0x7b, 0x20, 0x6f, 0x62,
- 0x6a, 0x5b, 0x66, 0x5d, 0x20, 0x3d, 0x20, 0x5f, 0x2e, 0x62, 0x69, 0x6e,
- 0x64, 0x28, 0x6f, 0x62, 0x6a, 0x5b, 0x66, 0x5d, 0x2c, 0x20, 0x6f, 0x62,
- 0x6a, 0x29, 0x3b, 0x20, 0x7d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6f, 0x62, 0x6a, 0x3b, 0x0a,
- 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x4d,
- 0x65, 0x6d, 0x6f, 0x69, 0x7a, 0x65, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x78,
- 0x70, 0x65, 0x6e, 0x73, 0x69, 0x76, 0x65, 0x20, 0x66, 0x75, 0x6e, 0x63,
- 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x62, 0x79, 0x20, 0x73, 0x74, 0x6f, 0x72,
- 0x69, 0x6e, 0x67, 0x20, 0x69, 0x74, 0x73, 0x20, 0x72, 0x65, 0x73, 0x75,
- 0x6c, 0x74, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x6d, 0x65, 0x6d,
- 0x6f, 0x69, 0x7a, 0x65, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74,
- 0x69, 0x6f, 0x6e, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x2c, 0x20, 0x68, 0x61,
- 0x73, 0x68, 0x65, 0x72, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x76, 0x61, 0x72, 0x20, 0x6d, 0x65, 0x6d, 0x6f, 0x20, 0x3d, 0x20, 0x7b,
- 0x7d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x68, 0x61, 0x73, 0x68, 0x65,
- 0x72, 0x20, 0x7c, 0x7c, 0x20, 0x28, 0x68, 0x61, 0x73, 0x68, 0x65, 0x72,
- 0x20, 0x3d, 0x20, 0x5f, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74,
- 0x79, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75,
- 0x72, 0x6e, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28,
- 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61,
- 0x72, 0x20, 0x6b, 0x65, 0x79, 0x20, 0x3d, 0x20, 0x68, 0x61, 0x73, 0x68,
- 0x65, 0x72, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x28, 0x74, 0x68, 0x69,
- 0x73, 0x2c, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73,
- 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74,
- 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x2e, 0x68, 0x61, 0x73, 0x28, 0x6d, 0x65,
- 0x6d, 0x6f, 0x2c, 0x20, 0x6b, 0x65, 0x79, 0x29, 0x20, 0x3f, 0x20, 0x6d,
- 0x65, 0x6d, 0x6f, 0x5b, 0x6b, 0x65, 0x79, 0x5d, 0x20, 0x3a, 0x20, 0x28,
- 0x6d, 0x65, 0x6d, 0x6f, 0x5b, 0x6b, 0x65, 0x79, 0x5d, 0x20, 0x3d, 0x20,
- 0x66, 0x75, 0x6e, 0x63, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x28, 0x74,
- 0x68, 0x69, 0x73, 0x2c, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e,
- 0x74, 0x73, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x3b,
- 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20,
- 0x44, 0x65, 0x6c, 0x61, 0x79, 0x73, 0x20, 0x61, 0x20, 0x66, 0x75, 0x6e,
- 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68,
- 0x65, 0x20, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x20, 0x6e, 0x75, 0x6d, 0x62,
- 0x65, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x6d, 0x69, 0x6c, 0x6c, 0x69, 0x73,
- 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20,
- 0x74, 0x68, 0x65, 0x6e, 0x20, 0x63, 0x61, 0x6c, 0x6c, 0x73, 0x0a, 0x20,
- 0x20, 0x2f, 0x2f, 0x20, 0x69, 0x74, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20,
- 0x74, 0x68, 0x65, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74,
- 0x73, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x2e, 0x0a,
- 0x20, 0x20, 0x5f, 0x2e, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x20, 0x3d, 0x20,
- 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x66, 0x75, 0x6e,
- 0x63, 0x2c, 0x20, 0x77, 0x61, 0x69, 0x74, 0x29, 0x20, 0x7b, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x61, 0x72, 0x67, 0x73, 0x20,
- 0x3d, 0x20, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x2e, 0x63, 0x61, 0x6c, 0x6c,
- 0x28, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2c, 0x20,
- 0x32, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75,
- 0x72, 0x6e, 0x20, 0x73, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75,
- 0x74, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29,
- 0x7b, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x75, 0x6e,
- 0x63, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x28, 0x6e, 0x75, 0x6c, 0x6c,
- 0x2c, 0x20, 0x61, 0x72, 0x67, 0x73, 0x29, 0x3b, 0x20, 0x7d, 0x2c, 0x20,
- 0x77, 0x61, 0x69, 0x74, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a,
- 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x44, 0x65, 0x66, 0x65, 0x72, 0x73,
- 0x20, 0x61, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2c,
- 0x20, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x69, 0x6e, 0x67, 0x20,
- 0x69, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x72, 0x75, 0x6e, 0x20, 0x61, 0x66,
- 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x75, 0x72, 0x72,
- 0x65, 0x6e, 0x74, 0x20, 0x63, 0x61, 0x6c, 0x6c, 0x20, 0x73, 0x74, 0x61,
- 0x63, 0x6b, 0x20, 0x68, 0x61, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20,
- 0x63, 0x6c, 0x65, 0x61, 0x72, 0x65, 0x64, 0x2e, 0x0a, 0x20, 0x20, 0x5f,
- 0x2e, 0x64, 0x65, 0x66, 0x65, 0x72, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e,
- 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x29, 0x20,
- 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e,
- 0x20, 0x5f, 0x2e, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x61, 0x70, 0x70,
- 0x6c, 0x79, 0x28, 0x5f, 0x2c, 0x20, 0x5b, 0x66, 0x75, 0x6e, 0x63, 0x2c,
- 0x20, 0x31, 0x5d, 0x2e, 0x63, 0x6f, 0x6e, 0x63, 0x61, 0x74, 0x28, 0x73,
- 0x6c, 0x69, 0x63, 0x65, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x61, 0x72,
- 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2c, 0x20, 0x31, 0x29, 0x29,
- 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f,
- 0x2f, 0x20, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x61, 0x20,
- 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x74, 0x68,
- 0x61, 0x74, 0x2c, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x69, 0x6e, 0x76,
- 0x6f, 0x6b, 0x65, 0x64, 0x2c, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x6f,
- 0x6e, 0x6c, 0x79, 0x20, 0x62, 0x65, 0x20, 0x74, 0x72, 0x69, 0x67, 0x67,
- 0x65, 0x72, 0x65, 0x64, 0x20, 0x61, 0x74, 0x20, 0x6d, 0x6f, 0x73, 0x74,
- 0x20, 0x6f, 0x6e, 0x63, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x64,
- 0x75, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x20, 0x67, 0x69, 0x76, 0x65,
- 0x6e, 0x20, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x20, 0x6f, 0x66, 0x20,
- 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x74, 0x68,
- 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e,
- 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x2c, 0x20,
- 0x77, 0x61, 0x69, 0x74, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x76, 0x61, 0x72, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2c,
- 0x20, 0x61, 0x72, 0x67, 0x73, 0x2c, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x6f,
- 0x75, 0x74, 0x2c, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x3b, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x70, 0x72, 0x65, 0x76,
- 0x69, 0x6f, 0x75, 0x73, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x20,
- 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29,
- 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x72, 0x65,
- 0x76, 0x69, 0x6f, 0x75, 0x73, 0x20, 0x3d, 0x20, 0x6e, 0x65, 0x77, 0x20,
- 0x44, 0x61, 0x74, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x20, 0x3d, 0x20, 0x6e, 0x75,
- 0x6c, 0x6c, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65,
- 0x73, 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x2e,
- 0x61, 0x70, 0x70, 0x6c, 0x79, 0x28, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78,
- 0x74, 0x2c, 0x20, 0x61, 0x72, 0x67, 0x73, 0x29, 0x3b, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74,
- 0x75, 0x72, 0x6e, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e,
- 0x28, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76,
- 0x61, 0x72, 0x20, 0x6e, 0x6f, 0x77, 0x20, 0x3d, 0x20, 0x6e, 0x65, 0x77,
- 0x20, 0x44, 0x61, 0x74, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x76, 0x61, 0x72, 0x20, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69,
- 0x6e, 0x67, 0x20, 0x3d, 0x20, 0x77, 0x61, 0x69, 0x74, 0x20, 0x2d, 0x20,
- 0x28, 0x6e, 0x6f, 0x77, 0x20, 0x2d, 0x20, 0x70, 0x72, 0x65, 0x76, 0x69,
- 0x6f, 0x75, 0x73, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x20, 0x3d, 0x20, 0x74, 0x68,
- 0x69, 0x73, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x61, 0x72,
- 0x67, 0x73, 0x20, 0x3d, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e,
- 0x74, 0x73, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66,
- 0x20, 0x28, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x20,
- 0x3c, 0x3d, 0x20, 0x30, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x54, 0x69, 0x6d,
- 0x65, 0x6f, 0x75, 0x74, 0x28, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74,
- 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x74,
- 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x20, 0x3d, 0x20, 0x6e, 0x75, 0x6c,
- 0x6c, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70,
- 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x20, 0x3d, 0x20, 0x6e, 0x6f,
- 0x77, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72,
- 0x65, 0x73, 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63,
- 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x28, 0x63, 0x6f, 0x6e, 0x74, 0x65,
- 0x78, 0x74, 0x2c, 0x20, 0x61, 0x72, 0x67, 0x73, 0x29, 0x3b, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20,
- 0x69, 0x66, 0x20, 0x28, 0x21, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74,
- 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x20, 0x3d, 0x20, 0x73, 0x65,
- 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x28, 0x6c, 0x61, 0x74,
- 0x65, 0x72, 0x2c, 0x20, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e,
- 0x67, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e,
- 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x3b, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x7d, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20,
- 0x2f, 0x2f, 0x20, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x61,
- 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x74,
- 0x68, 0x61, 0x74, 0x2c, 0x20, 0x61, 0x73, 0x20, 0x6c, 0x6f, 0x6e, 0x67,
- 0x20, 0x61, 0x73, 0x20, 0x69, 0x74, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x69,
- 0x6e, 0x75, 0x65, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x20, 0x69,
- 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x2c, 0x20, 0x77, 0x69, 0x6c, 0x6c,
- 0x20, 0x6e, 0x6f, 0x74, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x62, 0x65,
- 0x20, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x65, 0x64, 0x2e, 0x20,
- 0x54, 0x68, 0x65, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e,
- 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x63, 0x61, 0x6c,
- 0x6c, 0x65, 0x64, 0x20, 0x61, 0x66, 0x74, 0x65, 0x72, 0x20, 0x69, 0x74,
- 0x20, 0x73, 0x74, 0x6f, 0x70, 0x73, 0x20, 0x62, 0x65, 0x69, 0x6e, 0x67,
- 0x20, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x0a,
- 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x4e, 0x20, 0x6d, 0x69, 0x6c, 0x6c, 0x69,
- 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x2e, 0x20, 0x49, 0x66, 0x20,
- 0x60, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x60, 0x20,
- 0x69, 0x73, 0x20, 0x70, 0x61, 0x73, 0x73, 0x65, 0x64, 0x2c, 0x20, 0x74,
- 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66,
- 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x6e, 0x20, 0x74,
- 0x68, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6c, 0x65, 0x61, 0x64,
- 0x69, 0x6e, 0x67, 0x20, 0x65, 0x64, 0x67, 0x65, 0x2c, 0x20, 0x69, 0x6e,
- 0x73, 0x74, 0x65, 0x61, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65,
- 0x20, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x0a, 0x20,
- 0x20, 0x5f, 0x2e, 0x64, 0x65, 0x62, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x20,
- 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x66,
- 0x75, 0x6e, 0x63, 0x2c, 0x20, 0x77, 0x61, 0x69, 0x74, 0x2c, 0x20, 0x69,
- 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x29, 0x20, 0x7b, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x74, 0x69, 0x6d, 0x65,
- 0x6f, 0x75, 0x74, 0x2c, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x3b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20,
- 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x20, 0x7b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x63,
- 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x20, 0x3d, 0x20, 0x74, 0x68, 0x69,
- 0x73, 0x2c, 0x20, 0x61, 0x72, 0x67, 0x73, 0x20, 0x3d, 0x20, 0x61, 0x72,
- 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x3b, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x6c, 0x61, 0x74, 0x65, 0x72,
- 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28,
- 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x20, 0x3d, 0x20, 0x6e, 0x75,
- 0x6c, 0x6c, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x69, 0x66, 0x20, 0x28, 0x21, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61,
- 0x74, 0x65, 0x29, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x20, 0x3d,
- 0x20, 0x66, 0x75, 0x6e, 0x63, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x28,
- 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2c, 0x20, 0x61, 0x72, 0x67,
- 0x73, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x3b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x63,
- 0x61, 0x6c, 0x6c, 0x4e, 0x6f, 0x77, 0x20, 0x3d, 0x20, 0x69, 0x6d, 0x6d,
- 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x20, 0x26, 0x26, 0x20, 0x21, 0x74,
- 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x6f,
- 0x75, 0x74, 0x28, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x29, 0x3b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x6f,
- 0x75, 0x74, 0x20, 0x3d, 0x20, 0x73, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65,
- 0x6f, 0x75, 0x74, 0x28, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x2c, 0x20, 0x77,
- 0x61, 0x69, 0x74, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x69, 0x66, 0x20, 0x28, 0x63, 0x61, 0x6c, 0x6c, 0x4e, 0x6f, 0x77, 0x29,
- 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x75,
- 0x6e, 0x63, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x28, 0x63, 0x6f, 0x6e,
- 0x74, 0x65, 0x78, 0x74, 0x2c, 0x20, 0x61, 0x72, 0x67, 0x73, 0x29, 0x3b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72,
- 0x6e, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x3b, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20,
- 0x20, 0x2f, 0x2f, 0x20, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20,
- 0x61, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74,
- 0x68, 0x61, 0x74, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20,
- 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x20, 0x61, 0x74, 0x20,
- 0x6d, 0x6f, 0x73, 0x74, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x74, 0x69, 0x6d,
- 0x65, 0x2c, 0x20, 0x6e, 0x6f, 0x20, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x72,
- 0x20, 0x68, 0x6f, 0x77, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6f, 0x66,
- 0x74, 0x65, 0x6e, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x63, 0x61, 0x6c, 0x6c,
- 0x20, 0x69, 0x74, 0x2e, 0x20, 0x55, 0x73, 0x65, 0x66, 0x75, 0x6c, 0x20,
- 0x66, 0x6f, 0x72, 0x20, 0x6c, 0x61, 0x7a, 0x79, 0x20, 0x69, 0x6e, 0x69,
- 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
- 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x6f, 0x6e, 0x63, 0x65, 0x20, 0x3d, 0x20,
- 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x66, 0x75, 0x6e,
- 0x63, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72,
- 0x20, 0x72, 0x61, 0x6e, 0x20, 0x3d, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65,
- 0x2c, 0x20, 0x6d, 0x65, 0x6d, 0x6f, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74,
- 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x72, 0x61, 0x6e, 0x29, 0x20, 0x72,
- 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6d, 0x65, 0x6d, 0x6f, 0x3b, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x61, 0x6e, 0x20, 0x3d, 0x20,
- 0x74, 0x72, 0x75, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x6d, 0x65, 0x6d, 0x6f, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x2e,
- 0x61, 0x70, 0x70, 0x6c, 0x79, 0x28, 0x74, 0x68, 0x69, 0x73, 0x2c, 0x20,
- 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x29, 0x3b, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x20, 0x3d,
- 0x20, 0x6e, 0x75, 0x6c, 0x6c, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6d, 0x65, 0x6d, 0x6f,
- 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x20, 0x20, 0x7d,
- 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x52, 0x65, 0x74, 0x75,
- 0x72, 0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x69, 0x72, 0x73,
- 0x74, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x70,
- 0x61, 0x73, 0x73, 0x65, 0x64, 0x20, 0x61, 0x73, 0x20, 0x61, 0x6e, 0x20,
- 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x74, 0x6f, 0x20,
- 0x74, 0x68, 0x65, 0x20, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x2c, 0x0a,
- 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e,
- 0x67, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x64, 0x6a,
- 0x75, 0x73, 0x74, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74,
- 0x73, 0x2c, 0x20, 0x72, 0x75, 0x6e, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20,
- 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61,
- 0x66, 0x74, 0x65, 0x72, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x0a, 0x20, 0x20,
- 0x2f, 0x2f, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e,
- 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65,
- 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61,
- 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x0a,
- 0x20, 0x20, 0x5f, 0x2e, 0x77, 0x72, 0x61, 0x70, 0x20, 0x3d, 0x20, 0x66,
- 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x66, 0x75, 0x6e, 0x63,
- 0x2c, 0x20, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x29, 0x20, 0x7b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20,
- 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x20, 0x7b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x61,
- 0x72, 0x67, 0x73, 0x20, 0x3d, 0x20, 0x5b, 0x66, 0x75, 0x6e, 0x63, 0x5d,
- 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x75, 0x73, 0x68,
- 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x28, 0x61, 0x72, 0x67, 0x73, 0x2c,
- 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x29, 0x3b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72,
- 0x6e, 0x20, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2e, 0x61, 0x70,
- 0x70, 0x6c, 0x79, 0x28, 0x74, 0x68, 0x69, 0x73, 0x2c, 0x20, 0x61, 0x72,
- 0x67, 0x73, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x3b, 0x0a,
- 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x52,
- 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x61, 0x20, 0x66, 0x75, 0x6e,
- 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x69,
- 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73,
- 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20, 0x6c,
- 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74,
- 0x69, 0x6f, 0x6e, 0x73, 0x2c, 0x20, 0x65, 0x61, 0x63, 0x68, 0x0a, 0x20,
- 0x20, 0x2f, 0x2f, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x69, 0x6e,
- 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e,
- 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68,
- 0x65, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74,
- 0x68, 0x61, 0x74, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x73, 0x2e,
- 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65,
- 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28,
- 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20,
- 0x66, 0x75, 0x6e, 0x63, 0x73, 0x20, 0x3d, 0x20, 0x61, 0x72, 0x67, 0x75,
- 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72,
- 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69,
- 0x6f, 0x6e, 0x28, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x76, 0x61, 0x72, 0x20, 0x61, 0x72, 0x67, 0x73, 0x20, 0x3d, 0x20,
- 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x3b, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x28, 0x76, 0x61,
- 0x72, 0x20, 0x69, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x73, 0x2e,
- 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x2d, 0x20, 0x31, 0x3b, 0x20,
- 0x69, 0x20, 0x3e, 0x3d, 0x20, 0x30, 0x3b, 0x20, 0x69, 0x2d, 0x2d, 0x29,
- 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x61,
- 0x72, 0x67, 0x73, 0x20, 0x3d, 0x20, 0x5b, 0x66, 0x75, 0x6e, 0x63, 0x73,
- 0x5b, 0x69, 0x5d, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x28, 0x74, 0x68,
- 0x69, 0x73, 0x2c, 0x20, 0x61, 0x72, 0x67, 0x73, 0x29, 0x5d, 0x3b, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x61, 0x72, 0x67,
- 0x73, 0x5b, 0x30, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x3b,
- 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20,
- 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x61, 0x20, 0x66, 0x75,
- 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20,
- 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x62, 0x65,
- 0x20, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x20, 0x61, 0x66,
- 0x74, 0x65, 0x72, 0x20, 0x62, 0x65, 0x69, 0x6e, 0x67, 0x20, 0x63, 0x61,
- 0x6c, 0x6c, 0x65, 0x64, 0x20, 0x4e, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x73,
- 0x2e, 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x61, 0x66, 0x74, 0x65, 0x72, 0x20,
- 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x74,
- 0x69, 0x6d, 0x65, 0x73, 0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x29, 0x20,
- 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x74, 0x69,
- 0x6d, 0x65, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x30, 0x29, 0x20, 0x72, 0x65,
- 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x28, 0x29, 0x3b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20,
- 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x20, 0x7b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x2d,
- 0x2d, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x20, 0x3c, 0x20, 0x31, 0x29, 0x20,
- 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65,
- 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x2e, 0x61, 0x70,
- 0x70, 0x6c, 0x79, 0x28, 0x74, 0x68, 0x69, 0x73, 0x2c, 0x20, 0x61, 0x72,
- 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x29, 0x3b, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x3b,
- 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20,
- 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x46, 0x75, 0x6e, 0x63, 0x74,
- 0x69, 0x6f, 0x6e, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x2d, 0x2d,
- 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d,
- 0x2d, 0x2d, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x52, 0x65, 0x74,
- 0x72, 0x69, 0x65, 0x76, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x61,
- 0x6d, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x20, 0x6f, 0x62,
- 0x6a, 0x65, 0x63, 0x74, 0x27, 0x73, 0x20, 0x70, 0x72, 0x6f, 0x70, 0x65,
- 0x72, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20,
- 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x73, 0x20, 0x74, 0x6f,
- 0x20, 0x2a, 0x2a, 0x45, 0x43, 0x4d, 0x41, 0x53, 0x63, 0x72, 0x69, 0x70,
- 0x74, 0x20, 0x35, 0x2a, 0x2a, 0x27, 0x73, 0x20, 0x6e, 0x61, 0x74, 0x69,
- 0x76, 0x65, 0x20, 0x60, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x6b,
- 0x65, 0x79, 0x73, 0x60, 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x6b, 0x65, 0x79,
- 0x73, 0x20, 0x3d, 0x20, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x4b, 0x65,
- 0x79, 0x73, 0x20, 0x7c, 0x7c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69,
- 0x6f, 0x6e, 0x28, 0x6f, 0x62, 0x6a, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x6f, 0x62, 0x6a, 0x20, 0x21, 0x3d,
- 0x3d, 0x20, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x28, 0x6f, 0x62, 0x6a,
- 0x29, 0x29, 0x20, 0x74, 0x68, 0x72, 0x6f, 0x77, 0x20, 0x6e, 0x65, 0x77,
- 0x20, 0x54, 0x79, 0x70, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x28, 0x27,
- 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x6f, 0x62, 0x6a, 0x65,
- 0x63, 0x74, 0x27, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61,
- 0x72, 0x20, 0x6b, 0x65, 0x79, 0x73, 0x20, 0x3d, 0x20, 0x5b, 0x5d, 0x3b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x28, 0x76, 0x61,
- 0x72, 0x20, 0x6b, 0x65, 0x79, 0x20, 0x69, 0x6e, 0x20, 0x6f, 0x62, 0x6a,
- 0x29, 0x20, 0x69, 0x66, 0x20, 0x28, 0x5f, 0x2e, 0x68, 0x61, 0x73, 0x28,
- 0x6f, 0x62, 0x6a, 0x2c, 0x20, 0x6b, 0x65, 0x79, 0x29, 0x29, 0x20, 0x6b,
- 0x65, 0x79, 0x73, 0x5b, 0x6b, 0x65, 0x79, 0x73, 0x2e, 0x6c, 0x65, 0x6e,
- 0x67, 0x74, 0x68, 0x5d, 0x20, 0x3d, 0x20, 0x6b, 0x65, 0x79, 0x3b, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6b,
- 0x65, 0x79, 0x73, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20,
- 0x20, 0x2f, 0x2f, 0x20, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65,
- 0x20, 0x74, 0x68, 0x65, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x20,
- 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74,
- 0x27, 0x73, 0x20, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65,
- 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65,
- 0x73, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e,
- 0x28, 0x6f, 0x62, 0x6a, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x76, 0x61, 0x72, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x20, 0x3d,
- 0x20, 0x5b, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72,
- 0x20, 0x28, 0x76, 0x61, 0x72, 0x20, 0x6b, 0x65, 0x79, 0x20, 0x69, 0x6e,
- 0x20, 0x6f, 0x62, 0x6a, 0x29, 0x20, 0x69, 0x66, 0x20, 0x28, 0x5f, 0x2e,
- 0x68, 0x61, 0x73, 0x28, 0x6f, 0x62, 0x6a, 0x2c, 0x20, 0x6b, 0x65, 0x79,
- 0x29, 0x29, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2e, 0x70, 0x75,
- 0x73, 0x68, 0x28, 0x6f, 0x62, 0x6a, 0x5b, 0x6b, 0x65, 0x79, 0x5d, 0x29,
- 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e,
- 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x3b, 0x0a, 0x20, 0x20, 0x7d,
- 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x43, 0x6f, 0x6e, 0x76,
- 0x65, 0x72, 0x74, 0x20, 0x61, 0x6e, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63,
- 0x74, 0x20, 0x69, 0x6e, 0x74, 0x6f, 0x20, 0x61, 0x20, 0x6c, 0x69, 0x73,
- 0x74, 0x20, 0x6f, 0x66, 0x20, 0x60, 0x5b, 0x6b, 0x65, 0x79, 0x2c, 0x20,
- 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5d, 0x60, 0x20, 0x70, 0x61, 0x69, 0x72,
- 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x70, 0x61, 0x69, 0x72, 0x73,
- 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28,
- 0x6f, 0x62, 0x6a, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76,
- 0x61, 0x72, 0x20, 0x70, 0x61, 0x69, 0x72, 0x73, 0x20, 0x3d, 0x20, 0x5b,
- 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x28,
- 0x76, 0x61, 0x72, 0x20, 0x6b, 0x65, 0x79, 0x20, 0x69, 0x6e, 0x20, 0x6f,
- 0x62, 0x6a, 0x29, 0x20, 0x69, 0x66, 0x20, 0x28, 0x5f, 0x2e, 0x68, 0x61,
- 0x73, 0x28, 0x6f, 0x62, 0x6a, 0x2c, 0x20, 0x6b, 0x65, 0x79, 0x29, 0x29,
- 0x20, 0x70, 0x61, 0x69, 0x72, 0x73, 0x2e, 0x70, 0x75, 0x73, 0x68, 0x28,
- 0x5b, 0x6b, 0x65, 0x79, 0x2c, 0x20, 0x6f, 0x62, 0x6a, 0x5b, 0x6b, 0x65,
- 0x79, 0x5d, 0x5d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65,
- 0x74, 0x75, 0x72, 0x6e, 0x20, 0x70, 0x61, 0x69, 0x72, 0x73, 0x3b, 0x0a,
- 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49,
- 0x6e, 0x76, 0x65, 0x72, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6b, 0x65,
- 0x79, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65,
- 0x73, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x20, 0x6f, 0x62, 0x6a, 0x65,
- 0x63, 0x74, 0x2e, 0x20, 0x54, 0x68, 0x65, 0x20, 0x76, 0x61, 0x6c, 0x75,
- 0x65, 0x73, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x73,
- 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x62, 0x6c, 0x65, 0x2e,
- 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x20,
- 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6f,
- 0x62, 0x6a, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61,
- 0x72, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x7b,
- 0x7d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x28,
- 0x76, 0x61, 0x72, 0x20, 0x6b, 0x65, 0x79, 0x20, 0x69, 0x6e, 0x20, 0x6f,
- 0x62, 0x6a, 0x29, 0x20, 0x69, 0x66, 0x20, 0x28, 0x5f, 0x2e, 0x68, 0x61,
- 0x73, 0x28, 0x6f, 0x62, 0x6a, 0x2c, 0x20, 0x6b, 0x65, 0x79, 0x29, 0x29,
- 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x5b, 0x6f, 0x62, 0x6a, 0x5b,
- 0x6b, 0x65, 0x79, 0x5d, 0x5d, 0x20, 0x3d, 0x20, 0x6b, 0x65, 0x79, 0x3b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20,
- 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x3b,
- 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x52, 0x65, 0x74, 0x75, 0x72,
- 0x6e, 0x20, 0x61, 0x20, 0x73, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x20, 0x6c,
- 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66,
- 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6e, 0x61, 0x6d, 0x65,
- 0x73, 0x20, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x20,
- 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63,
- 0x74, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x41, 0x6c, 0x69, 0x61,
- 0x73, 0x65, 0x64, 0x20, 0x61, 0x73, 0x20, 0x60, 0x6d, 0x65, 0x74, 0x68,
- 0x6f, 0x64, 0x73, 0x60, 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x66, 0x75, 0x6e,
- 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x3d, 0x20, 0x5f, 0x2e, 0x6d,
- 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e,
- 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6f, 0x62, 0x6a, 0x29, 0x20, 0x7b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x6e, 0x61, 0x6d,
- 0x65, 0x73, 0x20, 0x3d, 0x20, 0x5b, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x66, 0x6f, 0x72, 0x20, 0x28, 0x76, 0x61, 0x72, 0x20, 0x6b, 0x65,
- 0x79, 0x20, 0x69, 0x6e, 0x20, 0x6f, 0x62, 0x6a, 0x29, 0x20, 0x7b, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x5f, 0x2e,
- 0x69, 0x73, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6f,
- 0x62, 0x6a, 0x5b, 0x6b, 0x65, 0x79, 0x5d, 0x29, 0x29, 0x20, 0x6e, 0x61,
- 0x6d, 0x65, 0x73, 0x2e, 0x70, 0x75, 0x73, 0x68, 0x28, 0x6b, 0x65, 0x79,
- 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x61, 0x6d, 0x65,
- 0x73, 0x2e, 0x73, 0x6f, 0x72, 0x74, 0x28, 0x29, 0x3b, 0x0a, 0x20, 0x20,
- 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x45, 0x78, 0x74,
- 0x65, 0x6e, 0x64, 0x20, 0x61, 0x20, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x20,
- 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20,
- 0x61, 0x6c, 0x6c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x70,
- 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x70, 0x61,
- 0x73, 0x73, 0x65, 0x64, 0x2d, 0x69, 0x6e, 0x20, 0x6f, 0x62, 0x6a, 0x65,
- 0x63, 0x74, 0x28, 0x73, 0x29, 0x2e, 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x65,
- 0x78, 0x74, 0x65, 0x6e, 0x64, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63,
- 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6f, 0x62, 0x6a, 0x29, 0x20, 0x7b, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x65, 0x61, 0x63, 0x68, 0x28, 0x73, 0x6c, 0x69,
- 0x63, 0x65, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x61, 0x72, 0x67, 0x75,
- 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2c, 0x20, 0x31, 0x29, 0x2c, 0x20, 0x66,
- 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x73, 0x6f, 0x75, 0x72,
- 0x63, 0x65, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x69, 0x66, 0x20, 0x28, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x29, 0x20,
- 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f,
- 0x72, 0x20, 0x28, 0x76, 0x61, 0x72, 0x20, 0x70, 0x72, 0x6f, 0x70, 0x20,
- 0x69, 0x6e, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x29, 0x20, 0x7b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6f,
- 0x62, 0x6a, 0x5b, 0x70, 0x72, 0x6f, 0x70, 0x5d, 0x20, 0x3d, 0x20, 0x73,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5b, 0x70, 0x72, 0x6f, 0x70, 0x5d, 0x3b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d,
- 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72,
- 0x6e, 0x20, 0x6f, 0x62, 0x6a, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a,
- 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e,
- 0x20, 0x61, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74,
- 0x68, 0x65, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x6f, 0x6e,
- 0x6c, 0x79, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x6e,
- 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c,
- 0x69, 0x73, 0x74, 0x65, 0x64, 0x20, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
- 0x74, 0x69, 0x65, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x70, 0x69,
- 0x63, 0x6b, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
- 0x6e, 0x28, 0x6f, 0x62, 0x6a, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x76, 0x61, 0x72, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x3d, 0x20,
- 0x7b, 0x7d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20,
- 0x6b, 0x65, 0x79, 0x73, 0x20, 0x3d, 0x20, 0x63, 0x6f, 0x6e, 0x63, 0x61,
- 0x74, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x28, 0x41, 0x72, 0x72, 0x61,
- 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2c, 0x20, 0x73, 0x6c, 0x69, 0x63,
- 0x65, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x61, 0x72, 0x67, 0x75, 0x6d,
- 0x65, 0x6e, 0x74, 0x73, 0x2c, 0x20, 0x31, 0x29, 0x29, 0x3b, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x65, 0x61, 0x63, 0x68, 0x28, 0x6b, 0x65, 0x79, 0x73,
- 0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6b,
- 0x65, 0x79, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x69, 0x66, 0x20, 0x28, 0x6b, 0x65, 0x79, 0x20, 0x69, 0x6e, 0x20, 0x6f,
- 0x62, 0x6a, 0x29, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x5b, 0x6b, 0x65, 0x79,
- 0x5d, 0x20, 0x3d, 0x20, 0x6f, 0x62, 0x6a, 0x5b, 0x6b, 0x65, 0x79, 0x5d,
- 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x29, 0x3b, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x63, 0x6f, 0x70,
- 0x79, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x20,
- 0x2f, 0x2f, 0x20, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x61, 0x20,
- 0x63, 0x6f, 0x70, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20,
- 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x77, 0x69, 0x74, 0x68, 0x6f,
- 0x75, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x6c, 0x61, 0x63, 0x6b,
- 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x20, 0x70, 0x72, 0x6f, 0x70, 0x65,
- 0x72, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x6f,
- 0x6d, 0x69, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69,
- 0x6f, 0x6e, 0x28, 0x6f, 0x62, 0x6a, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x3d,
- 0x20, 0x7b, 0x7d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72,
- 0x20, 0x6b, 0x65, 0x79, 0x73, 0x20, 0x3d, 0x20, 0x63, 0x6f, 0x6e, 0x63,
- 0x61, 0x74, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x28, 0x41, 0x72, 0x72,
- 0x61, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2c, 0x20, 0x73, 0x6c, 0x69,
- 0x63, 0x65, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x61, 0x72, 0x67, 0x75,
- 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2c, 0x20, 0x31, 0x29, 0x29, 0x3b, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x28, 0x76, 0x61, 0x72,
- 0x20, 0x6b, 0x65, 0x79, 0x20, 0x69, 0x6e, 0x20, 0x6f, 0x62, 0x6a, 0x29,
- 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20,
- 0x28, 0x21, 0x5f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73,
- 0x28, 0x6b, 0x65, 0x79, 0x73, 0x2c, 0x20, 0x6b, 0x65, 0x79, 0x29, 0x29,
- 0x20, 0x63, 0x6f, 0x70, 0x79, 0x5b, 0x6b, 0x65, 0x79, 0x5d, 0x20, 0x3d,
- 0x20, 0x6f, 0x62, 0x6a, 0x5b, 0x6b, 0x65, 0x79, 0x5d, 0x3b, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74,
- 0x75, 0x72, 0x6e, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x3b, 0x0a, 0x20, 0x20,
- 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x46, 0x69, 0x6c,
- 0x6c, 0x20, 0x69, 0x6e, 0x20, 0x61, 0x20, 0x67, 0x69, 0x76, 0x65, 0x6e,
- 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x77, 0x69, 0x74, 0x68,
- 0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x70, 0x72, 0x6f,
- 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x5f,
- 0x2e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x20, 0x3d, 0x20,
- 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6f, 0x62, 0x6a,
- 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x61, 0x63, 0x68,
- 0x28, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x28,
- 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2c, 0x20, 0x31,
- 0x29, 0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28,
- 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x73, 0x6f, 0x75, 0x72,
- 0x63, 0x65, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x28, 0x76, 0x61, 0x72, 0x20, 0x70,
- 0x72, 0x6f, 0x70, 0x20, 0x69, 0x6e, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x6f, 0x62, 0x6a, 0x5b, 0x70,
- 0x72, 0x6f, 0x70, 0x5d, 0x20, 0x3d, 0x3d, 0x20, 0x6e, 0x75, 0x6c, 0x6c,
- 0x29, 0x20, 0x6f, 0x62, 0x6a, 0x5b, 0x70, 0x72, 0x6f, 0x70, 0x5d, 0x20,
- 0x3d, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5b, 0x70, 0x72, 0x6f,
- 0x70, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x7d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65,
- 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6f, 0x62, 0x6a, 0x3b, 0x0a, 0x20, 0x20,
- 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x43, 0x72, 0x65,
- 0x61, 0x74, 0x65, 0x20, 0x61, 0x20, 0x28, 0x73, 0x68, 0x61, 0x6c, 0x6c,
- 0x6f, 0x77, 0x2d, 0x63, 0x6c, 0x6f, 0x6e, 0x65, 0x64, 0x29, 0x20, 0x64,
- 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x20, 0x6f, 0x66, 0x20,
- 0x61, 0x6e, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x0a, 0x20,
- 0x20, 0x5f, 0x2e, 0x63, 0x6c, 0x6f, 0x6e, 0x65, 0x20, 0x3d, 0x20, 0x66,
- 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6f, 0x62, 0x6a, 0x29,
- 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x21,
- 0x5f, 0x2e, 0x69, 0x73, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x28, 0x6f,
- 0x62, 0x6a, 0x29, 0x29, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20,
- 0x6f, 0x62, 0x6a, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74,
- 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x2e, 0x69, 0x73, 0x41, 0x72, 0x72, 0x61,
- 0x79, 0x28, 0x6f, 0x62, 0x6a, 0x29, 0x20, 0x3f, 0x20, 0x6f, 0x62, 0x6a,
- 0x2e, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x28, 0x29, 0x20, 0x3a, 0x20, 0x5f,
- 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x28, 0x7b, 0x7d, 0x2c, 0x20,
- 0x6f, 0x62, 0x6a, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a,
- 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x73,
- 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x65, 0x70, 0x74, 0x6f, 0x72,
- 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x62,
- 0x6a, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20,
- 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x6f, 0x62, 0x6a, 0x2e,
- 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x70, 0x72,
- 0x69, 0x6d, 0x61, 0x72, 0x79, 0x20, 0x70, 0x75, 0x72, 0x70, 0x6f, 0x73,
- 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6d, 0x65,
- 0x74, 0x68, 0x6f, 0x64, 0x20, 0x69, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x22,
- 0x74, 0x61, 0x70, 0x20, 0x69, 0x6e, 0x74, 0x6f, 0x22, 0x20, 0x61, 0x20,
- 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x20, 0x63, 0x68, 0x61, 0x69, 0x6e,
- 0x2c, 0x20, 0x69, 0x6e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6f, 0x72,
- 0x64, 0x65, 0x72, 0x20, 0x74, 0x6f, 0x20, 0x70, 0x65, 0x72, 0x66, 0x6f,
- 0x72, 0x6d, 0x20, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
- 0x73, 0x20, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6d, 0x65,
- 0x64, 0x69, 0x61, 0x74, 0x65, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74,
- 0x73, 0x20, 0x77, 0x69, 0x74, 0x68, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65,
- 0x20, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x0a, 0x20, 0x20, 0x5f, 0x2e,
- 0x74, 0x61, 0x70, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69,
- 0x6f, 0x6e, 0x28, 0x6f, 0x62, 0x6a, 0x2c, 0x20, 0x69, 0x6e, 0x74, 0x65,
- 0x72, 0x63, 0x65, 0x70, 0x74, 0x6f, 0x72, 0x29, 0x20, 0x7b, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x65, 0x70, 0x74,
- 0x6f, 0x72, 0x28, 0x6f, 0x62, 0x6a, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6f, 0x62, 0x6a, 0x3b,
- 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20,
- 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x20, 0x72, 0x65, 0x63,
- 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x61,
- 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69,
- 0x6f, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x60, 0x69, 0x73, 0x45, 0x71,
- 0x75, 0x61, 0x6c, 0x60, 0x2e, 0x0a, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20,
- 0x65, 0x71, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
- 0x6e, 0x28, 0x61, 0x2c, 0x20, 0x62, 0x2c, 0x20, 0x61, 0x53, 0x74, 0x61,
- 0x63, 0x6b, 0x2c, 0x20, 0x62, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x29, 0x20,
- 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x64, 0x65,
- 0x6e, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63,
- 0x74, 0x73, 0x20, 0x61, 0x72, 0x65, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c,
- 0x2e, 0x20, 0x60, 0x30, 0x20, 0x3d, 0x3d, 0x3d, 0x20, 0x2d, 0x30, 0x60,
- 0x2c, 0x20, 0x62, 0x75, 0x74, 0x20, 0x74, 0x68, 0x65, 0x79, 0x20, 0x61,
- 0x72, 0x65, 0x6e, 0x27, 0x74, 0x20, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69,
- 0x63, 0x61, 0x6c, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20,
- 0x53, 0x65, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x48, 0x61, 0x72, 0x6d,
- 0x6f, 0x6e, 0x79, 0x20, 0x60, 0x65, 0x67, 0x61, 0x6c, 0x60, 0x20, 0x70,
- 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x3a, 0x20, 0x68, 0x74, 0x74,
- 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x69, 0x6b, 0x69, 0x2e, 0x65, 0x63, 0x6d,
- 0x61, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x2e, 0x6f, 0x72, 0x67, 0x2f,
- 0x64, 0x6f, 0x6b, 0x75, 0x2e, 0x70, 0x68, 0x70, 0x3f, 0x69, 0x64, 0x3d,
- 0x68, 0x61, 0x72, 0x6d, 0x6f, 0x6e, 0x79, 0x3a, 0x65, 0x67, 0x61, 0x6c,
- 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x61, 0x20,
- 0x3d, 0x3d, 0x3d, 0x20, 0x62, 0x29, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72,
- 0x6e, 0x20, 0x61, 0x20, 0x21, 0x3d, 0x3d, 0x20, 0x30, 0x20, 0x7c, 0x7c,
- 0x20, 0x31, 0x20, 0x2f, 0x20, 0x61, 0x20, 0x3d, 0x3d, 0x20, 0x31, 0x20,
- 0x2f, 0x20, 0x62, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20,
- 0x41, 0x20, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x20, 0x63, 0x6f, 0x6d,
- 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x6e,
- 0x65, 0x63, 0x65, 0x73, 0x73, 0x61, 0x72, 0x79, 0x20, 0x62, 0x65, 0x63,
- 0x61, 0x75, 0x73, 0x65, 0x20, 0x60, 0x6e, 0x75, 0x6c, 0x6c, 0x20, 0x3d,
- 0x3d, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x60,
- 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x61, 0x20,
- 0x3d, 0x3d, 0x20, 0x6e, 0x75, 0x6c, 0x6c, 0x20, 0x7c, 0x7c, 0x20, 0x62,
- 0x20, 0x3d, 0x3d, 0x20, 0x6e, 0x75, 0x6c, 0x6c, 0x29, 0x20, 0x72, 0x65,
- 0x74, 0x75, 0x72, 0x6e, 0x20, 0x61, 0x20, 0x3d, 0x3d, 0x3d, 0x20, 0x62,
- 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x55, 0x6e, 0x77,
- 0x72, 0x61, 0x70, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x77, 0x72, 0x61, 0x70,
- 0x70, 0x65, 0x64, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2e,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x61, 0x20, 0x69,
- 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x6f, 0x66, 0x20, 0x5f, 0x29,
- 0x20, 0x61, 0x20, 0x3d, 0x20, 0x61, 0x2e, 0x5f, 0x77, 0x72, 0x61, 0x70,
- 0x70, 0x65, 0x64, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20,
- 0x28, 0x62, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x6f,
- 0x66, 0x20, 0x5f, 0x29, 0x20, 0x62, 0x20, 0x3d, 0x20, 0x62, 0x2e, 0x5f,
- 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x64, 0x3b, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x2f, 0x2f, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x65, 0x20,
- 0x60, 0x5b, 0x5b, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x5d, 0x5d, 0x60, 0x20,
- 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76,
- 0x61, 0x72, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x4e, 0x61, 0x6d, 0x65,
- 0x20, 0x3d, 0x20, 0x74, 0x6f, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e,
- 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x61, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x69, 0x66, 0x20, 0x28, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x4e, 0x61,
- 0x6d, 0x65, 0x20, 0x21, 0x3d, 0x20, 0x74, 0x6f, 0x53, 0x74, 0x72, 0x69,
- 0x6e, 0x67, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x62, 0x29, 0x29, 0x20,
- 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65,
- 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68,
- 0x20, 0x28, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x29,
- 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20,
- 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x2c, 0x20, 0x6e, 0x75, 0x6d,
- 0x62, 0x65, 0x72, 0x73, 0x2c, 0x20, 0x64, 0x61, 0x74, 0x65, 0x73, 0x2c,
- 0x20, 0x61, 0x6e, 0x64, 0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e,
- 0x73, 0x20, 0x61, 0x72, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x72,
- 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x63, 0x61, 0x73, 0x65, 0x20,
- 0x27, 0x5b, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x53, 0x74, 0x72,
- 0x69, 0x6e, 0x67, 0x5d, 0x27, 0x3a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x50, 0x72, 0x69, 0x6d, 0x69, 0x74,
- 0x69, 0x76, 0x65, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65,
- 0x69, 0x72, 0x20, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e,
- 0x64, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20,
- 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x20, 0x61, 0x72, 0x65,
- 0x20, 0x65, 0x71, 0x75, 0x69, 0x76, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x3b,
- 0x20, 0x74, 0x68, 0x75, 0x73, 0x2c, 0x20, 0x60, 0x22, 0x35, 0x22, 0x60,
- 0x20, 0x69, 0x73, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x2f, 0x2f, 0x20, 0x65, 0x71, 0x75, 0x69, 0x76, 0x61, 0x6c, 0x65, 0x6e,
- 0x74, 0x20, 0x74, 0x6f, 0x20, 0x60, 0x6e, 0x65, 0x77, 0x20, 0x53, 0x74,
- 0x72, 0x69, 0x6e, 0x67, 0x28, 0x22, 0x35, 0x22, 0x29, 0x60, 0x2e, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75,
- 0x72, 0x6e, 0x20, 0x61, 0x20, 0x3d, 0x3d, 0x20, 0x53, 0x74, 0x72, 0x69,
- 0x6e, 0x67, 0x28, 0x62, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x63, 0x61, 0x73, 0x65, 0x20, 0x27, 0x5b, 0x6f, 0x62, 0x6a, 0x65,
- 0x63, 0x74, 0x20, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5d, 0x27, 0x3a,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20,
- 0x60, 0x4e, 0x61, 0x4e, 0x60, 0x73, 0x20, 0x61, 0x72, 0x65, 0x20, 0x65,
- 0x71, 0x75, 0x69, 0x76, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x2c, 0x20, 0x62,
- 0x75, 0x74, 0x20, 0x6e, 0x6f, 0x6e, 0x2d, 0x72, 0x65, 0x66, 0x6c, 0x65,
- 0x78, 0x69, 0x76, 0x65, 0x2e, 0x20, 0x41, 0x6e, 0x20, 0x60, 0x65, 0x67,
- 0x61, 0x6c, 0x60, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73,
- 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72,
- 0x6d, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72,
- 0x20, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x20, 0x76, 0x61, 0x6c,
- 0x75, 0x65, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x61, 0x20, 0x21, 0x3d,
- 0x20, 0x2b, 0x61, 0x20, 0x3f, 0x20, 0x62, 0x20, 0x21, 0x3d, 0x20, 0x2b,
- 0x62, 0x20, 0x3a, 0x20, 0x28, 0x61, 0x20, 0x3d, 0x3d, 0x20, 0x30, 0x20,
- 0x3f, 0x20, 0x31, 0x20, 0x2f, 0x20, 0x61, 0x20, 0x3d, 0x3d, 0x20, 0x31,
- 0x20, 0x2f, 0x20, 0x62, 0x20, 0x3a, 0x20, 0x61, 0x20, 0x3d, 0x3d, 0x20,
- 0x2b, 0x62, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x63,
- 0x61, 0x73, 0x65, 0x20, 0x27, 0x5b, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74,
- 0x20, 0x44, 0x61, 0x74, 0x65, 0x5d, 0x27, 0x3a, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x63, 0x61, 0x73, 0x65, 0x20, 0x27, 0x5b, 0x6f, 0x62,
- 0x6a, 0x65, 0x63, 0x74, 0x20, 0x42, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e,
- 0x5d, 0x27, 0x3a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x2f, 0x2f, 0x20, 0x43, 0x6f, 0x65, 0x72, 0x63, 0x65, 0x20, 0x64, 0x61,
- 0x74, 0x65, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x62, 0x6f, 0x6f, 0x6c,
- 0x65, 0x61, 0x6e, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x6e, 0x75, 0x6d, 0x65,
- 0x72, 0x69, 0x63, 0x20, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76,
- 0x65, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2e, 0x20, 0x44, 0x61,
- 0x74, 0x65, 0x73, 0x20, 0x61, 0x72, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x70,
- 0x61, 0x72, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x69,
- 0x72, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f,
- 0x20, 0x6d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64,
- 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74,
- 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x20, 0x4e, 0x6f, 0x74, 0x65, 0x20, 0x74,
- 0x68, 0x61, 0x74, 0x20, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20,
- 0x64, 0x61, 0x74, 0x65, 0x73, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x6d,
- 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x20, 0x72,
- 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x73, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f,
- 0x2f, 0x20, 0x6f, 0x66, 0x20, 0x60, 0x4e, 0x61, 0x4e, 0x60, 0x20, 0x61,
- 0x72, 0x65, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x71, 0x75, 0x69, 0x76,
- 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x2b, 0x61,
- 0x20, 0x3d, 0x3d, 0x20, 0x2b, 0x62, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x52, 0x65, 0x67, 0x45, 0x78, 0x70, 0x73,
- 0x20, 0x61, 0x72, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x65,
- 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x69, 0x72, 0x20, 0x73,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72,
- 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x66, 0x6c, 0x61, 0x67, 0x73,
- 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x63, 0x61, 0x73, 0x65,
- 0x20, 0x27, 0x5b, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x52, 0x65,
- 0x67, 0x45, 0x78, 0x70, 0x5d, 0x27, 0x3a, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x61,
- 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x62,
- 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x26, 0x26, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x61, 0x2e, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x20, 0x3d,
- 0x3d, 0x20, 0x62, 0x2e, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x20, 0x26,
- 0x26, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x61, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x69,
- 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x62, 0x2e, 0x6d, 0x75,
- 0x6c, 0x74, 0x69, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x26, 0x26, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x61, 0x2e, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x43, 0x61,
- 0x73, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x62, 0x2e, 0x69, 0x67, 0x6e, 0x6f,
- 0x72, 0x65, 0x43, 0x61, 0x73, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x74, 0x79,
- 0x70, 0x65, 0x6f, 0x66, 0x20, 0x61, 0x20, 0x21, 0x3d, 0x20, 0x27, 0x6f,
- 0x62, 0x6a, 0x65, 0x63, 0x74, 0x27, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x79,
- 0x70, 0x65, 0x6f, 0x66, 0x20, 0x62, 0x20, 0x21, 0x3d, 0x20, 0x27, 0x6f,
- 0x62, 0x6a, 0x65, 0x63, 0x74, 0x27, 0x29, 0x20, 0x72, 0x65, 0x74, 0x75,
- 0x72, 0x6e, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x3b, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x41, 0x73, 0x73, 0x75, 0x6d, 0x65, 0x20,
- 0x65, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x20, 0x66, 0x6f, 0x72,
- 0x20, 0x63, 0x79, 0x63, 0x6c, 0x69, 0x63, 0x20, 0x73, 0x74, 0x72, 0x75,
- 0x63, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x20, 0x54, 0x68, 0x65, 0x20,
- 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x20, 0x66, 0x6f,
- 0x72, 0x20, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x20,
- 0x63, 0x79, 0x63, 0x6c, 0x69, 0x63, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f,
- 0x2f, 0x20, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x73,
- 0x20, 0x69, 0x73, 0x20, 0x61, 0x64, 0x61, 0x70, 0x74, 0x65, 0x64, 0x20,
- 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x45, 0x53, 0x20, 0x35, 0x2e, 0x31, 0x20,
- 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x31, 0x35, 0x2e, 0x31,
- 0x32, 0x2e, 0x33, 0x2c, 0x20, 0x61, 0x62, 0x73, 0x74, 0x72, 0x61, 0x63,
- 0x74, 0x20, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20,
- 0x60, 0x4a, 0x4f, 0x60, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61,
- 0x72, 0x20, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x61,
- 0x53, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68,
- 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x77, 0x68, 0x69, 0x6c, 0x65, 0x20,
- 0x28, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x2d, 0x2d, 0x29, 0x20, 0x7b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x4c, 0x69,
- 0x6e, 0x65, 0x61, 0x72, 0x20, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e,
- 0x20, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65,
- 0x20, 0x69, 0x73, 0x20, 0x69, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x65, 0x6c,
- 0x79, 0x20, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6f, 0x6e,
- 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x75,
- 0x6d, 0x62, 0x65, 0x72, 0x20, 0x6f, 0x66, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x20,
- 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x20, 0x73, 0x74, 0x72, 0x75, 0x63,
- 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x69, 0x66, 0x20, 0x28, 0x61, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x5b,
- 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x5d, 0x20, 0x3d, 0x3d, 0x20, 0x61,
- 0x29, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x62, 0x53, 0x74,
- 0x61, 0x63, 0x6b, 0x5b, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x5d, 0x20,
- 0x3d, 0x3d, 0x20, 0x62, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x41, 0x64, 0x64, 0x20, 0x74,
- 0x68, 0x65, 0x20, 0x66, 0x69, 0x72, 0x73, 0x74, 0x20, 0x6f, 0x62, 0x6a,
- 0x65, 0x63, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73,
- 0x74, 0x61, 0x63, 0x6b, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x72, 0x61, 0x76,
- 0x65, 0x72, 0x73, 0x65, 0x64, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74,
- 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x61, 0x53, 0x74, 0x61, 0x63,
- 0x6b, 0x2e, 0x70, 0x75, 0x73, 0x68, 0x28, 0x61, 0x29, 0x3b, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x62, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x70, 0x75,
- 0x73, 0x68, 0x28, 0x62, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76,
- 0x61, 0x72, 0x20, 0x73, 0x69, 0x7a, 0x65, 0x20, 0x3d, 0x20, 0x30, 0x2c,
- 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x74, 0x72,
- 0x75, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x52,
- 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x6c, 0x79, 0x20, 0x63,
- 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x65, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63,
- 0x74, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x72, 0x72, 0x61, 0x79,
- 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x63,
- 0x6c, 0x61, 0x73, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x3d, 0x20,
- 0x27, 0x5b, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x41, 0x72, 0x72,
- 0x61, 0x79, 0x5d, 0x27, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x65,
- 0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x20, 0x6c, 0x65, 0x6e, 0x67, 0x74,
- 0x68, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x64, 0x65, 0x74, 0x65, 0x72, 0x6d,
- 0x69, 0x6e, 0x65, 0x20, 0x69, 0x66, 0x20, 0x61, 0x20, 0x64, 0x65, 0x65,
- 0x70, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e,
- 0x20, 0x69, 0x73, 0x20, 0x6e, 0x65, 0x63, 0x65, 0x73, 0x73, 0x61, 0x72,
- 0x79, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x69, 0x7a,
- 0x65, 0x20, 0x3d, 0x20, 0x61, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68,
- 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x73, 0x75,
- 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x73, 0x69, 0x7a, 0x65, 0x20, 0x3d, 0x3d,
- 0x20, 0x62, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3b, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x72, 0x65, 0x73,
- 0x75, 0x6c, 0x74, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x44, 0x65, 0x65, 0x70, 0x20, 0x63,
- 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63,
- 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2c, 0x20, 0x69, 0x67, 0x6e,
- 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x6f, 0x6e, 0x2d, 0x6e, 0x75,
- 0x6d, 0x65, 0x72, 0x69, 0x63, 0x20, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
- 0x74, 0x69, 0x65, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x77, 0x68, 0x69, 0x6c, 0x65, 0x20, 0x28, 0x73, 0x69, 0x7a,
- 0x65, 0x2d, 0x2d, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x21, 0x28, 0x72,
- 0x65, 0x73, 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x65, 0x71, 0x28, 0x61,
- 0x5b, 0x73, 0x69, 0x7a, 0x65, 0x5d, 0x2c, 0x20, 0x62, 0x5b, 0x73, 0x69,
- 0x7a, 0x65, 0x5d, 0x2c, 0x20, 0x61, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x2c,
- 0x20, 0x62, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x29, 0x29, 0x29, 0x20, 0x62,
- 0x72, 0x65, 0x61, 0x6b, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x7d, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x7b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x4f, 0x62,
- 0x6a, 0x65, 0x63, 0x74, 0x73, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x64,
- 0x69, 0x66, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x74, 0x20, 0x63, 0x6f, 0x6e,
- 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x20, 0x61, 0x72,
- 0x65, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x71, 0x75, 0x69, 0x76, 0x61,
- 0x6c, 0x65, 0x6e, 0x74, 0x2c, 0x20, 0x62, 0x75, 0x74, 0x20, 0x60, 0x4f,
- 0x62, 0x6a, 0x65, 0x63, 0x74, 0x60, 0x73, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x64, 0x69,
- 0x66, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x74, 0x20, 0x66, 0x72, 0x61, 0x6d,
- 0x65, 0x73, 0x20, 0x61, 0x72, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x61, 0x43, 0x74, 0x6f, 0x72, 0x20,
- 0x3d, 0x20, 0x61, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63,
- 0x74, 0x6f, 0x72, 0x2c, 0x20, 0x62, 0x43, 0x74, 0x6f, 0x72, 0x20, 0x3d,
- 0x20, 0x62, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74,
- 0x6f, 0x72, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66,
- 0x20, 0x28, 0x61, 0x43, 0x74, 0x6f, 0x72, 0x20, 0x21, 0x3d, 0x3d, 0x20,
- 0x62, 0x43, 0x74, 0x6f, 0x72, 0x20, 0x26, 0x26, 0x20, 0x21, 0x28, 0x5f,
- 0x2e, 0x69, 0x73, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28,
- 0x61, 0x43, 0x74, 0x6f, 0x72, 0x29, 0x20, 0x26, 0x26, 0x20, 0x28, 0x61,
- 0x43, 0x74, 0x6f, 0x72, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,
- 0x65, 0x6f, 0x66, 0x20, 0x61, 0x43, 0x74, 0x6f, 0x72, 0x29, 0x20, 0x26,
- 0x26, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x2e, 0x69,
- 0x73, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x62, 0x43,
- 0x74, 0x6f, 0x72, 0x29, 0x20, 0x26, 0x26, 0x20, 0x28, 0x62, 0x43, 0x74,
- 0x6f, 0x72, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x6f,
- 0x66, 0x20, 0x62, 0x43, 0x74, 0x6f, 0x72, 0x29, 0x29, 0x29, 0x20, 0x7b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74,
- 0x75, 0x72, 0x6e, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x3b, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x2f, 0x2f, 0x20, 0x44, 0x65, 0x65, 0x70, 0x20, 0x63, 0x6f, 0x6d,
- 0x70, 0x61, 0x72, 0x65, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73,
- 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20,
- 0x28, 0x76, 0x61, 0x72, 0x20, 0x6b, 0x65, 0x79, 0x20, 0x69, 0x6e, 0x20,
- 0x61, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x69, 0x66, 0x20, 0x28, 0x5f, 0x2e, 0x68, 0x61, 0x73, 0x28, 0x61,
- 0x2c, 0x20, 0x6b, 0x65, 0x79, 0x29, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x43,
- 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x78, 0x70,
- 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72,
- 0x20, 0x6f, 0x66, 0x20, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69,
- 0x65, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x73, 0x69, 0x7a, 0x65, 0x2b, 0x2b, 0x3b, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x44,
- 0x65, 0x65, 0x70, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x65, 0x20,
- 0x65, 0x61, 0x63, 0x68, 0x20, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x2e,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69,
- 0x66, 0x20, 0x28, 0x21, 0x28, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x20,
- 0x3d, 0x20, 0x5f, 0x2e, 0x68, 0x61, 0x73, 0x28, 0x62, 0x2c, 0x20, 0x6b,
- 0x65, 0x79, 0x29, 0x20, 0x26, 0x26, 0x20, 0x65, 0x71, 0x28, 0x61, 0x5b,
- 0x6b, 0x65, 0x79, 0x5d, 0x2c, 0x20, 0x62, 0x5b, 0x6b, 0x65, 0x79, 0x5d,
- 0x2c, 0x20, 0x61, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x2c, 0x20, 0x62, 0x53,
- 0x74, 0x61, 0x63, 0x6b, 0x29, 0x29, 0x29, 0x20, 0x62, 0x72, 0x65, 0x61,
- 0x6b, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x45, 0x6e, 0x73, 0x75, 0x72, 0x65,
- 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x62, 0x6f, 0x74, 0x68, 0x20, 0x6f,
- 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61,
- 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x61, 0x6d, 0x65, 0x20,
- 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x70, 0x72,
- 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x72, 0x65, 0x73, 0x75,
- 0x6c, 0x74, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x28, 0x6b, 0x65, 0x79, 0x20, 0x69,
- 0x6e, 0x20, 0x62, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x5f, 0x2e, 0x68,
- 0x61, 0x73, 0x28, 0x62, 0x2c, 0x20, 0x6b, 0x65, 0x79, 0x29, 0x20, 0x26,
- 0x26, 0x20, 0x21, 0x28, 0x73, 0x69, 0x7a, 0x65, 0x2d, 0x2d, 0x29, 0x29,
- 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x21,
- 0x73, 0x69, 0x7a, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x2f, 0x2f, 0x20, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x20, 0x74, 0x68,
- 0x65, 0x20, 0x66, 0x69, 0x72, 0x73, 0x74, 0x20, 0x6f, 0x62, 0x6a, 0x65,
- 0x63, 0x74, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x65, 0x20,
- 0x73, 0x74, 0x61, 0x63, 0x6b, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x72, 0x61,
- 0x76, 0x65, 0x72, 0x73, 0x65, 0x64, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63,
- 0x74, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x61, 0x53, 0x74, 0x61,
- 0x63, 0x6b, 0x2e, 0x70, 0x6f, 0x70, 0x28, 0x29, 0x3b, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x62, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x70, 0x6f, 0x70,
- 0x28, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75,
- 0x72, 0x6e, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x3b, 0x0a, 0x20,
- 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x50, 0x65,
- 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x61, 0x20, 0x64, 0x65, 0x65, 0x70,
- 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x20,
- 0x74, 0x6f, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x20, 0x69, 0x66, 0x20,
- 0x74, 0x77, 0x6f, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x20,
- 0x61, 0x72, 0x65, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x2e, 0x0a, 0x20,
- 0x20, 0x5f, 0x2e, 0x69, 0x73, 0x45, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x3d,
- 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x61, 0x2c,
- 0x20, 0x62, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65,
- 0x74, 0x75, 0x72, 0x6e, 0x20, 0x65, 0x71, 0x28, 0x61, 0x2c, 0x20, 0x62,
- 0x2c, 0x20, 0x5b, 0x5d, 0x2c, 0x20, 0x5b, 0x5d, 0x29, 0x3b, 0x0a, 0x20,
- 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x73,
- 0x20, 0x61, 0x20, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x20, 0x61, 0x72, 0x72,
- 0x61, 0x79, 0x2c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2c, 0x20,
- 0x6f, 0x72, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x65, 0x6d,
- 0x70, 0x74, 0x79, 0x3f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x41, 0x6e,
- 0x20, 0x22, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x20, 0x6f, 0x62, 0x6a,
- 0x65, 0x63, 0x74, 0x20, 0x68, 0x61, 0x73, 0x20, 0x6e, 0x6f, 0x20, 0x65,
- 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x6f, 0x77,
- 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73,
- 0x2e, 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x69, 0x73, 0x45, 0x6d, 0x70, 0x74,
- 0x79, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e,
- 0x28, 0x6f, 0x62, 0x6a, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x69, 0x66, 0x20, 0x28, 0x6f, 0x62, 0x6a, 0x20, 0x3d, 0x3d, 0x20, 0x6e,
- 0x75, 0x6c, 0x6c, 0x29, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20,
- 0x74, 0x72, 0x75, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66,
- 0x20, 0x28, 0x5f, 0x2e, 0x69, 0x73, 0x41, 0x72, 0x72, 0x61, 0x79, 0x28,
- 0x6f, 0x62, 0x6a, 0x29, 0x20, 0x7c, 0x7c, 0x20, 0x5f, 0x2e, 0x69, 0x73,
- 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x28, 0x6f, 0x62, 0x6a, 0x29, 0x29,
- 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6f, 0x62, 0x6a, 0x2e,
- 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x3d, 0x3d, 0x3d, 0x20, 0x30,
- 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x28, 0x76,
- 0x61, 0x72, 0x20, 0x6b, 0x65, 0x79, 0x20, 0x69, 0x6e, 0x20, 0x6f, 0x62,
- 0x6a, 0x29, 0x20, 0x69, 0x66, 0x20, 0x28, 0x5f, 0x2e, 0x68, 0x61, 0x73,
- 0x28, 0x6f, 0x62, 0x6a, 0x2c, 0x20, 0x6b, 0x65, 0x79, 0x29, 0x29, 0x20,
- 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65,
- 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e,
- 0x20, 0x74, 0x72, 0x75, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a,
- 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x73, 0x20, 0x61, 0x20, 0x67,
- 0x69, 0x76, 0x65, 0x6e, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x61,
- 0x20, 0x44, 0x4f, 0x4d, 0x20, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74,
- 0x3f, 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x69, 0x73, 0x45, 0x6c, 0x65, 0x6d,
- 0x65, 0x6e, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69,
- 0x6f, 0x6e, 0x28, 0x6f, 0x62, 0x6a, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x21, 0x21, 0x28,
- 0x6f, 0x62, 0x6a, 0x20, 0x26, 0x26, 0x20, 0x6f, 0x62, 0x6a, 0x2e, 0x6e,
- 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x20, 0x3d, 0x3d, 0x3d, 0x20,
- 0x31, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20,
- 0x2f, 0x2f, 0x20, 0x49, 0x73, 0x20, 0x61, 0x20, 0x67, 0x69, 0x76, 0x65,
- 0x6e, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x61, 0x6e, 0x20, 0x61,
- 0x72, 0x72, 0x61, 0x79, 0x3f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x44,
- 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x73, 0x20, 0x74, 0x6f, 0x20,
- 0x45, 0x43, 0x4d, 0x41, 0x35, 0x27, 0x73, 0x20, 0x6e, 0x61, 0x74, 0x69,
- 0x76, 0x65, 0x20, 0x41, 0x72, 0x72, 0x61, 0x79, 0x2e, 0x69, 0x73, 0x41,
- 0x72, 0x72, 0x61, 0x79, 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x69, 0x73, 0x41,
- 0x72, 0x72, 0x61, 0x79, 0x20, 0x3d, 0x20, 0x6e, 0x61, 0x74, 0x69, 0x76,
- 0x65, 0x49, 0x73, 0x41, 0x72, 0x72, 0x61, 0x79, 0x20, 0x7c, 0x7c, 0x20,
- 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6f, 0x62, 0x6a,
- 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75,
- 0x72, 0x6e, 0x20, 0x74, 0x6f, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e,
- 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x6f, 0x62, 0x6a, 0x29, 0x20, 0x3d, 0x3d,
- 0x20, 0x27, 0x5b, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x41, 0x72,
- 0x72, 0x61, 0x79, 0x5d, 0x27, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a,
- 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x73, 0x20, 0x61, 0x20, 0x67,
- 0x69, 0x76, 0x65, 0x6e, 0x20, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c,
- 0x65, 0x20, 0x61, 0x6e, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x3f,
- 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x69, 0x73, 0x4f, 0x62, 0x6a, 0x65, 0x63,
- 0x74, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e,
- 0x28, 0x6f, 0x62, 0x6a, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6f, 0x62, 0x6a, 0x20, 0x3d,
- 0x3d, 0x3d, 0x20, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x28, 0x6f, 0x62,
- 0x6a, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20,
- 0x2f, 0x2f, 0x20, 0x41, 0x64, 0x64, 0x20, 0x73, 0x6f, 0x6d, 0x65, 0x20,
- 0x69, 0x73, 0x54, 0x79, 0x70, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f,
- 0x64, 0x73, 0x3a, 0x20, 0x69, 0x73, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65,
- 0x6e, 0x74, 0x73, 0x2c, 0x20, 0x69, 0x73, 0x46, 0x75, 0x6e, 0x63, 0x74,
- 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x69, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e,
- 0x67, 0x2c, 0x20, 0x69, 0x73, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2c,
- 0x20, 0x69, 0x73, 0x44, 0x61, 0x74, 0x65, 0x2c, 0x20, 0x69, 0x73, 0x52,
- 0x65, 0x67, 0x45, 0x78, 0x70, 0x2e, 0x0a, 0x20, 0x20, 0x65, 0x61, 0x63,
- 0x68, 0x28, 0x5b, 0x27, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74,
- 0x73, 0x27, 0x2c, 0x20, 0x27, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
- 0x6e, 0x27, 0x2c, 0x20, 0x27, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x27,
- 0x2c, 0x20, 0x27, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x27, 0x2c, 0x20,
- 0x27, 0x44, 0x61, 0x74, 0x65, 0x27, 0x2c, 0x20, 0x27, 0x52, 0x65, 0x67,
- 0x45, 0x78, 0x70, 0x27, 0x5d, 0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74,
- 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x29, 0x20, 0x7b, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x5f, 0x5b, 0x27, 0x69, 0x73, 0x27, 0x20, 0x2b,
- 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x5d, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e,
- 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6f, 0x62, 0x6a, 0x29, 0x20, 0x7b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72,
- 0x6e, 0x20, 0x74, 0x6f, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x63,
- 0x61, 0x6c, 0x6c, 0x28, 0x6f, 0x62, 0x6a, 0x29, 0x20, 0x3d, 0x3d, 0x20,
- 0x27, 0x5b, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x27, 0x20, 0x2b,
- 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x2b, 0x20, 0x27, 0x5d, 0x27, 0x3b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x29,
- 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x44, 0x65, 0x66, 0x69,
- 0x6e, 0x65, 0x20, 0x61, 0x20, 0x66, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63,
- 0x6b, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66,
- 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x20,
- 0x69, 0x6e, 0x20, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x73, 0x20,
- 0x28, 0x61, 0x68, 0x65, 0x6d, 0x2c, 0x20, 0x49, 0x45, 0x29, 0x2c, 0x20,
- 0x77, 0x68, 0x65, 0x72, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x74,
- 0x68, 0x65, 0x72, 0x65, 0x20, 0x69, 0x73, 0x6e, 0x27, 0x74, 0x20, 0x61,
- 0x6e, 0x79, 0x20, 0x69, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x61, 0x62,
- 0x6c, 0x65, 0x20, 0x22, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74,
- 0x73, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x69,
- 0x66, 0x20, 0x28, 0x21, 0x5f, 0x2e, 0x69, 0x73, 0x41, 0x72, 0x67, 0x75,
- 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x28, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65,
- 0x6e, 0x74, 0x73, 0x29, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x5f, 0x2e, 0x69, 0x73, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74,
- 0x73, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e,
- 0x28, 0x6f, 0x62, 0x6a, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x21, 0x21, 0x28,
- 0x6f, 0x62, 0x6a, 0x20, 0x26, 0x26, 0x20, 0x5f, 0x2e, 0x68, 0x61, 0x73,
- 0x28, 0x6f, 0x62, 0x6a, 0x2c, 0x20, 0x27, 0x63, 0x61, 0x6c, 0x6c, 0x65,
- 0x65, 0x27, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x3b,
- 0x0a, 0x20, 0x20, 0x7d, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x4f,
- 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x20, 0x60, 0x69, 0x73, 0x46,
- 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x60, 0x20, 0x69, 0x66, 0x20,
- 0x61, 0x70, 0x70, 0x72, 0x6f, 0x70, 0x72, 0x69, 0x61, 0x74, 0x65, 0x2e,
- 0x0a, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x74, 0x79, 0x70, 0x65, 0x6f,
- 0x66, 0x20, 0x28, 0x2f, 0x2e, 0x2f, 0x29, 0x20, 0x21, 0x3d, 0x3d, 0x20,
- 0x27, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x27, 0x29, 0x20,
- 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x2e, 0x69, 0x73, 0x46, 0x75,
- 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e,
- 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6f, 0x62, 0x6a, 0x29, 0x20, 0x7b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72,
- 0x6e, 0x20, 0x74, 0x79, 0x70, 0x65, 0x6f, 0x66, 0x20, 0x6f, 0x62, 0x6a,
- 0x20, 0x3d, 0x3d, 0x3d, 0x20, 0x27, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69,
- 0x6f, 0x6e, 0x27, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x3b, 0x0a,
- 0x20, 0x20, 0x7d, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x73,
- 0x20, 0x61, 0x20, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x20, 0x6f, 0x62, 0x6a,
- 0x65, 0x63, 0x74, 0x20, 0x61, 0x20, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x65,
- 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x3f, 0x0a, 0x20, 0x20, 0x5f,
- 0x2e, 0x69, 0x73, 0x46, 0x69, 0x6e, 0x69, 0x74, 0x65, 0x20, 0x3d, 0x20,
- 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6f, 0x62, 0x6a,
- 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75,
- 0x72, 0x6e, 0x20, 0x69, 0x73, 0x46, 0x69, 0x6e, 0x69, 0x74, 0x65, 0x28,
- 0x6f, 0x62, 0x6a, 0x29, 0x20, 0x26, 0x26, 0x20, 0x21, 0x69, 0x73, 0x4e,
- 0x61, 0x4e, 0x28, 0x70, 0x61, 0x72, 0x73, 0x65, 0x46, 0x6c, 0x6f, 0x61,
- 0x74, 0x28, 0x6f, 0x62, 0x6a, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x7d,
- 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x73, 0x20, 0x74,
- 0x68, 0x65, 0x20, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x20, 0x76, 0x61, 0x6c,
- 0x75, 0x65, 0x20, 0x60, 0x4e, 0x61, 0x4e, 0x60, 0x3f, 0x20, 0x28, 0x4e,
- 0x61, 0x4e, 0x20, 0x69, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x6e,
- 0x6c, 0x79, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x77, 0x68,
- 0x69, 0x63, 0x68, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74,
- 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x69, 0x74, 0x73, 0x65, 0x6c,
- 0x66, 0x29, 0x2e, 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x69, 0x73, 0x4e, 0x61,
- 0x4e, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e,
- 0x28, 0x6f, 0x62, 0x6a, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x2e, 0x69, 0x73, 0x4e,
- 0x75, 0x6d, 0x62, 0x65, 0x72, 0x28, 0x6f, 0x62, 0x6a, 0x29, 0x20, 0x26,
- 0x26, 0x20, 0x6f, 0x62, 0x6a, 0x20, 0x21, 0x3d, 0x20, 0x2b, 0x6f, 0x62,
- 0x6a, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f,
- 0x2f, 0x20, 0x49, 0x73, 0x20, 0x61, 0x20, 0x67, 0x69, 0x76, 0x65, 0x6e,
- 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x61, 0x20, 0x62, 0x6f, 0x6f,
- 0x6c, 0x65, 0x61, 0x6e, 0x3f, 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x69, 0x73,
- 0x42, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x20, 0x3d, 0x20, 0x66, 0x75,
- 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6f, 0x62, 0x6a, 0x29, 0x20,
- 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e,
- 0x20, 0x6f, 0x62, 0x6a, 0x20, 0x3d, 0x3d, 0x3d, 0x20, 0x74, 0x72, 0x75,
- 0x65, 0x20, 0x7c, 0x7c, 0x20, 0x6f, 0x62, 0x6a, 0x20, 0x3d, 0x3d, 0x3d,
- 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x6f,
- 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x28,
- 0x6f, 0x62, 0x6a, 0x29, 0x20, 0x3d, 0x3d, 0x20, 0x27, 0x5b, 0x6f, 0x62,
- 0x6a, 0x65, 0x63, 0x74, 0x20, 0x42, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e,
- 0x5d, 0x27, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20,
- 0x2f, 0x2f, 0x20, 0x49, 0x73, 0x20, 0x61, 0x20, 0x67, 0x69, 0x76, 0x65,
- 0x6e, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x65, 0x71, 0x75, 0x61,
- 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x6e, 0x75, 0x6c, 0x6c, 0x3f, 0x0a, 0x20,
- 0x20, 0x5f, 0x2e, 0x69, 0x73, 0x4e, 0x75, 0x6c, 0x6c, 0x20, 0x3d, 0x20,
- 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6f, 0x62, 0x6a,
- 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75,
- 0x72, 0x6e, 0x20, 0x6f, 0x62, 0x6a, 0x20, 0x3d, 0x3d, 0x3d, 0x20, 0x6e,
- 0x75, 0x6c, 0x6c, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20,
- 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x73, 0x20, 0x61, 0x20, 0x67, 0x69, 0x76,
- 0x65, 0x6e, 0x20, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x20,
- 0x75, 0x6e, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x3f, 0x0a, 0x20,
- 0x20, 0x5f, 0x2e, 0x69, 0x73, 0x55, 0x6e, 0x64, 0x65, 0x66, 0x69, 0x6e,
- 0x65, 0x64, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
- 0x6e, 0x28, 0x6f, 0x62, 0x6a, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6f, 0x62, 0x6a, 0x20,
- 0x3d, 0x3d, 0x3d, 0x20, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x30, 0x3b, 0x0a,
- 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x53,
- 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x20, 0x66, 0x75, 0x6e, 0x63,
- 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x63, 0x68, 0x65,
- 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x66, 0x20, 0x61, 0x6e, 0x20,
- 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x68, 0x61, 0x73, 0x20, 0x61,
- 0x20, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x70, 0x65,
- 0x72, 0x74, 0x79, 0x20, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6c, 0x79,
- 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6f, 0x6e, 0x20, 0x69, 0x74, 0x73,
- 0x65, 0x6c, 0x66, 0x20, 0x28, 0x69, 0x6e, 0x20, 0x6f, 0x74, 0x68, 0x65,
- 0x72, 0x20, 0x77, 0x6f, 0x72, 0x64, 0x73, 0x2c, 0x20, 0x6e, 0x6f, 0x74,
- 0x20, 0x6f, 0x6e, 0x20, 0x61, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x74,
- 0x79, 0x70, 0x65, 0x29, 0x2e, 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x68, 0x61,
- 0x73, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e,
- 0x28, 0x6f, 0x62, 0x6a, 0x2c, 0x20, 0x6b, 0x65, 0x79, 0x29, 0x20, 0x7b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20,
- 0x68, 0x61, 0x73, 0x4f, 0x77, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72,
- 0x74, 0x79, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x6f, 0x62, 0x6a, 0x2c,
- 0x20, 0x6b, 0x65, 0x79, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a,
- 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x55, 0x74, 0x69, 0x6c, 0x69, 0x74,
- 0x79, 0x20, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x0a,
- 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d,
- 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x0a,
- 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x52, 0x75, 0x6e, 0x20, 0x55, 0x6e, 0x64,
- 0x65, 0x72, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x6a, 0x73, 0x20, 0x69,
- 0x6e, 0x20, 0x2a, 0x6e, 0x6f, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63,
- 0x74, 0x2a, 0x20, 0x6d, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x72, 0x65, 0x74,
- 0x75, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x60,
- 0x5f, 0x60, 0x20, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x20,
- 0x74, 0x6f, 0x20, 0x69, 0x74, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20,
- 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x20, 0x6f, 0x77, 0x6e,
- 0x65, 0x72, 0x2e, 0x20, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20,
- 0x61, 0x20, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x20,
- 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x55, 0x6e, 0x64, 0x65, 0x72,
- 0x73, 0x63, 0x6f, 0x72, 0x65, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74,
- 0x2e, 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x6e, 0x6f, 0x43, 0x6f, 0x6e, 0x66,
- 0x6c, 0x69, 0x63, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74,
- 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x72, 0x6f, 0x6f, 0x74, 0x2e, 0x5f, 0x20, 0x3d, 0x20, 0x70, 0x72, 0x65,
- 0x76, 0x69, 0x6f, 0x75, 0x73, 0x55, 0x6e, 0x64, 0x65, 0x72, 0x73, 0x63,
- 0x6f, 0x72, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74,
- 0x75, 0x72, 0x6e, 0x20, 0x74, 0x68, 0x69, 0x73, 0x3b, 0x0a, 0x20, 0x20,
- 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x4b, 0x65, 0x65,
- 0x70, 0x20, 0x74, 0x68, 0x65, 0x20, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69,
- 0x74, 0x79, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20,
- 0x61, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x64,
- 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x69, 0x74, 0x65, 0x72, 0x61,
- 0x74, 0x6f, 0x72, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x69, 0x64,
- 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e,
- 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x29,
- 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72,
- 0x6e, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x7d,
- 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x52, 0x75, 0x6e, 0x20,
- 0x61, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x2a,
- 0x2a, 0x6e, 0x2a, 0x2a, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x2e, 0x0a,
- 0x20, 0x20, 0x5f, 0x2e, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x20, 0x3d, 0x20,
- 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x2c, 0x20,
- 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2c, 0x20, 0x63, 0x6f,
- 0x6e, 0x74, 0x65, 0x78, 0x74, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x76, 0x61, 0x72, 0x20, 0x61, 0x63, 0x63, 0x75, 0x6d, 0x20, 0x3d,
- 0x20, 0x41, 0x72, 0x72, 0x61, 0x79, 0x28, 0x6e, 0x29, 0x3b, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x28, 0x76, 0x61, 0x72, 0x20,
- 0x69, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x20, 0x69, 0x20, 0x3c, 0x20, 0x6e,
- 0x3b, 0x20, 0x69, 0x2b, 0x2b, 0x29, 0x20, 0x61, 0x63, 0x63, 0x75, 0x6d,
- 0x5b, 0x69, 0x5d, 0x20, 0x3d, 0x20, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74,
- 0x6f, 0x72, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x63, 0x6f, 0x6e, 0x74,
- 0x65, 0x78, 0x74, 0x2c, 0x20, 0x69, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x61, 0x63, 0x63, 0x75,
- 0x6d, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f,
- 0x2f, 0x20, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x61, 0x20, 0x72,
- 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65,
- 0x72, 0x20, 0x62, 0x65, 0x74, 0x77, 0x65, 0x65, 0x6e, 0x20, 0x6d, 0x69,
- 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6d, 0x61, 0x78, 0x20, 0x28, 0x69,
- 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x29, 0x2e, 0x0a, 0x20,
- 0x20, 0x5f, 0x2e, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x20, 0x3d, 0x20,
- 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6d, 0x69, 0x6e,
- 0x2c, 0x20, 0x6d, 0x61, 0x78, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x69, 0x66, 0x20, 0x28, 0x6d, 0x61, 0x78, 0x20, 0x3d, 0x3d, 0x20,
- 0x6e, 0x75, 0x6c, 0x6c, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x6d, 0x61, 0x78, 0x20, 0x3d, 0x20, 0x6d, 0x69, 0x6e, 0x3b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x69, 0x6e, 0x20, 0x3d,
- 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6d, 0x69, 0x6e,
- 0x20, 0x2b, 0x20, 0x4d, 0x61, 0x74, 0x68, 0x2e, 0x66, 0x6c, 0x6f, 0x6f,
- 0x72, 0x28, 0x4d, 0x61, 0x74, 0x68, 0x2e, 0x72, 0x61, 0x6e, 0x64, 0x6f,
- 0x6d, 0x28, 0x29, 0x20, 0x2a, 0x20, 0x28, 0x6d, 0x61, 0x78, 0x20, 0x2d,
- 0x20, 0x6d, 0x69, 0x6e, 0x20, 0x2b, 0x20, 0x31, 0x29, 0x29, 0x3b, 0x0a,
- 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x4c,
- 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x48, 0x54, 0x4d, 0x4c, 0x20,
- 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x20, 0x66, 0x6f, 0x72,
- 0x20, 0x65, 0x73, 0x63, 0x61, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x0a, 0x20,
- 0x20, 0x76, 0x61, 0x72, 0x20, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4d,
- 0x61, 0x70, 0x20, 0x3d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65,
- 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x27, 0x26, 0x27, 0x3a, 0x20, 0x27, 0x26, 0x61, 0x6d,
- 0x70, 0x3b, 0x27, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x27,
- 0x3c, 0x27, 0x3a, 0x20, 0x27, 0x26, 0x6c, 0x74, 0x3b, 0x27, 0x2c, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x27, 0x3e, 0x27, 0x3a, 0x20, 0x27,
- 0x26, 0x67, 0x74, 0x3b, 0x27, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x27, 0x22, 0x27, 0x3a, 0x20, 0x27, 0x26, 0x71, 0x75, 0x6f, 0x74,
- 0x3b, 0x27, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x27,
- 0x22, 0x3a, 0x20, 0x27, 0x26, 0x23, 0x78, 0x32, 0x37, 0x3b, 0x27, 0x2c,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x27, 0x2f, 0x27, 0x3a, 0x20,
- 0x27, 0x26, 0x23, 0x78, 0x32, 0x46, 0x3b, 0x27, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x20, 0x20, 0x65, 0x6e,
- 0x74, 0x69, 0x74, 0x79, 0x4d, 0x61, 0x70, 0x2e, 0x75, 0x6e, 0x65, 0x73,
- 0x63, 0x61, 0x70, 0x65, 0x20, 0x3d, 0x20, 0x5f, 0x2e, 0x69, 0x6e, 0x76,
- 0x65, 0x72, 0x74, 0x28, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4d, 0x61,
- 0x70, 0x2e, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x29, 0x3b, 0x0a, 0x0a,
- 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x52, 0x65, 0x67, 0x65, 0x78, 0x65, 0x73,
- 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x20,
- 0x74, 0x68, 0x65, 0x20, 0x6b, 0x65, 0x79, 0x73, 0x20, 0x61, 0x6e, 0x64,
- 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x20, 0x6c, 0x69, 0x73, 0x74,
- 0x65, 0x64, 0x20, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65,
- 0x6c, 0x79, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x2e, 0x0a, 0x20, 0x20,
- 0x76, 0x61, 0x72, 0x20, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x65,
- 0x67, 0x65, 0x78, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x7b, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x20, 0x20, 0x20,
- 0x6e, 0x65, 0x77, 0x20, 0x52, 0x65, 0x67, 0x45, 0x78, 0x70, 0x28, 0x27,
- 0x5b, 0x27, 0x20, 0x2b, 0x20, 0x5f, 0x2e, 0x6b, 0x65, 0x79, 0x73, 0x28,
- 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4d, 0x61, 0x70, 0x2e, 0x65, 0x73,
- 0x63, 0x61, 0x70, 0x65, 0x29, 0x2e, 0x6a, 0x6f, 0x69, 0x6e, 0x28, 0x27,
- 0x27, 0x29, 0x20, 0x2b, 0x20, 0x27, 0x5d, 0x27, 0x2c, 0x20, 0x27, 0x67,
- 0x27, 0x29, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x75, 0x6e, 0x65, 0x73,
- 0x63, 0x61, 0x70, 0x65, 0x3a, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x52, 0x65,
- 0x67, 0x45, 0x78, 0x70, 0x28, 0x27, 0x28, 0x27, 0x20, 0x2b, 0x20, 0x5f,
- 0x2e, 0x6b, 0x65, 0x79, 0x73, 0x28, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79,
- 0x4d, 0x61, 0x70, 0x2e, 0x75, 0x6e, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65,
- 0x29, 0x2e, 0x6a, 0x6f, 0x69, 0x6e, 0x28, 0x27, 0x7c, 0x27, 0x29, 0x20,
- 0x2b, 0x20, 0x27, 0x29, 0x27, 0x2c, 0x20, 0x27, 0x67, 0x27, 0x29, 0x0a,
- 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x46,
- 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x66, 0x6f, 0x72,
- 0x20, 0x65, 0x73, 0x63, 0x61, 0x70, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x6e,
- 0x64, 0x20, 0x75, 0x6e, 0x65, 0x73, 0x63, 0x61, 0x70, 0x69, 0x6e, 0x67,
- 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x20, 0x74, 0x6f, 0x2f,
- 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x48, 0x54, 0x4d, 0x4c, 0x20, 0x69, 0x6e,
- 0x74, 0x65, 0x72, 0x70, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
- 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x65, 0x61, 0x63, 0x68, 0x28, 0x5b, 0x27,
- 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x27, 0x2c, 0x20, 0x27, 0x75, 0x6e,
- 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x27, 0x5d, 0x2c, 0x20, 0x66, 0x75,
- 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6d, 0x65, 0x74, 0x68, 0x6f,
- 0x64, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x5b, 0x6d,
- 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5d, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e,
- 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67,
- 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66,
- 0x20, 0x28, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x3d, 0x3d, 0x20,
- 0x6e, 0x75, 0x6c, 0x6c, 0x29, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e,
- 0x20, 0x27, 0x27, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72,
- 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x28, 0x27, 0x27, 0x20, 0x2b, 0x20,
- 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x29, 0x2e, 0x72, 0x65, 0x70, 0x6c,
- 0x61, 0x63, 0x65, 0x28, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x65,
- 0x67, 0x65, 0x78, 0x65, 0x73, 0x5b, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64,
- 0x5d, 0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28,
- 0x6d, 0x61, 0x74, 0x63, 0x68, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20,
- 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4d, 0x61, 0x70, 0x5b, 0x6d, 0x65,
- 0x74, 0x68, 0x6f, 0x64, 0x5d, 0x5b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5d,
- 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x29, 0x3b, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x29, 0x3b,
- 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x66, 0x20, 0x74, 0x68,
- 0x65, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74,
- 0x68, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x20, 0x70, 0x72, 0x6f,
- 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x66,
- 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x6e,
- 0x20, 0x69, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x20, 0x69, 0x74, 0x3b, 0x0a,
- 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x77, 0x69,
- 0x73, 0x65, 0x2c, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x69,
- 0x74, 0x2e, 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x72, 0x65, 0x73, 0x75, 0x6c,
- 0x74, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e,
- 0x28, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x20, 0x70, 0x72, 0x6f,
- 0x70, 0x65, 0x72, 0x74, 0x79, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x69, 0x66, 0x20, 0x28, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20,
- 0x3d, 0x3d, 0x20, 0x6e, 0x75, 0x6c, 0x6c, 0x29, 0x20, 0x72, 0x65, 0x74,
- 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x75, 0x6c, 0x6c, 0x3b, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20,
- 0x3d, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5b, 0x70, 0x72, 0x6f,
- 0x70, 0x65, 0x72, 0x74, 0x79, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x2e, 0x69, 0x73, 0x46,
- 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x76, 0x61, 0x6c, 0x75,
- 0x65, 0x29, 0x20, 0x3f, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x63,
- 0x61, 0x6c, 0x6c, 0x28, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x29, 0x20,
- 0x3a, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x7d,
- 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x41, 0x64, 0x64, 0x20,
- 0x79, 0x6f, 0x75, 0x72, 0x20, 0x6f, 0x77, 0x6e, 0x20, 0x63, 0x75, 0x73,
- 0x74, 0x6f, 0x6d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e,
- 0x73, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x55, 0x6e, 0x64,
- 0x65, 0x72, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x20, 0x6f, 0x62, 0x6a, 0x65,
- 0x63, 0x74, 0x2e, 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x6d, 0x69, 0x78, 0x69,
- 0x6e, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e,
- 0x28, 0x6f, 0x62, 0x6a, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x65, 0x61, 0x63, 0x68, 0x28, 0x5f, 0x2e, 0x66, 0x75, 0x6e, 0x63, 0x74,
- 0x69, 0x6f, 0x6e, 0x73, 0x28, 0x6f, 0x62, 0x6a, 0x29, 0x2c, 0x20, 0x66,
- 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x61, 0x6d, 0x65,
- 0x29, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72,
- 0x20, 0x66, 0x75, 0x6e, 0x63, 0x20, 0x3d, 0x20, 0x5f, 0x5b, 0x6e, 0x61,
- 0x6d, 0x65, 0x5d, 0x20, 0x3d, 0x20, 0x6f, 0x62, 0x6a, 0x5b, 0x6e, 0x61,
- 0x6d, 0x65, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f,
- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x74, 0x79, 0x70, 0x65, 0x5b, 0x6e,
- 0x61, 0x6d, 0x65, 0x5d, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74,
- 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x61, 0x72, 0x67, 0x73,
- 0x20, 0x3d, 0x20, 0x5b, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x5f, 0x77, 0x72,
- 0x61, 0x70, 0x70, 0x65, 0x64, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x70, 0x75, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x70,
- 0x6c, 0x79, 0x28, 0x61, 0x72, 0x67, 0x73, 0x2c, 0x20, 0x61, 0x72, 0x67,
- 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20,
- 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x28,
- 0x74, 0x68, 0x69, 0x73, 0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x2e, 0x61,
- 0x70, 0x70, 0x6c, 0x79, 0x28, 0x5f, 0x2c, 0x20, 0x61, 0x72, 0x67, 0x73,
- 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x3b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x7d,
- 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x47, 0x65, 0x6e, 0x65,
- 0x72, 0x61, 0x74, 0x65, 0x20, 0x61, 0x20, 0x75, 0x6e, 0x69, 0x71, 0x75,
- 0x65, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x20, 0x69, 0x64,
- 0x20, 0x28, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x20, 0x77, 0x69, 0x74,
- 0x68, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x6e, 0x74, 0x69,
- 0x72, 0x65, 0x20, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x20, 0x73, 0x65,
- 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x29, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f,
- 0x20, 0x55, 0x73, 0x65, 0x66, 0x75, 0x6c, 0x20, 0x66, 0x6f, 0x72, 0x20,
- 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x72, 0x79, 0x20, 0x44, 0x4f,
- 0x4d, 0x20, 0x69, 0x64, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x76, 0x61, 0x72,
- 0x20, 0x69, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x20, 0x3d,
- 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x75, 0x6e, 0x69, 0x71,
- 0x75, 0x65, 0x49, 0x64, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74,
- 0x69, 0x6f, 0x6e, 0x28, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x29, 0x20,
- 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x69, 0x64,
- 0x20, 0x3d, 0x20, 0x2b, 0x2b, 0x69, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74,
- 0x65, 0x72, 0x20, 0x2b, 0x20, 0x27, 0x27, 0x3b, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x70, 0x72, 0x65, 0x66,
- 0x69, 0x78, 0x20, 0x3f, 0x20, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x20,
- 0x2b, 0x20, 0x69, 0x64, 0x20, 0x3a, 0x20, 0x69, 0x64, 0x3b, 0x0a, 0x20,
- 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x42, 0x79,
- 0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2c, 0x20, 0x55, 0x6e,
- 0x64, 0x65, 0x72, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x20, 0x75, 0x73, 0x65,
- 0x73, 0x20, 0x45, 0x52, 0x42, 0x2d, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x20,
- 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x20, 0x64, 0x65, 0x6c,
- 0x69, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x73, 0x2c, 0x20, 0x63, 0x68, 0x61,
- 0x6e, 0x67, 0x65, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f,
- 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x74,
- 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x20, 0x73, 0x65, 0x74, 0x74,
- 0x69, 0x6e, 0x67, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x75, 0x73, 0x65, 0x20,
- 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x20,
- 0x64, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x0a,
- 0x20, 0x20, 0x5f, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
- 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x20, 0x3d, 0x20, 0x7b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74,
- 0x65, 0x20, 0x20, 0x20, 0x20, 0x3a, 0x20, 0x2f, 0x3c, 0x25, 0x28, 0x5b,
- 0x5c, 0x73, 0x5c, 0x53, 0x5d, 0x2b, 0x3f, 0x29, 0x25, 0x3e, 0x2f, 0x67,
- 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70,
- 0x6f, 0x6c, 0x61, 0x74, 0x65, 0x20, 0x3a, 0x20, 0x2f, 0x3c, 0x25, 0x3d,
- 0x28, 0x5b, 0x5c, 0x73, 0x5c, 0x53, 0x5d, 0x2b, 0x3f, 0x29, 0x25, 0x3e,
- 0x2f, 0x67, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x73, 0x63, 0x61,
- 0x70, 0x65, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3a, 0x20, 0x2f, 0x3c,
- 0x25, 0x2d, 0x28, 0x5b, 0x5c, 0x73, 0x5c, 0x53, 0x5d, 0x2b, 0x3f, 0x29,
- 0x25, 0x3e, 0x2f, 0x67, 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20,
- 0x20, 0x2f, 0x2f, 0x20, 0x57, 0x68, 0x65, 0x6e, 0x20, 0x63, 0x75, 0x73,
- 0x74, 0x6f, 0x6d, 0x69, 0x7a, 0x69, 0x6e, 0x67, 0x20, 0x60, 0x74, 0x65,
- 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e,
- 0x67, 0x73, 0x60, 0x2c, 0x20, 0x69, 0x66, 0x20, 0x79, 0x6f, 0x75, 0x20,
- 0x64, 0x6f, 0x6e, 0x27, 0x74, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x20, 0x74,
- 0x6f, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x61, 0x6e, 0x0a,
- 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x6f,
- 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x65, 0x76, 0x61, 0x6c,
- 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x73,
- 0x63, 0x61, 0x70, 0x69, 0x6e, 0x67, 0x20, 0x72, 0x65, 0x67, 0x65, 0x78,
- 0x2c, 0x20, 0x77, 0x65, 0x20, 0x6e, 0x65, 0x65, 0x64, 0x20, 0x6f, 0x6e,
- 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x69, 0x73, 0x0a, 0x20, 0x20,
- 0x2f, 0x2f, 0x20, 0x67, 0x75, 0x61, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65,
- 0x64, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x6d, 0x61, 0x74,
- 0x63, 0x68, 0x2e, 0x0a, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x6e, 0x6f,
- 0x4d, 0x61, 0x74, 0x63, 0x68, 0x20, 0x3d, 0x20, 0x2f, 0x28, 0x2e, 0x29,
- 0x5e, 0x2f, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x43, 0x65,
- 0x72, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63,
- 0x74, 0x65, 0x72, 0x73, 0x20, 0x6e, 0x65, 0x65, 0x64, 0x20, 0x74, 0x6f,
- 0x20, 0x62, 0x65, 0x20, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x64, 0x20,
- 0x73, 0x6f, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x79,
- 0x20, 0x63, 0x61, 0x6e, 0x20, 0x62, 0x65, 0x20, 0x70, 0x75, 0x74, 0x20,
- 0x69, 0x6e, 0x74, 0x6f, 0x20, 0x61, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20,
- 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x6c, 0x69, 0x74, 0x65, 0x72,
- 0x61, 0x6c, 0x2e, 0x0a, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x65, 0x73,
- 0x63, 0x61, 0x70, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x7b, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x22, 0x27, 0x22, 0x3a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x22, 0x27, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x27, 0x5c, 0x5c,
- 0x27, 0x3a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x27, 0x5c, 0x5c, 0x27, 0x2c,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x27, 0x5c, 0x72, 0x27, 0x3a, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x27, 0x72, 0x27, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x27, 0x5c, 0x6e, 0x27, 0x3a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x27, 0x6e,
- 0x27, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x27, 0x5c, 0x74, 0x27, 0x3a,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x27, 0x74, 0x27, 0x2c, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x27, 0x5c, 0x75, 0x32, 0x30, 0x32, 0x38, 0x27, 0x3a, 0x20,
- 0x27, 0x75, 0x32, 0x30, 0x32, 0x38, 0x27, 0x2c, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x27, 0x5c, 0x75, 0x32, 0x30, 0x32, 0x39, 0x27, 0x3a, 0x20, 0x27,
- 0x75, 0x32, 0x30, 0x32, 0x39, 0x27, 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a,
- 0x0a, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x65, 0x73, 0x63, 0x61, 0x70,
- 0x65, 0x72, 0x20, 0x3d, 0x20, 0x2f, 0x5c, 0x5c, 0x7c, 0x27, 0x7c, 0x5c,
- 0x72, 0x7c, 0x5c, 0x6e, 0x7c, 0x5c, 0x74, 0x7c, 0x5c, 0x75, 0x32, 0x30,
- 0x32, 0x38, 0x7c, 0x5c, 0x75, 0x32, 0x30, 0x32, 0x39, 0x2f, 0x67, 0x3b,
- 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x4a, 0x61, 0x76, 0x61, 0x53,
- 0x63, 0x72, 0x69, 0x70, 0x74, 0x20, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2d,
- 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x2c, 0x20,
- 0x73, 0x69, 0x6d, 0x69, 0x6c, 0x61, 0x72, 0x20, 0x74, 0x6f, 0x20, 0x4a,
- 0x6f, 0x68, 0x6e, 0x20, 0x52, 0x65, 0x73, 0x69, 0x67, 0x27, 0x73, 0x20,
- 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x55, 0x6e, 0x64,
- 0x65, 0x72, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x20, 0x74, 0x65, 0x6d, 0x70,
- 0x6c, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c,
- 0x65, 0x73, 0x20, 0x61, 0x72, 0x62, 0x69, 0x74, 0x72, 0x61, 0x72, 0x79,
- 0x20, 0x64, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x73, 0x2c,
- 0x20, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x73, 0x20, 0x77,
- 0x68, 0x69, 0x74, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2c, 0x0a, 0x20,
- 0x20, 0x2f, 0x2f, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x63, 0x6f, 0x72, 0x72,
- 0x65, 0x63, 0x74, 0x6c, 0x79, 0x20, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65,
- 0x73, 0x20, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x73, 0x20, 0x77, 0x69, 0x74,
- 0x68, 0x69, 0x6e, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x6f, 0x6c,
- 0x61, 0x74, 0x65, 0x64, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x0a, 0x20,
- 0x20, 0x5f, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x20,
- 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x74,
- 0x65, 0x78, 0x74, 0x2c, 0x20, 0x64, 0x61, 0x74, 0x61, 0x2c, 0x20, 0x73,
- 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x29, 0x20, 0x7b, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x72, 0x65, 0x6e, 0x64, 0x65,
- 0x72, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x74, 0x74, 0x69,
- 0x6e, 0x67, 0x73, 0x20, 0x3d, 0x20, 0x5f, 0x2e, 0x64, 0x65, 0x66, 0x61,
- 0x75, 0x6c, 0x74, 0x73, 0x28, 0x7b, 0x7d, 0x2c, 0x20, 0x73, 0x65, 0x74,
- 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2c, 0x20, 0x5f, 0x2e, 0x74, 0x65, 0x6d,
- 0x70, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67,
- 0x73, 0x29, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20,
- 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x20, 0x64, 0x65, 0x6c, 0x69,
- 0x6d, 0x69, 0x74, 0x65, 0x72, 0x73, 0x20, 0x69, 0x6e, 0x74, 0x6f, 0x20,
- 0x6f, 0x6e, 0x65, 0x20, 0x72, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x20,
- 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x76,
- 0x69, 0x61, 0x20, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20,
- 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x20, 0x3d, 0x20, 0x6e, 0x65,
- 0x77, 0x20, 0x52, 0x65, 0x67, 0x45, 0x78, 0x70, 0x28, 0x5b, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x28, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e,
- 0x67, 0x73, 0x2e, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x20, 0x7c, 0x7c,
- 0x20, 0x6e, 0x6f, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x29, 0x2e, 0x73, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x28, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x69, 0x6e,
- 0x74, 0x65, 0x72, 0x70, 0x6f, 0x6c, 0x61, 0x74, 0x65, 0x20, 0x7c, 0x7c,
- 0x20, 0x6e, 0x6f, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x29, 0x2e, 0x73, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x28, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x65, 0x76,
- 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x20, 0x7c, 0x7c, 0x20, 0x6e, 0x6f,
- 0x4d, 0x61, 0x74, 0x63, 0x68, 0x29, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2e, 0x6a, 0x6f, 0x69, 0x6e,
- 0x28, 0x27, 0x7c, 0x27, 0x29, 0x20, 0x2b, 0x20, 0x27, 0x7c, 0x24, 0x27,
- 0x2c, 0x20, 0x27, 0x67, 0x27, 0x29, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x2f, 0x2f, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x20,
- 0x74, 0x68, 0x65, 0x20, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
- 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2c, 0x20, 0x65, 0x73, 0x63,
- 0x61, 0x70, 0x69, 0x6e, 0x67, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67,
- 0x20, 0x6c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x73, 0x20, 0x61, 0x70,
- 0x70, 0x72, 0x6f, 0x70, 0x72, 0x69, 0x61, 0x74, 0x65, 0x6c, 0x79, 0x2e,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x69, 0x6e, 0x64,
- 0x65, 0x78, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x76, 0x61, 0x72, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x3d,
- 0x20, 0x22, 0x5f, 0x5f, 0x70, 0x2b, 0x3d, 0x27, 0x22, 0x3b, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x72, 0x65, 0x70, 0x6c,
- 0x61, 0x63, 0x65, 0x28, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2c,
- 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6d, 0x61,
- 0x74, 0x63, 0x68, 0x2c, 0x20, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x2c,
- 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x6f, 0x6c, 0x61, 0x74, 0x65,
- 0x2c, 0x20, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x2c, 0x20,
- 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x2b,
- 0x3d, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x73, 0x6c, 0x69, 0x63, 0x65,
- 0x28, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2c, 0x20, 0x6f, 0x66, 0x66, 0x73,
- 0x65, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x28, 0x65, 0x73, 0x63,
- 0x61, 0x70, 0x65, 0x72, 0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69,
- 0x6f, 0x6e, 0x28, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x29, 0x20, 0x7b, 0x20,
- 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x27, 0x5c, 0x5c, 0x27, 0x20,
- 0x2b, 0x20, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x73, 0x5b, 0x6d, 0x61,
- 0x74, 0x63, 0x68, 0x5d, 0x3b, 0x20, 0x7d, 0x29, 0x3b, 0x0a, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x65, 0x73, 0x63,
- 0x61, 0x70, 0x65, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x2b, 0x3d,
- 0x20, 0x22, 0x27, 0x2b, 0x5c, 0x6e, 0x28, 0x28, 0x5f, 0x5f, 0x74, 0x3d,
- 0x28, 0x22, 0x20, 0x2b, 0x20, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x20,
- 0x2b, 0x20, 0x22, 0x29, 0x29, 0x3d, 0x3d, 0x6e, 0x75, 0x6c, 0x6c, 0x3f,
- 0x27, 0x27, 0x3a, 0x5f, 0x2e, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x28,
- 0x5f, 0x5f, 0x74, 0x29, 0x29, 0x2b, 0x5c, 0x6e, 0x27, 0x22, 0x3b, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70,
- 0x6f, 0x6c, 0x61, 0x74, 0x65, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20,
- 0x2b, 0x3d, 0x20, 0x22, 0x27, 0x2b, 0x5c, 0x6e, 0x28, 0x28, 0x5f, 0x5f,
- 0x74, 0x3d, 0x28, 0x22, 0x20, 0x2b, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72,
- 0x70, 0x6f, 0x6c, 0x61, 0x74, 0x65, 0x20, 0x2b, 0x20, 0x22, 0x29, 0x29,
- 0x3d, 0x3d, 0x6e, 0x75, 0x6c, 0x6c, 0x3f, 0x27, 0x27, 0x3a, 0x5f, 0x5f,
- 0x74, 0x29, 0x2b, 0x5c, 0x6e, 0x27, 0x22, 0x3b, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69,
- 0x66, 0x20, 0x28, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x29,
- 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x2b, 0x3d, 0x20, 0x22, 0x27, 0x3b,
- 0x5c, 0x6e, 0x22, 0x20, 0x2b, 0x20, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61,
- 0x74, 0x65, 0x20, 0x2b, 0x20, 0x22, 0x5c, 0x6e, 0x5f, 0x5f, 0x70, 0x2b,
- 0x3d, 0x27, 0x22, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x78,
- 0x20, 0x3d, 0x20, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x20, 0x2b, 0x20,
- 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68,
- 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75,
- 0x72, 0x6e, 0x20, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x3b, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x7d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x20, 0x2b, 0x3d, 0x20, 0x22, 0x27, 0x3b, 0x5c,
- 0x6e, 0x22, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20,
- 0x49, 0x66, 0x20, 0x61, 0x20, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c,
- 0x65, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x73, 0x70, 0x65,
- 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x2c, 0x20, 0x70, 0x6c, 0x61, 0x63,
- 0x65, 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65,
- 0x73, 0x20, 0x69, 0x6e, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73,
- 0x63, 0x6f, 0x70, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66,
- 0x20, 0x28, 0x21, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e,
- 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x29, 0x20, 0x73, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x20, 0x3d, 0x20, 0x27, 0x77, 0x69, 0x74, 0x68,
- 0x28, 0x6f, 0x62, 0x6a, 0x7c, 0x7c, 0x7b, 0x7d, 0x29, 0x7b, 0x5c, 0x6e,
- 0x27, 0x20, 0x2b, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x2b,
- 0x20, 0x27, 0x7d, 0x5c, 0x6e, 0x27, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x76,
- 0x61, 0x72, 0x20, 0x5f, 0x5f, 0x74, 0x2c, 0x5f, 0x5f, 0x70, 0x3d, 0x27,
- 0x27, 0x2c, 0x5f, 0x5f, 0x6a, 0x3d, 0x41, 0x72, 0x72, 0x61, 0x79, 0x2e,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6a, 0x6f,
- 0x69, 0x6e, 0x2c, 0x22, 0x20, 0x2b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x22, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x3d, 0x66, 0x75, 0x6e, 0x63,
- 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x5f, 0x5f, 0x70, 0x2b, 0x3d,
- 0x5f, 0x5f, 0x6a, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x61, 0x72, 0x67,
- 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2c, 0x27, 0x27, 0x29, 0x3b, 0x7d,
- 0x3b, 0x5c, 0x6e, 0x22, 0x20, 0x2b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x2b, 0x20, 0x22, 0x72,
- 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x5f, 0x70, 0x3b, 0x5c, 0x6e,
- 0x22, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x74, 0x72, 0x79, 0x20,
- 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x6e, 0x64,
- 0x65, 0x72, 0x20, 0x3d, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x46, 0x75, 0x6e,
- 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e,
- 0x67, 0x73, 0x2e, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x20,
- 0x7c, 0x7c, 0x20, 0x27, 0x6f, 0x62, 0x6a, 0x27, 0x2c, 0x20, 0x27, 0x5f,
- 0x27, 0x2c, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x29, 0x3b, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x7d, 0x20, 0x63, 0x61, 0x74, 0x63, 0x68, 0x20,
- 0x28, 0x65, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x65, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x3d, 0x20, 0x73,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x74, 0x68, 0x72, 0x6f, 0x77, 0x20, 0x65, 0x3b, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x7d, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20,
- 0x28, 0x64, 0x61, 0x74, 0x61, 0x29, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72,
- 0x6e, 0x20, 0x72, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x28, 0x64, 0x61, 0x74,
- 0x61, 0x2c, 0x20, 0x5f, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76,
- 0x61, 0x72, 0x20, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x20,
- 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x64,
- 0x61, 0x74, 0x61, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x72, 0x65, 0x6e, 0x64,
- 0x65, 0x72, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x74, 0x68, 0x69, 0x73,
- 0x2c, 0x20, 0x64, 0x61, 0x74, 0x61, 0x2c, 0x20, 0x5f, 0x29, 0x3b, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x2f, 0x2f, 0x20, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x20, 0x74,
- 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x20,
- 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x73, 0x6f, 0x75,
- 0x72, 0x63, 0x65, 0x20, 0x61, 0x73, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x6e,
- 0x76, 0x65, 0x6e, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x20, 0x66, 0x6f, 0x72,
- 0x20, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74,
- 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x74, 0x65, 0x6d,
- 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x20, 0x3d, 0x20, 0x27, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e,
- 0x28, 0x27, 0x20, 0x2b, 0x20, 0x28, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e,
- 0x67, 0x73, 0x2e, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x20,
- 0x7c, 0x7c, 0x20, 0x27, 0x6f, 0x62, 0x6a, 0x27, 0x29, 0x20, 0x2b, 0x20,
- 0x27, 0x29, 0x7b, 0x5c, 0x6e, 0x27, 0x20, 0x2b, 0x20, 0x73, 0x6f, 0x75,
- 0x72, 0x63, 0x65, 0x20, 0x2b, 0x20, 0x27, 0x7d, 0x27, 0x3b, 0x0a, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74,
- 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x7d,
- 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x41, 0x64, 0x64, 0x20,
- 0x61, 0x20, 0x22, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x22, 0x20, 0x66, 0x75,
- 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63,
- 0x68, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x64, 0x65, 0x6c, 0x65, 0x67,
- 0x61, 0x74, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x77,
- 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2e, 0x0a, 0x20, 0x20, 0x5f, 0x2e,
- 0x63, 0x68, 0x61, 0x69, 0x6e, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63,
- 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6f, 0x62, 0x6a, 0x29, 0x20, 0x7b, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f,
- 0x28, 0x6f, 0x62, 0x6a, 0x29, 0x2e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x28,
- 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f,
- 0x2f, 0x20, 0x4f, 0x4f, 0x50, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x2d,
- 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d,
- 0x2d, 0x2d, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x66, 0x20, 0x55,
- 0x6e, 0x64, 0x65, 0x72, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x20, 0x69, 0x73,
- 0x20, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x20, 0x61, 0x73, 0x20, 0x61,
- 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x69,
- 0x74, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x61, 0x20,
- 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x64, 0x20, 0x6f, 0x62, 0x6a, 0x65,
- 0x63, 0x74, 0x20, 0x74, 0x68, 0x61, 0x74, 0x0a, 0x20, 0x20, 0x2f, 0x2f,
- 0x20, 0x63, 0x61, 0x6e, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64,
- 0x20, 0x4f, 0x4f, 0x2d, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x2e, 0x20, 0x54,
- 0x68, 0x69, 0x73, 0x20, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x20,
- 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x20, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x65,
- 0x64, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f,
- 0x66, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20,
- 0x2f, 0x2f, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x73, 0x63, 0x6f, 0x72,
- 0x65, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e,
- 0x20, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x64, 0x20, 0x6f, 0x62, 0x6a,
- 0x65, 0x63, 0x74, 0x73, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x62, 0x65, 0x20,
- 0x63, 0x68, 0x61, 0x69, 0x6e, 0x65, 0x64, 0x2e, 0x0a, 0x0a, 0x20, 0x20,
- 0x2f, 0x2f, 0x20, 0x48, 0x65, 0x6c, 0x70, 0x65, 0x72, 0x20, 0x66, 0x75,
- 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x63, 0x6f,
- 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x20, 0x63, 0x68, 0x61, 0x69, 0x6e,
- 0x69, 0x6e, 0x67, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6d, 0x65, 0x64,
- 0x69, 0x61, 0x74, 0x65, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73,
- 0x2e, 0x0a, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x72, 0x65, 0x73, 0x75,
- 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
- 0x6e, 0x28, 0x6f, 0x62, 0x6a, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x68, 0x69, 0x73,
- 0x2e, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x20, 0x3f, 0x20, 0x5f, 0x28,
- 0x6f, 0x62, 0x6a, 0x29, 0x2e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x28, 0x29,
- 0x20, 0x3a, 0x20, 0x6f, 0x62, 0x6a, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x3b,
- 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x41, 0x64, 0x64, 0x20, 0x61,
- 0x6c, 0x6c, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x55, 0x6e,
- 0x64, 0x65, 0x72, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x20, 0x66, 0x75, 0x6e,
- 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68,
- 0x65, 0x20, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x20, 0x6f, 0x62,
- 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x6d, 0x69,
- 0x78, 0x69, 0x6e, 0x28, 0x5f, 0x29, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f,
- 0x2f, 0x20, 0x41, 0x64, 0x64, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x6d, 0x75,
- 0x74, 0x61, 0x74, 0x6f, 0x72, 0x20, 0x41, 0x72, 0x72, 0x61, 0x79, 0x20,
- 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x74, 0x6f,
- 0x20, 0x74, 0x68, 0x65, 0x20, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72,
- 0x2e, 0x0a, 0x20, 0x20, 0x65, 0x61, 0x63, 0x68, 0x28, 0x5b, 0x27, 0x70,
- 0x6f, 0x70, 0x27, 0x2c, 0x20, 0x27, 0x70, 0x75, 0x73, 0x68, 0x27, 0x2c,
- 0x20, 0x27, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x27, 0x2c, 0x20,
- 0x27, 0x73, 0x68, 0x69, 0x66, 0x74, 0x27, 0x2c, 0x20, 0x27, 0x73, 0x6f,
- 0x72, 0x74, 0x27, 0x2c, 0x20, 0x27, 0x73, 0x70, 0x6c, 0x69, 0x63, 0x65,
- 0x27, 0x2c, 0x20, 0x27, 0x75, 0x6e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x27,
- 0x5d, 0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28,
- 0x6e, 0x61, 0x6d, 0x65, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x76, 0x61, 0x72, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x20, 0x3d,
- 0x20, 0x41, 0x72, 0x72, 0x61, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5b,
- 0x6e, 0x61, 0x6d, 0x65, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5f,
- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x74, 0x79, 0x70, 0x65, 0x5b, 0x6e,
- 0x61, 0x6d, 0x65, 0x5d, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74,
- 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x6f, 0x62, 0x6a, 0x20, 0x3d, 0x20,
- 0x74, 0x68, 0x69, 0x73, 0x2e, 0x5f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65,
- 0x64, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x74,
- 0x68, 0x6f, 0x64, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x28, 0x6f, 0x62,
- 0x6a, 0x2c, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73,
- 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20,
- 0x28, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x27, 0x73,
- 0x68, 0x69, 0x66, 0x74, 0x27, 0x20, 0x7c, 0x7c, 0x20, 0x6e, 0x61, 0x6d,
- 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x27, 0x73, 0x70, 0x6c, 0x69, 0x63, 0x65,
- 0x27, 0x29, 0x20, 0x26, 0x26, 0x20, 0x6f, 0x62, 0x6a, 0x2e, 0x6c, 0x65,
- 0x6e, 0x67, 0x74, 0x68, 0x20, 0x3d, 0x3d, 0x3d, 0x20, 0x30, 0x29, 0x20,
- 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x20, 0x6f, 0x62, 0x6a, 0x5b, 0x30,
- 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74,
- 0x75, 0x72, 0x6e, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x63,
- 0x61, 0x6c, 0x6c, 0x28, 0x74, 0x68, 0x69, 0x73, 0x2c, 0x20, 0x6f, 0x62,
- 0x6a, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x20,
- 0x20, 0x7d, 0x29, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x41,
- 0x64, 0x64, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73,
- 0x73, 0x6f, 0x72, 0x20, 0x41, 0x72, 0x72, 0x61, 0x79, 0x20, 0x66, 0x75,
- 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x74,
- 0x68, 0x65, 0x20, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2e, 0x0a,
- 0x20, 0x20, 0x65, 0x61, 0x63, 0x68, 0x28, 0x5b, 0x27, 0x63, 0x6f, 0x6e,
- 0x63, 0x61, 0x74, 0x27, 0x2c, 0x20, 0x27, 0x6a, 0x6f, 0x69, 0x6e, 0x27,
- 0x2c, 0x20, 0x27, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x27, 0x5d, 0x2c, 0x20,
- 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x61, 0x6d,
- 0x65, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72,
- 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x20, 0x3d, 0x20, 0x41, 0x72,
- 0x72, 0x61, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5b, 0x6e, 0x61, 0x6d,
- 0x65, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x2e, 0x70, 0x72,
- 0x6f, 0x74, 0x6f, 0x74, 0x79, 0x70, 0x65, 0x5b, 0x6e, 0x61, 0x6d, 0x65,
- 0x5d, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e,
- 0x28, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72,
- 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74,
- 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x74, 0x68, 0x69, 0x73, 0x2c, 0x20,
- 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x79,
- 0x28, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x5f, 0x77, 0x72, 0x61, 0x70, 0x70,
- 0x65, 0x64, 0x2c, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74,
- 0x73, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x3b, 0x0a,
- 0x20, 0x20, 0x7d, 0x29, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x5f, 0x2e, 0x65,
- 0x78, 0x74, 0x65, 0x6e, 0x64, 0x28, 0x5f, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x74, 0x79, 0x70, 0x65, 0x2c, 0x20, 0x7b, 0x0a, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x53, 0x74, 0x61, 0x72, 0x74, 0x20, 0x63,
- 0x68, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x20, 0x77, 0x72,
- 0x61, 0x70, 0x70, 0x65, 0x64, 0x20, 0x55, 0x6e, 0x64, 0x65, 0x72, 0x73,
- 0x63, 0x6f, 0x72, 0x65, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x3a, 0x20,
- 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x20, 0x7b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x74, 0x68, 0x69, 0x73, 0x2e,
- 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x20, 0x3d, 0x20, 0x74, 0x72, 0x75,
- 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74,
- 0x75, 0x72, 0x6e, 0x20, 0x74, 0x68, 0x69, 0x73, 0x3b, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x7d, 0x2c, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f,
- 0x20, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x73, 0x20, 0x74, 0x68,
- 0x65, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x20, 0x66, 0x72, 0x6f,
- 0x6d, 0x20, 0x61, 0x20, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x64, 0x20,
- 0x61, 0x6e, 0x64, 0x20, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x65, 0x64, 0x20,
- 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74,
- 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x68, 0x69,
- 0x73, 0x2e, 0x5f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x64, 0x3b, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x0a, 0x20, 0x20, 0x7d, 0x29, 0x3b,
- 0x0a, 0x0a, 0x7d, 0x29, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x74, 0x68,
- 0x69, 0x73, 0x29, 0x3b, 0x0a,
- }
-}
-
-// Underscore.js 1.4.4
-// http://underscorejs.org
-// (c) 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.
-// Underscore may be freely distributed under the MIT license.
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/underscore/testify b/Godeps/_workspace/src/github.com/robertkrimen/otto/underscore/testify
deleted file mode 100644
index 7f6e0f7c1..000000000
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/underscore/testify
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/usr/bin/env perl
-
-use strict;
-use warnings;
-
-my $underscore_test = shift @ARGV || "";
-if (!-d $underscore_test) {
- print <<_END_;
-Usage:
-
- testify ./underscore/test
-
- # Should look something like:
- arrays.js
- chaining.js
- collections.js
- functions.js
- index.html
- objects.js
- speed.js
- utility.js
- vendor
-
-_END_
- if ($underscore_test) {
- die "!: Not a directory: $underscore_test\n"
- }
- exit;
-}
-
-chdir $underscore_test or die "!: $!";
-
-my @js = <*.js>;
-
-for my $file (@js) {
- open my $fh, '<', $file or die "!: $!";
- my $tests = join "", <$fh>;
- my @tests = $tests =~ m/
- ^(\s{2}test\(.*?
- ^\s{2}}\);)$
- /mgxs;
- close $fh;
- next unless @tests;
- print "$file: ", scalar(@tests), "\n";
- my $underscore_name = "underscore_$file";
- $underscore_name =~ s/.js$//;
- my $go_file = "${underscore_name}_test.go";
- $go_file =~ s/.js$/.go/;
- open $fh, '>', $go_file or die "!: $!";
-
- $fh->print(<<_END_);
-package otto
-
-import (
- "testing"
-)
-
-_END_
-
- my $count = 0;
- for my $test (@tests) {
- $test =~ s/`([^`]+)`/<$1>/g;
- my ($name) = $test =~ m/^\s*test\(['"]([^'"]+)['"]/;
- $fh->print(<<_END_);
-// $name
-func Test_${underscore_name}_$count(t *testing.T) {
- tt(t, func(){
- test := underscoreTest()
-
- test(`
-$test
- `)
- })
-}
-
-_END_
- $count++;
- }
-}
-
-# test('#779 - delimeters are applied to unescaped text.', 1, function() {
-# var template = _.template('<<\nx\n>>', null, {evaluate: /<<(.*?)>>/g});
-# strictEqual(template(), '<<\nx\n>>');
-# });
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/underscore/underscore.go b/Godeps/_workspace/src/github.com/robertkrimen/otto/underscore/underscore.go
deleted file mode 100644
index 714b8f3cf..000000000
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/underscore/underscore.go
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
-Package underscore contains the source for the JavaScript utility-belt library.
-
- import (
- _ "github.com/robertkrimen/otto/underscore"
- )
- // Every Otto runtime will now include underscore
-
-http://underscorejs.org
-
-https://github.com/documentcloud/underscore
-
-By importing this package, you'll automatically load underscore every time you create a new Otto runtime.
-
-To prevent this behavior, you can do the following:
-
- import (
- "github.com/robertkrimen/otto/underscore"
- )
-
- func init() {
- underscore.Disable()
- }
-
-*/
-package underscore
-
-import (
- "github.com/robertkrimen/otto/registry"
-)
-
-var entry *registry.Entry = registry.Register(func() string {
- return Source()
-})
-
-// Enable underscore runtime inclusion.
-func Enable() {
- entry.Enable()
-}
-
-// Disable underscore runtime inclusion.
-func Disable() {
- entry.Disable()
-}
-
-// Source returns the underscore source.
-func Source() string {
- return string(underscore())
-}
diff --git a/Godeps/_workspace/src/github.com/rs/cors/cors.go b/Godeps/_workspace/src/github.com/rs/cors/cors.go
deleted file mode 100644
index 276bc40bb..000000000
--- a/Godeps/_workspace/src/github.com/rs/cors/cors.go
+++ /dev/null
@@ -1,308 +0,0 @@
-/*
-Package cors is net/http handler to handle CORS related requests
-as defined by http://www.w3.org/TR/cors/
-
-You can configure it by passing an option struct to cors.New:
-
- c := cors.New(cors.Options{
- AllowedOrigins: []string{"foo.com"},
- AllowedMethods: []string{"GET", "POST", "DELETE"},
- AllowCredentials: true,
- })
-
-Then insert the handler in the chain:
-
- handler = c.Handler(handler)
-
-See Options documentation for more options.
-
-The resulting handler is a standard net/http handler.
-*/
-package cors
-
-import (
- "log"
- "net/http"
- "os"
- "strconv"
- "strings"
-)
-
-// Options is a configuration container to setup the CORS middleware.
-type Options struct {
- // AllowedOrigins is a list of origins a cross-domain request can be executed from.
- // If the special "*" value is present in the list, all origins will be allowed.
- // Default value is ["*"]
- AllowedOrigins []string
- // AllowedMethods is a list of methods the client is allowed to use with
- // cross-domain requests. Default value is simple methods (GET and POST)
- AllowedMethods []string
- // AllowedHeaders is list of non simple headers the client is allowed to use with
- // cross-domain requests.
- // If the special "*" value is present in the list, all headers will be allowed.
- // Default value is [] but "Origin" is always appended to the list.
- AllowedHeaders []string
- // ExposedHeaders indicates which headers are safe to expose to the API of a CORS
- // API specification
- ExposedHeaders []string
- // AllowCredentials indicates whether the request can include user credentials like
- // cookies, HTTP authentication or client side SSL certificates.
- AllowCredentials bool
- // MaxAge indicates how long (in seconds) the results of a preflight request
- // can be cached
- MaxAge int
- // Debugging flag adds additional output to debug server side CORS issues
- Debug bool
- // log object to use when debugging
- log *log.Logger
-}
-
-type Cors struct {
- // The CORS Options
- options Options
-}
-
-// New creates a new Cors handler with the provided options.
-func New(options Options) *Cors {
- // Normalize options
- // Note: for origins and methods matching, the spec requires a case-sensitive matching.
- // As it may error prone, we chose to ignore the spec here.
- normOptions := Options{
- AllowedOrigins: convert(options.AllowedOrigins, strings.ToLower),
- AllowedMethods: convert(options.AllowedMethods, strings.ToUpper),
- // Origin is always appended as some browsers will always request
- // for this header at preflight
- AllowedHeaders: convert(append(options.AllowedHeaders, "Origin"), http.CanonicalHeaderKey),
- ExposedHeaders: convert(options.ExposedHeaders, http.CanonicalHeaderKey),
- AllowCredentials: options.AllowCredentials,
- MaxAge: options.MaxAge,
- Debug: options.Debug,
- log: log.New(os.Stdout, "[cors] ", log.LstdFlags),
- }
- if len(normOptions.AllowedOrigins) == 0 {
- // Default is all origins
- normOptions.AllowedOrigins = []string{"*"}
- }
- if len(normOptions.AllowedHeaders) == 1 {
- // Add some sensible defaults
- normOptions.AllowedHeaders = []string{"Origin", "Accept", "Content-Type"}
- }
- if len(normOptions.AllowedMethods) == 0 {
- // Default is simple methods
- normOptions.AllowedMethods = []string{"GET", "POST"}
- }
-
- if normOptions.Debug {
- normOptions.log.Printf("Options: %v", normOptions)
- }
- return &Cors{
- options: normOptions,
- }
-}
-
-// Default creates a new Cors handler with default options
-func Default() *Cors {
- return New(Options{})
-}
-
-// Handler apply the CORS specification on the request, and add relevant CORS headers
-// as necessary.
-func (cors *Cors) Handler(h http.Handler) http.Handler {
- return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- if r.Method == "OPTIONS" {
- cors.logf("Handler: Preflight request")
- cors.handlePreflight(w, r)
- // Preflight requests are standalone and should stop the chain as some other
- // middleware may not handle OPTIONS requests correctly. One typical example
- // is authentication middleware ; OPTIONS requests won't carry authentication
- // headers (see #1)
- } else {
- cors.logf("Handler: Actual request")
- cors.handleActualRequest(w, r)
- h.ServeHTTP(w, r)
- }
- })
-}
-
-// Martini compatible handler
-func (cors *Cors) HandlerFunc(w http.ResponseWriter, r *http.Request) {
- if r.Method == "OPTIONS" {
- cors.logf("HandlerFunc: Preflight request")
- cors.handlePreflight(w, r)
- } else {
- cors.logf("HandlerFunc: Actual request")
- cors.handleActualRequest(w, r)
- }
-}
-
-// Negroni compatible interface
-func (cors *Cors) ServeHTTP(w http.ResponseWriter, r *http.Request, next http.HandlerFunc) {
- if r.Method == "OPTIONS" {
- cors.logf("ServeHTTP: Preflight request")
- cors.handlePreflight(w, r)
- // Preflight requests are standalone and should stop the chain as some other
- // middleware may not handle OPTIONS requests correctly. One typical example
- // is authentication middleware ; OPTIONS requests won't carry authentication
- // headers (see #1)
- } else {
- cors.logf("ServeHTTP: Actual request")
- cors.handleActualRequest(w, r)
- next(w, r)
- }
-}
-
-// handlePreflight handles pre-flight CORS requests
-func (cors *Cors) handlePreflight(w http.ResponseWriter, r *http.Request) {
- options := cors.options
- headers := w.Header()
- origin := r.Header.Get("Origin")
-
- if r.Method != "OPTIONS" {
- cors.logf(" Preflight aborted: %s!=OPTIONS", r.Method)
- return
- }
- if origin == "" {
- cors.logf(" Preflight aborted: empty origin")
- return
- }
- if !cors.isOriginAllowed(origin) {
- cors.logf(" Preflight aborted: origin '%s' not allowed", origin)
- return
- }
-
- reqMethod := r.Header.Get("Access-Control-Request-Method")
- if !cors.isMethodAllowed(reqMethod) {
- cors.logf(" Preflight aborted: method '%s' not allowed", reqMethod)
- return
- }
- reqHeaders := parseHeaderList(r.Header.Get("Access-Control-Request-Headers"))
- if !cors.areHeadersAllowed(reqHeaders) {
- cors.logf(" Preflight aborted: headers '%v' not allowed", reqHeaders)
- return
- }
- headers.Set("Access-Control-Allow-Origin", origin)
- headers.Add("Vary", "Origin")
- // Spec says: Since the list of methods can be unbounded, simply returning the method indicated
- // by Access-Control-Request-Method (if supported) can be enough
- headers.Set("Access-Control-Allow-Methods", strings.ToUpper(reqMethod))
- if len(reqHeaders) > 0 {
-
- // Spec says: Since the list of headers can be unbounded, simply returning supported headers
- // from Access-Control-Request-Headers can be enough
- headers.Set("Access-Control-Allow-Headers", strings.Join(reqHeaders, ", "))
- }
- if options.AllowCredentials {
- headers.Set("Access-Control-Allow-Credentials", "true")
- }
- if options.MaxAge > 0 {
- headers.Set("Access-Control-Max-Age", strconv.Itoa(options.MaxAge))
- }
- cors.logf(" Preflight response headers: %v", headers)
-}
-
-// handleActualRequest handles simple cross-origin requests, actual request or redirects
-func (cors *Cors) handleActualRequest(w http.ResponseWriter, r *http.Request) {
- options := cors.options
- headers := w.Header()
- origin := r.Header.Get("Origin")
-
- if r.Method == "OPTIONS" {
- cors.logf(" Actual request no headers added: method == %s", r.Method)
- return
- }
- if origin == "" {
- cors.logf(" Actual request no headers added: missing origin")
- return
- }
- if !cors.isOriginAllowed(origin) {
- cors.logf(" Actual request no headers added: origin '%s' not allowed", origin)
- return
- }
-
- // Note that spec does define a way to specifically disallow a simple method like GET or
- // POST. Access-Control-Allow-Methods is only used for pre-flight requests and the
- // spec doesn't instruct to check the allowed methods for simple cross-origin requests.
- // We think it's a nice feature to be able to have control on those methods though.
- if !cors.isMethodAllowed(r.Method) {
- if cors.options.Debug {
- cors.logf(" Actual request no headers added: method '%s' not allowed",
- r.Method)
- }
-
- return
- }
- headers.Set("Access-Control-Allow-Origin", origin)
- headers.Add("Vary", "Origin")
- if len(options.ExposedHeaders) > 0 {
- headers.Set("Access-Control-Expose-Headers", strings.Join(options.ExposedHeaders, ", "))
- }
- if options.AllowCredentials {
- headers.Set("Access-Control-Allow-Credentials", "true")
- }
- cors.logf(" Actual response added headers: %v", headers)
-}
-
-// convenience method. checks if debugging is turned on before printing
-func (cors *Cors) logf(format string, a ...interface{}) {
- if cors.options.Debug {
- cors.options.log.Printf(format, a...)
- }
-}
-
-// isOriginAllowed checks if a given origin is allowed to perform cross-domain requests
-// on the endpoint
-func (cors *Cors) isOriginAllowed(origin string) bool {
- allowedOrigins := cors.options.AllowedOrigins
- origin = strings.ToLower(origin)
- for _, allowedOrigin := range allowedOrigins {
- switch allowedOrigin {
- case "*":
- return true
- case origin:
- return true
- }
- }
- return false
-}
-
-// isMethodAllowed checks if a given method can be used as part of a cross-domain request
-// on the endpoing
-func (cors *Cors) isMethodAllowed(method string) bool {
- allowedMethods := cors.options.AllowedMethods
- if len(allowedMethods) == 0 {
- // If no method allowed, always return false, even for preflight request
- return false
- }
- method = strings.ToUpper(method)
- if method == "OPTIONS" {
- // Always allow preflight requests
- return true
- }
- for _, allowedMethod := range allowedMethods {
- if allowedMethod == method {
- return true
- }
- }
- return false
-}
-
-// areHeadersAllowed checks if a given list of headers are allowed to used within
-// a cross-domain request.
-func (cors *Cors) areHeadersAllowed(requestedHeaders []string) bool {
- if len(requestedHeaders) == 0 {
- return true
- }
- for _, header := range requestedHeaders {
- found := false
- for _, allowedHeader := range cors.options.AllowedHeaders {
- if allowedHeader == "*" || allowedHeader == header {
- found = true
- break
- }
- }
- if !found {
- return false
- }
- }
- return true
-}
diff --git a/Godeps/_workspace/src/github.com/rs/cors/utils.go b/Godeps/_workspace/src/github.com/rs/cors/utils.go
deleted file mode 100644
index 429ab1114..000000000
--- a/Godeps/_workspace/src/github.com/rs/cors/utils.go
+++ /dev/null
@@ -1,27 +0,0 @@
-package cors
-
-import (
- "net/http"
- "strings"
-)
-
-type converter func(string) string
-
-// convert converts a list of string using the passed converter function
-func convert(s []string, c converter) []string {
- out := []string{}
- for _, i := range s {
- out = append(out, c(i))
- }
- return out
-}
-
-func parseHeaderList(headerList string) (headers []string) {
- for _, header := range strings.Split(headerList, ",") {
- header = http.CanonicalHeaderKey(strings.TrimSpace(header))
- if header != "" {
- headers = append(headers, header)
- }
- }
- return headers
-}
diff --git a/Godeps/_workspace/src/golang.org/x/text/language/index.go b/Godeps/_workspace/src/golang.org/x/text/language/index.go
deleted file mode 100644
index 7fa9cc82d..000000000
--- a/Godeps/_workspace/src/golang.org/x/text/language/index.go
+++ /dev/null
@@ -1,762 +0,0 @@
-// This file was generated by go generate; DO NOT EDIT
-
-package language
-
-// NumCompactTags is the number of common tags. The maximum tag is
-// NumCompactTags-1.
-const NumCompactTags = 747
-
-var specialTags = []Tag{ // 2 elements
- 0: {lang: 0x61, region: 0x6d, script: 0x0, pVariant: 0x5, pExt: 0xe, str: "ca-ES-valencia"},
- 1: {lang: 0x9b, region: 0x132, script: 0x0, pVariant: 0x5, pExt: 0x5, str: "en-US-u-va-posix"},
-} // Size: 72 bytes
-
-var coreTags = map[uint32]uint16{
- 0x0: 0, // und
- 0x00a00000: 3, // af
- 0x00a000d0: 4, // af-NA
- 0x00a0015e: 5, // af-ZA
- 0x00b00000: 6, // agq
- 0x00b00051: 7, // agq-CM
- 0x00d00000: 8, // ak
- 0x00d0007e: 9, // ak-GH
- 0x01100000: 10, // am
- 0x0110006e: 11, // am-ET
- 0x01500000: 12, // ar
- 0x01500001: 13, // ar-001
- 0x01500022: 14, // ar-AE
- 0x01500038: 15, // ar-BH
- 0x01500061: 16, // ar-DJ
- 0x01500066: 17, // ar-DZ
- 0x0150006a: 18, // ar-EG
- 0x0150006b: 19, // ar-EH
- 0x0150006c: 20, // ar-ER
- 0x01500095: 21, // ar-IL
- 0x01500099: 22, // ar-IQ
- 0x0150009f: 23, // ar-JO
- 0x015000a6: 24, // ar-KM
- 0x015000aa: 25, // ar-KW
- 0x015000ae: 26, // ar-LB
- 0x015000b7: 27, // ar-LY
- 0x015000b8: 28, // ar-MA
- 0x015000c7: 29, // ar-MR
- 0x015000df: 30, // ar-OM
- 0x015000eb: 31, // ar-PS
- 0x015000f1: 32, // ar-QA
- 0x01500106: 33, // ar-SA
- 0x01500109: 34, // ar-SD
- 0x01500113: 35, // ar-SO
- 0x01500115: 36, // ar-SS
- 0x0150011a: 37, // ar-SY
- 0x0150011e: 38, // ar-TD
- 0x01500126: 39, // ar-TN
- 0x0150015b: 40, // ar-YE
- 0x01c00000: 41, // as
- 0x01c00097: 42, // as-IN
- 0x01d00000: 43, // asa
- 0x01d0012d: 44, // asa-TZ
- 0x01f00000: 45, // ast
- 0x01f0006d: 46, // ast-ES
- 0x02400000: 47, // az
- 0x0241e000: 48, // az-Cyrl
- 0x0241e031: 49, // az-Cyrl-AZ
- 0x02452000: 50, // az-Latn
- 0x02452031: 51, // az-Latn-AZ
- 0x02a00000: 52, // bas
- 0x02a00051: 53, // bas-CM
- 0x02f00000: 54, // be
- 0x02f00046: 55, // be-BY
- 0x03100000: 56, // bem
- 0x0310015f: 57, // bem-ZM
- 0x03300000: 58, // bez
- 0x0330012d: 59, // bez-TZ
- 0x03800000: 60, // bg
- 0x03800037: 61, // bg-BG
- 0x03c00000: 62, // bh
- 0x04900000: 63, // bm
- 0x049000c1: 64, // bm-ML
- 0x04b00000: 65, // bn
- 0x04b00034: 66, // bn-BD
- 0x04b00097: 67, // bn-IN
- 0x04c00000: 68, // bo
- 0x04c00052: 69, // bo-CN
- 0x04c00097: 70, // bo-IN
- 0x05000000: 71, // br
- 0x05000076: 72, // br-FR
- 0x05300000: 73, // brx
- 0x05300097: 74, // brx-IN
- 0x05400000: 75, // bs
- 0x0541e000: 76, // bs-Cyrl
- 0x0541e032: 77, // bs-Cyrl-BA
- 0x05452000: 78, // bs-Latn
- 0x05452032: 79, // bs-Latn-BA
- 0x06100000: 80, // ca
- 0x06100021: 81, // ca-AD
- 0x0610006d: 82, // ca-ES
- 0x06100076: 83, // ca-FR
- 0x0610009c: 84, // ca-IT
- 0x06400000: 85, // ce
- 0x06400104: 86, // ce-RU
- 0x06600000: 87, // cgg
- 0x0660012f: 88, // cgg-UG
- 0x06c00000: 89, // chr
- 0x06c00132: 90, // chr-US
- 0x06f00000: 91, // ckb
- 0x06f00099: 92, // ckb-IQ
- 0x06f0009a: 93, // ckb-IR
- 0x07900000: 94, // cs
- 0x0790005d: 95, // cs-CZ
- 0x07d00000: 96, // cu
- 0x07d00104: 97, // cu-RU
- 0x07f00000: 98, // cy
- 0x07f00079: 99, // cy-GB
- 0x08000000: 100, // da
- 0x08000062: 101, // da-DK
- 0x08000080: 102, // da-GL
- 0x08300000: 103, // dav
- 0x083000a2: 104, // dav-KE
- 0x08500000: 105, // de
- 0x0850002d: 106, // de-AT
- 0x08500035: 107, // de-BE
- 0x0850004d: 108, // de-CH
- 0x0850005f: 109, // de-DE
- 0x085000b0: 110, // de-LI
- 0x085000b5: 111, // de-LU
- 0x08800000: 112, // dje
- 0x088000d2: 113, // dje-NE
- 0x08b00000: 114, // dsb
- 0x08b0005f: 115, // dsb-DE
- 0x08f00000: 116, // dua
- 0x08f00051: 117, // dua-CM
- 0x09000000: 118, // dv
- 0x09100000: 119, // dyo
- 0x09100112: 120, // dyo-SN
- 0x09300000: 121, // dz
- 0x09300042: 122, // dz-BT
- 0x09400000: 123, // ebu
- 0x094000a2: 124, // ebu-KE
- 0x09500000: 125, // ee
- 0x0950007e: 126, // ee-GH
- 0x09500120: 127, // ee-TG
- 0x09a00000: 128, // el
- 0x09a0005c: 129, // el-CY
- 0x09a00085: 130, // el-GR
- 0x09b00000: 131, // en
- 0x09b00001: 132, // en-001
- 0x09b0001a: 133, // en-150
- 0x09b00024: 134, // en-AG
- 0x09b00025: 135, // en-AI
- 0x09b0002c: 136, // en-AS
- 0x09b0002d: 137, // en-AT
- 0x09b0002e: 138, // en-AU
- 0x09b00033: 139, // en-BB
- 0x09b00035: 140, // en-BE
- 0x09b00039: 141, // en-BI
- 0x09b0003c: 142, // en-BM
- 0x09b00041: 143, // en-BS
- 0x09b00045: 144, // en-BW
- 0x09b00047: 145, // en-BZ
- 0x09b00048: 146, // en-CA
- 0x09b00049: 147, // en-CC
- 0x09b0004d: 148, // en-CH
- 0x09b0004f: 149, // en-CK
- 0x09b00051: 150, // en-CM
- 0x09b0005b: 151, // en-CX
- 0x09b0005c: 152, // en-CY
- 0x09b0005f: 153, // en-DE
- 0x09b00060: 154, // en-DG
- 0x09b00062: 155, // en-DK
- 0x09b00063: 156, // en-DM
- 0x09b0006c: 157, // en-ER
- 0x09b00070: 158, // en-FI
- 0x09b00071: 159, // en-FJ
- 0x09b00072: 160, // en-FK
- 0x09b00073: 161, // en-FM
- 0x09b00079: 162, // en-GB
- 0x09b0007a: 163, // en-GD
- 0x09b0007d: 164, // en-GG
- 0x09b0007e: 165, // en-GH
- 0x09b0007f: 166, // en-GI
- 0x09b00081: 167, // en-GM
- 0x09b00088: 168, // en-GU
- 0x09b0008a: 169, // en-GY
- 0x09b0008b: 170, // en-HK
- 0x09b00094: 171, // en-IE
- 0x09b00095: 172, // en-IL
- 0x09b00096: 173, // en-IM
- 0x09b00097: 174, // en-IN
- 0x09b00098: 175, // en-IO
- 0x09b0009d: 176, // en-JE
- 0x09b0009e: 177, // en-JM
- 0x09b000a2: 178, // en-KE
- 0x09b000a5: 179, // en-KI
- 0x09b000a7: 180, // en-KN
- 0x09b000ab: 181, // en-KY
- 0x09b000af: 182, // en-LC
- 0x09b000b2: 183, // en-LR
- 0x09b000b3: 184, // en-LS
- 0x09b000bd: 185, // en-MG
- 0x09b000be: 186, // en-MH
- 0x09b000c4: 187, // en-MO
- 0x09b000c5: 188, // en-MP
- 0x09b000c8: 189, // en-MS
- 0x09b000c9: 190, // en-MT
- 0x09b000ca: 191, // en-MU
- 0x09b000cc: 192, // en-MW
- 0x09b000ce: 193, // en-MY
- 0x09b000d0: 194, // en-NA
- 0x09b000d3: 195, // en-NF
- 0x09b000d4: 196, // en-NG
- 0x09b000d7: 197, // en-NL
- 0x09b000db: 198, // en-NR
- 0x09b000dd: 199, // en-NU
- 0x09b000de: 200, // en-NZ
- 0x09b000e4: 201, // en-PG
- 0x09b000e5: 202, // en-PH
- 0x09b000e6: 203, // en-PK
- 0x09b000e9: 204, // en-PN
- 0x09b000ea: 205, // en-PR
- 0x09b000ee: 206, // en-PW
- 0x09b00105: 207, // en-RW
- 0x09b00107: 208, // en-SB
- 0x09b00108: 209, // en-SC
- 0x09b00109: 210, // en-SD
- 0x09b0010a: 211, // en-SE
- 0x09b0010b: 212, // en-SG
- 0x09b0010c: 213, // en-SH
- 0x09b0010d: 214, // en-SI
- 0x09b00110: 215, // en-SL
- 0x09b00115: 216, // en-SS
- 0x09b00119: 217, // en-SX
- 0x09b0011b: 218, // en-SZ
- 0x09b0011d: 219, // en-TC
- 0x09b00123: 220, // en-TK
- 0x09b00127: 221, // en-TO
- 0x09b0012a: 222, // en-TT
- 0x09b0012b: 223, // en-TV
- 0x09b0012d: 224, // en-TZ
- 0x09b0012f: 225, // en-UG
- 0x09b00131: 226, // en-UM
- 0x09b00132: 227, // en-US
- 0x09b00136: 228, // en-VC
- 0x09b00139: 229, // en-VG
- 0x09b0013a: 230, // en-VI
- 0x09b0013c: 231, // en-VU
- 0x09b0013f: 232, // en-WS
- 0x09b0015e: 233, // en-ZA
- 0x09b0015f: 234, // en-ZM
- 0x09b00161: 235, // en-ZW
- 0x09c00000: 236, // eo
- 0x09c00001: 237, // eo-001
- 0x09d00000: 238, // es
- 0x09d0001e: 239, // es-419
- 0x09d0002b: 240, // es-AR
- 0x09d0003e: 241, // es-BO
- 0x09d00040: 242, // es-BR
- 0x09d00050: 243, // es-CL
- 0x09d00053: 244, // es-CO
- 0x09d00055: 245, // es-CR
- 0x09d00058: 246, // es-CU
- 0x09d00064: 247, // es-DO
- 0x09d00067: 248, // es-EA
- 0x09d00068: 249, // es-EC
- 0x09d0006d: 250, // es-ES
- 0x09d00084: 251, // es-GQ
- 0x09d00087: 252, // es-GT
- 0x09d0008d: 253, // es-HN
- 0x09d00092: 254, // es-IC
- 0x09d000cd: 255, // es-MX
- 0x09d000d6: 256, // es-NI
- 0x09d000e0: 257, // es-PA
- 0x09d000e2: 258, // es-PE
- 0x09d000e5: 259, // es-PH
- 0x09d000ea: 260, // es-PR
- 0x09d000ef: 261, // es-PY
- 0x09d00118: 262, // es-SV
- 0x09d00132: 263, // es-US
- 0x09d00133: 264, // es-UY
- 0x09d00138: 265, // es-VE
- 0x09f00000: 266, // et
- 0x09f00069: 267, // et-EE
- 0x0a100000: 268, // eu
- 0x0a10006d: 269, // eu-ES
- 0x0a200000: 270, // ewo
- 0x0a200051: 271, // ewo-CM
- 0x0a400000: 272, // fa
- 0x0a400023: 273, // fa-AF
- 0x0a40009a: 274, // fa-IR
- 0x0a600000: 275, // ff
- 0x0a600051: 276, // ff-CM
- 0x0a600082: 277, // ff-GN
- 0x0a6000c7: 278, // ff-MR
- 0x0a600112: 279, // ff-SN
- 0x0a800000: 280, // fi
- 0x0a800070: 281, // fi-FI
- 0x0aa00000: 282, // fil
- 0x0aa000e5: 283, // fil-PH
- 0x0ad00000: 284, // fo
- 0x0ad00062: 285, // fo-DK
- 0x0ad00074: 286, // fo-FO
- 0x0af00000: 287, // fr
- 0x0af00035: 288, // fr-BE
- 0x0af00036: 289, // fr-BF
- 0x0af00039: 290, // fr-BI
- 0x0af0003a: 291, // fr-BJ
- 0x0af0003b: 292, // fr-BL
- 0x0af00048: 293, // fr-CA
- 0x0af0004a: 294, // fr-CD
- 0x0af0004b: 295, // fr-CF
- 0x0af0004c: 296, // fr-CG
- 0x0af0004d: 297, // fr-CH
- 0x0af0004e: 298, // fr-CI
- 0x0af00051: 299, // fr-CM
- 0x0af00061: 300, // fr-DJ
- 0x0af00066: 301, // fr-DZ
- 0x0af00076: 302, // fr-FR
- 0x0af00078: 303, // fr-GA
- 0x0af0007c: 304, // fr-GF
- 0x0af00082: 305, // fr-GN
- 0x0af00083: 306, // fr-GP
- 0x0af00084: 307, // fr-GQ
- 0x0af0008f: 308, // fr-HT
- 0x0af000a6: 309, // fr-KM
- 0x0af000b5: 310, // fr-LU
- 0x0af000b8: 311, // fr-MA
- 0x0af000b9: 312, // fr-MC
- 0x0af000bc: 313, // fr-MF
- 0x0af000bd: 314, // fr-MG
- 0x0af000c1: 315, // fr-ML
- 0x0af000c6: 316, // fr-MQ
- 0x0af000c7: 317, // fr-MR
- 0x0af000ca: 318, // fr-MU
- 0x0af000d1: 319, // fr-NC
- 0x0af000d2: 320, // fr-NE
- 0x0af000e3: 321, // fr-PF
- 0x0af000e8: 322, // fr-PM
- 0x0af00100: 323, // fr-RE
- 0x0af00105: 324, // fr-RW
- 0x0af00108: 325, // fr-SC
- 0x0af00112: 326, // fr-SN
- 0x0af0011a: 327, // fr-SY
- 0x0af0011e: 328, // fr-TD
- 0x0af00120: 329, // fr-TG
- 0x0af00126: 330, // fr-TN
- 0x0af0013c: 331, // fr-VU
- 0x0af0013d: 332, // fr-WF
- 0x0af0015c: 333, // fr-YT
- 0x0b600000: 334, // fur
- 0x0b60009c: 335, // fur-IT
- 0x0b900000: 336, // fy
- 0x0b9000d7: 337, // fy-NL
- 0x0ba00000: 338, // ga
- 0x0ba00094: 339, // ga-IE
- 0x0c200000: 340, // gd
- 0x0c200079: 341, // gd-GB
- 0x0c800000: 342, // gl
- 0x0c80006d: 343, // gl-ES
- 0x0d200000: 344, // gsw
- 0x0d20004d: 345, // gsw-CH
- 0x0d200076: 346, // gsw-FR
- 0x0d2000b0: 347, // gsw-LI
- 0x0d300000: 348, // gu
- 0x0d300097: 349, // gu-IN
- 0x0d700000: 350, // guw
- 0x0d800000: 351, // guz
- 0x0d8000a2: 352, // guz-KE
- 0x0d900000: 353, // gv
- 0x0d900096: 354, // gv-IM
- 0x0dc00000: 355, // ha
- 0x0dc0007e: 356, // ha-GH
- 0x0dc000d2: 357, // ha-NE
- 0x0dc000d4: 358, // ha-NG
- 0x0de00000: 359, // haw
- 0x0de00132: 360, // haw-US
- 0x0e000000: 361, // he
- 0x0e000095: 362, // he-IL
- 0x0e100000: 363, // hi
- 0x0e100097: 364, // hi-IN
- 0x0ee00000: 365, // hr
- 0x0ee00032: 366, // hr-BA
- 0x0ee0008e: 367, // hr-HR
- 0x0ef00000: 368, // hsb
- 0x0ef0005f: 369, // hsb-DE
- 0x0f200000: 370, // hu
- 0x0f200090: 371, // hu-HU
- 0x0f300000: 372, // hy
- 0x0f300027: 373, // hy-AM
- 0x0f800000: 374, // id
- 0x0f800093: 375, // id-ID
- 0x0fa00000: 376, // ig
- 0x0fa000d4: 377, // ig-NG
- 0x0fb00000: 378, // ii
- 0x0fb00052: 379, // ii-CN
- 0x10200000: 380, // is
- 0x1020009b: 381, // is-IS
- 0x10300000: 382, // it
- 0x1030004d: 383, // it-CH
- 0x1030009c: 384, // it-IT
- 0x10300111: 385, // it-SM
- 0x10400000: 386, // iu
- 0x10700000: 387, // ja
- 0x107000a0: 388, // ja-JP
- 0x10900000: 389, // jbo
- 0x10a00000: 390, // jgo
- 0x10a00051: 391, // jgo-CM
- 0x10c00000: 392, // jmc
- 0x10c0012d: 393, // jmc-TZ
- 0x10f00000: 394, // jv
- 0x11100000: 395, // ka
- 0x1110007b: 396, // ka-GE
- 0x11300000: 397, // kab
- 0x11300066: 398, // kab-DZ
- 0x11500000: 399, // kaj
- 0x11600000: 400, // kam
- 0x116000a2: 401, // kam-KE
- 0x11900000: 402, // kcg
- 0x11b00000: 403, // kde
- 0x11b0012d: 404, // kde-TZ
- 0x11d00000: 405, // kea
- 0x11d00059: 406, // kea-CV
- 0x12800000: 407, // khq
- 0x128000c1: 408, // khq-ML
- 0x12b00000: 409, // ki
- 0x12b000a2: 410, // ki-KE
- 0x12f00000: 411, // kk
- 0x12f000ac: 412, // kk-KZ
- 0x13000000: 413, // kkj
- 0x13000051: 414, // kkj-CM
- 0x13100000: 415, // kl
- 0x13100080: 416, // kl-GL
- 0x13200000: 417, // kln
- 0x132000a2: 418, // kln-KE
- 0x13300000: 419, // km
- 0x133000a4: 420, // km-KH
- 0x13500000: 421, // kn
- 0x13500097: 422, // kn-IN
- 0x13600000: 423, // ko
- 0x136000a8: 424, // ko-KP
- 0x136000a9: 425, // ko-KR
- 0x13800000: 426, // kok
- 0x13800097: 427, // kok-IN
- 0x14100000: 428, // ks
- 0x14100097: 429, // ks-IN
- 0x14200000: 430, // ksb
- 0x1420012d: 431, // ksb-TZ
- 0x14300000: 432, // ksf
- 0x14300051: 433, // ksf-CM
- 0x14400000: 434, // ksh
- 0x1440005f: 435, // ksh-DE
- 0x14500000: 436, // ku
- 0x14a00000: 437, // kw
- 0x14a00079: 438, // kw-GB
- 0x14d00000: 439, // ky
- 0x14d000a3: 440, // ky-KG
- 0x15100000: 441, // lag
- 0x1510012d: 442, // lag-TZ
- 0x15400000: 443, // lb
- 0x154000b5: 444, // lb-LU
- 0x15a00000: 445, // lg
- 0x15a0012f: 446, // lg-UG
- 0x16100000: 447, // lkt
- 0x16100132: 448, // lkt-US
- 0x16400000: 449, // ln
- 0x16400029: 450, // ln-AO
- 0x1640004a: 451, // ln-CD
- 0x1640004b: 452, // ln-CF
- 0x1640004c: 453, // ln-CG
- 0x16500000: 454, // lo
- 0x165000ad: 455, // lo-LA
- 0x16800000: 456, // lrc
- 0x16800099: 457, // lrc-IQ
- 0x1680009a: 458, // lrc-IR
- 0x16900000: 459, // lt
- 0x169000b4: 460, // lt-LT
- 0x16b00000: 461, // lu
- 0x16b0004a: 462, // lu-CD
- 0x16d00000: 463, // luo
- 0x16d000a2: 464, // luo-KE
- 0x16e00000: 465, // luy
- 0x16e000a2: 466, // luy-KE
- 0x17000000: 467, // lv
- 0x170000b6: 468, // lv-LV
- 0x17a00000: 469, // mas
- 0x17a000a2: 470, // mas-KE
- 0x17a0012d: 471, // mas-TZ
- 0x18000000: 472, // mer
- 0x180000a2: 473, // mer-KE
- 0x18200000: 474, // mfe
- 0x182000ca: 475, // mfe-MU
- 0x18300000: 476, // mg
- 0x183000bd: 477, // mg-MG
- 0x18400000: 478, // mgh
- 0x184000cf: 479, // mgh-MZ
- 0x18500000: 480, // mgo
- 0x18500051: 481, // mgo-CM
- 0x18c00000: 482, // mk
- 0x18c000c0: 483, // mk-MK
- 0x18d00000: 484, // ml
- 0x18d00097: 485, // ml-IN
- 0x18f00000: 486, // mn
- 0x18f000c3: 487, // mn-MN
- 0x19600000: 488, // mr
- 0x19600097: 489, // mr-IN
- 0x19a00000: 490, // ms
- 0x19a0003d: 491, // ms-BN
- 0x19a000ce: 492, // ms-MY
- 0x19a0010b: 493, // ms-SG
- 0x19b00000: 494, // mt
- 0x19b000c9: 495, // mt-MT
- 0x19d00000: 496, // mua
- 0x19d00051: 497, // mua-CM
- 0x1a500000: 498, // my
- 0x1a5000c2: 499, // my-MM
- 0x1a900000: 500, // mzn
- 0x1a90009a: 501, // mzn-IR
- 0x1ab00000: 502, // nah
- 0x1ae00000: 503, // naq
- 0x1ae000d0: 504, // naq-NA
- 0x1af00000: 505, // nb
- 0x1af000d8: 506, // nb-NO
- 0x1af0010e: 507, // nb-SJ
- 0x1b100000: 508, // nd
- 0x1b100161: 509, // nd-ZW
- 0x1b400000: 510, // ne
- 0x1b400097: 511, // ne-IN
- 0x1b4000d9: 512, // ne-NP
- 0x1bd00000: 513, // nl
- 0x1bd0002f: 514, // nl-AW
- 0x1bd00035: 515, // nl-BE
- 0x1bd0003f: 516, // nl-BQ
- 0x1bd0005a: 517, // nl-CW
- 0x1bd000d7: 518, // nl-NL
- 0x1bd00114: 519, // nl-SR
- 0x1bd00119: 520, // nl-SX
- 0x1be00000: 521, // nmg
- 0x1be00051: 522, // nmg-CM
- 0x1bf00000: 523, // nn
- 0x1bf000d8: 524, // nn-NO
- 0x1c000000: 525, // nnh
- 0x1c000051: 526, // nnh-CM
- 0x1c100000: 527, // no
- 0x1c500000: 528, // nqo
- 0x1c600000: 529, // nr
- 0x1c800000: 530, // nso
- 0x1c900000: 531, // nus
- 0x1c900115: 532, // nus-SS
- 0x1cc00000: 533, // ny
- 0x1ce00000: 534, // nyn
- 0x1ce0012f: 535, // nyn-UG
- 0x1d200000: 536, // om
- 0x1d20006e: 537, // om-ET
- 0x1d2000a2: 538, // om-KE
- 0x1d300000: 539, // or
- 0x1d300097: 540, // or-IN
- 0x1d400000: 541, // os
- 0x1d40007b: 542, // os-GE
- 0x1d400104: 543, // os-RU
- 0x1d700000: 544, // pa
- 0x1d705000: 545, // pa-Arab
- 0x1d7050e6: 546, // pa-Arab-PK
- 0x1d72f000: 547, // pa-Guru
- 0x1d72f097: 548, // pa-Guru-IN
- 0x1db00000: 549, // pap
- 0x1e700000: 550, // pl
- 0x1e7000e7: 551, // pl-PL
- 0x1ed00000: 552, // prg
- 0x1ed00001: 553, // prg-001
- 0x1ee00000: 554, // ps
- 0x1ee00023: 555, // ps-AF
- 0x1ef00000: 556, // pt
- 0x1ef00029: 557, // pt-AO
- 0x1ef00040: 558, // pt-BR
- 0x1ef0004d: 559, // pt-CH
- 0x1ef00059: 560, // pt-CV
- 0x1ef00084: 561, // pt-GQ
- 0x1ef00089: 562, // pt-GW
- 0x1ef000b5: 563, // pt-LU
- 0x1ef000c4: 564, // pt-MO
- 0x1ef000cf: 565, // pt-MZ
- 0x1ef000ec: 566, // pt-PT
- 0x1ef00116: 567, // pt-ST
- 0x1ef00124: 568, // pt-TL
- 0x1f100000: 569, // qu
- 0x1f10003e: 570, // qu-BO
- 0x1f100068: 571, // qu-EC
- 0x1f1000e2: 572, // qu-PE
- 0x1fc00000: 573, // rm
- 0x1fc0004d: 574, // rm-CH
- 0x20100000: 575, // rn
- 0x20100039: 576, // rn-BI
- 0x20300000: 577, // ro
- 0x203000ba: 578, // ro-MD
- 0x20300102: 579, // ro-RO
- 0x20500000: 580, // rof
- 0x2050012d: 581, // rof-TZ
- 0x20700000: 582, // ru
- 0x20700046: 583, // ru-BY
- 0x207000a3: 584, // ru-KG
- 0x207000ac: 585, // ru-KZ
- 0x207000ba: 586, // ru-MD
- 0x20700104: 587, // ru-RU
- 0x2070012e: 588, // ru-UA
- 0x20a00000: 589, // rw
- 0x20a00105: 590, // rw-RW
- 0x20b00000: 591, // rwk
- 0x20b0012d: 592, // rwk-TZ
- 0x20f00000: 593, // sah
- 0x20f00104: 594, // sah-RU
- 0x21000000: 595, // saq
- 0x210000a2: 596, // saq-KE
- 0x21400000: 597, // sbp
- 0x2140012d: 598, // sbp-TZ
- 0x21c00000: 599, // sdh
- 0x21d00000: 600, // se
- 0x21d00070: 601, // se-FI
- 0x21d000d8: 602, // se-NO
- 0x21d0010a: 603, // se-SE
- 0x21f00000: 604, // seh
- 0x21f000cf: 605, // seh-MZ
- 0x22100000: 606, // ses
- 0x221000c1: 607, // ses-ML
- 0x22200000: 608, // sg
- 0x2220004b: 609, // sg-CF
- 0x22600000: 610, // shi
- 0x22652000: 611, // shi-Latn
- 0x226520b8: 612, // shi-Latn-MA
- 0x226d2000: 613, // shi-Tfng
- 0x226d20b8: 614, // shi-Tfng-MA
- 0x22800000: 615, // si
- 0x228000b1: 616, // si-LK
- 0x22a00000: 617, // sk
- 0x22a0010f: 618, // sk-SK
- 0x22c00000: 619, // sl
- 0x22c0010d: 620, // sl-SI
- 0x23000000: 621, // sma
- 0x23100000: 622, // smi
- 0x23200000: 623, // smj
- 0x23300000: 624, // smn
- 0x23300070: 625, // smn-FI
- 0x23500000: 626, // sms
- 0x23600000: 627, // sn
- 0x23600161: 628, // sn-ZW
- 0x23800000: 629, // so
- 0x23800061: 630, // so-DJ
- 0x2380006e: 631, // so-ET
- 0x238000a2: 632, // so-KE
- 0x23800113: 633, // so-SO
- 0x23a00000: 634, // sq
- 0x23a00026: 635, // sq-AL
- 0x23a000c0: 636, // sq-MK
- 0x23a0014a: 637, // sq-XK
- 0x23b00000: 638, // sr
- 0x23b1e000: 639, // sr-Cyrl
- 0x23b1e032: 640, // sr-Cyrl-BA
- 0x23b1e0bb: 641, // sr-Cyrl-ME
- 0x23b1e103: 642, // sr-Cyrl-RS
- 0x23b1e14a: 643, // sr-Cyrl-XK
- 0x23b52000: 644, // sr-Latn
- 0x23b52032: 645, // sr-Latn-BA
- 0x23b520bb: 646, // sr-Latn-ME
- 0x23b52103: 647, // sr-Latn-RS
- 0x23b5214a: 648, // sr-Latn-XK
- 0x24000000: 649, // ss
- 0x24100000: 650, // ssy
- 0x24200000: 651, // st
- 0x24700000: 652, // sv
- 0x24700030: 653, // sv-AX
- 0x24700070: 654, // sv-FI
- 0x2470010a: 655, // sv-SE
- 0x24800000: 656, // sw
- 0x2480004a: 657, // sw-CD
- 0x248000a2: 658, // sw-KE
- 0x2480012d: 659, // sw-TZ
- 0x2480012f: 660, // sw-UG
- 0x24f00000: 661, // syr
- 0x25100000: 662, // ta
- 0x25100097: 663, // ta-IN
- 0x251000b1: 664, // ta-LK
- 0x251000ce: 665, // ta-MY
- 0x2510010b: 666, // ta-SG
- 0x25800000: 667, // te
- 0x25800097: 668, // te-IN
- 0x25a00000: 669, // teo
- 0x25a000a2: 670, // teo-KE
- 0x25a0012f: 671, // teo-UG
- 0x25d00000: 672, // th
- 0x25d00121: 673, // th-TH
- 0x26100000: 674, // ti
- 0x2610006c: 675, // ti-ER
- 0x2610006e: 676, // ti-ET
- 0x26200000: 677, // tig
- 0x26400000: 678, // tk
- 0x26400125: 679, // tk-TM
- 0x26b00000: 680, // tn
- 0x26c00000: 681, // to
- 0x26c00127: 682, // to-TO
- 0x26f00000: 683, // tr
- 0x26f0005c: 684, // tr-CY
- 0x26f00129: 685, // tr-TR
- 0x27200000: 686, // ts
- 0x27e00000: 687, // twq
- 0x27e000d2: 688, // twq-NE
- 0x28200000: 689, // tzm
- 0x282000b8: 690, // tzm-MA
- 0x28400000: 691, // ug
- 0x28400052: 692, // ug-CN
- 0x28600000: 693, // uk
- 0x2860012e: 694, // uk-UA
- 0x28c00000: 695, // ur
- 0x28c00097: 696, // ur-IN
- 0x28c000e6: 697, // ur-PK
- 0x28d00000: 698, // uz
- 0x28d05000: 699, // uz-Arab
- 0x28d05023: 700, // uz-Arab-AF
- 0x28d1e000: 701, // uz-Cyrl
- 0x28d1e134: 702, // uz-Cyrl-UZ
- 0x28d52000: 703, // uz-Latn
- 0x28d52134: 704, // uz-Latn-UZ
- 0x28e00000: 705, // vai
- 0x28e52000: 706, // vai-Latn
- 0x28e520b2: 707, // vai-Latn-LR
- 0x28ed9000: 708, // vai-Vaii
- 0x28ed90b2: 709, // vai-Vaii-LR
- 0x28f00000: 710, // ve
- 0x29200000: 711, // vi
- 0x2920013b: 712, // vi-VN
- 0x29700000: 713, // vo
- 0x29700001: 714, // vo-001
- 0x29a00000: 715, // vun
- 0x29a0012d: 716, // vun-TZ
- 0x29b00000: 717, // wa
- 0x29c00000: 718, // wae
- 0x29c0004d: 719, // wae-CH
- 0x2a400000: 720, // wo
- 0x2a900000: 721, // xh
- 0x2b100000: 722, // xog
- 0x2b10012f: 723, // xog-UG
- 0x2b700000: 724, // yav
- 0x2b700051: 725, // yav-CM
- 0x2b900000: 726, // yi
- 0x2b900001: 727, // yi-001
- 0x2ba00000: 728, // yo
- 0x2ba0003a: 729, // yo-BJ
- 0x2ba000d4: 730, // yo-NG
- 0x2bd00000: 731, // yue
- 0x2bd0008b: 732, // yue-HK
- 0x2c300000: 733, // zgh
- 0x2c3000b8: 734, // zgh-MA
- 0x2c400000: 735, // zh
- 0x2c434000: 736, // zh-Hans
- 0x2c434052: 737, // zh-Hans-CN
- 0x2c43408b: 738, // zh-Hans-HK
- 0x2c4340c4: 739, // zh-Hans-MO
- 0x2c43410b: 740, // zh-Hans-SG
- 0x2c435000: 741, // zh-Hant
- 0x2c43508b: 742, // zh-Hant-HK
- 0x2c4350c4: 743, // zh-Hant-MO
- 0x2c43512c: 744, // zh-Hant-TW
- 0x2c600000: 745, // zu
- 0x2c60015e: 746, // zu-ZA
-}
-
-// Total table size 4550 bytes (4KiB); checksum: B6D49547
diff --git a/Godeps/_workspace/src/golang.org/x/text/language/tables.go b/Godeps/_workspace/src/golang.org/x/text/language/tables.go
deleted file mode 100644
index 5de0f856a..000000000
--- a/Godeps/_workspace/src/golang.org/x/text/language/tables.go
+++ /dev/null
@@ -1,2791 +0,0 @@
-// This file was generated by go generate; DO NOT EDIT
-
-package language
-
-import "golang.org/x/text/internal/tag"
-
-// CLDRVersion is the CLDR version from which the tables in this package are derived.
-const CLDRVersion = "29"
-
-const numLanguages = 8654
-
-const numScripts = 230
-
-const numRegions = 354
-
-type fromTo struct {
- from uint16
- to uint16
-}
-
-const nonCanonicalUnd = 649
-const (
- _af = 10
- _am = 17
- _ar = 21
- _az = 36
- _bg = 56
- _bn = 75
- _ca = 97
- _cs = 121
- _da = 128
- _de = 133
- _el = 154
- _en = 155
- _es = 157
- _et = 159
- _fa = 164
- _fi = 168
- _fil = 170
- _fr = 175
- _gu = 211
- _he = 224
- _hi = 225
- _hr = 238
- _hu = 242
- _hy = 243
- _id = 248
- _is = 258
- _it = 259
- _ja = 263
- _ka = 273
- _kk = 303
- _km = 307
- _kn = 309
- _ko = 310
- _ky = 333
- _lo = 357
- _lt = 361
- _lv = 368
- _mk = 396
- _ml = 397
- _mn = 399
- _mo = 402
- _mr = 406
- _ms = 410
- _mul = 414
- _my = 421
- _nb = 431
- _ne = 436
- _nl = 445
- _no = 449
- _pa = 471
- _pl = 487
- _pt = 495
- _ro = 515
- _ru = 519
- _sh = 549
- _si = 552
- _sk = 554
- _sl = 556
- _sq = 570
- _sr = 571
- _sv = 583
- _sw = 584
- _ta = 593
- _te = 600
- _th = 605
- _tl = 616
- _tn = 619
- _tr = 623
- _uk = 646
- _ur = 652
- _uz = 653
- _vi = 658
- _zh = 708
- _zu = 710
- _jbo = 265
- _ami = 1033
- _bnn = 1740
- _hak = 221
- _tlh = 13850
- _lb = 340
- _nv = 458
- _pwn = 11438
- _tao = 13571
- _tay = 13581
- _tsu = 14045
- _nn = 447
- _sfb = 13012
- _vgt = 15084
- _sgg = 13043
- _cmn = 2390
- _nan = 428
- _hsn = 240
-)
-
-const langPrivateStart = 0x2d09
-
-const langPrivateEnd = 0x2f10
-
-// lang holds an alphabetically sorted list of ISO-639 language identifiers.
-// All entries are 4 bytes. The index of the identifier (divided by 4) is the language tag.
-// For 2-byte language identifiers, the two successive bytes have the following meaning:
-// - if the first letter of the 2- and 3-letter ISO codes are the same:
-// the second and third letter of the 3-letter ISO code.
-// - otherwise: a 0 and a by 2 bits right-shifted index into altLangISO3.
-// For 3-byte language identifiers the 4th byte is 0.
-var lang tag.Index = "" + // Size: 2856 bytes
- "---\x00aaarabbkabr\x00ace\x00ach\x00ada\x00ady\x00aeveaeb\x00affragq\x00" +
- "aho\x00akkaakk\x00aln\x00alt\x00ammhamo\x00anrgaoz\x00arraarc\x00arn\x00" +
- "aro\x00arq\x00ary\x00arz\x00assmasa\x00ase\x00ast\x00atj\x00avvaawa\x00a" +
- "yymazzebaakbal\x00ban\x00bap\x00bar\x00bas\x00bax\x00bbc\x00bbj\x00bci" +
- "\x00beelbej\x00bem\x00bew\x00bez\x00bfd\x00bfq\x00bft\x00bfy\x00bgulbgc" +
- "\x00bgn\x00bgx\x00bhihbhb\x00bhi\x00bhk\x00bho\x00biisbik\x00bin\x00bjj" +
- "\x00bjn\x00bkm\x00bku\x00blt\x00bmambmq\x00bnenboodbpy\x00bqi\x00bqv\x00" +
- "brrebra\x00brh\x00brx\x00bsosbsq\x00bss\x00bto\x00btv\x00bua\x00buc\x00b" +
- "ug\x00bum\x00bvb\x00byn\x00byv\x00bze\x00caatcch\x00ccp\x00ceheceb\x00cg" +
- "g\x00chhachk\x00chm\x00cho\x00chp\x00chr\x00cja\x00cjm\x00ckb\x00cooscop" +
- "\x00cps\x00crrecrj\x00crk\x00crl\x00crm\x00crs\x00csescsb\x00csw\x00ctd" +
- "\x00cuhucvhvcyymdaandak\x00dar\x00dav\x00dcc\x00deeuden\x00dgr\x00dje" +
- "\x00dnj\x00doi\x00dsb\x00dtm\x00dtp\x00dty\x00dua\x00dvivdyo\x00dyu\x00d" +
- "zzoebu\x00eeweefi\x00egl\x00egy\x00eky\x00elllenngeopoes\x00\x05esu\x00e" +
- "tstett\x00euusewo\x00ext\x00faasfan\x00ffulffm\x00fiinfia\x00fil\x00fit" +
- "\x00fjijfoaofon\x00frrafrc\x00frp\x00frr\x00frs\x00fud\x00fuq\x00fur\x00" +
- "fuv\x00fvr\x00fyrygalegaa\x00gag\x00gan\x00gay\x00gbm\x00gbz\x00gcr\x00g" +
- "dlagez\x00ggn\x00gil\x00gjk\x00gju\x00gllgglk\x00gnrngom\x00gon\x00gor" +
- "\x00gos\x00got\x00grc\x00grt\x00gsw\x00guujgub\x00guc\x00gur\x00guw\x00g" +
- "uz\x00gvlvgvr\x00gwi\x00haauhak\x00haw\x00haz\x00heebhiinhif\x00hil\x00h" +
- "lu\x00hmd\x00hnd\x00hne\x00hnj\x00hnn\x00hno\x00homohoc\x00hoj\x00hrrvhs" +
- "b\x00hsn\x00htathuunhyyehzerianaiba\x00ibb\x00idndieleigboiiiiikpkikt" +
- "\x00ilo\x00inndinh\x00iodoisslittaiukuiw\x00\x03izh\x00japnjam\x00jbo" +
- "\x00jgo\x00ji\x00\x06jmc\x00jml\x00jut\x00jvavjwavkaatkaa\x00kab\x00kac" +
- "\x00kaj\x00kam\x00kao\x00kbd\x00kcg\x00kck\x00kde\x00kdt\x00kea\x00ken" +
- "\x00kfo\x00kfr\x00kfy\x00kgonkge\x00kgp\x00kha\x00khb\x00khn\x00khq\x00k" +
- "ht\x00khw\x00kiikkiu\x00kjuakjg\x00kkazkkj\x00klalkln\x00kmhmkmb\x00knan" +
- "koorkoi\x00kok\x00kos\x00kpe\x00kraukrc\x00kri\x00krj\x00krl\x00kru\x00k" +
- "sasksb\x00ksf\x00ksh\x00kuurkum\x00kvomkvr\x00kvx\x00kw\x00\x01kxm\x00kx" +
- "p\x00kyirlaatlab\x00lad\x00lag\x00lah\x00laj\x00lbtzlbe\x00lbw\x00lcp" +
- "\x00lep\x00lez\x00lgugliimlif\x00lij\x00lis\x00ljp\x00lki\x00lkt\x00lmn" +
- "\x00lmo\x00lninloaolol\x00loz\x00lrc\x00ltitltg\x00luublua\x00luo\x00luy" +
- "\x00luz\x00lvavlwl\x00lzh\x00lzz\x00mad\x00maf\x00mag\x00mai\x00mak\x00m" +
- "an\x00mas\x00maz\x00mdf\x00mdh\x00mdr\x00men\x00mer\x00mfa\x00mfe\x00mgl" +
- "gmgh\x00mgo\x00mgp\x00mgy\x00mhahmirimin\x00mis\x00mkkdmlalmls\x00mnonmn" +
- "i\x00mnw\x00moolmoe\x00moh\x00mos\x00mrarmrd\x00mrj\x00mro\x00mssamtltmt" +
- "r\x00mua\x00mul\x00mus\x00mvy\x00mwk\x00mwr\x00mwv\x00mxc\x00myyamyv\x00" +
- "myx\x00myz\x00mzn\x00naaunah\x00nan\x00nap\x00naq\x00nbobnch\x00nddendc" +
- "\x00nds\x00neepnew\x00ngdongl\x00nhe\x00nhw\x00nij\x00niu\x00njo\x00nlld" +
- "nmg\x00nnnonnh\x00noornod\x00noe\x00non\x00nqo\x00nrblnsk\x00nso\x00nus" +
- "\x00nvavnxq\x00nyyanym\x00nyn\x00nzi\x00occiojjiomrmorriosssosa\x00otk" +
- "\x00paanpag\x00pal\x00pam\x00pap\x00pau\x00pcd\x00pcm\x00pdc\x00pdt\x00p" +
- "eo\x00pfl\x00phn\x00pilipka\x00pko\x00plolpms\x00pnt\x00pon\x00pra\x00pr" +
- "d\x00prg\x00psusptorpuu\x00quuequc\x00qug\x00raj\x00rcf\x00rej\x00rgn" +
- "\x00ria\x00rif\x00rjs\x00rkt\x00rmohrmf\x00rmo\x00rmt\x00rmu\x00rnunrng" +
- "\x00roonrob\x00rof\x00rtm\x00ruusrue\x00rug\x00rw\x00\x04rwk\x00ryu\x00s" +
- "aansaf\x00sah\x00saq\x00sas\x00sat\x00saz\x00sbp\x00scrdsck\x00scn\x00sc" +
- "o\x00scs\x00sdndsdc\x00sdh\x00semesef\x00seh\x00sei\x00ses\x00sgagsga" +
- "\x00sgs\x00sh\x00\x02shi\x00shn\x00siinsid\x00sklkskr\x00sllvsli\x00sly" +
- "\x00smmosma\x00smi\x00smj\x00smn\x00smp\x00sms\x00snnasnk\x00soomsou\x00" +
- "sqqisrrpsrb\x00srn\x00srr\x00srx\x00ssswssy\x00stotstq\x00suunsuk\x00sus" +
- "\x00svweswwaswb\x00swc\x00swg\x00swv\x00sxn\x00syl\x00syr\x00szl\x00taam" +
- "taj\x00tbw\x00tcy\x00tdd\x00tdg\x00tdh\x00teeltem\x00teo\x00tet\x00tggkt" +
- "hhathl\x00thq\x00thr\x00tiirtig\x00tiv\x00tkuktkl\x00tkr\x00tkt\x00tlglt" +
- "ly\x00tmh\x00tnsntoontog\x00tpi\x00trurtru\x00trv\x00tssotsd\x00tsf\x00t" +
- "sg\x00tsj\x00ttatttj\x00tts\x00ttt\x00tum\x00tvl\x00twwitwq\x00txg\x00ty" +
- "ahtyv\x00tzm\x00udm\x00ugiguga\x00ukkruli\x00umb\x00und\x00unr\x00unx" +
- "\x00urrduzzbvai\x00veenvec\x00vep\x00viievic\x00vls\x00vmf\x00vmw\x00voo" +
- "lvot\x00vro\x00vun\x00walnwae\x00wal\x00war\x00wbp\x00wbq\x00wbr\x00wls" +
- "\x00wni\x00woolwtm\x00wuu\x00xav\x00xcr\x00xhhoxlc\x00xld\x00xmf\x00xmn" +
- "\x00xmr\x00xna\x00xnr\x00xog\x00xpr\x00xsa\x00xsr\x00yao\x00yap\x00yav" +
- "\x00ybb\x00yiidyooryrl\x00yua\x00yue\x00zahazag\x00zbl\x00zdj\x00zea\x00" +
- "zgh\x00zhhozmi\x00zuulzxx\x00zza\x00\xff\xff\xff\xff"
-
-const langNoIndexOffset = 713
-
-// langNoIndex is a bit vector of all 3-letter language codes that are not used as an index
-// in lookup tables. The language ids for these language codes are derived directly
-// from the letters and are not consecutive.
-// Size: 2197 bytes, 2197 elements
-var langNoIndex = [2197]uint8{
- // Entry 0 - 3F
- 0xff, 0xfd, 0xfd, 0xfe, 0xef, 0xf7, 0xbf, 0xd2,
- 0xfb, 0xbf, 0xfe, 0xfa, 0xb7, 0x1d, 0x3c, 0x57,
- 0x6f, 0x97, 0x73, 0xf8, 0xff, 0xef, 0xff, 0x70,
- 0xaf, 0x03, 0xff, 0xff, 0xcf, 0x05, 0x85, 0x62,
- 0xe9, 0xbf, 0xfd, 0xff, 0xff, 0xf7, 0xfd, 0x77,
- 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe3,
- 0xc9, 0xff, 0xff, 0xff, 0x4d, 0xb8, 0x0a, 0x6a,
- 0x7e, 0xfa, 0xe3, 0xfe, 0x7e, 0xff, 0x77, 0xff,
- // Entry 40 - 7F
- 0xff, 0xff, 0xff, 0xdf, 0x2b, 0xf4, 0xf1, 0xe0,
- 0x5d, 0xe7, 0x9f, 0x14, 0x07, 0x20, 0xdf, 0xed,
- 0x9f, 0x3f, 0xc9, 0x21, 0xf8, 0x3f, 0x94, 0xf7,
- 0x7e, 0xff, 0xff, 0xff, 0xfe, 0x7f, 0xff, 0xff,
- 0xff, 0xff, 0x5f, 0xfc, 0xdb, 0xfd, 0xbf, 0xb5,
- 0x7b, 0xdf, 0x7f, 0xf7, 0xeb, 0xfe, 0xff, 0xa7,
- 0xbd, 0xff, 0x7f, 0xf7, 0xff, 0xef, 0xef, 0xef,
- 0xff, 0xff, 0x9f, 0xff, 0xff, 0xef, 0xff, 0xdf,
- // Entry 80 - BF
- 0xff, 0xff, 0xf3, 0xff, 0xfb, 0x2f, 0xff, 0xff,
- 0xfb, 0xee, 0xff, 0xbd, 0xdb, 0xff, 0xdf, 0xf7,
- 0xff, 0xfa, 0xfd, 0xff, 0x7e, 0xaf, 0x7b, 0xfe,
- 0x7f, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xdf, 0xff,
- 0xff, 0xdf, 0xfb, 0xff, 0xfd, 0xfc, 0xfb, 0xff,
- 0xff, 0xff, 0xff, 0xf7, 0x7f, 0xbf, 0xfd, 0xd5,
- 0xa5, 0x77, 0x40, 0xff, 0x9c, 0xc1, 0x41, 0x2c,
- 0x08, 0x24, 0x41, 0x00, 0x50, 0x40, 0x00, 0x80,
- // Entry C0 - FF
- 0xfb, 0x4a, 0xf2, 0x9f, 0xb4, 0x42, 0x41, 0x96,
- 0x9b, 0x14, 0x88, 0xf6, 0x7b, 0xe7, 0x17, 0x56,
- 0x55, 0x7d, 0x0e, 0x1c, 0x37, 0x71, 0xf3, 0xef,
- 0x97, 0xff, 0x5d, 0x38, 0x64, 0x08, 0x00, 0x10,
- 0xbc, 0x87, 0xaf, 0xdf, 0xff, 0xf7, 0x73, 0x35,
- 0x3e, 0x87, 0xc7, 0xdf, 0xff, 0x00, 0x81, 0x00,
- 0xb0, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00, 0x03,
- 0x40, 0x00, 0x40, 0x92, 0x21, 0xd0, 0xbf, 0x5d,
- // Entry 100 - 13F
- 0xfd, 0xde, 0xfe, 0x5e, 0x00, 0x00, 0x02, 0x64,
- 0x8d, 0x19, 0xc1, 0xdf, 0x79, 0x22, 0x00, 0x00,
- 0x00, 0xdf, 0x6d, 0xdc, 0x26, 0xe5, 0xd9, 0xf3,
- 0xfe, 0xff, 0xfd, 0xcb, 0x9f, 0x14, 0x01, 0x0c,
- 0x86, 0x00, 0xd1, 0x00, 0xf0, 0xc5, 0x67, 0x5f,
- 0x56, 0x89, 0x5e, 0xb7, 0xec, 0xef, 0x03, 0x00,
- 0x02, 0x00, 0x00, 0x00, 0xc0, 0x77, 0xda, 0x57,
- 0x90, 0x69, 0x01, 0x2c, 0x96, 0x79, 0xe0, 0xff,
- // Entry 140 - 17F
- 0xff, 0x7f, 0x00, 0x00, 0x00, 0x01, 0x08, 0x56,
- 0x01, 0x00, 0x00, 0xb0, 0x14, 0x03, 0x50, 0x16,
- 0x0a, 0x00, 0x01, 0x00, 0x00, 0x00, 0x11, 0x09,
- 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x10,
- 0x00, 0x00, 0x44, 0x00, 0x00, 0x10, 0x00, 0x04,
- 0x08, 0x00, 0x00, 0x04, 0x00, 0x80, 0x28, 0x04,
- 0x00, 0x00, 0x50, 0xd5, 0x2d, 0x00, 0x64, 0x35,
- 0x24, 0x53, 0xf5, 0xd4, 0xbd, 0xe2, 0xcd, 0x03,
- // Entry 180 - 1BF
- 0x00, 0x80, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x04, 0x17, 0x39, 0x01, 0xdd, 0x57, 0x98,
- 0x21, 0x98, 0xa5, 0x00, 0x00, 0x01, 0x40, 0x82,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x01, 0x40, 0x00, 0x44, 0x00, 0x00, 0xb0, 0xfe,
- 0xa9, 0x39, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x40,
- 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
- // Entry 1C0 - 1FF
- 0x00, 0x01, 0x28, 0x05, 0x00, 0x00, 0x00, 0x00,
- 0x04, 0x20, 0x04, 0xa6, 0x08, 0x04, 0x00, 0x08,
- 0x81, 0x50, 0x00, 0x00, 0x08, 0x11, 0x86, 0x40,
- 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x06, 0x55,
- 0x02, 0x10, 0x08, 0x04, 0x00, 0x00, 0x00, 0x60,
- 0x3b, 0x83, 0x11, 0x00, 0x00, 0x00, 0x11, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0xbe, 0xdf, 0xff, 0xfe, 0xbf,
- // Entry 200 - 23F
- 0xdf, 0xc7, 0x83, 0x82, 0xc0, 0xff, 0xdf, 0x27,
- 0xcf, 0x5f, 0xe7, 0x01, 0x10, 0x20, 0xb2, 0xc5,
- 0xa4, 0x45, 0x25, 0x9b, 0x03, 0xcf, 0xf0, 0xdf,
- 0x03, 0xc4, 0x08, 0x10, 0x01, 0x0e, 0x01, 0xe3,
- 0x92, 0x54, 0xdb, 0x38, 0xf1, 0x7f, 0xf7, 0x6d,
- 0xf9, 0xff, 0x1c, 0x7d, 0x04, 0x08, 0x00, 0x01,
- 0x21, 0x12, 0x6c, 0x5f, 0xdd, 0x0f, 0x85, 0x4f,
- 0x40, 0x40, 0x00, 0x04, 0xf9, 0xfd, 0xbd, 0xd4,
- // Entry 240 - 27F
- 0xe8, 0x13, 0xf4, 0x27, 0xa3, 0x0d, 0x00, 0x00,
- 0x20, 0x7b, 0x39, 0x02, 0x05, 0x84, 0x00, 0xf0,
- 0xbf, 0x7f, 0xda, 0x00, 0x18, 0x04, 0x81, 0x00,
- 0x00, 0x00, 0x80, 0x10, 0x94, 0x1c, 0x01, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x10, 0x40, 0x00, 0x04,
- 0x08, 0xb4, 0x7c, 0xa5, 0x0c, 0x40, 0x00, 0x00,
- 0x11, 0x04, 0x04, 0x6c, 0x00, 0x20, 0x70, 0xff,
- 0xfb, 0x7f, 0x60, 0x00, 0x05, 0x9b, 0xdd, 0x6e,
- // Entry 280 - 2BF
- 0x03, 0x00, 0x11, 0x00, 0x00, 0x00, 0x40, 0x05,
- 0xb5, 0xb6, 0x80, 0x08, 0x04, 0x00, 0x04, 0x51,
- 0xe2, 0xff, 0xfd, 0x3f, 0x05, 0x09, 0x08, 0x05,
- 0x40, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00,
- 0x08, 0x00, 0x00, 0x00, 0x00, 0xa1, 0x02, 0x60,
- 0xe5, 0x48, 0x14, 0x89, 0x20, 0xc0, 0x47, 0x80,
- 0x07, 0x00, 0x00, 0x00, 0xcc, 0x50, 0x40, 0x24,
- 0x85, 0x47, 0x84, 0x40, 0x20, 0x10, 0x00, 0x20,
- // Entry 2C0 - 2FF
- 0x02, 0x50, 0x88, 0x11, 0x00, 0xd1, 0x6c, 0xee,
- 0x50, 0x27, 0x1d, 0x11, 0x69, 0x06, 0x59, 0xe9,
- 0x33, 0x08, 0x00, 0x20, 0x05, 0x40, 0x10, 0x00,
- 0x00, 0x00, 0x50, 0x44, 0x96, 0x49, 0xd6, 0x5d,
- 0xa7, 0x81, 0x47, 0x97, 0xfb, 0x00, 0x10, 0x00,
- 0x08, 0x00, 0x80, 0x00, 0x40, 0x45, 0x00, 0x01,
- 0x02, 0x00, 0x01, 0x40, 0x80, 0x00, 0x04, 0x08,
- 0xf8, 0xeb, 0xf6, 0x39, 0xc4, 0x89, 0x16, 0x00,
- // Entry 300 - 33F
- 0x00, 0x0c, 0x04, 0x01, 0x20, 0x20, 0xdd, 0xa2,
- 0x01, 0x00, 0x00, 0x00, 0x12, 0x04, 0x00, 0x00,
- 0x04, 0x10, 0xf0, 0x9d, 0x95, 0x13, 0x04, 0x80,
- 0x00, 0x01, 0xd0, 0x12, 0x40, 0x00, 0x10, 0xb0,
- 0x10, 0x62, 0x4c, 0xd2, 0x02, 0x01, 0x4a, 0x00,
- 0x46, 0x04, 0x00, 0x08, 0x02, 0x00, 0x20, 0xc0,
- 0x00, 0x80, 0x06, 0x00, 0x08, 0x00, 0x00, 0x00,
- 0x00, 0xf0, 0xd8, 0x6f, 0x15, 0x02, 0x08, 0x00,
- // Entry 340 - 37F
- 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x10, 0x01,
- 0x00, 0x10, 0x00, 0x00, 0x00, 0xf8, 0x85, 0xe3,
- 0xdd, 0xff, 0xff, 0xff, 0xbb, 0xff, 0x7f, 0xfb,
- 0xff, 0xfc, 0xfe, 0xdf, 0xff, 0xff, 0xff, 0xf6,
- 0xfb, 0xfe, 0xf7, 0x1f, 0xff, 0xb3, 0xed, 0xff,
- 0xdb, 0xed, 0xff, 0xfe, 0xff, 0xfe, 0xdf, 0xff,
- 0xff, 0xff, 0xf7, 0xff, 0xfd, 0xff, 0xff, 0xff,
- 0xfd, 0xff, 0xdf, 0xaf, 0x9c, 0xff, 0xfb, 0xff,
- // Entry 380 - 3BF
- 0xff, 0xff, 0xff, 0xff, 0xef, 0xd2, 0xbb, 0xdf,
- 0xf5, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xef,
- 0xfd, 0xff, 0xff, 0xf7, 0xfd, 0xff, 0xff, 0xff,
- 0xef, 0xdb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0x5f, 0xd3, 0x7b, 0xfd, 0xd9, 0xdf, 0xef,
- 0xbc, 0x18, 0x05, 0x2c, 0xff, 0x07, 0xf0, 0xff,
- 0xf7, 0x5f, 0x00, 0x08, 0x00, 0xc3, 0x3d, 0x1b,
- 0x06, 0xe6, 0x72, 0xf0, 0xdd, 0x3c, 0x7f, 0x44,
- // Entry 3C0 - 3FF
- 0x02, 0x30, 0x9f, 0x7a, 0x16, 0xfd, 0xff, 0x57,
- 0xf2, 0xff, 0x39, 0xff, 0xf2, 0x1e, 0x95, 0xf7,
- 0xf7, 0xff, 0x45, 0x80, 0x01, 0x02, 0x00, 0x00,
- 0x40, 0x54, 0x9f, 0x8a, 0xd9, 0xd9, 0x0e, 0x11,
- 0x84, 0x51, 0xc0, 0xf3, 0xfb, 0x47, 0x00, 0x01,
- 0x05, 0xd1, 0x50, 0x58, 0x00, 0x00, 0x00, 0x10,
- 0x04, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x17, 0xd2,
- 0xf9, 0xfd, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
- // Entry 400 - 43F
- 0xd7, 0x6f, 0xff, 0xff, 0xdf, 0x7d, 0xbb, 0xff,
- 0xff, 0xff, 0xf7, 0xf3, 0xef, 0xff, 0xff, 0xf7,
- 0xff, 0xdf, 0xdb, 0x7f, 0xff, 0xff, 0x7f, 0xff,
- 0xff, 0xff, 0xef, 0xff, 0xbc, 0xff, 0xff, 0xfb,
- 0xff, 0xfb, 0xff, 0xde, 0x76, 0xbd, 0xff, 0xf7,
- 0xff, 0xff, 0xf7, 0xff, 0xff, 0xdf, 0xf3, 0xfe,
- 0xef, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x7f, 0xde,
- 0xf7, 0xbb, 0xef, 0xf7, 0xff, 0xfb, 0xbf, 0xdf,
- // Entry 440 - 47F
- 0xfd, 0xfe, 0xff, 0xff, 0xfe, 0xff, 0x5f, 0x7d,
- 0x7f, 0xff, 0xff, 0xf7, 0xe5, 0xfc, 0xff, 0xfd,
- 0x7f, 0x7f, 0xff, 0x9e, 0xae, 0xff, 0xee, 0xff,
- 0x7f, 0xf7, 0x7b, 0x02, 0x82, 0x04, 0xff, 0xf7,
- 0xff, 0xbf, 0xd7, 0xef, 0xfe, 0xdf, 0xf7, 0xfe,
- 0xe2, 0x8e, 0xe7, 0xff, 0xf7, 0xff, 0x56, 0xbd,
- 0xcd, 0xff, 0xfb, 0xff, 0xff, 0xdf, 0xef, 0xff,
- 0xe5, 0xdf, 0x7d, 0x0f, 0xa7, 0x51, 0x04, 0x44,
- // Entry 480 - 4BF
- 0x13, 0xd0, 0x5d, 0xaf, 0xa6, 0xfd, 0xb9, 0xff,
- 0x63, 0x5d, 0x5b, 0xff, 0xff, 0xbf, 0x3f, 0x20,
- 0x14, 0x00, 0x57, 0x51, 0x82, 0x65, 0xf5, 0x49,
- 0xe2, 0xff, 0xfc, 0xdf, 0x00, 0x05, 0xc5, 0x05,
- 0x00, 0x22, 0x00, 0x74, 0x69, 0x10, 0x08, 0x04,
- 0x41, 0x00, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x51, 0x60, 0x05, 0x04, 0x01, 0x00, 0x00,
- 0x06, 0x01, 0x20, 0x00, 0x18, 0x01, 0x92, 0xb1,
- // Entry 4C0 - 4FF
- 0xfd, 0x67, 0x4b, 0x06, 0x95, 0x06, 0x57, 0xed,
- 0xfb, 0x4c, 0x9d, 0x7b, 0x83, 0x04, 0x62, 0x40,
- 0x00, 0x15, 0x42, 0x00, 0x00, 0x00, 0x54, 0x83,
- 0xf9, 0x4f, 0x10, 0x8c, 0xc9, 0x46, 0xde, 0xf7,
- 0x13, 0x31, 0x00, 0x20, 0x00, 0x00, 0x00, 0x90,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x10, 0x00,
- 0x01, 0x40, 0x00, 0xf0, 0x5b, 0xf4, 0xbe, 0x7d,
- 0xba, 0xcf, 0xf7, 0xaf, 0x42, 0x04, 0x84, 0x41,
- // Entry 500 - 53F
- 0xb0, 0xff, 0x79, 0x7a, 0x04, 0x00, 0x00, 0x49,
- 0x2d, 0x14, 0x27, 0x77, 0xed, 0xf1, 0xbf, 0xef,
- 0x3f, 0x00, 0x00, 0x02, 0xc6, 0xa0, 0x1e, 0xfc,
- 0xbb, 0xff, 0xfd, 0xfb, 0xb7, 0xfd, 0xf5, 0xff,
- 0xfd, 0xfc, 0xd5, 0xed, 0x47, 0xf4, 0x7f, 0x10,
- 0x01, 0x01, 0x84, 0x6d, 0xff, 0xf7, 0xdd, 0xf9,
- 0x5f, 0x05, 0x86, 0xef, 0xf5, 0x77, 0xbd, 0x3c,
- 0x00, 0x00, 0x00, 0x43, 0x71, 0x42, 0x00, 0x40,
- // Entry 540 - 57F
- 0x00, 0x00, 0x01, 0x43, 0x19, 0x00, 0x08, 0x00,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- // Entry 580 - 5BF
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xab, 0xbd, 0xe7, 0x57, 0xee, 0x13, 0x5d,
- 0x09, 0xc1, 0x40, 0x21, 0xfa, 0x17, 0x01, 0x80,
- 0x00, 0x00, 0x00, 0x00, 0xf0, 0xde, 0xff, 0xbf,
- 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00,
- 0x00, 0x30, 0x95, 0xe3, 0x10, 0x00, 0x00, 0x00,
- 0x11, 0x04, 0x16, 0x00, 0x01, 0x02, 0x00, 0x81,
- 0xa3, 0x01, 0x50, 0x00, 0x00, 0x83, 0x11, 0x40,
- // Entry 5C0 - 5FF
- 0x00, 0x00, 0x00, 0xf0, 0xdd, 0x7b, 0x7e, 0x02,
- 0xaa, 0x10, 0x5d, 0xd8, 0x52, 0x00, 0x80, 0x20,
- 0x00, 0x00, 0x00, 0x00, 0x40, 0x10, 0x02, 0x02,
- 0x19, 0x00, 0x10, 0x02, 0x10, 0x61, 0x5a, 0x9d,
- 0x31, 0x00, 0x00, 0x00, 0x01, 0x50, 0x02, 0x20,
- 0x00, 0x00, 0x01, 0x00, 0x42, 0x00, 0x20, 0x00,
- 0x00, 0x1f, 0xdf, 0xf2, 0xfd, 0xff, 0xfd, 0x3f,
- 0x9f, 0x18, 0xcf, 0x9c, 0xbf, 0xaf, 0x5f, 0xfe,
- // Entry 600 - 63F
- 0x7b, 0x4b, 0x40, 0x10, 0xe1, 0xfd, 0xaf, 0xfd,
- 0xb7, 0xf7, 0xff, 0xf3, 0xdf, 0xff, 0x6f, 0xf1,
- 0x7b, 0xf1, 0x7f, 0xdf, 0x7f, 0xbf, 0xfe, 0xb7,
- 0xee, 0x1c, 0xfb, 0xdb, 0xef, 0xdf, 0xff, 0xfd,
- 0x7e, 0xbe, 0x57, 0xff, 0x6f, 0x81, 0x76, 0x1f,
- 0xd4, 0x77, 0xf5, 0xfd, 0xff, 0xff, 0xeb, 0xfe,
- 0xbf, 0x5f, 0x57, 0x1b, 0xeb, 0x5f, 0x50, 0x18,
- 0x02, 0xfa, 0xff, 0x9d, 0x15, 0x97, 0x15, 0x0f,
- // Entry 640 - 67F
- 0x75, 0xc4, 0x7d, 0x81, 0x82, 0xf1, 0xd7, 0x7e,
- 0xff, 0xff, 0xff, 0xef, 0xff, 0xfd, 0xdd, 0xde,
- 0xfc, 0xfd, 0xf6, 0x5f, 0x7a, 0x1f, 0x40, 0x98,
- 0x02, 0xff, 0xe3, 0xff, 0xf3, 0xd6, 0xf2, 0xff,
- 0xfb, 0xdf, 0x7d, 0x50, 0x1e, 0x15, 0x7b, 0xb4,
- 0xf5, 0xbe, 0xff, 0xff, 0xf3, 0xf7, 0xff, 0xf7,
- 0x7f, 0xff, 0xff, 0xbe, 0xdb, 0xf7, 0xd7, 0xf9,
- 0xef, 0x2f, 0x80, 0xbf, 0xc5, 0xff, 0xff, 0xf3,
- // Entry 680 - 6BF
- 0x97, 0x9d, 0xff, 0xff, 0xf7, 0xcf, 0xfd, 0xbf,
- 0xde, 0x7f, 0x06, 0x1d, 0x57, 0xff, 0xf8, 0xda,
- 0x5d, 0xce, 0x7d, 0x16, 0xb9, 0xea, 0x69, 0xa0,
- 0x1a, 0x20, 0x00, 0x30, 0x02, 0x04, 0x24, 0x48,
- 0x04, 0x00, 0x00, 0x40, 0xd4, 0x02, 0x04, 0x00,
- 0x00, 0x04, 0x00, 0x04, 0x00, 0x20, 0x01, 0x06,
- 0x50, 0x00, 0x08, 0x00, 0x00, 0x00, 0x24, 0x00,
- 0x04, 0x00, 0x10, 0x8c, 0x58, 0xd5, 0x0d, 0x0f,
- // Entry 6C0 - 6FF
- 0x14, 0x4d, 0xf1, 0x16, 0x44, 0xd1, 0x42, 0x08,
- 0x40, 0x00, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00,
- 0x00, 0xdc, 0xff, 0xeb, 0x1f, 0x58, 0x08, 0x41,
- 0x04, 0xa0, 0x04, 0x00, 0x30, 0x12, 0x40, 0x22,
- 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x01, 0x00, 0x00, 0x00, 0x80, 0x10, 0x10, 0xaf,
- 0x6f, 0x93, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x80, 0x80, 0x25, 0x00, 0x00,
- // Entry 700 - 73F
- 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,
- 0x80, 0x86, 0xc2, 0x02, 0x00, 0x00, 0x00, 0x01,
- 0xdf, 0x18, 0x00, 0x00, 0x02, 0xf0, 0xfd, 0x79,
- 0x3b, 0x00, 0x25, 0x00, 0x00, 0x00, 0x02, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00,
- 0x03, 0x00, 0x09, 0x20, 0x00, 0x00, 0x01, 0x00,
- 0x00, 0x81, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- // Entry 740 - 77F
- 0x00, 0x00, 0x00, 0xef, 0xf7, 0xfd, 0xcf, 0x7e,
- 0xa0, 0x11, 0x10, 0x00, 0x00, 0x92, 0x01, 0x44,
- 0xcd, 0xf9, 0x5e, 0x00, 0x01, 0x00, 0x30, 0x14,
- 0x04, 0x55, 0x10, 0x01, 0x04, 0xf6, 0x3f, 0x7a,
- 0x05, 0x04, 0x00, 0xb0, 0x80, 0x00, 0x55, 0x55,
- 0x97, 0x7c, 0x9f, 0x71, 0xcc, 0x78, 0xd1, 0x43,
- 0xf5, 0x57, 0x67, 0x14, 0x01, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x2c, 0xf7, 0xdb, 0x1f, 0x54, 0x60,
- // Entry 780 - 7BF
- 0x03, 0x68, 0x01, 0x10, 0x8b, 0x38, 0xaa, 0x01,
- 0x00, 0x00, 0x30, 0x00, 0x24, 0x44, 0x00, 0x00,
- 0x10, 0x03, 0x11, 0x02, 0x01, 0x00, 0x00, 0xf0,
- 0xf5, 0xff, 0xd5, 0xd7, 0xbc, 0x70, 0xd6, 0x78,
- 0x78, 0x15, 0x50, 0x00, 0xa4, 0x84, 0xe9, 0x41,
- 0x00, 0x00, 0x00, 0x6b, 0x39, 0x52, 0x74, 0x00,
- 0xe8, 0x30, 0x90, 0x6a, 0x92, 0x00, 0x00, 0x02,
- 0xff, 0xef, 0xff, 0x4f, 0x85, 0x53, 0xf4, 0xed,
- // Entry 7C0 - 7FF
- 0xdd, 0xbf, 0x72, 0x19, 0xc7, 0x0c, 0xf5, 0x42,
- 0x54, 0xdd, 0x77, 0x14, 0x00, 0x80, 0xc0, 0x56,
- 0xcc, 0x16, 0x9e, 0xfb, 0x35, 0x7d, 0xef, 0xff,
- 0xbd, 0xa4, 0xaf, 0x01, 0x44, 0x18, 0x01, 0x5d,
- 0x4e, 0x4a, 0x08, 0x50, 0x28, 0x30, 0xe0, 0x80,
- 0x10, 0x20, 0x24, 0x00, 0xff, 0x3f, 0xdf, 0x67,
- 0xfe, 0x01, 0x06, 0x88, 0x0a, 0x40, 0x16, 0x01,
- 0x01, 0x15, 0x2b, 0x3e, 0x01, 0x00, 0x00, 0x10,
- // Entry 800 - 83F
- 0x90, 0x69, 0x45, 0x02, 0x02, 0x01, 0xe1, 0xbf,
- 0xbf, 0x03, 0x00, 0x00, 0x10, 0xd4, 0xa7, 0xd1,
- 0x54, 0x9e, 0x44, 0xdf, 0xfd, 0x8f, 0x66, 0xb3,
- 0x55, 0x20, 0xd4, 0xc3, 0xd8, 0x30, 0x3d, 0x80,
- 0x00, 0x00, 0x00, 0x4c, 0xd4, 0x11, 0xc5, 0x84,
- 0x6e, 0x50, 0x00, 0x22, 0x50, 0x6e, 0xbf, 0xdb,
- 0x07, 0x00, 0x20, 0x10, 0x84, 0xb2, 0x45, 0x10,
- 0x06, 0x44, 0x00, 0x00, 0x12, 0x02, 0x11, 0x00,
- // Entry 840 - 87F
- 0xf0, 0xfb, 0xfd, 0x3f, 0x05, 0x00, 0x12, 0x81,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x02,
- 0x00, 0x00, 0x00, 0x00, 0x03, 0x30, 0x02, 0x28,
- 0x84, 0x00, 0x33, 0xc0, 0x23, 0x24, 0x00, 0x00,
- 0x00, 0xcb, 0xe4, 0x3a, 0x42, 0xc8, 0x14, 0xf1,
- 0xef, 0xff, 0x7f, 0x16, 0x01, 0x01, 0x84, 0x50,
- 0x07, 0xfc, 0xff, 0xff, 0x0f, 0x01, 0x00, 0x40,
- 0x10, 0x38, 0x01, 0x01, 0x1c, 0x12, 0x40, 0xe1,
- // Entry 880 - 8BF
- 0x76, 0x16, 0x08, 0x03, 0x10, 0x00, 0x00, 0x00,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x24,
- 0x0a, 0x00, 0x80, 0x00, 0x00,
-}
-
-// altLangISO3 holds an alphabetically sorted list of 3-letter language code alternatives
-// to 2-letter language codes that cannot be derived using the method described above.
-// Each 3-letter code is followed by its 1-byte langID.
-var altLangISO3 tag.Index = "---\x00cor\x00hbs\x01heb\x02kin\x03spa\x04yid\x05\xff\xff\xff\xff"
-
-// altLangIndex is used to convert indexes in altLangISO3 to langIDs.
-// Size: 12 bytes, 6 elements
-var altLangIndex = [6]uint16{
- 0x014a, 0x0225, 0x0105, 0x020a, 0x009d, 0x010b,
-}
-
-// langAliasMap maps langIDs to their suggested replacements.
-// Size: 640 bytes, 160 elements
-var langAliasMap = [160]fromTo{
- 0: {from: 0xc4, to: 0xda},
- 1: {from: 0xff, to: 0xf8},
- 2: {from: 0x105, to: 0xe0},
- 3: {from: 0x10b, to: 0x2b9},
- 4: {from: 0x110, to: 0x10f},
- 5: {from: 0x192, to: 0x203},
- 6: {from: 0x1af, to: 0x1c1},
- 7: {from: 0x225, to: 0x23b},
- 8: {from: 0x268, to: 0xaa},
- 9: {from: 0x274, to: 0x252},
- 10: {from: 0x27d, to: 0xd},
- 11: {from: 0x2d5, to: 0x2db},
- 12: {from: 0x326, to: 0x93},
- 13: {from: 0x3c7, to: 0x1c48},
- 14: {from: 0x3e8, to: 0x23a},
- 15: {from: 0x3f9, to: 0x23a},
- 16: {from: 0x484, to: 0x15},
- 17: {from: 0x48f, to: 0xf3},
- 18: {from: 0x4d5, to: 0x1f38},
- 19: {from: 0x54a, to: 0x23},
- 20: {from: 0x550, to: 0x2732},
- 21: {from: 0x55c, to: 0x24},
- 22: {from: 0x57d, to: 0xa1},
- 23: {from: 0x5a3, to: 0x26},
- 24: {from: 0x5ac, to: 0x42},
- 25: {from: 0x615, to: 0x5a7},
- 26: {from: 0x65a, to: 0xc7a},
- 27: {from: 0x786, to: 0x1a5},
- 28: {from: 0x7cd, to: 0x16e},
- 29: {from: 0x7d4, to: 0x59},
- 30: {from: 0x855, to: 0x30b9},
- 31: {from: 0x8cf, to: 0x2c4},
- 32: {from: 0x90c, to: 0x23f1},
- 33: {from: 0x915, to: 0x95a},
- 34: {from: 0x932, to: 0x24f},
- 35: {from: 0x953, to: 0x3fc0},
- 36: {from: 0x956, to: 0x2c4},
- 37: {from: 0x995, to: 0x2b3e},
- 38: {from: 0x9c5, to: 0x2f18},
- 39: {from: 0xa50, to: 0x73},
- 40: {from: 0xa9f, to: 0x79},
- 41: {from: 0xb5f, to: 0x8a},
- 42: {from: 0xb6e, to: 0x1a2},
- 43: {from: 0xb8f, to: 0xb92},
- 44: {from: 0xb95, to: 0x2c8},
- 45: {from: 0xc76, to: 0x1df1},
- 46: {from: 0xc85, to: 0x2c31},
- 47: {from: 0xcd0, to: 0x1bd},
- 48: {from: 0xe67, to: 0x9f},
- 49: {from: 0xe9b, to: 0x179},
- 50: {from: 0xf37, to: 0xfc},
- 51: {from: 0x1010, to: 0xd},
- 52: {from: 0x11bb, to: 0xaf},
- 53: {from: 0x1207, to: 0xa6},
- 54: {from: 0x12b6, to: 0xb32},
- 55: {from: 0x12ba, to: 0x1d2},
- 56: {from: 0x12c9, to: 0x145c},
- 57: {from: 0x1317, to: 0x111},
- 58: {from: 0x131a, to: 0x85},
- 59: {from: 0x133a, to: 0x3a46},
- 60: {from: 0x1401, to: 0xcc},
- 61: {from: 0x145f, to: 0x9a},
- 62: {from: 0x1497, to: 0x278f},
- 63: {from: 0x14af, to: 0xca},
- 64: {from: 0x14be, to: 0xcd6},
- 65: {from: 0x1511, to: 0x12bb},
- 66: {from: 0x15a0, to: 0x154d},
- 67: {from: 0x15ad, to: 0x168a},
- 68: {from: 0x1621, to: 0x23f},
- 69: {from: 0x1710, to: 0x1a98},
- 70: {from: 0x180b, to: 0x2947},
- 71: {from: 0x1821, to: 0x102},
- 72: {from: 0x18f1, to: 0x104},
- 73: {from: 0x191d, to: 0x12ac},
- 74: {from: 0x1dcf, to: 0x3548},
- 75: {from: 0x1dd4, to: 0x1e74},
- 76: {from: 0x1df1, to: 0x18f},
- 77: {from: 0x1e7a, to: 0x145},
- 78: {from: 0x1e85, to: 0x13b},
- 79: {from: 0x1e89, to: 0x122},
- 80: {from: 0x1e90, to: 0x138},
- 81: {from: 0x1ea6, to: 0x1f82},
- 82: {from: 0x1ecc, to: 0x147},
- 83: {from: 0x1f30, to: 0x8d},
- 84: {from: 0x1f65, to: 0x12f8},
- 85: {from: 0x1f7d, to: 0x4235},
- 86: {from: 0x1f8b, to: 0x371a},
- 87: {from: 0x1fc4, to: 0x8d},
- 88: {from: 0x1fce, to: 0x8d},
- 89: {from: 0x1ff9, to: 0x6c1},
- 90: {from: 0x20ad, to: 0x2fbd},
- 91: {from: 0x2119, to: 0x30fc},
- 92: {from: 0x2209, to: 0x170},
- 93: {from: 0x227b, to: 0x18c},
- 94: {from: 0x2287, to: 0x189},
- 95: {from: 0x2291, to: 0x19a},
- 96: {from: 0x22e7, to: 0x8f2},
- 97: {from: 0x2340, to: 0x69},
- 98: {from: 0x23d5, to: 0x179},
- 99: {from: 0x2460, to: 0x244b},
- 100: {from: 0x2490, to: 0x1f4},
- 101: {from: 0x24be, to: 0x3a46},
- 102: {from: 0x24fc, to: 0x244b},
- 103: {from: 0x2520, to: 0x40ef},
- 104: {from: 0x2686, to: 0x25ce},
- 105: {from: 0x26ab, to: 0x1b4},
- 106: {from: 0x271d, to: 0x2b3e},
- 107: {from: 0x28b1, to: 0x1d1},
- 108: {from: 0x2993, to: 0x1d3},
- 109: {from: 0x29d6, to: 0x3a46},
- 110: {from: 0x2a93, to: 0x1ee},
- 111: {from: 0x2aaa, to: 0x32e},
- 112: {from: 0x2ade, to: 0xa4},
- 113: {from: 0x2adf, to: 0xa4},
- 114: {from: 0x2b96, to: 0x183},
- 115: {from: 0x2b9f, to: 0x1763},
- 116: {from: 0x2bb1, to: 0x2b2c},
- 117: {from: 0x2bb8, to: 0x152},
- 118: {from: 0x2beb, to: 0x37},
- 119: {from: 0x2bfc, to: 0x2019},
- 120: {from: 0x2c37, to: 0x2c32},
- 121: {from: 0x2c86, to: 0x2c6e},
- 122: {from: 0x2f2a, to: 0x1f1},
- 123: {from: 0x30fd, to: 0x3125},
- 124: {from: 0x31c1, to: 0x203},
- 125: {from: 0x3285, to: 0x1667},
- 126: {from: 0x337d, to: 0x22a},
- 127: {from: 0x33ef, to: 0x132},
- 128: {from: 0x340d, to: 0x215},
- 129: {from: 0x3494, to: 0x248},
- 130: {from: 0x3557, to: 0x8d},
- 131: {from: 0x35ad, to: 0x3689},
- 132: {from: 0x35c2, to: 0x2a32},
- 133: {from: 0x35c6, to: 0x4c},
- 134: {from: 0x35c9, to: 0x2fbf},
- 135: {from: 0x3603, to: 0x373d},
- 136: {from: 0x3629, to: 0x3d57},
- 137: {from: 0x363c, to: 0x376e},
- 138: {from: 0x364b, to: 0x1d3b},
- 139: {from: 0x364c, to: 0x2c31},
- 140: {from: 0x36f3, to: 0x26a},
- 141: {from: 0x38e5, to: 0xb28},
- 142: {from: 0x390f, to: 0xe91},
- 143: {from: 0x3a30, to: 0x28d},
- 144: {from: 0x3d54, to: 0x7f},
- 145: {from: 0x3f9f, to: 0x828},
- 146: {from: 0x4055, to: 0x30a},
- 147: {from: 0x4090, to: 0x3cf7},
- 148: {from: 0x410f, to: 0x13a},
- 149: {from: 0x4162, to: 0x3462},
- 150: {from: 0x4164, to: 0x86},
- 151: {from: 0x4246, to: 0x30b9},
- 152: {from: 0x427a, to: 0x2b9},
- 153: {from: 0x4361, to: 0x21a0},
- 154: {from: 0x4374, to: 0x2473},
- 155: {from: 0x43a7, to: 0x4645},
- 156: {from: 0x4445, to: 0x4437},
- 157: {from: 0x44d5, to: 0x44dc},
- 158: {from: 0x46ad, to: 0x19a},
- 159: {from: 0x473e, to: 0x2be},
-}
-
-// Size: 160 bytes, 160 elements
-var langAliasTypes = [160]langAliasType{
- // Entry 0 - 3F
- 0, 0, 0, 0, 0, 0, 1, 2, 2, 0, 1, 0, 0, 1, 2, 1,
- 1, 2, 0, 1, 0, 1, 2, 1, 1, 0, 0, 2, 1, 1, 0, 2,
- 0, 0, 1, 0, 1, 0, 0, 1, 2, 1, 1, 1, 1, 0, 0, 2,
- 1, 1, 1, 1, 2, 1, 0, 1, 1, 2, 2, 0, 1, 2, 0, 1,
- // Entry 40 - 7F
- 0, 1, 1, 1, 1, 0, 0, 2, 1, 0, 0, 0, 1, 1, 1, 1,
- 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 2, 2, 2,
- 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0,
- 2, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 2, 0, 2, 1,
- // Entry 80 - BF
- 1, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1,
- 2, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1,
-}
-
-const (
- _Latn = 82
- _Hani = 50
- _Hans = 52
- _Hant = 53
- _Qaaa = 131
- _Qaai = 139
- _Qabx = 180
- _Zinh = 224
- _Zyyy = 229
- _Zzzz = 230
-)
-
-// script is an alphabetically sorted list of ISO 15924 codes. The index
-// of the script in the string, divided by 4, is the internal scriptID.
-var script tag.Index = "" + // Size: 928 bytes
- "----AdlmAfakAghbAhomArabAranArmiArmnAvstBaliBamuBassBatkBengBhksBlisBopo" +
- "BrahBraiBugiBuhdCakmCansCariChamCherCirtCoptCprtCyrlCyrsDevaDsrtDuplEgyd" +
- "EgyhEgypElbaEthiGeokGeorGlagGothGranGrekGujrGuruHanbHangHaniHanoHansHant" +
- "HatrHebrHiraHluwHmngHrktHungIndsItalJamoJavaJpanJurcKaliKanaKharKhmrKhoj" +
- "KitlKitsKndaKoreKpelKthiLanaLaooLatfLatgLatnLekeLepcLimbLinaLinbLisuLoma" +
- "LyciLydiMahjMandManiMarcMayaMendMercMeroMlymModiMongMoonMrooMteiMultMymr" +
- "NarbNbatNewaNkgbNkooNshuOgamOlckOrkhOryaOsgeOsmaPalmPaucPermPhagPhliPhlp" +
- "PhlvPhnxPiqdPlrdPrtiQaaaQaabQaacQaadQaaeQaafQaagQaahQaaiQaajQaakQaalQaam" +
- "QaanQaaoQaapQaaqQaarQaasQaatQaauQaavQaawQaaxQaayQaazQabaQabbQabcQabdQabe" +
- "QabfQabgQabhQabiQabjQabkQablQabmQabnQaboQabpQabqQabrQabsQabtQabuQabvQabw" +
- "QabxRjngRoroRunrSamrSaraSarbSaurSgnwShawShrdSiddSindSinhSoraSundSyloSyrc" +
- "SyreSyrjSyrnTagbTakrTaleTaluTamlTangTavtTeluTengTfngTglgThaaThaiTibtTirh" +
- "UgarVaiiVispWaraWoleXpeoXsuxYiiiZinhZmthZsyeZsymZxxxZyyyZzzz\xff\xff\xff" +
- "\xff"
-
-// suppressScript is an index from langID to the dominant script for that language,
-// if it exists. If a script is given, it should be suppressed from the language tag.
-// Size: 713 bytes, 713 elements
-var suppressScript = [713]uint8{
- // Entry 0 - 3F
- 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x27, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- // Entry 40 - 7F
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52,
- // Entry 80 - BF
- 0x52, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00,
- 0xd4, 0x00, 0x00, 0xd6, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x2d, 0x52, 0x52, 0x52, 0x00, 0x52,
- 0x00, 0x52, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
- 0x52, 0x00, 0x00, 0x00, 0x52, 0x52, 0x00, 0x52,
- 0x00, 0x00, 0x52, 0x52, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x52, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00,
- // Entry C0 - FF
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x52, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x52, 0x2e, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x37, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x52,
- 0x00, 0x52, 0x52, 0x08, 0x00, 0x00, 0x00, 0x00,
- 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52,
- // Entry 100 - 13F
- 0x00, 0x00, 0x52, 0x52, 0x00, 0x37, 0x00, 0x41,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e,
- 0x00, 0x52, 0x00, 0x46, 0x00, 0x4a, 0x4b, 0x00,
- 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- // Entry 140 - 17F
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x52, 0x4f, 0x00, 0x00,
- 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52,
- // Entry 180 - 1BF
- 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00,
- 0x52, 0x00, 0x00, 0x00, 0x1e, 0x64, 0x00, 0x00,
- 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x20, 0x00,
- 0x00, 0x00, 0x52, 0x52, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x6b, 0x00, 0x00,
- 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x52,
- 0x00, 0x52, 0x00, 0x52, 0x20, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x52, 0x00, 0x52, 0x00, 0x52,
- // Entry 1C0 - 1FF
- 0x00, 0x52, 0x00, 0x00, 0x00, 0x70, 0x52, 0x00,
- 0x52, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x52, 0x75, 0x00, 0x00, 0x00, 0x2f,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x52,
- 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00,
- // Entry 200 - 23F
- 0x00, 0x52, 0x00, 0x52, 0x00, 0x00, 0x00, 0x1e,
- 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xc1, 0x00, 0x52, 0x00, 0x52, 0x00, 0x00, 0x52,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x52, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00,
- // Entry 240 - 27F
- 0x52, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x52,
- 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0xcd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xd0, 0x52, 0x00, 0x00, 0x00, 0xd5, 0x00, 0x00,
- 0x00, 0x27, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00,
- 0x52, 0x00, 0x52, 0x52, 0x52, 0x00, 0x52, 0x52,
- 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00,
- // Entry 280 - 2BF
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x52,
- 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- // Entry 2C0 - 2FF
- 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00,
- 0x00,
-}
-
-const (
- _001 = 1
- _419 = 30
- _BR = 64
- _CA = 72
- _ES = 109
- _GB = 121
- _MD = 186
- _PT = 236
- _UK = 304
- _US = 306
- _ZZ = 354
- _XA = 320
- _XC = 322
- _XK = 330
-)
-
-// isoRegionOffset needs to be added to the index of regionISO to obtain the regionID
-// for 2-letter ISO codes. (The first isoRegionOffset regionIDs are reserved for
-// the UN.M49 codes used for groups.)
-const isoRegionOffset = 31
-
-// regionTypes defines the status of a region for various standards.
-// Size: 355 bytes, 355 elements
-var regionTypes = [355]uint8{
- // Entry 0 - 3F
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05,
- 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
- 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
- 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
- 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
- // Entry 40 - 7F
- 0x06, 0x06, 0x06, 0x04, 0x06, 0x06, 0x06, 0x06,
- 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
- 0x06, 0x06, 0x06, 0x06, 0x04, 0x06, 0x04, 0x00,
- 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x04, 0x06,
- 0x04, 0x06, 0x06, 0x06, 0x06, 0x00, 0x06, 0x04,
- 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
- 0x06, 0x06, 0x06, 0x06, 0x06, 0x00, 0x06, 0x04,
- 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
- // Entry 80 - BF
- 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
- 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
- 0x06, 0x00, 0x04, 0x06, 0x06, 0x06, 0x06, 0x06,
- 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
- 0x06, 0x00, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
- 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
- 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
- 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x00,
- // Entry C0 - FF
- 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
- 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
- 0x06, 0x06, 0x06, 0x06, 0x06, 0x00, 0x06, 0x06,
- 0x06, 0x06, 0x00, 0x06, 0x04, 0x06, 0x06, 0x06,
- 0x06, 0x00, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
- 0x06, 0x06, 0x06, 0x06, 0x06, 0x00, 0x06, 0x06,
- 0x00, 0x06, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
- 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
- // Entry 100 - 13F
- 0x06, 0x00, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
- 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
- 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
- 0x06, 0x06, 0x06, 0x06, 0x04, 0x06, 0x06, 0x06,
- 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
- 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
- 0x02, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x00,
- 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x00, 0x06,
- // Entry 140 - 17F
- 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
- 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
- 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
- 0x05, 0x05, 0x04, 0x06, 0x06, 0x04, 0x06, 0x06,
- 0x04, 0x06, 0x05,
-}
-
-// regionISO holds a list of alphabetically sorted 2-letter ISO region codes.
-// Each 2-letter codes is followed by two bytes with the following meaning:
-// - [A-Z}{2}: the first letter of the 2-letter code plus these two
-// letters form the 3-letter ISO code.
-// - 0, n: index into altRegionISO3.
-var regionISO tag.Index = "" + // Size: 1300 bytes
- "AAAAACSCADNDAEREAFFGAGTGAIIAALLBAMRMANNTAOGOAQTAARRGASSMATUTAUUSAWBWAXLA" +
- "AZZEBAIHBBRBBDGDBEELBFFABGGRBHHRBIDIBJENBLLMBMMUBNRNBOOLBQESBRRABSHSBTTN" +
- "BUURBVVTBWWABYLRBZLZCAANCCCKCDODCFAFCGOGCHHECIIVCKOKCLHLCMMRCNHNCOOLCPPT" +
- "CRRICS\x00\x00CTTECUUBCVPVCWUWCXXRCYYPCZZEDDDRDEEUDGGADJJIDKNKDMMADOOMDY" +
- "HYDZZAEA ECCUEESTEGGYEHSHERRIESSPETTHEU\x00\x03FIINFJJIFKLKFMSMFOROFQ" +
- "\x00\x18FRRAFXXXGAABGBBRGDRDGEEOGFUFGGGYGHHAGIIBGLRLGMMBGNINGPLPGQNQGRRC" +
- "GS\x00\x06GTTMGUUMGWNBGYUYHKKGHMMDHNNDHRRVHTTIHUUNHVVOIC IDDNIERLILSRIM" +
- "MNINNDIOOTIQRQIRRNISSLITTAJEEYJMAMJOORJPPNJTTNKEENKGGZKHHMKIIRKM\x00\x09" +
- "KNNAKP\x00\x0cKRORKWWTKY\x00\x0fKZAZLAAOLBBNLCCALIIELKKALRBRLSSOLTTULUUX" +
- "LVVALYBYMAARMCCOMDDAMENEMFAFMGDGMHHLMIIDMKKDMLLIMMMRMNNGMOACMPNPMQTQMRRT" +
- "MSSRMTLTMUUSMVDVMWWIMXEXMYYSMZOZNAAMNCCLNEERNFFKNGGANHHBNIICNLLDNOORNPPL" +
- "NQ\x00\x1eNRRUNTTZNUIUNZZLOMMNPAANPCCIPEERPFYFPGNGPHHLPKAKPLOLPM\x00\x12" +
- "PNCNPRRIPSSEPTRTPUUSPWLWPYRYPZCZQAATQMMMQNNNQOOOQPPPQQQQQRRRQSSSQTTTQU" +
- "\x00\x03QVVVQWWWQXXXQYYYQZZZREEURHHOROOURS\x00\x15RUUSRWWASAAUSBLBSCYCSD" +
- "DNSEWESGGPSHHNSIVNSJJMSKVKSLLESMMRSNENSOOMSRURSSSDSTTPSUUNSVLVSXXMSYYRSZ" +
- "WZTAAATCCATDCDTF\x00\x18TGGOTHHATJJKTKKLTLLSTMKMTNUNTOONTPMPTRURTTTOTVUV" +
- "TWWNTZZAUAKRUGGAUK UMMIUSSAUYRYUZZBVAATVCCTVDDRVEENVGGBVIIRVNNMVUUTWFLF" +
- "WKAKWSSMXAAAXBBBXCCCXDDDXEEEXFFFXGGGXHHHXIIIXJJJXKKKXLLLXMMMXNNNXOOOXPPP" +
- "XQQQXRRRXSSSXTTTXUUUXVVVXWWWXXXXXYYYXZZZYDMDYEEMYT\x00\x1bYUUGZAAFZMMBZR" +
- "ARZWWEZZZZ\xff\xff\xff\xff"
-
-// altRegionISO3 holds a list of 3-letter region codes that cannot be
-// mapped to 2-letter codes using the default algorithm. This is a short list.
-var altRegionISO3 string = "SCGQUUSGSCOMPRKCYMSPMSRBATFMYTATN"
-
-// altRegionIDs holds a list of regionIDs the positions of which match those
-// of the 3-letter ISO codes in altRegionISO3.
-// Size: 22 bytes, 11 elements
-var altRegionIDs = [11]uint16{
- 0x0056, 0x006f, 0x0086, 0x00a6, 0x00a8, 0x00ab, 0x00e8, 0x0103,
- 0x011f, 0x015c, 0x00da,
-}
-
-// Size: 80 bytes, 20 elements
-var regionOldMap = [20]fromTo{
- 0: {from: 0x43, to: 0xc2},
- 1: {from: 0x57, to: 0xa5},
- 2: {from: 0x5e, to: 0x5f},
- 3: {from: 0x65, to: 0x3a},
- 4: {from: 0x77, to: 0x76},
- 5: {from: 0x91, to: 0x36},
- 6: {from: 0xa1, to: 0x131},
- 7: {from: 0xbf, to: 0x131},
- 8: {from: 0xd5, to: 0x13c},
- 9: {from: 0xda, to: 0x2a},
- 10: {from: 0xed, to: 0x131},
- 11: {from: 0xf0, to: 0xe0},
- 12: {from: 0xfa, to: 0x6f},
- 13: {from: 0x101, to: 0x161},
- 14: {from: 0x128, to: 0x124},
- 15: {from: 0x130, to: 0x79},
- 16: {from: 0x137, to: 0x13b},
- 17: {from: 0x13e, to: 0x131},
- 18: {from: 0x15a, to: 0x15b},
- 19: {from: 0x160, to: 0x4a},
-}
-
-// m49 maps regionIDs to UN.M49 codes. The first isoRegionOffset entries are
-// codes indicating collections of regions.
-// Size: 710 bytes, 355 elements
-var m49 = [355]int16{
- // Entry 0 - 3F
- 0, 1, 2, 3, 5, 9, 11, 13,
- 14, 15, 17, 18, 19, 21, 29, 30,
- 34, 35, 39, 53, 54, 57, 61, 142,
- 143, 145, 150, 151, 154, 155, 419, 958,
- 0, 20, 784, 4, 28, 660, 8, 51,
- 530, 24, 10, 32, 16, 40, 36, 533,
- 248, 31, 70, 52, 50, 56, 854, 100,
- 48, 108, 204, 652, 60, 96, 68, 535,
- // Entry 40 - 7F
- 76, 44, 64, 104, 74, 72, 112, 84,
- 124, 166, 180, 140, 178, 756, 384, 184,
- 152, 120, 156, 170, 0, 188, 891, 296,
- 192, 132, 531, 162, 196, 203, 278, 276,
- 0, 262, 208, 212, 214, 204, 12, 0,
- 218, 233, 818, 732, 232, 724, 231, 967,
- 246, 242, 238, 583, 234, 0, 250, 249,
- 266, 826, 308, 268, 254, 831, 288, 292,
- // Entry 80 - BF
- 304, 270, 324, 312, 226, 300, 239, 320,
- 316, 624, 328, 344, 334, 340, 191, 332,
- 348, 854, 0, 360, 372, 376, 833, 356,
- 86, 368, 364, 352, 380, 832, 388, 400,
- 392, 581, 404, 417, 116, 296, 174, 659,
- 408, 410, 414, 136, 398, 418, 422, 662,
- 438, 144, 430, 426, 440, 442, 428, 434,
- 504, 492, 498, 499, 663, 450, 584, 581,
- // Entry C0 - FF
- 807, 466, 104, 496, 446, 580, 474, 478,
- 500, 470, 480, 462, 454, 484, 458, 508,
- 516, 540, 562, 574, 566, 548, 558, 528,
- 578, 524, 10, 520, 536, 570, 554, 512,
- 591, 0, 604, 258, 598, 608, 586, 616,
- 666, 612, 630, 275, 620, 581, 585, 600,
- 591, 634, 959, 960, 961, 962, 963, 964,
- 965, 966, 967, 968, 969, 970, 971, 972,
- // Entry 100 - 13F
- 638, 716, 642, 688, 643, 646, 682, 90,
- 690, 729, 752, 702, 654, 705, 744, 703,
- 694, 674, 686, 706, 740, 728, 678, 810,
- 222, 534, 760, 748, 0, 796, 148, 260,
- 768, 764, 762, 772, 626, 795, 788, 776,
- 626, 792, 780, 798, 158, 834, 804, 800,
- 826, 581, 840, 858, 860, 336, 670, 704,
- 862, 92, 850, 704, 548, 876, 581, 882,
- // Entry 140 - 17F
- 973, 974, 975, 976, 977, 978, 979, 980,
- 981, 982, 983, 984, 985, 986, 987, 988,
- 989, 990, 991, 992, 993, 994, 995, 996,
- 997, 998, 720, 887, 175, 891, 710, 894,
- 180, 716, 999,
-}
-
-// m49Index gives indexes into fromM49 based on the three most significant bits
-// of a 10-bit UN.M49 code. To search an UN.M49 code in fromM49, search in
-// fromM49[m49Index[msb39(code)]:m49Index[msb3(code)+1]]
-// for an entry where the first 7 bits match the 7 lsb of the UN.M49 code.
-// The region code is stored in the 9 lsb of the indexed value.
-// Size: 18 bytes, 9 elements
-var m49Index = [9]int16{
- 0, 59, 107, 142, 180, 219, 258, 290,
- 332,
-}
-
-// fromM49 contains entries to map UN.M49 codes to regions. See m49Index for details.
-// Size: 664 bytes, 332 elements
-var fromM49 = [332]uint16{
- // Entry 0 - 3F
- 0x0201, 0x0402, 0x0603, 0x0823, 0x0a04, 0x1026, 0x1205, 0x142a,
- 0x1606, 0x1866, 0x1a07, 0x1c08, 0x1e09, 0x202c, 0x220a, 0x240b,
- 0x260c, 0x2821, 0x2a0d, 0x3029, 0x3824, 0x3a0e, 0x3c0f, 0x3e31,
- 0x402b, 0x4410, 0x4611, 0x482e, 0x4e12, 0x502d, 0x5841, 0x6038,
- 0x6434, 0x6627, 0x6833, 0x6a13, 0x6c14, 0x7035, 0x7215, 0x783c,
- 0x7a16, 0x8042, 0x883e, 0x8c32, 0x9045, 0x9444, 0x9840, 0xa847,
- 0xac98, 0xb507, 0xb939, 0xc03d, 0xc837, 0xd0c2, 0xd839, 0xe046,
- 0xe8a4, 0xf051, 0xf848, 0x0859, 0x10ab, 0x184b, 0x1c17, 0x1e18,
- // Entry 40 - 7F
- 0x20b1, 0x2219, 0x291e, 0x2c1a, 0x2e1b, 0x3050, 0x341c, 0x361d,
- 0x3852, 0x3d2c, 0x445b, 0x4c49, 0x5453, 0x5ca6, 0x5f5c, 0x644c,
- 0x684a, 0x704f, 0x7855, 0x7e8e, 0x8058, 0x885c, 0x965d, 0x983a,
- 0xa062, 0xa863, 0xac64, 0xb468, 0xbd18, 0xc484, 0xcc6e, 0xce6e,
- 0xd06c, 0xd269, 0xd474, 0xdc72, 0xde86, 0xe471, 0xec70, 0xf030,
- 0xf277, 0xf476, 0xfc7c, 0x04e3, 0x091f, 0x0c61, 0x1478, 0x187b,
- 0x1c81, 0x26eb, 0x285f, 0x2c5e, 0x305f, 0x407e, 0x487f, 0x50a5,
- 0x5885, 0x6080, 0x687a, 0x7083, 0x7888, 0x8087, 0x8882, 0x908a,
- // Entry 80 - BF
- 0x988f, 0x9c8c, 0xa135, 0xa88d, 0xb08b, 0xb890, 0xc09b, 0xc897,
- 0xd093, 0xd89a, 0xe099, 0xe894, 0xf095, 0xf89c, 0x004e, 0x089e,
- 0x10a0, 0x1cac, 0x209f, 0x28a2, 0x30a8, 0x34a9, 0x3caa, 0x42a3,
- 0x44ad, 0x461e, 0x4cae, 0x54b3, 0x58b6, 0x5cb2, 0x64b7, 0x6cb0,
- 0x70b4, 0x74b5, 0x7cc4, 0x84bd, 0x8ccc, 0x94ce, 0x9ccb, 0xa4c1,
- 0xacc9, 0xb4c6, 0xbcc7, 0xc0ca, 0xc8cd, 0xd8b9, 0xe0c3, 0xe4ba,
- 0xe6bb, 0xe8c8, 0xf0b8, 0xf8cf, 0x00df, 0x08d0, 0x10db, 0x18d9,
- 0x20d7, 0x2428, 0x265a, 0x2a2f, 0x2d19, 0x2e3f, 0x30dc, 0x38d1,
- // Entry C0 - FF
- 0x493c, 0x54de, 0x5cd6, 0x64d2, 0x6cd4, 0x74dd, 0x7cd3, 0x84d8,
- 0x88c5, 0x8b31, 0x8e73, 0x90be, 0x92ee, 0x94e6, 0x9ee0, 0xace4,
- 0xb0ef, 0xb8e2, 0xc0e5, 0xc8e9, 0xd0e7, 0xd8ec, 0xe089, 0xe524,
- 0xecea, 0xf4f1, 0xfd00, 0x0502, 0x0704, 0x0d05, 0x183b, 0x1d0c,
- 0x26a7, 0x2825, 0x2caf, 0x2ebc, 0x34e8, 0x3d36, 0x4511, 0x4d16,
- 0x5506, 0x5d12, 0x6103, 0x6508, 0x6d10, 0x7d0b, 0x7f0f, 0x813b,
- 0x830d, 0x8513, 0x8d5e, 0x9961, 0xa15a, 0xa86d, 0xb115, 0xb309,
- 0xb86b, 0xc109, 0xc914, 0xd10e, 0xd91b, 0xe10a, 0xe84d, 0xf11a,
- // Entry 100 - 13F
- 0xf522, 0xf921, 0x0120, 0x0923, 0x1127, 0x192a, 0x2022, 0x2926,
- 0x3129, 0x3725, 0x391d, 0x3d2b, 0x412f, 0x492e, 0x4ec0, 0x5517,
- 0x646a, 0x7479, 0x7e7d, 0x809d, 0x8296, 0x852d, 0x9132, 0xa53a,
- 0xac36, 0xb533, 0xb934, 0xbd38, 0xd93d, 0xe53f, 0xed5b, 0xef5b,
- 0xf656, 0xfd5f, 0x7c1f, 0x7ef2, 0x80f3, 0x82f4, 0x84f5, 0x86f6,
- 0x88f7, 0x8af8, 0x8cf9, 0x8e6f, 0x90fb, 0x92fc, 0x94fd, 0x96fe,
- 0x98ff, 0x9b40, 0x9d41, 0x9f42, 0xa143, 0xa344, 0xa545, 0xa746,
- 0xa947, 0xab48, 0xad49, 0xaf4a, 0xb14b, 0xb34c, 0xb54d, 0xb74e,
- // Entry 140 - 17F
- 0xb94f, 0xbb50, 0xbd51, 0xbf52, 0xc153, 0xc354, 0xc555, 0xc756,
- 0xc957, 0xcb58, 0xcd59, 0xcf62,
-}
-
-// Size: 1444 bytes
-var variantIndex = map[string]uint8{
- "1606nict": 0x0,
- "1694acad": 0x1,
- "1901": 0x2,
- "1959acad": 0x3,
- "1994": 0x45,
- "1996": 0x4,
- "abl1943": 0x5,
- "alalc97": 0x47,
- "aluku": 0x6,
- "ao1990": 0x7,
- "arevela": 0x8,
- "arevmda": 0x9,
- "baku1926": 0xa,
- "balanka": 0xb,
- "barla": 0xc,
- "basiceng": 0xd,
- "bauddha": 0xe,
- "biscayan": 0xf,
- "biske": 0x40,
- "bohoric": 0x10,
- "boont": 0x11,
- "colb1945": 0x12,
- "cornu": 0x13,
- "dajnko": 0x14,
- "ekavsk": 0x15,
- "emodeng": 0x16,
- "fonipa": 0x48,
- "fonupa": 0x49,
- "fonxsamp": 0x4a,
- "hepburn": 0x17,
- "heploc": 0x46,
- "hognorsk": 0x18,
- "ijekavsk": 0x19,
- "itihasa": 0x1a,
- "jauer": 0x1b,
- "jyutping": 0x1c,
- "kkcor": 0x1d,
- "kociewie": 0x1e,
- "kscor": 0x1f,
- "laukika": 0x20,
- "lipaw": 0x41,
- "luna1918": 0x21,
- "metelko": 0x22,
- "monoton": 0x23,
- "ndyuka": 0x24,
- "nedis": 0x25,
- "newfound": 0x26,
- "njiva": 0x42,
- "nulik": 0x27,
- "osojs": 0x43,
- "oxendict": 0x28,
- "pamaka": 0x29,
- "petr1708": 0x2a,
- "pinyin": 0x2b,
- "polyton": 0x2c,
- "puter": 0x2d,
- "rigik": 0x2e,
- "rozaj": 0x2f,
- "rumgr": 0x30,
- "scotland": 0x31,
- "scouse": 0x32,
- "simple": 0x4b,
- "solba": 0x44,
- "sotav": 0x33,
- "surmiran": 0x34,
- "sursilv": 0x35,
- "sutsilv": 0x36,
- "tarask": 0x37,
- "uccor": 0x38,
- "ucrcor": 0x39,
- "ulster": 0x3a,
- "unifon": 0x3b,
- "vaidika": 0x3c,
- "valencia": 0x3d,
- "vallader": 0x3e,
- "wadegile": 0x3f,
-}
-
-// variantNumSpecialized is the number of specialized variants in variants.
-const variantNumSpecialized = 71
-
-// nRegionGroups is the number of region groups.
-const nRegionGroups = 32
-
-type likelyLangRegion struct {
- lang uint16
- region uint16
-}
-
-// likelyScript is a lookup table, indexed by scriptID, for the most likely
-// languages and regions given a script.
-// Size: 928 bytes, 232 elements
-var likelyScript = [232]likelyLangRegion{
- 1: {lang: 0xa6, region: 0x82},
- 3: {lang: 0x159, region: 0x104},
- 4: {lang: 0xc, region: 0x97},
- 5: {lang: 0x15, region: 0x6a},
- 7: {lang: 0x16, region: 0x9a},
- 8: {lang: 0xf3, region: 0x27},
- 9: {lang: 0x8, region: 0x9a},
- 10: {lang: 0x27, region: 0x93},
- 11: {lang: 0x2b, region: 0x51},
- 12: {lang: 0x55, region: 0xb2},
- 13: {lang: 0x2c, region: 0x93},
- 14: {lang: 0x4b, region: 0x34},
- 15: {lang: 0x20d, region: 0x97},
- 17: {lang: 0x2c4, region: 0x12c},
- 18: {lang: 0x1e5, region: 0x97},
- 19: {lang: 0xaf, region: 0x76},
- 20: {lang: 0x5b, region: 0x93},
- 21: {lang: 0x47, region: 0xe5},
- 22: {lang: 0x63, region: 0x34},
- 23: {lang: 0x73, region: 0x48},
- 24: {lang: 0x2a8, region: 0x129},
- 25: {lang: 0x6e, region: 0x13b},
- 26: {lang: 0x6c, region: 0x132},
- 28: {lang: 0x71, region: 0x6a},
- 29: {lang: 0xd0, region: 0x5c},
- 30: {lang: 0x207, region: 0x104},
- 32: {lang: 0xe1, region: 0x97},
- 34: {lang: 0xaf, region: 0x76},
- 37: {lang: 0x98, region: 0x6a},
- 38: {lang: 0x23a, region: 0x26},
- 39: {lang: 0x11, region: 0x6e},
- 41: {lang: 0x111, region: 0x7b},
- 42: {lang: 0x7d, region: 0x37},
- 43: {lang: 0xcf, region: 0x12e},
- 44: {lang: 0x20d, region: 0x97},
- 45: {lang: 0x9a, region: 0x85},
- 46: {lang: 0xd3, region: 0x97},
- 47: {lang: 0x1d7, region: 0x97},
- 48: {lang: 0x2c4, region: 0x12c},
- 49: {lang: 0x136, region: 0xa9},
- 50: {lang: 0x2c4, region: 0x52},
- 51: {lang: 0xe9, region: 0xe5},
- 52: {lang: 0x2c4, region: 0x52},
- 53: {lang: 0x2c4, region: 0x12c},
- 54: {lang: 0x18b, region: 0x99},
- 55: {lang: 0xe0, region: 0x95},
- 56: {lang: 0x107, region: 0xa0},
- 57: {lang: 0xe4, region: 0x129},
- 58: {lang: 0xe8, region: 0xad},
- 60: {lang: 0xf2, region: 0x90},
- 62: {lang: 0xa0, region: 0x9c},
- 63: {lang: 0x136, region: 0xa9},
- 64: {lang: 0x10f, region: 0x93},
- 65: {lang: 0x107, region: 0xa0},
- 67: {lang: 0x99, region: 0xc2},
- 68: {lang: 0x107, region: 0xa0},
- 69: {lang: 0x1eb, region: 0xe6},
- 70: {lang: 0x133, region: 0xa4},
- 71: {lang: 0x21a, region: 0x97},
- 74: {lang: 0x135, region: 0x97},
- 75: {lang: 0x136, region: 0xa9},
- 77: {lang: 0x40, region: 0x97},
- 78: {lang: 0x1c2, region: 0x121},
- 79: {lang: 0x165, region: 0xad},
- 84: {lang: 0x158, region: 0x97},
- 85: {lang: 0x15c, region: 0x97},
- 86: {lang: 0x14f, region: 0x85},
- 87: {lang: 0xd0, region: 0x85},
- 88: {lang: 0x15e, region: 0x52},
- 90: {lang: 0x2aa, region: 0x129},
- 91: {lang: 0x2ab, region: 0x129},
- 92: {lang: 0xe1, region: 0x97},
- 93: {lang: 0x1a8, region: 0x9a},
- 94: {lang: 0x2ad, region: 0x52},
- 95: {lang: 0x4c, region: 0x52},
- 97: {lang: 0x17f, region: 0x110},
- 98: {lang: 0x2ae, region: 0x109},
- 99: {lang: 0x2ae, region: 0x109},
- 100: {lang: 0x18d, region: 0x97},
- 101: {lang: 0x196, region: 0x97},
- 102: {lang: 0x18f, region: 0x52},
- 104: {lang: 0x199, region: 0x34},
- 105: {lang: 0x190, region: 0x97},
- 106: {lang: 0x22b, region: 0xe6},
- 107: {lang: 0x1a5, region: 0xc2},
- 108: {lang: 0x2af, region: 0x106},
- 109: {lang: 0x16, region: 0x9f},
- 110: {lang: 0x1b5, region: 0xd9},
- 112: {lang: 0x179, region: 0x82},
- 114: {lang: 0x223, region: 0x94},
- 115: {lang: 0x212, region: 0x97},
- 116: {lang: 0x1d6, region: 0xc3},
- 117: {lang: 0x1d3, region: 0x97},
- 118: {lang: 0x1d5, region: 0x132},
- 119: {lang: 0x238, region: 0x113},
- 120: {lang: 0x16, region: 0x11a},
- 121: {lang: 0x7c, region: 0xc2},
- 122: {lang: 0x147, region: 0x104},
- 123: {lang: 0x172, region: 0x52},
- 124: {lang: 0x1d9, region: 0x9a},
- 125: {lang: 0x1d9, region: 0x52},
- 127: {lang: 0x1e3, region: 0xae},
- 129: {lang: 0xe5, region: 0x52},
- 130: {lang: 0x2b2, region: 0x9a},
- 181: {lang: 0x1f6, region: 0x93},
- 183: {lang: 0x1c4, region: 0x10a},
- 184: {lang: 0x234, region: 0x95},
- 186: {lang: 0x2b3, region: 0x15b},
- 187: {lang: 0x213, region: 0x97},
- 188: {lang: 0x1e, region: 0x132},
- 189: {lang: 0x9b, region: 0x79},
- 190: {lang: 0x20d, region: 0x97},
- 191: {lang: 0x20d, region: 0x97},
- 192: {lang: 0x21a, region: 0x97},
- 193: {lang: 0x228, region: 0xb1},
- 194: {lang: 0x23c, region: 0x97},
- 195: {lang: 0x244, region: 0x93},
- 196: {lang: 0x24e, region: 0x34},
- 197: {lang: 0x24f, region: 0x99},
- 201: {lang: 0x253, region: 0xe5},
- 202: {lang: 0x8a, region: 0x97},
- 203: {lang: 0x255, region: 0x52},
- 204: {lang: 0x126, region: 0x52},
- 205: {lang: 0x251, region: 0x97},
- 206: {lang: 0x27f, region: 0x52},
- 207: {lang: 0x48, region: 0x13b},
- 208: {lang: 0x258, region: 0x97},
- 210: {lang: 0x2c3, region: 0xb8},
- 211: {lang: 0xaa, region: 0xe5},
- 212: {lang: 0x90, region: 0xcb},
- 213: {lang: 0x25d, region: 0x121},
- 214: {lang: 0x4c, region: 0x52},
- 215: {lang: 0x177, region: 0x97},
- 216: {lang: 0x285, region: 0x11a},
- 217: {lang: 0x28e, region: 0xb2},
- 219: {lang: 0xec, region: 0x97},
- 221: {lang: 0x1e1, region: 0x9a},
- 222: {lang: 0xe, region: 0x99},
- 223: {lang: 0xfb, region: 0x52},
-}
-
-type likelyScriptRegion struct {
- region uint16
- script uint8
- flags uint8
-}
-
-// likelyLang is a lookup table, indexed by langID, for the most likely
-// scripts and regions given incomplete information. If more entries exist for a
-// given language, region and script are the index and size respectively
-// of the list in likelyLangList.
-// Size: 2852 bytes, 713 elements
-var likelyLang = [713]likelyScriptRegion{
- 0: {region: 0x132, script: 0x52, flags: 0x0},
- 1: {region: 0x6e, script: 0x52, flags: 0x0},
- 2: {region: 0x7b, script: 0x1e, flags: 0x0},
- 3: {region: 0x7e, script: 0x52, flags: 0x0},
- 4: {region: 0x93, script: 0x52, flags: 0x0},
- 5: {region: 0x12f, script: 0x52, flags: 0x0},
- 6: {region: 0x7e, script: 0x52, flags: 0x0},
- 7: {region: 0x104, script: 0x1e, flags: 0x0},
- 8: {region: 0x9a, script: 0x9, flags: 0x0},
- 9: {region: 0x126, script: 0x5, flags: 0x0},
- 10: {region: 0x15e, script: 0x52, flags: 0x0},
- 11: {region: 0x51, script: 0x52, flags: 0x0},
- 12: {region: 0x97, script: 0x4, flags: 0x0},
- 13: {region: 0x7e, script: 0x52, flags: 0x0},
- 14: {region: 0x99, script: 0xde, flags: 0x0},
- 15: {region: 0x14a, script: 0x52, flags: 0x0},
- 16: {region: 0x104, script: 0x1e, flags: 0x0},
- 17: {region: 0x6e, script: 0x27, flags: 0x0},
- 18: {region: 0xd4, script: 0x52, flags: 0x0},
- 20: {region: 0x93, script: 0x52, flags: 0x0},
- 21: {region: 0x6a, script: 0x5, flags: 0x0},
- 22: {region: 0x0, script: 0x3, flags: 0x1},
- 23: {region: 0x50, script: 0x52, flags: 0x0},
- 24: {region: 0x3e, script: 0x52, flags: 0x0},
- 25: {region: 0x66, script: 0x5, flags: 0x0},
- 26: {region: 0xb8, script: 0x5, flags: 0x0},
- 27: {region: 0x6a, script: 0x5, flags: 0x0},
- 28: {region: 0x97, script: 0xe, flags: 0x0},
- 29: {region: 0x12d, script: 0x52, flags: 0x0},
- 30: {region: 0x132, script: 0xbc, flags: 0x0},
- 31: {region: 0x6d, script: 0x52, flags: 0x0},
- 32: {region: 0x48, script: 0x52, flags: 0x0},
- 33: {region: 0x104, script: 0x1e, flags: 0x0},
- 34: {region: 0x97, script: 0x20, flags: 0x0},
- 35: {region: 0x3e, script: 0x52, flags: 0x0},
- 36: {region: 0x3, script: 0x5, flags: 0x1},
- 37: {region: 0x104, script: 0x1e, flags: 0x0},
- 38: {region: 0xe6, script: 0x5, flags: 0x0},
- 39: {region: 0x93, script: 0x52, flags: 0x0},
- 40: {region: 0xd9, script: 0x20, flags: 0x0},
- 41: {region: 0x2d, script: 0x52, flags: 0x0},
- 42: {region: 0x51, script: 0x52, flags: 0x0},
- 43: {region: 0x51, script: 0xb, flags: 0x0},
- 44: {region: 0x93, script: 0x52, flags: 0x0},
- 45: {region: 0x51, script: 0x52, flags: 0x0},
- 46: {region: 0x4e, script: 0x52, flags: 0x0},
- 47: {region: 0x46, script: 0x1e, flags: 0x0},
- 48: {region: 0x109, script: 0x5, flags: 0x0},
- 49: {region: 0x15f, script: 0x52, flags: 0x0},
- 50: {region: 0x93, script: 0x52, flags: 0x0},
- 51: {region: 0x12d, script: 0x52, flags: 0x0},
- 52: {region: 0x51, script: 0x52, flags: 0x0},
- 53: {region: 0x97, script: 0xcd, flags: 0x0},
- 54: {region: 0xe6, script: 0x5, flags: 0x0},
- 55: {region: 0x97, script: 0x20, flags: 0x0},
- 56: {region: 0x37, script: 0x1e, flags: 0x0},
- 57: {region: 0x97, script: 0x20, flags: 0x0},
- 58: {region: 0xe6, script: 0x5, flags: 0x0},
- 59: {region: 0x129, script: 0x2d, flags: 0x0},
- 61: {region: 0x97, script: 0x20, flags: 0x0},
- 62: {region: 0x97, script: 0x20, flags: 0x0},
- 63: {region: 0xe5, script: 0x52, flags: 0x0},
- 64: {region: 0x97, script: 0x20, flags: 0x0},
- 65: {region: 0x13c, script: 0x52, flags: 0x0},
- 66: {region: 0xe5, script: 0x52, flags: 0x0},
- 67: {region: 0xd4, script: 0x52, flags: 0x0},
- 68: {region: 0x97, script: 0x20, flags: 0x0},
- 69: {region: 0x93, script: 0x52, flags: 0x0},
- 70: {region: 0x51, script: 0x52, flags: 0x0},
- 71: {region: 0xe5, script: 0x52, flags: 0x0},
- 72: {region: 0x13b, script: 0xcf, flags: 0x0},
- 73: {region: 0xc1, script: 0x52, flags: 0x0},
- 74: {region: 0xc1, script: 0x52, flags: 0x0},
- 75: {region: 0x34, script: 0xe, flags: 0x0},
- 76: {region: 0x52, script: 0xd6, flags: 0x0},
- 77: {region: 0x97, script: 0xe, flags: 0x0},
- 78: {region: 0x9a, script: 0x5, flags: 0x0},
- 79: {region: 0x4e, script: 0x52, flags: 0x0},
- 80: {region: 0x76, script: 0x52, flags: 0x0},
- 81: {region: 0x97, script: 0x20, flags: 0x0},
- 82: {region: 0xe6, script: 0x5, flags: 0x0},
- 83: {region: 0x97, script: 0x20, flags: 0x0},
- 84: {region: 0x32, script: 0x52, flags: 0x0},
- 85: {region: 0xb2, script: 0xc, flags: 0x0},
- 86: {region: 0x51, script: 0x52, flags: 0x0},
- 87: {region: 0xe5, script: 0x52, flags: 0x0},
- 88: {region: 0xe6, script: 0x20, flags: 0x0},
- 89: {region: 0x104, script: 0x1e, flags: 0x0},
- 90: {region: 0x15c, script: 0x52, flags: 0x0},
- 91: {region: 0x93, script: 0x52, flags: 0x0},
- 92: {region: 0x51, script: 0x52, flags: 0x0},
- 93: {region: 0x84, script: 0x52, flags: 0x0},
- 94: {region: 0x6c, script: 0x27, flags: 0x0},
- 95: {region: 0x51, script: 0x52, flags: 0x0},
- 96: {region: 0xc1, script: 0x52, flags: 0x0},
- 97: {region: 0x6d, script: 0x52, flags: 0x0},
- 98: {region: 0xd4, script: 0x52, flags: 0x0},
- 99: {region: 0x8, script: 0x2, flags: 0x1},
- 100: {region: 0x104, script: 0x1e, flags: 0x0},
- 101: {region: 0xe5, script: 0x52, flags: 0x0},
- 102: {region: 0x12f, script: 0x52, flags: 0x0},
- 103: {region: 0x88, script: 0x52, flags: 0x0},
- 104: {region: 0x73, script: 0x52, flags: 0x0},
- 105: {region: 0x104, script: 0x1e, flags: 0x0},
- 106: {region: 0x132, script: 0x52, flags: 0x0},
- 107: {region: 0x48, script: 0x52, flags: 0x0},
- 108: {region: 0x132, script: 0x1a, flags: 0x0},
- 109: {region: 0xa4, script: 0x5, flags: 0x0},
- 110: {region: 0x13b, script: 0x19, flags: 0x0},
- 111: {region: 0x99, script: 0x5, flags: 0x0},
- 112: {region: 0x76, script: 0x52, flags: 0x0},
- 113: {region: 0x6a, script: 0x1c, flags: 0x0},
- 114: {region: 0xe5, script: 0x52, flags: 0x0},
- 115: {region: 0x48, script: 0x17, flags: 0x0},
- 116: {region: 0x48, script: 0x17, flags: 0x0},
- 117: {region: 0x48, script: 0x17, flags: 0x0},
- 118: {region: 0x48, script: 0x17, flags: 0x0},
- 119: {region: 0x48, script: 0x17, flags: 0x0},
- 120: {region: 0x108, script: 0x52, flags: 0x0},
- 121: {region: 0x5d, script: 0x52, flags: 0x0},
- 122: {region: 0xe7, script: 0x52, flags: 0x0},
- 123: {region: 0x48, script: 0x17, flags: 0x0},
- 124: {region: 0xc2, script: 0x79, flags: 0x0},
- 125: {region: 0xa, script: 0x2, flags: 0x1},
- 126: {region: 0x104, script: 0x1e, flags: 0x0},
- 127: {region: 0x79, script: 0x52, flags: 0x0},
- 128: {region: 0x62, script: 0x52, flags: 0x0},
- 129: {region: 0x132, script: 0x52, flags: 0x0},
- 130: {region: 0x104, script: 0x1e, flags: 0x0},
- 131: {region: 0xa2, script: 0x52, flags: 0x0},
- 132: {region: 0x97, script: 0x5, flags: 0x0},
- 133: {region: 0x5f, script: 0x52, flags: 0x0},
- 134: {region: 0x48, script: 0x52, flags: 0x0},
- 135: {region: 0x48, script: 0x52, flags: 0x0},
- 136: {region: 0xd2, script: 0x52, flags: 0x0},
- 137: {region: 0x4e, script: 0x52, flags: 0x0},
- 138: {region: 0x97, script: 0x5, flags: 0x0},
- 139: {region: 0x5f, script: 0x52, flags: 0x0},
- 140: {region: 0xc1, script: 0x52, flags: 0x0},
- 141: {region: 0xce, script: 0x52, flags: 0x0},
- 142: {region: 0xd9, script: 0x20, flags: 0x0},
- 143: {region: 0x51, script: 0x52, flags: 0x0},
- 144: {region: 0xcb, script: 0xd4, flags: 0x0},
- 145: {region: 0x112, script: 0x52, flags: 0x0},
- 146: {region: 0x36, script: 0x52, flags: 0x0},
- 147: {region: 0x42, script: 0xd6, flags: 0x0},
- 148: {region: 0xa2, script: 0x52, flags: 0x0},
- 149: {region: 0x7e, script: 0x52, flags: 0x0},
- 150: {region: 0xd4, script: 0x52, flags: 0x0},
- 151: {region: 0x9c, script: 0x52, flags: 0x0},
- 152: {region: 0x6a, script: 0x25, flags: 0x0},
- 153: {region: 0xc2, script: 0x43, flags: 0x0},
- 154: {region: 0x85, script: 0x2d, flags: 0x0},
- 155: {region: 0xc, script: 0x2, flags: 0x1},
- 156: {region: 0x1, script: 0x52, flags: 0x0},
- 157: {region: 0x6d, script: 0x52, flags: 0x0},
- 158: {region: 0x132, script: 0x52, flags: 0x0},
- 159: {region: 0x69, script: 0x52, flags: 0x0},
- 160: {region: 0x9c, script: 0x3e, flags: 0x0},
- 161: {region: 0x6d, script: 0x52, flags: 0x0},
- 162: {region: 0x51, script: 0x52, flags: 0x0},
- 163: {region: 0x6d, script: 0x52, flags: 0x0},
- 164: {region: 0x9a, script: 0x5, flags: 0x0},
- 165: {region: 0x84, script: 0x52, flags: 0x0},
- 166: {region: 0xe, script: 0x2, flags: 0x1},
- 167: {region: 0xc1, script: 0x52, flags: 0x0},
- 168: {region: 0x70, script: 0x52, flags: 0x0},
- 169: {region: 0x109, script: 0x5, flags: 0x0},
- 170: {region: 0xe5, script: 0x52, flags: 0x0},
- 171: {region: 0x10a, script: 0x52, flags: 0x0},
- 172: {region: 0x71, script: 0x52, flags: 0x0},
- 173: {region: 0x74, script: 0x52, flags: 0x0},
- 174: {region: 0x3a, script: 0x52, flags: 0x0},
- 175: {region: 0x76, script: 0x52, flags: 0x0},
- 176: {region: 0x132, script: 0x52, flags: 0x0},
- 177: {region: 0x76, script: 0x52, flags: 0x0},
- 178: {region: 0x5f, script: 0x52, flags: 0x0},
- 179: {region: 0x5f, script: 0x52, flags: 0x0},
- 180: {region: 0x13d, script: 0x52, flags: 0x0},
- 181: {region: 0xd2, script: 0x52, flags: 0x0},
- 182: {region: 0x9c, script: 0x52, flags: 0x0},
- 183: {region: 0xd4, script: 0x52, flags: 0x0},
- 184: {region: 0x109, script: 0x52, flags: 0x0},
- 185: {region: 0xd7, script: 0x52, flags: 0x0},
- 186: {region: 0x94, script: 0x52, flags: 0x0},
- 187: {region: 0x7e, script: 0x52, flags: 0x0},
- 188: {region: 0xba, script: 0x52, flags: 0x0},
- 189: {region: 0x52, script: 0x34, flags: 0x0},
- 190: {region: 0x93, script: 0x52, flags: 0x0},
- 191: {region: 0x97, script: 0x20, flags: 0x0},
- 192: {region: 0x9a, script: 0x5, flags: 0x0},
- 193: {region: 0x7c, script: 0x52, flags: 0x0},
- 194: {region: 0x79, script: 0x52, flags: 0x0},
- 195: {region: 0x6e, script: 0x27, flags: 0x0},
- 196: {region: 0xd9, script: 0x20, flags: 0x0},
- 197: {region: 0xa5, script: 0x52, flags: 0x0},
- 198: {region: 0xe6, script: 0x5, flags: 0x0},
- 199: {region: 0xe6, script: 0x5, flags: 0x0},
- 200: {region: 0x6d, script: 0x52, flags: 0x0},
- 201: {region: 0x9a, script: 0x5, flags: 0x0},
- 202: {region: 0xef, script: 0x52, flags: 0x0},
- 203: {region: 0x97, script: 0x20, flags: 0x0},
- 204: {region: 0x97, script: 0xd0, flags: 0x0},
- 205: {region: 0x93, script: 0x52, flags: 0x0},
- 206: {region: 0xd7, script: 0x52, flags: 0x0},
- 207: {region: 0x12e, script: 0x2b, flags: 0x0},
- 208: {region: 0x10, script: 0x2, flags: 0x1},
- 209: {region: 0x97, script: 0xe, flags: 0x0},
- 210: {region: 0x4d, script: 0x52, flags: 0x0},
- 211: {region: 0x97, script: 0x2e, flags: 0x0},
- 212: {region: 0x40, script: 0x52, flags: 0x0},
- 213: {region: 0x53, script: 0x52, flags: 0x0},
- 214: {region: 0x7e, script: 0x52, flags: 0x0},
- 216: {region: 0xa2, script: 0x52, flags: 0x0},
- 217: {region: 0x96, script: 0x52, flags: 0x0},
- 218: {region: 0xd9, script: 0x20, flags: 0x0},
- 219: {region: 0x48, script: 0x52, flags: 0x0},
- 220: {region: 0x12, script: 0x3, flags: 0x1},
- 221: {region: 0x52, script: 0x34, flags: 0x0},
- 222: {region: 0x132, script: 0x52, flags: 0x0},
- 223: {region: 0x23, script: 0x5, flags: 0x0},
- 224: {region: 0x95, script: 0x37, flags: 0x0},
- 225: {region: 0x97, script: 0x20, flags: 0x0},
- 226: {region: 0x71, script: 0x52, flags: 0x0},
- 227: {region: 0xe5, script: 0x52, flags: 0x0},
- 228: {region: 0x129, script: 0x39, flags: 0x0},
- 229: {region: 0x52, script: 0x81, flags: 0x0},
- 230: {region: 0xe6, script: 0x5, flags: 0x0},
- 231: {region: 0x97, script: 0x20, flags: 0x0},
- 232: {region: 0xad, script: 0x3a, flags: 0x0},
- 233: {region: 0xe5, script: 0x52, flags: 0x0},
- 234: {region: 0xe6, script: 0x5, flags: 0x0},
- 235: {region: 0xe4, script: 0x52, flags: 0x0},
- 236: {region: 0x97, script: 0x20, flags: 0x0},
- 237: {region: 0x97, script: 0x20, flags: 0x0},
- 238: {region: 0x8e, script: 0x52, flags: 0x0},
- 239: {region: 0x5f, script: 0x52, flags: 0x0},
- 240: {region: 0x52, script: 0x34, flags: 0x0},
- 241: {region: 0x8f, script: 0x52, flags: 0x0},
- 242: {region: 0x90, script: 0x52, flags: 0x0},
- 243: {region: 0x27, script: 0x8, flags: 0x0},
- 244: {region: 0xd0, script: 0x52, flags: 0x0},
- 245: {region: 0x76, script: 0x52, flags: 0x0},
- 246: {region: 0xce, script: 0x52, flags: 0x0},
- 247: {region: 0xd4, script: 0x52, flags: 0x0},
- 248: {region: 0x93, script: 0x52, flags: 0x0},
- 250: {region: 0xd4, script: 0x52, flags: 0x0},
- 251: {region: 0x52, script: 0xdf, flags: 0x0},
- 252: {region: 0x132, script: 0x52, flags: 0x0},
- 253: {region: 0x48, script: 0x52, flags: 0x0},
- 254: {region: 0xe5, script: 0x52, flags: 0x0},
- 255: {region: 0x93, script: 0x52, flags: 0x0},
- 256: {region: 0x104, script: 0x1e, flags: 0x0},
- 258: {region: 0x9b, script: 0x52, flags: 0x0},
- 259: {region: 0x9c, script: 0x52, flags: 0x0},
- 260: {region: 0x48, script: 0x17, flags: 0x0},
- 261: {region: 0x95, script: 0x37, flags: 0x0},
- 262: {region: 0x104, script: 0x52, flags: 0x0},
- 263: {region: 0xa0, script: 0x41, flags: 0x0},
- 264: {region: 0x9e, script: 0x52, flags: 0x0},
- 266: {region: 0x51, script: 0x52, flags: 0x0},
- 267: {region: 0x12e, script: 0x37, flags: 0x0},
- 268: {region: 0x12d, script: 0x52, flags: 0x0},
- 269: {region: 0xd9, script: 0x20, flags: 0x0},
- 270: {region: 0x62, script: 0x52, flags: 0x0},
- 271: {region: 0x93, script: 0x52, flags: 0x0},
- 272: {region: 0x93, script: 0x52, flags: 0x0},
- 273: {region: 0x7b, script: 0x29, flags: 0x0},
- 274: {region: 0x134, script: 0x1e, flags: 0x0},
- 275: {region: 0x66, script: 0x52, flags: 0x0},
- 276: {region: 0xc2, script: 0x52, flags: 0x0},
- 277: {region: 0xd4, script: 0x52, flags: 0x0},
- 278: {region: 0xa2, script: 0x52, flags: 0x0},
- 279: {region: 0xc1, script: 0x52, flags: 0x0},
- 280: {region: 0x104, script: 0x1e, flags: 0x0},
- 281: {region: 0xd4, script: 0x52, flags: 0x0},
- 282: {region: 0x161, script: 0x52, flags: 0x0},
- 283: {region: 0x12d, script: 0x52, flags: 0x0},
- 284: {region: 0x121, script: 0xd5, flags: 0x0},
- 285: {region: 0x59, script: 0x52, flags: 0x0},
- 286: {region: 0x51, script: 0x52, flags: 0x0},
- 287: {region: 0x4e, script: 0x52, flags: 0x0},
- 288: {region: 0x97, script: 0x20, flags: 0x0},
- 289: {region: 0x97, script: 0x20, flags: 0x0},
- 290: {region: 0x4a, script: 0x52, flags: 0x0},
- 291: {region: 0x93, script: 0x52, flags: 0x0},
- 292: {region: 0x40, script: 0x52, flags: 0x0},
- 293: {region: 0x97, script: 0x52, flags: 0x0},
- 294: {region: 0x52, script: 0xcc, flags: 0x0},
- 295: {region: 0x97, script: 0x20, flags: 0x0},
- 296: {region: 0xc1, script: 0x52, flags: 0x0},
- 297: {region: 0x97, script: 0x6b, flags: 0x0},
- 298: {region: 0xe6, script: 0x5, flags: 0x0},
- 299: {region: 0xa2, script: 0x52, flags: 0x0},
- 300: {region: 0x129, script: 0x52, flags: 0x0},
- 301: {region: 0xd0, script: 0x52, flags: 0x0},
- 302: {region: 0xad, script: 0x4f, flags: 0x0},
- 303: {region: 0x15, script: 0x6, flags: 0x1},
- 304: {region: 0x51, script: 0x52, flags: 0x0},
- 305: {region: 0x80, script: 0x52, flags: 0x0},
- 306: {region: 0xa2, script: 0x52, flags: 0x0},
- 307: {region: 0xa4, script: 0x46, flags: 0x0},
- 308: {region: 0x29, script: 0x52, flags: 0x0},
- 309: {region: 0x97, script: 0x4a, flags: 0x0},
- 310: {region: 0xa9, script: 0x4b, flags: 0x0},
- 311: {region: 0x104, script: 0x1e, flags: 0x0},
- 312: {region: 0x97, script: 0x20, flags: 0x0},
- 313: {region: 0x73, script: 0x52, flags: 0x0},
- 314: {region: 0xb2, script: 0x52, flags: 0x0},
- 316: {region: 0x104, script: 0x1e, flags: 0x0},
- 317: {region: 0x110, script: 0x52, flags: 0x0},
- 318: {region: 0xe5, script: 0x52, flags: 0x0},
- 319: {region: 0x104, script: 0x52, flags: 0x0},
- 320: {region: 0x97, script: 0x20, flags: 0x0},
- 321: {region: 0x97, script: 0x5, flags: 0x0},
- 322: {region: 0x12d, script: 0x52, flags: 0x0},
- 323: {region: 0x51, script: 0x52, flags: 0x0},
- 324: {region: 0x5f, script: 0x52, flags: 0x0},
- 325: {region: 0x1b, script: 0x3, flags: 0x1},
- 326: {region: 0x104, script: 0x1e, flags: 0x0},
- 327: {region: 0x104, script: 0x1e, flags: 0x0},
- 328: {region: 0x93, script: 0x52, flags: 0x0},
- 329: {region: 0xe6, script: 0x5, flags: 0x0},
- 330: {region: 0x79, script: 0x52, flags: 0x0},
- 331: {region: 0x121, script: 0xd5, flags: 0x0},
- 332: {region: 0xe6, script: 0x5, flags: 0x0},
- 333: {region: 0x1e, script: 0x5, flags: 0x1},
- 334: {region: 0x135, script: 0x52, flags: 0x0},
- 335: {region: 0x85, script: 0x56, flags: 0x0},
- 336: {region: 0x95, script: 0x37, flags: 0x0},
- 337: {region: 0x12d, script: 0x52, flags: 0x0},
- 338: {region: 0xe6, script: 0x5, flags: 0x0},
- 339: {region: 0x12f, script: 0x52, flags: 0x0},
- 340: {region: 0xb5, script: 0x52, flags: 0x0},
- 341: {region: 0x104, script: 0x1e, flags: 0x0},
- 342: {region: 0x93, script: 0x52, flags: 0x0},
- 343: {region: 0x52, script: 0xd5, flags: 0x0},
- 344: {region: 0x97, script: 0x54, flags: 0x0},
- 345: {region: 0x104, script: 0x1e, flags: 0x0},
- 346: {region: 0x12f, script: 0x52, flags: 0x0},
- 347: {region: 0xd7, script: 0x52, flags: 0x0},
- 348: {region: 0x23, script: 0x2, flags: 0x1},
- 349: {region: 0x9c, script: 0x52, flags: 0x0},
- 350: {region: 0x52, script: 0x58, flags: 0x0},
- 351: {region: 0x93, script: 0x52, flags: 0x0},
- 352: {region: 0x9a, script: 0x5, flags: 0x0},
- 353: {region: 0x132, script: 0x52, flags: 0x0},
- 354: {region: 0x97, script: 0xd0, flags: 0x0},
- 355: {region: 0x9c, script: 0x52, flags: 0x0},
- 356: {region: 0x4a, script: 0x52, flags: 0x0},
- 357: {region: 0xad, script: 0x4f, flags: 0x0},
- 358: {region: 0x4a, script: 0x52, flags: 0x0},
- 359: {region: 0x15f, script: 0x52, flags: 0x0},
- 360: {region: 0x9a, script: 0x5, flags: 0x0},
- 361: {region: 0xb4, script: 0x52, flags: 0x0},
- 362: {region: 0xb6, script: 0x52, flags: 0x0},
- 363: {region: 0x4a, script: 0x52, flags: 0x0},
- 364: {region: 0x4a, script: 0x52, flags: 0x0},
- 365: {region: 0xa2, script: 0x52, flags: 0x0},
- 366: {region: 0xa2, script: 0x52, flags: 0x0},
- 367: {region: 0x9a, script: 0x5, flags: 0x0},
- 368: {region: 0xb6, script: 0x52, flags: 0x0},
- 369: {region: 0x121, script: 0xd5, flags: 0x0},
- 370: {region: 0x52, script: 0x34, flags: 0x0},
- 371: {region: 0x129, script: 0x52, flags: 0x0},
- 372: {region: 0x93, script: 0x52, flags: 0x0},
- 373: {region: 0x51, script: 0x52, flags: 0x0},
- 374: {region: 0x97, script: 0x20, flags: 0x0},
- 375: {region: 0x97, script: 0x20, flags: 0x0},
- 376: {region: 0x93, script: 0x52, flags: 0x0},
- 377: {region: 0x25, script: 0x3, flags: 0x1},
- 378: {region: 0xa2, script: 0x52, flags: 0x0},
- 379: {region: 0xcd, script: 0x52, flags: 0x0},
- 380: {region: 0x104, script: 0x1e, flags: 0x0},
- 381: {region: 0xe5, script: 0x52, flags: 0x0},
- 382: {region: 0x93, script: 0x52, flags: 0x0},
- 383: {region: 0x110, script: 0x52, flags: 0x0},
- 384: {region: 0xa2, script: 0x52, flags: 0x0},
- 385: {region: 0x121, script: 0x5, flags: 0x0},
- 386: {region: 0xca, script: 0x52, flags: 0x0},
- 387: {region: 0xbd, script: 0x52, flags: 0x0},
- 388: {region: 0xcf, script: 0x52, flags: 0x0},
- 389: {region: 0x51, script: 0x52, flags: 0x0},
- 390: {region: 0xd9, script: 0x20, flags: 0x0},
- 391: {region: 0x12d, script: 0x52, flags: 0x0},
- 392: {region: 0xbe, script: 0x52, flags: 0x0},
- 393: {region: 0xde, script: 0x52, flags: 0x0},
- 394: {region: 0x93, script: 0x52, flags: 0x0},
- 395: {region: 0x99, script: 0x36, flags: 0x0},
- 396: {region: 0xc0, script: 0x1e, flags: 0x0},
- 397: {region: 0x97, script: 0x64, flags: 0x0},
- 398: {region: 0x109, script: 0x52, flags: 0x0},
- 399: {region: 0x28, script: 0x3, flags: 0x1},
- 400: {region: 0x97, script: 0xe, flags: 0x0},
- 401: {region: 0xc2, script: 0x6b, flags: 0x0},
- 403: {region: 0x48, script: 0x52, flags: 0x0},
- 404: {region: 0x48, script: 0x52, flags: 0x0},
- 405: {region: 0x36, script: 0x52, flags: 0x0},
- 406: {region: 0x97, script: 0x20, flags: 0x0},
- 407: {region: 0xd9, script: 0x20, flags: 0x0},
- 408: {region: 0x104, script: 0x1e, flags: 0x0},
- 409: {region: 0x34, script: 0x68, flags: 0x0},
- 410: {region: 0x2b, script: 0x3, flags: 0x1},
- 411: {region: 0xc9, script: 0x52, flags: 0x0},
- 412: {region: 0x97, script: 0x20, flags: 0x0},
- 413: {region: 0x51, script: 0x52, flags: 0x0},
- 415: {region: 0x132, script: 0x52, flags: 0x0},
- 416: {region: 0xe6, script: 0x5, flags: 0x0},
- 417: {region: 0xc1, script: 0x52, flags: 0x0},
- 418: {region: 0x97, script: 0x20, flags: 0x0},
- 419: {region: 0x93, script: 0x52, flags: 0x0},
- 420: {region: 0x161, script: 0x52, flags: 0x0},
- 421: {region: 0xc2, script: 0x6b, flags: 0x0},
- 422: {region: 0x104, script: 0x1e, flags: 0x0},
- 423: {region: 0x12f, script: 0x52, flags: 0x0},
- 424: {region: 0x9a, script: 0x5d, flags: 0x0},
- 425: {region: 0x9a, script: 0x5, flags: 0x0},
- 426: {region: 0xdb, script: 0x52, flags: 0x0},
- 428: {region: 0x52, script: 0x34, flags: 0x0},
- 429: {region: 0x9c, script: 0x52, flags: 0x0},
- 430: {region: 0xd0, script: 0x52, flags: 0x0},
- 431: {region: 0xd8, script: 0x52, flags: 0x0},
- 432: {region: 0xcd, script: 0x52, flags: 0x0},
- 433: {region: 0x161, script: 0x52, flags: 0x0},
- 434: {region: 0xcf, script: 0x52, flags: 0x0},
- 435: {region: 0x5f, script: 0x52, flags: 0x0},
- 436: {region: 0xd9, script: 0x20, flags: 0x0},
- 437: {region: 0xd9, script: 0x20, flags: 0x0},
- 438: {region: 0xd0, script: 0x52, flags: 0x0},
- 439: {region: 0xcf, script: 0x52, flags: 0x0},
- 440: {region: 0xcd, script: 0x52, flags: 0x0},
- 441: {region: 0xcd, script: 0x52, flags: 0x0},
- 442: {region: 0x93, script: 0x52, flags: 0x0},
- 443: {region: 0xdd, script: 0x52, flags: 0x0},
- 444: {region: 0x97, script: 0x52, flags: 0x0},
- 445: {region: 0xd7, script: 0x52, flags: 0x0},
- 446: {region: 0x51, script: 0x52, flags: 0x0},
- 447: {region: 0xd8, script: 0x52, flags: 0x0},
- 448: {region: 0x51, script: 0x52, flags: 0x0},
- 449: {region: 0xd8, script: 0x52, flags: 0x0},
- 450: {region: 0x121, script: 0x4e, flags: 0x0},
- 451: {region: 0x97, script: 0x20, flags: 0x0},
- 452: {region: 0x10a, script: 0xb7, flags: 0x0},
- 453: {region: 0x82, script: 0x70, flags: 0x0},
- 454: {region: 0x15e, script: 0x52, flags: 0x0},
- 455: {region: 0x48, script: 0x17, flags: 0x0},
- 456: {region: 0x15e, script: 0x52, flags: 0x0},
- 457: {region: 0x115, script: 0x52, flags: 0x0},
- 458: {region: 0x132, script: 0x52, flags: 0x0},
- 459: {region: 0x52, script: 0x52, flags: 0x0},
- 460: {region: 0xcc, script: 0x52, flags: 0x0},
- 461: {region: 0x12d, script: 0x52, flags: 0x0},
- 462: {region: 0x12f, script: 0x52, flags: 0x0},
- 463: {region: 0x7e, script: 0x52, flags: 0x0},
- 464: {region: 0x76, script: 0x52, flags: 0x0},
- 466: {region: 0x6e, script: 0x52, flags: 0x0},
- 467: {region: 0x97, script: 0x75, flags: 0x0},
- 468: {region: 0x7b, script: 0x1e, flags: 0x0},
- 469: {region: 0x132, script: 0x76, flags: 0x0},
- 470: {region: 0xc3, script: 0x74, flags: 0x0},
- 471: {region: 0x2e, script: 0x3, flags: 0x1},
- 472: {region: 0xe5, script: 0x52, flags: 0x0},
- 473: {region: 0x31, script: 0x2, flags: 0x1},
- 474: {region: 0xe5, script: 0x52, flags: 0x0},
- 475: {region: 0x2f, script: 0x52, flags: 0x0},
- 476: {region: 0xee, script: 0x52, flags: 0x0},
- 477: {region: 0x76, script: 0x52, flags: 0x0},
- 478: {region: 0xd4, script: 0x52, flags: 0x0},
- 479: {region: 0x132, script: 0x52, flags: 0x0},
- 480: {region: 0x48, script: 0x52, flags: 0x0},
- 481: {region: 0x9a, script: 0xdd, flags: 0x0},
- 482: {region: 0x5f, script: 0x52, flags: 0x0},
- 483: {region: 0xae, script: 0x7f, flags: 0x0},
- 485: {region: 0x97, script: 0x12, flags: 0x0},
- 486: {region: 0xa2, script: 0x52, flags: 0x0},
- 487: {region: 0xe7, script: 0x52, flags: 0x0},
- 488: {region: 0x9c, script: 0x52, flags: 0x0},
- 489: {region: 0x85, script: 0x2d, flags: 0x0},
- 490: {region: 0x73, script: 0x52, flags: 0x0},
- 491: {region: 0xe6, script: 0x45, flags: 0x0},
- 492: {region: 0x9a, script: 0x5, flags: 0x0},
- 493: {region: 0x1, script: 0x52, flags: 0x0},
- 494: {region: 0x23, script: 0x5, flags: 0x0},
- 495: {region: 0x40, script: 0x52, flags: 0x0},
- 496: {region: 0x78, script: 0x52, flags: 0x0},
- 497: {region: 0xe2, script: 0x52, flags: 0x0},
- 498: {region: 0x87, script: 0x52, flags: 0x0},
- 499: {region: 0x68, script: 0x52, flags: 0x0},
- 500: {region: 0x97, script: 0x20, flags: 0x0},
- 501: {region: 0x100, script: 0x52, flags: 0x0},
- 502: {region: 0x93, script: 0x52, flags: 0x0},
- 503: {region: 0x9c, script: 0x52, flags: 0x0},
- 504: {region: 0x97, script: 0x52, flags: 0x0},
- 505: {region: 0x33, script: 0x2, flags: 0x1},
- 506: {region: 0xd9, script: 0x20, flags: 0x0},
- 507: {region: 0x34, script: 0xe, flags: 0x0},
- 508: {region: 0x4d, script: 0x52, flags: 0x0},
- 509: {region: 0x70, script: 0x52, flags: 0x0},
- 510: {region: 0x4d, script: 0x52, flags: 0x0},
- 511: {region: 0x9a, script: 0x5, flags: 0x0},
- 512: {region: 0x10a, script: 0x52, flags: 0x0},
- 513: {region: 0x39, script: 0x52, flags: 0x0},
- 514: {region: 0xcf, script: 0x52, flags: 0x0},
- 515: {region: 0x102, script: 0x52, flags: 0x0},
- 516: {region: 0x93, script: 0x52, flags: 0x0},
- 517: {region: 0x12d, script: 0x52, flags: 0x0},
- 518: {region: 0x71, script: 0x52, flags: 0x0},
- 519: {region: 0x104, script: 0x1e, flags: 0x0},
- 520: {region: 0x12e, script: 0x1e, flags: 0x0},
- 521: {region: 0x107, script: 0x52, flags: 0x0},
- 522: {region: 0x105, script: 0x52, flags: 0x0},
- 523: {region: 0x12d, script: 0x52, flags: 0x0},
- 524: {region: 0xa0, script: 0x44, flags: 0x0},
- 525: {region: 0x97, script: 0x20, flags: 0x0},
- 526: {region: 0x7e, script: 0x52, flags: 0x0},
- 527: {region: 0x104, script: 0x1e, flags: 0x0},
- 528: {region: 0xa2, script: 0x52, flags: 0x0},
- 529: {region: 0x93, script: 0x52, flags: 0x0},
- 530: {region: 0x97, script: 0x52, flags: 0x0},
- 531: {region: 0x97, script: 0xbb, flags: 0x0},
- 532: {region: 0x12d, script: 0x52, flags: 0x0},
- 533: {region: 0x9c, script: 0x52, flags: 0x0},
- 534: {region: 0x97, script: 0x20, flags: 0x0},
- 535: {region: 0x9c, script: 0x52, flags: 0x0},
- 536: {region: 0x79, script: 0x52, flags: 0x0},
- 537: {region: 0x48, script: 0x52, flags: 0x0},
- 538: {region: 0x35, script: 0x4, flags: 0x1},
- 539: {region: 0x9c, script: 0x52, flags: 0x0},
- 540: {region: 0x9a, script: 0x5, flags: 0x0},
- 541: {region: 0xd8, script: 0x52, flags: 0x0},
- 542: {region: 0x4e, script: 0x52, flags: 0x0},
- 543: {region: 0xcf, script: 0x52, flags: 0x0},
- 544: {region: 0xcd, script: 0x52, flags: 0x0},
- 545: {region: 0xc1, script: 0x52, flags: 0x0},
- 546: {region: 0x4b, script: 0x52, flags: 0x0},
- 547: {region: 0x94, script: 0x72, flags: 0x0},
- 548: {region: 0xb4, script: 0x52, flags: 0x0},
- 550: {region: 0xb8, script: 0xd2, flags: 0x0},
- 551: {region: 0xc2, script: 0x6b, flags: 0x0},
- 552: {region: 0xb1, script: 0xc1, flags: 0x0},
- 553: {region: 0x6e, script: 0x52, flags: 0x0},
- 554: {region: 0x10f, script: 0x52, flags: 0x0},
- 555: {region: 0xe6, script: 0x5, flags: 0x0},
- 556: {region: 0x10d, script: 0x52, flags: 0x0},
- 557: {region: 0xe7, script: 0x52, flags: 0x0},
- 558: {region: 0x93, script: 0x52, flags: 0x0},
- 559: {region: 0x13f, script: 0x52, flags: 0x0},
- 560: {region: 0x10a, script: 0x52, flags: 0x0},
- 562: {region: 0x10a, script: 0x52, flags: 0x0},
- 563: {region: 0x70, script: 0x52, flags: 0x0},
- 564: {region: 0x95, script: 0xb8, flags: 0x0},
- 565: {region: 0x70, script: 0x52, flags: 0x0},
- 566: {region: 0x161, script: 0x52, flags: 0x0},
- 567: {region: 0xc1, script: 0x52, flags: 0x0},
- 568: {region: 0x113, script: 0x52, flags: 0x0},
- 569: {region: 0x121, script: 0xd5, flags: 0x0},
- 570: {region: 0x26, script: 0x52, flags: 0x0},
- 571: {region: 0x39, script: 0x5, flags: 0x1},
- 572: {region: 0x97, script: 0xc2, flags: 0x0},
- 573: {region: 0x114, script: 0x52, flags: 0x0},
- 574: {region: 0x112, script: 0x52, flags: 0x0},
- 575: {region: 0x97, script: 0x20, flags: 0x0},
- 576: {region: 0x15e, script: 0x52, flags: 0x0},
- 577: {region: 0x6c, script: 0x52, flags: 0x0},
- 578: {region: 0x15e, script: 0x52, flags: 0x0},
- 579: {region: 0x5f, script: 0x52, flags: 0x0},
- 580: {region: 0x93, script: 0x52, flags: 0x0},
- 581: {region: 0x12d, script: 0x52, flags: 0x0},
- 582: {region: 0x82, script: 0x52, flags: 0x0},
- 583: {region: 0x10a, script: 0x52, flags: 0x0},
- 584: {region: 0x12d, script: 0x52, flags: 0x0},
- 585: {region: 0x15c, script: 0x5, flags: 0x0},
- 586: {region: 0x4a, script: 0x52, flags: 0x0},
- 587: {region: 0x5f, script: 0x52, flags: 0x0},
- 588: {region: 0x97, script: 0x20, flags: 0x0},
- 589: {region: 0x93, script: 0x52, flags: 0x0},
- 590: {region: 0x34, script: 0xe, flags: 0x0},
- 591: {region: 0x99, script: 0xc5, flags: 0x0},
- 592: {region: 0xe7, script: 0x52, flags: 0x0},
- 593: {region: 0x97, script: 0xcd, flags: 0x0},
- 594: {region: 0xd9, script: 0x20, flags: 0x0},
- 595: {region: 0xe5, script: 0x52, flags: 0x0},
- 596: {region: 0x97, script: 0x4a, flags: 0x0},
- 597: {region: 0x52, script: 0xcb, flags: 0x0},
- 598: {region: 0xd9, script: 0x20, flags: 0x0},
- 599: {region: 0xd9, script: 0x20, flags: 0x0},
- 600: {region: 0x97, script: 0xd0, flags: 0x0},
- 601: {region: 0x110, script: 0x52, flags: 0x0},
- 602: {region: 0x12f, script: 0x52, flags: 0x0},
- 603: {region: 0x124, script: 0x52, flags: 0x0},
- 604: {region: 0x3e, script: 0x3, flags: 0x1},
- 605: {region: 0x121, script: 0xd5, flags: 0x0},
- 606: {region: 0xd9, script: 0x20, flags: 0x0},
- 607: {region: 0xd9, script: 0x20, flags: 0x0},
- 608: {region: 0xd9, script: 0x20, flags: 0x0},
- 609: {region: 0x6e, script: 0x27, flags: 0x0},
- 610: {region: 0x6c, script: 0x27, flags: 0x0},
- 611: {region: 0xd4, script: 0x52, flags: 0x0},
- 612: {region: 0x125, script: 0x52, flags: 0x0},
- 613: {region: 0x123, script: 0x52, flags: 0x0},
- 614: {region: 0x31, script: 0x52, flags: 0x0},
- 615: {region: 0xd9, script: 0x20, flags: 0x0},
- 616: {region: 0xe5, script: 0x52, flags: 0x0},
- 617: {region: 0x31, script: 0x52, flags: 0x0},
- 618: {region: 0xd2, script: 0x52, flags: 0x0},
- 619: {region: 0x15e, script: 0x52, flags: 0x0},
- 620: {region: 0x127, script: 0x52, flags: 0x0},
- 621: {region: 0xcc, script: 0x52, flags: 0x0},
- 622: {region: 0xe4, script: 0x52, flags: 0x0},
- 623: {region: 0x129, script: 0x52, flags: 0x0},
- 624: {region: 0x129, script: 0x52, flags: 0x0},
- 625: {region: 0x12c, script: 0x52, flags: 0x0},
- 626: {region: 0x15e, script: 0x52, flags: 0x0},
- 627: {region: 0x85, script: 0x2d, flags: 0x0},
- 628: {region: 0xd9, script: 0x20, flags: 0x0},
- 629: {region: 0xe5, script: 0x52, flags: 0x0},
- 630: {region: 0x42, script: 0xd6, flags: 0x0},
- 631: {region: 0x104, script: 0x1e, flags: 0x0},
- 632: {region: 0x12f, script: 0x52, flags: 0x0},
- 633: {region: 0x121, script: 0xd5, flags: 0x0},
- 634: {region: 0x31, script: 0x52, flags: 0x0},
- 635: {region: 0xcc, script: 0x52, flags: 0x0},
- 636: {region: 0x12b, script: 0x52, flags: 0x0},
- 638: {region: 0xd2, script: 0x52, flags: 0x0},
- 639: {region: 0x52, script: 0xce, flags: 0x0},
- 640: {region: 0xe3, script: 0x52, flags: 0x0},
- 641: {region: 0x104, script: 0x1e, flags: 0x0},
- 642: {region: 0xb8, script: 0x52, flags: 0x0},
- 643: {region: 0x104, script: 0x1e, flags: 0x0},
- 644: {region: 0x41, script: 0x4, flags: 0x1},
- 645: {region: 0x11a, script: 0xd8, flags: 0x0},
- 646: {region: 0x12e, script: 0x1e, flags: 0x0},
- 647: {region: 0x73, script: 0x52, flags: 0x0},
- 648: {region: 0x29, script: 0x52, flags: 0x0},
- 650: {region: 0x45, script: 0x3, flags: 0x1},
- 651: {region: 0x97, script: 0xe, flags: 0x0},
- 652: {region: 0xe6, script: 0x5, flags: 0x0},
- 653: {region: 0x48, script: 0x4, flags: 0x1},
- 654: {region: 0xb2, script: 0xd9, flags: 0x0},
- 655: {region: 0x15e, script: 0x52, flags: 0x0},
- 656: {region: 0x9c, script: 0x52, flags: 0x0},
- 657: {region: 0x104, script: 0x52, flags: 0x0},
- 658: {region: 0x13b, script: 0x52, flags: 0x0},
- 659: {region: 0x119, script: 0x52, flags: 0x0},
- 660: {region: 0x35, script: 0x52, flags: 0x0},
- 661: {region: 0x5f, script: 0x52, flags: 0x0},
- 662: {region: 0xcf, script: 0x52, flags: 0x0},
- 663: {region: 0x1, script: 0x52, flags: 0x0},
- 664: {region: 0x104, script: 0x52, flags: 0x0},
- 665: {region: 0x69, script: 0x52, flags: 0x0},
- 666: {region: 0x12d, script: 0x52, flags: 0x0},
- 667: {region: 0x35, script: 0x52, flags: 0x0},
- 668: {region: 0x4d, script: 0x52, flags: 0x0},
- 669: {region: 0x6e, script: 0x27, flags: 0x0},
- 670: {region: 0xe5, script: 0x52, flags: 0x0},
- 671: {region: 0x2e, script: 0x52, flags: 0x0},
- 672: {region: 0x97, script: 0xd0, flags: 0x0},
- 673: {region: 0x97, script: 0x20, flags: 0x0},
- 674: {region: 0x13d, script: 0x52, flags: 0x0},
- 675: {region: 0xa6, script: 0x5, flags: 0x0},
- 676: {region: 0x112, script: 0x52, flags: 0x0},
- 677: {region: 0x97, script: 0x20, flags: 0x0},
- 678: {region: 0x52, script: 0x34, flags: 0x0},
- 679: {region: 0x40, script: 0x52, flags: 0x0},
- 680: {region: 0x129, script: 0x18, flags: 0x0},
- 681: {region: 0x15e, script: 0x52, flags: 0x0},
- 682: {region: 0x129, script: 0x5a, flags: 0x0},
- 683: {region: 0x129, script: 0x5b, flags: 0x0},
- 684: {region: 0x7b, script: 0x29, flags: 0x0},
- 685: {region: 0x52, script: 0x5e, flags: 0x0},
- 686: {region: 0x109, script: 0x62, flags: 0x0},
- 687: {region: 0x106, script: 0x6c, flags: 0x0},
- 688: {region: 0x97, script: 0x20, flags: 0x0},
- 689: {region: 0x12f, script: 0x52, flags: 0x0},
- 690: {region: 0x9a, script: 0x82, flags: 0x0},
- 691: {region: 0x15b, script: 0xba, flags: 0x0},
- 692: {region: 0xd9, script: 0x20, flags: 0x0},
- 693: {region: 0xcf, script: 0x52, flags: 0x0},
- 694: {region: 0x73, script: 0x52, flags: 0x0},
- 695: {region: 0x51, script: 0x52, flags: 0x0},
- 696: {region: 0x51, script: 0x52, flags: 0x0},
- 697: {region: 0x1, script: 0x37, flags: 0x0},
- 698: {region: 0xd4, script: 0x52, flags: 0x0},
- 699: {region: 0x40, script: 0x52, flags: 0x0},
- 700: {region: 0xcd, script: 0x52, flags: 0x0},
- 701: {region: 0x4c, script: 0x3, flags: 0x1},
- 702: {region: 0x52, script: 0x52, flags: 0x0},
- 703: {region: 0x109, script: 0x52, flags: 0x0},
- 705: {region: 0xa6, script: 0x5, flags: 0x0},
- 706: {region: 0xd7, script: 0x52, flags: 0x0},
- 707: {region: 0xb8, script: 0xd2, flags: 0x0},
- 708: {region: 0x4f, script: 0x14, flags: 0x1},
- 709: {region: 0xce, script: 0x52, flags: 0x0},
- 710: {region: 0x15e, script: 0x52, flags: 0x0},
- 712: {region: 0x129, script: 0x52, flags: 0x0},
-}
-
-// likelyLangList holds lists info associated with likelyLang.
-// Size: 396 bytes, 99 elements
-var likelyLangList = [99]likelyScriptRegion{
- 0: {region: 0x9a, script: 0x7, flags: 0x0},
- 1: {region: 0x9f, script: 0x6d, flags: 0x2},
- 2: {region: 0x11a, script: 0x78, flags: 0x2},
- 3: {region: 0x31, script: 0x52, flags: 0x0},
- 4: {region: 0x99, script: 0x5, flags: 0x4},
- 5: {region: 0x9a, script: 0x5, flags: 0x4},
- 6: {region: 0x104, script: 0x1e, flags: 0x4},
- 7: {region: 0x9a, script: 0x5, flags: 0x2},
- 8: {region: 0x97, script: 0xe, flags: 0x0},
- 9: {region: 0x34, script: 0x16, flags: 0x2},
- 10: {region: 0x104, script: 0x1e, flags: 0x0},
- 11: {region: 0x37, script: 0x2a, flags: 0x2},
- 12: {region: 0x132, script: 0x52, flags: 0x0},
- 13: {region: 0x79, script: 0xbd, flags: 0x2},
- 14: {region: 0x112, script: 0x52, flags: 0x0},
- 15: {region: 0x82, script: 0x1, flags: 0x2},
- 16: {region: 0x5c, script: 0x1d, flags: 0x0},
- 17: {region: 0x85, script: 0x57, flags: 0x2},
- 18: {region: 0xd4, script: 0x52, flags: 0x0},
- 19: {region: 0x51, script: 0x5, flags: 0x4},
- 20: {region: 0x109, script: 0x5, flags: 0x4},
- 21: {region: 0xac, script: 0x1e, flags: 0x0},
- 22: {region: 0x23, script: 0x5, flags: 0x4},
- 23: {region: 0x52, script: 0x5, flags: 0x4},
- 24: {region: 0x9a, script: 0x5, flags: 0x4},
- 25: {region: 0xc3, script: 0x5, flags: 0x4},
- 26: {region: 0x52, script: 0x5, flags: 0x2},
- 27: {region: 0x129, script: 0x52, flags: 0x0},
- 28: {region: 0xae, script: 0x5, flags: 0x4},
- 29: {region: 0x99, script: 0x5, flags: 0x2},
- 30: {region: 0xa3, script: 0x1e, flags: 0x0},
- 31: {region: 0x52, script: 0x5, flags: 0x4},
- 32: {region: 0x129, script: 0x52, flags: 0x4},
- 33: {region: 0x52, script: 0x5, flags: 0x2},
- 34: {region: 0x129, script: 0x52, flags: 0x2},
- 35: {region: 0xd9, script: 0x20, flags: 0x0},
- 36: {region: 0x97, script: 0x55, flags: 0x2},
- 37: {region: 0x81, script: 0x52, flags: 0x0},
- 38: {region: 0x82, script: 0x70, flags: 0x4},
- 39: {region: 0x82, script: 0x70, flags: 0x2},
- 40: {region: 0xc3, script: 0x1e, flags: 0x0},
- 41: {region: 0x52, script: 0x66, flags: 0x4},
- 42: {region: 0x52, script: 0x66, flags: 0x2},
- 43: {region: 0xce, script: 0x52, flags: 0x0},
- 44: {region: 0x49, script: 0x5, flags: 0x4},
- 45: {region: 0x93, script: 0x5, flags: 0x4},
- 46: {region: 0x97, script: 0x2f, flags: 0x0},
- 47: {region: 0xe6, script: 0x5, flags: 0x4},
- 48: {region: 0xe6, script: 0x5, flags: 0x2},
- 49: {region: 0x9a, script: 0x7c, flags: 0x0},
- 50: {region: 0x52, script: 0x7d, flags: 0x2},
- 51: {region: 0xb8, script: 0xd2, flags: 0x0},
- 52: {region: 0xd7, script: 0x52, flags: 0x4},
- 53: {region: 0xe6, script: 0x5, flags: 0x0},
- 54: {region: 0x97, script: 0x20, flags: 0x2},
- 55: {region: 0x97, script: 0x47, flags: 0x2},
- 56: {region: 0x97, script: 0xc0, flags: 0x2},
- 57: {region: 0x103, script: 0x1e, flags: 0x0},
- 58: {region: 0xbb, script: 0x52, flags: 0x4},
- 59: {region: 0x102, script: 0x52, flags: 0x4},
- 60: {region: 0x104, script: 0x52, flags: 0x4},
- 61: {region: 0x129, script: 0x52, flags: 0x4},
- 62: {region: 0x122, script: 0x1e, flags: 0x0},
- 63: {region: 0xe6, script: 0x5, flags: 0x4},
- 64: {region: 0xe6, script: 0x5, flags: 0x2},
- 65: {region: 0x52, script: 0x5, flags: 0x0},
- 66: {region: 0xac, script: 0x1e, flags: 0x4},
- 67: {region: 0xc3, script: 0x1e, flags: 0x4},
- 68: {region: 0xac, script: 0x1e, flags: 0x2},
- 69: {region: 0x97, script: 0xe, flags: 0x0},
- 70: {region: 0xd9, script: 0x20, flags: 0x4},
- 71: {region: 0xd9, script: 0x20, flags: 0x2},
- 72: {region: 0x134, script: 0x52, flags: 0x0},
- 73: {region: 0x23, script: 0x5, flags: 0x4},
- 74: {region: 0x52, script: 0x1e, flags: 0x4},
- 75: {region: 0x23, script: 0x5, flags: 0x2},
- 76: {region: 0x8b, script: 0x35, flags: 0x0},
- 77: {region: 0x52, script: 0x34, flags: 0x4},
- 78: {region: 0x52, script: 0x34, flags: 0x2},
- 79: {region: 0x52, script: 0x34, flags: 0x0},
- 80: {region: 0x2e, script: 0x35, flags: 0x4},
- 81: {region: 0x3d, script: 0x35, flags: 0x4},
- 82: {region: 0x79, script: 0x35, flags: 0x4},
- 83: {region: 0x7c, script: 0x35, flags: 0x4},
- 84: {region: 0x8b, script: 0x35, flags: 0x4},
- 85: {region: 0x93, script: 0x35, flags: 0x4},
- 86: {region: 0xc4, script: 0x35, flags: 0x4},
- 87: {region: 0xce, script: 0x35, flags: 0x4},
- 88: {region: 0xe0, script: 0x35, flags: 0x4},
- 89: {region: 0xe3, script: 0x35, flags: 0x4},
- 90: {region: 0xe5, script: 0x35, flags: 0x4},
- 91: {region: 0x114, script: 0x35, flags: 0x4},
- 92: {region: 0x121, script: 0x35, flags: 0x4},
- 93: {region: 0x12c, script: 0x35, flags: 0x4},
- 94: {region: 0x132, script: 0x35, flags: 0x4},
- 95: {region: 0x13b, script: 0x35, flags: 0x4},
- 96: {region: 0x12c, script: 0x11, flags: 0x2},
- 97: {region: 0x12c, script: 0x30, flags: 0x2},
- 98: {region: 0x12c, script: 0x35, flags: 0x2},
-}
-
-type likelyLangScript struct {
- lang uint16
- script uint8
- flags uint8
-}
-
-// likelyRegion is a lookup table, indexed by regionID, for the most likely
-// languages and scripts given incomplete information. If more entries exist
-// for a given regionID, lang and script are the index and size respectively
-// of the list in likelyRegionList.
-// TODO: exclude containers and user-definable regions from the list.
-// Size: 1420 bytes, 355 elements
-var likelyRegion = [355]likelyLangScript{
- 33: {lang: 0x61, script: 0x52, flags: 0x0},
- 34: {lang: 0x15, script: 0x5, flags: 0x0},
- 35: {lang: 0x0, script: 0x2, flags: 0x1},
- 38: {lang: 0x2, script: 0x2, flags: 0x1},
- 39: {lang: 0x4, script: 0x2, flags: 0x1},
- 41: {lang: 0x1ef, script: 0x52, flags: 0x0},
- 42: {lang: 0x0, script: 0x52, flags: 0x0},
- 43: {lang: 0x9d, script: 0x52, flags: 0x0},
- 44: {lang: 0x22f, script: 0x52, flags: 0x0},
- 45: {lang: 0x85, script: 0x52, flags: 0x0},
- 47: {lang: 0x1bd, script: 0x52, flags: 0x0},
- 48: {lang: 0x247, script: 0x52, flags: 0x0},
- 49: {lang: 0x24, script: 0x52, flags: 0x0},
- 50: {lang: 0x6, script: 0x2, flags: 0x1},
- 52: {lang: 0x4b, script: 0xe, flags: 0x0},
- 53: {lang: 0x1bd, script: 0x52, flags: 0x0},
- 54: {lang: 0xaf, script: 0x52, flags: 0x0},
- 55: {lang: 0x38, script: 0x1e, flags: 0x0},
- 56: {lang: 0x15, script: 0x5, flags: 0x0},
- 57: {lang: 0x201, script: 0x52, flags: 0x0},
- 58: {lang: 0xaf, script: 0x52, flags: 0x0},
- 59: {lang: 0xaf, script: 0x52, flags: 0x0},
- 61: {lang: 0x19a, script: 0x52, flags: 0x0},
- 62: {lang: 0x9d, script: 0x52, flags: 0x0},
- 63: {lang: 0x1db, script: 0x52, flags: 0x0},
- 64: {lang: 0x1ef, script: 0x52, flags: 0x0},
- 66: {lang: 0x8, script: 0x2, flags: 0x1},
- 68: {lang: 0x0, script: 0x52, flags: 0x0},
- 70: {lang: 0x2f, script: 0x1e, flags: 0x0},
- 72: {lang: 0x2b9, script: 0x37, flags: 0x2},
- 73: {lang: 0x19a, script: 0x5, flags: 0x2},
- 74: {lang: 0x248, script: 0x52, flags: 0x0},
- 75: {lang: 0xaf, script: 0x52, flags: 0x0},
- 76: {lang: 0xaf, script: 0x52, flags: 0x0},
- 77: {lang: 0x85, script: 0x52, flags: 0x0},
- 78: {lang: 0xaf, script: 0x52, flags: 0x0},
- 80: {lang: 0x9d, script: 0x52, flags: 0x0},
- 81: {lang: 0xaf, script: 0x52, flags: 0x0},
- 82: {lang: 0xa, script: 0x5, flags: 0x1},
- 83: {lang: 0x9d, script: 0x52, flags: 0x0},
- 84: {lang: 0x0, script: 0x52, flags: 0x0},
- 85: {lang: 0x9d, script: 0x52, flags: 0x0},
- 88: {lang: 0x9d, script: 0x52, flags: 0x0},
- 89: {lang: 0x1ef, script: 0x52, flags: 0x0},
- 90: {lang: 0x1db, script: 0x52, flags: 0x0},
- 92: {lang: 0xf, script: 0x2, flags: 0x1},
- 93: {lang: 0x79, script: 0x52, flags: 0x0},
- 95: {lang: 0x85, script: 0x52, flags: 0x0},
- 97: {lang: 0x1, script: 0x52, flags: 0x0},
- 98: {lang: 0x80, script: 0x52, flags: 0x0},
- 100: {lang: 0x9d, script: 0x52, flags: 0x0},
- 102: {lang: 0x11, script: 0x2, flags: 0x1},
- 103: {lang: 0x9d, script: 0x52, flags: 0x0},
- 104: {lang: 0x9d, script: 0x52, flags: 0x0},
- 105: {lang: 0x9f, script: 0x52, flags: 0x0},
- 106: {lang: 0x15, script: 0x5, flags: 0x0},
- 107: {lang: 0x15, script: 0x5, flags: 0x0},
- 108: {lang: 0x261, script: 0x27, flags: 0x0},
- 109: {lang: 0x9d, script: 0x52, flags: 0x0},
- 110: {lang: 0x13, script: 0x2, flags: 0x1},
- 112: {lang: 0xa8, script: 0x52, flags: 0x0},
- 113: {lang: 0xe2, script: 0x20, flags: 0x2},
- 116: {lang: 0xad, script: 0x52, flags: 0x0},
- 118: {lang: 0xaf, script: 0x52, flags: 0x0},
- 120: {lang: 0xaf, script: 0x52, flags: 0x0},
- 121: {lang: 0x15, script: 0x2, flags: 0x1},
- 123: {lang: 0x17, script: 0x3, flags: 0x1},
- 124: {lang: 0xaf, script: 0x52, flags: 0x0},
- 126: {lang: 0xd, script: 0x52, flags: 0x0},
- 128: {lang: 0x131, script: 0x52, flags: 0x0},
- 130: {lang: 0xaf, script: 0x52, flags: 0x0},
- 131: {lang: 0xaf, script: 0x52, flags: 0x0},
- 132: {lang: 0x9d, script: 0x52, flags: 0x0},
- 133: {lang: 0x1a, script: 0x2, flags: 0x1},
- 134: {lang: 0x0, script: 0x52, flags: 0x0},
- 135: {lang: 0x9d, script: 0x52, flags: 0x0},
- 137: {lang: 0x1ef, script: 0x52, flags: 0x0},
- 139: {lang: 0x2c4, script: 0x35, flags: 0x0},
- 140: {lang: 0x0, script: 0x52, flags: 0x0},
- 141: {lang: 0x9d, script: 0x52, flags: 0x0},
- 142: {lang: 0xee, script: 0x52, flags: 0x0},
- 143: {lang: 0xf1, script: 0x52, flags: 0x0},
- 144: {lang: 0xf2, script: 0x52, flags: 0x0},
- 146: {lang: 0x9d, script: 0x52, flags: 0x0},
- 147: {lang: 0x1c, script: 0x2, flags: 0x1},
- 149: {lang: 0xe0, script: 0x37, flags: 0x0},
- 151: {lang: 0x1e, script: 0x3, flags: 0x1},
- 153: {lang: 0x15, script: 0x5, flags: 0x0},
- 154: {lang: 0x21, script: 0x2, flags: 0x1},
- 155: {lang: 0x102, script: 0x52, flags: 0x0},
- 156: {lang: 0x103, script: 0x52, flags: 0x0},
- 159: {lang: 0x15, script: 0x5, flags: 0x0},
- 160: {lang: 0x107, script: 0x41, flags: 0x0},
- 162: {lang: 0x248, script: 0x52, flags: 0x0},
- 163: {lang: 0x14d, script: 0x1e, flags: 0x0},
- 164: {lang: 0x23, script: 0x3, flags: 0x1},
- 166: {lang: 0x26, script: 0x2, flags: 0x1},
- 168: {lang: 0x136, script: 0x4b, flags: 0x0},
- 169: {lang: 0x136, script: 0x4b, flags: 0x0},
- 170: {lang: 0x15, script: 0x5, flags: 0x0},
- 172: {lang: 0x207, script: 0x1e, flags: 0x0},
- 173: {lang: 0x28, script: 0x2, flags: 0x1},
- 174: {lang: 0x15, script: 0x5, flags: 0x0},
- 176: {lang: 0x85, script: 0x52, flags: 0x0},
- 177: {lang: 0x228, script: 0xc1, flags: 0x0},
- 179: {lang: 0x242, script: 0x52, flags: 0x0},
- 180: {lang: 0x169, script: 0x52, flags: 0x0},
- 181: {lang: 0xaf, script: 0x52, flags: 0x0},
- 182: {lang: 0x170, script: 0x52, flags: 0x0},
- 183: {lang: 0x15, script: 0x5, flags: 0x0},
- 184: {lang: 0x2a, script: 0x2, flags: 0x1},
- 185: {lang: 0xaf, script: 0x52, flags: 0x0},
- 186: {lang: 0x2c, script: 0x2, flags: 0x1},
- 187: {lang: 0x23b, script: 0x52, flags: 0x0},
- 188: {lang: 0xaf, script: 0x52, flags: 0x0},
- 189: {lang: 0x183, script: 0x52, flags: 0x0},
- 192: {lang: 0x2e, script: 0x2, flags: 0x1},
- 193: {lang: 0x49, script: 0x52, flags: 0x0},
- 194: {lang: 0x30, script: 0x2, flags: 0x1},
- 195: {lang: 0x32, script: 0x2, flags: 0x1},
- 196: {lang: 0x34, script: 0x2, flags: 0x1},
- 198: {lang: 0xaf, script: 0x52, flags: 0x0},
- 199: {lang: 0x36, script: 0x2, flags: 0x1},
- 201: {lang: 0x19b, script: 0x52, flags: 0x0},
- 202: {lang: 0x38, script: 0x3, flags: 0x1},
- 203: {lang: 0x90, script: 0xd4, flags: 0x0},
- 205: {lang: 0x9d, script: 0x52, flags: 0x0},
- 206: {lang: 0x19a, script: 0x52, flags: 0x0},
- 207: {lang: 0x1ef, script: 0x52, flags: 0x0},
- 208: {lang: 0xa, script: 0x52, flags: 0x0},
- 209: {lang: 0xaf, script: 0x52, flags: 0x0},
- 210: {lang: 0xdc, script: 0x52, flags: 0x0},
- 212: {lang: 0xdc, script: 0x5, flags: 0x2},
- 214: {lang: 0x9d, script: 0x52, flags: 0x0},
- 215: {lang: 0x1bd, script: 0x52, flags: 0x0},
- 216: {lang: 0x1af, script: 0x52, flags: 0x0},
- 217: {lang: 0x1b4, script: 0x20, flags: 0x0},
- 223: {lang: 0x15, script: 0x5, flags: 0x0},
- 224: {lang: 0x9d, script: 0x52, flags: 0x0},
- 226: {lang: 0x9d, script: 0x52, flags: 0x0},
- 227: {lang: 0xaf, script: 0x52, flags: 0x0},
- 228: {lang: 0x26e, script: 0x52, flags: 0x0},
- 229: {lang: 0xaa, script: 0x52, flags: 0x0},
- 230: {lang: 0x3b, script: 0x3, flags: 0x1},
- 231: {lang: 0x3e, script: 0x2, flags: 0x1},
- 232: {lang: 0xaf, script: 0x52, flags: 0x0},
- 234: {lang: 0x9d, script: 0x52, flags: 0x0},
- 235: {lang: 0x15, script: 0x5, flags: 0x0},
- 236: {lang: 0x1ef, script: 0x52, flags: 0x0},
- 238: {lang: 0x1dc, script: 0x52, flags: 0x0},
- 239: {lang: 0xca, script: 0x52, flags: 0x0},
- 241: {lang: 0x15, script: 0x5, flags: 0x0},
- 256: {lang: 0xaf, script: 0x52, flags: 0x0},
- 258: {lang: 0x40, script: 0x2, flags: 0x1},
- 259: {lang: 0x23b, script: 0x1e, flags: 0x0},
- 260: {lang: 0x42, script: 0x2, flags: 0x1},
- 261: {lang: 0x20a, script: 0x52, flags: 0x0},
- 262: {lang: 0x15, script: 0x5, flags: 0x0},
- 264: {lang: 0xaf, script: 0x52, flags: 0x0},
- 265: {lang: 0x15, script: 0x5, flags: 0x0},
- 266: {lang: 0x44, script: 0x2, flags: 0x1},
- 269: {lang: 0x22c, script: 0x52, flags: 0x0},
- 270: {lang: 0x1af, script: 0x52, flags: 0x0},
- 271: {lang: 0x46, script: 0x2, flags: 0x1},
- 273: {lang: 0x103, script: 0x52, flags: 0x0},
- 274: {lang: 0xaf, script: 0x52, flags: 0x0},
- 275: {lang: 0x238, script: 0x52, flags: 0x0},
- 276: {lang: 0x1bd, script: 0x52, flags: 0x0},
- 278: {lang: 0x1ef, script: 0x52, flags: 0x0},
- 280: {lang: 0x9d, script: 0x52, flags: 0x0},
- 282: {lang: 0x48, script: 0x2, flags: 0x1},
- 286: {lang: 0xaf, script: 0x52, flags: 0x0},
- 287: {lang: 0xaf, script: 0x52, flags: 0x0},
- 288: {lang: 0xaf, script: 0x52, flags: 0x0},
- 289: {lang: 0x4a, script: 0x3, flags: 0x1},
- 290: {lang: 0x4d, script: 0x2, flags: 0x1},
- 291: {lang: 0x265, script: 0x52, flags: 0x0},
- 292: {lang: 0x1ef, script: 0x52, flags: 0x0},
- 293: {lang: 0x264, script: 0x52, flags: 0x0},
- 294: {lang: 0x4f, script: 0x2, flags: 0x1},
- 295: {lang: 0x26c, script: 0x52, flags: 0x0},
- 297: {lang: 0x51, script: 0x4, flags: 0x1},
- 299: {lang: 0x27c, script: 0x52, flags: 0x0},
- 300: {lang: 0x55, script: 0x2, flags: 0x1},
- 301: {lang: 0x248, script: 0x52, flags: 0x0},
- 302: {lang: 0x57, script: 0x3, flags: 0x1},
- 303: {lang: 0x248, script: 0x52, flags: 0x0},
- 306: {lang: 0x2b9, script: 0x37, flags: 0x2},
- 307: {lang: 0x9d, script: 0x52, flags: 0x0},
- 308: {lang: 0x28d, script: 0x52, flags: 0x0},
- 309: {lang: 0x103, script: 0x52, flags: 0x0},
- 312: {lang: 0x9d, script: 0x52, flags: 0x0},
- 315: {lang: 0x292, script: 0x52, flags: 0x0},
- 316: {lang: 0x41, script: 0x52, flags: 0x0},
- 317: {lang: 0xaf, script: 0x52, flags: 0x0},
- 319: {lang: 0x22f, script: 0x52, flags: 0x0},
- 330: {lang: 0x5a, script: 0x2, flags: 0x1},
- 347: {lang: 0x15, script: 0x5, flags: 0x0},
- 348: {lang: 0x5c, script: 0x2, flags: 0x1},
- 353: {lang: 0x236, script: 0x52, flags: 0x0},
-}
-
-// likelyRegionList holds lists info associated with likelyRegion.
-// Size: 376 bytes, 94 elements
-var likelyRegionList = [94]likelyLangScript{
- 0: {lang: 0xa4, script: 0x5, flags: 0x0},
- 1: {lang: 0x264, script: 0x52, flags: 0x0},
- 2: {lang: 0x23a, script: 0x52, flags: 0x0},
- 3: {lang: 0x18c, script: 0x1e, flags: 0x0},
- 4: {lang: 0xf3, script: 0x8, flags: 0x0},
- 5: {lang: 0x145, script: 0x52, flags: 0x0},
- 6: {lang: 0x54, script: 0x52, flags: 0x0},
- 7: {lang: 0x23b, script: 0x1e, flags: 0x0},
- 8: {lang: 0x93, script: 0xd6, flags: 0x0},
- 9: {lang: 0x1b4, script: 0x20, flags: 0x0},
- 10: {lang: 0x2c4, script: 0x34, flags: 0x0},
- 11: {lang: 0x284, script: 0x5, flags: 0x0},
- 12: {lang: 0x2bd, script: 0x35, flags: 0x0},
- 13: {lang: 0x2be, script: 0x52, flags: 0x0},
- 14: {lang: 0x157, script: 0xd5, flags: 0x0},
- 15: {lang: 0x9a, script: 0x2d, flags: 0x0},
- 16: {lang: 0x26f, script: 0x52, flags: 0x0},
- 17: {lang: 0x15, script: 0x5, flags: 0x0},
- 18: {lang: 0xaf, script: 0x52, flags: 0x0},
- 19: {lang: 0x11, script: 0x27, flags: 0x0},
- 20: {lang: 0x9b, script: 0x52, flags: 0x0},
- 21: {lang: 0x141, script: 0x5, flags: 0x2},
- 22: {lang: 0x2b9, script: 0x37, flags: 0x2},
- 23: {lang: 0x111, script: 0x29, flags: 0x0},
- 24: {lang: 0x2, script: 0x1e, flags: 0x0},
- 25: {lang: 0x145, script: 0x52, flags: 0x0},
- 26: {lang: 0x9a, script: 0x2d, flags: 0x0},
- 27: {lang: 0x18c, script: 0x1e, flags: 0x0},
- 28: {lang: 0xf8, script: 0x52, flags: 0x0},
- 29: {lang: 0x19a, script: 0x5, flags: 0x0},
- 30: {lang: 0xe1, script: 0x20, flags: 0x0},
- 31: {lang: 0x28c, script: 0x5, flags: 0x0},
- 32: {lang: 0x129, script: 0x6b, flags: 0x0},
- 33: {lang: 0xa4, script: 0x5, flags: 0x0},
- 34: {lang: 0x264, script: 0x52, flags: 0x0},
- 35: {lang: 0x133, script: 0x46, flags: 0x0},
- 36: {lang: 0x6d, script: 0x5, flags: 0x0},
- 37: {lang: 0x11c, script: 0xd5, flags: 0x0},
- 38: {lang: 0x15, script: 0x5, flags: 0x0},
- 39: {lang: 0xaf, script: 0x52, flags: 0x0},
- 40: {lang: 0x165, script: 0x4f, flags: 0x0},
- 41: {lang: 0x11c, script: 0xd5, flags: 0x0},
- 42: {lang: 0x15, script: 0x5, flags: 0x0},
- 43: {lang: 0xaf, script: 0x52, flags: 0x0},
- 44: {lang: 0x203, script: 0x52, flags: 0x0},
- 45: {lang: 0x286, script: 0x1e, flags: 0x0},
- 46: {lang: 0x18c, script: 0x1e, flags: 0x0},
- 47: {lang: 0x23a, script: 0x52, flags: 0x0},
- 48: {lang: 0x1a5, script: 0x6b, flags: 0x0},
- 49: {lang: 0x114, script: 0x52, flags: 0x0},
- 50: {lang: 0x18f, script: 0x1e, flags: 0x0},
- 51: {lang: 0x12f, script: 0x5, flags: 0x0},
- 52: {lang: 0x2c4, script: 0x35, flags: 0x0},
- 53: {lang: 0x1ef, script: 0x52, flags: 0x0},
- 54: {lang: 0x15, script: 0x5, flags: 0x0},
- 55: {lang: 0xaf, script: 0x52, flags: 0x0},
- 56: {lang: 0x182, script: 0x52, flags: 0x0},
- 57: {lang: 0x28c, script: 0x5, flags: 0x0},
- 58: {lang: 0x40, script: 0x20, flags: 0x0},
- 59: {lang: 0x28c, script: 0x5, flags: 0x0},
- 60: {lang: 0x28c, script: 0x5, flags: 0x0},
- 61: {lang: 0x58, script: 0x20, flags: 0x0},
- 62: {lang: 0x1e7, script: 0x52, flags: 0x0},
- 63: {lang: 0x2f, script: 0x1e, flags: 0x0},
- 64: {lang: 0x203, script: 0x52, flags: 0x0},
- 65: {lang: 0x38, script: 0x1e, flags: 0x0},
- 66: {lang: 0x207, script: 0x1e, flags: 0x0},
- 67: {lang: 0x13f, script: 0x52, flags: 0x0},
- 68: {lang: 0x247, script: 0x52, flags: 0x0},
- 69: {lang: 0x2b9, script: 0x37, flags: 0x0},
- 70: {lang: 0x22a, script: 0x52, flags: 0x0},
- 71: {lang: 0x286, script: 0x1e, flags: 0x0},
- 72: {lang: 0x15, script: 0x5, flags: 0x0},
- 73: {lang: 0xaf, script: 0x52, flags: 0x0},
- 74: {lang: 0x25d, script: 0xd5, flags: 0x0},
- 75: {lang: 0x181, script: 0x5, flags: 0x0},
- 76: {lang: 0x191, script: 0x6b, flags: 0x0},
- 77: {lang: 0x25c, script: 0x1e, flags: 0x0},
- 78: {lang: 0xa4, script: 0x5, flags: 0x0},
- 79: {lang: 0x15, script: 0x5, flags: 0x0},
- 80: {lang: 0xaf, script: 0x52, flags: 0x0},
- 81: {lang: 0x26f, script: 0x52, flags: 0x0},
- 82: {lang: 0x24, script: 0x5, flags: 0x0},
- 83: {lang: 0x118, script: 0x1e, flags: 0x0},
- 84: {lang: 0x3b, script: 0x2d, flags: 0x0},
- 85: {lang: 0x2c4, script: 0x35, flags: 0x0},
- 86: {lang: 0x271, script: 0x52, flags: 0x0},
- 87: {lang: 0x286, script: 0x1e, flags: 0x0},
- 88: {lang: 0x2b9, script: 0x37, flags: 0x0},
- 89: {lang: 0x1e7, script: 0x52, flags: 0x0},
- 90: {lang: 0x23a, script: 0x52, flags: 0x0},
- 91: {lang: 0x23b, script: 0x1e, flags: 0x0},
- 92: {lang: 0xaf, script: 0x52, flags: 0x0},
- 93: {lang: 0x249, script: 0x5, flags: 0x0},
-}
-
-type likelyTag struct {
- lang uint16
- region uint16
- script uint8
-}
-
-// Size: 192 bytes, 32 elements
-var likelyRegionGroup = [32]likelyTag{
- 1: {lang: 0x9b, region: 0xd4, script: 0x52},
- 2: {lang: 0x9b, region: 0x132, script: 0x52},
- 3: {lang: 0x1ef, region: 0x40, script: 0x52},
- 4: {lang: 0x9b, region: 0x2e, script: 0x52},
- 5: {lang: 0x9b, region: 0xd4, script: 0x52},
- 6: {lang: 0x9d, region: 0xcd, script: 0x52},
- 7: {lang: 0x248, region: 0x12d, script: 0x52},
- 8: {lang: 0x15, region: 0x6a, script: 0x5},
- 9: {lang: 0x248, region: 0x4a, script: 0x52},
- 10: {lang: 0x9b, region: 0x15e, script: 0x52},
- 11: {lang: 0x9b, region: 0x132, script: 0x52},
- 12: {lang: 0x9b, region: 0x132, script: 0x52},
- 13: {lang: 0x9d, region: 0x58, script: 0x52},
- 14: {lang: 0x2c4, region: 0x52, script: 0x34},
- 15: {lang: 0xe1, region: 0x97, script: 0x20},
- 16: {lang: 0xf8, region: 0x93, script: 0x52},
- 17: {lang: 0x103, region: 0x9c, script: 0x52},
- 18: {lang: 0x9b, region: 0x2e, script: 0x52},
- 19: {lang: 0x9b, region: 0xe4, script: 0x52},
- 20: {lang: 0x9b, region: 0x88, script: 0x52},
- 21: {lang: 0x22f, region: 0x13f, script: 0x52},
- 22: {lang: 0x2c4, region: 0x52, script: 0x34},
- 23: {lang: 0x28d, region: 0x134, script: 0x52},
- 24: {lang: 0x15, region: 0x106, script: 0x5},
- 25: {lang: 0x207, region: 0x104, script: 0x1e},
- 26: {lang: 0x207, region: 0x104, script: 0x1e},
- 27: {lang: 0x9b, region: 0x79, script: 0x52},
- 28: {lang: 0x85, region: 0x5f, script: 0x52},
- 29: {lang: 0x9d, region: 0x1e, script: 0x52},
- 30: {lang: 0x9b, region: 0x98, script: 0x52},
- 31: {lang: 0x9b, region: 0x79, script: 0x52},
-}
-
-type mutualIntelligibility struct {
- want uint16
- have uint16
- conf uint8
- oneway bool
-}
-
-type scriptIntelligibility struct {
- lang uint16
- want uint8
- have uint8
- conf uint8
-}
-
-// matchLang holds pairs of langIDs of base languages that are typically
-// mutually intelligible. Each pair is associated with a confidence and
-// whether the intelligibility goes one or both ways.
-// Size: 708 bytes, 118 elements
-var matchLang = [118]mutualIntelligibility{
- 0: {want: 0x1c1, have: 0x1af, conf: 0x2, oneway: false},
- 1: {want: 0x145, have: 0x6f, conf: 0x2, oneway: false},
- 2: {want: 0xee, have: 0x54, conf: 0x2, oneway: false},
- 3: {want: 0x225, have: 0x54, conf: 0x2, oneway: false},
- 4: {want: 0x23b, have: 0x54, conf: 0x2, oneway: false},
- 5: {want: 0x225, have: 0xee, conf: 0x2, oneway: false},
- 6: {want: 0x23b, have: 0xee, conf: 0x2, oneway: false},
- 7: {want: 0x225, have: 0x23b, conf: 0x2, oneway: false},
- 8: {want: 0x241, have: 0x1, conf: 0x2, oneway: false},
- 9: {want: 0xd2, have: 0x85, conf: 0x2, oneway: true},
- 10: {want: 0x154, have: 0x85, conf: 0x2, oneway: true},
- 11: {want: 0x80, have: 0x1c1, conf: 0x2, oneway: false},
- 12: {want: 0x80, have: 0x1af, conf: 0x2, oneway: false},
- 13: {want: 0x6f, have: 0x145, conf: 0x2, oneway: false},
- 14: {want: 0x2, have: 0x207, conf: 0x2, oneway: true},
- 15: {want: 0x5, have: 0x9b, conf: 0x2, oneway: true},
- 16: {want: 0xa, have: 0x1bd, conf: 0x2, oneway: true},
- 17: {want: 0xd, have: 0x9b, conf: 0x2, oneway: true},
- 18: {want: 0x23, have: 0x9d, conf: 0x2, oneway: true},
- 19: {want: 0x24, have: 0x207, conf: 0x2, oneway: true},
- 20: {want: 0x2f, have: 0x207, conf: 0x2, oneway: true},
- 21: {want: 0x31, have: 0x9b, conf: 0x2, oneway: true},
- 22: {want: 0x3c, have: 0xe1, conf: 0x2, oneway: true},
- 23: {want: 0x4b, have: 0x9b, conf: 0x2, oneway: true},
- 24: {want: 0x50, have: 0xaf, conf: 0x2, oneway: true},
- 25: {want: 0x65, have: 0xaa, conf: 0x2, oneway: true},
- 26: {want: 0x6c, have: 0x9b, conf: 0x2, oneway: true},
- 27: {want: 0x6f, have: 0x15, conf: 0x2, oneway: true},
- 28: {want: 0x70, have: 0xaf, conf: 0x2, oneway: true},
- 29: {want: 0x78, have: 0xaf, conf: 0x2, oneway: true},
- 30: {want: 0x7f, have: 0x9b, conf: 0x2, oneway: true},
- 31: {want: 0x95, have: 0x9b, conf: 0x2, oneway: true},
- 32: {want: 0x9c, have: 0x9b, conf: 0x2, oneway: true},
- 33: {want: 0x9f, have: 0xa8, conf: 0x2, oneway: true},
- 34: {want: 0xa1, have: 0x9d, conf: 0x2, oneway: true},
- 35: {want: 0xad, have: 0x80, conf: 0x2, oneway: true},
- 36: {want: 0xb9, have: 0x1bd, conf: 0x2, oneway: true},
- 37: {want: 0xba, have: 0x9b, conf: 0x2, oneway: true},
- 38: {want: 0xbb, have: 0x9b, conf: 0x2, oneway: true},
- 39: {want: 0xc2, have: 0x9b, conf: 0x2, oneway: true},
- 40: {want: 0xc8, have: 0x9d, conf: 0x2, oneway: true},
- 41: {want: 0xca, have: 0x9d, conf: 0x2, oneway: true},
- 42: {want: 0xd3, have: 0xe1, conf: 0x2, oneway: true},
- 43: {want: 0xdc, have: 0x9b, conf: 0x2, oneway: true},
- 44: {want: 0xde, have: 0x9b, conf: 0x2, oneway: true},
- 45: {want: 0xf1, have: 0xaf, conf: 0x2, oneway: true},
- 46: {want: 0xf3, have: 0x207, conf: 0x2, oneway: true},
- 47: {want: 0xf5, have: 0x9b, conf: 0x2, oneway: true},
- 48: {want: 0xfa, have: 0x9b, conf: 0x2, oneway: true},
- 49: {want: 0x102, have: 0x9b, conf: 0x2, oneway: true},
- 50: {want: 0x10f, have: 0xf8, conf: 0x2, oneway: true},
- 51: {want: 0x111, have: 0x9b, conf: 0x2, oneway: true},
- 52: {want: 0x122, have: 0xaf, conf: 0x2, oneway: true},
- 53: {want: 0x12f, have: 0x207, conf: 0x2, oneway: true},
- 54: {want: 0x133, have: 0x9b, conf: 0x2, oneway: true},
- 55: {want: 0x135, have: 0x9b, conf: 0x2, oneway: true},
- 56: {want: 0x13d, have: 0x9b, conf: 0x2, oneway: true},
- 57: {want: 0x145, have: 0x26f, conf: 0x2, oneway: true},
- 58: {want: 0x14d, have: 0x207, conf: 0x2, oneway: true},
- 59: {want: 0x14e, have: 0x103, conf: 0x2, oneway: true},
- 60: {want: 0x15a, have: 0x9b, conf: 0x2, oneway: true},
- 61: {want: 0x164, have: 0xaf, conf: 0x2, oneway: true},
- 62: {want: 0x165, have: 0x9b, conf: 0x2, oneway: true},
- 63: {want: 0x167, have: 0x9b, conf: 0x2, oneway: true},
- 64: {want: 0x16c, have: 0xaf, conf: 0x2, oneway: true},
- 65: {want: 0x182, have: 0x9b, conf: 0x2, oneway: true},
- 66: {want: 0x183, have: 0xaf, conf: 0x2, oneway: true},
- 67: {want: 0x189, have: 0x9b, conf: 0x2, oneway: true},
- 68: {want: 0x18c, have: 0x38, conf: 0x2, oneway: true},
- 69: {want: 0x18d, have: 0x9b, conf: 0x2, oneway: true},
- 70: {want: 0x18f, have: 0x207, conf: 0x2, oneway: true},
- 71: {want: 0x196, have: 0xe1, conf: 0x2, oneway: true},
- 72: {want: 0x19a, have: 0xf8, conf: 0x2, oneway: true},
- 73: {want: 0x19b, have: 0x9b, conf: 0x2, oneway: true},
- 74: {want: 0x1a5, have: 0x9b, conf: 0x2, oneway: true},
- 75: {want: 0x1b4, have: 0x9b, conf: 0x2, oneway: true},
- 76: {want: 0x1bf, have: 0x1af, conf: 0x2, oneway: false},
- 77: {want: 0x1bf, have: 0x1c1, conf: 0x2, oneway: true},
- 78: {want: 0x1c8, have: 0x9b, conf: 0x2, oneway: true},
- 79: {want: 0x1cc, have: 0x9b, conf: 0x2, oneway: true},
- 80: {want: 0x1ce, have: 0x9b, conf: 0x2, oneway: true},
- 81: {want: 0x1d0, have: 0xaf, conf: 0x2, oneway: true},
- 82: {want: 0x1d2, have: 0x9b, conf: 0x2, oneway: true},
- 83: {want: 0x1d3, have: 0x9b, conf: 0x2, oneway: true},
- 84: {want: 0x1d7, have: 0x9b, conf: 0x2, oneway: true},
- 85: {want: 0x1de, have: 0x9b, conf: 0x2, oneway: true},
- 86: {want: 0x1ee, have: 0x9b, conf: 0x2, oneway: true},
- 87: {want: 0x1f1, have: 0x9d, conf: 0x2, oneway: true},
- 88: {want: 0x1fc, have: 0x85, conf: 0x2, oneway: true},
- 89: {want: 0x201, have: 0x9b, conf: 0x2, oneway: true},
- 90: {want: 0x20a, have: 0xaf, conf: 0x2, oneway: true},
- 91: {want: 0x20d, have: 0xe1, conf: 0x2, oneway: true},
- 92: {want: 0x21a, have: 0x9b, conf: 0x2, oneway: true},
- 93: {want: 0x228, have: 0x9b, conf: 0x2, oneway: true},
- 94: {want: 0x236, have: 0x9b, conf: 0x2, oneway: true},
- 95: {want: 0x238, have: 0x9b, conf: 0x2, oneway: true},
- 96: {want: 0x23a, have: 0x9b, conf: 0x2, oneway: true},
- 97: {want: 0x242, have: 0x9b, conf: 0x2, oneway: true},
- 98: {want: 0x244, have: 0xf8, conf: 0x2, oneway: true},
- 99: {want: 0x248, have: 0x9b, conf: 0x2, oneway: true},
- 100: {want: 0x251, have: 0x9b, conf: 0x2, oneway: true},
- 101: {want: 0x258, have: 0x9b, conf: 0x2, oneway: true},
- 102: {want: 0x25c, have: 0x207, conf: 0x2, oneway: true},
- 103: {want: 0x261, have: 0x9b, conf: 0x2, oneway: true},
- 104: {want: 0x264, have: 0x207, conf: 0x2, oneway: true},
- 105: {want: 0x361a, have: 0x9b, conf: 0x2, oneway: true},
- 106: {want: 0x26b, have: 0x9b, conf: 0x2, oneway: true},
- 107: {want: 0x26c, have: 0x9b, conf: 0x2, oneway: true},
- 108: {want: 0x277, have: 0x207, conf: 0x2, oneway: true},
- 109: {want: 0x27b, have: 0x9b, conf: 0x2, oneway: true},
- 110: {want: 0x284, have: 0x2c4, conf: 0x2, oneway: true},
- 111: {want: 0x28c, have: 0x9b, conf: 0x2, oneway: true},
- 112: {want: 0x28d, have: 0x207, conf: 0x2, oneway: true},
- 113: {want: 0x2a4, have: 0xaf, conf: 0x2, oneway: true},
- 114: {want: 0x2a9, have: 0x9b, conf: 0x2, oneway: true},
- 115: {want: 0x2b9, have: 0x9b, conf: 0x2, oneway: true},
- 116: {want: 0x2ba, have: 0x9b, conf: 0x2, oneway: true},
- 117: {want: 0x2c6, have: 0x9b, conf: 0x2, oneway: true},
-}
-
-// matchScript holds pairs of scriptIDs where readers of one script
-// can typically also read the other. Each is associated with a confidence.
-// Size: 24 bytes, 4 elements
-var matchScript = [4]scriptIntelligibility{
- 0: {lang: 0x23b, want: 0x52, have: 0x1e, conf: 0x2},
- 1: {lang: 0x23b, want: 0x1e, have: 0x52, conf: 0x2},
- 2: {lang: 0x0, want: 0x34, have: 0x35, conf: 0x1},
- 3: {lang: 0x0, want: 0x35, have: 0x34, conf: 0x1},
-}
-
-// Size: 128 bytes, 32 elements
-var regionContainment = [32]uint32{
- 0xffffffff, 0x000007a2, 0x00003044, 0x00000008,
- 0x403c0010, 0x00000020, 0x00000040, 0x00000080,
- 0x00000100, 0x00000200, 0x00000400, 0x2000384c,
- 0x00001000, 0x00002000, 0x00004000, 0x00008000,
- 0x00010000, 0x00020000, 0x00040000, 0x00080000,
- 0x00100000, 0x00200000, 0x01c1c000, 0x00800000,
- 0x01000000, 0x1e020000, 0x04000000, 0x08000000,
- 0x10000000, 0x20002048, 0x40000000, 0x80000000,
-}
-
-// regionInclusion maps region identifiers to sets of regions in regionInclusionBits,
-// where each set holds all groupings that are directly connected in a region
-// containment graph.
-// Size: 355 bytes, 355 elements
-var regionInclusion = [355]uint8{
- // Entry 0 - 3F
- 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06,
- 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e,
- 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16,
- 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x20,
- 0x21, 0x22, 0x23, 0x24, 0x25, 0x25, 0x22, 0x23,
- 0x25, 0x26, 0x21, 0x27, 0x28, 0x29, 0x2a, 0x25,
- 0x2b, 0x23, 0x22, 0x25, 0x24, 0x29, 0x2c, 0x2d,
- 0x23, 0x2e, 0x2c, 0x25, 0x2f, 0x30, 0x27, 0x25,
- // Entry 40 - 7F
- 0x27, 0x25, 0x24, 0x30, 0x21, 0x31, 0x32, 0x33,
- 0x2f, 0x21, 0x26, 0x26, 0x26, 0x34, 0x2c, 0x28,
- 0x27, 0x26, 0x35, 0x27, 0x21, 0x33, 0x22, 0x20,
- 0x25, 0x2c, 0x25, 0x21, 0x36, 0x2d, 0x34, 0x29,
- 0x21, 0x2e, 0x37, 0x25, 0x25, 0x20, 0x38, 0x38,
- 0x27, 0x37, 0x38, 0x38, 0x2e, 0x39, 0x2e, 0x1f,
- 0x37, 0x3a, 0x27, 0x3b, 0x2b, 0x20, 0x29, 0x34,
- 0x26, 0x37, 0x25, 0x23, 0x27, 0x2b, 0x2c, 0x22,
- // Entry 80 - BF
- 0x2f, 0x2c, 0x2c, 0x25, 0x26, 0x39, 0x21, 0x33,
- 0x3b, 0x2c, 0x27, 0x35, 0x21, 0x33, 0x39, 0x25,
- 0x2d, 0x20, 0x38, 0x30, 0x37, 0x23, 0x2b, 0x24,
- 0x21, 0x23, 0x24, 0x2b, 0x39, 0x2b, 0x25, 0x23,
- 0x35, 0x20, 0x2e, 0x3c, 0x30, 0x3b, 0x2e, 0x25,
- 0x35, 0x35, 0x23, 0x25, 0x3c, 0x30, 0x23, 0x25,
- 0x34, 0x24, 0x2c, 0x31, 0x37, 0x29, 0x37, 0x38,
- 0x38, 0x34, 0x32, 0x22, 0x25, 0x2e, 0x3b, 0x20,
- // Entry C0 - FF
- 0x22, 0x2c, 0x30, 0x35, 0x35, 0x3b, 0x25, 0x2c,
- 0x25, 0x39, 0x2e, 0x24, 0x2e, 0x33, 0x30, 0x2e,
- 0x31, 0x3a, 0x2c, 0x2a, 0x2c, 0x20, 0x33, 0x29,
- 0x2b, 0x24, 0x20, 0x3b, 0x23, 0x28, 0x2a, 0x23,
- 0x33, 0x20, 0x27, 0x28, 0x3a, 0x30, 0x24, 0x2d,
- 0x2f, 0x28, 0x25, 0x23, 0x39, 0x20, 0x3b, 0x27,
- 0x20, 0x23, 0x20, 0x20, 0x1e, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- // Entry 100 - 13F
- 0x2e, 0x20, 0x2d, 0x22, 0x32, 0x2e, 0x23, 0x3a,
- 0x2e, 0x38, 0x37, 0x30, 0x2c, 0x39, 0x2b, 0x2d,
- 0x2c, 0x22, 0x2c, 0x2e, 0x27, 0x2e, 0x26, 0x32,
- 0x33, 0x25, 0x23, 0x31, 0x21, 0x25, 0x26, 0x21,
- 0x2c, 0x30, 0x3c, 0x28, 0x30, 0x3c, 0x38, 0x28,
- 0x30, 0x23, 0x25, 0x28, 0x35, 0x2e, 0x32, 0x2e,
- 0x20, 0x21, 0x2f, 0x27, 0x3c, 0x22, 0x25, 0x20,
- 0x27, 0x25, 0x25, 0x30, 0x3a, 0x28, 0x20, 0x28,
- // Entry 140 - 17F
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x22, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x23, 0x23, 0x2e, 0x22, 0x31, 0x2e,
- 0x26, 0x2e, 0x20,
-}
-
-// regionInclusionBits is an array of bit vectors where every vector represents
-// a set of region groupings. These sets are used to compute the distance
-// between two regions for the purpose of language matching.
-// Size: 288 bytes, 72 elements
-var regionInclusionBits = [72]uint32{
- // Entry 0 - 1F
- 0x82400813, 0x000007a3, 0x00003844, 0x20000808,
- 0x403c0011, 0x00000022, 0x20000844, 0x00000082,
- 0x00000102, 0x00000202, 0x00000402, 0x2000384d,
- 0x00001804, 0x20002804, 0x00404000, 0x00408000,
- 0x00410000, 0x02020000, 0x00040010, 0x00080010,
- 0x00100010, 0x00200010, 0x01c1c001, 0x00c00000,
- 0x01400000, 0x1e020001, 0x06000000, 0x0a000000,
- 0x12000000, 0x20002848, 0x40000010, 0x80000001,
- // Entry 20 - 3F
- 0x00000001, 0x40000000, 0x00020000, 0x01000000,
- 0x00008000, 0x00002000, 0x00000200, 0x00000008,
- 0x00200000, 0x90000000, 0x00040000, 0x08000000,
- 0x00000020, 0x84000000, 0x00000080, 0x00001000,
- 0x00010000, 0x00000400, 0x04000000, 0x00000040,
- 0x10000000, 0x00004000, 0x81000000, 0x88000000,
- 0x00000100, 0x80020000, 0x00080000, 0x00100000,
- 0x00800000, 0xffffffff, 0x82400fb3, 0xc27c0813,
- // Entry 40 - 5F
- 0xa240385f, 0x83c1c813, 0x9e420813, 0x92000001,
- 0x86000001, 0x81400001, 0x8a000001, 0x82020001,
-}
-
-// regionInclusionNext marks, for each entry in regionInclusionBits, the set of
-// all groups that are reachable from the groups set in the respective entry.
-// Size: 72 bytes, 72 elements
-var regionInclusionNext = [72]uint8{
- // Entry 0 - 3F
- 0x3d, 0x3e, 0x0b, 0x0b, 0x3f, 0x01, 0x0b, 0x01,
- 0x01, 0x01, 0x01, 0x40, 0x0b, 0x0b, 0x16, 0x16,
- 0x16, 0x19, 0x04, 0x04, 0x04, 0x04, 0x41, 0x16,
- 0x16, 0x42, 0x19, 0x19, 0x19, 0x0b, 0x04, 0x00,
- 0x00, 0x1e, 0x11, 0x18, 0x0f, 0x0d, 0x09, 0x03,
- 0x15, 0x43, 0x12, 0x1b, 0x05, 0x44, 0x07, 0x0c,
- 0x10, 0x0a, 0x1a, 0x06, 0x1c, 0x0e, 0x45, 0x46,
- 0x08, 0x47, 0x13, 0x14, 0x17, 0x3d, 0x3d, 0x3d,
- // Entry 40 - 7F
- 0x3d, 0x3d, 0x3d, 0x42, 0x42, 0x41, 0x42, 0x42,
-}
-
-type parentRel struct {
- lang uint16
- script uint8
- maxScript uint8
- toRegion uint16
- fromRegion []uint16
-}
-
-// Size: 412 bytes, 5 elements
-var parents = [5]parentRel{
- 0: {lang: 0x9b, script: 0x0, maxScript: 0x52, toRegion: 0x1, fromRegion: []uint16{0x1a, 0x24, 0x25, 0x2e, 0x33, 0x35, 0x3c, 0x41, 0x45, 0x47, 0x48, 0x49, 0x4f, 0x51, 0x5b, 0x5c, 0x60, 0x63, 0x6c, 0x71, 0x72, 0x73, 0x79, 0x7a, 0x7d, 0x7e, 0x7f, 0x81, 0x8a, 0x8b, 0x94, 0x95, 0x96, 0x97, 0x98, 0x9d, 0x9e, 0xa2, 0xa5, 0xa7, 0xab, 0xaf, 0xb2, 0xb3, 0xbd, 0xc4, 0xc8, 0xc9, 0xca, 0xcc, 0xce, 0xd0, 0xd3, 0xd4, 0xdb, 0xdd, 0xde, 0xe4, 0xe5, 0xe6, 0xe9, 0xee, 0x105, 0x107, 0x108, 0x109, 0x10b, 0x10c, 0x110, 0x115, 0x119, 0x11b, 0x11d, 0x123, 0x127, 0x12a, 0x12b, 0x12d, 0x12f, 0x136, 0x139, 0x13c, 0x13f, 0x15e, 0x15f, 0x161}},
- 1: {lang: 0x9b, script: 0x0, maxScript: 0x52, toRegion: 0x1a, fromRegion: []uint16{0x2d, 0x4d, 0x5f, 0x62, 0x70, 0xd7, 0x10a, 0x10d}},
- 2: {lang: 0x9d, script: 0x0, maxScript: 0x52, toRegion: 0x1e, fromRegion: []uint16{0x2b, 0x3e, 0x40, 0x50, 0x53, 0x55, 0x58, 0x64, 0x68, 0x87, 0x8d, 0xcd, 0xd6, 0xe0, 0xe2, 0xea, 0xef, 0x118, 0x132, 0x133, 0x138}},
- 3: {lang: 0x1ef, script: 0x0, maxScript: 0x52, toRegion: 0xec, fromRegion: []uint16{0x29, 0x4d, 0x59, 0x84, 0x89, 0xb5, 0xc4, 0xcf, 0x116, 0x124}},
- 4: {lang: 0x2c4, script: 0x35, maxScript: 0x35, toRegion: 0x8b, fromRegion: []uint16{0xc4}},
-}
-
-// Total table size 20315 bytes (19KiB); checksum: C16EF251
diff --git a/Godeps/_workspace/src/gopkg.in/urfave/cli.v1/.travis.yml b/Godeps/_workspace/src/gopkg.in/urfave/cli.v1/.travis.yml
deleted file mode 100644
index 76f38a482..000000000
--- a/Godeps/_workspace/src/gopkg.in/urfave/cli.v1/.travis.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-language: go
-sudo: false
-
-go:
-- 1.1.2
-- 1.2.2
-- 1.3.3
-- 1.4
-- 1.5.4
-- 1.6.2
-- tip
-
-matrix:
- allow_failures:
- - go: tip
-
-before_script:
-- go get github.com/meatballhat/gfmxr/...
-
-script:
-- go vet ./...
-- go test -v ./...
-- gfmxr -c $(grep -c 'package main' README.md) -s README.md
diff --git a/Godeps/_workspace/src/gopkg.in/urfave/cli.v1/LICENSE b/Godeps/_workspace/src/gopkg.in/urfave/cli.v1/LICENSE
deleted file mode 100644
index 5515ccfb7..000000000
--- a/Godeps/_workspace/src/gopkg.in/urfave/cli.v1/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-Copyright (C) 2013 Jeremy Saenz
-All Rights Reserved.
-
-MIT LICENSE
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/Godeps/_workspace/src/gopkg.in/urfave/cli.v1/README.md b/Godeps/_workspace/src/gopkg.in/urfave/cli.v1/README.md
deleted file mode 100644
index c1709cef8..000000000
--- a/Godeps/_workspace/src/gopkg.in/urfave/cli.v1/README.md
+++ /dev/null
@@ -1,579 +0,0 @@
-[![Coverage](http://gocover.io/_badge/github.com/codegangsta/cli?0)](http://gocover.io/github.com/codegangsta/cli)
-[![Build Status](https://travis-ci.org/codegangsta/cli.svg?branch=master)](https://travis-ci.org/codegangsta/cli)
-[![GoDoc](https://godoc.org/github.com/codegangsta/cli?status.svg)](https://godoc.org/github.com/codegangsta/cli)
-[![codebeat](https://codebeat.co/badges/0a8f30aa-f975-404b-b878-5fab3ae1cc5f)](https://codebeat.co/projects/github-com-codegangsta-cli)
-[![Go Report Card](https://goreportcard.com/badge/codegangsta/cli)](https://goreportcard.com/report/codegangsta/cli)
-
-# cli
-
-cli is a simple, fast, and fun package for building command line apps in Go. The goal is to enable developers to write fast and distributable command line applications in an expressive way.
-
-## Overview
-
-Command line apps are usually so tiny that there is absolutely no reason why your code should *not* be self-documenting. Things like generating help text and parsing command flags/options should not hinder productivity when writing a command line app.
-
-**This is where cli comes into play.** cli makes command line programming fun, organized, and expressive!
-
-## Installation
-
-Make sure you have a working Go environment (go 1.1+ is *required*). [See the install instructions](http://golang.org/doc/install.html).
-
-To install cli, simply run:
-```
-$ go get github.com/codegangsta/cli
-```
-
-Make sure your `PATH` includes to the `$GOPATH/bin` directory so your commands can be easily used:
-```
-export PATH=$PATH:$GOPATH/bin
-```
-
-## Getting Started
-
-One of the philosophies behind cli is that an API should be playful and full of discovery. So a cli app can be as little as one line of code in `main()`.
-
-``` go
-package main
-
-import (
- "os"
- "github.com/codegangsta/cli"
-)
-
-func main() {
- cli.NewApp().Run(os.Args)
-}
-```
-
-This app will run and show help text, but is not very useful. Let's give an action to execute and some help documentation:
-
-<!-- {
- "output": "boom! I say!"
-} -->
-``` go
-package main
-
-import (
- "fmt"
- "os"
-
- "github.com/codegangsta/cli"
-)
-
-func main() {
- app := cli.NewApp()
- app.Name = "boom"
- app.Usage = "make an explosive entrance"
- app.Action = func(c *cli.Context) error {
- fmt.Println("boom! I say!")
- return nil
- }
-
- app.Run(os.Args)
-}
-```
-
-Running this already gives you a ton of functionality, plus support for things like subcommands and flags, which are covered below.
-
-## Example
-
-Being a programmer can be a lonely job. Thankfully by the power of automation that is not the case! Let's create a greeter app to fend off our demons of loneliness!
-
-Start by creating a directory named `greet`, and within it, add a file, `greet.go` with the following code in it:
-
-<!-- {
- "output": "Hello friend!"
-} -->
-``` go
-package main
-
-import (
- "fmt"
- "os"
-
- "github.com/codegangsta/cli"
-)
-
-func main() {
- app := cli.NewApp()
- app.Name = "greet"
- app.Usage = "fight the loneliness!"
- app.Action = func(c *cli.Context) error {
- fmt.Println("Hello friend!")
- return nil
- }
-
- app.Run(os.Args)
-}
-```
-
-Install our command to the `$GOPATH/bin` directory:
-
-```
-$ go install
-```
-
-Finally run our new command:
-
-```
-$ greet
-Hello friend!
-```
-
-cli also generates neat help text:
-
-```
-$ greet help
-NAME:
- greet - fight the loneliness!
-
-USAGE:
- greet [global options] command [command options] [arguments...]
-
-VERSION:
- 0.0.0
-
-COMMANDS:
- help, h Shows a list of commands or help for one command
-
-GLOBAL OPTIONS
- --version Shows version information
-```
-
-### Arguments
-
-You can lookup arguments by calling the `Args` function on `cli.Context`.
-
-``` go
-...
-app.Action = func(c *cli.Context) error {
- fmt.Println("Hello", c.Args()[0])
- return nil
-}
-...
-```
-
-### Flags
-
-Setting and querying flags is simple.
-
-``` go
-...
-app.Flags = []cli.Flag {
- cli.StringFlag{
- Name: "lang",
- Value: "english",
- Usage: "language for the greeting",
- },
-}
-app.Action = func(c *cli.Context) error {
- name := "someone"
- if c.NArg() > 0 {
- name = c.Args()[0]
- }
- if c.String("lang") == "spanish" {
- fmt.Println("Hola", name)
- } else {
- fmt.Println("Hello", name)
- }
- return nil
-}
-...
-```
-
-You can also set a destination variable for a flag, to which the content will be scanned.
-
-``` go
-...
-var language string
-app.Flags = []cli.Flag {
- cli.StringFlag{
- Name: "lang",
- Value: "english",
- Usage: "language for the greeting",
- Destination: &language,
- },
-}
-app.Action = func(c *cli.Context) error {
- name := "someone"
- if c.NArg() > 0 {
- name = c.Args()[0]
- }
- if language == "spanish" {
- fmt.Println("Hola", name)
- } else {
- fmt.Println("Hello", name)
- }
- return nil
-}
-...
-```
-
-See full list of flags at http://godoc.org/github.com/codegangsta/cli
-
-#### Placeholder Values
-
-Sometimes it's useful to specify a flag's value within the usage string itself. Such placeholders are
-indicated with back quotes.
-
-For example this:
-
-```go
-cli.StringFlag{
- Name: "config, c",
- Usage: "Load configuration from `FILE`",
-}
-```
-
-Will result in help output like:
-
-```
---config FILE, -c FILE Load configuration from FILE
-```
-
-Note that only the first placeholder is used. Subsequent back-quoted words will be left as-is.
-
-#### Alternate Names
-
-You can set alternate (or short) names for flags by providing a comma-delimited list for the `Name`. e.g.
-
-``` go
-app.Flags = []cli.Flag {
- cli.StringFlag{
- Name: "lang, l",
- Value: "english",
- Usage: "language for the greeting",
- },
-}
-```
-
-That flag can then be set with `--lang spanish` or `-l spanish`. Note that giving two different forms of the same flag in the same command invocation is an error.
-
-#### Values from the Environment
-
-You can also have the default value set from the environment via `EnvVar`. e.g.
-
-``` go
-app.Flags = []cli.Flag {
- cli.StringFlag{
- Name: "lang, l",
- Value: "english",
- Usage: "language for the greeting",
- EnvVar: "APP_LANG",
- },
-}
-```
-
-The `EnvVar` may also be given as a comma-delimited "cascade", where the first environment variable that resolves is used as the default.
-
-``` go
-app.Flags = []cli.Flag {
- cli.StringFlag{
- Name: "lang, l",
- Value: "english",
- Usage: "language for the greeting",
- EnvVar: "LEGACY_COMPAT_LANG,APP_LANG,LANG",
- },
-}
-```
-
-#### Values from alternate input sources (YAML and others)
-
-There is a separate package altsrc that adds support for getting flag values from other input sources like YAML.
-
-In order to get values for a flag from an alternate input source the following code would be added to wrap an existing cli.Flag like below:
-
-``` go
- altsrc.NewIntFlag(cli.IntFlag{Name: "test"})
-```
-
-Initialization must also occur for these flags. Below is an example initializing getting data from a yaml file below.
-
-``` go
- command.Before = altsrc.InitInputSourceWithContext(command.Flags, NewYamlSourceFromFlagFunc("load"))
-```
-
-The code above will use the "load" string as a flag name to get the file name of a yaml file from the cli.Context.
-It will then use that file name to initialize the yaml input source for any flags that are defined on that command.
-As a note the "load" flag used would also have to be defined on the command flags in order for this code snipped to work.
-
-Currently only YAML files are supported but developers can add support for other input sources by implementing the
-altsrc.InputSourceContext for their given sources.
-
-Here is a more complete sample of a command using YAML support:
-
-``` go
- command := &cli.Command{
- Name: "test-cmd",
- Aliases: []string{"tc"},
- Usage: "this is for testing",
- Description: "testing",
- Action: func(c *cli.Context) error {
- // Action to run
- return nil
- },
- Flags: []cli.Flag{
- NewIntFlag(cli.IntFlag{Name: "test"}),
- cli.StringFlag{Name: "load"}},
- }
- command.Before = InitInputSourceWithContext(command.Flags, NewYamlSourceFromFlagFunc("load"))
- err := command.Run(c)
-```
-
-### Subcommands
-
-Subcommands can be defined for a more git-like command line app.
-
-```go
-...
-app.Commands = []cli.Command{
- {
- Name: "add",
- Aliases: []string{"a"},
- Usage: "add a task to the list",
- Action: func(c *cli.Context) error {
- fmt.Println("added task: ", c.Args().First())
- return nil
- },
- },
- {
- Name: "complete",
- Aliases: []string{"c"},
- Usage: "complete a task on the list",
- Action: func(c *cli.Context) error {
- fmt.Println("completed task: ", c.Args().First())
- return nil
- },
- },
- {
- Name: "template",
- Aliases: []string{"r"},
- Usage: "options for task templates",
- Subcommands: []cli.Command{
- {
- Name: "add",
- Usage: "add a new template",
- Action: func(c *cli.Context) error {
- fmt.Println("new task template: ", c.Args().First())
- return nil
- },
- },
- {
- Name: "remove",
- Usage: "remove an existing template",
- Action: func(c *cli.Context) error {
- fmt.Println("removed task template: ", c.Args().First())
- return nil
- },
- },
- },
- },
-}
-...
-```
-
-### Subcommands categories
-
-For additional organization in apps that have many subcommands, you can
-associate a category for each command to group them together in the help
-output.
-
-E.g.
-
-```go
-...
- app.Commands = []cli.Command{
- {
- Name: "noop",
- },
- {
- Name: "add",
- Category: "template",
- },
- {
- Name: "remove",
- Category: "template",
- },
- }
-...
-```
-
-Will include:
-
-```
-...
-COMMANDS:
- noop
-
- Template actions:
- add
- remove
-...
-```
-
-### Exit code
-
-Calling `App.Run` will not automatically call `os.Exit`, which means that by
-default the exit code will "fall through" to being `0`. An explicit exit code
-may be set by returning a non-nil error that fulfills `cli.ExitCoder`, *or* a
-`cli.MultiError` that includes an error that fulfills `cli.ExitCoder`, e.g.:
-
-``` go
-package main
-
-import (
- "os"
-
- "github.com/codegangsta/cli"
-)
-
-func main() {
- app := cli.NewApp()
- app.Flags = []cli.Flag{
- cli.BoolTFlag{
- Name: "ginger-crouton",
- Usage: "is it in the soup?",
- },
- }
- app.Action = func(ctx *cli.Context) error {
- if !ctx.Bool("ginger-crouton") {
- return cli.NewExitError("it is not in the soup", 86)
- }
- return nil
- }
-
- app.Run(os.Args)
-}
-```
-
-### Bash Completion
-
-You can enable completion commands by setting the `EnableBashCompletion`
-flag on the `App` object. By default, this setting will only auto-complete to
-show an app's subcommands, but you can write your own completion methods for
-the App or its subcommands.
-
-```go
-...
-var tasks = []string{"cook", "clean", "laundry", "eat", "sleep", "code"}
-app := cli.NewApp()
-app.EnableBashCompletion = true
-app.Commands = []cli.Command{
- {
- Name: "complete",
- Aliases: []string{"c"},
- Usage: "complete a task on the list",
- Action: func(c *cli.Context) error {
- fmt.Println("completed task: ", c.Args().First())
- return nil
- },
- BashComplete: func(c *cli.Context) {
- // This will complete if no args are passed
- if c.NArg() > 0 {
- return
- }
- for _, t := range tasks {
- fmt.Println(t)
- }
- },
- }
-}
-...
-```
-
-#### To Enable
-
-Source the `autocomplete/bash_autocomplete` file in your `.bashrc` file while
-setting the `PROG` variable to the name of your program:
-
-`PROG=myprogram source /.../cli/autocomplete/bash_autocomplete`
-
-#### To Distribute
-
-Copy `autocomplete/bash_autocomplete` into `/etc/bash_completion.d/` and rename
-it to the name of the program you wish to add autocomplete support for (or
-automatically install it there if you are distributing a package). Don't forget
-to source the file to make it active in the current shell.
-
-```
-sudo cp src/bash_autocomplete /etc/bash_completion.d/<myprogram>
-source /etc/bash_completion.d/<myprogram>
-```
-
-Alternatively, you can just document that users should source the generic
-`autocomplete/bash_autocomplete` in their bash configuration with `$PROG` set
-to the name of their program (as above).
-
-### Generated Help Text Customization
-
-All of the help text generation may be customized, and at multiple levels. The
-templates are exposed as variables `AppHelpTemplate`, `CommandHelpTemplate`, and
-`SubcommandHelpTemplate` which may be reassigned or augmented, and full override
-is possible by assigning a compatible func to the `cli.HelpPrinter` variable,
-e.g.:
-
-<!-- {
- "output": "Ha HA. I pwnd the help!!1"
-} -->
-``` go
-package main
-
-import (
- "fmt"
- "io"
- "os"
-
- "github.com/codegangsta/cli"
-)
-
-func main() {
- // EXAMPLE: Append to an existing template
- cli.AppHelpTemplate = fmt.Sprintf(`%s
-
-WEBSITE: http://awesometown.example.com
-
-SUPPORT: support@awesometown.example.com
-
-`, cli.AppHelpTemplate)
-
- // EXAMPLE: Override a template
- cli.AppHelpTemplate = `NAME:
- {{.Name}} - {{.Usage}}
-USAGE:
- {{.HelpName}} {{if .VisibleFlags}}[global options]{{end}}{{if .Commands}} command
-[command options]{{end}} {{if
-.ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}
- {{if len .Authors}}
-AUTHOR(S):
- {{range .Authors}}{{ . }}{{end}}
- {{end}}{{if .Commands}}
-COMMANDS:
-{{range .Commands}}{{if not .HideHelp}} {{join .Names ", "}}{{ "\t"
-}}{{.Usage}}{{ "\n" }}{{end}}{{end}}{{end}}{{if .VisibleFlags}}
-GLOBAL OPTIONS:
- {{range .VisibleFlags}}{{.}}
- {{end}}{{end}}{{if .Copyright }}
-COPYRIGHT:
- {{.Copyright}}
- {{end}}{{if .Version}}
-VERSION:
- {{.Version}}
- {{end}}
-`
-
- // EXAMPLE: Replace the `HelpPrinter` func
- cli.HelpPrinter = func(w io.Writer, templ string, data interface{}) {
- fmt.Println("Ha HA. I pwnd the help!!1")
- }
-
- cli.NewApp().Run(os.Args)
-}
-```
-
-## Contribution Guidelines
-
-Feel free to put up a pull request to fix a bug or maybe add a feature. I will give it a code review and make sure that it does not break backwards compatibility. If I or any other collaborators agree that it is in line with the vision of the project, we will work with you to get the code into a mergeable state and merge it into the master branch.
-
-If you have contributed something significant to the project, I will most likely add you as a collaborator. As a collaborator you are given the ability to merge others pull requests. It is very important that new code does not break existing code, so be careful about what code you do choose to merge. If you have any questions feel free to link @codegangsta to the issue in question and we can review it together.
-
-If you feel like you have contributed to the project but have not yet been added as a collaborator, I probably forgot to add you. Hit @codegangsta up over email and we will get it figured out.
diff --git a/Godeps/_workspace/src/gopkg.in/urfave/cli.v1/appveyor.yml b/Godeps/_workspace/src/gopkg.in/urfave/cli.v1/appveyor.yml
deleted file mode 100644
index 3ca7afabd..000000000
--- a/Godeps/_workspace/src/gopkg.in/urfave/cli.v1/appveyor.yml
+++ /dev/null
@@ -1,16 +0,0 @@
-version: "{build}"
-
-os: Windows Server 2012 R2
-
-install:
- - go version
- - go env
-
-build_script:
- - cd %APPVEYOR_BUILD_FOLDER%
- - go vet ./...
- - go test -v ./...
-
-test: off
-
-deploy: off
diff --git a/Godeps/_workspace/src/golang.org/x/crypto/LICENSE b/build/_vendor/src/golang.org/x/net/LICENSE
index 6a66aea5e..6a66aea5e 100644
--- a/Godeps/_workspace/src/golang.org/x/crypto/LICENSE
+++ b/build/_vendor/src/golang.org/x/net/LICENSE
diff --git a/Godeps/_workspace/src/golang.org/x/net/context/context.go b/build/_vendor/src/golang.org/x/net/context/context.go
index ea1a7cd53..134654cf7 100644
--- a/Godeps/_workspace/src/golang.org/x/net/context/context.go
+++ b/build/_vendor/src/golang.org/x/net/context/context.go
@@ -34,7 +34,7 @@
//
// See http://blog.golang.org/context for example code for a server that uses
// Contexts.
-package context
+package context // import "golang.org/x/net/context"
import "time"
diff --git a/Godeps/_workspace/src/golang.org/x/net/context/go17.go b/build/_vendor/src/golang.org/x/net/context/go17.go
index f8cda19ad..f8cda19ad 100644
--- a/Godeps/_workspace/src/golang.org/x/net/context/go17.go
+++ b/build/_vendor/src/golang.org/x/net/context/go17.go
diff --git a/Godeps/_workspace/src/golang.org/x/net/context/pre_go17.go b/build/_vendor/src/golang.org/x/net/context/pre_go17.go
index 5a30acabd..5a30acabd 100644
--- a/Godeps/_workspace/src/golang.org/x/net/context/pre_go17.go
+++ b/build/_vendor/src/golang.org/x/net/context/pre_go17.go
diff --git a/build/ci-notes.md b/build/ci-notes.md
index 39375ff4c..3fc2690b2 100644
--- a/build/ci-notes.md
+++ b/build/ci-notes.md
@@ -1,3 +1,18 @@
+# Vendored Dependencies
+
+Dependencies are almost all vendored in at the standard Go `/vendor` path. This allows
+people to build go-ethereum using the standard toolchain without any particular package
+manager. It also plays nicely with `go get`, not requiring external code to be relied on.
+
+The one single dependent package missing from `vendor` is `golang.org/x/net/context`. As
+this is a package exposed via public library APIs, it must not be vendored as dependent
+code woulnd't be able to instantiate.
+
+To allow reproducible builds of go-ethereum nonetheless that don't need network access
+during build time to fetch `golang.org/x/net/context`, a version was copied into our repo
+at the very specific `/build/_vendor` path, which is added automatically by all CI build
+scripts and the makefile too.
+
# Debian Packaging
Tagged releases and develop branch commits are available as installable Debian packages
diff --git a/build/ci.go b/build/ci.go
index cf43969f6..3dca47fad 100644
--- a/build/ci.go
+++ b/build/ci.go
@@ -141,7 +141,6 @@ func doInstall(cmdline []string) {
log.Println("be compiled with an earlier version. Please upgrade your Go installation.")
os.Exit(1)
}
-
// Compile packages given as arguments, or everything if there are no arguments.
packages := []string{"./..."}
if flag.NArg() > 0 {
@@ -178,6 +177,7 @@ func goTool(subcmd string, args ...string) *exec.Cmd {
cmd := exec.Command(gocmd, subcmd)
cmd.Args = append(cmd.Args, args...)
cmd.Env = []string{
+ "GO15VENDOREXPERIMENT=1",
"GOPATH=" + build.GOPATH(),
"GOBIN=" + GOBIN,
}
@@ -200,11 +200,24 @@ func doTest(cmdline []string) {
coverage = flag.Bool("coverage", false, "Whether to record code coverage")
)
flag.CommandLine.Parse(cmdline)
+
packages := []string{"./..."}
if len(flag.CommandLine.Args()) > 0 {
packages = flag.CommandLine.Args()
}
-
+ if len(packages) == 1 && packages[0] == "./..." {
+ // Resolve ./... manually since go vet will fail on vendored stuff
+ out, err := goTool("list", "./...").CombinedOutput()
+ if err != nil {
+ log.Fatalf("package listing failed: %v\n%s", err, string(out))
+ }
+ packages = []string{}
+ for _, line := range strings.Split(string(out), "\n") {
+ if !strings.Contains(line, "vendor") {
+ packages = append(packages, strings.TrimSpace(line))
+ }
+ }
+ }
// Run analysis tools before the tests.
if *vet {
build.MustRun(goTool("vet", packages...))
diff --git a/cmd/geth/main.go b/cmd/geth/main.go
index ccc42d3cf..551705208 100644
--- a/cmd/geth/main.go
+++ b/cmd/geth/main.go
@@ -85,22 +85,6 @@ Regular users do not need to execute it.
`,
},
{
- Action: gpuinfo,
- Name: "gpuinfo",
- Usage: "gpuinfo",
- Description: `
-Prints OpenCL device info for all found GPUs.
-`,
- },
- {
- Action: gpubench,
- Name: "gpubench",
- Usage: "benchmark GPU",
- Description: `
-Runs quick benchmark on first GPU found.
-`,
- },
- {
Action: version,
Name: "version",
Usage: "print ethereum version numbers",
@@ -147,7 +131,6 @@ participating.
utils.OpposeDAOFork,
utils.MinerThreadsFlag,
utils.MiningEnabledFlag,
- utils.MiningGPUFlag,
utils.AutoDAGFlag,
utils.TargetGasLimitFlag,
utils.NATFlag,
@@ -312,7 +295,7 @@ func startNode(ctx *cli.Context, stack *node.Node) {
if err := stack.Service(&ethereum); err != nil {
utils.Fatalf("ethereum service not running: %v", err)
}
- if err := ethereum.StartMining(ctx.GlobalInt(utils.MinerThreadsFlag.Name), ctx.GlobalString(utils.MiningGPUFlag.Name)); err != nil {
+ if err := ethereum.StartMining(ctx.GlobalInt(utils.MinerThreadsFlag.Name)); err != nil {
utils.Fatalf("Failed to start mining: %v", err)
}
}
@@ -348,31 +331,6 @@ func makedag(ctx *cli.Context) error {
return nil
}
-func gpuinfo(ctx *cli.Context) error {
- eth.PrintOpenCLDevices()
- return nil
-}
-
-func gpubench(ctx *cli.Context) error {
- args := ctx.Args()
- wrongArgs := func() {
- utils.Fatalf(`Usage: geth gpubench <gpu number>`)
- }
- switch {
- case len(args) == 1:
- n, err := strconv.ParseUint(args[0], 0, 64)
- if err != nil {
- wrongArgs()
- }
- eth.GPUBench(n)
- case len(args) == 0:
- eth.GPUBench(0)
- default:
- wrongArgs()
- }
- return nil
-}
-
func version(c *cli.Context) error {
fmt.Println(strings.Title(clientIdentifier))
fmt.Println("Version:", utils.Version)
diff --git a/cmd/geth/usage.go b/cmd/geth/usage.go
index 2cb6e77e8..4c4e27630 100644
--- a/cmd/geth/usage.go
+++ b/cmd/geth/usage.go
@@ -128,7 +128,6 @@ var AppHelpFlagGroups = []flagGroup{
Flags: []cli.Flag{
utils.MiningEnabledFlag,
utils.MinerThreadsFlag,
- utils.MiningGPUFlag,
utils.AutoDAGFlag,
utils.EtherbaseFlag,
utils.TargetGasLimitFlag,
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go
index 1859f735d..5e2dcf8c9 100644
--- a/cmd/utils/flags.go
+++ b/cmd/utils/flags.go
@@ -170,7 +170,6 @@ var (
Usage: "Updates the chain rules to oppose the DAO hard-fork",
}
// Miner settings
- // TODO: refactor CPU vs GPU mining flags
MiningEnabledFlag = cli.BoolFlag{
Name: "mine",
Usage: "Enable mining",
@@ -180,10 +179,6 @@ var (
Usage: "Number of CPU threads to use for mining",
Value: runtime.NumCPU(),
}
- MiningGPUFlag = cli.StringFlag{
- Name: "minergpus",
- Usage: "List of GPUs to use for mining (e.g. '0,1' will use the first two GPUs found)",
- }
TargetGasLimitFlag = cli.StringFlag{
Name: "targetgaslimit",
Usage: "Target gas limit sets the artificial target gas floor for the blocks to mine",
diff --git a/common/natspec/natspec.go b/common/natspec/natspec.go
deleted file mode 100644
index 4521ff7a1..000000000
--- a/common/natspec/natspec.go
+++ /dev/null
@@ -1,262 +0,0 @@
-// Copyright 2015 The go-ethereum Authors
-// This file is part of the go-ethereum library.
-//
-// The go-ethereum library is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Lesser General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// The go-ethereum library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
-
-// +build ignore
-
-package natspec
-
-import (
- "bytes"
- "encoding/json"
- "fmt"
- "strings"
-
- "github.com/ethereum/go-ethereum/common"
- "github.com/ethereum/go-ethereum/common/httpclient"
- "github.com/ethereum/go-ethereum/common/registrar"
- "github.com/ethereum/go-ethereum/crypto"
- "github.com/ethereum/go-ethereum/xeth"
- "github.com/robertkrimen/otto"
-)
-
-type abi2method map[[8]byte]*method
-
-type NatSpec struct {
- jsvm *otto.Otto
- abiDocJson []byte
- userDoc userDoc
- tx, data string
-}
-
-// main entry point for to get natspec notice for a transaction
-// the implementation is frontend friendly in that it always gives back
-// a notice that is safe to display
-// :FIXME: the second return value is an error, which can be used to fine-tune bahaviour
-func GetNotice(xeth *xeth.XEth, tx string, http *httpclient.HTTPClient) (notice string) {
- ns, err := New(xeth, tx, http)
- if err != nil {
- if ns == nil {
- return getFallbackNotice(fmt.Sprintf("no NatSpec info found for contract: %v", err), tx)
- } else {
- return getFallbackNotice(fmt.Sprintf("invalid NatSpec info: %v", err), tx)
- }
- }
-
- notice, err = ns.Notice()
- if err != nil {
- return getFallbackNotice(fmt.Sprintf("NatSpec notice error: %v", err), tx)
- }
-
- return
-}
-
-func getFallbackNotice(comment, tx string) string {
- return fmt.Sprintf("About to submit transaction (%s): %s", comment, tx)
-}
-
-type transaction struct {
- To string `json:"to"`
- Data string `json:"data"`
-}
-
-type jsonTx struct {
- Params []transaction `json:"params"`
-}
-
-type contractInfo struct {
- Source string `json:"source"`
- Language string `json:"language"`
- Version string `json:"compilerVersion"`
- AbiDefinition json.RawMessage `json:"abiDefinition"`
- UserDoc userDoc `json:"userDoc"`
- DeveloperDoc json.RawMessage `json:"developerDoc"`
-}
-
-func New(xeth *xeth.XEth, jsontx string, http *httpclient.HTTPClient) (self *NatSpec, err error) {
-
- // extract contract address from tx
- var tx jsonTx
- err = json.Unmarshal([]byte(jsontx), &tx)
- if err != nil {
- return
- }
- t := tx.Params[0]
- contractAddress := t.To
-
- content, err := FetchDocsForContract(contractAddress, xeth, http)
- if err != nil {
- return
- }
-
- self, err = NewWithDocs(content, jsontx, t.Data)
- return
-}
-
-// also called by admin.contractInfo.get
-func FetchDocsForContract(contractAddress string, xeth *xeth.XEth, client *httpclient.HTTPClient) (content []byte, err error) {
- // retrieve contract hash from state
- codehex := xeth.CodeAt(contractAddress)
- codeb := xeth.CodeAtBytes(contractAddress)
-
- if codehex == "0x" {
- err = fmt.Errorf("contract (%v) not found", contractAddress)
- return
- }
- codehash := common.BytesToHash(crypto.Keccak256(codeb))
- // set up nameresolver with natspecreg + urlhint contract addresses
- reg := registrar.New(xeth)
-
- // resolve host via HashReg/UrlHint Resolver
- hash, err := reg.HashToHash(codehash)
- if err != nil {
- return
- }
- if client.HasScheme("bzz") {
- content, err = client.Get("bzz://"+hash.Hex()[2:], "")
- if err == nil { // non-fatal
- return
- }
- err = nil
- //falling back to urlhint
- }
-
- uri, err := reg.HashToUrl(hash)
- if err != nil {
- return
- }
-
- // get content via http client and authenticate content using hash
- content, err = client.GetAuthContent(uri, hash)
- if err != nil {
- return
- }
- return
-}
-
-func NewWithDocs(infoDoc []byte, tx string, data string) (self *NatSpec, err error) {
-
- var contract contractInfo
- err = json.Unmarshal(infoDoc, &contract)
- if err != nil {
- return
- }
-
- self = &NatSpec{
- jsvm: otto.New(),
- abiDocJson: []byte(contract.AbiDefinition),
- userDoc: contract.UserDoc,
- tx: tx,
- data: data,
- }
-
- // load and require natspec js (but it is meant to be protected environment)
- _, err = self.jsvm.Run(natspecJS)
- if err != nil {
- return
- }
- _, err = self.jsvm.Run("var natspec = require('natspec');")
- return
-}
-
-// type abiDoc []method
-
-// type method struct {
-// Name string `json:name`
-// Inputs []input `json:inputs`
-// abiKey [8]byte
-// }
-
-// type input struct {
-// Name string `json:name`
-// Type string `json:type`
-// }
-
-// json skeleton for abi doc (contract method definitions)
-type method struct {
- Notice string `json:notice`
- name string
-}
-
-type userDoc struct {
- Methods map[string]*method `json:methods`
-}
-
-func (self *NatSpec) makeAbi2method(abiKey [8]byte) (meth *method) {
- for signature, m := range self.userDoc.Methods {
- name := strings.Split(signature, "(")[0]
- hash := []byte(common.Bytes2Hex(crypto.Keccak256([]byte(signature))))
- var key [8]byte
- copy(key[:], hash[:8])
- if bytes.Equal(key[:], abiKey[:]) {
- meth = m
- meth.name = name
- return
- }
- }
- return
-}
-
-func (self *NatSpec) Notice() (notice string, err error) {
- var abiKey [8]byte
- if len(self.data) < 10 {
- err = fmt.Errorf("Invalid transaction data")
- return
- }
- copy(abiKey[:], self.data[2:10])
- meth := self.makeAbi2method(abiKey)
-
- if meth == nil {
- err = fmt.Errorf("abi key does not match any method")
- return
- }
- notice, err = self.noticeForMethod(self.tx, meth.name, meth.Notice)
- return
-}
-
-func (self *NatSpec) noticeForMethod(tx string, name, expression string) (notice string, err error) {
-
- if _, err = self.jsvm.Run("var transaction = " + tx + ";"); err != nil {
- return "", fmt.Errorf("natspec.js error setting transaction: %v", err)
- }
-
- if _, err = self.jsvm.Run("var abi = " + string(self.abiDocJson) + ";"); err != nil {
- return "", fmt.Errorf("natspec.js error setting abi: %v", err)
- }
-
- if _, err = self.jsvm.Run("var method = '" + name + "';"); err != nil {
- return "", fmt.Errorf("natspec.js error setting method: %v", err)
- }
-
- if _, err = self.jsvm.Run("var expression = \"" + expression + "\";"); err != nil {
- return "", fmt.Errorf("natspec.js error setting expression: %v", err)
- }
-
- self.jsvm.Run("var call = {method: method,abi: abi,transaction: transaction};")
- value, err := self.jsvm.Run("natspec.evaluateExpression(expression, call);")
- if err != nil {
- return "", fmt.Errorf("natspec.js error evaluating expression: %v", err)
- }
- evalError := "Natspec evaluation failed, wrong input params"
- if value.String() == evalError {
- return "", fmt.Errorf("natspec.js error evaluating expression: wrong input params in expression '%s'", expression)
- }
- if len(value.String()) == 0 {
- return "", fmt.Errorf("natspec.js error evaluating expression")
- }
-
- return value.String(), nil
-
-}
diff --git a/common/natspec/natspec_e2e_test.go b/common/natspec/natspec_e2e_test.go
deleted file mode 100644
index 255260576..000000000
--- a/common/natspec/natspec_e2e_test.go
+++ /dev/null
@@ -1,357 +0,0 @@
-// Copyright 2015 The go-ethereum Authors
-// This file is part of the go-ethereum library.
-//
-// The go-ethereum library is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Lesser General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// The go-ethereum library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
-
-// +build ignore
-
-package natspec
-
-import (
- "fmt"
- "io/ioutil"
- "math/big"
- "os"
- "path/filepath"
- "runtime"
- "testing"
- "time"
-
- "github.com/ethereum/go-ethereum/accounts"
- "github.com/ethereum/go-ethereum/common"
- "github.com/ethereum/go-ethereum/common/httpclient"
- "github.com/ethereum/go-ethereum/common/registrar"
- "github.com/ethereum/go-ethereum/core"
- "github.com/ethereum/go-ethereum/crypto"
- "github.com/ethereum/go-ethereum/eth"
- "github.com/ethereum/go-ethereum/ethdb"
- "github.com/ethereum/go-ethereum/event"
- "github.com/ethereum/go-ethereum/node"
- xe "github.com/ethereum/go-ethereum/xeth"
-)
-
-const (
- testAddress = "0x8605cdbbdb6d264aa742e77020dcbc58fcdce182"
- testBalance = "10000000000000000000"
- testKey = "e6fab74a43941f82d89cb7faa408e227cdad3153c4720e540e855c19b15e6674"
-
- testFileName = "long_file_name_for_testing_registration_of_URLs_longer_than_32_bytes.content"
-
- testNotice = "Register key `utils.toHex(_key)` <- content `utils.toHex(_content)`"
-
- testExpNotice = "Register key 0xadd1a7d961cff0242089674ec2ef6fca671ab15e1fe80e38859fc815b98d88ab <- content 0xb3a2dea218de5d8bbe6c4645aadbf67b5ab00ecb1a9ec95dbdad6a0eed3e41a7"
-
- testExpNotice2 = `About to submit transaction (NatSpec notice error: abi key does not match any method): {"params":[{"to":"%s","data": "0x31e12c20"}]}`
-
- testExpNotice3 = `About to submit transaction (no NatSpec info found for contract: HashToHash: content hash not found for '0x1392c62d05b2d149e22a339c531157ae06b44d39a674cce500064b12b9aeb019'): {"params":[{"to":"%s","data": "0x300a3bbfb3a2dea218de5d8bbe6c4645aadbf67b5ab00ecb1a9ec95dbdad6a0eed3e41a7000000000000000000000000000000000000000000000000000000000000000000000000000000000000000066696c653a2f2f2f746573742e636f6e74656e74"}]}`
-)
-
-const (
- testUserDoc = `
-{
- "methods": {
- "register(uint256,uint256)": {
- "notice": "` + testNotice + `"
- }
- },
- "invariants": [
- { "notice": "" }
- ],
- "construction": [
- { "notice": "" }
- ]
-}
-`
- testAbiDefinition = `
-[{
- "name": "register",
- "constant": false,
- "type": "function",
- "inputs": [{
- "name": "_key",
- "type": "uint256"
- }, {
- "name": "_content",
- "type": "uint256"
- }],
- "outputs": []
-}]
-`
-
- testContractInfo = `
-{
- "userDoc": ` + testUserDoc + `,
- "abiDefinition": ` + testAbiDefinition + `
-}
-`
-)
-
-type testFrontend struct {
- t *testing.T
- ethereum *eth.Ethereum
- xeth *xe.XEth
- wait chan *big.Int
- lastConfirm string
- wantNatSpec bool
-}
-
-func (self *testFrontend) AskPassword() (string, bool) {
- return "", true
-}
-
-func (self *testFrontend) UnlockAccount(acc []byte) bool {
- self.ethereum.AccountManager().Unlock(common.BytesToAddress(acc), "password")
- return true
-}
-
-func (self *testFrontend) ConfirmTransaction(tx string) bool {
- if self.wantNatSpec {
- client := httpclient.New("/tmp/")
- self.lastConfirm = GetNotice(self.xeth, tx, client)
- }
- return true
-}
-
-func testEth(t *testing.T) (ethereum *eth.Ethereum, err error) {
-
- tmp, err := ioutil.TempDir("", "natspec-test")
- if err != nil {
- t.Fatal(err)
- }
- db, _ := ethdb.NewMemDatabase()
- addr := common.HexToAddress(testAddress)
- core.WriteGenesisBlockForTesting(db, core.GenesisAccount{addr, common.String2Big(testBalance)})
- ks := crypto.NewKeyStorePassphrase(filepath.Join(tmp, "keystore"), crypto.LightScryptN, crypto.LightScryptP)
- am := accounts.NewManager(ks)
- keyb, err := crypto.HexToECDSA(testKey)
- if err != nil {
- t.Fatal(err)
- }
- key := crypto.NewKeyFromECDSA(keyb)
- err = ks.StoreKey(key, "")
- if err != nil {
- t.Fatal(err)
- }
-
- err = am.Unlock(key.Address, "")
- if err != nil {
- t.Fatal(err)
- }
-
- // only use minimalistic stack with no networking
- return eth.New(&node.ServiceContext{EventMux: new(event.TypeMux)}, &eth.Config{
- AccountManager: am,
- Etherbase: common.HexToAddress(testAddress),
- PowTest: true,
- TestGenesisState: db,
- GpoMinGasPrice: common.Big1,
- GpobaseCorrectionFactor: 1,
- GpoMaxGasPrice: common.Big1,
- })
-}
-
-func testInit(t *testing.T) (self *testFrontend) {
- // initialise and start minimal ethereum stack
- ethereum, err := testEth(t)
- if err != nil {
- t.Errorf("error creating ethereum: %v", err)
- return
- }
- err = ethereum.Start(nil)
- if err != nil {
- t.Errorf("error starting ethereum: %v", err)
- return
- }
-
- // mock frontend
- self = &testFrontend{t: t, ethereum: ethereum}
- self.xeth = xe.New(nil, self)
- self.wait = self.xeth.UpdateState()
- addr, _ := self.ethereum.Etherbase()
-
- // initialise the registry contracts
- reg := registrar.New(self.xeth)
- registrar.GlobalRegistrarAddr = "0x0"
-
- var txG, txH, txU string
- txG, err = reg.SetGlobalRegistrar("", addr)
- if err != nil {
- t.Fatalf("error creating GlobalRegistrar: %v", err)
- }
- if !processTxs(self, t, 1) {
- t.Fatalf("error mining txs")
- }
- recG := self.xeth.GetTxReceipt(common.HexToHash(txG))
- if recG == nil {
- t.Fatalf("blockchain error creating GlobalRegistrar")
- }
- registrar.GlobalRegistrarAddr = recG.ContractAddress.Hex()
-
- txH, err = reg.SetHashReg("", addr)
- if err != nil {
- t.Errorf("error creating HashReg: %v", err)
- }
- if !processTxs(self, t, 1) {
- t.Errorf("error mining txs")
- }
- recH := self.xeth.GetTxReceipt(common.HexToHash(txH))
- if recH == nil {
- t.Fatalf("blockchain error creating HashReg")
- }
- registrar.HashRegAddr = recH.ContractAddress.Hex()
-
- txU, err = reg.SetUrlHint("", addr)
- if err != nil {
- t.Errorf("error creating UrlHint: %v", err)
- }
- if !processTxs(self, t, 1) {
- t.Errorf("error mining txs")
- }
- recU := self.xeth.GetTxReceipt(common.HexToHash(txU))
- if recU == nil {
- t.Fatalf("blockchain error creating UrlHint")
- }
- registrar.UrlHintAddr = recU.ContractAddress.Hex()
-
- return
-}
-
-// end to end test
-func TestNatspecE2E(t *testing.T) {
- t.Skip()
-
- tf := testInit(t)
- defer tf.ethereum.Stop()
- addr, _ := tf.ethereum.Etherbase()
-
- // create a contractInfo file (mock cloud-deployed contract metadocs)
- // incidentally this is the info for the HashReg contract itself
- ioutil.WriteFile("/tmp/"+testFileName, []byte(testContractInfo), os.ModePerm)
- dochash := crypto.Keccak256Hash([]byte(testContractInfo))
-
- // take the codehash for the contract we wanna test
- codeb := tf.xeth.CodeAtBytes(registrar.HashRegAddr)
- codehash := crypto.Keccak256Hash(codeb)
-
- reg := registrar.New(tf.xeth)
- _, err := reg.SetHashToHash(addr, codehash, dochash)
- if err != nil {
- t.Errorf("error registering: %v", err)
- }
- _, err = reg.SetUrlToHash(addr, dochash, "file:///"+testFileName)
- if err != nil {
- t.Errorf("error registering: %v", err)
- }
- if !processTxs(tf, t, 5) {
- return
- }
-
- // NatSpec info for register method of HashReg contract installed
- // now using the same transactions to check confirm messages
-
- tf.wantNatSpec = true // this is set so now the backend uses natspec confirmation
- _, err = reg.SetHashToHash(addr, codehash, dochash)
- if err != nil {
- t.Errorf("error calling contract registry: %v", err)
- }
-
- fmt.Printf("GlobalRegistrar: %v, HashReg: %v, UrlHint: %v\n", registrar.GlobalRegistrarAddr, registrar.HashRegAddr, registrar.UrlHintAddr)
- if tf.lastConfirm != testExpNotice {
- t.Errorf("Wrong confirm message. expected\n'%v', got\n'%v'", testExpNotice, tf.lastConfirm)
- }
-
- // test unknown method
- exp := fmt.Sprintf(testExpNotice2, registrar.HashRegAddr)
- _, err = reg.SetOwner(addr)
- if err != nil {
- t.Errorf("error setting owner: %v", err)
- }
-
- if tf.lastConfirm != exp {
- t.Errorf("Wrong confirm message, expected\n'%v', got\n'%v'", exp, tf.lastConfirm)
- }
-
- // test unknown contract
- exp = fmt.Sprintf(testExpNotice3, registrar.UrlHintAddr)
-
- _, err = reg.SetUrlToHash(addr, dochash, "file:///test.content")
- if err != nil {
- t.Errorf("error registering: %v", err)
- }
-
- if tf.lastConfirm != exp {
- t.Errorf("Wrong confirm message, expected '%v', got '%v'", exp, tf.lastConfirm)
- }
-
-}
-
-func pendingTransactions(repl *testFrontend, t *testing.T) (txc int64, err error) {
- txs := repl.ethereum.TxPool().GetTransactions()
- return int64(len(txs)), nil
-}
-
-func processTxs(repl *testFrontend, t *testing.T, expTxc int) bool {
- var txc int64
- var err error
- for i := 0; i < 50; i++ {
- txc, err = pendingTransactions(repl, t)
- if err != nil {
- t.Errorf("unexpected error checking pending transactions: %v", err)
- return false
- }
- if expTxc < int(txc) {
- t.Errorf("too many pending transactions: expected %v, got %v", expTxc, txc)
- return false
- } else if expTxc == int(txc) {
- break
- }
- time.Sleep(100 * time.Millisecond)
- }
- if int(txc) != expTxc {
- t.Errorf("incorrect number of pending transactions, expected %v, got %v", expTxc, txc)
- return false
- }
-
- err = repl.ethereum.StartMining(runtime.NumCPU(), "")
- if err != nil {
- t.Errorf("unexpected error mining: %v", err)
- return false
- }
- defer repl.ethereum.StopMining()
-
- timer := time.NewTimer(100 * time.Second)
- height := new(big.Int).Add(repl.xeth.CurrentBlock().Number(), big.NewInt(1))
- repl.wait <- height
- select {
- case <-timer.C:
- // if times out make sure the xeth loop does not block
- go func() {
- select {
- case repl.wait <- nil:
- case <-repl.wait:
- }
- }()
- case <-repl.wait:
- }
- txc, err = pendingTransactions(repl, t)
- if err != nil {
- t.Errorf("unexpected error checking pending transactions: %v", err)
- return false
- }
- if txc != 0 {
- t.Errorf("%d trasactions were not mined", txc)
- return false
- }
- return true
-}
diff --git a/common/natspec/natspec_js.go b/common/natspec/natspec_js.go
deleted file mode 100644
index 0375bb4d5..000000000
--- a/common/natspec/natspec_js.go
+++ /dev/null
@@ -1,4060 +0,0 @@
-// Copyright 2015 The go-ethereum Authors
-// This file is part of the go-ethereum library.
-//
-// The go-ethereum library is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Lesser General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// The go-ethereum library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
-
-package natspec
-
-const natspecJS = //`require=function t(e,n,r){function i(f,u){if(!n[f]){if(!e[f]){var s="function"==typeof require&&require;if(!u&&s)return s(f,!0);if(o)return o(f,!0);var c=new Error("Cannot find module '"+f+"'");throw c.code="MODULE_NOT_FOUND",c}var a=n[f]={exports:{}};e[f][0].call(a.exports,function(t){var n=e[f][1][t];return i(n?n:t)},a,a.exports,t,e,n,r)}return n[f].exports}for(var o="function"==typeof require&&require,f=0;f<r.length;f++)i(r[f]);return i}({1:[function(){},{}],2:[function(t,e){function n(){if(!f){f=!0;for(var t,e=o.length;e;){t=o,o=[];for(var n=-1;++n<e;)t[n]();e=o.length}f=!1}}function r(){}var i=e.exports={},o=[],f=!1;i.nextTick=function(t){o.push(t),f||setTimeout(n,0)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.on=r,i.addListener=r,i.once=r,i.off=r,i.removeListener=r,i.removeAllListeners=r,i.emit=r,i.binding=function(){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],3:[function(t,e){var n=t("./utils"),r=t("./types"),i=t("./const"),o=t("./formatters"),f=function(t){console.error("parser does not support type: "+t)},u=function(t){return"[]"===t.slice(-2)},s=function(t,e){return u(t)||"string"===t?o.formatInputInt(e.length):""},c=r.inputTypes(),a=function(t,e){var n="",r="",i="";return t.forEach(function(t,r){n+=s(t.type,e[r])}),t.forEach(function(n,o){for(var s=!1,a=0;a<c.length&&!s;a++)s=c[a].type(t[o].type,e[o]);s||f(t[o].type);var l=c[a-1].format;u(t[o].type)?i+=e[o].reduce(function(t,e){return t+l(e)},""):"string"===t[o].type?i+=l(e[o]):r+=l(e[o])}),n+=r+i},l=function(t){return u(t)||"string"===t?2*i.ETH_PADDING:0},p=r.outputTypes(),h=function(t,e){e=e.slice(2);var n=[],s=2*i.ETH_PADDING,c=t.reduce(function(t,e){return t+l(e.type)},0),a=e.slice(0,c);return e=e.slice(c),t.forEach(function(i,c){for(var l=!1,h=0;h<p.length&&!l;h++)l=p[h].type(t[c].type);l||f(t[c].type);var g=p[h-1].format;if(u(t[c].type)){var m=o.formatOutputUInt(a.slice(0,s));a=a.slice(s);for(var d=[],v=0;m>v;v++)d.push(g(e.slice(0,s))),e=e.slice(s);n.push(d)}else r.prefixedType("string")(t[c].type)?(a=a.slice(s),n.push(g(e.slice(0,s))),e=e.slice(s)):(n.push(g(e.slice(0,s))),e=e.slice(s))}),n},g=function(t){var e={};return t.forEach(function(t){var r=n.extractDisplayName(t.name),i=n.extractTypeName(t.name),o=function(){var e=Array.prototype.slice.call(arguments);return a(t.inputs,e)};void 0===e[r]&&(e[r]=o),e[r][i]=o}),e},m=function(t){var e={};return t.forEach(function(t){var r=n.extractDisplayName(t.name),i=n.extractTypeName(t.name),o=function(e){return h(t.outputs,e)};void 0===e[r]&&(e[r]=o),e[r][i]=o}),e};e.exports={inputParser:g,outputParser:m,formatInput:a,formatOutput:h}},{"./const":4,"./formatters":5,"./types":6,"./utils":7}],4:[function(t,e){(function(n){if("build"!==n.env.NODE_ENV)var r=t("bignumber.js");var i=["wei","Kwei","Mwei","Gwei","szabo","finney","ether","grand","Mether","Gether","Tether","Pether","Eether","Zether","Yether","Nether","Dether","Vether","Uether"];e.exports={ETH_PADDING:32,ETH_SIGNATURE_LENGTH:4,ETH_UNITS:i,ETH_BIGNUMBER_ROUNDING_MODE:{ROUNDING_MODE:r.ROUND_DOWN},ETH_POLLING_TIMEOUT:1e3}}).call(this,t("_process"))},{_process:2,"bignumber.js":8}],5:[function(t,e){(function(n){if("build"!==n.env.NODE_ENV)var r=t("bignumber.js");var i=t("./utils"),o=t("./const"),f=function(t,e,n){return new Array(e-t.length+1).join(n?n:"0")+t},u=function(t){var e=2*o.ETH_PADDING;return t instanceof r||"number"==typeof t?("number"==typeof t&&(t=new r(t)),r.config(o.ETH_BIGNUMBER_ROUNDING_MODE),t=t.round(),t.lessThan(0)&&(t=new r("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16).plus(t).plus(1)),t=t.toString(16)):t=0===t.indexOf("0x")?t.substr(2):"string"==typeof t?u(new r(t)):(+t).toString(16),f(t,e)},s=function(t){return i.fromAscii(t,o.ETH_PADDING).substr(2)},c=function(t){return"000000000000000000000000000000000000000000000000000000000000000"+(t?"1":"0")},a=function(t){return u(new r(t).times(new r(2).pow(128)))},l=function(t){return"1"===new r(t.substr(0,1),16).toString(2).substr(0,1)},p=function(t){return t=t||"0",l(t)?new r(t,16).minus(new r("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16)).minus(1):new r(t,16)},h=function(t){return t=t||"0",new r(t,16)},g=function(t){return p(t).dividedBy(new r(2).pow(128))},m=function(t){return h(t).dividedBy(new r(2).pow(128))},d=function(t){return"0x"+t},v=function(t){return"0000000000000000000000000000000000000000000000000000000000000001"===t?!0:!1},w=function(t){return i.toAscii(t)},y=function(t){return"0x"+t.slice(t.length-40,t.length)};e.exports={formatInputInt:u,formatInputString:s,formatInputBool:c,formatInputReal:a,formatOutputInt:p,formatOutputUInt:h,formatOutputReal:g,formatOutputUReal:m,formatOutputHash:d,formatOutputBool:v,formatOutputString:w,formatOutputAddress:y}}).call(this,t("_process"))},{"./const":4,"./utils":7,_process:2,"bignumber.js":8}],6:[function(t,e){var n=t("./formatters"),r=function(t){return function(e){return 0===e.indexOf(t)}},i=function(t){return function(e){return t===e}},o=function(){return[{type:r("uint"),format:n.formatInputInt},{type:r("int"),format:n.formatInputInt},{type:r("hash"),format:n.formatInputInt},{type:r("string"),format:n.formatInputString},{type:r("real"),format:n.formatInputReal},{type:r("ureal"),format:n.formatInputReal},{type:i("address"),format:n.formatInputInt},{type:i("bool"),format:n.formatInputBool}]},f=function(){return[{type:r("uint"),format:n.formatOutputUInt},{type:r("int"),format:n.formatOutputInt},{type:r("hash"),format:n.formatOutputHash},{type:r("string"),format:n.formatOutputString},{type:r("real"),format:n.formatOutputReal},{type:r("ureal"),format:n.formatOutputUReal},{type:i("address"),format:n.formatOutputAddress},{type:i("bool"),format:n.formatOutputBool}]};e.exports={prefixedType:r,namedType:i,inputTypes:o,outputTypes:f}},{"./formatters":5}],7:[function(t,e){var n=t("./const"),r=function(t,e){for(var n=!1,r=0;r<t.length&&!n;r++)n=e(t[r]);return n?r-1:-1},i=function(t){var e="",n=0,r=t.length;for("0x"===t.substring(0,2)&&(n=2);r>n;n+=2){var i=parseInt(t.substr(n,2),16);if(0===i)break;e+=String.fromCharCode(i)}return e},o=function(t){for(var e="",n=0;n<t.length;n++){var r=t.charCodeAt(n).toString(16);e+=r.length<2?"0"+r:r}return e},f=function(t,e){e=void 0===e?0:e;for(var n=o(t);n.length<2*e;)n+="00";return"0x"+n},u=function(t){var e=t.indexOf("(");return-1!==e?t.substr(0,e):t},s=function(t){var e=t.indexOf("(");return-1!==e?t.substr(e+1,t.length-1-(e+1)).replace(" ",""):""},c=function(t){return t.filter(function(t){return"function"===t.type})},a=function(t){return t.filter(function(t){return"event"===t.type})},l=function(t){for(var e="string"==typeof t?0===t.indexOf("0x")?parseInt(t.substr(2),16):parseInt(t):t,r=0,i=n.ETH_UNITS;e>3e3&&r<i.length-1;)e/=1e3,r++;for(var o=e.toString().length<e.toFixed(2).length?e.toString():e.toFixed(2),f=function(t,e,n){return e+","+n};;){var u=o;if(o=o.replace(/(\d)(\d\d\d[\.\,])/,f),u===o)break}return o+" "+i[r]};e.exports={findIndex:r,toAscii:i,fromAscii:f,extractDisplayName:u,extractTypeName:s,filterFunctions:c,filterEvents:a,toEth:l}},{"./const":4}],8:[function(t,e){!function(n){"use strict";function r(t){function e(t,r){var i,o,f,u,s,c,a=this;if(!(a instanceof e))return $&&U(26,"constructor call without new",t),new e(t,r);if(null!=r&&z(r,2,64,L,"base")){if(r=0|r,c=t+"",10==r)return a=new e(t instanceof e?t:c),F(a,B+a.e+1,H);if((u="number"==typeof t)&&0*t!=0||!new RegExp("^-?"+(i="["+N.slice(0,r)+"]+")+"(?:\\."+i+")?$",37>r?"i":"").test(c))return m(a,c,u,r);u?(a.s=0>1/t?(c=c.slice(1),-1):1,$&&c.replace(/^0\.0*|\./,"").length>15&&U(L,O,t),u=!1):a.s=45===c.charCodeAt(0)?(c=c.slice(1),-1):1,c=n(c,10,r,a.s)}else{if(t instanceof e)return a.s=t.s,a.e=t.e,a.c=(t=t.c)?t.slice():t,void(L=0);if((u="number"==typeof t)&&0*t==0){if(a.s=0>1/t?(t=-t,-1):1,t===~~t){for(o=0,f=t;f>=10;f/=10,o++);return a.e=o,a.c=[t],void(L=0)}c=t+""}else{if(!d.test(c=t+""))return m(a,c,u);a.s=45===c.charCodeAt(0)?(c=c.slice(1),-1):1}}for((o=c.indexOf("."))>-1&&(c=c.replace(".","")),(f=c.search(/e/i))>0?(0>o&&(o=f),o+=+c.slice(f+1),c=c.substring(0,f)):0>o&&(o=c.length),f=0;48===c.charCodeAt(f);f++);for(s=c.length;48===c.charCodeAt(--s););if(c=c.slice(f,s+1))if(s=c.length,u&&$&&s>15&&U(L,O,a.s*t),o=o-f-1,o>q)a.c=a.e=null;else if(k>o)a.c=[a.e=0];else{if(a.e=o,a.c=[],f=(o+1)%I,0>o&&(f+=I),s>f){for(f&&a.c.push(+c.slice(0,f)),s-=I;s>f;)a.c.push(+c.slice(f,f+=I));c=c.slice(f),f=I-c.length}else f-=s;for(;f--;c+="0");a.c.push(+c)}else a.c=[a.e=0];L=0}function n(t,n,r,i){var f,u,s,a,p,h,g,m=t.indexOf("."),d=B,v=H;for(37>r&&(t=t.toLowerCase()),m>=0&&(s=Y,Y=0,t=t.replace(".",""),g=new e(r),p=g.pow(t.length-m),Y=s,g.c=c(l(o(p.c),p.e),10,n),g.e=g.c.length),h=c(t,r,n),u=s=h.length;0==h[--s];h.pop());if(!h[0])return"0";if(0>m?--u:(p.c=h,p.e=u,p.s=i,p=G(p,g,d,v,n),h=p.c,a=p.r,u=p.e),f=u+d+1,m=h[f],s=n/2,a=a||0>f||null!=h[f+1],a=4>v?(null!=m||a)&&(0==v||v==(p.s<0?3:2)):m>s||m==s&&(4==v||a||6==v&&1&h[f-1]||v==(p.s<0?8:7)),1>f||!h[0])t=a?l("1",-d):"0";else{if(h.length=f,a)for(--n;++h[--f]>n;)h[f]=0,f||(++u,h.unshift(1));for(s=h.length;!h[--s];);for(m=0,t="";s>=m;t+=N.charAt(h[m++]));t=l(t,u)}return t}function h(t,n,r,i){var f,u,s,c,p;if(r=null!=r&&z(r,0,8,i,b)?0|r:H,!t.c)return t.toString();if(f=t.c[0],s=t.e,null==n)p=o(t.c),p=19==i||24==i&&C>=s?a(p,s):l(p,s);else if(t=F(new e(t),n,r),u=t.e,p=o(t.c),c=p.length,19==i||24==i&&(u>=n||C>=u)){for(;n>c;p+="0",c++);p=a(p,u)}else if(n-=s,p=l(p,u),u+1>c){if(--n>0)for(p+=".";n--;p+="0");}else if(n+=u-c,n>0)for(u+1==c&&(p+=".");n--;p+="0");return t.s<0&&f?"-"+p:p}function S(t,n){var r,i,o=0;for(s(t[0])&&(t=t[0]),r=new e(t[0]);++o<t.length;){if(i=new e(t[o]),!i.s){r=i;break}n.call(r,i)&&(r=i)}return r}function A(t,e,n,r,i){return(e>t||t>n||t!=p(t))&&U(r,(i||"decimal places")+(e>t||t>n?" out of range":" not an integer"),t),!0}function R(t,e,n){for(var r=1,i=e.length;!e[--i];e.pop());for(i=e[0];i>=10;i/=10,r++);return(n=r+n*I-1)>q?t.c=t.e=null:k>n?t.c=[t.e=0]:(t.e=n,t.c=e),t}function U(t,e,n){var r=new Error(["new BigNumber","cmp","config","div","divToInt","eq","gt","gte","lt","lte","minus","mod","plus","precision","random","round","shift","times","toDigits","toExponential","toFixed","toFormat","toFraction","pow","toPrecision","toString","BigNumber"][t]+"() "+e+": "+n);throw r.name="BigNumber Error",L=0,r}function F(t,e,n,r){var i,o,f,u,s,c,a,l=t.c,p=_;if(l){t:{for(i=1,u=l[0];u>=10;u/=10,i++);if(o=e-i,0>o)o+=I,f=e,s=l[c=0],a=s/p[i-f-1]%10|0;else if(c=v((o+1)/I),c>=l.length){if(!r)break t;for(;l.length<=c;l.push(0));s=a=0,i=1,o%=I,f=o-I+1}else{for(s=u=l[c],i=1;u>=10;u/=10,i++);o%=I,f=o-I+i,a=0>f?0:s/p[i-f-1]%10|0}if(r=r||0>e||null!=l[c+1]||(0>f?s:s%p[i-f-1]),r=4>n?(a||r)&&(0==n||n==(t.s<0?3:2)):a>5||5==a&&(4==n||r||6==n&&(o>0?f>0?s/p[i-f]:0:l[c-1])%10&1||n==(t.s<0?8:7)),1>e||!l[0])return l.length=0,r?(e-=t.e+1,l[0]=p[e%I],t.e=-e||0):l[0]=t.e=0,t;if(0==o?(l.length=c,u=1,c--):(l.length=c+1,u=p[I-o],l[c]=f>0?w(s/p[i-f]%p[f])*u:0),r)for(;;){if(0==c){for(o=1,f=l[0];f>=10;f/=10,o++);for(f=l[0]+=u,u=1;f>=10;f/=10,u++);o!=u&&(t.e++,l[0]==E&&(l[0]=1));break}if(l[c]+=u,l[c]!=E)break;l[c--]=0,u=1}for(o=l.length;0===l[--o];l.pop());}t.e>q?t.c=t.e=null:t.e<k&&(t.c=[t.e=0])}return t}var G,L=0,M=e.prototype,P=new e(1),B=20,H=4,C=-7,j=21,k=-1e7,q=1e7,$=!0,z=A,V=!1,W=1,Y=100,Z={decimalSeparator:".",groupSeparator:",",groupSize:3,secondaryGroupSize:0,fractionGroupSeparator:" ",fractionGroupSize:0};return e.another=r,e.ROUND_UP=0,e.ROUND_DOWN=1,e.ROUND_CEIL=2,e.ROUND_FLOOR=3,e.ROUND_HALF_UP=4,e.ROUND_HALF_DOWN=5,e.ROUND_HALF_EVEN=6,e.ROUND_HALF_CEIL=7,e.ROUND_HALF_FLOOR=8,e.EUCLID=9,e.config=function(){var t,e,n=0,r={},i=arguments,o=i[0],f=o&&"object"==typeof o?function(){return o.hasOwnProperty(e)?null!=(t=o[e]):void 0}:function(){return i.length>n?null!=(t=i[n++]):void 0};return f(e="DECIMAL_PLACES")&&z(t,0,D,2,e)&&(B=0|t),r[e]=B,f(e="ROUNDING_MODE")&&z(t,0,8,2,e)&&(H=0|t),r[e]=H,f(e="EXPONENTIAL_AT")&&(s(t)?z(t[0],-D,0,2,e)&&z(t[1],0,D,2,e)&&(C=0|t[0],j=0|t[1]):z(t,-D,D,2,e)&&(C=-(j=0|(0>t?-t:t)))),r[e]=[C,j],f(e="RANGE")&&(s(t)?z(t[0],-D,-1,2,e)&&z(t[1],1,D,2,e)&&(k=0|t[0],q=0|t[1]):z(t,-D,D,2,e)&&(0|t?k=-(q=0|(0>t?-t:t)):$&&U(2,e+" cannot be zero",t))),r[e]=[k,q],f(e="ERRORS")&&(t===!!t||1===t||0===t?(L=0,z=($=!!t)?A:u):$&&U(2,e+y,t)),r[e]=$,f(e="CRYPTO")&&(t===!!t||1===t||0===t?(V=!(!t||!g||"object"!=typeof g),t&&!V&&$&&U(2,"crypto unavailable",g)):$&&U(2,e+y,t)),r[e]=V,f(e="MODULO_MODE")&&z(t,0,9,2,e)&&(W=0|t),r[e]=W,f(e="POW_PRECISION")&&z(t,0,D,2,e)&&(Y=0|t),r[e]=Y,f(e="FORMAT")&&("object"==typeof t?Z=t:$&&U(2,e+" not an object",t)),r[e]=Z,r},e.max=function(){return S(arguments,M.lt)},e.min=function(){return S(arguments,M.gt)},e.random=function(){var t=9007199254740992,n=Math.random()*t&2097151?function(){return w(Math.random()*t)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(t){var r,i,o,f,u,s=0,c=[],a=new e(P);if(t=null!=t&&z(t,0,D,14)?0|t:B,f=v(t/I),V)if(g&&g.getRandomValues){for(r=g.getRandomValues(new Uint32Array(f*=2));f>s;)u=131072*r[s]+(r[s+1]>>>11),u>=9e15?(i=g.getRandomValues(new Uint32Array(2)),r[s]=i[0],r[s+1]=i[1]):(c.push(u%1e14),s+=2);s=f/2}else if(g&&g.randomBytes){for(r=g.randomBytes(f*=7);f>s;)u=281474976710656*(31&r[s])+1099511627776*r[s+1]+4294967296*r[s+2]+16777216*r[s+3]+(r[s+4]<<16)+(r[s+5]<<8)+r[s+6],u>=9e15?g.randomBytes(7).copy(r,s):(c.push(u%1e14),s+=7);s=f/7}else $&&U(14,"crypto unavailable",g);if(!s)for(;f>s;)u=n(),9e15>u&&(c[s++]=u%1e14);for(f=c[--s],t%=I,f&&t&&(u=_[I-t],c[s]=w(f/u)*u);0===c[s];c.pop(),s--);if(0>s)c=[o=0];else{for(o=-1;0===c[0];c.shift(),o-=I);for(s=1,u=c[0];u>=10;u/=10,s++);I>s&&(o-=I-s)}return a.e=o,a.c=c,a}}(),G=function(){function t(t,e,n){var r,i,o,f,u=0,s=t.length,c=e%T,a=e/T|0;for(t=t.slice();s--;)o=t[s]%T,f=t[s]/T|0,r=a*o+f*c,i=c*o+r%T*T+u,u=(i/n|0)+(r/T|0)+a*f,t[s]=i%n;return u&&t.unshift(u),t}function n(t,e,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;n>i;i++)if(t[i]!=e[i]){o=t[i]>e[i]?1:-1;break}return o}function r(t,e,n,r){for(var i=0;n--;)t[n]-=i,i=t[n]<e[n]?1:0,t[n]=i*r+t[n]-e[n];for(;!t[0]&&t.length>1;t.shift());}return function(o,f,u,s,c){var a,l,p,h,g,m,d,v,y,b,O,N,x,_,T,D,S,A=o.s==f.s?1:-1,R=o.c,U=f.c;if(!(R&&R[0]&&U&&U[0]))return new e(o.s&&f.s&&(R?!U||R[0]!=U[0]:U)?R&&0==R[0]||!U?0*A:A/0:0/0);for(v=new e(A),y=v.c=[],l=o.e-f.e,A=u+l+1,c||(c=E,l=i(o.e/I)-i(f.e/I),A=A/I|0),p=0;U[p]==(R[p]||0);p++);if(U[p]>(R[p]||0)&&l--,0>A)y.push(1),h=!0;else{for(_=R.length,D=U.length,p=0,A+=2,g=w(c/(U[0]+1)),g>1&&(U=t(U,g,c),R=t(R,g,c),D=U.length,_=R.length),x=D,b=R.slice(0,D),O=b.length;D>O;b[O++]=0);S=U.slice(),S.unshift(0),T=U[0],U[1]>=c/2&&T++;do g=0,a=n(U,b,D,O),0>a?(N=b[0],D!=O&&(N=N*c+(b[1]||0)),g=w(N/T),g>1?(g>=c&&(g=c-1),m=t(U,g,c),d=m.length,O=b.length,a=n(m,b,d,O),1==a&&(g--,r(m,d>D?S:U,d,c))):(0==g&&(a=g=1),m=U.slice()),d=m.length,O>d&&m.unshift(0),r(b,m,O,c),-1==a&&(O=b.length,a=n(U,b,D,O),1>a&&(g++,r(b,O>D?S:U,O,c))),O=b.length):0===a&&(g++,b=[0]),y[p++]=g,a&&b[0]?b[O++]=R[x]||0:(b=[R[x]],O=1);while((x++<_||null!=b[0])&&A--);h=null!=b[0],y[0]||y.shift()}if(c==E){for(p=1,A=y[0];A>=10;A/=10,p++);F(v,u+(v.e=p+l*I-1)+1,s,h)}else v.e=l,v.r=+h;return v}}(),m==function(){var t=/^(-?)0([xbo])(\w[\w.]*$)/i,n=/^([^.]+)\.$/,r=/^\.([^.]+)$/,i=/^-?(Infinity|NaN)$/,o=/^\s*\+([\w.])|^\s+|\s+$/g;return function(f,u,s,c){var a,l=s?u:u.replace(o,"$1");if(i.test(l))f.s=isNaN(l)?null:0>l?-1:1;else{if(!s&&(l=l.replace(t,function(t,e,n){return a="x"==(n=n.toLowerCase())?16:"b"==n?2:8,c&&c!=a?t:e}),c&&(a=c,l=l.replace(n,"$1").replace(r,"0.$1")),u!=l))return new e(l,a);$&&U(L,"not a"+(c?" base "+c:"")+" number",u),f.s=null}f.c=f.e=null,L=0}}(),M.absoluteValue=M.abs=function(){var t=new e(this);return t.s<0&&(t.s=1),t},M.ceil=function(){return F(new e(this),this.e+1,2)},M.comparedTo=M.cmp=function(t,n){return L=1,f(this,new e(t,n))},M.decimalPlaces=M.dp=function(){var t,e,n=this.c;if(!n)return null;if(t=((e=n.length-1)-i(this.e/I))*I,e=n[e])for(;e%10==0;e/=10,t--);return 0>t&&(t=0),t},M.dividedBy=M.div=function(t,n){return L=3,G(this,new e(t,n),B,H)},M.dividedToIntegerBy=M.divToInt=function(t,n){return L=4,G(this,new e(t,n),0,1)},M.equals=M.eq=function(t,n){return L=5,0===f(this,new e(t,n))},M.floor=function(){return F(new e(this),this.e+1,3)},M.greaterThan=M.gt=function(t,n){return L=6,f(this,new e(t,n))>0},M.greaterThanOrEqualTo=M.gte=function(t,n){return L=7,1===(n=f(this,new e(t,n)))||0===n},M.isFinite=function(){return!!this.c},M.isInteger=M.isInt=function(){return!!this.c&&i(this.e/I)>this.c.length-2},M.isNaN=function(){return!this.s},M.isNegative=M.isNeg=function(){return this.s<0},M.isZero=function(){return!!this.c&&0==this.c[0]},M.lessThan=M.lt=function(t,n){return L=8,f(this,new e(t,n))<0},M.lessThanOrEqualTo=M.lte=function(t,n){return L=9,-1===(n=f(this,new e(t,n)))||0===n},M.minus=M.sub=function(t,n){var r,o,f,u,s=this,c=s.s;if(L=10,t=new e(t,n),n=t.s,!c||!n)return new e(0/0);if(c!=n)return t.s=-n,s.plus(t);var a=s.e/I,l=t.e/I,p=s.c,h=t.c;if(!a||!l){if(!p||!h)return p?(t.s=-n,t):new e(h?s:0/0);if(!p[0]||!h[0])return h[0]?(t.s=-n,t):new e(p[0]?s:3==H?-0:0)}if(a=i(a),l=i(l),p=p.slice(),c=a-l){for((u=0>c)?(c=-c,f=p):(l=a,f=h),f.reverse(),n=c;n--;f.push(0));f.reverse()}else for(o=(u=(c=p.length)<(n=h.length))?c:n,c=n=0;o>n;n++)if(p[n]!=h[n]){u=p[n]<h[n];break}if(u&&(f=p,p=h,h=f,t.s=-t.s),n=(o=h.length)-(r=p.length),n>0)for(;n--;p[r++]=0);for(n=E-1;o>c;){if(p[--o]<h[o]){for(r=o;r&&!p[--r];p[r]=n);--p[r],p[o]+=E}p[o]-=h[o]}for(;0==p[0];p.shift(),--l);return p[0]?R(t,p,l):(t.s=3==H?-1:1,t.c=[t.e=0],t)},M.modulo=M.mod=function(t,n){var r,i,o=this;return L=11,t=new e(t,n),!o.c||!t.s||t.c&&!t.c[0]?new e(0/0):!t.c||o.c&&!o.c[0]?new e(o):(9==W?(i=t.s,t.s=1,r=G(o,t,0,3),t.s=i,r.s*=i):r=G(o,t,0,W),o.minus(r.times(t)))},M.negated=M.neg=function(){var t=new e(this);return t.s=-t.s||null,t},M.plus=M.add=function(t,n){var r,o=this,f=o.s;if(L=12,t=new e(t,n),n=t.s,!f||!n)return new e(0/0);if(f!=n)return t.s=-n,o.minus(t);var u=o.e/I,s=t.e/I,c=o.c,a=t.c;if(!u||!s){if(!c||!a)return new e(f/0);if(!c[0]||!a[0])return a[0]?t:new e(c[0]?o:0*f)}if(u=i(u),s=i(s),c=c.slice(),f=u-s){for(f>0?(s=u,r=a):(f=-f,r=c),r.reverse();f--;r.push(0));r.reverse()}for(f=c.length,n=a.length,0>f-n&&(r=a,a=c,c=r,n=f),f=0;n;)f=(c[--n]=c[n]+a[n]+f)/E|0,c[n]%=E;return f&&(c.unshift(f),++s),R(t,c,s)},M.precision=M.sd=function(t){var e,n,r=this,i=r.c;if(null!=t&&t!==!!t&&1!==t&&0!==t&&($&&U(13,"argument"+y,t),t!=!!t&&(t=null)),!i)return null;if(n=i.length-1,e=n*I+1,n=i[n]){for(;n%10==0;n/=10,e--);for(n=i[0];n>=10;n/=10,e++);}return t&&r.e+1>e&&(e=r.e+1),e},M.round=function(t,n){var r=new e(this);return(null==t||z(t,0,D,15))&&F(r,~~t+this.e+1,null!=n&&z(n,0,8,15,b)?0|n:H),r},M.shift=function(t){var n=this;return z(t,-x,x,16,"argument")?n.times("1e"+p(t)):new e(n.c&&n.c[0]&&(-x>t||t>x)?n.s*(0>t?0:1/0):n)},M.squareRoot=M.sqrt=function(){var t,n,r,f,u,s=this,c=s.c,a=s.s,l=s.e,p=B+4,h=new e("0.5");if(1!==a||!c||!c[0])return new e(!a||0>a&&(!c||c[0])?0/0:c?s:1/0);if(a=Math.sqrt(+s),0==a||a==1/0?(n=o(c),(n.length+l)%2==0&&(n+="0"),a=Math.sqrt(n),l=i((l+1)/2)-(0>l||l%2),a==1/0?n="1e"+l:(n=a.toExponential(),n=n.slice(0,n.indexOf("e")+1)+l),r=new e(n)):r=new e(a+""),r.c[0])for(l=r.e,a=l+p,3>a&&(a=0);;)if(u=r,r=h.times(u.plus(G(s,u,p,1))),o(u.c).slice(0,a)===(n=o(r.c)).slice(0,a)){if(r.e<l&&--a,n=n.slice(a-3,a+1),"9999"!=n&&(f||"4999"!=n)){(!+n||!+n.slice(1)&&"5"==n.charAt(0))&&(F(r,r.e+B+2,1),t=!r.times(r).eq(s));break}if(!f&&(F(u,u.e+B+2,0),u.times(u).eq(s))){r=u;break}p+=4,a+=4,f=1}return F(r,r.e+B+1,H,t)},M.times=M.mul=function(t,n){var r,o,f,u,s,c,a,l,p,h,g,m,d,v,w,y=this,b=y.c,O=(L=17,t=new e(t,n)).c;if(!(b&&O&&b[0]&&O[0]))return!y.s||!t.s||b&&!b[0]&&!O||O&&!O[0]&&!b?t.c=t.e=t.s=null:(t.s*=y.s,b&&O?(t.c=[0],t.e=0):t.c=t.e=null),t;for(o=i(y.e/I)+i(t.e/I),t.s*=y.s,a=b.length,h=O.length,h>a&&(d=b,b=O,O=d,f=a,a=h,h=f),f=a+h,d=[];f--;d.push(0));for(v=E,w=T,f=h;--f>=0;){for(r=0,g=O[f]%w,m=O[f]/w|0,s=a,u=f+s;u>f;)l=b[--s]%w,p=b[s]/w|0,c=m*l+p*g,l=g*l+c%w*w+d[u]+r,r=(l/v|0)+(c/w|0)+m*p,d[u--]=l%v;d[u]=r}return r?++o:d.shift(),R(t,d,o)},M.toDigits=function(t,n){var r=new e(this);return t=null!=t&&z(t,1,D,18,"precision")?0|t:null,n=null!=n&&z(n,0,8,18,b)?0|n:H,t?F(r,t,n):r},M.toExponential=function(t,e){return h(this,null!=t&&z(t,0,D,19)?~~t+1:null,e,19)},M.toFixed=function(t,e){return h(this,null!=t&&z(t,0,D,20)?~~t+this.e+1:null,e,20)},M.toFormat=function(t,e){var n=h(this,null!=t&&z(t,0,D,21)?~~t+this.e+1:null,e,21);if(this.c){var r,i=n.split("."),o=+Z.groupSize,f=+Z.secondaryGroupSize,u=Z.groupSeparator,s=i[0],c=i[1],a=this.s<0,l=a?s.slice(1):s,p=l.length;if(f&&(r=o,o=f,f=r,p-=r),o>0&&p>0){for(r=p%o||o,s=l.substr(0,r);p>r;r+=o)s+=u+l.substr(r,o);f>0&&(s+=u+l.slice(r)),a&&(s="-"+s)}n=c?s+Z.decimalSeparator+((f=+Z.fractionGroupSize)?c.replace(new RegExp("\\d{"+f+"}\\B","g"),"$&"+Z.fractionGroupSeparator):c):s}return n},M.toFraction=function(t){var n,r,i,f,u,s,c,a,l,p=$,h=this,g=h.c,m=new e(P),d=r=new e(P),v=c=new e(P);if(null!=t&&($=!1,s=new e(t),$=p,(!(p=s.isInt())||s.lt(P))&&($&&U(22,"max denominator "+(p?"out of range":"not an integer"),t),t=!p&&s.c&&F(s,s.e+1,1).gte(P)?s:null)),!g)return h.toString();for(l=o(g),f=m.e=l.length-h.e-1,m.c[0]=_[(u=f%I)<0?I+u:u],t=!t||s.cmp(m)>0?f>0?m:d:s,u=q,q=1/0,s=new e(l),c.c[0]=0;a=G(s,m,0,1),i=r.plus(a.times(v)),1!=i.cmp(t);)r=v,v=i,d=c.plus(a.times(i=d)),c=i,m=s.minus(a.times(i=m)),s=i;return i=G(t.minus(r),v,0,1),c=c.plus(i.times(d)),r=r.plus(i.times(v)),c.s=d.s=h.s,f*=2,n=G(d,v,f,H).minus(h).abs().cmp(G(c,r,f,H).minus(h).abs())<1?[d.toString(),v.toString()]:[c.toString(),r.toString()],q=u,n},M.toNumber=function(){var t=this;return+t||(t.s?0*t.s:0/0)},M.toPower=M.pow=function(t){var n,r,i=w(0>t?-t:+t),o=this;if(!z(t,-x,x,23,"exponent")&&(!isFinite(t)||i>x&&(t/=0)||parseFloat(t)!=t&&!(t=0/0)))return new e(Math.pow(+o,t));for(n=Y?v(Y/I+2):0,r=new e(P);;){if(i%2){if(r=r.times(o),!r.c)break;n&&r.c.length>n&&(r.c.length=n)}if(i=w(i/2),!i)break;o=o.times(o),n&&o.c&&o.c.length>n&&(o.c.length=n)}return 0>t&&(r=P.div(r)),n?F(r,Y,H):r},M.toPrecision=function(t,e){return h(this,null!=t&&z(t,1,D,24,"precision")?0|t:null,e,24)},M.toString=function(t){var e,r=this,i=r.s,f=r.e;return null===f?i?(e="Infinity",0>i&&(e="-"+e)):e="NaN":(e=o(r.c),e=null!=t&&z(t,2,64,25,"base")?n(l(e,f),0|t,10,i):C>=f||f>=j?a(e,f):l(e,f),0>i&&r.c[0]&&(e="-"+e)),e},M.truncated=M.trunc=function(){return F(new e(this),this.e+1,1)},M.valueOf=M.toJSON=function(){return this.toString()},null!=t&&e.config(t),e}function i(t){var e=0|t;return t>0||t===e?e:e-1}function o(t){for(var e,n,r=1,i=t.length,o=t[0]+"";i>r;){for(e=t[r++]+"",n=I-e.length;n--;e="0"+e);o+=e}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function f(t,e){var n,r,i=t.c,o=e.c,f=t.s,u=e.s,s=t.e,c=e.e;if(!f||!u)return null;if(n=i&&!i[0],r=o&&!o[0],n||r)return n?r?0:-u:f;if(f!=u)return f;if(n=0>f,r=s==c,!i||!o)return r?0:!i^n?1:-1;if(!r)return s>c^n?1:-1;for(u=(s=i.length)<(c=o.length)?s:c,f=0;u>f;f++)if(i[f]!=o[f])return i[f]>o[f]^n?1:-1;return s==c?0:s>c^n?1:-1}function u(t,e,n){return(t=p(t))>=e&&n>=t}function s(t){return"[object Array]"==Object.prototype.toString.call(t)}function c(t,e,n){for(var r,i,o=[0],f=0,u=t.length;u>f;){for(i=o.length;i--;o[i]*=e);for(o[r=0]+=N.indexOf(t.charAt(f++));r<o.length;r++)o[r]>n-1&&(null==o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}function a(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(0>e?"e":"e+")+e}function l(t,e){var n,r;if(0>e){for(r="0.";++e;r+="0");t=r+t}else if(n=t.length,++e>n){for(r="0",e-=n;--e;r+="0");t+=r}else n>e&&(t=t.slice(0,e)+"."+t.slice(e));return t}function p(t){return t=parseFloat(t),0>t?v(t):w(t)}var h,g,m,d=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,v=Math.ceil,w=Math.floor,y=" not a boolean or binary digit",b="rounding mode",O="number type has more than 15 significant digits",N="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_",E=1e14,I=14,x=9007199254740991,_=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],T=1e7,D=1e9;if(h=r(),"function"==typeof define&&define.amd)define(function(){return h});else if("undefined"!=typeof e&&e.exports){if(e.exports=h,!g)try{g=t("crypto")}catch(S){}}else n.BigNumber=h}(this)},{crypto:1}],natspec:[function(t,e){var n=t("./node_modules/ethereum.js/lib/abi.js"),r=function(){var t=function(t,e){Object.keys(t).forEach(function(n){e[n]=t[n]})},e=function(t){return Object.keys(t).reduce(function(t,e){return t+"var "+e+" = context['"+e+"'];\n"},"")},r=function(t,e){return t.filter(function(t){return t.name===e})[0]},i=function(t,e){var r=n.formatOutput(t.inputs,"0x"+e.params[0].data.slice(10));return t.inputs.reduce(function(t,e,n){return t[e.name]=r[n],t},{})},o=function(t,e){var n,r="",i=/\` + "`" + `(?:\\.|[^` + "`" + `\\])*\` + "`" + `/gim,o=0;try{for(;null!==(n=i.exec(t));){var f=i.lastIndex-n[0].length,u=n[0].slice(1,n[0].length-1);r+=t.slice(o,f);var s=e(u);r+=s,o=i.lastIndex}r+=t.slice(o)}catch(c){throw new Error("Natspec evaluation failed, wrong input params")}return r},f=function(n,f){var u={};if(f)try{var s=r(f.abi,f.method),c=i(s,f.transaction);t(c,u)}catch(a){throw new Error("Natspec evaluation failed, method does not exist")}var l=e(u),p=o(n,function(t){var e=new Function("context",l+"return "+t+";");return e(u).toString()});return p},u=function(t,e){try{return f(t,e)}catch(n){return n.message}};return{evaluateExpression:f,evaluateExpressionSafe:u}}();e.exports=r},{"./node_modules/ethereum.js/lib/abi.js":3}]},{},[]);
-`
-require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
-
-},{}],2:[function(require,module,exports){
-/*
- This file is part of ethereum.js.
-
- ethereum.js is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- ethereum.js is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with ethereum.js. If not, see <http://www.gnu.org/licenses/>.
-*/
-/**
- * @file abi.js
- * @author Marek Kotewicz <marek@ethdev.com>
- * @author Gav Wood <g@ethdev.com>
- * @date 2014
- */
-
-var utils = require('../utils/utils');
-var c = require('../utils/config');
-var types = require('./types');
-var f = require('./formatters');
-var solUtils = require('./utils');
-
-/**
- * throw incorrect type error
- *
- * @method throwTypeError
- * @param {String} type
- * @throws incorrect type error
- */
-var throwTypeError = function (type) {
- throw new Error('parser does not support type: ' + type);
-};
-
-/** This method should be called if we want to check if givent type is an array type
- *
- * @method isArrayType
- * @param {String} type name
- * @returns {Boolean} true if it is, otherwise false
- */
-var isArrayType = function (type) {
- return type.slice(-2) === '[]';
-};
-
-/**
- * This method should be called to return dynamic type length in hex
- *
- * @method dynamicTypeBytes
- * @param {String} type
- * @param {String|Array} dynamic type
- * @return {String} length of dynamic type in hex or empty string if type is not dynamic
- */
-var dynamicTypeBytes = function (type, value) {
- // TODO: decide what to do with array of strings
- if (isArrayType(type) || type === 'bytes')
- return f.formatInputInt(value.length);
- return "";
-};
-
-var inputTypes = types.inputTypes();
-
-/**
- * Formats input params to bytes
- *
- * @method formatInput
- * @param {Array} abi inputs of method
- * @param {Array} params that will be formatted to bytes
- * @returns bytes representation of input params
- */
-var formatInput = function (inputs, params) {
- var bytes = "";
- var toAppendConstant = "";
- var toAppendArrayContent = "";
-
- /// first we iterate in search for dynamic
- inputs.forEach(function (input, index) {
- bytes += dynamicTypeBytes(input.type, params[index]);
- });
-
- inputs.forEach(function (input, i) {
- /*jshint maxcomplexity:5 */
- var typeMatch = false;
- for (var j = 0; j < inputTypes.length && !typeMatch; j++) {
- typeMatch = inputTypes[j].type(inputs[i].type, params[i]);
- }
- if (!typeMatch) {
- throwTypeError(inputs[i].type);
- }
-
- var formatter = inputTypes[j - 1].format;
-
- if (isArrayType(inputs[i].type))
- toAppendArrayContent += params[i].reduce(function (acc, curr) {
- return acc + formatter(curr);
- }, "");
- else if (inputs[i].type === 'bytes')
- toAppendArrayContent += formatter(params[i]);
- else
- toAppendConstant += formatter(params[i]);
- });
-
- bytes += toAppendConstant + toAppendArrayContent;
-
- return bytes;
-};
-
-/**
- * This method should be called to predict the length of dynamic type
- *
- * @method dynamicBytesLength
- * @param {String} type
- * @returns {Number} length of dynamic type, 0 or multiplication of ETH_PADDING (32)
- */
-var dynamicBytesLength = function (type) {
- if (isArrayType(type) || type === 'bytes')
- return c.ETH_PADDING * 2;
- return 0;
-};
-
-var outputTypes = types.outputTypes();
-
-/**
- * Formats output bytes back to param list
- *
- * @method formatOutput
- * @param {Array} abi outputs of method
- * @param {String} bytes represention of output
- * @returns {Array} output params
- */
-var formatOutput = function (outs, output) {
-
- output = output.slice(2);
- var result = [];
- var padding = c.ETH_PADDING * 2;
-
- var dynamicPartLength = outs.reduce(function (acc, curr) {
- return acc + dynamicBytesLength(curr.type);
- }, 0);
-
- var dynamicPart = output.slice(0, dynamicPartLength);
- output = output.slice(dynamicPartLength);
-
- outs.forEach(function (out, i) {
- /*jshint maxcomplexity:6 */
- var typeMatch = false;
- for (var j = 0; j < outputTypes.length && !typeMatch; j++) {
- typeMatch = outputTypes[j].type(outs[i].type);
- }
-
- if (!typeMatch) {
- throwTypeError(outs[i].type);
- }
-
- var formatter = outputTypes[j - 1].format;
- if (isArrayType(outs[i].type)) {
- var size = f.formatOutputUInt(dynamicPart.slice(0, padding));
- dynamicPart = dynamicPart.slice(padding);
- var array = [];
- for (var k = 0; k < size; k++) {
- array.push(formatter(output.slice(0, padding)));
- output = output.slice(padding);
- }
- result.push(array);
- }
- else if (types.prefixedType('bytes')(outs[i].type)) {
- dynamicPart = dynamicPart.slice(padding);
- result.push(formatter(output.slice(0, padding)));
- output = output.slice(padding);
- } else {
- result.push(formatter(output.slice(0, padding)));
- output = output.slice(padding);
- }
- });
-
- return result;
-};
-
-/**
- * Should be called to create input parser for contract with given abi
- *
- * @method inputParser
- * @param {Array} contract abi
- * @returns {Object} input parser object for given json abi
- * TODO: refactor creating the parser, do not double logic from contract
- */
-var inputParser = function (json) {
- var parser = {};
- json.forEach(function (method) {
- var displayName = utils.extractDisplayName(method.name);
- var typeName = utils.extractTypeName(method.name);
-
- var impl = function () {
- var params = Array.prototype.slice.call(arguments);
- return formatInput(method.inputs, params);
- };
-
- if (parser[displayName] === undefined) {
- parser[displayName] = impl;
- }
-
- parser[displayName][typeName] = impl;
- });
-
- return parser;
-};
-
-/**
- * Should be called to create output parser for contract with given abi
- *
- * @method outputParser
- * @param {Array} contract abi
- * @returns {Object} output parser for given json abi
- */
-var outputParser = function (json) {
- var parser = {};
- json.forEach(function (method) {
-
- var displayName = utils.extractDisplayName(method.name);
- var typeName = utils.extractTypeName(method.name);
-
- var impl = function (output) {
- return formatOutput(method.outputs, output);
- };
-
- if (parser[displayName] === undefined) {
- parser[displayName] = impl;
- }
-
- parser[displayName][typeName] = impl;
- });
-
- return parser;
-};
-
-var formatConstructorParams = function (abi, params) {
- var constructor = solUtils.getConstructor(abi, params.length);
- if (!constructor) {
- if (params.length > 0) {
- console.warn("didn't found matching constructor, using default one");
- }
- return '';
- }
- return formatInput(constructor.inputs, params);
-};
-
-module.exports = {
- inputParser: inputParser,
- outputParser: outputParser,
- formatInput: formatInput,
- formatOutput: formatOutput,
- formatConstructorParams: formatConstructorParams
-};
-
-},{"../utils/config":6,"../utils/utils":7,"./formatters":3,"./types":4,"./utils":5}],3:[function(require,module,exports){
-/*
- This file is part of ethereum.js.
-
- ethereum.js is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- ethereum.js is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with ethereum.js. If not, see <http://www.gnu.org/licenses/>.
-*/
-/** @file formatters.js
- * @authors:
- * Marek Kotewicz <marek@ethdev.com>
- * @date 2015
- */
-
-var BigNumber = require('bignumber.js');
-var utils = require('../utils/utils');
-var c = require('../utils/config');
-
-/**
- * Formats input value to byte representation of int
- * If value is negative, return it's two's complement
- * If the value is floating point, round it down
- *
- * @method formatInputInt
- * @param {String|Number|BigNumber} value that needs to be formatted
- * @returns {String} right-aligned byte representation of int
- */
-var formatInputInt = function (value) {
- var padding = c.ETH_PADDING * 2;
- BigNumber.config(c.ETH_BIGNUMBER_ROUNDING_MODE);
- return utils.padLeft(utils.toTwosComplement(value).round().toString(16), padding);
-};
-
-/**
- * Formats input value to byte representation of string
- *
- * @method formatInputString
- * @param {String}
- * @returns {String} left-algined byte representation of string
- */
-var formatInputString = function (value) {
- return utils.fromAscii(value, c.ETH_PADDING).substr(2);
-};
-
-/**
- * Formats input value to byte representation of bool
- *
- * @method formatInputBool
- * @param {Boolean}
- * @returns {String} right-aligned byte representation bool
- */
-var formatInputBool = function (value) {
- return '000000000000000000000000000000000000000000000000000000000000000' + (value ? '1' : '0');
-};
-
-/**
- * Formats input value to byte representation of real
- * Values are multiplied by 2^m and encoded as integers
- *
- * @method formatInputReal
- * @param {String|Number|BigNumber}
- * @returns {String} byte representation of real
- */
-var formatInputReal = function (value) {
- return formatInputInt(new BigNumber(value).times(new BigNumber(2).pow(128)));
-};
-
-/**
- * Check if input value is negative
- *
- * @method signedIsNegative
- * @param {String} value is hex format
- * @returns {Boolean} true if it is negative, otherwise false
- */
-var signedIsNegative = function (value) {
- return (new BigNumber(value.substr(0, 1), 16).toString(2).substr(0, 1)) === '1';
-};
-
-/**
- * Formats right-aligned output bytes to int
- *
- * @method formatOutputInt
- * @param {String} bytes
- * @returns {BigNumber} right-aligned output bytes formatted to big number
- */
-var formatOutputInt = function (value) {
-
- value = value || "0";
-
- // check if it's negative number
- // it it is, return two's complement
- if (signedIsNegative(value)) {
- return new BigNumber(value, 16).minus(new BigNumber('ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', 16)).minus(1);
- }
- return new BigNumber(value, 16);
-};
-
-/**
- * Formats right-aligned output bytes to uint
- *
- * @method formatOutputUInt
- * @param {String} bytes
- * @returns {BigNumeber} right-aligned output bytes formatted to uint
- */
-var formatOutputUInt = function (value) {
- value = value || "0";
- return new BigNumber(value, 16);
-};
-
-/**
- * Formats right-aligned output bytes to real
- *
- * @method formatOutputReal
- * @param {String}
- * @returns {BigNumber} input bytes formatted to real
- */
-var formatOutputReal = function (value) {
- return formatOutputInt(value).dividedBy(new BigNumber(2).pow(128));
-};
-
-/**
- * Formats right-aligned output bytes to ureal
- *
- * @method formatOutputUReal
- * @param {String}
- * @returns {BigNumber} input bytes formatted to ureal
- */
-var formatOutputUReal = function (value) {
- return formatOutputUInt(value).dividedBy(new BigNumber(2).pow(128));
-};
-
-/**
- * Should be used to format output hash
- *
- * @method formatOutputHash
- * @param {String}
- * @returns {String} right-aligned output bytes formatted to hex
- */
-var formatOutputHash = function (value) {
- return "0x" + value;
-};
-
-/**
- * Should be used to format output bool
- *
- * @method formatOutputBool
- * @param {String}
- * @returns {Boolean} right-aligned input bytes formatted to bool
- */
-var formatOutputBool = function (value) {
- return value === '0000000000000000000000000000000000000000000000000000000000000001' ? true : false;
-};
-
-/**
- * Should be used to format output string
- *
- * @method formatOutputString
- * @param {Sttring} left-aligned hex representation of string
- * @returns {String} ascii string
- */
-var formatOutputString = function (value) {
- return utils.toAscii(value);
-};
-
-/**
- * Should be used to format output address
- *
- * @method formatOutputAddress
- * @param {String} right-aligned input bytes
- * @returns {String} address
- */
-var formatOutputAddress = function (value) {
- return "0x" + value.slice(value.length - 40, value.length);
-};
-
-module.exports = {
- formatInputInt: formatInputInt,
- formatInputString: formatInputString,
- formatInputBool: formatInputBool,
- formatInputReal: formatInputReal,
- formatOutputInt: formatOutputInt,
- formatOutputUInt: formatOutputUInt,
- formatOutputReal: formatOutputReal,
- formatOutputUReal: formatOutputUReal,
- formatOutputHash: formatOutputHash,
- formatOutputBool: formatOutputBool,
- formatOutputString: formatOutputString,
- formatOutputAddress: formatOutputAddress
-};
-
-
-},{"../utils/config":6,"../utils/utils":7,"bignumber.js":8}],4:[function(require,module,exports){
-/*
- This file is part of ethereum.js.
-
- ethereum.js is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- ethereum.js is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with ethereum.js. If not, see <http://www.gnu.org/licenses/>.
-*/
-/** @file types.js
- * @authors:
- * Marek Kotewicz <marek@ethdev.com>
- * @date 2015
- */
-
-var f = require('./formatters');
-
-/// @param expected type prefix (string)
-/// @returns function which checks if type has matching prefix. if yes, returns true, otherwise false
-var prefixedType = function (prefix) {
- return function (type) {
- return type.indexOf(prefix) === 0;
- };
-};
-
-/// @param expected type name (string)
-/// @returns function which checks if type is matching expected one. if yes, returns true, otherwise false
-var namedType = function (name) {
- return function (type) {
- return name === type;
- };
-};
-
-/// Setups input formatters for solidity types
-/// @returns an array of input formatters
-var inputTypes = function () {
-
- return [
- { type: prefixedType('uint'), format: f.formatInputInt },
- { type: prefixedType('int'), format: f.formatInputInt },
- { type: prefixedType('bytes'), format: f.formatInputString },
- { type: prefixedType('real'), format: f.formatInputReal },
- { type: prefixedType('ureal'), format: f.formatInputReal },
- { type: namedType('address'), format: f.formatInputInt },
- { type: namedType('bool'), format: f.formatInputBool }
- ];
-};
-
-/// Setups output formaters for solidity types
-/// @returns an array of output formatters
-var outputTypes = function () {
-
- return [
- { type: prefixedType('uint'), format: f.formatOutputUInt },
- { type: prefixedType('int'), format: f.formatOutputInt },
- { type: prefixedType('bytes'), format: f.formatOutputString },
- { type: prefixedType('real'), format: f.formatOutputReal },
- { type: prefixedType('ureal'), format: f.formatOutputUReal },
- { type: namedType('address'), format: f.formatOutputAddress },
- { type: namedType('bool'), format: f.formatOutputBool }
- ];
-};
-
-module.exports = {
- prefixedType: prefixedType,
- namedType: namedType,
- inputTypes: inputTypes,
- outputTypes: outputTypes
-};
-
-
-},{"./formatters":3}],5:[function(require,module,exports){
-/*
- This file is part of ethereum.js.
-
- ethereum.js is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- ethereum.js is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with ethereum.js. If not, see <http://www.gnu.org/licenses/>.
-*/
-/**
- * @file utils.js
- * @author Marek Kotewicz <marek@ethdev.com>
- * @date 2015
- */
-
-/**
- * Returns the contstructor with matching number of arguments
- *
- * @method getConstructor
- * @param {Array} abi
- * @param {Number} numberOfArgs
- * @returns {Object} constructor function abi
- */
-var getConstructor = function (abi, numberOfArgs) {
- return abi.filter(function (f) {
- return f.type === 'constructor' && f.inputs.length === numberOfArgs;
- })[0];
-};
-
-/**
- * Filters all functions from input abi
- *
- * @method filterFunctions
- * @param {Array} abi
- * @returns {Array} abi array with filtered objects of type 'function'
- */
-var filterFunctions = function (json) {
- return json.filter(function (current) {
- return current.type === 'function';
- });
-};
-
-/**
- * Filters all events from input abi
- *
- * @method filterEvents
- * @param {Array} abi
- * @returns {Array} abi array with filtered objects of type 'event'
- */
-var filterEvents = function (json) {
- return json.filter(function (current) {
- return current.type === 'event';
- });
-};
-
-module.exports = {
- getConstructor: getConstructor,
- filterFunctions: filterFunctions,
- filterEvents: filterEvents
-};
-
-
-},{}],6:[function(require,module,exports){
-/*
- This file is part of ethereum.js.
-
- ethereum.js is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- ethereum.js is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with ethereum.js. If not, see <http://www.gnu.org/licenses/>.
-*/
-/** @file config.js
- * @authors:
- * Marek Kotewicz <marek@ethdev.com>
- * @date 2015
- */
-
-/**
- * Utils
- *
- * @module utils
- */
-
-/**
- * Utility functions
- *
- * @class [utils] config
- * @constructor
- */
-
-/// required to define ETH_BIGNUMBER_ROUNDING_MODE
-var BigNumber = require('bignumber.js');
-
-var ETH_UNITS = [
- 'wei',
- 'Kwei',
- 'Mwei',
- 'Gwei',
- 'szabo',
- 'finney',
- 'ether',
- 'grand',
- 'Mether',
- 'Gether',
- 'Tether',
- 'Pether',
- 'Eether',
- 'Zether',
- 'Yether',
- 'Nether',
- 'Dether',
- 'Vether',
- 'Uether'
-];
-
-module.exports = {
- ETH_PADDING: 32,
- ETH_SIGNATURE_LENGTH: 4,
- ETH_UNITS: ETH_UNITS,
- ETH_BIGNUMBER_ROUNDING_MODE: { ROUNDING_MODE: BigNumber.ROUND_DOWN },
- ETH_POLLING_TIMEOUT: 1000,
- ETH_DEFAULTBLOCK: 'latest'
-};
-
-
-},{"bignumber.js":8}],7:[function(require,module,exports){
-/*
- This file is part of ethereum.js.
-
- ethereum.js is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- ethereum.js is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with ethereum.js. If not, see <http://www.gnu.org/licenses/>.
-*/
-/** @file utils.js
- * @authors:
- * Marek Kotewicz <marek@ethdev.com>
- * @date 2015
- */
-
-/**
- * Utils
- *
- * @module utils
- */
-
-/**
- * Utility functions
- *
- * @class [utils] utils
- * @constructor
- */
-
-var BigNumber = require('bignumber.js');
-
-var unitMap = {
- 'wei': '1',
- 'kwei': '1000',
- 'ada': '1000',
- 'mwei': '1000000',
- 'babbage': '1000000',
- 'gwei': '1000000000',
- 'shannon': '1000000000',
- 'szabo': '1000000000000',
- 'finney': '1000000000000000',
- 'ether': '1000000000000000000',
- 'kether': '1000000000000000000000',
- 'grand': '1000000000000000000000',
- 'einstein': '1000000000000000000000',
- 'mether': '1000000000000000000000000',
- 'gether': '1000000000000000000000000000',
- 'tether': '1000000000000000000000000000000'
-};
-
-/**
- * Should be called to pad string to expected length
- *
- * @method padLeft
- * @param {String} string to be padded
- * @param {Number} characters that result string should have
- * @param {String} sign, by default 0
- * @returns {String} right aligned string
- */
-var padLeft = function (string, chars, sign) {
- return new Array(chars - string.length + 1).join(sign ? sign : "0") + string;
-};
-
-/** Finds first index of array element matching pattern
- *
- * @method findIndex
- * @param {Array}
- * @param {Function} pattern
- * @returns {Number} index of element
- */
-var findIndex = function (array, callback) {
- var end = false;
- var i = 0;
- for (; i < array.length && !end; i++) {
- end = callback(array[i]);
- }
- return end ? i - 1 : -1;
-};
-
-/**
- * Should be called to get sting from its hex representation
- *
- * @method toAscii
- * @param {String} string in hex
- * @returns {String} ascii string representation of hex value
- */
-var toAscii = function(hex) {
-// Find termination
- var str = "";
- var i = 0, l = hex.length;
- if (hex.substring(0, 2) === '0x') {
- i = 2;
- }
- for (; i < l; i+=2) {
- var code = parseInt(hex.substr(i, 2), 16);
- if (code === 0) {
- break;
- }
-
- str += String.fromCharCode(code);
- }
-
- return str;
-};
-
-/**
- * Shold be called to get hex representation (prefixed by 0x) of ascii string
- *
- * @method fromAscii
- * @param {String} string
- * @returns {String} hex representation of input string
- */
-var toHexNative = function(str) {
- var hex = "";
- for(var i = 0; i < str.length; i++) {
- var n = str.charCodeAt(i).toString(16);
- hex += n.length < 2 ? '0' + n : n;
- }
-
- return hex;
-};
-
-/**
- * Shold be called to get hex representation (prefixed by 0x) of ascii string
- *
- * @method fromAscii
- * @param {String} string
- * @param {Number} optional padding
- * @returns {String} hex representation of input string
- */
-var fromAscii = function(str, pad) {
- pad = pad === undefined ? 0 : pad;
- var hex = toHexNative(str);
- while (hex.length < pad*2)
- hex += "00";
- return "0x" + hex;
-};
-
-/**
- * Should be called to get display name of contract function
- *
- * @method extractDisplayName
- * @param {String} name of function/event
- * @returns {String} display name for function/event eg. multiply(uint256) -> multiply
- */
-var extractDisplayName = function (name) {
- var length = name.indexOf('(');
- return length !== -1 ? name.substr(0, length) : name;
-};
-
-/// @returns overloaded part of function/event name
-var extractTypeName = function (name) {
- /// TODO: make it invulnerable
- var length = name.indexOf('(');
- return length !== -1 ? name.substr(length + 1, name.length - 1 - (length + 1)).replace(' ', '') : "";
-};
-
-/**
- * Converts value to its decimal representation in string
- *
- * @method toDecimal
- * @param {String|Number|BigNumber}
- * @return {String}
- */
-var toDecimal = function (value) {
- return toBigNumber(value).toNumber();
-};
-
-/**
- * Converts value to its hex representation
- *
- * @method fromDecimal
- * @param {String|Number|BigNumber}
- * @return {String}
- */
-var fromDecimal = function (value) {
- var number = toBigNumber(value);
- var result = number.toString(16);
-
- return number.lessThan(0) ? '-0x' + result.substr(1) : '0x' + result;
-};
-
-/**
- * Auto converts any given value into its hex representation.
- *
- * And even stringifys objects before.
- *
- * @method toHex
- * @param {String|Number|BigNumber|Object}
- * @return {String}
- */
-var toHex = function (val) {
- /*jshint maxcomplexity:7 */
-
- if (isBoolean(val))
- return fromDecimal(+val);
-
- if (isBigNumber(val))
- return fromDecimal(val);
-
- if (isObject(val))
- return fromAscii(JSON.stringify(val));
-
- // if its a negative number, pass it through fromDecimal
- if (isString(val)) {
- if (val.indexOf('-0x') === 0)
- return fromDecimal(val);
- else if (!isFinite(val))
- return fromAscii(val);
- }
-
- return fromDecimal(val);
-};
-
-/**
- * Returns value of unit in Wei
- *
- * @method getValueOfUnit
- * @param {String} unit the unit to convert to, default ether
- * @returns {BigNumber} value of the unit (in Wei)
- * @throws error if the unit is not correct:w
- */
-var getValueOfUnit = function (unit) {
- unit = unit ? unit.toLowerCase() : 'ether';
- var unitValue = unitMap[unit];
- if (unitValue === undefined) {
- throw new Error('This unit doesn\'t exists, please use the one of the following units' + JSON.stringify(unitMap, null, 2));
- }
- return new BigNumber(unitValue, 10);
-};
-
-/**
- * Takes a number of wei and converts it to any other ether unit.
- *
- * Possible units are:
- * - kwei/ada
- * - mwei/babbage
- * - gwei/shannon
- * - szabo
- * - finney
- * - ether
- * - kether/grand/einstein
- * - mether
- * - gether
- * - tether
- *
- * @method fromWei
- * @param {Number|String} number can be a number, number string or a HEX of a decimal
- * @param {String} unit the unit to convert to, default ether
- * @return {String|Object} When given a BigNumber object it returns one as well, otherwise a number
-*/
-var fromWei = function(number, unit) {
- var returnValue = toBigNumber(number).dividedBy(getValueOfUnit(unit));
-
- return isBigNumber(number) ? returnValue : returnValue.toString(10);
-};
-
-/**
- * Takes a number of a unit and converts it to wei.
- *
- * Possible units are:
- * - kwei/ada
- * - mwei/babbage
- * - gwei/shannon
- * - szabo
- * - finney
- * - ether
- * - kether/grand/einstein
- * - mether
- * - gether
- * - tether
- *
- * @method toWei
- * @param {Number|String|BigNumber} number can be a number, number string or a HEX of a decimal
- * @param {String} unit the unit to convert from, default ether
- * @return {String|Object} When given a BigNumber object it returns one as well, otherwise a number
-*/
-var toWei = function(number, unit) {
- var returnValue = toBigNumber(number).times(getValueOfUnit(unit));
-
- return isBigNumber(number) ? returnValue : returnValue.toString(10);
-};
-
-/**
- * Takes an input and transforms it into an bignumber
- *
- * @method toBigNumber
- * @param {Number|String|BigNumber} a number, string, HEX string or BigNumber
- * @return {BigNumber} BigNumber
-*/
-var toBigNumber = function(number) {
- /*jshint maxcomplexity:5 */
- number = number || 0;
- if (isBigNumber(number))
- return number;
-
- if (isString(number) && (number.indexOf('0x') === 0 || number.indexOf('-0x') === 0)) {
- return new BigNumber(number.replace('0x',''), 16);
- }
-
- return new BigNumber(number.toString(10), 10);
-};
-
-/**
- * Takes and input transforms it into bignumber and if it is negative value, into two's complement
- *
- * @method toTwosComplement
- * @param {Number|String|BigNumber}
- * @return {BigNumber}
- */
-var toTwosComplement = function (number) {
- var bigNumber = toBigNumber(number);
- if (bigNumber.lessThan(0)) {
- return new BigNumber("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", 16).plus(bigNumber).plus(1);
- }
- return bigNumber;
-};
-
-/**
- * Checks if the given string is strictly an address
- *
- * @method isStrictAddress
- * @param {String} address the given HEX adress
- * @return {Boolean}
-*/
-var isStrictAddress = function (address) {
- return /^0x[0-9a-f]{40}$/.test(address);
-};
-
-/**
- * Checks if the given string is an address
- *
- * @method isAddress
- * @param {String} address the given HEX adress
- * @return {Boolean}
-*/
-var isAddress = function (address) {
- return /^(0x)?[0-9a-f]{40}$/.test(address);
-};
-
-/**
- * Transforms given string to valid 20 bytes-length addres with 0x prefix
- *
- * @method toAddress
- * @param {String} address
- * @return {String} formatted address
- */
-var toAddress = function (address) {
- if (isStrictAddress(address)) {
- return address;
- }
-
- if (/^[0-9a-f]{40}$/.test(address)) {
- return '0x' + address;
- }
-
- return '0x' + padLeft(toHex(address).substr(2), 40);
-};
-
-/**
- * Returns true if object is BigNumber, otherwise false
- *
- * @method isBigNumber
- * @param {Object}
- * @return {Boolean}
- */
-var isBigNumber = function (object) {
- return object instanceof BigNumber ||
- (object && object.constructor && object.constructor.name === 'BigNumber');
-};
-
-/**
- * Returns true if object is string, otherwise false
- *
- * @method isString
- * @param {Object}
- * @return {Boolean}
- */
-var isString = function (object) {
- return typeof object === 'string' ||
- (object && object.constructor && object.constructor.name === 'String');
-};
-
-/**
- * Returns true if object is function, otherwise false
- *
- * @method isFunction
- * @param {Object}
- * @return {Boolean}
- */
-var isFunction = function (object) {
- return typeof object === 'function';
-};
-
-/**
- * Returns true if object is Objet, otherwise false
- *
- * @method isObject
- * @param {Object}
- * @return {Boolean}
- */
-var isObject = function (object) {
- return typeof object === 'object';
-};
-
-/**
- * Returns true if object is boolean, otherwise false
- *
- * @method isBoolean
- * @param {Object}
- * @return {Boolean}
- */
-var isBoolean = function (object) {
- return typeof object === 'boolean';
-};
-
-/**
- * Returns true if object is array, otherwise false
- *
- * @method isArray
- * @param {Object}
- * @return {Boolean}
- */
-var isArray = function (object) {
- return object instanceof Array;
-};
-
-/**
- * Returns true if given string is valid json object
- *
- * @method isJson
- * @param {String}
- * @return {Boolean}
- */
-var isJson = function (str) {
- try {
- return !!JSON.parse(str);
- } catch (e) {
- return false;
- }
-};
-
-module.exports = {
- padLeft: padLeft,
- findIndex: findIndex,
- toHex: toHex,
- toDecimal: toDecimal,
- fromDecimal: fromDecimal,
- toAscii: toAscii,
- fromAscii: fromAscii,
- extractDisplayName: extractDisplayName,
- extractTypeName: extractTypeName,
- toWei: toWei,
- fromWei: fromWei,
- toBigNumber: toBigNumber,
- toTwosComplement: toTwosComplement,
- toAddress: toAddress,
- isBigNumber: isBigNumber,
- isStrictAddress: isStrictAddress,
- isAddress: isAddress,
- isFunction: isFunction,
- isString: isString,
- isObject: isObject,
- isBoolean: isBoolean,
- isArray: isArray,
- isJson: isJson
-};
-
-
-},{"bignumber.js":8}],8:[function(require,module,exports){
-/*! bignumber.js v2.0.7 https://github.com/MikeMcl/bignumber.js/LICENCE */
-
-;(function (global) {
- 'use strict';
-
- /*
- bignumber.js v2.0.7
- A JavaScript library for arbitrary-precision arithmetic.
- https://github.com/MikeMcl/bignumber.js
- Copyright (c) 2015 Michael Mclaughlin <M8ch88l@gmail.com>
- MIT Expat Licence
- */
-
-
- var BigNumber, crypto, parseNumeric,
- isNumeric = /^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,
- mathceil = Math.ceil,
- mathfloor = Math.floor,
- notBool = ' not a boolean or binary digit',
- roundingMode = 'rounding mode',
- tooManyDigits = 'number type has more than 15 significant digits',
- ALPHABET = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_',
- BASE = 1e14,
- LOG_BASE = 14,
- MAX_SAFE_INTEGER = 0x1fffffffffffff, // 2^53 - 1
- // MAX_INT32 = 0x7fffffff, // 2^31 - 1
- POWS_TEN = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13],
- SQRT_BASE = 1e7,
-
- /*
- * The limit on the value of DECIMAL_PLACES, TO_EXP_NEG, TO_EXP_POS, MIN_EXP, MAX_EXP, and
- * the arguments to toExponential, toFixed, toFormat, and toPrecision, beyond which an
- * exception is thrown (if ERRORS is true).
- */
- MAX = 1E9; // 0 to MAX_INT32
-
-
- /*
- * Create and return a BigNumber constructor.
- */
- function another(configObj) {
- var div,
-
- // id tracks the caller function, so its name can be included in error messages.
- id = 0,
- P = BigNumber.prototype,
- ONE = new BigNumber(1),
-
-
- /********************************* EDITABLE DEFAULTS **********************************/
-
-
- /*
- * The default values below must be integers within the inclusive ranges stated.
- * The values can also be changed at run-time using BigNumber.config.
- */
-
- // The maximum number of decimal places for operations involving division.
- DECIMAL_PLACES = 20, // 0 to MAX
-
- /*
- * The rounding mode used when rounding to the above decimal places, and when using
- * toExponential, toFixed, toFormat and toPrecision, and round (default value).
- * UP 0 Away from zero.
- * DOWN 1 Towards zero.
- * CEIL 2 Towards +Infinity.
- * FLOOR 3 Towards -Infinity.
- * HALF_UP 4 Towards nearest neighbour. If equidistant, up.
- * HALF_DOWN 5 Towards nearest neighbour. If equidistant, down.
- * HALF_EVEN 6 Towards nearest neighbour. If equidistant, towards even neighbour.
- * HALF_CEIL 7 Towards nearest neighbour. If equidistant, towards +Infinity.
- * HALF_FLOOR 8 Towards nearest neighbour. If equidistant, towards -Infinity.
- */
- ROUNDING_MODE = 4, // 0 to 8
-
- // EXPONENTIAL_AT : [TO_EXP_NEG , TO_EXP_POS]
-
- // The exponent value at and beneath which toString returns exponential notation.
- // Number type: -7
- TO_EXP_NEG = -7, // 0 to -MAX
-
- // The exponent value at and above which toString returns exponential notation.
- // Number type: 21
- TO_EXP_POS = 21, // 0 to MAX
-
- // RANGE : [MIN_EXP, MAX_EXP]
-
- // The minimum exponent value, beneath which underflow to zero occurs.
- // Number type: -324 (5e-324)
- MIN_EXP = -1e7, // -1 to -MAX
-
- // The maximum exponent value, above which overflow to Infinity occurs.
- // Number type: 308 (1.7976931348623157e+308)
- // For MAX_EXP > 1e7, e.g. new BigNumber('1e100000000').plus(1) may be slow.
- MAX_EXP = 1e7, // 1 to MAX
-
- // Whether BigNumber Errors are ever thrown.
- ERRORS = true, // true or false
-
- // Change to intValidatorNoErrors if ERRORS is false.
- isValidInt = intValidatorWithErrors, // intValidatorWithErrors/intValidatorNoErrors
-
- // Whether to use cryptographically-secure random number generation, if available.
- CRYPTO = false, // true or false
-
- /*
- * The modulo mode used when calculating the modulus: a mod n.
- * The quotient (q = a / n) is calculated according to the corresponding rounding mode.
- * The remainder (r) is calculated as: r = a - n * q.
- *
- * UP 0 The remainder is positive if the dividend is negative, else is negative.
- * DOWN 1 The remainder has the same sign as the dividend.
- * This modulo mode is commonly known as 'truncated division' and is
- * equivalent to (a % n) in JavaScript.
- * FLOOR 3 The remainder has the same sign as the divisor (Python %).
- * HALF_EVEN 6 This modulo mode implements the IEEE 754 remainder function.
- * EUCLID 9 Euclidian division. q = sign(n) * floor(a / abs(n)).
- * The remainder is always positive.
- *
- * The truncated division, floored division, Euclidian division and IEEE 754 remainder
- * modes are commonly used for the modulus operation.
- * Although the other rounding modes can also be used, they may not give useful results.
- */
- MODULO_MODE = 1, // 0 to 9
-
- // The maximum number of significant digits of the result of the toPower operation.
- // If POW_PRECISION is 0, there will be unlimited significant digits.
- POW_PRECISION = 100, // 0 to MAX
-
- // The format specification used by the BigNumber.prototype.toFormat method.
- FORMAT = {
- decimalSeparator: '.',
- groupSeparator: ',',
- groupSize: 3,
- secondaryGroupSize: 0,
- fractionGroupSeparator: '\xA0', // non-breaking space
- fractionGroupSize: 0
- };
-
-
- /******************************************************************************************/
-
-
- // CONSTRUCTOR
-
-
- /*
- * The BigNumber constructor and exported function.
- * Create and return a new instance of a BigNumber object.
- *
- * n {number|string|BigNumber} A numeric value.
- * [b] {number} The base of n. Integer, 2 to 64 inclusive.
- */
- function BigNumber( n, b ) {
- var c, e, i, num, len, str,
- x = this;
-
- // Enable constructor usage without new.
- if ( !( x instanceof BigNumber ) ) {
-
- // 'BigNumber() constructor call without new: {n}'
- if (ERRORS) raise( 26, 'constructor call without new', n );
- return new BigNumber( n, b );
- }
-
- // 'new BigNumber() base not an integer: {b}'
- // 'new BigNumber() base out of range: {b}'
- if ( b == null || !isValidInt( b, 2, 64, id, 'base' ) ) {
-
- // Duplicate.
- if ( n instanceof BigNumber ) {
- x.s = n.s;
- x.e = n.e;
- x.c = ( n = n.c ) ? n.slice() : n;
- id = 0;
- return;
- }
-
- if ( ( num = typeof n == 'number' ) && n * 0 == 0 ) {
- x.s = 1 / n < 0 ? ( n = -n, -1 ) : 1;
-
- // Fast path for integers.
- if ( n === ~~n ) {
- for ( e = 0, i = n; i >= 10; i /= 10, e++ );
- x.e = e;
- x.c = [n];
- id = 0;
- return;
- }
-
- str = n + '';
- } else {
- if ( !isNumeric.test( str = n + '' ) ) return parseNumeric( x, str, num );
- x.s = str.charCodeAt(0) === 45 ? ( str = str.slice(1), -1 ) : 1;
- }
- } else {
- b = b | 0;
- str = n + '';
-
- // Ensure return value is rounded to DECIMAL_PLACES as with other bases.
- // Allow exponential notation to be used with base 10 argument.
- if ( b == 10 ) {
- x = new BigNumber( n instanceof BigNumber ? n : str );
- return round( x, DECIMAL_PLACES + x.e + 1, ROUNDING_MODE );
- }
-
- // Avoid potential interpretation of Infinity and NaN as base 44+ values.
- // Any number in exponential form will fail due to the [Ee][+-].
- if ( ( num = typeof n == 'number' ) && n * 0 != 0 ||
- !( new RegExp( '^-?' + ( c = '[' + ALPHABET.slice( 0, b ) + ']+' ) +
- '(?:\\.' + c + ')?$',b < 37 ? 'i' : '' ) ).test(str) ) {
- return parseNumeric( x, str, num, b );
- }
-
- if (num) {
- x.s = 1 / n < 0 ? ( str = str.slice(1), -1 ) : 1;
-
- if ( ERRORS && str.replace( /^0\.0*|\./, '' ).length > 15 ) {
-
- // 'new BigNumber() number type has more than 15 significant digits: {n}'
- raise( id, tooManyDigits, n );
- }
-
- // Prevent later check for length on converted number.
- num = false;
- } else {
- x.s = str.charCodeAt(0) === 45 ? ( str = str.slice(1), -1 ) : 1;
- }
-
- str = convertBase( str, 10, b, x.s );
- }
-
- // Decimal point?
- if ( ( e = str.indexOf('.') ) > -1 ) str = str.replace( '.', '' );
-
- // Exponential form?
- if ( ( i = str.search( /e/i ) ) > 0 ) {
-
- // Determine exponent.
- if ( e < 0 ) e = i;
- e += +str.slice( i + 1 );
- str = str.substring( 0, i );
- } else if ( e < 0 ) {
-
- // Integer.
- e = str.length;
- }
-
- // Determine leading zeros.
- for ( i = 0; str.charCodeAt(i) === 48; i++ );
-
- // Determine trailing zeros.
- for ( len = str.length; str.charCodeAt(--len) === 48; );
- str = str.slice( i, len + 1 );
-
- if (str) {
- len = str.length;
-
- // Disallow numbers with over 15 significant digits if number type.
- // 'new BigNumber() number type has more than 15 significant digits: {n}'
- if ( num && ERRORS && len > 15 ) raise( id, tooManyDigits, x.s * n );
-
- e = e - i - 1;
-
- // Overflow?
- if ( e > MAX_EXP ) {
-
- // Infinity.
- x.c = x.e = null;
-
- // Underflow?
- } else if ( e < MIN_EXP ) {
-
- // Zero.
- x.c = [ x.e = 0 ];
- } else {
- x.e = e;
- x.c = [];
-
- // Transform base
-
- // e is the base 10 exponent.
- // i is where to slice str to get the first element of the coefficient array.
- i = ( e + 1 ) % LOG_BASE;
- if ( e < 0 ) i += LOG_BASE;
-
- if ( i < len ) {
- if (i) x.c.push( +str.slice( 0, i ) );
-
- for ( len -= LOG_BASE; i < len; ) {
- x.c.push( +str.slice( i, i += LOG_BASE ) );
- }
-
- str = str.slice(i);
- i = LOG_BASE - str.length;
- } else {
- i -= len;
- }
-
- for ( ; i--; str += '0' );
- x.c.push( +str );
- }
- } else {
-
- // Zero.
- x.c = [ x.e = 0 ];
- }
-
- id = 0;
- }
-
-
- // CONSTRUCTOR PROPERTIES
-
-
- BigNumber.another = another;
-
- BigNumber.ROUND_UP = 0;
- BigNumber.ROUND_DOWN = 1;
- BigNumber.ROUND_CEIL = 2;
- BigNumber.ROUND_FLOOR = 3;
- BigNumber.ROUND_HALF_UP = 4;
- BigNumber.ROUND_HALF_DOWN = 5;
- BigNumber.ROUND_HALF_EVEN = 6;
- BigNumber.ROUND_HALF_CEIL = 7;
- BigNumber.ROUND_HALF_FLOOR = 8;
- BigNumber.EUCLID = 9;
-
-
- /*
- * Configure infrequently-changing library-wide settings.
- *
- * Accept an object or an argument list, with one or many of the following properties or
- * parameters respectively:
- *
- * DECIMAL_PLACES {number} Integer, 0 to MAX inclusive
- * ROUNDING_MODE {number} Integer, 0 to 8 inclusive
- * EXPONENTIAL_AT {number|number[]} Integer, -MAX to MAX inclusive or
- * [integer -MAX to 0 incl., 0 to MAX incl.]
- * RANGE {number|number[]} Non-zero integer, -MAX to MAX inclusive or
- * [integer -MAX to -1 incl., integer 1 to MAX incl.]
- * ERRORS {boolean|number} true, false, 1 or 0
- * CRYPTO {boolean|number} true, false, 1 or 0
- * MODULO_MODE {number} 0 to 9 inclusive
- * POW_PRECISION {number} 0 to MAX inclusive
- * FORMAT {object} See BigNumber.prototype.toFormat
- * decimalSeparator {string}
- * groupSeparator {string}
- * groupSize {number}
- * secondaryGroupSize {number}
- * fractionGroupSeparator {string}
- * fractionGroupSize {number}
- *
- * (The values assigned to the above FORMAT object properties are not checked for validity.)
- *
- * E.g.
- * BigNumber.config(20, 4) is equivalent to
- * BigNumber.config({ DECIMAL_PLACES : 20, ROUNDING_MODE : 4 })
- *
- * Ignore properties/parameters set to null or undefined.
- * Return an object with the properties current values.
- */
- BigNumber.config = function () {
- var v, p,
- i = 0,
- r = {},
- a = arguments,
- o = a[0],
- has = o && typeof o == 'object'
- ? function () { if ( o.hasOwnProperty(p) ) return ( v = o[p] ) != null; }
- : function () { if ( a.length > i ) return ( v = a[i++] ) != null; };
-
- // DECIMAL_PLACES {number} Integer, 0 to MAX inclusive.
- // 'config() DECIMAL_PLACES not an integer: {v}'
- // 'config() DECIMAL_PLACES out of range: {v}'
- if ( has( p = 'DECIMAL_PLACES' ) && isValidInt( v, 0, MAX, 2, p ) ) {
- DECIMAL_PLACES = v | 0;
- }
- r[p] = DECIMAL_PLACES;
-
- // ROUNDING_MODE {number} Integer, 0 to 8 inclusive.
- // 'config() ROUNDING_MODE not an integer: {v}'
- // 'config() ROUNDING_MODE out of range: {v}'
- if ( has( p = 'ROUNDING_MODE' ) && isValidInt( v, 0, 8, 2, p ) ) {
- ROUNDING_MODE = v | 0;
- }
- r[p] = ROUNDING_MODE;
-
- // EXPONENTIAL_AT {number|number[]}
- // Integer, -MAX to MAX inclusive or [integer -MAX to 0 inclusive, 0 to MAX inclusive].
- // 'config() EXPONENTIAL_AT not an integer: {v}'
- // 'config() EXPONENTIAL_AT out of range: {v}'
- if ( has( p = 'EXPONENTIAL_AT' ) ) {
-
- if ( isArray(v) ) {
- if ( isValidInt( v[0], -MAX, 0, 2, p ) && isValidInt( v[1], 0, MAX, 2, p ) ) {
- TO_EXP_NEG = v[0] | 0;
- TO_EXP_POS = v[1] | 0;
- }
- } else if ( isValidInt( v, -MAX, MAX, 2, p ) ) {
- TO_EXP_NEG = -( TO_EXP_POS = ( v < 0 ? -v : v ) | 0 );
- }
- }
- r[p] = [ TO_EXP_NEG, TO_EXP_POS ];
-
- // RANGE {number|number[]} Non-zero integer, -MAX to MAX inclusive or
- // [integer -MAX to -1 inclusive, integer 1 to MAX inclusive].
- // 'config() RANGE not an integer: {v}'
- // 'config() RANGE cannot be zero: {v}'
- // 'config() RANGE out of range: {v}'
- if ( has( p = 'RANGE' ) ) {
-
- if ( isArray(v) ) {
- if ( isValidInt( v[0], -MAX, -1, 2, p ) && isValidInt( v[1], 1, MAX, 2, p ) ) {
- MIN_EXP = v[0] | 0;
- MAX_EXP = v[1] | 0;
- }
- } else if ( isValidInt( v, -MAX, MAX, 2, p ) ) {
- if ( v | 0 ) MIN_EXP = -( MAX_EXP = ( v < 0 ? -v : v ) | 0 );
- else if (ERRORS) raise( 2, p + ' cannot be zero', v );
- }
- }
- r[p] = [ MIN_EXP, MAX_EXP ];
-
- // ERRORS {boolean|number} true, false, 1 or 0.
- // 'config() ERRORS not a boolean or binary digit: {v}'
- if ( has( p = 'ERRORS' ) ) {
-
- if ( v === !!v || v === 1 || v === 0 ) {
- id = 0;
- isValidInt = ( ERRORS = !!v ) ? intValidatorWithErrors : intValidatorNoErrors;
- } else if (ERRORS) {
- raise( 2, p + notBool, v );
- }
- }
- r[p] = ERRORS;
-
- // CRYPTO {boolean|number} true, false, 1 or 0.
- // 'config() CRYPTO not a boolean or binary digit: {v}'
- // 'config() crypto unavailable: {crypto}'
- if ( has( p = 'CRYPTO' ) ) {
-
- if ( v === !!v || v === 1 || v === 0 ) {
- CRYPTO = !!( v && crypto && typeof crypto == 'object' );
- if ( v && !CRYPTO && ERRORS ) raise( 2, 'crypto unavailable', crypto );
- } else if (ERRORS) {
- raise( 2, p + notBool, v );
- }
- }
- r[p] = CRYPTO;
-
- // MODULO_MODE {number} Integer, 0 to 9 inclusive.
- // 'config() MODULO_MODE not an integer: {v}'
- // 'config() MODULO_MODE out of range: {v}'
- if ( has( p = 'MODULO_MODE' ) && isValidInt( v, 0, 9, 2, p ) ) {
- MODULO_MODE = v | 0;
- }
- r[p] = MODULO_MODE;
-
- // POW_PRECISION {number} Integer, 0 to MAX inclusive.
- // 'config() POW_PRECISION not an integer: {v}'
- // 'config() POW_PRECISION out of range: {v}'
- if ( has( p = 'POW_PRECISION' ) && isValidInt( v, 0, MAX, 2, p ) ) {
- POW_PRECISION = v | 0;
- }
- r[p] = POW_PRECISION;
-
- // FORMAT {object}
- // 'config() FORMAT not an object: {v}'
- if ( has( p = 'FORMAT' ) ) {
-
- if ( typeof v == 'object' ) {
- FORMAT = v;
- } else if (ERRORS) {
- raise( 2, p + ' not an object', v );
- }
- }
- r[p] = FORMAT;
-
- return r;
- };
-
-
- /*
- * Return a new BigNumber whose value is the maximum of the arguments.
- *
- * arguments {number|string|BigNumber}
- */
- BigNumber.max = function () { return maxOrMin( arguments, P.lt ); };
-
-
- /*
- * Return a new BigNumber whose value is the minimum of the arguments.
- *
- * arguments {number|string|BigNumber}
- */
- BigNumber.min = function () { return maxOrMin( arguments, P.gt ); };
-
-
- /*
- * Return a new BigNumber with a random value equal to or greater than 0 and less than 1,
- * and with dp, or DECIMAL_PLACES if dp is omitted, decimal places (or less if trailing
- * zeros are produced).
- *
- * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.
- *
- * 'random() decimal places not an integer: {dp}'
- * 'random() decimal places out of range: {dp}'
- * 'random() crypto unavailable: {crypto}'
- */
- BigNumber.random = (function () {
- var pow2_53 = 0x20000000000000;
-
- // Return a 53 bit integer n, where 0 <= n < 9007199254740992.
- // Check if Math.random() produces more than 32 bits of randomness.
- // If it does, assume at least 53 bits are produced, otherwise assume at least 30 bits.
- // 0x40000000 is 2^30, 0x800000 is 2^23, 0x1fffff is 2^21 - 1.
- var random53bitInt = (Math.random() * pow2_53) & 0x1fffff
- ? function () { return mathfloor( Math.random() * pow2_53 ); }
- : function () { return ((Math.random() * 0x40000000 | 0) * 0x800000) +
- (Math.random() * 0x800000 | 0); };
-
- return function (dp) {
- var a, b, e, k, v,
- i = 0,
- c = [],
- rand = new BigNumber(ONE);
-
- dp = dp == null || !isValidInt( dp, 0, MAX, 14 ) ? DECIMAL_PLACES : dp | 0;
- k = mathceil( dp / LOG_BASE );
-
- if (CRYPTO) {
-
- // Browsers supporting crypto.getRandomValues.
- if ( crypto && crypto.getRandomValues ) {
-
- a = crypto.getRandomValues( new Uint32Array( k *= 2 ) );
-
- for ( ; i < k; ) {
-
- // 53 bits:
- // ((Math.pow(2, 32) - 1) * Math.pow(2, 21)).toString(2)
- // 11111 11111111 11111111 11111111 11100000 00000000 00000000
- // ((Math.pow(2, 32) - 1) >>> 11).toString(2)
- // 11111 11111111 11111111
- // 0x20000 is 2^21.
- v = a[i] * 0x20000 + (a[i + 1] >>> 11);
-
- // Rejection sampling:
- // 0 <= v < 9007199254740992
- // Probability that v >= 9e15, is
- // 7199254740992 / 9007199254740992 ~= 0.0008, i.e. 1 in 1251
- if ( v >= 9e15 ) {
- b = crypto.getRandomValues( new Uint32Array(2) );
- a[i] = b[0];
- a[i + 1] = b[1];
- } else {
-
- // 0 <= v <= 8999999999999999
- // 0 <= (v % 1e14) <= 99999999999999
- c.push( v % 1e14 );
- i += 2;
- }
- }
- i = k / 2;
-
- // Node.js supporting crypto.randomBytes.
- } else if ( crypto && crypto.randomBytes ) {
-
- // buffer
- a = crypto.randomBytes( k *= 7 );
-
- for ( ; i < k; ) {
-
- // 0x1000000000000 is 2^48, 0x10000000000 is 2^40
- // 0x100000000 is 2^32, 0x1000000 is 2^24
- // 11111 11111111 11111111 11111111 11111111 11111111 11111111
- // 0 <= v < 9007199254740992
- v = ( ( a[i] & 31 ) * 0x1000000000000 ) + ( a[i + 1] * 0x10000000000 ) +
- ( a[i + 2] * 0x100000000 ) + ( a[i + 3] * 0x1000000 ) +
- ( a[i + 4] << 16 ) + ( a[i + 5] << 8 ) + a[i + 6];
-
- if ( v >= 9e15 ) {
- crypto.randomBytes(7).copy( a, i );
- } else {
-
- // 0 <= (v % 1e14) <= 99999999999999
- c.push( v % 1e14 );
- i += 7;
- }
- }
- i = k / 7;
- } else if (ERRORS) {
- raise( 14, 'crypto unavailable', crypto );
- }
- }
-
- // Use Math.random: CRYPTO is false or crypto is unavailable and ERRORS is false.
- if (!i) {
-
- for ( ; i < k; ) {
- v = random53bitInt();
- if ( v < 9e15 ) c[i++] = v % 1e14;
- }
- }
-
- k = c[--i];
- dp %= LOG_BASE;
-
- // Convert trailing digits to zeros according to dp.
- if ( k && dp ) {
- v = POWS_TEN[LOG_BASE - dp];
- c[i] = mathfloor( k / v ) * v;
- }
-
- // Remove trailing elements which are zero.
- for ( ; c[i] === 0; c.pop(), i-- );
-
- // Zero?
- if ( i < 0 ) {
- c = [ e = 0 ];
- } else {
-
- // Remove leading elements which are zero and adjust exponent accordingly.
- for ( e = -1 ; c[0] === 0; c.shift(), e -= LOG_BASE);
-
- // Count the digits of the first element of c to determine leading zeros, and...
- for ( i = 1, v = c[0]; v >= 10; v /= 10, i++);
-
- // adjust the exponent accordingly.
- if ( i < LOG_BASE ) e -= LOG_BASE - i;
- }
-
- rand.e = e;
- rand.c = c;
- return rand;
- };
- })();
-
-
- // PRIVATE FUNCTIONS
-
-
- // Convert a numeric string of baseIn to a numeric string of baseOut.
- function convertBase( str, baseOut, baseIn, sign ) {
- var d, e, k, r, x, xc, y,
- i = str.indexOf( '.' ),
- dp = DECIMAL_PLACES,
- rm = ROUNDING_MODE;
-
- if ( baseIn < 37 ) str = str.toLowerCase();
-
- // Non-integer.
- if ( i >= 0 ) {
- k = POW_PRECISION;
-
- // Unlimited precision.
- POW_PRECISION = 0;
- str = str.replace( '.', '' );
- y = new BigNumber(baseIn);
- x = y.pow( str.length - i );
- POW_PRECISION = k;
-
- // Convert str as if an integer, then restore the fraction part by dividing the
- // result by its base raised to a power.
- y.c = toBaseOut( toFixedPoint( coeffToString( x.c ), x.e ), 10, baseOut );
- y.e = y.c.length;
- }
-
- // Convert the number as integer.
- xc = toBaseOut( str, baseIn, baseOut );
- e = k = xc.length;
-
- // Remove trailing zeros.
- for ( ; xc[--k] == 0; xc.pop() );
- if ( !xc[0] ) return '0';
-
- if ( i < 0 ) {
- --e;
- } else {
- x.c = xc;
- x.e = e;
-
- // sign is needed for correct rounding.
- x.s = sign;
- x = div( x, y, dp, rm, baseOut );
- xc = x.c;
- r = x.r;
- e = x.e;
- }
-
- d = e + dp + 1;
-
- // The rounding digit, i.e. the digit to the right of the digit that may be rounded up.
- i = xc[d];
- k = baseOut / 2;
- r = r || d < 0 || xc[d + 1] != null;
-
- r = rm < 4 ? ( i != null || r ) && ( rm == 0 || rm == ( x.s < 0 ? 3 : 2 ) )
- : i > k || i == k &&( rm == 4 || r || rm == 6 && xc[d - 1] & 1 ||
- rm == ( x.s < 0 ? 8 : 7 ) );
-
- if ( d < 1 || !xc[0] ) {
-
- // 1^-dp or 0.
- str = r ? toFixedPoint( '1', -dp ) : '0';
- } else {
- xc.length = d;
-
- if (r) {
-
- // Rounding up may mean the previous digit has to be rounded up and so on.
- for ( --baseOut; ++xc[--d] > baseOut; ) {
- xc[d] = 0;
-
- if ( !d ) {
- ++e;
- xc.unshift(1);
- }
- }
- }
-
- // Determine trailing zeros.
- for ( k = xc.length; !xc[--k]; );
-
- // E.g. [4, 11, 15] becomes 4bf.
- for ( i = 0, str = ''; i <= k; str += ALPHABET.charAt( xc[i++] ) );
- str = toFixedPoint( str, e );
- }
-
- // The caller will add the sign.
- return str;
- }
-
-
- // Perform division in the specified base. Called by div and convertBase.
- div = (function () {
-
- // Assume non-zero x and k.
- function multiply( x, k, base ) {
- var m, temp, xlo, xhi,
- carry = 0,
- i = x.length,
- klo = k % SQRT_BASE,
- khi = k / SQRT_BASE | 0;
-
- for ( x = x.slice(); i--; ) {
- xlo = x[i] % SQRT_BASE;
- xhi = x[i] / SQRT_BASE | 0;
- m = khi * xlo + xhi * klo;
- temp = klo * xlo + ( ( m % SQRT_BASE ) * SQRT_BASE ) + carry;
- carry = ( temp / base | 0 ) + ( m / SQRT_BASE | 0 ) + khi * xhi;
- x[i] = temp % base;
- }
-
- if (carry) x.unshift(carry);
-
- return x;
- }
-
- function compare( a, b, aL, bL ) {
- var i, cmp;
-
- if ( aL != bL ) {
- cmp = aL > bL ? 1 : -1;
- } else {
-
- for ( i = cmp = 0; i < aL; i++ ) {
-
- if ( a[i] != b[i] ) {
- cmp = a[i] > b[i] ? 1 : -1;
- break;
- }
- }
- }
- return cmp;
- }
-
- function subtract( a, b, aL, base ) {
- var i = 0;
-
- // Subtract b from a.
- for ( ; aL--; ) {
- a[aL] -= i;
- i = a[aL] < b[aL] ? 1 : 0;
- a[aL] = i * base + a[aL] - b[aL];
- }
-
- // Remove leading zeros.
- for ( ; !a[0] && a.length > 1; a.shift() );
- }
-
- // x: dividend, y: divisor.
- return function ( x, y, dp, rm, base ) {
- var cmp, e, i, more, n, prod, prodL, q, qc, rem, remL, rem0, xi, xL, yc0,
- yL, yz,
- s = x.s == y.s ? 1 : -1,
- xc = x.c,
- yc = y.c;
-
- // Either NaN, Infinity or 0?
- if ( !xc || !xc[0] || !yc || !yc[0] ) {
-
- return new BigNumber(
-
- // Return NaN if either NaN, or both Infinity or 0.
- !x.s || !y.s || ( xc ? yc && xc[0] == yc[0] : !yc ) ? NaN :
-
- // Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0.
- xc && xc[0] == 0 || !yc ? s * 0 : s / 0
- );
- }
-
- q = new BigNumber(s);
- qc = q.c = [];
- e = x.e - y.e;
- s = dp + e + 1;
-
- if ( !base ) {
- base = BASE;
- e = bitFloor( x.e / LOG_BASE ) - bitFloor( y.e / LOG_BASE );
- s = s / LOG_BASE | 0;
- }
-
- // Result exponent may be one less then the current value of e.
- // The coefficients of the BigNumbers from convertBase may have trailing zeros.
- for ( i = 0; yc[i] == ( xc[i] || 0 ); i++ );
- if ( yc[i] > ( xc[i] || 0 ) ) e--;
-
- if ( s < 0 ) {
- qc.push(1);
- more = true;
- } else {
- xL = xc.length;
- yL = yc.length;
- i = 0;
- s += 2;
-
- // Normalise xc and yc so highest order digit of yc is >= base / 2.
-
- n = mathfloor( base / ( yc[0] + 1 ) );
-
- // Not necessary, but to handle odd bases where yc[0] == ( base / 2 ) - 1.
- // if ( n > 1 || n++ == 1 && yc[0] < base / 2 ) {
- if ( n > 1 ) {
- yc = multiply( yc, n, base );
- xc = multiply( xc, n, base );
- yL = yc.length;
- xL = xc.length;
- }
-
- xi = yL;
- rem = xc.slice( 0, yL );
- remL = rem.length;
-
- // Add zeros to make remainder as long as divisor.
- for ( ; remL < yL; rem[remL++] = 0 );
- yz = yc.slice();
- yz.unshift(0);
- yc0 = yc[0];
- if ( yc[1] >= base / 2 ) yc0++;
- // Not necessary, but to prevent trial digit n > base, when using base 3.
- // else if ( base == 3 && yc0 == 1 ) yc0 = 1 + 1e-15;
-
- do {
- n = 0;
-
- // Compare divisor and remainder.
- cmp = compare( yc, rem, yL, remL );
-
- // If divisor < remainder.
- if ( cmp < 0 ) {
-
- // Calculate trial digit, n.
-
- rem0 = rem[0];
- if ( yL != remL ) rem0 = rem0 * base + ( rem[1] || 0 );
-
- // n is how many times the divisor goes into the current remainder.
- n = mathfloor( rem0 / yc0 );
-
- // Algorithm:
- // 1. product = divisor * trial digit (n)
- // 2. if product > remainder: product -= divisor, n--
- // 3. remainder -= product
- // 4. if product was < remainder at 2:
- // 5. compare new remainder and divisor
- // 6. If remainder > divisor: remainder -= divisor, n++
-
- if ( n > 1 ) {
-
- // n may be > base only when base is 3.
- if (n >= base) n = base - 1;
-
- // product = divisor * trial digit.
- prod = multiply( yc, n, base );
- prodL = prod.length;
- remL = rem.length;
-
- // Compare product and remainder.
- // If product > remainder.
- // Trial digit n too high.
- // n is 1 too high about 5% of the time, and is not known to have
- // ever been more than 1 too high.
- while ( compare( prod, rem, prodL, remL ) == 1 ) {
- n--;
-
- // Subtract divisor from product.
- subtract( prod, yL < prodL ? yz : yc, prodL, base );
- prodL = prod.length;
- cmp = 1;
- }
- } else {
-
- // n is 0 or 1, cmp is -1.
- // If n is 0, there is no need to compare yc and rem again below,
- // so change cmp to 1 to avoid it.
- // If n is 1, leave cmp as -1, so yc and rem are compared again.
- if ( n == 0 ) {
-
- // divisor < remainder, so n must be at least 1.
- cmp = n = 1;
- }
-
- // product = divisor
- prod = yc.slice();
- prodL = prod.length;
- }
-
- if ( prodL < remL ) prod.unshift(0);
-
- // Subtract product from remainder.
- subtract( rem, prod, remL, base );
- remL = rem.length;
-
- // If product was < remainder.
- if ( cmp == -1 ) {
-
- // Compare divisor and new remainder.
- // If divisor < new remainder, subtract divisor from remainder.
- // Trial digit n too low.
- // n is 1 too low about 5% of the time, and very rarely 2 too low.
- while ( compare( yc, rem, yL, remL ) < 1 ) {
- n++;
-
- // Subtract divisor from remainder.
- subtract( rem, yL < remL ? yz : yc, remL, base );
- remL = rem.length;
- }
- }
- } else if ( cmp === 0 ) {
- n++;
- rem = [0];
- } // else cmp === 1 and n will be 0
-
- // Add the next digit, n, to the result array.
- qc[i++] = n;
-
- // Update the remainder.
- if ( rem[0] ) {
- rem[remL++] = xc[xi] || 0;
- } else {
- rem = [ xc[xi] ];
- remL = 1;
- }
- } while ( ( xi++ < xL || rem[0] != null ) && s-- );
-
- more = rem[0] != null;
-
- // Leading zero?
- if ( !qc[0] ) qc.shift();
- }
-
- if ( base == BASE ) {
-
- // To calculate q.e, first get the number of digits of qc[0].
- for ( i = 1, s = qc[0]; s >= 10; s /= 10, i++ );
- round( q, dp + ( q.e = i + e * LOG_BASE - 1 ) + 1, rm, more );
-
- // Caller is convertBase.
- } else {
- q.e = e;
- q.r = +more;
- }
-
- return q;
- };
- })();
-
-
- /*
- * Return a string representing the value of BigNumber n in fixed-point or exponential
- * notation rounded to the specified decimal places or significant digits.
- *
- * n is a BigNumber.
- * i is the index of the last digit required (i.e. the digit that may be rounded up).
- * rm is the rounding mode.
- * caller is caller id: toExponential 19, toFixed 20, toFormat 21, toPrecision 24.
- */
- function format( n, i, rm, caller ) {
- var c0, e, ne, len, str;
-
- rm = rm != null && isValidInt( rm, 0, 8, caller, roundingMode )
- ? rm | 0 : ROUNDING_MODE;
-
- if ( !n.c ) return n.toString();
- c0 = n.c[0];
- ne = n.e;
-
- if ( i == null ) {
- str = coeffToString( n.c );
- str = caller == 19 || caller == 24 && ne <= TO_EXP_NEG
- ? toExponential( str, ne )
- : toFixedPoint( str, ne );
- } else {
- n = round( new BigNumber(n), i, rm );
-
- // n.e may have changed if the value was rounded up.
- e = n.e;
-
- str = coeffToString( n.c );
- len = str.length;
-
- // toPrecision returns exponential notation if the number of significant digits
- // specified is less than the number of digits necessary to represent the integer
- // part of the value in fixed-point notation.
-
- // Exponential notation.
- if ( caller == 19 || caller == 24 && ( i <= e || e <= TO_EXP_NEG ) ) {
-
- // Append zeros?
- for ( ; len < i; str += '0', len++ );
- str = toExponential( str, e );
-
- // Fixed-point notation.
- } else {
- i -= ne;
- str = toFixedPoint( str, e );
-
- // Append zeros?
- if ( e + 1 > len ) {
- if ( --i > 0 ) for ( str += '.'; i--; str += '0' );
- } else {
- i += e - len;
- if ( i > 0 ) {
- if ( e + 1 == len ) str += '.';
- for ( ; i--; str += '0' );
- }
- }
- }
- }
-
- return n.s < 0 && c0 ? '-' + str : str;
- }
-
-
- // Handle BigNumber.max and BigNumber.min.
- function maxOrMin( args, method ) {
- var m, n,
- i = 0;
-
- if ( isArray( args[0] ) ) args = args[0];
- m = new BigNumber( args[0] );
-
- for ( ; ++i < args.length; ) {
- n = new BigNumber( args[i] );
-
- // If any number is NaN, return NaN.
- if ( !n.s ) {
- m = n;
- break;
- } else if ( method.call( m, n ) ) {
- m = n;
- }
- }
-
- return m;
- }
-
-
- /*
- * Return true if n is an integer in range, otherwise throw.
- * Use for argument validation when ERRORS is true.
- */
- function intValidatorWithErrors( n, min, max, caller, name ) {
- if ( n < min || n > max || n != truncate(n) ) {
- raise( caller, ( name || 'decimal places' ) +
- ( n < min || n > max ? ' out of range' : ' not an integer' ), n );
- }
-
- return true;
- }
-
-
- /*
- * Strip trailing zeros, calculate base 10 exponent and check against MIN_EXP and MAX_EXP.
- * Called by minus, plus and times.
- */
- function normalise( n, c, e ) {
- var i = 1,
- j = c.length;
-
- // Remove trailing zeros.
- for ( ; !c[--j]; c.pop() );
-
- // Calculate the base 10 exponent. First get the number of digits of c[0].
- for ( j = c[0]; j >= 10; j /= 10, i++ );
-
- // Overflow?
- if ( ( e = i + e * LOG_BASE - 1 ) > MAX_EXP ) {
-
- // Infinity.
- n.c = n.e = null;
-
- // Underflow?
- } else if ( e < MIN_EXP ) {
-
- // Zero.
- n.c = [ n.e = 0 ];
- } else {
- n.e = e;
- n.c = c;
- }
-
- return n;
- }
-
-
- // Handle values that fail the validity test in BigNumber.
- parseNumeric = (function () {
- var basePrefix=/^(-?)0([xbo])/i,
- dotAfter=/^([^.]+)\.$/,
- dotBefore=/^\.([^.]+)$/,
- isInfinityOrNaN=/^-?(Infinity|NaN)$/,
- whitespaceOrPlus=/^\s*\+|^\s+|\s+$/g;
-
- return function ( x, str, num, b ) {
- var base,
- s = num ? str : str.replace( whitespaceOrPlus, '' );
-
- // No exception on ±Infinity or NaN.
- if ( isInfinityOrNaN.test(s) ) {
- x.s = isNaN(s) ? null : s < 0 ? -1 : 1;
- } else {
- if ( !num ) {
-
- // basePrefix = /^(-?)0([xbo])(?=\w[\w.]*$)/i
- s = s.replace( basePrefix, function ( m, p1, p2 ) {
- base = ( p2 = p2.toLowerCase() ) == 'x' ? 16 : p2 == 'b' ? 2 : 8;
- return !b || b == base ? p1 : m;
- });
-
- if (b) {
- base = b;
-
- // E.g. '1.' to '1', '.1' to '0.1'
- s = s.replace( dotAfter, '$1' ).replace( dotBefore, '0.$1' );
- }
-
- if ( str != s ) return new BigNumber( s, base );
- }
-
- // 'new BigNumber() not a number: {n}'
- // 'new BigNumber() not a base {b} number: {n}'
- if (ERRORS) raise( id, 'not a' + ( b ? ' base ' + b : '' ) + ' number', str );
- x.s = null;
- }
-
- x.c = x.e = null;
- id = 0;
- }
- })();
-
-
- // Throw a BigNumber Error.
- function raise( caller, msg, val ) {
- var error = new Error( [
- 'new BigNumber', // 0
- 'cmp', // 1
- 'config', // 2
- 'div', // 3
- 'divToInt', // 4
- 'eq', // 5
- 'gt', // 6
- 'gte', // 7
- 'lt', // 8
- 'lte', // 9
- 'minus', // 10
- 'mod', // 11
- 'plus', // 12
- 'precision', // 13
- 'random', // 14
- 'round', // 15
- 'shift', // 16
- 'times', // 17
- 'toDigits', // 18
- 'toExponential', // 19
- 'toFixed', // 20
- 'toFormat', // 21
- 'toFraction', // 22
- 'pow', // 23
- 'toPrecision', // 24
- 'toString', // 25
- 'BigNumber' // 26
- ][caller] + '() ' + msg + ': ' + val );
-
- error.name = 'BigNumber Error';
- id = 0;
- throw error;
- }
-
-
- /*
- * Round x to sd significant digits using rounding mode rm. Check for over/under-flow.
- * If r is truthy, it is known that there are more digits after the rounding digit.
- */
- function round( x, sd, rm, r ) {
- var d, i, j, k, n, ni, rd,
- xc = x.c,
- pows10 = POWS_TEN;
-
- // if x is not Infinity or NaN...
- if (xc) {
-
- // rd is the rounding digit, i.e. the digit after the digit that may be rounded up.
- // n is a base 1e14 number, the value of the element of array x.c containing rd.
- // ni is the index of n within x.c.
- // d is the number of digits of n.
- // i is the index of rd within n including leading zeros.
- // j is the actual index of rd within n (if < 0, rd is a leading zero).
- out: {
-
- // Get the number of digits of the first element of xc.
- for ( d = 1, k = xc[0]; k >= 10; k /= 10, d++ );
- i = sd - d;
-
- // If the rounding digit is in the first element of xc...
- if ( i < 0 ) {
- i += LOG_BASE;
- j = sd;
- n = xc[ ni = 0 ];
-
- // Get the rounding digit at index j of n.
- rd = n / pows10[ d - j - 1 ] % 10 | 0;
- } else {
- ni = mathceil( ( i + 1 ) / LOG_BASE );
-
- if ( ni >= xc.length ) {
-
- if (r) {
-
- // Needed by sqrt.
- for ( ; xc.length <= ni; xc.push(0) );
- n = rd = 0;
- d = 1;
- i %= LOG_BASE;
- j = i - LOG_BASE + 1;
- } else {
- break out;
- }
- } else {
- n = k = xc[ni];
-
- // Get the number of digits of n.
- for ( d = 1; k >= 10; k /= 10, d++ );
-
- // Get the index of rd within n.
- i %= LOG_BASE;
-
- // Get the index of rd within n, adjusted for leading zeros.
- // The number of leading zeros of n is given by LOG_BASE - d.
- j = i - LOG_BASE + d;
-
- // Get the rounding digit at index j of n.
- rd = j < 0 ? 0 : n / pows10[ d - j - 1 ] % 10 | 0;
- }
- }
-
- r = r || sd < 0 ||
-
- // Are there any non-zero digits after the rounding digit?
- // The expression n % pows10[ d - j - 1 ] returns all digits of n to the right
- // of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714.
- xc[ni + 1] != null || ( j < 0 ? n : n % pows10[ d - j - 1 ] );
-
- r = rm < 4
- ? ( rd || r ) && ( rm == 0 || rm == ( x.s < 0 ? 3 : 2 ) )
- : rd > 5 || rd == 5 && ( rm == 4 || r || rm == 6 &&
-
- // Check whether the digit to the left of the rounding digit is odd.
- ( ( i > 0 ? j > 0 ? n / pows10[ d - j ] : 0 : xc[ni - 1] ) % 10 ) & 1 ||
- rm == ( x.s < 0 ? 8 : 7 ) );
-
- if ( sd < 1 || !xc[0] ) {
- xc.length = 0;
-
- if (r) {
-
- // Convert sd to decimal places.
- sd -= x.e + 1;
-
- // 1, 0.1, 0.01, 0.001, 0.0001 etc.
- xc[0] = pows10[ sd % LOG_BASE ];
- x.e = -sd || 0;
- } else {
-
- // Zero.
- xc[0] = x.e = 0;
- }
-
- return x;
- }
-
- // Remove excess digits.
- if ( i == 0 ) {
- xc.length = ni;
- k = 1;
- ni--;
- } else {
- xc.length = ni + 1;
- k = pows10[ LOG_BASE - i ];
-
- // E.g. 56700 becomes 56000 if 7 is the rounding digit.
- // j > 0 means i > number of leading zeros of n.
- xc[ni] = j > 0 ? mathfloor( n / pows10[ d - j ] % pows10[j] ) * k : 0;
- }
-
- // Round up?
- if (r) {
-
- for ( ; ; ) {
-
- // If the digit to be rounded up is in the first element of xc...
- if ( ni == 0 ) {
-
- // i will be the length of xc[0] before k is added.
- for ( i = 1, j = xc[0]; j >= 10; j /= 10, i++ );
- j = xc[0] += k;
- for ( k = 1; j >= 10; j /= 10, k++ );
-
- // if i != k the length has increased.
- if ( i != k ) {
- x.e++;
- if ( xc[0] == BASE ) xc[0] = 1;
- }
-
- break;
- } else {
- xc[ni] += k;
- if ( xc[ni] != BASE ) break;
- xc[ni--] = 0;
- k = 1;
- }
- }
- }
-
- // Remove trailing zeros.
- for ( i = xc.length; xc[--i] === 0; xc.pop() );
- }
-
- // Overflow? Infinity.
- if ( x.e > MAX_EXP ) {
- x.c = x.e = null;
-
- // Underflow? Zero.
- } else if ( x.e < MIN_EXP ) {
- x.c = [ x.e = 0 ];
- }
- }
-
- return x;
- }
-
-
- // PROTOTYPE/INSTANCE METHODS
-
-
- /*
- * Return a new BigNumber whose value is the absolute value of this BigNumber.
- */
- P.absoluteValue = P.abs = function () {
- var x = new BigNumber(this);
- if ( x.s < 0 ) x.s = 1;
- return x;
- };
-
-
- /*
- * Return a new BigNumber whose value is the value of this BigNumber rounded to a whole
- * number in the direction of Infinity.
- */
- P.ceil = function () {
- return round( new BigNumber(this), this.e + 1, 2 );
- };
-
-
- /*
- * Return
- * 1 if the value of this BigNumber is greater than the value of BigNumber(y, b),
- * -1 if the value of this BigNumber is less than the value of BigNumber(y, b),
- * 0 if they have the same value,
- * or null if the value of either is NaN.
- */
- P.comparedTo = P.cmp = function ( y, b ) {
- id = 1;
- return compare( this, new BigNumber( y, b ) );
- };
-
-
- /*
- * Return the number of decimal places of the value of this BigNumber, or null if the value
- * of this BigNumber is ±Infinity or NaN.
- */
- P.decimalPlaces = P.dp = function () {
- var n, v,
- c = this.c;
-
- if ( !c ) return null;
- n = ( ( v = c.length - 1 ) - bitFloor( this.e / LOG_BASE ) ) * LOG_BASE;
-
- // Subtract the number of trailing zeros of the last number.
- if ( v = c[v] ) for ( ; v % 10 == 0; v /= 10, n-- );
- if ( n < 0 ) n = 0;
-
- return n;
- };
-
-
- /*
- * n / 0 = I
- * n / N = N
- * n / I = 0
- * 0 / n = 0
- * 0 / 0 = N
- * 0 / N = N
- * 0 / I = 0
- * N / n = N
- * N / 0 = N
- * N / N = N
- * N / I = N
- * I / n = I
- * I / 0 = I
- * I / N = N
- * I / I = N
- *
- * Return a new BigNumber whose value is the value of this BigNumber divided by the value of
- * BigNumber(y, b), rounded according to DECIMAL_PLACES and ROUNDING_MODE.
- */
- P.dividedBy = P.div = function ( y, b ) {
- id = 3;
- return div( this, new BigNumber( y, b ), DECIMAL_PLACES, ROUNDING_MODE );
- };
-
-
- /*
- * Return a new BigNumber whose value is the integer part of dividing the value of this
- * BigNumber by the value of BigNumber(y, b).
- */
- P.dividedToIntegerBy = P.divToInt = function ( y, b ) {
- id = 4;
- return div( this, new BigNumber( y, b ), 0, 1 );
- };
-
-
- /*
- * Return true if the value of this BigNumber is equal to the value of BigNumber(y, b),
- * otherwise returns false.
- */
- P.equals = P.eq = function ( y, b ) {
- id = 5;
- return compare( this, new BigNumber( y, b ) ) === 0;
- };
-
-
- /*
- * Return a new BigNumber whose value is the value of this BigNumber rounded to a whole
- * number in the direction of -Infinity.
- */
- P.floor = function () {
- return round( new BigNumber(this), this.e + 1, 3 );
- };
-
-
- /*
- * Return true if the value of this BigNumber is greater than the value of BigNumber(y, b),
- * otherwise returns false.
- */
- P.greaterThan = P.gt = function ( y, b ) {
- id = 6;
- return compare( this, new BigNumber( y, b ) ) > 0;
- };
-
-
- /*
- * Return true if the value of this BigNumber is greater than or equal to the value of
- * BigNumber(y, b), otherwise returns false.
- */
- P.greaterThanOrEqualTo = P.gte = function ( y, b ) {
- id = 7;
- return ( b = compare( this, new BigNumber( y, b ) ) ) === 1 || b === 0;
-
- };
-
-
- /*
- * Return true if the value of this BigNumber is a finite number, otherwise returns false.
- */
- P.isFinite = function () {
- return !!this.c;
- };
-
-
- /*
- * Return true if the value of this BigNumber is an integer, otherwise return false.
- */
- P.isInteger = P.isInt = function () {
- return !!this.c && bitFloor( this.e / LOG_BASE ) > this.c.length - 2;
- };
-
-
- /*
- * Return true if the value of this BigNumber is NaN, otherwise returns false.
- */
- P.isNaN = function () {
- return !this.s;
- };
-
-
- /*
- * Return true if the value of this BigNumber is negative, otherwise returns false.
- */
- P.isNegative = P.isNeg = function () {
- return this.s < 0;
- };
-
-
- /*
- * Return true if the value of this BigNumber is 0 or -0, otherwise returns false.
- */
- P.isZero = function () {
- return !!this.c && this.c[0] == 0;
- };
-
-
- /*
- * Return true if the value of this BigNumber is less than the value of BigNumber(y, b),
- * otherwise returns false.
- */
- P.lessThan = P.lt = function ( y, b ) {
- id = 8;
- return compare( this, new BigNumber( y, b ) ) < 0;
- };
-
-
- /*
- * Return true if the value of this BigNumber is less than or equal to the value of
- * BigNumber(y, b), otherwise returns false.
- */
- P.lessThanOrEqualTo = P.lte = function ( y, b ) {
- id = 9;
- return ( b = compare( this, new BigNumber( y, b ) ) ) === -1 || b === 0;
- };
-
-
- /*
- * n - 0 = n
- * n - N = N
- * n - I = -I
- * 0 - n = -n
- * 0 - 0 = 0
- * 0 - N = N
- * 0 - I = -I
- * N - n = N
- * N - 0 = N
- * N - N = N
- * N - I = N
- * I - n = I
- * I - 0 = I
- * I - N = N
- * I - I = N
- *
- * Return a new BigNumber whose value is the value of this BigNumber minus the value of
- * BigNumber(y, b).
- */
- P.minus = P.sub = function ( y, b ) {
- var i, j, t, xLTy,
- x = this,
- a = x.s;
-
- id = 10;
- y = new BigNumber( y, b );
- b = y.s;
-
- // Either NaN?
- if ( !a || !b ) return new BigNumber(NaN);
-
- // Signs differ?
- if ( a != b ) {
- y.s = -b;
- return x.plus(y);
- }
-
- var xe = x.e / LOG_BASE,
- ye = y.e / LOG_BASE,
- xc = x.c,
- yc = y.c;
-
- if ( !xe || !ye ) {
-
- // Either Infinity?
- if ( !xc || !yc ) return xc ? ( y.s = -b, y ) : new BigNumber( yc ? x : NaN );
-
- // Either zero?
- if ( !xc[0] || !yc[0] ) {
-
- // Return y if y is non-zero, x if x is non-zero, or zero if both are zero.
- return yc[0] ? ( y.s = -b, y ) : new BigNumber( xc[0] ? x :
-
- // IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity
- ROUNDING_MODE == 3 ? -0 : 0 );
- }
- }
-
- xe = bitFloor(xe);
- ye = bitFloor(ye);
- xc = xc.slice();
-
- // Determine which is the bigger number.
- if ( a = xe - ye ) {
-
- if ( xLTy = a < 0 ) {
- a = -a;
- t = xc;
- } else {
- ye = xe;
- t = yc;
- }
-
- t.reverse();
-
- // Prepend zeros to equalise exponents.
- for ( b = a; b--; t.push(0) );
- t.reverse();
- } else {
-
- // Exponents equal. Check digit by digit.
- j = ( xLTy = ( a = xc.length ) < ( b = yc.length ) ) ? a : b;
-
- for ( a = b = 0; b < j; b++ ) {
-
- if ( xc[b] != yc[b] ) {
- xLTy = xc[b] < yc[b];
- break;
- }
- }
- }
-
- // x < y? Point xc to the array of the bigger number.
- if (xLTy) t = xc, xc = yc, yc = t, y.s = -y.s;
-
- b = ( j = yc.length ) - ( i = xc.length );
-
- // Append zeros to xc if shorter.
- // No need to add zeros to yc if shorter as subtract only needs to start at yc.length.
- if ( b > 0 ) for ( ; b--; xc[i++] = 0 );
- b = BASE - 1;
-
- // Subtract yc from xc.
- for ( ; j > a; ) {
-
- if ( xc[--j] < yc[j] ) {
- for ( i = j; i && !xc[--i]; xc[i] = b );
- --xc[i];
- xc[j] += BASE;
- }
-
- xc[j] -= yc[j];
- }
-
- // Remove leading zeros and adjust exponent accordingly.
- for ( ; xc[0] == 0; xc.shift(), --ye );
-
- // Zero?
- if ( !xc[0] ) {
-
- // Following IEEE 754 (2008) 6.3,
- // n - n = +0 but n - n = -0 when rounding towards -Infinity.
- y.s = ROUNDING_MODE == 3 ? -1 : 1;
- y.c = [ y.e = 0 ];
- return y;
- }
-
- // No need to check for Infinity as +x - +y != Infinity && -x - -y != Infinity
- // for finite x and y.
- return normalise( y, xc, ye );
- };
-
-
- /*
- * n % 0 = N
- * n % N = N
- * n % I = n
- * 0 % n = 0
- * -0 % n = -0
- * 0 % 0 = N
- * 0 % N = N
- * 0 % I = 0
- * N % n = N
- * N % 0 = N
- * N % N = N
- * N % I = N
- * I % n = N
- * I % 0 = N
- * I % N = N
- * I % I = N
- *
- * Return a new BigNumber whose value is the value of this BigNumber modulo the value of
- * BigNumber(y, b). The result depends on the value of MODULO_MODE.
- */
- P.modulo = P.mod = function ( y, b ) {
- var q, s,
- x = this;
-
- id = 11;
- y = new BigNumber( y, b );
-
- // Return NaN if x is Infinity or NaN, or y is NaN or zero.
- if ( !x.c || !y.s || y.c && !y.c[0] ) {
- return new BigNumber(NaN);
-
- // Return x if y is Infinity or x is zero.
- } else if ( !y.c || x.c && !x.c[0] ) {
- return new BigNumber(x);
- }
-
- if ( MODULO_MODE == 9 ) {
-
- // Euclidian division: q = sign(y) * floor(x / abs(y))
- // r = x - qy where 0 <= r < abs(y)
- s = y.s;
- y.s = 1;
- q = div( x, y, 0, 3 );
- y.s = s;
- q.s *= s;
- } else {
- q = div( x, y, 0, MODULO_MODE );
- }
-
- return x.minus( q.times(y) );
- };
-
-
- /*
- * Return a new BigNumber whose value is the value of this BigNumber negated,
- * i.e. multiplied by -1.
- */
- P.negated = P.neg = function () {
- var x = new BigNumber(this);
- x.s = -x.s || null;
- return x;
- };
-
-
- /*
- * n + 0 = n
- * n + N = N
- * n + I = I
- * 0 + n = n
- * 0 + 0 = 0
- * 0 + N = N
- * 0 + I = I
- * N + n = N
- * N + 0 = N
- * N + N = N
- * N + I = N
- * I + n = I
- * I + 0 = I
- * I + N = N
- * I + I = I
- *
- * Return a new BigNumber whose value is the value of this BigNumber plus the value of
- * BigNumber(y, b).
- */
- P.plus = P.add = function ( y, b ) {
- var t,
- x = this,
- a = x.s;
-
- id = 12;
- y = new BigNumber( y, b );
- b = y.s;
-
- // Either NaN?
- if ( !a || !b ) return new BigNumber(NaN);
-
- // Signs differ?
- if ( a != b ) {
- y.s = -b;
- return x.minus(y);
- }
-
- var xe = x.e / LOG_BASE,
- ye = y.e / LOG_BASE,
- xc = x.c,
- yc = y.c;
-
- if ( !xe || !ye ) {
-
- // Return ±Infinity if either ±Infinity.
- if ( !xc || !yc ) return new BigNumber( a / 0 );
-
- // Either zero?
- // Return y if y is non-zero, x if x is non-zero, or zero if both are zero.
- if ( !xc[0] || !yc[0] ) return yc[0] ? y : new BigNumber( xc[0] ? x : a * 0 );
- }
-
- xe = bitFloor(xe);
- ye = bitFloor(ye);
- xc = xc.slice();
-
- // Prepend zeros to equalise exponents. Faster to use reverse then do unshifts.
- if ( a = xe - ye ) {
- if ( a > 0 ) {
- ye = xe;
- t = yc;
- } else {
- a = -a;
- t = xc;
- }
-
- t.reverse();
- for ( ; a--; t.push(0) );
- t.reverse();
- }
-
- a = xc.length;
- b = yc.length;
-
- // Point xc to the longer array, and b to the shorter length.
- if ( a - b < 0 ) t = yc, yc = xc, xc = t, b = a;
-
- // Only start adding at yc.length - 1 as the further digits of xc can be ignored.
- for ( a = 0; b; ) {
- a = ( xc[--b] = xc[b] + yc[b] + a ) / BASE | 0;
- xc[b] %= BASE;
- }
-
- if (a) {
- xc.unshift(a);
- ++ye;
- }
-
- // No need to check for zero, as +x + +y != 0 && -x + -y != 0
- // ye = MAX_EXP + 1 possible
- return normalise( y, xc, ye );
- };
-
-
- /*
- * Return the number of significant digits of the value of this BigNumber.
- *
- * [z] {boolean|number} Whether to count integer-part trailing zeros: true, false, 1 or 0.
- */
- P.precision = P.sd = function (z) {
- var n, v,
- x = this,
- c = x.c;
-
- // 'precision() argument not a boolean or binary digit: {z}'
- if ( z != null && z !== !!z && z !== 1 && z !== 0 ) {
- if (ERRORS) raise( 13, 'argument' + notBool, z );
- if ( z != !!z ) z = null;
- }
-
- if ( !c ) return null;
- v = c.length - 1;
- n = v * LOG_BASE + 1;
-
- if ( v = c[v] ) {
-
- // Subtract the number of trailing zeros of the last element.
- for ( ; v % 10 == 0; v /= 10, n-- );
-
- // Add the number of digits of the first element.
- for ( v = c[0]; v >= 10; v /= 10, n++ );
- }
-
- if ( z && x.e + 1 > n ) n = x.e + 1;
-
- return n;
- };
-
-
- /*
- * Return a new BigNumber whose value is the value of this BigNumber rounded to a maximum of
- * dp decimal places using rounding mode rm, or to 0 and ROUNDING_MODE respectively if
- * omitted.
- *
- * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.
- * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
- *
- * 'round() decimal places out of range: {dp}'
- * 'round() decimal places not an integer: {dp}'
- * 'round() rounding mode not an integer: {rm}'
- * 'round() rounding mode out of range: {rm}'
- */
- P.round = function ( dp, rm ) {
- var n = new BigNumber(this);
-
- if ( dp == null || isValidInt( dp, 0, MAX, 15 ) ) {
- round( n, ~~dp + this.e + 1, rm == null ||
- !isValidInt( rm, 0, 8, 15, roundingMode ) ? ROUNDING_MODE : rm | 0 );
- }
-
- return n;
- };
-
-
- /*
- * Return a new BigNumber whose value is the value of this BigNumber shifted by k places
- * (powers of 10). Shift to the right if n > 0, and to the left if n < 0.
- *
- * k {number} Integer, -MAX_SAFE_INTEGER to MAX_SAFE_INTEGER inclusive.
- *
- * If k is out of range and ERRORS is false, the result will be ±0 if k < 0, or ±Infinity
- * otherwise.
- *
- * 'shift() argument not an integer: {k}'
- * 'shift() argument out of range: {k}'
- */
- P.shift = function (k) {
- var n = this;
- return isValidInt( k, -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER, 16, 'argument' )
-
- // k < 1e+21, or truncate(k) will produce exponential notation.
- ? n.times( '1e' + truncate(k) )
- : new BigNumber( n.c && n.c[0] && ( k < -MAX_SAFE_INTEGER || k > MAX_SAFE_INTEGER )
- ? n.s * ( k < 0 ? 0 : 1 / 0 )
- : n );
- };
-
-
- /*
- * sqrt(-n) = N
- * sqrt( N) = N
- * sqrt(-I) = N
- * sqrt( I) = I
- * sqrt( 0) = 0
- * sqrt(-0) = -0
- *
- * Return a new BigNumber whose value is the square root of the value of this BigNumber,
- * rounded according to DECIMAL_PLACES and ROUNDING_MODE.
- */
- P.squareRoot = P.sqrt = function () {
- var m, n, r, rep, t,
- x = this,
- c = x.c,
- s = x.s,
- e = x.e,
- dp = DECIMAL_PLACES + 4,
- half = new BigNumber('0.5');
-
- // Negative/NaN/Infinity/zero?
- if ( s !== 1 || !c || !c[0] ) {
- return new BigNumber( !s || s < 0 && ( !c || c[0] ) ? NaN : c ? x : 1 / 0 );
- }
-
- // Initial estimate.
- s = Math.sqrt( +x );
-
- // Math.sqrt underflow/overflow?
- // Pass x to Math.sqrt as integer, then adjust the exponent of the result.
- if ( s == 0 || s == 1 / 0 ) {
- n = coeffToString(c);
- if ( ( n.length + e ) % 2 == 0 ) n += '0';
- s = Math.sqrt(n);
- e = bitFloor( ( e + 1 ) / 2 ) - ( e < 0 || e % 2 );
-
- if ( s == 1 / 0 ) {
- n = '1e' + e;
- } else {
- n = s.toExponential();
- n = n.slice( 0, n.indexOf('e') + 1 ) + e;
- }
-
- r = new BigNumber(n);
- } else {
- r = new BigNumber( s + '' );
- }
-
- // Check for zero.
- // r could be zero if MIN_EXP is changed after the this value was created.
- // This would cause a division by zero (x/t) and hence Infinity below, which would cause
- // coeffToString to throw.
- if ( r.c[0] ) {
- e = r.e;
- s = e + dp;
- if ( s < 3 ) s = 0;
-
- // Newton-Raphson iteration.
- for ( ; ; ) {
- t = r;
- r = half.times( t.plus( div( x, t, dp, 1 ) ) );
-
- if ( coeffToString( t.c ).slice( 0, s ) === ( n =
- coeffToString( r.c ) ).slice( 0, s ) ) {
-
- // The exponent of r may here be one less than the final result exponent,
- // e.g 0.0009999 (e-4) --> 0.001 (e-3), so adjust s so the rounding digits
- // are indexed correctly.
- if ( r.e < e ) --s;
- n = n.slice( s - 3, s + 1 );
-
- // The 4th rounding digit may be in error by -1 so if the 4 rounding digits
- // are 9999 or 4999 (i.e. approaching a rounding boundary) continue the
- // iteration.
- if ( n == '9999' || !rep && n == '4999' ) {
-
- // On the first iteration only, check to see if rounding up gives the
- // exact result as the nines may infinitely repeat.
- if ( !rep ) {
- round( t, t.e + DECIMAL_PLACES + 2, 0 );
-
- if ( t.times(t).eq(x) ) {
- r = t;
- break;
- }
- }
-
- dp += 4;
- s += 4;
- rep = 1;
- } else {
-
- // If rounding digits are null, 0{0,4} or 50{0,3}, check for exact
- // result. If not, then there are further digits and m will be truthy.
- if ( !+n || !+n.slice(1) && n.charAt(0) == '5' ) {
-
- // Truncate to the first rounding digit.
- round( r, r.e + DECIMAL_PLACES + 2, 1 );
- m = !r.times(r).eq(x);
- }
-
- break;
- }
- }
- }
- }
-
- return round( r, r.e + DECIMAL_PLACES + 1, ROUNDING_MODE, m );
- };
-
-
- /*
- * n * 0 = 0
- * n * N = N
- * n * I = I
- * 0 * n = 0
- * 0 * 0 = 0
- * 0 * N = N
- * 0 * I = N
- * N * n = N
- * N * 0 = N
- * N * N = N
- * N * I = N
- * I * n = I
- * I * 0 = N
- * I * N = N
- * I * I = I
- *
- * Return a new BigNumber whose value is the value of this BigNumber times the value of
- * BigNumber(y, b).
- */
- P.times = P.mul = function ( y, b ) {
- var c, e, i, j, k, m, xcL, xlo, xhi, ycL, ylo, yhi, zc,
- base, sqrtBase,
- x = this,
- xc = x.c,
- yc = ( id = 17, y = new BigNumber( y, b ) ).c;
-
- // Either NaN, ±Infinity or ±0?
- if ( !xc || !yc || !xc[0] || !yc[0] ) {
-
- // Return NaN if either is NaN, or one is 0 and the other is Infinity.
- if ( !x.s || !y.s || xc && !xc[0] && !yc || yc && !yc[0] && !xc ) {
- y.c = y.e = y.s = null;
- } else {
- y.s *= x.s;
-
- // Return ±Infinity if either is ±Infinity.
- if ( !xc || !yc ) {
- y.c = y.e = null;
-
- // Return ±0 if either is ±0.
- } else {
- y.c = [0];
- y.e = 0;
- }
- }
-
- return y;
- }
-
- e = bitFloor( x.e / LOG_BASE ) + bitFloor( y.e / LOG_BASE );
- y.s *= x.s;
- xcL = xc.length;
- ycL = yc.length;
-
- // Ensure xc points to longer array and xcL to its length.
- if ( xcL < ycL ) zc = xc, xc = yc, yc = zc, i = xcL, xcL = ycL, ycL = i;
-
- // Initialise the result array with zeros.
- for ( i = xcL + ycL, zc = []; i--; zc.push(0) );
-
- base = BASE;
- sqrtBase = SQRT_BASE;
-
- for ( i = ycL; --i >= 0; ) {
- c = 0;
- ylo = yc[i] % sqrtBase;
- yhi = yc[i] / sqrtBase | 0;
-
- for ( k = xcL, j = i + k; j > i; ) {
- xlo = xc[--k] % sqrtBase;
- xhi = xc[k] / sqrtBase | 0;
- m = yhi * xlo + xhi * ylo;
- xlo = ylo * xlo + ( ( m % sqrtBase ) * sqrtBase ) + zc[j] + c;
- c = ( xlo / base | 0 ) + ( m / sqrtBase | 0 ) + yhi * xhi;
- zc[j--] = xlo % base;
- }
-
- zc[j] = c;
- }
-
- if (c) {
- ++e;
- } else {
- zc.shift();
- }
-
- return normalise( y, zc, e );
- };
-
-
- /*
- * Return a new BigNumber whose value is the value of this BigNumber rounded to a maximum of
- * sd significant digits using rounding mode rm, or ROUNDING_MODE if rm is omitted.
- *
- * [sd] {number} Significant digits. Integer, 1 to MAX inclusive.
- * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
- *
- * 'toDigits() precision out of range: {sd}'
- * 'toDigits() precision not an integer: {sd}'
- * 'toDigits() rounding mode not an integer: {rm}'
- * 'toDigits() rounding mode out of range: {rm}'
- */
- P.toDigits = function ( sd, rm ) {
- var n = new BigNumber(this);
- sd = sd == null || !isValidInt( sd, 1, MAX, 18, 'precision' ) ? null : sd | 0;
- rm = rm == null || !isValidInt( rm, 0, 8, 18, roundingMode ) ? ROUNDING_MODE : rm | 0;
- return sd ? round( n, sd, rm ) : n;
- };
-
-
- /*
- * Return a string representing the value of this BigNumber in exponential notation and
- * rounded using ROUNDING_MODE to dp fixed decimal places.
- *
- * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.
- * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
- *
- * 'toExponential() decimal places not an integer: {dp}'
- * 'toExponential() decimal places out of range: {dp}'
- * 'toExponential() rounding mode not an integer: {rm}'
- * 'toExponential() rounding mode out of range: {rm}'
- */
- P.toExponential = function ( dp, rm ) {
- return format( this,
- dp != null && isValidInt( dp, 0, MAX, 19 ) ? ~~dp + 1 : null, rm, 19 );
- };
-
-
- /*
- * Return a string representing the value of this BigNumber in fixed-point notation rounding
- * to dp fixed decimal places using rounding mode rm, or ROUNDING_MODE if rm is omitted.
- *
- * Note: as with JavaScript's number type, (-0).toFixed(0) is '0',
- * but e.g. (-0.00001).toFixed(0) is '-0'.
- *
- * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.
- * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
- *
- * 'toFixed() decimal places not an integer: {dp}'
- * 'toFixed() decimal places out of range: {dp}'
- * 'toFixed() rounding mode not an integer: {rm}'
- * 'toFixed() rounding mode out of range: {rm}'
- */
- P.toFixed = function ( dp, rm ) {
- return format( this, dp != null && isValidInt( dp, 0, MAX, 20 )
- ? ~~dp + this.e + 1 : null, rm, 20 );
- };
-
-
- /*
- * Return a string representing the value of this BigNumber in fixed-point notation rounded
- * using rm or ROUNDING_MODE to dp decimal places, and formatted according to the properties
- * of the FORMAT object (see BigNumber.config).
- *
- * FORMAT = {
- * decimalSeparator : '.',
- * groupSeparator : ',',
- * groupSize : 3,
- * secondaryGroupSize : 0,
- * fractionGroupSeparator : '\xA0', // non-breaking space
- * fractionGroupSize : 0
- * };
- *
- * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.
- * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
- *
- * 'toFormat() decimal places not an integer: {dp}'
- * 'toFormat() decimal places out of range: {dp}'
- * 'toFormat() rounding mode not an integer: {rm}'
- * 'toFormat() rounding mode out of range: {rm}'
- */
- P.toFormat = function ( dp, rm ) {
- var str = format( this, dp != null && isValidInt( dp, 0, MAX, 21 )
- ? ~~dp + this.e + 1 : null, rm, 21 );
-
- if ( this.c ) {
- var i,
- arr = str.split('.'),
- g1 = +FORMAT.groupSize,
- g2 = +FORMAT.secondaryGroupSize,
- groupSeparator = FORMAT.groupSeparator,
- intPart = arr[0],
- fractionPart = arr[1],
- isNeg = this.s < 0,
- intDigits = isNeg ? intPart.slice(1) : intPart,
- len = intDigits.length;
-
- if (g2) i = g1, g1 = g2, g2 = i, len -= i;
-
- if ( g1 > 0 && len > 0 ) {
- i = len % g1 || g1;
- intPart = intDigits.substr( 0, i );
-
- for ( ; i < len; i += g1 ) {
- intPart += groupSeparator + intDigits.substr( i, g1 );
- }
-
- if ( g2 > 0 ) intPart += groupSeparator + intDigits.slice(i);
- if (isNeg) intPart = '-' + intPart;
- }
-
- str = fractionPart
- ? intPart + FORMAT.decimalSeparator + ( ( g2 = +FORMAT.fractionGroupSize )
- ? fractionPart.replace( new RegExp( '\\d{' + g2 + '}\\B', 'g' ),
- '$&' + FORMAT.fractionGroupSeparator )
- : fractionPart )
- : intPart;
- }
-
- return str;
- };
-
-
- /*
- * Return a string array representing the value of this BigNumber as a simple fraction with
- * an integer numerator and an integer denominator. The denominator will be a positive
- * non-zero value less than or equal to the specified maximum denominator. If a maximum
- * denominator is not specified, the denominator will be the lowest value necessary to
- * represent the number exactly.
- *
- * [md] {number|string|BigNumber} Integer >= 1 and < Infinity. The maximum denominator.
- *
- * 'toFraction() max denominator not an integer: {md}'
- * 'toFraction() max denominator out of range: {md}'
- */
- P.toFraction = function (md) {
- var arr, d0, d2, e, exp, n, n0, q, s,
- k = ERRORS,
- x = this,
- xc = x.c,
- d = new BigNumber(ONE),
- n1 = d0 = new BigNumber(ONE),
- d1 = n0 = new BigNumber(ONE);
-
- if ( md != null ) {
- ERRORS = false;
- n = new BigNumber(md);
- ERRORS = k;
-
- if ( !( k = n.isInt() ) || n.lt(ONE) ) {
-
- if (ERRORS) {
- raise( 22,
- 'max denominator ' + ( k ? 'out of range' : 'not an integer' ), md );
- }
-
- // ERRORS is false:
- // If md is a finite non-integer >= 1, round it to an integer and use it.
- md = !k && n.c && round( n, n.e + 1, 1 ).gte(ONE) ? n : null;
- }
- }
-
- if ( !xc ) return x.toString();
- s = coeffToString(xc);
-
- // Determine initial denominator.
- // d is a power of 10 and the minimum max denominator that specifies the value exactly.
- e = d.e = s.length - x.e - 1;
- d.c[0] = POWS_TEN[ ( exp = e % LOG_BASE ) < 0 ? LOG_BASE + exp : exp ];
- md = !md || n.cmp(d) > 0 ? ( e > 0 ? d : n1 ) : n;
-
- exp = MAX_EXP;
- MAX_EXP = 1 / 0;
- n = new BigNumber(s);
-
- // n0 = d1 = 0
- n0.c[0] = 0;
-
- for ( ; ; ) {
- q = div( n, d, 0, 1 );
- d2 = d0.plus( q.times(d1) );
- if ( d2.cmp(md) == 1 ) break;
- d0 = d1;
- d1 = d2;
- n1 = n0.plus( q.times( d2 = n1 ) );
- n0 = d2;
- d = n.minus( q.times( d2 = d ) );
- n = d2;
- }
-
- d2 = div( md.minus(d0), d1, 0, 1 );
- n0 = n0.plus( d2.times(n1) );
- d0 = d0.plus( d2.times(d1) );
- n0.s = n1.s = x.s;
- e *= 2;
-
- // Determine which fraction is closer to x, n0/d0 or n1/d1
- arr = div( n1, d1, e, ROUNDING_MODE ).minus(x).abs().cmp(
- div( n0, d0, e, ROUNDING_MODE ).minus(x).abs() ) < 1
- ? [ n1.toString(), d1.toString() ]
- : [ n0.toString(), d0.toString() ];
-
- MAX_EXP = exp;
- return arr;
- };
-
-
- /*
- * Return the value of this BigNumber converted to a number primitive.
- */
- P.toNumber = function () {
- var x = this;
-
- // Ensure zero has correct sign.
- return +x || ( x.s ? x.s * 0 : NaN );
- };
-
-
- /*
- * Return a BigNumber whose value is the value of this BigNumber raised to the power n.
- * If n is negative round according to DECIMAL_PLACES and ROUNDING_MODE.
- * If POW_PRECISION is not 0, round to POW_PRECISION using ROUNDING_MODE.
- *
- * n {number} Integer, -9007199254740992 to 9007199254740992 inclusive.
- * (Performs 54 loop iterations for n of 9007199254740992.)
- *
- * 'pow() exponent not an integer: {n}'
- * 'pow() exponent out of range: {n}'
- */
- P.toPower = P.pow = function (n) {
- var k, y,
- i = mathfloor( n < 0 ? -n : +n ),
- x = this;
-
- // Pass ±Infinity to Math.pow if exponent is out of range.
- if ( !isValidInt( n, -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER, 23, 'exponent' ) &&
- ( !isFinite(n) || i > MAX_SAFE_INTEGER && ( n /= 0 ) ||
- parseFloat(n) != n && !( n = NaN ) ) ) {
- return new BigNumber( Math.pow( +x, n ) );
- }
-
- // Truncating each coefficient array to a length of k after each multiplication equates
- // to truncating significant digits to POW_PRECISION + [28, 41], i.e. there will be a
- // minimum of 28 guard digits retained. (Using + 1.5 would give [9, 21] guard digits.)
- k = POW_PRECISION ? mathceil( POW_PRECISION / LOG_BASE + 2 ) : 0;
- y = new BigNumber(ONE);
-
- for ( ; ; ) {
-
- if ( i % 2 ) {
- y = y.times(x);
- if ( !y.c ) break;
- if ( k && y.c.length > k ) y.c.length = k;
- }
-
- i = mathfloor( i / 2 );
- if ( !i ) break;
-
- x = x.times(x);
- if ( k && x.c && x.c.length > k ) x.c.length = k;
- }
-
- if ( n < 0 ) y = ONE.div(y);
- return k ? round( y, POW_PRECISION, ROUNDING_MODE ) : y;
- };
-
-
- /*
- * Return a string representing the value of this BigNumber rounded to sd significant digits
- * using rounding mode rm or ROUNDING_MODE. If sd is less than the number of digits
- * necessary to represent the integer part of the value in fixed-point notation, then use
- * exponential notation.
- *
- * [sd] {number} Significant digits. Integer, 1 to MAX inclusive.
- * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
- *
- * 'toPrecision() precision not an integer: {sd}'
- * 'toPrecision() precision out of range: {sd}'
- * 'toPrecision() rounding mode not an integer: {rm}'
- * 'toPrecision() rounding mode out of range: {rm}'
- */
- P.toPrecision = function ( sd, rm ) {
- return format( this, sd != null && isValidInt( sd, 1, MAX, 24, 'precision' )
- ? sd | 0 : null, rm, 24 );
- };
-
-
- /*
- * Return a string representing the value of this BigNumber in base b, or base 10 if b is
- * omitted. If a base is specified, including base 10, round according to DECIMAL_PLACES and
- * ROUNDING_MODE. If a base is not specified, and this BigNumber has a positive exponent
- * that is equal to or greater than TO_EXP_POS, or a negative exponent equal to or less than
- * TO_EXP_NEG, return exponential notation.
- *
- * [b] {number} Integer, 2 to 64 inclusive.
- *
- * 'toString() base not an integer: {b}'
- * 'toString() base out of range: {b}'
- */
- P.toString = function (b) {
- var str,
- n = this,
- s = n.s,
- e = n.e;
-
- // Infinity or NaN?
- if ( e === null ) {
-
- if (s) {
- str = 'Infinity';
- if ( s < 0 ) str = '-' + str;
- } else {
- str = 'NaN';
- }
- } else {
- str = coeffToString( n.c );
-
- if ( b == null || !isValidInt( b, 2, 64, 25, 'base' ) ) {
- str = e <= TO_EXP_NEG || e >= TO_EXP_POS
- ? toExponential( str, e )
- : toFixedPoint( str, e );
- } else {
- str = convertBase( toFixedPoint( str, e ), b | 0, 10, s );
- }
-
- if ( s < 0 && n.c[0] ) str = '-' + str;
- }
-
- return str;
- };
-
-
- /*
- * Return a new BigNumber whose value is the value of this BigNumber truncated to a whole
- * number.
- */
- P.truncated = P.trunc = function () {
- return round( new BigNumber(this), this.e + 1, 1 );
- };
-
-
-
- /*
- * Return as toString, but do not accept a base argument.
- */
- P.valueOf = P.toJSON = function () {
- return this.toString();
- };
-
-
- // Aliases for BigDecimal methods.
- //P.add = P.plus; // P.add included above
- //P.subtract = P.minus; // P.sub included above
- //P.multiply = P.times; // P.mul included above
- //P.divide = P.div;
- //P.remainder = P.mod;
- //P.compareTo = P.cmp;
- //P.negate = P.neg;
-
-
- if ( configObj != null ) BigNumber.config(configObj);
-
- return BigNumber;
- }
-
-
- // PRIVATE HELPER FUNCTIONS
-
-
- function bitFloor(n) {
- var i = n | 0;
- return n > 0 || n === i ? i : i - 1;
- }
-
-
- // Return a coefficient array as a string of base 10 digits.
- function coeffToString(a) {
- var s, z,
- i = 1,
- j = a.length,
- r = a[0] + '';
-
- for ( ; i < j; ) {
- s = a[i++] + '';
- z = LOG_BASE - s.length;
- for ( ; z--; s = '0' + s );
- r += s;
- }
-
- // Determine trailing zeros.
- for ( j = r.length; r.charCodeAt(--j) === 48; );
- return r.slice( 0, j + 1 || 1 );
- }
-
-
- // Compare the value of BigNumbers x and y.
- function compare( x, y ) {
- var a, b,
- xc = x.c,
- yc = y.c,
- i = x.s,
- j = y.s,
- k = x.e,
- l = y.e;
-
- // Either NaN?
- if ( !i || !j ) return null;
-
- a = xc && !xc[0];
- b = yc && !yc[0];
-
- // Either zero?
- if ( a || b ) return a ? b ? 0 : -j : i;
-
- // Signs differ?
- if ( i != j ) return i;
-
- a = i < 0;
- b = k == l;
-
- // Either Infinity?
- if ( !xc || !yc ) return b ? 0 : !xc ^ a ? 1 : -1;
-
- // Compare exponents.
- if ( !b ) return k > l ^ a ? 1 : -1;
-
- j = ( k = xc.length ) < ( l = yc.length ) ? k : l;
-
- // Compare digit by digit.
- for ( i = 0; i < j; i++ ) if ( xc[i] != yc[i] ) return xc[i] > yc[i] ^ a ? 1 : -1;
-
- // Compare lengths.
- return k == l ? 0 : k > l ^ a ? 1 : -1;
- }
-
-
- /*
- * Return true if n is a valid number in range, otherwise false.
- * Use for argument validation when ERRORS is false.
- * Note: parseInt('1e+1') == 1 but parseFloat('1e+1') == 10.
- */
- function intValidatorNoErrors( n, min, max ) {
- return ( n = truncate(n) ) >= min && n <= max;
- }
-
-
- function isArray(obj) {
- return Object.prototype.toString.call(obj) == '[object Array]';
- }
-
-
- /*
- * Convert string of baseIn to an array of numbers of baseOut.
- * Eg. convertBase('255', 10, 16) returns [15, 15].
- * Eg. convertBase('ff', 16, 10) returns [2, 5, 5].
- */
- function toBaseOut( str, baseIn, baseOut ) {
- var j,
- arr = [0],
- arrL,
- i = 0,
- len = str.length;
-
- for ( ; i < len; ) {
- for ( arrL = arr.length; arrL--; arr[arrL] *= baseIn );
- arr[ j = 0 ] += ALPHABET.indexOf( str.charAt( i++ ) );
-
- for ( ; j < arr.length; j++ ) {
-
- if ( arr[j] > baseOut - 1 ) {
- if ( arr[j + 1] == null ) arr[j + 1] = 0;
- arr[j + 1] += arr[j] / baseOut | 0;
- arr[j] %= baseOut;
- }
- }
- }
-
- return arr.reverse();
- }
-
-
- function toExponential( str, e ) {
- return ( str.length > 1 ? str.charAt(0) + '.' + str.slice(1) : str ) +
- ( e < 0 ? 'e' : 'e+' ) + e;
- }
-
-
- function toFixedPoint( str, e ) {
- var len, z;
-
- // Negative exponent?
- if ( e < 0 ) {
-
- // Prepend zeros.
- for ( z = '0.'; ++e; z += '0' );
- str = z + str;
-
- // Positive exponent
- } else {
- len = str.length;
-
- // Append zeros.
- if ( ++e > len ) {
- for ( z = '0', e -= len; --e; z += '0' );
- str += z;
- } else if ( e < len ) {
- str = str.slice( 0, e ) + '.' + str.slice(e);
- }
- }
-
- return str;
- }
-
-
- function truncate(n) {
- n = parseFloat(n);
- return n < 0 ? mathceil(n) : mathfloor(n);
- }
-
-
- // EXPORT
-
-
- BigNumber = another();
-
- // AMD.
- if ( typeof define == 'function' && define.amd ) {
- define( function () { return BigNumber; } );
-
- // Node and other environments that support module.exports.
- } else if ( typeof module != 'undefined' && module.exports ) {
- module.exports = BigNumber;
- if ( !crypto ) try { crypto = require('crypto'); } catch (e) {}
-
- // Browser.
- } else {
- global.BigNumber = BigNumber;
- }
-})(this);
-
-},{"crypto":1}],"natspec":[function(require,module,exports){
-/*
- This file is part of natspec.js.
-
- natspec.js is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- natspec.js is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with natspec.js. If not, see <http://www.gnu.org/licenses/>.
-*/
-/** @file natspec.js
- * @authors:
- * Marek Kotewicz <marek@ethdev.com>
- * @date 2015
- */
-
-var abi = require('./node_modules/web3/lib/solidity/abi.js');
-
-/**
- * This object should be used to evaluate natspec expression
- * It has one method evaluateExpression which shoul be used
- */
-var natspec = (function () {
- /**
- * Helper method
- * Should be called to copy values from object to global context
- *
- * @method copyToContext
- * @param {Object} object from which we want to copy properties
- * @param {Object} object to which we copy
- */
- var copyToContext = function (obj, context) {
- Object.keys(obj).forEach(function (key) {
- context[key] = obj[key];
- });
- }
-
- /**
- * Should be used to generate codes, which will be evaluated
- *
- * @method generateCode
- * @param {Object} object from which code will be generated
- * @return {String} javascript code which is used to initalized variables
- */
- var generateCode = function (obj) {
- return Object.keys(obj).reduce(function (acc, key) {
- return acc + "var " + key + " = context['" + key + "'];\n";
- }, "");
- };
-
- /**
- * Helper method
- * Should be called to get method with given name from the abi
- *
- * @method getMethodWithName
- * @param {Array} contract's abi
- * @param {String} name of the method that we are looking for
- * @return {Object} abi for method with name
- */
- var getMethodWithName = function(abi, name) {
- return abi.filter(function (method) {
- return method.name === name;
- })[0];
- };
-
- /**
- * Should be used to get all contract method input variables
- *
- * @method getMethodInputParams
- * @param {Object} abi for certain method
- * @param {Object} transaction object
- * @return {Object} object with all contract's method input variables
- */
- var getMethodInputParams = function (method, transaction) {
- // do it with output formatter (cause we have to decode)
- var params = abi.formatOutput(method.inputs, '0x' + transaction.params[0].data.slice(10));
-
- return method.inputs.reduce(function (acc, current, index) {
- acc[current.name] = params[index];
- return acc;
- }, {});
- };
-
- /**
- * Should be called when we want to evaluate natspec expression
- * Replaces all natspec 'subexpressions' with evaluated value
- *
- * @method mapExpressionToEvaluate
- * @param {String} expression to evaluate
- * @param {Function} callback which is called to evaluate te expression
- * @return {String} evaluated expression
- */
- var mapExpressionsToEvaluate = function (expression, cb) {
- var evaluatedExpression = "";
-
- // match everything in quotes
- var pattern = /\` + "`" + `(?:\\.|[^` + "`" + `\\])*\` + "`" + `/gim
- var match;
- var lastIndex = 0;
- try {
- while ((match = pattern.exec(expression)) !== null) {
- var startIndex = pattern.lastIndex - match[0].length;
- var toEval = match[0].slice(1, match[0].length - 1);
- evaluatedExpression += expression.slice(lastIndex, startIndex);
- var evaluatedPart = cb(toEval);
- evaluatedExpression += evaluatedPart;
- lastIndex = pattern.lastIndex;
- }
-
- evaluatedExpression += expression.slice(lastIndex);
- }
- catch (err) {
- throw new Error("Natspec evaluation failed, wrong input params");
- }
-
- return evaluatedExpression;
- };
-
- /**
- * Should be called to evaluate single expression
- * Is internally using javascript's 'eval' method
- *
- * @method evaluateExpression
- * @param {String} expression which should be evaluated
- * @param {Object} [call] object containing contract abi, transaction, called method
- * @return {String} evaluated expression
- * @throws exception if method is not found or we are trying to evaluate input params that does not exists
- */
-
- var utils = require('../utils/utils');
-
- var evaluateExpression = function (expression, call) {
- //var self = this;
- var context = {};
-
- if (!!call) {
- try {
- var method = getMethodWithName(call.abi, call.method);
- var params = getMethodInputParams(method, call.transaction);
- copyToContext(params, context);
- }
- catch (err) {
- throw new Error("Natspec evaluation failed, method does not exist");
- }
- }
-
- var code = generateCode(context);
-
- var evaluatedExpression = mapExpressionsToEvaluate(expression, function (toEval) {
- //var fn = new Function("context", "toHex", code + "return " + toEval + ";");
- //return fn(context, toHex).toString();
- var fn = new Function("context", "utils", code + "return " + toEval + ";");
- return fn(context, utils).toString();
- });
-
- return evaluatedExpression;
- };
-
- /**
- * Safe version of evaluateExpression
- * Instead of throwing an exception it returns it as a string
- *
- * @method evaluateExpressionSafe
- * @param {String} expression which should be evaluated
- * @param {Object} [call] object containing contract abi, transaction, called method
- * @return {String} evaluated expression
- */
- var evaluateExpressionSafe = function (expression, call) {
- try {
- return evaluateExpression(expression, call);
- }
- catch (err) {
- return err.message;
- }
- };
-
- return {
- evaluateExpression: evaluateExpression,
- evaluateExpressionSafe: evaluateExpressionSafe
- };
-
-})();
-
-module.exports = natspec;
-
-
-},{"./node_modules/web3/lib/solidity/abi.js":2,"../utils/utils":7}]},{},[]);
-`
-
-//# sourceMappingURL=natspec.js.map`
diff --git a/common/natspec/natspec_test.go b/common/natspec/natspec_test.go
deleted file mode 100644
index 50fd3f665..000000000
--- a/common/natspec/natspec_test.go
+++ /dev/null
@@ -1,160 +0,0 @@
-// Copyright 2015 The go-ethereum Authors
-// This file is part of the go-ethereum library.
-//
-// The go-ethereum library is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Lesser General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// The go-ethereum library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
-
-// +build ignore
-
-package natspec
-
-import (
- "testing"
-)
-
-func makeInfoDoc(desc string) []byte {
- return []byte(`
-{
- "source": "contract test { }",
- "language": "Solidity",
- "compilerVersion": "1",
- "userDoc": {
- "methods": {
- "multiply(uint256)": {
- "notice": "` + desc + `"
- },
- "balance(address)": {
- "notice": "` + "`(balanceInmGAV / 1000).fixed(0,3)`" + ` GAV is the total funds available to ` + "`who.address()`." + `"
- }
- },
- "invariants": [
- { "notice": "The sum total amount of GAV in the system is 1 million." }
- ],
- "construction": [
- { "notice": "Endows ` + "`message.caller.address()`" + ` with 1m GAV." }
- ]
- },
- "abiDefinition": [{
- "name": "multiply",
- "constant": false,
- "type": "function",
- "inputs": [{
- "name": "a",
- "type": "uint256"
- }],
- "outputs": [{
- "name": "d",
- "type": "uint256"
- }]
- }]
-}`)
-}
-
-var data = "0xc6888fa1000000000000000000000000000000000000000000000000000000000000007a"
-
-var tx = `
-{
- "params": [{
- "to": "0x8521742d3f456bd237e312d6e30724960f72517a",
- "data": "0xc6888fa1000000000000000000000000000000000000000000000000000000000000007a"
- }],
-}
-`
-
-func TestNotice(t *testing.T) {
-
- desc := "Will multiply `a` by 7 and return `a * 7`."
- expected := "Will multiply 122 by 7 and return 854."
-
- infodoc := makeInfoDoc(desc)
- ns, err := NewWithDocs(infodoc, tx, data)
- if err != nil {
- t.Errorf("New: error: %v", err)
- return
- }
-
- notice, err := ns.Notice()
-
- if err != nil {
- t.Errorf("expected no error, got %v", err)
- }
-
- if notice != expected {
- t.Errorf("incorrect notice. expected %v, got %v", expected, notice)
- }
-}
-
-// test missing method
-func TestMissingMethod(t *testing.T) {
-
- desc := "Will multiply `a` by 7 and return `a * 7`."
- expected := "natspec.js error evaluating expression: Natspec evaluation failed, method does not exist"
-
- infodoc := makeInfoDoc(desc)
- ns, err := NewWithDocs(infodoc, tx, data)
- if err != nil {
- t.Errorf("New: error: %v", err)
- }
-
- notice, err := ns.noticeForMethod(tx, "missing_method", "")
-
- if err == nil {
- t.Errorf("expected error, got nothing (notice: '%v')", notice)
- } else {
- if err.Error() != expected {
- t.Errorf("expected error '%s' got '%v' (notice: '%v')", expected, err, notice)
- }
- }
-}
-
-// test invalid desc
-
-func TestInvalidDesc(t *testing.T) {
-
- desc := "Will multiply 122 by \"7\" and return 854."
- expected := "invalid character '7' after object key:value pair"
-
- infodoc := makeInfoDoc(desc)
- _, err := NewWithDocs(infodoc, tx, data)
- if err == nil {
- t.Errorf("expected error, got nothing", err)
- } else {
- if err.Error() != expected {
- t.Errorf("expected error '%s' got '%v'", expected, err)
- }
- }
-}
-
-// test wrong input params
-func TestWrongInputParams(t *testing.T) {
-
- desc := "Will multiply `e` by 7 and return `a * 7`."
- expected := "natspec.js error evaluating expression: Natspec evaluation failed, wrong input params"
-
- infodoc := makeInfoDoc(desc)
- ns, err := NewWithDocs(infodoc, tx, data)
- if err != nil {
- t.Errorf("New: error: %v", err)
- }
-
- notice, err := ns.Notice()
-
- if err == nil {
- t.Errorf("expected error, got nothing (notice: '%v')", notice)
- } else {
- if err.Error() != expected {
- t.Errorf("expected error '%s' got '%v' (notice: '%v')", expected, err, notice)
- }
- }
-
-}
diff --git a/eth/api.go b/eth/api.go
index c2fdbe99c..48f512b1b 100644
--- a/eth/api.go
+++ b/eth/api.go
@@ -102,7 +102,7 @@ func (s *PublicMinerAPI) SubmitWork(nonce rpc.HexNumber, solution, digest common
// result[2], 32 bytes hex encoded boundary condition ("target"), 2^256/difficulty
func (s *PublicMinerAPI) GetWork() (work [3]string, err error) {
if !s.e.IsMining() {
- if err := s.e.StartMining(0, ""); err != nil {
+ if err := s.e.StartMining(0); err != nil {
return work, err
}
}
@@ -141,7 +141,7 @@ func (s *PrivateMinerAPI) Start(threads *rpc.HexNumber) (bool, error) {
threads = rpc.NewHexNumber(runtime.NumCPU())
}
- err := s.e.StartMining(threads.Int(), "")
+ err := s.e.StartMining(threads.Int())
if err == nil {
return true, nil
}
diff --git a/eth/backend.go b/eth/backend.go
index c4a883c9e..24419d6d8 100644
--- a/eth/backend.go
+++ b/eth/backend.go
@@ -362,6 +362,17 @@ func (self *Ethereum) SetEtherbase(etherbase common.Address) {
self.miner.SetEtherbase(etherbase)
}
+func (s *Ethereum) StartMining(threads int) error {
+ eb, err := s.Etherbase()
+ if err != nil {
+ err = fmt.Errorf("Cannot start mining without etherbase address: %v", err)
+ glog.V(logger.Error).Infoln(err)
+ return err
+ }
+ go s.miner.Start(eb, threads)
+ return nil
+}
+
func (s *Ethereum) StopMining() { s.miner.Stop() }
func (s *Ethereum) IsMining() bool { return s.miner.Mining() }
func (s *Ethereum) Miner() *miner.Miner { return s.miner }
diff --git a/eth/cpu_mining.go b/eth/cpu_mining.go
deleted file mode 100644
index 3469d394e..000000000
--- a/eth/cpu_mining.go
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright 2015 The go-ethereum Authors
-// This file is part of the go-ethereum library.
-//
-// The go-ethereum library is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Lesser General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// The go-ethereum library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
-
-// +build !opencl
-
-package eth
-
-import (
- "errors"
- "fmt"
-
- "github.com/ethereum/go-ethereum/logger"
- "github.com/ethereum/go-ethereum/logger/glog"
-)
-
-const disabledInfo = "Set GO_OPENCL and re-build to enable."
-
-func (s *Ethereum) StartMining(threads int, gpus string) error {
- eb, err := s.Etherbase()
- if err != nil {
- err = fmt.Errorf("Cannot start mining without etherbase address: %v", err)
- glog.V(logger.Error).Infoln(err)
- return err
- }
-
- if gpus != "" {
- return errors.New("GPU mining disabled. " + disabledInfo)
- }
-
- // CPU mining
- go s.miner.Start(eb, threads)
- return nil
-}
-
-func GPUBench(gpuid uint64) {
- fmt.Println("GPU mining disabled. " + disabledInfo)
-}
-
-func PrintOpenCLDevices() {
- fmt.Println("OpenCL disabled. " + disabledInfo)
-}
diff --git a/eth/gpu_mining.go b/eth/gpu_mining.go
deleted file mode 100644
index 12fa74601..000000000
--- a/eth/gpu_mining.go
+++ /dev/null
@@ -1,102 +0,0 @@
-// Copyright 2015 The go-ethereum Authors
-// This file is part of the go-ethereum library.
-//
-// The go-ethereum library is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Lesser General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// The go-ethereum library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
-
-// +build opencl
-
-package eth
-
-import (
- "fmt"
- "math/big"
- "strconv"
- "strings"
- "time"
-
- "github.com/ethereum/ethash"
- "github.com/ethereum/go-ethereum/common"
- "github.com/ethereum/go-ethereum/core/types"
- "github.com/ethereum/go-ethereum/logger"
- "github.com/ethereum/go-ethereum/logger/glog"
- "github.com/ethereum/go-ethereum/miner"
-)
-
-func (s *Ethereum) StartMining(threads int, gpus string) error {
- eb, err := s.Etherbase()
- if err != nil {
- err = fmt.Errorf("Cannot start mining without etherbase address: %v", err)
- glog.V(logger.Error).Infoln(err)
- return err
- }
-
- // GPU mining
- if gpus != "" {
- var ids []int
- for _, s := range strings.Split(gpus, ",") {
- i, err := strconv.Atoi(s)
- if err != nil {
- return fmt.Errorf("Invalid GPU id(s): %v", err)
- }
- if i < 0 {
- return fmt.Errorf("Invalid GPU id: %v", i)
- }
- ids = append(ids, i)
- }
-
- // TODO: re-creating miner is a bit ugly
- s.miner = miner.New(s, s.chainConfig, s.EventMux(), ethash.NewCL(ids))
- go s.miner.Start(eb, len(ids))
- return nil
- }
-
- // CPU mining
- go s.miner.Start(eb, threads)
- return nil
-}
-
-func GPUBench(gpuid uint64) {
- e := ethash.NewCL([]int{int(gpuid)})
-
- var h common.Hash
- bogoHeader := &types.Header{
- ParentHash: h,
- Number: big.NewInt(int64(42)),
- Difficulty: big.NewInt(int64(999999999999999)),
- }
- bogoBlock := types.NewBlock(bogoHeader, nil, nil, nil)
-
- err := ethash.InitCL(bogoBlock.NumberU64(), e)
- if err != nil {
- fmt.Println("OpenCL init error: ", err)
- return
- }
-
- stopChan := make(chan struct{})
- reportHashRate := func() {
- for {
- time.Sleep(3 * time.Second)
- fmt.Printf("hashes/s : %v\n", e.GetHashrate())
- }
- }
- fmt.Printf("Starting benchmark (%v seconds)\n", 60)
- go reportHashRate()
- go e.Search(bogoBlock, stopChan, 0)
- time.Sleep(60 * time.Second)
- fmt.Println("OK.")
-}
-
-func PrintOpenCLDevices() {
- ethash.PrintDevices()
-}
diff --git a/internal/build/util.go b/internal/build/util.go
index be41efed7..a821cd7f2 100644
--- a/internal/build/util.go
+++ b/internal/build/util.go
@@ -55,15 +55,14 @@ func GOPATH() string {
if len(path) == 0 {
log.Fatal("GOPATH is not set")
}
- // Ensure Godeps workspace is present in the path.
- godeps, _ := filepath.Abs(filepath.Join("Godeps", "_workspace"))
+ // Ensure that our internal vendor folder in on GOPATH
+ vendor, _ := filepath.Abs(filepath.Join("build", "_vendor"))
for _, dir := range path {
- if dir == godeps {
+ if dir == vendor {
return strings.Join(path, string(filepath.ListSeparator))
}
}
- newpath := append(path[:1], godeps)
- newpath = append(newpath, path[1:]...)
+ newpath := append(path[:1], append([]string{vendor}, path[1:]...)...)
return strings.Join(newpath, string(filepath.ListSeparator))
}
diff --git a/vendor.conf b/vendor.conf
new file mode 100644
index 000000000..58837ee38
--- /dev/null
+++ b/vendor.conf
@@ -0,0 +1,40 @@
+# package
+github.com/ethereum/go-ethereum
+
+# import
+github.com/cespare/cp 165db2f
+github.com/davecgh/go-spew v1.0.0-3-g6d21280
+github.com/ethereum/ethash v23.1-249-g214d4c0
+github.com/fatih/color v1.1.0-4-gbf82308
+github.com/gizak/termui d29684e
+github.com/golang/snappy d9eb7a3
+github.com/hashicorp/golang-lru 0a025b7
+github.com/huin/goupnp 97f671e
+github.com/jackpal/go-nat-pmp v1.0.1-4-g1fa385a
+github.com/mattn/go-colorable v0.0.6-6-g6c903ff
+github.com/mattn/go-isatty 66b8e73
+github.com/mattn/go-runewidth v0.0.1-10-g737072b
+github.com/mitchellh/go-wordwrap ad45545
+github.com/nsf/termbox-go b6acae5
+github.com/pborman/uuid v1.0-17-g3d4f2ba
+github.com/peterh/liner 8975875
+github.com/rcrowley/go-metrics ab2277b
+github.com/rjeczalik/notify 7e20c15
+github.com/robertkrimen/otto bf1c379
+github.com/rs/cors v1.0
+github.com/rs/xhandler v1.0-1-ged27b6f
+github.com/syndtr/goleveldb 6b4daa5
+golang.org/x/crypto ca7e7f1
+golang.org/x/net b336a97
+golang.org/x/sys c200b10
+golang.org/x/text a8b3843
+golang.org/x/tools 0db92ca
+gopkg.in/check.v1 4f90aea
+gopkg.in/fatih/set.v0 v0.1.0-3-g27c4092
+gopkg.in/karalabe/cookiejar.v2 8dcd6a7
+gopkg.in/natefinch/npipe.v2 c1b8fa8
+gopkg.in/sourcemap.v1 v1.0.3
+gopkg.in/urfave/cli.v1 v1.18.1
+
+# exclude
+-golang.org/x/net/context
diff --git a/Godeps/_workspace/src/github.com/cespare/cp/LICENSE.txt b/vendor/github.com/cespare/cp/LICENSE.txt
index 70da676c9..70da676c9 100644
--- a/Godeps/_workspace/src/github.com/cespare/cp/LICENSE.txt
+++ b/vendor/github.com/cespare/cp/LICENSE.txt
diff --git a/Godeps/_workspace/src/github.com/cespare/cp/README.md b/vendor/github.com/cespare/cp/README.md
index 577701fbe..577701fbe 100644
--- a/Godeps/_workspace/src/github.com/cespare/cp/README.md
+++ b/vendor/github.com/cespare/cp/README.md
diff --git a/Godeps/_workspace/src/github.com/cespare/cp/cp.go b/vendor/github.com/cespare/cp/cp.go
index d71dbb4ba..d71dbb4ba 100644
--- a/Godeps/_workspace/src/github.com/cespare/cp/cp.go
+++ b/vendor/github.com/cespare/cp/cp.go
diff --git a/Godeps/_workspace/src/gopkg.in/natefinch/npipe.v2/.gitignore b/vendor/github.com/davecgh/go-spew/.gitignore
index 00268614f..00268614f 100644
--- a/Godeps/_workspace/src/gopkg.in/natefinch/npipe.v2/.gitignore
+++ b/vendor/github.com/davecgh/go-spew/.gitignore
diff --git a/vendor/github.com/davecgh/go-spew/.travis.yml b/vendor/github.com/davecgh/go-spew/.travis.yml
new file mode 100644
index 000000000..984e0736e
--- /dev/null
+++ b/vendor/github.com/davecgh/go-spew/.travis.yml
@@ -0,0 +1,14 @@
+language: go
+go:
+ - 1.5.4
+ - 1.6.3
+ - 1.7
+install:
+ - go get -v golang.org/x/tools/cmd/cover
+script:
+ - go test -v -tags=safe ./spew
+ - go test -v -tags=testcgo ./spew -covermode=count -coverprofile=profile.cov
+after_success:
+ - go get -v github.com/mattn/goveralls
+ - export PATH=$PATH:$HOME/gopath/bin
+ - goveralls -coverprofile=profile.cov -service=travis-ci
diff --git a/Godeps/_workspace/src/github.com/davecgh/go-spew/LICENSE b/vendor/github.com/davecgh/go-spew/LICENSE
index 2a7cfd2bf..bb6733231 100644
--- a/Godeps/_workspace/src/github.com/davecgh/go-spew/LICENSE
+++ b/vendor/github.com/davecgh/go-spew/LICENSE
@@ -1,3 +1,5 @@
+ISC License
+
Copyright (c) 2012-2013 Dave Collins <dave@davec.name>
Permission to use, copy, modify, and distribute this software for any
diff --git a/vendor/github.com/davecgh/go-spew/README.md b/vendor/github.com/davecgh/go-spew/README.md
new file mode 100644
index 000000000..556170ae6
--- /dev/null
+++ b/vendor/github.com/davecgh/go-spew/README.md
@@ -0,0 +1,194 @@
+go-spew
+=======
+
+[![Build Status](https://travis-ci.org/davecgh/go-spew.png?branch=master)]
+(https://travis-ci.org/davecgh/go-spew) [![Coverage Status]
+(https://coveralls.io/repos/davecgh/go-spew/badge.png?branch=master)]
+(https://coveralls.io/r/davecgh/go-spew?branch=master)
+
+Go-spew implements a deep pretty printer for Go data structures to aid in
+debugging. A comprehensive suite of tests with 100% test coverage is provided
+to ensure proper functionality. See `test_coverage.txt` for the gocov coverage
+report. Go-spew is licensed under the liberal ISC license, so it may be used in
+open source or commercial projects.
+
+If you're interested in reading about how this package came to life and some
+of the challenges involved in providing a deep pretty printer, there is a blog
+post about it
+[here](https://web.archive.org/web/20160304013555/https://blog.cyphertite.com/go-spew-a-journey-into-dumping-go-data-structures/).
+
+## Documentation
+
+[![GoDoc](https://godoc.org/github.com/davecgh/go-spew/spew?status.png)]
+(http://godoc.org/github.com/davecgh/go-spew/spew)
+
+Full `go doc` style documentation for the project can be viewed online without
+installing this package by using the excellent GoDoc site here:
+http://godoc.org/github.com/davecgh/go-spew/spew
+
+You can also view the documentation locally once the package is installed with
+the `godoc` tool by running `godoc -http=":6060"` and pointing your browser to
+http://localhost:6060/pkg/github.com/davecgh/go-spew/spew
+
+## Installation
+
+```bash
+$ go get -u github.com/davecgh/go-spew/spew
+```
+
+## Quick Start
+
+Add this import line to the file you're working in:
+
+```Go
+import "github.com/davecgh/go-spew/spew"
+```
+
+To dump a variable with full newlines, indentation, type, and pointer
+information use Dump, Fdump, or Sdump:
+
+```Go
+spew.Dump(myVar1, myVar2, ...)
+spew.Fdump(someWriter, myVar1, myVar2, ...)
+str := spew.Sdump(myVar1, myVar2, ...)
+```
+
+Alternatively, if you would prefer to use format strings with a compacted inline
+printing style, use the convenience wrappers Printf, Fprintf, etc with %v (most
+compact), %+v (adds pointer addresses), %#v (adds types), or %#+v (adds types
+and pointer addresses):
+
+```Go
+spew.Printf("myVar1: %v -- myVar2: %+v", myVar1, myVar2)
+spew.Printf("myVar3: %#v -- myVar4: %#+v", myVar3, myVar4)
+spew.Fprintf(someWriter, "myVar1: %v -- myVar2: %+v", myVar1, myVar2)
+spew.Fprintf(someWriter, "myVar3: %#v -- myVar4: %#+v", myVar3, myVar4)
+```
+
+## Debugging a Web Application Example
+
+Here is an example of how you can use `spew.Sdump()` to help debug a web application. Please be sure to wrap your output using the `html.EscapeString()` function for safety reasons. You should also only use this debugging technique in a development environment, never in production.
+
+```Go
+package main
+
+import (
+ "fmt"
+ "html"
+ "net/http"
+
+ "github.com/davecgh/go-spew/spew"
+)
+
+func handler(w http.ResponseWriter, r *http.Request) {
+ w.Header().Set("Content-Type", "text/html")
+ fmt.Fprintf(w, "Hi there, %s!", r.URL.Path[1:])
+ fmt.Fprintf(w, "<!--\n" + html.EscapeString(spew.Sdump(w)) + "\n-->")
+}
+
+func main() {
+ http.HandleFunc("/", handler)
+ http.ListenAndServe(":8080", nil)
+}
+```
+
+## Sample Dump Output
+
+```
+(main.Foo) {
+ unexportedField: (*main.Bar)(0xf84002e210)({
+ flag: (main.Flag) flagTwo,
+ data: (uintptr) <nil>
+ }),
+ ExportedField: (map[interface {}]interface {}) {
+ (string) "one": (bool) true
+ }
+}
+([]uint8) {
+ 00000000 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 |............... |
+ 00000010 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 |!"#$%&'()*+,-./0|
+ 00000020 31 32 |12|
+}
+```
+
+## Sample Formatter Output
+
+Double pointer to a uint8:
+```
+ %v: <**>5
+ %+v: <**>(0xf8400420d0->0xf8400420c8)5
+ %#v: (**uint8)5
+ %#+v: (**uint8)(0xf8400420d0->0xf8400420c8)5
+```
+
+Pointer to circular struct with a uint8 field and a pointer to itself:
+```
+ %v: <*>{1 <*><shown>}
+ %+v: <*>(0xf84003e260){ui8:1 c:<*>(0xf84003e260)<shown>}
+ %#v: (*main.circular){ui8:(uint8)1 c:(*main.circular)<shown>}
+ %#+v: (*main.circular)(0xf84003e260){ui8:(uint8)1 c:(*main.circular)(0xf84003e260)<shown>}
+```
+
+## Configuration Options
+
+Configuration of spew is handled by fields in the ConfigState type. For
+convenience, all of the top-level functions use a global state available via the
+spew.Config global.
+
+It is also possible to create a ConfigState instance that provides methods
+equivalent to the top-level functions. This allows concurrent configuration
+options. See the ConfigState documentation for more details.
+
+```
+* Indent
+ String to use for each indentation level for Dump functions.
+ It is a single space by default. A popular alternative is "\t".
+
+* MaxDepth
+ Maximum number of levels to descend into nested data structures.
+ There is no limit by default.
+
+* DisableMethods
+ Disables invocation of error and Stringer interface methods.
+ Method invocation is enabled by default.
+
+* DisablePointerMethods
+ Disables invocation of error and Stringer interface methods on types
+ which only accept pointer receivers from non-pointer variables. This option
+ relies on access to the unsafe package, so it will not have any effect when
+ running in environments without access to the unsafe package such as Google
+ App Engine or with the "safe" build tag specified.
+ Pointer method invocation is enabled by default.
+
+* ContinueOnMethod
+ Enables recursion into types after invoking error and Stringer interface
+ methods. Recursion after method invocation is disabled by default.
+
+* SortKeys
+ Specifies map keys should be sorted before being printed. Use
+ this to have a more deterministic, diffable output. Note that
+ only native types (bool, int, uint, floats, uintptr and string)
+ and types which implement error or Stringer interfaces are supported,
+ with other types sorted according to the reflect.Value.String() output
+ which guarantees display stability. Natural map order is used by
+ default.
+
+* SpewKeys
+ SpewKeys specifies that, as a last resort attempt, map keys should be
+ spewed to strings and sorted by those strings. This is only considered
+ if SortKeys is true.
+
+```
+
+## Unsafe Package Dependency
+
+This package relies on the unsafe package to perform some of the more advanced
+features, however it also supports a "limited" mode which allows it to work in
+environments where the unsafe package is not available. By default, it will
+operate in this mode on Google App Engine and when compiled with GopherJS. The
+"safe" build tag may also be specified to force the package to build without
+using the unsafe package.
+
+## License
+
+Go-spew is licensed under the liberal ISC License.
diff --git a/vendor/github.com/davecgh/go-spew/cov_report.sh b/vendor/github.com/davecgh/go-spew/cov_report.sh
new file mode 100644
index 000000000..9579497e4
--- /dev/null
+++ b/vendor/github.com/davecgh/go-spew/cov_report.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# This script uses gocov to generate a test coverage report.
+# The gocov tool my be obtained with the following command:
+# go get github.com/axw/gocov/gocov
+#
+# It will be installed to $GOPATH/bin, so ensure that location is in your $PATH.
+
+# Check for gocov.
+if ! type gocov >/dev/null 2>&1; then
+ echo >&2 "This script requires the gocov tool."
+ echo >&2 "You may obtain it with the following command:"
+ echo >&2 "go get github.com/axw/gocov/gocov"
+ exit 1
+fi
+
+# Only run the cgo tests if gcc is installed.
+if type gcc >/dev/null 2>&1; then
+ (cd spew && gocov test -tags testcgo | gocov report)
+else
+ (cd spew && gocov test | gocov report)
+fi
diff --git a/Godeps/_workspace/src/github.com/davecgh/go-spew/spew/bypass.go b/vendor/github.com/davecgh/go-spew/spew/bypass.go
index 565bf5899..d42a0bc4a 100644
--- a/Godeps/_workspace/src/github.com/davecgh/go-spew/spew/bypass.go
+++ b/vendor/github.com/davecgh/go-spew/spew/bypass.go
@@ -13,9 +13,10 @@
// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
// NOTE: Due to the following build constraints, this file will only be compiled
-// when the code is not running on Google App Engine and "-tags disableunsafe"
-// is not added to the go build command line.
-// +build !appengine,!disableunsafe
+// when the code is not running on Google App Engine, compiled by GopherJS, and
+// "-tags safe" is not added to the go build command line. The "disableunsafe"
+// tag is deprecated and thus should not be used.
+// +build !js,!appengine,!safe,!disableunsafe
package spew
diff --git a/Godeps/_workspace/src/github.com/davecgh/go-spew/spew/bypasssafe.go b/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go
index 457e41235..e47a4e795 100644
--- a/Godeps/_workspace/src/github.com/davecgh/go-spew/spew/bypasssafe.go
+++ b/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go
@@ -13,9 +13,10 @@
// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
// NOTE: Due to the following build constraints, this file will only be compiled
-// when either the code is running on Google App Engine or "-tags disableunsafe"
-// is added to the go build command line.
-// +build appengine disableunsafe
+// when the code is running on Google App Engine, compiled by GopherJS, or
+// "-tags safe" is added to the go build command line. The "disableunsafe"
+// tag is deprecated and thus should not be used.
+// +build js appengine safe disableunsafe
package spew
diff --git a/Godeps/_workspace/src/github.com/davecgh/go-spew/spew/common.go b/vendor/github.com/davecgh/go-spew/spew/common.go
index 14f02dc15..14f02dc15 100644
--- a/Godeps/_workspace/src/github.com/davecgh/go-spew/spew/common.go
+++ b/vendor/github.com/davecgh/go-spew/spew/common.go
diff --git a/Godeps/_workspace/src/github.com/davecgh/go-spew/spew/config.go b/vendor/github.com/davecgh/go-spew/spew/config.go
index ee1ab07b3..555282723 100644
--- a/Godeps/_workspace/src/github.com/davecgh/go-spew/spew/config.go
+++ b/vendor/github.com/davecgh/go-spew/spew/config.go
@@ -64,7 +64,7 @@ type ConfigState struct {
// inside these interface methods. As a result, this option relies on
// access to the unsafe package, so it will not have any effect when
// running in environments without access to the unsafe package such as
- // Google App Engine or with the "disableunsafe" build tag specified.
+ // Google App Engine or with the "safe" build tag specified.
DisablePointerMethods bool
// ContinueOnMethod specifies whether or not recursion should continue once
diff --git a/Godeps/_workspace/src/github.com/davecgh/go-spew/spew/doc.go b/vendor/github.com/davecgh/go-spew/spew/doc.go
index 5be0c4060..5be0c4060 100644
--- a/Godeps/_workspace/src/github.com/davecgh/go-spew/spew/doc.go
+++ b/vendor/github.com/davecgh/go-spew/spew/doc.go
diff --git a/Godeps/_workspace/src/github.com/davecgh/go-spew/spew/dump.go b/vendor/github.com/davecgh/go-spew/spew/dump.go
index a0ff95e27..a0ff95e27 100644
--- a/Godeps/_workspace/src/github.com/davecgh/go-spew/spew/dump.go
+++ b/vendor/github.com/davecgh/go-spew/spew/dump.go
diff --git a/Godeps/_workspace/src/github.com/davecgh/go-spew/spew/format.go b/vendor/github.com/davecgh/go-spew/spew/format.go
index ecf3b80e2..ecf3b80e2 100644
--- a/Godeps/_workspace/src/github.com/davecgh/go-spew/spew/format.go
+++ b/vendor/github.com/davecgh/go-spew/spew/format.go
diff --git a/Godeps/_workspace/src/github.com/davecgh/go-spew/spew/spew.go b/vendor/github.com/davecgh/go-spew/spew/spew.go
index d8233f542..d8233f542 100644
--- a/Godeps/_workspace/src/github.com/davecgh/go-spew/spew/spew.go
+++ b/vendor/github.com/davecgh/go-spew/spew/spew.go
diff --git a/vendor/github.com/davecgh/go-spew/test_coverage.txt b/vendor/github.com/davecgh/go-spew/test_coverage.txt
new file mode 100644
index 000000000..2cd087a2a
--- /dev/null
+++ b/vendor/github.com/davecgh/go-spew/test_coverage.txt
@@ -0,0 +1,61 @@
+
+github.com/davecgh/go-spew/spew/dump.go dumpState.dump 100.00% (88/88)
+github.com/davecgh/go-spew/spew/format.go formatState.format 100.00% (82/82)
+github.com/davecgh/go-spew/spew/format.go formatState.formatPtr 100.00% (52/52)
+github.com/davecgh/go-spew/spew/dump.go dumpState.dumpPtr 100.00% (44/44)
+github.com/davecgh/go-spew/spew/dump.go dumpState.dumpSlice 100.00% (39/39)
+github.com/davecgh/go-spew/spew/common.go handleMethods 100.00% (30/30)
+github.com/davecgh/go-spew/spew/common.go printHexPtr 100.00% (18/18)
+github.com/davecgh/go-spew/spew/common.go unsafeReflectValue 100.00% (13/13)
+github.com/davecgh/go-spew/spew/format.go formatState.constructOrigFormat 100.00% (12/12)
+github.com/davecgh/go-spew/spew/dump.go fdump 100.00% (11/11)
+github.com/davecgh/go-spew/spew/format.go formatState.Format 100.00% (11/11)
+github.com/davecgh/go-spew/spew/common.go init 100.00% (10/10)
+github.com/davecgh/go-spew/spew/common.go printComplex 100.00% (9/9)
+github.com/davecgh/go-spew/spew/common.go valuesSorter.Less 100.00% (8/8)
+github.com/davecgh/go-spew/spew/format.go formatState.buildDefaultFormat 100.00% (7/7)
+github.com/davecgh/go-spew/spew/format.go formatState.unpackValue 100.00% (5/5)
+github.com/davecgh/go-spew/spew/dump.go dumpState.indent 100.00% (4/4)
+github.com/davecgh/go-spew/spew/common.go catchPanic 100.00% (4/4)
+github.com/davecgh/go-spew/spew/config.go ConfigState.convertArgs 100.00% (4/4)
+github.com/davecgh/go-spew/spew/spew.go convertArgs 100.00% (4/4)
+github.com/davecgh/go-spew/spew/format.go newFormatter 100.00% (3/3)
+github.com/davecgh/go-spew/spew/dump.go Sdump 100.00% (3/3)
+github.com/davecgh/go-spew/spew/common.go printBool 100.00% (3/3)
+github.com/davecgh/go-spew/spew/common.go sortValues 100.00% (3/3)
+github.com/davecgh/go-spew/spew/config.go ConfigState.Sdump 100.00% (3/3)
+github.com/davecgh/go-spew/spew/dump.go dumpState.unpackValue 100.00% (3/3)
+github.com/davecgh/go-spew/spew/spew.go Printf 100.00% (1/1)
+github.com/davecgh/go-spew/spew/spew.go Println 100.00% (1/1)
+github.com/davecgh/go-spew/spew/spew.go Sprint 100.00% (1/1)
+github.com/davecgh/go-spew/spew/spew.go Sprintf 100.00% (1/1)
+github.com/davecgh/go-spew/spew/spew.go Sprintln 100.00% (1/1)
+github.com/davecgh/go-spew/spew/common.go printFloat 100.00% (1/1)
+github.com/davecgh/go-spew/spew/config.go NewDefaultConfig 100.00% (1/1)
+github.com/davecgh/go-spew/spew/common.go printInt 100.00% (1/1)
+github.com/davecgh/go-spew/spew/common.go printUint 100.00% (1/1)
+github.com/davecgh/go-spew/spew/common.go valuesSorter.Len 100.00% (1/1)
+github.com/davecgh/go-spew/spew/common.go valuesSorter.Swap 100.00% (1/1)
+github.com/davecgh/go-spew/spew/config.go ConfigState.Errorf 100.00% (1/1)
+github.com/davecgh/go-spew/spew/config.go ConfigState.Fprint 100.00% (1/1)
+github.com/davecgh/go-spew/spew/config.go ConfigState.Fprintf 100.00% (1/1)
+github.com/davecgh/go-spew/spew/config.go ConfigState.Fprintln 100.00% (1/1)
+github.com/davecgh/go-spew/spew/config.go ConfigState.Print 100.00% (1/1)
+github.com/davecgh/go-spew/spew/config.go ConfigState.Printf 100.00% (1/1)
+github.com/davecgh/go-spew/spew/config.go ConfigState.Println 100.00% (1/1)
+github.com/davecgh/go-spew/spew/config.go ConfigState.Sprint 100.00% (1/1)
+github.com/davecgh/go-spew/spew/config.go ConfigState.Sprintf 100.00% (1/1)
+github.com/davecgh/go-spew/spew/config.go ConfigState.Sprintln 100.00% (1/1)
+github.com/davecgh/go-spew/spew/config.go ConfigState.NewFormatter 100.00% (1/1)
+github.com/davecgh/go-spew/spew/config.go ConfigState.Fdump 100.00% (1/1)
+github.com/davecgh/go-spew/spew/config.go ConfigState.Dump 100.00% (1/1)
+github.com/davecgh/go-spew/spew/dump.go Fdump 100.00% (1/1)
+github.com/davecgh/go-spew/spew/dump.go Dump 100.00% (1/1)
+github.com/davecgh/go-spew/spew/spew.go Fprintln 100.00% (1/1)
+github.com/davecgh/go-spew/spew/format.go NewFormatter 100.00% (1/1)
+github.com/davecgh/go-spew/spew/spew.go Errorf 100.00% (1/1)
+github.com/davecgh/go-spew/spew/spew.go Fprint 100.00% (1/1)
+github.com/davecgh/go-spew/spew/spew.go Fprintf 100.00% (1/1)
+github.com/davecgh/go-spew/spew/spew.go Print 100.00% (1/1)
+github.com/davecgh/go-spew/spew ------------------------------- 100.00% (505/505)
+
diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/.gitignore b/vendor/github.com/ethereum/ethash/.gitignore
index da074e6b3..da074e6b3 100644
--- a/Godeps/_workspace/src/github.com/ethereum/ethash/.gitignore
+++ b/vendor/github.com/ethereum/ethash/.gitignore
diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/.travis.yml b/vendor/github.com/ethereum/ethash/.travis.yml
index b83b02bf3..b83b02bf3 100644
--- a/Godeps/_workspace/src/github.com/ethereum/ethash/.travis.yml
+++ b/vendor/github.com/ethereum/ethash/.travis.yml
diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/CMakeLists.txt b/vendor/github.com/ethereum/ethash/CMakeLists.txt
index 807c43e96..807c43e96 100644
--- a/Godeps/_workspace/src/github.com/ethereum/ethash/CMakeLists.txt
+++ b/vendor/github.com/ethereum/ethash/CMakeLists.txt
diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/MANIFEST.in b/vendor/github.com/ethereum/ethash/MANIFEST.in
index 74e73c8be..74e73c8be 100644
--- a/Godeps/_workspace/src/github.com/ethereum/ethash/MANIFEST.in
+++ b/vendor/github.com/ethereum/ethash/MANIFEST.in
diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/Makefile b/vendor/github.com/ethereum/ethash/Makefile
index 741d3b56d..741d3b56d 100644
--- a/Godeps/_workspace/src/github.com/ethereum/ethash/Makefile
+++ b/vendor/github.com/ethereum/ethash/Makefile
diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/README.md b/vendor/github.com/ethereum/ethash/README.md
index 2b2c3b544..2b2c3b544 100644
--- a/Godeps/_workspace/src/github.com/ethereum/ethash/README.md
+++ b/vendor/github.com/ethereum/ethash/README.md
diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/Vagrantfile b/vendor/github.com/ethereum/ethash/Vagrantfile
index 03891653f..03891653f 100644
--- a/Godeps/_workspace/src/github.com/ethereum/ethash/Vagrantfile
+++ b/vendor/github.com/ethereum/ethash/Vagrantfile
diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/appveyor.yml b/vendor/github.com/ethereum/ethash/appveyor.yml
index ac36a0626..ac36a0626 100644
--- a/Godeps/_workspace/src/github.com/ethereum/ethash/appveyor.yml
+++ b/vendor/github.com/ethereum/ethash/appveyor.yml
diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go b/vendor/github.com/ethereum/ethash/ethash.go
index 2a31aaf2d..2a31aaf2d 100644
--- a/Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go
+++ b/vendor/github.com/ethereum/ethash/ethash.go
diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/ethashc.go b/vendor/github.com/ethereum/ethash/ethashc.go
index 1d2ba1613..1d2ba1613 100644
--- a/Godeps/_workspace/src/github.com/ethereum/ethash/ethashc.go
+++ b/vendor/github.com/ethereum/ethash/ethashc.go
diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/setup.py b/vendor/github.com/ethereum/ethash/setup.py
index 18aa20f6d..18aa20f6d 100755
--- a/Godeps/_workspace/src/github.com/ethereum/ethash/setup.py
+++ b/vendor/github.com/ethereum/ethash/setup.py
diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/CMakeLists.txt b/vendor/github.com/ethereum/ethash/src/libethash/CMakeLists.txt
index a65621c3e..a65621c3e 100644
--- a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/CMakeLists.txt
+++ b/vendor/github.com/ethereum/ethash/src/libethash/CMakeLists.txt
diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/compiler.h b/vendor/github.com/ethereum/ethash/src/libethash/compiler.h
index 9695871cd..9695871cd 100644
--- a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/compiler.h
+++ b/vendor/github.com/ethereum/ethash/src/libethash/compiler.h
diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/data_sizes.h b/vendor/github.com/ethereum/ethash/src/libethash/data_sizes.h
index 83cc30bcb..83cc30bcb 100644
--- a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/data_sizes.h
+++ b/vendor/github.com/ethereum/ethash/src/libethash/data_sizes.h
diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/endian.h b/vendor/github.com/ethereum/ethash/src/libethash/endian.h
index 5b8abf03d..5b8abf03d 100644
--- a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/endian.h
+++ b/vendor/github.com/ethereum/ethash/src/libethash/endian.h
diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/ethash.h b/vendor/github.com/ethereum/ethash/src/libethash/ethash.h
index 0c6a1f9e9..0c6a1f9e9 100644
--- a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/ethash.h
+++ b/vendor/github.com/ethereum/ethash/src/libethash/ethash.h
diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/fnv.h b/vendor/github.com/ethereum/ethash/src/libethash/fnv.h
index 82cd655c4..82cd655c4 100644
--- a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/fnv.h
+++ b/vendor/github.com/ethereum/ethash/src/libethash/fnv.h
diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/internal.c b/vendor/github.com/ethereum/ethash/src/libethash/internal.c
index 0a830fc82..0a830fc82 100644
--- a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/internal.c
+++ b/vendor/github.com/ethereum/ethash/src/libethash/internal.c
diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/internal.h b/vendor/github.com/ethereum/ethash/src/libethash/internal.h
index 26c395ad6..26c395ad6 100644
--- a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/internal.h
+++ b/vendor/github.com/ethereum/ethash/src/libethash/internal.h
diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/io.c b/vendor/github.com/ethereum/ethash/src/libethash/io.c
index f4db477c2..f4db477c2 100644
--- a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/io.c
+++ b/vendor/github.com/ethereum/ethash/src/libethash/io.c
diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/io.h b/vendor/github.com/ethereum/ethash/src/libethash/io.h
index 7a27089c7..7a27089c7 100644
--- a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/io.h
+++ b/vendor/github.com/ethereum/ethash/src/libethash/io.h
diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/io_posix.c b/vendor/github.com/ethereum/ethash/src/libethash/io_posix.c
index c9a17d845..c9a17d845 100644
--- a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/io_posix.c
+++ b/vendor/github.com/ethereum/ethash/src/libethash/io_posix.c
diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/io_win32.c b/vendor/github.com/ethereum/ethash/src/libethash/io_win32.c
index 34f1aaa77..34f1aaa77 100644
--- a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/io_win32.c
+++ b/vendor/github.com/ethereum/ethash/src/libethash/io_win32.c
diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/mmap.h b/vendor/github.com/ethereum/ethash/src/libethash/mmap.h
index 1e226e83f..1e226e83f 100644
--- a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/mmap.h
+++ b/vendor/github.com/ethereum/ethash/src/libethash/mmap.h
diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/mmap_win32.c b/vendor/github.com/ethereum/ethash/src/libethash/mmap_win32.c
index 42968b98a..42968b98a 100644
--- a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/mmap_win32.c
+++ b/vendor/github.com/ethereum/ethash/src/libethash/mmap_win32.c
diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/sha3.c b/vendor/github.com/ethereum/ethash/src/libethash/sha3.c
index e72fe1018..e72fe1018 100644
--- a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/sha3.c
+++ b/vendor/github.com/ethereum/ethash/src/libethash/sha3.c
diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/sha3.h b/vendor/github.com/ethereum/ethash/src/libethash/sha3.h
index a38006292..a38006292 100644
--- a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/sha3.h
+++ b/vendor/github.com/ethereum/ethash/src/libethash/sha3.h
diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/sha3_cryptopp.cpp b/vendor/github.com/ethereum/ethash/src/libethash/sha3_cryptopp.cpp
index 2a7c02664..2a7c02664 100644
--- a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/sha3_cryptopp.cpp
+++ b/vendor/github.com/ethereum/ethash/src/libethash/sha3_cryptopp.cpp
diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/sha3_cryptopp.h b/vendor/github.com/ethereum/ethash/src/libethash/sha3_cryptopp.h
index 9edc407d5..9edc407d5 100644
--- a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/sha3_cryptopp.h
+++ b/vendor/github.com/ethereum/ethash/src/libethash/sha3_cryptopp.h
diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/util.h b/vendor/github.com/ethereum/ethash/src/libethash/util.h
index c5fc6e55b..c5fc6e55b 100644
--- a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/util.h
+++ b/vendor/github.com/ethereum/ethash/src/libethash/util.h
diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/util_win32.c b/vendor/github.com/ethereum/ethash/src/libethash/util_win32.c
index 268e6db05..268e6db05 100644
--- a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/util_win32.c
+++ b/vendor/github.com/ethereum/ethash/src/libethash/util_win32.c
diff --git a/vendor/github.com/fatih/color/.travis.yml b/vendor/github.com/fatih/color/.travis.yml
new file mode 100644
index 000000000..57b4b57c8
--- /dev/null
+++ b/vendor/github.com/fatih/color/.travis.yml
@@ -0,0 +1,5 @@
+language: go
+go:
+ - 1.6
+ - tip
+
diff --git a/Godeps/_workspace/src/github.com/fatih/color/LICENSE.md b/vendor/github.com/fatih/color/LICENSE.md
index 25fdaf639..25fdaf639 100644
--- a/Godeps/_workspace/src/github.com/fatih/color/LICENSE.md
+++ b/vendor/github.com/fatih/color/LICENSE.md
diff --git a/Godeps/_workspace/src/github.com/fatih/color/README.md b/vendor/github.com/fatih/color/README.md
index d6fb06a3e..6e39e919f 100644
--- a/Godeps/_workspace/src/github.com/fatih/color/README.md
+++ b/vendor/github.com/fatih/color/README.md
@@ -2,7 +2,10 @@
-Color lets you use colorized outputs in terms of [ANSI Escape Codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors) in Go (Golang). It has support for Windows too! The API can be used in several ways, pick one that suits you.
+Color lets you use colorized outputs in terms of [ANSI Escape
+Codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors) in Go (Golang). It
+has support for Windows too! The API can be used in several ways, pick one that
+suits you.
@@ -78,8 +81,8 @@ info := color.New(color.FgWhite, color.BgGreen).SprintFunc()
fmt.Printf("This %s rocks!\n", info("package"))
// Use helper functions
-fmt.Printf("This", color.RedString("warning"), "should be not neglected.")
-fmt.Printf(color.GreenString("Info:"), "an important message." )
+fmt.Println("This", color.RedString("warning"), "should be not neglected.")
+fmt.Printf("%v %v\n", color.GreenString("Info:"), "an important message.")
// Windows supported too! Just don't forget to change the output to color.Output
fmt.Fprintf(color.Output, "Windows support: %s", color.GreenString("PASS"))
@@ -143,7 +146,7 @@ c.Println("This prints again cyan...")
## Credits
* [Fatih Arslan](https://github.com/fatih)
- * Windows support via @shiena: [ansicolor](https://github.com/shiena/ansicolor)
+ * Windows support via @mattn: [colorable](https://github.com/mattn/go-colorable)
## License
diff --git a/Godeps/_workspace/src/github.com/fatih/color/color.go b/vendor/github.com/fatih/color/color.go
index e3e997284..06f4867f7 100644
--- a/Godeps/_workspace/src/github.com/fatih/color/color.go
+++ b/vendor/github.com/fatih/color/color.go
@@ -5,6 +5,7 @@ import (
"os"
"strconv"
"strings"
+ "sync"
"github.com/mattn/go-colorable"
"github.com/mattn/go-isatty"
@@ -312,91 +313,111 @@ func boolPtr(v bool) *bool {
return &v
}
+// colorsCache is used to reduce the count of created Color objects and
+// allows to reuse already created objects with required Attribute.
+var colorsCache = make(map[Attribute]*Color)
+
+var colorsCacheMu = new(sync.Mutex) // protects colorsCache
+
+func getCachedColor(p Attribute) *Color {
+ colorsCacheMu.Lock()
+ defer colorsCacheMu.Unlock()
+
+ c, ok := colorsCache[p]
+ if !ok {
+ c = New(p)
+ colorsCache[p] = c
+ }
+
+ return c
+}
+
+func colorPrint(format string, p Attribute, a ...interface{}) {
+ c := getCachedColor(p)
+
+ if !strings.HasSuffix(format, "\n") {
+ format += "\n"
+ }
+
+ if len(a) == 0 {
+ c.Print(format)
+ } else {
+ c.Printf(format, a...)
+ }
+}
+
+func colorString(format string, p Attribute, a ...interface{}) string {
+ c := getCachedColor(p)
+
+ if len(a) == 0 {
+ return c.SprintFunc()(format)
+ }
+
+ return c.SprintfFunc()(format, a...)
+}
+
// Black is an convenient helper function to print with black foreground. A
// newline is appended to format by default.
-func Black(format string, a ...interface{}) { printColor(format, FgBlack, a...) }
+func Black(format string, a ...interface{}) { colorPrint(format, FgBlack, a...) }
// Red is an convenient helper function to print with red foreground. A
// newline is appended to format by default.
-func Red(format string, a ...interface{}) { printColor(format, FgRed, a...) }
+func Red(format string, a ...interface{}) { colorPrint(format, FgRed, a...) }
// Green is an convenient helper function to print with green foreground. A
// newline is appended to format by default.
-func Green(format string, a ...interface{}) { printColor(format, FgGreen, a...) }
+func Green(format string, a ...interface{}) { colorPrint(format, FgGreen, a...) }
// Yellow is an convenient helper function to print with yellow foreground.
// A newline is appended to format by default.
-func Yellow(format string, a ...interface{}) { printColor(format, FgYellow, a...) }
+func Yellow(format string, a ...interface{}) { colorPrint(format, FgYellow, a...) }
// Blue is an convenient helper function to print with blue foreground. A
// newline is appended to format by default.
-func Blue(format string, a ...interface{}) { printColor(format, FgBlue, a...) }
+func Blue(format string, a ...interface{}) { colorPrint(format, FgBlue, a...) }
// Magenta is an convenient helper function to print with magenta foreground.
// A newline is appended to format by default.
-func Magenta(format string, a ...interface{}) { printColor(format, FgMagenta, a...) }
+func Magenta(format string, a ...interface{}) { colorPrint(format, FgMagenta, a...) }
// Cyan is an convenient helper function to print with cyan foreground. A
// newline is appended to format by default.
-func Cyan(format string, a ...interface{}) { printColor(format, FgCyan, a...) }
+func Cyan(format string, a ...interface{}) { colorPrint(format, FgCyan, a...) }
// White is an convenient helper function to print with white foreground. A
// newline is appended to format by default.
-func White(format string, a ...interface{}) { printColor(format, FgWhite, a...) }
-
-func printColor(format string, p Attribute, a ...interface{}) {
- if !strings.HasSuffix(format, "\n") {
- format += "\n"
- }
-
- c := &Color{params: []Attribute{p}}
- c.Printf(format, a...)
-}
+func White(format string, a ...interface{}) { colorPrint(format, FgWhite, a...) }
// BlackString is an convenient helper function to return a string with black
// foreground.
-func BlackString(format string, a ...interface{}) string {
- return New(FgBlack).SprintfFunc()(format, a...)
-}
+func BlackString(format string, a ...interface{}) string { return colorString(format, FgBlack, a...) }
// RedString is an convenient helper function to return a string with red
// foreground.
-func RedString(format string, a ...interface{}) string {
- return New(FgRed).SprintfFunc()(format, a...)
-}
+func RedString(format string, a ...interface{}) string { return colorString(format, FgRed, a...) }
// GreenString is an convenient helper function to return a string with green
// foreground.
-func GreenString(format string, a ...interface{}) string {
- return New(FgGreen).SprintfFunc()(format, a...)
-}
+func GreenString(format string, a ...interface{}) string { return colorString(format, FgGreen, a...) }
// YellowString is an convenient helper function to return a string with yellow
// foreground.
-func YellowString(format string, a ...interface{}) string {
- return New(FgYellow).SprintfFunc()(format, a...)
-}
+func YellowString(format string, a ...interface{}) string { return colorString(format, FgYellow, a...) }
// BlueString is an convenient helper function to return a string with blue
// foreground.
-func BlueString(format string, a ...interface{}) string {
- return New(FgBlue).SprintfFunc()(format, a...)
-}
+func BlueString(format string, a ...interface{}) string { return colorString(format, FgBlue, a...) }
// MagentaString is an convenient helper function to return a string with magenta
// foreground.
func MagentaString(format string, a ...interface{}) string {
- return New(FgMagenta).SprintfFunc()(format, a...)
+ return colorString(format, FgMagenta, a...)
}
// CyanString is an convenient helper function to return a string with cyan
// foreground.
-func CyanString(format string, a ...interface{}) string {
- return New(FgCyan).SprintfFunc()(format, a...)
-}
+func CyanString(format string, a ...interface{}) string { return colorString(format, FgCyan, a...) }
// WhiteString is an convenient helper function to return a string with white
// foreground.
-func WhiteString(format string, a ...interface{}) string {
- return New(FgWhite).SprintfFunc()(format, a...)
-}
+func WhiteString(format string, a ...interface{}) string { return colorString(format, FgWhite, a...) }
diff --git a/Godeps/_workspace/src/github.com/fatih/color/doc.go b/vendor/github.com/fatih/color/doc.go
index 17908787c..17908787c 100644
--- a/Godeps/_workspace/src/github.com/fatih/color/doc.go
+++ b/vendor/github.com/fatih/color/doc.go
diff --git a/Godeps/_workspace/src/github.com/gizak/termui/.gitignore b/vendor/github.com/gizak/termui/.gitignore
index eb1369fd4..8b156b020 100644
--- a/Godeps/_workspace/src/github.com/gizak/termui/.gitignore
+++ b/vendor/github.com/gizak/termui/.gitignore
@@ -23,3 +23,4 @@ _testmain.go
*.test
*.prof
.DS_Store
+/vendor
diff --git a/Godeps/_workspace/src/github.com/gizak/termui/.travis.yml b/vendor/github.com/gizak/termui/.travis.yml
index 206e88740..206e88740 100644
--- a/Godeps/_workspace/src/github.com/gizak/termui/.travis.yml
+++ b/vendor/github.com/gizak/termui/.travis.yml
diff --git a/Godeps/_workspace/src/github.com/gizak/termui/LICENSE b/vendor/github.com/gizak/termui/LICENSE
index 311ccc74f..311ccc74f 100644
--- a/Godeps/_workspace/src/github.com/gizak/termui/LICENSE
+++ b/vendor/github.com/gizak/termui/LICENSE
diff --git a/Godeps/_workspace/src/github.com/gizak/termui/README.md b/vendor/github.com/gizak/termui/README.md
index 0e1d41b08..4f3d4a419 100644
--- a/Godeps/_workspace/src/github.com/gizak/termui/README.md
+++ b/vendor/github.com/gizak/termui/README.md
@@ -12,6 +12,8 @@ Now version v2 has arrived! It brings new event system, new theme system, new `B
go get -u github.com/gizak/termui
+It is recommanded to use locked deps by using [glide](https://glide.sh): move to `termui` src directory then run `glide up`.
+
For the compatible reason, you can choose to install the legacy version of `termui`:
go get gopkg.in/gizak/termui.v1
@@ -24,7 +26,7 @@ To use `termui`, the very first thing you may want to know is how to manage layo
__Absolute layout__
-Each widget has an underlying block structure which basically is a box model. It has border, label and padding properties. A border of a widget can be chosen to hide or display (with its border label), you can pick a different front/back colour for the border as well. To display such a widget at a specific location in terminal window, you need to assign `.X`, `.Y`, `.Height`, `.Width` values for each widget before send it to `.Render`. Let's demonstrate these by a code snippet:
+Each widget has an underlying block structure which basically is a box model. It has border, label and padding properties. A border of a widget can be chosen to hide or display (with its border label), you can pick a different front/back colour for the border as well. To display such a widget at a specific location in terminal window, you need to assign `.X`, `.Y`, `.Height`, `.Width` values for each widget before sending it to `.Render`. Let's demonstrate these by a code snippet:
`````go
import ui "github.com/gizak/termui" // <- ui shortcut, optional
@@ -65,7 +67,7 @@ __Grid layout:__
<img src="./_example/grid.gif" alt="grid" width="60%">
-Grid layout uses [12 columns grid system](http://www.w3schools.com/bootstrap/bootstrap_grid_system.asp) with expressive syntax. To use `Grid`, all we need to do is build a widget tree consisting of `Row`s and Cols (Actually a Col is also a `Row` but with a widget endpoint attached).
+Grid layout uses [12 columns grid system](http://www.w3schools.com/bootstrap/bootstrap_grid_system.asp) with expressive syntax. To use `Grid`, all we need to do is build a widget tree consisting of `Row`s and `Col`s (Actually a `Col` is also a `Row` but with a widget endpoint attached).
```go
import ui "github.com/gizak/termui"
diff --git a/Godeps/_workspace/src/github.com/gizak/termui/barchart.go b/vendor/github.com/gizak/termui/barchart.go
index 980e958e2..9e2a10689 100644
--- a/Godeps/_workspace/src/github.com/gizak/termui/barchart.go
+++ b/vendor/github.com/gizak/termui/barchart.go
@@ -11,7 +11,7 @@ import "fmt"
bc := termui.NewBarChart()
data := []int{3, 2, 5, 3, 9, 5}
bclabels := []string{"S0", "S1", "S2", "S3", "S4", "S5"}
- bc.Border.Label = "Bar Chart"
+ bc.BorderLabel = "Bar Chart"
bc.Data = data
bc.Width = 26
bc.Height = 10
@@ -29,6 +29,7 @@ type BarChart struct {
DataLabels []string
BarWidth int
BarGap int
+ CellChar rune
labels [][]rune
dataNum [][]rune
numBar int
@@ -44,6 +45,7 @@ func NewBarChart() *BarChart {
bc.TextColor = ThemeAttr("barchart.text.fg")
bc.BarGap = 1
bc.BarWidth = 3
+ bc.CellChar = ' '
return bc
}
@@ -87,16 +89,27 @@ func (bc *BarChart) Buffer() Buffer {
for i := 0; i < bc.numBar && i < len(bc.Data) && i < len(bc.DataLabels); i++ {
h := int(float64(bc.Data[i]) / bc.scale)
oftX := i * (bc.BarWidth + bc.BarGap)
+
+ barBg := bc.Bg
+ barFg := bc.BarColor
+
+ if bc.CellChar == ' ' {
+ barBg = bc.BarColor
+ barFg = ColorDefault
+ if bc.BarColor == ColorDefault { // the same as above
+ barBg |= AttrReverse
+ }
+ }
+
// plot bar
for j := 0; j < bc.BarWidth; j++ {
for k := 0; k < h; k++ {
c := Cell{
- Ch: ' ',
- Bg: bc.BarColor,
- }
- if bc.BarColor == ColorDefault { // when color is default, space char treated as transparent!
- c.Bg |= AttrReverse
+ Ch: bc.CellChar,
+ Bg: barBg,
+ Fg: barFg,
}
+
x := bc.innerArea.Min.X + i*(bc.BarWidth+bc.BarGap) + j
y := bc.innerArea.Min.Y + bc.innerArea.Dy() - 2 - k
buf.Set(x, y, c)
@@ -120,11 +133,9 @@ func (bc *BarChart) Buffer() Buffer {
c := Cell{
Ch: bc.dataNum[i][j],
Fg: bc.NumColor,
- Bg: bc.BarColor,
- }
- if bc.BarColor == ColorDefault { // the same as above
- c.Bg |= AttrReverse
+ Bg: barBg,
}
+
if h == 0 {
c.Bg = bc.Bg
}
diff --git a/Godeps/_workspace/src/github.com/gizak/termui/block.go b/vendor/github.com/gizak/termui/block.go
index 418738c8d..418738c8d 100644
--- a/Godeps/_workspace/src/github.com/gizak/termui/block.go
+++ b/vendor/github.com/gizak/termui/block.go
diff --git a/Godeps/_workspace/src/github.com/gizak/termui/block_common.go b/vendor/github.com/gizak/termui/block_common.go
index 0f972cbbd..0f972cbbd 100644
--- a/Godeps/_workspace/src/github.com/gizak/termui/block_common.go
+++ b/vendor/github.com/gizak/termui/block_common.go
diff --git a/Godeps/_workspace/src/github.com/gizak/termui/block_windows.go b/vendor/github.com/gizak/termui/block_windows.go
index 4dbc017de..4dbc017de 100644
--- a/Godeps/_workspace/src/github.com/gizak/termui/block_windows.go
+++ b/vendor/github.com/gizak/termui/block_windows.go
diff --git a/Godeps/_workspace/src/github.com/gizak/termui/buffer.go b/vendor/github.com/gizak/termui/buffer.go
index 60e77863a..60e77863a 100644
--- a/Godeps/_workspace/src/github.com/gizak/termui/buffer.go
+++ b/vendor/github.com/gizak/termui/buffer.go
diff --git a/Godeps/_workspace/src/github.com/gizak/termui/canvas.go b/vendor/github.com/gizak/termui/canvas.go
index 4173780f3..4173780f3 100644
--- a/Godeps/_workspace/src/github.com/gizak/termui/canvas.go
+++ b/vendor/github.com/gizak/termui/canvas.go
diff --git a/Godeps/_workspace/src/github.com/gizak/termui/config b/vendor/github.com/gizak/termui/config
index 18fd6a401..18fd6a401 100644..100755
--- a/Godeps/_workspace/src/github.com/gizak/termui/config
+++ b/vendor/github.com/gizak/termui/config
diff --git a/Godeps/_workspace/src/github.com/gizak/termui/doc.go b/vendor/github.com/gizak/termui/doc.go
index b80e46415..0d7108d30 100644
--- a/Godeps/_workspace/src/github.com/gizak/termui/doc.go
+++ b/vendor/github.com/gizak/termui/doc.go
@@ -19,9 +19,11 @@ A simplest example:
g := ui.NewGauge()
g.Percent = 50
g.Width = 50
- g.Border.Label = "Gauge"
+ g.BorderLabel = "Gauge"
ui.Render(g)
+
+ ui.Loop()
}
*/
package termui
diff --git a/Godeps/_workspace/src/github.com/gizak/termui/events.go b/vendor/github.com/gizak/termui/events.go
index 177bbb4b0..6627f8942 100644
--- a/Godeps/_workspace/src/github.com/gizak/termui/events.go
+++ b/vendor/github.com/gizak/termui/events.go
@@ -221,6 +221,13 @@ func findMatch(mux map[string]func(Event), path string) string {
return pattern
}
+// Remove all existing defined Handlers from the map
+func (es *EvtStream) ResetHandlers() {
+ for Path, _ := range es.Handlers {
+ delete(es.Handlers, Path)
+ }
+ return
+}
func (es *EvtStream) match(path string) string {
return findMatch(es.Handlers, path)
diff --git a/Godeps/_workspace/src/github.com/gizak/termui/gauge.go b/vendor/github.com/gizak/termui/gauge.go
index 244d2995e..01af0ea7c 100644
--- a/Godeps/_workspace/src/github.com/gizak/termui/gauge.go
+++ b/vendor/github.com/gizak/termui/gauge.go
@@ -16,7 +16,7 @@ import (
g.Percent = 40
g.Width = 50
g.Height = 3
- g.Border.Label = "Slim Gauge"
+ g.BorderLabel = "Slim Gauge"
g.BarColor = termui.ColorRed
g.PercentColor = termui.ColorBlue
*/
diff --git a/vendor/github.com/gizak/termui/glide.lock b/vendor/github.com/gizak/termui/glide.lock
new file mode 100644
index 000000000..798e944d3
--- /dev/null
+++ b/vendor/github.com/gizak/termui/glide.lock
@@ -0,0 +1,14 @@
+hash: 67a478802ee1d122cf1df063c52458d074864900c96a5cc25dc6be4b7638eb1c
+updated: 2016-04-06T21:16:00.849048757-04:00
+imports:
+- name: github.com/mattn/go-runewidth
+ version: d6bea18f789704b5f83375793155289da36a3c7f
+- name: github.com/mitchellh/go-wordwrap
+ version: ad45545899c7b13c020ea92b2072220eefad42b8
+- name: github.com/nsf/termbox-go
+ version: 362329b0aa6447eadd52edd8d660ec1dff470295
+- name: golang.org/x/net
+ version: af4fee9d05b66edc24197d189e6118f8ebce8c2b
+ subpackages:
+ - websocket
+devImports: []
diff --git a/vendor/github.com/gizak/termui/glide.yaml b/vendor/github.com/gizak/termui/glide.yaml
new file mode 100644
index 000000000..d8e445254
--- /dev/null
+++ b/vendor/github.com/gizak/termui/glide.yaml
@@ -0,0 +1,8 @@
+package: github.com/gizak/termui
+import:
+- package: github.com/mattn/go-runewidth
+- package: github.com/mitchellh/go-wordwrap
+- package: github.com/nsf/termbox-go
+- package: golang.org/x/net
+ subpackages:
+ - websocket
diff --git a/Godeps/_workspace/src/github.com/gizak/termui/grid.go b/vendor/github.com/gizak/termui/grid.go
index 364442e02..364442e02 100644
--- a/Godeps/_workspace/src/github.com/gizak/termui/grid.go
+++ b/vendor/github.com/gizak/termui/grid.go
diff --git a/Godeps/_workspace/src/github.com/gizak/termui/helper.go b/vendor/github.com/gizak/termui/helper.go
index 6690e7fb0..308f6c1db 100644
--- a/Godeps/_workspace/src/github.com/gizak/termui/helper.go
+++ b/vendor/github.com/gizak/termui/helper.go
@@ -212,3 +212,11 @@ func DTrimTxCls(cs []Cell, w int) []Cell {
return rt
}
+
+func CellsToStr(cs []Cell) string {
+ str := ""
+ for _, c := range cs {
+ str += string(c.Ch)
+ }
+ return str
+}
diff --git a/Godeps/_workspace/src/github.com/gizak/termui/linechart.go b/vendor/github.com/gizak/termui/linechart.go
index f2829148e..81834efdb 100644
--- a/Godeps/_workspace/src/github.com/gizak/termui/linechart.go
+++ b/vendor/github.com/gizak/termui/linechart.go
@@ -39,7 +39,7 @@ var rSingleBraille = [4]rune{'\u2880', '⠠', '⠐', '⠈'}
// because one braille char can represent two data points.
/*
lc := termui.NewLineChart()
- lc.Border.Label = "braille-mode Line Chart"
+ lc.BorderLabel = "braille-mode Line Chart"
lc.Data = [1.2, 1.3, 1.5, 1.7, 1.5, 1.6, 1.8, 2.0]
lc.Width = 50
lc.Height = 12
@@ -60,8 +60,8 @@ type LineChart struct {
drawingY int
axisYHeight int
axisXWidth int
- axisYLebelGap int
- axisXLebelGap int
+ axisYLabelGap int
+ axisXLabelGap int
topValue float64
bottomValue float64
labelX [][]rune
@@ -69,6 +69,7 @@ type LineChart struct {
labelYSpace int
maxY float64
minY float64
+ autoLabels bool
}
// NewLineChart returns a new LineChart with current theme.
@@ -78,8 +79,8 @@ func NewLineChart() *LineChart {
lc.LineColor = ThemeAttr("linechart.line.fg")
lc.Mode = "braille"
lc.DotStyle = '•'
- lc.axisXLebelGap = 2
- lc.axisYLebelGap = 1
+ lc.axisXLabelGap = 2
+ lc.axisYLabelGap = 1
lc.bottomValue = math.Inf(1)
lc.topValue = math.Inf(-1)
return lc
@@ -162,7 +163,7 @@ func (lc *LineChart) calcLabelX() {
if l+w <= lc.axisXWidth {
lc.labelX = append(lc.labelX, s)
}
- l += w + lc.axisXLebelGap
+ l += w + lc.axisXLabelGap
} else { // braille
if 2*l >= len(lc.DataLabels) {
break
@@ -173,7 +174,7 @@ func (lc *LineChart) calcLabelX() {
if l+w <= lc.axisXWidth {
lc.labelX = append(lc.labelX, s)
}
- l += w + lc.axisXLebelGap
+ l += w + lc.axisXLabelGap
}
}
@@ -195,7 +196,7 @@ func (lc *LineChart) calcLabelY() {
span := lc.topValue - lc.bottomValue
lc.scale = span / float64(lc.axisYHeight)
- n := (1 + lc.axisYHeight) / (lc.axisYLebelGap + 1)
+ n := (1 + lc.axisYHeight) / (lc.axisYLabelGap + 1)
lc.labelY = make([][]rune, n)
maxLen := 0
for i := 0; i < n; i++ {
@@ -211,7 +212,8 @@ func (lc *LineChart) calcLabelY() {
func (lc *LineChart) calcLayout() {
// set datalabels if it is not provided
- if lc.DataLabels == nil || len(lc.DataLabels) == 0 {
+ if (lc.DataLabels == nil || len(lc.DataLabels) == 0) || lc.autoLabels {
+ lc.autoLabels = true
lc.DataLabels = make([]string, len(lc.Data))
for i := range lc.Data {
lc.DataLabels[i] = fmt.Sprint(i)
@@ -293,7 +295,7 @@ func (lc *LineChart) plotAxes() Buffer {
y := lc.innerArea.Min.Y + lc.innerArea.Dy() - 1
buf.Set(x, y, c)
}
- oft += len(rs) + lc.axisXLebelGap
+ oft += len(rs) + lc.axisXLabelGap
}
// y labels
@@ -301,7 +303,7 @@ func (lc *LineChart) plotAxes() Buffer {
for j, r := range rs {
buf.Set(
lc.innerArea.Min.X+j,
- origY-i*(lc.axisYLebelGap+1),
+ origY-i*(lc.axisYLabelGap+1),
Cell{Ch: r, Fg: lc.AxesColor, Bg: lc.Bg})
}
}
diff --git a/Godeps/_workspace/src/github.com/gizak/termui/linechart_others.go b/vendor/github.com/gizak/termui/linechart_others.go
index 7e2e66b3e..7e2e66b3e 100644
--- a/Godeps/_workspace/src/github.com/gizak/termui/linechart_others.go
+++ b/vendor/github.com/gizak/termui/linechart_others.go
diff --git a/Godeps/_workspace/src/github.com/gizak/termui/linechart_windows.go b/vendor/github.com/gizak/termui/linechart_windows.go
index 1478b5ce3..1478b5ce3 100644
--- a/Godeps/_workspace/src/github.com/gizak/termui/linechart_windows.go
+++ b/vendor/github.com/gizak/termui/linechart_windows.go
diff --git a/Godeps/_workspace/src/github.com/gizak/termui/list.go b/vendor/github.com/gizak/termui/list.go
index 670015fd3..0029d2622 100644
--- a/Godeps/_workspace/src/github.com/gizak/termui/list.go
+++ b/vendor/github.com/gizak/termui/list.go
@@ -24,7 +24,7 @@ import "strings"
ls := termui.NewList()
ls.Items = strs
ls.ItemFgColor = termui.ColorYellow
- ls.Border.Label = "List"
+ ls.BorderLabel = "List"
ls.Height = 7
ls.Width = 25
ls.Y = 0
diff --git a/Godeps/_workspace/src/github.com/gizak/termui/mbarchart.go b/vendor/github.com/gizak/termui/mbarchart.go
index 231de277f..6828e6533 100644
--- a/Godeps/_workspace/src/github.com/gizak/termui/mbarchart.go
+++ b/vendor/github.com/gizak/termui/mbarchart.go
@@ -16,7 +16,7 @@ import (
data[0] := []int{3, 2, 5, 7, 9, 4}
data[1] := []int{7, 8, 5, 3, 1, 6}
bclabels := []string{"S0", "S1", "S2", "S3", "S4", "S5"}
- bc.Border.Label = "Bar Chart"
+ bc.BorderLabel = "Bar Chart"
bc.Data = data
bc.Width = 26
bc.Height = 10
diff --git a/vendor/github.com/gizak/termui/mkdocs.yml b/vendor/github.com/gizak/termui/mkdocs.yml
new file mode 100644
index 000000000..2ab45f064
--- /dev/null
+++ b/vendor/github.com/gizak/termui/mkdocs.yml
@@ -0,0 +1,28 @@
+pages:
+- Home: 'index.md'
+- Quickstart: 'quickstart.md'
+- Recipes: 'recipes.md'
+- References:
+ - Layouts: 'layouts.md'
+ - Components: 'components.md'
+ - Events: 'events.md'
+ - Themes: 'themes.md'
+- Versions: 'versions.md'
+- About: 'about.md'
+
+site_name: termui
+repo_url: https://github.com/gizak/termui/
+site_description: 'termui user guide'
+site_author: gizak
+
+docs_dir: '_docs'
+
+theme: readthedocs
+
+markdown_extensions:
+ - smarty
+ - admonition
+ - toc
+
+extra:
+ version: 1.0
diff --git a/Godeps/_workspace/src/github.com/gizak/termui/par.go b/vendor/github.com/gizak/termui/par.go
index c01bd0020..78bffd091 100644
--- a/Godeps/_workspace/src/github.com/gizak/termui/par.go
+++ b/vendor/github.com/gizak/termui/par.go
@@ -9,13 +9,14 @@ package termui
par := termui.NewPar("Simple Text")
par.Height = 3
par.Width = 17
- par.Border.Label = "Label"
+ par.BorderLabel = "Label"
*/
type Par struct {
Block
Text string
TextFgColor Attribute
TextBgColor Attribute
+ WrapLength int // words wrap limit. Note it may not work properly with multi-width char
}
// NewPar returns a new *Par with given text as its content.
@@ -25,6 +26,7 @@ func NewPar(s string) *Par {
Text: s,
TextFgColor: ThemeAttr("par.text.fg"),
TextBgColor: ThemeAttr("par.text.bg"),
+ WrapLength: 0,
}
}
@@ -35,6 +37,13 @@ func (p *Par) Buffer() Buffer {
fg, bg := p.TextFgColor, p.TextBgColor
cs := DefaultTxBuilder.Build(p.Text, fg, bg)
+ // wrap if WrapLength set
+ if p.WrapLength < 0 {
+ cs = wrapTx(cs, p.Width-2)
+ } else if p.WrapLength > 0 {
+ cs = wrapTx(cs, p.WrapLength)
+ }
+
y, x, n := 0, 0, 0
for y < p.innerArea.Dy() && n < len(cs) {
w := cs[n].Width()
diff --git a/Godeps/_workspace/src/github.com/gizak/termui/pos.go b/vendor/github.com/gizak/termui/pos.go
index 2046dce5a..2046dce5a 100644
--- a/Godeps/_workspace/src/github.com/gizak/termui/pos.go
+++ b/vendor/github.com/gizak/termui/pos.go
diff --git a/Godeps/_workspace/src/github.com/gizak/termui/render.go b/vendor/github.com/gizak/termui/render.go
index 36544f063..36544f063 100644
--- a/Godeps/_workspace/src/github.com/gizak/termui/render.go
+++ b/vendor/github.com/gizak/termui/render.go
diff --git a/Godeps/_workspace/src/github.com/gizak/termui/sparkline.go b/vendor/github.com/gizak/termui/sparkline.go
index 312ad9563..312ad9563 100644
--- a/Godeps/_workspace/src/github.com/gizak/termui/sparkline.go
+++ b/vendor/github.com/gizak/termui/sparkline.go
diff --git a/Godeps/_workspace/src/github.com/gizak/termui/textbuilder.go b/vendor/github.com/gizak/termui/textbuilder.go
index 6ff6d21f3..06a019bed 100644
--- a/Godeps/_workspace/src/github.com/gizak/termui/textbuilder.go
+++ b/vendor/github.com/gizak/termui/textbuilder.go
@@ -7,9 +7,11 @@ package termui
import (
"regexp"
"strings"
+
+ "github.com/mitchellh/go-wordwrap"
)
-// TextBuilder is a minial interface to produce text []Cell using sepcific syntax (markdown).
+// TextBuilder is a minimal interface to produce text []Cell using specific syntax (markdown).
type TextBuilder interface {
Build(s string, fg, bg Attribute) []Cell
}
@@ -189,6 +191,67 @@ func (mtb *MarkdownTxBuilder) parse(str string) {
mtb.plainTx = normTx
}
+func wrapTx(cs []Cell, wl int) []Cell {
+ tmpCell := make([]Cell, len(cs))
+ copy(tmpCell, cs)
+
+ // get the plaintext
+ plain := CellsToStr(cs)
+
+ // wrap
+ plainWrapped := wordwrap.WrapString(plain, uint(wl))
+
+ // find differences and insert
+ finalCell := tmpCell // finalcell will get the inserts and is what is returned
+
+ plainRune := []rune(plain)
+ plainWrappedRune := []rune(plainWrapped)
+ trigger := "go"
+ plainRuneNew := plainRune
+
+ for trigger != "stop" {
+ plainRune = plainRuneNew
+ for i := range plainRune {
+ if plainRune[i] == plainWrappedRune[i] {
+ trigger = "stop"
+ } else if plainRune[i] != plainWrappedRune[i] && plainWrappedRune[i] == 10 {
+ trigger = "go"
+ cell := Cell{10, 0, 0}
+ j := i - 0
+
+ // insert a cell into the []Cell in correct position
+ tmpCell[i] = cell
+
+ // insert the newline into plain so we avoid indexing errors
+ plainRuneNew = append(plainRune, 10)
+ copy(plainRuneNew[j+1:], plainRuneNew[j:])
+ plainRuneNew[j] = plainWrappedRune[j]
+
+ // restart the inner for loop until plain and plain wrapped are
+ // the same; yeah, it's inefficient, but the text amounts
+ // should be small
+ break
+
+ } else if plainRune[i] != plainWrappedRune[i] &&
+ plainWrappedRune[i-1] == 10 && // if the prior rune is a newline
+ plainRune[i] == 32 { // and this rune is a space
+ trigger = "go"
+ // need to delete plainRune[i] because it gets rid of an extra
+ // space
+ plainRuneNew = append(plainRune[:i], plainRune[i+1:]...)
+ break
+
+ } else {
+ trigger = "stop" // stops the outer for loop
+ }
+ }
+ }
+
+ finalCell = tmpCell
+
+ return finalCell
+}
+
// Build implements TextBuilder interface.
func (mtb MarkdownTxBuilder) Build(s string, fg, bg Attribute) []Cell {
mtb.baseFg = fg
diff --git a/Godeps/_workspace/src/github.com/gizak/termui/theme.go b/vendor/github.com/gizak/termui/theme.go
index c3ccda559..c3ccda559 100644
--- a/Godeps/_workspace/src/github.com/gizak/termui/theme.go
+++ b/vendor/github.com/gizak/termui/theme.go
diff --git a/Godeps/_workspace/src/github.com/gizak/termui/widget.go b/vendor/github.com/gizak/termui/widget.go
index 35cf143a3..35cf143a3 100644
--- a/Godeps/_workspace/src/github.com/gizak/termui/widget.go
+++ b/vendor/github.com/gizak/termui/widget.go
diff --git a/vendor/github.com/golang/snappy/.gitignore b/vendor/github.com/golang/snappy/.gitignore
new file mode 100644
index 000000000..042091d9b
--- /dev/null
+++ b/vendor/github.com/golang/snappy/.gitignore
@@ -0,0 +1,16 @@
+cmd/snappytool/snappytool
+testdata/bench
+
+# These explicitly listed benchmark data files are for an obsolete version of
+# snappy_test.go.
+testdata/alice29.txt
+testdata/asyoulik.txt
+testdata/fireworks.jpeg
+testdata/geo.protodata
+testdata/html
+testdata/html_x_4
+testdata/kppkn.gtb
+testdata/lcet10.txt
+testdata/paper-100k.pdf
+testdata/plrabn12.txt
+testdata/urls.10K
diff --git a/Godeps/_workspace/src/github.com/golang/snappy/AUTHORS b/vendor/github.com/golang/snappy/AUTHORS
index bcfa19520..bcfa19520 100644
--- a/Godeps/_workspace/src/github.com/golang/snappy/AUTHORS
+++ b/vendor/github.com/golang/snappy/AUTHORS
diff --git a/Godeps/_workspace/src/github.com/golang/snappy/CONTRIBUTORS b/vendor/github.com/golang/snappy/CONTRIBUTORS
index 931ae3160..931ae3160 100644
--- a/Godeps/_workspace/src/github.com/golang/snappy/CONTRIBUTORS
+++ b/vendor/github.com/golang/snappy/CONTRIBUTORS
diff --git a/Godeps/_workspace/src/github.com/golang/snappy/LICENSE b/vendor/github.com/golang/snappy/LICENSE
index 6050c10f4..6050c10f4 100644
--- a/Godeps/_workspace/src/github.com/golang/snappy/LICENSE
+++ b/vendor/github.com/golang/snappy/LICENSE
diff --git a/vendor/github.com/golang/snappy/README b/vendor/github.com/golang/snappy/README
new file mode 100644
index 000000000..cea12879a
--- /dev/null
+++ b/vendor/github.com/golang/snappy/README
@@ -0,0 +1,107 @@
+The Snappy compression format in the Go programming language.
+
+To download and install from source:
+$ go get github.com/golang/snappy
+
+Unless otherwise noted, the Snappy-Go source files are distributed
+under the BSD-style license found in the LICENSE file.
+
+
+
+Benchmarks.
+
+The golang/snappy benchmarks include compressing (Z) and decompressing (U) ten
+or so files, the same set used by the C++ Snappy code (github.com/google/snappy
+and note the "google", not "golang"). On an "Intel(R) Core(TM) i7-3770 CPU @
+3.40GHz", Go's GOARCH=amd64 numbers as of 2016-05-29:
+
+"go test -test.bench=."
+
+_UFlat0-8 2.19GB/s ± 0% html
+_UFlat1-8 1.41GB/s ± 0% urls
+_UFlat2-8 23.5GB/s ± 2% jpg
+_UFlat3-8 1.91GB/s ± 0% jpg_200
+_UFlat4-8 14.0GB/s ± 1% pdf
+_UFlat5-8 1.97GB/s ± 0% html4
+_UFlat6-8 814MB/s ± 0% txt1
+_UFlat7-8 785MB/s ± 0% txt2
+_UFlat8-8 857MB/s ± 0% txt3
+_UFlat9-8 719MB/s ± 1% txt4
+_UFlat10-8 2.84GB/s ± 0% pb
+_UFlat11-8 1.05GB/s ± 0% gaviota
+
+_ZFlat0-8 1.04GB/s ± 0% html
+_ZFlat1-8 534MB/s ± 0% urls
+_ZFlat2-8 15.7GB/s ± 1% jpg
+_ZFlat3-8 740MB/s ± 3% jpg_200
+_ZFlat4-8 9.20GB/s ± 1% pdf
+_ZFlat5-8 991MB/s ± 0% html4
+_ZFlat6-8 379MB/s ± 0% txt1
+_ZFlat7-8 352MB/s ± 0% txt2
+_ZFlat8-8 396MB/s ± 1% txt3
+_ZFlat9-8 327MB/s ± 1% txt4
+_ZFlat10-8 1.33GB/s ± 1% pb
+_ZFlat11-8 605MB/s ± 1% gaviota
+
+
+
+"go test -test.bench=. -tags=noasm"
+
+_UFlat0-8 621MB/s ± 2% html
+_UFlat1-8 494MB/s ± 1% urls
+_UFlat2-8 23.2GB/s ± 1% jpg
+_UFlat3-8 1.12GB/s ± 1% jpg_200
+_UFlat4-8 4.35GB/s ± 1% pdf
+_UFlat5-8 609MB/s ± 0% html4
+_UFlat6-8 296MB/s ± 0% txt1
+_UFlat7-8 288MB/s ± 0% txt2
+_UFlat8-8 309MB/s ± 1% txt3
+_UFlat9-8 280MB/s ± 1% txt4
+_UFlat10-8 753MB/s ± 0% pb
+_UFlat11-8 400MB/s ± 0% gaviota
+
+_ZFlat0-8 409MB/s ± 1% html
+_ZFlat1-8 250MB/s ± 1% urls
+_ZFlat2-8 12.3GB/s ± 1% jpg
+_ZFlat3-8 132MB/s ± 0% jpg_200
+_ZFlat4-8 2.92GB/s ± 0% pdf
+_ZFlat5-8 405MB/s ± 1% html4
+_ZFlat6-8 179MB/s ± 1% txt1
+_ZFlat7-8 170MB/s ± 1% txt2
+_ZFlat8-8 189MB/s ± 1% txt3
+_ZFlat9-8 164MB/s ± 1% txt4
+_ZFlat10-8 479MB/s ± 1% pb
+_ZFlat11-8 270MB/s ± 1% gaviota
+
+
+
+For comparison (Go's encoded output is byte-for-byte identical to C++'s), here
+are the numbers from C++ Snappy's
+
+make CXXFLAGS="-O2 -DNDEBUG -g" clean snappy_unittest.log && cat snappy_unittest.log
+
+BM_UFlat/0 2.4GB/s html
+BM_UFlat/1 1.4GB/s urls
+BM_UFlat/2 21.8GB/s jpg
+BM_UFlat/3 1.5GB/s jpg_200
+BM_UFlat/4 13.3GB/s pdf
+BM_UFlat/5 2.1GB/s html4
+BM_UFlat/6 1.0GB/s txt1
+BM_UFlat/7 959.4MB/s txt2
+BM_UFlat/8 1.0GB/s txt3
+BM_UFlat/9 864.5MB/s txt4
+BM_UFlat/10 2.9GB/s pb
+BM_UFlat/11 1.2GB/s gaviota
+
+BM_ZFlat/0 944.3MB/s html (22.31 %)
+BM_ZFlat/1 501.6MB/s urls (47.78 %)
+BM_ZFlat/2 14.3GB/s jpg (99.95 %)
+BM_ZFlat/3 538.3MB/s jpg_200 (73.00 %)
+BM_ZFlat/4 8.3GB/s pdf (83.30 %)
+BM_ZFlat/5 903.5MB/s html4 (22.52 %)
+BM_ZFlat/6 336.0MB/s txt1 (57.88 %)
+BM_ZFlat/7 312.3MB/s txt2 (61.91 %)
+BM_ZFlat/8 353.1MB/s txt3 (54.99 %)
+BM_ZFlat/9 289.9MB/s txt4 (66.26 %)
+BM_ZFlat/10 1.2GB/s pb (19.68 %)
+BM_ZFlat/11 527.4MB/s gaviota (37.72 %)
diff --git a/Godeps/_workspace/src/github.com/golang/snappy/decode.go b/vendor/github.com/golang/snappy/decode.go
index 8bab5bdd0..72efb0353 100644
--- a/Godeps/_workspace/src/github.com/golang/snappy/decode.go
+++ b/vendor/github.com/golang/snappy/decode.go
@@ -17,6 +17,8 @@ var (
ErrTooLarge = errors.New("snappy: decoded block is too large")
// ErrUnsupported reports that the input isn't supported.
ErrUnsupported = errors.New("snappy: unsupported input")
+
+ errUnsupportedLiteralLength = errors.New("snappy: unsupported literal length")
)
// DecodedLen returns the length of the decoded block.
@@ -40,96 +42,33 @@ func decodedLen(src []byte) (blockLen, headerLen int, err error) {
return int(v), n, nil
}
+const (
+ decodeErrCodeCorrupt = 1
+ decodeErrCodeUnsupportedLiteralLength = 2
+)
+
// Decode returns the decoded form of src. The returned slice may be a sub-
// slice of dst if dst was large enough to hold the entire decoded block.
// Otherwise, a newly allocated slice will be returned.
-// It is valid to pass a nil dst.
+//
+// The dst and src must not overlap. It is valid to pass a nil dst.
func Decode(dst, src []byte) ([]byte, error) {
dLen, s, err := decodedLen(src)
if err != nil {
return nil, err
}
- if len(dst) < dLen {
+ if dLen <= len(dst) {
+ dst = dst[:dLen]
+ } else {
dst = make([]byte, dLen)
}
-
- var d, offset, length int
- for s < len(src) {
- switch src[s] & 0x03 {
- case tagLiteral:
- x := uint(src[s] >> 2)
- switch {
- case x < 60:
- s++
- case x == 60:
- s += 2
- if s > len(src) {
- return nil, ErrCorrupt
- }
- x = uint(src[s-1])
- case x == 61:
- s += 3
- if s > len(src) {
- return nil, ErrCorrupt
- }
- x = uint(src[s-2]) | uint(src[s-1])<<8
- case x == 62:
- s += 4
- if s > len(src) {
- return nil, ErrCorrupt
- }
- x = uint(src[s-3]) | uint(src[s-2])<<8 | uint(src[s-1])<<16
- case x == 63:
- s += 5
- if s > len(src) {
- return nil, ErrCorrupt
- }
- x = uint(src[s-4]) | uint(src[s-3])<<8 | uint(src[s-2])<<16 | uint(src[s-1])<<24
- }
- length = int(x + 1)
- if length <= 0 {
- return nil, errors.New("snappy: unsupported literal length")
- }
- if length > len(dst)-d || length > len(src)-s {
- return nil, ErrCorrupt
- }
- copy(dst[d:], src[s:s+length])
- d += length
- s += length
- continue
-
- case tagCopy1:
- s += 2
- if s > len(src) {
- return nil, ErrCorrupt
- }
- length = 4 + int(src[s-2])>>2&0x7
- offset = int(src[s-2])&0xe0<<3 | int(src[s-1])
-
- case tagCopy2:
- s += 3
- if s > len(src) {
- return nil, ErrCorrupt
- }
- length = 1 + int(src[s-3])>>2
- offset = int(src[s-2]) | int(src[s-1])<<8
-
- case tagCopy4:
- return nil, errors.New("snappy: unsupported COPY_4 tag")
- }
-
- end := d + length
- if offset > d || end > len(dst) {
- return nil, ErrCorrupt
- }
- for ; d < end; d++ {
- dst[d] = dst[d-offset]
- }
- }
- if d != dLen {
- return nil, ErrCorrupt
+ switch decode(dst, src[s:]) {
+ case 0:
+ return dst, nil
+ case decodeErrCodeUnsupportedLiteralLength:
+ return nil, errUnsupportedLiteralLength
}
- return dst[:d], nil
+ return nil, ErrCorrupt
}
// NewReader returns a new Reader that decompresses from r, using the framing
@@ -138,8 +77,8 @@ func Decode(dst, src []byte) ([]byte, error) {
func NewReader(r io.Reader) *Reader {
return &Reader{
r: r,
- decoded: make([]byte, maxUncompressedChunkLen),
- buf: make([]byte, MaxEncodedLen(maxUncompressedChunkLen)+checksumSize),
+ decoded: make([]byte, maxBlockSize),
+ buf: make([]byte, maxEncodedLenOfMaxBlockSize+checksumSize),
}
}
@@ -165,9 +104,9 @@ func (r *Reader) Reset(reader io.Reader) {
r.readHeader = false
}
-func (r *Reader) readFull(p []byte) (ok bool) {
+func (r *Reader) readFull(p []byte, allowEOF bool) (ok bool) {
if _, r.err = io.ReadFull(r.r, p); r.err != nil {
- if r.err == io.ErrUnexpectedEOF {
+ if r.err == io.ErrUnexpectedEOF || (r.err == io.EOF && !allowEOF) {
r.err = ErrCorrupt
}
return false
@@ -186,7 +125,7 @@ func (r *Reader) Read(p []byte) (int, error) {
r.i += n
return n, nil
}
- if !r.readFull(r.buf[:4]) {
+ if !r.readFull(r.buf[:4], true) {
return 0, r.err
}
chunkType := r.buf[0]
@@ -213,7 +152,7 @@ func (r *Reader) Read(p []byte) (int, error) {
return 0, r.err
}
buf := r.buf[:chunkLen]
- if !r.readFull(buf) {
+ if !r.readFull(buf, false) {
return 0, r.err
}
checksum := uint32(buf[0]) | uint32(buf[1])<<8 | uint32(buf[2])<<16 | uint32(buf[3])<<24
@@ -246,13 +185,17 @@ func (r *Reader) Read(p []byte) (int, error) {
return 0, r.err
}
buf := r.buf[:checksumSize]
- if !r.readFull(buf) {
+ if !r.readFull(buf, false) {
return 0, r.err
}
checksum := uint32(buf[0]) | uint32(buf[1])<<8 | uint32(buf[2])<<16 | uint32(buf[3])<<24
// Read directly into r.decoded instead of via r.buf.
n := chunkLen - checksumSize
- if !r.readFull(r.decoded[:n]) {
+ if n > len(r.decoded) {
+ r.err = ErrCorrupt
+ return 0, r.err
+ }
+ if !r.readFull(r.decoded[:n], false) {
return 0, r.err
}
if crc(r.decoded[:n]) != checksum {
@@ -268,7 +211,7 @@ func (r *Reader) Read(p []byte) (int, error) {
r.err = ErrCorrupt
return 0, r.err
}
- if !r.readFull(r.buf[:len(magicBody)]) {
+ if !r.readFull(r.buf[:len(magicBody)], false) {
return 0, r.err
}
for i := 0; i < len(magicBody); i++ {
@@ -287,7 +230,7 @@ func (r *Reader) Read(p []byte) (int, error) {
}
// Section 4.4 Padding (chunk type 0xfe).
// Section 4.6. Reserved skippable chunks (chunk types 0x80-0xfd).
- if !r.readFull(r.buf[:chunkLen]) {
+ if !r.readFull(r.buf[:chunkLen], false) {
return 0, r.err
}
}
diff --git a/vendor/github.com/golang/snappy/decode_amd64.go b/vendor/github.com/golang/snappy/decode_amd64.go
new file mode 100644
index 000000000..fcd192b84
--- /dev/null
+++ b/vendor/github.com/golang/snappy/decode_amd64.go
@@ -0,0 +1,14 @@
+// Copyright 2016 The Snappy-Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build !appengine
+// +build gc
+// +build !noasm
+
+package snappy
+
+// decode has the same semantics as in decode_other.go.
+//
+//go:noescape
+func decode(dst, src []byte) int
diff --git a/vendor/github.com/golang/snappy/decode_amd64.s b/vendor/github.com/golang/snappy/decode_amd64.s
new file mode 100644
index 000000000..e6179f65e
--- /dev/null
+++ b/vendor/github.com/golang/snappy/decode_amd64.s
@@ -0,0 +1,490 @@
+// Copyright 2016 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build !appengine
+// +build gc
+// +build !noasm
+
+#include "textflag.h"
+
+// The asm code generally follows the pure Go code in decode_other.go, except
+// where marked with a "!!!".
+
+// func decode(dst, src []byte) int
+//
+// All local variables fit into registers. The non-zero stack size is only to
+// spill registers and push args when issuing a CALL. The register allocation:
+// - AX scratch
+// - BX scratch
+// - CX length or x
+// - DX offset
+// - SI &src[s]
+// - DI &dst[d]
+// + R8 dst_base
+// + R9 dst_len
+// + R10 dst_base + dst_len
+// + R11 src_base
+// + R12 src_len
+// + R13 src_base + src_len
+// - R14 used by doCopy
+// - R15 used by doCopy
+//
+// The registers R8-R13 (marked with a "+") are set at the start of the
+// function, and after a CALL returns, and are not otherwise modified.
+//
+// The d variable is implicitly DI - R8, and len(dst)-d is R10 - DI.
+// The s variable is implicitly SI - R11, and len(src)-s is R13 - SI.
+TEXT ·decode(SB), NOSPLIT, $48-56
+ // Initialize SI, DI and R8-R13.
+ MOVQ dst_base+0(FP), R8
+ MOVQ dst_len+8(FP), R9
+ MOVQ R8, DI
+ MOVQ R8, R10
+ ADDQ R9, R10
+ MOVQ src_base+24(FP), R11
+ MOVQ src_len+32(FP), R12
+ MOVQ R11, SI
+ MOVQ R11, R13
+ ADDQ R12, R13
+
+loop:
+ // for s < len(src)
+ CMPQ SI, R13
+ JEQ end
+
+ // CX = uint32(src[s])
+ //
+ // switch src[s] & 0x03
+ MOVBLZX (SI), CX
+ MOVL CX, BX
+ ANDL $3, BX
+ CMPL BX, $1
+ JAE tagCopy
+
+ // ----------------------------------------
+ // The code below handles literal tags.
+
+ // case tagLiteral:
+ // x := uint32(src[s] >> 2)
+ // switch
+ SHRL $2, CX
+ CMPL CX, $60
+ JAE tagLit60Plus
+
+ // case x < 60:
+ // s++
+ INCQ SI
+
+doLit:
+ // This is the end of the inner "switch", when we have a literal tag.
+ //
+ // We assume that CX == x and x fits in a uint32, where x is the variable
+ // used in the pure Go decode_other.go code.
+
+ // length = int(x) + 1
+ //
+ // Unlike the pure Go code, we don't need to check if length <= 0 because
+ // CX can hold 64 bits, so the increment cannot overflow.
+ INCQ CX
+
+ // Prepare to check if copying length bytes will run past the end of dst or
+ // src.
+ //
+ // AX = len(dst) - d
+ // BX = len(src) - s
+ MOVQ R10, AX
+ SUBQ DI, AX
+ MOVQ R13, BX
+ SUBQ SI, BX
+
+ // !!! Try a faster technique for short (16 or fewer bytes) copies.
+ //
+ // if length > 16 || len(dst)-d < 16 || len(src)-s < 16 {
+ // goto callMemmove // Fall back on calling runtime·memmove.
+ // }
+ //
+ // The C++ snappy code calls this TryFastAppend. It also checks len(src)-s
+ // against 21 instead of 16, because it cannot assume that all of its input
+ // is contiguous in memory and so it needs to leave enough source bytes to
+ // read the next tag without refilling buffers, but Go's Decode assumes
+ // contiguousness (the src argument is a []byte).
+ CMPQ CX, $16
+ JGT callMemmove
+ CMPQ AX, $16
+ JLT callMemmove
+ CMPQ BX, $16
+ JLT callMemmove
+
+ // !!! Implement the copy from src to dst as a 16-byte load and store.
+ // (Decode's documentation says that dst and src must not overlap.)
+ //
+ // This always copies 16 bytes, instead of only length bytes, but that's
+ // OK. If the input is a valid Snappy encoding then subsequent iterations
+ // will fix up the overrun. Otherwise, Decode returns a nil []byte (and a
+ // non-nil error), so the overrun will be ignored.
+ //
+ // Note that on amd64, it is legal and cheap to issue unaligned 8-byte or
+ // 16-byte loads and stores. This technique probably wouldn't be as
+ // effective on architectures that are fussier about alignment.
+ MOVOU 0(SI), X0
+ MOVOU X0, 0(DI)
+
+ // d += length
+ // s += length
+ ADDQ CX, DI
+ ADDQ CX, SI
+ JMP loop
+
+callMemmove:
+ // if length > len(dst)-d || length > len(src)-s { etc }
+ CMPQ CX, AX
+ JGT errCorrupt
+ CMPQ CX, BX
+ JGT errCorrupt
+
+ // copy(dst[d:], src[s:s+length])
+ //
+ // This means calling runtime·memmove(&dst[d], &src[s], length), so we push
+ // DI, SI and CX as arguments. Coincidentally, we also need to spill those
+ // three registers to the stack, to save local variables across the CALL.
+ MOVQ DI, 0(SP)
+ MOVQ SI, 8(SP)
+ MOVQ CX, 16(SP)
+ MOVQ DI, 24(SP)
+ MOVQ SI, 32(SP)
+ MOVQ CX, 40(SP)
+ CALL runtime·memmove(SB)
+
+ // Restore local variables: unspill registers from the stack and
+ // re-calculate R8-R13.
+ MOVQ 24(SP), DI
+ MOVQ 32(SP), SI
+ MOVQ 40(SP), CX
+ MOVQ dst_base+0(FP), R8
+ MOVQ dst_len+8(FP), R9
+ MOVQ R8, R10
+ ADDQ R9, R10
+ MOVQ src_base+24(FP), R11
+ MOVQ src_len+32(FP), R12
+ MOVQ R11, R13
+ ADDQ R12, R13
+
+ // d += length
+ // s += length
+ ADDQ CX, DI
+ ADDQ CX, SI
+ JMP loop
+
+tagLit60Plus:
+ // !!! This fragment does the
+ //
+ // s += x - 58; if uint(s) > uint(len(src)) { etc }
+ //
+ // checks. In the asm version, we code it once instead of once per switch case.
+ ADDQ CX, SI
+ SUBQ $58, SI
+ MOVQ SI, BX
+ SUBQ R11, BX
+ CMPQ BX, R12
+ JA errCorrupt
+
+ // case x == 60:
+ CMPL CX, $61
+ JEQ tagLit61
+ JA tagLit62Plus
+
+ // x = uint32(src[s-1])
+ MOVBLZX -1(SI), CX
+ JMP doLit
+
+tagLit61:
+ // case x == 61:
+ // x = uint32(src[s-2]) | uint32(src[s-1])<<8
+ MOVWLZX -2(SI), CX
+ JMP doLit
+
+tagLit62Plus:
+ CMPL CX, $62
+ JA tagLit63
+
+ // case x == 62:
+ // x = uint32(src[s-3]) | uint32(src[s-2])<<8 | uint32(src[s-1])<<16
+ MOVWLZX -3(SI), CX
+ MOVBLZX -1(SI), BX
+ SHLL $16, BX
+ ORL BX, CX
+ JMP doLit
+
+tagLit63:
+ // case x == 63:
+ // x = uint32(src[s-4]) | uint32(src[s-3])<<8 | uint32(src[s-2])<<16 | uint32(src[s-1])<<24
+ MOVL -4(SI), CX
+ JMP doLit
+
+// The code above handles literal tags.
+// ----------------------------------------
+// The code below handles copy tags.
+
+tagCopy4:
+ // case tagCopy4:
+ // s += 5
+ ADDQ $5, SI
+
+ // if uint(s) > uint(len(src)) { etc }
+ MOVQ SI, BX
+ SUBQ R11, BX
+ CMPQ BX, R12
+ JA errCorrupt
+
+ // length = 1 + int(src[s-5])>>2
+ SHRQ $2, CX
+ INCQ CX
+
+ // offset = int(uint32(src[s-4]) | uint32(src[s-3])<<8 | uint32(src[s-2])<<16 | uint32(src[s-1])<<24)
+ MOVLQZX -4(SI), DX
+ JMP doCopy
+
+tagCopy2:
+ // case tagCopy2:
+ // s += 3
+ ADDQ $3, SI
+
+ // if uint(s) > uint(len(src)) { etc }
+ MOVQ SI, BX
+ SUBQ R11, BX
+ CMPQ BX, R12
+ JA errCorrupt
+
+ // length = 1 + int(src[s-3])>>2
+ SHRQ $2, CX
+ INCQ CX
+
+ // offset = int(uint32(src[s-2]) | uint32(src[s-1])<<8)
+ MOVWQZX -2(SI), DX
+ JMP doCopy
+
+tagCopy:
+ // We have a copy tag. We assume that:
+ // - BX == src[s] & 0x03
+ // - CX == src[s]
+ CMPQ BX, $2
+ JEQ tagCopy2
+ JA tagCopy4
+
+ // case tagCopy1:
+ // s += 2
+ ADDQ $2, SI
+
+ // if uint(s) > uint(len(src)) { etc }
+ MOVQ SI, BX
+ SUBQ R11, BX
+ CMPQ BX, R12
+ JA errCorrupt
+
+ // offset = int(uint32(src[s-2])&0xe0<<3 | uint32(src[s-1]))
+ MOVQ CX, DX
+ ANDQ $0xe0, DX
+ SHLQ $3, DX
+ MOVBQZX -1(SI), BX
+ ORQ BX, DX
+
+ // length = 4 + int(src[s-2])>>2&0x7
+ SHRQ $2, CX
+ ANDQ $7, CX
+ ADDQ $4, CX
+
+doCopy:
+ // This is the end of the outer "switch", when we have a copy tag.
+ //
+ // We assume that:
+ // - CX == length && CX > 0
+ // - DX == offset
+
+ // if offset <= 0 { etc }
+ CMPQ DX, $0
+ JLE errCorrupt
+
+ // if d < offset { etc }
+ MOVQ DI, BX
+ SUBQ R8, BX
+ CMPQ BX, DX
+ JLT errCorrupt
+
+ // if length > len(dst)-d { etc }
+ MOVQ R10, BX
+ SUBQ DI, BX
+ CMPQ CX, BX
+ JGT errCorrupt
+
+ // forwardCopy(dst[d:d+length], dst[d-offset:]); d += length
+ //
+ // Set:
+ // - R14 = len(dst)-d
+ // - R15 = &dst[d-offset]
+ MOVQ R10, R14
+ SUBQ DI, R14
+ MOVQ DI, R15
+ SUBQ DX, R15
+
+ // !!! Try a faster technique for short (16 or fewer bytes) forward copies.
+ //
+ // First, try using two 8-byte load/stores, similar to the doLit technique
+ // above. Even if dst[d:d+length] and dst[d-offset:] can overlap, this is
+ // still OK if offset >= 8. Note that this has to be two 8-byte load/stores
+ // and not one 16-byte load/store, and the first store has to be before the
+ // second load, due to the overlap if offset is in the range [8, 16).
+ //
+ // if length > 16 || offset < 8 || len(dst)-d < 16 {
+ // goto slowForwardCopy
+ // }
+ // copy 16 bytes
+ // d += length
+ CMPQ CX, $16
+ JGT slowForwardCopy
+ CMPQ DX, $8
+ JLT slowForwardCopy
+ CMPQ R14, $16
+ JLT slowForwardCopy
+ MOVQ 0(R15), AX
+ MOVQ AX, 0(DI)
+ MOVQ 8(R15), BX
+ MOVQ BX, 8(DI)
+ ADDQ CX, DI
+ JMP loop
+
+slowForwardCopy:
+ // !!! If the forward copy is longer than 16 bytes, or if offset < 8, we
+ // can still try 8-byte load stores, provided we can overrun up to 10 extra
+ // bytes. As above, the overrun will be fixed up by subsequent iterations
+ // of the outermost loop.
+ //
+ // The C++ snappy code calls this technique IncrementalCopyFastPath. Its
+ // commentary says:
+ //
+ // ----
+ //
+ // The main part of this loop is a simple copy of eight bytes at a time
+ // until we've copied (at least) the requested amount of bytes. However,
+ // if d and d-offset are less than eight bytes apart (indicating a
+ // repeating pattern of length < 8), we first need to expand the pattern in
+ // order to get the correct results. For instance, if the buffer looks like
+ // this, with the eight-byte <d-offset> and <d> patterns marked as
+ // intervals:
+ //
+ // abxxxxxxxxxxxx
+ // [------] d-offset
+ // [------] d
+ //
+ // a single eight-byte copy from <d-offset> to <d> will repeat the pattern
+ // once, after which we can move <d> two bytes without moving <d-offset>:
+ //
+ // ababxxxxxxxxxx
+ // [------] d-offset
+ // [------] d
+ //
+ // and repeat the exercise until the two no longer overlap.
+ //
+ // This allows us to do very well in the special case of one single byte
+ // repeated many times, without taking a big hit for more general cases.
+ //
+ // The worst case of extra writing past the end of the match occurs when
+ // offset == 1 and length == 1; the last copy will read from byte positions
+ // [0..7] and write to [4..11], whereas it was only supposed to write to
+ // position 1. Thus, ten excess bytes.
+ //
+ // ----
+ //
+ // That "10 byte overrun" worst case is confirmed by Go's
+ // TestSlowForwardCopyOverrun, which also tests the fixUpSlowForwardCopy
+ // and finishSlowForwardCopy algorithm.
+ //
+ // if length > len(dst)-d-10 {
+ // goto verySlowForwardCopy
+ // }
+ SUBQ $10, R14
+ CMPQ CX, R14
+ JGT verySlowForwardCopy
+
+makeOffsetAtLeast8:
+ // !!! As above, expand the pattern so that offset >= 8 and we can use
+ // 8-byte load/stores.
+ //
+ // for offset < 8 {
+ // copy 8 bytes from dst[d-offset:] to dst[d:]
+ // length -= offset
+ // d += offset
+ // offset += offset
+ // // The two previous lines together means that d-offset, and therefore
+ // // R15, is unchanged.
+ // }
+ CMPQ DX, $8
+ JGE fixUpSlowForwardCopy
+ MOVQ (R15), BX
+ MOVQ BX, (DI)
+ SUBQ DX, CX
+ ADDQ DX, DI
+ ADDQ DX, DX
+ JMP makeOffsetAtLeast8
+
+fixUpSlowForwardCopy:
+ // !!! Add length (which might be negative now) to d (implied by DI being
+ // &dst[d]) so that d ends up at the right place when we jump back to the
+ // top of the loop. Before we do that, though, we save DI to AX so that, if
+ // length is positive, copying the remaining length bytes will write to the
+ // right place.
+ MOVQ DI, AX
+ ADDQ CX, DI
+
+finishSlowForwardCopy:
+ // !!! Repeat 8-byte load/stores until length <= 0. Ending with a negative
+ // length means that we overrun, but as above, that will be fixed up by
+ // subsequent iterations of the outermost loop.
+ CMPQ CX, $0
+ JLE loop
+ MOVQ (R15), BX
+ MOVQ BX, (AX)
+ ADDQ $8, R15
+ ADDQ $8, AX
+ SUBQ $8, CX
+ JMP finishSlowForwardCopy
+
+verySlowForwardCopy:
+ // verySlowForwardCopy is a simple implementation of forward copy. In C
+ // parlance, this is a do/while loop instead of a while loop, since we know
+ // that length > 0. In Go syntax:
+ //
+ // for {
+ // dst[d] = dst[d - offset]
+ // d++
+ // length--
+ // if length == 0 {
+ // break
+ // }
+ // }
+ MOVB (R15), BX
+ MOVB BX, (DI)
+ INCQ R15
+ INCQ DI
+ DECQ CX
+ JNZ verySlowForwardCopy
+ JMP loop
+
+// The code above handles copy tags.
+// ----------------------------------------
+
+end:
+ // This is the end of the "for s < len(src)".
+ //
+ // if d != len(dst) { etc }
+ CMPQ DI, R10
+ JNE errCorrupt
+
+ // return 0
+ MOVQ $0, ret+48(FP)
+ RET
+
+errCorrupt:
+ // return decodeErrCodeCorrupt
+ MOVQ $1, ret+48(FP)
+ RET
diff --git a/vendor/github.com/golang/snappy/decode_other.go b/vendor/github.com/golang/snappy/decode_other.go
new file mode 100644
index 000000000..8c9f2049b
--- /dev/null
+++ b/vendor/github.com/golang/snappy/decode_other.go
@@ -0,0 +1,101 @@
+// Copyright 2016 The Snappy-Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build !amd64 appengine !gc noasm
+
+package snappy
+
+// decode writes the decoding of src to dst. It assumes that the varint-encoded
+// length of the decompressed bytes has already been read, and that len(dst)
+// equals that length.
+//
+// It returns 0 on success or a decodeErrCodeXxx error code on failure.
+func decode(dst, src []byte) int {
+ var d, s, offset, length int
+ for s < len(src) {
+ switch src[s] & 0x03 {
+ case tagLiteral:
+ x := uint32(src[s] >> 2)
+ switch {
+ case x < 60:
+ s++
+ case x == 60:
+ s += 2
+ if uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line.
+ return decodeErrCodeCorrupt
+ }
+ x = uint32(src[s-1])
+ case x == 61:
+ s += 3
+ if uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line.
+ return decodeErrCodeCorrupt
+ }
+ x = uint32(src[s-2]) | uint32(src[s-1])<<8
+ case x == 62:
+ s += 4
+ if uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line.
+ return decodeErrCodeCorrupt
+ }
+ x = uint32(src[s-3]) | uint32(src[s-2])<<8 | uint32(src[s-1])<<16
+ case x == 63:
+ s += 5
+ if uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line.
+ return decodeErrCodeCorrupt
+ }
+ x = uint32(src[s-4]) | uint32(src[s-3])<<8 | uint32(src[s-2])<<16 | uint32(src[s-1])<<24
+ }
+ length = int(x) + 1
+ if length <= 0 {
+ return decodeErrCodeUnsupportedLiteralLength
+ }
+ if length > len(dst)-d || length > len(src)-s {
+ return decodeErrCodeCorrupt
+ }
+ copy(dst[d:], src[s:s+length])
+ d += length
+ s += length
+ continue
+
+ case tagCopy1:
+ s += 2
+ if uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line.
+ return decodeErrCodeCorrupt
+ }
+ length = 4 + int(src[s-2])>>2&0x7
+ offset = int(uint32(src[s-2])&0xe0<<3 | uint32(src[s-1]))
+
+ case tagCopy2:
+ s += 3
+ if uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line.
+ return decodeErrCodeCorrupt
+ }
+ length = 1 + int(src[s-3])>>2
+ offset = int(uint32(src[s-2]) | uint32(src[s-1])<<8)
+
+ case tagCopy4:
+ s += 5
+ if uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line.
+ return decodeErrCodeCorrupt
+ }
+ length = 1 + int(src[s-5])>>2
+ offset = int(uint32(src[s-4]) | uint32(src[s-3])<<8 | uint32(src[s-2])<<16 | uint32(src[s-1])<<24)
+ }
+
+ if offset <= 0 || d < offset || length > len(dst)-d {
+ return decodeErrCodeCorrupt
+ }
+ // Copy from an earlier sub-slice of dst to a later sub-slice. Unlike
+ // the built-in copy function, this byte-by-byte copy always runs
+ // forwards, even if the slices overlap. Conceptually, this is:
+ //
+ // d += forwardCopy(dst[d:d+length], dst[d-offset:])
+ for end := d + length; d != end; d++ {
+ dst[d] = dst[d-offset]
+ }
+ }
+ if d != len(dst) {
+ return decodeErrCodeCorrupt
+ }
+ return 0
+}
diff --git a/Godeps/_workspace/src/github.com/golang/snappy/encode.go b/vendor/github.com/golang/snappy/encode.go
index 834e3b06a..874968906 100644
--- a/Godeps/_workspace/src/github.com/golang/snappy/encode.go
+++ b/vendor/github.com/golang/snappy/encode.go
@@ -10,149 +10,74 @@ import (
"io"
)
-// We limit how far copy back-references can go, the same as the C++ code.
-const maxOffset = 1 << 15
-
-// emitLiteral writes a literal chunk and returns the number of bytes written.
-func emitLiteral(dst, lit []byte) int {
- i, n := 0, uint(len(lit)-1)
- switch {
- case n < 60:
- dst[0] = uint8(n)<<2 | tagLiteral
- i = 1
- case n < 1<<8:
- dst[0] = 60<<2 | tagLiteral
- dst[1] = uint8(n)
- i = 2
- case n < 1<<16:
- dst[0] = 61<<2 | tagLiteral
- dst[1] = uint8(n)
- dst[2] = uint8(n >> 8)
- i = 3
- case n < 1<<24:
- dst[0] = 62<<2 | tagLiteral
- dst[1] = uint8(n)
- dst[2] = uint8(n >> 8)
- dst[3] = uint8(n >> 16)
- i = 4
- case int64(n) < 1<<32:
- dst[0] = 63<<2 | tagLiteral
- dst[1] = uint8(n)
- dst[2] = uint8(n >> 8)
- dst[3] = uint8(n >> 16)
- dst[4] = uint8(n >> 24)
- i = 5
- default:
- panic("snappy: source buffer is too long")
- }
- if copy(dst[i:], lit) != len(lit) {
- panic("snappy: destination buffer is too short")
- }
- return i + len(lit)
-}
-
-// emitCopy writes a copy chunk and returns the number of bytes written.
-func emitCopy(dst []byte, offset, length int) int {
- i := 0
- for length > 0 {
- x := length - 4
- if 0 <= x && x < 1<<3 && offset < 1<<11 {
- dst[i+0] = uint8(offset>>8)&0x07<<5 | uint8(x)<<2 | tagCopy1
- dst[i+1] = uint8(offset)
- i += 2
- break
- }
-
- x = length
- if x > 1<<6 {
- x = 1 << 6
- }
- dst[i+0] = uint8(x-1)<<2 | tagCopy2
- dst[i+1] = uint8(offset)
- dst[i+2] = uint8(offset >> 8)
- i += 3
- length -= x
- }
- return i
-}
-
// Encode returns the encoded form of src. The returned slice may be a sub-
// slice of dst if dst was large enough to hold the entire encoded block.
// Otherwise, a newly allocated slice will be returned.
-// It is valid to pass a nil dst.
+//
+// The dst and src must not overlap. It is valid to pass a nil dst.
func Encode(dst, src []byte) []byte {
- if n := MaxEncodedLen(len(src)); len(dst) < n {
+ if n := MaxEncodedLen(len(src)); n < 0 {
+ panic(ErrTooLarge)
+ } else if len(dst) < n {
dst = make([]byte, n)
}
// The block starts with the varint-encoded length of the decompressed bytes.
d := binary.PutUvarint(dst, uint64(len(src)))
- // Return early if src is short.
- if len(src) <= 4 {
- if len(src) != 0 {
- d += emitLiteral(dst[d:], src)
- }
- return dst[:d]
- }
-
- // Initialize the hash table. Its size ranges from 1<<8 to 1<<14 inclusive.
- const maxTableSize = 1 << 14
- shift, tableSize := uint(32-8), 1<<8
- for tableSize < maxTableSize && tableSize < len(src) {
- shift--
- tableSize *= 2
- }
- var table [maxTableSize]int
-
- // Iterate over the source bytes.
- var (
- s int // The iterator position.
- t int // The last position with the same hash as s.
- lit int // The start position of any pending literal bytes.
- )
- for s+3 < len(src) {
- // Update the hash table.
- b0, b1, b2, b3 := src[s], src[s+1], src[s+2], src[s+3]
- h := uint32(b0) | uint32(b1)<<8 | uint32(b2)<<16 | uint32(b3)<<24
- p := &table[(h*0x1e35a7bd)>>shift]
- // We need to to store values in [-1, inf) in table. To save
- // some initialization time, (re)use the table's zero value
- // and shift the values against this zero: add 1 on writes,
- // subtract 1 on reads.
- t, *p = *p-1, s+1
- // If t is invalid or src[s:s+4] differs from src[t:t+4], accumulate a literal byte.
- if t < 0 || s-t >= maxOffset || b0 != src[t] || b1 != src[t+1] || b2 != src[t+2] || b3 != src[t+3] {
- // Skip multiple bytes if the last match was >= 32 bytes prior.
- s += 1 + (s-lit)>>5
- continue
- }
- // Otherwise, we have a match. First, emit any pending literal bytes.
- if lit != s {
- d += emitLiteral(dst[d:], src[lit:s])
+ for len(src) > 0 {
+ p := src
+ src = nil
+ if len(p) > maxBlockSize {
+ p, src = p[:maxBlockSize], p[maxBlockSize:]
}
- // Extend the match to be as long as possible.
- s0 := s
- s, t = s+4, t+4
- for s < len(src) && src[s] == src[t] {
- s++
- t++
+ if len(p) < minNonLiteralBlockSize {
+ d += emitLiteral(dst[d:], p)
+ } else {
+ d += encodeBlock(dst[d:], p)
}
- // Emit the copied bytes.
- d += emitCopy(dst[d:], s-t, s-s0)
- lit = s
- }
-
- // Emit any final pending literal bytes and return.
- if lit != len(src) {
- d += emitLiteral(dst[d:], src[lit:])
}
return dst[:d]
}
+// inputMargin is the minimum number of extra input bytes to keep, inside
+// encodeBlock's inner loop. On some architectures, this margin lets us
+// implement a fast path for emitLiteral, where the copy of short (<= 16 byte)
+// literals can be implemented as a single load to and store from a 16-byte
+// register. That literal's actual length can be as short as 1 byte, so this
+// can copy up to 15 bytes too much, but that's OK as subsequent iterations of
+// the encoding loop will fix up the copy overrun, and this inputMargin ensures
+// that we don't overrun the dst and src buffers.
+const inputMargin = 16 - 1
+
+// minNonLiteralBlockSize is the minimum size of the input to encodeBlock that
+// could be encoded with a copy tag. This is the minimum with respect to the
+// algorithm used by encodeBlock, not a minimum enforced by the file format.
+//
+// The encoded output must start with at least a 1 byte literal, as there are
+// no previous bytes to copy. A minimal (1 byte) copy after that, generated
+// from an emitCopy call in encodeBlock's main loop, would require at least
+// another inputMargin bytes, for the reason above: we want any emitLiteral
+// calls inside encodeBlock's main loop to use the fast path if possible, which
+// requires being able to overrun by inputMargin bytes. Thus,
+// minNonLiteralBlockSize equals 1 + 1 + inputMargin.
+//
+// The C++ code doesn't use this exact threshold, but it could, as discussed at
+// https://groups.google.com/d/topic/snappy-compression/oGbhsdIJSJ8/discussion
+// The difference between Go (2+inputMargin) and C++ (inputMargin) is purely an
+// optimization. It should not affect the encoded form. This is tested by
+// TestSameEncodingAsCppShortCopies.
+const minNonLiteralBlockSize = 1 + 1 + inputMargin
+
// MaxEncodedLen returns the maximum length of a snappy block, given its
// uncompressed length.
+//
+// It will return a negative value if srcLen is too large to encode.
func MaxEncodedLen(srcLen int) int {
+ n := uint64(srcLen)
+ if n > 0xffffffff {
+ return -1
+ }
// Compressed data can be defined as:
// compressed := item* literal*
// item := literal* copy
@@ -173,7 +98,11 @@ func MaxEncodedLen(srcLen int) int {
// That is, 6 bytes of input turn into 7 bytes of "compressed" data.
//
// This last factor dominates the blowup, so the final estimate is:
- return 32 + srcLen + srcLen/6
+ n = 32 + n + n/6
+ if n > 0xffffffff {
+ return -1
+ }
+ return int(n)
}
var errClosed = errors.New("snappy: Writer is closed")
@@ -204,7 +133,7 @@ func NewWriter(w io.Writer) *Writer {
func NewBufferedWriter(w io.Writer) *Writer {
return &Writer{
w: w,
- ibuf: make([]byte, 0, maxUncompressedChunkLen),
+ ibuf: make([]byte, 0, maxBlockSize),
obuf: make([]byte, obufLen),
}
}
@@ -288,8 +217,8 @@ func (w *Writer) write(p []byte) (nRet int, errRet error) {
}
var uncompressed []byte
- if len(p) > maxUncompressedChunkLen {
- uncompressed, p = p[:maxUncompressedChunkLen], p[maxUncompressedChunkLen:]
+ if len(p) > maxBlockSize {
+ uncompressed, p = p[:maxBlockSize], p[maxBlockSize:]
} else {
uncompressed, p = p, nil
}
diff --git a/vendor/github.com/golang/snappy/encode_amd64.go b/vendor/github.com/golang/snappy/encode_amd64.go
new file mode 100644
index 000000000..2a56fb504
--- /dev/null
+++ b/vendor/github.com/golang/snappy/encode_amd64.go
@@ -0,0 +1,29 @@
+// Copyright 2016 The Snappy-Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build !appengine
+// +build gc
+// +build !noasm
+
+package snappy
+
+// emitLiteral has the same semantics as in encode_other.go.
+//
+//go:noescape
+func emitLiteral(dst, lit []byte) int
+
+// emitCopy has the same semantics as in encode_other.go.
+//
+//go:noescape
+func emitCopy(dst []byte, offset, length int) int
+
+// extendMatch has the same semantics as in encode_other.go.
+//
+//go:noescape
+func extendMatch(src []byte, i, j int) int
+
+// encodeBlock has the same semantics as in encode_other.go.
+//
+//go:noescape
+func encodeBlock(dst, src []byte) (d int) \ No newline at end of file
diff --git a/vendor/github.com/golang/snappy/encode_amd64.s b/vendor/github.com/golang/snappy/encode_amd64.s
new file mode 100644
index 000000000..adfd979fe
--- /dev/null
+++ b/vendor/github.com/golang/snappy/encode_amd64.s
@@ -0,0 +1,730 @@
+// Copyright 2016 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build !appengine
+// +build gc
+// +build !noasm
+
+#include "textflag.h"
+
+// The XXX lines assemble on Go 1.4, 1.5 and 1.7, but not 1.6, due to a
+// Go toolchain regression. See https://github.com/golang/go/issues/15426 and
+// https://github.com/golang/snappy/issues/29
+//
+// As a workaround, the package was built with a known good assembler, and
+// those instructions were disassembled by "objdump -d" to yield the
+// 4e 0f b7 7c 5c 78 movzwq 0x78(%rsp,%r11,2),%r15
+// style comments, in AT&T asm syntax. Note that rsp here is a physical
+// register, not Go/asm's SP pseudo-register (see https://golang.org/doc/asm).
+// The instructions were then encoded as "BYTE $0x.." sequences, which assemble
+// fine on Go 1.6.
+
+// The asm code generally follows the pure Go code in encode_other.go, except
+// where marked with a "!!!".
+
+// ----------------------------------------------------------------------------
+
+// func emitLiteral(dst, lit []byte) int
+//
+// All local variables fit into registers. The register allocation:
+// - AX len(lit)
+// - BX n
+// - DX return value
+// - DI &dst[i]
+// - R10 &lit[0]
+//
+// The 24 bytes of stack space is to call runtime·memmove.
+//
+// The unusual register allocation of local variables, such as R10 for the
+// source pointer, matches the allocation used at the call site in encodeBlock,
+// which makes it easier to manually inline this function.
+TEXT ·emitLiteral(SB), NOSPLIT, $24-56
+ MOVQ dst_base+0(FP), DI
+ MOVQ lit_base+24(FP), R10
+ MOVQ lit_len+32(FP), AX
+ MOVQ AX, DX
+ MOVL AX, BX
+ SUBL $1, BX
+
+ CMPL BX, $60
+ JLT oneByte
+ CMPL BX, $256
+ JLT twoBytes
+
+threeBytes:
+ MOVB $0xf4, 0(DI)
+ MOVW BX, 1(DI)
+ ADDQ $3, DI
+ ADDQ $3, DX
+ JMP memmove
+
+twoBytes:
+ MOVB $0xf0, 0(DI)
+ MOVB BX, 1(DI)
+ ADDQ $2, DI
+ ADDQ $2, DX
+ JMP memmove
+
+oneByte:
+ SHLB $2, BX
+ MOVB BX, 0(DI)
+ ADDQ $1, DI
+ ADDQ $1, DX
+
+memmove:
+ MOVQ DX, ret+48(FP)
+
+ // copy(dst[i:], lit)
+ //
+ // This means calling runtime·memmove(&dst[i], &lit[0], len(lit)), so we push
+ // DI, R10 and AX as arguments.
+ MOVQ DI, 0(SP)
+ MOVQ R10, 8(SP)
+ MOVQ AX, 16(SP)
+ CALL runtime·memmove(SB)
+ RET
+
+// ----------------------------------------------------------------------------
+
+// func emitCopy(dst []byte, offset, length int) int
+//
+// All local variables fit into registers. The register allocation:
+// - AX length
+// - SI &dst[0]
+// - DI &dst[i]
+// - R11 offset
+//
+// The unusual register allocation of local variables, such as R11 for the
+// offset, matches the allocation used at the call site in encodeBlock, which
+// makes it easier to manually inline this function.
+TEXT ·emitCopy(SB), NOSPLIT, $0-48
+ MOVQ dst_base+0(FP), DI
+ MOVQ DI, SI
+ MOVQ offset+24(FP), R11
+ MOVQ length+32(FP), AX
+
+loop0:
+ // for length >= 68 { etc }
+ CMPL AX, $68
+ JLT step1
+
+ // Emit a length 64 copy, encoded as 3 bytes.
+ MOVB $0xfe, 0(DI)
+ MOVW R11, 1(DI)
+ ADDQ $3, DI
+ SUBL $64, AX
+ JMP loop0
+
+step1:
+ // if length > 64 { etc }
+ CMPL AX, $64
+ JLE step2
+
+ // Emit a length 60 copy, encoded as 3 bytes.
+ MOVB $0xee, 0(DI)
+ MOVW R11, 1(DI)
+ ADDQ $3, DI
+ SUBL $60, AX
+
+step2:
+ // if length >= 12 || offset >= 2048 { goto step3 }
+ CMPL AX, $12
+ JGE step3
+ CMPL R11, $2048
+ JGE step3
+
+ // Emit the remaining copy, encoded as 2 bytes.
+ MOVB R11, 1(DI)
+ SHRL $8, R11
+ SHLB $5, R11
+ SUBB $4, AX
+ SHLB $2, AX
+ ORB AX, R11
+ ORB $1, R11
+ MOVB R11, 0(DI)
+ ADDQ $2, DI
+
+ // Return the number of bytes written.
+ SUBQ SI, DI
+ MOVQ DI, ret+40(FP)
+ RET
+
+step3:
+ // Emit the remaining copy, encoded as 3 bytes.
+ SUBL $1, AX
+ SHLB $2, AX
+ ORB $2, AX
+ MOVB AX, 0(DI)
+ MOVW R11, 1(DI)
+ ADDQ $3, DI
+
+ // Return the number of bytes written.
+ SUBQ SI, DI
+ MOVQ DI, ret+40(FP)
+ RET
+
+// ----------------------------------------------------------------------------
+
+// func extendMatch(src []byte, i, j int) int
+//
+// All local variables fit into registers. The register allocation:
+// - DX &src[0]
+// - SI &src[j]
+// - R13 &src[len(src) - 8]
+// - R14 &src[len(src)]
+// - R15 &src[i]
+//
+// The unusual register allocation of local variables, such as R15 for a source
+// pointer, matches the allocation used at the call site in encodeBlock, which
+// makes it easier to manually inline this function.
+TEXT ·extendMatch(SB), NOSPLIT, $0-48
+ MOVQ src_base+0(FP), DX
+ MOVQ src_len+8(FP), R14
+ MOVQ i+24(FP), R15
+ MOVQ j+32(FP), SI
+ ADDQ DX, R14
+ ADDQ DX, R15
+ ADDQ DX, SI
+ MOVQ R14, R13
+ SUBQ $8, R13
+
+cmp8:
+ // As long as we are 8 or more bytes before the end of src, we can load and
+ // compare 8 bytes at a time. If those 8 bytes are equal, repeat.
+ CMPQ SI, R13
+ JA cmp1
+ MOVQ (R15), AX
+ MOVQ (SI), BX
+ CMPQ AX, BX
+ JNE bsf
+ ADDQ $8, R15
+ ADDQ $8, SI
+ JMP cmp8
+
+bsf:
+ // If those 8 bytes were not equal, XOR the two 8 byte values, and return
+ // the index of the first byte that differs. The BSF instruction finds the
+ // least significant 1 bit, the amd64 architecture is little-endian, and
+ // the shift by 3 converts a bit index to a byte index.
+ XORQ AX, BX
+ BSFQ BX, BX
+ SHRQ $3, BX
+ ADDQ BX, SI
+
+ // Convert from &src[ret] to ret.
+ SUBQ DX, SI
+ MOVQ SI, ret+40(FP)
+ RET
+
+cmp1:
+ // In src's tail, compare 1 byte at a time.
+ CMPQ SI, R14
+ JAE extendMatchEnd
+ MOVB (R15), AX
+ MOVB (SI), BX
+ CMPB AX, BX
+ JNE extendMatchEnd
+ ADDQ $1, R15
+ ADDQ $1, SI
+ JMP cmp1
+
+extendMatchEnd:
+ // Convert from &src[ret] to ret.
+ SUBQ DX, SI
+ MOVQ SI, ret+40(FP)
+ RET
+
+// ----------------------------------------------------------------------------
+
+// func encodeBlock(dst, src []byte) (d int)
+//
+// All local variables fit into registers, other than "var table". The register
+// allocation:
+// - AX . .
+// - BX . .
+// - CX 56 shift (note that amd64 shifts by non-immediates must use CX).
+// - DX 64 &src[0], tableSize
+// - SI 72 &src[s]
+// - DI 80 &dst[d]
+// - R9 88 sLimit
+// - R10 . &src[nextEmit]
+// - R11 96 prevHash, currHash, nextHash, offset
+// - R12 104 &src[base], skip
+// - R13 . &src[nextS], &src[len(src) - 8]
+// - R14 . len(src), bytesBetweenHashLookups, &src[len(src)], x
+// - R15 112 candidate
+//
+// The second column (56, 64, etc) is the stack offset to spill the registers
+// when calling other functions. We could pack this slightly tighter, but it's
+// simpler to have a dedicated spill map independent of the function called.
+//
+// "var table [maxTableSize]uint16" takes up 32768 bytes of stack space. An
+// extra 56 bytes, to call other functions, and an extra 64 bytes, to spill
+// local variables (registers) during calls gives 32768 + 56 + 64 = 32888.
+TEXT ·encodeBlock(SB), 0, $32888-56
+ MOVQ dst_base+0(FP), DI
+ MOVQ src_base+24(FP), SI
+ MOVQ src_len+32(FP), R14
+
+ // shift, tableSize := uint32(32-8), 1<<8
+ MOVQ $24, CX
+ MOVQ $256, DX
+
+calcShift:
+ // for ; tableSize < maxTableSize && tableSize < len(src); tableSize *= 2 {
+ // shift--
+ // }
+ CMPQ DX, $16384
+ JGE varTable
+ CMPQ DX, R14
+ JGE varTable
+ SUBQ $1, CX
+ SHLQ $1, DX
+ JMP calcShift
+
+varTable:
+ // var table [maxTableSize]uint16
+ //
+ // In the asm code, unlike the Go code, we can zero-initialize only the
+ // first tableSize elements. Each uint16 element is 2 bytes and each MOVOU
+ // writes 16 bytes, so we can do only tableSize/8 writes instead of the
+ // 2048 writes that would zero-initialize all of table's 32768 bytes.
+ SHRQ $3, DX
+ LEAQ table-32768(SP), BX
+ PXOR X0, X0
+
+memclr:
+ MOVOU X0, 0(BX)
+ ADDQ $16, BX
+ SUBQ $1, DX
+ JNZ memclr
+
+ // !!! DX = &src[0]
+ MOVQ SI, DX
+
+ // sLimit := len(src) - inputMargin
+ MOVQ R14, R9
+ SUBQ $15, R9
+
+ // !!! Pre-emptively spill CX, DX and R9 to the stack. Their values don't
+ // change for the rest of the function.
+ MOVQ CX, 56(SP)
+ MOVQ DX, 64(SP)
+ MOVQ R9, 88(SP)
+
+ // nextEmit := 0
+ MOVQ DX, R10
+
+ // s := 1
+ ADDQ $1, SI
+
+ // nextHash := hash(load32(src, s), shift)
+ MOVL 0(SI), R11
+ IMULL $0x1e35a7bd, R11
+ SHRL CX, R11
+
+outer:
+ // for { etc }
+
+ // skip := 32
+ MOVQ $32, R12
+
+ // nextS := s
+ MOVQ SI, R13
+
+ // candidate := 0
+ MOVQ $0, R15
+
+inner0:
+ // for { etc }
+
+ // s := nextS
+ MOVQ R13, SI
+
+ // bytesBetweenHashLookups := skip >> 5
+ MOVQ R12, R14
+ SHRQ $5, R14
+
+ // nextS = s + bytesBetweenHashLookups
+ ADDQ R14, R13
+
+ // skip += bytesBetweenHashLookups
+ ADDQ R14, R12
+
+ // if nextS > sLimit { goto emitRemainder }
+ MOVQ R13, AX
+ SUBQ DX, AX
+ CMPQ AX, R9
+ JA emitRemainder
+
+ // candidate = int(table[nextHash])
+ // XXX: MOVWQZX table-32768(SP)(R11*2), R15
+ // XXX: 4e 0f b7 7c 5c 78 movzwq 0x78(%rsp,%r11,2),%r15
+ BYTE $0x4e
+ BYTE $0x0f
+ BYTE $0xb7
+ BYTE $0x7c
+ BYTE $0x5c
+ BYTE $0x78
+
+ // table[nextHash] = uint16(s)
+ MOVQ SI, AX
+ SUBQ DX, AX
+
+ // XXX: MOVW AX, table-32768(SP)(R11*2)
+ // XXX: 66 42 89 44 5c 78 mov %ax,0x78(%rsp,%r11,2)
+ BYTE $0x66
+ BYTE $0x42
+ BYTE $0x89
+ BYTE $0x44
+ BYTE $0x5c
+ BYTE $0x78
+
+ // nextHash = hash(load32(src, nextS), shift)
+ MOVL 0(R13), R11
+ IMULL $0x1e35a7bd, R11
+ SHRL CX, R11
+
+ // if load32(src, s) != load32(src, candidate) { continue } break
+ MOVL 0(SI), AX
+ MOVL (DX)(R15*1), BX
+ CMPL AX, BX
+ JNE inner0
+
+fourByteMatch:
+ // As per the encode_other.go code:
+ //
+ // A 4-byte match has been found. We'll later see etc.
+
+ // !!! Jump to a fast path for short (<= 16 byte) literals. See the comment
+ // on inputMargin in encode.go.
+ MOVQ SI, AX
+ SUBQ R10, AX
+ CMPQ AX, $16
+ JLE emitLiteralFastPath
+
+ // ----------------------------------------
+ // Begin inline of the emitLiteral call.
+ //
+ // d += emitLiteral(dst[d:], src[nextEmit:s])
+
+ MOVL AX, BX
+ SUBL $1, BX
+
+ CMPL BX, $60
+ JLT inlineEmitLiteralOneByte
+ CMPL BX, $256
+ JLT inlineEmitLiteralTwoBytes
+
+inlineEmitLiteralThreeBytes:
+ MOVB $0xf4, 0(DI)
+ MOVW BX, 1(DI)
+ ADDQ $3, DI
+ JMP inlineEmitLiteralMemmove
+
+inlineEmitLiteralTwoBytes:
+ MOVB $0xf0, 0(DI)
+ MOVB BX, 1(DI)
+ ADDQ $2, DI
+ JMP inlineEmitLiteralMemmove
+
+inlineEmitLiteralOneByte:
+ SHLB $2, BX
+ MOVB BX, 0(DI)
+ ADDQ $1, DI
+
+inlineEmitLiteralMemmove:
+ // Spill local variables (registers) onto the stack; call; unspill.
+ //
+ // copy(dst[i:], lit)
+ //
+ // This means calling runtime·memmove(&dst[i], &lit[0], len(lit)), so we push
+ // DI, R10 and AX as arguments.
+ MOVQ DI, 0(SP)
+ MOVQ R10, 8(SP)
+ MOVQ AX, 16(SP)
+ ADDQ AX, DI // Finish the "d +=" part of "d += emitLiteral(etc)".
+ MOVQ SI, 72(SP)
+ MOVQ DI, 80(SP)
+ MOVQ R15, 112(SP)
+ CALL runtime·memmove(SB)
+ MOVQ 56(SP), CX
+ MOVQ 64(SP), DX
+ MOVQ 72(SP), SI
+ MOVQ 80(SP), DI
+ MOVQ 88(SP), R9
+ MOVQ 112(SP), R15
+ JMP inner1
+
+inlineEmitLiteralEnd:
+ // End inline of the emitLiteral call.
+ // ----------------------------------------
+
+emitLiteralFastPath:
+ // !!! Emit the 1-byte encoding "uint8(len(lit)-1)<<2".
+ MOVB AX, BX
+ SUBB $1, BX
+ SHLB $2, BX
+ MOVB BX, (DI)
+ ADDQ $1, DI
+
+ // !!! Implement the copy from lit to dst as a 16-byte load and store.
+ // (Encode's documentation says that dst and src must not overlap.)
+ //
+ // This always copies 16 bytes, instead of only len(lit) bytes, but that's
+ // OK. Subsequent iterations will fix up the overrun.
+ //
+ // Note that on amd64, it is legal and cheap to issue unaligned 8-byte or
+ // 16-byte loads and stores. This technique probably wouldn't be as
+ // effective on architectures that are fussier about alignment.
+ MOVOU 0(R10), X0
+ MOVOU X0, 0(DI)
+ ADDQ AX, DI
+
+inner1:
+ // for { etc }
+
+ // base := s
+ MOVQ SI, R12
+
+ // !!! offset := base - candidate
+ MOVQ R12, R11
+ SUBQ R15, R11
+ SUBQ DX, R11
+
+ // ----------------------------------------
+ // Begin inline of the extendMatch call.
+ //
+ // s = extendMatch(src, candidate+4, s+4)
+
+ // !!! R14 = &src[len(src)]
+ MOVQ src_len+32(FP), R14
+ ADDQ DX, R14
+
+ // !!! R13 = &src[len(src) - 8]
+ MOVQ R14, R13
+ SUBQ $8, R13
+
+ // !!! R15 = &src[candidate + 4]
+ ADDQ $4, R15
+ ADDQ DX, R15
+
+ // !!! s += 4
+ ADDQ $4, SI
+
+inlineExtendMatchCmp8:
+ // As long as we are 8 or more bytes before the end of src, we can load and
+ // compare 8 bytes at a time. If those 8 bytes are equal, repeat.
+ CMPQ SI, R13
+ JA inlineExtendMatchCmp1
+ MOVQ (R15), AX
+ MOVQ (SI), BX
+ CMPQ AX, BX
+ JNE inlineExtendMatchBSF
+ ADDQ $8, R15
+ ADDQ $8, SI
+ JMP inlineExtendMatchCmp8
+
+inlineExtendMatchBSF:
+ // If those 8 bytes were not equal, XOR the two 8 byte values, and return
+ // the index of the first byte that differs. The BSF instruction finds the
+ // least significant 1 bit, the amd64 architecture is little-endian, and
+ // the shift by 3 converts a bit index to a byte index.
+ XORQ AX, BX
+ BSFQ BX, BX
+ SHRQ $3, BX
+ ADDQ BX, SI
+ JMP inlineExtendMatchEnd
+
+inlineExtendMatchCmp1:
+ // In src's tail, compare 1 byte at a time.
+ CMPQ SI, R14
+ JAE inlineExtendMatchEnd
+ MOVB (R15), AX
+ MOVB (SI), BX
+ CMPB AX, BX
+ JNE inlineExtendMatchEnd
+ ADDQ $1, R15
+ ADDQ $1, SI
+ JMP inlineExtendMatchCmp1
+
+inlineExtendMatchEnd:
+ // End inline of the extendMatch call.
+ // ----------------------------------------
+
+ // ----------------------------------------
+ // Begin inline of the emitCopy call.
+ //
+ // d += emitCopy(dst[d:], base-candidate, s-base)
+
+ // !!! length := s - base
+ MOVQ SI, AX
+ SUBQ R12, AX
+
+inlineEmitCopyLoop0:
+ // for length >= 68 { etc }
+ CMPL AX, $68
+ JLT inlineEmitCopyStep1
+
+ // Emit a length 64 copy, encoded as 3 bytes.
+ MOVB $0xfe, 0(DI)
+ MOVW R11, 1(DI)
+ ADDQ $3, DI
+ SUBL $64, AX
+ JMP inlineEmitCopyLoop0
+
+inlineEmitCopyStep1:
+ // if length > 64 { etc }
+ CMPL AX, $64
+ JLE inlineEmitCopyStep2
+
+ // Emit a length 60 copy, encoded as 3 bytes.
+ MOVB $0xee, 0(DI)
+ MOVW R11, 1(DI)
+ ADDQ $3, DI
+ SUBL $60, AX
+
+inlineEmitCopyStep2:
+ // if length >= 12 || offset >= 2048 { goto inlineEmitCopyStep3 }
+ CMPL AX, $12
+ JGE inlineEmitCopyStep3
+ CMPL R11, $2048
+ JGE inlineEmitCopyStep3
+
+ // Emit the remaining copy, encoded as 2 bytes.
+ MOVB R11, 1(DI)
+ SHRL $8, R11
+ SHLB $5, R11
+ SUBB $4, AX
+ SHLB $2, AX
+ ORB AX, R11
+ ORB $1, R11
+ MOVB R11, 0(DI)
+ ADDQ $2, DI
+ JMP inlineEmitCopyEnd
+
+inlineEmitCopyStep3:
+ // Emit the remaining copy, encoded as 3 bytes.
+ SUBL $1, AX
+ SHLB $2, AX
+ ORB $2, AX
+ MOVB AX, 0(DI)
+ MOVW R11, 1(DI)
+ ADDQ $3, DI
+
+inlineEmitCopyEnd:
+ // End inline of the emitCopy call.
+ // ----------------------------------------
+
+ // nextEmit = s
+ MOVQ SI, R10
+
+ // if s >= sLimit { goto emitRemainder }
+ MOVQ SI, AX
+ SUBQ DX, AX
+ CMPQ AX, R9
+ JAE emitRemainder
+
+ // As per the encode_other.go code:
+ //
+ // We could immediately etc.
+
+ // x := load64(src, s-1)
+ MOVQ -1(SI), R14
+
+ // prevHash := hash(uint32(x>>0), shift)
+ MOVL R14, R11
+ IMULL $0x1e35a7bd, R11
+ SHRL CX, R11
+
+ // table[prevHash] = uint16(s-1)
+ MOVQ SI, AX
+ SUBQ DX, AX
+ SUBQ $1, AX
+
+ // XXX: MOVW AX, table-32768(SP)(R11*2)
+ // XXX: 66 42 89 44 5c 78 mov %ax,0x78(%rsp,%r11,2)
+ BYTE $0x66
+ BYTE $0x42
+ BYTE $0x89
+ BYTE $0x44
+ BYTE $0x5c
+ BYTE $0x78
+
+ // currHash := hash(uint32(x>>8), shift)
+ SHRQ $8, R14
+ MOVL R14, R11
+ IMULL $0x1e35a7bd, R11
+ SHRL CX, R11
+
+ // candidate = int(table[currHash])
+ // XXX: MOVWQZX table-32768(SP)(R11*2), R15
+ // XXX: 4e 0f b7 7c 5c 78 movzwq 0x78(%rsp,%r11,2),%r15
+ BYTE $0x4e
+ BYTE $0x0f
+ BYTE $0xb7
+ BYTE $0x7c
+ BYTE $0x5c
+ BYTE $0x78
+
+ // table[currHash] = uint16(s)
+ ADDQ $1, AX
+
+ // XXX: MOVW AX, table-32768(SP)(R11*2)
+ // XXX: 66 42 89 44 5c 78 mov %ax,0x78(%rsp,%r11,2)
+ BYTE $0x66
+ BYTE $0x42
+ BYTE $0x89
+ BYTE $0x44
+ BYTE $0x5c
+ BYTE $0x78
+
+ // if uint32(x>>8) == load32(src, candidate) { continue }
+ MOVL (DX)(R15*1), BX
+ CMPL R14, BX
+ JEQ inner1
+
+ // nextHash = hash(uint32(x>>16), shift)
+ SHRQ $8, R14
+ MOVL R14, R11
+ IMULL $0x1e35a7bd, R11
+ SHRL CX, R11
+
+ // s++
+ ADDQ $1, SI
+
+ // break out of the inner1 for loop, i.e. continue the outer loop.
+ JMP outer
+
+emitRemainder:
+ // if nextEmit < len(src) { etc }
+ MOVQ src_len+32(FP), AX
+ ADDQ DX, AX
+ CMPQ R10, AX
+ JEQ encodeBlockEnd
+
+ // d += emitLiteral(dst[d:], src[nextEmit:])
+ //
+ // Push args.
+ MOVQ DI, 0(SP)
+ MOVQ $0, 8(SP) // Unnecessary, as the callee ignores it, but conservative.
+ MOVQ $0, 16(SP) // Unnecessary, as the callee ignores it, but conservative.
+ MOVQ R10, 24(SP)
+ SUBQ R10, AX
+ MOVQ AX, 32(SP)
+ MOVQ AX, 40(SP) // Unnecessary, as the callee ignores it, but conservative.
+
+ // Spill local variables (registers) onto the stack; call; unspill.
+ MOVQ DI, 80(SP)
+ CALL ·emitLiteral(SB)
+ MOVQ 80(SP), DI
+
+ // Finish the "d +=" part of "d += emitLiteral(etc)".
+ ADDQ 48(SP), DI
+
+encodeBlockEnd:
+ MOVQ dst_base+0(FP), AX
+ SUBQ AX, DI
+ MOVQ DI, d+48(FP)
+ RET
diff --git a/vendor/github.com/golang/snappy/encode_other.go b/vendor/github.com/golang/snappy/encode_other.go
new file mode 100644
index 000000000..dbcae905e
--- /dev/null
+++ b/vendor/github.com/golang/snappy/encode_other.go
@@ -0,0 +1,238 @@
+// Copyright 2016 The Snappy-Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build !amd64 appengine !gc noasm
+
+package snappy
+
+func load32(b []byte, i int) uint32 {
+ b = b[i : i+4 : len(b)] // Help the compiler eliminate bounds checks on the next line.
+ return uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24
+}
+
+func load64(b []byte, i int) uint64 {
+ b = b[i : i+8 : len(b)] // Help the compiler eliminate bounds checks on the next line.
+ return uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 |
+ uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56
+}
+
+// emitLiteral writes a literal chunk and returns the number of bytes written.
+//
+// It assumes that:
+// dst is long enough to hold the encoded bytes
+// 1 <= len(lit) && len(lit) <= 65536
+func emitLiteral(dst, lit []byte) int {
+ i, n := 0, uint(len(lit)-1)
+ switch {
+ case n < 60:
+ dst[0] = uint8(n)<<2 | tagLiteral
+ i = 1
+ case n < 1<<8:
+ dst[0] = 60<<2 | tagLiteral
+ dst[1] = uint8(n)
+ i = 2
+ default:
+ dst[0] = 61<<2 | tagLiteral
+ dst[1] = uint8(n)
+ dst[2] = uint8(n >> 8)
+ i = 3
+ }
+ return i + copy(dst[i:], lit)
+}
+
+// emitCopy writes a copy chunk and returns the number of bytes written.
+//
+// It assumes that:
+// dst is long enough to hold the encoded bytes
+// 1 <= offset && offset <= 65535
+// 4 <= length && length <= 65535
+func emitCopy(dst []byte, offset, length int) int {
+ i := 0
+ // The maximum length for a single tagCopy1 or tagCopy2 op is 64 bytes. The
+ // threshold for this loop is a little higher (at 68 = 64 + 4), and the
+ // length emitted down below is is a little lower (at 60 = 64 - 4), because
+ // it's shorter to encode a length 67 copy as a length 60 tagCopy2 followed
+ // by a length 7 tagCopy1 (which encodes as 3+2 bytes) than to encode it as
+ // a length 64 tagCopy2 followed by a length 3 tagCopy2 (which encodes as
+ // 3+3 bytes). The magic 4 in the 64±4 is because the minimum length for a
+ // tagCopy1 op is 4 bytes, which is why a length 3 copy has to be an
+ // encodes-as-3-bytes tagCopy2 instead of an encodes-as-2-bytes tagCopy1.
+ for length >= 68 {
+ // Emit a length 64 copy, encoded as 3 bytes.
+ dst[i+0] = 63<<2 | tagCopy2
+ dst[i+1] = uint8(offset)
+ dst[i+2] = uint8(offset >> 8)
+ i += 3
+ length -= 64
+ }
+ if length > 64 {
+ // Emit a length 60 copy, encoded as 3 bytes.
+ dst[i+0] = 59<<2 | tagCopy2
+ dst[i+1] = uint8(offset)
+ dst[i+2] = uint8(offset >> 8)
+ i += 3
+ length -= 60
+ }
+ if length >= 12 || offset >= 2048 {
+ // Emit the remaining copy, encoded as 3 bytes.
+ dst[i+0] = uint8(length-1)<<2 | tagCopy2
+ dst[i+1] = uint8(offset)
+ dst[i+2] = uint8(offset >> 8)
+ return i + 3
+ }
+ // Emit the remaining copy, encoded as 2 bytes.
+ dst[i+0] = uint8(offset>>8)<<5 | uint8(length-4)<<2 | tagCopy1
+ dst[i+1] = uint8(offset)
+ return i + 2
+}
+
+// extendMatch returns the largest k such that k <= len(src) and that
+// src[i:i+k-j] and src[j:k] have the same contents.
+//
+// It assumes that:
+// 0 <= i && i < j && j <= len(src)
+func extendMatch(src []byte, i, j int) int {
+ for ; j < len(src) && src[i] == src[j]; i, j = i+1, j+1 {
+ }
+ return j
+}
+
+func hash(u, shift uint32) uint32 {
+ return (u * 0x1e35a7bd) >> shift
+}
+
+// encodeBlock encodes a non-empty src to a guaranteed-large-enough dst. It
+// assumes that the varint-encoded length of the decompressed bytes has already
+// been written.
+//
+// It also assumes that:
+// len(dst) >= MaxEncodedLen(len(src)) &&
+// minNonLiteralBlockSize <= len(src) && len(src) <= maxBlockSize
+func encodeBlock(dst, src []byte) (d int) {
+ // Initialize the hash table. Its size ranges from 1<<8 to 1<<14 inclusive.
+ // The table element type is uint16, as s < sLimit and sLimit < len(src)
+ // and len(src) <= maxBlockSize and maxBlockSize == 65536.
+ const (
+ maxTableSize = 1 << 14
+ // tableMask is redundant, but helps the compiler eliminate bounds
+ // checks.
+ tableMask = maxTableSize - 1
+ )
+ shift := uint32(32 - 8)
+ for tableSize := 1 << 8; tableSize < maxTableSize && tableSize < len(src); tableSize *= 2 {
+ shift--
+ }
+ // In Go, all array elements are zero-initialized, so there is no advantage
+ // to a smaller tableSize per se. However, it matches the C++ algorithm,
+ // and in the asm versions of this code, we can get away with zeroing only
+ // the first tableSize elements.
+ var table [maxTableSize]uint16
+
+ // sLimit is when to stop looking for offset/length copies. The inputMargin
+ // lets us use a fast path for emitLiteral in the main loop, while we are
+ // looking for copies.
+ sLimit := len(src) - inputMargin
+
+ // nextEmit is where in src the next emitLiteral should start from.
+ nextEmit := 0
+
+ // The encoded form must start with a literal, as there are no previous
+ // bytes to copy, so we start looking for hash matches at s == 1.
+ s := 1
+ nextHash := hash(load32(src, s), shift)
+
+ for {
+ // Copied from the C++ snappy implementation:
+ //
+ // Heuristic match skipping: If 32 bytes are scanned with no matches
+ // found, start looking only at every other byte. If 32 more bytes are
+ // scanned (or skipped), look at every third byte, etc.. When a match
+ // is found, immediately go back to looking at every byte. This is a
+ // small loss (~5% performance, ~0.1% density) for compressible data
+ // due to more bookkeeping, but for non-compressible data (such as
+ // JPEG) it's a huge win since the compressor quickly "realizes" the
+ // data is incompressible and doesn't bother looking for matches
+ // everywhere.
+ //
+ // The "skip" variable keeps track of how many bytes there are since
+ // the last match; dividing it by 32 (ie. right-shifting by five) gives
+ // the number of bytes to move ahead for each iteration.
+ skip := 32
+
+ nextS := s
+ candidate := 0
+ for {
+ s = nextS
+ bytesBetweenHashLookups := skip >> 5
+ nextS = s + bytesBetweenHashLookups
+ skip += bytesBetweenHashLookups
+ if nextS > sLimit {
+ goto emitRemainder
+ }
+ candidate = int(table[nextHash&tableMask])
+ table[nextHash&tableMask] = uint16(s)
+ nextHash = hash(load32(src, nextS), shift)
+ if load32(src, s) == load32(src, candidate) {
+ break
+ }
+ }
+
+ // A 4-byte match has been found. We'll later see if more than 4 bytes
+ // match. But, prior to the match, src[nextEmit:s] are unmatched. Emit
+ // them as literal bytes.
+ d += emitLiteral(dst[d:], src[nextEmit:s])
+
+ // Call emitCopy, and then see if another emitCopy could be our next
+ // move. Repeat until we find no match for the input immediately after
+ // what was consumed by the last emitCopy call.
+ //
+ // If we exit this loop normally then we need to call emitLiteral next,
+ // though we don't yet know how big the literal will be. We handle that
+ // by proceeding to the next iteration of the main loop. We also can
+ // exit this loop via goto if we get close to exhausting the input.
+ for {
+ // Invariant: we have a 4-byte match at s, and no need to emit any
+ // literal bytes prior to s.
+ base := s
+
+ // Extend the 4-byte match as long as possible.
+ //
+ // This is an inlined version of:
+ // s = extendMatch(src, candidate+4, s+4)
+ s += 4
+ for i := candidate + 4; s < len(src) && src[i] == src[s]; i, s = i+1, s+1 {
+ }
+
+ d += emitCopy(dst[d:], base-candidate, s-base)
+ nextEmit = s
+ if s >= sLimit {
+ goto emitRemainder
+ }
+
+ // We could immediately start working at s now, but to improve
+ // compression we first update the hash table at s-1 and at s. If
+ // another emitCopy is not our next move, also calculate nextHash
+ // at s+1. At least on GOARCH=amd64, these three hash calculations
+ // are faster as one load64 call (with some shifts) instead of
+ // three load32 calls.
+ x := load64(src, s-1)
+ prevHash := hash(uint32(x>>0), shift)
+ table[prevHash&tableMask] = uint16(s - 1)
+ currHash := hash(uint32(x>>8), shift)
+ candidate = int(table[currHash&tableMask])
+ table[currHash&tableMask] = uint16(s)
+ if uint32(x>>8) != load32(src, candidate) {
+ nextHash = hash(uint32(x>>16), shift)
+ s++
+ break
+ }
+ }
+ }
+
+emitRemainder:
+ if nextEmit < len(src) {
+ d += emitLiteral(dst[d:], src[nextEmit:])
+ }
+ return d
+}
diff --git a/Godeps/_workspace/src/github.com/golang/snappy/snappy.go b/vendor/github.com/golang/snappy/snappy.go
index ef1e33e00..0cf5e379c 100644
--- a/Godeps/_workspace/src/github.com/golang/snappy/snappy.go
+++ b/vendor/github.com/golang/snappy/snappy.go
@@ -6,7 +6,7 @@
// It aims for very high speeds and reasonable compression.
//
// The C++ snappy implementation is at https://github.com/google/snappy
-package snappy
+package snappy // import "github.com/golang/snappy"
import (
"hash/crc32"
@@ -32,7 +32,10 @@ Lempel-Ziv compression algorithms. In particular:
- For l == 2, the offset ranges in [0, 1<<16) and the length in [1, 65).
The length is 1 + m. The offset is the little-endian unsigned integer
denoted by the next 2 bytes.
- - For l == 3, this tag is a legacy format that is no longer supported.
+ - For l == 3, this tag is a legacy format that is no longer issued by most
+ encoders. Nonetheless, the offset ranges in [0, 1<<32) and the length in
+ [1, 65). The length is 1 + m. The offset is the little-endian unsigned
+ integer denoted by the next 4 bytes.
*/
const (
tagLiteral = 0x00
@@ -46,18 +49,25 @@ const (
chunkHeaderSize = 4
magicChunk = "\xff\x06\x00\x00" + magicBody
magicBody = "sNaPpY"
+
+ // maxBlockSize is the maximum size of the input to encodeBlock. It is not
+ // part of the wire format per se, but some parts of the encoder assume
+ // that an offset fits into a uint16.
+ //
+ // Also, for the framing format (Writer type instead of Encode function),
// https://github.com/google/snappy/blob/master/framing_format.txt says
- // that "the uncompressed data in a chunk must be no longer than 65536 bytes".
- maxUncompressedChunkLen = 65536
+ // that "the uncompressed data in a chunk must be no longer than 65536
+ // bytes".
+ maxBlockSize = 65536
- // maxEncodedLenOfMaxUncompressedChunkLen equals
- // MaxEncodedLen(maxUncompressedChunkLen), but is hard coded to be a const
- // instead of a variable, so that obufLen can also be a const. Their
- // equivalence is confirmed by TestMaxEncodedLenOfMaxUncompressedChunkLen.
- maxEncodedLenOfMaxUncompressedChunkLen = 76490
+ // maxEncodedLenOfMaxBlockSize equals MaxEncodedLen(maxBlockSize), but is
+ // hard coded to be a const instead of a variable, so that obufLen can also
+ // be a const. Their equivalence is confirmed by
+ // TestMaxEncodedLenOfMaxBlockSize.
+ maxEncodedLenOfMaxBlockSize = 76490
obufHeaderLen = len(magicChunk) + checksumSize + chunkHeaderSize
- obufLen = obufHeaderLen + maxEncodedLenOfMaxUncompressedChunkLen
+ obufLen = obufHeaderLen + maxEncodedLenOfMaxBlockSize
)
const (
diff --git a/Godeps/_workspace/src/github.com/hashicorp/golang-lru/.gitignore b/vendor/github.com/hashicorp/golang-lru/.gitignore
index 836562412..836562412 100644
--- a/Godeps/_workspace/src/github.com/hashicorp/golang-lru/.gitignore
+++ b/vendor/github.com/hashicorp/golang-lru/.gitignore
diff --git a/Godeps/_workspace/src/github.com/hashicorp/golang-lru/2q.go b/vendor/github.com/hashicorp/golang-lru/2q.go
index 337d96329..337d96329 100644
--- a/Godeps/_workspace/src/github.com/hashicorp/golang-lru/2q.go
+++ b/vendor/github.com/hashicorp/golang-lru/2q.go
diff --git a/Godeps/_workspace/src/github.com/hashicorp/golang-lru/LICENSE b/vendor/github.com/hashicorp/golang-lru/LICENSE
index be2cc4dfb..be2cc4dfb 100644
--- a/Godeps/_workspace/src/github.com/hashicorp/golang-lru/LICENSE
+++ b/vendor/github.com/hashicorp/golang-lru/LICENSE
diff --git a/Godeps/_workspace/src/github.com/hashicorp/golang-lru/README.md b/vendor/github.com/hashicorp/golang-lru/README.md
index 33e58cfaf..33e58cfaf 100644
--- a/Godeps/_workspace/src/github.com/hashicorp/golang-lru/README.md
+++ b/vendor/github.com/hashicorp/golang-lru/README.md
diff --git a/Godeps/_workspace/src/github.com/hashicorp/golang-lru/arc.go b/vendor/github.com/hashicorp/golang-lru/arc.go
index a2a252817..a2a252817 100644
--- a/Godeps/_workspace/src/github.com/hashicorp/golang-lru/arc.go
+++ b/vendor/github.com/hashicorp/golang-lru/arc.go
diff --git a/Godeps/_workspace/src/github.com/hashicorp/golang-lru/lru.go b/vendor/github.com/hashicorp/golang-lru/lru.go
index a6285f989..a6285f989 100644
--- a/Godeps/_workspace/src/github.com/hashicorp/golang-lru/lru.go
+++ b/vendor/github.com/hashicorp/golang-lru/lru.go
diff --git a/Godeps/_workspace/src/github.com/hashicorp/golang-lru/simplelru/lru.go b/vendor/github.com/hashicorp/golang-lru/simplelru/lru.go
index 68d097a1c..cb416b394 100644
--- a/Godeps/_workspace/src/github.com/hashicorp/golang-lru/simplelru/lru.go
+++ b/vendor/github.com/hashicorp/golang-lru/simplelru/lru.go
@@ -47,7 +47,7 @@ func (c *LRU) Purge() {
c.evictList.Init()
}
-// Add adds a value to the cache. Returns true if an eviction occured.
+// Add adds a value to the cache. Returns true if an eviction occurred.
func (c *LRU) Add(key, value interface{}) bool {
// Check for existing item
if ent, ok := c.items[key]; ok {
diff --git a/Godeps/_workspace/src/github.com/huin/goupnp/.gitignore b/vendor/github.com/huin/goupnp/.gitignore
index 09ef375e8..09ef375e8 100644
--- a/Godeps/_workspace/src/github.com/huin/goupnp/.gitignore
+++ b/vendor/github.com/huin/goupnp/.gitignore
diff --git a/Godeps/_workspace/src/github.com/huin/goupnp/LICENSE b/vendor/github.com/huin/goupnp/LICENSE
index 252e3d639..252e3d639 100644
--- a/Godeps/_workspace/src/github.com/huin/goupnp/LICENSE
+++ b/vendor/github.com/huin/goupnp/LICENSE
diff --git a/Godeps/_workspace/src/github.com/huin/goupnp/README.md b/vendor/github.com/huin/goupnp/README.md
index a228ccea6..a228ccea6 100644
--- a/Godeps/_workspace/src/github.com/huin/goupnp/README.md
+++ b/vendor/github.com/huin/goupnp/README.md
diff --git a/Godeps/_workspace/src/github.com/huin/goupnp/dcps/internetgateway1/internetgateway1.go b/vendor/github.com/huin/goupnp/dcps/internetgateway1/internetgateway1.go
index 1e0802cd4..1e0802cd4 100644
--- a/Godeps/_workspace/src/github.com/huin/goupnp/dcps/internetgateway1/internetgateway1.go
+++ b/vendor/github.com/huin/goupnp/dcps/internetgateway1/internetgateway1.go
diff --git a/Godeps/_workspace/src/github.com/huin/goupnp/dcps/internetgateway2/internetgateway2.go b/vendor/github.com/huin/goupnp/dcps/internetgateway2/internetgateway2.go
index 2d67a4a2e..2d67a4a2e 100644
--- a/Godeps/_workspace/src/github.com/huin/goupnp/dcps/internetgateway2/internetgateway2.go
+++ b/vendor/github.com/huin/goupnp/dcps/internetgateway2/internetgateway2.go
diff --git a/Godeps/_workspace/src/github.com/huin/goupnp/device.go b/vendor/github.com/huin/goupnp/device.go
index e5b658b21..e5b658b21 100644
--- a/Godeps/_workspace/src/github.com/huin/goupnp/device.go
+++ b/vendor/github.com/huin/goupnp/device.go
diff --git a/Godeps/_workspace/src/github.com/huin/goupnp/goupnp.go b/vendor/github.com/huin/goupnp/goupnp.go
index fcb8dcd23..fcb8dcd23 100644
--- a/Godeps/_workspace/src/github.com/huin/goupnp/goupnp.go
+++ b/vendor/github.com/huin/goupnp/goupnp.go
diff --git a/Godeps/_workspace/src/github.com/huin/goupnp/httpu/httpu.go b/vendor/github.com/huin/goupnp/httpu/httpu.go
index 862c3def4..f52dad68b 100644
--- a/Godeps/_workspace/src/github.com/huin/goupnp/httpu/httpu.go
+++ b/vendor/github.com/huin/goupnp/httpu/httpu.go
@@ -3,6 +3,7 @@ package httpu
import (
"bufio"
"bytes"
+ "errors"
"fmt"
"log"
"net"
@@ -28,6 +29,20 @@ func NewHTTPUClient() (*HTTPUClient, error) {
return &HTTPUClient{conn: conn}, nil
}
+// NewHTTPUClientAddr creates a new HTTPUClient which will broadcast packets
+// from the specified address, opening up a new UDP socket for the purpose
+func NewHTTPUClientAddr(addr string) (*HTTPUClient, error) {
+ ip := net.ParseIP(addr)
+ if ip == nil {
+ return nil, errors.New("Invalid listening address")
+ }
+ conn, err := net.ListenPacket("udp", ip.String()+":0")
+ if err != nil {
+ return nil, err
+ }
+ return &HTTPUClient{conn: conn}, nil
+}
+
// Close shuts down the client. The client will no longer be useful following
// this.
func (httpu *HTTPUClient) Close() error {
diff --git a/Godeps/_workspace/src/github.com/huin/goupnp/httpu/serve.go b/vendor/github.com/huin/goupnp/httpu/serve.go
index 9f67af85b..9f67af85b 100644
--- a/Godeps/_workspace/src/github.com/huin/goupnp/httpu/serve.go
+++ b/vendor/github.com/huin/goupnp/httpu/serve.go
diff --git a/Godeps/_workspace/src/github.com/huin/goupnp/scpd/scpd.go b/vendor/github.com/huin/goupnp/scpd/scpd.go
index c9d2e69e8..c9d2e69e8 100644
--- a/Godeps/_workspace/src/github.com/huin/goupnp/scpd/scpd.go
+++ b/vendor/github.com/huin/goupnp/scpd/scpd.go
diff --git a/Godeps/_workspace/src/github.com/huin/goupnp/service_client.go b/vendor/github.com/huin/goupnp/service_client.go
index 9111c93cb..9111c93cb 100644
--- a/Godeps/_workspace/src/github.com/huin/goupnp/service_client.go
+++ b/vendor/github.com/huin/goupnp/service_client.go
diff --git a/Godeps/_workspace/src/github.com/huin/goupnp/soap/soap.go b/vendor/github.com/huin/goupnp/soap/soap.go
index 815610734..815610734 100644
--- a/Godeps/_workspace/src/github.com/huin/goupnp/soap/soap.go
+++ b/vendor/github.com/huin/goupnp/soap/soap.go
diff --git a/Godeps/_workspace/src/github.com/huin/goupnp/soap/types.go b/vendor/github.com/huin/goupnp/soap/types.go
index fdbeec8d4..fdbeec8d4 100644
--- a/Godeps/_workspace/src/github.com/huin/goupnp/soap/types.go
+++ b/vendor/github.com/huin/goupnp/soap/types.go
diff --git a/Godeps/_workspace/src/github.com/huin/goupnp/ssdp/registry.go b/vendor/github.com/huin/goupnp/ssdp/registry.go
index 2f84beaae..2f84beaae 100644
--- a/Godeps/_workspace/src/github.com/huin/goupnp/ssdp/registry.go
+++ b/vendor/github.com/huin/goupnp/ssdp/registry.go
diff --git a/Godeps/_workspace/src/github.com/huin/goupnp/ssdp/ssdp.go b/vendor/github.com/huin/goupnp/ssdp/ssdp.go
index 8178f5d94..8178f5d94 100644
--- a/Godeps/_workspace/src/github.com/huin/goupnp/ssdp/ssdp.go
+++ b/vendor/github.com/huin/goupnp/ssdp/ssdp.go
diff --git a/vendor/github.com/jackpal/go-nat-pmp/.travis.yml b/vendor/github.com/jackpal/go-nat-pmp/.travis.yml
new file mode 100644
index 000000000..9c3f6547d
--- /dev/null
+++ b/vendor/github.com/jackpal/go-nat-pmp/.travis.yml
@@ -0,0 +1,13 @@
+language: go
+
+go:
+ - 1.6.2
+ - tip
+
+allowed_failures:
+ - go: tip
+
+install:
+ - go get -d -v ./... && go install -race -v ./...
+
+script: go test -race -v ./...
diff --git a/Godeps/_workspace/src/github.com/jackpal/go-nat-pmp/LICENSE b/vendor/github.com/jackpal/go-nat-pmp/LICENSE
index 249514b0f..249514b0f 100644
--- a/Godeps/_workspace/src/github.com/jackpal/go-nat-pmp/LICENSE
+++ b/vendor/github.com/jackpal/go-nat-pmp/LICENSE
diff --git a/Godeps/_workspace/src/github.com/jackpal/go-nat-pmp/README.md b/vendor/github.com/jackpal/go-nat-pmp/README.md
index 15f72fd81..3ca687f0b 100644
--- a/Godeps/_workspace/src/github.com/jackpal/go-nat-pmp/README.md
+++ b/vendor/github.com/jackpal/go-nat-pmp/README.md
@@ -8,6 +8,9 @@ NAT-PMP is supported by Apple brand routers and open source routers like Tomato
See http://tools.ietf.org/html/draft-cheshire-nat-pmp-03
+
+[![Build Status](https://travis-ci.org/jackpal/go-nat-pmp.svg)](https://travis-ci.org/jackpal/go-nat-pmp)
+
Get the package
---------------
@@ -16,7 +19,15 @@ Get the package
Usage
-----
- import natpmp "github.com/jackpal/go-nat-pmp"
+ import (
+ "github.com/jackpal/gateway"
+ natpmp "github.com/jackpal/go-nat-pmp"
+ )
+
+ gatewayIP, err = gateway.DiscoverGateway()
+ if err != nil {
+ return
+ }
client := natpmp.NewClient(gatewayIP)
response, err := client.GetExternalAddress()
@@ -25,13 +36,6 @@ Usage
}
print("External IP address:", response.ExternalIPAddress)
-Notes
------
-
-There doesn't seem to be an easy way to programmatically determine the address of the default gateway.
-(Linux and OSX have a "routes" kernel API that can be examined to get this information, but there is
-no Go package for getting this information.)
-
Clients
-------
diff --git a/Godeps/_workspace/src/github.com/jackpal/go-nat-pmp/natpmp.go b/vendor/github.com/jackpal/go-nat-pmp/natpmp.go
index 7d9fb604e..5ca7680e4 100644
--- a/Godeps/_workspace/src/github.com/jackpal/go-nat-pmp/natpmp.go
+++ b/vendor/github.com/jackpal/go-nat-pmp/natpmp.go
@@ -2,8 +2,6 @@ package natpmp
import (
"fmt"
- "github.com/jackpal/gateway"
- "log"
"net"
"time"
)
@@ -18,37 +16,33 @@ import (
// client := natpmp.NewClient(gatewayIP)
// response, err := client.GetExternalAddress()
-const nAT_PMP_PORT = 5351
-
-const nAT_TRIES = 9
-
-const nAT_INITIAL_MS = 250
-
// The recommended mapping lifetime for AddPortMapping
const RECOMMENDED_MAPPING_LIFETIME_SECONDS = 3600
+// Interface used to make remote procedure calls.
+type caller interface {
+ call(msg []byte, timeout time.Duration) (result []byte, err error)
+}
+
// Client is a NAT-PMP protocol client.
type Client struct {
- gateway net.IP
+ caller caller
+ timeout time.Duration
}
// Create a NAT-PMP client for the NAT-PMP server at the gateway.
+// Uses default timeout which is around 128 seconds.
func NewClient(gateway net.IP) (nat *Client) {
- return &Client{gateway}
+ return &Client{&network{gateway}, 0}
}
-// Create a NAT-PMP client for the NAT-PMP server at the default gateway.
-func NewClientForDefaultGateway() (nat *Client, err error) {
- var g net.IP
- g, err = gateway.DiscoverGateway()
- if err != nil {
- return
- }
- nat = NewClient(g)
- return
+// Create a NAT-PMP client for the NAT-PMP server at the gateway, with a timeout.
+// Timeout defines the total amount of time we will keep retrying before giving up.
+func NewClientWithTimeout(gateway net.IP, timeout time.Duration) (nat *Client) {
+ return &Client{&network{gateway}, timeout}
}
-// Results of the NAT-PMP GetExternalAddress operation
+// Results of the NAT-PMP GetExternalAddress operation.
type GetExternalAddressResult struct {
SecondsSinceStartOfEpoc uint32
ExternalIPAddress [4]byte
@@ -107,71 +101,34 @@ func (n *Client) AddPortMapping(protocol string, internalPort, requestedExternal
}
func (n *Client) rpc(msg []byte, resultSize int) (result []byte, err error) {
- var server net.UDPAddr
- server.IP = n.gateway
- server.Port = nAT_PMP_PORT
- conn, err := net.DialUDP("udp", nil, &server)
+ result, err = n.caller.call(msg, n.timeout)
if err != nil {
return
}
- defer conn.Close()
-
- result = make([]byte, resultSize)
-
- needNewDeadline := true
-
- var tries uint
- for tries = 0; tries < nAT_TRIES; {
- if needNewDeadline {
- err = conn.SetDeadline(time.Now().Add((nAT_INITIAL_MS << tries) * time.Millisecond))
- if err != nil {
- return
- }
- needNewDeadline = false
- }
- _, err = conn.Write(msg)
- if err != nil {
- return
- }
- var bytesRead int
- var remoteAddr *net.UDPAddr
- bytesRead, remoteAddr, err = conn.ReadFromUDP(result)
- if err != nil {
- if err.(net.Error).Timeout() {
- tries++
- needNewDeadline = true
- continue
- }
- return
- }
- if !remoteAddr.IP.Equal(n.gateway) {
- log.Printf("Ignoring packet because IPs differ:", remoteAddr, n.gateway)
- // Ignore this packet.
- // Continue without increasing retransmission timeout or deadline.
- continue
- }
- if bytesRead != resultSize {
- err = fmt.Errorf("unexpected result size %d, expected %d", bytesRead, resultSize)
- return
- }
- if result[0] != 0 {
- err = fmt.Errorf("unknown protocol version %d", result[0])
- return
- }
- expectedOp := msg[1] | 0x80
- if result[1] != expectedOp {
- err = fmt.Errorf("Unexpected opcode %d. Expected %d", result[1], expectedOp)
- return
- }
- resultCode := readNetworkOrderUint16(result[2:4])
- if resultCode != 0 {
- err = fmt.Errorf("Non-zero result code %d", resultCode)
- return
- }
- // If we got here the RPC is good.
+ err = protocolChecks(msg, resultSize, result)
+ return
+}
+
+func protocolChecks(msg []byte, resultSize int, result []byte) (err error) {
+ if len(result) != resultSize {
+ err = fmt.Errorf("unexpected result size %d, expected %d", len(result), resultSize)
+ return
+ }
+ if result[0] != 0 {
+ err = fmt.Errorf("unknown protocol version %d", result[0])
+ return
+ }
+ expectedOp := msg[1] | 0x80
+ if result[1] != expectedOp {
+ err = fmt.Errorf("Unexpected opcode %d. Expected %d", result[1], expectedOp)
+ return
+ }
+ resultCode := readNetworkOrderUint16(result[2:4])
+ if resultCode != 0 {
+ err = fmt.Errorf("Non-zero result code %d", resultCode)
return
}
- err = fmt.Errorf("Timed out trying to contact gateway")
+ // If we got here the RPC is good.
return
}
diff --git a/vendor/github.com/jackpal/go-nat-pmp/network.go b/vendor/github.com/jackpal/go-nat-pmp/network.go
new file mode 100644
index 000000000..c42b4fee9
--- /dev/null
+++ b/vendor/github.com/jackpal/go-nat-pmp/network.go
@@ -0,0 +1,89 @@
+package natpmp
+
+import (
+ "fmt"
+ "net"
+ "time"
+)
+
+const nAT_PMP_PORT = 5351
+const nAT_TRIES = 9
+const nAT_INITIAL_MS = 250
+
+// A caller that implements the NAT-PMP RPC protocol.
+type network struct {
+ gateway net.IP
+}
+
+func (n *network) call(msg []byte, timeout time.Duration) (result []byte, err error) {
+ var server net.UDPAddr
+ server.IP = n.gateway
+ server.Port = nAT_PMP_PORT
+ conn, err := net.DialUDP("udp", nil, &server)
+ if err != nil {
+ return
+ }
+ defer conn.Close()
+
+ // 16 bytes is the maximum result size.
+ result = make([]byte, 16)
+
+ var finalTimeout time.Time
+ if timeout != 0 {
+ finalTimeout = time.Now().Add(timeout)
+ }
+
+ needNewDeadline := true
+
+ var tries uint
+ for tries = 0; (tries < nAT_TRIES && finalTimeout.IsZero()) || time.Now().Before(finalTimeout); {
+ if needNewDeadline {
+ nextDeadline := time.Now().Add((nAT_INITIAL_MS << tries) * time.Millisecond)
+ err = conn.SetDeadline(minTime(nextDeadline, finalTimeout))
+ if err != nil {
+ return
+ }
+ needNewDeadline = false
+ }
+ _, err = conn.Write(msg)
+ if err != nil {
+ return
+ }
+ var bytesRead int
+ var remoteAddr *net.UDPAddr
+ bytesRead, remoteAddr, err = conn.ReadFromUDP(result)
+ if err != nil {
+ if err.(net.Error).Timeout() {
+ tries++
+ needNewDeadline = true
+ continue
+ }
+ return
+ }
+ if !remoteAddr.IP.Equal(n.gateway) {
+ // Ignore this packet.
+ // Continue without increasing retransmission timeout or deadline.
+ continue
+ }
+ // Trim result to actual number of bytes received
+ if bytesRead < len(result) {
+ result = result[:bytesRead]
+ }
+ return
+ }
+ err = fmt.Errorf("Timed out trying to contact gateway")
+ return
+}
+
+func minTime(a, b time.Time) time.Time {
+ if a.IsZero() {
+ return b
+ }
+ if b.IsZero() {
+ return a
+ }
+ if a.Before(b) {
+ return a
+ }
+ return b
+}
diff --git a/vendor/github.com/jackpal/go-nat-pmp/recorder.go b/vendor/github.com/jackpal/go-nat-pmp/recorder.go
new file mode 100644
index 000000000..845703672
--- /dev/null
+++ b/vendor/github.com/jackpal/go-nat-pmp/recorder.go
@@ -0,0 +1,19 @@
+package natpmp
+
+import "time"
+
+type callObserver interface {
+ observeCall(msg []byte, result []byte, err error)
+}
+
+// A caller that records the RPC call.
+type recorder struct {
+ child caller
+ observer callObserver
+}
+
+func (n *recorder) call(msg []byte, timeout time.Duration) (result []byte, err error) {
+ result, err = n.child.call(msg, timeout)
+ n.observer.observeCall(msg, result, err)
+ return
+}
diff --git a/vendor/github.com/mattn/go-colorable/.travis.yml b/vendor/github.com/mattn/go-colorable/.travis.yml
new file mode 100644
index 000000000..42768b8bf
--- /dev/null
+++ b/vendor/github.com/mattn/go-colorable/.travis.yml
@@ -0,0 +1,8 @@
+language: go
+go:
+ - tip
+
+sudo: false
+
+script:
+ - go test -v
diff --git a/Godeps/_workspace/src/github.com/mattn/go-colorable/LICENSE b/vendor/github.com/mattn/go-colorable/LICENSE
index 91b5cef30..91b5cef30 100644
--- a/Godeps/_workspace/src/github.com/mattn/go-colorable/LICENSE
+++ b/vendor/github.com/mattn/go-colorable/LICENSE
diff --git a/Godeps/_workspace/src/github.com/mattn/go-colorable/README.md b/vendor/github.com/mattn/go-colorable/README.md
index e84226a73..e84226a73 100644
--- a/Godeps/_workspace/src/github.com/mattn/go-colorable/README.md
+++ b/vendor/github.com/mattn/go-colorable/README.md
diff --git a/Godeps/_workspace/src/github.com/mattn/go-colorable/colorable_others.go b/vendor/github.com/mattn/go-colorable/colorable_others.go
index 219f02f62..52d6653b3 100644
--- a/Godeps/_workspace/src/github.com/mattn/go-colorable/colorable_others.go
+++ b/vendor/github.com/mattn/go-colorable/colorable_others.go
@@ -7,6 +7,14 @@ import (
"os"
)
+func NewColorable(file *os.File) io.Writer {
+ if file == nil {
+ panic("nil passed instead of *os.File to NewColorable()")
+ }
+
+ return file
+}
+
func NewColorableStdout() io.Writer {
return os.Stdout
}
diff --git a/Godeps/_workspace/src/github.com/mattn/go-colorable/colorable_windows.go b/vendor/github.com/mattn/go-colorable/colorable_windows.go
index c551f7725..bc84adfaf 100644
--- a/Godeps/_workspace/src/github.com/mattn/go-colorable/colorable_windows.go
+++ b/vendor/github.com/mattn/go-colorable/colorable_windows.go
@@ -2,7 +2,6 @@ package colorable
import (
"bytes"
- "fmt"
"io"
"math"
"os"
@@ -52,6 +51,11 @@ type consoleScreenBufferInfo struct {
maximumWindowSize coord
}
+type consoleCursorInfo struct {
+ size dword
+ visible int32
+}
+
var (
kernel32 = syscall.NewLazyDLL("kernel32.dll")
procGetConsoleScreenBufferInfo = kernel32.NewProc("GetConsoleScreenBufferInfo")
@@ -59,6 +63,8 @@ var (
procSetConsoleCursorPosition = kernel32.NewProc("SetConsoleCursorPosition")
procFillConsoleOutputCharacter = kernel32.NewProc("FillConsoleOutputCharacterW")
procFillConsoleOutputAttribute = kernel32.NewProc("FillConsoleOutputAttribute")
+ procGetConsoleCursorInfo = kernel32.NewProc("GetConsoleCursorInfo")
+ procSetConsoleCursorInfo = kernel32.NewProc("SetConsoleCursorInfo")
)
type Writer struct {
@@ -68,26 +74,27 @@ type Writer struct {
oldattr word
}
-func NewColorableStdout() io.Writer {
- var csbi consoleScreenBufferInfo
- out := os.Stdout
- if !isatty.IsTerminal(out.Fd()) {
- return out
+func NewColorable(file *os.File) io.Writer {
+ if file == nil {
+ panic("nil passed instead of *os.File to NewColorable()")
+ }
+
+ if isatty.IsTerminal(file.Fd()) {
+ var csbi consoleScreenBufferInfo
+ handle := syscall.Handle(file.Fd())
+ procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi)))
+ return &Writer{out: file, handle: handle, oldattr: csbi.attributes}
+ } else {
+ return file
}
- handle := syscall.Handle(out.Fd())
- procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi)))
- return &Writer{out: out, handle: handle, oldattr: csbi.attributes}
+}
+
+func NewColorableStdout() io.Writer {
+ return NewColorable(os.Stdout)
}
func NewColorableStderr() io.Writer {
- var csbi consoleScreenBufferInfo
- out := os.Stderr
- if !isatty.IsTerminal(out.Fd()) {
- return out
- }
- handle := syscall.Handle(out.Fd())
- procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi)))
- return &Writer{out: out, handle: handle, oldattr: csbi.attributes}
+ return NewColorable(os.Stderr)
}
var color256 = map[int]int{
@@ -353,7 +360,8 @@ func (w *Writer) Write(data []byte) (n int, err error) {
var csbi consoleScreenBufferInfo
procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi)))
- er := bytes.NewBuffer(data)
+ er := bytes.NewReader(data)
+ var bw [1]byte
loop:
for {
r1, _, err := procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi)))
@@ -361,32 +369,33 @@ loop:
break loop
}
- c1, _, err := er.ReadRune()
+ c1, err := er.ReadByte()
if err != nil {
break loop
}
if c1 != 0x1b {
- fmt.Fprint(w.out, string(c1))
+ bw[0] = c1
+ w.out.Write(bw[:])
continue
}
- c2, _, err := er.ReadRune()
+ c2, err := er.ReadByte()
if err != nil {
- w.lastbuf.WriteRune(c1)
+ w.lastbuf.WriteByte(c1)
break loop
}
if c2 != 0x5b {
- w.lastbuf.WriteRune(c1)
- w.lastbuf.WriteRune(c2)
+ w.lastbuf.WriteByte(c1)
+ w.lastbuf.WriteByte(c2)
continue
}
var buf bytes.Buffer
- var m rune
+ var m byte
for {
- c, _, err := er.ReadRune()
+ c, err := er.ReadByte()
if err != nil {
- w.lastbuf.WriteRune(c1)
- w.lastbuf.WriteRune(c2)
+ w.lastbuf.WriteByte(c1)
+ w.lastbuf.WriteByte(c2)
w.lastbuf.Write(buf.Bytes())
break loop
}
@@ -458,7 +467,7 @@ loop:
continue
}
procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi)))
- csbi.cursorPosition.x = short(n)
+ csbi.cursorPosition.x = short(n - 1)
procSetConsoleCursorPosition.Call(uintptr(w.handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition)))
case 'H':
token := strings.Split(buf.String(), ";")
@@ -473,14 +482,15 @@ loop:
if err != nil {
continue
}
- csbi.cursorPosition.x = short(n2)
- csbi.cursorPosition.x = short(n1)
+ csbi.cursorPosition.x = short(n2 - 1)
+ csbi.cursorPosition.y = short(n1 - 1)
procSetConsoleCursorPosition.Call(uintptr(w.handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition)))
case 'J':
n, err := strconv.Atoi(buf.String())
if err != nil {
continue
}
+ procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi)))
var cursor coord
switch n {
case 0:
@@ -499,6 +509,7 @@ loop:
if err != nil {
continue
}
+ procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi)))
var cursor coord
switch n {
case 0:
@@ -513,6 +524,7 @@ loop:
procFillConsoleOutputCharacter.Call(uintptr(w.handle), uintptr(' '), uintptr(count), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written)))
procFillConsoleOutputAttribute.Call(uintptr(w.handle), uintptr(csbi.attributes), uintptr(count), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written)))
case 'm':
+ procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi)))
attr := csbi.attributes
cs := buf.String()
if cs == "" {
@@ -520,7 +532,7 @@ loop:
continue
}
token := strings.Split(cs, ";")
- for i := 0; i < len(token); i += 1 {
+ for i := 0; i < len(token); i++ {
ns := token[i]
if n, err = strconv.Atoi(ns); err == nil {
switch {
@@ -535,7 +547,7 @@ loop:
case n == 27:
attr = ((attr & foregroundMask) << 4) | ((attr & backgroundMask) >> 4)
case 30 <= n && n <= 37:
- attr = (attr & backgroundMask)
+ attr &= backgroundMask
if (n-30)&1 != 0 {
attr |= foregroundRed
}
@@ -562,7 +574,7 @@ loop:
attr &= backgroundMask
attr |= w.oldattr & foregroundMask
case 40 <= n && n <= 47:
- attr = (attr & foregroundMask)
+ attr &= foregroundMask
if (n-40)&1 != 0 {
attr |= backgroundRed
}
@@ -616,6 +628,22 @@ loop:
procSetConsoleTextAttribute.Call(uintptr(w.handle), uintptr(attr))
}
}
+ case 'h':
+ cs := buf.String()
+ if cs == "?25" {
+ var ci consoleCursorInfo
+ procGetConsoleCursorInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&ci)))
+ ci.visible = 1
+ procSetConsoleCursorInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&ci)))
+ }
+ case 'l':
+ cs := buf.String()
+ if cs == "?25" {
+ var ci consoleCursorInfo
+ procGetConsoleCursorInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&ci)))
+ ci.visible = 0
+ procSetConsoleCursorInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&ci)))
+ }
}
}
return len(data) - w.lastbuf.Len(), nil
diff --git a/vendor/github.com/mattn/go-colorable/noncolorable.go b/vendor/github.com/mattn/go-colorable/noncolorable.go
new file mode 100644
index 000000000..b60801dcd
--- /dev/null
+++ b/vendor/github.com/mattn/go-colorable/noncolorable.go
@@ -0,0 +1,58 @@
+package colorable
+
+import (
+ "bytes"
+ "io"
+)
+
+type NonColorable struct {
+ out io.Writer
+ lastbuf bytes.Buffer
+}
+
+func NewNonColorable(w io.Writer) io.Writer {
+ return &NonColorable{out: w}
+}
+
+func (w *NonColorable) Write(data []byte) (n int, err error) {
+ er := bytes.NewReader(data)
+ var bw [1]byte
+loop:
+ for {
+ c1, err := er.ReadByte()
+ if err != nil {
+ break loop
+ }
+ if c1 != 0x1b {
+ bw[0] = c1
+ w.out.Write(bw[:])
+ continue
+ }
+ c2, err := er.ReadByte()
+ if err != nil {
+ w.lastbuf.WriteByte(c1)
+ break loop
+ }
+ if c2 != 0x5b {
+ w.lastbuf.WriteByte(c1)
+ w.lastbuf.WriteByte(c2)
+ continue
+ }
+
+ var buf bytes.Buffer
+ for {
+ c, err := er.ReadByte()
+ if err != nil {
+ w.lastbuf.WriteByte(c1)
+ w.lastbuf.WriteByte(c2)
+ w.lastbuf.Write(buf.Bytes())
+ break loop
+ }
+ if ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || c == '@' {
+ break
+ }
+ buf.Write([]byte(string(c)))
+ }
+ }
+ return len(data) - w.lastbuf.Len(), nil
+}
diff --git a/Godeps/_workspace/src/github.com/mattn/go-isatty/LICENSE b/vendor/github.com/mattn/go-isatty/LICENSE
index 65dc692b6..65dc692b6 100644
--- a/Godeps/_workspace/src/github.com/mattn/go-isatty/LICENSE
+++ b/vendor/github.com/mattn/go-isatty/LICENSE
diff --git a/Godeps/_workspace/src/github.com/mattn/go-isatty/README.md b/vendor/github.com/mattn/go-isatty/README.md
index 74845de4a..74845de4a 100644
--- a/Godeps/_workspace/src/github.com/mattn/go-isatty/README.md
+++ b/vendor/github.com/mattn/go-isatty/README.md
diff --git a/Godeps/_workspace/src/github.com/mattn/go-isatty/doc.go b/vendor/github.com/mattn/go-isatty/doc.go
index 17d4f90eb..17d4f90eb 100644
--- a/Godeps/_workspace/src/github.com/mattn/go-isatty/doc.go
+++ b/vendor/github.com/mattn/go-isatty/doc.go
diff --git a/Godeps/_workspace/src/github.com/mattn/go-isatty/isatty_appengine.go b/vendor/github.com/mattn/go-isatty/isatty_appengine.go
index 83c588773..83c588773 100644
--- a/Godeps/_workspace/src/github.com/mattn/go-isatty/isatty_appengine.go
+++ b/vendor/github.com/mattn/go-isatty/isatty_appengine.go
diff --git a/Godeps/_workspace/src/github.com/mattn/go-isatty/isatty_bsd.go b/vendor/github.com/mattn/go-isatty/isatty_bsd.go
index 98ffe86a4..42f2514d1 100644
--- a/Godeps/_workspace/src/github.com/mattn/go-isatty/isatty_bsd.go
+++ b/vendor/github.com/mattn/go-isatty/isatty_bsd.go
@@ -1,4 +1,4 @@
-// +build darwin freebsd openbsd netbsd
+// +build darwin freebsd openbsd netbsd dragonfly
// +build !appengine
package isatty
diff --git a/Godeps/_workspace/src/github.com/mattn/go-isatty/isatty_linux.go b/vendor/github.com/mattn/go-isatty/isatty_linux.go
index 9d24bac1d..9d24bac1d 100644
--- a/Godeps/_workspace/src/github.com/mattn/go-isatty/isatty_linux.go
+++ b/vendor/github.com/mattn/go-isatty/isatty_linux.go
diff --git a/Godeps/_workspace/src/github.com/mattn/go-isatty/isatty_solaris.go b/vendor/github.com/mattn/go-isatty/isatty_solaris.go
index 1f0c6bf53..1f0c6bf53 100644
--- a/Godeps/_workspace/src/github.com/mattn/go-isatty/isatty_solaris.go
+++ b/vendor/github.com/mattn/go-isatty/isatty_solaris.go
diff --git a/Godeps/_workspace/src/github.com/mattn/go-isatty/isatty_windows.go b/vendor/github.com/mattn/go-isatty/isatty_windows.go
index 83c398b16..83c398b16 100644
--- a/Godeps/_workspace/src/github.com/mattn/go-isatty/isatty_windows.go
+++ b/vendor/github.com/mattn/go-isatty/isatty_windows.go
diff --git a/Godeps/_workspace/src/github.com/mattn/go-runewidth/.travis.yml b/vendor/github.com/mattn/go-runewidth/.travis.yml
index ad584f4da..5c9c2a30f 100644
--- a/Godeps/_workspace/src/github.com/mattn/go-runewidth/.travis.yml
+++ b/vendor/github.com/mattn/go-runewidth/.travis.yml
@@ -2,7 +2,6 @@ language: go
go:
- tip
before_install:
- - go get github.com/axw/gocov/gocov
- go get github.com/mattn/goveralls
- go get golang.org/x/tools/cmd/cover
script:
diff --git a/vendor/github.com/mattn/go-runewidth/LICENSE b/vendor/github.com/mattn/go-runewidth/LICENSE
new file mode 100644
index 000000000..91b5cef30
--- /dev/null
+++ b/vendor/github.com/mattn/go-runewidth/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 Yasuhiro Matsumoto
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/Godeps/_workspace/src/github.com/mattn/go-runewidth/README.mkd b/vendor/github.com/mattn/go-runewidth/README.mkd
index 4f0d583be..66663a94b 100644
--- a/Godeps/_workspace/src/github.com/mattn/go-runewidth/README.mkd
+++ b/vendor/github.com/mattn/go-runewidth/README.mkd
@@ -3,6 +3,8 @@ go-runewidth
[![Build Status](https://travis-ci.org/mattn/go-runewidth.png?branch=master)](https://travis-ci.org/mattn/go-runewidth)
[![Coverage Status](https://coveralls.io/repos/mattn/go-runewidth/badge.png?branch=HEAD)](https://coveralls.io/r/mattn/go-runewidth?branch=HEAD)
+[![GoDoc](https://godoc.org/github.com/mattn/go-runewidth?status.svg)](http://godoc.org/github.com/mattn/go-runewidth)
+[![Go Report Card](https://goreportcard.com/badge/github.com/mattn/go-runewidth)](https://goreportcard.com/report/github.com/mattn/go-runewidth)
Provides functions to get fixed width of the character or string.
diff --git a/Godeps/_workspace/src/github.com/mattn/go-runewidth/runewidth.go b/vendor/github.com/mattn/go-runewidth/runewidth.go
index 3fbf33d59..3e730656b 100644
--- a/Godeps/_workspace/src/github.com/mattn/go-runewidth/runewidth.go
+++ b/vendor/github.com/mattn/go-runewidth/runewidth.go
@@ -1,7 +1,12 @@
package runewidth
-var EastAsianWidth = IsEastAsian()
-var DefaultCondition = &Condition{EastAsianWidth}
+var (
+ // EastAsianWidth will be set true if the current locale is CJK
+ EastAsianWidth = IsEastAsian()
+
+ // DefaultCondition is a condition in current locale
+ DefaultCondition = &Condition{EastAsianWidth}
+)
type interval struct {
first rune
@@ -302,10 +307,12 @@ var ctypes = []intervalType{
{0x100000, 0x10FFFE, ambiguous},
}
+// Condition have flag EastAsianWidth whether the current locale is CJK or not.
type Condition struct {
EastAsianWidth bool
}
+// NewCondition return new instance of Condition which is current locale.
func NewCondition() *Condition {
return &Condition{EastAsianWidth}
}
@@ -344,6 +351,7 @@ func (c *Condition) RuneWidth(r rune) int {
return 1
}
+// StringWidth return width as you can see
func (c *Condition) StringWidth(s string) (width int) {
for _, r := range []rune(s) {
width += c.RuneWidth(r)
@@ -351,6 +359,7 @@ func (c *Condition) StringWidth(s string) (width int) {
return width
}
+// Truncate return string truncated with w cells
func (c *Condition) Truncate(s string, w int, tail string) string {
if c.StringWidth(s) <= w {
return s
@@ -370,6 +379,7 @@ func (c *Condition) Truncate(s string, w int, tail string) string {
return string(r[0:i]) + tail
}
+// Wrap return string wrapped with w cells
func (c *Condition) Wrap(s string, w int) string {
width := 0
out := ""
@@ -392,6 +402,7 @@ func (c *Condition) Wrap(s string, w int) string {
return out
}
+// FillLeft return string filled in left by spaces in w cells
func (c *Condition) FillLeft(s string, w int) string {
width := c.StringWidth(s)
count := w - width
@@ -405,6 +416,7 @@ func (c *Condition) FillLeft(s string, w int) string {
return s
}
+// FillRight return string filled in left by spaces in w cells
func (c *Condition) FillRight(s string, w int) string {
width := c.StringWidth(s)
count := w - width
@@ -438,27 +450,32 @@ func IsAmbiguousWidth(r rune) bool {
return ct(r) == ambiguous
}
-// IsAmbiguousWidth returns whether is ambiguous width or not.
+// IsNeutralWidth returns whether is neutral width or not.
func IsNeutralWidth(r rune) bool {
return ct(r) == neutral
}
+// StringWidth return width as you can see
func StringWidth(s string) (width int) {
return DefaultCondition.StringWidth(s)
}
+// Truncate return string truncated with w cells
func Truncate(s string, w int, tail string) string {
return DefaultCondition.Truncate(s, w, tail)
}
+// Wrap return string wrapped with w cells
func Wrap(s string, w int) string {
return DefaultCondition.Wrap(s, w)
}
+// FillLeft return string filled in left by spaces in w cells
func FillLeft(s string, w int) string {
return DefaultCondition.FillLeft(s, w)
}
+// FillRight return string filled in left by spaces in w cells
func FillRight(s string, w int) string {
return DefaultCondition.FillRight(s, w)
}
diff --git a/Godeps/_workspace/src/github.com/mattn/go-runewidth/runewidth_js.go b/vendor/github.com/mattn/go-runewidth/runewidth_js.go
index 0ce32c5e7..0ce32c5e7 100644
--- a/Godeps/_workspace/src/github.com/mattn/go-runewidth/runewidth_js.go
+++ b/vendor/github.com/mattn/go-runewidth/runewidth_js.go
diff --git a/Godeps/_workspace/src/github.com/mattn/go-runewidth/runewidth_posix.go b/vendor/github.com/mattn/go-runewidth/runewidth_posix.go
index a4495909d..c579e9a31 100644
--- a/Godeps/_workspace/src/github.com/mattn/go-runewidth/runewidth_posix.go
+++ b/vendor/github.com/mattn/go-runewidth/runewidth_posix.go
@@ -10,20 +10,25 @@ import (
var reLoc = regexp.MustCompile(`^[a-z][a-z][a-z]?(?:_[A-Z][A-Z])?\.(.+)`)
-func IsEastAsian() bool {
- locale := os.Getenv("LC_CTYPE")
- if locale == "" {
- locale = os.Getenv("LANG")
- }
-
- // ignore C locale
- if locale == "POSIX" || locale == "C" {
- return false
- }
- if len(locale) > 1 && locale[0] == 'C' && (locale[1] == '.' || locale[1] == '-') {
- return false
- }
+var mblenTable = map[string]int{
+ "utf-8": 6,
+ "utf8": 6,
+ "jis": 8,
+ "eucjp": 3,
+ "euckr": 2,
+ "euccn": 2,
+ "sjis": 2,
+ "cp932": 2,
+ "cp51932": 2,
+ "cp936": 2,
+ "cp949": 2,
+ "cp950": 2,
+ "big5": 2,
+ "gbk": 2,
+ "gb2312": 2,
+}
+func isEastAsian(locale string) bool {
charset := strings.ToLower(locale)
r := reLoc.FindStringSubmatch(locale)
if len(r) == 2 {
@@ -40,26 +45,11 @@ func IsEastAsian() bool {
break
}
}
-
- mbc_max := 1
- switch charset {
- case "utf-8", "utf8":
- mbc_max = 6
- case "jis":
- mbc_max = 8
- case "eucjp":
- mbc_max = 3
- case "euckr", "euccn":
- mbc_max = 2
- case "sjis", "cp932", "cp51932", "cp936", "cp949", "cp950":
- mbc_max = 2
- case "big5":
- mbc_max = 2
- case "gbk", "gb2312":
- mbc_max = 2
+ max := 1
+ if m, ok := mblenTable[charset]; ok {
+ max = m
}
-
- if mbc_max > 1 && (charset[0] != 'u' ||
+ if max > 1 && (charset[0] != 'u' ||
strings.HasPrefix(locale, "ja") ||
strings.HasPrefix(locale, "ko") ||
strings.HasPrefix(locale, "zh")) {
@@ -67,3 +57,21 @@ func IsEastAsian() bool {
}
return false
}
+
+// IsEastAsian return true if the current locale is CJK
+func IsEastAsian() bool {
+ locale := os.Getenv("LC_CTYPE")
+ if locale == "" {
+ locale = os.Getenv("LANG")
+ }
+
+ // ignore C locale
+ if locale == "POSIX" || locale == "C" {
+ return false
+ }
+ if len(locale) > 1 && locale[0] == 'C' && (locale[1] == '.' || locale[1] == '-') {
+ return false
+ }
+
+ return isEastAsian(locale)
+}
diff --git a/Godeps/_workspace/src/github.com/mattn/go-runewidth/runewidth_windows.go b/vendor/github.com/mattn/go-runewidth/runewidth_windows.go
index bdd84454b..0258876b9 100644
--- a/Godeps/_workspace/src/github.com/mattn/go-runewidth/runewidth_windows.go
+++ b/vendor/github.com/mattn/go-runewidth/runewidth_windows.go
@@ -9,6 +9,7 @@ var (
procGetConsoleOutputCP = kernel32.NewProc("GetConsoleOutputCP")
)
+// IsEastAsian return true if the current locale is CJK
func IsEastAsian() bool {
r1, _, _ := procGetConsoleOutputCP.Call()
if r1 == 0 {
diff --git a/vendor/github.com/mitchellh/go-wordwrap/LICENSE.md b/vendor/github.com/mitchellh/go-wordwrap/LICENSE.md
new file mode 100644
index 000000000..229851590
--- /dev/null
+++ b/vendor/github.com/mitchellh/go-wordwrap/LICENSE.md
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Mitchell Hashimoto
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/vendor/github.com/mitchellh/go-wordwrap/README.md b/vendor/github.com/mitchellh/go-wordwrap/README.md
new file mode 100644
index 000000000..60ae31170
--- /dev/null
+++ b/vendor/github.com/mitchellh/go-wordwrap/README.md
@@ -0,0 +1,39 @@
+# go-wordwrap
+
+`go-wordwrap` (Golang package: `wordwrap`) is a package for Go that
+automatically wraps words into multiple lines. The primary use case for this
+is in formatting CLI output, but of course word wrapping is a generally useful
+thing to do.
+
+## Installation and Usage
+
+Install using `go get github.com/mitchellh/go-wordwrap`.
+
+Full documentation is available at
+http://godoc.org/github.com/mitchellh/go-wordwrap
+
+Below is an example of its usage ignoring errors:
+
+```go
+wrapped := wordwrap.WrapString("foo bar baz", 3)
+fmt.Println(wrapped)
+```
+
+Would output:
+
+```
+foo
+bar
+baz
+```
+
+## Word Wrap Algorithm
+
+This library doesn't use any clever algorithm for word wrapping. The wrapping
+is actually very naive: whenever there is whitespace or an explicit linebreak.
+The goal of this library is for word wrapping CLI output, so the input is
+typically pretty well controlled human language. Because of this, the naive
+approach typically works just fine.
+
+In the future, we'd like to make the algorithm more advanced. We would do
+so without breaking the API.
diff --git a/vendor/github.com/mitchellh/go-wordwrap/wordwrap.go b/vendor/github.com/mitchellh/go-wordwrap/wordwrap.go
new file mode 100644
index 000000000..ac67205bc
--- /dev/null
+++ b/vendor/github.com/mitchellh/go-wordwrap/wordwrap.go
@@ -0,0 +1,73 @@
+package wordwrap
+
+import (
+ "bytes"
+ "unicode"
+)
+
+// WrapString wraps the given string within lim width in characters.
+//
+// Wrapping is currently naive and only happens at white-space. A future
+// version of the library will implement smarter wrapping. This means that
+// pathological cases can dramatically reach past the limit, such as a very
+// long word.
+func WrapString(s string, lim uint) string {
+ // Initialize a buffer with a slightly larger size to account for breaks
+ init := make([]byte, 0, len(s))
+ buf := bytes.NewBuffer(init)
+
+ var current uint
+ var wordBuf, spaceBuf bytes.Buffer
+
+ for _, char := range s {
+ if char == '\n' {
+ if wordBuf.Len() == 0 {
+ if current+uint(spaceBuf.Len()) > lim {
+ current = 0
+ } else {
+ current += uint(spaceBuf.Len())
+ spaceBuf.WriteTo(buf)
+ }
+ spaceBuf.Reset()
+ } else {
+ current += uint(spaceBuf.Len() + wordBuf.Len())
+ spaceBuf.WriteTo(buf)
+ spaceBuf.Reset()
+ wordBuf.WriteTo(buf)
+ wordBuf.Reset()
+ }
+ buf.WriteRune(char)
+ current = 0
+ } else if unicode.IsSpace(char) {
+ if spaceBuf.Len() == 0 || wordBuf.Len() > 0 {
+ current += uint(spaceBuf.Len() + wordBuf.Len())
+ spaceBuf.WriteTo(buf)
+ spaceBuf.Reset()
+ wordBuf.WriteTo(buf)
+ wordBuf.Reset()
+ }
+
+ spaceBuf.WriteRune(char)
+ } else {
+
+ wordBuf.WriteRune(char)
+
+ if current+uint(spaceBuf.Len()+wordBuf.Len()) > lim && uint(wordBuf.Len()) < lim {
+ buf.WriteRune('\n')
+ current = 0
+ spaceBuf.Reset()
+ }
+ }
+ }
+
+ if wordBuf.Len() == 0 {
+ if current+uint(spaceBuf.Len()) <= lim {
+ spaceBuf.WriteTo(buf)
+ }
+ } else {
+ spaceBuf.WriteTo(buf)
+ wordBuf.WriteTo(buf)
+ }
+
+ return buf.String()
+}
diff --git a/Godeps/_workspace/src/github.com/nsf/termbox-go/AUTHORS b/vendor/github.com/nsf/termbox-go/AUTHORS
index fe26fb0fb..fe26fb0fb 100644
--- a/Godeps/_workspace/src/github.com/nsf/termbox-go/AUTHORS
+++ b/vendor/github.com/nsf/termbox-go/AUTHORS
diff --git a/Godeps/_workspace/src/github.com/nsf/termbox-go/LICENSE b/vendor/github.com/nsf/termbox-go/LICENSE
index d9bc068ce..d9bc068ce 100644
--- a/Godeps/_workspace/src/github.com/nsf/termbox-go/LICENSE
+++ b/vendor/github.com/nsf/termbox-go/LICENSE
diff --git a/Godeps/_workspace/src/github.com/nsf/termbox-go/README.md b/vendor/github.com/nsf/termbox-go/README.md
index 6ff10c6b9..d152da407 100644
--- a/Godeps/_workspace/src/github.com/nsf/termbox-go/README.md
+++ b/vendor/github.com/nsf/termbox-go/README.md
@@ -20,6 +20,10 @@ There are also some interesting projects using termbox-go:
- [xterm-color-chart](https://github.com/kutuluk/xterm-color-chart) is a XTerm 256 color chart.
- [gocui](https://github.com/jroimartin/gocui) is a minimalist Go library aimed at creating console user interfaces.
- [dry](https://github.com/moncho/dry) is an interactive cli to manage Docker containers.
+ - [pxl](https://github.com/ichinaski/pxl) displays images in the terminal.
+ - [snake-game](https://github.com/DyegoCosta/snake-game) is an implementation of the Snake game.
+ - [gone](https://github.com/guillaumebreton/gone) is a CLI pomodoro® timer.
+ - [Spoof.go](https://github.com/sabey/spoofgo) controllable movement spoofing from the cli
### API reference
[godoc.org/github.com/nsf/termbox-go](http://godoc.org/github.com/nsf/termbox-go)
diff --git a/Godeps/_workspace/src/github.com/nsf/termbox-go/api.go b/vendor/github.com/nsf/termbox-go/api.go
index b8497b02e..b339e532f 100644
--- a/Godeps/_workspace/src/github.com/nsf/termbox-go/api.go
+++ b/vendor/github.com/nsf/termbox-go/api.go
@@ -57,7 +57,6 @@ func Init() error {
tios.Iflag &^= syscall_IGNBRK | syscall_BRKINT | syscall_PARMRK |
syscall_ISTRIP | syscall_INLCR | syscall_IGNCR |
syscall_ICRNL | syscall_IXON
- tios.Oflag &^= syscall_OPOST
tios.Lflag &^= syscall_ECHO | syscall_ECHONL | syscall_ICANON |
syscall_ISIG | syscall_IEXTEN
tios.Cflag &^= syscall_CSIZE | syscall_PARENB
diff --git a/Godeps/_workspace/src/github.com/nsf/termbox-go/api_common.go b/vendor/github.com/nsf/termbox-go/api_common.go
index 9f23661f5..9f23661f5 100644
--- a/Godeps/_workspace/src/github.com/nsf/termbox-go/api_common.go
+++ b/vendor/github.com/nsf/termbox-go/api_common.go
diff --git a/Godeps/_workspace/src/github.com/nsf/termbox-go/api_windows.go b/vendor/github.com/nsf/termbox-go/api_windows.go
index 7def30a67..7def30a67 100644
--- a/Godeps/_workspace/src/github.com/nsf/termbox-go/api_windows.go
+++ b/vendor/github.com/nsf/termbox-go/api_windows.go
diff --git a/Godeps/_workspace/src/github.com/nsf/termbox-go/collect_terminfo.py b/vendor/github.com/nsf/termbox-go/collect_terminfo.py
index 5e50975e6..5e50975e6 100644..100755
--- a/Godeps/_workspace/src/github.com/nsf/termbox-go/collect_terminfo.py
+++ b/vendor/github.com/nsf/termbox-go/collect_terminfo.py
diff --git a/Godeps/_workspace/src/github.com/nsf/termbox-go/syscalls.go b/vendor/github.com/nsf/termbox-go/syscalls.go
index 4f52bb9af..4f52bb9af 100644
--- a/Godeps/_workspace/src/github.com/nsf/termbox-go/syscalls.go
+++ b/vendor/github.com/nsf/termbox-go/syscalls.go
diff --git a/Godeps/_workspace/src/github.com/nsf/termbox-go/syscalls_darwin.go b/vendor/github.com/nsf/termbox-go/syscalls_darwin.go
index 25b78f7ab..25b78f7ab 100644
--- a/Godeps/_workspace/src/github.com/nsf/termbox-go/syscalls_darwin.go
+++ b/vendor/github.com/nsf/termbox-go/syscalls_darwin.go
diff --git a/Godeps/_workspace/src/github.com/nsf/termbox-go/syscalls_darwin_amd64.go b/vendor/github.com/nsf/termbox-go/syscalls_darwin_amd64.go
index 11f25be79..11f25be79 100644
--- a/Godeps/_workspace/src/github.com/nsf/termbox-go/syscalls_darwin_amd64.go
+++ b/vendor/github.com/nsf/termbox-go/syscalls_darwin_amd64.go
diff --git a/Godeps/_workspace/src/github.com/nsf/termbox-go/syscalls_freebsd.go b/vendor/github.com/nsf/termbox-go/syscalls_dragonfly.go
index e03624ebc..e03624ebc 100644
--- a/Godeps/_workspace/src/github.com/nsf/termbox-go/syscalls_freebsd.go
+++ b/vendor/github.com/nsf/termbox-go/syscalls_dragonfly.go
diff --git a/vendor/github.com/nsf/termbox-go/syscalls_freebsd.go b/vendor/github.com/nsf/termbox-go/syscalls_freebsd.go
new file mode 100644
index 000000000..e03624ebc
--- /dev/null
+++ b/vendor/github.com/nsf/termbox-go/syscalls_freebsd.go
@@ -0,0 +1,39 @@
+// Created by cgo -godefs - DO NOT EDIT
+// cgo -godefs syscalls.go
+
+package termbox
+
+type syscall_Termios struct {
+ Iflag uint32
+ Oflag uint32
+ Cflag uint32
+ Lflag uint32
+ Cc [20]uint8
+ Ispeed uint32
+ Ospeed uint32
+}
+
+const (
+ syscall_IGNBRK = 0x1
+ syscall_BRKINT = 0x2
+ syscall_PARMRK = 0x8
+ syscall_ISTRIP = 0x20
+ syscall_INLCR = 0x40
+ syscall_IGNCR = 0x80
+ syscall_ICRNL = 0x100
+ syscall_IXON = 0x200
+ syscall_OPOST = 0x1
+ syscall_ECHO = 0x8
+ syscall_ECHONL = 0x10
+ syscall_ICANON = 0x100
+ syscall_ISIG = 0x80
+ syscall_IEXTEN = 0x400
+ syscall_CSIZE = 0x300
+ syscall_PARENB = 0x1000
+ syscall_CS8 = 0x300
+ syscall_VMIN = 0x10
+ syscall_VTIME = 0x11
+
+ syscall_TCGETS = 0x402c7413
+ syscall_TCSETS = 0x802c7414
+)
diff --git a/Godeps/_workspace/src/github.com/nsf/termbox-go/syscalls_linux.go b/vendor/github.com/nsf/termbox-go/syscalls_linux.go
index b88960de6..b88960de6 100644
--- a/Godeps/_workspace/src/github.com/nsf/termbox-go/syscalls_linux.go
+++ b/vendor/github.com/nsf/termbox-go/syscalls_linux.go
diff --git a/Godeps/_workspace/src/github.com/nsf/termbox-go/syscalls_netbsd.go b/vendor/github.com/nsf/termbox-go/syscalls_netbsd.go
index 49a3355b9..49a3355b9 100644
--- a/Godeps/_workspace/src/github.com/nsf/termbox-go/syscalls_netbsd.go
+++ b/vendor/github.com/nsf/termbox-go/syscalls_netbsd.go
diff --git a/Godeps/_workspace/src/github.com/nsf/termbox-go/syscalls_openbsd.go b/vendor/github.com/nsf/termbox-go/syscalls_openbsd.go
index 49a3355b9..49a3355b9 100644
--- a/Godeps/_workspace/src/github.com/nsf/termbox-go/syscalls_openbsd.go
+++ b/vendor/github.com/nsf/termbox-go/syscalls_openbsd.go
diff --git a/Godeps/_workspace/src/github.com/nsf/termbox-go/syscalls_windows.go b/vendor/github.com/nsf/termbox-go/syscalls_windows.go
index 472d002a5..472d002a5 100644
--- a/Godeps/_workspace/src/github.com/nsf/termbox-go/syscalls_windows.go
+++ b/vendor/github.com/nsf/termbox-go/syscalls_windows.go
diff --git a/Godeps/_workspace/src/github.com/nsf/termbox-go/termbox.go b/vendor/github.com/nsf/termbox-go/termbox.go
index 6e5ba6c8f..6e5ba6c8f 100644
--- a/Godeps/_workspace/src/github.com/nsf/termbox-go/termbox.go
+++ b/vendor/github.com/nsf/termbox-go/termbox.go
diff --git a/Godeps/_workspace/src/github.com/nsf/termbox-go/termbox_common.go b/vendor/github.com/nsf/termbox-go/termbox_common.go
index c3355cc25..c3355cc25 100644
--- a/Godeps/_workspace/src/github.com/nsf/termbox-go/termbox_common.go
+++ b/vendor/github.com/nsf/termbox-go/termbox_common.go
diff --git a/Godeps/_workspace/src/github.com/nsf/termbox-go/termbox_windows.go b/vendor/github.com/nsf/termbox-go/termbox_windows.go
index f7dad7b8a..f7dad7b8a 100644
--- a/Godeps/_workspace/src/github.com/nsf/termbox-go/termbox_windows.go
+++ b/vendor/github.com/nsf/termbox-go/termbox_windows.go
diff --git a/Godeps/_workspace/src/github.com/nsf/termbox-go/terminfo.go b/vendor/github.com/nsf/termbox-go/terminfo.go
index 35dbd70b8..35dbd70b8 100644
--- a/Godeps/_workspace/src/github.com/nsf/termbox-go/terminfo.go
+++ b/vendor/github.com/nsf/termbox-go/terminfo.go
diff --git a/Godeps/_workspace/src/github.com/nsf/termbox-go/terminfo_builtin.go b/vendor/github.com/nsf/termbox-go/terminfo_builtin.go
index a94866067..a94866067 100644
--- a/Godeps/_workspace/src/github.com/nsf/termbox-go/terminfo_builtin.go
+++ b/vendor/github.com/nsf/termbox-go/terminfo_builtin.go
diff --git a/Godeps/_workspace/src/github.com/pborman/uuid/.travis.yml b/vendor/github.com/pborman/uuid/.travis.yml
index a6a98db8a..d8156a60b 100644
--- a/Godeps/_workspace/src/github.com/pborman/uuid/.travis.yml
+++ b/vendor/github.com/pborman/uuid/.travis.yml
@@ -3,7 +3,6 @@ language: go
go:
- 1.4.3
- 1.5.3
- - release
- tip
script:
diff --git a/vendor/github.com/pborman/uuid/CONTRIBUTING.md b/vendor/github.com/pborman/uuid/CONTRIBUTING.md
new file mode 100644
index 000000000..04fdf09f1
--- /dev/null
+++ b/vendor/github.com/pborman/uuid/CONTRIBUTING.md
@@ -0,0 +1,10 @@
+# How to contribute
+
+We definitely welcome patches and contribution to this project!
+
+### Legal requirements
+
+In order to protect both you and ourselves, you will need to sign the
+[Contributor License Agreement](https://cla.developers.google.com/clas).
+
+You may have already signed it for other Google projects.
diff --git a/Godeps/_workspace/src/github.com/pborman/uuid/CONTRIBUTORS b/vendor/github.com/pborman/uuid/CONTRIBUTORS
index b382a04ed..b382a04ed 100644
--- a/Godeps/_workspace/src/github.com/pborman/uuid/CONTRIBUTORS
+++ b/vendor/github.com/pborman/uuid/CONTRIBUTORS
diff --git a/Godeps/_workspace/src/github.com/pborman/uuid/LICENSE b/vendor/github.com/pborman/uuid/LICENSE
index 5dc68268d..5dc68268d 100644
--- a/Godeps/_workspace/src/github.com/pborman/uuid/LICENSE
+++ b/vendor/github.com/pborman/uuid/LICENSE
diff --git a/Godeps/_workspace/src/github.com/pborman/uuid/README.md b/vendor/github.com/pborman/uuid/README.md
index f023d47ca..f023d47ca 100644
--- a/Godeps/_workspace/src/github.com/pborman/uuid/README.md
+++ b/vendor/github.com/pborman/uuid/README.md
diff --git a/Godeps/_workspace/src/github.com/pborman/uuid/dce.go b/vendor/github.com/pborman/uuid/dce.go
index 50a0f2d09..50a0f2d09 100644
--- a/Godeps/_workspace/src/github.com/pborman/uuid/dce.go
+++ b/vendor/github.com/pborman/uuid/dce.go
diff --git a/Godeps/_workspace/src/github.com/pborman/uuid/doc.go b/vendor/github.com/pborman/uuid/doc.go
index d8bd013e6..d8bd013e6 100644
--- a/Godeps/_workspace/src/github.com/pborman/uuid/doc.go
+++ b/vendor/github.com/pborman/uuid/doc.go
diff --git a/Godeps/_workspace/src/github.com/pborman/uuid/hash.go b/vendor/github.com/pborman/uuid/hash.go
index a0420c1ef..a0420c1ef 100644
--- a/Godeps/_workspace/src/github.com/pborman/uuid/hash.go
+++ b/vendor/github.com/pborman/uuid/hash.go
diff --git a/Godeps/_workspace/src/github.com/pborman/uuid/json.go b/vendor/github.com/pborman/uuid/json.go
index 9dda1dfba..9dda1dfba 100644
--- a/Godeps/_workspace/src/github.com/pborman/uuid/json.go
+++ b/vendor/github.com/pborman/uuid/json.go
diff --git a/Godeps/_workspace/src/github.com/pborman/uuid/node.go b/vendor/github.com/pborman/uuid/node.go
index 42d60da8f..42d60da8f 100644
--- a/Godeps/_workspace/src/github.com/pborman/uuid/node.go
+++ b/vendor/github.com/pborman/uuid/node.go
diff --git a/Godeps/_workspace/src/github.com/pborman/uuid/sql.go b/vendor/github.com/pborman/uuid/sql.go
index d015bfd13..d015bfd13 100644
--- a/Godeps/_workspace/src/github.com/pborman/uuid/sql.go
+++ b/vendor/github.com/pborman/uuid/sql.go
diff --git a/Godeps/_workspace/src/github.com/pborman/uuid/time.go b/vendor/github.com/pborman/uuid/time.go
index eedf24219..eedf24219 100644
--- a/Godeps/_workspace/src/github.com/pborman/uuid/time.go
+++ b/vendor/github.com/pborman/uuid/time.go
diff --git a/Godeps/_workspace/src/github.com/pborman/uuid/util.go b/vendor/github.com/pborman/uuid/util.go
index fc8e052c7..fc8e052c7 100644
--- a/Godeps/_workspace/src/github.com/pborman/uuid/util.go
+++ b/vendor/github.com/pborman/uuid/util.go
diff --git a/Godeps/_workspace/src/github.com/pborman/uuid/uuid.go b/vendor/github.com/pborman/uuid/uuid.go
index c4482cd87..7c643cf0a 100644
--- a/Godeps/_workspace/src/github.com/pborman/uuid/uuid.go
+++ b/vendor/github.com/pborman/uuid/uuid.go
@@ -13,6 +13,20 @@ import (
"strings"
)
+// Array is a pass-by-value UUID that can be used as an effecient key in a map.
+type Array [16]byte
+
+// UUID converts uuid into a slice.
+func (uuid Array) UUID() UUID {
+ return uuid[:]
+}
+
+// String returns the string representation of uuid,
+// xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
+func (uuid Array) String() string {
+ return uuid.UUID().String()
+}
+
// A UUID is a 128 bit (16 byte) Universal Unique IDentifier as defined in RFC
// 4122.
type UUID []byte
@@ -76,6 +90,17 @@ func Equal(uuid1, uuid2 UUID) bool {
return bytes.Equal(uuid1, uuid2)
}
+// Array returns an array representation of uuid that can be used as a map key.
+// Array panics if uuid is not valid.
+func (uuid UUID) Array() Array {
+ if len(uuid) != 16 {
+ panic("invalid uuid")
+ }
+ var a Array
+ copy(a[:], uuid)
+ return a
+}
+
// String returns the string form of uuid, xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
// , or "" if uuid is invalid.
func (uuid UUID) String() string {
@@ -161,7 +186,7 @@ func (v Variant) String() string {
return fmt.Sprintf("BadVariant%d", int(v))
}
-// SetRand sets the random number generator to r, which implents io.Reader.
+// SetRand sets the random number generator to r, which implements io.Reader.
// If r.Read returns an error when the package requests random data then
// a panic will be issued.
//
diff --git a/Godeps/_workspace/src/github.com/pborman/uuid/version1.go b/vendor/github.com/pborman/uuid/version1.go
index 0127eacfa..0127eacfa 100644
--- a/Godeps/_workspace/src/github.com/pborman/uuid/version1.go
+++ b/vendor/github.com/pborman/uuid/version1.go
diff --git a/Godeps/_workspace/src/github.com/pborman/uuid/version4.go b/vendor/github.com/pborman/uuid/version4.go
index b3d4a368d..b3d4a368d 100644
--- a/Godeps/_workspace/src/github.com/pborman/uuid/version4.go
+++ b/vendor/github.com/pborman/uuid/version4.go
diff --git a/Godeps/_workspace/src/github.com/peterh/liner/COPYING b/vendor/github.com/peterh/liner/COPYING
index 9e8c9f206..9e8c9f206 100644
--- a/Godeps/_workspace/src/github.com/peterh/liner/COPYING
+++ b/vendor/github.com/peterh/liner/COPYING
diff --git a/Godeps/_workspace/src/github.com/peterh/liner/README.md b/vendor/github.com/peterh/liner/README.md
index 9148b2492..9148b2492 100644
--- a/Godeps/_workspace/src/github.com/peterh/liner/README.md
+++ b/vendor/github.com/peterh/liner/README.md
diff --git a/Godeps/_workspace/src/github.com/peterh/liner/bsdinput.go b/vendor/github.com/peterh/liner/bsdinput.go
index 4b552d44d..35933982f 100644
--- a/Godeps/_workspace/src/github.com/peterh/liner/bsdinput.go
+++ b/vendor/github.com/peterh/liner/bsdinput.go
@@ -37,3 +37,5 @@ type termios struct {
Ispeed int32
Ospeed int32
}
+
+const cursorColumn = false
diff --git a/Godeps/_workspace/src/github.com/peterh/liner/common.go b/vendor/github.com/peterh/liner/common.go
index b6162b624..b6162b624 100644
--- a/Godeps/_workspace/src/github.com/peterh/liner/common.go
+++ b/vendor/github.com/peterh/liner/common.go
diff --git a/Godeps/_workspace/src/github.com/peterh/liner/fallbackinput.go b/vendor/github.com/peterh/liner/fallbackinput.go
index d9eb79d9e..d9eb79d9e 100644
--- a/Godeps/_workspace/src/github.com/peterh/liner/fallbackinput.go
+++ b/vendor/github.com/peterh/liner/fallbackinput.go
diff --git a/Godeps/_workspace/src/github.com/peterh/liner/input.go b/vendor/github.com/peterh/liner/input.go
index c80c85f69..0ee6be7af 100644
--- a/Godeps/_workspace/src/github.com/peterh/liner/input.go
+++ b/vendor/github.com/peterh/liner/input.go
@@ -67,8 +67,7 @@ func NewLiner() *State {
}
if !s.outputRedirected {
- s.getColumns()
- s.outputRedirected = s.columns <= 0
+ s.outputRedirected = !s.getColumns()
}
return &s
diff --git a/Godeps/_workspace/src/github.com/peterh/liner/input_darwin.go b/vendor/github.com/peterh/liner/input_darwin.go
index 23c9c5da0..e98ab4a49 100644
--- a/Godeps/_workspace/src/github.com/peterh/liner/input_darwin.go
+++ b/vendor/github.com/peterh/liner/input_darwin.go
@@ -37,3 +37,7 @@ type termios struct {
Ispeed uintptr
Ospeed uintptr
}
+
+// Terminal.app needs a column for the cursor when the input line is at the
+// bottom of the window.
+const cursorColumn = true
diff --git a/Godeps/_workspace/src/github.com/peterh/liner/input_linux.go b/vendor/github.com/peterh/liner/input_linux.go
index 6ca87124e..56ed185fa 100644
--- a/Godeps/_workspace/src/github.com/peterh/liner/input_linux.go
+++ b/vendor/github.com/peterh/liner/input_linux.go
@@ -24,3 +24,5 @@ const (
type termios struct {
syscall.Termios
}
+
+const cursorColumn = false
diff --git a/Godeps/_workspace/src/github.com/peterh/liner/input_windows.go b/vendor/github.com/peterh/liner/input_windows.go
index 9dcc3115c..199b9428e 100644
--- a/Godeps/_workspace/src/github.com/peterh/liner/input_windows.go
+++ b/vendor/github.com/peterh/liner/input_windows.go
@@ -168,6 +168,9 @@ func (s *State) readNext() (interface{}, error) {
if input.eventType == window_buffer_size_event {
xy := (*coord)(unsafe.Pointer(&input.blob[0]))
s.columns = int(xy.x)
+ if s.columns > 1 {
+ s.columns--
+ }
return winch, nil
}
if input.eventType != key_event {
diff --git a/Godeps/_workspace/src/github.com/peterh/liner/line.go b/vendor/github.com/peterh/liner/line.go
index 95364ae56..903dd240d 100644
--- a/Godeps/_workspace/src/github.com/peterh/liner/line.go
+++ b/vendor/github.com/peterh/liner/line.go
@@ -564,6 +564,15 @@ func (s *State) yank(p []rune, text []rune, pos int) ([]rune, int, interface{},
// newline character. An io.EOF error is returned if the user signals end-of-file
// by pressing Ctrl-D. Prompt allows line editing if the terminal supports it.
func (s *State) Prompt(prompt string) (string, error) {
+ return s.PromptWithSuggestion(prompt, "", 0)
+}
+
+// PromptWithSuggestion displays prompt and an editable text with cursor at
+// given position. The cursor will be set to the end of the line if given position
+// is negative or greater than length of text. Returns a line of user input, not
+// including a trailing newline character. An io.EOF error is returned if the user
+// signals end-of-file by pressing Ctrl-D.
+func (s *State) PromptWithSuggestion(prompt string, text string, pos int) (string, error) {
if s.inputRedirected || !s.terminalSupported {
return s.promptUnsupported(prompt)
}
@@ -576,8 +585,7 @@ func (s *State) Prompt(prompt string) (string, error) {
fmt.Print(prompt)
p := []rune(prompt)
- var line []rune
- pos := 0
+ var line = []rune(text)
historyEnd := ""
prefixHistory := s.getHistoryByPrefix(string(line))
historyPos := len(prefixHistory)
@@ -586,6 +594,13 @@ func (s *State) Prompt(prompt string) (string, error) {
defer s.stopPrompt()
+ if pos < 0 || len(text) < pos {
+ pos = len(text)
+ }
+ if len(line) > 0 {
+ s.refresh(p, line, pos)
+ }
+
restart:
s.startPrompt()
s.getColumns()
diff --git a/Godeps/_workspace/src/github.com/peterh/liner/output.go b/vendor/github.com/peterh/liner/output.go
index 049273b53..6d83d4ebf 100644
--- a/Godeps/_workspace/src/github.com/peterh/liner/output.go
+++ b/vendor/github.com/peterh/liner/output.go
@@ -48,14 +48,18 @@ type winSize struct {
xpixel, ypixel uint16
}
-func (s *State) getColumns() {
+func (s *State) getColumns() bool {
var ws winSize
ok, _, _ := syscall.Syscall(syscall.SYS_IOCTL, uintptr(syscall.Stdout),
syscall.TIOCGWINSZ, uintptr(unsafe.Pointer(&ws)))
- if ok < 0 {
- s.columns = 80
+ if int(ok) < 0 {
+ return false
}
s.columns = int(ws.col)
+ if cursorColumn && s.columns > 1 {
+ s.columns--
+ }
+ return true
}
func (s *State) checkOutput() {
diff --git a/Godeps/_workspace/src/github.com/peterh/liner/output_windows.go b/vendor/github.com/peterh/liner/output_windows.go
index 45cd978c9..63c9c5d75 100644
--- a/Godeps/_workspace/src/github.com/peterh/liner/output_windows.go
+++ b/vendor/github.com/peterh/liner/output_windows.go
@@ -69,4 +69,8 @@ func (s *State) getColumns() {
var sbi consoleScreenBufferInfo
procGetConsoleScreenBufferInfo.Call(uintptr(s.hOut), uintptr(unsafe.Pointer(&sbi)))
s.columns = int(sbi.dwSize.x)
+ if s.columns > 1 {
+ // Windows 10 needs a spare column for the cursor
+ s.columns--
+ }
}
diff --git a/Godeps/_workspace/src/github.com/peterh/liner/signal.go b/vendor/github.com/peterh/liner/signal.go
index 0cba79e7f..0cba79e7f 100644
--- a/Godeps/_workspace/src/github.com/peterh/liner/signal.go
+++ b/vendor/github.com/peterh/liner/signal.go
diff --git a/Godeps/_workspace/src/github.com/peterh/liner/signal_legacy.go b/vendor/github.com/peterh/liner/signal_legacy.go
index fa3672daa..fa3672daa 100644
--- a/Godeps/_workspace/src/github.com/peterh/liner/signal_legacy.go
+++ b/vendor/github.com/peterh/liner/signal_legacy.go
diff --git a/Godeps/_workspace/src/github.com/peterh/liner/unixmode.go b/vendor/github.com/peterh/liner/unixmode.go
index 9838923f5..9838923f5 100644
--- a/Godeps/_workspace/src/github.com/peterh/liner/unixmode.go
+++ b/vendor/github.com/peterh/liner/unixmode.go
diff --git a/Godeps/_workspace/src/github.com/peterh/liner/width.go b/vendor/github.com/peterh/liner/width.go
index d8984aae9..d8984aae9 100644
--- a/Godeps/_workspace/src/github.com/peterh/liner/width.go
+++ b/vendor/github.com/peterh/liner/width.go
diff --git a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/.gitignore b/vendor/github.com/rcrowley/go-metrics/.gitignore
index 83c8f8237..83c8f8237 100644
--- a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/.gitignore
+++ b/vendor/github.com/rcrowley/go-metrics/.gitignore
diff --git a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/.travis.yml b/vendor/github.com/rcrowley/go-metrics/.travis.yml
index 20aa5d042..20aa5d042 100644
--- a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/.travis.yml
+++ b/vendor/github.com/rcrowley/go-metrics/.travis.yml
diff --git a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/LICENSE b/vendor/github.com/rcrowley/go-metrics/LICENSE
index 363fa9ee7..363fa9ee7 100644
--- a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/LICENSE
+++ b/vendor/github.com/rcrowley/go-metrics/LICENSE
diff --git a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/README.md b/vendor/github.com/rcrowley/go-metrics/README.md
index 66ba9cab5..2d1a6dcfa 100644
--- a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/README.md
+++ b/vendor/github.com/rcrowley/go-metrics/README.md
@@ -21,6 +21,9 @@ g := metrics.NewGauge()
metrics.Register("bar", g)
g.Update(47)
+r := NewRegistry()
+g := metrics.NewRegisteredFunctionalGauge("cache-evictions", r, func() int64 { return cache.getEvictionsCount() })
+
s := metrics.NewExpDecaySample(1028, 0.015) // or metrics.NewUniformSample(1028)
h := metrics.NewHistogram(s)
metrics.Register("baz", h)
@@ -36,6 +39,15 @@ t.Time(func() {})
t.Update(47)
```
+Register() is not threadsafe. For threadsafe metric registration use
+GetOrRegister:
+
+```
+t := metrics.GetOrRegisterTimer("account.create.latency", nil)
+t.Time(func() {})
+t.Update(47)
+```
+
Periodically log every metric in human-readable form to standard error:
```go
@@ -67,7 +79,7 @@ issues [#121](https://github.com/rcrowley/go-metrics/issues/121) and
[#124](https://github.com/rcrowley/go-metrics/issues/124) for progress and details.
```go
-import "github.com/rcrowley/go-metrics/influxdb"
+import "github.com/vrischmann/go-metrics-influxdb"
go influxdb.Influxdb(metrics.DefaultRegistry, 10e9, &influxdb.Config{
Host: "127.0.0.1:8086",
@@ -137,3 +149,5 @@ Clients are available for the following destinations:
* Librato - [https://github.com/mihasya/go-metrics-librato](https://github.com/mihasya/go-metrics-librato)
* Graphite - [https://github.com/cyberdelia/go-metrics-graphite](https://github.com/cyberdelia/go-metrics-graphite)
* InfluxDB - [https://github.com/vrischmann/go-metrics-influxdb](https://github.com/vrischmann/go-metrics-influxdb)
+* Ganglia - [https://github.com/appscode/metlia](https://github.com/appscode/metlia)
+* Prometheus - [https://github.com/deathowl/go-metrics-prometheus](https://github.com/deathowl/go-metrics-prometheus)
diff --git a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/counter.go b/vendor/github.com/rcrowley/go-metrics/counter.go
index bb7b039cb..bb7b039cb 100644
--- a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/counter.go
+++ b/vendor/github.com/rcrowley/go-metrics/counter.go
diff --git a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/debug.go b/vendor/github.com/rcrowley/go-metrics/debug.go
index 043ccefab..043ccefab 100644
--- a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/debug.go
+++ b/vendor/github.com/rcrowley/go-metrics/debug.go
diff --git a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/ewma.go b/vendor/github.com/rcrowley/go-metrics/ewma.go
index 694a1d033..694a1d033 100644
--- a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/ewma.go
+++ b/vendor/github.com/rcrowley/go-metrics/ewma.go
diff --git a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/exp/exp.go b/vendor/github.com/rcrowley/go-metrics/exp/exp.go
index 09a496f11..11dd3f898 100644
--- a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/exp/exp.go
+++ b/vendor/github.com/rcrowley/go-metrics/exp/exp.go
@@ -5,9 +5,10 @@ package exp
import (
"expvar"
"fmt"
- "github.com/rcrowley/go-metrics"
"net/http"
"sync"
+
+ "github.com/rcrowley/go-metrics"
)
type exp struct {
@@ -33,13 +34,20 @@ func (exp *exp) expHandler(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "\n}\n")
}
+// Exp will register an expvar powered metrics handler with http.DefaultServeMux on "/debug/vars"
func Exp(r metrics.Registry) {
- e := exp{sync.Mutex{}, r}
+ h := ExpHandler(r)
// this would cause a panic:
// panic: http: multiple registrations for /debug/vars
// http.HandleFunc("/debug/vars", e.expHandler)
// haven't found an elegant way, so just use a different endpoint
- http.HandleFunc("/debug/metrics", e.expHandler)
+ http.Handle("/debug/metrics", h)
+}
+
+// ExpHandler will return an expvar powered metrics handler.
+func ExpHandler(r metrics.Registry) http.Handler {
+ e := exp{sync.Mutex{}, r}
+ return http.HandlerFunc(e.expHandler)
}
func (exp *exp) getInt(name string) *expvar.Int {
diff --git a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/gauge.go b/vendor/github.com/rcrowley/go-metrics/gauge.go
index 807638a31..d618c4553 100644
--- a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/gauge.go
+++ b/vendor/github.com/rcrowley/go-metrics/gauge.go
@@ -36,6 +36,25 @@ func NewRegisteredGauge(name string, r Registry) Gauge {
return c
}
+// NewFunctionalGauge constructs a new FunctionalGauge.
+func NewFunctionalGauge(f func() int64) Gauge {
+ if UseNilMetrics {
+ return NilGauge{}
+ }
+ return &FunctionalGauge{value: f}
+}
+
+
+// NewRegisteredFunctionalGauge constructs and registers a new StandardGauge.
+func NewRegisteredFunctionalGauge(name string, r Registry, f func() int64) Gauge {
+ c := NewFunctionalGauge(f)
+ if nil == r {
+ r = DefaultRegistry
+ }
+ r.Register(name, c)
+ return c
+}
+
// GaugeSnapshot is a read-only copy of another Gauge.
type GaugeSnapshot int64
@@ -82,3 +101,20 @@ func (g *StandardGauge) Update(v int64) {
func (g *StandardGauge) Value() int64 {
return atomic.LoadInt64(&g.value)
}
+// FunctionalGauge returns value from given function
+type FunctionalGauge struct {
+ value func() int64
+}
+
+// Value returns the gauge's current value.
+func (g FunctionalGauge) Value() int64 {
+ return g.value()
+}
+
+// Snapshot returns the snapshot.
+func (g FunctionalGauge) Snapshot() Gauge { return GaugeSnapshot(g.Value()) }
+
+// Update panics.
+func (FunctionalGauge) Update(int64) {
+ panic("Update called on a FunctionalGauge")
+} \ No newline at end of file
diff --git a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/gauge_float64.go b/vendor/github.com/rcrowley/go-metrics/gauge_float64.go
index 47c3566c2..6f93920b2 100644
--- a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/gauge_float64.go
+++ b/vendor/github.com/rcrowley/go-metrics/gauge_float64.go
@@ -38,6 +38,24 @@ func NewRegisteredGaugeFloat64(name string, r Registry) GaugeFloat64 {
return c
}
+// NewFunctionalGauge constructs a new FunctionalGauge.
+func NewFunctionalGaugeFloat64(f func() float64) GaugeFloat64 {
+ if UseNilMetrics {
+ return NilGaugeFloat64{}
+ }
+ return &FunctionalGaugeFloat64{value: f}
+}
+
+// NewRegisteredFunctionalGauge constructs and registers a new StandardGauge.
+func NewRegisteredFunctionalGaugeFloat64(name string, r Registry, f func() float64) GaugeFloat64 {
+ c := NewFunctionalGaugeFloat64(f)
+ if nil == r {
+ r = DefaultRegistry
+ }
+ r.Register(name, c)
+ return c
+}
+
// GaugeFloat64Snapshot is a read-only copy of another GaugeFloat64.
type GaugeFloat64Snapshot float64
@@ -89,3 +107,21 @@ func (g *StandardGaugeFloat64) Value() float64 {
defer g.mutex.Unlock()
return g.value
}
+
+// FunctionalGaugeFloat64 returns value from given function
+type FunctionalGaugeFloat64 struct {
+ value func() float64
+}
+
+// Value returns the gauge's current value.
+func (g FunctionalGaugeFloat64) Value() float64 {
+ return g.value()
+}
+
+// Snapshot returns the snapshot.
+func (g FunctionalGaugeFloat64) Snapshot() GaugeFloat64 { return GaugeFloat64Snapshot(g.Value()) }
+
+// Update panics.
+func (FunctionalGaugeFloat64) Update(float64) {
+ panic("Update called on a FunctionalGaugeFloat64")
+}
diff --git a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/graphite.go b/vendor/github.com/rcrowley/go-metrics/graphite.go
index abd0a7d29..abd0a7d29 100644
--- a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/graphite.go
+++ b/vendor/github.com/rcrowley/go-metrics/graphite.go
diff --git a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/healthcheck.go b/vendor/github.com/rcrowley/go-metrics/healthcheck.go
index 445131cae..445131cae 100644
--- a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/healthcheck.go
+++ b/vendor/github.com/rcrowley/go-metrics/healthcheck.go
diff --git a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/histogram.go b/vendor/github.com/rcrowley/go-metrics/histogram.go
index dbc837fe4..dbc837fe4 100644
--- a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/histogram.go
+++ b/vendor/github.com/rcrowley/go-metrics/histogram.go
diff --git a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/json.go b/vendor/github.com/rcrowley/go-metrics/json.go
index 2676aeea5..2fdcbcfbf 100644
--- a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/json.go
+++ b/vendor/github.com/rcrowley/go-metrics/json.go
@@ -81,3 +81,7 @@ func WriteJSON(r Registry, d time.Duration, w io.Writer) {
func WriteJSONOnce(r Registry, w io.Writer) {
json.NewEncoder(w).Encode(r)
}
+
+func (p *PrefixedRegistry) MarshalJSON() ([]byte, error) {
+ return json.Marshal(p.underlying)
+}
diff --git a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/log.go b/vendor/github.com/rcrowley/go-metrics/log.go
index f074eb03d..f8074c045 100644
--- a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/log.go
+++ b/vendor/github.com/rcrowley/go-metrics/log.go
@@ -1,17 +1,20 @@
package metrics
import (
- "log"
"time"
)
-func Log(r Registry, freq time.Duration, l *log.Logger) {
+type Logger interface {
+ Printf(format string, v ...interface{})
+}
+
+func Log(r Registry, freq time.Duration, l Logger) {
LogScaled(r, freq, time.Nanosecond, l)
}
// Output each metric in the given registry periodically using the given
// logger. Print timings in `scale` units (eg time.Millisecond) rather than nanos.
-func LogScaled(r Registry, freq time.Duration, scale time.Duration, l *log.Logger) {
+func LogScaled(r Registry, freq time.Duration, scale time.Duration, l Logger) {
du := float64(scale)
duSuffix := scale.String()[1:]
diff --git a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/memory.md b/vendor/github.com/rcrowley/go-metrics/memory.md
index 47454f54b..47454f54b 100644
--- a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/memory.md
+++ b/vendor/github.com/rcrowley/go-metrics/memory.md
diff --git a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/meter.go b/vendor/github.com/rcrowley/go-metrics/meter.go
index 0389ab0b8..0389ab0b8 100644
--- a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/meter.go
+++ b/vendor/github.com/rcrowley/go-metrics/meter.go
diff --git a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/metrics.go b/vendor/github.com/rcrowley/go-metrics/metrics.go
index b97a49ed1..b97a49ed1 100644
--- a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/metrics.go
+++ b/vendor/github.com/rcrowley/go-metrics/metrics.go
diff --git a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/opentsdb.go b/vendor/github.com/rcrowley/go-metrics/opentsdb.go
index 266b6c93d..266b6c93d 100644
--- a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/opentsdb.go
+++ b/vendor/github.com/rcrowley/go-metrics/opentsdb.go
diff --git a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/registry.go b/vendor/github.com/rcrowley/go-metrics/registry.go
index e1f68a5dc..9086dcbdd 100644
--- a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/registry.go
+++ b/vendor/github.com/rcrowley/go-metrics/registry.go
@@ -3,6 +3,7 @@ package metrics
import (
"fmt"
"reflect"
+ "strings"
"sync"
)
@@ -166,12 +167,34 @@ func NewPrefixedChildRegistry(parent Registry, prefix string) Registry {
// Call the given function for each registered metric.
func (r *PrefixedRegistry) Each(fn func(string, interface{})) {
- r.underlying.Each(fn)
+ wrappedFn := func (prefix string) func(string, interface{}) {
+ return func(name string, iface interface{}) {
+ if strings.HasPrefix(name,prefix) {
+ fn(name, iface)
+ } else {
+ return
+ }
+ }
+ }
+
+ baseRegistry, prefix := findPrefix(r, "")
+ baseRegistry.Each(wrappedFn(prefix))
+}
+
+func findPrefix(registry Registry, prefix string) (Registry, string) {
+ switch r := registry.(type) {
+ case *PrefixedRegistry:
+ return findPrefix(r.underlying, r.prefix + prefix)
+ case *StandardRegistry:
+ return r, prefix
+ }
+ return nil, ""
}
// Get the metric by the given name or nil if none is registered.
func (r *PrefixedRegistry) Get(name string) interface{} {
- return r.underlying.Get(name)
+ realName := r.prefix + name
+ return r.underlying.Get(realName)
}
// Gets an existing metric or registers the given one.
diff --git a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/runtime.go b/vendor/github.com/rcrowley/go-metrics/runtime.go
index e8c8d1568..11c6b785a 100644
--- a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/runtime.go
+++ b/vendor/github.com/rcrowley/go-metrics/runtime.go
@@ -2,6 +2,7 @@ package metrics
import (
"runtime"
+ "runtime/pprof"
"time"
)
@@ -39,6 +40,7 @@ var (
}
NumCgoCall Gauge
NumGoroutine Gauge
+ NumThread Gauge
ReadMemStats Timer
}
frees uint64
@@ -46,6 +48,8 @@ var (
mallocs uint64
numGC uint32
numCgoCalls int64
+
+ threadCreateProfile = pprof.Lookup("threadcreate")
)
// Capture new values for the Go runtime statistics exported in
@@ -134,6 +138,8 @@ func CaptureRuntimeMemStatsOnce(r Registry) {
numCgoCalls = currentNumCgoCalls
runtimeMetrics.NumGoroutine.Update(int64(runtime.NumGoroutine()))
+
+ runtimeMetrics.NumThread.Update(int64(threadCreateProfile.Count()))
}
// Register runtimeMetrics for the Go runtime statistics exported in runtime and
@@ -169,6 +175,7 @@ func RegisterRuntimeMemStats(r Registry) {
runtimeMetrics.MemStats.TotalAlloc = NewGauge()
runtimeMetrics.NumCgoCall = NewGauge()
runtimeMetrics.NumGoroutine = NewGauge()
+ runtimeMetrics.NumThread = NewGauge()
runtimeMetrics.ReadMemStats = NewTimer()
r.Register("runtime.MemStats.Alloc", runtimeMetrics.MemStats.Alloc)
@@ -200,5 +207,6 @@ func RegisterRuntimeMemStats(r Registry) {
r.Register("runtime.MemStats.TotalAlloc", runtimeMetrics.MemStats.TotalAlloc)
r.Register("runtime.NumCgoCall", runtimeMetrics.NumCgoCall)
r.Register("runtime.NumGoroutine", runtimeMetrics.NumGoroutine)
+ r.Register("runtime.NumThread", runtimeMetrics.NumThread)
r.Register("runtime.ReadMemStats", runtimeMetrics.ReadMemStats)
}
diff --git a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/runtime_cgo.go b/vendor/github.com/rcrowley/go-metrics/runtime_cgo.go
index e3391f4e8..e3391f4e8 100644
--- a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/runtime_cgo.go
+++ b/vendor/github.com/rcrowley/go-metrics/runtime_cgo.go
diff --git a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/runtime_gccpufraction.go b/vendor/github.com/rcrowley/go-metrics/runtime_gccpufraction.go
index ca12c05ba..ca12c05ba 100644
--- a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/runtime_gccpufraction.go
+++ b/vendor/github.com/rcrowley/go-metrics/runtime_gccpufraction.go
diff --git a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/runtime_no_cgo.go b/vendor/github.com/rcrowley/go-metrics/runtime_no_cgo.go
index 616a3b475..616a3b475 100644
--- a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/runtime_no_cgo.go
+++ b/vendor/github.com/rcrowley/go-metrics/runtime_no_cgo.go
diff --git a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/runtime_no_gccpufraction.go b/vendor/github.com/rcrowley/go-metrics/runtime_no_gccpufraction.go
index be96aa6f1..be96aa6f1 100644
--- a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/runtime_no_gccpufraction.go
+++ b/vendor/github.com/rcrowley/go-metrics/runtime_no_gccpufraction.go
diff --git a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/sample.go b/vendor/github.com/rcrowley/go-metrics/sample.go
index 5f6a37788..5f6a37788 100644
--- a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/sample.go
+++ b/vendor/github.com/rcrowley/go-metrics/sample.go
diff --git a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/syslog.go b/vendor/github.com/rcrowley/go-metrics/syslog.go
index 693f19085..693f19085 100644
--- a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/syslog.go
+++ b/vendor/github.com/rcrowley/go-metrics/syslog.go
diff --git a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/timer.go b/vendor/github.com/rcrowley/go-metrics/timer.go
index 17db8f8d2..17db8f8d2 100644
--- a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/timer.go
+++ b/vendor/github.com/rcrowley/go-metrics/timer.go
diff --git a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/validate.sh b/vendor/github.com/rcrowley/go-metrics/validate.sh
index f6499982e..f6499982e 100644..100755
--- a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/validate.sh
+++ b/vendor/github.com/rcrowley/go-metrics/validate.sh
diff --git a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/writer.go b/vendor/github.com/rcrowley/go-metrics/writer.go
index 091e971d2..091e971d2 100644
--- a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/writer.go
+++ b/vendor/github.com/rcrowley/go-metrics/writer.go
diff --git a/Godeps/_workspace/src/github.com/rjeczalik/notify/.gitignore b/vendor/github.com/rjeczalik/notify/.gitignore
index 86d4fa8b1..86d4fa8b1 100644
--- a/Godeps/_workspace/src/github.com/rjeczalik/notify/.gitignore
+++ b/vendor/github.com/rjeczalik/notify/.gitignore
diff --git a/Godeps/_workspace/src/github.com/rjeczalik/notify/.travis.yml b/vendor/github.com/rjeczalik/notify/.travis.yml
index c92863d50..c92863d50 100644
--- a/Godeps/_workspace/src/github.com/rjeczalik/notify/.travis.yml
+++ b/vendor/github.com/rjeczalik/notify/.travis.yml
diff --git a/Godeps/_workspace/src/github.com/rjeczalik/notify/AUTHORS b/vendor/github.com/rjeczalik/notify/AUTHORS
index 9262eae69..9262eae69 100644
--- a/Godeps/_workspace/src/github.com/rjeczalik/notify/AUTHORS
+++ b/vendor/github.com/rjeczalik/notify/AUTHORS
diff --git a/Godeps/_workspace/src/github.com/rjeczalik/notify/LICENSE b/vendor/github.com/rjeczalik/notify/LICENSE
index 3e678817b..3e678817b 100644
--- a/Godeps/_workspace/src/github.com/rjeczalik/notify/LICENSE
+++ b/vendor/github.com/rjeczalik/notify/LICENSE
diff --git a/Godeps/_workspace/src/github.com/rjeczalik/notify/README.md b/vendor/github.com/rjeczalik/notify/README.md
index a728d1dd0..a728d1dd0 100644
--- a/Godeps/_workspace/src/github.com/rjeczalik/notify/README.md
+++ b/vendor/github.com/rjeczalik/notify/README.md
diff --git a/Godeps/_workspace/src/github.com/rjeczalik/notify/appveyor.yml b/vendor/github.com/rjeczalik/notify/appveyor.yml
index 8e762d05c..8e762d05c 100644
--- a/Godeps/_workspace/src/github.com/rjeczalik/notify/appveyor.yml
+++ b/vendor/github.com/rjeczalik/notify/appveyor.yml
diff --git a/Godeps/_workspace/src/github.com/rjeczalik/notify/debug.go b/vendor/github.com/rjeczalik/notify/debug.go
index bd9bc468d..bd9bc468d 100644
--- a/Godeps/_workspace/src/github.com/rjeczalik/notify/debug.go
+++ b/vendor/github.com/rjeczalik/notify/debug.go
diff --git a/Godeps/_workspace/src/github.com/rjeczalik/notify/debug_debug.go b/vendor/github.com/rjeczalik/notify/debug_debug.go
index f0622917f..f0622917f 100644
--- a/Godeps/_workspace/src/github.com/rjeczalik/notify/debug_debug.go
+++ b/vendor/github.com/rjeczalik/notify/debug_debug.go
diff --git a/Godeps/_workspace/src/github.com/rjeczalik/notify/doc.go b/vendor/github.com/rjeczalik/notify/doc.go
index 8a99ddda6..8a99ddda6 100644
--- a/Godeps/_workspace/src/github.com/rjeczalik/notify/doc.go
+++ b/vendor/github.com/rjeczalik/notify/doc.go
diff --git a/Godeps/_workspace/src/github.com/rjeczalik/notify/event.go b/vendor/github.com/rjeczalik/notify/event.go
index e045edcec..e045edcec 100644
--- a/Godeps/_workspace/src/github.com/rjeczalik/notify/event.go
+++ b/vendor/github.com/rjeczalik/notify/event.go
diff --git a/Godeps/_workspace/src/github.com/rjeczalik/notify/event_fen.go b/vendor/github.com/rjeczalik/notify/event_fen.go
index a3079385d..a3079385d 100644
--- a/Godeps/_workspace/src/github.com/rjeczalik/notify/event_fen.go
+++ b/vendor/github.com/rjeczalik/notify/event_fen.go
diff --git a/Godeps/_workspace/src/github.com/rjeczalik/notify/event_fsevents.go b/vendor/github.com/rjeczalik/notify/event_fsevents.go
index 6ded80b2c..6ded80b2c 100644
--- a/Godeps/_workspace/src/github.com/rjeczalik/notify/event_fsevents.go
+++ b/vendor/github.com/rjeczalik/notify/event_fsevents.go
diff --git a/Godeps/_workspace/src/github.com/rjeczalik/notify/event_inotify.go b/vendor/github.com/rjeczalik/notify/event_inotify.go
index 82954a9b3..82954a9b3 100644
--- a/Godeps/_workspace/src/github.com/rjeczalik/notify/event_inotify.go
+++ b/vendor/github.com/rjeczalik/notify/event_inotify.go
diff --git a/Godeps/_workspace/src/github.com/rjeczalik/notify/event_kqueue.go b/vendor/github.com/rjeczalik/notify/event_kqueue.go
index 82e2d8cca..82e2d8cca 100644
--- a/Godeps/_workspace/src/github.com/rjeczalik/notify/event_kqueue.go
+++ b/vendor/github.com/rjeczalik/notify/event_kqueue.go
diff --git a/Godeps/_workspace/src/github.com/rjeczalik/notify/event_readdcw.go b/vendor/github.com/rjeczalik/notify/event_readdcw.go
index 11ead9e29..11ead9e29 100644
--- a/Godeps/_workspace/src/github.com/rjeczalik/notify/event_readdcw.go
+++ b/vendor/github.com/rjeczalik/notify/event_readdcw.go
diff --git a/Godeps/_workspace/src/github.com/rjeczalik/notify/event_stub.go b/vendor/github.com/rjeczalik/notify/event_stub.go
index faac7c7cb..faac7c7cb 100644
--- a/Godeps/_workspace/src/github.com/rjeczalik/notify/event_stub.go
+++ b/vendor/github.com/rjeczalik/notify/event_stub.go
diff --git a/Godeps/_workspace/src/github.com/rjeczalik/notify/event_trigger.go b/vendor/github.com/rjeczalik/notify/event_trigger.go
index 94470fd37..94470fd37 100644
--- a/Godeps/_workspace/src/github.com/rjeczalik/notify/event_trigger.go
+++ b/vendor/github.com/rjeczalik/notify/event_trigger.go
diff --git a/Godeps/_workspace/src/github.com/rjeczalik/notify/node.go b/vendor/github.com/rjeczalik/notify/node.go
index 4302071bb..29c1bb20a 100644
--- a/Godeps/_workspace/src/github.com/rjeczalik/notify/node.go
+++ b/vendor/github.com/rjeczalik/notify/node.go
@@ -6,6 +6,7 @@ package notify
import (
"errors"
+ "fmt"
"io/ioutil"
"os"
"path/filepath"
@@ -70,7 +71,7 @@ Traverse:
case errSkip:
continue Traverse
default:
- return err
+ return fmt.Errorf("error while traversing %q: %v", nd.Name, err)
}
// TODO(rjeczalik): tolerate open failures - add failed names to
// AddDirError and notify users which names are not added to the tree.
diff --git a/Godeps/_workspace/src/github.com/rjeczalik/notify/notify.go b/vendor/github.com/rjeczalik/notify/notify.go
index dbf1e7bc2..dbf1e7bc2 100644
--- a/Godeps/_workspace/src/github.com/rjeczalik/notify/notify.go
+++ b/vendor/github.com/rjeczalik/notify/notify.go
diff --git a/Godeps/_workspace/src/github.com/rjeczalik/notify/tree.go b/vendor/github.com/rjeczalik/notify/tree.go
index cd6afd60d..cd6afd60d 100644
--- a/Godeps/_workspace/src/github.com/rjeczalik/notify/tree.go
+++ b/vendor/github.com/rjeczalik/notify/tree.go
diff --git a/Godeps/_workspace/src/github.com/rjeczalik/notify/tree_nonrecursive.go b/vendor/github.com/rjeczalik/notify/tree_nonrecursive.go
index dfa72d1d2..dfa72d1d2 100644
--- a/Godeps/_workspace/src/github.com/rjeczalik/notify/tree_nonrecursive.go
+++ b/vendor/github.com/rjeczalik/notify/tree_nonrecursive.go
diff --git a/Godeps/_workspace/src/github.com/rjeczalik/notify/tree_recursive.go b/vendor/github.com/rjeczalik/notify/tree_recursive.go
index 7f00dfe35..7f00dfe35 100644
--- a/Godeps/_workspace/src/github.com/rjeczalik/notify/tree_recursive.go
+++ b/vendor/github.com/rjeczalik/notify/tree_recursive.go
diff --git a/Godeps/_workspace/src/github.com/rjeczalik/notify/util.go b/vendor/github.com/rjeczalik/notify/util.go
index 67e01fbbd..67e01fbbd 100644
--- a/Godeps/_workspace/src/github.com/rjeczalik/notify/util.go
+++ b/vendor/github.com/rjeczalik/notify/util.go
diff --git a/Godeps/_workspace/src/github.com/rjeczalik/notify/watcher.go b/vendor/github.com/rjeczalik/notify/watcher.go
index 34148eff3..34148eff3 100644
--- a/Godeps/_workspace/src/github.com/rjeczalik/notify/watcher.go
+++ b/vendor/github.com/rjeczalik/notify/watcher.go
diff --git a/Godeps/_workspace/src/github.com/rjeczalik/notify/watcher_fen.go b/vendor/github.com/rjeczalik/notify/watcher_fen.go
index 60e9a36da..60e9a36da 100644
--- a/Godeps/_workspace/src/github.com/rjeczalik/notify/watcher_fen.go
+++ b/vendor/github.com/rjeczalik/notify/watcher_fen.go
diff --git a/Godeps/_workspace/src/github.com/rjeczalik/notify/watcher_fen_cgo.go b/vendor/github.com/rjeczalik/notify/watcher_fen_cgo.go
index 58ac8e8c6..58ac8e8c6 100644
--- a/Godeps/_workspace/src/github.com/rjeczalik/notify/watcher_fen_cgo.go
+++ b/vendor/github.com/rjeczalik/notify/watcher_fen_cgo.go
diff --git a/Godeps/_workspace/src/github.com/rjeczalik/notify/watcher_fsevents.go b/vendor/github.com/rjeczalik/notify/watcher_fsevents.go
index 9062c17c7..9062c17c7 100644
--- a/Godeps/_workspace/src/github.com/rjeczalik/notify/watcher_fsevents.go
+++ b/vendor/github.com/rjeczalik/notify/watcher_fsevents.go
diff --git a/Godeps/_workspace/src/github.com/rjeczalik/notify/watcher_fsevents_cgo.go b/vendor/github.com/rjeczalik/notify/watcher_fsevents_cgo.go
index ee9631a61..ee9631a61 100644
--- a/Godeps/_workspace/src/github.com/rjeczalik/notify/watcher_fsevents_cgo.go
+++ b/vendor/github.com/rjeczalik/notify/watcher_fsevents_cgo.go
diff --git a/Godeps/_workspace/src/github.com/rjeczalik/notify/watcher_inotify.go b/vendor/github.com/rjeczalik/notify/watcher_inotify.go
index 3ceaa8f3a..3ceaa8f3a 100644
--- a/Godeps/_workspace/src/github.com/rjeczalik/notify/watcher_inotify.go
+++ b/vendor/github.com/rjeczalik/notify/watcher_inotify.go
diff --git a/Godeps/_workspace/src/github.com/rjeczalik/notify/watcher_kqueue.go b/vendor/github.com/rjeczalik/notify/watcher_kqueue.go
index d5f7788c4..d5f7788c4 100644
--- a/Godeps/_workspace/src/github.com/rjeczalik/notify/watcher_kqueue.go
+++ b/vendor/github.com/rjeczalik/notify/watcher_kqueue.go
diff --git a/Godeps/_workspace/src/github.com/rjeczalik/notify/watcher_readdcw.go b/vendor/github.com/rjeczalik/notify/watcher_readdcw.go
index e8359bba4..5923bfdda 100644
--- a/Godeps/_workspace/src/github.com/rjeczalik/notify/watcher_readdcw.go
+++ b/vendor/github.com/rjeczalik/notify/watcher_readdcw.go
@@ -377,7 +377,7 @@ func (r *readdcw) loopevent(n uint32, overEx *overlappedEx) {
var currOffset uint32
for {
raw := (*syscall.FileNotifyInformation)(unsafe.Pointer(&overEx.parent.buffer[currOffset]))
- name := syscall.UTF16ToString((*[syscall.MAX_PATH]uint16)(unsafe.Pointer(&raw.FileName))[:raw.FileNameLength>>1])
+ name := syscall.UTF16ToString((*[syscall.MAX_LONG_PATH]uint16)(unsafe.Pointer(&raw.FileName))[:raw.FileNameLength>>1])
events = append(events, &event{
pathw: overEx.parent.pathw,
filter: overEx.parent.filter,
diff --git a/Godeps/_workspace/src/github.com/rjeczalik/notify/watcher_stub.go b/vendor/github.com/rjeczalik/notify/watcher_stub.go
index 68b9c135b..68b9c135b 100644
--- a/Godeps/_workspace/src/github.com/rjeczalik/notify/watcher_stub.go
+++ b/vendor/github.com/rjeczalik/notify/watcher_stub.go
diff --git a/Godeps/_workspace/src/github.com/rjeczalik/notify/watcher_trigger.go b/vendor/github.com/rjeczalik/notify/watcher_trigger.go
index f25a6fcbf..f25a6fcbf 100644
--- a/Godeps/_workspace/src/github.com/rjeczalik/notify/watcher_trigger.go
+++ b/vendor/github.com/rjeczalik/notify/watcher_trigger.go
diff --git a/Godeps/_workspace/src/github.com/rjeczalik/notify/watchpoint.go b/vendor/github.com/rjeczalik/notify/watchpoint.go
index 5afc914f4..5afc914f4 100644
--- a/Godeps/_workspace/src/github.com/rjeczalik/notify/watchpoint.go
+++ b/vendor/github.com/rjeczalik/notify/watchpoint.go
diff --git a/Godeps/_workspace/src/github.com/rjeczalik/notify/watchpoint_other.go b/vendor/github.com/rjeczalik/notify/watchpoint_other.go
index 881631c99..881631c99 100644
--- a/Godeps/_workspace/src/github.com/rjeczalik/notify/watchpoint_other.go
+++ b/vendor/github.com/rjeczalik/notify/watchpoint_other.go
diff --git a/Godeps/_workspace/src/github.com/rjeczalik/notify/watchpoint_readdcw.go b/vendor/github.com/rjeczalik/notify/watchpoint_readdcw.go
index 9fd1e1df3..9fd1e1df3 100644
--- a/Godeps/_workspace/src/github.com/rjeczalik/notify/watchpoint_readdcw.go
+++ b/vendor/github.com/rjeczalik/notify/watchpoint_readdcw.go
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/.gitignore b/vendor/github.com/robertkrimen/otto/.gitignore
index 8c2a16949..8c2a16949 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/.gitignore
+++ b/vendor/github.com/robertkrimen/otto/.gitignore
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/DESIGN.markdown b/vendor/github.com/robertkrimen/otto/DESIGN.markdown
index 288752987..288752987 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/DESIGN.markdown
+++ b/vendor/github.com/robertkrimen/otto/DESIGN.markdown
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/LICENSE b/vendor/github.com/robertkrimen/otto/LICENSE
index b6179fe38..b6179fe38 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/LICENSE
+++ b/vendor/github.com/robertkrimen/otto/LICENSE
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/Makefile b/vendor/github.com/robertkrimen/otto/Makefile
index 8d74038eb..9868db3ca 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/Makefile
+++ b/vendor/github.com/robertkrimen/otto/Makefile
@@ -18,7 +18,7 @@ test: parser inline.go
parser:
$(MAKE) -C parser
-inline.go: inline
+inline.go: inline.pl
./$< > $@
#################
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/README.markdown b/vendor/github.com/robertkrimen/otto/README.markdown
index fe8e1bd4a..ed14f0ae9 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/README.markdown
+++ b/vendor/github.com/robertkrimen/otto/README.markdown
@@ -1,87 +1,108 @@
# otto
--
- import "github.com/robertkrimen/otto"
+```go
+import "github.com/robertkrimen/otto"
+```
Package otto is a JavaScript parser and interpreter written natively in Go.
http://godoc.org/github.com/robertkrimen/otto
- import (
- "github.com/robertkrimen/otto"
- )
+```go
+import (
+ "github.com/robertkrimen/otto"
+)
+```
Run something in the VM
- vm := otto.New()
- vm.Run(`
- abc = 2 + 2;
- console.log("The value of abc is " + abc); // 4
- `)
+```go
+vm := otto.New()
+vm.Run(`
+ abc = 2 + 2;
+ console.log("The value of abc is " + abc); // 4
+`)
+```
Get a value out of the VM
- if value, err := vm.Get("abc"); err == nil {
- if value_int, err := value.ToInteger(); err == nil {
- fmt.Printf("", value_int, err)
- }
+```go
+if value, err := vm.Get("abc"); err == nil {
+ if value_int, err := value.ToInteger(); err == nil {
+ fmt.Printf("", value_int, err)
}
+}
+```
Set a number
- vm.Set("def", 11)
- vm.Run(`
- console.log("The value of def is " + def);
- // The value of def is 11
- `)
+```go
+vm.Set("def", 11)
+vm.Run(`
+ console.log("The value of def is " + def);
+ // The value of def is 11
+`)
+```
Set a string
- vm.Set("xyzzy", "Nothing happens.")
- vm.Run(`
- console.log(xyzzy.length); // 16
- `)
+```go
+vm.Set("xyzzy", "Nothing happens.")
+vm.Run(`
+ console.log(xyzzy.length); // 16
+`)
+```
Get the value of an expression
- value, _ = vm.Run("xyzzy.length")
- {
- // value is an int64 with a value of 16
- value, _ := value.ToInteger()
- }
+```go
+value, _ = vm.Run("xyzzy.length")
+{
+ // value is an int64 with a value of 16
+ value, _ := value.ToInteger()
+}
+```
An error happens
- value, err = vm.Run("abcdefghijlmnopqrstuvwxyz.length")
- if err != nil {
- // err = ReferenceError: abcdefghijlmnopqrstuvwxyz is not defined
- // If there is an error, then value.IsUndefined() is true
- ...
- }
+```go
+value, err = vm.Run("abcdefghijlmnopqrstuvwxyz.length")
+if err != nil {
+ // err = ReferenceError: abcdefghijlmnopqrstuvwxyz is not defined
+ // If there is an error, then value.IsUndefined() is true
+ ...
+}
+```
Set a Go function
- vm.Set("sayHello", func(call otto.FunctionCall) otto.Value {
- fmt.Printf("Hello, %s.\n", call.Argument(0).String())
- return otto.Value{}
- })
+```go
+vm.Set("sayHello", func(call otto.FunctionCall) otto.Value {
+ fmt.Printf("Hello, %s.\n", call.Argument(0).String())
+ return otto.Value{}
+})
+```
Set a Go function that returns something useful
- vm.Set("twoPlus", func(call otto.FunctionCall) otto.Value {
- right, _ := call.Argument(0).ToInteger()
- result, _ := vm.ToValue(2 + right)
- return result
- })
+```go
+vm.Set("twoPlus", func(call otto.FunctionCall) otto.Value {
+ right, _ := call.Argument(0).ToInteger()
+ result, _ := vm.ToValue(2 + right)
+ return result
+})
+```
Use the functions in JavaScript
- result, _ = vm.Run(`
- sayHello("Xyzzy"); // Hello, Xyzzy.
- sayHello(); // Hello, undefined
-
- result = twoPlus(2.0); // 4
- `)
+```go
+result, _ = vm.Run(`
+ sayHello("Xyzzy"); // Hello, Xyzzy.
+ sayHello(); // Hello, undefined
+ result = twoPlus(2.0); // 4
+`)
+```
### Parser
@@ -92,23 +113,25 @@ http://godoc.org/github.com/robertkrimen/otto/parser
Parse and return an AST
- filename := "" // A filename is optional
- src := `
- // Sample xyzzy example
- (function(){
- if (3.14159 > 0) {
- console.log("Hello, World.");
- return;
- }
+```go
+filenamee := "" // A filename is optional
+src := `
+ // Sample xyzzy example
+ (function(){
+ if (3.14159 > 0) {
+ console.log("Hello, World.");
+ return;
+ }
- var xyzzy = NaN;
- console.log("Nothing happens.");
- return xyzzy;
- })();
- `
+ var xyzzy = NaN;
+ console.log("Nothing happens.");
+ return xyzzy;
+ })();
+`
- // Parse some JavaScript, yielding a *ast.Program and/or an ErrorList
- program, err := parser.ParseFile(nil, filename, src, 0)
+// Parse some JavaScript, yielding a *ast.Program and/or an ErrorList
+program, err := parser.ParseFile(nil, filename, src, 0)
+```
### otto
@@ -126,12 +149,14 @@ Run JavaScript by entering some source on stdin or by giving otto a filename:
Optionally include the JavaScript utility-belt library, underscore, with this
import:
- import (
- "github.com/robertkrimen/otto"
- _ "github.com/robertkrimen/otto/underscore"
- )
+```go
+import (
+ "github.com/robertkrimen/otto"
+ _ "github.com/robertkrimen/otto/underscore"
+)
- // Now every otto runtime will come loaded with underscore
+// Now every otto runtime will come loaded with underscore
+```
For more information: http://github.com/robertkrimen/otto/tree/master/underscore
@@ -142,6 +167,7 @@ The following are some limitations with otto:
* "use strict" will parse, but does nothing.
* The regular expression engine (re2/regexp) is not fully compatible with the ECMA5 specification.
+ * Otto targets ES5. ES6 features (eg: Typed Arrays) are not supported.
### Regular Expression Incompatibility
@@ -172,53 +198,55 @@ In addition to the above, re2 (Go) has a different definition for \s: [\t\n\f\r
If you want to stop long running executions (like third-party code), you can use
the interrupt channel to do this:
- package main
+```go
+package main
- import (
- "errors"
- "fmt"
- "os"
- "time"
+import (
+ "errors"
+ "fmt"
+ "os"
+ "time"
- "github.com/robertkrimen/otto"
- )
+ "github.com/robertkrimen/otto"
+)
- var halt = errors.New("Stahp")
+var halt = errors.New("Stahp")
- func main() {
- runUnsafe(`var abc = [];`)
- runUnsafe(`
- while (true) {
- // Loop forever
- }`)
- }
+func main() {
+ runUnsafe(`var abc = [];`)
+ runUnsafe(`
+ while (true) {
+ // Loop forever
+ }`)
+}
- func runUnsafe(unsafe string) {
- start := time.Now()
- defer func() {
- duration := time.Since(start)
- if caught := recover(); caught != nil {
- if caught == halt {
- fmt.Fprintf(os.Stderr, "Some code took to long! Stopping after: %v\n", duration)
- return
- }
- panic(caught) // Something else happened, repanic!
+func runUnsafe(unsafe string) {
+ start := time.Now()
+ defer func() {
+ duration := time.Since(start)
+ if caught := recover(); caught != nil {
+ if caught == halt {
+ fmt.Fprintf(os.Stderr, "Some code took to long! Stopping after: %v\n", duration)
+ return
}
- fmt.Fprintf(os.Stderr, "Ran code successfully: %v\n", duration)
- }()
+ panic(caught) // Something else happened, repanic!
+ }
+ fmt.Fprintf(os.Stderr, "Ran code successfully: %v\n", duration)
+ }()
- vm := otto.New()
- vm.Interrupt = make(chan func(), 1) // The buffer prevents blocking
+ vm := otto.New()
+ vm.Interrupt = make(chan func(), 1) // The buffer prevents blocking
- go func() {
- time.Sleep(2 * time.Second) // Stop after two seconds
- vm.Interrupt <- func() {
- panic(halt)
- }
- }()
+ go func() {
+ time.Sleep(2 * time.Second) // Stop after two seconds
+ vm.Interrupt <- func() {
+ panic(halt)
+ }
+ }()
- vm.Run(unsafe) // Here be dragons (risky code)
- }
+ vm.Run(unsafe) // Here be dragons (risky code)
+}
+```
Where is setTimeout/setInterval?
@@ -425,15 +453,17 @@ If source begins with "new " (A lowercase new followed by a space), then Call
will invoke the function constructor rather than performing a function call. In
this case, the this argument has no effect.
- // value is a String object
- value, _ := vm.Call("Object", nil, "Hello, World.")
+```go
+// value is a String object
+value, _ := vm.Call("Object", nil, "Hello, World.")
- // Likewise...
- value, _ := vm.Call("new Object", nil, "Hello, World.")
+// Likewise...
+value, _ := vm.Call("new Object", nil, "Hello, World.")
- // This will perform a concat on the given array and return the result
- // value is [ 1, 2, 3, undefined, 4, 5, 6, 7, "abc" ]
- value, _ := vm.Call(`[ 1, 2, 3, undefined, 4 ].concat`, nil, 5, 6, 7, "abc")
+// This will perform a concat on the given array and return the result
+// value is [ 1, 2, 3, undefined, 4, 5, 6, 7, "abc" ]
+value, _ := vm.Call(`[ 1, 2, 3, undefined, 4 ].concat`, nil, 5, 6, 7, "abc")
+```
#### func (*Otto) Compile
@@ -443,8 +473,10 @@ func (self *Otto) Compile(filename string, src interface{}) (*Script, error)
Compile will parse the given source and return a Script value or nil and an
error if there was a problem during compilation.
- script, err := vm.Compile("", `var abc; if (!abc) abc = 0; abc += 2; abc;`)
- vm.Run(script)
+```go
+script, err := vm.Compile("", `var abc; if (!abc) abc = 0; abc += 2; abc;`)
+vm.Run(script)
+```
#### func (*Otto) Copy
@@ -479,16 +511,22 @@ Object will run the given source and return the result as an object.
For example, accessing an existing object:
- object, _ := vm.Object(`Number`)
+```go
+object, _ := vm.Object(`Number`)
+```
Or, creating a new object:
- object, _ := vm.Object(`({ xyzzy: "Nothing happens." })`)
+```go
+object, _ := vm.Object(`({ xyzzy: "Nothing happens." })`)
+```
Or, creating and assigning an object:
- object, _ := vm.Object(`xyzzy = {}`)
- object.Set("volume", 11)
+```go
+object, _ := vm.Object(`xyzzy = {}`)
+object.Set("volume", 11)
+```
If there is an error (like the source does not result in an object), then nil
and an error is returned.
@@ -569,7 +607,9 @@ FalseValue will return a value representing false.
It is equivalent to:
- ToValue(false)
+```go
+ToValue(false)
+```
#### func NaNValue
@@ -580,7 +620,9 @@ NaNValue will return a value representing NaN.
It is equivalent to:
- ToValue(math.NaN())
+```go
+ToValue(math.NaN())
+```
#### func NullValue
@@ -609,7 +651,9 @@ TrueValue will return a value representing true.
It is equivalent to:
- ToValue(true)
+```go
+ToValue(true)
+```
#### func UndefinedValue
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/ast/README.markdown b/vendor/github.com/robertkrimen/otto/ast/README.markdown
index a785da911..a785da911 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/ast/README.markdown
+++ b/vendor/github.com/robertkrimen/otto/ast/README.markdown
diff --git a/vendor/github.com/robertkrimen/otto/ast/comments.go b/vendor/github.com/robertkrimen/otto/ast/comments.go
new file mode 100644
index 000000000..ef2cc3d89
--- /dev/null
+++ b/vendor/github.com/robertkrimen/otto/ast/comments.go
@@ -0,0 +1,278 @@
+package ast
+
+import (
+ "fmt"
+ "github.com/robertkrimen/otto/file"
+)
+
+// CommentPosition determines where the comment is in a given context
+type CommentPosition int
+
+const (
+ _ CommentPosition = iota
+ LEADING // Before the pertinent expression
+ TRAILING // After the pertinent expression
+ KEY // Before a key in an object
+ COLON // After a colon in a field declaration
+ FINAL // Final comments in a block, not belonging to a specific expression or the comment after a trailing , in an array or object literal
+ IF // After an if keyword
+ WHILE // After a while keyword
+ DO // After do keyword
+ FOR // After a for keyword
+ WITH // After a with keyword
+ TBD
+)
+
+// Comment contains the data of the comment
+type Comment struct {
+ Begin file.Idx
+ Text string
+ Position CommentPosition
+}
+
+// NewComment creates a new comment
+func NewComment(text string, idx file.Idx) *Comment {
+ comment := &Comment{
+ Begin: idx,
+ Text: text,
+ Position: TBD,
+ }
+
+ return comment
+}
+
+// String returns a stringified version of the position
+func (cp CommentPosition) String() string {
+ switch cp {
+ case LEADING:
+ return "Leading"
+ case TRAILING:
+ return "Trailing"
+ case KEY:
+ return "Key"
+ case COLON:
+ return "Colon"
+ case FINAL:
+ return "Final"
+ case IF:
+ return "If"
+ case WHILE:
+ return "While"
+ case DO:
+ return "Do"
+ case FOR:
+ return "For"
+ case WITH:
+ return "With"
+ default:
+ return "???"
+ }
+}
+
+// String returns a stringified version of the comment
+func (c Comment) String() string {
+ return fmt.Sprintf("Comment: %v", c.Text)
+}
+
+// Comments defines the current view of comments from the parser
+type Comments struct {
+ // CommentMap is a reference to the parser comment map
+ CommentMap CommentMap
+ // Comments lists the comments scanned, not linked to a node yet
+ Comments []*Comment
+ // future lists the comments after a line break during a sequence of comments
+ future []*Comment
+ // Current is node for which comments are linked to
+ Current Expression
+
+ // wasLineBreak determines if a line break occured while scanning for comments
+ wasLineBreak bool
+ // primary determines whether or not processing a primary expression
+ primary bool
+ // afterBlock determines whether or not being after a block statement
+ afterBlock bool
+}
+
+func NewComments() *Comments {
+ comments := &Comments{
+ CommentMap: CommentMap{},
+ }
+
+ return comments
+}
+
+func (c *Comments) String() string {
+ return fmt.Sprintf("NODE: %v, Comments: %v, Future: %v(LINEBREAK:%v)", c.Current, len(c.Comments), len(c.future), c.wasLineBreak)
+}
+
+// FetchAll returns all the currently scanned comments,
+// including those from the next line
+func (c *Comments) FetchAll() []*Comment {
+ defer func() {
+ c.Comments = nil
+ c.future = nil
+ }()
+
+ return append(c.Comments, c.future...)
+}
+
+// Fetch returns all the currently scanned comments
+func (c *Comments) Fetch() []*Comment {
+ defer func() {
+ c.Comments = nil
+ }()
+
+ return c.Comments
+}
+
+// ResetLineBreak marks the beginning of a new statement
+func (c *Comments) ResetLineBreak() {
+ c.wasLineBreak = false
+}
+
+// MarkPrimary will mark the context as processing a primary expression
+func (c *Comments) MarkPrimary() {
+ c.primary = true
+ c.wasLineBreak = false
+}
+
+// AfterBlock will mark the context as being after a block.
+func (c *Comments) AfterBlock() {
+ c.afterBlock = true
+}
+
+// AddComment adds a comment to the view.
+// Depending on the context, comments are added normally or as post line break.
+func (c *Comments) AddComment(comment *Comment) {
+ if c.primary {
+ if !c.wasLineBreak {
+ c.Comments = append(c.Comments, comment)
+ } else {
+ c.future = append(c.future, comment)
+ }
+ } else {
+ if !c.wasLineBreak || (c.Current == nil && !c.afterBlock) {
+ c.Comments = append(c.Comments, comment)
+ } else {
+ c.future = append(c.future, comment)
+ }
+ }
+}
+
+// MarkComments will mark the found comments as the given position.
+func (c *Comments) MarkComments(position CommentPosition) {
+ for _, comment := range c.Comments {
+ if comment.Position == TBD {
+ comment.Position = position
+ }
+ }
+ for _, c := range c.future {
+ if c.Position == TBD {
+ c.Position = position
+ }
+ }
+}
+
+// Unset the current node and apply the comments to the current expression.
+// Resets context variables.
+func (c *Comments) Unset() {
+ if c.Current != nil {
+ c.applyComments(c.Current, c.Current, TRAILING)
+ c.Current = nil
+ }
+ c.wasLineBreak = false
+ c.primary = false
+ c.afterBlock = false
+}
+
+// SetExpression sets the current expression.
+// It is applied the found comments, unless the previous expression has not been unset.
+// It is skipped if the node is already set or if it is a part of the previous node.
+func (c *Comments) SetExpression(node Expression) {
+ // Skipping same node
+ if c.Current == node {
+ return
+ }
+ if c.Current != nil && c.Current.Idx1() == node.Idx1() {
+ c.Current = node
+ return
+ }
+ previous := c.Current
+ c.Current = node
+
+ // Apply the found comments and futures to the node and the previous.
+ c.applyComments(node, previous, TRAILING)
+}
+
+// PostProcessNode applies all found comments to the given node
+func (c *Comments) PostProcessNode(node Node) {
+ c.applyComments(node, nil, TRAILING)
+}
+
+// applyComments applies both the comments and the future comments to the given node and the previous one,
+// based on the context.
+func (c *Comments) applyComments(node, previous Node, position CommentPosition) {
+ if previous != nil {
+ c.CommentMap.AddComments(previous, c.Comments, position)
+ c.Comments = nil
+ } else {
+ c.CommentMap.AddComments(node, c.Comments, position)
+ c.Comments = nil
+ }
+ // Only apply the future comments to the node if the previous is set.
+ // This is for detecting end of line comments and which node comments on the following lines belongs to
+ if previous != nil {
+ c.CommentMap.AddComments(node, c.future, position)
+ c.future = nil
+ }
+}
+
+// AtLineBreak will mark a line break
+func (c *Comments) AtLineBreak() {
+ c.wasLineBreak = true
+}
+
+// CommentMap is the data structure where all found comments are stored
+type CommentMap map[Node][]*Comment
+
+// AddComment adds a single comment to the map
+func (cm CommentMap) AddComment(node Node, comment *Comment) {
+ list := cm[node]
+ list = append(list, comment)
+
+ cm[node] = list
+}
+
+// AddComments adds a slice of comments, given a node and an updated position
+func (cm CommentMap) AddComments(node Node, comments []*Comment, position CommentPosition) {
+ for _, comment := range comments {
+ if comment.Position == TBD {
+ comment.Position = position
+ }
+ cm.AddComment(node, comment)
+ }
+}
+
+// Size returns the size of the map
+func (cm CommentMap) Size() int {
+ size := 0
+ for _, comments := range cm {
+ size += len(comments)
+ }
+
+ return size
+}
+
+// MoveComments moves comments with a given position from a node to another
+func (cm CommentMap) MoveComments(from, to Node, position CommentPosition) {
+ for i, c := range cm[from] {
+ if c.Position == position {
+ cm.AddComment(to, c)
+
+ // Remove the comment from the "from" slice
+ cm[from][i] = cm[from][len(cm[from])-1]
+ cm[from][len(cm[from])-1] = nil
+ cm[from] = cm[from][:len(cm[from])-1]
+ }
+ }
+}
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/ast/node.go b/vendor/github.com/robertkrimen/otto/ast/node.go
index 8a651dc2f..49ae375d1 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/ast/node.go
+++ b/vendor/github.com/robertkrimen/otto/ast/node.go
@@ -83,7 +83,7 @@ type (
DotExpression struct {
Left Expression
- Identifier Identifier
+ Identifier *Identifier
}
EmptyExpression struct {
@@ -277,6 +277,10 @@ type (
Body Statement
}
+ FunctionStatement struct {
+ Function *FunctionLiteral
+ }
+
IfStatement struct {
If file.Idx
Test Expression
@@ -345,6 +349,7 @@ func (*EmptyStatement) _statementNode() {}
func (*ExpressionStatement) _statementNode() {}
func (*ForInStatement) _statementNode() {}
func (*ForStatement) _statementNode() {}
+func (*FunctionStatement) _statementNode() {}
func (*IfStatement) _statementNode() {}
func (*LabelledStatement) _statementNode() {}
func (*ReturnStatement) _statementNode() {}
@@ -390,6 +395,8 @@ type Program struct {
DeclarationList []Declaration
File *file.File
+
+ Comments CommentMap
}
// ==== //
@@ -430,6 +437,7 @@ func (self *EmptyStatement) Idx0() file.Idx { return self.Semicolon }
func (self *ExpressionStatement) Idx0() file.Idx { return self.Expression.Idx0() }
func (self *ForInStatement) Idx0() file.Idx { return self.For }
func (self *ForStatement) Idx0() file.Idx { return self.For }
+func (self *FunctionStatement) Idx0() file.Idx { return self.Function.Idx0() }
func (self *IfStatement) Idx0() file.Idx { return self.If }
func (self *LabelledStatement) Idx0() file.Idx { return self.Label.Idx0() }
func (self *Program) Idx0() file.Idx { return self.Body[0].Idx0() }
@@ -489,6 +497,7 @@ func (self *EmptyStatement) Idx1() file.Idx { return self.Semicolon + 1 }
func (self *ExpressionStatement) Idx1() file.Idx { return self.Expression.Idx1() }
func (self *ForInStatement) Idx1() file.Idx { return self.Body.Idx1() }
func (self *ForStatement) Idx1() file.Idx { return self.Body.Idx1() }
+func (self *FunctionStatement) Idx1() file.Idx { return self.Function.Idx1() }
func (self *IfStatement) Idx1() file.Idx {
if self.Alternate != nil {
return self.Alternate.Idx1()
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/builtin.go b/vendor/github.com/robertkrimen/otto/builtin.go
index c3375a108..83f715083 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/builtin.go
+++ b/vendor/github.com/robertkrimen/otto/builtin.go
@@ -18,7 +18,7 @@ func builtinGlobal_eval(call FunctionCall) Value {
return src
}
runtime := call.runtime
- program := runtime.cmpl_parseOrThrow(src.string())
+ program := runtime.cmpl_parseOrThrow(src.string(), nil)
if !call.eval {
// Not a direct call to eval, so we enter the global ExecutionContext
runtime.enterGlobalScope()
@@ -159,7 +159,7 @@ func builtinGlobal_parseFloat(call FunctionCall) Value {
}
value, err := strconv.ParseFloat(input, 64)
if err != nil {
- for end := len(input); end > 0; end -= 1 {
+ for end := len(input); end > 0; end-- {
input := input[0:end]
if !parseFloat_matchValid.MatchString(input) {
return NaNValue()
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/builtin_array.go b/vendor/github.com/robertkrimen/otto/builtin_array.go
index 160a251c6..557ffc024 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/builtin_array.go
+++ b/vendor/github.com/robertkrimen/otto/builtin_array.go
@@ -416,27 +416,36 @@ func arraySortSwap(thisObject *_object, index0, index1 uint) {
}
}
-func arraySortQuickPartition(thisObject *_object, left, right, pivot uint, compare *_object) uint {
+func arraySortQuickPartition(thisObject *_object, left, right, pivot uint, compare *_object) (uint, uint) {
arraySortSwap(thisObject, pivot, right) // Right is now the pivot value
cursor := left
+ cursor2 := left
for index := left; index < right; index++ {
- if sortCompare(thisObject, index, right, compare) < 0 { // Compare to the pivot value
+ comparison := sortCompare(thisObject, index, right, compare) // Compare to the pivot value
+ if comparison < 0 {
arraySortSwap(thisObject, index, cursor)
+ if cursor < cursor2 {
+ arraySortSwap(thisObject, index, cursor2)
+ }
cursor += 1
+ cursor2 += 1
+ } else if comparison == 0 {
+ arraySortSwap(thisObject, index, cursor2)
+ cursor2 += 1
}
}
- arraySortSwap(thisObject, cursor, right)
- return cursor
+ arraySortSwap(thisObject, cursor2, right)
+ return cursor, cursor2
}
func arraySortQuickSort(thisObject *_object, left, right uint, compare *_object) {
if left < right {
- pivot := left + (right-left)/2
- pivot = arraySortQuickPartition(thisObject, left, right, pivot, compare)
+ middle := left + (right-left)/2
+ pivot, pivot2 := arraySortQuickPartition(thisObject, left, right, middle, compare)
if pivot > 0 {
arraySortQuickSort(thisObject, left, pivot-1, compare)
}
- arraySortQuickSort(thisObject, pivot+1, right, compare)
+ arraySortQuickSort(thisObject, pivot2+1, right, compare)
}
}
@@ -653,7 +662,7 @@ func builtinArray_reduceRight(call FunctionCall) Value {
for ; index >= 0; index-- {
if key := arrayIndexToString(index); thisObject.hasProperty(key) {
accumulator = thisObject.get(key)
- index -= 1
+ index--
break
}
}
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/builtin_boolean.go b/vendor/github.com/robertkrimen/otto/builtin_boolean.go
index 59b8e789b..59b8e789b 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/builtin_boolean.go
+++ b/vendor/github.com/robertkrimen/otto/builtin_boolean.go
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/builtin_date.go b/vendor/github.com/robertkrimen/otto/builtin_date.go
index f20bf8e3f..f20bf8e3f 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/builtin_date.go
+++ b/vendor/github.com/robertkrimen/otto/builtin_date.go
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/builtin_error.go b/vendor/github.com/robertkrimen/otto/builtin_error.go
index 4c054fbea..41da84ef2 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/builtin_error.go
+++ b/vendor/github.com/robertkrimen/otto/builtin_error.go
@@ -5,11 +5,11 @@ import (
)
func builtinError(call FunctionCall) Value {
- return toValue_object(call.runtime.newError("", call.Argument(0)))
+ return toValue_object(call.runtime.newError("Error", call.Argument(0), 1))
}
func builtinNewError(self *_object, argumentList []Value) Value {
- return toValue_object(self.runtime.newError("", valueOfArrayIndex(argumentList, 0)))
+ return toValue_object(self.runtime.newError("Error", valueOfArrayIndex(argumentList, 0), 0))
}
func builtinError_toString(call FunctionCall) Value {
@@ -42,7 +42,7 @@ func builtinError_toString(call FunctionCall) Value {
}
func (runtime *_runtime) newEvalError(message Value) *_object {
- self := runtime.newErrorObject("EvalError", message)
+ self := runtime.newErrorObject("EvalError", message, 0)
self.prototype = runtime.global.EvalErrorPrototype
return self
}
@@ -56,7 +56,7 @@ func builtinNewEvalError(self *_object, argumentList []Value) Value {
}
func (runtime *_runtime) newTypeError(message Value) *_object {
- self := runtime.newErrorObject("TypeError", message)
+ self := runtime.newErrorObject("TypeError", message, 0)
self.prototype = runtime.global.TypeErrorPrototype
return self
}
@@ -70,7 +70,7 @@ func builtinNewTypeError(self *_object, argumentList []Value) Value {
}
func (runtime *_runtime) newRangeError(message Value) *_object {
- self := runtime.newErrorObject("RangeError", message)
+ self := runtime.newErrorObject("RangeError", message, 0)
self.prototype = runtime.global.RangeErrorPrototype
return self
}
@@ -84,13 +84,13 @@ func builtinNewRangeError(self *_object, argumentList []Value) Value {
}
func (runtime *_runtime) newURIError(message Value) *_object {
- self := runtime.newErrorObject("URIError", message)
+ self := runtime.newErrorObject("URIError", message, 0)
self.prototype = runtime.global.URIErrorPrototype
return self
}
func (runtime *_runtime) newReferenceError(message Value) *_object {
- self := runtime.newErrorObject("ReferenceError", message)
+ self := runtime.newErrorObject("ReferenceError", message, 0)
self.prototype = runtime.global.ReferenceErrorPrototype
return self
}
@@ -104,7 +104,7 @@ func builtinNewReferenceError(self *_object, argumentList []Value) Value {
}
func (runtime *_runtime) newSyntaxError(message Value) *_object {
- self := runtime.newErrorObject("SyntaxError", message)
+ self := runtime.newErrorObject("SyntaxError", message, 0)
self.prototype = runtime.global.SyntaxErrorPrototype
return self
}
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/builtin_function.go b/vendor/github.com/robertkrimen/otto/builtin_function.go
index 3d07566c6..3d07566c6 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/builtin_function.go
+++ b/vendor/github.com/robertkrimen/otto/builtin_function.go
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/builtin_json.go b/vendor/github.com/robertkrimen/otto/builtin_json.go
index aed54bf12..aed54bf12 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/builtin_json.go
+++ b/vendor/github.com/robertkrimen/otto/builtin_json.go
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/builtin_math.go b/vendor/github.com/robertkrimen/otto/builtin_math.go
index 7ce90c339..7ce90c339 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/builtin_math.go
+++ b/vendor/github.com/robertkrimen/otto/builtin_math.go
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/builtin_number.go b/vendor/github.com/robertkrimen/otto/builtin_number.go
index 26a03e7b6..f99a42a2f 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/builtin_number.go
+++ b/vendor/github.com/robertkrimen/otto/builtin_number.go
@@ -30,7 +30,7 @@ func builtinNumber_toString(call FunctionCall) Value {
if radixArgument.IsDefined() {
integer := toIntegerFloat(radixArgument)
if integer < 2 || integer > 36 {
- panic(call.runtime.panicRangeError("RangeError: toString() radix must be between 2 and 36"))
+ panic(call.runtime.panicRangeError("toString() radix must be between 2 and 36"))
}
radix = int(integer)
}
@@ -67,7 +67,7 @@ func builtinNumber_toExponential(call FunctionCall) Value {
if value := call.Argument(0); value.IsDefined() {
precision = toIntegerFloat(value)
if 0 > precision {
- panic(call.runtime.panicRangeError("RangeError: toString() radix must be between 2 and 36"))
+ panic(call.runtime.panicRangeError("toString() radix must be between 2 and 36"))
}
}
return toValue_string(strconv.FormatFloat(call.This.float64(), 'e', int(precision), 64))
@@ -83,7 +83,7 @@ func builtinNumber_toPrecision(call FunctionCall) Value {
}
precision := toIntegerFloat(value)
if 1 > precision {
- panic(call.runtime.panicRangeError("RangeError: toPrecision() precision must be greater than 1"))
+ panic(call.runtime.panicRangeError("toPrecision() precision must be greater than 1"))
}
return toValue_string(strconv.FormatFloat(call.This.float64(), 'g', int(precision), 64))
}
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/builtin_object.go b/vendor/github.com/robertkrimen/otto/builtin_object.go
index c2433f7be..c2433f7be 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/builtin_object.go
+++ b/vendor/github.com/robertkrimen/otto/builtin_object.go
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/builtin_regexp.go b/vendor/github.com/robertkrimen/otto/builtin_regexp.go
index 99422510d..99422510d 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/builtin_regexp.go
+++ b/vendor/github.com/robertkrimen/otto/builtin_regexp.go
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/builtin_string.go b/vendor/github.com/robertkrimen/otto/builtin_string.go
index 6a1718458..f5f09fee1 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/builtin_string.go
+++ b/vendor/github.com/robertkrimen/otto/builtin_string.go
@@ -380,12 +380,7 @@ func builtinString_split(call FunctionCall) Value {
split = split[:limit]
}
- valueArray := make([]Value, len(split))
- for index, value := range split {
- valueArray[index] = toValue_string(value)
- }
-
- return toValue_object(call.runtime.newArrayOf(valueArray))
+ return call.runtime.toValue(split)
}
}
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/clone.go b/vendor/github.com/robertkrimen/otto/clone.go
index 82cb0f0af..23b59f8ac 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/clone.go
+++ b/vendor/github.com/robertkrimen/otto/clone.go
@@ -17,7 +17,13 @@ func (in *_runtime) clone() *_runtime {
in.lck.Lock()
defer in.lck.Unlock()
- out := &_runtime{}
+ out := &_runtime{
+ debugger: in.debugger,
+ random: in.random,
+ stackLimit: in.stackLimit,
+ traceLimit: in.traceLimit,
+ }
+
clone := _clone{
runtime: out,
_object: make(map[*_object]*_object),
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/cmpl.go b/vendor/github.com/robertkrimen/otto/cmpl.go
index c191b4527..c191b4527 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/cmpl.go
+++ b/vendor/github.com/robertkrimen/otto/cmpl.go
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/cmpl_evaluate.go b/vendor/github.com/robertkrimen/otto/cmpl_evaluate.go
index 6741bf394..6741bf394 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/cmpl_evaluate.go
+++ b/vendor/github.com/robertkrimen/otto/cmpl_evaluate.go
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/cmpl_evaluate_expression.go b/vendor/github.com/robertkrimen/otto/cmpl_evaluate_expression.go
index 8586a484f..8586a484f 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/cmpl_evaluate_expression.go
+++ b/vendor/github.com/robertkrimen/otto/cmpl_evaluate_expression.go
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/cmpl_evaluate_statement.go b/vendor/github.com/robertkrimen/otto/cmpl_evaluate_statement.go
index e16c6ac6c..e16c6ac6c 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/cmpl_evaluate_statement.go
+++ b/vendor/github.com/robertkrimen/otto/cmpl_evaluate_statement.go
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/cmpl_parse.go b/vendor/github.com/robertkrimen/otto/cmpl_parse.go
index f1e002d39..dc5baa12a 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/cmpl_parse.go
+++ b/vendor/github.com/robertkrimen/otto/cmpl_parse.go
@@ -271,6 +271,9 @@ func (cmpl *_compiler) parseStatement(in ast.Statement) _nodeStatement {
}
return out
+ case *ast.FunctionStatement:
+ return emptyStatement
+
case *ast.IfStatement:
return &_nodeIfStatement{
test: cmpl.parseExpression(in.Test),
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/console.go b/vendor/github.com/robertkrimen/otto/console.go
index 948face77..948face77 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/console.go
+++ b/vendor/github.com/robertkrimen/otto/console.go
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/dbg.go b/vendor/github.com/robertkrimen/otto/dbg.go
index 51fbdc206..51fbdc206 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/dbg.go
+++ b/vendor/github.com/robertkrimen/otto/dbg.go
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/dbg/dbg.go b/vendor/github.com/robertkrimen/otto/dbg/dbg.go
index 8c27fa293..8c27fa293 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/dbg/dbg.go
+++ b/vendor/github.com/robertkrimen/otto/dbg/dbg.go
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/error.go b/vendor/github.com/robertkrimen/otto/error.go
index 111471044..41a5c10e7 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/error.go
+++ b/vendor/github.com/robertkrimen/otto/error.go
@@ -3,7 +3,6 @@ package otto
import (
"errors"
"fmt"
- "strings"
"github.com/robertkrimen/otto/file"
)
@@ -32,10 +31,31 @@ type _error struct {
offset int
}
+func (err _error) format() string {
+ if len(err.name) == 0 {
+ return err.message
+ }
+ if len(err.message) == 0 {
+ return err.name
+ }
+ return fmt.Sprintf("%s: %s", err.name, err.message)
+}
+
+func (err _error) formatWithStack() string {
+ str := err.format() + "\n"
+ for _, frame := range err.trace {
+ str += " at " + frame.location() + "\n"
+ }
+ return str
+}
+
type _frame struct {
- file *file.File
- offset int
- callee string
+ native bool
+ nativeFile string
+ nativeLine int
+ file *file.File
+ offset int
+ callee string
}
var (
@@ -45,17 +65,25 @@ var (
type _at int
func (fr _frame) location() string {
- if fr.file == nil {
- return "<unknown>"
- }
- path := fr.file.Name()
- line, column := _position(fr.file, fr.offset)
+ str := "<unknown>"
- if path == "" {
- path = "<anonymous>"
- }
+ switch {
+ case fr.native:
+ str = "<native code>"
+ if fr.nativeFile != "" && fr.nativeLine != 0 {
+ str = fmt.Sprintf("%s:%d", fr.nativeFile, fr.nativeLine)
+ }
+ case fr.file != nil:
+ if p := fr.file.Position(file.Idx(fr.offset)); p != nil {
+ path, line, column := p.Filename, p.Line, p.Column
- str := fmt.Sprintf("%s:%d:%d", path, line, column)
+ if path == "" {
+ path = "<anonymous>"
+ }
+
+ str = fmt.Sprintf("%s:%d:%d", path, line, column)
+ }
+ }
if fr.callee != "" {
str = fmt.Sprintf("%s (%s)", fr.callee, str)
@@ -64,30 +92,6 @@ func (fr _frame) location() string {
return str
}
-func _position(file *file.File, offset int) (line, column int) {
- {
- offset := offset - file.Base()
- if offset < 0 {
- return -offset, -1
- }
-
- src := file.Source()
- if offset >= len(src) {
- return -offset, -len(src)
- }
- src = src[:offset]
-
- line := 1 + strings.Count(src, "\n")
- column := 0
- if index := strings.LastIndex(src, "\n"); index >= 0 {
- column = offset - index
- } else {
- column = 1 + len(src)
- }
- return line, column
- }
-}
-
// An Error represents a runtime error, e.g. a TypeError, a ReferenceError, etc.
type Error struct {
_error
@@ -98,13 +102,7 @@ type Error struct {
// TypeError: 'def' is not a function
//
func (err Error) Error() string {
- if len(err.name) == 0 {
- return err.message
- }
- if len(err.message) == 0 {
- return err.name
- }
- return fmt.Sprintf("%s: %s", err.name, err.message)
+ return err.format()
}
// String returns a description of the error and a trace of where the
@@ -115,11 +113,7 @@ func (err Error) Error() string {
// at <anonymous>:7:1/
//
func (err Error) String() string {
- str := err.Error() + "\n"
- for _, frame := range err.trace {
- str += " at " + frame.location() + "\n"
- }
- return str
+ return err.formatWithStack()
}
func (err _error) describe(format string, in ...interface{}) string {
@@ -140,7 +134,7 @@ func (rt *_runtime) typeErrorResult(throw bool) bool {
return false
}
-func newError(rt *_runtime, name string, in ...interface{}) _error {
+func newError(rt *_runtime, name string, stackFramesToPop int, in ...interface{}) _error {
err := _error{
name: name,
offset: -1,
@@ -148,33 +142,42 @@ func newError(rt *_runtime, name string, in ...interface{}) _error {
description := ""
length := len(in)
- if rt != nil {
+ if rt != nil && rt.scope != nil {
scope := rt.scope
+
+ for i := 0; i < stackFramesToPop; i++ {
+ if scope.outer != nil {
+ scope = scope.outer
+ }
+ }
+
frame := scope.frame
+
if length > 0 {
if at, ok := in[length-1].(_at); ok {
in = in[0 : length-1]
if scope != nil {
frame.offset = int(at)
}
- length -= 1
+ length--
}
if length > 0 {
description, in = in[0].(string), in[1:]
}
}
- limit := 10
+
+ limit := rt.traceLimit
+
err.trace = append(err.trace, frame)
if scope != nil {
- for limit > 0 {
- scope = scope.outer
- if scope == nil {
+ for scope = scope.outer; scope != nil; scope = scope.outer {
+ if limit--; limit == 0 {
break
}
+
if scope.frame.offset >= 0 {
err.trace = append(err.trace, scope.frame)
}
- limit--
}
}
} else {
@@ -183,36 +186,37 @@ func newError(rt *_runtime, name string, in ...interface{}) _error {
}
}
err.message = err.describe(description, in...)
+
return err
}
func (rt *_runtime) panicTypeError(argumentList ...interface{}) *_exception {
return &_exception{
- value: newError(rt, "TypeError", argumentList...),
+ value: newError(rt, "TypeError", 0, argumentList...),
}
}
func (rt *_runtime) panicReferenceError(argumentList ...interface{}) *_exception {
return &_exception{
- value: newError(rt, "ReferenceError", argumentList...),
+ value: newError(rt, "ReferenceError", 0, argumentList...),
}
}
func (rt *_runtime) panicURIError(argumentList ...interface{}) *_exception {
return &_exception{
- value: newError(rt, "URIError", argumentList...),
+ value: newError(rt, "URIError", 0, argumentList...),
}
}
func (rt *_runtime) panicSyntaxError(argumentList ...interface{}) *_exception {
return &_exception{
- value: newError(rt, "SyntaxError", argumentList...),
+ value: newError(rt, "SyntaxError", 0, argumentList...),
}
}
func (rt *_runtime) panicRangeError(argumentList ...interface{}) *_exception {
return &_exception{
- value: newError(rt, "RangeError", argumentList...),
+ value: newError(rt, "RangeError", 0, argumentList...),
}
}
@@ -223,6 +227,9 @@ func catchPanic(function func()) (err error) {
caught = exception.eject()
}
switch caught := caught.(type) {
+ case *Error:
+ err = caught
+ return
case _error:
err = &Error{caught}
return
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/evaluate.go b/vendor/github.com/robertkrimen/otto/evaluate.go
index 093054cc3..093054cc3 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/evaluate.go
+++ b/vendor/github.com/robertkrimen/otto/evaluate.go
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/file/README.markdown b/vendor/github.com/robertkrimen/otto/file/README.markdown
index 79757baa8..79757baa8 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/file/README.markdown
+++ b/vendor/github.com/robertkrimen/otto/file/README.markdown
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/file/file.go b/vendor/github.com/robertkrimen/otto/file/file.go
index 76524ac39..9093206e8 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/file/file.go
+++ b/vendor/github.com/robertkrimen/otto/file/file.go
@@ -5,6 +5,8 @@ package file
import (
"fmt"
"strings"
+
+ "gopkg.in/sourcemap.v1"
)
// Idx is a compact encoding of a source position within a file set.
@@ -90,28 +92,20 @@ func (self *FileSet) File(idx Idx) *File {
// Position converts an Idx in the FileSet into a Position.
func (self *FileSet) Position(idx Idx) *Position {
- position := &Position{}
for _, file := range self.files {
if idx <= Idx(file.base+len(file.src)) {
- offset := int(idx) - file.base
- src := file.src[:offset]
- position.Filename = file.name
- position.Offset = offset
- position.Line = 1 + strings.Count(src, "\n")
- if index := strings.LastIndex(src, "\n"); index >= 0 {
- position.Column = offset - index
- } else {
- position.Column = 1 + len(src)
- }
+ return file.Position(idx - Idx(file.base))
}
}
- return position
+
+ return nil
}
type File struct {
name string
src string
base int // This will always be 1 or greater
+ sm *sourcemap.Consumer
}
func NewFile(filename, src string, base int) *File {
@@ -122,6 +116,11 @@ func NewFile(filename, src string, base int) *File {
}
}
+func (fl *File) WithSourceMap(sm *sourcemap.Consumer) *File {
+ fl.sm = sm
+ return fl
+}
+
func (fl *File) Name() string {
return fl.name
}
@@ -133,3 +132,33 @@ func (fl *File) Source() string {
func (fl *File) Base() int {
return fl.base
}
+
+func (fl *File) Position(idx Idx) *Position {
+ position := &Position{}
+
+ offset := int(idx) - fl.base
+
+ if offset >= len(fl.src) || offset < 0 {
+ return nil
+ }
+
+ src := fl.src[:offset]
+
+ position.Filename = fl.name
+ position.Offset = offset
+ position.Line = strings.Count(src, "\n") + 1
+
+ if index := strings.LastIndex(src, "\n"); index >= 0 {
+ position.Column = offset - index
+ } else {
+ position.Column = len(src) + 1
+ }
+
+ if fl.sm != nil {
+ if f, _, l, c, ok := fl.sm.Source(position.Line, position.Column); ok {
+ position.Filename, position.Line, position.Column = f, l, c
+ }
+ }
+
+ return position
+}
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/global.go b/vendor/github.com/robertkrimen/otto/global.go
index 4f035314a..eb2a2a0fb 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/global.go
+++ b/vendor/github.com/robertkrimen/otto/global.go
@@ -166,7 +166,7 @@ func (runtime *_runtime) newDate(epoch float64) *_object {
return self
}
-func (runtime *_runtime) newError(name string, message Value) *_object {
+func (runtime *_runtime) newError(name string, message Value, stackFramesToPop int) *_object {
var self *_object
switch name {
case "EvalError":
@@ -183,7 +183,7 @@ func (runtime *_runtime) newError(name string, message Value) *_object {
return runtime.newURIError(message)
}
- self = runtime.newErrorObject(name, message)
+ self = runtime.newErrorObject(name, message, stackFramesToPop)
self.prototype = runtime.global.ErrorPrototype
if name != "" {
self.defineProperty("name", toValue_string(name), 0111, false)
@@ -191,8 +191,8 @@ func (runtime *_runtime) newError(name string, message Value) *_object {
return self
}
-func (runtime *_runtime) newNativeFunction(name string, _nativeFunction _nativeFunction) *_object {
- self := runtime.newNativeFunctionObject(name, _nativeFunction, 0)
+func (runtime *_runtime) newNativeFunction(name, file string, line int, _nativeFunction _nativeFunction) *_object {
+ self := runtime.newNativeFunctionObject(name, file, line, _nativeFunction, 0)
self.prototype = runtime.global.FunctionPrototype
prototype := runtime.newObject()
self.defineProperty("prototype", toValue_object(prototype), 0100, false)
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/inline.go b/vendor/github.com/robertkrimen/otto/inline.go
index 6e5df8393..6e5df8393 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/inline.go
+++ b/vendor/github.com/robertkrimen/otto/inline.go
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/inline b/vendor/github.com/robertkrimen/otto/inline.pl
index c3620b4a2..c3620b4a2 100644..100755
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/inline
+++ b/vendor/github.com/robertkrimen/otto/inline.pl
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/object.go b/vendor/github.com/robertkrimen/otto/object.go
index 849812c91..849812c91 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/object.go
+++ b/vendor/github.com/robertkrimen/otto/object.go
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/object_class.go b/vendor/github.com/robertkrimen/otto/object_class.go
index d18b9cede..d18b9cede 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/object_class.go
+++ b/vendor/github.com/robertkrimen/otto/object_class.go
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/otto.go b/vendor/github.com/robertkrimen/otto/otto.go
index 613533082..b5b528d53 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/otto.go
+++ b/vendor/github.com/robertkrimen/otto/otto.go
@@ -132,6 +132,7 @@ The following are some limitations with otto:
* "use strict" will parse, but does nothing.
* The regular expression engine (re2/regexp) is not fully compatible with the ECMA5 specification.
+ * Otto targets ES5. ES6 features (eg: Typed Arrays) are not supported.
Regular Expression Incompatibility
@@ -227,6 +228,7 @@ import (
"fmt"
"strings"
+ "github.com/robertkrimen/otto/file"
"github.com/robertkrimen/otto/registry"
)
@@ -244,6 +246,7 @@ func New() *Otto {
runtime: newContext(),
}
self.runtime.otto = self
+ self.runtime.traceLimit = 10
self.Set("console", self.runtime.newConsole())
registry.Apply(func(entry registry.Entry) {
@@ -289,7 +292,7 @@ func Run(src interface{}) (*Otto, Value, error) {
// src may also be a Program, but if the AST has been modified, then runtime behavior is undefined.
//
func (self Otto) Run(src interface{}) (Value, error) {
- value, err := self.runtime.cmpl_run(src)
+ value, err := self.runtime.cmpl_run(src, nil)
if !value.safe() {
value = Value{}
}
@@ -307,7 +310,7 @@ func (self Otto) Eval(src interface{}) (Value, error) {
defer self.runtime.leaveScope()
}
- value, err := self.runtime.cmpl_eval(src)
+ value, err := self.runtime.cmpl_eval(src, nil)
if !value.safe() {
value = Value{}
}
@@ -367,6 +370,51 @@ func (self Otto) SetRandomSource(fn func() float64) {
self.runtime.random = fn
}
+// SetStackDepthLimit sets an upper limit to the depth of the JavaScript
+// stack. In simpler terms, this limits the number of "nested" function calls
+// you can make in a particular interpreter instance.
+//
+// Note that this doesn't take into account the Go stack depth. If your
+// JavaScript makes a call to a Go function, otto won't keep track of what
+// happens outside the interpreter. So if your Go function is infinitely
+// recursive, you're still in trouble.
+func (self Otto) SetStackDepthLimit(limit int) {
+ self.runtime.stackLimit = limit
+}
+
+// SetStackTraceLimit sets an upper limit to the number of stack frames that
+// otto will use when formatting an error's stack trace. By default, the limit
+// is 10. This is consistent with V8 and SpiderMonkey.
+//
+// TODO: expose via `Error.stackTraceLimit`
+func (self Otto) SetStackTraceLimit(limit int) {
+ self.runtime.traceLimit = limit
+}
+
+// MakeCustomError creates a new Error object with the given name and message,
+// returning it as a Value.
+func (self Otto) MakeCustomError(name, message string) Value {
+ return self.runtime.toValue(self.runtime.newError(name, self.runtime.toValue(message), 0))
+}
+
+// MakeRangeError creates a new RangeError object with the given message,
+// returning it as a Value.
+func (self Otto) MakeRangeError(message string) Value {
+ return self.runtime.toValue(self.runtime.newRangeError(self.runtime.toValue(message)))
+}
+
+// MakeSyntaxError creates a new SyntaxError object with the given message,
+// returning it as a Value.
+func (self Otto) MakeSyntaxError(message string) Value {
+ return self.runtime.toValue(self.runtime.newSyntaxError(self.runtime.toValue(message)))
+}
+
+// MakeTypeError creates a new TypeError object with the given message,
+// returning it as a Value.
+func (self Otto) MakeTypeError(message string) Value {
+ return self.runtime.toValue(self.runtime.newTypeError(self.runtime.toValue(message)))
+}
+
// Context is a structure that contains information about the current execution
// context.
type Context struct {
@@ -379,8 +427,23 @@ type Context struct {
Stacktrace []string
}
-// Context returns the current execution context of the vm
-func (self Otto) Context() (ctx Context) {
+// Context returns the current execution context of the vm, traversing up to
+// ten stack frames, and skipping any innermost native function stack frames.
+func (self Otto) Context() Context {
+ return self.ContextSkip(10, true)
+}
+
+// ContextLimit returns the current execution context of the vm, with a
+// specific limit on the number of stack frames to traverse, skipping any
+// innermost native function stack frames.
+func (self Otto) ContextLimit(limit int) Context {
+ return self.ContextSkip(limit, true)
+}
+
+// ContextSkip returns the current execution context of the vm, with a
+// specific limit on the number of stack frames to traverse, optionally
+// skipping any innermost native function stack frames.
+func (self Otto) ContextSkip(limit int, skipNative bool) (ctx Context) {
// Ensure we are operating in a scope
if self.runtime.scope == nil {
self.runtime.enterGlobalScope()
@@ -390,25 +453,40 @@ func (self Otto) Context() (ctx Context) {
scope := self.runtime.scope
frame := scope.frame
+ for skipNative && frame.native && scope.outer != nil {
+ scope = scope.outer
+ frame = scope.frame
+ }
+
// Get location information
ctx.Filename = "<unknown>"
ctx.Callee = frame.callee
- if frame.file != nil {
- ctx.Filename = frame.file.Name()
- if ctx.Filename == "" {
- ctx.Filename = "<anonymous>"
+
+ switch {
+ case frame.native:
+ ctx.Filename = frame.nativeFile
+ ctx.Line = frame.nativeLine
+ ctx.Column = 0
+ case frame.file != nil:
+ ctx.Filename = "<anonymous>"
+
+ if p := frame.file.Position(file.Idx(frame.offset)); p != nil {
+ ctx.Line = p.Line
+ ctx.Column = p.Column
+
+ if p.Filename != "" {
+ ctx.Filename = p.Filename
+ }
}
- ctx.Line, ctx.Column = _position(frame.file, frame.offset)
}
// Get the current scope this Value
ctx.This = toValue_object(scope.this)
// Build stacktrace (up to 10 levels deep)
- limit := 10
ctx.Symbols = make(map[string]Value)
ctx.Stacktrace = append(ctx.Stacktrace, frame.location())
- for limit > 0 {
+ for limit != 0 {
// Get variables
stash := scope.lexical
for {
@@ -473,7 +551,7 @@ func (self Otto) Call(source string, this interface{}, argumentList ...interface
}()
if !construct && this == nil {
- program, err := self.runtime.cmpl_parse("", source+"()")
+ program, err := self.runtime.cmpl_parse("", source+"()", nil)
if err == nil {
if node, ok := program.body[0].(*_nodeExpressionStatement); ok {
if node, ok := node.expression.(*_nodeCallExpression); ok {
@@ -538,7 +616,7 @@ func (self Otto) Call(source string, this interface{}, argumentList ...interface
// If there is an error (like the source does not result in an object), then
// nil and an error is returned.
func (self Otto) Object(source string) (*Object, error) {
- value, err := self.runtime.cmpl_run(source)
+ value, err := self.runtime.cmpl_run(source, nil)
if err != nil {
return nil, err
}
@@ -643,9 +721,9 @@ func (self Object) Set(name string, value interface{}) error {
}
}
-// Get the keys for the object
+// Keys gets the keys for the given object.
//
-// Equivalent to calling Object.keys on the object
+// Equivalent to calling Object.keys on the object.
func (self Object) Keys() []string {
var keys []string
self.object.enumerate(false, func(name string) bool {
@@ -655,6 +733,25 @@ func (self Object) Keys() []string {
return keys
}
+// KeysByParent gets the keys (and those of the parents) for the given object,
+// in order of "closest" to "furthest".
+func (self Object) KeysByParent() [][]string {
+ var a [][]string
+
+ for o := self.object; o != nil; o = o.prototype {
+ var l []string
+
+ o.enumerate(false, func(name string) bool {
+ l = append(l, name)
+ return true
+ })
+
+ a = append(a, l)
+ }
+
+ return a
+}
+
// Class will return the class string of the object.
//
// The return value will (generally) be one of:
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/otto_.go b/vendor/github.com/robertkrimen/otto/otto_.go
index 304a83150..304a83150 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/otto_.go
+++ b/vendor/github.com/robertkrimen/otto/otto_.go
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/parser/Makefile b/vendor/github.com/robertkrimen/otto/parser/Makefile
index 766fd4d0b..766fd4d0b 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/parser/Makefile
+++ b/vendor/github.com/robertkrimen/otto/parser/Makefile
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/parser/README.markdown b/vendor/github.com/robertkrimen/otto/parser/README.markdown
index c3cae5b60..c3cae5b60 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/parser/README.markdown
+++ b/vendor/github.com/robertkrimen/otto/parser/README.markdown
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/parser/dbg.go b/vendor/github.com/robertkrimen/otto/parser/dbg.go
index 3c5f2f698..3c5f2f698 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/parser/dbg.go
+++ b/vendor/github.com/robertkrimen/otto/parser/dbg.go
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/parser/error.go b/vendor/github.com/robertkrimen/otto/parser/error.go
index e0f74a5cf..e0f74a5cf 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/parser/error.go
+++ b/vendor/github.com/robertkrimen/otto/parser/error.go
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/parser/expression.go b/vendor/github.com/robertkrimen/otto/parser/expression.go
index a23a7279a..63a169d40 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/parser/expression.go
+++ b/vendor/github.com/robertkrimen/otto/parser/expression.go
@@ -11,14 +11,19 @@ import (
func (self *_parser) parseIdentifier() *ast.Identifier {
literal := self.literal
idx := self.idx
+ if self.mode&StoreComments != 0 {
+ self.comments.MarkComments(ast.LEADING)
+ }
self.next()
- comments := self.findComments(false)
exp := &ast.Identifier{
Name: literal,
Idx: idx,
}
- self.commentMap.AddComments(exp, comments, ast.TRAILING)
+ if self.mode&StoreComments != 0 {
+ self.comments.SetExpression(exp)
+ }
+
return exp
}
@@ -94,6 +99,9 @@ func (self *_parser) parsePrimaryExpression() ast.Expression {
case token.LEFT_PARENTHESIS:
self.expect(token.LEFT_PARENTHESIS)
expression := self.parseExpression()
+ if self.mode&StoreComments != 0 {
+ self.comments.Unset()
+ }
self.expect(token.RIGHT_PARENTHESIS)
return expression
case token.THIS:
@@ -181,12 +189,18 @@ func (self *_parser) parseVariableDeclaration(declarationList *[]*ast.VariableEx
Name: literal,
Idx: idx,
}
+ if self.mode&StoreComments != 0 {
+ self.comments.SetExpression(node)
+ }
if declarationList != nil {
*declarationList = append(*declarationList, node)
}
if self.token == token.ASSIGN {
+ if self.mode&StoreComments != 0 {
+ self.comments.Unset()
+ }
self.next()
node.Initializer = self.parseAssignmentExpression()
}
@@ -200,20 +214,18 @@ func (self *_parser) parseVariableDeclarationList(var_ file.Idx) []ast.Expressio
var list []ast.Expression
for {
- comments := self.findComments(false)
-
- decl := self.parseVariableDeclaration(&declarationList)
if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(decl, comments, ast.LEADING)
- self.commentMap.AddComments(decl, self.findComments(false), ast.TRAILING)
+ self.comments.MarkComments(ast.LEADING)
}
-
+ decl := self.parseVariableDeclaration(&declarationList)
list = append(list, decl)
if self.token != token.COMMA {
break
}
+ if self.mode&StoreComments != 0 {
+ self.comments.Unset()
+ }
self.next()
-
}
self.scope.declare(&ast.VariableDeclaration{
@@ -224,13 +236,14 @@ func (self *_parser) parseVariableDeclarationList(var_ file.Idx) []ast.Expressio
return list
}
-func (self *_parser) parseObjectPropertyKey() (string, string, []*ast.Comment) {
+func (self *_parser) parseObjectPropertyKey() (string, string) {
idx, tkn, literal := self.idx, self.token, self.literal
value := ""
+ if self.mode&StoreComments != 0 {
+ self.comments.MarkComments(ast.KEY)
+ }
self.next()
- comments := self.findComments(false)
-
switch tkn {
case token.IDENTIFIER:
value = literal
@@ -254,14 +267,14 @@ func (self *_parser) parseObjectPropertyKey() (string, string, []*ast.Comment) {
value = literal
}
}
- return literal, value, comments
+ return literal, value
}
func (self *_parser) parseObjectProperty() ast.Property {
- literal, value, comments := self.parseObjectPropertyKey()
+ literal, value := self.parseObjectPropertyKey()
if literal == "get" && self.token != token.COLON {
idx := self.idx
- _, value, _ := self.parseObjectPropertyKey()
+ _, value := self.parseObjectPropertyKey()
parameterList := self.parseFunctionParameterList()
node := &ast.FunctionLiteral{
@@ -276,7 +289,7 @@ func (self *_parser) parseObjectProperty() ast.Property {
}
} else if literal == "set" && self.token != token.COLON {
idx := self.idx
- _, value, _ := self.parseObjectPropertyKey()
+ _, value := self.parseObjectPropertyKey()
parameterList := self.parseFunctionParameterList()
node := &ast.FunctionLiteral{
@@ -291,8 +304,10 @@ func (self *_parser) parseObjectProperty() ast.Property {
}
}
+ if self.mode&StoreComments != 0 {
+ self.comments.MarkComments(ast.COLON)
+ }
self.expect(token.COLON)
- comments2 := self.findComments(false)
exp := ast.Property{
Key: value,
@@ -301,8 +316,7 @@ func (self *_parser) parseObjectProperty() ast.Property {
}
if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(exp.Value, comments, ast.KEY)
- self.commentMap.AddComments(exp.Value, comments2, ast.COLON)
+ self.comments.SetExpression(exp.Value)
}
return exp
}
@@ -310,116 +324,91 @@ func (self *_parser) parseObjectProperty() ast.Property {
func (self *_parser) parseObjectLiteral() ast.Expression {
var value []ast.Property
idx0 := self.expect(token.LEFT_BRACE)
-
- var comments2 []*ast.Comment
for self.token != token.RIGHT_BRACE && self.token != token.EOF {
-
- // Leading comments for object literal
- comments := self.findComments(false)
- property := self.parseObjectProperty()
- if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(property.Value, comments, ast.LEADING)
- self.commentMap.AddComments(property.Value, comments2, ast.LEADING)
- }
- value = append(value, property)
+ value = append(value, self.parseObjectProperty())
if self.token == token.COMMA {
+ if self.mode&StoreComments != 0 {
+ self.comments.Unset()
+ }
self.next()
-
- // Find leading comments after trailing comma
- comments2 = self.findComments(false)
continue
}
}
+ if self.mode&StoreComments != 0 {
+ self.comments.MarkComments(ast.FINAL)
+ }
idx1 := self.expect(token.RIGHT_BRACE)
- exp := &ast.ObjectLiteral{
+ return &ast.ObjectLiteral{
LeftBrace: idx0,
RightBrace: idx1,
Value: value,
}
-
- if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(exp, comments2, ast.FINAL)
- }
- self.consumeComments(exp, ast.FINAL)
-
- return exp
}
func (self *_parser) parseArrayLiteral() ast.Expression {
idx0 := self.expect(token.LEFT_BRACKET)
- var comments2 []*ast.Comment
- var comments []*ast.Comment
var value []ast.Expression
for self.token != token.RIGHT_BRACKET && self.token != token.EOF {
- // Find leading comments for both empty and non-empty expressions
- comments = self.findComments(false)
-
if self.token == token.COMMA {
- self.next()
-
// This kind of comment requires a special empty expression node.
empty := &ast.EmptyExpression{self.idx, self.idx}
if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(empty, comments, ast.LEADING)
- self.commentMap.AddComments(empty, comments2, ast.LEADING)
+ self.comments.SetExpression(empty)
+ self.comments.Unset()
}
-
value = append(value, empty)
-
- // This comment belongs to the following expression, or trailing
- comments2 = self.findComments(false)
-
+ self.next()
continue
}
exp := self.parseAssignmentExpression()
- if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(exp, comments, ast.LEADING)
- self.commentMap.AddComments(exp, comments2, ast.LEADING)
- }
value = append(value, exp)
if self.token != token.RIGHT_BRACKET {
+ if self.mode&StoreComments != 0 {
+ self.comments.Unset()
+ }
self.expect(token.COMMA)
}
-
- // This comment belongs to the following expression, or trailing
- comments2 = self.findComments(false)
+ }
+ if self.mode&StoreComments != 0 {
+ self.comments.MarkComments(ast.FINAL)
}
idx1 := self.expect(token.RIGHT_BRACKET)
- array := &ast.ArrayLiteral{
+ return &ast.ArrayLiteral{
LeftBracket: idx0,
RightBracket: idx1,
Value: value,
}
-
- // This is where comments after a possible trailing comma are added
- if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(array, comments2, ast.FINAL)
- }
-
- return array
}
func (self *_parser) parseArgumentList() (argumentList []ast.Expression, idx0, idx1 file.Idx) {
+ if self.mode&StoreComments != 0 {
+ self.comments.Unset()
+ }
idx0 = self.expect(token.LEFT_PARENTHESIS)
if self.token != token.RIGHT_PARENTHESIS {
for {
- comments := self.findComments(false)
exp := self.parseAssignmentExpression()
if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(exp, comments, ast.LEADING)
+ self.comments.SetExpression(exp)
}
argumentList = append(argumentList, exp)
if self.token != token.COMMA {
break
}
+ if self.mode&StoreComments != 0 {
+ self.comments.Unset()
+ }
self.next()
}
}
+ if self.mode&StoreComments != 0 {
+ self.comments.Unset()
+ }
idx1 = self.expect(token.RIGHT_PARENTHESIS)
return
}
@@ -434,7 +423,7 @@ func (self *_parser) parseCallExpression(left ast.Expression) ast.Expression {
}
if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(exp, self.findComments(false), ast.TRAILING)
+ self.comments.SetExpression(exp)
}
return exp
}
@@ -455,7 +444,7 @@ func (self *_parser) parseDotMember(left ast.Expression) ast.Expression {
return &ast.DotExpression{
Left: left,
- Identifier: ast.Identifier{
+ Identifier: &ast.Identifier{
Idx: idx,
Name: literal,
},
@@ -489,7 +478,7 @@ func (self *_parser) parseNewExpression() ast.Expression {
}
if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(node, self.findComments(false), ast.TRAILING)
+ self.comments.SetExpression(node)
}
return node
@@ -501,11 +490,15 @@ func (self *_parser) parseLeftHandSideExpression() ast.Expression {
if self.token == token.NEW {
left = self.parseNewExpression()
} else {
+ if self.mode&StoreComments != 0 {
+ self.comments.MarkComments(ast.LEADING)
+ self.comments.MarkPrimary()
+ }
left = self.parsePrimaryExpression()
}
if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(left, self.findComments(false), ast.TRAILING)
+ self.comments.SetExpression(left)
}
for {
@@ -531,13 +524,26 @@ func (self *_parser) parseLeftHandSideExpressionAllowCall() ast.Expression {
var left ast.Expression
if self.token == token.NEW {
+ var newComments []*ast.Comment
+ if self.mode&StoreComments != 0 {
+ newComments = self.comments.FetchAll()
+ self.comments.MarkComments(ast.LEADING)
+ self.comments.MarkPrimary()
+ }
left = self.parseNewExpression()
+ if self.mode&StoreComments != 0 {
+ self.comments.CommentMap.AddComments(left, newComments, ast.LEADING)
+ }
} else {
+ if self.mode&StoreComments != 0 {
+ self.comments.MarkComments(ast.LEADING)
+ self.comments.MarkPrimary()
+ }
left = self.parsePrimaryExpression()
}
if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(left, self.findComments(false), ast.TRAILING)
+ self.comments.SetExpression(left)
}
for {
@@ -566,6 +572,9 @@ func (self *_parser) parsePostfixExpression() ast.Expression {
}
tkn := self.token
idx := self.idx
+ if self.mode&StoreComments != 0 {
+ self.comments.Unset()
+ }
self.next()
switch operand.(type) {
case *ast.Identifier, *ast.DotExpression, *ast.BracketExpression:
@@ -582,7 +591,7 @@ func (self *_parser) parsePostfixExpression() ast.Expression {
}
if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(exp, self.findComments(false), ast.TRAILING)
+ self.comments.SetExpression(exp)
}
return exp
@@ -599,31 +608,24 @@ func (self *_parser) parseUnaryExpression() ast.Expression {
case token.DELETE, token.VOID, token.TYPEOF:
tkn := self.token
idx := self.idx
+ if self.mode&StoreComments != 0 {
+ self.comments.Unset()
+ }
self.next()
- comments := self.findComments(false)
-
- exp := &ast.UnaryExpression{
+ return &ast.UnaryExpression{
Operator: tkn,
Idx: idx,
Operand: self.parseUnaryExpression(),
}
-
- if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(exp.Operand, comments, ast.LEADING)
- }
- return exp
case token.INCREMENT, token.DECREMENT:
tkn := self.token
idx := self.idx
- self.next()
-
- comments := self.findComments(false)
-
- operand := self.parseUnaryExpression()
if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(operand, comments, ast.LEADING)
+ self.comments.Unset()
}
+ self.next()
+ operand := self.parseUnaryExpression()
switch operand.(type) {
case *ast.Identifier, *ast.DotExpression, *ast.BracketExpression:
default:
@@ -648,19 +650,16 @@ func (self *_parser) parseMultiplicativeExpression() ast.Expression {
for self.token == token.MULTIPLY || self.token == token.SLASH ||
self.token == token.REMAINDER {
tkn := self.token
+ if self.mode&StoreComments != 0 {
+ self.comments.Unset()
+ }
self.next()
- comments := self.findComments(false)
-
left = &ast.BinaryExpression{
Operator: tkn,
Left: left,
Right: next(),
}
-
- if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(left.(*ast.BinaryExpression).Right, comments, ast.LEADING)
- }
}
return left
@@ -672,19 +671,16 @@ func (self *_parser) parseAdditiveExpression() ast.Expression {
for self.token == token.PLUS || self.token == token.MINUS {
tkn := self.token
+ if self.mode&StoreComments != 0 {
+ self.comments.Unset()
+ }
self.next()
- comments := self.findComments(false)
-
left = &ast.BinaryExpression{
Operator: tkn,
Left: left,
Right: next(),
}
-
- if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(left.(*ast.BinaryExpression).Right, comments, ast.LEADING)
- }
}
return left
@@ -697,19 +693,16 @@ func (self *_parser) parseShiftExpression() ast.Expression {
for self.token == token.SHIFT_LEFT || self.token == token.SHIFT_RIGHT ||
self.token == token.UNSIGNED_SHIFT_RIGHT {
tkn := self.token
+ if self.mode&StoreComments != 0 {
+ self.comments.Unset()
+ }
self.next()
- comments := self.findComments(false)
-
left = &ast.BinaryExpression{
Operator: tkn,
Left: left,
Right: next(),
}
-
- if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(left.(*ast.BinaryExpression).Right, comments, ast.LEADING)
- }
}
return left
@@ -728,55 +721,46 @@ func (self *_parser) parseRelationalExpression() ast.Expression {
switch self.token {
case token.LESS, token.LESS_OR_EQUAL, token.GREATER, token.GREATER_OR_EQUAL:
tkn := self.token
+ if self.mode&StoreComments != 0 {
+ self.comments.Unset()
+ }
self.next()
- comments := self.findComments(false)
-
exp := &ast.BinaryExpression{
Operator: tkn,
Left: left,
Right: self.parseRelationalExpression(),
Comparison: true,
}
-
- if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(exp.Right, comments, ast.LEADING)
- }
return exp
case token.INSTANCEOF:
tkn := self.token
+ if self.mode&StoreComments != 0 {
+ self.comments.Unset()
+ }
self.next()
- comments := self.findComments(false)
-
exp := &ast.BinaryExpression{
Operator: tkn,
Left: left,
Right: self.parseRelationalExpression(),
}
-
- if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(exp.Right, comments, ast.LEADING)
- }
return exp
case token.IN:
if !allowIn {
return left
}
tkn := self.token
+ if self.mode&StoreComments != 0 {
+ self.comments.Unset()
+ }
self.next()
- comments := self.findComments(false)
-
exp := &ast.BinaryExpression{
Operator: tkn,
Left: left,
Right: self.parseRelationalExpression(),
}
-
- if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(exp.Right, comments, ast.LEADING)
- }
return exp
}
@@ -790,20 +774,17 @@ func (self *_parser) parseEqualityExpression() ast.Expression {
for self.token == token.EQUAL || self.token == token.NOT_EQUAL ||
self.token == token.STRICT_EQUAL || self.token == token.STRICT_NOT_EQUAL {
tkn := self.token
+ if self.mode&StoreComments != 0 {
+ self.comments.Unset()
+ }
self.next()
- comments := self.findComments(false)
-
left = &ast.BinaryExpression{
Operator: tkn,
Left: left,
Right: next(),
Comparison: true,
}
-
- if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(left.(*ast.BinaryExpression).Right, comments, ast.LEADING)
- }
}
return left
@@ -814,20 +795,17 @@ func (self *_parser) parseBitwiseAndExpression() ast.Expression {
left := next()
for self.token == token.AND {
+ if self.mode&StoreComments != 0 {
+ self.comments.Unset()
+ }
tkn := self.token
self.next()
- comments := self.findComments(false)
-
left = &ast.BinaryExpression{
Operator: tkn,
Left: left,
Right: next(),
}
-
- if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(left.(*ast.BinaryExpression).Right, comments, ast.LEADING)
- }
}
return left
@@ -838,20 +816,17 @@ func (self *_parser) parseBitwiseExclusiveOrExpression() ast.Expression {
left := next()
for self.token == token.EXCLUSIVE_OR {
+ if self.mode&StoreComments != 0 {
+ self.comments.Unset()
+ }
tkn := self.token
self.next()
- comments := self.findComments(false)
-
left = &ast.BinaryExpression{
Operator: tkn,
Left: left,
Right: next(),
}
-
- if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(left.(*ast.BinaryExpression).Right, comments, ast.LEADING)
- }
}
return left
@@ -862,20 +837,17 @@ func (self *_parser) parseBitwiseOrExpression() ast.Expression {
left := next()
for self.token == token.OR {
+ if self.mode&StoreComments != 0 {
+ self.comments.Unset()
+ }
tkn := self.token
self.next()
- comments := self.findComments(false)
-
left = &ast.BinaryExpression{
Operator: tkn,
Left: left,
Right: next(),
}
-
- if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(left.(*ast.BinaryExpression).Right, comments, ast.LEADING)
- }
}
return left
@@ -886,20 +858,17 @@ func (self *_parser) parseLogicalAndExpression() ast.Expression {
left := next()
for self.token == token.LOGICAL_AND {
+ if self.mode&StoreComments != 0 {
+ self.comments.Unset()
+ }
tkn := self.token
self.next()
- comments := self.findComments(false)
-
left = &ast.BinaryExpression{
Operator: tkn,
Left: left,
Right: next(),
}
-
- if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(left.(*ast.BinaryExpression).Right, comments, ast.LEADING)
- }
}
return left
@@ -910,20 +879,17 @@ func (self *_parser) parseLogicalOrExpression() ast.Expression {
left := next()
for self.token == token.LOGICAL_OR {
+ if self.mode&StoreComments != 0 {
+ self.comments.Unset()
+ }
tkn := self.token
self.next()
- comments := self.findComments(false)
-
left = &ast.BinaryExpression{
Operator: tkn,
Left: left,
Right: next(),
}
-
- if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(left.(*ast.BinaryExpression).Right, comments, ast.LEADING)
- }
}
return left
@@ -933,29 +899,22 @@ func (self *_parser) parseConditionlExpression() ast.Expression {
left := self.parseLogicalOrExpression()
if self.token == token.QUESTION_MARK {
+ if self.mode&StoreComments != 0 {
+ self.comments.Unset()
+ }
self.next()
- // Comments before the consequence
- comments1 := self.findComments(false)
-
consequent := self.parseAssignmentExpression()
if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(consequent, comments1, ast.LEADING)
+ self.comments.Unset()
}
-
self.expect(token.COLON)
-
- // Comments before the alternate
- comments2 := self.findComments(false)
exp := &ast.ConditionalExpression{
Test: left,
Consequent: consequent,
Alternate: self.parseAssignmentExpression(),
}
- if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(exp.Alternate, comments2, ast.LEADING)
- }
return exp
}
@@ -996,6 +955,9 @@ func (self *_parser) parseAssignmentExpression() ast.Expression {
if operator != 0 {
idx := self.idx
+ if self.mode&StoreComments != 0 {
+ self.comments.Unset()
+ }
self.next()
switch left.(type) {
case *ast.Identifier, *ast.DotExpression, *ast.BracketExpression:
@@ -1005,8 +967,6 @@ func (self *_parser) parseAssignmentExpression() ast.Expression {
return &ast.BadExpression{From: idx, To: self.idx}
}
- comments := self.findComments(false)
-
exp := &ast.AssignExpression{
Left: left,
Operator: operator,
@@ -1014,7 +974,7 @@ func (self *_parser) parseAssignmentExpression() ast.Expression {
}
if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(exp.Right, comments, ast.LEADING)
+ self.comments.SetExpression(exp)
}
return exp
@@ -1024,10 +984,6 @@ func (self *_parser) parseAssignmentExpression() ast.Expression {
}
func (self *_parser) parseExpression() ast.Expression {
-
- comments := self.findComments(false)
- statementComments := self.fetchComments()
-
next := self.parseAssignmentExpression
left := next()
@@ -1045,10 +1001,5 @@ func (self *_parser) parseExpression() ast.Expression {
}
}
- if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(left, comments, ast.LEADING)
- self.commentMap.AddComments(left, statementComments, ast.LEADING)
- }
-
return left
}
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/parser/lexer.go b/vendor/github.com/robertkrimen/otto/parser/lexer.go
index a510c76d2..d9d69e124 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/parser/lexer.go
+++ b/vendor/github.com/robertkrimen/otto/parser/lexer.go
@@ -10,6 +10,7 @@ import (
"unicode"
"unicode/utf8"
+ "github.com/robertkrimen/otto/ast"
"github.com/robertkrimen/otto/file"
"github.com/robertkrimen/otto/token"
)
@@ -120,7 +121,6 @@ func isLineTerminator(chr rune) bool {
func (self *_parser) scan() (tkn token.Token, literal string, idx file.Idx) {
self.implicitSemicolon = false
- self.skippedLineBreak = false
for {
self.skipWhiteSpace()
@@ -196,6 +196,7 @@ func (self *_parser) scan() (tkn token.Token, literal string, idx file.Idx) {
case '\r', '\n', '\u2028', '\u2029':
self.insertSemicolon = false
self.implicitSemicolon = true
+ self.comments.AtLineBreak()
continue
case ':':
tkn = token.COLON
@@ -240,18 +241,17 @@ func (self *_parser) scan() (tkn token.Token, literal string, idx file.Idx) {
case '/':
if self.chr == '/' {
if self.mode&StoreComments != 0 {
- runes := self.readSingleLineComment()
- literal = string(runes)
- tkn = token.COMMENT
- return
+ literal := string(self.readSingleLineComment())
+ self.comments.AddComment(ast.NewComment(literal, self.idx))
+ continue
}
self.skipSingleLineComment()
continue
} else if self.chr == '*' {
if self.mode&StoreComments != 0 {
literal = string(self.readMultiLineComment())
- tkn = token.COMMENT
- return
+ self.comments.AddComment(ast.NewComment(literal, self.idx))
+ continue
}
self.skipMultiLineComment()
continue
@@ -487,7 +487,7 @@ func (self *_parser) skipWhiteSpace() {
continue
case '\r':
if self._peek() == '\n' {
- self.skippedLineBreak = true
+ self.comments.AtLineBreak()
self.read()
}
fallthrough
@@ -495,7 +495,7 @@ func (self *_parser) skipWhiteSpace() {
if self.insertSemicolon {
return
}
- self.skippedLineBreak = true
+ self.comments.AtLineBreak()
self.read()
continue
}
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/parser/parser.go b/vendor/github.com/robertkrimen/otto/parser/parser.go
index 18328edd6..75b7c500c 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/parser/parser.go
+++ b/vendor/github.com/robertkrimen/otto/parser/parser.go
@@ -35,6 +35,7 @@ package parser
import (
"bytes"
+ "encoding/base64"
"errors"
"io"
"io/ioutil"
@@ -42,6 +43,7 @@ import (
"github.com/robertkrimen/otto/ast"
"github.com/robertkrimen/otto/file"
"github.com/robertkrimen/otto/token"
+ "gopkg.in/sourcemap.v1"
)
// A Mode value is a set of flags (or 0). They control optional parser functionality.
@@ -81,26 +83,27 @@ type _parser struct {
file *file.File
- comments []*ast.Comment
- commentMap *ast.CommentMap
- skippedLineBreak bool
+ comments *ast.Comments
}
-func _newParser(filename, src string, base int) *_parser {
+type Parser interface {
+ Scan() (tkn token.Token, literal string, idx file.Idx)
+}
+
+func _newParser(filename, src string, base int, sm *sourcemap.Consumer) *_parser {
return &_parser{
- chr: ' ', // This is set so we can start scanning by skipping whitespace
- str: src,
- length: len(src),
- base: base,
- file: file.NewFile(filename, src, base),
- comments: make([]*ast.Comment, 0),
- commentMap: &ast.CommentMap{},
- skippedLineBreak: false,
+ chr: ' ', // This is set so we can start scanning by skipping whitespace
+ str: src,
+ length: len(src),
+ base: base,
+ file: file.NewFile(filename, src, base).WithSourceMap(sm),
+ comments: ast.NewComments(),
}
}
-func newParser(filename, src string) *_parser {
- return _newParser(filename, src, 1)
+// Returns a new Parser.
+func NewParser(filename, src string) Parser {
+ return _newParser(filename, src, 1, nil)
}
func ReadSource(filename string, src interface{}) ([]byte, error) {
@@ -126,6 +129,70 @@ func ReadSource(filename string, src interface{}) ([]byte, error) {
return ioutil.ReadFile(filename)
}
+func ReadSourceMap(filename string, src interface{}) (*sourcemap.Consumer, error) {
+ if src == nil {
+ return nil, nil
+ }
+
+ switch src := src.(type) {
+ case string:
+ return sourcemap.Parse(filename, []byte(src))
+ case []byte:
+ return sourcemap.Parse(filename, src)
+ case *bytes.Buffer:
+ if src != nil {
+ return sourcemap.Parse(filename, src.Bytes())
+ }
+ case io.Reader:
+ var bfr bytes.Buffer
+ if _, err := io.Copy(&bfr, src); err != nil {
+ return nil, err
+ }
+ return sourcemap.Parse(filename, bfr.Bytes())
+ case *sourcemap.Consumer:
+ return src, nil
+ }
+
+ return nil, errors.New("invalid sourcemap type")
+}
+
+func ParseFileWithSourceMap(fileSet *file.FileSet, filename string, javascriptSource, sourcemapSource interface{}, mode Mode) (*ast.Program, error) {
+ src, err := ReadSource(filename, javascriptSource)
+ if err != nil {
+ return nil, err
+ }
+
+ if sourcemapSource == nil {
+ lines := bytes.Split(src, []byte("\n"))
+ lastLine := lines[len(lines)-1]
+ if bytes.HasPrefix(lastLine, []byte("//# sourceMappingURL=data:application/json")) {
+ bits := bytes.SplitN(lastLine, []byte(","), 2)
+ if len(bits) == 2 {
+ if d, err := base64.StdEncoding.DecodeString(string(bits[1])); err == nil {
+ sourcemapSource = d
+ }
+ }
+ }
+ }
+
+ sm, err := ReadSourceMap(filename, sourcemapSource)
+ if err != nil {
+ return nil, err
+ }
+
+ base := 1
+ if fileSet != nil {
+ base = fileSet.AddFile(filename, string(src))
+ }
+
+ parser := _newParser(filename, string(src), base, sm)
+ parser.mode = mode
+ program, err := parser.parse()
+ program.Comments = parser.comments.CommentMap
+
+ return program, err
+}
+
// ParseFile parses the source code of a single JavaScript/ECMAScript source file and returns
// the corresponding ast.Program node.
//
@@ -140,22 +207,7 @@ func ReadSource(filename string, src interface{}) ([]byte, error) {
// program, err := parser.ParseFile(nil, "", `if (abc > 1) {}`, 0)
//
func ParseFile(fileSet *file.FileSet, filename string, src interface{}, mode Mode) (*ast.Program, error) {
- str, err := ReadSource(filename, src)
- if err != nil {
- return nil, err
- }
- {
- str := string(str)
-
- base := 1
- if fileSet != nil {
- base = fileSet.AddFile(filename, str)
- }
-
- parser := _newParser(filename, str, base)
- parser.mode = mode
- return parser.parse()
- }
+ return ParseFileWithSourceMap(fileSet, filename, src, nil, mode)
}
// ParseFunction parses a given parameter list and body as a function and returns the
@@ -167,7 +219,7 @@ func ParseFunction(parameterList, body string) (*ast.FunctionLiteral, error) {
src := "(function(" + parameterList + ") {\n" + body + "\n})"
- parser := _newParser("", src, 1)
+ parser := _newParser("", src, 1, nil)
program, err := parser.parse()
if err != nil {
return nil, err
@@ -176,6 +228,13 @@ func ParseFunction(parameterList, body string) (*ast.FunctionLiteral, error) {
return program.Body[0].(*ast.ExpressionStatement).Expression.(*ast.FunctionLiteral), nil
}
+// Scan reads a single token from the source at the current offset, increments the offset and
+// returns the token.Token token, a string literal representing the value of the token (if applicable)
+// and it's current file.Idx index.
+func (self *_parser) Scan() (tkn token.Token, literal string, idx file.Idx) {
+ return self.scan()
+}
+
func (self *_parser) slice(idx0, idx1 file.Idx) string {
from := int(idx0) - self.base
to := int(idx1) - self.base
@@ -193,7 +252,9 @@ func (self *_parser) parse() (*ast.Program, error) {
self.errors.Sort()
}
- self.addCommentStatements(program, ast.FINAL)
+ if self.mode&StoreComments != 0 {
+ self.comments.CommentMap.AddComments(program, self.comments.FetchAll(), ast.TRAILING)
+ }
return program, self.errors.Err()
}
@@ -281,63 +342,3 @@ func (self *_parser) position(idx file.Idx) file.Position {
return position
}
-
-// findComments finds the following comments.
-// Comments on the same line will be grouped together and returned.
-// After the first line break, comments will be added as statement comments.
-func (self *_parser) findComments(ignoreLineBreak bool) []*ast.Comment {
- if self.mode&StoreComments == 0 {
- return nil
- }
- comments := make([]*ast.Comment, 0)
-
- newline := false
-
- for self.implicitSemicolon == false || ignoreLineBreak {
- if self.token != token.COMMENT {
- break
- }
-
- comment := &ast.Comment{
- Begin: self.idx,
- Text: self.literal,
- Position: ast.TBD,
- }
-
- newline = self.skippedLineBreak || newline
-
- if newline && !ignoreLineBreak {
- self.comments = append(self.comments, comment)
- } else {
- comments = append(comments, comment)
- }
-
- self.next()
- }
-
- return comments
-}
-
-// addCommentStatements will add the previously parsed, not positioned comments to the provided node
-func (self *_parser) addCommentStatements(node ast.Node, position ast.CommentPosition) {
- if len(self.comments) > 0 {
- self.commentMap.AddComments(node, self.comments, position)
-
- // Reset comments
- self.comments = make([]*ast.Comment, 0)
- }
-}
-
-// fetchComments fetches the current comments, resets the slice and returns the comments
-func (self *_parser) fetchComments() (comments []*ast.Comment) {
- comments = self.comments
- self.comments = nil
-
- return comments
-}
-
-// consumeComments consumes the current comments and appends them to the provided node
-func (self *_parser) consumeComments(node ast.Node, position ast.CommentPosition) {
- self.commentMap.AddComments(node, self.comments, position)
- self.comments = nil
-}
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/parser/regexp.go b/vendor/github.com/robertkrimen/otto/parser/regexp.go
index f614dae74..f614dae74 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/parser/regexp.go
+++ b/vendor/github.com/robertkrimen/otto/parser/regexp.go
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/parser/scope.go b/vendor/github.com/robertkrimen/otto/parser/scope.go
index e1dbdda13..e1dbdda13 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/parser/scope.go
+++ b/vendor/github.com/robertkrimen/otto/parser/scope.go
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/parser/statement.go b/vendor/github.com/robertkrimen/otto/parser/statement.go
index 987ac02c1..6ff19d975 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/parser/statement.go
+++ b/vendor/github.com/robertkrimen/otto/parser/statement.go
@@ -10,19 +10,25 @@ func (self *_parser) parseBlockStatement() *ast.BlockStatement {
// Find comments before the leading brace
if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(node, self.findComments(false), ast.LEADING)
+ self.comments.CommentMap.AddComments(node, self.comments.FetchAll(), ast.LEADING)
+ self.comments.Unset()
}
node.LeftBrace = self.expect(token.LEFT_BRACE)
node.List = self.parseStatementList()
- self.consumeComments(node, ast.FINAL)
+ if self.mode&StoreComments != 0 {
+ self.comments.Unset()
+ self.comments.CommentMap.AddComments(node, self.comments.FetchAll(), ast.FINAL)
+ self.comments.AfterBlock()
+ }
node.RightBrace = self.expect(token.RIGHT_BRACE)
// Find comments after the trailing brace
if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(node, self.findComments(false), ast.TRAILING)
+ self.comments.ResetLineBreak()
+ self.comments.CommentMap.AddComments(node, self.comments.Fetch(), ast.TRAILING)
}
return node
@@ -35,14 +41,8 @@ func (self *_parser) parseEmptyStatement() ast.Statement {
func (self *_parser) parseStatementList() (list []ast.Statement) {
for self.token != token.RIGHT_BRACE && self.token != token.EOF {
- if self.token == token.COMMENT {
- self.parseCommentElement()
- continue
- }
statement := self.parseStatement()
list = append(list, statement)
-
- self.addCommentStatements(statement, ast.LEADING)
}
return
@@ -55,6 +55,10 @@ func (self *_parser) parseStatement() ast.Statement {
return &ast.BadStatement{From: self.idx, To: self.idx + 1}
}
+ if self.mode&StoreComments != 0 {
+ self.comments.ResetLineBreak()
+ }
+
switch self.token {
case token.SEMICOLON:
return self.parseEmptyStatement()
@@ -63,7 +67,9 @@ func (self *_parser) parseStatement() ast.Statement {
case token.IF:
return self.parseIfStatement()
case token.DO:
- return self.parseDoWhileStatement()
+ statement := self.parseDoWhileStatement()
+ self.comments.PostProcessNode(statement)
+ return statement
case token.WHILE:
return self.parseWhileStatement()
case token.FOR:
@@ -79,9 +85,7 @@ func (self *_parser) parseStatement() ast.Statement {
case token.VAR:
return self.parseVariableStatement()
case token.FUNCTION:
- self.parseFunction(true)
- // FIXME
- return &ast.EmptyStatement{}
+ return self.parseFunctionStatement()
case token.SWITCH:
return self.parseSwitchStatement()
case token.RETURN:
@@ -92,21 +96,31 @@ func (self *_parser) parseStatement() ast.Statement {
return self.parseTryStatement()
}
+ var comments []*ast.Comment
+ if self.mode&StoreComments != 0 {
+ comments = self.comments.FetchAll()
+ }
+
expression := self.parseExpression()
if identifier, isIdentifier := expression.(*ast.Identifier); isIdentifier && self.token == token.COLON {
// LabelledStatement
colon := self.idx
+ if self.mode&StoreComments != 0 {
+ self.comments.Unset()
+ }
self.next() // :
- comments := self.findComments(false)
-
label := identifier.Name
for _, value := range self.scope.labels {
if label == value {
self.error(identifier.Idx0(), "Label '%s' already exists", label)
}
}
+ var labelComments []*ast.Comment
+ if self.mode&StoreComments != 0 {
+ labelComments = self.comments.FetchAll()
+ }
self.scope.labels = append(self.scope.labels, label) // Push the label
statement := self.parseStatement()
self.scope.labels = self.scope.labels[:len(self.scope.labels)-1] // Pop the label
@@ -115,9 +129,8 @@ func (self *_parser) parseStatement() ast.Statement {
Colon: colon,
Statement: statement,
}
-
if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(exp, comments, ast.TRAILING)
+ self.comments.CommentMap.AddComments(exp, labelComments, ast.LEADING)
}
return exp
@@ -125,60 +138,69 @@ func (self *_parser) parseStatement() ast.Statement {
self.optionalSemicolon()
- return &ast.ExpressionStatement{
+ statement := &ast.ExpressionStatement{
Expression: expression,
}
+
+ if self.mode&StoreComments != 0 {
+ self.comments.CommentMap.AddComments(statement, comments, ast.LEADING)
+ }
+ return statement
}
func (self *_parser) parseTryStatement() ast.Statement {
-
+ var tryComments []*ast.Comment
+ if self.mode&StoreComments != 0 {
+ tryComments = self.comments.FetchAll()
+ }
node := &ast.TryStatement{
Try: self.expect(token.TRY),
Body: self.parseBlockStatement(),
}
-
if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(node.Body, self.findComments(true), ast.TRAILING)
+ self.comments.CommentMap.AddComments(node, tryComments, ast.LEADING)
+ self.comments.CommentMap.AddComments(node.Body, self.comments.FetchAll(), ast.TRAILING)
}
if self.token == token.CATCH {
catch := self.idx
+ if self.mode&StoreComments != 0 {
+ self.comments.Unset()
+ }
self.next()
self.expect(token.LEFT_PARENTHESIS)
- comments := self.findComments(true)
if self.token != token.IDENTIFIER {
self.expect(token.IDENTIFIER)
self.nextStatement()
return &ast.BadStatement{From: catch, To: self.idx}
} else {
identifier := self.parseIdentifier()
-
- if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(identifier, comments, ast.LEADING)
- }
-
self.expect(token.RIGHT_PARENTHESIS)
node.Catch = &ast.CatchStatement{
Catch: catch,
Parameter: identifier,
Body: self.parseBlockStatement(),
}
- }
- if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(node.Catch, self.findComments(true), ast.TRAILING)
+ if self.mode&StoreComments != 0 {
+ self.comments.CommentMap.AddComments(node.Catch.Body, self.comments.FetchAll(), ast.TRAILING)
+ }
}
}
if self.token == token.FINALLY {
+ if self.mode&StoreComments != 0 {
+ self.comments.Unset()
+ }
self.next()
-
- comments := self.findComments(true)
+ if self.mode&StoreComments != 0 {
+ tryComments = self.comments.FetchAll()
+ }
node.Finally = self.parseBlockStatement()
if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(node.Finally, comments, ast.LEADING)
+ self.comments.CommentMap.AddComments(node.Finally, tryComments, ast.LEADING)
}
}
@@ -192,19 +214,21 @@ func (self *_parser) parseTryStatement() ast.Statement {
func (self *_parser) parseFunctionParameterList() *ast.ParameterList {
opening := self.expect(token.LEFT_PARENTHESIS)
+ if self.mode&StoreComments != 0 {
+ self.comments.Unset()
+ }
var list []*ast.Identifier
for self.token != token.RIGHT_PARENTHESIS && self.token != token.EOF {
- comments := self.findComments(true)
if self.token != token.IDENTIFIER {
self.expect(token.IDENTIFIER)
} else {
identifier := self.parseIdentifier()
- if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(identifier, comments, ast.LEADING)
- }
list = append(list, identifier)
}
if self.token != token.RIGHT_PARENTHESIS {
+ if self.mode&StoreComments != 0 {
+ self.comments.Unset()
+ }
self.expect(token.COMMA)
}
}
@@ -231,6 +255,21 @@ func (self *_parser) parseParameterList() (list []string) {
return
}
+func (self *_parser) parseFunctionStatement() *ast.FunctionStatement {
+ var comments []*ast.Comment
+ if self.mode&StoreComments != 0 {
+ comments = self.comments.FetchAll()
+ }
+ function := &ast.FunctionStatement{
+ Function: self.parseFunction(true),
+ }
+ if self.mode&StoreComments != 0 {
+ self.comments.CommentMap.AddComments(function, comments, ast.LEADING)
+ }
+
+ return function
+}
+
func (self *_parser) parseFunction(declaration bool) *ast.FunctionLiteral {
node := &ast.FunctionLiteral{
@@ -249,6 +288,9 @@ func (self *_parser) parseFunction(declaration bool) *ast.FunctionLiteral {
// Use expect error handling
self.expect(token.IDENTIFIER)
}
+ if self.mode&StoreComments != 0 {
+ self.comments.Unset()
+ }
node.Name = name
node.ParameterList = self.parseFunctionParameterList()
self.parseFunctionBlock(node)
@@ -274,29 +316,23 @@ func (self *_parser) parseFunctionBlock(node *ast.FunctionLiteral) {
func (self *_parser) parseDebuggerStatement() ast.Statement {
idx := self.expect(token.DEBUGGER)
- comments := self.findComments(true)
-
node := &ast.DebuggerStatement{
Debugger: idx,
}
-
if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(node, comments, ast.TRAILING)
+ self.comments.CommentMap.AddComments(node, self.comments.FetchAll(), ast.TRAILING)
}
self.semicolon()
-
- if !self.skippedLineBreak {
- if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(node, self.findComments(false), ast.TRAILING)
- }
- }
-
return node
}
func (self *_parser) parseReturnStatement() ast.Statement {
idx := self.expect(token.RETURN)
+ var comments []*ast.Comment
+ if self.mode&StoreComments != 0 {
+ comments = self.comments.FetchAll()
+ }
if !self.scope.inFunction {
self.error(idx, "Illegal return statement")
@@ -311,6 +347,9 @@ func (self *_parser) parseReturnStatement() ast.Statement {
if !self.implicitSemicolon && self.token != token.SEMICOLON && self.token != token.RIGHT_BRACE && self.token != token.EOF {
node.Argument = self.parseExpression()
}
+ if self.mode&StoreComments != 0 {
+ self.comments.CommentMap.AddComments(node, comments, ast.LEADING)
+ }
self.semicolon()
@@ -318,6 +357,10 @@ func (self *_parser) parseReturnStatement() ast.Statement {
}
func (self *_parser) parseThrowStatement() ast.Statement {
+ var comments []*ast.Comment
+ if self.mode&StoreComments != 0 {
+ comments = self.comments.FetchAll()
+ }
idx := self.expect(token.THROW)
if self.implicitSemicolon {
@@ -333,6 +376,9 @@ func (self *_parser) parseThrowStatement() ast.Statement {
node := &ast.ThrowStatement{
Argument: self.parseExpression(),
}
+ if self.mode&StoreComments != 0 {
+ self.comments.CommentMap.AddComments(node, comments, ast.LEADING)
+ }
self.semicolon()
@@ -340,13 +386,23 @@ func (self *_parser) parseThrowStatement() ast.Statement {
}
func (self *_parser) parseSwitchStatement() ast.Statement {
+ var comments []*ast.Comment
+ if self.mode&StoreComments != 0 {
+ comments = self.comments.FetchAll()
+ }
self.expect(token.SWITCH)
+ if self.mode&StoreComments != 0 {
+ comments = append(comments, self.comments.FetchAll()...)
+ }
self.expect(token.LEFT_PARENTHESIS)
node := &ast.SwitchStatement{
Discriminant: self.parseExpression(),
Default: -1,
}
self.expect(token.RIGHT_PARENTHESIS)
+ if self.mode&StoreComments != 0 {
+ comments = append(comments, self.comments.FetchAll()...)
+ }
self.expect(token.LEFT_BRACE)
@@ -372,14 +428,23 @@ func (self *_parser) parseSwitchStatement() ast.Statement {
node.Body = append(node.Body, clause)
}
+ if self.mode&StoreComments != 0 {
+ self.comments.CommentMap.AddComments(node, comments, ast.LEADING)
+ }
+
return node
}
func (self *_parser) parseWithStatement() ast.Statement {
+ var comments []*ast.Comment
+ if self.mode&StoreComments != 0 {
+ comments = self.comments.FetchAll()
+ }
self.expect(token.WITH)
-
- // Find the comments after with
- comments := self.findComments(true)
+ var withComments []*ast.Comment
+ if self.mode&StoreComments != 0 {
+ withComments = self.comments.FetchAll()
+ }
self.expect(token.LEFT_PARENTHESIS)
@@ -388,65 +453,39 @@ func (self *_parser) parseWithStatement() ast.Statement {
}
self.expect(token.RIGHT_PARENTHESIS)
- // Add the key comments
if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(node, comments, ast.KEY)
+ //comments = append(comments, self.comments.FetchAll()...)
+ self.comments.CommentMap.AddComments(node, comments, ast.LEADING)
+ self.comments.CommentMap.AddComments(node, withComments, ast.WITH)
}
- // Find the leading comments for the body
- comments = self.findComments(true)
-
node.Body = self.parseStatement()
- // Add the body comments
- if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(node.Body, comments, ast.LEADING)
- }
-
- // Move the trailing comments to the with statement
- self.commentMap.MoveComments(node.Body, node, ast.TRAILING)
-
return node
}
func (self *_parser) parseCaseStatement() *ast.CaseStatement {
-
- var comments []*ast.Comment
-
node := &ast.CaseStatement{
Case: self.idx,
}
+ var comments []*ast.Comment
if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(node, self.findComments(true), ast.LEADING)
+ comments = self.comments.FetchAll()
+ self.comments.Unset()
}
- // Consume current comments
- self.consumeComments(node, ast.LEADING)
-
if self.token == token.DEFAULT {
self.next()
} else {
self.expect(token.CASE)
-
- comments = self.findComments(true)
-
node.Test = self.parseExpression()
- if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(node.Test, comments, ast.LEADING)
- }
-
- comments = self.findComments(true)
- if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(node.Test, comments, ast.TRAILING)
- }
}
- self.expect(token.COLON)
-
if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(node.Test, self.findComments(false), ast.TRAILING)
+ self.comments.Unset()
}
+ self.expect(token.COLON)
for {
if self.token == token.EOF ||
@@ -457,10 +496,11 @@ func (self *_parser) parseCaseStatement() *ast.CaseStatement {
}
consequent := self.parseStatement()
node.Consequent = append(node.Consequent, consequent)
+ }
- if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(consequent, self.findComments(false), ast.TRAILING)
- }
+ // Link the comments to the case statement
+ if self.mode&StoreComments != 0 {
+ self.comments.CommentMap.AddComments(node, comments, ast.LEADING)
}
return node
@@ -479,21 +519,9 @@ func (self *_parser) parseForIn(into ast.Expression) *ast.ForInStatement {
// Already have consumed "<into> in"
- // Comments after the in, before the expression
- comments := self.findComments(true)
-
source := self.parseExpression()
- if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(source, comments, ast.LEADING)
- }
-
self.expect(token.RIGHT_PARENTHESIS)
-
- comments = self.findComments(true)
body := self.parseIterationStatement()
- if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(body, comments, ast.LEADING)
- }
forin := &ast.ForInStatement{
Into: into,
@@ -501,8 +529,6 @@ func (self *_parser) parseForIn(into ast.Expression) *ast.ForInStatement {
Body: body,
}
- self.commentMap.MoveComments(body, forin, ast.TRAILING)
-
return forin
}
@@ -510,34 +536,21 @@ func (self *_parser) parseFor(initializer ast.Expression) *ast.ForStatement {
// Already have consumed "<initializer> ;"
- comments := self.findComments(true)
-
var test, update ast.Expression
if self.token != token.SEMICOLON {
test = self.parseExpression()
- if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(test, comments, ast.LEADING)
- }
+ }
+ if self.mode&StoreComments != 0 {
+ self.comments.Unset()
}
self.expect(token.SEMICOLON)
- comments = self.findComments(true)
-
if self.token != token.RIGHT_PARENTHESIS {
update = self.parseExpression()
- if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(update, comments, ast.LEADING)
- }
}
self.expect(token.RIGHT_PARENTHESIS)
-
- comments = self.findComments(true)
-
body := self.parseIterationStatement()
- if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(body, comments, ast.LEADING)
- }
forstatement := &ast.ForStatement{
Initializer: initializer,
@@ -546,17 +559,21 @@ func (self *_parser) parseFor(initializer ast.Expression) *ast.ForStatement {
Body: body,
}
- self.commentMap.MoveComments(body, forstatement, ast.TRAILING)
-
return forstatement
}
func (self *_parser) parseForOrForInStatement() ast.Statement {
+ var comments []*ast.Comment
+ if self.mode&StoreComments != 0 {
+ comments = self.comments.FetchAll()
+ }
idx := self.expect(token.FOR)
+ var forComments []*ast.Comment
+ if self.mode&StoreComments != 0 {
+ forComments = self.comments.FetchAll()
+ }
self.expect(token.LEFT_PARENTHESIS)
- comments := self.findComments(true)
-
var left []ast.Expression
forIn := false
@@ -566,15 +583,26 @@ func (self *_parser) parseForOrForInStatement() ast.Statement {
self.scope.allowIn = false
if self.token == token.VAR {
var_ := self.idx
+ var varComments []*ast.Comment
+ if self.mode&StoreComments != 0 {
+ varComments = self.comments.FetchAll()
+ self.comments.Unset()
+ }
self.next()
list := self.parseVariableDeclarationList(var_)
if len(list) == 1 && self.token == token.IN {
+ if self.mode&StoreComments != 0 {
+ self.comments.Unset()
+ }
self.next() // in
forIn = true
left = []ast.Expression{list[0]} // There is only one declaration
} else {
left = list
}
+ if self.mode&StoreComments != 0 {
+ self.comments.CommentMap.AddComments(left[0], varComments, ast.LEADING)
+ }
} else {
left = append(left, self.parseExpression())
if self.token == token.IN {
@@ -595,22 +623,32 @@ func (self *_parser) parseForOrForInStatement() ast.Statement {
return &ast.BadStatement{From: idx, To: self.idx}
}
+ forin := self.parseForIn(left[0])
if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(left[0], comments, ast.LEADING)
+ self.comments.CommentMap.AddComments(forin, comments, ast.LEADING)
+ self.comments.CommentMap.AddComments(forin, forComments, ast.FOR)
}
- return self.parseForIn(left[0])
+ return forin
}
+ if self.mode&StoreComments != 0 {
+ self.comments.Unset()
+ }
self.expect(token.SEMICOLON)
initializer := &ast.SequenceExpression{Sequence: left}
+ forstatement := self.parseFor(initializer)
if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(initializer, comments, ast.LEADING)
+ self.comments.CommentMap.AddComments(forstatement, comments, ast.LEADING)
+ self.comments.CommentMap.AddComments(forstatement, forComments, ast.FOR)
}
- return self.parseFor(initializer)
+ return forstatement
}
func (self *_parser) parseVariableStatement() *ast.VariableStatement {
-
+ var comments []*ast.Comment
+ if self.mode&StoreComments != 0 {
+ comments = self.comments.FetchAll()
+ }
idx := self.expect(token.VAR)
list := self.parseVariableDeclarationList(idx)
@@ -619,21 +657,12 @@ func (self *_parser) parseVariableStatement() *ast.VariableStatement {
Var: idx,
List: list,
}
-
- self.commentMap.MoveComments(statement.List[len(statement.List)-1], statement, ast.TRAILING)
-
if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(statement, self.findComments(true), ast.TRAILING)
+ self.comments.CommentMap.AddComments(statement, comments, ast.LEADING)
+ self.comments.Unset()
}
-
self.semicolon()
- if self.skippedLineBreak {
- if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(statement, self.findComments(false), ast.TRAILING)
- }
- }
-
return statement
}
@@ -644,14 +673,17 @@ func (self *_parser) parseDoWhileStatement() ast.Statement {
self.scope.inIteration = inIteration
}()
+ var comments []*ast.Comment
+ if self.mode&StoreComments != 0 {
+ comments = self.comments.FetchAll()
+ }
self.expect(token.DO)
-
- comments := self.findComments(true)
-
- node := &ast.DoWhileStatement{}
+ var doComments []*ast.Comment
if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(node, comments, ast.KEY)
+ doComments = self.comments.FetchAll()
}
+
+ node := &ast.DoWhileStatement{}
if self.token == token.LEFT_BRACE {
node.Body = self.parseBlockStatement()
} else {
@@ -659,125 +691,91 @@ func (self *_parser) parseDoWhileStatement() ast.Statement {
}
self.expect(token.WHILE)
-
- comments = self.findComments(true)
-
- self.expect(token.LEFT_PARENTHESIS)
- node.Test = self.parseExpression()
+ var whileComments []*ast.Comment
if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(node.Test, comments, ast.LEADING)
+ whileComments = self.comments.FetchAll()
}
-
+ self.expect(token.LEFT_PARENTHESIS)
+ node.Test = self.parseExpression()
self.expect(token.RIGHT_PARENTHESIS)
if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(node.Test, self.findComments(false), ast.TRAILING)
+ self.comments.CommentMap.AddComments(node, comments, ast.LEADING)
+ self.comments.CommentMap.AddComments(node, doComments, ast.DO)
+ self.comments.CommentMap.AddComments(node, whileComments, ast.WHILE)
}
return node
}
func (self *_parser) parseWhileStatement() ast.Statement {
+ var comments []*ast.Comment
+ if self.mode&StoreComments != 0 {
+ comments = self.comments.FetchAll()
+ }
self.expect(token.WHILE)
- // Comments after while keyword
- comments := self.findComments(true)
+ var whileComments []*ast.Comment
+ if self.mode&StoreComments != 0 {
+ whileComments = self.comments.FetchAll()
+ }
self.expect(token.LEFT_PARENTHESIS)
node := &ast.WhileStatement{
Test: self.parseExpression(),
}
-
- // Add the while comments
- if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(node, comments, ast.KEY)
- }
-
self.expect(token.RIGHT_PARENTHESIS)
-
- // Finding comments prior to the body
- comments = self.findComments(true)
-
node.Body = self.parseIterationStatement()
- // Adding the comments prior to the body
if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(node.Body, comments, ast.LEADING)
+ self.comments.CommentMap.AddComments(node, comments, ast.LEADING)
+ self.comments.CommentMap.AddComments(node, whileComments, ast.WHILE)
}
- // Move the trailing comments to the while statement
- self.commentMap.MoveComments(node.Body, node, ast.TRAILING)
-
return node
}
func (self *_parser) parseIfStatement() ast.Statement {
+ var comments []*ast.Comment
+ if self.mode&StoreComments != 0 {
+ comments = self.comments.FetchAll()
+ }
self.expect(token.IF)
-
- comments := self.findComments(true)
+ var ifComments []*ast.Comment
+ if self.mode&StoreComments != 0 {
+ ifComments = self.comments.FetchAll()
+ }
self.expect(token.LEFT_PARENTHESIS)
node := &ast.IfStatement{
Test: self.parseExpression(),
}
-
- if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(node, comments, ast.KEY)
- }
-
self.expect(token.RIGHT_PARENTHESIS)
-
- comments = self.findComments(true)
-
if self.token == token.LEFT_BRACE {
node.Consequent = self.parseBlockStatement()
} else {
node.Consequent = self.parseStatement()
}
- if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(node.Consequent, comments, ast.LEADING)
- self.commentMap.AddComments(node.Consequent, self.findComments(true), ast.TRAILING)
- }
-
if self.token == token.ELSE {
self.next()
- comments = self.findComments(true)
-
node.Alternate = self.parseStatement()
+ }
- if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(node.Alternate, comments, ast.LEADING)
- self.commentMap.AddComments(node.Alternate, self.findComments(false), ast.TRAILING)
- }
+ if self.mode&StoreComments != 0 {
+ self.comments.CommentMap.AddComments(node, comments, ast.LEADING)
+ self.comments.CommentMap.AddComments(node, ifComments, ast.IF)
}
return node
}
func (self *_parser) parseSourceElement() ast.Statement {
-
- statementComment := self.fetchComments()
-
statement := self.parseStatement()
-
- if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(statement, statementComment, ast.LEADING)
- }
-
+ //self.comments.Unset()
return statement
}
-func (self *_parser) parseCommentElement() {
- literal := self.literal
- idx := self.expect(token.COMMENT)
- self.comments = append(self.comments, &ast.Comment{
- Begin: idx,
- Text: literal,
- Position: ast.LEADING,
- })
-}
-
func (self *_parser) parseSourceElements() []ast.Statement {
body := []ast.Statement(nil)
@@ -785,20 +783,10 @@ func (self *_parser) parseSourceElements() []ast.Statement {
if self.token != token.STRING {
break
}
-
- if self.token == token.COMMENT {
- self.parseCommentElement()
- continue
- }
-
body = append(body, self.parseSourceElement())
}
for self.token != token.EOF {
- if self.token == token.COMMENT {
- self.parseCommentElement()
- continue
- }
body = append(body, self.parseSourceElement())
}
@@ -816,10 +804,11 @@ func (self *_parser) parseProgram() *ast.Program {
}
func (self *_parser) parseBreakStatement() ast.Statement {
+ var comments []*ast.Comment
+ if self.mode&StoreComments != 0 {
+ comments = self.comments.FetchAll()
+ }
idx := self.expect(token.BREAK)
-
- breakComments := self.findComments(true)
-
semicolon := self.implicitSemicolon
if self.token == token.SEMICOLON {
semicolon = true
@@ -837,7 +826,8 @@ func (self *_parser) parseBreakStatement() ast.Statement {
}
if self.mode&StoreComments != 0 {
- self.commentMap.AddComments(breakStatement, breakComments, ast.TRAILING)
+ self.comments.CommentMap.AddComments(breakStatement, comments, ast.LEADING)
+ self.comments.CommentMap.AddComments(breakStatement, self.comments.FetchAll(), ast.TRAILING)
}
return breakStatement
@@ -850,11 +840,16 @@ func (self *_parser) parseBreakStatement() ast.Statement {
return &ast.BadStatement{From: idx, To: identifier.Idx1()}
}
self.semicolon()
- return &ast.BranchStatement{
+ breakStatement := &ast.BranchStatement{
Idx: idx,
Token: token.BREAK,
Label: identifier,
}
+ if self.mode&StoreComments != 0 {
+ self.comments.CommentMap.AddComments(breakStatement, comments, ast.LEADING)
+ }
+
+ return breakStatement
}
self.expect(token.IDENTIFIER)
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/property.go b/vendor/github.com/robertkrimen/otto/property.go
index 5445eccde..5445eccde 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/property.go
+++ b/vendor/github.com/robertkrimen/otto/property.go
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/registry/README.markdown b/vendor/github.com/robertkrimen/otto/registry/README.markdown
index ba2d38909..ba2d38909 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/registry/README.markdown
+++ b/vendor/github.com/robertkrimen/otto/registry/README.markdown
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/registry/registry.go b/vendor/github.com/robertkrimen/otto/registry/registry.go
index 966638ac4..966638ac4 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/registry/registry.go
+++ b/vendor/github.com/robertkrimen/otto/registry/registry.go
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/result.go b/vendor/github.com/robertkrimen/otto/result.go
index 63642e7d0..63642e7d0 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/result.go
+++ b/vendor/github.com/robertkrimen/otto/result.go
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/runtime.go b/vendor/github.com/robertkrimen/otto/runtime.go
index a998f7acc..5762bd0c3 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/runtime.go
+++ b/vendor/github.com/robertkrimen/otto/runtime.go
@@ -4,7 +4,10 @@ import (
"errors"
"fmt"
"math"
+ "path"
"reflect"
+ "runtime"
+ "strconv"
"sync"
"github.com/robertkrimen/otto/ast"
@@ -56,6 +59,8 @@ type _runtime struct {
eval *_object // The builtin eval, for determine indirect versus direct invocation
debugger func(*Otto)
random func() float64
+ stackLimit int
+ traceLimit int
labels []string // FIXME
lck sync.Mutex
@@ -63,6 +68,14 @@ type _runtime struct {
func (self *_runtime) enterScope(scope *_scope) {
scope.outer = self.scope
+ if self.scope != nil {
+ if self.stackLimit != 0 && self.scope.depth+1 >= self.stackLimit {
+ panic(self.panicRangeError("Maximum call stack size exceeded"))
+ }
+
+ scope.depth = self.scope.depth + 1
+ }
+
self.scope = scope
}
@@ -114,7 +127,7 @@ func (self *_runtime) tryCatchEvaluate(inner func() Value) (tryValue Value, exce
switch caught := caught.(type) {
case _error:
exception = true
- tryValue = toValue_object(self.newError(caught.name, caught.messageValue()))
+ tryValue = toValue_object(self.newError(caught.name, caught.messageValue(), 0))
case Value:
exception = true
tryValue = caught
@@ -178,13 +191,12 @@ func testObjectCoercible(value Value) (isObject bool, mustCoerce bool) {
case valueReference, valueEmpty, valueNull, valueUndefined:
return false, false
case valueNumber, valueString, valueBoolean:
- isObject = false
- mustCoerce = true
+ return false, true
case valueObject:
- isObject = true
- mustCoerce = false
+ return true, false
+ default:
+ panic("this should never happen")
}
- return
}
func (self *_runtime) safeToValue(value interface{}) (Value, error) {
@@ -197,7 +209,9 @@ func (self *_runtime) safeToValue(value interface{}) (Value, error) {
// convertNumeric converts numeric parameter val from js to that of type t if it is safe to do so, otherwise it panics.
// This allows literals (int64), bitwise values (int32) and the general form (float64) of javascript numerics to be passed as parameters to go functions easily.
-func convertNumeric(val reflect.Value, t reflect.Type) reflect.Value {
+func (self *_runtime) convertNumeric(v Value, t reflect.Type) reflect.Value {
+ val := reflect.ValueOf(v.export())
+
if val.Kind() == t.Kind() {
return val
}
@@ -214,20 +228,20 @@ func convertNumeric(val reflect.Value, t reflect.Type) reflect.Value {
return reflect.ValueOf(f64)
case reflect.Float32:
if reflect.Zero(t).OverflowFloat(f64) {
- panic("converting float64 to float32 would overflow")
+ panic(self.panicRangeError("converting float64 to float32 would overflow"))
}
return val.Convert(t)
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
i64 := int64(f64)
if float64(i64) != f64 {
- panic(fmt.Sprintf("converting %v to %v would cause loss of precision", val.Type(), t))
+ panic(self.panicRangeError(fmt.Sprintf("converting %v to %v would cause loss of precision", val.Type(), t)))
}
// The float represents an integer
val = reflect.ValueOf(i64)
default:
- panic(fmt.Sprintf("cannot convert %v to %v", val.Type(), t))
+ panic(self.panicTypeError(fmt.Sprintf("cannot convert %v to %v", val.Type(), t)))
}
}
@@ -237,15 +251,15 @@ func convertNumeric(val reflect.Value, t reflect.Type) reflect.Value {
switch t.Kind() {
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
if reflect.Zero(t).OverflowInt(i64) {
- panic(fmt.Sprintf("converting %v to %v would overflow", val.Type(), t))
+ panic(self.panicRangeError(fmt.Sprintf("converting %v to %v would overflow", val.Type(), t)))
}
return val.Convert(t)
case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
if i64 < 0 {
- panic(fmt.Sprintf("converting %v to %v would underflow", val.Type(), t))
+ panic(self.panicRangeError(fmt.Sprintf("converting %v to %v would underflow", val.Type(), t)))
}
if reflect.Zero(t).OverflowUint(uint64(i64)) {
- panic(fmt.Sprintf("converting %v to %v would overflow", val.Type(), t))
+ panic(self.panicRangeError(fmt.Sprintf("converting %v to %v would overflow", val.Type(), t)))
}
return val.Convert(t)
}
@@ -255,86 +269,214 @@ func convertNumeric(val reflect.Value, t reflect.Type) reflect.Value {
switch t.Kind() {
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
if u64 > math.MaxInt64 || reflect.Zero(t).OverflowInt(int64(u64)) {
- panic(fmt.Sprintf("converting %v to %v would overflow", val.Type(), t))
+ panic(self.panicRangeError(fmt.Sprintf("converting %v to %v would overflow", val.Type(), t)))
}
return val.Convert(t)
case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
if reflect.Zero(t).OverflowUint(u64) {
- panic(fmt.Sprintf("converting %v to %v would overflow", val.Type(), t))
+ panic(self.panicRangeError(fmt.Sprintf("converting %v to %v would overflow", val.Type(), t)))
}
return val.Convert(t)
}
}
- panic(fmt.Sprintf("unsupported type %v for numeric conversion", val.Type()))
+ panic(self.panicTypeError(fmt.Sprintf("unsupported type %v for numeric conversion", val.Type())))
}
-// callParamConvert converts request val to type t if possible.
+var typeOfValue = reflect.TypeOf(Value{})
+
+// convertCallParameter converts request val to type t if possible.
// If the conversion fails due to overflow or type miss-match then it panics.
// If no conversion is known then the original value is returned.
-func callParamConvert(val reflect.Value, t reflect.Type) reflect.Value {
- if val.Kind() == reflect.Interface {
- val = reflect.ValueOf(val.Interface())
+func (self *_runtime) convertCallParameter(v Value, t reflect.Type) reflect.Value {
+ if t == typeOfValue {
+ return reflect.ValueOf(v)
}
- switch t.Kind() {
- case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Float32, reflect.Float64:
- if val.Kind() == t.Kind() {
- // Types already match
- return val
- }
- return convertNumeric(val, t)
- case reflect.Slice:
- if val.Kind() != reflect.Slice {
- // Conversion from none slice type to slice not possible
- panic(fmt.Sprintf("cannot use %v as type %v", val, t))
+ if v.kind == valueObject {
+ if gso, ok := v._object().value.(*_goStructObject); ok {
+ if gso.value.Type().AssignableTo(t) {
+ return gso.value
+ }
}
- default:
- // No supported conversion
- return val
}
- elemType := t.Elem()
- switch elemType.Kind() {
- case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Float32, reflect.Float64, reflect.Slice:
- // Attempt to convert to slice of the type t
- s := reflect.MakeSlice(reflect.SliceOf(elemType), val.Len(), val.Len())
- for i := 0; i < val.Len(); i++ {
- s.Index(i).Set(callParamConvert(val.Index(i), elemType))
+ if t.Kind() == reflect.Interface {
+ iv := reflect.ValueOf(v.export())
+ if iv.Type().AssignableTo(t) {
+ return iv
}
+ }
+
+ tk := t.Kind()
+
+ if tk == reflect.Ptr {
+ switch v.kind {
+ case valueEmpty, valueNull, valueUndefined:
+ return reflect.Zero(t)
+ default:
+ var vv reflect.Value
+ if err := catchPanic(func() { vv = self.convertCallParameter(v, t.Elem()) }); err == nil {
+ if vv.CanAddr() {
+ return vv.Addr()
+ }
- return s
+ pv := reflect.New(vv.Type())
+ pv.Elem().Set(vv)
+ return pv
+ }
+ }
}
- // Not a slice type we can convert
- return val
-}
+ switch tk {
+ case reflect.Bool:
+ return reflect.ValueOf(v.bool())
+ case reflect.String:
+ switch v.kind {
+ case valueString:
+ return reflect.ValueOf(v.value)
+ case valueNumber:
+ return reflect.ValueOf(fmt.Sprintf("%v", v.value))
+ }
+ case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Float32, reflect.Float64:
+ switch v.kind {
+ case valueNumber:
+ return self.convertNumeric(v, t)
+ }
+ case reflect.Slice:
+ if o := v._object(); o != nil {
+ if lv := o.get("length"); lv.IsNumber() {
+ l := lv.number().int64
+
+ s := reflect.MakeSlice(t, int(l), int(l))
+
+ tt := t.Elem()
+
+ if o.class == "Array" {
+ for i := int64(0); i < l; i++ {
+ p, ok := o.property[strconv.FormatInt(i, 10)]
+ if !ok {
+ continue
+ }
-// callSliceRequired returns true if CallSlice is required instead of Call.
-func callSliceRequired(param reflect.Type, val reflect.Value) bool {
- vt := val.Type()
- for param.Kind() == reflect.Slice {
- if val.Kind() == reflect.Interface {
- val = reflect.ValueOf(val.Interface())
- vt = val.Type()
+ e, ok := p.value.(Value)
+ if !ok {
+ continue
+ }
+
+ ev := self.convertCallParameter(e, tt)
+
+ s.Index(int(i)).Set(ev)
+ }
+ } else if o.class == "GoArray" {
+
+ var gslice bool
+ switch o.value.(type) {
+ case *_goSliceObject:
+ gslice = true
+ case *_goArrayObject:
+ gslice = false
+ }
+
+ for i := int64(0); i < l; i++ {
+ var p *_property
+ if gslice {
+ p = goSliceGetOwnProperty(o, strconv.FormatInt(i, 10))
+ } else {
+ p = goArrayGetOwnProperty(o, strconv.FormatInt(i, 10))
+ }
+ if p == nil {
+ continue
+ }
+
+ e, ok := p.value.(Value)
+ if !ok {
+ continue
+ }
+
+ ev := self.convertCallParameter(e, tt)
+
+ s.Index(int(i)).Set(ev)
+ }
+ }
+
+ return s
+ }
}
+ case reflect.Map:
+ if o := v._object(); o != nil && t.Key().Kind() == reflect.String {
+ m := reflect.MakeMap(t)
+
+ o.enumerate(false, func(k string) bool {
+ m.SetMapIndex(reflect.ValueOf(k), self.convertCallParameter(o.get(k), t.Elem()))
+ return true
+ })
+
+ return m
+ }
+ case reflect.Func:
+ if t.NumOut() > 1 {
+ panic(self.panicTypeError("converting JavaScript values to Go functions with more than one return value is currently not supported"))
+ }
+
+ if o := v._object(); o != nil && o.class == "Function" {
+ return reflect.MakeFunc(t, func(args []reflect.Value) []reflect.Value {
+ l := make([]interface{}, len(args))
+ for i, a := range args {
+ if a.CanInterface() {
+ l[i] = a.Interface()
+ }
+ }
+
+ rv, err := v.Call(nullValue, l...)
+ if err != nil {
+ panic(err)
+ }
- if vt.Kind() != reflect.Slice {
- return false
+ if t.NumOut() == 0 {
+ return nil
+ }
+
+ return []reflect.Value{self.convertCallParameter(rv, t.Out(0))}
+ })
}
+ }
- vt = vt.Elem()
- if val.Kind() != reflect.Invalid {
- if val.Len() > 0 {
- val = val.Index(0)
- } else {
- val = reflect.Value{}
+ if tk == reflect.String {
+ if o := v._object(); o != nil && o.hasProperty("toString") {
+ if fn := o.get("toString"); fn.IsFunction() {
+ sv, err := fn.Call(v)
+ if err != nil {
+ panic(err)
+ }
+
+ var r reflect.Value
+ if err := catchPanic(func() { r = self.convertCallParameter(sv, t) }); err == nil {
+ return r
+ }
}
}
- param = param.Elem()
+
+ return reflect.ValueOf(v.String())
}
- return true
+ s := "OTTO DOES NOT UNDERSTAND THIS TYPE"
+ switch v.kind {
+ case valueBoolean:
+ s = "boolean"
+ case valueNull:
+ s = "null"
+ case valueNumber:
+ s = "number"
+ case valueString:
+ s = "string"
+ case valueUndefined:
+ s = "undefined"
+ case valueObject:
+ s = v.Class()
+ }
+
+ panic(self.panicTypeError("can't convert from %q to %q", s, t.String()))
}
func (self *_runtime) toValue(value interface{}) Value {
@@ -342,9 +484,27 @@ func (self *_runtime) toValue(value interface{}) Value {
case Value:
return value
case func(FunctionCall) Value:
- return toValue_object(self.newNativeFunction("", value))
+ var name, file string
+ var line int
+ pc := reflect.ValueOf(value).Pointer()
+ fn := runtime.FuncForPC(pc)
+ if fn != nil {
+ name = fn.Name()
+ file, line = fn.FileLine(pc)
+ file = path.Base(file)
+ }
+ return toValue_object(self.newNativeFunction(name, file, line, value))
case _nativeFunction:
- return toValue_object(self.newNativeFunction("", value))
+ var name, file string
+ var line int
+ pc := reflect.ValueOf(value).Pointer()
+ fn := runtime.FuncForPC(pc)
+ if fn != nil {
+ name = fn.Name()
+ file, line = fn.FileLine(pc)
+ file = path.Base(file)
+ }
+ return toValue_object(self.newNativeFunction(name, file, line, value))
case Object, *Object, _object, *_object:
// Nothing happens.
// FIXME We should really figure out what can come here.
@@ -352,6 +512,7 @@ func (self *_runtime) toValue(value interface{}) Value {
default:
{
value := reflect.ValueOf(value)
+
switch value.Kind() {
case reflect.Ptr:
switch reflect.Indirect(value).Kind() {
@@ -360,40 +521,75 @@ func (self *_runtime) toValue(value interface{}) Value {
case reflect.Array:
return toValue_object(self.newGoArray(value))
}
+ case reflect.Struct:
+ return toValue_object(self.newGoStructObject(value))
+ case reflect.Map:
+ return toValue_object(self.newGoMapObject(value))
+ case reflect.Slice:
+ return toValue_object(self.newGoSlice(value))
+ case reflect.Array:
+ return toValue_object(self.newGoArray(value))
case reflect.Func:
- // TODO Maybe cache this?
- return toValue_object(self.newNativeFunction("", func(call FunctionCall) Value {
- argsCount := len(call.ArgumentList)
- in := make([]reflect.Value, argsCount)
- t := value.Type()
- callSlice := false
- paramsCount := t.NumIn()
- lastParam := paramsCount - 1
- lastArg := argsCount - 1
- isVariadic := t.IsVariadic()
- for i, value := range call.ArgumentList {
- var paramType reflect.Type
- if isVariadic && i == lastArg && argsCount == paramsCount {
- // Variadic functions last parameter and parameter numbers match incoming args
- paramType = t.In(lastArg)
- val := reflect.ValueOf(value.export())
- callSlice = callSliceRequired(paramType, val)
- if callSlice {
- in[i] = callParamConvert(reflect.ValueOf(value.export()), paramType)
- continue
+ var name, file string
+ var line int
+ if v := reflect.ValueOf(value); v.Kind() == reflect.Ptr {
+ pc := v.Pointer()
+ fn := runtime.FuncForPC(pc)
+ if fn != nil {
+ name = fn.Name()
+ file, line = fn.FileLine(pc)
+ file = path.Base(file)
+ }
+ }
+
+ typ := value.Type()
+
+ return toValue_object(self.newNativeFunction(name, file, line, func(c FunctionCall) Value {
+ nargs := typ.NumIn()
+
+ if len(c.ArgumentList) != nargs {
+ if typ.IsVariadic() {
+ if len(c.ArgumentList) < nargs-1 {
+ panic(self.panicRangeError(fmt.Sprintf("expected at least %d arguments; got %d", nargs-1, len(c.ArgumentList))))
}
+ } else {
+ panic(self.panicRangeError(fmt.Sprintf("expected %d argument(s); got %d", nargs, len(c.ArgumentList))))
}
+ }
+
+ in := make([]reflect.Value, len(c.ArgumentList))
+
+ callSlice := false
+
+ for i, a := range c.ArgumentList {
+ var t reflect.Type
- if i >= lastParam {
- if isVariadic {
- paramType = t.In(lastParam).Elem()
- } else {
- paramType = t.In(lastParam)
+ n := i
+ if n >= nargs-1 && typ.IsVariadic() {
+ if n > nargs-1 {
+ n = nargs - 1
}
+
+ t = typ.In(n).Elem()
} else {
- paramType = t.In(i)
+ t = typ.In(n)
}
- in[i] = callParamConvert(reflect.ValueOf(value.export()), paramType)
+
+ // if this is a variadic Go function, and the caller has supplied
+ // exactly the number of JavaScript arguments required, and this
+ // is the last JavaScript argument, try treating the it as the
+ // actual set of variadic Go arguments. if that succeeds, break
+ // out of the loop.
+ if typ.IsVariadic() && len(c.ArgumentList) == nargs && i == nargs-1 {
+ var v reflect.Value
+ if err := catchPanic(func() { v = self.convertCallParameter(a, typ.In(n)) }); err == nil {
+ in[i] = v
+ callSlice = true
+ break
+ }
+ }
+
+ in[i] = self.convertCallParameter(a, t)
}
var out []reflect.Value
@@ -403,33 +599,24 @@ func (self *_runtime) toValue(value interface{}) Value {
out = value.Call(in)
}
- l := len(out)
- switch l {
+ switch len(out) {
case 0:
return Value{}
case 1:
return self.toValue(out[0].Interface())
- }
+ default:
+ s := make([]interface{}, len(out))
+ for i, v := range out {
+ s[i] = self.toValue(v.Interface())
+ }
- // Return an array of the values to emulate multi value return.
- // In the future this can be used along side destructuring assignment.
- s := make([]interface{}, l)
- for i, v := range out {
- s[i] = self.toValue(v.Interface())
+ return self.toValue(s)
}
- return self.toValue(s)
}))
- case reflect.Struct:
- return toValue_object(self.newGoStructObject(value))
- case reflect.Map:
- return toValue_object(self.newGoMapObject(value))
- case reflect.Slice:
- return toValue_object(self.newGoSlice(value))
- case reflect.Array:
- return toValue_object(self.newGoArray(value))
}
}
}
+
return toValue(value)
}
@@ -445,32 +632,35 @@ func (runtime *_runtime) newGoArray(value reflect.Value) *_object {
return self
}
-func (runtime *_runtime) parse(filename string, src interface{}) (*ast.Program, error) {
- return parser.ParseFile(nil, filename, src, 0)
+func (runtime *_runtime) parse(filename string, src, sm interface{}) (*ast.Program, error) {
+ return parser.ParseFileWithSourceMap(nil, filename, src, sm, 0)
}
-func (runtime *_runtime) cmpl_parse(filename string, src interface{}) (*_nodeProgram, error) {
- program, err := parser.ParseFile(nil, filename, src, 0)
+func (runtime *_runtime) cmpl_parse(filename string, src, sm interface{}) (*_nodeProgram, error) {
+ program, err := parser.ParseFileWithSourceMap(nil, filename, src, sm, 0)
if err != nil {
return nil, err
}
+
return cmpl_parse(program), nil
}
-func (self *_runtime) parseSource(src interface{}) (*_nodeProgram, *ast.Program, error) {
+func (self *_runtime) parseSource(src, sm interface{}) (*_nodeProgram, *ast.Program, error) {
switch src := src.(type) {
case *ast.Program:
return nil, src, nil
case *Script:
return src.program, nil, nil
}
- program, err := self.parse("", src)
+
+ program, err := self.parse("", src, sm)
+
return nil, program, err
}
-func (self *_runtime) cmpl_runOrEval(src interface{}, eval bool) (Value, error) {
+func (self *_runtime) cmpl_runOrEval(src, sm interface{}, eval bool) (Value, error) {
result := Value{}
- cmpl_program, program, err := self.parseSource(src)
+ cmpl_program, program, err := self.parseSource(src, sm)
if err != nil {
return result, err
}
@@ -489,12 +679,12 @@ func (self *_runtime) cmpl_runOrEval(src interface{}, eval bool) (Value, error)
return result, err
}
-func (self *_runtime) cmpl_run(src interface{}) (Value, error) {
- return self.cmpl_runOrEval(src, false)
+func (self *_runtime) cmpl_run(src, sm interface{}) (Value, error) {
+ return self.cmpl_runOrEval(src, sm, false)
}
-func (self *_runtime) cmpl_eval(src interface{}) (Value, error) {
- return self.cmpl_runOrEval(src, true)
+func (self *_runtime) cmpl_eval(src, sm interface{}) (Value, error) {
+ return self.cmpl_runOrEval(src, sm, true)
}
func (self *_runtime) parseThrow(err error) {
@@ -514,14 +704,8 @@ func (self *_runtime) parseThrow(err error) {
panic(self.panicSyntaxError(err.Error()))
}
-func (self *_runtime) parseOrThrow(source string) *ast.Program {
- program, err := self.parse("", source)
- self.parseThrow(err) // Will panic/throw appropriately
- return program
-}
-
-func (self *_runtime) cmpl_parseOrThrow(source string) *_nodeProgram {
- program, err := self.cmpl_parse("", source)
+func (self *_runtime) cmpl_parseOrThrow(src, sm interface{}) *_nodeProgram {
+ program, err := self.cmpl_parse("", src, sm)
self.parseThrow(err) // Will panic/throw appropriately
return program
}
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/scope.go b/vendor/github.com/robertkrimen/otto/scope.go
index b80808434..465e6b98c 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/scope.go
+++ b/vendor/github.com/robertkrimen/otto/scope.go
@@ -21,6 +21,7 @@ type _scope struct {
this *_object
eval bool // Replace this with kind?
outer *_scope
+ depth int
frame _frame
}
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/script.go b/vendor/github.com/robertkrimen/otto/script.go
index ed8aebbf4..2ae890ecd 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/script.go
+++ b/vendor/github.com/robertkrimen/otto/script.go
@@ -4,8 +4,6 @@ import (
"bytes"
"encoding/gob"
"errors"
-
- "github.com/robertkrimen/otto/parser"
)
var ErrVersion = errors.New("version mismatch")
@@ -29,28 +27,27 @@ type Script struct {
// vm.Run(script)
//
func (self *Otto) Compile(filename string, src interface{}) (*Script, error) {
- {
- src, err := parser.ReadSource(filename, src)
- if err != nil {
- return nil, err
- }
-
- program, err := self.runtime.parse(filename, src)
- if err != nil {
- return nil, err
- }
+ return self.CompileWithSourceMap(filename, src, nil)
+}
- cmpl_program := cmpl_parse(program)
+// CompileWithSourceMap does the same thing as Compile, but with the obvious
+// difference of applying a source map.
+func (self *Otto) CompileWithSourceMap(filename string, src, sm interface{}) (*Script, error) {
+ program, err := self.runtime.parse(filename, src, sm)
+ if err != nil {
+ return nil, err
+ }
- script := &Script{
- version: scriptVersion,
- program: cmpl_program,
- filename: filename,
- src: string(src),
- }
+ cmpl_program := cmpl_parse(program)
- return script, nil
+ script := &Script{
+ version: scriptVersion,
+ program: cmpl_program,
+ filename: filename,
+ src: program.File.Source(),
}
+
+ return script, nil
}
func (self *Script) String() string {
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/stash.go b/vendor/github.com/robertkrimen/otto/stash.go
index 0d3ffa511..0d3ffa511 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/stash.go
+++ b/vendor/github.com/robertkrimen/otto/stash.go
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/token/Makefile b/vendor/github.com/robertkrimen/otto/token/Makefile
index 1e85c7348..1e85c7348 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/token/Makefile
+++ b/vendor/github.com/robertkrimen/otto/token/Makefile
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/token/README.markdown b/vendor/github.com/robertkrimen/otto/token/README.markdown
index ff3b16104..ff3b16104 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/token/README.markdown
+++ b/vendor/github.com/robertkrimen/otto/token/README.markdown
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/token/token.go b/vendor/github.com/robertkrimen/otto/token/token.go
index 0e941ac96..0e941ac96 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/token/token.go
+++ b/vendor/github.com/robertkrimen/otto/token/token.go
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/token/token_const.go b/vendor/github.com/robertkrimen/otto/token/token_const.go
index b1d83c6de..b1d83c6de 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/token/token_const.go
+++ b/vendor/github.com/robertkrimen/otto/token/token_const.go
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/token/tokenfmt b/vendor/github.com/robertkrimen/otto/token/tokenfmt
index 63dd5d9e6..63dd5d9e6 100644..100755
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/token/tokenfmt
+++ b/vendor/github.com/robertkrimen/otto/token/tokenfmt
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/type_arguments.go b/vendor/github.com/robertkrimen/otto/type_arguments.go
index 841d75855..841d75855 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/type_arguments.go
+++ b/vendor/github.com/robertkrimen/otto/type_arguments.go
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/type_array.go b/vendor/github.com/robertkrimen/otto/type_array.go
index 236376a8e..c8a974b02 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/type_array.go
+++ b/vendor/github.com/robertkrimen/otto/type_array.go
@@ -73,7 +73,7 @@ func arrayDefineOwnProperty(self *_object, name string, descriptor _property, th
return false
}
for newLength < length {
- length -= 1
+ length--
if !self.delete(strconv.FormatInt(int64(length), 10), false) {
descriptor.value = toValue_uint32(length + 1)
if !newWritable {
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/type_boolean.go b/vendor/github.com/robertkrimen/otto/type_boolean.go
index afc45c69b..afc45c69b 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/type_boolean.go
+++ b/vendor/github.com/robertkrimen/otto/type_boolean.go
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/type_date.go b/vendor/github.com/robertkrimen/otto/type_date.go
index 7079e649c..7079e649c 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/type_date.go
+++ b/vendor/github.com/robertkrimen/otto/type_date.go
diff --git a/vendor/github.com/robertkrimen/otto/type_error.go b/vendor/github.com/robertkrimen/otto/type_error.go
new file mode 100644
index 000000000..84e5d79b1
--- /dev/null
+++ b/vendor/github.com/robertkrimen/otto/type_error.go
@@ -0,0 +1,24 @@
+package otto
+
+func (rt *_runtime) newErrorObject(name string, message Value, stackFramesToPop int) *_object {
+ self := rt.newClassObject("Error")
+ if message.IsDefined() {
+ msg := message.string()
+ self.defineProperty("message", toValue_string(msg), 0111, false)
+ self.value = newError(rt, name, stackFramesToPop, msg)
+ } else {
+ self.value = newError(rt, name, stackFramesToPop)
+ }
+
+ self.defineOwnProperty("stack", _property{
+ value: _propertyGetSet{
+ rt.newNativeFunction("get", "internal", 0, func(FunctionCall) Value {
+ return toValue_string(self.value.(_error).formatWithStack())
+ }),
+ &_nilGetSetObject,
+ },
+ mode: modeConfigureMask & modeOnMask,
+ }, false)
+
+ return self
+}
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/type_function.go b/vendor/github.com/robertkrimen/otto/type_function.go
index 8581afd39..5637dc605 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/type_function.go
+++ b/vendor/github.com/robertkrimen/otto/type_function.go
@@ -31,13 +31,18 @@ type _nativeFunction func(FunctionCall) Value
type _nativeFunctionObject struct {
name string
+ file string
+ line int
call _nativeFunction // [[Call]]
construct _constructFunction // [[Construct]]
}
-func (runtime *_runtime) newNativeFunctionObject(name string, native _nativeFunction, length int) *_object {
+func (runtime *_runtime) newNativeFunctionObject(name, file string, line int, native _nativeFunction, length int) *_object {
self := runtime.newClassObject("Function")
self.value = _nativeFunctionObject{
+ name: name,
+ file: file,
+ line: line,
call: native,
construct: defaultConstruct,
}
@@ -125,11 +130,27 @@ func (self *_object) call(this Value, argumentList []Value, eval bool, frame _fr
switch fn := self.value.(type) {
case _nativeFunctionObject:
- // TODO Enter a scope, name from the native object...
// Since eval is a native function, we only have to check for it here
if eval {
eval = self == self.runtime.eval // If eval is true, then it IS a direct eval
}
+
+ // Enter a scope, name from the native object...
+ rt := self.runtime
+ if rt.scope != nil && !eval {
+ rt.enterFunctionScope(rt.scope.lexical, this)
+ rt.scope.frame = _frame{
+ native: true,
+ nativeFile: fn.file,
+ nativeLine: fn.line,
+ callee: fn.name,
+ file: nil,
+ }
+ defer func() {
+ rt.leaveScope()
+ }()
+ }
+
return fn.call(FunctionCall{
runtime: self.runtime,
eval: eval,
@@ -149,7 +170,7 @@ func (self *_object) call(this Value, argumentList []Value, eval bool, frame _fr
stash := rt.enterFunctionScope(fn.stash, this)
rt.scope.frame = _frame{
callee: fn.node.name,
- file: fn.node.file,
+ file: fn.node.file,
}
defer func() {
rt.leaveScope()
@@ -267,5 +288,5 @@ func (self FunctionCall) toObject(value Value) *_object {
// CallerLocation will return file location information (file:line:pos) where this function is being called.
func (self FunctionCall) CallerLocation() string {
// see error.go for location()
- return self.runtime.scope.frame.location()
+ return self.runtime.scope.outer.frame.location()
}
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/type_go_array.go b/vendor/github.com/robertkrimen/otto/type_go_array.go
index 13a0b10f2..13a0b10f2 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/type_go_array.go
+++ b/vendor/github.com/robertkrimen/otto/type_go_array.go
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/type_go_map.go b/vendor/github.com/robertkrimen/otto/type_go_map.go
index 3e204a028..3e204a028 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/type_go_map.go
+++ b/vendor/github.com/robertkrimen/otto/type_go_map.go
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/type_go_slice.go b/vendor/github.com/robertkrimen/otto/type_go_slice.go
index 7143531a8..78c69e684 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/type_go_slice.go
+++ b/vendor/github.com/robertkrimen/otto/type_go_slice.go
@@ -67,6 +67,14 @@ func goSliceGetOwnProperty(self *_object, name string) *_property {
}
}
+ // Other methods
+ if method := self.value.(*_goSliceObject).value.MethodByName(name); (method != reflect.Value{}) {
+ return &_property{
+ value: self.runtime.toValue(method.Interface()),
+ mode: 0110,
+ }
+ }
+
return objectGetOwnProperty(self, name)
}
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/type_go_struct.go b/vendor/github.com/robertkrimen/otto/type_go_struct.go
index 608ac6660..608ac6660 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/type_go_struct.go
+++ b/vendor/github.com/robertkrimen/otto/type_go_struct.go
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/type_number.go b/vendor/github.com/robertkrimen/otto/type_number.go
index 28de4444c..28de4444c 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/type_number.go
+++ b/vendor/github.com/robertkrimen/otto/type_number.go
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/type_reference.go b/vendor/github.com/robertkrimen/otto/type_reference.go
index fd770c6f4..fd770c6f4 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/type_reference.go
+++ b/vendor/github.com/robertkrimen/otto/type_reference.go
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/type_regexp.go b/vendor/github.com/robertkrimen/otto/type_regexp.go
index 57fe31640..57fe31640 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/type_regexp.go
+++ b/vendor/github.com/robertkrimen/otto/type_regexp.go
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/type_string.go b/vendor/github.com/robertkrimen/otto/type_string.go
index ef3afa42b..ef3afa42b 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/type_string.go
+++ b/vendor/github.com/robertkrimen/otto/type_string.go
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/value.go b/vendor/github.com/robertkrimen/otto/value.go
index a1c341f4d..90c140604 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/value.go
+++ b/vendor/github.com/robertkrimen/otto/value.go
@@ -30,8 +30,8 @@ type Value struct {
value interface{}
}
-func (vl Value) safe() bool {
- return vl.kind < valueEmpty
+func (value Value) safe() bool {
+ return value.kind < valueEmpty
}
var (
@@ -271,11 +271,11 @@ func toValue_reflectValuePanic(value interface{}, kind reflect.Kind) {
// FIXME?
switch kind {
case reflect.Struct:
- panic(newError(nil, "TypeError", "invalid value (struct): missing runtime: %v (%T)", value, value))
+ panic(newError(nil, "TypeError", 0, "invalid value (struct): missing runtime: %v (%T)", value, value))
case reflect.Map:
- panic(newError(nil, "TypeError", "invalid value (map): missing runtime: %v (%T)", value, value))
+ panic(newError(nil, "TypeError", 0, "invalid value (map): missing runtime: %v (%T)", value, value))
case reflect.Slice:
- panic(newError(nil, "TypeError", "invalid value (slice): missing runtime: %v (%T)", value, value))
+ panic(newError(nil, "TypeError", 0, "invalid value (slice): missing runtime: %v (%T)", value, value))
}
}
@@ -375,7 +375,7 @@ func toValue(value interface{}) Value {
return toValue(reflect.ValueOf(value))
}
// FIXME?
- panic(newError(nil, "TypeError", "invalid value: %v (%T)", value, value))
+ panic(newError(nil, "TypeError", 0, "invalid value: %v (%T)", value, value))
}
// String will return the value as a string.
@@ -689,17 +689,25 @@ func (self Value) export() interface{} {
continue
}
value := object.get(name).export()
+
t = reflect.TypeOf(value)
+
+ var k reflect.Kind
+ if t != nil {
+ k = t.Kind()
+ }
+
if state == 0 {
- kind = t.Kind()
+ kind = k
state = 1
- } else if state == 1 && kind != t.Kind() {
+ } else if state == 1 && kind != k {
state = 2
}
+
result = append(result, value)
}
- if state != 1 || kind == reflect.Interface {
+ if state != 1 || kind == reflect.Interface || t == nil {
// No common type
return result
}
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/value_boolean.go b/vendor/github.com/robertkrimen/otto/value_boolean.go
index 3040f4163..3040f4163 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/value_boolean.go
+++ b/vendor/github.com/robertkrimen/otto/value_boolean.go
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/value_number.go b/vendor/github.com/robertkrimen/otto/value_number.go
index 54996c729..870bf115b 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/value_number.go
+++ b/vendor/github.com/robertkrimen/otto/value_number.go
@@ -168,32 +168,32 @@ type _number struct {
// FIXME
// http://www.goinggo.net/2013/08/gustavos-ieee-754-brain-teaser.html
// http://bazaar.launchpad.net/~niemeyer/strepr/trunk/view/6/strepr.go#L160
-func (vl Value) number() (number _number) {
- switch vl := vl.value.(type) {
+func (value Value) number() (number _number) {
+ switch value := value.value.(type) {
case int8:
- number.int64 = int64(vl)
+ number.int64 = int64(value)
return
case int16:
- number.int64 = int64(vl)
+ number.int64 = int64(value)
return
case uint8:
- number.int64 = int64(vl)
+ number.int64 = int64(value)
return
case uint16:
- number.int64 = int64(vl)
+ number.int64 = int64(value)
return
case uint32:
- number.int64 = int64(vl)
+ number.int64 = int64(value)
return
case int:
- number.int64 = int64(vl)
+ number.int64 = int64(value)
return
case int64:
- number.int64 = vl
+ number.int64 = value
return
}
- float := vl.float64()
+ float := value.float64()
if float == 0 {
return
}
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/value_primitive.go b/vendor/github.com/robertkrimen/otto/value_primitive.go
index 11ed329d1..11ed329d1 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/value_primitive.go
+++ b/vendor/github.com/robertkrimen/otto/value_primitive.go
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/value_string.go b/vendor/github.com/robertkrimen/otto/value_string.go
index 0fbfd6b25..0fbfd6b25 100644
--- a/Godeps/_workspace/src/github.com/robertkrimen/otto/value_string.go
+++ b/vendor/github.com/robertkrimen/otto/value_string.go
diff --git a/Godeps/_workspace/src/github.com/rs/cors/.travis.yml b/vendor/github.com/rs/cors/.travis.yml
index bbb5185a2..bbb5185a2 100644
--- a/Godeps/_workspace/src/github.com/rs/cors/.travis.yml
+++ b/vendor/github.com/rs/cors/.travis.yml
diff --git a/Godeps/_workspace/src/github.com/rs/cors/LICENSE b/vendor/github.com/rs/cors/LICENSE
index d8e2df5a4..d8e2df5a4 100644
--- a/Godeps/_workspace/src/github.com/rs/cors/LICENSE
+++ b/vendor/github.com/rs/cors/LICENSE
diff --git a/Godeps/_workspace/src/github.com/rs/cors/README.md b/vendor/github.com/rs/cors/README.md
index 6f70c30ac..4bf56724e 100644
--- a/Godeps/_workspace/src/github.com/rs/cors/README.md
+++ b/vendor/github.com/rs/cors/README.md
@@ -1,4 +1,4 @@
-# Go CORS handler [![godoc](http://img.shields.io/badge/godoc-reference-blue.svg?style=flat)](https://godoc.org/github.com/rs/cors) [![license](http://img.shields.io/badge/license-MIT-red.svg?style=flat)](https://raw.githubusercontent.com/rs/cors/master/LICENSE) [![build](https://img.shields.io/travis/rs/cors.svg?style=flat)](https://travis-ci.org/rs/cors)
+# Go CORS handler [![godoc](http://img.shields.io/badge/godoc-reference-blue.svg?style=flat)](https://godoc.org/github.com/rs/cors) [![license](http://img.shields.io/badge/license-MIT-red.svg?style=flat)](https://raw.githubusercontent.com/rs/cors/master/LICENSE) [![build](https://img.shields.io/travis/rs/cors.svg?style=flat)](https://travis-ci.org/rs/cors) [![Coverage](http://gocover.io/_badge/github.com/rs/cors)](http://gocover.io/github.com/rs/cors)
CORS is a `net/http` handler implementing [Cross Origin Resource Sharing W3 specification](http://www.w3.org/TR/cors/) in Golang.
@@ -16,7 +16,8 @@ import (
)
func main() {
- h := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ mux := http.NewServeMux()
+ mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
w.Write([]byte("{\"hello\": \"world\"}"))
})
@@ -24,7 +25,7 @@ func main() {
// cors.Default() setup the middleware with default options being
// all origins accepted with simple methods (GET, POST). See
// documentation below for more options.
- handler = cors.Default().Handler(h)
+ handler := cors.Default().Handler(mux)
http.ListenAndServe(":8080", handler)
}
```
@@ -70,15 +71,29 @@ c := cors.New(cors.Options{
handler = c.Handler(handler)
```
-* **AllowedOrigins** `[]string`: A list of origins a cross-domain request can be executed from. If the special `*` value is present in the list, all origins will be allowed. The default value is `*`.
-* **AllowedMethods** `[]string`: A list of methods the client is allowed to use with cross-domain requests.
-* **AllowedHeaders** `[]string`: A list of non simple headers the client is allowed to use with cross-domain requests. Default value is simple methods (`GET` and `POST`)
+* **AllowedOrigins** `[]string`: A list of origins a cross-domain request can be executed from. If the special `*` value is present in the list, all origins will be allowed. An origin may contain a wildcard (`*`) to replace 0 or more characters (i.e.: `http://*.domain.com`). Usage of wildcards implies a small performance penality. Only one wildcard can be used per origin. The default value is `*`.
+* **AllowOriginFunc** `func (origin string) bool`: A custom function to validate the origin. It take the origin as argument and returns true if allowed or false otherwise. If this option is set, the content of `AllowedOrigins` is ignored
+* **AllowedMethods** `[]string`: A list of methods the client is allowed to use with cross-domain requests. Default value is simple methods (`GET` and `POST`).
+* **AllowedHeaders** `[]string`: A list of non simple headers the client is allowed to use with cross-domain requests.
* **ExposedHeaders** `[]string`: Indicates which headers are safe to expose to the API of a CORS API specification
* **AllowCredentials** `bool`: Indicates whether the request can include user credentials like cookies, HTTP authentication or client side SSL certificates. The default is `false`.
* **MaxAge** `int`: Indicates how long (in seconds) the results of a preflight request can be cached. The default is `0` which stands for no max age.
+* **OptionsPassthrough** `bool`: Instructs preflight to let other potential next handlers to process the `OPTIONS` method. Turn this on if your application handles `OPTIONS`.
+* **Debug** `bool`: Debugging flag adds additional output to debug server side CORS issues.
See [API documentation](http://godoc.org/github.com/rs/cors) for more info.
+## Benchmarks
+
+ BenchmarkWithout 20000000 64.6 ns/op 8 B/op 1 allocs/op
+ BenchmarkDefault 3000000 469 ns/op 114 B/op 2 allocs/op
+ BenchmarkAllowedOrigin 3000000 608 ns/op 114 B/op 2 allocs/op
+ BenchmarkPreflight 20000000 73.2 ns/op 0 B/op 0 allocs/op
+ BenchmarkPreflightHeader 20000000 73.6 ns/op 0 B/op 0 allocs/op
+ BenchmarkParseHeaderList 2000000 847 ns/op 184 B/op 6 allocs/op
+ BenchmarkParse…Single 5000000 290 ns/op 32 B/op 3 allocs/op
+ BenchmarkParse…Normalized 2000000 776 ns/op 160 B/op 6 allocs/op
+
## Licenses
All source code is licensed under the [MIT License](https://raw.github.com/rs/cors/master/LICENSE).
diff --git a/vendor/github.com/rs/cors/cors.go b/vendor/github.com/rs/cors/cors.go
new file mode 100644
index 000000000..4bb22d8fc
--- /dev/null
+++ b/vendor/github.com/rs/cors/cors.go
@@ -0,0 +1,412 @@
+/*
+Package cors is net/http handler to handle CORS related requests
+as defined by http://www.w3.org/TR/cors/
+
+You can configure it by passing an option struct to cors.New:
+
+ c := cors.New(cors.Options{
+ AllowedOrigins: []string{"foo.com"},
+ AllowedMethods: []string{"GET", "POST", "DELETE"},
+ AllowCredentials: true,
+ })
+
+Then insert the handler in the chain:
+
+ handler = c.Handler(handler)
+
+See Options documentation for more options.
+
+The resulting handler is a standard net/http handler.
+*/
+package cors
+
+import (
+ "log"
+ "net/http"
+ "os"
+ "strconv"
+ "strings"
+
+ "github.com/rs/xhandler"
+ "golang.org/x/net/context"
+)
+
+// Options is a configuration container to setup the CORS middleware.
+type Options struct {
+ // AllowedOrigins is a list of origins a cross-domain request can be executed from.
+ // If the special "*" value is present in the list, all origins will be allowed.
+ // An origin may contain a wildcard (*) to replace 0 or more characters
+ // (i.e.: http://*.domain.com). Usage of wildcards implies a small performance penality.
+ // Only one wildcard can be used per origin.
+ // Default value is ["*"]
+ AllowedOrigins []string
+ // AllowOriginFunc is a custom function to validate the origin. It take the origin
+ // as argument and returns true if allowed or false otherwise. If this option is
+ // set, the content of AllowedOrigins is ignored.
+ AllowOriginFunc func(origin string) bool
+ // AllowedMethods is a list of methods the client is allowed to use with
+ // cross-domain requests. Default value is simple methods (GET and POST)
+ AllowedMethods []string
+ // AllowedHeaders is list of non simple headers the client is allowed to use with
+ // cross-domain requests.
+ // If the special "*" value is present in the list, all headers will be allowed.
+ // Default value is [] but "Origin" is always appended to the list.
+ AllowedHeaders []string
+ // ExposedHeaders indicates which headers are safe to expose to the API of a CORS
+ // API specification
+ ExposedHeaders []string
+ // AllowCredentials indicates whether the request can include user credentials like
+ // cookies, HTTP authentication or client side SSL certificates.
+ AllowCredentials bool
+ // MaxAge indicates how long (in seconds) the results of a preflight request
+ // can be cached
+ MaxAge int
+ // OptionsPassthrough instructs preflight to let other potential next handlers to
+ // process the OPTIONS method. Turn this on if your application handles OPTIONS.
+ OptionsPassthrough bool
+ // Debugging flag adds additional output to debug server side CORS issues
+ Debug bool
+}
+
+// Cors http handler
+type Cors struct {
+ // Debug logger
+ Log *log.Logger
+ // Set to true when allowed origins contains a "*"
+ allowedOriginsAll bool
+ // Normalized list of plain allowed origins
+ allowedOrigins []string
+ // List of allowed origins containing wildcards
+ allowedWOrigins []wildcard
+ // Optional origin validator function
+ allowOriginFunc func(origin string) bool
+ // Set to true when allowed headers contains a "*"
+ allowedHeadersAll bool
+ // Normalized list of allowed headers
+ allowedHeaders []string
+ // Normalized list of allowed methods
+ allowedMethods []string
+ // Normalized list of exposed headers
+ exposedHeaders []string
+ allowCredentials bool
+ maxAge int
+ optionPassthrough bool
+}
+
+// New creates a new Cors handler with the provided options.
+func New(options Options) *Cors {
+ c := &Cors{
+ exposedHeaders: convert(options.ExposedHeaders, http.CanonicalHeaderKey),
+ allowOriginFunc: options.AllowOriginFunc,
+ allowCredentials: options.AllowCredentials,
+ maxAge: options.MaxAge,
+ optionPassthrough: options.OptionsPassthrough,
+ }
+ if options.Debug {
+ c.Log = log.New(os.Stdout, "[cors] ", log.LstdFlags)
+ }
+
+ // Normalize options
+ // Note: for origins and methods matching, the spec requires a case-sensitive matching.
+ // As it may error prone, we chose to ignore the spec here.
+
+ // Allowed Origins
+ if len(options.AllowedOrigins) == 0 {
+ // Default is all origins
+ c.allowedOriginsAll = true
+ } else {
+ c.allowedOrigins = []string{}
+ c.allowedWOrigins = []wildcard{}
+ for _, origin := range options.AllowedOrigins {
+ // Normalize
+ origin = strings.ToLower(origin)
+ if origin == "*" {
+ // If "*" is present in the list, turn the whole list into a match all
+ c.allowedOriginsAll = true
+ c.allowedOrigins = nil
+ c.allowedWOrigins = nil
+ break
+ } else if i := strings.IndexByte(origin, '*'); i >= 0 {
+ // Split the origin in two: start and end string without the *
+ w := wildcard{origin[0:i], origin[i+1 : len(origin)]}
+ c.allowedWOrigins = append(c.allowedWOrigins, w)
+ } else {
+ c.allowedOrigins = append(c.allowedOrigins, origin)
+ }
+ }
+ }
+
+ // Allowed Headers
+ if len(options.AllowedHeaders) == 0 {
+ // Use sensible defaults
+ c.allowedHeaders = []string{"Origin", "Accept", "Content-Type"}
+ } else {
+ // Origin is always appended as some browsers will always request for this header at preflight
+ c.allowedHeaders = convert(append(options.AllowedHeaders, "Origin"), http.CanonicalHeaderKey)
+ for _, h := range options.AllowedHeaders {
+ if h == "*" {
+ c.allowedHeadersAll = true
+ c.allowedHeaders = nil
+ break
+ }
+ }
+ }
+
+ // Allowed Methods
+ if len(options.AllowedMethods) == 0 {
+ // Default is spec's "simple" methods
+ c.allowedMethods = []string{"GET", "POST"}
+ } else {
+ c.allowedMethods = convert(options.AllowedMethods, strings.ToUpper)
+ }
+
+ return c
+}
+
+// Default creates a new Cors handler with default options
+func Default() *Cors {
+ return New(Options{})
+}
+
+// Handler apply the CORS specification on the request, and add relevant CORS headers
+// as necessary.
+func (c *Cors) Handler(h http.Handler) http.Handler {
+ return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ if r.Method == "OPTIONS" {
+ c.logf("Handler: Preflight request")
+ c.handlePreflight(w, r)
+ // Preflight requests are standalone and should stop the chain as some other
+ // middleware may not handle OPTIONS requests correctly. One typical example
+ // is authentication middleware ; OPTIONS requests won't carry authentication
+ // headers (see #1)
+ if c.optionPassthrough {
+ h.ServeHTTP(w, r)
+ } else {
+ w.WriteHeader(http.StatusOK)
+ }
+ } else {
+ c.logf("Handler: Actual request")
+ c.handleActualRequest(w, r)
+ h.ServeHTTP(w, r)
+ }
+ })
+}
+
+// HandlerC is net/context aware handler
+func (c *Cors) HandlerC(h xhandler.HandlerC) xhandler.HandlerC {
+ return xhandler.HandlerFuncC(func(ctx context.Context, w http.ResponseWriter, r *http.Request) {
+ if r.Method == "OPTIONS" {
+ c.logf("Handler: Preflight request")
+ c.handlePreflight(w, r)
+ // Preflight requests are standalone and should stop the chain as some other
+ // middleware may not handle OPTIONS requests correctly. One typical example
+ // is authentication middleware ; OPTIONS requests won't carry authentication
+ // headers (see #1)
+ if c.optionPassthrough {
+ h.ServeHTTPC(ctx, w, r)
+ } else {
+ w.WriteHeader(http.StatusOK)
+ }
+ } else {
+ c.logf("Handler: Actual request")
+ c.handleActualRequest(w, r)
+ h.ServeHTTPC(ctx, w, r)
+ }
+ })
+}
+
+// HandlerFunc provides Martini compatible handler
+func (c *Cors) HandlerFunc(w http.ResponseWriter, r *http.Request) {
+ if r.Method == "OPTIONS" {
+ c.logf("HandlerFunc: Preflight request")
+ c.handlePreflight(w, r)
+ } else {
+ c.logf("HandlerFunc: Actual request")
+ c.handleActualRequest(w, r)
+ }
+}
+
+// Negroni compatible interface
+func (c *Cors) ServeHTTP(w http.ResponseWriter, r *http.Request, next http.HandlerFunc) {
+ if r.Method == "OPTIONS" {
+ c.logf("ServeHTTP: Preflight request")
+ c.handlePreflight(w, r)
+ // Preflight requests are standalone and should stop the chain as some other
+ // middleware may not handle OPTIONS requests correctly. One typical example
+ // is authentication middleware ; OPTIONS requests won't carry authentication
+ // headers (see #1)
+ if c.optionPassthrough {
+ next(w, r)
+ } else {
+ w.WriteHeader(http.StatusOK)
+ }
+ } else {
+ c.logf("ServeHTTP: Actual request")
+ c.handleActualRequest(w, r)
+ next(w, r)
+ }
+}
+
+// handlePreflight handles pre-flight CORS requests
+func (c *Cors) handlePreflight(w http.ResponseWriter, r *http.Request) {
+ headers := w.Header()
+ origin := r.Header.Get("Origin")
+
+ if r.Method != "OPTIONS" {
+ c.logf(" Preflight aborted: %s!=OPTIONS", r.Method)
+ return
+ }
+ // Always set Vary headers
+ // see https://github.com/rs/cors/issues/10,
+ // https://github.com/rs/cors/commit/dbdca4d95feaa7511a46e6f1efb3b3aa505bc43f#commitcomment-12352001
+ headers.Add("Vary", "Origin")
+ headers.Add("Vary", "Access-Control-Request-Method")
+ headers.Add("Vary", "Access-Control-Request-Headers")
+
+ if origin == "" {
+ c.logf(" Preflight aborted: empty origin")
+ return
+ }
+ if !c.isOriginAllowed(origin) {
+ c.logf(" Preflight aborted: origin '%s' not allowed", origin)
+ return
+ }
+
+ reqMethod := r.Header.Get("Access-Control-Request-Method")
+ if !c.isMethodAllowed(reqMethod) {
+ c.logf(" Preflight aborted: method '%s' not allowed", reqMethod)
+ return
+ }
+ reqHeaders := parseHeaderList(r.Header.Get("Access-Control-Request-Headers"))
+ if !c.areHeadersAllowed(reqHeaders) {
+ c.logf(" Preflight aborted: headers '%v' not allowed", reqHeaders)
+ return
+ }
+ headers.Set("Access-Control-Allow-Origin", origin)
+ // Spec says: Since the list of methods can be unbounded, simply returning the method indicated
+ // by Access-Control-Request-Method (if supported) can be enough
+ headers.Set("Access-Control-Allow-Methods", strings.ToUpper(reqMethod))
+ if len(reqHeaders) > 0 {
+
+ // Spec says: Since the list of headers can be unbounded, simply returning supported headers
+ // from Access-Control-Request-Headers can be enough
+ headers.Set("Access-Control-Allow-Headers", strings.Join(reqHeaders, ", "))
+ }
+ if c.allowCredentials {
+ headers.Set("Access-Control-Allow-Credentials", "true")
+ }
+ if c.maxAge > 0 {
+ headers.Set("Access-Control-Max-Age", strconv.Itoa(c.maxAge))
+ }
+ c.logf(" Preflight response headers: %v", headers)
+}
+
+// handleActualRequest handles simple cross-origin requests, actual request or redirects
+func (c *Cors) handleActualRequest(w http.ResponseWriter, r *http.Request) {
+ headers := w.Header()
+ origin := r.Header.Get("Origin")
+
+ if r.Method == "OPTIONS" {
+ c.logf(" Actual request no headers added: method == %s", r.Method)
+ return
+ }
+ // Always set Vary, see https://github.com/rs/cors/issues/10
+ headers.Add("Vary", "Origin")
+ if origin == "" {
+ c.logf(" Actual request no headers added: missing origin")
+ return
+ }
+ if !c.isOriginAllowed(origin) {
+ c.logf(" Actual request no headers added: origin '%s' not allowed", origin)
+ return
+ }
+
+ // Note that spec does define a way to specifically disallow a simple method like GET or
+ // POST. Access-Control-Allow-Methods is only used for pre-flight requests and the
+ // spec doesn't instruct to check the allowed methods for simple cross-origin requests.
+ // We think it's a nice feature to be able to have control on those methods though.
+ if !c.isMethodAllowed(r.Method) {
+ c.logf(" Actual request no headers added: method '%s' not allowed", r.Method)
+
+ return
+ }
+ headers.Set("Access-Control-Allow-Origin", origin)
+ if len(c.exposedHeaders) > 0 {
+ headers.Set("Access-Control-Expose-Headers", strings.Join(c.exposedHeaders, ", "))
+ }
+ if c.allowCredentials {
+ headers.Set("Access-Control-Allow-Credentials", "true")
+ }
+ c.logf(" Actual response added headers: %v", headers)
+}
+
+// convenience method. checks if debugging is turned on before printing
+func (c *Cors) logf(format string, a ...interface{}) {
+ if c.Log != nil {
+ c.Log.Printf(format, a...)
+ }
+}
+
+// isOriginAllowed checks if a given origin is allowed to perform cross-domain requests
+// on the endpoint
+func (c *Cors) isOriginAllowed(origin string) bool {
+ if c.allowOriginFunc != nil {
+ return c.allowOriginFunc(origin)
+ }
+ if c.allowedOriginsAll {
+ return true
+ }
+ origin = strings.ToLower(origin)
+ for _, o := range c.allowedOrigins {
+ if o == origin {
+ return true
+ }
+ }
+ for _, w := range c.allowedWOrigins {
+ if w.match(origin) {
+ return true
+ }
+ }
+ return false
+}
+
+// isMethodAllowed checks if a given method can be used as part of a cross-domain request
+// on the endpoing
+func (c *Cors) isMethodAllowed(method string) bool {
+ if len(c.allowedMethods) == 0 {
+ // If no method allowed, always return false, even for preflight request
+ return false
+ }
+ method = strings.ToUpper(method)
+ if method == "OPTIONS" {
+ // Always allow preflight requests
+ return true
+ }
+ for _, m := range c.allowedMethods {
+ if m == method {
+ return true
+ }
+ }
+ return false
+}
+
+// areHeadersAllowed checks if a given list of headers are allowed to used within
+// a cross-domain request.
+func (c *Cors) areHeadersAllowed(requestedHeaders []string) bool {
+ if c.allowedHeadersAll || len(requestedHeaders) == 0 {
+ return true
+ }
+ for _, header := range requestedHeaders {
+ header = http.CanonicalHeaderKey(header)
+ found := false
+ for _, h := range c.allowedHeaders {
+ if h == header {
+ found = true
+ }
+ }
+ if !found {
+ return false
+ }
+ }
+ return true
+}
diff --git a/vendor/github.com/rs/cors/utils.go b/vendor/github.com/rs/cors/utils.go
new file mode 100644
index 000000000..c7a0aa060
--- /dev/null
+++ b/vendor/github.com/rs/cors/utils.go
@@ -0,0 +1,70 @@
+package cors
+
+import "strings"
+
+const toLower = 'a' - 'A'
+
+type converter func(string) string
+
+type wildcard struct {
+ prefix string
+ suffix string
+}
+
+func (w wildcard) match(s string) bool {
+ return len(s) >= len(w.prefix+w.suffix) && strings.HasPrefix(s, w.prefix) && strings.HasSuffix(s, w.suffix)
+}
+
+// convert converts a list of string using the passed converter function
+func convert(s []string, c converter) []string {
+ out := []string{}
+ for _, i := range s {
+ out = append(out, c(i))
+ }
+ return out
+}
+
+// parseHeaderList tokenize + normalize a string containing a list of headers
+func parseHeaderList(headerList string) []string {
+ l := len(headerList)
+ h := make([]byte, 0, l)
+ upper := true
+ // Estimate the number headers in order to allocate the right splice size
+ t := 0
+ for i := 0; i < l; i++ {
+ if headerList[i] == ',' {
+ t++
+ }
+ }
+ headers := make([]string, 0, t)
+ for i := 0; i < l; i++ {
+ b := headerList[i]
+ if b >= 'a' && b <= 'z' {
+ if upper {
+ h = append(h, b-toLower)
+ } else {
+ h = append(h, b)
+ }
+ } else if b >= 'A' && b <= 'Z' {
+ if !upper {
+ h = append(h, b+toLower)
+ } else {
+ h = append(h, b)
+ }
+ } else if b == '-' || b == '_' || (b >= '0' && b <= '9') {
+ h = append(h, b)
+ }
+
+ if b == ' ' || b == ',' || i == l-1 {
+ if len(h) > 0 {
+ // Flush the found header
+ headers = append(headers, string(h))
+ h = h[:0]
+ upper = true
+ }
+ } else {
+ upper = b == '-' || b == '_'
+ }
+ }
+ return headers
+}
diff --git a/vendor/github.com/rs/xhandler/.travis.yml b/vendor/github.com/rs/xhandler/.travis.yml
new file mode 100644
index 000000000..b65c7a9f1
--- /dev/null
+++ b/vendor/github.com/rs/xhandler/.travis.yml
@@ -0,0 +1,7 @@
+language: go
+go:
+- 1.5
+- tip
+matrix:
+ allow_failures:
+ - go: tip
diff --git a/vendor/github.com/rs/xhandler/LICENSE b/vendor/github.com/rs/xhandler/LICENSE
new file mode 100644
index 000000000..47c5e9d2d
--- /dev/null
+++ b/vendor/github.com/rs/xhandler/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2015 Olivier Poitrey <rs@dailymotion.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/vendor/github.com/rs/xhandler/README.md b/vendor/github.com/rs/xhandler/README.md
new file mode 100644
index 000000000..91c594bd2
--- /dev/null
+++ b/vendor/github.com/rs/xhandler/README.md
@@ -0,0 +1,134 @@
+# XHandler
+
+[![godoc](http://img.shields.io/badge/godoc-reference-blue.svg?style=flat)](https://godoc.org/github.com/rs/xhandler) [![license](http://img.shields.io/badge/license-MIT-red.svg?style=flat)](https://raw.githubusercontent.com/rs/xhandler/master/LICENSE) [![Build Status](https://travis-ci.org/rs/xhandler.svg?branch=master)](https://travis-ci.org/rs/xhandler) [![Coverage](http://gocover.io/_badge/github.com/rs/xhandler)](http://gocover.io/github.com/rs/xhandler)
+
+XHandler is a bridge between [net/context](https://godoc.org/golang.org/x/net/context) and `http.Handler`.
+
+It lets you enforce `net/context` in your handlers without sacrificing compatibility with existing `http.Handlers` nor imposing a specific router.
+
+Thanks to `net/context` deadline management, `xhandler` is able to enforce a per request deadline and will cancel the context when the client closes the connection unexpectedly.
+
+You may create your own `net/context` aware handler pretty much the same way as you would do with http.Handler.
+
+Read more about xhandler on [Dailymotion engineering blog](http://engineering.dailymotion.com/our-way-to-go/).
+
+## Installing
+
+ go get -u github.com/rs/xhandler
+
+## Usage
+
+```go
+package main
+
+import (
+ "log"
+ "net/http"
+ "time"
+
+ "github.com/rs/cors"
+ "github.com/rs/xhandler"
+ "golang.org/x/net/context"
+)
+
+type myMiddleware struct {
+ next xhandler.HandlerC
+}
+
+func (h myMiddleware) ServeHTTPC(ctx context.Context, w http.ResponseWriter, r *http.Request) {
+ ctx = context.WithValue(ctx, "test", "World")
+ h.next.ServeHTTPC(ctx, w, r)
+}
+
+func main() {
+ c := xhandler.Chain{}
+
+ // Add close notifier handler so context is cancelled when the client closes
+ // the connection
+ c.UseC(xhandler.CloseHandler)
+
+ // Add timeout handler
+ c.UseC(xhandler.TimeoutHandler(2 * time.Second))
+
+ // Middleware putting something in the context
+ c.UseC(func(next xhandler.HandlerC) xhandler.HandlerC {
+ return myMiddleware{next: next}
+ })
+
+ // Mix it with a non-context-aware middleware handler
+ c.Use(cors.Default().Handler)
+
+ // Final handler (using handlerFuncC), reading from the context
+ xh := xhandler.HandlerFuncC(func(ctx context.Context, w http.ResponseWriter, r *http.Request) {
+ value := ctx.Value("test").(string)
+ w.Write([]byte("Hello " + value))
+ })
+
+ // Bridge context aware handlers with http.Handler using xhandler.Handle()
+ http.Handle("/test", c.Handler(xh))
+
+ if err := http.ListenAndServe(":8080", nil); err != nil {
+ log.Fatal(err)
+ }
+}
+```
+
+### Using xmux
+
+Xhandler comes with an optional context aware [muxer](https://github.com/rs/xmux) forked from [httprouter](https://github.com/julienschmidt/httprouter):
+
+```go
+package main
+
+import (
+ "fmt"
+ "log"
+ "net/http"
+ "time"
+
+ "github.com/rs/xhandler"
+ "github.com/rs/xmux"
+ "golang.org/x/net/context"
+)
+
+func main() {
+ c := xhandler.Chain{}
+
+ // Append a context-aware middleware handler
+ c.UseC(xhandler.CloseHandler)
+
+ // Another context-aware middleware handler
+ c.UseC(xhandler.TimeoutHandler(2 * time.Second))
+
+ mux := xmux.New()
+
+ // Use c.Handler to terminate the chain with your final handler
+ mux.GET("/welcome/:name", xhandler.HandlerFuncC(func(ctx context.Context, w http.ResponseWriter, req *http.Request) {
+ fmt.Fprintf(w, "Welcome %s!", xmux.Params(ctx).Get("name"))
+ }))
+
+ if err := http.ListenAndServe(":8080", c.Handler(mux)); err != nil {
+ log.Fatal(err)
+ }
+}
+```
+
+See [xmux](https://github.com/rs/xmux) for more examples.
+
+## Context Aware Middleware
+
+Here is a list of `net/context` aware middleware handlers implementing `xhandler.HandlerC` interface.
+
+Feel free to put up a PR linking your middleware if you have built one:
+
+| Middleware | Author | Description |
+| ---------- | ------ | ----------- |
+| [xmux](https://github.com/rs/xmux) | [Olivier Poitrey](https://github.com/rs) | HTTP request muxer |
+| [xlog](https://github.com/rs/xlog) | [Olivier Poitrey](https://github.com/rs) | HTTP handler logger |
+| [xstats](https://github.com/rs/xstats) | [Olivier Poitrey](https://github.com/rs) | A generic client for service instrumentation |
+| [xaccess](https://github.com/rs/xaccess) | [Olivier Poitrey](https://github.com/rs) | HTTP handler access logger with [xlog](https://github.com/rs/xlog) and [xstats](https://github.com/rs/xstats) |
+| [cors](https://github.com/rs/cors) | [Olivier Poitrey](https://github.com/rs) | [Cross Origin Resource Sharing](http://www.w3.org/TR/cors/) (CORS) support |
+
+## Licenses
+
+All source code is licensed under the [MIT License](https://raw.github.com/rs/xhandler/master/LICENSE).
diff --git a/vendor/github.com/rs/xhandler/chain.go b/vendor/github.com/rs/xhandler/chain.go
new file mode 100644
index 000000000..3e4bd359c
--- /dev/null
+++ b/vendor/github.com/rs/xhandler/chain.go
@@ -0,0 +1,121 @@
+package xhandler
+
+import (
+ "net/http"
+
+ "golang.org/x/net/context"
+)
+
+// Chain is a helper for chaining middleware handlers together for easier
+// management.
+type Chain []func(next HandlerC) HandlerC
+
+// Add appends a variable number of additional middleware handlers
+// to the middleware chain. Middleware handlers can either be
+// context-aware or non-context aware handlers with the appropriate
+// function signatures.
+func (c *Chain) Add(f ...interface{}) {
+ for _, h := range f {
+ switch v := h.(type) {
+ case func(http.Handler) http.Handler:
+ c.Use(v)
+ case func(HandlerC) HandlerC:
+ c.UseC(v)
+ default:
+ panic("Adding invalid handler to the middleware chain")
+ }
+ }
+}
+
+// With creates a new middleware chain from an existing chain,
+// extending it with additional middleware. Middleware handlers
+// can either be context-aware or non-context aware handlers
+// with the appropriate function signatures.
+func (c *Chain) With(f ...interface{}) *Chain {
+ n := make(Chain, len(*c))
+ copy(n, *c)
+ n.Add(f...)
+ return &n
+}
+
+// UseC appends a context-aware handler to the middleware chain.
+func (c *Chain) UseC(f func(next HandlerC) HandlerC) {
+ *c = append(*c, f)
+}
+
+// Use appends a standard http.Handler to the middleware chain without
+// losing track of the context when inserted between two context aware handlers.
+//
+// Caveat: the f function will be called on each request so you are better off putting
+// any initialization sequence outside of this function.
+func (c *Chain) Use(f func(next http.Handler) http.Handler) {
+ xf := func(next HandlerC) HandlerC {
+ return HandlerFuncC(func(ctx context.Context, w http.ResponseWriter, r *http.Request) {
+ n := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ next.ServeHTTPC(ctx, w, r)
+ })
+ f(n).ServeHTTP(w, r)
+ })
+ }
+ *c = append(*c, xf)
+}
+
+// Handler wraps the provided final handler with all the middleware appended to
+// the chain and returns a new standard http.Handler instance.
+// The context.Background() context is injected automatically.
+func (c Chain) Handler(xh HandlerC) http.Handler {
+ ctx := context.Background()
+ return c.HandlerCtx(ctx, xh)
+}
+
+// HandlerFC is a helper to provide a function (HandlerFuncC) to Handler().
+//
+// HandlerFC is equivalent to:
+// c.Handler(xhandler.HandlerFuncC(xhc))
+func (c Chain) HandlerFC(xhf HandlerFuncC) http.Handler {
+ ctx := context.Background()
+ return c.HandlerCtx(ctx, HandlerFuncC(xhf))
+}
+
+// HandlerH is a helper to provide a standard http handler (http.HandlerFunc)
+// to Handler(). Your final handler won't have access to the context though.
+func (c Chain) HandlerH(h http.Handler) http.Handler {
+ ctx := context.Background()
+ return c.HandlerCtx(ctx, HandlerFuncC(func(ctx context.Context, w http.ResponseWriter, r *http.Request) {
+ h.ServeHTTP(w, r)
+ }))
+}
+
+// HandlerF is a helper to provide a standard http handler function
+// (http.HandlerFunc) to Handler(). Your final handler won't have access
+// to the context though.
+func (c Chain) HandlerF(hf http.HandlerFunc) http.Handler {
+ ctx := context.Background()
+ return c.HandlerCtx(ctx, HandlerFuncC(func(ctx context.Context, w http.ResponseWriter, r *http.Request) {
+ hf(w, r)
+ }))
+}
+
+// HandlerCtx wraps the provided final handler with all the middleware appended to
+// the chain and returns a new standard http.Handler instance.
+func (c Chain) HandlerCtx(ctx context.Context, xh HandlerC) http.Handler {
+ return New(ctx, c.HandlerC(xh))
+}
+
+// HandlerC wraps the provided final handler with all the middleware appended to
+// the chain and returns a HandlerC instance.
+func (c Chain) HandlerC(xh HandlerC) HandlerC {
+ for i := len(c) - 1; i >= 0; i-- {
+ xh = c[i](xh)
+ }
+ return xh
+}
+
+// HandlerCF wraps the provided final handler func with all the middleware appended to
+// the chain and returns a HandlerC instance.
+//
+// HandlerCF is equivalent to:
+// c.HandlerC(xhandler.HandlerFuncC(xhc))
+func (c Chain) HandlerCF(xhc HandlerFuncC) HandlerC {
+ return c.HandlerC(HandlerFuncC(xhc))
+}
diff --git a/vendor/github.com/rs/xhandler/middleware.go b/vendor/github.com/rs/xhandler/middleware.go
new file mode 100644
index 000000000..7ad8fba62
--- /dev/null
+++ b/vendor/github.com/rs/xhandler/middleware.go
@@ -0,0 +1,59 @@
+package xhandler
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+)
+
+// CloseHandler returns a Handler, cancelling the context when the client
+// connection closes unexpectedly.
+func CloseHandler(next HandlerC) HandlerC {
+ return HandlerFuncC(func(ctx context.Context, w http.ResponseWriter, r *http.Request) {
+ // Cancel the context if the client closes the connection
+ if wcn, ok := w.(http.CloseNotifier); ok {
+ var cancel context.CancelFunc
+ ctx, cancel = context.WithCancel(ctx)
+ defer cancel()
+
+ notify := wcn.CloseNotify()
+ go func() {
+ select {
+ case <-notify:
+ cancel()
+ case <-ctx.Done():
+ }
+ }()
+ }
+
+ next.ServeHTTPC(ctx, w, r)
+ })
+}
+
+// TimeoutHandler returns a Handler which adds a timeout to the context.
+//
+// Child handlers have the responsability of obeying the context deadline and to return
+// an appropriate error (or not) response in case of timeout.
+func TimeoutHandler(timeout time.Duration) func(next HandlerC) HandlerC {
+ return func(next HandlerC) HandlerC {
+ return HandlerFuncC(func(ctx context.Context, w http.ResponseWriter, r *http.Request) {
+ ctx, _ = context.WithTimeout(ctx, timeout)
+ next.ServeHTTPC(ctx, w, r)
+ })
+ }
+}
+
+// If is a special handler that will skip insert the condNext handler only if a condition
+// applies at runtime.
+func If(cond func(ctx context.Context, w http.ResponseWriter, r *http.Request) bool, condNext func(next HandlerC) HandlerC) func(next HandlerC) HandlerC {
+ return func(next HandlerC) HandlerC {
+ return HandlerFuncC(func(ctx context.Context, w http.ResponseWriter, r *http.Request) {
+ if cond(ctx, w, r) {
+ condNext(next).ServeHTTPC(ctx, w, r)
+ } else {
+ next.ServeHTTPC(ctx, w, r)
+ }
+ })
+ }
+}
diff --git a/vendor/github.com/rs/xhandler/xhandler.go b/vendor/github.com/rs/xhandler/xhandler.go
new file mode 100644
index 000000000..bc832cb1f
--- /dev/null
+++ b/vendor/github.com/rs/xhandler/xhandler.go
@@ -0,0 +1,42 @@
+// Package xhandler provides a bridge between http.Handler and net/context.
+//
+// xhandler enforces net/context in your handlers without sacrificing
+// compatibility with existing http.Handlers nor imposing a specific router.
+//
+// Thanks to net/context deadline management, xhandler is able to enforce
+// a per request deadline and will cancel the context in when the client close
+// the connection unexpectedly.
+//
+// You may create net/context aware middlewares pretty much the same way as
+// you would with http.Handler.
+package xhandler // import "github.com/rs/xhandler"
+
+import (
+ "net/http"
+
+ "golang.org/x/net/context"
+)
+
+// HandlerC is a net/context aware http.Handler
+type HandlerC interface {
+ ServeHTTPC(context.Context, http.ResponseWriter, *http.Request)
+}
+
+// HandlerFuncC type is an adapter to allow the use of ordinary functions
+// as an xhandler.Handler. If f is a function with the appropriate signature,
+// xhandler.HandlerFuncC(f) is a xhandler.Handler object that calls f.
+type HandlerFuncC func(context.Context, http.ResponseWriter, *http.Request)
+
+// ServeHTTPC calls f(ctx, w, r).
+func (f HandlerFuncC) ServeHTTPC(ctx context.Context, w http.ResponseWriter, r *http.Request) {
+ f(ctx, w, r)
+}
+
+// New creates a conventional http.Handler injecting the provided root
+// context to sub handlers. This handler is used as a bridge between conventional
+// http.Handler and context aware handlers.
+func New(ctx context.Context, h HandlerC) http.Handler {
+ return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ h.ServeHTTPC(ctx, w, r)
+ })
+}
diff --git a/vendor/github.com/syndtr/goleveldb/.travis.yml b/vendor/github.com/syndtr/goleveldb/.travis.yml
new file mode 100644
index 000000000..82de37735
--- /dev/null
+++ b/vendor/github.com/syndtr/goleveldb/.travis.yml
@@ -0,0 +1,12 @@
+language: go
+
+go:
+ - 1.4
+ - 1.5
+ - 1.6
+ - 1.7
+ - tip
+
+script:
+ - go test -timeout 1h ./...
+ - go test -timeout 30m -race -run "TestDB_(Concurrent|GoleveldbIssue74)" ./leveldb
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/LICENSE b/vendor/github.com/syndtr/goleveldb/LICENSE
index 4a772d1ab..4a772d1ab 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/LICENSE
+++ b/vendor/github.com/syndtr/goleveldb/LICENSE
diff --git a/vendor/github.com/syndtr/goleveldb/README.md b/vendor/github.com/syndtr/goleveldb/README.md
new file mode 100644
index 000000000..259286f55
--- /dev/null
+++ b/vendor/github.com/syndtr/goleveldb/README.md
@@ -0,0 +1,105 @@
+This is an implementation of the [LevelDB key/value database](http:code.google.com/p/leveldb) in the [Go programming language](http:golang.org).
+
+[![Build Status](https://travis-ci.org/syndtr/goleveldb.png?branch=master)](https://travis-ci.org/syndtr/goleveldb)
+
+Installation
+-----------
+
+ go get github.com/syndtr/goleveldb/leveldb
+
+Requirements
+-----------
+
+* Need at least `go1.4` or newer.
+
+Usage
+-----------
+
+Create or open a database:
+```go
+db, err := leveldb.OpenFile("path/to/db", nil)
+...
+defer db.Close()
+...
+```
+Read or modify the database content:
+```go
+// Remember that the contents of the returned slice should not be modified.
+data, err := db.Get([]byte("key"), nil)
+...
+err = db.Put([]byte("key"), []byte("value"), nil)
+...
+err = db.Delete([]byte("key"), nil)
+...
+```
+
+Iterate over database content:
+```go
+iter := db.NewIterator(nil, nil)
+for iter.Next() {
+ // Remember that the contents of the returned slice should not be modified, and
+ // only valid until the next call to Next.
+ key := iter.Key()
+ value := iter.Value()
+ ...
+}
+iter.Release()
+err = iter.Error()
+...
+```
+Seek-then-Iterate:
+```go
+iter := db.NewIterator(nil, nil)
+for ok := iter.Seek(key); ok; ok = iter.Next() {
+ // Use key/value.
+ ...
+}
+iter.Release()
+err = iter.Error()
+...
+```
+Iterate over subset of database content:
+```go
+iter := db.NewIterator(&util.Range{Start: []byte("foo"), Limit: []byte("xoo")}, nil)
+for iter.Next() {
+ // Use key/value.
+ ...
+}
+iter.Release()
+err = iter.Error()
+...
+```
+Iterate over subset of database content with a particular prefix:
+```go
+iter := db.NewIterator(util.BytesPrefix([]byte("foo-")), nil)
+for iter.Next() {
+ // Use key/value.
+ ...
+}
+iter.Release()
+err = iter.Error()
+...
+```
+Batch writes:
+```go
+batch := new(leveldb.Batch)
+batch.Put([]byte("foo"), []byte("value"))
+batch.Put([]byte("bar"), []byte("another value"))
+batch.Delete([]byte("baz"))
+err = db.Write(batch, nil)
+...
+```
+Use bloom filter:
+```go
+o := &opt.Options{
+ Filter: filter.NewBloomFilter(10),
+}
+db, err := leveldb.OpenFile("path/to/db", o)
+...
+defer db.Close()
+...
+```
+Documentation
+-----------
+
+You can read package documentation [here](http:godoc.org/github.com/syndtr/goleveldb).
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/batch.go b/vendor/github.com/syndtr/goleveldb/leveldb/batch.go
index 225920002..225920002 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/batch.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/batch.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/cache/cache.go b/vendor/github.com/syndtr/goleveldb/leveldb/cache/cache.go
index c5940b232..c5940b232 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/cache/cache.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/cache/cache.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/cache/lru.go b/vendor/github.com/syndtr/goleveldb/leveldb/cache/lru.go
index d9a84cde1..d9a84cde1 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/cache/lru.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/cache/lru.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/comparer.go b/vendor/github.com/syndtr/goleveldb/leveldb/comparer.go
index 448402b82..448402b82 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/comparer.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/comparer.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/comparer/bytes_comparer.go b/vendor/github.com/syndtr/goleveldb/leveldb/comparer/bytes_comparer.go
index 14dddf88d..14dddf88d 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/comparer/bytes_comparer.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/comparer/bytes_comparer.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/comparer/comparer.go b/vendor/github.com/syndtr/goleveldb/leveldb/comparer/comparer.go
index 14a28f16f..14a28f16f 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/comparer/comparer.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/comparer/comparer.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/db.go b/vendor/github.com/syndtr/goleveldb/leveldb/db.go
index a02cb2c50..a02cb2c50 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/db.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/db.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/db_compaction.go b/vendor/github.com/syndtr/goleveldb/leveldb/db_compaction.go
index 2d0ad0753..2d0ad0753 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/db_compaction.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/db_compaction.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/db_iter.go b/vendor/github.com/syndtr/goleveldb/leveldb/db_iter.go
index 03c24cdab..03c24cdab 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/db_iter.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/db_iter.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/db_snapshot.go b/vendor/github.com/syndtr/goleveldb/leveldb/db_snapshot.go
index 2c69d2e53..2c69d2e53 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/db_snapshot.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/db_snapshot.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/db_state.go b/vendor/github.com/syndtr/goleveldb/leveldb/db_state.go
index 85b02d24b..85b02d24b 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/db_state.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/db_state.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/db_transaction.go b/vendor/github.com/syndtr/goleveldb/leveldb/db_transaction.go
index b8f7e7d21..b8f7e7d21 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/db_transaction.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/db_transaction.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/db_util.go b/vendor/github.com/syndtr/goleveldb/leveldb/db_util.go
index 7ecd960d2..7ecd960d2 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/db_util.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/db_util.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/db_write.go b/vendor/github.com/syndtr/goleveldb/leveldb/db_write.go
index cc428b695..cc428b695 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/db_write.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/db_write.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/doc.go b/vendor/github.com/syndtr/goleveldb/leveldb/doc.go
index 53f13bb24..53f13bb24 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/doc.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/doc.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/errors.go b/vendor/github.com/syndtr/goleveldb/leveldb/errors.go
index de2649812..de2649812 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/errors.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/errors.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/errors/errors.go b/vendor/github.com/syndtr/goleveldb/leveldb/errors/errors.go
index 8d6146b6f..8d6146b6f 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/errors/errors.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/errors/errors.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/filter.go b/vendor/github.com/syndtr/goleveldb/leveldb/filter.go
index e961e420d..e961e420d 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/filter.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/filter.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/filter/bloom.go b/vendor/github.com/syndtr/goleveldb/leveldb/filter/bloom.go
index bab0e9970..bab0e9970 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/filter/bloom.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/filter/bloom.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/filter/filter.go b/vendor/github.com/syndtr/goleveldb/leveldb/filter/filter.go
index 7a925c5a8..7a925c5a8 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/filter/filter.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/filter/filter.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/iterator/array_iter.go b/vendor/github.com/syndtr/goleveldb/leveldb/iterator/array_iter.go
index a23ab05f7..a23ab05f7 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/iterator/array_iter.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/iterator/array_iter.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/iterator/indexed_iter.go b/vendor/github.com/syndtr/goleveldb/leveldb/iterator/indexed_iter.go
index 939adbb93..939adbb93 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/iterator/indexed_iter.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/iterator/indexed_iter.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/iterator/iter.go b/vendor/github.com/syndtr/goleveldb/leveldb/iterator/iter.go
index 3b5553274..3b5553274 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/iterator/iter.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/iterator/iter.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/iterator/merged_iter.go b/vendor/github.com/syndtr/goleveldb/leveldb/iterator/merged_iter.go
index 1a7e29df8..1a7e29df8 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/iterator/merged_iter.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/iterator/merged_iter.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/journal/journal.go b/vendor/github.com/syndtr/goleveldb/leveldb/journal/journal.go
index d094c3d0f..d094c3d0f 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/journal/journal.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/journal/journal.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/key.go b/vendor/github.com/syndtr/goleveldb/leveldb/key.go
index ad8f51ec8..ad8f51ec8 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/key.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/key.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/memdb/memdb.go b/vendor/github.com/syndtr/goleveldb/leveldb/memdb/memdb.go
index 18a19ed42..18a19ed42 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/memdb/memdb.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/memdb/memdb.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/opt/options.go b/vendor/github.com/syndtr/goleveldb/leveldb/opt/options.go
index 44e7d9adc..44e7d9adc 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/opt/options.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/opt/options.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/options.go b/vendor/github.com/syndtr/goleveldb/leveldb/options.go
index b072b1ac4..b072b1ac4 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/options.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/options.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/session.go b/vendor/github.com/syndtr/goleveldb/leveldb/session.go
index f3e747701..f3e747701 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/session.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/session.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/session_compaction.go b/vendor/github.com/syndtr/goleveldb/leveldb/session_compaction.go
index 089cd00b2..089cd00b2 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/session_compaction.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/session_compaction.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/session_record.go b/vendor/github.com/syndtr/goleveldb/leveldb/session_record.go
index 854e1aa6f..854e1aa6f 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/session_record.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/session_record.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/session_util.go b/vendor/github.com/syndtr/goleveldb/leveldb/session_util.go
index 34ad61798..34ad61798 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/session_util.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/session_util.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/storage/file_storage.go b/vendor/github.com/syndtr/goleveldb/leveldb/storage/file_storage.go
index e53434cab..e53434cab 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/storage/file_storage.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/storage/file_storage.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/storage/file_storage_nacl.go b/vendor/github.com/syndtr/goleveldb/leveldb/storage/file_storage_nacl.go
index 5545aeef2..5545aeef2 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/storage/file_storage_nacl.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/storage/file_storage_nacl.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/storage/file_storage_plan9.go b/vendor/github.com/syndtr/goleveldb/leveldb/storage/file_storage_plan9.go
index bab62bfce..bab62bfce 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/storage/file_storage_plan9.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/storage/file_storage_plan9.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/storage/file_storage_solaris.go b/vendor/github.com/syndtr/goleveldb/leveldb/storage/file_storage_solaris.go
index 79901ee4a..79901ee4a 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/storage/file_storage_solaris.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/storage/file_storage_solaris.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/storage/file_storage_unix.go b/vendor/github.com/syndtr/goleveldb/leveldb/storage/file_storage_unix.go
index 7e2991537..7e2991537 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/storage/file_storage_unix.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/storage/file_storage_unix.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/storage/file_storage_windows.go b/vendor/github.com/syndtr/goleveldb/leveldb/storage/file_storage_windows.go
index 899335fd7..899335fd7 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/storage/file_storage_windows.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/storage/file_storage_windows.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/storage/mem_storage.go b/vendor/github.com/syndtr/goleveldb/leveldb/storage/mem_storage.go
index 9b0421f03..9b0421f03 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/storage/mem_storage.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/storage/mem_storage.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/storage/storage.go b/vendor/github.com/syndtr/goleveldb/leveldb/storage/storage.go
index c16bce6b6..c16bce6b6 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/storage/storage.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/storage/storage.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/table.go b/vendor/github.com/syndtr/goleveldb/leveldb/table.go
index 81d18a531..81d18a531 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/table.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/table.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/table/reader.go b/vendor/github.com/syndtr/goleveldb/leveldb/table/reader.go
index c5be420b3..c5be420b3 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/table/reader.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/table/reader.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/table/table.go b/vendor/github.com/syndtr/goleveldb/leveldb/table/table.go
index beacdc1f0..beacdc1f0 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/table/table.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/table/table.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/table/writer.go b/vendor/github.com/syndtr/goleveldb/leveldb/table/writer.go
index b96b271d8..b96b271d8 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/table/writer.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/table/writer.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/util.go b/vendor/github.com/syndtr/goleveldb/leveldb/util.go
index e572a329e..e572a329e 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/util.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/util.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/util/buffer.go b/vendor/github.com/syndtr/goleveldb/leveldb/util/buffer.go
index 21de24255..21de24255 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/util/buffer.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/util/buffer.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/util/buffer_pool.go b/vendor/github.com/syndtr/goleveldb/leveldb/util/buffer_pool.go
index 2f3db974a..2f3db974a 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/util/buffer_pool.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/util/buffer_pool.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/util/crc32.go b/vendor/github.com/syndtr/goleveldb/leveldb/util/crc32.go
index 631c9d610..631c9d610 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/util/crc32.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/util/crc32.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/util/hash.go b/vendor/github.com/syndtr/goleveldb/leveldb/util/hash.go
index 7f3fa4e2c..7f3fa4e2c 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/util/hash.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/util/hash.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/util/range.go b/vendor/github.com/syndtr/goleveldb/leveldb/util/range.go
index 85159583d..85159583d 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/util/range.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/util/range.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/util/util.go b/vendor/github.com/syndtr/goleveldb/leveldb/util/util.go
index f35976865..f35976865 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/util/util.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/util/util.go
diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/version.go b/vendor/github.com/syndtr/goleveldb/leveldb/version.go
index c60f12c20..c60f12c20 100644
--- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/version.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/version.go
diff --git a/vendor/golang.org/x/crypto/.gitattributes b/vendor/golang.org/x/crypto/.gitattributes
new file mode 100644
index 000000000..d2f212e5d
--- /dev/null
+++ b/vendor/golang.org/x/crypto/.gitattributes
@@ -0,0 +1,10 @@
+# Treat all files in this repo as binary, with no git magic updating
+# line endings. Windows users contributing to Go will need to use a
+# modern version of git and editors capable of LF line endings.
+#
+# We'll prevent accidental CRLF line endings from entering the repo
+# via the git-review gofmt checks.
+#
+# See golang.org/issue/9281
+
+* -text
diff --git a/vendor/golang.org/x/crypto/.gitignore b/vendor/golang.org/x/crypto/.gitignore
new file mode 100644
index 000000000..8339fd61d
--- /dev/null
+++ b/vendor/golang.org/x/crypto/.gitignore
@@ -0,0 +1,2 @@
+# Add no patterns to .hgignore except for files generated by the build.
+last-change
diff --git a/vendor/golang.org/x/crypto/AUTHORS b/vendor/golang.org/x/crypto/AUTHORS
new file mode 100644
index 000000000..15167cd74
--- /dev/null
+++ b/vendor/golang.org/x/crypto/AUTHORS
@@ -0,0 +1,3 @@
+# This source code refers to The Go Authors for copyright purposes.
+# The master list of authors is in the main Go distribution,
+# visible at http://tip.golang.org/AUTHORS.
diff --git a/vendor/golang.org/x/crypto/CONTRIBUTING.md b/vendor/golang.org/x/crypto/CONTRIBUTING.md
new file mode 100644
index 000000000..88dff59bc
--- /dev/null
+++ b/vendor/golang.org/x/crypto/CONTRIBUTING.md
@@ -0,0 +1,31 @@
+# Contributing to Go
+
+Go is an open source project.
+
+It is the work of hundreds of contributors. We appreciate your help!
+
+
+## Filing issues
+
+When [filing an issue](https://golang.org/issue/new), make sure to answer these five questions:
+
+1. What version of Go are you using (`go version`)?
+2. What operating system and processor architecture are you using?
+3. What did you do?
+4. What did you expect to see?
+5. What did you see instead?
+
+General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker.
+The gophers there will answer or ask you to file an issue if you've tripped over a bug.
+
+## Contributing code
+
+Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html)
+before sending patches.
+
+**We do not accept GitHub pull requests**
+(we use [Gerrit](https://code.google.com/p/gerrit/) instead for code review).
+
+Unless otherwise noted, the Go source files are distributed under
+the BSD-style license found in the LICENSE file.
+
diff --git a/vendor/golang.org/x/crypto/CONTRIBUTORS b/vendor/golang.org/x/crypto/CONTRIBUTORS
new file mode 100644
index 000000000..1c4577e96
--- /dev/null
+++ b/vendor/golang.org/x/crypto/CONTRIBUTORS
@@ -0,0 +1,3 @@
+# This source code was written by the Go contributors.
+# The master list of contributors is in the main Go distribution,
+# visible at http://tip.golang.org/CONTRIBUTORS.
diff --git a/Godeps/_workspace/src/golang.org/x/net/LICENSE b/vendor/golang.org/x/crypto/LICENSE
index 6a66aea5e..6a66aea5e 100644
--- a/Godeps/_workspace/src/golang.org/x/net/LICENSE
+++ b/vendor/golang.org/x/crypto/LICENSE
diff --git a/Godeps/_workspace/src/golang.org/x/crypto/PATENTS b/vendor/golang.org/x/crypto/PATENTS
index 733099041..733099041 100644
--- a/Godeps/_workspace/src/golang.org/x/crypto/PATENTS
+++ b/vendor/golang.org/x/crypto/PATENTS
diff --git a/vendor/golang.org/x/crypto/README b/vendor/golang.org/x/crypto/README
new file mode 100644
index 000000000..f1e0cbf94
--- /dev/null
+++ b/vendor/golang.org/x/crypto/README
@@ -0,0 +1,3 @@
+This repository holds supplementary Go cryptography libraries.
+
+To submit changes to this repository, see http://golang.org/doc/contribute.html.
diff --git a/vendor/golang.org/x/crypto/codereview.cfg b/vendor/golang.org/x/crypto/codereview.cfg
new file mode 100644
index 000000000..3f8b14b64
--- /dev/null
+++ b/vendor/golang.org/x/crypto/codereview.cfg
@@ -0,0 +1 @@
+issuerepo: golang/go
diff --git a/Godeps/_workspace/src/golang.org/x/crypto/pbkdf2/pbkdf2.go b/vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go
index c02b4d5a7..593f65300 100644
--- a/Godeps/_workspace/src/golang.org/x/crypto/pbkdf2/pbkdf2.go
+++ b/vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go
@@ -16,7 +16,7 @@ Hash Functions SHA-1, SHA-224, SHA-256, SHA-384 and SHA-512 for HMAC. To
choose, you can pass the `New` functions from the different SHA packages to
pbkdf2.Key.
*/
-package pbkdf2
+package pbkdf2 // import "golang.org/x/crypto/pbkdf2"
import (
"crypto/hmac"
diff --git a/Godeps/_workspace/src/golang.org/x/crypto/ripemd160/ripemd160.go b/vendor/golang.org/x/crypto/ripemd160/ripemd160.go
index da690f0b9..6c6e84236 100644
--- a/Godeps/_workspace/src/golang.org/x/crypto/ripemd160/ripemd160.go
+++ b/vendor/golang.org/x/crypto/ripemd160/ripemd160.go
@@ -3,7 +3,7 @@
// license that can be found in the LICENSE file.
// Package ripemd160 implements the RIPEMD-160 hash algorithm.
-package ripemd160
+package ripemd160 // import "golang.org/x/crypto/ripemd160"
// RIPEMD-160 is designed by by Hans Dobbertin, Antoon Bosselaers, and Bart
// Preneel with specifications available at:
diff --git a/Godeps/_workspace/src/golang.org/x/crypto/ripemd160/ripemd160block.go b/vendor/golang.org/x/crypto/ripemd160/ripemd160block.go
index 7bc8e6c48..7bc8e6c48 100644
--- a/Godeps/_workspace/src/golang.org/x/crypto/ripemd160/ripemd160block.go
+++ b/vendor/golang.org/x/crypto/ripemd160/ripemd160block.go
diff --git a/Godeps/_workspace/src/golang.org/x/crypto/scrypt/scrypt.go b/vendor/golang.org/x/crypto/scrypt/scrypt.go
index 30737b0a6..7455395cf 100644
--- a/Godeps/_workspace/src/golang.org/x/crypto/scrypt/scrypt.go
+++ b/vendor/golang.org/x/crypto/scrypt/scrypt.go
@@ -5,7 +5,7 @@
// Package scrypt implements the scrypt key derivation function as defined in
// Colin Percival's paper "Stronger Key Derivation via Sequential Memory-Hard
// Functions" (http://www.tarsnap.com/scrypt/scrypt.pdf).
-package scrypt
+package scrypt // import "golang.org/x/crypto/scrypt"
import (
"crypto/sha256"
@@ -218,7 +218,7 @@ func smix(b []byte, r, N int, v, xy []uint32) {
// For example, you can get a derived key for e.g. AES-256 (which needs a
// 32-byte key) by doing:
//
-// dk := scrypt.Key([]byte("some password"), salt, 16384, 8, 1, 32)
+// dk, err := scrypt.Key([]byte("some password"), salt, 16384, 8, 1, 32)
//
// The recommended parameters for interactive logins as of 2009 are N=16384,
// r=8, p=1. They should be increased as memory latency and CPU parallelism
diff --git a/vendor/golang.org/x/net/.gitattributes b/vendor/golang.org/x/net/.gitattributes
new file mode 100644
index 000000000..d2f212e5d
--- /dev/null
+++ b/vendor/golang.org/x/net/.gitattributes
@@ -0,0 +1,10 @@
+# Treat all files in this repo as binary, with no git magic updating
+# line endings. Windows users contributing to Go will need to use a
+# modern version of git and editors capable of LF line endings.
+#
+# We'll prevent accidental CRLF line endings from entering the repo
+# via the git-review gofmt checks.
+#
+# See golang.org/issue/9281
+
+* -text
diff --git a/vendor/golang.org/x/net/.gitignore b/vendor/golang.org/x/net/.gitignore
new file mode 100644
index 000000000..8339fd61d
--- /dev/null
+++ b/vendor/golang.org/x/net/.gitignore
@@ -0,0 +1,2 @@
+# Add no patterns to .hgignore except for files generated by the build.
+last-change
diff --git a/vendor/golang.org/x/net/AUTHORS b/vendor/golang.org/x/net/AUTHORS
new file mode 100644
index 000000000..15167cd74
--- /dev/null
+++ b/vendor/golang.org/x/net/AUTHORS
@@ -0,0 +1,3 @@
+# This source code refers to The Go Authors for copyright purposes.
+# The master list of authors is in the main Go distribution,
+# visible at http://tip.golang.org/AUTHORS.
diff --git a/vendor/golang.org/x/net/CONTRIBUTING.md b/vendor/golang.org/x/net/CONTRIBUTING.md
new file mode 100644
index 000000000..88dff59bc
--- /dev/null
+++ b/vendor/golang.org/x/net/CONTRIBUTING.md
@@ -0,0 +1,31 @@
+# Contributing to Go
+
+Go is an open source project.
+
+It is the work of hundreds of contributors. We appreciate your help!
+
+
+## Filing issues
+
+When [filing an issue](https://golang.org/issue/new), make sure to answer these five questions:
+
+1. What version of Go are you using (`go version`)?
+2. What operating system and processor architecture are you using?
+3. What did you do?
+4. What did you expect to see?
+5. What did you see instead?
+
+General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker.
+The gophers there will answer or ask you to file an issue if you've tripped over a bug.
+
+## Contributing code
+
+Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html)
+before sending patches.
+
+**We do not accept GitHub pull requests**
+(we use [Gerrit](https://code.google.com/p/gerrit/) instead for code review).
+
+Unless otherwise noted, the Go source files are distributed under
+the BSD-style license found in the LICENSE file.
+
diff --git a/vendor/golang.org/x/net/CONTRIBUTORS b/vendor/golang.org/x/net/CONTRIBUTORS
new file mode 100644
index 000000000..1c4577e96
--- /dev/null
+++ b/vendor/golang.org/x/net/CONTRIBUTORS
@@ -0,0 +1,3 @@
+# This source code was written by the Go contributors.
+# The master list of contributors is in the main Go distribution,
+# visible at http://tip.golang.org/CONTRIBUTORS.
diff --git a/Godeps/_workspace/src/golang.org/x/sys/LICENSE b/vendor/golang.org/x/net/LICENSE
index 6a66aea5e..6a66aea5e 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/LICENSE
+++ b/vendor/golang.org/x/net/LICENSE
diff --git a/Godeps/_workspace/src/golang.org/x/net/PATENTS b/vendor/golang.org/x/net/PATENTS
index 733099041..733099041 100644
--- a/Godeps/_workspace/src/golang.org/x/net/PATENTS
+++ b/vendor/golang.org/x/net/PATENTS
diff --git a/vendor/golang.org/x/net/README b/vendor/golang.org/x/net/README
new file mode 100644
index 000000000..6b13d8e50
--- /dev/null
+++ b/vendor/golang.org/x/net/README
@@ -0,0 +1,3 @@
+This repository holds supplementary Go networking libraries.
+
+To submit changes to this repository, see http://golang.org/doc/contribute.html.
diff --git a/vendor/golang.org/x/net/codereview.cfg b/vendor/golang.org/x/net/codereview.cfg
new file mode 100644
index 000000000..3f8b14b64
--- /dev/null
+++ b/vendor/golang.org/x/net/codereview.cfg
@@ -0,0 +1 @@
+issuerepo: golang/go
diff --git a/Godeps/_workspace/src/golang.org/x/net/html/atom/atom.go b/vendor/golang.org/x/net/html/atom/atom.go
index 227404bda..cd0a8ac15 100644
--- a/Godeps/_workspace/src/golang.org/x/net/html/atom/atom.go
+++ b/vendor/golang.org/x/net/html/atom/atom.go
@@ -15,7 +15,7 @@
// whether atom.H1 < atom.H2 may also change. The codes are not guaranteed to
// be dense. The only guarantees are that e.g. looking up "div" will yield
// atom.Div, calling atom.Div.String will return "div", and atom.Div != 0.
-package atom
+package atom // import "golang.org/x/net/html/atom"
// Atom is an integer code for a string. The zero value maps to "".
type Atom uint32
diff --git a/Godeps/_workspace/src/golang.org/x/net/html/atom/gen.go b/vendor/golang.org/x/net/html/atom/gen.go
index 6bfa86601..6bfa86601 100644
--- a/Godeps/_workspace/src/golang.org/x/net/html/atom/gen.go
+++ b/vendor/golang.org/x/net/html/atom/gen.go
diff --git a/Godeps/_workspace/src/golang.org/x/net/html/atom/table.go b/vendor/golang.org/x/net/html/atom/table.go
index 2605ba310..2605ba310 100644
--- a/Godeps/_workspace/src/golang.org/x/net/html/atom/table.go
+++ b/vendor/golang.org/x/net/html/atom/table.go
diff --git a/Godeps/_workspace/src/golang.org/x/net/html/charset/charset.go b/vendor/golang.org/x/net/html/charset/charset.go
index 449607253..13bed1599 100644
--- a/Godeps/_workspace/src/golang.org/x/net/html/charset/charset.go
+++ b/vendor/golang.org/x/net/html/charset/charset.go
@@ -6,7 +6,7 @@
//
// The mapping from encoding labels to encodings is defined at
// https://encoding.spec.whatwg.org/.
-package charset
+package charset // import "golang.org/x/net/html/charset"
import (
"bytes"
diff --git a/Godeps/_workspace/src/golang.org/x/net/html/const.go b/vendor/golang.org/x/net/html/const.go
index 52f651ff6..52f651ff6 100644
--- a/Godeps/_workspace/src/golang.org/x/net/html/const.go
+++ b/vendor/golang.org/x/net/html/const.go
diff --git a/Godeps/_workspace/src/golang.org/x/net/html/doc.go b/vendor/golang.org/x/net/html/doc.go
index b453fe1e4..94f496874 100644
--- a/Godeps/_workspace/src/golang.org/x/net/html/doc.go
+++ b/vendor/golang.org/x/net/html/doc.go
@@ -93,7 +93,7 @@ The relevant specifications include:
https://html.spec.whatwg.org/multipage/syntax.html and
https://html.spec.whatwg.org/multipage/syntax.html#tokenization
*/
-package html
+package html // import "golang.org/x/net/html"
// The tokenization algorithm implemented by this package is not a line-by-line
// transliteration of the relatively verbose state-machine in the WHATWG
diff --git a/Godeps/_workspace/src/golang.org/x/net/html/doctype.go b/vendor/golang.org/x/net/html/doctype.go
index c484e5a94..c484e5a94 100644
--- a/Godeps/_workspace/src/golang.org/x/net/html/doctype.go
+++ b/vendor/golang.org/x/net/html/doctype.go
diff --git a/Godeps/_workspace/src/golang.org/x/net/html/entity.go b/vendor/golang.org/x/net/html/entity.go
index a50c04c60..a50c04c60 100644
--- a/Godeps/_workspace/src/golang.org/x/net/html/entity.go
+++ b/vendor/golang.org/x/net/html/entity.go
diff --git a/Godeps/_workspace/src/golang.org/x/net/html/escape.go b/vendor/golang.org/x/net/html/escape.go
index d85613962..d85613962 100644
--- a/Godeps/_workspace/src/golang.org/x/net/html/escape.go
+++ b/vendor/golang.org/x/net/html/escape.go
diff --git a/Godeps/_workspace/src/golang.org/x/net/html/foreign.go b/vendor/golang.org/x/net/html/foreign.go
index d3b384409..d3b384409 100644
--- a/Godeps/_workspace/src/golang.org/x/net/html/foreign.go
+++ b/vendor/golang.org/x/net/html/foreign.go
diff --git a/Godeps/_workspace/src/golang.org/x/net/html/node.go b/vendor/golang.org/x/net/html/node.go
index 26b657aec..26b657aec 100644
--- a/Godeps/_workspace/src/golang.org/x/net/html/node.go
+++ b/vendor/golang.org/x/net/html/node.go
diff --git a/Godeps/_workspace/src/golang.org/x/net/html/parse.go b/vendor/golang.org/x/net/html/parse.go
index be4b2bf5a..be4b2bf5a 100644
--- a/Godeps/_workspace/src/golang.org/x/net/html/parse.go
+++ b/vendor/golang.org/x/net/html/parse.go
diff --git a/Godeps/_workspace/src/golang.org/x/net/html/render.go b/vendor/golang.org/x/net/html/render.go
index d34564f49..d34564f49 100644
--- a/Godeps/_workspace/src/golang.org/x/net/html/render.go
+++ b/vendor/golang.org/x/net/html/render.go
diff --git a/Godeps/_workspace/src/golang.org/x/net/html/token.go b/vendor/golang.org/x/net/html/token.go
index 893e272a9..893e272a9 100644
--- a/Godeps/_workspace/src/golang.org/x/net/html/token.go
+++ b/vendor/golang.org/x/net/html/token.go
diff --git a/Godeps/_workspace/src/golang.org/x/net/websocket/client.go b/vendor/golang.org/x/net/websocket/client.go
index 20d1e1e38..69a4ac7ee 100644
--- a/Godeps/_workspace/src/golang.org/x/net/websocket/client.go
+++ b/vendor/golang.org/x/net/websocket/client.go
@@ -6,7 +6,6 @@ package websocket
import (
"bufio"
- "crypto/tls"
"io"
"net"
"net/http"
@@ -87,20 +86,14 @@ func DialConfig(config *Config) (ws *Conn, err error) {
if config.Origin == nil {
return nil, &DialError{config, ErrBadWebSocketOrigin}
}
- switch config.Location.Scheme {
- case "ws":
- client, err = net.Dial("tcp", parseAuthority(config.Location))
-
- case "wss":
- client, err = tls.Dial("tcp", parseAuthority(config.Location), config.TlsConfig)
-
- default:
- err = ErrBadScheme
+ dialer := config.Dialer
+ if dialer == nil {
+ dialer = &net.Dialer{}
}
+ client, err = dialWithDialer(dialer, config)
if err != nil {
goto Error
}
-
ws, err = NewClient(config, client)
if err != nil {
client.Close()
diff --git a/vendor/golang.org/x/net/websocket/dial.go b/vendor/golang.org/x/net/websocket/dial.go
new file mode 100644
index 000000000..2dab943a4
--- /dev/null
+++ b/vendor/golang.org/x/net/websocket/dial.go
@@ -0,0 +1,24 @@
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package websocket
+
+import (
+ "crypto/tls"
+ "net"
+)
+
+func dialWithDialer(dialer *net.Dialer, config *Config) (conn net.Conn, err error) {
+ switch config.Location.Scheme {
+ case "ws":
+ conn, err = dialer.Dial("tcp", parseAuthority(config.Location))
+
+ case "wss":
+ conn, err = tls.DialWithDialer(dialer, "tcp", parseAuthority(config.Location), config.TlsConfig)
+
+ default:
+ err = ErrBadScheme
+ }
+ return
+}
diff --git a/Godeps/_workspace/src/golang.org/x/net/websocket/hybi.go b/vendor/golang.org/x/net/websocket/hybi.go
index 8cffdd16c..8cffdd16c 100644
--- a/Godeps/_workspace/src/golang.org/x/net/websocket/hybi.go
+++ b/vendor/golang.org/x/net/websocket/hybi.go
diff --git a/Godeps/_workspace/src/golang.org/x/net/websocket/server.go b/vendor/golang.org/x/net/websocket/server.go
index 0895dea19..0895dea19 100644
--- a/Godeps/_workspace/src/golang.org/x/net/websocket/server.go
+++ b/vendor/golang.org/x/net/websocket/server.go
diff --git a/Godeps/_workspace/src/golang.org/x/net/websocket/websocket.go b/vendor/golang.org/x/net/websocket/websocket.go
index 9f9b9a52d..a7731d9c9 100644
--- a/Godeps/_workspace/src/golang.org/x/net/websocket/websocket.go
+++ b/vendor/golang.org/x/net/websocket/websocket.go
@@ -4,7 +4,7 @@
// Package websocket implements a client and server for the WebSocket protocol
// as specified in RFC 6455.
-package websocket
+package websocket // import "golang.org/x/net/websocket"
import (
"bufio"
@@ -32,6 +32,8 @@ const (
PingFrame = 9
PongFrame = 10
UnknownFrame = 255
+
+ DefaultMaxPayloadBytes = 32 << 20 // 32MB
)
// ProtocolError represents WebSocket protocol errors.
@@ -58,6 +60,10 @@ var (
ErrNotSupported = &ProtocolError{"not supported"}
)
+// ErrFrameTooLarge is returned by Codec's Receive method if payload size
+// exceeds limit set by Conn.MaxPayloadBytes
+var ErrFrameTooLarge = errors.New("websocket: frame payload size exceeds limit")
+
// Addr is an implementation of net.Addr for WebSocket.
type Addr struct {
*url.URL
@@ -86,6 +92,9 @@ type Config struct {
// Additional header fields to be sent in WebSocket opening handshake.
Header http.Header
+ // Dialer used when opening websocket connections.
+ Dialer *net.Dialer
+
handshakeData map[string]string
}
@@ -163,6 +172,10 @@ type Conn struct {
frameHandler
PayloadType byte
defaultCloseStatus int
+
+ // MaxPayloadBytes limits the size of frame payload received over Conn
+ // by Codec's Receive method. If zero, DefaultMaxPayloadBytes is used.
+ MaxPayloadBytes int
}
// Read implements the io.Reader interface:
@@ -299,7 +312,12 @@ func (cd Codec) Send(ws *Conn, v interface{}) (err error) {
return err
}
-// Receive receives single frame from ws, unmarshaled by cd.Unmarshal and stores in v.
+// Receive receives single frame from ws, unmarshaled by cd.Unmarshal and stores
+// in v. The whole frame payload is read to an in-memory buffer; max size of
+// payload is defined by ws.MaxPayloadBytes. If frame payload size exceeds
+// limit, ErrFrameTooLarge is returned; in this case frame is not read off wire
+// completely. The next call to Receive would read and discard leftover data of
+// previous oversized frame before processing next frame.
func (cd Codec) Receive(ws *Conn, v interface{}) (err error) {
ws.rio.Lock()
defer ws.rio.Unlock()
@@ -322,6 +340,19 @@ again:
if frame == nil {
goto again
}
+ maxPayloadBytes := ws.MaxPayloadBytes
+ if maxPayloadBytes == 0 {
+ maxPayloadBytes = DefaultMaxPayloadBytes
+ }
+ if hf, ok := frame.(*hybiFrameReader); ok && hf.header.Length > int64(maxPayloadBytes) {
+ // payload size exceeds limit, no need to call Unmarshal
+ //
+ // set frameReader to current oversized frame so that
+ // the next call to this function can drain leftover
+ // data before processing the next frame
+ ws.frameReader = frame
+ return ErrFrameTooLarge
+ }
payloadType := frame.PayloadType()
data, err := ioutil.ReadAll(frame)
if err != nil {
diff --git a/vendor/golang.org/x/sys/.gitattributes b/vendor/golang.org/x/sys/.gitattributes
new file mode 100644
index 000000000..d2f212e5d
--- /dev/null
+++ b/vendor/golang.org/x/sys/.gitattributes
@@ -0,0 +1,10 @@
+# Treat all files in this repo as binary, with no git magic updating
+# line endings. Windows users contributing to Go will need to use a
+# modern version of git and editors capable of LF line endings.
+#
+# We'll prevent accidental CRLF line endings from entering the repo
+# via the git-review gofmt checks.
+#
+# See golang.org/issue/9281
+
+* -text
diff --git a/vendor/golang.org/x/sys/.gitignore b/vendor/golang.org/x/sys/.gitignore
new file mode 100644
index 000000000..8339fd61d
--- /dev/null
+++ b/vendor/golang.org/x/sys/.gitignore
@@ -0,0 +1,2 @@
+# Add no patterns to .hgignore except for files generated by the build.
+last-change
diff --git a/vendor/golang.org/x/sys/AUTHORS b/vendor/golang.org/x/sys/AUTHORS
new file mode 100644
index 000000000..15167cd74
--- /dev/null
+++ b/vendor/golang.org/x/sys/AUTHORS
@@ -0,0 +1,3 @@
+# This source code refers to The Go Authors for copyright purposes.
+# The master list of authors is in the main Go distribution,
+# visible at http://tip.golang.org/AUTHORS.
diff --git a/vendor/golang.org/x/sys/CONTRIBUTING.md b/vendor/golang.org/x/sys/CONTRIBUTING.md
new file mode 100644
index 000000000..88dff59bc
--- /dev/null
+++ b/vendor/golang.org/x/sys/CONTRIBUTING.md
@@ -0,0 +1,31 @@
+# Contributing to Go
+
+Go is an open source project.
+
+It is the work of hundreds of contributors. We appreciate your help!
+
+
+## Filing issues
+
+When [filing an issue](https://golang.org/issue/new), make sure to answer these five questions:
+
+1. What version of Go are you using (`go version`)?
+2. What operating system and processor architecture are you using?
+3. What did you do?
+4. What did you expect to see?
+5. What did you see instead?
+
+General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker.
+The gophers there will answer or ask you to file an issue if you've tripped over a bug.
+
+## Contributing code
+
+Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html)
+before sending patches.
+
+**We do not accept GitHub pull requests**
+(we use [Gerrit](https://code.google.com/p/gerrit/) instead for code review).
+
+Unless otherwise noted, the Go source files are distributed under
+the BSD-style license found in the LICENSE file.
+
diff --git a/vendor/golang.org/x/sys/CONTRIBUTORS b/vendor/golang.org/x/sys/CONTRIBUTORS
new file mode 100644
index 000000000..1c4577e96
--- /dev/null
+++ b/vendor/golang.org/x/sys/CONTRIBUTORS
@@ -0,0 +1,3 @@
+# This source code was written by the Go contributors.
+# The master list of contributors is in the main Go distribution,
+# visible at http://tip.golang.org/CONTRIBUTORS.
diff --git a/Godeps/_workspace/src/golang.org/x/text/LICENSE b/vendor/golang.org/x/sys/LICENSE
index 6a66aea5e..6a66aea5e 100644
--- a/Godeps/_workspace/src/golang.org/x/text/LICENSE
+++ b/vendor/golang.org/x/sys/LICENSE
diff --git a/Godeps/_workspace/src/golang.org/x/sys/PATENTS b/vendor/golang.org/x/sys/PATENTS
index 733099041..733099041 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/PATENTS
+++ b/vendor/golang.org/x/sys/PATENTS
diff --git a/vendor/golang.org/x/sys/README b/vendor/golang.org/x/sys/README
new file mode 100644
index 000000000..bd422b40c
--- /dev/null
+++ b/vendor/golang.org/x/sys/README
@@ -0,0 +1,3 @@
+This repository holds supplemental Go packages for low-level interactions with the operating system.
+
+To submit changes to this repository, see http://golang.org/doc/contribute.html.
diff --git a/vendor/golang.org/x/sys/codereview.cfg b/vendor/golang.org/x/sys/codereview.cfg
new file mode 100644
index 000000000..3f8b14b64
--- /dev/null
+++ b/vendor/golang.org/x/sys/codereview.cfg
@@ -0,0 +1 @@
+issuerepo: golang/go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/.gitignore b/vendor/golang.org/x/sys/unix/.gitignore
index e48271590..e48271590 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/.gitignore
+++ b/vendor/golang.org/x/sys/unix/.gitignore
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/asm.s b/vendor/golang.org/x/sys/unix/asm.s
index 8ed2fdb94..8ed2fdb94 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/asm.s
+++ b/vendor/golang.org/x/sys/unix/asm.s
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/asm_darwin_386.s b/vendor/golang.org/x/sys/unix/asm_darwin_386.s
index 8a7278319..8a7278319 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/asm_darwin_386.s
+++ b/vendor/golang.org/x/sys/unix/asm_darwin_386.s
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/asm_darwin_amd64.s b/vendor/golang.org/x/sys/unix/asm_darwin_amd64.s
index 6321421f2..6321421f2 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/asm_darwin_amd64.s
+++ b/vendor/golang.org/x/sys/unix/asm_darwin_amd64.s
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/asm_darwin_arm.s b/vendor/golang.org/x/sys/unix/asm_darwin_arm.s
index 333242d50..333242d50 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/asm_darwin_arm.s
+++ b/vendor/golang.org/x/sys/unix/asm_darwin_arm.s
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/asm_darwin_arm64.s b/vendor/golang.org/x/sys/unix/asm_darwin_arm64.s
index 97e017437..97e017437 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/asm_darwin_arm64.s
+++ b/vendor/golang.org/x/sys/unix/asm_darwin_arm64.s
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/asm_dragonfly_amd64.s b/vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s
index d5ed6726c..d5ed6726c 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/asm_dragonfly_amd64.s
+++ b/vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/asm_freebsd_386.s b/vendor/golang.org/x/sys/unix/asm_freebsd_386.s
index c9a0a2601..c9a0a2601 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/asm_freebsd_386.s
+++ b/vendor/golang.org/x/sys/unix/asm_freebsd_386.s
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/asm_freebsd_amd64.s b/vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s
index 35172477c..35172477c 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/asm_freebsd_amd64.s
+++ b/vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/asm_freebsd_arm.s b/vendor/golang.org/x/sys/unix/asm_freebsd_arm.s
index 9227c875b..9227c875b 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/asm_freebsd_arm.s
+++ b/vendor/golang.org/x/sys/unix/asm_freebsd_arm.s
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/asm_linux_386.s b/vendor/golang.org/x/sys/unix/asm_linux_386.s
index 4db290932..4db290932 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/asm_linux_386.s
+++ b/vendor/golang.org/x/sys/unix/asm_linux_386.s
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/asm_linux_amd64.s b/vendor/golang.org/x/sys/unix/asm_linux_amd64.s
index 44e25c62f..44e25c62f 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/asm_linux_amd64.s
+++ b/vendor/golang.org/x/sys/unix/asm_linux_amd64.s
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/asm_linux_arm.s b/vendor/golang.org/x/sys/unix/asm_linux_arm.s
index cf0b57465..cf0b57465 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/asm_linux_arm.s
+++ b/vendor/golang.org/x/sys/unix/asm_linux_arm.s
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/asm_linux_arm64.s b/vendor/golang.org/x/sys/unix/asm_linux_arm64.s
index 4be9bfede..4be9bfede 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/asm_linux_arm64.s
+++ b/vendor/golang.org/x/sys/unix/asm_linux_arm64.s
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/asm_linux_mips64x.s b/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s
index 724e580c4..724e580c4 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/asm_linux_mips64x.s
+++ b/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/asm_linux_ppc64x.s b/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s
index 8d231feb4..8d231feb4 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/asm_linux_ppc64x.s
+++ b/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/asm_linux_s390x.s b/vendor/golang.org/x/sys/unix/asm_linux_s390x.s
index 11889859f..11889859f 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/asm_linux_s390x.s
+++ b/vendor/golang.org/x/sys/unix/asm_linux_s390x.s
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/asm_netbsd_386.s b/vendor/golang.org/x/sys/unix/asm_netbsd_386.s
index 48bdcd763..48bdcd763 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/asm_netbsd_386.s
+++ b/vendor/golang.org/x/sys/unix/asm_netbsd_386.s
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/asm_netbsd_amd64.s b/vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s
index 2ede05c72..2ede05c72 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/asm_netbsd_amd64.s
+++ b/vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/asm_netbsd_arm.s b/vendor/golang.org/x/sys/unix/asm_netbsd_arm.s
index e8928571c..e8928571c 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/asm_netbsd_arm.s
+++ b/vendor/golang.org/x/sys/unix/asm_netbsd_arm.s
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/asm_openbsd_386.s b/vendor/golang.org/x/sys/unix/asm_openbsd_386.s
index 00576f3c8..00576f3c8 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/asm_openbsd_386.s
+++ b/vendor/golang.org/x/sys/unix/asm_openbsd_386.s
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/asm_openbsd_amd64.s b/vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s
index 790ef77f8..790ef77f8 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/asm_openbsd_amd64.s
+++ b/vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/asm_solaris_amd64.s b/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s
index 43ed17a05..43ed17a05 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/asm_solaris_amd64.s
+++ b/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/bluetooth_linux.go b/vendor/golang.org/x/sys/unix/bluetooth_linux.go
index 6e3229697..6e3229697 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/bluetooth_linux.go
+++ b/vendor/golang.org/x/sys/unix/bluetooth_linux.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/constants.go b/vendor/golang.org/x/sys/unix/constants.go
index a96f0ebc2..a96f0ebc2 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/constants.go
+++ b/vendor/golang.org/x/sys/unix/constants.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/env_unix.go b/vendor/golang.org/x/sys/unix/env_unix.go
index 45e281a04..45e281a04 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/env_unix.go
+++ b/vendor/golang.org/x/sys/unix/env_unix.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/env_unset.go b/vendor/golang.org/x/sys/unix/env_unset.go
index 922226255..922226255 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/env_unset.go
+++ b/vendor/golang.org/x/sys/unix/env_unset.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/flock.go b/vendor/golang.org/x/sys/unix/flock.go
index ce67a5952..ce67a5952 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/flock.go
+++ b/vendor/golang.org/x/sys/unix/flock.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/flock_linux_32bit.go b/vendor/golang.org/x/sys/unix/flock_linux_32bit.go
index 362831c3f..362831c3f 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/flock_linux_32bit.go
+++ b/vendor/golang.org/x/sys/unix/flock_linux_32bit.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/gccgo.go b/vendor/golang.org/x/sys/unix/gccgo.go
index 94c823212..94c823212 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/gccgo.go
+++ b/vendor/golang.org/x/sys/unix/gccgo.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/gccgo_c.c b/vendor/golang.org/x/sys/unix/gccgo_c.c
index 07f6be039..07f6be039 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/gccgo_c.c
+++ b/vendor/golang.org/x/sys/unix/gccgo_c.c
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/gccgo_linux_amd64.go b/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go
index bffe1a77d..bffe1a77d 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/gccgo_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go
diff --git a/vendor/golang.org/x/sys/unix/gccgo_linux_sparc64.go b/vendor/golang.org/x/sys/unix/gccgo_linux_sparc64.go
new file mode 100644
index 000000000..56332692c
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/gccgo_linux_sparc64.go
@@ -0,0 +1,20 @@
+// Copyright 2016 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build gccgo,linux,sparc64
+
+package unix
+
+import "syscall"
+
+//extern sysconf
+func realSysconf(name int) int64
+
+func sysconf(name int) (n int64, err syscall.Errno) {
+ r := realSysconf(name)
+ if r < 0 {
+ return 0, syscall.GetErrno()
+ }
+ return r, 0
+}
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/mkall.sh b/vendor/golang.org/x/sys/unix/mkall.sh
index 3e224c57e..2a1473f16 100755
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/mkall.sh
+++ b/vendor/golang.org/x/sys/unix/mkall.sh
@@ -223,6 +223,13 @@ linux_s390x)
# package generates its version of the types file.
mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
;;
+linux_sparc64)
+ GOOSARCH_in=syscall_linux_sparc64.go
+ unistd_h=/usr/include/sparc64-linux-gnu/asm/unistd.h
+ mkerrors="$mkerrors -m64"
+ mksysnum="./mksysnum_linux.pl $unistd_h"
+ mktypes="GOARCH=$GOARCH go tool cgo -godefs"
+ ;;
netbsd_386)
mkerrors="$mkerrors -m32"
mksyscall="./mksyscall.pl -l32 -netbsd"
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh
index c40d788c4..33b7922bd 100755
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/mkerrors.sh
+++ b/vendor/golang.org/x/sys/unix/mkerrors.sh
@@ -127,6 +127,7 @@ includes_Linux='
#include <linux/sched.h>
#include <linux/wait.h>
#include <linux/icmpv6.h>
+#include <linux/serial.h>
#include <net/route.h>
#include <asm/termbits.h>
@@ -141,6 +142,12 @@ includes_Linux='
#ifndef PTRACE_SETREGS
#define PTRACE_SETREGS 0xd
#endif
+
+#ifdef SOL_BLUETOOTH
+// SPARC includes this in /usr/include/sparc64-linux-gnu/bits/socket.h
+// but it is already in bluetooth_linux.go
+#undef SOL_BLUETOOTH
+#endif
'
includes_NetBSD='
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/mkpost.go b/vendor/golang.org/x/sys/unix/mkpost.go
index ed50d902a..ed50d902a 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/mkpost.go
+++ b/vendor/golang.org/x/sys/unix/mkpost.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/mksyscall.pl b/vendor/golang.org/x/sys/unix/mksyscall.pl
index b1e7766da..b1e7766da 100755
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/mksyscall.pl
+++ b/vendor/golang.org/x/sys/unix/mksyscall.pl
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/mksyscall_solaris.pl b/vendor/golang.org/x/sys/unix/mksyscall_solaris.pl
index 06bade768..06bade768 100755
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/mksyscall_solaris.pl
+++ b/vendor/golang.org/x/sys/unix/mksyscall_solaris.pl
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/mksysctl_openbsd.pl b/vendor/golang.org/x/sys/unix/mksysctl_openbsd.pl
index be67afa41..be67afa41 100755
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/mksysctl_openbsd.pl
+++ b/vendor/golang.org/x/sys/unix/mksysctl_openbsd.pl
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/mksysnum_darwin.pl b/vendor/golang.org/x/sys/unix/mksysnum_darwin.pl
index d3e5147fc..d3e5147fc 100755
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/mksysnum_darwin.pl
+++ b/vendor/golang.org/x/sys/unix/mksysnum_darwin.pl
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/mksysnum_dragonfly.pl b/vendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl
index 266a248c7..266a248c7 100755
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/mksysnum_dragonfly.pl
+++ b/vendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/mksysnum_freebsd.pl b/vendor/golang.org/x/sys/unix/mksysnum_freebsd.pl
index b767e124c..b767e124c 100755
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/mksysnum_freebsd.pl
+++ b/vendor/golang.org/x/sys/unix/mksysnum_freebsd.pl
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/mksysnum_linux.pl b/vendor/golang.org/x/sys/unix/mksysnum_linux.pl
index 4d4017deb..4d4017deb 100755
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/mksysnum_linux.pl
+++ b/vendor/golang.org/x/sys/unix/mksysnum_linux.pl
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/mksysnum_netbsd.pl b/vendor/golang.org/x/sys/unix/mksysnum_netbsd.pl
index e74616a65..e74616a65 100755
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/mksysnum_netbsd.pl
+++ b/vendor/golang.org/x/sys/unix/mksysnum_netbsd.pl
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/mksysnum_openbsd.pl b/vendor/golang.org/x/sys/unix/mksysnum_openbsd.pl
index ae5aad586..ae5aad586 100755
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/mksysnum_openbsd.pl
+++ b/vendor/golang.org/x/sys/unix/mksysnum_openbsd.pl
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/race.go b/vendor/golang.org/x/sys/unix/race.go
index 3c7627eb5..3c7627eb5 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/race.go
+++ b/vendor/golang.org/x/sys/unix/race.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/race0.go b/vendor/golang.org/x/sys/unix/race0.go
index f8678e0d2..f8678e0d2 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/race0.go
+++ b/vendor/golang.org/x/sys/unix/race0.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/sockcmsg_linux.go b/vendor/golang.org/x/sys/unix/sockcmsg_linux.go
index d9ff4731a..d9ff4731a 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/sockcmsg_linux.go
+++ b/vendor/golang.org/x/sys/unix/sockcmsg_linux.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/sockcmsg_unix.go b/vendor/golang.org/x/sys/unix/sockcmsg_unix.go
index f1493a3e6..f1493a3e6 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/sockcmsg_unix.go
+++ b/vendor/golang.org/x/sys/unix/sockcmsg_unix.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/str.go b/vendor/golang.org/x/sys/unix/str.go
index 35ed66435..35ed66435 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/str.go
+++ b/vendor/golang.org/x/sys/unix/str.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall.go b/vendor/golang.org/x/sys/unix/syscall.go
index 571e6993c..a0bcf842c 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall.go
+++ b/vendor/golang.org/x/sys/unix/syscall.go
@@ -19,7 +19,7 @@
// These calls return err == nil to indicate success; otherwise
// err represents an operating system error describing the failure and
// holds a value of type syscall.Errno.
-package unix
+package unix // import "golang.org/x/sys/unix"
import "unsafe"
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_bsd.go b/vendor/golang.org/x/sys/unix/syscall_bsd.go
index e9671764c..e9671764c 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_bsd.go
+++ b/vendor/golang.org/x/sys/unix/syscall_bsd.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_darwin.go b/vendor/golang.org/x/sys/unix/syscall_darwin.go
index 3d534d2da..3d534d2da 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_darwin.go
+++ b/vendor/golang.org/x/sys/unix/syscall_darwin.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_darwin_386.go b/vendor/golang.org/x/sys/unix/syscall_darwin_386.go
index c172a3da5..c172a3da5 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_darwin_386.go
+++ b/vendor/golang.org/x/sys/unix/syscall_darwin_386.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_darwin_amd64.go b/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go
index fc1e5a4a8..fc1e5a4a8 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_darwin_amd64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_darwin_arm.go b/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go
index d286cf408..d286cf408 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_darwin_arm.go
+++ b/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_darwin_arm64.go b/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go
index c33905cdc..c33905cdc 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_darwin_arm64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_dragonfly.go b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go
index ec408ee78..ec408ee78 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_dragonfly.go
+++ b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go
index da7cb7982..da7cb7982 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_dragonfly_amd64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_freebsd.go b/vendor/golang.org/x/sys/unix/syscall_freebsd.go
index 520ccbeaf..520ccbeaf 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_freebsd.go
+++ b/vendor/golang.org/x/sys/unix/syscall_freebsd.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_freebsd_386.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
index 6a0cd804d..6a0cd804d 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_freebsd_386.go
+++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
index e142540ef..e142540ef 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_freebsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_freebsd_arm.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
index 5504cb125..5504cb125 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_freebsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_linux.go b/vendor/golang.org/x/sys/unix/syscall_linux.go
index 6d10c9cff..cfac4a440 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_linux.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux.go
@@ -69,10 +69,10 @@ func Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error
return ppoll(&fds[0], len(fds), timeout, sigmask)
}
-//sys readlinkat(dirfd int, path string, buf []byte) (n int, err error)
+//sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
func Readlink(path string, buf []byte) (n int, err error) {
- return readlinkat(AT_FDCWD, path, buf)
+ return Readlinkat(AT_FDCWD, path, buf)
}
func Rename(oldpath string, newpath string) (err error) {
@@ -80,24 +80,20 @@ func Rename(oldpath string, newpath string) (err error) {
}
func Rmdir(path string) error {
- return unlinkat(AT_FDCWD, path, AT_REMOVEDIR)
+ return Unlinkat(AT_FDCWD, path, AT_REMOVEDIR)
}
-//sys symlinkat(oldpath string, newdirfd int, newpath string) (err error)
+//sys Symlinkat(oldpath string, newdirfd int, newpath string) (err error)
func Symlink(oldpath string, newpath string) (err error) {
- return symlinkat(oldpath, AT_FDCWD, newpath)
+ return Symlinkat(oldpath, AT_FDCWD, newpath)
}
func Unlink(path string) error {
- return unlinkat(AT_FDCWD, path, 0)
+ return Unlinkat(AT_FDCWD, path, 0)
}
-//sys unlinkat(dirfd int, path string, flags int) (err error)
-
-func Unlinkat(dirfd int, path string, flags int) error {
- return unlinkat(dirfd, path, flags)
-}
+//sys Unlinkat(dirfd int, path string, flags int) (err error)
//sys utimes(path string, times *[2]Timeval) (err error)
@@ -143,8 +139,7 @@ func UtimesNano(path string, ts []Timespec) error {
// in 2.6.22, Released, 8 July 2007) then fall back to utimes
var tv [2]Timeval
for i := 0; i < 2; i++ {
- tv[i].Sec = ts[i].Sec
- tv[i].Usec = ts[i].Nsec / 1000
+ tv[i] = NsecToTimeval(TimespecToNsec(ts[i]))
}
return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
}
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_linux_386.go b/vendor/golang.org/x/sys/unix/syscall_linux_386.go
index 2b881b979..2b881b979 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_386.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_linux_amd64.go b/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
index 18911c2d9..18911c2d9 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_linux_arm.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm.go
index 71d870228..71d870228 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_arm.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_linux_arm64.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
index 4b6ff2a80..4a136396c 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
@@ -6,8 +6,6 @@
package unix
-const _SYS_dup = SYS_DUP3
-
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT
//sys Fchown(fd int, uid int, gid int) (err error)
//sys Fstat(fd int, stat *Stat_t) (err error)
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_linux_mips64x.go b/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
index 440f54ee9..8119fde37 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_linux_mips64x.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
@@ -7,13 +7,6 @@
package unix
-// Linux introduced getdents64 syscall for N64 ABI only in 3.10
-// (May 21 2013, rev dec33abaafc89bcbd78f85fad0513170415a26d5),
-// to support older kernels, we have to use getdents for mips64.
-// Also note that struct dirent is different for these two.
-// Lookup linux_dirent{,64} in kernel source code for details.
-const _SYS_getdents = SYS_GETDENTS
-
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
//sys Fchown(fd int, uid int, gid int) (err error)
//sys Fstatfs(fd int, buf *Statfs_t) (err error)
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_linux_ppc64x.go b/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
index 60770f627..60770f627 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_linux_ppc64x.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_linux_s390x.go b/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
index 81c5f4732..81c5f4732 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go b/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
new file mode 100644
index 000000000..20b7454d7
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
@@ -0,0 +1,169 @@
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build sparc64,linux
+
+package unix
+
+import (
+ "sync/atomic"
+ "syscall"
+)
+
+//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
+//sys Dup2(oldfd int, newfd int) (err error)
+//sys Fchown(fd int, uid int, gid int) (err error)
+//sys Fstat(fd int, stat *Stat_t) (err error)
+//sys Fstatfs(fd int, buf *Statfs_t) (err error)
+//sys Ftruncate(fd int, length int64) (err error)
+//sysnb Getegid() (egid int)
+//sysnb Geteuid() (euid int)
+//sysnb Getgid() (gid int)
+//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
+//sysnb Getuid() (uid int)
+//sysnb InotifyInit() (fd int, err error)
+//sys Lchown(path string, uid int, gid int) (err error)
+//sys Listen(s int, n int) (err error)
+//sys Lstat(path string, stat *Stat_t) (err error)
+//sys Pause() (err error)
+//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
+//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
+//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
+//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
+//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
+//sys Setfsgid(gid int) (err error)
+//sys Setfsuid(uid int) (err error)
+//sysnb Setregid(rgid int, egid int) (err error)
+//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
+//sysnb Setresuid(ruid int, euid int, suid int) (err error)
+//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
+//sysnb Setreuid(ruid int, euid int) (err error)
+//sys Shutdown(fd int, how int) (err error)
+//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
+//sys Stat(path string, stat *Stat_t) (err error)
+//sys Statfs(path string, buf *Statfs_t) (err error)
+//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
+//sys Truncate(path string, length int64) (err error)
+//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
+//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
+//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
+//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
+//sysnb getgroups(n int, list *_Gid_t) (nn int, err error)
+//sysnb setgroups(n int, list *_Gid_t) (err error)
+//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
+//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
+//sysnb socket(domain int, typ int, proto int) (fd int, err error)
+//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
+//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
+//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
+//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
+//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
+//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
+//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
+//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
+
+func sysconf(name int) (n int64, err syscall.Errno)
+
+// pageSize caches the value of Getpagesize, since it can't change
+// once the system is booted.
+var pageSize int64 // accessed atomically
+
+func Getpagesize() int {
+ n := atomic.LoadInt64(&pageSize)
+ if n == 0 {
+ n, _ = sysconf(_SC_PAGESIZE)
+ atomic.StoreInt64(&pageSize, n)
+ }
+ return int(n)
+}
+
+func Ioperm(from int, num int, on int) (err error) {
+ return ENOSYS
+}
+
+func Iopl(level int) (err error) {
+ return ENOSYS
+}
+
+//sysnb Gettimeofday(tv *Timeval) (err error)
+
+func Time(t *Time_t) (tt Time_t, err error) {
+ var tv Timeval
+ err = Gettimeofday(&tv)
+ if err != nil {
+ return 0, err
+ }
+ if t != nil {
+ *t = Time_t(tv.Sec)
+ }
+ return Time_t(tv.Sec), nil
+}
+
+//sys Utime(path string, buf *Utimbuf) (err error)
+
+func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
+
+func NsecToTimespec(nsec int64) (ts Timespec) {
+ ts.Sec = nsec / 1e9
+ ts.Nsec = nsec % 1e9
+ return
+}
+
+func NsecToTimeval(nsec int64) (tv Timeval) {
+ nsec += 999 // round up to microsecond
+ tv.Sec = nsec / 1e9
+ tv.Usec = int32(nsec % 1e9 / 1e3)
+ return
+}
+
+func (r *PtraceRegs) PC() uint64 { return r.Tpc }
+
+func (r *PtraceRegs) SetPC(pc uint64) { r.Tpc = pc }
+
+func (iov *Iovec) SetLen(length int) {
+ iov.Len = uint64(length)
+}
+
+func (msghdr *Msghdr) SetControllen(length int) {
+ msghdr.Controllen = uint64(length)
+}
+
+func (cmsg *Cmsghdr) SetLen(length int) {
+ cmsg.Len = uint64(length)
+}
+
+//sysnb pipe(p *[2]_C_int) (err error)
+
+func Pipe(p []int) (err error) {
+ if len(p) != 2 {
+ return EINVAL
+ }
+ var pp [2]_C_int
+ err = pipe(&pp)
+ p[0] = int(pp[0])
+ p[1] = int(pp[1])
+ return
+}
+
+//sysnb pipe2(p *[2]_C_int, flags int) (err error)
+
+func Pipe2(p []int, flags int) (err error) {
+ if len(p) != 2 {
+ return EINVAL
+ }
+ var pp [2]_C_int
+ err = pipe2(&pp, flags)
+ p[0] = int(pp[0])
+ p[1] = int(pp[1])
+ return
+}
+
+//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
+
+func Poll(fds []PollFd, timeout int) (n int, err error) {
+ if len(fds) == 0 {
+ return poll(nil, 0, timeout)
+ }
+ return poll(&fds[0], len(fds), timeout)
+}
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_netbsd.go b/vendor/golang.org/x/sys/unix/syscall_netbsd.go
index c4e945cd6..c4e945cd6 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_netbsd.go
+++ b/vendor/golang.org/x/sys/unix/syscall_netbsd.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_netbsd_386.go b/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go
index afaca0983..afaca0983 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_netbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go
index a6ff04ce5..a6ff04ce5 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_netbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_netbsd_arm.go b/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go
index 68a6969b2..68a6969b2 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_netbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_no_getwd.go b/vendor/golang.org/x/sys/unix/syscall_no_getwd.go
index 530792ea9..530792ea9 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_no_getwd.go
+++ b/vendor/golang.org/x/sys/unix/syscall_no_getwd.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_openbsd.go b/vendor/golang.org/x/sys/unix/syscall_openbsd.go
index 554a82342..554a82342 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_openbsd.go
+++ b/vendor/golang.org/x/sys/unix/syscall_openbsd.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_openbsd_386.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go
index a66ddc59c..a66ddc59c 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_openbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go
index 0776c1faf..0776c1faf 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_openbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_solaris.go b/vendor/golang.org/x/sys/unix/syscall_solaris.go
index eb489b159..acb74b1d1 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_solaris.go
+++ b/vendor/golang.org/x/sys/unix/syscall_solaris.go
@@ -72,18 +72,20 @@ func ParseDirent(buf []byte, max int, names []string) (consumed int, count int,
return origlen - len(buf), count, names
}
-func pipe() (r uintptr, w uintptr, err uintptr)
+//sysnb pipe(p *[2]_C_int) (n int, err error)
func Pipe(p []int) (err error) {
if len(p) != 2 {
return EINVAL
}
- r0, w0, e1 := pipe()
- if e1 != 0 {
- err = syscall.Errno(e1)
+ var pp [2]_C_int
+ n, err := pipe(&pp)
+ if n != 0 {
+ return err
}
- p[0], p[1] = int(r0), int(w0)
- return
+ p[0] = int(pp[0])
+ p[1] = int(pp[1])
+ return nil
}
func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
@@ -269,24 +271,34 @@ func (w WaitStatus) StopSignal() syscall.Signal {
func (w WaitStatus) TrapCause() int { return -1 }
-func wait4(pid uintptr, wstatus *WaitStatus, options uintptr, rusage *Rusage) (wpid uintptr, err uintptr)
+//sys wait4(pid int32, statusp *_C_int, options int, rusage *Rusage) (wpid int32, err error)
-func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) {
- r0, e1 := wait4(uintptr(pid), wstatus, uintptr(options), rusage)
- if e1 != 0 {
- err = syscall.Errno(e1)
+func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (int, error) {
+ var status _C_int
+ rpid, err := wait4(int32(pid), &status, options, rusage)
+ wpid := int(rpid)
+ if wpid == -1 {
+ return wpid, err
+ }
+ if wstatus != nil {
+ *wstatus = WaitStatus(status)
}
- return int(r0), err
+ return wpid, nil
}
-func gethostname() (name string, err uintptr)
+//sys gethostname(buf []byte) (n int, err error)
func Gethostname() (name string, err error) {
- name, e1 := gethostname()
- if e1 != 0 {
- err = syscall.Errno(e1)
+ var buf [MaxHostNameLen]byte
+ n, err := gethostname(buf[:])
+ if n != 0 {
+ return "", err
}
- return name, err
+ n = clen(buf[:])
+ if n < 1 {
+ return "", EFAULT
+ }
+ return string(buf[:n]), nil
}
//sys utimes(path string, times *[2]Timeval) (err error)
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_solaris_amd64.go b/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go
index 5aff62c3b..5aff62c3b 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_solaris_amd64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_unix.go b/vendor/golang.org/x/sys/unix/syscall_unix.go
index b46b25028..b46b25028 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_unix.go
+++ b/vendor/golang.org/x/sys/unix/syscall_unix.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/types_darwin.go b/vendor/golang.org/x/sys/unix/types_darwin.go
index 115326182..115326182 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/types_darwin.go
+++ b/vendor/golang.org/x/sys/unix/types_darwin.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/types_dragonfly.go b/vendor/golang.org/x/sys/unix/types_dragonfly.go
index f3c971dff..f3c971dff 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/types_dragonfly.go
+++ b/vendor/golang.org/x/sys/unix/types_dragonfly.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/types_freebsd.go b/vendor/golang.org/x/sys/unix/types_freebsd.go
index ae24557ad..ae24557ad 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/types_freebsd.go
+++ b/vendor/golang.org/x/sys/unix/types_freebsd.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/types_linux.go b/vendor/golang.org/x/sys/unix/types_linux.go
index 7dea79a8e..de80e2c8c 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/types_linux.go
+++ b/vendor/golang.org/x/sys/unix/types_linux.go
@@ -105,6 +105,9 @@ typedef struct pt_regs PtraceRegs;
typedef struct user PtraceRegs;
#elif defined(__s390x__)
typedef struct _user_regs_struct PtraceRegs;
+#elif defined(__sparc__)
+#include <asm/ptrace.h>
+typedef struct pt_regs PtraceRegs;
#else
typedef struct user_regs_struct PtraceRegs;
#endif
@@ -126,7 +129,7 @@ struct my_epoll_event {
// padding is not specified in linux/eventpoll.h but added to conform to the
// alignment requirements of EABI
int32_t padFd;
-#elif defined(__powerpc64__) || defined(__s390x__)
+#elif defined(__powerpc64__) || defined(__s390x__) || defined(__sparc__)
int32_t _padFd;
#endif
int32_t fd;
@@ -445,6 +448,10 @@ const (
type Sigset_t C.sigset_t
+// sysconf information
+
+const _SC_PAGESIZE = C._SC_PAGESIZE
+
// Terminal handling
type Termios C.termios_t
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/types_netbsd.go b/vendor/golang.org/x/sys/unix/types_netbsd.go
index d15f93d19..d15f93d19 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/types_netbsd.go
+++ b/vendor/golang.org/x/sys/unix/types_netbsd.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/types_openbsd.go b/vendor/golang.org/x/sys/unix/types_openbsd.go
index b66fe25f7..b66fe25f7 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/types_openbsd.go
+++ b/vendor/golang.org/x/sys/unix/types_openbsd.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/types_solaris.go b/vendor/golang.org/x/sys/unix/types_solaris.go
index 6ad50eaba..c5d5c8f16 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/types_solaris.go
+++ b/vendor/golang.org/x/sys/unix/types_solaris.go
@@ -22,6 +22,7 @@ package unix
#define __USE_LEGACY_PROTOTYPES__ // iovec
#include <dirent.h>
#include <fcntl.h>
+#include <netdb.h>
#include <limits.h>
#include <signal.h>
#include <termios.h>
@@ -81,6 +82,7 @@ const (
sizeofLong = C.sizeof_long
sizeofLongLong = C.sizeof_longlong
PathMax = C.PATH_MAX
+ MaxHostNameLen = C.MAXHOSTNAMELEN
)
// Basic types
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_darwin_386.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_386.go
index 8e6388835..8e6388835 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_darwin_386.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_386.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
index 9594f9381..9594f9381 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_darwin_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_darwin_arm.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go
index a410e88ed..a410e88ed 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_darwin_arm.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
index 3189c6b34..3189c6b34 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_darwin_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go
index 0feceee15..0feceee15 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_freebsd_386.go b/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go
index 7b95751c3..7b95751c3 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_freebsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go
index e48e7799a..e48e7799a 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_freebsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_freebsd_arm.go b/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go
index 2afbe2d5e..2afbe2d5e 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_freebsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_linux_386.go b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
index 8f920124b..8f920124b 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_linux_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
index 49b6c3546..49b6c3546 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_linux_arm.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
index f036758f9..f036758f9 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_linux_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
index 16dcbc9cb..16dcbc9cb 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_linux_mips64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
index 36535b242..36535b242 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_linux_mips64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
index 112f05de5..112f05de5 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_linux_mips64le.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
index 8b42ca2fe..8b42ca2fe 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_linux_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
index e8d12b5d6..e8d12b5d6 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_linux_s390x.go b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
index 329f25e7c..329f25e7c 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
new file mode 100644
index 000000000..766d1e612
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
@@ -0,0 +1,2077 @@
+// mkerrors.sh -m64
+// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
+
+// +build sparc64,linux
+
+// Created by cgo -godefs - DO NOT EDIT
+// cgo -godefs -- -m64 _const.go
+
+package unix
+
+import "syscall"
+
+const (
+ AF_ALG = 0x26
+ AF_APPLETALK = 0x5
+ AF_ASH = 0x12
+ AF_ATMPVC = 0x8
+ AF_ATMSVC = 0x14
+ AF_AX25 = 0x3
+ AF_BLUETOOTH = 0x1f
+ AF_BRIDGE = 0x7
+ AF_CAIF = 0x25
+ AF_CAN = 0x1d
+ AF_DECnet = 0xc
+ AF_ECONET = 0x13
+ AF_FILE = 0x1
+ AF_IB = 0x1b
+ AF_IEEE802154 = 0x24
+ AF_INET = 0x2
+ AF_INET6 = 0xa
+ AF_IPX = 0x4
+ AF_IRDA = 0x17
+ AF_ISDN = 0x22
+ AF_IUCV = 0x20
+ AF_KCM = 0x29
+ AF_KEY = 0xf
+ AF_LLC = 0x1a
+ AF_LOCAL = 0x1
+ AF_MAX = 0x2a
+ AF_MPLS = 0x1c
+ AF_NETBEUI = 0xd
+ AF_NETLINK = 0x10
+ AF_NETROM = 0x6
+ AF_NFC = 0x27
+ AF_PACKET = 0x11
+ AF_PHONET = 0x23
+ AF_PPPOX = 0x18
+ AF_RDS = 0x15
+ AF_ROSE = 0xb
+ AF_ROUTE = 0x10
+ AF_RXRPC = 0x21
+ AF_SECURITY = 0xe
+ AF_SNA = 0x16
+ AF_TIPC = 0x1e
+ AF_UNIX = 0x1
+ AF_UNSPEC = 0x0
+ AF_VSOCK = 0x28
+ AF_WANPIPE = 0x19
+ AF_X25 = 0x9
+ ARPHRD_6LOWPAN = 0x339
+ ARPHRD_ADAPT = 0x108
+ ARPHRD_APPLETLK = 0x8
+ ARPHRD_ARCNET = 0x7
+ ARPHRD_ASH = 0x30d
+ ARPHRD_ATM = 0x13
+ ARPHRD_AX25 = 0x3
+ ARPHRD_BIF = 0x307
+ ARPHRD_CAIF = 0x336
+ ARPHRD_CAN = 0x118
+ ARPHRD_CHAOS = 0x5
+ ARPHRD_CISCO = 0x201
+ ARPHRD_CSLIP = 0x101
+ ARPHRD_CSLIP6 = 0x103
+ ARPHRD_DDCMP = 0x205
+ ARPHRD_DLCI = 0xf
+ ARPHRD_ECONET = 0x30e
+ ARPHRD_EETHER = 0x2
+ ARPHRD_ETHER = 0x1
+ ARPHRD_EUI64 = 0x1b
+ ARPHRD_FCAL = 0x311
+ ARPHRD_FCFABRIC = 0x313
+ ARPHRD_FCPL = 0x312
+ ARPHRD_FCPP = 0x310
+ ARPHRD_FDDI = 0x306
+ ARPHRD_FRAD = 0x302
+ ARPHRD_HDLC = 0x201
+ ARPHRD_HIPPI = 0x30c
+ ARPHRD_HWX25 = 0x110
+ ARPHRD_IEEE1394 = 0x18
+ ARPHRD_IEEE802 = 0x6
+ ARPHRD_IEEE80211 = 0x321
+ ARPHRD_IEEE80211_PRISM = 0x322
+ ARPHRD_IEEE80211_RADIOTAP = 0x323
+ ARPHRD_IEEE802154 = 0x324
+ ARPHRD_IEEE802154_MONITOR = 0x325
+ ARPHRD_IEEE802_TR = 0x320
+ ARPHRD_INFINIBAND = 0x20
+ ARPHRD_IP6GRE = 0x337
+ ARPHRD_IPDDP = 0x309
+ ARPHRD_IPGRE = 0x30a
+ ARPHRD_IRDA = 0x30f
+ ARPHRD_LAPB = 0x204
+ ARPHRD_LOCALTLK = 0x305
+ ARPHRD_LOOPBACK = 0x304
+ ARPHRD_METRICOM = 0x17
+ ARPHRD_NETLINK = 0x338
+ ARPHRD_NETROM = 0x0
+ ARPHRD_NONE = 0xfffe
+ ARPHRD_PHONET = 0x334
+ ARPHRD_PHONET_PIPE = 0x335
+ ARPHRD_PIMREG = 0x30b
+ ARPHRD_PPP = 0x200
+ ARPHRD_PRONET = 0x4
+ ARPHRD_RAWHDLC = 0x206
+ ARPHRD_ROSE = 0x10e
+ ARPHRD_RSRVD = 0x104
+ ARPHRD_SIT = 0x308
+ ARPHRD_SKIP = 0x303
+ ARPHRD_SLIP = 0x100
+ ARPHRD_SLIP6 = 0x102
+ ARPHRD_TUNNEL = 0x300
+ ARPHRD_TUNNEL6 = 0x301
+ ARPHRD_VOID = 0xffff
+ ARPHRD_X25 = 0x10f
+ ASI_LEON_DFLUSH = 0x11
+ ASI_LEON_IFLUSH = 0x10
+ ASI_LEON_MMUFLUSH = 0x18
+ B0 = 0x0
+ B1000000 = 0x100c
+ B110 = 0x3
+ B115200 = 0x1002
+ B1152000 = 0x100d
+ B1200 = 0x9
+ B134 = 0x4
+ B150 = 0x5
+ B1500000 = 0x100e
+ B153600 = 0x1006
+ B1800 = 0xa
+ B19200 = 0xe
+ B200 = 0x6
+ B2000000 = 0x100f
+ B230400 = 0x1003
+ B2400 = 0xb
+ B300 = 0x7
+ B307200 = 0x1007
+ B38400 = 0xf
+ B460800 = 0x1004
+ B4800 = 0xc
+ B50 = 0x1
+ B500000 = 0x100a
+ B57600 = 0x1001
+ B576000 = 0x100b
+ B600 = 0x8
+ B614400 = 0x1008
+ B75 = 0x2
+ B76800 = 0x1005
+ B921600 = 0x1009
+ B9600 = 0xd
+ BOTHER = 0x1000
+ BPF_A = 0x10
+ BPF_ABS = 0x20
+ BPF_ADD = 0x0
+ BPF_ALU = 0x4
+ BPF_AND = 0x50
+ BPF_B = 0x10
+ BPF_DIV = 0x30
+ BPF_H = 0x8
+ BPF_IMM = 0x0
+ BPF_IND = 0x40
+ BPF_JA = 0x0
+ BPF_JEQ = 0x10
+ BPF_JGE = 0x30
+ BPF_JGT = 0x20
+ BPF_JMP = 0x5
+ BPF_JSET = 0x40
+ BPF_K = 0x0
+ BPF_LD = 0x0
+ BPF_LDX = 0x1
+ BPF_LEN = 0x80
+ BPF_LL_OFF = -0x200000
+ BPF_LSH = 0x60
+ BPF_MAJOR_VERSION = 0x1
+ BPF_MAXINSNS = 0x1000
+ BPF_MEM = 0x60
+ BPF_MEMWORDS = 0x10
+ BPF_MINOR_VERSION = 0x1
+ BPF_MISC = 0x7
+ BPF_MOD = 0x90
+ BPF_MSH = 0xa0
+ BPF_MUL = 0x20
+ BPF_NEG = 0x80
+ BPF_NET_OFF = -0x100000
+ BPF_OR = 0x40
+ BPF_RET = 0x6
+ BPF_RSH = 0x70
+ BPF_ST = 0x2
+ BPF_STX = 0x3
+ BPF_SUB = 0x10
+ BPF_TAX = 0x0
+ BPF_TXA = 0x80
+ BPF_W = 0x0
+ BPF_X = 0x8
+ BPF_XOR = 0xa0
+ BRKINT = 0x2
+ BS0 = 0x0
+ BS1 = 0x2000
+ BSDLY = 0x2000
+ CBAUD = 0x100f
+ CBAUDEX = 0x1000
+ CFLUSH = 0xf
+ CIBAUD = 0x100f0000
+ CLOCAL = 0x800
+ CLOCK_BOOTTIME = 0x7
+ CLOCK_BOOTTIME_ALARM = 0x9
+ CLOCK_DEFAULT = 0x0
+ CLOCK_EXT = 0x1
+ CLOCK_INT = 0x2
+ CLOCK_MONOTONIC = 0x1
+ CLOCK_MONOTONIC_COARSE = 0x6
+ CLOCK_MONOTONIC_RAW = 0x4
+ CLOCK_PROCESS_CPUTIME_ID = 0x2
+ CLOCK_REALTIME = 0x0
+ CLOCK_REALTIME_ALARM = 0x8
+ CLOCK_REALTIME_COARSE = 0x5
+ CLOCK_TAI = 0xb
+ CLOCK_THREAD_CPUTIME_ID = 0x3
+ CLOCK_TXFROMRX = 0x4
+ CLOCK_TXINT = 0x3
+ CLONE_CHILD_CLEARTID = 0x200000
+ CLONE_CHILD_SETTID = 0x1000000
+ CLONE_DETACHED = 0x400000
+ CLONE_FILES = 0x400
+ CLONE_FS = 0x200
+ CLONE_IO = 0x80000000
+ CLONE_NEWCGROUP = 0x2000000
+ CLONE_NEWIPC = 0x8000000
+ CLONE_NEWNET = 0x40000000
+ CLONE_NEWNS = 0x20000
+ CLONE_NEWPID = 0x20000000
+ CLONE_NEWUSER = 0x10000000
+ CLONE_NEWUTS = 0x4000000
+ CLONE_PARENT = 0x8000
+ CLONE_PARENT_SETTID = 0x100000
+ CLONE_PTRACE = 0x2000
+ CLONE_SETTLS = 0x80000
+ CLONE_SIGHAND = 0x800
+ CLONE_SYSVSEM = 0x40000
+ CLONE_THREAD = 0x10000
+ CLONE_UNTRACED = 0x800000
+ CLONE_VFORK = 0x4000
+ CLONE_VM = 0x100
+ CMSPAR = 0x40000000
+ CR0 = 0x0
+ CR1 = 0x200
+ CR2 = 0x400
+ CR3 = 0x600
+ CRDLY = 0x600
+ CREAD = 0x80
+ CRTSCTS = 0x80000000
+ CS5 = 0x0
+ CS6 = 0x10
+ CS7 = 0x20
+ CS8 = 0x30
+ CSIGNAL = 0xff
+ CSIZE = 0x30
+ CSTART = 0x11
+ CSTATUS = 0x0
+ CSTOP = 0x13
+ CSTOPB = 0x40
+ CSUSP = 0x1a
+ DT_BLK = 0x6
+ DT_CHR = 0x2
+ DT_DIR = 0x4
+ DT_FIFO = 0x1
+ DT_LNK = 0xa
+ DT_REG = 0x8
+ DT_SOCK = 0xc
+ DT_UNKNOWN = 0x0
+ DT_WHT = 0xe
+ ECHO = 0x8
+ ECHOCTL = 0x200
+ ECHOE = 0x10
+ ECHOK = 0x20
+ ECHOKE = 0x800
+ ECHONL = 0x40
+ ECHOPRT = 0x400
+ EMT_TAGOVF = 0x1
+ ENCODING_DEFAULT = 0x0
+ ENCODING_FM_MARK = 0x3
+ ENCODING_FM_SPACE = 0x4
+ ENCODING_MANCHESTER = 0x5
+ ENCODING_NRZ = 0x1
+ ENCODING_NRZI = 0x2
+ EPOLLERR = 0x8
+ EPOLLET = 0x80000000
+ EPOLLEXCLUSIVE = 0x10000000
+ EPOLLHUP = 0x10
+ EPOLLIN = 0x1
+ EPOLLMSG = 0x400
+ EPOLLONESHOT = 0x40000000
+ EPOLLOUT = 0x4
+ EPOLLPRI = 0x2
+ EPOLLRDBAND = 0x80
+ EPOLLRDHUP = 0x2000
+ EPOLLRDNORM = 0x40
+ EPOLLWAKEUP = 0x20000000
+ EPOLLWRBAND = 0x200
+ EPOLLWRNORM = 0x100
+ EPOLL_CLOEXEC = 0x400000
+ EPOLL_CTL_ADD = 0x1
+ EPOLL_CTL_DEL = 0x2
+ EPOLL_CTL_MOD = 0x3
+ ETH_P_1588 = 0x88f7
+ ETH_P_8021AD = 0x88a8
+ ETH_P_8021AH = 0x88e7
+ ETH_P_8021Q = 0x8100
+ ETH_P_80221 = 0x8917
+ ETH_P_802_2 = 0x4
+ ETH_P_802_3 = 0x1
+ ETH_P_802_3_MIN = 0x600
+ ETH_P_802_EX1 = 0x88b5
+ ETH_P_AARP = 0x80f3
+ ETH_P_AF_IUCV = 0xfbfb
+ ETH_P_ALL = 0x3
+ ETH_P_AOE = 0x88a2
+ ETH_P_ARCNET = 0x1a
+ ETH_P_ARP = 0x806
+ ETH_P_ATALK = 0x809b
+ ETH_P_ATMFATE = 0x8884
+ ETH_P_ATMMPOA = 0x884c
+ ETH_P_AX25 = 0x2
+ ETH_P_BATMAN = 0x4305
+ ETH_P_BPQ = 0x8ff
+ ETH_P_CAIF = 0xf7
+ ETH_P_CAN = 0xc
+ ETH_P_CANFD = 0xd
+ ETH_P_CONTROL = 0x16
+ ETH_P_CUST = 0x6006
+ ETH_P_DDCMP = 0x6
+ ETH_P_DEC = 0x6000
+ ETH_P_DIAG = 0x6005
+ ETH_P_DNA_DL = 0x6001
+ ETH_P_DNA_RC = 0x6002
+ ETH_P_DNA_RT = 0x6003
+ ETH_P_DSA = 0x1b
+ ETH_P_ECONET = 0x18
+ ETH_P_EDSA = 0xdada
+ ETH_P_FCOE = 0x8906
+ ETH_P_FIP = 0x8914
+ ETH_P_HDLC = 0x19
+ ETH_P_HSR = 0x892f
+ ETH_P_IEEE802154 = 0xf6
+ ETH_P_IEEEPUP = 0xa00
+ ETH_P_IEEEPUPAT = 0xa01
+ ETH_P_IP = 0x800
+ ETH_P_IPV6 = 0x86dd
+ ETH_P_IPX = 0x8137
+ ETH_P_IRDA = 0x17
+ ETH_P_LAT = 0x6004
+ ETH_P_LINK_CTL = 0x886c
+ ETH_P_LOCALTALK = 0x9
+ ETH_P_LOOP = 0x60
+ ETH_P_LOOPBACK = 0x9000
+ ETH_P_MACSEC = 0x88e5
+ ETH_P_MOBITEX = 0x15
+ ETH_P_MPLS_MC = 0x8848
+ ETH_P_MPLS_UC = 0x8847
+ ETH_P_MVRP = 0x88f5
+ ETH_P_PAE = 0x888e
+ ETH_P_PAUSE = 0x8808
+ ETH_P_PHONET = 0xf5
+ ETH_P_PPPTALK = 0x10
+ ETH_P_PPP_DISC = 0x8863
+ ETH_P_PPP_MP = 0x8
+ ETH_P_PPP_SES = 0x8864
+ ETH_P_PRP = 0x88fb
+ ETH_P_PUP = 0x200
+ ETH_P_PUPAT = 0x201
+ ETH_P_QINQ1 = 0x9100
+ ETH_P_QINQ2 = 0x9200
+ ETH_P_QINQ3 = 0x9300
+ ETH_P_RARP = 0x8035
+ ETH_P_SCA = 0x6007
+ ETH_P_SLOW = 0x8809
+ ETH_P_SNAP = 0x5
+ ETH_P_TDLS = 0x890d
+ ETH_P_TEB = 0x6558
+ ETH_P_TIPC = 0x88ca
+ ETH_P_TRAILER = 0x1c
+ ETH_P_TR_802_2 = 0x11
+ ETH_P_TSN = 0x22f0
+ ETH_P_WAN_PPP = 0x7
+ ETH_P_WCCP = 0x883e
+ ETH_P_X25 = 0x805
+ ETH_P_XDSA = 0xf8
+ EXTA = 0xe
+ EXTB = 0xf
+ EXTPROC = 0x10000
+ FD_CLOEXEC = 0x1
+ FD_SETSIZE = 0x400
+ FF0 = 0x0
+ FF1 = 0x8000
+ FFDLY = 0x8000
+ FLUSHO = 0x2000
+ F_DUPFD = 0x0
+ F_DUPFD_CLOEXEC = 0x406
+ F_EXLCK = 0x4
+ F_GETFD = 0x1
+ F_GETFL = 0x3
+ F_GETLEASE = 0x401
+ F_GETLK = 0x7
+ F_GETLK64 = 0x7
+ F_GETOWN = 0x5
+ F_GETOWN_EX = 0x10
+ F_GETPIPE_SZ = 0x408
+ F_GETSIG = 0xb
+ F_LOCK = 0x1
+ F_NOTIFY = 0x402
+ F_OFD_GETLK = 0x24
+ F_OFD_SETLK = 0x25
+ F_OFD_SETLKW = 0x26
+ F_OK = 0x0
+ F_RDLCK = 0x1
+ F_SETFD = 0x2
+ F_SETFL = 0x4
+ F_SETLEASE = 0x400
+ F_SETLK = 0x8
+ F_SETLK64 = 0x8
+ F_SETLKW = 0x9
+ F_SETLKW64 = 0x9
+ F_SETOWN = 0x6
+ F_SETOWN_EX = 0xf
+ F_SETPIPE_SZ = 0x407
+ F_SETSIG = 0xa
+ F_SHLCK = 0x8
+ F_TEST = 0x3
+ F_TLOCK = 0x2
+ F_ULOCK = 0x0
+ F_UNLCK = 0x3
+ F_WRLCK = 0x2
+ HUPCL = 0x400
+ IBSHIFT = 0x10
+ ICANON = 0x2
+ ICMPV6_FILTER = 0x1
+ ICRNL = 0x100
+ IEXTEN = 0x8000
+ IFA_F_DADFAILED = 0x8
+ IFA_F_DEPRECATED = 0x20
+ IFA_F_HOMEADDRESS = 0x10
+ IFA_F_MANAGETEMPADDR = 0x100
+ IFA_F_MCAUTOJOIN = 0x400
+ IFA_F_NODAD = 0x2
+ IFA_F_NOPREFIXROUTE = 0x200
+ IFA_F_OPTIMISTIC = 0x4
+ IFA_F_PERMANENT = 0x80
+ IFA_F_SECONDARY = 0x1
+ IFA_F_STABLE_PRIVACY = 0x800
+ IFA_F_TEMPORARY = 0x1
+ IFA_F_TENTATIVE = 0x40
+ IFA_MAX = 0x8
+ IFF_ALLMULTI = 0x200
+ IFF_ATTACH_QUEUE = 0x200
+ IFF_AUTOMEDIA = 0x4000
+ IFF_BROADCAST = 0x2
+ IFF_DEBUG = 0x4
+ IFF_DETACH_QUEUE = 0x400
+ IFF_DORMANT = 0x20000
+ IFF_DYNAMIC = 0x8000
+ IFF_ECHO = 0x40000
+ IFF_LOOPBACK = 0x8
+ IFF_LOWER_UP = 0x10000
+ IFF_MASTER = 0x400
+ IFF_MULTICAST = 0x1000
+ IFF_MULTI_QUEUE = 0x100
+ IFF_NOARP = 0x80
+ IFF_NOFILTER = 0x1000
+ IFF_NOTRAILERS = 0x20
+ IFF_NO_PI = 0x1000
+ IFF_ONE_QUEUE = 0x2000
+ IFF_PERSIST = 0x800
+ IFF_POINTOPOINT = 0x10
+ IFF_PORTSEL = 0x2000
+ IFF_PROMISC = 0x100
+ IFF_RUNNING = 0x40
+ IFF_SLAVE = 0x800
+ IFF_TAP = 0x2
+ IFF_TUN = 0x1
+ IFF_TUN_EXCL = 0x8000
+ IFF_UP = 0x1
+ IFF_VNET_HDR = 0x4000
+ IFF_VOLATILE = 0x70c5a
+ IFNAMSIZ = 0x10
+ IGNBRK = 0x1
+ IGNCR = 0x80
+ IGNPAR = 0x4
+ IMAXBEL = 0x2000
+ INLCR = 0x40
+ INPCK = 0x10
+ IN_ACCESS = 0x1
+ IN_ALL_EVENTS = 0xfff
+ IN_ATTRIB = 0x4
+ IN_CLASSA_HOST = 0xffffff
+ IN_CLASSA_MAX = 0x80
+ IN_CLASSA_NET = 0xff000000
+ IN_CLASSA_NSHIFT = 0x18
+ IN_CLASSB_HOST = 0xffff
+ IN_CLASSB_MAX = 0x10000
+ IN_CLASSB_NET = 0xffff0000
+ IN_CLASSB_NSHIFT = 0x10
+ IN_CLASSC_HOST = 0xff
+ IN_CLASSC_NET = 0xffffff00
+ IN_CLASSC_NSHIFT = 0x8
+ IN_CLOEXEC = 0x400000
+ IN_CLOSE = 0x18
+ IN_CLOSE_NOWRITE = 0x10
+ IN_CLOSE_WRITE = 0x8
+ IN_CREATE = 0x100
+ IN_DELETE = 0x200
+ IN_DELETE_SELF = 0x400
+ IN_DONT_FOLLOW = 0x2000000
+ IN_EXCL_UNLINK = 0x4000000
+ IN_IGNORED = 0x8000
+ IN_ISDIR = 0x40000000
+ IN_LOOPBACKNET = 0x7f
+ IN_MASK_ADD = 0x20000000
+ IN_MODIFY = 0x2
+ IN_MOVE = 0xc0
+ IN_MOVED_FROM = 0x40
+ IN_MOVED_TO = 0x80
+ IN_MOVE_SELF = 0x800
+ IN_NONBLOCK = 0x4000
+ IN_ONESHOT = 0x80000000
+ IN_ONLYDIR = 0x1000000
+ IN_OPEN = 0x20
+ IN_Q_OVERFLOW = 0x4000
+ IN_UNMOUNT = 0x2000
+ IPPROTO_AH = 0x33
+ IPPROTO_BEETPH = 0x5e
+ IPPROTO_COMP = 0x6c
+ IPPROTO_DCCP = 0x21
+ IPPROTO_DSTOPTS = 0x3c
+ IPPROTO_EGP = 0x8
+ IPPROTO_ENCAP = 0x62
+ IPPROTO_ESP = 0x32
+ IPPROTO_FRAGMENT = 0x2c
+ IPPROTO_GRE = 0x2f
+ IPPROTO_HOPOPTS = 0x0
+ IPPROTO_ICMP = 0x1
+ IPPROTO_ICMPV6 = 0x3a
+ IPPROTO_IDP = 0x16
+ IPPROTO_IGMP = 0x2
+ IPPROTO_IP = 0x0
+ IPPROTO_IPIP = 0x4
+ IPPROTO_IPV6 = 0x29
+ IPPROTO_MH = 0x87
+ IPPROTO_MPLS = 0x89
+ IPPROTO_MTP = 0x5c
+ IPPROTO_NONE = 0x3b
+ IPPROTO_PIM = 0x67
+ IPPROTO_PUP = 0xc
+ IPPROTO_RAW = 0xff
+ IPPROTO_ROUTING = 0x2b
+ IPPROTO_RSVP = 0x2e
+ IPPROTO_SCTP = 0x84
+ IPPROTO_TCP = 0x6
+ IPPROTO_TP = 0x1d
+ IPPROTO_UDP = 0x11
+ IPPROTO_UDPLITE = 0x88
+ IPV6_2292DSTOPTS = 0x4
+ IPV6_2292HOPLIMIT = 0x8
+ IPV6_2292HOPOPTS = 0x3
+ IPV6_2292PKTINFO = 0x2
+ IPV6_2292PKTOPTIONS = 0x6
+ IPV6_2292RTHDR = 0x5
+ IPV6_ADDRFORM = 0x1
+ IPV6_ADD_MEMBERSHIP = 0x14
+ IPV6_AUTHHDR = 0xa
+ IPV6_CHECKSUM = 0x7
+ IPV6_DONTFRAG = 0x3e
+ IPV6_DROP_MEMBERSHIP = 0x15
+ IPV6_DSTOPTS = 0x3b
+ IPV6_HDRINCL = 0x24
+ IPV6_HOPLIMIT = 0x34
+ IPV6_HOPOPTS = 0x36
+ IPV6_IPSEC_POLICY = 0x22
+ IPV6_JOIN_ANYCAST = 0x1b
+ IPV6_JOIN_GROUP = 0x14
+ IPV6_LEAVE_ANYCAST = 0x1c
+ IPV6_LEAVE_GROUP = 0x15
+ IPV6_MTU = 0x18
+ IPV6_MTU_DISCOVER = 0x17
+ IPV6_MULTICAST_HOPS = 0x12
+ IPV6_MULTICAST_IF = 0x11
+ IPV6_MULTICAST_LOOP = 0x13
+ IPV6_NEXTHOP = 0x9
+ IPV6_PATHMTU = 0x3d
+ IPV6_PKTINFO = 0x32
+ IPV6_PMTUDISC_DO = 0x2
+ IPV6_PMTUDISC_DONT = 0x0
+ IPV6_PMTUDISC_INTERFACE = 0x4
+ IPV6_PMTUDISC_OMIT = 0x5
+ IPV6_PMTUDISC_PROBE = 0x3
+ IPV6_PMTUDISC_WANT = 0x1
+ IPV6_RECVDSTOPTS = 0x3a
+ IPV6_RECVERR = 0x19
+ IPV6_RECVHOPLIMIT = 0x33
+ IPV6_RECVHOPOPTS = 0x35
+ IPV6_RECVPATHMTU = 0x3c
+ IPV6_RECVPKTINFO = 0x31
+ IPV6_RECVRTHDR = 0x38
+ IPV6_RECVTCLASS = 0x42
+ IPV6_ROUTER_ALERT = 0x16
+ IPV6_RTHDR = 0x39
+ IPV6_RTHDRDSTOPTS = 0x37
+ IPV6_RTHDR_LOOSE = 0x0
+ IPV6_RTHDR_STRICT = 0x1
+ IPV6_RTHDR_TYPE_0 = 0x0
+ IPV6_RXDSTOPTS = 0x3b
+ IPV6_RXHOPOPTS = 0x36
+ IPV6_TCLASS = 0x43
+ IPV6_UNICAST_HOPS = 0x10
+ IPV6_V6ONLY = 0x1a
+ IPV6_XFRM_POLICY = 0x23
+ IP_ADD_MEMBERSHIP = 0x23
+ IP_ADD_SOURCE_MEMBERSHIP = 0x27
+ IP_BIND_ADDRESS_NO_PORT = 0x18
+ IP_BLOCK_SOURCE = 0x26
+ IP_CHECKSUM = 0x17
+ IP_DEFAULT_MULTICAST_LOOP = 0x1
+ IP_DEFAULT_MULTICAST_TTL = 0x1
+ IP_DF = 0x4000
+ IP_DROP_MEMBERSHIP = 0x24
+ IP_DROP_SOURCE_MEMBERSHIP = 0x28
+ IP_FREEBIND = 0xf
+ IP_HDRINCL = 0x3
+ IP_IPSEC_POLICY = 0x10
+ IP_MAXPACKET = 0xffff
+ IP_MAX_MEMBERSHIPS = 0x14
+ IP_MF = 0x2000
+ IP_MINTTL = 0x15
+ IP_MSFILTER = 0x29
+ IP_MSS = 0x240
+ IP_MTU = 0xe
+ IP_MTU_DISCOVER = 0xa
+ IP_MULTICAST_ALL = 0x31
+ IP_MULTICAST_IF = 0x20
+ IP_MULTICAST_LOOP = 0x22
+ IP_MULTICAST_TTL = 0x21
+ IP_NODEFRAG = 0x16
+ IP_OFFMASK = 0x1fff
+ IP_OPTIONS = 0x4
+ IP_ORIGDSTADDR = 0x14
+ IP_PASSSEC = 0x12
+ IP_PKTINFO = 0x8
+ IP_PKTOPTIONS = 0x9
+ IP_PMTUDISC = 0xa
+ IP_PMTUDISC_DO = 0x2
+ IP_PMTUDISC_DONT = 0x0
+ IP_PMTUDISC_INTERFACE = 0x4
+ IP_PMTUDISC_OMIT = 0x5
+ IP_PMTUDISC_PROBE = 0x3
+ IP_PMTUDISC_WANT = 0x1
+ IP_RECVERR = 0xb
+ IP_RECVOPTS = 0x6
+ IP_RECVORIGDSTADDR = 0x14
+ IP_RECVRETOPTS = 0x7
+ IP_RECVTOS = 0xd
+ IP_RECVTTL = 0xc
+ IP_RETOPTS = 0x7
+ IP_RF = 0x8000
+ IP_ROUTER_ALERT = 0x5
+ IP_TOS = 0x1
+ IP_TRANSPARENT = 0x13
+ IP_TTL = 0x2
+ IP_UNBLOCK_SOURCE = 0x25
+ IP_UNICAST_IF = 0x32
+ IP_XFRM_POLICY = 0x11
+ ISIG = 0x1
+ ISTRIP = 0x20
+ IUCLC = 0x200
+ IUTF8 = 0x4000
+ IXANY = 0x800
+ IXOFF = 0x1000
+ IXON = 0x400
+ LINUX_REBOOT_CMD_CAD_OFF = 0x0
+ LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
+ LINUX_REBOOT_CMD_HALT = 0xcdef0123
+ LINUX_REBOOT_CMD_KEXEC = 0x45584543
+ LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
+ LINUX_REBOOT_CMD_RESTART = 0x1234567
+ LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
+ LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
+ LINUX_REBOOT_MAGIC1 = 0xfee1dead
+ LINUX_REBOOT_MAGIC2 = 0x28121969
+ LOCK_EX = 0x2
+ LOCK_NB = 0x4
+ LOCK_SH = 0x1
+ LOCK_UN = 0x8
+ MADV_DODUMP = 0x11
+ MADV_DOFORK = 0xb
+ MADV_DONTDUMP = 0x10
+ MADV_DONTFORK = 0xa
+ MADV_DONTNEED = 0x4
+ MADV_FREE = 0x8
+ MADV_HUGEPAGE = 0xe
+ MADV_HWPOISON = 0x64
+ MADV_MERGEABLE = 0xc
+ MADV_NOHUGEPAGE = 0xf
+ MADV_NORMAL = 0x0
+ MADV_RANDOM = 0x1
+ MADV_REMOVE = 0x9
+ MADV_SEQUENTIAL = 0x2
+ MADV_UNMERGEABLE = 0xd
+ MADV_WILLNEED = 0x3
+ MAP_ANON = 0x20
+ MAP_ANONYMOUS = 0x20
+ MAP_DENYWRITE = 0x800
+ MAP_EXECUTABLE = 0x1000
+ MAP_FILE = 0x0
+ MAP_FIXED = 0x10
+ MAP_GROWSDOWN = 0x200
+ MAP_HUGETLB = 0x40000
+ MAP_HUGE_MASK = 0x3f
+ MAP_HUGE_SHIFT = 0x1a
+ MAP_LOCKED = 0x100
+ MAP_NONBLOCK = 0x10000
+ MAP_NORESERVE = 0x40
+ MAP_POPULATE = 0x8000
+ MAP_PRIVATE = 0x2
+ MAP_RENAME = 0x20
+ MAP_SHARED = 0x1
+ MAP_STACK = 0x20000
+ MAP_TYPE = 0xf
+ MCL_CURRENT = 0x2000
+ MCL_FUTURE = 0x4000
+ MCL_ONFAULT = 0x8000
+ MNT_DETACH = 0x2
+ MNT_EXPIRE = 0x4
+ MNT_FORCE = 0x1
+ MSG_BATCH = 0x40000
+ MSG_CMSG_CLOEXEC = 0x40000000
+ MSG_CONFIRM = 0x800
+ MSG_CTRUNC = 0x8
+ MSG_DONTROUTE = 0x4
+ MSG_DONTWAIT = 0x40
+ MSG_EOR = 0x80
+ MSG_ERRQUEUE = 0x2000
+ MSG_FASTOPEN = 0x20000000
+ MSG_FIN = 0x200
+ MSG_MORE = 0x8000
+ MSG_NOSIGNAL = 0x4000
+ MSG_OOB = 0x1
+ MSG_PEEK = 0x2
+ MSG_PROXY = 0x10
+ MSG_RST = 0x1000
+ MSG_SYN = 0x400
+ MSG_TRUNC = 0x20
+ MSG_TRYHARD = 0x4
+ MSG_WAITALL = 0x100
+ MSG_WAITFORONE = 0x10000
+ MS_ACTIVE = 0x40000000
+ MS_ASYNC = 0x1
+ MS_BIND = 0x1000
+ MS_DIRSYNC = 0x80
+ MS_INVALIDATE = 0x2
+ MS_I_VERSION = 0x800000
+ MS_KERNMOUNT = 0x400000
+ MS_LAZYTIME = 0x2000000
+ MS_MANDLOCK = 0x40
+ MS_MGC_MSK = 0xffff0000
+ MS_MGC_VAL = 0xc0ed0000
+ MS_MOVE = 0x2000
+ MS_NOATIME = 0x400
+ MS_NODEV = 0x4
+ MS_NODIRATIME = 0x800
+ MS_NOEXEC = 0x8
+ MS_NOSUID = 0x2
+ MS_NOUSER = -0x80000000
+ MS_POSIXACL = 0x10000
+ MS_PRIVATE = 0x40000
+ MS_RDONLY = 0x1
+ MS_REC = 0x4000
+ MS_RELATIME = 0x200000
+ MS_REMOUNT = 0x20
+ MS_RMT_MASK = 0x2800051
+ MS_SHARED = 0x100000
+ MS_SILENT = 0x8000
+ MS_SLAVE = 0x80000
+ MS_STRICTATIME = 0x1000000
+ MS_SYNC = 0x4
+ MS_SYNCHRONOUS = 0x10
+ MS_UNBINDABLE = 0x20000
+ NAME_MAX = 0xff
+ NETLINK_ADD_MEMBERSHIP = 0x1
+ NETLINK_AUDIT = 0x9
+ NETLINK_BROADCAST_ERROR = 0x4
+ NETLINK_CAP_ACK = 0xa
+ NETLINK_CONNECTOR = 0xb
+ NETLINK_CRYPTO = 0x15
+ NETLINK_DNRTMSG = 0xe
+ NETLINK_DROP_MEMBERSHIP = 0x2
+ NETLINK_ECRYPTFS = 0x13
+ NETLINK_FIB_LOOKUP = 0xa
+ NETLINK_FIREWALL = 0x3
+ NETLINK_GENERIC = 0x10
+ NETLINK_INET_DIAG = 0x4
+ NETLINK_IP6_FW = 0xd
+ NETLINK_ISCSI = 0x8
+ NETLINK_KOBJECT_UEVENT = 0xf
+ NETLINK_LISTEN_ALL_NSID = 0x8
+ NETLINK_LIST_MEMBERSHIPS = 0x9
+ NETLINK_NETFILTER = 0xc
+ NETLINK_NFLOG = 0x5
+ NETLINK_NO_ENOBUFS = 0x5
+ NETLINK_PKTINFO = 0x3
+ NETLINK_RDMA = 0x14
+ NETLINK_ROUTE = 0x0
+ NETLINK_RX_RING = 0x6
+ NETLINK_SCSITRANSPORT = 0x12
+ NETLINK_SELINUX = 0x7
+ NETLINK_SOCK_DIAG = 0x4
+ NETLINK_TX_RING = 0x7
+ NETLINK_UNUSED = 0x1
+ NETLINK_USERSOCK = 0x2
+ NETLINK_XFRM = 0x6
+ NL0 = 0x0
+ NL1 = 0x100
+ NLA_ALIGNTO = 0x4
+ NLA_F_NESTED = 0x8000
+ NLA_F_NET_BYTEORDER = 0x4000
+ NLA_HDRLEN = 0x4
+ NLDLY = 0x100
+ NLMSG_ALIGNTO = 0x4
+ NLMSG_DONE = 0x3
+ NLMSG_ERROR = 0x2
+ NLMSG_HDRLEN = 0x10
+ NLMSG_MIN_TYPE = 0x10
+ NLMSG_NOOP = 0x1
+ NLMSG_OVERRUN = 0x4
+ NLM_F_ACK = 0x4
+ NLM_F_APPEND = 0x800
+ NLM_F_ATOMIC = 0x400
+ NLM_F_CREATE = 0x400
+ NLM_F_DUMP = 0x300
+ NLM_F_DUMP_FILTERED = 0x20
+ NLM_F_DUMP_INTR = 0x10
+ NLM_F_ECHO = 0x8
+ NLM_F_EXCL = 0x200
+ NLM_F_MATCH = 0x200
+ NLM_F_MULTI = 0x2
+ NLM_F_REPLACE = 0x100
+ NLM_F_REQUEST = 0x1
+ NLM_F_ROOT = 0x100
+ NOFLSH = 0x80
+ OCRNL = 0x8
+ OFDEL = 0x80
+ OFILL = 0x40
+ OLCUC = 0x2
+ ONLCR = 0x4
+ ONLRET = 0x20
+ ONOCR = 0x10
+ OPOST = 0x1
+ O_ACCMODE = 0x3
+ O_APPEND = 0x8
+ O_ASYNC = 0x40
+ O_CLOEXEC = 0x400000
+ O_CREAT = 0x200
+ O_DIRECT = 0x100000
+ O_DIRECTORY = 0x10000
+ O_DSYNC = 0x2000
+ O_EXCL = 0x800
+ O_FSYNC = 0x802000
+ O_LARGEFILE = 0x0
+ O_NDELAY = 0x4004
+ O_NOATIME = 0x200000
+ O_NOCTTY = 0x8000
+ O_NOFOLLOW = 0x20000
+ O_NONBLOCK = 0x4000
+ O_PATH = 0x1000000
+ O_RDONLY = 0x0
+ O_RDWR = 0x2
+ O_RSYNC = 0x802000
+ O_SYNC = 0x802000
+ O_TMPFILE = 0x2010000
+ O_TRUNC = 0x400
+ O_WRONLY = 0x1
+ PACKET_ADD_MEMBERSHIP = 0x1
+ PACKET_AUXDATA = 0x8
+ PACKET_BROADCAST = 0x1
+ PACKET_COPY_THRESH = 0x7
+ PACKET_DROP_MEMBERSHIP = 0x2
+ PACKET_FANOUT = 0x12
+ PACKET_FANOUT_CBPF = 0x6
+ PACKET_FANOUT_CPU = 0x2
+ PACKET_FANOUT_DATA = 0x16
+ PACKET_FANOUT_EBPF = 0x7
+ PACKET_FANOUT_FLAG_DEFRAG = 0x8000
+ PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
+ PACKET_FANOUT_HASH = 0x0
+ PACKET_FANOUT_LB = 0x1
+ PACKET_FANOUT_QM = 0x5
+ PACKET_FANOUT_RND = 0x4
+ PACKET_FANOUT_ROLLOVER = 0x3
+ PACKET_FASTROUTE = 0x6
+ PACKET_HDRLEN = 0xb
+ PACKET_HOST = 0x0
+ PACKET_KERNEL = 0x7
+ PACKET_LOOPBACK = 0x5
+ PACKET_LOSS = 0xe
+ PACKET_MR_ALLMULTI = 0x2
+ PACKET_MR_MULTICAST = 0x0
+ PACKET_MR_PROMISC = 0x1
+ PACKET_MR_UNICAST = 0x3
+ PACKET_MULTICAST = 0x2
+ PACKET_ORIGDEV = 0x9
+ PACKET_OTHERHOST = 0x3
+ PACKET_OUTGOING = 0x4
+ PACKET_QDISC_BYPASS = 0x14
+ PACKET_RECV_OUTPUT = 0x3
+ PACKET_RESERVE = 0xc
+ PACKET_ROLLOVER_STATS = 0x15
+ PACKET_RX_RING = 0x5
+ PACKET_STATISTICS = 0x6
+ PACKET_TIMESTAMP = 0x11
+ PACKET_TX_HAS_OFF = 0x13
+ PACKET_TX_RING = 0xd
+ PACKET_TX_TIMESTAMP = 0x10
+ PACKET_USER = 0x6
+ PACKET_VERSION = 0xa
+ PACKET_VNET_HDR = 0xf
+ PARENB = 0x100
+ PARITY_CRC16_PR0 = 0x2
+ PARITY_CRC16_PR0_CCITT = 0x4
+ PARITY_CRC16_PR1 = 0x3
+ PARITY_CRC16_PR1_CCITT = 0x5
+ PARITY_CRC32_PR0_CCITT = 0x6
+ PARITY_CRC32_PR1_CCITT = 0x7
+ PARITY_DEFAULT = 0x0
+ PARITY_NONE = 0x1
+ PARMRK = 0x8
+ PARODD = 0x200
+ PENDIN = 0x4000
+ PRIO_PGRP = 0x1
+ PRIO_PROCESS = 0x0
+ PRIO_USER = 0x2
+ PROT_EXEC = 0x4
+ PROT_GROWSDOWN = 0x1000000
+ PROT_GROWSUP = 0x2000000
+ PROT_NONE = 0x0
+ PROT_READ = 0x1
+ PROT_WRITE = 0x2
+ PR_CAPBSET_DROP = 0x18
+ PR_CAPBSET_READ = 0x17
+ PR_CAP_AMBIENT = 0x2f
+ PR_CAP_AMBIENT_CLEAR_ALL = 0x4
+ PR_CAP_AMBIENT_IS_SET = 0x1
+ PR_CAP_AMBIENT_LOWER = 0x3
+ PR_CAP_AMBIENT_RAISE = 0x2
+ PR_ENDIAN_BIG = 0x0
+ PR_ENDIAN_LITTLE = 0x1
+ PR_ENDIAN_PPC_LITTLE = 0x2
+ PR_FPEMU_NOPRINT = 0x1
+ PR_FPEMU_SIGFPE = 0x2
+ PR_FP_EXC_ASYNC = 0x2
+ PR_FP_EXC_DISABLED = 0x0
+ PR_FP_EXC_DIV = 0x10000
+ PR_FP_EXC_INV = 0x100000
+ PR_FP_EXC_NONRECOV = 0x1
+ PR_FP_EXC_OVF = 0x20000
+ PR_FP_EXC_PRECISE = 0x3
+ PR_FP_EXC_RES = 0x80000
+ PR_FP_EXC_SW_ENABLE = 0x80
+ PR_FP_EXC_UND = 0x40000
+ PR_FP_MODE_FR = 0x1
+ PR_FP_MODE_FRE = 0x2
+ PR_GET_CHILD_SUBREAPER = 0x25
+ PR_GET_DUMPABLE = 0x3
+ PR_GET_ENDIAN = 0x13
+ PR_GET_FPEMU = 0x9
+ PR_GET_FPEXC = 0xb
+ PR_GET_FP_MODE = 0x2e
+ PR_GET_KEEPCAPS = 0x7
+ PR_GET_NAME = 0x10
+ PR_GET_NO_NEW_PRIVS = 0x27
+ PR_GET_PDEATHSIG = 0x2
+ PR_GET_SECCOMP = 0x15
+ PR_GET_SECUREBITS = 0x1b
+ PR_GET_THP_DISABLE = 0x2a
+ PR_GET_TID_ADDRESS = 0x28
+ PR_GET_TIMERSLACK = 0x1e
+ PR_GET_TIMING = 0xd
+ PR_GET_TSC = 0x19
+ PR_GET_UNALIGN = 0x5
+ PR_MCE_KILL = 0x21
+ PR_MCE_KILL_CLEAR = 0x0
+ PR_MCE_KILL_DEFAULT = 0x2
+ PR_MCE_KILL_EARLY = 0x1
+ PR_MCE_KILL_GET = 0x22
+ PR_MCE_KILL_LATE = 0x0
+ PR_MCE_KILL_SET = 0x1
+ PR_MPX_DISABLE_MANAGEMENT = 0x2c
+ PR_MPX_ENABLE_MANAGEMENT = 0x2b
+ PR_SET_CHILD_SUBREAPER = 0x24
+ PR_SET_DUMPABLE = 0x4
+ PR_SET_ENDIAN = 0x14
+ PR_SET_FPEMU = 0xa
+ PR_SET_FPEXC = 0xc
+ PR_SET_FP_MODE = 0x2d
+ PR_SET_KEEPCAPS = 0x8
+ PR_SET_MM = 0x23
+ PR_SET_MM_ARG_END = 0x9
+ PR_SET_MM_ARG_START = 0x8
+ PR_SET_MM_AUXV = 0xc
+ PR_SET_MM_BRK = 0x7
+ PR_SET_MM_END_CODE = 0x2
+ PR_SET_MM_END_DATA = 0x4
+ PR_SET_MM_ENV_END = 0xb
+ PR_SET_MM_ENV_START = 0xa
+ PR_SET_MM_EXE_FILE = 0xd
+ PR_SET_MM_MAP = 0xe
+ PR_SET_MM_MAP_SIZE = 0xf
+ PR_SET_MM_START_BRK = 0x6
+ PR_SET_MM_START_CODE = 0x1
+ PR_SET_MM_START_DATA = 0x3
+ PR_SET_MM_START_STACK = 0x5
+ PR_SET_NAME = 0xf
+ PR_SET_NO_NEW_PRIVS = 0x26
+ PR_SET_PDEATHSIG = 0x1
+ PR_SET_PTRACER = 0x59616d61
+ PR_SET_PTRACER_ANY = -0x1
+ PR_SET_SECCOMP = 0x16
+ PR_SET_SECUREBITS = 0x1c
+ PR_SET_THP_DISABLE = 0x29
+ PR_SET_TIMERSLACK = 0x1d
+ PR_SET_TIMING = 0xe
+ PR_SET_TSC = 0x1a
+ PR_SET_UNALIGN = 0x6
+ PR_TASK_PERF_EVENTS_DISABLE = 0x1f
+ PR_TASK_PERF_EVENTS_ENABLE = 0x20
+ PR_TIMING_STATISTICAL = 0x0
+ PR_TIMING_TIMESTAMP = 0x1
+ PR_TSC_ENABLE = 0x1
+ PR_TSC_SIGSEGV = 0x2
+ PR_UNALIGN_NOPRINT = 0x1
+ PR_UNALIGN_SIGBUS = 0x2
+ PTRACE_ATTACH = 0x10
+ PTRACE_CONT = 0x7
+ PTRACE_DETACH = 0x11
+ PTRACE_EVENT_CLONE = 0x3
+ PTRACE_EVENT_EXEC = 0x4
+ PTRACE_EVENT_EXIT = 0x6
+ PTRACE_EVENT_FORK = 0x1
+ PTRACE_EVENT_SECCOMP = 0x7
+ PTRACE_EVENT_STOP = 0x80
+ PTRACE_EVENT_VFORK = 0x2
+ PTRACE_EVENT_VFORK_DONE = 0x5
+ PTRACE_GETEVENTMSG = 0x4201
+ PTRACE_GETFPAREGS = 0x14
+ PTRACE_GETFPREGS = 0xe
+ PTRACE_GETFPREGS64 = 0x19
+ PTRACE_GETREGS = 0xc
+ PTRACE_GETREGS64 = 0x16
+ PTRACE_GETREGSET = 0x4204
+ PTRACE_GETSIGINFO = 0x4202
+ PTRACE_GETSIGMASK = 0x420a
+ PTRACE_INTERRUPT = 0x4207
+ PTRACE_KILL = 0x8
+ PTRACE_LISTEN = 0x4208
+ PTRACE_O_EXITKILL = 0x100000
+ PTRACE_O_MASK = 0x3000ff
+ PTRACE_O_SUSPEND_SECCOMP = 0x200000
+ PTRACE_O_TRACECLONE = 0x8
+ PTRACE_O_TRACEEXEC = 0x10
+ PTRACE_O_TRACEEXIT = 0x40
+ PTRACE_O_TRACEFORK = 0x2
+ PTRACE_O_TRACESECCOMP = 0x80
+ PTRACE_O_TRACESYSGOOD = 0x1
+ PTRACE_O_TRACEVFORK = 0x4
+ PTRACE_O_TRACEVFORKDONE = 0x20
+ PTRACE_PEEKDATA = 0x2
+ PTRACE_PEEKSIGINFO = 0x4209
+ PTRACE_PEEKSIGINFO_SHARED = 0x1
+ PTRACE_PEEKTEXT = 0x1
+ PTRACE_PEEKUSR = 0x3
+ PTRACE_POKEDATA = 0x5
+ PTRACE_POKETEXT = 0x4
+ PTRACE_POKEUSR = 0x6
+ PTRACE_READDATA = 0x10
+ PTRACE_READTEXT = 0x12
+ PTRACE_SECCOMP_GET_FILTER = 0x420c
+ PTRACE_SEIZE = 0x4206
+ PTRACE_SETFPAREGS = 0x15
+ PTRACE_SETFPREGS = 0xf
+ PTRACE_SETFPREGS64 = 0x1a
+ PTRACE_SETOPTIONS = 0x4200
+ PTRACE_SETREGS = 0xd
+ PTRACE_SETREGS64 = 0x17
+ PTRACE_SETREGSET = 0x4205
+ PTRACE_SETSIGINFO = 0x4203
+ PTRACE_SETSIGMASK = 0x420b
+ PTRACE_SINGLESTEP = 0x9
+ PTRACE_SPARC_DETACH = 0xb
+ PTRACE_SYSCALL = 0x18
+ PTRACE_TRACEME = 0x0
+ PTRACE_WRITEDATA = 0x11
+ PTRACE_WRITETEXT = 0x13
+ PT_FP = 0x48
+ PT_G0 = 0x10
+ PT_G1 = 0x14
+ PT_G2 = 0x18
+ PT_G3 = 0x1c
+ PT_G4 = 0x20
+ PT_G5 = 0x24
+ PT_G6 = 0x28
+ PT_G7 = 0x2c
+ PT_I0 = 0x30
+ PT_I1 = 0x34
+ PT_I2 = 0x38
+ PT_I3 = 0x3c
+ PT_I4 = 0x40
+ PT_I5 = 0x44
+ PT_I6 = 0x48
+ PT_I7 = 0x4c
+ PT_NPC = 0x8
+ PT_PC = 0x4
+ PT_PSR = 0x0
+ PT_REGS_MAGIC = 0x57ac6c00
+ PT_TNPC = 0x90
+ PT_TPC = 0x88
+ PT_TSTATE = 0x80
+ PT_V9_FP = 0x70
+ PT_V9_G0 = 0x0
+ PT_V9_G1 = 0x8
+ PT_V9_G2 = 0x10
+ PT_V9_G3 = 0x18
+ PT_V9_G4 = 0x20
+ PT_V9_G5 = 0x28
+ PT_V9_G6 = 0x30
+ PT_V9_G7 = 0x38
+ PT_V9_I0 = 0x40
+ PT_V9_I1 = 0x48
+ PT_V9_I2 = 0x50
+ PT_V9_I3 = 0x58
+ PT_V9_I4 = 0x60
+ PT_V9_I5 = 0x68
+ PT_V9_I6 = 0x70
+ PT_V9_I7 = 0x78
+ PT_V9_MAGIC = 0x9c
+ PT_V9_TNPC = 0x90
+ PT_V9_TPC = 0x88
+ PT_V9_TSTATE = 0x80
+ PT_V9_Y = 0x98
+ PT_WIM = 0x10
+ PT_Y = 0xc
+ RLIMIT_AS = 0x9
+ RLIMIT_CORE = 0x4
+ RLIMIT_CPU = 0x0
+ RLIMIT_DATA = 0x2
+ RLIMIT_FSIZE = 0x1
+ RLIMIT_NOFILE = 0x6
+ RLIMIT_STACK = 0x3
+ RLIM_INFINITY = -0x1
+ RTAX_ADVMSS = 0x8
+ RTAX_CC_ALGO = 0x10
+ RTAX_CWND = 0x7
+ RTAX_FEATURES = 0xc
+ RTAX_FEATURE_ALLFRAG = 0x8
+ RTAX_FEATURE_ECN = 0x1
+ RTAX_FEATURE_MASK = 0xf
+ RTAX_FEATURE_SACK = 0x2
+ RTAX_FEATURE_TIMESTAMP = 0x4
+ RTAX_HOPLIMIT = 0xa
+ RTAX_INITCWND = 0xb
+ RTAX_INITRWND = 0xe
+ RTAX_LOCK = 0x1
+ RTAX_MAX = 0x10
+ RTAX_MTU = 0x2
+ RTAX_QUICKACK = 0xf
+ RTAX_REORDERING = 0x9
+ RTAX_RTO_MIN = 0xd
+ RTAX_RTT = 0x4
+ RTAX_RTTVAR = 0x5
+ RTAX_SSTHRESH = 0x6
+ RTAX_UNSPEC = 0x0
+ RTAX_WINDOW = 0x3
+ RTA_ALIGNTO = 0x4
+ RTA_MAX = 0x18
+ RTCF_DIRECTSRC = 0x4000000
+ RTCF_DOREDIRECT = 0x1000000
+ RTCF_LOG = 0x2000000
+ RTCF_MASQ = 0x400000
+ RTCF_NAT = 0x800000
+ RTCF_VALVE = 0x200000
+ RTF_ADDRCLASSMASK = 0xf8000000
+ RTF_ADDRCONF = 0x40000
+ RTF_ALLONLINK = 0x20000
+ RTF_BROADCAST = 0x10000000
+ RTF_CACHE = 0x1000000
+ RTF_DEFAULT = 0x10000
+ RTF_DYNAMIC = 0x10
+ RTF_FLOW = 0x2000000
+ RTF_GATEWAY = 0x2
+ RTF_HOST = 0x4
+ RTF_INTERFACE = 0x40000000
+ RTF_IRTT = 0x100
+ RTF_LINKRT = 0x100000
+ RTF_LOCAL = 0x80000000
+ RTF_MODIFIED = 0x20
+ RTF_MSS = 0x40
+ RTF_MTU = 0x40
+ RTF_MULTICAST = 0x20000000
+ RTF_NAT = 0x8000000
+ RTF_NOFORWARD = 0x1000
+ RTF_NONEXTHOP = 0x200000
+ RTF_NOPMTUDISC = 0x4000
+ RTF_POLICY = 0x4000000
+ RTF_REINSTATE = 0x8
+ RTF_REJECT = 0x200
+ RTF_STATIC = 0x400
+ RTF_THROW = 0x2000
+ RTF_UP = 0x1
+ RTF_WINDOW = 0x80
+ RTF_XRESOLVE = 0x800
+ RTM_BASE = 0x10
+ RTM_DELACTION = 0x31
+ RTM_DELADDR = 0x15
+ RTM_DELADDRLABEL = 0x49
+ RTM_DELLINK = 0x11
+ RTM_DELMDB = 0x55
+ RTM_DELNEIGH = 0x1d
+ RTM_DELNSID = 0x59
+ RTM_DELQDISC = 0x25
+ RTM_DELROUTE = 0x19
+ RTM_DELRULE = 0x21
+ RTM_DELTCLASS = 0x29
+ RTM_DELTFILTER = 0x2d
+ RTM_F_CLONED = 0x200
+ RTM_F_EQUALIZE = 0x400
+ RTM_F_LOOKUP_TABLE = 0x1000
+ RTM_F_NOTIFY = 0x100
+ RTM_F_PREFIX = 0x800
+ RTM_GETACTION = 0x32
+ RTM_GETADDR = 0x16
+ RTM_GETADDRLABEL = 0x4a
+ RTM_GETANYCAST = 0x3e
+ RTM_GETDCB = 0x4e
+ RTM_GETLINK = 0x12
+ RTM_GETMDB = 0x56
+ RTM_GETMULTICAST = 0x3a
+ RTM_GETNEIGH = 0x1e
+ RTM_GETNEIGHTBL = 0x42
+ RTM_GETNETCONF = 0x52
+ RTM_GETNSID = 0x5a
+ RTM_GETQDISC = 0x26
+ RTM_GETROUTE = 0x1a
+ RTM_GETRULE = 0x22
+ RTM_GETSTATS = 0x5e
+ RTM_GETTCLASS = 0x2a
+ RTM_GETTFILTER = 0x2e
+ RTM_MAX = 0x5f
+ RTM_NEWACTION = 0x30
+ RTM_NEWADDR = 0x14
+ RTM_NEWADDRLABEL = 0x48
+ RTM_NEWLINK = 0x10
+ RTM_NEWMDB = 0x54
+ RTM_NEWNDUSEROPT = 0x44
+ RTM_NEWNEIGH = 0x1c
+ RTM_NEWNEIGHTBL = 0x40
+ RTM_NEWNETCONF = 0x50
+ RTM_NEWNSID = 0x58
+ RTM_NEWPREFIX = 0x34
+ RTM_NEWQDISC = 0x24
+ RTM_NEWROUTE = 0x18
+ RTM_NEWRULE = 0x20
+ RTM_NEWSTATS = 0x5c
+ RTM_NEWTCLASS = 0x28
+ RTM_NEWTFILTER = 0x2c
+ RTM_NR_FAMILIES = 0x14
+ RTM_NR_MSGTYPES = 0x50
+ RTM_SETDCB = 0x4f
+ RTM_SETLINK = 0x13
+ RTM_SETNEIGHTBL = 0x43
+ RTNH_ALIGNTO = 0x4
+ RTNH_COMPARE_MASK = 0x11
+ RTNH_F_DEAD = 0x1
+ RTNH_F_LINKDOWN = 0x10
+ RTNH_F_OFFLOAD = 0x8
+ RTNH_F_ONLINK = 0x4
+ RTNH_F_PERVASIVE = 0x2
+ RTN_MAX = 0xb
+ RTPROT_BABEL = 0x2a
+ RTPROT_BIRD = 0xc
+ RTPROT_BOOT = 0x3
+ RTPROT_DHCP = 0x10
+ RTPROT_DNROUTED = 0xd
+ RTPROT_GATED = 0x8
+ RTPROT_KERNEL = 0x2
+ RTPROT_MROUTED = 0x11
+ RTPROT_MRT = 0xa
+ RTPROT_NTK = 0xf
+ RTPROT_RA = 0x9
+ RTPROT_REDIRECT = 0x1
+ RTPROT_STATIC = 0x4
+ RTPROT_UNSPEC = 0x0
+ RTPROT_XORP = 0xe
+ RTPROT_ZEBRA = 0xb
+ RT_CLASS_DEFAULT = 0xfd
+ RT_CLASS_LOCAL = 0xff
+ RT_CLASS_MAIN = 0xfe
+ RT_CLASS_MAX = 0xff
+ RT_CLASS_UNSPEC = 0x0
+ RUSAGE_CHILDREN = -0x1
+ RUSAGE_SELF = 0x0
+ RUSAGE_THREAD = 0x1
+ SCM_CREDENTIALS = 0x2
+ SCM_RIGHTS = 0x1
+ SCM_TIMESTAMP = 0x1d
+ SCM_TIMESTAMPING = 0x23
+ SCM_TIMESTAMPNS = 0x21
+ SCM_WIFI_STATUS = 0x25
+ SHUT_RD = 0x0
+ SHUT_RDWR = 0x2
+ SHUT_WR = 0x1
+ SIOCADDDLCI = 0x8980
+ SIOCADDMULTI = 0x8931
+ SIOCADDRT = 0x890b
+ SIOCATMARK = 0x8905
+ SIOCBONDCHANGEACTIVE = 0x8995
+ SIOCBONDENSLAVE = 0x8990
+ SIOCBONDINFOQUERY = 0x8994
+ SIOCBONDRELEASE = 0x8991
+ SIOCBONDSETHWADDR = 0x8992
+ SIOCBONDSLAVEINFOQUERY = 0x8993
+ SIOCBRADDBR = 0x89a0
+ SIOCBRADDIF = 0x89a2
+ SIOCBRDELBR = 0x89a1
+ SIOCBRDELIF = 0x89a3
+ SIOCDARP = 0x8953
+ SIOCDELDLCI = 0x8981
+ SIOCDELMULTI = 0x8932
+ SIOCDELRT = 0x890c
+ SIOCDEVPRIVATE = 0x89f0
+ SIOCDIFADDR = 0x8936
+ SIOCDRARP = 0x8960
+ SIOCETHTOOL = 0x8946
+ SIOCGARP = 0x8954
+ SIOCGHWTSTAMP = 0x89b1
+ SIOCGIFADDR = 0x8915
+ SIOCGIFBR = 0x8940
+ SIOCGIFBRDADDR = 0x8919
+ SIOCGIFCONF = 0x8912
+ SIOCGIFCOUNT = 0x8938
+ SIOCGIFDSTADDR = 0x8917
+ SIOCGIFENCAP = 0x8925
+ SIOCGIFFLAGS = 0x8913
+ SIOCGIFHWADDR = 0x8927
+ SIOCGIFINDEX = 0x8933
+ SIOCGIFMAP = 0x8970
+ SIOCGIFMEM = 0x891f
+ SIOCGIFMETRIC = 0x891d
+ SIOCGIFMTU = 0x8921
+ SIOCGIFNAME = 0x8910
+ SIOCGIFNETMASK = 0x891b
+ SIOCGIFPFLAGS = 0x8935
+ SIOCGIFSLAVE = 0x8929
+ SIOCGIFTXQLEN = 0x8942
+ SIOCGIFVLAN = 0x8982
+ SIOCGMIIPHY = 0x8947
+ SIOCGMIIREG = 0x8948
+ SIOCGPGRP = 0x8904
+ SIOCGRARP = 0x8961
+ SIOCGSTAMP = 0x8906
+ SIOCGSTAMPNS = 0x8907
+ SIOCINQ = 0x4004667f
+ SIOCOUTQ = 0x40047473
+ SIOCOUTQNSD = 0x894b
+ SIOCPROTOPRIVATE = 0x89e0
+ SIOCRTMSG = 0x890d
+ SIOCSARP = 0x8955
+ SIOCSHWTSTAMP = 0x89b0
+ SIOCSIFADDR = 0x8916
+ SIOCSIFBR = 0x8941
+ SIOCSIFBRDADDR = 0x891a
+ SIOCSIFDSTADDR = 0x8918
+ SIOCSIFENCAP = 0x8926
+ SIOCSIFFLAGS = 0x8914
+ SIOCSIFHWADDR = 0x8924
+ SIOCSIFHWBROADCAST = 0x8937
+ SIOCSIFLINK = 0x8911
+ SIOCSIFMAP = 0x8971
+ SIOCSIFMEM = 0x8920
+ SIOCSIFMETRIC = 0x891e
+ SIOCSIFMTU = 0x8922
+ SIOCSIFNAME = 0x8923
+ SIOCSIFNETMASK = 0x891c
+ SIOCSIFPFLAGS = 0x8934
+ SIOCSIFSLAVE = 0x8930
+ SIOCSIFTXQLEN = 0x8943
+ SIOCSIFVLAN = 0x8983
+ SIOCSMIIREG = 0x8949
+ SIOCSPGRP = 0x8902
+ SIOCSRARP = 0x8962
+ SIOCWANDEV = 0x894a
+ SOCK_CLOEXEC = 0x400000
+ SOCK_DCCP = 0x6
+ SOCK_DGRAM = 0x2
+ SOCK_NONBLOCK = 0x4000
+ SOCK_PACKET = 0xa
+ SOCK_RAW = 0x3
+ SOCK_RDM = 0x4
+ SOCK_SEQPACKET = 0x5
+ SOCK_STREAM = 0x1
+ SOL_AAL = 0x109
+ SOL_ALG = 0x117
+ SOL_ATM = 0x108
+ SOL_CAIF = 0x116
+ SOL_DCCP = 0x10d
+ SOL_DECNET = 0x105
+ SOL_ICMPV6 = 0x3a
+ SOL_IP = 0x0
+ SOL_IPV6 = 0x29
+ SOL_IRDA = 0x10a
+ SOL_IUCV = 0x115
+ SOL_KCM = 0x119
+ SOL_LLC = 0x10c
+ SOL_NETBEUI = 0x10b
+ SOL_NETLINK = 0x10e
+ SOL_NFC = 0x118
+ SOL_PACKET = 0x107
+ SOL_PNPIPE = 0x113
+ SOL_PPPOL2TP = 0x111
+ SOL_RAW = 0xff
+ SOL_RDS = 0x114
+ SOL_RXRPC = 0x110
+ SOL_SOCKET = 0xffff
+ SOL_TCP = 0x6
+ SOL_TIPC = 0x10f
+ SOL_X25 = 0x106
+ SOMAXCONN = 0x80
+ SO_ACCEPTCONN = 0x8000
+ SO_ATTACH_BPF = 0x34
+ SO_ATTACH_FILTER = 0x1a
+ SO_ATTACH_REUSEPORT_CBPF = 0x35
+ SO_ATTACH_REUSEPORT_EBPF = 0x36
+ SO_BINDTODEVICE = 0xd
+ SO_BPF_EXTENSIONS = 0x32
+ SO_BROADCAST = 0x20
+ SO_BSDCOMPAT = 0x400
+ SO_BUSY_POLL = 0x30
+ SO_CNX_ADVICE = 0x37
+ SO_DEBUG = 0x1
+ SO_DETACH_BPF = 0x1b
+ SO_DETACH_FILTER = 0x1b
+ SO_DOMAIN = 0x1029
+ SO_DONTROUTE = 0x10
+ SO_ERROR = 0x1007
+ SO_GET_FILTER = 0x1a
+ SO_INCOMING_CPU = 0x33
+ SO_KEEPALIVE = 0x8
+ SO_LINGER = 0x80
+ SO_LOCK_FILTER = 0x28
+ SO_MARK = 0x22
+ SO_MAX_PACING_RATE = 0x31
+ SO_NOFCS = 0x27
+ SO_NO_CHECK = 0xb
+ SO_OOBINLINE = 0x100
+ SO_PASSCRED = 0x2
+ SO_PASSSEC = 0x1f
+ SO_PEEK_OFF = 0x26
+ SO_PEERCRED = 0x40
+ SO_PEERNAME = 0x1c
+ SO_PEERSEC = 0x1e
+ SO_PRIORITY = 0xc
+ SO_PROTOCOL = 0x1028
+ SO_RCVBUF = 0x1002
+ SO_RCVBUFFORCE = 0x100b
+ SO_RCVLOWAT = 0x800
+ SO_RCVTIMEO = 0x2000
+ SO_REUSEADDR = 0x4
+ SO_REUSEPORT = 0x200
+ SO_RXQ_OVFL = 0x24
+ SO_SECURITY_AUTHENTICATION = 0x5001
+ SO_SECURITY_ENCRYPTION_NETWORK = 0x5004
+ SO_SECURITY_ENCRYPTION_TRANSPORT = 0x5002
+ SO_SELECT_ERR_QUEUE = 0x29
+ SO_SNDBUF = 0x1001
+ SO_SNDBUFFORCE = 0x100a
+ SO_SNDLOWAT = 0x1000
+ SO_SNDTIMEO = 0x4000
+ SO_TIMESTAMP = 0x1d
+ SO_TIMESTAMPING = 0x23
+ SO_TIMESTAMPNS = 0x21
+ SO_TYPE = 0x1008
+ SO_WIFI_STATUS = 0x25
+ S_BLKSIZE = 0x200
+ S_IEXEC = 0x40
+ S_IFBLK = 0x6000
+ S_IFCHR = 0x2000
+ S_IFDIR = 0x4000
+ S_IFIFO = 0x1000
+ S_IFLNK = 0xa000
+ S_IFMT = 0xf000
+ S_IFREG = 0x8000
+ S_IFSOCK = 0xc000
+ S_IREAD = 0x100
+ S_IRGRP = 0x20
+ S_IROTH = 0x4
+ S_IRUSR = 0x100
+ S_IRWXG = 0x38
+ S_IRWXO = 0x7
+ S_IRWXU = 0x1c0
+ S_ISGID = 0x400
+ S_ISUID = 0x800
+ S_ISVTX = 0x200
+ S_IWGRP = 0x10
+ S_IWOTH = 0x2
+ S_IWRITE = 0x80
+ S_IWUSR = 0x80
+ S_IXGRP = 0x8
+ S_IXOTH = 0x1
+ S_IXUSR = 0x40
+ TAB0 = 0x0
+ TAB1 = 0x800
+ TAB2 = 0x1000
+ TAB3 = 0x1800
+ TABDLY = 0x1800
+ TCFLSH = 0x20005407
+ TCGETA = 0x40125401
+ TCGETS = 0x40245408
+ TCGETS2 = 0x402c540c
+ TCIFLUSH = 0x0
+ TCIOFF = 0x2
+ TCIOFLUSH = 0x2
+ TCION = 0x3
+ TCOFLUSH = 0x1
+ TCOOFF = 0x0
+ TCOON = 0x1
+ TCP_CC_INFO = 0x1a
+ TCP_CONGESTION = 0xd
+ TCP_COOKIE_IN_ALWAYS = 0x1
+ TCP_COOKIE_MAX = 0x10
+ TCP_COOKIE_MIN = 0x8
+ TCP_COOKIE_OUT_NEVER = 0x2
+ TCP_COOKIE_PAIR_SIZE = 0x20
+ TCP_COOKIE_TRANSACTIONS = 0xf
+ TCP_CORK = 0x3
+ TCP_DEFER_ACCEPT = 0x9
+ TCP_FASTOPEN = 0x17
+ TCP_INFO = 0xb
+ TCP_KEEPCNT = 0x6
+ TCP_KEEPIDLE = 0x4
+ TCP_KEEPINTVL = 0x5
+ TCP_LINGER2 = 0x8
+ TCP_MAXSEG = 0x2
+ TCP_MAXWIN = 0xffff
+ TCP_MAX_WINSHIFT = 0xe
+ TCP_MD5SIG = 0xe
+ TCP_MD5SIG_MAXKEYLEN = 0x50
+ TCP_MSS = 0x200
+ TCP_MSS_DEFAULT = 0x218
+ TCP_MSS_DESIRED = 0x4c4
+ TCP_NODELAY = 0x1
+ TCP_NOTSENT_LOWAT = 0x19
+ TCP_QUEUE_SEQ = 0x15
+ TCP_QUICKACK = 0xc
+ TCP_REPAIR = 0x13
+ TCP_REPAIR_OPTIONS = 0x16
+ TCP_REPAIR_QUEUE = 0x14
+ TCP_SAVED_SYN = 0x1c
+ TCP_SAVE_SYN = 0x1b
+ TCP_SYNCNT = 0x7
+ TCP_S_DATA_IN = 0x4
+ TCP_S_DATA_OUT = 0x8
+ TCP_THIN_DUPACK = 0x11
+ TCP_THIN_LINEAR_TIMEOUTS = 0x10
+ TCP_TIMESTAMP = 0x18
+ TCP_USER_TIMEOUT = 0x12
+ TCP_WINDOW_CLAMP = 0xa
+ TCSAFLUSH = 0x2
+ TCSBRK = 0x20005405
+ TCSBRKP = 0x5425
+ TCSETA = 0x80125402
+ TCSETAF = 0x80125404
+ TCSETAW = 0x80125403
+ TCSETS = 0x80245409
+ TCSETS2 = 0x802c540d
+ TCSETSF = 0x8024540b
+ TCSETSF2 = 0x802c540f
+ TCSETSW = 0x8024540a
+ TCSETSW2 = 0x802c540e
+ TCXONC = 0x20005406
+ TIOCCBRK = 0x2000747a
+ TIOCCONS = 0x20007424
+ TIOCEXCL = 0x2000740d
+ TIOCGDEV = 0x40045432
+ TIOCGETD = 0x40047400
+ TIOCGEXCL = 0x40045440
+ TIOCGICOUNT = 0x545d
+ TIOCGLCKTRMIOS = 0x5456
+ TIOCGPGRP = 0x40047483
+ TIOCGPKT = 0x40045438
+ TIOCGPTLCK = 0x40045439
+ TIOCGPTN = 0x40047486
+ TIOCGRS485 = 0x40205441
+ TIOCGSERIAL = 0x541e
+ TIOCGSID = 0x40047485
+ TIOCGSOFTCAR = 0x40047464
+ TIOCGWINSZ = 0x40087468
+ TIOCINQ = 0x4004667f
+ TIOCLINUX = 0x541c
+ TIOCMBIC = 0x8004746b
+ TIOCMBIS = 0x8004746c
+ TIOCMGET = 0x4004746a
+ TIOCMIWAIT = 0x545c
+ TIOCMSET = 0x8004746d
+ TIOCM_CAR = 0x40
+ TIOCM_CD = 0x40
+ TIOCM_CTS = 0x20
+ TIOCM_DSR = 0x100
+ TIOCM_DTR = 0x2
+ TIOCM_LE = 0x1
+ TIOCM_LOOP = 0x8000
+ TIOCM_OUT1 = 0x2000
+ TIOCM_OUT2 = 0x4000
+ TIOCM_RI = 0x80
+ TIOCM_RNG = 0x80
+ TIOCM_RTS = 0x4
+ TIOCM_SR = 0x10
+ TIOCM_ST = 0x8
+ TIOCNOTTY = 0x20007471
+ TIOCNXCL = 0x2000740e
+ TIOCOUTQ = 0x40047473
+ TIOCPKT = 0x80047470
+ TIOCPKT_DATA = 0x0
+ TIOCPKT_DOSTOP = 0x20
+ TIOCPKT_FLUSHREAD = 0x1
+ TIOCPKT_FLUSHWRITE = 0x2
+ TIOCPKT_IOCTL = 0x40
+ TIOCPKT_NOSTOP = 0x10
+ TIOCPKT_START = 0x8
+ TIOCPKT_STOP = 0x4
+ TIOCSBRK = 0x2000747b
+ TIOCSCTTY = 0x20007484
+ TIOCSERCONFIG = 0x5453
+ TIOCSERGETLSR = 0x5459
+ TIOCSERGETMULTI = 0x545a
+ TIOCSERGSTRUCT = 0x5458
+ TIOCSERGWILD = 0x5454
+ TIOCSERSETMULTI = 0x545b
+ TIOCSERSWILD = 0x5455
+ TIOCSER_TEMT = 0x1
+ TIOCSETD = 0x80047401
+ TIOCSIG = 0x80047488
+ TIOCSLCKTRMIOS = 0x5457
+ TIOCSPGRP = 0x80047482
+ TIOCSPTLCK = 0x80047487
+ TIOCSRS485 = 0xc0205442
+ TIOCSSERIAL = 0x541f
+ TIOCSSOFTCAR = 0x80047465
+ TIOCSTART = 0x2000746e
+ TIOCSTI = 0x80017472
+ TIOCSTOP = 0x2000746f
+ TIOCSWINSZ = 0x80087467
+ TIOCVHANGUP = 0x20005437
+ TOSTOP = 0x100
+ TUNATTACHFILTER = 0x801054d5
+ TUNDETACHFILTER = 0x801054d6
+ TUNGETFEATURES = 0x400454cf
+ TUNGETFILTER = 0x401054db
+ TUNGETIFF = 0x400454d2
+ TUNGETSNDBUF = 0x400454d3
+ TUNGETVNETBE = 0x400454df
+ TUNGETVNETHDRSZ = 0x400454d7
+ TUNGETVNETLE = 0x400454dd
+ TUNSETDEBUG = 0x800454c9
+ TUNSETGROUP = 0x800454ce
+ TUNSETIFF = 0x800454ca
+ TUNSETIFINDEX = 0x800454da
+ TUNSETLINK = 0x800454cd
+ TUNSETNOCSUM = 0x800454c8
+ TUNSETOFFLOAD = 0x800454d0
+ TUNSETOWNER = 0x800454cc
+ TUNSETPERSIST = 0x800454cb
+ TUNSETQUEUE = 0x800454d9
+ TUNSETSNDBUF = 0x800454d4
+ TUNSETTXFILTER = 0x800454d1
+ TUNSETVNETBE = 0x800454de
+ TUNSETVNETHDRSZ = 0x800454d8
+ TUNSETVNETLE = 0x800454dc
+ VDISCARD = 0xd
+ VDSUSP = 0xb
+ VEOF = 0x4
+ VEOL = 0x5
+ VEOL2 = 0x6
+ VERASE = 0x2
+ VINTR = 0x0
+ VKILL = 0x3
+ VLNEXT = 0xf
+ VMIN = 0x4
+ VQUIT = 0x1
+ VREPRINT = 0xc
+ VSTART = 0x8
+ VSTOP = 0x9
+ VSUSP = 0xa
+ VSWTC = 0x7
+ VT0 = 0x0
+ VT1 = 0x4000
+ VTDLY = 0x4000
+ VTIME = 0x5
+ VWERASE = 0xe
+ WALL = 0x40000000
+ WCLONE = 0x80000000
+ WCONTINUED = 0x8
+ WEXITED = 0x4
+ WNOHANG = 0x1
+ WNOTHREAD = 0x20000000
+ WNOWAIT = 0x1000000
+ WORDSIZE = 0x40
+ WRAP = 0x20000
+ WSTOPPED = 0x2
+ WUNTRACED = 0x2
+ XCASE = 0x4
+ XTABS = 0x1800
+ __TIOCFLUSH = 0x80047410
+)
+
+// Errors
+const (
+ E2BIG = syscall.Errno(0x7)
+ EACCES = syscall.Errno(0xd)
+ EADDRINUSE = syscall.Errno(0x30)
+ EADDRNOTAVAIL = syscall.Errno(0x31)
+ EADV = syscall.Errno(0x53)
+ EAFNOSUPPORT = syscall.Errno(0x2f)
+ EAGAIN = syscall.Errno(0xb)
+ EALREADY = syscall.Errno(0x25)
+ EBADE = syscall.Errno(0x66)
+ EBADF = syscall.Errno(0x9)
+ EBADFD = syscall.Errno(0x5d)
+ EBADMSG = syscall.Errno(0x4c)
+ EBADR = syscall.Errno(0x67)
+ EBADRQC = syscall.Errno(0x6a)
+ EBADSLT = syscall.Errno(0x6b)
+ EBFONT = syscall.Errno(0x6d)
+ EBUSY = syscall.Errno(0x10)
+ ECANCELED = syscall.Errno(0x7f)
+ ECHILD = syscall.Errno(0xa)
+ ECHRNG = syscall.Errno(0x5e)
+ ECOMM = syscall.Errno(0x55)
+ ECONNABORTED = syscall.Errno(0x35)
+ ECONNREFUSED = syscall.Errno(0x3d)
+ ECONNRESET = syscall.Errno(0x36)
+ EDEADLK = syscall.Errno(0x4e)
+ EDEADLOCK = syscall.Errno(0x6c)
+ EDESTADDRREQ = syscall.Errno(0x27)
+ EDOM = syscall.Errno(0x21)
+ EDOTDOT = syscall.Errno(0x58)
+ EDQUOT = syscall.Errno(0x45)
+ EEXIST = syscall.Errno(0x11)
+ EFAULT = syscall.Errno(0xe)
+ EFBIG = syscall.Errno(0x1b)
+ EHOSTDOWN = syscall.Errno(0x40)
+ EHOSTUNREACH = syscall.Errno(0x41)
+ EHWPOISON = syscall.Errno(0x87)
+ EIDRM = syscall.Errno(0x4d)
+ EILSEQ = syscall.Errno(0x7a)
+ EINPROGRESS = syscall.Errno(0x24)
+ EINTR = syscall.Errno(0x4)
+ EINVAL = syscall.Errno(0x16)
+ EIO = syscall.Errno(0x5)
+ EISCONN = syscall.Errno(0x38)
+ EISDIR = syscall.Errno(0x15)
+ EISNAM = syscall.Errno(0x78)
+ EKEYEXPIRED = syscall.Errno(0x81)
+ EKEYREJECTED = syscall.Errno(0x83)
+ EKEYREVOKED = syscall.Errno(0x82)
+ EL2HLT = syscall.Errno(0x65)
+ EL2NSYNC = syscall.Errno(0x5f)
+ EL3HLT = syscall.Errno(0x60)
+ EL3RST = syscall.Errno(0x61)
+ ELIBACC = syscall.Errno(0x72)
+ ELIBBAD = syscall.Errno(0x70)
+ ELIBEXEC = syscall.Errno(0x6e)
+ ELIBMAX = syscall.Errno(0x7b)
+ ELIBSCN = syscall.Errno(0x7c)
+ ELNRNG = syscall.Errno(0x62)
+ ELOOP = syscall.Errno(0x3e)
+ EMEDIUMTYPE = syscall.Errno(0x7e)
+ EMFILE = syscall.Errno(0x18)
+ EMLINK = syscall.Errno(0x1f)
+ EMSGSIZE = syscall.Errno(0x28)
+ EMULTIHOP = syscall.Errno(0x57)
+ ENAMETOOLONG = syscall.Errno(0x3f)
+ ENAVAIL = syscall.Errno(0x77)
+ ENETDOWN = syscall.Errno(0x32)
+ ENETRESET = syscall.Errno(0x34)
+ ENETUNREACH = syscall.Errno(0x33)
+ ENFILE = syscall.Errno(0x17)
+ ENOANO = syscall.Errno(0x69)
+ ENOBUFS = syscall.Errno(0x37)
+ ENOCSI = syscall.Errno(0x64)
+ ENODATA = syscall.Errno(0x6f)
+ ENODEV = syscall.Errno(0x13)
+ ENOENT = syscall.Errno(0x2)
+ ENOEXEC = syscall.Errno(0x8)
+ ENOKEY = syscall.Errno(0x80)
+ ENOLCK = syscall.Errno(0x4f)
+ ENOLINK = syscall.Errno(0x52)
+ ENOMEDIUM = syscall.Errno(0x7d)
+ ENOMEM = syscall.Errno(0xc)
+ ENOMSG = syscall.Errno(0x4b)
+ ENONET = syscall.Errno(0x50)
+ ENOPKG = syscall.Errno(0x71)
+ ENOPROTOOPT = syscall.Errno(0x2a)
+ ENOSPC = syscall.Errno(0x1c)
+ ENOSR = syscall.Errno(0x4a)
+ ENOSTR = syscall.Errno(0x48)
+ ENOSYS = syscall.Errno(0x5a)
+ ENOTBLK = syscall.Errno(0xf)
+ ENOTCONN = syscall.Errno(0x39)
+ ENOTDIR = syscall.Errno(0x14)
+ ENOTEMPTY = syscall.Errno(0x42)
+ ENOTNAM = syscall.Errno(0x76)
+ ENOTRECOVERABLE = syscall.Errno(0x85)
+ ENOTSOCK = syscall.Errno(0x26)
+ ENOTSUP = syscall.Errno(0x2d)
+ ENOTTY = syscall.Errno(0x19)
+ ENOTUNIQ = syscall.Errno(0x73)
+ ENXIO = syscall.Errno(0x6)
+ EOPNOTSUPP = syscall.Errno(0x2d)
+ EOVERFLOW = syscall.Errno(0x5c)
+ EOWNERDEAD = syscall.Errno(0x84)
+ EPERM = syscall.Errno(0x1)
+ EPFNOSUPPORT = syscall.Errno(0x2e)
+ EPIPE = syscall.Errno(0x20)
+ EPROCLIM = syscall.Errno(0x43)
+ EPROTO = syscall.Errno(0x56)
+ EPROTONOSUPPORT = syscall.Errno(0x2b)
+ EPROTOTYPE = syscall.Errno(0x29)
+ ERANGE = syscall.Errno(0x22)
+ EREMCHG = syscall.Errno(0x59)
+ EREMOTE = syscall.Errno(0x47)
+ EREMOTEIO = syscall.Errno(0x79)
+ ERESTART = syscall.Errno(0x74)
+ ERFKILL = syscall.Errno(0x86)
+ EROFS = syscall.Errno(0x1e)
+ ERREMOTE = syscall.Errno(0x51)
+ ESHUTDOWN = syscall.Errno(0x3a)
+ ESOCKTNOSUPPORT = syscall.Errno(0x2c)
+ ESPIPE = syscall.Errno(0x1d)
+ ESRCH = syscall.Errno(0x3)
+ ESRMNT = syscall.Errno(0x54)
+ ESTALE = syscall.Errno(0x46)
+ ESTRPIPE = syscall.Errno(0x5b)
+ ETIME = syscall.Errno(0x49)
+ ETIMEDOUT = syscall.Errno(0x3c)
+ ETOOMANYREFS = syscall.Errno(0x3b)
+ ETXTBSY = syscall.Errno(0x1a)
+ EUCLEAN = syscall.Errno(0x75)
+ EUNATCH = syscall.Errno(0x63)
+ EUSERS = syscall.Errno(0x44)
+ EWOULDBLOCK = syscall.Errno(0xb)
+ EXDEV = syscall.Errno(0x12)
+ EXFULL = syscall.Errno(0x68)
+)
+
+// Signals
+const (
+ SIGABRT = syscall.Signal(0x6)
+ SIGALRM = syscall.Signal(0xe)
+ SIGBUS = syscall.Signal(0xa)
+ SIGCHLD = syscall.Signal(0x14)
+ SIGCLD = syscall.Signal(0x14)
+ SIGCONT = syscall.Signal(0x13)
+ SIGEMT = syscall.Signal(0x7)
+ SIGFPE = syscall.Signal(0x8)
+ SIGHUP = syscall.Signal(0x1)
+ SIGILL = syscall.Signal(0x4)
+ SIGINT = syscall.Signal(0x2)
+ SIGIO = syscall.Signal(0x17)
+ SIGIOT = syscall.Signal(0x6)
+ SIGKILL = syscall.Signal(0x9)
+ SIGLOST = syscall.Signal(0x1d)
+ SIGPIPE = syscall.Signal(0xd)
+ SIGPOLL = syscall.Signal(0x17)
+ SIGPROF = syscall.Signal(0x1b)
+ SIGPWR = syscall.Signal(0x1d)
+ SIGQUIT = syscall.Signal(0x3)
+ SIGSEGV = syscall.Signal(0xb)
+ SIGSTOP = syscall.Signal(0x11)
+ SIGSYS = syscall.Signal(0xc)
+ SIGTERM = syscall.Signal(0xf)
+ SIGTRAP = syscall.Signal(0x5)
+ SIGTSTP = syscall.Signal(0x12)
+ SIGTTIN = syscall.Signal(0x15)
+ SIGTTOU = syscall.Signal(0x16)
+ SIGURG = syscall.Signal(0x10)
+ SIGUSR1 = syscall.Signal(0x1e)
+ SIGUSR2 = syscall.Signal(0x1f)
+ SIGVTALRM = syscall.Signal(0x1a)
+ SIGWINCH = syscall.Signal(0x1c)
+ SIGXCPU = syscall.Signal(0x18)
+ SIGXFSZ = syscall.Signal(0x19)
+)
+
+// Error table
+var errors = [...]string{
+ 1: "operation not permitted",
+ 2: "no such file or directory",
+ 3: "no such process",
+ 4: "interrupted system call",
+ 5: "input/output error",
+ 6: "no such device or address",
+ 7: "argument list too long",
+ 8: "exec format error",
+ 9: "bad file descriptor",
+ 10: "no child processes",
+ 11: "resource temporarily unavailable",
+ 12: "cannot allocate memory",
+ 13: "permission denied",
+ 14: "bad address",
+ 15: "block device required",
+ 16: "device or resource busy",
+ 17: "file exists",
+ 18: "invalid cross-device link",
+ 19: "no such device",
+ 20: "not a directory",
+ 21: "is a directory",
+ 22: "invalid argument",
+ 23: "too many open files in system",
+ 24: "too many open files",
+ 25: "inappropriate ioctl for device",
+ 26: "text file busy",
+ 27: "file too large",
+ 28: "no space left on device",
+ 29: "illegal seek",
+ 30: "read-only file system",
+ 31: "too many links",
+ 32: "broken pipe",
+ 33: "numerical argument out of domain",
+ 34: "numerical result out of range",
+ 36: "operation now in progress",
+ 37: "operation already in progress",
+ 38: "socket operation on non-socket",
+ 39: "destination address required",
+ 40: "message too long",
+ 41: "protocol wrong type for socket",
+ 42: "protocol not available",
+ 43: "protocol not supported",
+ 44: "socket type not supported",
+ 45: "operation not supported",
+ 46: "protocol family not supported",
+ 47: "address family not supported by protocol",
+ 48: "address already in use",
+ 49: "cannot assign requested address",
+ 50: "network is down",
+ 51: "network is unreachable",
+ 52: "network dropped connection on reset",
+ 53: "software caused connection abort",
+ 54: "connection reset by peer",
+ 55: "no buffer space available",
+ 56: "transport endpoint is already connected",
+ 57: "transport endpoint is not connected",
+ 58: "cannot send after transport endpoint shutdown",
+ 59: "too many references: cannot splice",
+ 60: "connection timed out",
+ 61: "connection refused",
+ 62: "too many levels of symbolic links",
+ 63: "file name too long",
+ 64: "host is down",
+ 65: "no route to host",
+ 66: "directory not empty",
+ 67: "too many processes",
+ 68: "too many users",
+ 69: "disk quota exceeded",
+ 70: "stale file handle",
+ 71: "object is remote",
+ 72: "device not a stream",
+ 73: "timer expired",
+ 74: "out of streams resources",
+ 75: "no message of desired type",
+ 76: "bad message",
+ 77: "identifier removed",
+ 78: "resource deadlock avoided",
+ 79: "no locks available",
+ 80: "machine is not on the network",
+ 81: "unknown error 81",
+ 82: "link has been severed",
+ 83: "advertise error",
+ 84: "srmount error",
+ 85: "communication error on send",
+ 86: "protocol error",
+ 87: "multihop attempted",
+ 88: "RFS specific error",
+ 89: "remote address changed",
+ 90: "function not implemented",
+ 91: "streams pipe error",
+ 92: "value too large for defined data type",
+ 93: "file descriptor in bad state",
+ 94: "channel number out of range",
+ 95: "level 2 not synchronized",
+ 96: "level 3 halted",
+ 97: "level 3 reset",
+ 98: "link number out of range",
+ 99: "protocol driver not attached",
+ 100: "no CSI structure available",
+ 101: "level 2 halted",
+ 102: "invalid exchange",
+ 103: "invalid request descriptor",
+ 104: "exchange full",
+ 105: "no anode",
+ 106: "invalid request code",
+ 107: "invalid slot",
+ 108: "file locking deadlock error",
+ 109: "bad font file format",
+ 110: "cannot exec a shared library directly",
+ 111: "no data available",
+ 112: "accessing a corrupted shared library",
+ 113: "package not installed",
+ 114: "can not access a needed shared library",
+ 115: "name not unique on network",
+ 116: "interrupted system call should be restarted",
+ 117: "structure needs cleaning",
+ 118: "not a XENIX named type file",
+ 119: "no XENIX semaphores available",
+ 120: "is a named type file",
+ 121: "remote I/O error",
+ 122: "invalid or incomplete multibyte or wide character",
+ 123: "attempting to link in too many shared libraries",
+ 124: ".lib section in a.out corrupted",
+ 125: "no medium found",
+ 126: "wrong medium type",
+ 127: "operation canceled",
+ 128: "required key not available",
+ 129: "key has expired",
+ 130: "key has been revoked",
+ 131: "key was rejected by service",
+ 132: "owner died",
+ 133: "state not recoverable",
+ 134: "operation not possible due to RF-kill",
+ 135: "memory page has hardware error",
+}
+
+// Signal table
+var signals = [...]string{
+ 1: "hangup",
+ 2: "interrupt",
+ 3: "quit",
+ 4: "illegal instruction",
+ 5: "trace/breakpoint trap",
+ 6: "aborted",
+ 7: "EMT trap",
+ 8: "floating point exception",
+ 9: "killed",
+ 10: "bus error",
+ 11: "segmentation fault",
+ 12: "bad system call",
+ 13: "broken pipe",
+ 14: "alarm clock",
+ 15: "terminated",
+ 16: "urgent I/O condition",
+ 17: "stopped (signal)",
+ 18: "stopped",
+ 19: "continued",
+ 20: "child exited",
+ 21: "stopped (tty input)",
+ 22: "stopped (tty output)",
+ 23: "I/O possible",
+ 24: "CPU time limit exceeded",
+ 25: "file size limit exceeded",
+ 26: "virtual timer expired",
+ 27: "profiling timer expired",
+ 28: "window changed",
+ 29: "resource lost",
+ 30: "user defined signal 1",
+ 31: "user defined signal 2",
+}
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_netbsd_386.go b/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go
index b4338d5f2..b4338d5f2 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_netbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go
index 4994437b6..4994437b6 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_netbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_netbsd_arm.go b/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go
index ac85ca645..ac85ca645 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_netbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_openbsd_386.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go
index 3322e998d..3322e998d 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_openbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go
index 1758ecca9..1758ecca9 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_openbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_solaris_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go
index a08922b98..a08922b98 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zerrors_solaris_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_darwin_386.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go
index 031034a34..031034a34 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_darwin_386.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
index ee96f78ba..ee96f78ba 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_darwin_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go
index e52cd0d54..e52cd0d54 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_darwin_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
index 9863ef99e..9863ef99e 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go
index 78de48dcf..78de48dcf 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_freebsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go
index fade994dc..fade994dc 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_freebsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go
index c28281e83..c28281e83 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_freebsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go
index a18ba5c88..a18ba5c88 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_freebsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_linux_386.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
index 1f7a75669..80f6a1b0a 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
@@ -64,7 +64,7 @@ func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int,
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
+func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
@@ -87,7 +87,7 @@ func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
+func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(oldpath)
if err != nil {
@@ -109,7 +109,7 @@ func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func unlinkat(dirfd int, path string, flags int) (err error) {
+func Unlinkat(dirfd int, path string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_linux_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
index b4e24fc0a..078c8f05a 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
@@ -64,7 +64,7 @@ func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int,
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
+func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
@@ -87,7 +87,7 @@ func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
+func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(oldpath)
if err != nil {
@@ -109,7 +109,7 @@ func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func unlinkat(dirfd int, path string, flags int) (err error) {
+func Unlinkat(dirfd int, path string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_linux_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
index 20bf33ce5..76e5f7c0b 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
@@ -64,7 +64,7 @@ func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int,
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
+func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
@@ -87,7 +87,7 @@ func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
+func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(oldpath)
if err != nil {
@@ -109,7 +109,7 @@ func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func unlinkat(dirfd int, path string, flags int) (err error) {
+func Unlinkat(dirfd int, path string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_linux_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
index c7286db48..72b79470a 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
@@ -64,7 +64,7 @@ func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int,
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
+func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
@@ -87,7 +87,7 @@ func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
+func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(oldpath)
if err != nil {
@@ -109,7 +109,7 @@ func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func unlinkat(dirfd int, path string, flags int) (err error) {
+func Unlinkat(dirfd int, path string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_linux_mips64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
index b709ed2f5..ba55509ea 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_linux_mips64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
@@ -64,7 +64,7 @@ func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int,
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
+func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
@@ -87,7 +87,7 @@ func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
+func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(oldpath)
if err != nil {
@@ -109,7 +109,7 @@ func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func unlinkat(dirfd int, path string, flags int) (err error) {
+func Unlinkat(dirfd int, path string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
index 5cb1c5671..2b1cc8473 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
@@ -64,7 +64,7 @@ func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int,
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
+func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
@@ -87,7 +87,7 @@ func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
+func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(oldpath)
if err != nil {
@@ -109,7 +109,7 @@ func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func unlinkat(dirfd int, path string, flags int) (err error) {
+func Unlinkat(dirfd int, path string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
index 873bb18f7..25f39db9d 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
@@ -64,7 +64,7 @@ func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int,
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
+func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
@@ -87,7 +87,7 @@ func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
+func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(oldpath)
if err != nil {
@@ -109,7 +109,7 @@ func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func unlinkat(dirfd int, path string, flags int) (err error) {
+func Unlinkat(dirfd int, path string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
index bf08835c5..70702b516 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
@@ -64,7 +64,7 @@ func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int,
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
+func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
@@ -87,7 +87,7 @@ func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
+func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(oldpath)
if err != nil {
@@ -109,7 +109,7 @@ func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func unlinkat(dirfd int, path string, flags int) (err error) {
+func Unlinkat(dirfd int, path string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_linux_s390x.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
index dbaa53b98..94b93d3d0 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
@@ -64,7 +64,7 @@ func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int,
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
+func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
@@ -87,7 +87,7 @@ func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
+func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(oldpath)
if err != nil {
@@ -109,7 +109,7 @@ func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func unlinkat(dirfd int, path string, flags int) (err error) {
+func Unlinkat(dirfd int, path string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
new file mode 100644
index 000000000..774b10ed8
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
@@ -0,0 +1,1834 @@
+// mksyscall.pl syscall_linux.go syscall_linux_sparc64.go
+// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
+
+// +build sparc64,linux
+
+package unix
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+var _ syscall.Errno
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(oldpath)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(newpath)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
+ use(unsafe.Pointer(_p0))
+ use(unsafe.Pointer(_p1))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
+ use(unsafe.Pointer(_p0))
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
+ r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 unsafe.Pointer
+ if len(buf) > 0 {
+ _p1 = unsafe.Pointer(&buf[0])
+ } else {
+ _p1 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
+ use(unsafe.Pointer(_p0))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(oldpath)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(newpath)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
+ use(unsafe.Pointer(_p0))
+ use(unsafe.Pointer(_p1))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Unlinkat(dirfd int, path string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
+ use(unsafe.Pointer(_p0))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func utimes(path string, times *[2]Timeval) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
+ use(unsafe.Pointer(_p0))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
+ use(unsafe.Pointer(_p0))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) {
+ _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getcwd(buf []byte) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
+ r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
+ wpid = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
+ _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(arg)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
+ use(unsafe.Pointer(_p0))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(source)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(target)
+ if err != nil {
+ return
+ }
+ var _p2 *byte
+ _p2, err = BytePtrFromString(fstype)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
+ use(unsafe.Pointer(_p0))
+ use(unsafe.Pointer(_p1))
+ use(unsafe.Pointer(_p2))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Acct(path string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ use(unsafe.Pointer(_p0))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Adjtimex(buf *Timex) (state int, err error) {
+ r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
+ state = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Chdir(path string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ use(unsafe.Pointer(_p0))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Chroot(path string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ use(unsafe.Pointer(_p0))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ClockGettime(clockid int32, time *Timespec) (err error) {
+ _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Close(fd int) (err error) {
+ _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Dup(oldfd int) (fd int, err error) {
+ r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Dup3(oldfd int, newfd int, flags int) (err error) {
+ _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func EpollCreate(size int) (fd int, err error) {
+ r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func EpollCreate1(flag int) (fd int, err error) {
+ r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
+ _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Exit(code int) {
+ Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
+ use(unsafe.Pointer(_p0))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
+ _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchdir(fd int) (err error) {
+ _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchmod(fd int, mode uint32) (err error) {
+ _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
+ use(unsafe.Pointer(_p0))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
+ use(unsafe.Pointer(_p0))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func fcntl(fd int, cmd int, arg int) (val int, err error) {
+ r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
+ val = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fdatasync(fd int) (err error) {
+ _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Flock(fd int, how int) (err error) {
+ _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fsync(fd int) (err error) {
+ _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getdents(fd int, buf []byte) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getpgid(pid int) (pgid int, err error) {
+ r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
+ pgid = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getpid() (pid int) {
+ r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
+ pid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getppid() (ppid int) {
+ r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
+ ppid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getpriority(which int, who int) (prio int, err error) {
+ r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
+ prio = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getrusage(who int, rusage *Rusage) (err error) {
+ _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Gettid() (tid int) {
+ r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
+ tid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(attr)
+ if err != nil {
+ return
+ }
+ var _p2 unsafe.Pointer
+ if len(dest) > 0 {
+ _p2 = unsafe.Pointer(&dest[0])
+ } else {
+ _p2 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
+ use(unsafe.Pointer(_p0))
+ use(unsafe.Pointer(_p1))
+ sz = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(pathname)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
+ use(unsafe.Pointer(_p0))
+ watchdesc = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func InotifyInit1(flags int) (fd int, err error) {
+ r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
+ r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
+ success = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Kill(pid int, sig syscall.Signal) (err error) {
+ _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Klogctl(typ int, buf []byte) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Listxattr(path string, dest []byte) (sz int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 unsafe.Pointer
+ if len(dest) > 0 {
+ _p1 = unsafe.Pointer(&dest[0])
+ } else {
+ _p1 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
+ use(unsafe.Pointer(_p0))
+ sz = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mkdirat(dirfd int, path string, mode uint32) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
+ use(unsafe.Pointer(_p0))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
+ use(unsafe.Pointer(_p0))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
+ _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func PivotRoot(newroot string, putold string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(newroot)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(putold)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ use(unsafe.Pointer(_p0))
+ use(unsafe.Pointer(_p1))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) {
+ _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
+ _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func read(fd int, p []byte) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Removexattr(path string, attr string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(attr)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ use(unsafe.Pointer(_p0))
+ use(unsafe.Pointer(_p1))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(oldpath)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(newpath)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
+ use(unsafe.Pointer(_p0))
+ use(unsafe.Pointer(_p1))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setdomainname(p []byte) (err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Sethostname(p []byte) (err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setpgid(pid int, pgid int) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setsid() (pid int, err error) {
+ r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
+ pid = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Settimeofday(tv *Timeval) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setns(fd int, nstype int) (err error) {
+ _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setpriority(which int, who int, prio int) (err error) {
+ _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setxattr(path string, attr string, data []byte, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(attr)
+ if err != nil {
+ return
+ }
+ var _p2 unsafe.Pointer
+ if len(data) > 0 {
+ _p2 = unsafe.Pointer(&data[0])
+ } else {
+ _p2 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
+ use(unsafe.Pointer(_p0))
+ use(unsafe.Pointer(_p1))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Sync() {
+ Syscall(SYS_SYNC, 0, 0, 0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Sysinfo(info *Sysinfo_t) (err error) {
+ _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
+ r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
+ n = int64(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
+ _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Times(tms *Tms) (ticks uintptr, err error) {
+ r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
+ ticks = uintptr(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Umask(mask int) (oldmask int) {
+ r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
+ oldmask = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Uname(buf *Utsname) (err error) {
+ _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Unmount(target string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(target)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ use(unsafe.Pointer(_p0))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Unshare(flags int) (err error) {
+ _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Ustat(dev int, ubuf *Ustat_t) (err error) {
+ _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func write(fd int, p []byte) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func exitThread(code int) (err error) {
+ _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func readlen(fd int, p *byte, np int) (n int, err error) {
+ r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func writelen(fd int, p *byte, np int) (n int, err error) {
+ r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func munmap(addr uintptr, length uintptr) (err error) {
+ _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Madvise(b []byte, advice int) (err error) {
+ var _p0 unsafe.Pointer
+ if len(b) > 0 {
+ _p0 = unsafe.Pointer(&b[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mprotect(b []byte, prot int) (err error) {
+ var _p0 unsafe.Pointer
+ if len(b) > 0 {
+ _p0 = unsafe.Pointer(&b[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mlock(b []byte) (err error) {
+ var _p0 unsafe.Pointer
+ if len(b) > 0 {
+ _p0 = unsafe.Pointer(&b[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Munlock(b []byte) (err error) {
+ var _p0 unsafe.Pointer
+ if len(b) > 0 {
+ _p0 = unsafe.Pointer(&b[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mlockall(flags int) (err error) {
+ _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Munlockall() (err error) {
+ _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(events) > 0 {
+ _p0 = unsafe.Pointer(&events[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Dup2(oldfd int, newfd int) (err error) {
+ _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchown(fd int, uid int, gid int) (err error) {
+ _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fstat(fd int, stat *Stat_t) (err error) {
+ _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fstatfs(fd int, buf *Statfs_t) (err error) {
+ _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Ftruncate(fd int, length int64) (err error) {
+ _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getegid() (egid int) {
+ r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
+ egid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Geteuid() (euid int) {
+ r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
+ euid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getgid() (gid int) {
+ r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
+ gid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getrlimit(resource int, rlim *Rlimit) (err error) {
+ _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getuid() (uid int) {
+ r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
+ uid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func InotifyInit() (fd int, err error) {
+ r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Lchown(path string, uid int, gid int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
+ use(unsafe.Pointer(_p0))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Listen(s int, n int) (err error) {
+ _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Lstat(path string, stat *Stat_t) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ use(unsafe.Pointer(_p0))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Pause() (err error) {
+ _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Pread(fd int, p []byte, offset int64) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Seek(fd int, offset int64, whence int) (off int64, err error) {
+ r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
+ off = int64(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
+ r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
+ r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
+ written = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setfsgid(gid int) (err error) {
+ _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setfsuid(uid int) (err error) {
+ _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setregid(rgid int, egid int) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setresgid(rgid int, egid int, sgid int) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setresuid(ruid int, euid int, suid int) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setrlimit(resource int, rlim *Rlimit) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setreuid(ruid int, euid int) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Shutdown(fd int, how int) (err error) {
+ _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
+ r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
+ n = int64(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Stat(path string, stat *Stat_t) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ use(unsafe.Pointer(_p0))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Statfs(path string, buf *Statfs_t) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
+ use(unsafe.Pointer(_p0))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
+ _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Truncate(path string, length int64) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
+ use(unsafe.Pointer(_p0))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
+ r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
+ r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
+ _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
+ _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getgroups(n int, list *_Gid_t) (nn int, err error) {
+ r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
+ nn = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func setgroups(n int, list *_Gid_t) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
+ _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
+ _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func socket(domain int, typ int, proto int) (fd int, err error) {
+ r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
+ _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
+ _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
+ _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
+ var _p0 unsafe.Pointer
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
+ r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
+ r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
+ r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
+ xaddr = uintptr(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Gettimeofday(tv *Timeval) (err error) {
+ _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Utime(path string, buf *Utimbuf) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
+ use(unsafe.Pointer(_p0))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pipe(p *[2]_C_int) (err error) {
+ _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pipe2(p *[2]_C_int, flags int) (err error) {
+ _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
+ r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_netbsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go
index b16e1d0ee..b16e1d0ee 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_netbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go
index b63667da9..b63667da9 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_netbsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go
index b0d19038d..b0d19038d 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_netbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_openbsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
index f91a5b856..f91a5b856 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_openbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
index 2e8d59d72..2e8d59d72 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_solaris_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
index 432642781..c0ecfc044 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
@@ -10,10 +10,13 @@ import (
"unsafe"
)
+//go:cgo_import_dynamic libc_pipe pipe "libc.so"
//go:cgo_import_dynamic libc_getsockname getsockname "libsocket.so"
//go:cgo_import_dynamic libc_getcwd getcwd "libc.so"
//go:cgo_import_dynamic libc_getgroups getgroups "libc.so"
//go:cgo_import_dynamic libc_setgroups setgroups "libc.so"
+//go:cgo_import_dynamic libc_wait4 wait4 "libc.so"
+//go:cgo_import_dynamic libc_gethostname gethostname "libc.so"
//go:cgo_import_dynamic libc_utimes utimes "libc.so"
//go:cgo_import_dynamic libc_utimensat utimensat "libc.so"
//go:cgo_import_dynamic libc_fcntl fcntl "libc.so"
@@ -125,10 +128,13 @@ import (
//go:cgo_import_dynamic libc_recvfrom recvfrom "libsocket.so"
//go:cgo_import_dynamic libc_sysconf sysconf "libc.so"
+//go:linkname procpipe libc_pipe
//go:linkname procgetsockname libc_getsockname
//go:linkname procGetcwd libc_getcwd
//go:linkname procgetgroups libc_getgroups
//go:linkname procsetgroups libc_setgroups
+//go:linkname procwait4 libc_wait4
+//go:linkname procgethostname libc_gethostname
//go:linkname procutimes libc_utimes
//go:linkname procutimensat libc_utimensat
//go:linkname procfcntl libc_fcntl
@@ -241,10 +247,13 @@ import (
//go:linkname procsysconf libc_sysconf
var (
+ procpipe,
procgetsockname,
procGetcwd,
procgetgroups,
procsetgroups,
+ procwait4,
+ procgethostname,
procutimes,
procutimensat,
procfcntl,
@@ -357,6 +366,15 @@ var (
procsysconf syscallFunc
)
+func pipe(p *[2]_C_int) (n int, err error) {
+ r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procpipe)), 1, uintptr(unsafe.Pointer(p)), 0, 0, 0, 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = e1
+ }
+ return
+}
+
func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgetsockname)), 3, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
if e1 != 0 {
@@ -395,6 +413,28 @@ func setgroups(ngid int, gid *_Gid_t) (err error) {
return
}
+func wait4(pid int32, statusp *_C_int, options int, rusage *Rusage) (wpid int32, err error) {
+ r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procwait4)), 4, uintptr(pid), uintptr(unsafe.Pointer(statusp)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
+ wpid = int32(r0)
+ if e1 != 0 {
+ err = e1
+ }
+ return
+}
+
+func gethostname(buf []byte) (n int, err error) {
+ var _p0 *byte
+ if len(buf) > 0 {
+ _p0 = &buf[0]
+ }
+ r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgethostname)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), 0, 0, 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = e1
+ }
+ return
+}
+
func utimes(path string, times *[2]Timeval) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysctl_openbsd.go b/vendor/golang.org/x/sys/unix/zsysctl_openbsd.go
index 83bb935b9..83bb935b9 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysctl_openbsd.go
+++ b/vendor/golang.org/x/sys/unix/zsysctl_openbsd.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_darwin_386.go b/vendor/golang.org/x/sys/unix/zsysnum_darwin_386.go
index 2786773ba..2786773ba 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_darwin_386.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_darwin_386.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go
index 09de240c8..09de240c8 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_darwin_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_darwin_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go
index b8c9aea85..b8c9aea85 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_darwin_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go
index 26677ebbf..26677ebbf 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_darwin_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go
index d6038fa9b..d6038fa9b 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_freebsd_386.go b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go
index 262a84536..262a84536 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_freebsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go
index 57a60ea12..57a60ea12 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_freebsd_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go
index 206b9f612..206b9f612 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_freebsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_linux_386.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
index ba952c675..ba952c675 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_linux_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
index ddac31f58..ddac31f58 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_linux_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
index 45ced17fc..45ced17fc 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_linux_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
index 2e9514f28..2e9514f28 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_linux_mips64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
index 5ffe1c719..5ffe1c719 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_linux_mips64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
index d192b940c..d192b940c 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
index e1b08f00d..e1b08f00d 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
index 45e63f51a..45e63f51a 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_linux_s390x.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
index 42d4f5cda..42d4f5cda 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
new file mode 100644
index 000000000..46b5bee1d
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
@@ -0,0 +1,348 @@
+// mksysnum_linux.pl /usr/include/sparc64-linux-gnu/asm/unistd.h
+// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
+
+// +build sparc64,linux
+
+package unix
+
+const (
+ SYS_RESTART_SYSCALL = 0
+ SYS_EXIT = 1
+ SYS_FORK = 2
+ SYS_READ = 3
+ SYS_WRITE = 4
+ SYS_OPEN = 5
+ SYS_CLOSE = 6
+ SYS_WAIT4 = 7
+ SYS_CREAT = 8
+ SYS_LINK = 9
+ SYS_UNLINK = 10
+ SYS_EXECV = 11
+ SYS_CHDIR = 12
+ SYS_CHOWN = 13
+ SYS_MKNOD = 14
+ SYS_CHMOD = 15
+ SYS_LCHOWN = 16
+ SYS_BRK = 17
+ SYS_PERFCTR = 18
+ SYS_LSEEK = 19
+ SYS_GETPID = 20
+ SYS_CAPGET = 21
+ SYS_CAPSET = 22
+ SYS_SETUID = 23
+ SYS_GETUID = 24
+ SYS_VMSPLICE = 25
+ SYS_PTRACE = 26
+ SYS_ALARM = 27
+ SYS_SIGALTSTACK = 28
+ SYS_PAUSE = 29
+ SYS_UTIME = 30
+ SYS_ACCESS = 33
+ SYS_NICE = 34
+ SYS_SYNC = 36
+ SYS_KILL = 37
+ SYS_STAT = 38
+ SYS_SENDFILE = 39
+ SYS_LSTAT = 40
+ SYS_DUP = 41
+ SYS_PIPE = 42
+ SYS_TIMES = 43
+ SYS_UMOUNT2 = 45
+ SYS_SETGID = 46
+ SYS_GETGID = 47
+ SYS_SIGNAL = 48
+ SYS_GETEUID = 49
+ SYS_GETEGID = 50
+ SYS_ACCT = 51
+ SYS_MEMORY_ORDERING = 52
+ SYS_IOCTL = 54
+ SYS_REBOOT = 55
+ SYS_SYMLINK = 57
+ SYS_READLINK = 58
+ SYS_EXECVE = 59
+ SYS_UMASK = 60
+ SYS_CHROOT = 61
+ SYS_FSTAT = 62
+ SYS_FSTAT64 = 63
+ SYS_GETPAGESIZE = 64
+ SYS_MSYNC = 65
+ SYS_VFORK = 66
+ SYS_PREAD64 = 67
+ SYS_PWRITE64 = 68
+ SYS_MMAP = 71
+ SYS_MUNMAP = 73
+ SYS_MPROTECT = 74
+ SYS_MADVISE = 75
+ SYS_VHANGUP = 76
+ SYS_MINCORE = 78
+ SYS_GETGROUPS = 79
+ SYS_SETGROUPS = 80
+ SYS_GETPGRP = 81
+ SYS_SETITIMER = 83
+ SYS_SWAPON = 85
+ SYS_GETITIMER = 86
+ SYS_SETHOSTNAME = 88
+ SYS_DUP2 = 90
+ SYS_FCNTL = 92
+ SYS_SELECT = 93
+ SYS_FSYNC = 95
+ SYS_SETPRIORITY = 96
+ SYS_SOCKET = 97
+ SYS_CONNECT = 98
+ SYS_ACCEPT = 99
+ SYS_GETPRIORITY = 100
+ SYS_RT_SIGRETURN = 101
+ SYS_RT_SIGACTION = 102
+ SYS_RT_SIGPROCMASK = 103
+ SYS_RT_SIGPENDING = 104
+ SYS_RT_SIGTIMEDWAIT = 105
+ SYS_RT_SIGQUEUEINFO = 106
+ SYS_RT_SIGSUSPEND = 107
+ SYS_SETRESUID = 108
+ SYS_GETRESUID = 109
+ SYS_SETRESGID = 110
+ SYS_GETRESGID = 111
+ SYS_RECVMSG = 113
+ SYS_SENDMSG = 114
+ SYS_GETTIMEOFDAY = 116
+ SYS_GETRUSAGE = 117
+ SYS_GETSOCKOPT = 118
+ SYS_GETCWD = 119
+ SYS_READV = 120
+ SYS_WRITEV = 121
+ SYS_SETTIMEOFDAY = 122
+ SYS_FCHOWN = 123
+ SYS_FCHMOD = 124
+ SYS_RECVFROM = 125
+ SYS_SETREUID = 126
+ SYS_SETREGID = 127
+ SYS_RENAME = 128
+ SYS_TRUNCATE = 129
+ SYS_FTRUNCATE = 130
+ SYS_FLOCK = 131
+ SYS_LSTAT64 = 132
+ SYS_SENDTO = 133
+ SYS_SHUTDOWN = 134
+ SYS_SOCKETPAIR = 135
+ SYS_MKDIR = 136
+ SYS_RMDIR = 137
+ SYS_UTIMES = 138
+ SYS_STAT64 = 139
+ SYS_SENDFILE64 = 140
+ SYS_GETPEERNAME = 141
+ SYS_FUTEX = 142
+ SYS_GETTID = 143
+ SYS_GETRLIMIT = 144
+ SYS_SETRLIMIT = 145
+ SYS_PIVOT_ROOT = 146
+ SYS_PRCTL = 147
+ SYS_PCICONFIG_READ = 148
+ SYS_PCICONFIG_WRITE = 149
+ SYS_GETSOCKNAME = 150
+ SYS_INOTIFY_INIT = 151
+ SYS_INOTIFY_ADD_WATCH = 152
+ SYS_POLL = 153
+ SYS_GETDENTS64 = 154
+ SYS_INOTIFY_RM_WATCH = 156
+ SYS_STATFS = 157
+ SYS_FSTATFS = 158
+ SYS_UMOUNT = 159
+ SYS_SCHED_SET_AFFINITY = 160
+ SYS_SCHED_GET_AFFINITY = 161
+ SYS_GETDOMAINNAME = 162
+ SYS_SETDOMAINNAME = 163
+ SYS_UTRAP_INSTALL = 164
+ SYS_QUOTACTL = 165
+ SYS_SET_TID_ADDRESS = 166
+ SYS_MOUNT = 167
+ SYS_USTAT = 168
+ SYS_SETXATTR = 169
+ SYS_LSETXATTR = 170
+ SYS_FSETXATTR = 171
+ SYS_GETXATTR = 172
+ SYS_LGETXATTR = 173
+ SYS_GETDENTS = 174
+ SYS_SETSID = 175
+ SYS_FCHDIR = 176
+ SYS_FGETXATTR = 177
+ SYS_LISTXATTR = 178
+ SYS_LLISTXATTR = 179
+ SYS_FLISTXATTR = 180
+ SYS_REMOVEXATTR = 181
+ SYS_LREMOVEXATTR = 182
+ SYS_SIGPENDING = 183
+ SYS_QUERY_MODULE = 184
+ SYS_SETPGID = 185
+ SYS_FREMOVEXATTR = 186
+ SYS_TKILL = 187
+ SYS_EXIT_GROUP = 188
+ SYS_UNAME = 189
+ SYS_INIT_MODULE = 190
+ SYS_PERSONALITY = 191
+ SYS_REMAP_FILE_PAGES = 192
+ SYS_EPOLL_CREATE = 193
+ SYS_EPOLL_CTL = 194
+ SYS_EPOLL_WAIT = 195
+ SYS_IOPRIO_SET = 196
+ SYS_GETPPID = 197
+ SYS_SIGACTION = 198
+ SYS_SGETMASK = 199
+ SYS_SSETMASK = 200
+ SYS_SIGSUSPEND = 201
+ SYS_OLDLSTAT = 202
+ SYS_USELIB = 203
+ SYS_READDIR = 204
+ SYS_READAHEAD = 205
+ SYS_SOCKETCALL = 206
+ SYS_SYSLOG = 207
+ SYS_LOOKUP_DCOOKIE = 208
+ SYS_FADVISE64 = 209
+ SYS_FADVISE64_64 = 210
+ SYS_TGKILL = 211
+ SYS_WAITPID = 212
+ SYS_SWAPOFF = 213
+ SYS_SYSINFO = 214
+ SYS_IPC = 215
+ SYS_SIGRETURN = 216
+ SYS_CLONE = 217
+ SYS_IOPRIO_GET = 218
+ SYS_ADJTIMEX = 219
+ SYS_SIGPROCMASK = 220
+ SYS_CREATE_MODULE = 221
+ SYS_DELETE_MODULE = 222
+ SYS_GET_KERNEL_SYMS = 223
+ SYS_GETPGID = 224
+ SYS_BDFLUSH = 225
+ SYS_SYSFS = 226
+ SYS_AFS_SYSCALL = 227
+ SYS_SETFSUID = 228
+ SYS_SETFSGID = 229
+ SYS__NEWSELECT = 230
+ SYS_SPLICE = 232
+ SYS_STIME = 233
+ SYS_STATFS64 = 234
+ SYS_FSTATFS64 = 235
+ SYS__LLSEEK = 236
+ SYS_MLOCK = 237
+ SYS_MUNLOCK = 238
+ SYS_MLOCKALL = 239
+ SYS_MUNLOCKALL = 240
+ SYS_SCHED_SETPARAM = 241
+ SYS_SCHED_GETPARAM = 242
+ SYS_SCHED_SETSCHEDULER = 243
+ SYS_SCHED_GETSCHEDULER = 244
+ SYS_SCHED_YIELD = 245
+ SYS_SCHED_GET_PRIORITY_MAX = 246
+ SYS_SCHED_GET_PRIORITY_MIN = 247
+ SYS_SCHED_RR_GET_INTERVAL = 248
+ SYS_NANOSLEEP = 249
+ SYS_MREMAP = 250
+ SYS__SYSCTL = 251
+ SYS_GETSID = 252
+ SYS_FDATASYNC = 253
+ SYS_NFSSERVCTL = 254
+ SYS_SYNC_FILE_RANGE = 255
+ SYS_CLOCK_SETTIME = 256
+ SYS_CLOCK_GETTIME = 257
+ SYS_CLOCK_GETRES = 258
+ SYS_CLOCK_NANOSLEEP = 259
+ SYS_SCHED_GETAFFINITY = 260
+ SYS_SCHED_SETAFFINITY = 261
+ SYS_TIMER_SETTIME = 262
+ SYS_TIMER_GETTIME = 263
+ SYS_TIMER_GETOVERRUN = 264
+ SYS_TIMER_DELETE = 265
+ SYS_TIMER_CREATE = 266
+ SYS_IO_SETUP = 268
+ SYS_IO_DESTROY = 269
+ SYS_IO_SUBMIT = 270
+ SYS_IO_CANCEL = 271
+ SYS_IO_GETEVENTS = 272
+ SYS_MQ_OPEN = 273
+ SYS_MQ_UNLINK = 274
+ SYS_MQ_TIMEDSEND = 275
+ SYS_MQ_TIMEDRECEIVE = 276
+ SYS_MQ_NOTIFY = 277
+ SYS_MQ_GETSETATTR = 278
+ SYS_WAITID = 279
+ SYS_TEE = 280
+ SYS_ADD_KEY = 281
+ SYS_REQUEST_KEY = 282
+ SYS_KEYCTL = 283
+ SYS_OPENAT = 284
+ SYS_MKDIRAT = 285
+ SYS_MKNODAT = 286
+ SYS_FCHOWNAT = 287
+ SYS_FUTIMESAT = 288
+ SYS_FSTATAT64 = 289
+ SYS_UNLINKAT = 290
+ SYS_RENAMEAT = 291
+ SYS_LINKAT = 292
+ SYS_SYMLINKAT = 293
+ SYS_READLINKAT = 294
+ SYS_FCHMODAT = 295
+ SYS_FACCESSAT = 296
+ SYS_PSELECT6 = 297
+ SYS_PPOLL = 298
+ SYS_UNSHARE = 299
+ SYS_SET_ROBUST_LIST = 300
+ SYS_GET_ROBUST_LIST = 301
+ SYS_MIGRATE_PAGES = 302
+ SYS_MBIND = 303
+ SYS_GET_MEMPOLICY = 304
+ SYS_SET_MEMPOLICY = 305
+ SYS_KEXEC_LOAD = 306
+ SYS_MOVE_PAGES = 307
+ SYS_GETCPU = 308
+ SYS_EPOLL_PWAIT = 309
+ SYS_UTIMENSAT = 310
+ SYS_SIGNALFD = 311
+ SYS_TIMERFD_CREATE = 312
+ SYS_EVENTFD = 313
+ SYS_FALLOCATE = 314
+ SYS_TIMERFD_SETTIME = 315
+ SYS_TIMERFD_GETTIME = 316
+ SYS_SIGNALFD4 = 317
+ SYS_EVENTFD2 = 318
+ SYS_EPOLL_CREATE1 = 319
+ SYS_DUP3 = 320
+ SYS_PIPE2 = 321
+ SYS_INOTIFY_INIT1 = 322
+ SYS_ACCEPT4 = 323
+ SYS_PREADV = 324
+ SYS_PWRITEV = 325
+ SYS_RT_TGSIGQUEUEINFO = 326
+ SYS_PERF_EVENT_OPEN = 327
+ SYS_RECVMMSG = 328
+ SYS_FANOTIFY_INIT = 329
+ SYS_FANOTIFY_MARK = 330
+ SYS_PRLIMIT64 = 331
+ SYS_NAME_TO_HANDLE_AT = 332
+ SYS_OPEN_BY_HANDLE_AT = 333
+ SYS_CLOCK_ADJTIME = 334
+ SYS_SYNCFS = 335
+ SYS_SENDMMSG = 336
+ SYS_SETNS = 337
+ SYS_PROCESS_VM_READV = 338
+ SYS_PROCESS_VM_WRITEV = 339
+ SYS_KERN_FEATURES = 340
+ SYS_KCMP = 341
+ SYS_FINIT_MODULE = 342
+ SYS_SCHED_SETATTR = 343
+ SYS_SCHED_GETATTR = 344
+ SYS_RENAMEAT2 = 345
+ SYS_SECCOMP = 346
+ SYS_GETRANDOM = 347
+ SYS_MEMFD_CREATE = 348
+ SYS_BPF = 349
+ SYS_EXECVEAT = 350
+ SYS_MEMBARRIER = 351
+ SYS_USERFAULTFD = 352
+ SYS_BIND = 353
+ SYS_LISTEN = 354
+ SYS_SETSOCKOPT = 355
+ SYS_MLOCK2 = 356
+ SYS_COPY_FILE_RANGE = 357
+ SYS_PREADV2 = 358
+ SYS_PWRITEV2 = 359
+)
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_netbsd_386.go b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go
index f60d8f988..f60d8f988 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_netbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go
index 48a91d464..48a91d464 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_netbsd_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go
index 612ba662c..612ba662c 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_netbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_openbsd_386.go b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go
index 3e8ce2a1d..3e8ce2a1d 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_openbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go
index bd28146dd..bd28146dd 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_solaris_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_solaris_amd64.go
index c70865985..c70865985 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/zsysnum_solaris_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_solaris_amd64.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_darwin_386.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_386.go
index 2de1d44e2..2de1d44e2 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_darwin_386.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_386.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_darwin_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go
index 044657878..044657878 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_darwin_amd64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_darwin_arm.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go
index 66df363ce..66df363ce 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_darwin_arm.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_darwin_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go
index 85d56eabd..85d56eabd 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_darwin_arm64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go
index 8a6f4e1ce..8a6f4e1ce 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_freebsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go
index 8cf30947b..8cf30947b 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_freebsd_386.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go
index e5feb207b..e5feb207b 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_freebsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_freebsd_arm.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go
index 5472b5428..5472b5428 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_freebsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_linux_386.go b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
index f3ddf5345..f3ddf5345 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_linux_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
index a923bef35..a923bef35 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_linux_arm.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
index 817ac9c29..35f11bd1b 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
@@ -1,6 +1,6 @@
// +build arm,linux
// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_linux.go
+// cgo -godefs types_linux.go | go run mkpost.go
package unix
@@ -155,6 +155,15 @@ type Flock_t struct {
Pad_cgo_1 [4]byte
}
+const (
+ FADV_NORMAL = 0x0
+ FADV_RANDOM = 0x1
+ FADV_SEQUENTIAL = 0x2
+ FADV_WILLNEED = 0x3
+ FADV_DONTNEED = 0x4
+ FADV_NOREUSE = 0x5
+)
+
type RawSockaddrInet4 struct {
Family uint16
Port uint16
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_linux_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
index e786addf7..e786addf7 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_linux_mips64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
index b29894deb..b29894deb 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_linux_mips64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_linux_mips64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
index d9af71b69..d9af71b69 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_linux_mips64le.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_linux_ppc64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
index 4218170a9..4218170a9 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_linux_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
index 7db4c78c6..7db4c78c6 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_linux_s390x.go b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
index 76ee57cbf..76ee57cbf 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
new file mode 100644
index 000000000..7d18b704a
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
@@ -0,0 +1,640 @@
+// +build sparc64,linux
+// Created by cgo -godefs - DO NOT EDIT
+// cgo -godefs types_linux.go | go run mkpost.go
+
+package unix
+
+const (
+ sizeofPtr = 0x8
+ sizeofShort = 0x2
+ sizeofInt = 0x4
+ sizeofLong = 0x8
+ sizeofLongLong = 0x8
+ PathMax = 0x1000
+)
+
+type (
+ _C_short int16
+ _C_int int32
+ _C_long int64
+ _C_long_long int64
+)
+
+type Timespec struct {
+ Sec int64
+ Nsec int64
+}
+
+type Timeval struct {
+ Sec int64
+ Usec int32
+ Pad_cgo_0 [4]byte
+}
+
+type Timex struct {
+ Modes uint32
+ Pad_cgo_0 [4]byte
+ Offset int64
+ Freq int64
+ Maxerror int64
+ Esterror int64
+ Status int32
+ Pad_cgo_1 [4]byte
+ Constant int64
+ Precision int64
+ Tolerance int64
+ Time Timeval
+ Tick int64
+ Ppsfreq int64
+ Jitter int64
+ Shift int32
+ Pad_cgo_2 [4]byte
+ Stabil int64
+ Jitcnt int64
+ Calcnt int64
+ Errcnt int64
+ Stbcnt int64
+ Tai int32
+ Pad_cgo_3 [44]byte
+}
+
+type Time_t int64
+
+type Tms struct {
+ Utime int64
+ Stime int64
+ Cutime int64
+ Cstime int64
+}
+
+type Utimbuf struct {
+ Actime int64
+ Modtime int64
+}
+
+type Rusage struct {
+ Utime Timeval
+ Stime Timeval
+ Maxrss int64
+ Ixrss int64
+ Idrss int64
+ Isrss int64
+ Minflt int64
+ Majflt int64
+ Nswap int64
+ Inblock int64
+ Oublock int64
+ Msgsnd int64
+ Msgrcv int64
+ Nsignals int64
+ Nvcsw int64
+ Nivcsw int64
+}
+
+type Rlimit struct {
+ Cur uint64
+ Max uint64
+}
+
+type _Gid_t uint32
+
+type Stat_t struct {
+ Dev uint64
+ X__pad1 uint16
+ Pad_cgo_0 [6]byte
+ Ino uint64
+ Mode uint32
+ Nlink uint32
+ Uid uint32
+ Gid uint32
+ Rdev uint64
+ X__pad2 uint16
+ Pad_cgo_1 [6]byte
+ Size int64
+ Blksize int64
+ Blocks int64
+ Atim Timespec
+ Mtim Timespec
+ Ctim Timespec
+ X__glibc_reserved4 uint64
+ X__glibc_reserved5 uint64
+}
+
+type Statfs_t struct {
+ Type int64
+ Bsize int64
+ Blocks uint64
+ Bfree uint64
+ Bavail uint64
+ Files uint64
+ Ffree uint64
+ Fsid Fsid
+ Namelen int64
+ Frsize int64
+ Flags int64
+ Spare [4]int64
+}
+
+type Dirent struct {
+ Ino uint64
+ Off int64
+ Reclen uint16
+ Type uint8
+ Name [256]int8
+ Pad_cgo_0 [5]byte
+}
+
+type Fsid struct {
+ X__val [2]int32
+}
+
+type Flock_t struct {
+ Type int16
+ Whence int16
+ Pad_cgo_0 [4]byte
+ Start int64
+ Len int64
+ Pid int32
+ X__glibc_reserved int16
+ Pad_cgo_1 [2]byte
+}
+
+const (
+ FADV_NORMAL = 0x0
+ FADV_RANDOM = 0x1
+ FADV_SEQUENTIAL = 0x2
+ FADV_WILLNEED = 0x3
+ FADV_DONTNEED = 0x4
+ FADV_NOREUSE = 0x5
+)
+
+type RawSockaddrInet4 struct {
+ Family uint16
+ Port uint16
+ Addr [4]byte /* in_addr */
+ Zero [8]uint8
+}
+
+type RawSockaddrInet6 struct {
+ Family uint16
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+type RawSockaddrUnix struct {
+ Family uint16
+ Path [108]int8
+}
+
+type RawSockaddrLinklayer struct {
+ Family uint16
+ Protocol uint16
+ Ifindex int32
+ Hatype uint16
+ Pkttype uint8
+ Halen uint8
+ Addr [8]uint8
+}
+
+type RawSockaddrNetlink struct {
+ Family uint16
+ Pad uint16
+ Pid uint32
+ Groups uint32
+}
+
+type RawSockaddrHCI struct {
+ Family uint16
+ Dev uint16
+ Channel uint16
+}
+
+type RawSockaddr struct {
+ Family uint16
+ Data [14]int8
+}
+
+type RawSockaddrAny struct {
+ Addr RawSockaddr
+ Pad [96]int8
+}
+
+type _Socklen uint32
+
+type Linger struct {
+ Onoff int32
+ Linger int32
+}
+
+type Iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type IPMreq struct {
+ Multiaddr [4]byte /* in_addr */
+ Interface [4]byte /* in_addr */
+}
+
+type IPMreqn struct {
+ Multiaddr [4]byte /* in_addr */
+ Address [4]byte /* in_addr */
+ Ifindex int32
+}
+
+type IPv6Mreq struct {
+ Multiaddr [16]byte /* in6_addr */
+ Interface uint32
+}
+
+type Msghdr struct {
+ Name *byte
+ Namelen uint32
+ Pad_cgo_0 [4]byte
+ Iov *Iovec
+ Iovlen uint64
+ Control *byte
+ Controllen uint64
+ Flags int32
+ Pad_cgo_1 [4]byte
+}
+
+type Cmsghdr struct {
+ Len uint64
+ Level int32
+ Type int32
+}
+
+type Inet4Pktinfo struct {
+ Ifindex int32
+ Spec_dst [4]byte /* in_addr */
+ Addr [4]byte /* in_addr */
+}
+
+type Inet6Pktinfo struct {
+ Addr [16]byte /* in6_addr */
+ Ifindex uint32
+}
+
+type IPv6MTUInfo struct {
+ Addr RawSockaddrInet6
+ Mtu uint32
+}
+
+type ICMPv6Filter struct {
+ Data [8]uint32
+}
+
+type Ucred struct {
+ Pid int32
+ Uid uint32
+ Gid uint32
+}
+
+type TCPInfo struct {
+ State uint8
+ Ca_state uint8
+ Retransmits uint8
+ Probes uint8
+ Backoff uint8
+ Options uint8
+ Pad_cgo_0 [2]byte
+ Rto uint32
+ Ato uint32
+ Snd_mss uint32
+ Rcv_mss uint32
+ Unacked uint32
+ Sacked uint32
+ Lost uint32
+ Retrans uint32
+ Fackets uint32
+ Last_data_sent uint32
+ Last_ack_sent uint32
+ Last_data_recv uint32
+ Last_ack_recv uint32
+ Pmtu uint32
+ Rcv_ssthresh uint32
+ Rtt uint32
+ Rttvar uint32
+ Snd_ssthresh uint32
+ Snd_cwnd uint32
+ Advmss uint32
+ Reordering uint32
+ Rcv_rtt uint32
+ Rcv_space uint32
+ Total_retrans uint32
+}
+
+const (
+ SizeofSockaddrInet4 = 0x10
+ SizeofSockaddrInet6 = 0x1c
+ SizeofSockaddrAny = 0x70
+ SizeofSockaddrUnix = 0x6e
+ SizeofSockaddrLinklayer = 0x14
+ SizeofSockaddrNetlink = 0xc
+ SizeofSockaddrHCI = 0x6
+ SizeofLinger = 0x8
+ SizeofIPMreq = 0x8
+ SizeofIPMreqn = 0xc
+ SizeofIPv6Mreq = 0x14
+ SizeofMsghdr = 0x38
+ SizeofCmsghdr = 0x10
+ SizeofInet4Pktinfo = 0xc
+ SizeofInet6Pktinfo = 0x14
+ SizeofIPv6MTUInfo = 0x20
+ SizeofICMPv6Filter = 0x20
+ SizeofUcred = 0xc
+ SizeofTCPInfo = 0x68
+)
+
+const (
+ IFA_UNSPEC = 0x0
+ IFA_ADDRESS = 0x1
+ IFA_LOCAL = 0x2
+ IFA_LABEL = 0x3
+ IFA_BROADCAST = 0x4
+ IFA_ANYCAST = 0x5
+ IFA_CACHEINFO = 0x6
+ IFA_MULTICAST = 0x7
+ IFLA_UNSPEC = 0x0
+ IFLA_ADDRESS = 0x1
+ IFLA_BROADCAST = 0x2
+ IFLA_IFNAME = 0x3
+ IFLA_MTU = 0x4
+ IFLA_LINK = 0x5
+ IFLA_QDISC = 0x6
+ IFLA_STATS = 0x7
+ IFLA_COST = 0x8
+ IFLA_PRIORITY = 0x9
+ IFLA_MASTER = 0xa
+ IFLA_WIRELESS = 0xb
+ IFLA_PROTINFO = 0xc
+ IFLA_TXQLEN = 0xd
+ IFLA_MAP = 0xe
+ IFLA_WEIGHT = 0xf
+ IFLA_OPERSTATE = 0x10
+ IFLA_LINKMODE = 0x11
+ IFLA_LINKINFO = 0x12
+ IFLA_NET_NS_PID = 0x13
+ IFLA_IFALIAS = 0x14
+ IFLA_MAX = 0x2a
+ RT_SCOPE_UNIVERSE = 0x0
+ RT_SCOPE_SITE = 0xc8
+ RT_SCOPE_LINK = 0xfd
+ RT_SCOPE_HOST = 0xfe
+ RT_SCOPE_NOWHERE = 0xff
+ RT_TABLE_UNSPEC = 0x0
+ RT_TABLE_COMPAT = 0xfc
+ RT_TABLE_DEFAULT = 0xfd
+ RT_TABLE_MAIN = 0xfe
+ RT_TABLE_LOCAL = 0xff
+ RT_TABLE_MAX = 0xffffffff
+ RTA_UNSPEC = 0x0
+ RTA_DST = 0x1
+ RTA_SRC = 0x2
+ RTA_IIF = 0x3
+ RTA_OIF = 0x4
+ RTA_GATEWAY = 0x5
+ RTA_PRIORITY = 0x6
+ RTA_PREFSRC = 0x7
+ RTA_METRICS = 0x8
+ RTA_MULTIPATH = 0x9
+ RTA_FLOW = 0xb
+ RTA_CACHEINFO = 0xc
+ RTA_TABLE = 0xf
+ RTN_UNSPEC = 0x0
+ RTN_UNICAST = 0x1
+ RTN_LOCAL = 0x2
+ RTN_BROADCAST = 0x3
+ RTN_ANYCAST = 0x4
+ RTN_MULTICAST = 0x5
+ RTN_BLACKHOLE = 0x6
+ RTN_UNREACHABLE = 0x7
+ RTN_PROHIBIT = 0x8
+ RTN_THROW = 0x9
+ RTN_NAT = 0xa
+ RTN_XRESOLVE = 0xb
+ RTNLGRP_NONE = 0x0
+ RTNLGRP_LINK = 0x1
+ RTNLGRP_NOTIFY = 0x2
+ RTNLGRP_NEIGH = 0x3
+ RTNLGRP_TC = 0x4
+ RTNLGRP_IPV4_IFADDR = 0x5
+ RTNLGRP_IPV4_MROUTE = 0x6
+ RTNLGRP_IPV4_ROUTE = 0x7
+ RTNLGRP_IPV4_RULE = 0x8
+ RTNLGRP_IPV6_IFADDR = 0x9
+ RTNLGRP_IPV6_MROUTE = 0xa
+ RTNLGRP_IPV6_ROUTE = 0xb
+ RTNLGRP_IPV6_IFINFO = 0xc
+ RTNLGRP_IPV6_PREFIX = 0x12
+ RTNLGRP_IPV6_RULE = 0x13
+ RTNLGRP_ND_USEROPT = 0x14
+ SizeofNlMsghdr = 0x10
+ SizeofNlMsgerr = 0x14
+ SizeofRtGenmsg = 0x1
+ SizeofNlAttr = 0x4
+ SizeofRtAttr = 0x4
+ SizeofIfInfomsg = 0x10
+ SizeofIfAddrmsg = 0x8
+ SizeofRtMsg = 0xc
+ SizeofRtNexthop = 0x8
+)
+
+type NlMsghdr struct {
+ Len uint32
+ Type uint16
+ Flags uint16
+ Seq uint32
+ Pid uint32
+}
+
+type NlMsgerr struct {
+ Error int32
+ Msg NlMsghdr
+}
+
+type RtGenmsg struct {
+ Family uint8
+}
+
+type NlAttr struct {
+ Len uint16
+ Type uint16
+}
+
+type RtAttr struct {
+ Len uint16
+ Type uint16
+}
+
+type IfInfomsg struct {
+ Family uint8
+ X__ifi_pad uint8
+ Type uint16
+ Index int32
+ Flags uint32
+ Change uint32
+}
+
+type IfAddrmsg struct {
+ Family uint8
+ Prefixlen uint8
+ Flags uint8
+ Scope uint8
+ Index uint32
+}
+
+type RtMsg struct {
+ Family uint8
+ Dst_len uint8
+ Src_len uint8
+ Tos uint8
+ Table uint8
+ Protocol uint8
+ Scope uint8
+ Type uint8
+ Flags uint32
+}
+
+type RtNexthop struct {
+ Len uint16
+ Flags uint8
+ Hops uint8
+ Ifindex int32
+}
+
+const (
+ SizeofSockFilter = 0x8
+ SizeofSockFprog = 0x10
+)
+
+type SockFilter struct {
+ Code uint16
+ Jt uint8
+ Jf uint8
+ K uint32
+}
+
+type SockFprog struct {
+ Len uint16
+ Pad_cgo_0 [6]byte
+ Filter *SockFilter
+}
+
+type InotifyEvent struct {
+ Wd int32
+ Mask uint32
+ Cookie uint32
+ Len uint32
+}
+
+const SizeofInotifyEvent = 0x10
+
+type PtraceRegs struct {
+ Regs [16]uint64
+ Tstate uint64
+ Tpc uint64
+ Tnpc uint64
+ Y uint32
+ Magic uint32
+}
+
+type ptracePsw struct {
+}
+
+type ptraceFpregs struct {
+}
+
+type ptracePer struct {
+}
+
+type FdSet struct {
+ Bits [16]int64
+}
+
+type Sysinfo_t struct {
+ Uptime int64
+ Loads [3]uint64
+ Totalram uint64
+ Freeram uint64
+ Sharedram uint64
+ Bufferram uint64
+ Totalswap uint64
+ Freeswap uint64
+ Procs uint16
+ Pad uint16
+ Pad_cgo_0 [4]byte
+ Totalhigh uint64
+ Freehigh uint64
+ Unit uint32
+ X_f [0]int8
+ Pad_cgo_1 [4]byte
+}
+
+type Utsname struct {
+ Sysname [65]int8
+ Nodename [65]int8
+ Release [65]int8
+ Version [65]int8
+ Machine [65]int8
+ Domainname [65]int8
+}
+
+type Ustat_t struct {
+ Tfree int32
+ Pad_cgo_0 [4]byte
+ Tinode uint64
+ Fname [6]int8
+ Fpack [6]int8
+ Pad_cgo_1 [4]byte
+}
+
+type EpollEvent struct {
+ Events uint32
+ X_padFd int32
+ Fd int32
+ Pad int32
+}
+
+const (
+ AT_FDCWD = -0x64
+ AT_REMOVEDIR = 0x200
+ AT_SYMLINK_FOLLOW = 0x400
+ AT_SYMLINK_NOFOLLOW = 0x100
+)
+
+type PollFd struct {
+ Fd int32
+ Events int16
+ Revents int16
+}
+
+const (
+ POLLIN = 0x1
+ POLLPRI = 0x2
+ POLLOUT = 0x4
+ POLLRDHUP = 0x800
+ POLLERR = 0x8
+ POLLHUP = 0x10
+ POLLNVAL = 0x20
+)
+
+type Sigset_t struct {
+ X__val [16]uint64
+}
+
+const _SC_PAGESIZE = 0x1e
+
+type Termios struct {
+ Iflag uint32
+ Oflag uint32
+ Cflag uint32
+ Lflag uint32
+ Line uint8
+ Cc [19]uint8
+ Ispeed uint32
+ Ospeed uint32
+}
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_netbsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go
index caf755fb8..caf755fb8 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_netbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go
index 91b4a5305..91b4a5305 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_netbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_netbsd_arm.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go
index c0758f9d3..c0758f9d3 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_netbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_openbsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go
index 860a46979..860a46979 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_openbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go
index 23c52727f..23c52727f 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_openbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_solaris_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go
index b3b928a51..02777e4d8 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/ztypes_solaris_amd64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go
@@ -1,6 +1,6 @@
// +build amd64,solaris
// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_solaris.go
+// cgo -godefs types_solaris.go | go run mkpost.go
package unix
@@ -11,6 +11,7 @@ const (
sizeofLong = 0x8
sizeofLongLong = 0x8
PathMax = 0x400
+ MaxHostNameLen = 0x100
)
type (
diff --git a/vendor/golang.org/x/text/.gitattributes b/vendor/golang.org/x/text/.gitattributes
new file mode 100644
index 000000000..d2f212e5d
--- /dev/null
+++ b/vendor/golang.org/x/text/.gitattributes
@@ -0,0 +1,10 @@
+# Treat all files in this repo as binary, with no git magic updating
+# line endings. Windows users contributing to Go will need to use a
+# modern version of git and editors capable of LF line endings.
+#
+# We'll prevent accidental CRLF line endings from entering the repo
+# via the git-review gofmt checks.
+#
+# See golang.org/issue/9281
+
+* -text
diff --git a/vendor/golang.org/x/text/.gitignore b/vendor/golang.org/x/text/.gitignore
new file mode 100644
index 000000000..782aa6b4c
--- /dev/null
+++ b/vendor/golang.org/x/text/.gitignore
@@ -0,0 +1,3 @@
+# Add no patterns to .gitignore except for files generated by the build.
+last-change
+/DATA
diff --git a/vendor/golang.org/x/text/AUTHORS b/vendor/golang.org/x/text/AUTHORS
new file mode 100644
index 000000000..15167cd74
--- /dev/null
+++ b/vendor/golang.org/x/text/AUTHORS
@@ -0,0 +1,3 @@
+# This source code refers to The Go Authors for copyright purposes.
+# The master list of authors is in the main Go distribution,
+# visible at http://tip.golang.org/AUTHORS.
diff --git a/vendor/golang.org/x/text/CONTRIBUTING.md b/vendor/golang.org/x/text/CONTRIBUTING.md
new file mode 100644
index 000000000..88dff59bc
--- /dev/null
+++ b/vendor/golang.org/x/text/CONTRIBUTING.md
@@ -0,0 +1,31 @@
+# Contributing to Go
+
+Go is an open source project.
+
+It is the work of hundreds of contributors. We appreciate your help!
+
+
+## Filing issues
+
+When [filing an issue](https://golang.org/issue/new), make sure to answer these five questions:
+
+1. What version of Go are you using (`go version`)?
+2. What operating system and processor architecture are you using?
+3. What did you do?
+4. What did you expect to see?
+5. What did you see instead?
+
+General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker.
+The gophers there will answer or ask you to file an issue if you've tripped over a bug.
+
+## Contributing code
+
+Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html)
+before sending patches.
+
+**We do not accept GitHub pull requests**
+(we use [Gerrit](https://code.google.com/p/gerrit/) instead for code review).
+
+Unless otherwise noted, the Go source files are distributed under
+the BSD-style license found in the LICENSE file.
+
diff --git a/vendor/golang.org/x/text/CONTRIBUTORS b/vendor/golang.org/x/text/CONTRIBUTORS
new file mode 100644
index 000000000..1c4577e96
--- /dev/null
+++ b/vendor/golang.org/x/text/CONTRIBUTORS
@@ -0,0 +1,3 @@
+# This source code was written by the Go contributors.
+# The master list of contributors is in the main Go distribution,
+# visible at http://tip.golang.org/CONTRIBUTORS.
diff --git a/Godeps/_workspace/src/golang.org/x/tools/LICENSE b/vendor/golang.org/x/text/LICENSE
index 6a66aea5e..6a66aea5e 100644
--- a/Godeps/_workspace/src/golang.org/x/tools/LICENSE
+++ b/vendor/golang.org/x/text/LICENSE
diff --git a/Godeps/_workspace/src/golang.org/x/text/PATENTS b/vendor/golang.org/x/text/PATENTS
index 733099041..733099041 100644
--- a/Godeps/_workspace/src/golang.org/x/text/PATENTS
+++ b/vendor/golang.org/x/text/PATENTS
diff --git a/vendor/golang.org/x/text/README b/vendor/golang.org/x/text/README
new file mode 100644
index 000000000..4826fe8fb
--- /dev/null
+++ b/vendor/golang.org/x/text/README
@@ -0,0 +1,23 @@
+This repository holds supplementary Go libraries for text processing, many involving Unicode.
+
+To submit changes to this repository, see http://golang.org/doc/contribute.html.
+
+To generate the tables in this repository (except for the encoding tables),
+run go generate from this directory. By default tables are generated for the
+Unicode version in core and the CLDR version defined in
+golang.org/x/text/unicode/cldr.
+
+Running go generate will as a side effect create a DATA subdirectory in this
+directory which holds all files that are used as a source for generating the
+tables. This directory will also serve as a cache.
+
+Run
+
+ go test ./...
+
+from this directory to run all tests. Add the "-tags icu" flag to also run
+ICU conformance tests (if available). This requires that you have the correct
+ICU version installed on your system.
+
+TODO:
+- updating unversioned source files. \ No newline at end of file
diff --git a/vendor/golang.org/x/text/codereview.cfg b/vendor/golang.org/x/text/codereview.cfg
new file mode 100644
index 000000000..3f8b14b64
--- /dev/null
+++ b/vendor/golang.org/x/text/codereview.cfg
@@ -0,0 +1 @@
+issuerepo: golang/go
diff --git a/Godeps/_workspace/src/golang.org/x/text/encoding/charmap/charmap.go b/vendor/golang.org/x/text/encoding/charmap/charmap.go
index 2a953075d..6e62a8374 100644
--- a/Godeps/_workspace/src/golang.org/x/text/encoding/charmap/charmap.go
+++ b/vendor/golang.org/x/text/encoding/charmap/charmap.go
@@ -6,7 +6,7 @@
// Package charmap provides simple character encodings such as IBM Code Page 437
// and Windows 1252.
-package charmap
+package charmap // import "golang.org/x/text/encoding/charmap"
import (
"unicode/utf8"
diff --git a/Godeps/_workspace/src/golang.org/x/text/encoding/charmap/maketables.go b/vendor/golang.org/x/text/encoding/charmap/maketables.go
index 099108121..9672c552d 100644
--- a/Godeps/_workspace/src/golang.org/x/text/encoding/charmap/maketables.go
+++ b/vendor/golang.org/x/text/encoding/charmap/maketables.go
@@ -74,6 +74,14 @@ var encodings = []struct {
"http://source.icu-project.org/repos/icu/data/trunk/charset/data/ucm/windows-858-2000.ucm",
},
{
+ "IBM Code Page 860",
+ "IBM860",
+ "",
+ "CodePage860",
+ encoding.ASCIISub,
+ "http://source.icu-project.org/repos/icu/data/trunk/charset/data/ucm/glibc-IBM860-2.1.2.ucm",
+ },
+ {
"IBM Code Page 862",
"PC862LatinHebrew",
"",
@@ -82,6 +90,22 @@ var encodings = []struct {
"http://source.icu-project.org/repos/icu/data/trunk/charset/data/ucm/glibc-IBM862-2.1.2.ucm",
},
{
+ "IBM Code Page 863",
+ "IBM863",
+ "",
+ "CodePage863",
+ encoding.ASCIISub,
+ "http://source.icu-project.org/repos/icu/data/trunk/charset/data/ucm/glibc-IBM863-2.1.2.ucm",
+ },
+ {
+ "IBM Code Page 865",
+ "IBM865",
+ "",
+ "CodePage865",
+ encoding.ASCIISub,
+ "http://source.icu-project.org/repos/icu/data/trunk/charset/data/ucm/glibc-IBM865-2.1.2.ucm",
+ },
+ {
"IBM Code Page 866",
"IBM866",
"",
diff --git a/Godeps/_workspace/src/golang.org/x/text/encoding/charmap/tables.go b/vendor/golang.org/x/text/encoding/charmap/tables.go
index 2bcef84d3..5ae8dbcfa 100644
--- a/Godeps/_workspace/src/golang.org/x/text/encoding/charmap/tables.go
+++ b/vendor/golang.org/x/text/encoding/charmap/tables.go
@@ -882,6 +882,181 @@ var codePage858 = charmap{
},
}
+// CodePage860 is the IBM Code Page 860 encoding.
+var CodePage860 encoding.Encoding = &codePage860
+
+var codePage860 = charmap{
+ name: "IBM Code Page 860",
+ mib: identifier.IBM860,
+ asciiSuperset: true,
+ low: 0x80,
+ replacement: 0x1a,
+ decode: [256]utf8Enc{
+ {1, [3]byte{0x00, 0x00, 0x00}}, {1, [3]byte{0x01, 0x00, 0x00}},
+ {1, [3]byte{0x02, 0x00, 0x00}}, {1, [3]byte{0x03, 0x00, 0x00}},
+ {1, [3]byte{0x04, 0x00, 0x00}}, {1, [3]byte{0x05, 0x00, 0x00}},
+ {1, [3]byte{0x06, 0x00, 0x00}}, {1, [3]byte{0x07, 0x00, 0x00}},
+ {1, [3]byte{0x08, 0x00, 0x00}}, {1, [3]byte{0x09, 0x00, 0x00}},
+ {1, [3]byte{0x0a, 0x00, 0x00}}, {1, [3]byte{0x0b, 0x00, 0x00}},
+ {1, [3]byte{0x0c, 0x00, 0x00}}, {1, [3]byte{0x0d, 0x00, 0x00}},
+ {1, [3]byte{0x0e, 0x00, 0x00}}, {1, [3]byte{0x0f, 0x00, 0x00}},
+ {1, [3]byte{0x10, 0x00, 0x00}}, {1, [3]byte{0x11, 0x00, 0x00}},
+ {1, [3]byte{0x12, 0x00, 0x00}}, {1, [3]byte{0x13, 0x00, 0x00}},
+ {1, [3]byte{0x14, 0x00, 0x00}}, {1, [3]byte{0x15, 0x00, 0x00}},
+ {1, [3]byte{0x16, 0x00, 0x00}}, {1, [3]byte{0x17, 0x00, 0x00}},
+ {1, [3]byte{0x18, 0x00, 0x00}}, {1, [3]byte{0x19, 0x00, 0x00}},
+ {1, [3]byte{0x1a, 0x00, 0x00}}, {1, [3]byte{0x1b, 0x00, 0x00}},
+ {1, [3]byte{0x1c, 0x00, 0x00}}, {1, [3]byte{0x1d, 0x00, 0x00}},
+ {1, [3]byte{0x1e, 0x00, 0x00}}, {1, [3]byte{0x1f, 0x00, 0x00}},
+ {1, [3]byte{0x20, 0x00, 0x00}}, {1, [3]byte{0x21, 0x00, 0x00}},
+ {1, [3]byte{0x22, 0x00, 0x00}}, {1, [3]byte{0x23, 0x00, 0x00}},
+ {1, [3]byte{0x24, 0x00, 0x00}}, {1, [3]byte{0x25, 0x00, 0x00}},
+ {1, [3]byte{0x26, 0x00, 0x00}}, {1, [3]byte{0x27, 0x00, 0x00}},
+ {1, [3]byte{0x28, 0x00, 0x00}}, {1, [3]byte{0x29, 0x00, 0x00}},
+ {1, [3]byte{0x2a, 0x00, 0x00}}, {1, [3]byte{0x2b, 0x00, 0x00}},
+ {1, [3]byte{0x2c, 0x00, 0x00}}, {1, [3]byte{0x2d, 0x00, 0x00}},
+ {1, [3]byte{0x2e, 0x00, 0x00}}, {1, [3]byte{0x2f, 0x00, 0x00}},
+ {1, [3]byte{0x30, 0x00, 0x00}}, {1, [3]byte{0x31, 0x00, 0x00}},
+ {1, [3]byte{0x32, 0x00, 0x00}}, {1, [3]byte{0x33, 0x00, 0x00}},
+ {1, [3]byte{0x34, 0x00, 0x00}}, {1, [3]byte{0x35, 0x00, 0x00}},
+ {1, [3]byte{0x36, 0x00, 0x00}}, {1, [3]byte{0x37, 0x00, 0x00}},
+ {1, [3]byte{0x38, 0x00, 0x00}}, {1, [3]byte{0x39, 0x00, 0x00}},
+ {1, [3]byte{0x3a, 0x00, 0x00}}, {1, [3]byte{0x3b, 0x00, 0x00}},
+ {1, [3]byte{0x3c, 0x00, 0x00}}, {1, [3]byte{0x3d, 0x00, 0x00}},
+ {1, [3]byte{0x3e, 0x00, 0x00}}, {1, [3]byte{0x3f, 0x00, 0x00}},
+ {1, [3]byte{0x40, 0x00, 0x00}}, {1, [3]byte{0x41, 0x00, 0x00}},
+ {1, [3]byte{0x42, 0x00, 0x00}}, {1, [3]byte{0x43, 0x00, 0x00}},
+ {1, [3]byte{0x44, 0x00, 0x00}}, {1, [3]byte{0x45, 0x00, 0x00}},
+ {1, [3]byte{0x46, 0x00, 0x00}}, {1, [3]byte{0x47, 0x00, 0x00}},
+ {1, [3]byte{0x48, 0x00, 0x00}}, {1, [3]byte{0x49, 0x00, 0x00}},
+ {1, [3]byte{0x4a, 0x00, 0x00}}, {1, [3]byte{0x4b, 0x00, 0x00}},
+ {1, [3]byte{0x4c, 0x00, 0x00}}, {1, [3]byte{0x4d, 0x00, 0x00}},
+ {1, [3]byte{0x4e, 0x00, 0x00}}, {1, [3]byte{0x4f, 0x00, 0x00}},
+ {1, [3]byte{0x50, 0x00, 0x00}}, {1, [3]byte{0x51, 0x00, 0x00}},
+ {1, [3]byte{0x52, 0x00, 0x00}}, {1, [3]byte{0x53, 0x00, 0x00}},
+ {1, [3]byte{0x54, 0x00, 0x00}}, {1, [3]byte{0x55, 0x00, 0x00}},
+ {1, [3]byte{0x56, 0x00, 0x00}}, {1, [3]byte{0x57, 0x00, 0x00}},
+ {1, [3]byte{0x58, 0x00, 0x00}}, {1, [3]byte{0x59, 0x00, 0x00}},
+ {1, [3]byte{0x5a, 0x00, 0x00}}, {1, [3]byte{0x5b, 0x00, 0x00}},
+ {1, [3]byte{0x5c, 0x00, 0x00}}, {1, [3]byte{0x5d, 0x00, 0x00}},
+ {1, [3]byte{0x5e, 0x00, 0x00}}, {1, [3]byte{0x5f, 0x00, 0x00}},
+ {1, [3]byte{0x60, 0x00, 0x00}}, {1, [3]byte{0x61, 0x00, 0x00}},
+ {1, [3]byte{0x62, 0x00, 0x00}}, {1, [3]byte{0x63, 0x00, 0x00}},
+ {1, [3]byte{0x64, 0x00, 0x00}}, {1, [3]byte{0x65, 0x00, 0x00}},
+ {1, [3]byte{0x66, 0x00, 0x00}}, {1, [3]byte{0x67, 0x00, 0x00}},
+ {1, [3]byte{0x68, 0x00, 0x00}}, {1, [3]byte{0x69, 0x00, 0x00}},
+ {1, [3]byte{0x6a, 0x00, 0x00}}, {1, [3]byte{0x6b, 0x00, 0x00}},
+ {1, [3]byte{0x6c, 0x00, 0x00}}, {1, [3]byte{0x6d, 0x00, 0x00}},
+ {1, [3]byte{0x6e, 0x00, 0x00}}, {1, [3]byte{0x6f, 0x00, 0x00}},
+ {1, [3]byte{0x70, 0x00, 0x00}}, {1, [3]byte{0x71, 0x00, 0x00}},
+ {1, [3]byte{0x72, 0x00, 0x00}}, {1, [3]byte{0x73, 0x00, 0x00}},
+ {1, [3]byte{0x74, 0x00, 0x00}}, {1, [3]byte{0x75, 0x00, 0x00}},
+ {1, [3]byte{0x76, 0x00, 0x00}}, {1, [3]byte{0x77, 0x00, 0x00}},
+ {1, [3]byte{0x78, 0x00, 0x00}}, {1, [3]byte{0x79, 0x00, 0x00}},
+ {1, [3]byte{0x7a, 0x00, 0x00}}, {1, [3]byte{0x7b, 0x00, 0x00}},
+ {1, [3]byte{0x7c, 0x00, 0x00}}, {1, [3]byte{0x7d, 0x00, 0x00}},
+ {1, [3]byte{0x7e, 0x00, 0x00}}, {1, [3]byte{0x7f, 0x00, 0x00}},
+ {2, [3]byte{0xc3, 0x87, 0x00}}, {2, [3]byte{0xc3, 0xbc, 0x00}},
+ {2, [3]byte{0xc3, 0xa9, 0x00}}, {2, [3]byte{0xc3, 0xa2, 0x00}},
+ {2, [3]byte{0xc3, 0xa3, 0x00}}, {2, [3]byte{0xc3, 0xa0, 0x00}},
+ {2, [3]byte{0xc3, 0x81, 0x00}}, {2, [3]byte{0xc3, 0xa7, 0x00}},
+ {2, [3]byte{0xc3, 0xaa, 0x00}}, {2, [3]byte{0xc3, 0x8a, 0x00}},
+ {2, [3]byte{0xc3, 0xa8, 0x00}}, {2, [3]byte{0xc3, 0x8d, 0x00}},
+ {2, [3]byte{0xc3, 0x94, 0x00}}, {2, [3]byte{0xc3, 0xac, 0x00}},
+ {2, [3]byte{0xc3, 0x83, 0x00}}, {2, [3]byte{0xc3, 0x82, 0x00}},
+ {2, [3]byte{0xc3, 0x89, 0x00}}, {2, [3]byte{0xc3, 0x80, 0x00}},
+ {2, [3]byte{0xc3, 0x88, 0x00}}, {2, [3]byte{0xc3, 0xb4, 0x00}},
+ {2, [3]byte{0xc3, 0xb5, 0x00}}, {2, [3]byte{0xc3, 0xb2, 0x00}},
+ {2, [3]byte{0xc3, 0x9a, 0x00}}, {2, [3]byte{0xc3, 0xb9, 0x00}},
+ {2, [3]byte{0xc3, 0x8c, 0x00}}, {2, [3]byte{0xc3, 0x95, 0x00}},
+ {2, [3]byte{0xc3, 0x9c, 0x00}}, {2, [3]byte{0xc2, 0xa2, 0x00}},
+ {2, [3]byte{0xc2, 0xa3, 0x00}}, {2, [3]byte{0xc3, 0x99, 0x00}},
+ {3, [3]byte{0xe2, 0x82, 0xa7}}, {2, [3]byte{0xc3, 0x93, 0x00}},
+ {2, [3]byte{0xc3, 0xa1, 0x00}}, {2, [3]byte{0xc3, 0xad, 0x00}},
+ {2, [3]byte{0xc3, 0xb3, 0x00}}, {2, [3]byte{0xc3, 0xba, 0x00}},
+ {2, [3]byte{0xc3, 0xb1, 0x00}}, {2, [3]byte{0xc3, 0x91, 0x00}},
+ {2, [3]byte{0xc2, 0xaa, 0x00}}, {2, [3]byte{0xc2, 0xba, 0x00}},
+ {2, [3]byte{0xc2, 0xbf, 0x00}}, {2, [3]byte{0xc3, 0x92, 0x00}},
+ {2, [3]byte{0xc2, 0xac, 0x00}}, {2, [3]byte{0xc2, 0xbd, 0x00}},
+ {2, [3]byte{0xc2, 0xbc, 0x00}}, {2, [3]byte{0xc2, 0xa1, 0x00}},
+ {2, [3]byte{0xc2, 0xab, 0x00}}, {2, [3]byte{0xc2, 0xbb, 0x00}},
+ {3, [3]byte{0xe2, 0x96, 0x91}}, {3, [3]byte{0xe2, 0x96, 0x92}},
+ {3, [3]byte{0xe2, 0x96, 0x93}}, {3, [3]byte{0xe2, 0x94, 0x82}},
+ {3, [3]byte{0xe2, 0x94, 0xa4}}, {3, [3]byte{0xe2, 0x95, 0xa1}},
+ {3, [3]byte{0xe2, 0x95, 0xa2}}, {3, [3]byte{0xe2, 0x95, 0x96}},
+ {3, [3]byte{0xe2, 0x95, 0x95}}, {3, [3]byte{0xe2, 0x95, 0xa3}},
+ {3, [3]byte{0xe2, 0x95, 0x91}}, {3, [3]byte{0xe2, 0x95, 0x97}},
+ {3, [3]byte{0xe2, 0x95, 0x9d}}, {3, [3]byte{0xe2, 0x95, 0x9c}},
+ {3, [3]byte{0xe2, 0x95, 0x9b}}, {3, [3]byte{0xe2, 0x94, 0x90}},
+ {3, [3]byte{0xe2, 0x94, 0x94}}, {3, [3]byte{0xe2, 0x94, 0xb4}},
+ {3, [3]byte{0xe2, 0x94, 0xac}}, {3, [3]byte{0xe2, 0x94, 0x9c}},
+ {3, [3]byte{0xe2, 0x94, 0x80}}, {3, [3]byte{0xe2, 0x94, 0xbc}},
+ {3, [3]byte{0xe2, 0x95, 0x9e}}, {3, [3]byte{0xe2, 0x95, 0x9f}},
+ {3, [3]byte{0xe2, 0x95, 0x9a}}, {3, [3]byte{0xe2, 0x95, 0x94}},
+ {3, [3]byte{0xe2, 0x95, 0xa9}}, {3, [3]byte{0xe2, 0x95, 0xa6}},
+ {3, [3]byte{0xe2, 0x95, 0xa0}}, {3, [3]byte{0xe2, 0x95, 0x90}},
+ {3, [3]byte{0xe2, 0x95, 0xac}}, {3, [3]byte{0xe2, 0x95, 0xa7}},
+ {3, [3]byte{0xe2, 0x95, 0xa8}}, {3, [3]byte{0xe2, 0x95, 0xa4}},
+ {3, [3]byte{0xe2, 0x95, 0xa5}}, {3, [3]byte{0xe2, 0x95, 0x99}},
+ {3, [3]byte{0xe2, 0x95, 0x98}}, {3, [3]byte{0xe2, 0x95, 0x92}},
+ {3, [3]byte{0xe2, 0x95, 0x93}}, {3, [3]byte{0xe2, 0x95, 0xab}},
+ {3, [3]byte{0xe2, 0x95, 0xaa}}, {3, [3]byte{0xe2, 0x94, 0x98}},
+ {3, [3]byte{0xe2, 0x94, 0x8c}}, {3, [3]byte{0xe2, 0x96, 0x88}},
+ {3, [3]byte{0xe2, 0x96, 0x84}}, {3, [3]byte{0xe2, 0x96, 0x8c}},
+ {3, [3]byte{0xe2, 0x96, 0x90}}, {3, [3]byte{0xe2, 0x96, 0x80}},
+ {2, [3]byte{0xce, 0xb1, 0x00}}, {2, [3]byte{0xc3, 0x9f, 0x00}},
+ {2, [3]byte{0xce, 0x93, 0x00}}, {2, [3]byte{0xcf, 0x80, 0x00}},
+ {2, [3]byte{0xce, 0xa3, 0x00}}, {2, [3]byte{0xcf, 0x83, 0x00}},
+ {2, [3]byte{0xc2, 0xb5, 0x00}}, {2, [3]byte{0xcf, 0x84, 0x00}},
+ {2, [3]byte{0xce, 0xa6, 0x00}}, {2, [3]byte{0xce, 0x98, 0x00}},
+ {2, [3]byte{0xce, 0xa9, 0x00}}, {2, [3]byte{0xce, 0xb4, 0x00}},
+ {3, [3]byte{0xe2, 0x88, 0x9e}}, {2, [3]byte{0xcf, 0x86, 0x00}},
+ {2, [3]byte{0xce, 0xb5, 0x00}}, {3, [3]byte{0xe2, 0x88, 0xa9}},
+ {3, [3]byte{0xe2, 0x89, 0xa1}}, {2, [3]byte{0xc2, 0xb1, 0x00}},
+ {3, [3]byte{0xe2, 0x89, 0xa5}}, {3, [3]byte{0xe2, 0x89, 0xa4}},
+ {3, [3]byte{0xe2, 0x8c, 0xa0}}, {3, [3]byte{0xe2, 0x8c, 0xa1}},
+ {2, [3]byte{0xc3, 0xb7, 0x00}}, {3, [3]byte{0xe2, 0x89, 0x88}},
+ {2, [3]byte{0xc2, 0xb0, 0x00}}, {3, [3]byte{0xe2, 0x88, 0x99}},
+ {2, [3]byte{0xc2, 0xb7, 0x00}}, {3, [3]byte{0xe2, 0x88, 0x9a}},
+ {3, [3]byte{0xe2, 0x81, 0xbf}}, {2, [3]byte{0xc2, 0xb2, 0x00}},
+ {3, [3]byte{0xe2, 0x96, 0xa0}}, {2, [3]byte{0xc2, 0xa0, 0x00}},
+ },
+ encode: [256]uint32{
+ 0x00000000, 0x01000001, 0x02000002, 0x03000003, 0x04000004, 0x05000005, 0x06000006, 0x07000007,
+ 0x08000008, 0x09000009, 0x0a00000a, 0x0b00000b, 0x0c00000c, 0x0d00000d, 0x0e00000e, 0x0f00000f,
+ 0x10000010, 0x11000011, 0x12000012, 0x13000013, 0x14000014, 0x15000015, 0x16000016, 0x17000017,
+ 0x18000018, 0x19000019, 0x1a00001a, 0x1b00001b, 0x1c00001c, 0x1d00001d, 0x1e00001e, 0x1f00001f,
+ 0x20000020, 0x21000021, 0x22000022, 0x23000023, 0x24000024, 0x25000025, 0x26000026, 0x27000027,
+ 0x28000028, 0x29000029, 0x2a00002a, 0x2b00002b, 0x2c00002c, 0x2d00002d, 0x2e00002e, 0x2f00002f,
+ 0x30000030, 0x31000031, 0x32000032, 0x33000033, 0x34000034, 0x35000035, 0x36000036, 0x37000037,
+ 0x38000038, 0x39000039, 0x3a00003a, 0x3b00003b, 0x3c00003c, 0x3d00003d, 0x3e00003e, 0x3f00003f,
+ 0x40000040, 0x41000041, 0x42000042, 0x43000043, 0x44000044, 0x45000045, 0x46000046, 0x47000047,
+ 0x48000048, 0x49000049, 0x4a00004a, 0x4b00004b, 0x4c00004c, 0x4d00004d, 0x4e00004e, 0x4f00004f,
+ 0x50000050, 0x51000051, 0x52000052, 0x53000053, 0x54000054, 0x55000055, 0x56000056, 0x57000057,
+ 0x58000058, 0x59000059, 0x5a00005a, 0x5b00005b, 0x5c00005c, 0x5d00005d, 0x5e00005e, 0x5f00005f,
+ 0x60000060, 0x61000061, 0x62000062, 0x63000063, 0x64000064, 0x65000065, 0x66000066, 0x67000067,
+ 0x68000068, 0x69000069, 0x6a00006a, 0x6b00006b, 0x6c00006c, 0x6d00006d, 0x6e00006e, 0x6f00006f,
+ 0x70000070, 0x71000071, 0x72000072, 0x73000073, 0x74000074, 0x75000075, 0x76000076, 0x77000077,
+ 0x78000078, 0x79000079, 0x7a00007a, 0x7b00007b, 0x7c00007c, 0x7d00007d, 0x7e00007e, 0x7f00007f,
+ 0xff0000a0, 0xad0000a1, 0x9b0000a2, 0x9c0000a3, 0xa60000aa, 0xae0000ab, 0xaa0000ac, 0xf80000b0,
+ 0xf10000b1, 0xfd0000b2, 0xe60000b5, 0xfa0000b7, 0xa70000ba, 0xaf0000bb, 0xac0000bc, 0xab0000bd,
+ 0xa80000bf, 0x910000c0, 0x860000c1, 0x8f0000c2, 0x8e0000c3, 0x800000c7, 0x920000c8, 0x900000c9,
+ 0x890000ca, 0x980000cc, 0x8b0000cd, 0xa50000d1, 0xa90000d2, 0x9f0000d3, 0x8c0000d4, 0x990000d5,
+ 0x9d0000d9, 0x960000da, 0x9a0000dc, 0xe10000df, 0x850000e0, 0xa00000e1, 0x830000e2, 0x840000e3,
+ 0x870000e7, 0x8a0000e8, 0x820000e9, 0x880000ea, 0x8d0000ec, 0xa10000ed, 0xa40000f1, 0x950000f2,
+ 0xa20000f3, 0x930000f4, 0x940000f5, 0xf60000f7, 0x970000f9, 0xa30000fa, 0x810000fc, 0xe2000393,
+ 0xe9000398, 0xe40003a3, 0xe80003a6, 0xea0003a9, 0xe00003b1, 0xeb0003b4, 0xee0003b5, 0xe30003c0,
+ 0xe50003c3, 0xe70003c4, 0xed0003c6, 0xfc00207f, 0x9e0020a7, 0xf9002219, 0xfb00221a, 0xec00221e,
+ 0xef002229, 0xf7002248, 0xf0002261, 0xf3002264, 0xf2002265, 0xf4002320, 0xf5002321, 0xc4002500,
+ 0xb3002502, 0xda00250c, 0xbf002510, 0xc0002514, 0xd9002518, 0xc300251c, 0xb4002524, 0xc200252c,
+ 0xc1002534, 0xc500253c, 0xcd002550, 0xba002551, 0xd5002552, 0xd6002553, 0xc9002554, 0xb8002555,
+ 0xb7002556, 0xbb002557, 0xd4002558, 0xd3002559, 0xc800255a, 0xbe00255b, 0xbd00255c, 0xbc00255d,
+ 0xc600255e, 0xc700255f, 0xcc002560, 0xb5002561, 0xb6002562, 0xb9002563, 0xd1002564, 0xd2002565,
+ 0xcb002566, 0xcf002567, 0xd0002568, 0xca002569, 0xd800256a, 0xd700256b, 0xce00256c, 0xdf002580,
+ 0xdc002584, 0xdb002588, 0xdd00258c, 0xde002590, 0xb0002591, 0xb1002592, 0xb2002593, 0xfe0025a0,
+ },
+}
+
// CodePage862 is the IBM Code Page 862 encoding.
var CodePage862 encoding.Encoding = &codePage862
@@ -1057,6 +1232,356 @@ var codePage862 = charmap{
},
}
+// CodePage863 is the IBM Code Page 863 encoding.
+var CodePage863 encoding.Encoding = &codePage863
+
+var codePage863 = charmap{
+ name: "IBM Code Page 863",
+ mib: identifier.IBM863,
+ asciiSuperset: true,
+ low: 0x80,
+ replacement: 0x1a,
+ decode: [256]utf8Enc{
+ {1, [3]byte{0x00, 0x00, 0x00}}, {1, [3]byte{0x01, 0x00, 0x00}},
+ {1, [3]byte{0x02, 0x00, 0x00}}, {1, [3]byte{0x03, 0x00, 0x00}},
+ {1, [3]byte{0x04, 0x00, 0x00}}, {1, [3]byte{0x05, 0x00, 0x00}},
+ {1, [3]byte{0x06, 0x00, 0x00}}, {1, [3]byte{0x07, 0x00, 0x00}},
+ {1, [3]byte{0x08, 0x00, 0x00}}, {1, [3]byte{0x09, 0x00, 0x00}},
+ {1, [3]byte{0x0a, 0x00, 0x00}}, {1, [3]byte{0x0b, 0x00, 0x00}},
+ {1, [3]byte{0x0c, 0x00, 0x00}}, {1, [3]byte{0x0d, 0x00, 0x00}},
+ {1, [3]byte{0x0e, 0x00, 0x00}}, {1, [3]byte{0x0f, 0x00, 0x00}},
+ {1, [3]byte{0x10, 0x00, 0x00}}, {1, [3]byte{0x11, 0x00, 0x00}},
+ {1, [3]byte{0x12, 0x00, 0x00}}, {1, [3]byte{0x13, 0x00, 0x00}},
+ {1, [3]byte{0x14, 0x00, 0x00}}, {1, [3]byte{0x15, 0x00, 0x00}},
+ {1, [3]byte{0x16, 0x00, 0x00}}, {1, [3]byte{0x17, 0x00, 0x00}},
+ {1, [3]byte{0x18, 0x00, 0x00}}, {1, [3]byte{0x19, 0x00, 0x00}},
+ {1, [3]byte{0x1a, 0x00, 0x00}}, {1, [3]byte{0x1b, 0x00, 0x00}},
+ {1, [3]byte{0x1c, 0x00, 0x00}}, {1, [3]byte{0x1d, 0x00, 0x00}},
+ {1, [3]byte{0x1e, 0x00, 0x00}}, {1, [3]byte{0x1f, 0x00, 0x00}},
+ {1, [3]byte{0x20, 0x00, 0x00}}, {1, [3]byte{0x21, 0x00, 0x00}},
+ {1, [3]byte{0x22, 0x00, 0x00}}, {1, [3]byte{0x23, 0x00, 0x00}},
+ {1, [3]byte{0x24, 0x00, 0x00}}, {1, [3]byte{0x25, 0x00, 0x00}},
+ {1, [3]byte{0x26, 0x00, 0x00}}, {1, [3]byte{0x27, 0x00, 0x00}},
+ {1, [3]byte{0x28, 0x00, 0x00}}, {1, [3]byte{0x29, 0x00, 0x00}},
+ {1, [3]byte{0x2a, 0x00, 0x00}}, {1, [3]byte{0x2b, 0x00, 0x00}},
+ {1, [3]byte{0x2c, 0x00, 0x00}}, {1, [3]byte{0x2d, 0x00, 0x00}},
+ {1, [3]byte{0x2e, 0x00, 0x00}}, {1, [3]byte{0x2f, 0x00, 0x00}},
+ {1, [3]byte{0x30, 0x00, 0x00}}, {1, [3]byte{0x31, 0x00, 0x00}},
+ {1, [3]byte{0x32, 0x00, 0x00}}, {1, [3]byte{0x33, 0x00, 0x00}},
+ {1, [3]byte{0x34, 0x00, 0x00}}, {1, [3]byte{0x35, 0x00, 0x00}},
+ {1, [3]byte{0x36, 0x00, 0x00}}, {1, [3]byte{0x37, 0x00, 0x00}},
+ {1, [3]byte{0x38, 0x00, 0x00}}, {1, [3]byte{0x39, 0x00, 0x00}},
+ {1, [3]byte{0x3a, 0x00, 0x00}}, {1, [3]byte{0x3b, 0x00, 0x00}},
+ {1, [3]byte{0x3c, 0x00, 0x00}}, {1, [3]byte{0x3d, 0x00, 0x00}},
+ {1, [3]byte{0x3e, 0x00, 0x00}}, {1, [3]byte{0x3f, 0x00, 0x00}},
+ {1, [3]byte{0x40, 0x00, 0x00}}, {1, [3]byte{0x41, 0x00, 0x00}},
+ {1, [3]byte{0x42, 0x00, 0x00}}, {1, [3]byte{0x43, 0x00, 0x00}},
+ {1, [3]byte{0x44, 0x00, 0x00}}, {1, [3]byte{0x45, 0x00, 0x00}},
+ {1, [3]byte{0x46, 0x00, 0x00}}, {1, [3]byte{0x47, 0x00, 0x00}},
+ {1, [3]byte{0x48, 0x00, 0x00}}, {1, [3]byte{0x49, 0x00, 0x00}},
+ {1, [3]byte{0x4a, 0x00, 0x00}}, {1, [3]byte{0x4b, 0x00, 0x00}},
+ {1, [3]byte{0x4c, 0x00, 0x00}}, {1, [3]byte{0x4d, 0x00, 0x00}},
+ {1, [3]byte{0x4e, 0x00, 0x00}}, {1, [3]byte{0x4f, 0x00, 0x00}},
+ {1, [3]byte{0x50, 0x00, 0x00}}, {1, [3]byte{0x51, 0x00, 0x00}},
+ {1, [3]byte{0x52, 0x00, 0x00}}, {1, [3]byte{0x53, 0x00, 0x00}},
+ {1, [3]byte{0x54, 0x00, 0x00}}, {1, [3]byte{0x55, 0x00, 0x00}},
+ {1, [3]byte{0x56, 0x00, 0x00}}, {1, [3]byte{0x57, 0x00, 0x00}},
+ {1, [3]byte{0x58, 0x00, 0x00}}, {1, [3]byte{0x59, 0x00, 0x00}},
+ {1, [3]byte{0x5a, 0x00, 0x00}}, {1, [3]byte{0x5b, 0x00, 0x00}},
+ {1, [3]byte{0x5c, 0x00, 0x00}}, {1, [3]byte{0x5d, 0x00, 0x00}},
+ {1, [3]byte{0x5e, 0x00, 0x00}}, {1, [3]byte{0x5f, 0x00, 0x00}},
+ {1, [3]byte{0x60, 0x00, 0x00}}, {1, [3]byte{0x61, 0x00, 0x00}},
+ {1, [3]byte{0x62, 0x00, 0x00}}, {1, [3]byte{0x63, 0x00, 0x00}},
+ {1, [3]byte{0x64, 0x00, 0x00}}, {1, [3]byte{0x65, 0x00, 0x00}},
+ {1, [3]byte{0x66, 0x00, 0x00}}, {1, [3]byte{0x67, 0x00, 0x00}},
+ {1, [3]byte{0x68, 0x00, 0x00}}, {1, [3]byte{0x69, 0x00, 0x00}},
+ {1, [3]byte{0x6a, 0x00, 0x00}}, {1, [3]byte{0x6b, 0x00, 0x00}},
+ {1, [3]byte{0x6c, 0x00, 0x00}}, {1, [3]byte{0x6d, 0x00, 0x00}},
+ {1, [3]byte{0x6e, 0x00, 0x00}}, {1, [3]byte{0x6f, 0x00, 0x00}},
+ {1, [3]byte{0x70, 0x00, 0x00}}, {1, [3]byte{0x71, 0x00, 0x00}},
+ {1, [3]byte{0x72, 0x00, 0x00}}, {1, [3]byte{0x73, 0x00, 0x00}},
+ {1, [3]byte{0x74, 0x00, 0x00}}, {1, [3]byte{0x75, 0x00, 0x00}},
+ {1, [3]byte{0x76, 0x00, 0x00}}, {1, [3]byte{0x77, 0x00, 0x00}},
+ {1, [3]byte{0x78, 0x00, 0x00}}, {1, [3]byte{0x79, 0x00, 0x00}},
+ {1, [3]byte{0x7a, 0x00, 0x00}}, {1, [3]byte{0x7b, 0x00, 0x00}},
+ {1, [3]byte{0x7c, 0x00, 0x00}}, {1, [3]byte{0x7d, 0x00, 0x00}},
+ {1, [3]byte{0x7e, 0x00, 0x00}}, {1, [3]byte{0x7f, 0x00, 0x00}},
+ {2, [3]byte{0xc3, 0x87, 0x00}}, {2, [3]byte{0xc3, 0xbc, 0x00}},
+ {2, [3]byte{0xc3, 0xa9, 0x00}}, {2, [3]byte{0xc3, 0xa2, 0x00}},
+ {2, [3]byte{0xc3, 0x82, 0x00}}, {2, [3]byte{0xc3, 0xa0, 0x00}},
+ {2, [3]byte{0xc2, 0xb6, 0x00}}, {2, [3]byte{0xc3, 0xa7, 0x00}},
+ {2, [3]byte{0xc3, 0xaa, 0x00}}, {2, [3]byte{0xc3, 0xab, 0x00}},
+ {2, [3]byte{0xc3, 0xa8, 0x00}}, {2, [3]byte{0xc3, 0xaf, 0x00}},
+ {2, [3]byte{0xc3, 0xae, 0x00}}, {3, [3]byte{0xe2, 0x80, 0x97}},
+ {2, [3]byte{0xc3, 0x80, 0x00}}, {2, [3]byte{0xc2, 0xa7, 0x00}},
+ {2, [3]byte{0xc3, 0x89, 0x00}}, {2, [3]byte{0xc3, 0x88, 0x00}},
+ {2, [3]byte{0xc3, 0x8a, 0x00}}, {2, [3]byte{0xc3, 0xb4, 0x00}},
+ {2, [3]byte{0xc3, 0x8b, 0x00}}, {2, [3]byte{0xc3, 0x8f, 0x00}},
+ {2, [3]byte{0xc3, 0xbb, 0x00}}, {2, [3]byte{0xc3, 0xb9, 0x00}},
+ {2, [3]byte{0xc2, 0xa4, 0x00}}, {2, [3]byte{0xc3, 0x94, 0x00}},
+ {2, [3]byte{0xc3, 0x9c, 0x00}}, {2, [3]byte{0xc2, 0xa2, 0x00}},
+ {2, [3]byte{0xc2, 0xa3, 0x00}}, {2, [3]byte{0xc3, 0x99, 0x00}},
+ {2, [3]byte{0xc3, 0x9b, 0x00}}, {2, [3]byte{0xc6, 0x92, 0x00}},
+ {2, [3]byte{0xc2, 0xa6, 0x00}}, {2, [3]byte{0xc2, 0xb4, 0x00}},
+ {2, [3]byte{0xc3, 0xb3, 0x00}}, {2, [3]byte{0xc3, 0xba, 0x00}},
+ {2, [3]byte{0xc2, 0xa8, 0x00}}, {2, [3]byte{0xc2, 0xb8, 0x00}},
+ {2, [3]byte{0xc2, 0xb3, 0x00}}, {2, [3]byte{0xc2, 0xaf, 0x00}},
+ {2, [3]byte{0xc3, 0x8e, 0x00}}, {3, [3]byte{0xe2, 0x8c, 0x90}},
+ {2, [3]byte{0xc2, 0xac, 0x00}}, {2, [3]byte{0xc2, 0xbd, 0x00}},
+ {2, [3]byte{0xc2, 0xbc, 0x00}}, {2, [3]byte{0xc2, 0xbe, 0x00}},
+ {2, [3]byte{0xc2, 0xab, 0x00}}, {2, [3]byte{0xc2, 0xbb, 0x00}},
+ {3, [3]byte{0xe2, 0x96, 0x91}}, {3, [3]byte{0xe2, 0x96, 0x92}},
+ {3, [3]byte{0xe2, 0x96, 0x93}}, {3, [3]byte{0xe2, 0x94, 0x82}},
+ {3, [3]byte{0xe2, 0x94, 0xa4}}, {3, [3]byte{0xe2, 0x95, 0xa1}},
+ {3, [3]byte{0xe2, 0x95, 0xa2}}, {3, [3]byte{0xe2, 0x95, 0x96}},
+ {3, [3]byte{0xe2, 0x95, 0x95}}, {3, [3]byte{0xe2, 0x95, 0xa3}},
+ {3, [3]byte{0xe2, 0x95, 0x91}}, {3, [3]byte{0xe2, 0x95, 0x97}},
+ {3, [3]byte{0xe2, 0x95, 0x9d}}, {3, [3]byte{0xe2, 0x95, 0x9c}},
+ {3, [3]byte{0xe2, 0x95, 0x9b}}, {3, [3]byte{0xe2, 0x94, 0x90}},
+ {3, [3]byte{0xe2, 0x94, 0x94}}, {3, [3]byte{0xe2, 0x94, 0xb4}},
+ {3, [3]byte{0xe2, 0x94, 0xac}}, {3, [3]byte{0xe2, 0x94, 0x9c}},
+ {3, [3]byte{0xe2, 0x94, 0x80}}, {3, [3]byte{0xe2, 0x94, 0xbc}},
+ {3, [3]byte{0xe2, 0x95, 0x9e}}, {3, [3]byte{0xe2, 0x95, 0x9f}},
+ {3, [3]byte{0xe2, 0x95, 0x9a}}, {3, [3]byte{0xe2, 0x95, 0x94}},
+ {3, [3]byte{0xe2, 0x95, 0xa9}}, {3, [3]byte{0xe2, 0x95, 0xa6}},
+ {3, [3]byte{0xe2, 0x95, 0xa0}}, {3, [3]byte{0xe2, 0x95, 0x90}},
+ {3, [3]byte{0xe2, 0x95, 0xac}}, {3, [3]byte{0xe2, 0x95, 0xa7}},
+ {3, [3]byte{0xe2, 0x95, 0xa8}}, {3, [3]byte{0xe2, 0x95, 0xa4}},
+ {3, [3]byte{0xe2, 0x95, 0xa5}}, {3, [3]byte{0xe2, 0x95, 0x99}},
+ {3, [3]byte{0xe2, 0x95, 0x98}}, {3, [3]byte{0xe2, 0x95, 0x92}},
+ {3, [3]byte{0xe2, 0x95, 0x93}}, {3, [3]byte{0xe2, 0x95, 0xab}},
+ {3, [3]byte{0xe2, 0x95, 0xaa}}, {3, [3]byte{0xe2, 0x94, 0x98}},
+ {3, [3]byte{0xe2, 0x94, 0x8c}}, {3, [3]byte{0xe2, 0x96, 0x88}},
+ {3, [3]byte{0xe2, 0x96, 0x84}}, {3, [3]byte{0xe2, 0x96, 0x8c}},
+ {3, [3]byte{0xe2, 0x96, 0x90}}, {3, [3]byte{0xe2, 0x96, 0x80}},
+ {2, [3]byte{0xce, 0xb1, 0x00}}, {2, [3]byte{0xc3, 0x9f, 0x00}},
+ {2, [3]byte{0xce, 0x93, 0x00}}, {2, [3]byte{0xcf, 0x80, 0x00}},
+ {2, [3]byte{0xce, 0xa3, 0x00}}, {2, [3]byte{0xcf, 0x83, 0x00}},
+ {2, [3]byte{0xc2, 0xb5, 0x00}}, {2, [3]byte{0xcf, 0x84, 0x00}},
+ {2, [3]byte{0xce, 0xa6, 0x00}}, {2, [3]byte{0xce, 0x98, 0x00}},
+ {2, [3]byte{0xce, 0xa9, 0x00}}, {2, [3]byte{0xce, 0xb4, 0x00}},
+ {3, [3]byte{0xe2, 0x88, 0x9e}}, {2, [3]byte{0xcf, 0x86, 0x00}},
+ {2, [3]byte{0xce, 0xb5, 0x00}}, {3, [3]byte{0xe2, 0x88, 0xa9}},
+ {3, [3]byte{0xe2, 0x89, 0xa1}}, {2, [3]byte{0xc2, 0xb1, 0x00}},
+ {3, [3]byte{0xe2, 0x89, 0xa5}}, {3, [3]byte{0xe2, 0x89, 0xa4}},
+ {3, [3]byte{0xe2, 0x8c, 0xa0}}, {3, [3]byte{0xe2, 0x8c, 0xa1}},
+ {2, [3]byte{0xc3, 0xb7, 0x00}}, {3, [3]byte{0xe2, 0x89, 0x88}},
+ {2, [3]byte{0xc2, 0xb0, 0x00}}, {3, [3]byte{0xe2, 0x88, 0x99}},
+ {2, [3]byte{0xc2, 0xb7, 0x00}}, {3, [3]byte{0xe2, 0x88, 0x9a}},
+ {3, [3]byte{0xe2, 0x81, 0xbf}}, {2, [3]byte{0xc2, 0xb2, 0x00}},
+ {3, [3]byte{0xe2, 0x96, 0xa0}}, {2, [3]byte{0xc2, 0xa0, 0x00}},
+ },
+ encode: [256]uint32{
+ 0x00000000, 0x01000001, 0x02000002, 0x03000003, 0x04000004, 0x05000005, 0x06000006, 0x07000007,
+ 0x08000008, 0x09000009, 0x0a00000a, 0x0b00000b, 0x0c00000c, 0x0d00000d, 0x0e00000e, 0x0f00000f,
+ 0x10000010, 0x11000011, 0x12000012, 0x13000013, 0x14000014, 0x15000015, 0x16000016, 0x17000017,
+ 0x18000018, 0x19000019, 0x1a00001a, 0x1b00001b, 0x1c00001c, 0x1d00001d, 0x1e00001e, 0x1f00001f,
+ 0x20000020, 0x21000021, 0x22000022, 0x23000023, 0x24000024, 0x25000025, 0x26000026, 0x27000027,
+ 0x28000028, 0x29000029, 0x2a00002a, 0x2b00002b, 0x2c00002c, 0x2d00002d, 0x2e00002e, 0x2f00002f,
+ 0x30000030, 0x31000031, 0x32000032, 0x33000033, 0x34000034, 0x35000035, 0x36000036, 0x37000037,
+ 0x38000038, 0x39000039, 0x3a00003a, 0x3b00003b, 0x3c00003c, 0x3d00003d, 0x3e00003e, 0x3f00003f,
+ 0x40000040, 0x41000041, 0x42000042, 0x43000043, 0x44000044, 0x45000045, 0x46000046, 0x47000047,
+ 0x48000048, 0x49000049, 0x4a00004a, 0x4b00004b, 0x4c00004c, 0x4d00004d, 0x4e00004e, 0x4f00004f,
+ 0x50000050, 0x51000051, 0x52000052, 0x53000053, 0x54000054, 0x55000055, 0x56000056, 0x57000057,
+ 0x58000058, 0x59000059, 0x5a00005a, 0x5b00005b, 0x5c00005c, 0x5d00005d, 0x5e00005e, 0x5f00005f,
+ 0x60000060, 0x61000061, 0x62000062, 0x63000063, 0x64000064, 0x65000065, 0x66000066, 0x67000067,
+ 0x68000068, 0x69000069, 0x6a00006a, 0x6b00006b, 0x6c00006c, 0x6d00006d, 0x6e00006e, 0x6f00006f,
+ 0x70000070, 0x71000071, 0x72000072, 0x73000073, 0x74000074, 0x75000075, 0x76000076, 0x77000077,
+ 0x78000078, 0x79000079, 0x7a00007a, 0x7b00007b, 0x7c00007c, 0x7d00007d, 0x7e00007e, 0x7f00007f,
+ 0xff0000a0, 0x9b0000a2, 0x9c0000a3, 0x980000a4, 0xa00000a6, 0x8f0000a7, 0xa40000a8, 0xae0000ab,
+ 0xaa0000ac, 0xa70000af, 0xf80000b0, 0xf10000b1, 0xfd0000b2, 0xa60000b3, 0xa10000b4, 0xe60000b5,
+ 0x860000b6, 0xfa0000b7, 0xa50000b8, 0xaf0000bb, 0xac0000bc, 0xab0000bd, 0xad0000be, 0x8e0000c0,
+ 0x840000c2, 0x800000c7, 0x910000c8, 0x900000c9, 0x920000ca, 0x940000cb, 0xa80000ce, 0x950000cf,
+ 0x990000d4, 0x9d0000d9, 0x9e0000db, 0x9a0000dc, 0xe10000df, 0x850000e0, 0x830000e2, 0x870000e7,
+ 0x8a0000e8, 0x820000e9, 0x880000ea, 0x890000eb, 0x8c0000ee, 0x8b0000ef, 0xa20000f3, 0x930000f4,
+ 0xf60000f7, 0x970000f9, 0xa30000fa, 0x960000fb, 0x810000fc, 0x9f000192, 0xe2000393, 0xe9000398,
+ 0xe40003a3, 0xe80003a6, 0xea0003a9, 0xe00003b1, 0xeb0003b4, 0xee0003b5, 0xe30003c0, 0xe50003c3,
+ 0xe70003c4, 0xed0003c6, 0x8d002017, 0xfc00207f, 0xf9002219, 0xfb00221a, 0xec00221e, 0xef002229,
+ 0xf7002248, 0xf0002261, 0xf3002264, 0xf2002265, 0xa9002310, 0xf4002320, 0xf5002321, 0xc4002500,
+ 0xb3002502, 0xda00250c, 0xbf002510, 0xc0002514, 0xd9002518, 0xc300251c, 0xb4002524, 0xc200252c,
+ 0xc1002534, 0xc500253c, 0xcd002550, 0xba002551, 0xd5002552, 0xd6002553, 0xc9002554, 0xb8002555,
+ 0xb7002556, 0xbb002557, 0xd4002558, 0xd3002559, 0xc800255a, 0xbe00255b, 0xbd00255c, 0xbc00255d,
+ 0xc600255e, 0xc700255f, 0xcc002560, 0xb5002561, 0xb6002562, 0xb9002563, 0xd1002564, 0xd2002565,
+ 0xcb002566, 0xcf002567, 0xd0002568, 0xca002569, 0xd800256a, 0xd700256b, 0xce00256c, 0xdf002580,
+ 0xdc002584, 0xdb002588, 0xdd00258c, 0xde002590, 0xb0002591, 0xb1002592, 0xb2002593, 0xfe0025a0,
+ },
+}
+
+// CodePage865 is the IBM Code Page 865 encoding.
+var CodePage865 encoding.Encoding = &codePage865
+
+var codePage865 = charmap{
+ name: "IBM Code Page 865",
+ mib: identifier.IBM865,
+ asciiSuperset: true,
+ low: 0x80,
+ replacement: 0x1a,
+ decode: [256]utf8Enc{
+ {1, [3]byte{0x00, 0x00, 0x00}}, {1, [3]byte{0x01, 0x00, 0x00}},
+ {1, [3]byte{0x02, 0x00, 0x00}}, {1, [3]byte{0x03, 0x00, 0x00}},
+ {1, [3]byte{0x04, 0x00, 0x00}}, {1, [3]byte{0x05, 0x00, 0x00}},
+ {1, [3]byte{0x06, 0x00, 0x00}}, {1, [3]byte{0x07, 0x00, 0x00}},
+ {1, [3]byte{0x08, 0x00, 0x00}}, {1, [3]byte{0x09, 0x00, 0x00}},
+ {1, [3]byte{0x0a, 0x00, 0x00}}, {1, [3]byte{0x0b, 0x00, 0x00}},
+ {1, [3]byte{0x0c, 0x00, 0x00}}, {1, [3]byte{0x0d, 0x00, 0x00}},
+ {1, [3]byte{0x0e, 0x00, 0x00}}, {1, [3]byte{0x0f, 0x00, 0x00}},
+ {1, [3]byte{0x10, 0x00, 0x00}}, {1, [3]byte{0x11, 0x00, 0x00}},
+ {1, [3]byte{0x12, 0x00, 0x00}}, {1, [3]byte{0x13, 0x00, 0x00}},
+ {1, [3]byte{0x14, 0x00, 0x00}}, {1, [3]byte{0x15, 0x00, 0x00}},
+ {1, [3]byte{0x16, 0x00, 0x00}}, {1, [3]byte{0x17, 0x00, 0x00}},
+ {1, [3]byte{0x18, 0x00, 0x00}}, {1, [3]byte{0x19, 0x00, 0x00}},
+ {1, [3]byte{0x1a, 0x00, 0x00}}, {1, [3]byte{0x1b, 0x00, 0x00}},
+ {1, [3]byte{0x1c, 0x00, 0x00}}, {1, [3]byte{0x1d, 0x00, 0x00}},
+ {1, [3]byte{0x1e, 0x00, 0x00}}, {1, [3]byte{0x1f, 0x00, 0x00}},
+ {1, [3]byte{0x20, 0x00, 0x00}}, {1, [3]byte{0x21, 0x00, 0x00}},
+ {1, [3]byte{0x22, 0x00, 0x00}}, {1, [3]byte{0x23, 0x00, 0x00}},
+ {1, [3]byte{0x24, 0x00, 0x00}}, {1, [3]byte{0x25, 0x00, 0x00}},
+ {1, [3]byte{0x26, 0x00, 0x00}}, {1, [3]byte{0x27, 0x00, 0x00}},
+ {1, [3]byte{0x28, 0x00, 0x00}}, {1, [3]byte{0x29, 0x00, 0x00}},
+ {1, [3]byte{0x2a, 0x00, 0x00}}, {1, [3]byte{0x2b, 0x00, 0x00}},
+ {1, [3]byte{0x2c, 0x00, 0x00}}, {1, [3]byte{0x2d, 0x00, 0x00}},
+ {1, [3]byte{0x2e, 0x00, 0x00}}, {1, [3]byte{0x2f, 0x00, 0x00}},
+ {1, [3]byte{0x30, 0x00, 0x00}}, {1, [3]byte{0x31, 0x00, 0x00}},
+ {1, [3]byte{0x32, 0x00, 0x00}}, {1, [3]byte{0x33, 0x00, 0x00}},
+ {1, [3]byte{0x34, 0x00, 0x00}}, {1, [3]byte{0x35, 0x00, 0x00}},
+ {1, [3]byte{0x36, 0x00, 0x00}}, {1, [3]byte{0x37, 0x00, 0x00}},
+ {1, [3]byte{0x38, 0x00, 0x00}}, {1, [3]byte{0x39, 0x00, 0x00}},
+ {1, [3]byte{0x3a, 0x00, 0x00}}, {1, [3]byte{0x3b, 0x00, 0x00}},
+ {1, [3]byte{0x3c, 0x00, 0x00}}, {1, [3]byte{0x3d, 0x00, 0x00}},
+ {1, [3]byte{0x3e, 0x00, 0x00}}, {1, [3]byte{0x3f, 0x00, 0x00}},
+ {1, [3]byte{0x40, 0x00, 0x00}}, {1, [3]byte{0x41, 0x00, 0x00}},
+ {1, [3]byte{0x42, 0x00, 0x00}}, {1, [3]byte{0x43, 0x00, 0x00}},
+ {1, [3]byte{0x44, 0x00, 0x00}}, {1, [3]byte{0x45, 0x00, 0x00}},
+ {1, [3]byte{0x46, 0x00, 0x00}}, {1, [3]byte{0x47, 0x00, 0x00}},
+ {1, [3]byte{0x48, 0x00, 0x00}}, {1, [3]byte{0x49, 0x00, 0x00}},
+ {1, [3]byte{0x4a, 0x00, 0x00}}, {1, [3]byte{0x4b, 0x00, 0x00}},
+ {1, [3]byte{0x4c, 0x00, 0x00}}, {1, [3]byte{0x4d, 0x00, 0x00}},
+ {1, [3]byte{0x4e, 0x00, 0x00}}, {1, [3]byte{0x4f, 0x00, 0x00}},
+ {1, [3]byte{0x50, 0x00, 0x00}}, {1, [3]byte{0x51, 0x00, 0x00}},
+ {1, [3]byte{0x52, 0x00, 0x00}}, {1, [3]byte{0x53, 0x00, 0x00}},
+ {1, [3]byte{0x54, 0x00, 0x00}}, {1, [3]byte{0x55, 0x00, 0x00}},
+ {1, [3]byte{0x56, 0x00, 0x00}}, {1, [3]byte{0x57, 0x00, 0x00}},
+ {1, [3]byte{0x58, 0x00, 0x00}}, {1, [3]byte{0x59, 0x00, 0x00}},
+ {1, [3]byte{0x5a, 0x00, 0x00}}, {1, [3]byte{0x5b, 0x00, 0x00}},
+ {1, [3]byte{0x5c, 0x00, 0x00}}, {1, [3]byte{0x5d, 0x00, 0x00}},
+ {1, [3]byte{0x5e, 0x00, 0x00}}, {1, [3]byte{0x5f, 0x00, 0x00}},
+ {1, [3]byte{0x60, 0x00, 0x00}}, {1, [3]byte{0x61, 0x00, 0x00}},
+ {1, [3]byte{0x62, 0x00, 0x00}}, {1, [3]byte{0x63, 0x00, 0x00}},
+ {1, [3]byte{0x64, 0x00, 0x00}}, {1, [3]byte{0x65, 0x00, 0x00}},
+ {1, [3]byte{0x66, 0x00, 0x00}}, {1, [3]byte{0x67, 0x00, 0x00}},
+ {1, [3]byte{0x68, 0x00, 0x00}}, {1, [3]byte{0x69, 0x00, 0x00}},
+ {1, [3]byte{0x6a, 0x00, 0x00}}, {1, [3]byte{0x6b, 0x00, 0x00}},
+ {1, [3]byte{0x6c, 0x00, 0x00}}, {1, [3]byte{0x6d, 0x00, 0x00}},
+ {1, [3]byte{0x6e, 0x00, 0x00}}, {1, [3]byte{0x6f, 0x00, 0x00}},
+ {1, [3]byte{0x70, 0x00, 0x00}}, {1, [3]byte{0x71, 0x00, 0x00}},
+ {1, [3]byte{0x72, 0x00, 0x00}}, {1, [3]byte{0x73, 0x00, 0x00}},
+ {1, [3]byte{0x74, 0x00, 0x00}}, {1, [3]byte{0x75, 0x00, 0x00}},
+ {1, [3]byte{0x76, 0x00, 0x00}}, {1, [3]byte{0x77, 0x00, 0x00}},
+ {1, [3]byte{0x78, 0x00, 0x00}}, {1, [3]byte{0x79, 0x00, 0x00}},
+ {1, [3]byte{0x7a, 0x00, 0x00}}, {1, [3]byte{0x7b, 0x00, 0x00}},
+ {1, [3]byte{0x7c, 0x00, 0x00}}, {1, [3]byte{0x7d, 0x00, 0x00}},
+ {1, [3]byte{0x7e, 0x00, 0x00}}, {1, [3]byte{0x7f, 0x00, 0x00}},
+ {2, [3]byte{0xc3, 0x87, 0x00}}, {2, [3]byte{0xc3, 0xbc, 0x00}},
+ {2, [3]byte{0xc3, 0xa9, 0x00}}, {2, [3]byte{0xc3, 0xa2, 0x00}},
+ {2, [3]byte{0xc3, 0xa4, 0x00}}, {2, [3]byte{0xc3, 0xa0, 0x00}},
+ {2, [3]byte{0xc3, 0xa5, 0x00}}, {2, [3]byte{0xc3, 0xa7, 0x00}},
+ {2, [3]byte{0xc3, 0xaa, 0x00}}, {2, [3]byte{0xc3, 0xab, 0x00}},
+ {2, [3]byte{0xc3, 0xa8, 0x00}}, {2, [3]byte{0xc3, 0xaf, 0x00}},
+ {2, [3]byte{0xc3, 0xae, 0x00}}, {2, [3]byte{0xc3, 0xac, 0x00}},
+ {2, [3]byte{0xc3, 0x84, 0x00}}, {2, [3]byte{0xc3, 0x85, 0x00}},
+ {2, [3]byte{0xc3, 0x89, 0x00}}, {2, [3]byte{0xc3, 0xa6, 0x00}},
+ {2, [3]byte{0xc3, 0x86, 0x00}}, {2, [3]byte{0xc3, 0xb4, 0x00}},
+ {2, [3]byte{0xc3, 0xb6, 0x00}}, {2, [3]byte{0xc3, 0xb2, 0x00}},
+ {2, [3]byte{0xc3, 0xbb, 0x00}}, {2, [3]byte{0xc3, 0xb9, 0x00}},
+ {2, [3]byte{0xc3, 0xbf, 0x00}}, {2, [3]byte{0xc3, 0x96, 0x00}},
+ {2, [3]byte{0xc3, 0x9c, 0x00}}, {2, [3]byte{0xc3, 0xb8, 0x00}},
+ {2, [3]byte{0xc2, 0xa3, 0x00}}, {2, [3]byte{0xc3, 0x98, 0x00}},
+ {3, [3]byte{0xe2, 0x82, 0xa7}}, {2, [3]byte{0xc6, 0x92, 0x00}},
+ {2, [3]byte{0xc3, 0xa1, 0x00}}, {2, [3]byte{0xc3, 0xad, 0x00}},
+ {2, [3]byte{0xc3, 0xb3, 0x00}}, {2, [3]byte{0xc3, 0xba, 0x00}},
+ {2, [3]byte{0xc3, 0xb1, 0x00}}, {2, [3]byte{0xc3, 0x91, 0x00}},
+ {2, [3]byte{0xc2, 0xaa, 0x00}}, {2, [3]byte{0xc2, 0xba, 0x00}},
+ {2, [3]byte{0xc2, 0xbf, 0x00}}, {3, [3]byte{0xe2, 0x8c, 0x90}},
+ {2, [3]byte{0xc2, 0xac, 0x00}}, {2, [3]byte{0xc2, 0xbd, 0x00}},
+ {2, [3]byte{0xc2, 0xbc, 0x00}}, {2, [3]byte{0xc2, 0xa1, 0x00}},
+ {2, [3]byte{0xc2, 0xab, 0x00}}, {2, [3]byte{0xc2, 0xa4, 0x00}},
+ {3, [3]byte{0xe2, 0x96, 0x91}}, {3, [3]byte{0xe2, 0x96, 0x92}},
+ {3, [3]byte{0xe2, 0x96, 0x93}}, {3, [3]byte{0xe2, 0x94, 0x82}},
+ {3, [3]byte{0xe2, 0x94, 0xa4}}, {3, [3]byte{0xe2, 0x95, 0xa1}},
+ {3, [3]byte{0xe2, 0x95, 0xa2}}, {3, [3]byte{0xe2, 0x95, 0x96}},
+ {3, [3]byte{0xe2, 0x95, 0x95}}, {3, [3]byte{0xe2, 0x95, 0xa3}},
+ {3, [3]byte{0xe2, 0x95, 0x91}}, {3, [3]byte{0xe2, 0x95, 0x97}},
+ {3, [3]byte{0xe2, 0x95, 0x9d}}, {3, [3]byte{0xe2, 0x95, 0x9c}},
+ {3, [3]byte{0xe2, 0x95, 0x9b}}, {3, [3]byte{0xe2, 0x94, 0x90}},
+ {3, [3]byte{0xe2, 0x94, 0x94}}, {3, [3]byte{0xe2, 0x94, 0xb4}},
+ {3, [3]byte{0xe2, 0x94, 0xac}}, {3, [3]byte{0xe2, 0x94, 0x9c}},
+ {3, [3]byte{0xe2, 0x94, 0x80}}, {3, [3]byte{0xe2, 0x94, 0xbc}},
+ {3, [3]byte{0xe2, 0x95, 0x9e}}, {3, [3]byte{0xe2, 0x95, 0x9f}},
+ {3, [3]byte{0xe2, 0x95, 0x9a}}, {3, [3]byte{0xe2, 0x95, 0x94}},
+ {3, [3]byte{0xe2, 0x95, 0xa9}}, {3, [3]byte{0xe2, 0x95, 0xa6}},
+ {3, [3]byte{0xe2, 0x95, 0xa0}}, {3, [3]byte{0xe2, 0x95, 0x90}},
+ {3, [3]byte{0xe2, 0x95, 0xac}}, {3, [3]byte{0xe2, 0x95, 0xa7}},
+ {3, [3]byte{0xe2, 0x95, 0xa8}}, {3, [3]byte{0xe2, 0x95, 0xa4}},
+ {3, [3]byte{0xe2, 0x95, 0xa5}}, {3, [3]byte{0xe2, 0x95, 0x99}},
+ {3, [3]byte{0xe2, 0x95, 0x98}}, {3, [3]byte{0xe2, 0x95, 0x92}},
+ {3, [3]byte{0xe2, 0x95, 0x93}}, {3, [3]byte{0xe2, 0x95, 0xab}},
+ {3, [3]byte{0xe2, 0x95, 0xaa}}, {3, [3]byte{0xe2, 0x94, 0x98}},
+ {3, [3]byte{0xe2, 0x94, 0x8c}}, {3, [3]byte{0xe2, 0x96, 0x88}},
+ {3, [3]byte{0xe2, 0x96, 0x84}}, {3, [3]byte{0xe2, 0x96, 0x8c}},
+ {3, [3]byte{0xe2, 0x96, 0x90}}, {3, [3]byte{0xe2, 0x96, 0x80}},
+ {2, [3]byte{0xce, 0xb1, 0x00}}, {2, [3]byte{0xc3, 0x9f, 0x00}},
+ {2, [3]byte{0xce, 0x93, 0x00}}, {2, [3]byte{0xcf, 0x80, 0x00}},
+ {2, [3]byte{0xce, 0xa3, 0x00}}, {2, [3]byte{0xcf, 0x83, 0x00}},
+ {2, [3]byte{0xc2, 0xb5, 0x00}}, {2, [3]byte{0xcf, 0x84, 0x00}},
+ {2, [3]byte{0xce, 0xa6, 0x00}}, {2, [3]byte{0xce, 0x98, 0x00}},
+ {2, [3]byte{0xce, 0xa9, 0x00}}, {2, [3]byte{0xce, 0xb4, 0x00}},
+ {3, [3]byte{0xe2, 0x88, 0x9e}}, {2, [3]byte{0xcf, 0x86, 0x00}},
+ {2, [3]byte{0xce, 0xb5, 0x00}}, {3, [3]byte{0xe2, 0x88, 0xa9}},
+ {3, [3]byte{0xe2, 0x89, 0xa1}}, {2, [3]byte{0xc2, 0xb1, 0x00}},
+ {3, [3]byte{0xe2, 0x89, 0xa5}}, {3, [3]byte{0xe2, 0x89, 0xa4}},
+ {3, [3]byte{0xe2, 0x8c, 0xa0}}, {3, [3]byte{0xe2, 0x8c, 0xa1}},
+ {2, [3]byte{0xc3, 0xb7, 0x00}}, {3, [3]byte{0xe2, 0x89, 0x88}},
+ {2, [3]byte{0xc2, 0xb0, 0x00}}, {3, [3]byte{0xe2, 0x88, 0x99}},
+ {2, [3]byte{0xc2, 0xb7, 0x00}}, {3, [3]byte{0xe2, 0x88, 0x9a}},
+ {3, [3]byte{0xe2, 0x81, 0xbf}}, {2, [3]byte{0xc2, 0xb2, 0x00}},
+ {3, [3]byte{0xe2, 0x96, 0xa0}}, {2, [3]byte{0xc2, 0xa0, 0x00}},
+ },
+ encode: [256]uint32{
+ 0x00000000, 0x01000001, 0x02000002, 0x03000003, 0x04000004, 0x05000005, 0x06000006, 0x07000007,
+ 0x08000008, 0x09000009, 0x0a00000a, 0x0b00000b, 0x0c00000c, 0x0d00000d, 0x0e00000e, 0x0f00000f,
+ 0x10000010, 0x11000011, 0x12000012, 0x13000013, 0x14000014, 0x15000015, 0x16000016, 0x17000017,
+ 0x18000018, 0x19000019, 0x1a00001a, 0x1b00001b, 0x1c00001c, 0x1d00001d, 0x1e00001e, 0x1f00001f,
+ 0x20000020, 0x21000021, 0x22000022, 0x23000023, 0x24000024, 0x25000025, 0x26000026, 0x27000027,
+ 0x28000028, 0x29000029, 0x2a00002a, 0x2b00002b, 0x2c00002c, 0x2d00002d, 0x2e00002e, 0x2f00002f,
+ 0x30000030, 0x31000031, 0x32000032, 0x33000033, 0x34000034, 0x35000035, 0x36000036, 0x37000037,
+ 0x38000038, 0x39000039, 0x3a00003a, 0x3b00003b, 0x3c00003c, 0x3d00003d, 0x3e00003e, 0x3f00003f,
+ 0x40000040, 0x41000041, 0x42000042, 0x43000043, 0x44000044, 0x45000045, 0x46000046, 0x47000047,
+ 0x48000048, 0x49000049, 0x4a00004a, 0x4b00004b, 0x4c00004c, 0x4d00004d, 0x4e00004e, 0x4f00004f,
+ 0x50000050, 0x51000051, 0x52000052, 0x53000053, 0x54000054, 0x55000055, 0x56000056, 0x57000057,
+ 0x58000058, 0x59000059, 0x5a00005a, 0x5b00005b, 0x5c00005c, 0x5d00005d, 0x5e00005e, 0x5f00005f,
+ 0x60000060, 0x61000061, 0x62000062, 0x63000063, 0x64000064, 0x65000065, 0x66000066, 0x67000067,
+ 0x68000068, 0x69000069, 0x6a00006a, 0x6b00006b, 0x6c00006c, 0x6d00006d, 0x6e00006e, 0x6f00006f,
+ 0x70000070, 0x71000071, 0x72000072, 0x73000073, 0x74000074, 0x75000075, 0x76000076, 0x77000077,
+ 0x78000078, 0x79000079, 0x7a00007a, 0x7b00007b, 0x7c00007c, 0x7d00007d, 0x7e00007e, 0x7f00007f,
+ 0xff0000a0, 0xad0000a1, 0x9c0000a3, 0xaf0000a4, 0xa60000aa, 0xae0000ab, 0xaa0000ac, 0xf80000b0,
+ 0xf10000b1, 0xfd0000b2, 0xe60000b5, 0xfa0000b7, 0xa70000ba, 0xac0000bc, 0xab0000bd, 0xa80000bf,
+ 0x8e0000c4, 0x8f0000c5, 0x920000c6, 0x800000c7, 0x900000c9, 0xa50000d1, 0x990000d6, 0x9d0000d8,
+ 0x9a0000dc, 0xe10000df, 0x850000e0, 0xa00000e1, 0x830000e2, 0x840000e4, 0x860000e5, 0x910000e6,
+ 0x870000e7, 0x8a0000e8, 0x820000e9, 0x880000ea, 0x890000eb, 0x8d0000ec, 0xa10000ed, 0x8c0000ee,
+ 0x8b0000ef, 0xa40000f1, 0x950000f2, 0xa20000f3, 0x930000f4, 0x940000f6, 0xf60000f7, 0x9b0000f8,
+ 0x970000f9, 0xa30000fa, 0x960000fb, 0x810000fc, 0x980000ff, 0x9f000192, 0xe2000393, 0xe9000398,
+ 0xe40003a3, 0xe80003a6, 0xea0003a9, 0xe00003b1, 0xeb0003b4, 0xee0003b5, 0xe30003c0, 0xe50003c3,
+ 0xe70003c4, 0xed0003c6, 0xfc00207f, 0x9e0020a7, 0xf9002219, 0xfb00221a, 0xec00221e, 0xef002229,
+ 0xf7002248, 0xf0002261, 0xf3002264, 0xf2002265, 0xa9002310, 0xf4002320, 0xf5002321, 0xc4002500,
+ 0xb3002502, 0xda00250c, 0xbf002510, 0xc0002514, 0xd9002518, 0xc300251c, 0xb4002524, 0xc200252c,
+ 0xc1002534, 0xc500253c, 0xcd002550, 0xba002551, 0xd5002552, 0xd6002553, 0xc9002554, 0xb8002555,
+ 0xb7002556, 0xbb002557, 0xd4002558, 0xd3002559, 0xc800255a, 0xbe00255b, 0xbd00255c, 0xbc00255d,
+ 0xc600255e, 0xc700255f, 0xcc002560, 0xb5002561, 0xb6002562, 0xb9002563, 0xd1002564, 0xd2002565,
+ 0xcb002566, 0xcf002567, 0xd0002568, 0xca002569, 0xd800256a, 0xd700256b, 0xce00256c, 0xdf002580,
+ 0xdc002584, 0xdb002588, 0xdd00258c, 0xde002590, 0xb0002591, 0xb1002592, 0xb2002593, 0xfe0025a0,
+ },
+}
+
// CodePage866 is the IBM Code Page 866 encoding.
var CodePage866 encoding.Encoding = &codePage866
@@ -6139,7 +6664,10 @@ var listAll = []encoding.Encoding{
CodePage852,
CodePage855,
CodePage858,
+ CodePage860,
CodePage862,
+ CodePage863,
+ CodePage865,
CodePage866,
ISO8859_1,
ISO8859_2,
@@ -6175,4 +6703,4 @@ var listAll = []encoding.Encoding{
XUserDefined,
}
-// Total table size 72520 bytes (70KiB); checksum: 811C9DC5
+// Total table size 78736 bytes (76KiB); checksum: 811C9DC5
diff --git a/Godeps/_workspace/src/golang.org/x/text/encoding/encoding.go b/vendor/golang.org/x/text/encoding/encoding.go
index abc2c9ad1..221f175c0 100644
--- a/Godeps/_workspace/src/golang.org/x/text/encoding/encoding.go
+++ b/vendor/golang.org/x/text/encoding/encoding.go
@@ -8,7 +8,7 @@
// Encoding implementations are provided in other packages, such as
// golang.org/x/text/encoding/charmap and
// golang.org/x/text/encoding/japanese.
-package encoding
+package encoding // import "golang.org/x/text/encoding"
import (
"errors"
diff --git a/Godeps/_workspace/src/golang.org/x/text/encoding/htmlindex/gen.go b/vendor/golang.org/x/text/encoding/htmlindex/gen.go
index d10e5e09f..d10e5e09f 100644
--- a/Godeps/_workspace/src/golang.org/x/text/encoding/htmlindex/gen.go
+++ b/vendor/golang.org/x/text/encoding/htmlindex/gen.go
diff --git a/Godeps/_workspace/src/golang.org/x/text/encoding/htmlindex/htmlindex.go b/vendor/golang.org/x/text/encoding/htmlindex/htmlindex.go
index 70f2ac4bc..70f2ac4bc 100644
--- a/Godeps/_workspace/src/golang.org/x/text/encoding/htmlindex/htmlindex.go
+++ b/vendor/golang.org/x/text/encoding/htmlindex/htmlindex.go
diff --git a/Godeps/_workspace/src/golang.org/x/text/encoding/htmlindex/map.go b/vendor/golang.org/x/text/encoding/htmlindex/map.go
index c61439045..c61439045 100644
--- a/Godeps/_workspace/src/golang.org/x/text/encoding/htmlindex/map.go
+++ b/vendor/golang.org/x/text/encoding/htmlindex/map.go
diff --git a/Godeps/_workspace/src/golang.org/x/text/encoding/htmlindex/tables.go b/vendor/golang.org/x/text/encoding/htmlindex/tables.go
index 78950d3c3..78950d3c3 100644
--- a/Godeps/_workspace/src/golang.org/x/text/encoding/htmlindex/tables.go
+++ b/vendor/golang.org/x/text/encoding/htmlindex/tables.go
diff --git a/Godeps/_workspace/src/golang.org/x/text/encoding/internal/identifier/gen.go b/vendor/golang.org/x/text/encoding/internal/identifier/gen.go
index 0c8eba7e5..0c8eba7e5 100644
--- a/Godeps/_workspace/src/golang.org/x/text/encoding/internal/identifier/gen.go
+++ b/vendor/golang.org/x/text/encoding/internal/identifier/gen.go
diff --git a/Godeps/_workspace/src/golang.org/x/text/encoding/internal/identifier/identifier.go b/vendor/golang.org/x/text/encoding/internal/identifier/identifier.go
index 2a2da0ef2..2a2da0ef2 100644
--- a/Godeps/_workspace/src/golang.org/x/text/encoding/internal/identifier/identifier.go
+++ b/vendor/golang.org/x/text/encoding/internal/identifier/identifier.go
diff --git a/Godeps/_workspace/src/golang.org/x/text/encoding/internal/identifier/mib.go b/vendor/golang.org/x/text/encoding/internal/identifier/mib.go
index 915abfa29..915abfa29 100644
--- a/Godeps/_workspace/src/golang.org/x/text/encoding/internal/identifier/mib.go
+++ b/vendor/golang.org/x/text/encoding/internal/identifier/mib.go
diff --git a/Godeps/_workspace/src/golang.org/x/text/encoding/internal/internal.go b/vendor/golang.org/x/text/encoding/internal/internal.go
index 75a5fd165..75a5fd165 100644
--- a/Godeps/_workspace/src/golang.org/x/text/encoding/internal/internal.go
+++ b/vendor/golang.org/x/text/encoding/internal/internal.go
diff --git a/Godeps/_workspace/src/golang.org/x/text/encoding/japanese/all.go b/vendor/golang.org/x/text/encoding/japanese/all.go
index 6cfa8de45..6cfa8de45 100644
--- a/Godeps/_workspace/src/golang.org/x/text/encoding/japanese/all.go
+++ b/vendor/golang.org/x/text/encoding/japanese/all.go
diff --git a/Godeps/_workspace/src/golang.org/x/text/encoding/japanese/eucjp.go b/vendor/golang.org/x/text/encoding/japanese/eucjp.go
index 40f9b05f3..40f9b05f3 100644
--- a/Godeps/_workspace/src/golang.org/x/text/encoding/japanese/eucjp.go
+++ b/vendor/golang.org/x/text/encoding/japanese/eucjp.go
diff --git a/Godeps/_workspace/src/golang.org/x/text/encoding/japanese/iso2022jp.go b/vendor/golang.org/x/text/encoding/japanese/iso2022jp.go
index b63e7d5d8..b63e7d5d8 100644
--- a/Godeps/_workspace/src/golang.org/x/text/encoding/japanese/iso2022jp.go
+++ b/vendor/golang.org/x/text/encoding/japanese/iso2022jp.go
diff --git a/Godeps/_workspace/src/golang.org/x/text/encoding/japanese/maketables.go b/vendor/golang.org/x/text/encoding/japanese/maketables.go
index d6c10deb0..d6c10deb0 100644
--- a/Godeps/_workspace/src/golang.org/x/text/encoding/japanese/maketables.go
+++ b/vendor/golang.org/x/text/encoding/japanese/maketables.go
diff --git a/Godeps/_workspace/src/golang.org/x/text/encoding/japanese/shiftjis.go b/vendor/golang.org/x/text/encoding/japanese/shiftjis.go
index 099aecc31..099aecc31 100644
--- a/Godeps/_workspace/src/golang.org/x/text/encoding/japanese/shiftjis.go
+++ b/vendor/golang.org/x/text/encoding/japanese/shiftjis.go
diff --git a/Godeps/_workspace/src/golang.org/x/text/encoding/japanese/tables.go b/vendor/golang.org/x/text/encoding/japanese/tables.go
index 1108e83d5..8717b79ae 100644
--- a/Godeps/_workspace/src/golang.org/x/text/encoding/japanese/tables.go
+++ b/vendor/golang.org/x/text/encoding/japanese/tables.go
@@ -1,7 +1,7 @@
// generated by go run maketables.go; DO NOT EDIT
// Package japanese provides Japanese encodings such as EUC-JP and Shift JIS.
-package japanese
+package japanese // import "golang.org/x/text/encoding/japanese"
// jis0208Decode is the decoding table from JIS 0208 code to Unicode.
// It is defined at http://encoding.spec.whatwg.org/index-jis0208.txt
diff --git a/Godeps/_workspace/src/golang.org/x/text/encoding/korean/euckr.go b/vendor/golang.org/x/text/encoding/korean/euckr.go
index a4b9ff178..a4b9ff178 100644
--- a/Godeps/_workspace/src/golang.org/x/text/encoding/korean/euckr.go
+++ b/vendor/golang.org/x/text/encoding/korean/euckr.go
diff --git a/Godeps/_workspace/src/golang.org/x/text/encoding/korean/maketables.go b/vendor/golang.org/x/text/encoding/korean/maketables.go
index c84034fb6..c84034fb6 100644
--- a/Godeps/_workspace/src/golang.org/x/text/encoding/korean/maketables.go
+++ b/vendor/golang.org/x/text/encoding/korean/maketables.go
diff --git a/Godeps/_workspace/src/golang.org/x/text/encoding/korean/tables.go b/vendor/golang.org/x/text/encoding/korean/tables.go
index eb8b4517f..0480e85c4 100644
--- a/Godeps/_workspace/src/golang.org/x/text/encoding/korean/tables.go
+++ b/vendor/golang.org/x/text/encoding/korean/tables.go
@@ -1,7 +1,7 @@
// generated by go run maketables.go; DO NOT EDIT
// Package korean provides Korean encodings such as EUC-KR.
-package korean
+package korean // import "golang.org/x/text/encoding/korean"
// decode is the decoding table from EUC-KR code to Unicode.
// It is defined at http://encoding.spec.whatwg.org/index-euc-kr.txt
diff --git a/Godeps/_workspace/src/golang.org/x/text/encoding/simplifiedchinese/all.go b/vendor/golang.org/x/text/encoding/simplifiedchinese/all.go
index 5ecc526cf..5ecc526cf 100644
--- a/Godeps/_workspace/src/golang.org/x/text/encoding/simplifiedchinese/all.go
+++ b/vendor/golang.org/x/text/encoding/simplifiedchinese/all.go
diff --git a/Godeps/_workspace/src/golang.org/x/text/encoding/simplifiedchinese/gbk.go b/vendor/golang.org/x/text/encoding/simplifiedchinese/gbk.go
index e0b15bbcc..e0b15bbcc 100644
--- a/Godeps/_workspace/src/golang.org/x/text/encoding/simplifiedchinese/gbk.go
+++ b/vendor/golang.org/x/text/encoding/simplifiedchinese/gbk.go
diff --git a/Godeps/_workspace/src/golang.org/x/text/encoding/simplifiedchinese/hzgb2312.go b/vendor/golang.org/x/text/encoding/simplifiedchinese/hzgb2312.go
index 85de6b1e6..85de6b1e6 100644
--- a/Godeps/_workspace/src/golang.org/x/text/encoding/simplifiedchinese/hzgb2312.go
+++ b/vendor/golang.org/x/text/encoding/simplifiedchinese/hzgb2312.go
diff --git a/Godeps/_workspace/src/golang.org/x/text/encoding/simplifiedchinese/maketables.go b/vendor/golang.org/x/text/encoding/simplifiedchinese/maketables.go
index 55016c786..55016c786 100644
--- a/Godeps/_workspace/src/golang.org/x/text/encoding/simplifiedchinese/maketables.go
+++ b/vendor/golang.org/x/text/encoding/simplifiedchinese/maketables.go
diff --git a/Godeps/_workspace/src/golang.org/x/text/encoding/simplifiedchinese/tables.go b/vendor/golang.org/x/text/encoding/simplifiedchinese/tables.go
index fac299d2f..415f52a11 100644
--- a/Godeps/_workspace/src/golang.org/x/text/encoding/simplifiedchinese/tables.go
+++ b/vendor/golang.org/x/text/encoding/simplifiedchinese/tables.go
@@ -1,7 +1,7 @@
// generated by go run maketables.go; DO NOT EDIT
// Package simplifiedchinese provides Simplified Chinese encodings such as GBK.
-package simplifiedchinese
+package simplifiedchinese // import "golang.org/x/text/encoding/simplifiedchinese"
// gb18030 is the table from http://encoding.spec.whatwg.org/index-gb18030.txt
var gb18030 = [...][2]uint16{
diff --git a/Godeps/_workspace/src/golang.org/x/text/encoding/traditionalchinese/big5.go b/vendor/golang.org/x/text/encoding/traditionalchinese/big5.go
index 275821f5d..275821f5d 100644
--- a/Godeps/_workspace/src/golang.org/x/text/encoding/traditionalchinese/big5.go
+++ b/vendor/golang.org/x/text/encoding/traditionalchinese/big5.go
diff --git a/Godeps/_workspace/src/golang.org/x/text/encoding/traditionalchinese/maketables.go b/vendor/golang.org/x/text/encoding/traditionalchinese/maketables.go
index cf7fdb31a..cf7fdb31a 100644
--- a/Godeps/_workspace/src/golang.org/x/text/encoding/traditionalchinese/maketables.go
+++ b/vendor/golang.org/x/text/encoding/traditionalchinese/maketables.go
diff --git a/Godeps/_workspace/src/golang.org/x/text/encoding/traditionalchinese/tables.go b/vendor/golang.org/x/text/encoding/traditionalchinese/tables.go
index b0d23c7d9..d909e38e5 100644
--- a/Godeps/_workspace/src/golang.org/x/text/encoding/traditionalchinese/tables.go
+++ b/vendor/golang.org/x/text/encoding/traditionalchinese/tables.go
@@ -1,7 +1,7 @@
// generated by go run maketables.go; DO NOT EDIT
// Package traditionalchinese provides Traditional Chinese encodings such as Big5.
-package traditionalchinese
+package traditionalchinese // import "golang.org/x/text/encoding/traditionalchinese"
// decode is the decoding table from Big5 code to Unicode.
// It is defined at http://encoding.spec.whatwg.org/index-big5.txt
diff --git a/Godeps/_workspace/src/golang.org/x/text/encoding/unicode/override.go b/vendor/golang.org/x/text/encoding/unicode/override.go
index 35d62fcc9..35d62fcc9 100644
--- a/Godeps/_workspace/src/golang.org/x/text/encoding/unicode/override.go
+++ b/vendor/golang.org/x/text/encoding/unicode/override.go
diff --git a/Godeps/_workspace/src/golang.org/x/text/encoding/unicode/unicode.go b/vendor/golang.org/x/text/encoding/unicode/unicode.go
index f3f2c4eb0..579cadfb1 100644
--- a/Godeps/_workspace/src/golang.org/x/text/encoding/unicode/unicode.go
+++ b/vendor/golang.org/x/text/encoding/unicode/unicode.go
@@ -3,7 +3,7 @@
// license that can be found in the LICENSE file.
// Package unicode provides Unicode encodings such as UTF-16.
-package unicode
+package unicode // import "golang.org/x/text/encoding/unicode"
import (
"errors"
diff --git a/vendor/golang.org/x/text/internal/gen/code.go b/vendor/golang.org/x/text/internal/gen/code.go
new file mode 100644
index 000000000..2202c9f64
--- /dev/null
+++ b/vendor/golang.org/x/text/internal/gen/code.go
@@ -0,0 +1,339 @@
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package gen
+
+import (
+ "bytes"
+ "encoding/gob"
+ "fmt"
+ "hash"
+ "hash/fnv"
+ "io"
+ "log"
+ "os"
+ "reflect"
+ "strings"
+ "unicode"
+ "unicode/utf8"
+)
+
+// This file contains utilities for generating code.
+
+// TODO: other write methods like:
+// - slices, maps, types, etc.
+
+// CodeWriter is a utility for writing structured code. It computes the content
+// hash and size of written content. It ensures there are newlines between
+// written code blocks.
+type CodeWriter struct {
+ buf bytes.Buffer
+ Size int
+ Hash hash.Hash32 // content hash
+ gob *gob.Encoder
+ // For comments we skip the usual one-line separator if they are followed by
+ // a code block.
+ skipSep bool
+}
+
+func (w *CodeWriter) Write(p []byte) (n int, err error) {
+ return w.buf.Write(p)
+}
+
+// NewCodeWriter returns a new CodeWriter.
+func NewCodeWriter() *CodeWriter {
+ h := fnv.New32()
+ return &CodeWriter{Hash: h, gob: gob.NewEncoder(h)}
+}
+
+// WriteGoFile appends the buffer with the total size of all created structures
+// and writes it as a Go file to the the given file with the given package name.
+func (w *CodeWriter) WriteGoFile(filename, pkg string) {
+ f, err := os.Create(filename)
+ if err != nil {
+ log.Fatalf("Could not create file %s: %v", filename, err)
+ }
+ defer f.Close()
+ if _, err = w.WriteGo(f, pkg); err != nil {
+ log.Fatalf("Error writing file %s: %v", filename, err)
+ }
+}
+
+// WriteGo appends the buffer with the total size of all created structures and
+// writes it as a Go file to the the given writer with the given package name.
+func (w *CodeWriter) WriteGo(out io.Writer, pkg string) (n int, err error) {
+ sz := w.Size
+ w.WriteComment("Total table size %d bytes (%dKiB); checksum: %X\n", sz, sz/1024, w.Hash.Sum32())
+ defer w.buf.Reset()
+ return WriteGo(out, pkg, w.buf.Bytes())
+}
+
+func (w *CodeWriter) printf(f string, x ...interface{}) {
+ fmt.Fprintf(w, f, x...)
+}
+
+func (w *CodeWriter) insertSep() {
+ if w.skipSep {
+ w.skipSep = false
+ return
+ }
+ // Use at least two newlines to ensure a blank space between the previous
+ // block. WriteGoFile will remove extraneous newlines.
+ w.printf("\n\n")
+}
+
+// WriteComment writes a comment block. All line starts are prefixed with "//".
+// Initial empty lines are gobbled. The indentation for the first line is
+// stripped from consecutive lines.
+func (w *CodeWriter) WriteComment(comment string, args ...interface{}) {
+ s := fmt.Sprintf(comment, args...)
+ s = strings.Trim(s, "\n")
+
+ // Use at least two newlines to ensure a blank space between the previous
+ // block. WriteGoFile will remove extraneous newlines.
+ w.printf("\n\n// ")
+ w.skipSep = true
+
+ // strip first indent level.
+ sep := "\n"
+ for ; len(s) > 0 && (s[0] == '\t' || s[0] == ' '); s = s[1:] {
+ sep += s[:1]
+ }
+
+ strings.NewReplacer(sep, "\n// ", "\n", "\n// ").WriteString(w, s)
+
+ w.printf("\n")
+}
+
+func (w *CodeWriter) writeSizeInfo(size int) {
+ w.printf("// Size: %d bytes\n", size)
+}
+
+// WriteConst writes a constant of the given name and value.
+func (w *CodeWriter) WriteConst(name string, x interface{}) {
+ w.insertSep()
+ v := reflect.ValueOf(x)
+
+ switch v.Type().Kind() {
+ case reflect.String:
+ // See golang.org/issue/13145.
+ const arbitraryCutoff = 16
+ if v.Len() > arbitraryCutoff {
+ w.printf("var %s %s = ", name, typeName(x))
+ } else {
+ w.printf("const %s %s = ", name, typeName(x))
+ }
+ w.WriteString(v.String())
+ w.printf("\n")
+ default:
+ w.printf("const %s = %#v\n", name, x)
+ }
+}
+
+// WriteVar writes a variable of the given name and value.
+func (w *CodeWriter) WriteVar(name string, x interface{}) {
+ w.insertSep()
+ v := reflect.ValueOf(x)
+ oldSize := w.Size
+ sz := int(v.Type().Size())
+ w.Size += sz
+
+ switch v.Type().Kind() {
+ case reflect.String:
+ w.printf("var %s %s = ", name, typeName(x))
+ w.WriteString(v.String())
+ case reflect.Struct:
+ w.gob.Encode(x)
+ fallthrough
+ case reflect.Slice, reflect.Array:
+ w.printf("var %s = ", name)
+ w.writeValue(v)
+ w.writeSizeInfo(w.Size - oldSize)
+ default:
+ w.printf("var %s %s = ", name, typeName(x))
+ w.gob.Encode(x)
+ w.writeValue(v)
+ w.writeSizeInfo(w.Size - oldSize)
+ }
+ w.printf("\n")
+}
+
+func (w *CodeWriter) writeValue(v reflect.Value) {
+ x := v.Interface()
+ switch v.Kind() {
+ case reflect.String:
+ w.WriteString(v.String())
+ case reflect.Array:
+ // Don't double count: callers of WriteArray count on the size being
+ // added, so we need to discount it here.
+ w.Size -= int(v.Type().Size())
+ w.writeSlice(x, true)
+ case reflect.Slice:
+ w.writeSlice(x, false)
+ case reflect.Struct:
+ w.printf("%s{\n", typeName(v.Interface()))
+ t := v.Type()
+ for i := 0; i < v.NumField(); i++ {
+ w.printf("%s: ", t.Field(i).Name)
+ w.writeValue(v.Field(i))
+ w.printf(",\n")
+ }
+ w.printf("}")
+ default:
+ w.printf("%#v", x)
+ }
+}
+
+// WriteString writes a string literal.
+func (w *CodeWriter) WriteString(s string) {
+ s = strings.Replace(s, `\`, `\\`, -1)
+ io.WriteString(w.Hash, s) // content hash
+ w.Size += len(s)
+
+ const maxInline = 40
+ if len(s) <= maxInline {
+ w.printf("%q", s)
+ return
+ }
+
+ // We will render the string as a multi-line string.
+ const maxWidth = 80 - 4 - len(`"`) - len(`" +`)
+
+ // When starting on its own line, go fmt indents line 2+ an extra level.
+ n, max := maxWidth, maxWidth-4
+
+ // Print "" +\n, if a string does not start on its own line.
+ b := w.buf.Bytes()
+ if p := len(bytes.TrimRight(b, " \t")); p > 0 && b[p-1] != '\n' {
+ w.printf("\"\" + // Size: %d bytes\n", len(s))
+ n, max = maxWidth, maxWidth
+ }
+
+ w.printf(`"`)
+
+ for sz, p := 0, 0; p < len(s); {
+ var r rune
+ r, sz = utf8.DecodeRuneInString(s[p:])
+ out := s[p : p+sz]
+ chars := 1
+ if !unicode.IsPrint(r) || r == utf8.RuneError || r == '"' {
+ switch sz {
+ case 1:
+ out = fmt.Sprintf("\\x%02x", s[p])
+ case 2, 3:
+ out = fmt.Sprintf("\\u%04x", r)
+ case 4:
+ out = fmt.Sprintf("\\U%08x", r)
+ }
+ chars = len(out)
+ }
+ if n -= chars; n < 0 {
+ w.printf("\" +\n\"")
+ n = max - len(out)
+ }
+ w.printf("%s", out)
+ p += sz
+ }
+ w.printf(`"`)
+}
+
+// WriteSlice writes a slice value.
+func (w *CodeWriter) WriteSlice(x interface{}) {
+ w.writeSlice(x, false)
+}
+
+// WriteArray writes an array value.
+func (w *CodeWriter) WriteArray(x interface{}) {
+ w.writeSlice(x, true)
+}
+
+func (w *CodeWriter) writeSlice(x interface{}, isArray bool) {
+ v := reflect.ValueOf(x)
+ w.gob.Encode(v.Len())
+ w.Size += v.Len() * int(v.Type().Elem().Size())
+ name := typeName(x)
+ if isArray {
+ name = fmt.Sprintf("[%d]%s", v.Len(), name[strings.Index(name, "]")+1:])
+ }
+ if isArray {
+ w.printf("%s{\n", name)
+ } else {
+ w.printf("%s{ // %d elements\n", name, v.Len())
+ }
+
+ switch kind := v.Type().Elem().Kind(); kind {
+ case reflect.String:
+ for _, s := range x.([]string) {
+ w.WriteString(s)
+ w.printf(",\n")
+ }
+ case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64,
+ reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
+ // nLine and nBlock are the number of elements per line and block.
+ nLine, nBlock, format := 8, 64, "%d,"
+ switch kind {
+ case reflect.Uint8:
+ format = "%#02x,"
+ case reflect.Uint16:
+ format = "%#04x,"
+ case reflect.Uint32:
+ nLine, nBlock, format = 4, 32, "%#08x,"
+ case reflect.Uint, reflect.Uint64:
+ nLine, nBlock, format = 4, 32, "%#016x,"
+ case reflect.Int8:
+ nLine = 16
+ }
+ n := nLine
+ for i := 0; i < v.Len(); i++ {
+ if i%nBlock == 0 && v.Len() > nBlock {
+ w.printf("// Entry %X - %X\n", i, i+nBlock-1)
+ }
+ x := v.Index(i).Interface()
+ w.gob.Encode(x)
+ w.printf(format, x)
+ if n--; n == 0 {
+ n = nLine
+ w.printf("\n")
+ }
+ }
+ w.printf("\n")
+ case reflect.Struct:
+ zero := reflect.Zero(v.Type().Elem()).Interface()
+ for i := 0; i < v.Len(); i++ {
+ x := v.Index(i).Interface()
+ w.gob.EncodeValue(v)
+ if !reflect.DeepEqual(zero, x) {
+ line := fmt.Sprintf("%#v,\n", x)
+ line = line[strings.IndexByte(line, '{'):]
+ w.printf("%d: ", i)
+ w.printf(line)
+ }
+ }
+ case reflect.Array:
+ for i := 0; i < v.Len(); i++ {
+ w.printf("%d: %#v,\n", i, v.Index(i).Interface())
+ }
+ default:
+ panic("gen: slice elem type not supported")
+ }
+ w.printf("}")
+}
+
+// WriteType writes a definition of the type of the given value and returns the
+// type name.
+func (w *CodeWriter) WriteType(x interface{}) string {
+ t := reflect.TypeOf(x)
+ w.printf("type %s struct {\n", t.Name())
+ for i := 0; i < t.NumField(); i++ {
+ w.printf("\t%s %s\n", t.Field(i).Name, t.Field(i).Type)
+ }
+ w.printf("}\n")
+ return t.Name()
+}
+
+// typeName returns the name of the go type of x.
+func typeName(x interface{}) string {
+ t := reflect.ValueOf(x).Type()
+ return strings.Replace(fmt.Sprint(t), "main.", "", 1)
+}
diff --git a/vendor/golang.org/x/text/internal/gen/gen.go b/vendor/golang.org/x/text/internal/gen/gen.go
new file mode 100644
index 000000000..84c699faa
--- /dev/null
+++ b/vendor/golang.org/x/text/internal/gen/gen.go
@@ -0,0 +1,281 @@
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package gen contains common code for the various code generation tools in the
+// text repository. Its usage ensures consistency between tools.
+//
+// This package defines command line flags that are common to most generation
+// tools. The flags allow for specifying specific Unicode and CLDR versions
+// in the public Unicode data repository (http://www.unicode.org/Public).
+//
+// A local Unicode data mirror can be set through the flag -local or the
+// environment variable UNICODE_DIR. The former takes precedence. The local
+// directory should follow the same structure as the public repository.
+//
+// IANA data can also optionally be mirrored by putting it in the iana directory
+// rooted at the top of the local mirror. Beware, though, that IANA data is not
+// versioned. So it is up to the developer to use the right version.
+package gen // import "golang.org/x/text/internal/gen"
+
+import (
+ "bytes"
+ "flag"
+ "fmt"
+ "go/build"
+ "go/format"
+ "io"
+ "io/ioutil"
+ "log"
+ "net/http"
+ "os"
+ "path"
+ "path/filepath"
+ "sync"
+ "unicode"
+
+ "golang.org/x/text/unicode/cldr"
+)
+
+var (
+ url = flag.String("url",
+ "http://www.unicode.org/Public",
+ "URL of Unicode database directory")
+ iana = flag.String("iana",
+ "http://www.iana.org",
+ "URL of the IANA repository")
+ unicodeVersion = flag.String("unicode",
+ getEnv("UNICODE_VERSION", unicode.Version),
+ "unicode version to use")
+ cldrVersion = flag.String("cldr",
+ getEnv("CLDR_VERSION", cldr.Version),
+ "cldr version to use")
+)
+
+func getEnv(name, def string) string {
+ if v := os.Getenv(name); v != "" {
+ return v
+ }
+ return def
+}
+
+// Init performs common initialization for a gen command. It parses the flags
+// and sets up the standard logging parameters.
+func Init() {
+ log.SetPrefix("")
+ log.SetFlags(log.Lshortfile)
+ flag.Parse()
+}
+
+const header = `// This file was generated by go generate; DO NOT EDIT
+
+package %s
+
+`
+
+// UnicodeVersion reports the requested Unicode version.
+func UnicodeVersion() string {
+ return *unicodeVersion
+}
+
+// UnicodeVersion reports the requested CLDR version.
+func CLDRVersion() string {
+ return *cldrVersion
+}
+
+// IsLocal reports whether data files are available locally.
+func IsLocal() bool {
+ dir, err := localReadmeFile()
+ if err != nil {
+ return false
+ }
+ if _, err = os.Stat(dir); err != nil {
+ return false
+ }
+ return true
+}
+
+// OpenUCDFile opens the requested UCD file. The file is specified relative to
+// the public Unicode root directory. It will call log.Fatal if there are any
+// errors.
+func OpenUCDFile(file string) io.ReadCloser {
+ return openUnicode(path.Join(*unicodeVersion, "ucd", file))
+}
+
+// OpenCLDRCoreZip opens the CLDR core zip file. It will call log.Fatal if there
+// are any errors.
+func OpenCLDRCoreZip() io.ReadCloser {
+ return OpenUnicodeFile("cldr", *cldrVersion, "core.zip")
+}
+
+// OpenUnicodeFile opens the requested file of the requested category from the
+// root of the Unicode data archive. The file is specified relative to the
+// public Unicode root directory. If version is "", it will use the default
+// Unicode version. It will call log.Fatal if there are any errors.
+func OpenUnicodeFile(category, version, file string) io.ReadCloser {
+ if version == "" {
+ version = UnicodeVersion()
+ }
+ return openUnicode(path.Join(category, version, file))
+}
+
+// OpenIANAFile opens the requested IANA file. The file is specified relative
+// to the IANA root, which is typically either http://www.iana.org or the
+// iana directory in the local mirror. It will call log.Fatal if there are any
+// errors.
+func OpenIANAFile(path string) io.ReadCloser {
+ return Open(*iana, "iana", path)
+}
+
+var (
+ dirMutex sync.Mutex
+ localDir string
+)
+
+const permissions = 0755
+
+func localReadmeFile() (string, error) {
+ p, err := build.Import("golang.org/x/text", "", build.FindOnly)
+ if err != nil {
+ return "", fmt.Errorf("Could not locate package: %v", err)
+ }
+ return filepath.Join(p.Dir, "DATA", "README"), nil
+}
+
+func getLocalDir() string {
+ dirMutex.Lock()
+ defer dirMutex.Unlock()
+
+ readme, err := localReadmeFile()
+ if err != nil {
+ log.Fatal(err)
+ }
+ dir := filepath.Dir(readme)
+ if _, err := os.Stat(readme); err != nil {
+ if err := os.MkdirAll(dir, permissions); err != nil {
+ log.Fatalf("Could not create directory: %v", err)
+ }
+ ioutil.WriteFile(readme, []byte(readmeTxt), permissions)
+ }
+ return dir
+}
+
+const readmeTxt = `Generated by golang.org/x/text/internal/gen. DO NOT EDIT.
+
+This directory contains downloaded files used to generate the various tables
+in the golang.org/x/text subrepo.
+
+Note that the language subtag repo (iana/assignments/language-subtag-registry)
+and all other times in the iana subdirectory are not versioned and will need
+to be periodically manually updated. The easiest way to do this is to remove
+the entire iana directory. This is mostly of concern when updating the language
+package.
+`
+
+// Open opens subdir/path if a local directory is specified and the file exists,
+// where subdir is a directory relative to the local root, or fetches it from
+// urlRoot/path otherwise. It will call log.Fatal if there are any errors.
+func Open(urlRoot, subdir, path string) io.ReadCloser {
+ file := filepath.Join(getLocalDir(), subdir, filepath.FromSlash(path))
+ return open(file, urlRoot, path)
+}
+
+func openUnicode(path string) io.ReadCloser {
+ file := filepath.Join(getLocalDir(), filepath.FromSlash(path))
+ return open(file, *url, path)
+}
+
+// TODO: automatically periodically update non-versioned files.
+
+func open(file, urlRoot, path string) io.ReadCloser {
+ if f, err := os.Open(file); err == nil {
+ return f
+ }
+ r := get(urlRoot, path)
+ defer r.Close()
+ b, err := ioutil.ReadAll(r)
+ if err != nil {
+ log.Fatalf("Could not download file: %v", err)
+ }
+ os.MkdirAll(filepath.Dir(file), permissions)
+ if err := ioutil.WriteFile(file, b, permissions); err != nil {
+ log.Fatalf("Could not create file: %v", err)
+ }
+ return ioutil.NopCloser(bytes.NewReader(b))
+}
+
+func get(root, path string) io.ReadCloser {
+ url := root + "/" + path
+ fmt.Printf("Fetching %s...", url)
+ defer fmt.Println(" done.")
+ resp, err := http.Get(url)
+ if err != nil {
+ log.Fatalf("HTTP GET: %v", err)
+ }
+ if resp.StatusCode != 200 {
+ log.Fatalf("Bad GET status for %q: %q", url, resp.Status)
+ }
+ return resp.Body
+}
+
+// TODO: use Write*Version in all applicable packages.
+
+// WriteUnicodeVersion writes a constant for the Unicode version from which the
+// tables are generated.
+func WriteUnicodeVersion(w io.Writer) {
+ fmt.Fprintf(w, "// UnicodeVersion is the Unicode version from which the tables in this package are derived.\n")
+ fmt.Fprintf(w, "const UnicodeVersion = %q\n\n", UnicodeVersion())
+}
+
+// WriteCLDRVersion writes a constant for the CLDR version from which the
+// tables are generated.
+func WriteCLDRVersion(w io.Writer) {
+ fmt.Fprintf(w, "// CLDRVersion is the CLDR version from which the tables in this package are derived.\n")
+ fmt.Fprintf(w, "const CLDRVersion = %q\n\n", CLDRVersion())
+}
+
+// WriteGoFile prepends a standard file comment and package statement to the
+// given bytes, applies gofmt, and writes them to a file with the given name.
+// It will call log.Fatal if there are any errors.
+func WriteGoFile(filename, pkg string, b []byte) {
+ w, err := os.Create(filename)
+ if err != nil {
+ log.Fatalf("Could not create file %s: %v", filename, err)
+ }
+ defer w.Close()
+ if _, err = WriteGo(w, pkg, b); err != nil {
+ log.Fatalf("Error writing file %s: %v", filename, err)
+ }
+}
+
+// WriteGo prepends a standard file comment and package statement to the given
+// bytes, applies gofmt, and writes them to w.
+func WriteGo(w io.Writer, pkg string, b []byte) (n int, err error) {
+ src := []byte(fmt.Sprintf(header, pkg))
+ src = append(src, b...)
+ formatted, err := format.Source(src)
+ if err != nil {
+ // Print the generated code even in case of an error so that the
+ // returned error can be meaningfully interpreted.
+ n, _ = w.Write(src)
+ return n, err
+ }
+ return w.Write(formatted)
+}
+
+// Repackage rewrites a Go file from belonging to package main to belonging to
+// the given package.
+func Repackage(inFile, outFile, pkg string) {
+ src, err := ioutil.ReadFile(inFile)
+ if err != nil {
+ log.Fatalf("reading %s: %v", inFile, err)
+ }
+ const toDelete = "package main\n\n"
+ i := bytes.Index(src, []byte(toDelete))
+ if i < 0 {
+ log.Fatalf("Could not find %q in %s.", toDelete, inFile)
+ }
+ w := &bytes.Buffer{}
+ w.Write(src[i+len(toDelete):])
+ WriteGoFile(outFile, pkg, w.Bytes())
+}
diff --git a/Godeps/_workspace/src/golang.org/x/text/internal/tag/tag.go b/vendor/golang.org/x/text/internal/tag/tag.go
index 2cf4ecd29..b5d348891 100644
--- a/Godeps/_workspace/src/golang.org/x/text/internal/tag/tag.go
+++ b/vendor/golang.org/x/text/internal/tag/tag.go
@@ -3,7 +3,7 @@
// license that can be found in the LICENSE file.
// Package tag contains functionality handling tags and related data.
-package tag
+package tag // import "golang.org/x/text/internal/tag"
import "sort"
diff --git a/Godeps/_workspace/src/golang.org/x/text/internal/utf8internal/utf8internal.go b/vendor/golang.org/x/text/internal/utf8internal/utf8internal.go
index 575cea870..575cea870 100644
--- a/Godeps/_workspace/src/golang.org/x/text/internal/utf8internal/utf8internal.go
+++ b/vendor/golang.org/x/text/internal/utf8internal/utf8internal.go
diff --git a/Godeps/_workspace/src/golang.org/x/text/language/Makefile b/vendor/golang.org/x/text/language/Makefile
index 79f005784..79f005784 100644
--- a/Godeps/_workspace/src/golang.org/x/text/language/Makefile
+++ b/vendor/golang.org/x/text/language/Makefile
diff --git a/Godeps/_workspace/src/golang.org/x/text/language/common.go b/vendor/golang.org/x/text/language/common.go
index a255bb0a5..a255bb0a5 100644
--- a/Godeps/_workspace/src/golang.org/x/text/language/common.go
+++ b/vendor/golang.org/x/text/language/common.go
diff --git a/Godeps/_workspace/src/golang.org/x/text/language/coverage.go b/vendor/golang.org/x/text/language/coverage.go
index 101fd23c1..101fd23c1 100644
--- a/Godeps/_workspace/src/golang.org/x/text/language/coverage.go
+++ b/vendor/golang.org/x/text/language/coverage.go
diff --git a/Godeps/_workspace/src/golang.org/x/text/language/gen_common.go b/vendor/golang.org/x/text/language/gen_common.go
index 83ce18013..83ce18013 100644
--- a/Godeps/_workspace/src/golang.org/x/text/language/gen_common.go
+++ b/vendor/golang.org/x/text/language/gen_common.go
diff --git a/Godeps/_workspace/src/golang.org/x/text/language/gen_index.go b/vendor/golang.org/x/text/language/gen_index.go
index eef555cd3..eef555cd3 100644
--- a/Godeps/_workspace/src/golang.org/x/text/language/gen_index.go
+++ b/vendor/golang.org/x/text/language/gen_index.go
diff --git a/Godeps/_workspace/src/golang.org/x/text/language/go1_1.go b/vendor/golang.org/x/text/language/go1_1.go
index 380f4c09f..380f4c09f 100644
--- a/Godeps/_workspace/src/golang.org/x/text/language/go1_1.go
+++ b/vendor/golang.org/x/text/language/go1_1.go
diff --git a/Godeps/_workspace/src/golang.org/x/text/language/go1_2.go b/vendor/golang.org/x/text/language/go1_2.go
index 38268c57a..38268c57a 100644
--- a/Godeps/_workspace/src/golang.org/x/text/language/go1_2.go
+++ b/vendor/golang.org/x/text/language/go1_2.go
diff --git a/vendor/golang.org/x/text/language/index.go b/vendor/golang.org/x/text/language/index.go
new file mode 100644
index 000000000..50c752186
--- /dev/null
+++ b/vendor/golang.org/x/text/language/index.go
@@ -0,0 +1,767 @@
+// This file was generated by go generate; DO NOT EDIT
+
+package language
+
+// NumCompactTags is the number of common tags. The maximum tag is
+// NumCompactTags-1.
+const NumCompactTags = 752
+
+var specialTags = []Tag{ // 2 elements
+ 0: {lang: 0xd5, region: 0x6d, script: 0x0, pVariant: 0x5, pExt: 0xe, str: "ca-ES-valencia"},
+ 1: {lang: 0x134, region: 0x134, script: 0x0, pVariant: 0x5, pExt: 0x5, str: "en-US-u-va-posix"},
+} // Size: 72 bytes
+
+var coreTags = map[uint32]uint16{
+ 0x0: 0, // und
+ 0x01500000: 3, // af
+ 0x015000d1: 4, // af-NA
+ 0x01500160: 5, // af-ZA
+ 0x01b00000: 6, // agq
+ 0x01b00051: 7, // agq-CM
+ 0x02000000: 8, // ak
+ 0x0200007f: 9, // ak-GH
+ 0x02600000: 10, // am
+ 0x0260006e: 11, // am-ET
+ 0x03900000: 12, // ar
+ 0x03900001: 13, // ar-001
+ 0x03900022: 14, // ar-AE
+ 0x03900038: 15, // ar-BH
+ 0x03900061: 16, // ar-DJ
+ 0x03900066: 17, // ar-DZ
+ 0x0390006a: 18, // ar-EG
+ 0x0390006b: 19, // ar-EH
+ 0x0390006c: 20, // ar-ER
+ 0x03900096: 21, // ar-IL
+ 0x0390009a: 22, // ar-IQ
+ 0x039000a0: 23, // ar-JO
+ 0x039000a7: 24, // ar-KM
+ 0x039000ab: 25, // ar-KW
+ 0x039000af: 26, // ar-LB
+ 0x039000b8: 27, // ar-LY
+ 0x039000b9: 28, // ar-MA
+ 0x039000c8: 29, // ar-MR
+ 0x039000e0: 30, // ar-OM
+ 0x039000ec: 31, // ar-PS
+ 0x039000f2: 32, // ar-QA
+ 0x03900107: 33, // ar-SA
+ 0x0390010a: 34, // ar-SD
+ 0x03900114: 35, // ar-SO
+ 0x03900116: 36, // ar-SS
+ 0x0390011b: 37, // ar-SY
+ 0x0390011f: 38, // ar-TD
+ 0x03900127: 39, // ar-TN
+ 0x0390015d: 40, // ar-YE
+ 0x03f00000: 41, // ars
+ 0x04200000: 42, // as
+ 0x04200098: 43, // as-IN
+ 0x04300000: 44, // asa
+ 0x0430012e: 45, // asa-TZ
+ 0x04700000: 46, // ast
+ 0x0470006d: 47, // ast-ES
+ 0x05700000: 48, // az
+ 0x0571e000: 49, // az-Cyrl
+ 0x0571e031: 50, // az-Cyrl-AZ
+ 0x05752000: 51, // az-Latn
+ 0x05752031: 52, // az-Latn-AZ
+ 0x05d00000: 53, // bas
+ 0x05d00051: 54, // bas-CM
+ 0x07000000: 55, // be
+ 0x07000046: 56, // be-BY
+ 0x07400000: 57, // bem
+ 0x07400161: 58, // bem-ZM
+ 0x07800000: 59, // bez
+ 0x0780012e: 60, // bez-TZ
+ 0x07d00000: 61, // bg
+ 0x07d00037: 62, // bg-BG
+ 0x08100000: 63, // bh
+ 0x09e00000: 64, // bm
+ 0x09e000c2: 65, // bm-ML
+ 0x0a300000: 66, // bn
+ 0x0a300034: 67, // bn-BD
+ 0x0a300098: 68, // bn-IN
+ 0x0a700000: 69, // bo
+ 0x0a700052: 70, // bo-CN
+ 0x0a700098: 71, // bo-IN
+ 0x0b000000: 72, // br
+ 0x0b000077: 73, // br-FR
+ 0x0b300000: 74, // brx
+ 0x0b300098: 75, // brx-IN
+ 0x0b500000: 76, // bs
+ 0x0b51e000: 77, // bs-Cyrl
+ 0x0b51e032: 78, // bs-Cyrl-BA
+ 0x0b552000: 79, // bs-Latn
+ 0x0b552032: 80, // bs-Latn-BA
+ 0x0d500000: 81, // ca
+ 0x0d500021: 82, // ca-AD
+ 0x0d50006d: 83, // ca-ES
+ 0x0d500077: 84, // ca-FR
+ 0x0d50009d: 85, // ca-IT
+ 0x0da00000: 86, // ce
+ 0x0da00105: 87, // ce-RU
+ 0x0dd00000: 88, // cgg
+ 0x0dd00130: 89, // cgg-UG
+ 0x0e300000: 90, // chr
+ 0x0e300134: 91, // chr-US
+ 0x0e700000: 92, // ckb
+ 0x0e70009a: 93, // ckb-IQ
+ 0x0e70009b: 94, // ckb-IR
+ 0x0f600000: 95, // cs
+ 0x0f60005d: 96, // cs-CZ
+ 0x0fa00000: 97, // cu
+ 0x0fa00105: 98, // cu-RU
+ 0x0fc00000: 99, // cy
+ 0x0fc0007a: 100, // cy-GB
+ 0x0fd00000: 101, // da
+ 0x0fd00062: 102, // da-DK
+ 0x0fd00081: 103, // da-GL
+ 0x10400000: 104, // dav
+ 0x104000a3: 105, // dav-KE
+ 0x10900000: 106, // de
+ 0x1090002d: 107, // de-AT
+ 0x10900035: 108, // de-BE
+ 0x1090004d: 109, // de-CH
+ 0x1090005f: 110, // de-DE
+ 0x1090009d: 111, // de-IT
+ 0x109000b1: 112, // de-LI
+ 0x109000b6: 113, // de-LU
+ 0x11300000: 114, // dje
+ 0x113000d3: 115, // dje-NE
+ 0x11b00000: 116, // dsb
+ 0x11b0005f: 117, // dsb-DE
+ 0x12000000: 118, // dua
+ 0x12000051: 119, // dua-CM
+ 0x12400000: 120, // dv
+ 0x12700000: 121, // dyo
+ 0x12700113: 122, // dyo-SN
+ 0x12900000: 123, // dz
+ 0x12900042: 124, // dz-BT
+ 0x12b00000: 125, // ebu
+ 0x12b000a3: 126, // ebu-KE
+ 0x12c00000: 127, // ee
+ 0x12c0007f: 128, // ee-GH
+ 0x12c00121: 129, // ee-TG
+ 0x13100000: 130, // el
+ 0x1310005c: 131, // el-CY
+ 0x13100086: 132, // el-GR
+ 0x13400000: 133, // en
+ 0x13400001: 134, // en-001
+ 0x1340001a: 135, // en-150
+ 0x13400024: 136, // en-AG
+ 0x13400025: 137, // en-AI
+ 0x1340002c: 138, // en-AS
+ 0x1340002d: 139, // en-AT
+ 0x1340002e: 140, // en-AU
+ 0x13400033: 141, // en-BB
+ 0x13400035: 142, // en-BE
+ 0x13400039: 143, // en-BI
+ 0x1340003c: 144, // en-BM
+ 0x13400041: 145, // en-BS
+ 0x13400045: 146, // en-BW
+ 0x13400047: 147, // en-BZ
+ 0x13400048: 148, // en-CA
+ 0x13400049: 149, // en-CC
+ 0x1340004d: 150, // en-CH
+ 0x1340004f: 151, // en-CK
+ 0x13400051: 152, // en-CM
+ 0x1340005b: 153, // en-CX
+ 0x1340005c: 154, // en-CY
+ 0x1340005f: 155, // en-DE
+ 0x13400060: 156, // en-DG
+ 0x13400062: 157, // en-DK
+ 0x13400063: 158, // en-DM
+ 0x1340006c: 159, // en-ER
+ 0x13400071: 160, // en-FI
+ 0x13400072: 161, // en-FJ
+ 0x13400073: 162, // en-FK
+ 0x13400074: 163, // en-FM
+ 0x1340007a: 164, // en-GB
+ 0x1340007b: 165, // en-GD
+ 0x1340007e: 166, // en-GG
+ 0x1340007f: 167, // en-GH
+ 0x13400080: 168, // en-GI
+ 0x13400082: 169, // en-GM
+ 0x13400089: 170, // en-GU
+ 0x1340008b: 171, // en-GY
+ 0x1340008c: 172, // en-HK
+ 0x13400095: 173, // en-IE
+ 0x13400096: 174, // en-IL
+ 0x13400097: 175, // en-IM
+ 0x13400098: 176, // en-IN
+ 0x13400099: 177, // en-IO
+ 0x1340009e: 178, // en-JE
+ 0x1340009f: 179, // en-JM
+ 0x134000a3: 180, // en-KE
+ 0x134000a6: 181, // en-KI
+ 0x134000a8: 182, // en-KN
+ 0x134000ac: 183, // en-KY
+ 0x134000b0: 184, // en-LC
+ 0x134000b3: 185, // en-LR
+ 0x134000b4: 186, // en-LS
+ 0x134000be: 187, // en-MG
+ 0x134000bf: 188, // en-MH
+ 0x134000c5: 189, // en-MO
+ 0x134000c6: 190, // en-MP
+ 0x134000c9: 191, // en-MS
+ 0x134000ca: 192, // en-MT
+ 0x134000cb: 193, // en-MU
+ 0x134000cd: 194, // en-MW
+ 0x134000cf: 195, // en-MY
+ 0x134000d1: 196, // en-NA
+ 0x134000d4: 197, // en-NF
+ 0x134000d5: 198, // en-NG
+ 0x134000d8: 199, // en-NL
+ 0x134000dc: 200, // en-NR
+ 0x134000de: 201, // en-NU
+ 0x134000df: 202, // en-NZ
+ 0x134000e5: 203, // en-PG
+ 0x134000e6: 204, // en-PH
+ 0x134000e7: 205, // en-PK
+ 0x134000ea: 206, // en-PN
+ 0x134000eb: 207, // en-PR
+ 0x134000ef: 208, // en-PW
+ 0x13400106: 209, // en-RW
+ 0x13400108: 210, // en-SB
+ 0x13400109: 211, // en-SC
+ 0x1340010a: 212, // en-SD
+ 0x1340010b: 213, // en-SE
+ 0x1340010c: 214, // en-SG
+ 0x1340010d: 215, // en-SH
+ 0x1340010e: 216, // en-SI
+ 0x13400111: 217, // en-SL
+ 0x13400116: 218, // en-SS
+ 0x1340011a: 219, // en-SX
+ 0x1340011c: 220, // en-SZ
+ 0x1340011e: 221, // en-TC
+ 0x13400124: 222, // en-TK
+ 0x13400128: 223, // en-TO
+ 0x1340012b: 224, // en-TT
+ 0x1340012c: 225, // en-TV
+ 0x1340012e: 226, // en-TZ
+ 0x13400130: 227, // en-UG
+ 0x13400132: 228, // en-UM
+ 0x13400134: 229, // en-US
+ 0x13400138: 230, // en-VC
+ 0x1340013b: 231, // en-VG
+ 0x1340013c: 232, // en-VI
+ 0x1340013e: 233, // en-VU
+ 0x13400141: 234, // en-WS
+ 0x13400160: 235, // en-ZA
+ 0x13400161: 236, // en-ZM
+ 0x13400163: 237, // en-ZW
+ 0x13700000: 238, // eo
+ 0x13700001: 239, // eo-001
+ 0x13900000: 240, // es
+ 0x1390001e: 241, // es-419
+ 0x1390002b: 242, // es-AR
+ 0x1390003e: 243, // es-BO
+ 0x13900040: 244, // es-BR
+ 0x13900050: 245, // es-CL
+ 0x13900053: 246, // es-CO
+ 0x13900055: 247, // es-CR
+ 0x13900058: 248, // es-CU
+ 0x13900064: 249, // es-DO
+ 0x13900067: 250, // es-EA
+ 0x13900068: 251, // es-EC
+ 0x1390006d: 252, // es-ES
+ 0x13900085: 253, // es-GQ
+ 0x13900088: 254, // es-GT
+ 0x1390008e: 255, // es-HN
+ 0x13900093: 256, // es-IC
+ 0x139000ce: 257, // es-MX
+ 0x139000d7: 258, // es-NI
+ 0x139000e1: 259, // es-PA
+ 0x139000e3: 260, // es-PE
+ 0x139000e6: 261, // es-PH
+ 0x139000eb: 262, // es-PR
+ 0x139000f0: 263, // es-PY
+ 0x13900119: 264, // es-SV
+ 0x13900134: 265, // es-US
+ 0x13900135: 266, // es-UY
+ 0x1390013a: 267, // es-VE
+ 0x13b00000: 268, // et
+ 0x13b00069: 269, // et-EE
+ 0x14000000: 270, // eu
+ 0x1400006d: 271, // eu-ES
+ 0x14100000: 272, // ewo
+ 0x14100051: 273, // ewo-CM
+ 0x14300000: 274, // fa
+ 0x14300023: 275, // fa-AF
+ 0x1430009b: 276, // fa-IR
+ 0x14900000: 277, // ff
+ 0x14900051: 278, // ff-CM
+ 0x14900083: 279, // ff-GN
+ 0x149000c8: 280, // ff-MR
+ 0x14900113: 281, // ff-SN
+ 0x14c00000: 282, // fi
+ 0x14c00071: 283, // fi-FI
+ 0x14e00000: 284, // fil
+ 0x14e000e6: 285, // fil-PH
+ 0x15300000: 286, // fo
+ 0x15300062: 287, // fo-DK
+ 0x15300075: 288, // fo-FO
+ 0x15900000: 289, // fr
+ 0x15900035: 290, // fr-BE
+ 0x15900036: 291, // fr-BF
+ 0x15900039: 292, // fr-BI
+ 0x1590003a: 293, // fr-BJ
+ 0x1590003b: 294, // fr-BL
+ 0x15900048: 295, // fr-CA
+ 0x1590004a: 296, // fr-CD
+ 0x1590004b: 297, // fr-CF
+ 0x1590004c: 298, // fr-CG
+ 0x1590004d: 299, // fr-CH
+ 0x1590004e: 300, // fr-CI
+ 0x15900051: 301, // fr-CM
+ 0x15900061: 302, // fr-DJ
+ 0x15900066: 303, // fr-DZ
+ 0x15900077: 304, // fr-FR
+ 0x15900079: 305, // fr-GA
+ 0x1590007d: 306, // fr-GF
+ 0x15900083: 307, // fr-GN
+ 0x15900084: 308, // fr-GP
+ 0x15900085: 309, // fr-GQ
+ 0x15900090: 310, // fr-HT
+ 0x159000a7: 311, // fr-KM
+ 0x159000b6: 312, // fr-LU
+ 0x159000b9: 313, // fr-MA
+ 0x159000ba: 314, // fr-MC
+ 0x159000bd: 315, // fr-MF
+ 0x159000be: 316, // fr-MG
+ 0x159000c2: 317, // fr-ML
+ 0x159000c7: 318, // fr-MQ
+ 0x159000c8: 319, // fr-MR
+ 0x159000cb: 320, // fr-MU
+ 0x159000d2: 321, // fr-NC
+ 0x159000d3: 322, // fr-NE
+ 0x159000e4: 323, // fr-PF
+ 0x159000e9: 324, // fr-PM
+ 0x15900101: 325, // fr-RE
+ 0x15900106: 326, // fr-RW
+ 0x15900109: 327, // fr-SC
+ 0x15900113: 328, // fr-SN
+ 0x1590011b: 329, // fr-SY
+ 0x1590011f: 330, // fr-TD
+ 0x15900121: 331, // fr-TG
+ 0x15900127: 332, // fr-TN
+ 0x1590013e: 333, // fr-VU
+ 0x1590013f: 334, // fr-WF
+ 0x1590015e: 335, // fr-YT
+ 0x16400000: 336, // fur
+ 0x1640009d: 337, // fur-IT
+ 0x16800000: 338, // fy
+ 0x168000d8: 339, // fy-NL
+ 0x16900000: 340, // ga
+ 0x16900095: 341, // ga-IE
+ 0x17800000: 342, // gd
+ 0x1780007a: 343, // gd-GB
+ 0x18a00000: 344, // gl
+ 0x18a0006d: 345, // gl-ES
+ 0x19c00000: 346, // gsw
+ 0x19c0004d: 347, // gsw-CH
+ 0x19c00077: 348, // gsw-FR
+ 0x19c000b1: 349, // gsw-LI
+ 0x19d00000: 350, // gu
+ 0x19d00098: 351, // gu-IN
+ 0x1a200000: 352, // guw
+ 0x1a400000: 353, // guz
+ 0x1a4000a3: 354, // guz-KE
+ 0x1a500000: 355, // gv
+ 0x1a500097: 356, // gv-IM
+ 0x1ad00000: 357, // ha
+ 0x1ad0007f: 358, // ha-GH
+ 0x1ad000d3: 359, // ha-NE
+ 0x1ad000d5: 360, // ha-NG
+ 0x1b100000: 361, // haw
+ 0x1b100134: 362, // haw-US
+ 0x1b500000: 363, // he
+ 0x1b500096: 364, // he-IL
+ 0x1b700000: 365, // hi
+ 0x1b700098: 366, // hi-IN
+ 0x1ca00000: 367, // hr
+ 0x1ca00032: 368, // hr-BA
+ 0x1ca0008f: 369, // hr-HR
+ 0x1cb00000: 370, // hsb
+ 0x1cb0005f: 371, // hsb-DE
+ 0x1ce00000: 372, // hu
+ 0x1ce00091: 373, // hu-HU
+ 0x1d000000: 374, // hy
+ 0x1d000027: 375, // hy-AM
+ 0x1da00000: 376, // id
+ 0x1da00094: 377, // id-ID
+ 0x1df00000: 378, // ig
+ 0x1df000d5: 379, // ig-NG
+ 0x1e200000: 380, // ii
+ 0x1e200052: 381, // ii-CN
+ 0x1f000000: 382, // is
+ 0x1f00009c: 383, // is-IS
+ 0x1f100000: 384, // it
+ 0x1f10004d: 385, // it-CH
+ 0x1f10009d: 386, // it-IT
+ 0x1f100112: 387, // it-SM
+ 0x1f200000: 388, // iu
+ 0x1f800000: 389, // ja
+ 0x1f8000a1: 390, // ja-JP
+ 0x1fb00000: 391, // jbo
+ 0x1ff00000: 392, // jgo
+ 0x1ff00051: 393, // jgo-CM
+ 0x20200000: 394, // jmc
+ 0x2020012e: 395, // jmc-TZ
+ 0x20600000: 396, // jv
+ 0x20800000: 397, // ka
+ 0x2080007c: 398, // ka-GE
+ 0x20a00000: 399, // kab
+ 0x20a00066: 400, // kab-DZ
+ 0x20e00000: 401, // kaj
+ 0x20f00000: 402, // kam
+ 0x20f000a3: 403, // kam-KE
+ 0x21700000: 404, // kcg
+ 0x21b00000: 405, // kde
+ 0x21b0012e: 406, // kde-TZ
+ 0x21f00000: 407, // kea
+ 0x21f00059: 408, // kea-CV
+ 0x22c00000: 409, // khq
+ 0x22c000c2: 410, // khq-ML
+ 0x23100000: 411, // ki
+ 0x231000a3: 412, // ki-KE
+ 0x23a00000: 413, // kk
+ 0x23a000ad: 414, // kk-KZ
+ 0x23c00000: 415, // kkj
+ 0x23c00051: 416, // kkj-CM
+ 0x23d00000: 417, // kl
+ 0x23d00081: 418, // kl-GL
+ 0x23e00000: 419, // kln
+ 0x23e000a3: 420, // kln-KE
+ 0x24200000: 421, // km
+ 0x242000a5: 422, // km-KH
+ 0x24900000: 423, // kn
+ 0x24900098: 424, // kn-IN
+ 0x24b00000: 425, // ko
+ 0x24b000a9: 426, // ko-KP
+ 0x24b000aa: 427, // ko-KR
+ 0x24d00000: 428, // kok
+ 0x24d00098: 429, // kok-IN
+ 0x26100000: 430, // ks
+ 0x26100098: 431, // ks-IN
+ 0x26200000: 432, // ksb
+ 0x2620012e: 433, // ksb-TZ
+ 0x26400000: 434, // ksf
+ 0x26400051: 435, // ksf-CM
+ 0x26500000: 436, // ksh
+ 0x2650005f: 437, // ksh-DE
+ 0x26b00000: 438, // ku
+ 0x27800000: 439, // kw
+ 0x2780007a: 440, // kw-GB
+ 0x28100000: 441, // ky
+ 0x281000a4: 442, // ky-KG
+ 0x28800000: 443, // lag
+ 0x2880012e: 444, // lag-TZ
+ 0x28c00000: 445, // lb
+ 0x28c000b6: 446, // lb-LU
+ 0x29a00000: 447, // lg
+ 0x29a00130: 448, // lg-UG
+ 0x2a600000: 449, // lkt
+ 0x2a600134: 450, // lkt-US
+ 0x2ac00000: 451, // ln
+ 0x2ac00029: 452, // ln-AO
+ 0x2ac0004a: 453, // ln-CD
+ 0x2ac0004b: 454, // ln-CF
+ 0x2ac0004c: 455, // ln-CG
+ 0x2af00000: 456, // lo
+ 0x2af000ae: 457, // lo-LA
+ 0x2b600000: 458, // lrc
+ 0x2b60009a: 459, // lrc-IQ
+ 0x2b60009b: 460, // lrc-IR
+ 0x2b700000: 461, // lt
+ 0x2b7000b5: 462, // lt-LT
+ 0x2b900000: 463, // lu
+ 0x2b90004a: 464, // lu-CD
+ 0x2bb00000: 465, // luo
+ 0x2bb000a3: 466, // luo-KE
+ 0x2bc00000: 467, // luy
+ 0x2bc000a3: 468, // luy-KE
+ 0x2be00000: 469, // lv
+ 0x2be000b7: 470, // lv-LV
+ 0x2c800000: 471, // mas
+ 0x2c8000a3: 472, // mas-KE
+ 0x2c80012e: 473, // mas-TZ
+ 0x2e000000: 474, // mer
+ 0x2e0000a3: 475, // mer-KE
+ 0x2e400000: 476, // mfe
+ 0x2e4000cb: 477, // mfe-MU
+ 0x2e800000: 478, // mg
+ 0x2e8000be: 479, // mg-MG
+ 0x2e900000: 480, // mgh
+ 0x2e9000d0: 481, // mgh-MZ
+ 0x2eb00000: 482, // mgo
+ 0x2eb00051: 483, // mgo-CM
+ 0x2f600000: 484, // mk
+ 0x2f6000c1: 485, // mk-MK
+ 0x2fb00000: 486, // ml
+ 0x2fb00098: 487, // ml-IN
+ 0x30200000: 488, // mn
+ 0x302000c4: 489, // mn-MN
+ 0x31200000: 490, // mr
+ 0x31200098: 491, // mr-IN
+ 0x31600000: 492, // ms
+ 0x3160003d: 493, // ms-BN
+ 0x316000cf: 494, // ms-MY
+ 0x3160010c: 495, // ms-SG
+ 0x31700000: 496, // mt
+ 0x317000ca: 497, // mt-MT
+ 0x31c00000: 498, // mua
+ 0x31c00051: 499, // mua-CM
+ 0x32800000: 500, // my
+ 0x328000c3: 501, // my-MM
+ 0x33100000: 502, // mzn
+ 0x3310009b: 503, // mzn-IR
+ 0x33800000: 504, // nah
+ 0x33c00000: 505, // naq
+ 0x33c000d1: 506, // naq-NA
+ 0x33e00000: 507, // nb
+ 0x33e000d9: 508, // nb-NO
+ 0x33e0010f: 509, // nb-SJ
+ 0x34500000: 510, // nd
+ 0x34500163: 511, // nd-ZW
+ 0x34700000: 512, // nds
+ 0x3470005f: 513, // nds-DE
+ 0x347000d8: 514, // nds-NL
+ 0x34800000: 515, // ne
+ 0x34800098: 516, // ne-IN
+ 0x348000da: 517, // ne-NP
+ 0x35e00000: 518, // nl
+ 0x35e0002f: 519, // nl-AW
+ 0x35e00035: 520, // nl-BE
+ 0x35e0003f: 521, // nl-BQ
+ 0x35e0005a: 522, // nl-CW
+ 0x35e000d8: 523, // nl-NL
+ 0x35e00115: 524, // nl-SR
+ 0x35e0011a: 525, // nl-SX
+ 0x35f00000: 526, // nmg
+ 0x35f00051: 527, // nmg-CM
+ 0x36100000: 528, // nn
+ 0x361000d9: 529, // nn-NO
+ 0x36300000: 530, // nnh
+ 0x36300051: 531, // nnh-CM
+ 0x36600000: 532, // no
+ 0x36c00000: 533, // nqo
+ 0x36d00000: 534, // nr
+ 0x37100000: 535, // nso
+ 0x37700000: 536, // nus
+ 0x37700116: 537, // nus-SS
+ 0x37e00000: 538, // ny
+ 0x38000000: 539, // nyn
+ 0x38000130: 540, // nyn-UG
+ 0x38700000: 541, // om
+ 0x3870006e: 542, // om-ET
+ 0x387000a3: 543, // om-KE
+ 0x38c00000: 544, // or
+ 0x38c00098: 545, // or-IN
+ 0x38f00000: 546, // os
+ 0x38f0007c: 547, // os-GE
+ 0x38f00105: 548, // os-RU
+ 0x39400000: 549, // pa
+ 0x39405000: 550, // pa-Arab
+ 0x394050e7: 551, // pa-Arab-PK
+ 0x3942f000: 552, // pa-Guru
+ 0x3942f098: 553, // pa-Guru-IN
+ 0x39800000: 554, // pap
+ 0x3aa00000: 555, // pl
+ 0x3aa000e8: 556, // pl-PL
+ 0x3b400000: 557, // prg
+ 0x3b400001: 558, // prg-001
+ 0x3b500000: 559, // ps
+ 0x3b500023: 560, // ps-AF
+ 0x3b700000: 561, // pt
+ 0x3b700029: 562, // pt-AO
+ 0x3b700040: 563, // pt-BR
+ 0x3b70004d: 564, // pt-CH
+ 0x3b700059: 565, // pt-CV
+ 0x3b700085: 566, // pt-GQ
+ 0x3b70008a: 567, // pt-GW
+ 0x3b7000b6: 568, // pt-LU
+ 0x3b7000c5: 569, // pt-MO
+ 0x3b7000d0: 570, // pt-MZ
+ 0x3b7000ed: 571, // pt-PT
+ 0x3b700117: 572, // pt-ST
+ 0x3b700125: 573, // pt-TL
+ 0x3bb00000: 574, // qu
+ 0x3bb0003e: 575, // qu-BO
+ 0x3bb00068: 576, // qu-EC
+ 0x3bb000e3: 577, // qu-PE
+ 0x3cb00000: 578, // rm
+ 0x3cb0004d: 579, // rm-CH
+ 0x3d000000: 580, // rn
+ 0x3d000039: 581, // rn-BI
+ 0x3d300000: 582, // ro
+ 0x3d3000bb: 583, // ro-MD
+ 0x3d300103: 584, // ro-RO
+ 0x3d500000: 585, // rof
+ 0x3d50012e: 586, // rof-TZ
+ 0x3d900000: 587, // ru
+ 0x3d900046: 588, // ru-BY
+ 0x3d9000a4: 589, // ru-KG
+ 0x3d9000ad: 590, // ru-KZ
+ 0x3d9000bb: 591, // ru-MD
+ 0x3d900105: 592, // ru-RU
+ 0x3d90012f: 593, // ru-UA
+ 0x3dc00000: 594, // rw
+ 0x3dc00106: 595, // rw-RW
+ 0x3dd00000: 596, // rwk
+ 0x3dd0012e: 597, // rwk-TZ
+ 0x3e200000: 598, // sah
+ 0x3e200105: 599, // sah-RU
+ 0x3e300000: 600, // saq
+ 0x3e3000a3: 601, // saq-KE
+ 0x3e900000: 602, // sbp
+ 0x3e90012e: 603, // sbp-TZ
+ 0x3f200000: 604, // sdh
+ 0x3f300000: 605, // se
+ 0x3f300071: 606, // se-FI
+ 0x3f3000d9: 607, // se-NO
+ 0x3f30010b: 608, // se-SE
+ 0x3f500000: 609, // seh
+ 0x3f5000d0: 610, // seh-MZ
+ 0x3f700000: 611, // ses
+ 0x3f7000c2: 612, // ses-ML
+ 0x3f800000: 613, // sg
+ 0x3f80004b: 614, // sg-CF
+ 0x3fe00000: 615, // shi
+ 0x3fe52000: 616, // shi-Latn
+ 0x3fe520b9: 617, // shi-Latn-MA
+ 0x3fed2000: 618, // shi-Tfng
+ 0x3fed20b9: 619, // shi-Tfng-MA
+ 0x40200000: 620, // si
+ 0x402000b2: 621, // si-LK
+ 0x40800000: 622, // sk
+ 0x40800110: 623, // sk-SK
+ 0x40c00000: 624, // sl
+ 0x40c0010e: 625, // sl-SI
+ 0x41200000: 626, // sma
+ 0x41300000: 627, // smi
+ 0x41400000: 628, // smj
+ 0x41500000: 629, // smn
+ 0x41500071: 630, // smn-FI
+ 0x41800000: 631, // sms
+ 0x41900000: 632, // sn
+ 0x41900163: 633, // sn-ZW
+ 0x41f00000: 634, // so
+ 0x41f00061: 635, // so-DJ
+ 0x41f0006e: 636, // so-ET
+ 0x41f000a3: 637, // so-KE
+ 0x41f00114: 638, // so-SO
+ 0x42700000: 639, // sq
+ 0x42700026: 640, // sq-AL
+ 0x427000c1: 641, // sq-MK
+ 0x4270014c: 642, // sq-XK
+ 0x42800000: 643, // sr
+ 0x4281e000: 644, // sr-Cyrl
+ 0x4281e032: 645, // sr-Cyrl-BA
+ 0x4281e0bc: 646, // sr-Cyrl-ME
+ 0x4281e104: 647, // sr-Cyrl-RS
+ 0x4281e14c: 648, // sr-Cyrl-XK
+ 0x42852000: 649, // sr-Latn
+ 0x42852032: 650, // sr-Latn-BA
+ 0x428520bc: 651, // sr-Latn-ME
+ 0x42852104: 652, // sr-Latn-RS
+ 0x4285214c: 653, // sr-Latn-XK
+ 0x42d00000: 654, // ss
+ 0x43000000: 655, // ssy
+ 0x43100000: 656, // st
+ 0x43a00000: 657, // sv
+ 0x43a00030: 658, // sv-AX
+ 0x43a00071: 659, // sv-FI
+ 0x43a0010b: 660, // sv-SE
+ 0x43b00000: 661, // sw
+ 0x43b0004a: 662, // sw-CD
+ 0x43b000a3: 663, // sw-KE
+ 0x43b0012e: 664, // sw-TZ
+ 0x43b00130: 665, // sw-UG
+ 0x44400000: 666, // syr
+ 0x44600000: 667, // ta
+ 0x44600098: 668, // ta-IN
+ 0x446000b2: 669, // ta-LK
+ 0x446000cf: 670, // ta-MY
+ 0x4460010c: 671, // ta-SG
+ 0x45700000: 672, // te
+ 0x45700098: 673, // te-IN
+ 0x45a00000: 674, // teo
+ 0x45a000a3: 675, // teo-KE
+ 0x45a00130: 676, // teo-UG
+ 0x46100000: 677, // th
+ 0x46100122: 678, // th-TH
+ 0x46500000: 679, // ti
+ 0x4650006c: 680, // ti-ER
+ 0x4650006e: 681, // ti-ET
+ 0x46700000: 682, // tig
+ 0x46c00000: 683, // tk
+ 0x46c00126: 684, // tk-TM
+ 0x47600000: 685, // tn
+ 0x47800000: 686, // to
+ 0x47800128: 687, // to-TO
+ 0x48000000: 688, // tr
+ 0x4800005c: 689, // tr-CY
+ 0x4800012a: 690, // tr-TR
+ 0x48400000: 691, // ts
+ 0x49a00000: 692, // twq
+ 0x49a000d3: 693, // twq-NE
+ 0x49f00000: 694, // tzm
+ 0x49f000b9: 695, // tzm-MA
+ 0x4a200000: 696, // ug
+ 0x4a200052: 697, // ug-CN
+ 0x4a400000: 698, // uk
+ 0x4a40012f: 699, // uk-UA
+ 0x4aa00000: 700, // ur
+ 0x4aa00098: 701, // ur-IN
+ 0x4aa000e7: 702, // ur-PK
+ 0x4b200000: 703, // uz
+ 0x4b205000: 704, // uz-Arab
+ 0x4b205023: 705, // uz-Arab-AF
+ 0x4b21e000: 706, // uz-Cyrl
+ 0x4b21e136: 707, // uz-Cyrl-UZ
+ 0x4b252000: 708, // uz-Latn
+ 0x4b252136: 709, // uz-Latn-UZ
+ 0x4b400000: 710, // vai
+ 0x4b452000: 711, // vai-Latn
+ 0x4b4520b3: 712, // vai-Latn-LR
+ 0x4b4d9000: 713, // vai-Vaii
+ 0x4b4d90b3: 714, // vai-Vaii-LR
+ 0x4b600000: 715, // ve
+ 0x4b900000: 716, // vi
+ 0x4b90013d: 717, // vi-VN
+ 0x4bf00000: 718, // vo
+ 0x4bf00001: 719, // vo-001
+ 0x4c200000: 720, // vun
+ 0x4c20012e: 721, // vun-TZ
+ 0x4c400000: 722, // wa
+ 0x4c500000: 723, // wae
+ 0x4c50004d: 724, // wae-CH
+ 0x4db00000: 725, // wo
+ 0x4e800000: 726, // xh
+ 0x4f100000: 727, // xog
+ 0x4f100130: 728, // xog-UG
+ 0x4ff00000: 729, // yav
+ 0x4ff00051: 730, // yav-CM
+ 0x50800000: 731, // yi
+ 0x50800001: 732, // yi-001
+ 0x50e00000: 733, // yo
+ 0x50e0003a: 734, // yo-BJ
+ 0x50e000d5: 735, // yo-NG
+ 0x51500000: 736, // yue
+ 0x5150008c: 737, // yue-HK
+ 0x51e00000: 738, // zgh
+ 0x51e000b9: 739, // zgh-MA
+ 0x51f00000: 740, // zh
+ 0x51f34000: 741, // zh-Hans
+ 0x51f34052: 742, // zh-Hans-CN
+ 0x51f3408c: 743, // zh-Hans-HK
+ 0x51f340c5: 744, // zh-Hans-MO
+ 0x51f3410c: 745, // zh-Hans-SG
+ 0x51f35000: 746, // zh-Hant
+ 0x51f3508c: 747, // zh-Hant-HK
+ 0x51f350c5: 748, // zh-Hant-MO
+ 0x51f3512d: 749, // zh-Hant-TW
+ 0x52400000: 750, // zu
+ 0x52400160: 751, // zu-ZA
+}
+
+// Total table size 4580 bytes (4KiB); checksum: A7F72A2A
diff --git a/Godeps/_workspace/src/golang.org/x/text/language/language.go b/vendor/golang.org/x/text/language/language.go
index 5c6dcbd94..5eecceb61 100644
--- a/Godeps/_workspace/src/golang.org/x/text/language/language.go
+++ b/vendor/golang.org/x/text/language/language.go
@@ -100,7 +100,7 @@
//
// BCP 47 - Tags for Identifying Languages
// http://tools.ietf.org/html/bcp47
-package language
+package language // import "golang.org/x/text/language"
// TODO: Remove above NOTE after:
// - verifying that tables are dropped correctly (most notably matcher tables).
@@ -593,7 +593,7 @@ func (t Tag) Extension(x byte) (ext Extension, ok bool) {
return Extension{ext}, true
}
}
- return Extension{string(x)}, false
+ return Extension{}, false
}
// Extensions returns all extensions of t.
diff --git a/Godeps/_workspace/src/golang.org/x/text/language/lookup.go b/vendor/golang.org/x/text/language/lookup.go
index 1d80ac370..1d80ac370 100644
--- a/Godeps/_workspace/src/golang.org/x/text/language/lookup.go
+++ b/vendor/golang.org/x/text/language/lookup.go
diff --git a/Godeps/_workspace/src/golang.org/x/text/language/maketables.go b/vendor/golang.org/x/text/language/maketables.go
index 2cc995b37..107f99254 100644
--- a/Godeps/_workspace/src/golang.org/x/text/language/maketables.go
+++ b/vendor/golang.org/x/text/language/maketables.go
@@ -678,6 +678,8 @@ func (b *builder) parseIndices() {
b.locale.parse(meta.DefaultContent.Locales)
}
+// TODO: region inclusion data will probably not be use used in future matchers.
+
func (b *builder) computeRegionGroups() {
b.groups = make(map[int]index)
@@ -686,6 +688,11 @@ func (b *builder) computeRegionGroups() {
b.groups[i] = index(len(b.groups))
}
for _, g := range b.supp.TerritoryContainment.Group {
+ // Skip UN and EURO zone as they are flattening the containment
+ // relationship.
+ if g.Type == "EZ" || g.Type == "UN" {
+ continue
+ }
group := b.region.index(g.Type)
if _, ok := b.groups[group]; !ok {
b.groups[group] = index(len(b.groups))
@@ -782,6 +789,7 @@ func (b *builder) writeLanguage() {
lang.updateLater("tw", "twi")
lang.updateLater("nb", "nob")
lang.updateLater("ak", "aka")
+ lang.updateLater("bh", "bih")
// Ensure that each 2-letter code is matched with a 3-letter code.
for _, v := range lang.s[1:] {
@@ -1482,6 +1490,11 @@ func (b *builder) writeRegionInclusionData() {
containment = make(map[index][]index)
)
for _, g := range b.supp.TerritoryContainment.Group {
+ // Skip UN and EURO zone as they are flattening the containment
+ // relationship.
+ if g.Type == "EZ" || g.Type == "UN" {
+ continue
+ }
group := b.region.index(g.Type)
groupIdx := b.groups[group]
for _, mem := range strings.Split(g.Contains, " ") {
diff --git a/Godeps/_workspace/src/golang.org/x/text/language/match.go b/vendor/golang.org/x/text/language/match.go
index eec72bcc1..8ad950533 100644
--- a/Godeps/_workspace/src/golang.org/x/text/language/match.go
+++ b/vendor/golang.org/x/text/language/match.go
@@ -396,8 +396,8 @@ type matcher struct {
// matchHeader has the lists of tags for exact matches and matches based on
// maximized and canonicalized tags for a given language.
type matchHeader struct {
- exact []haveTag
- max []haveTag
+ exact []*haveTag
+ max []*haveTag
}
// haveTag holds a supported Tag and its maximized script and region. The maximized
@@ -457,7 +457,7 @@ func (h *matchHeader) addIfNew(n haveTag, exact bool) {
}
}
if exact {
- h.exact = append(h.exact, n)
+ h.exact = append(h.exact, &n)
}
// Allow duplicate maximized tags, but create a linked list to allow quickly
// comparing the equivalents and bail out.
@@ -472,7 +472,7 @@ func (h *matchHeader) addIfNew(n haveTag, exact bool) {
break
}
}
- h.max = append(h.max, n)
+ h.max = append(h.max, &n)
}
// header returns the matchHeader for the given language. It creates one if
@@ -503,7 +503,7 @@ func newMatcher(supported []Tag) *matcher {
pair, _ := makeHaveTag(tag, i)
m.header(tag.lang).addIfNew(pair, true)
}
- m.default_ = &m.header(supported[0].lang).exact[0]
+ m.default_ = m.header(supported[0].lang).exact[0]
for i, tag := range supported {
pair, max := makeHaveTag(tag, i)
if max != tag.lang {
@@ -520,7 +520,8 @@ func newMatcher(supported []Tag) *matcher {
return
}
hw := m.header(langID(want))
- for _, v := range hh.max {
+ for _, ht := range hh.max {
+ v := *ht
if conf < v.conf {
v.conf = conf
}
@@ -580,7 +581,7 @@ func (m *matcher) getBest(want ...Tag) (got *haveTag, orig Tag, c Confidence) {
continue
}
for i := range h.exact {
- have := &h.exact[i]
+ have := h.exact[i]
if have.tag.equalsRest(w) {
return have, w, Exact
}
@@ -591,7 +592,7 @@ func (m *matcher) getBest(want ...Tag) (got *haveTag, orig Tag, c Confidence) {
// Base language is not defined.
if h != nil {
for i := range h.exact {
- have := &h.exact[i]
+ have := h.exact[i]
if have.tag.equalsRest(w) {
return have, w, Exact
}
@@ -609,11 +610,11 @@ func (m *matcher) getBest(want ...Tag) (got *haveTag, orig Tag, c Confidence) {
}
// Check for match based on maximized tag.
for i := range h.max {
- have := &h.max[i]
+ have := h.max[i]
best.update(have, w, max.script, max.region)
if best.conf == Exact {
for have.nextMax != 0 {
- have = &h.max[have.nextMax]
+ have = h.max[have.nextMax]
best.update(have, w, max.script, max.region)
}
return best.have, best.want, High
diff --git a/Godeps/_workspace/src/golang.org/x/text/language/parse.go b/vendor/golang.org/x/text/language/parse.go
index cfa28f56e..cfa28f56e 100644
--- a/Godeps/_workspace/src/golang.org/x/text/language/parse.go
+++ b/vendor/golang.org/x/text/language/parse.go
diff --git a/vendor/golang.org/x/text/language/tables.go b/vendor/golang.org/x/text/language/tables.go
new file mode 100644
index 000000000..1a92e582b
--- /dev/null
+++ b/vendor/golang.org/x/text/language/tables.go
@@ -0,0 +1,3547 @@
+// This file was generated by go generate; DO NOT EDIT
+
+package language
+
+import "golang.org/x/text/internal/tag"
+
+// CLDRVersion is the CLDR version from which the tables in this package are derived.
+const CLDRVersion = "30"
+
+const numLanguages = 8654
+
+const numScripts = 230
+
+const numRegions = 356
+
+type fromTo struct {
+ from uint16
+ to uint16
+}
+
+const nonCanonicalUnd = 1191
+const (
+ _af = 21
+ _am = 38
+ _ar = 57
+ _az = 87
+ _bg = 125
+ _bn = 163
+ _ca = 213
+ _cs = 246
+ _da = 253
+ _de = 265
+ _el = 305
+ _en = 308
+ _es = 313
+ _et = 315
+ _fa = 323
+ _fi = 332
+ _fil = 334
+ _fr = 345
+ _gu = 413
+ _he = 437
+ _hi = 439
+ _hr = 458
+ _hu = 462
+ _hy = 464
+ _id = 474
+ _is = 496
+ _it = 497
+ _ja = 504
+ _ka = 520
+ _kk = 570
+ _km = 578
+ _kn = 585
+ _ko = 587
+ _ky = 641
+ _lo = 687
+ _lt = 695
+ _lv = 702
+ _mk = 758
+ _ml = 763
+ _mn = 770
+ _mo = 775
+ _mr = 786
+ _ms = 790
+ _mul = 797
+ _my = 808
+ _nb = 830
+ _ne = 840
+ _nl = 862
+ _no = 870
+ _pa = 916
+ _pl = 938
+ _pt = 951
+ _ro = 979
+ _ru = 985
+ _sh = 1021
+ _si = 1026
+ _sk = 1032
+ _sl = 1036
+ _sq = 1063
+ _sr = 1064
+ _sv = 1082
+ _sw = 1083
+ _ta = 1094
+ _te = 1111
+ _th = 1121
+ _tl = 1136
+ _tn = 1142
+ _tr = 1152
+ _uk = 1188
+ _ur = 1194
+ _uz = 1202
+ _vi = 1209
+ _zh = 1311
+ _zu = 1316
+ _jbo = 507
+ _ami = 1639
+ _bnn = 2346
+ _hak = 431
+ _tlh = 14456
+ _lb = 652
+ _nv = 890
+ _pwn = 12044
+ _tao = 14177
+ _tay = 14187
+ _tsu = 14651
+ _nn = 865
+ _sfb = 13618
+ _vgt = 15690
+ _sgg = 13649
+ _cmn = 2996
+ _nan = 826
+ _hsn = 460
+)
+
+const langPrivateStart = 0x2f67
+
+const langPrivateEnd = 0x316e
+
+// lang holds an alphabetically sorted list of ISO-639 language identifiers.
+// All entries are 4 bytes. The index of the identifier (divided by 4) is the language tag.
+// For 2-byte language identifiers, the two successive bytes have the following meaning:
+// - if the first letter of the 2- and 3-letter ISO codes are the same:
+// the second and third letter of the 3-letter ISO code.
+// - otherwise: a 0 and a by 2 bits right-shifted index into altLangISO3.
+// For 3-byte language identifiers the 4th byte is 0.
+var lang tag.Index = "" + // Size: 5280 bytes
+ "---\x00aaaraai\x00aak\x00aau\x00abbkabi\x00abr\x00abt\x00aby\x00acd\x00a" +
+ "ce\x00ach\x00ada\x00ade\x00adj\x00ady\x00adz\x00aeveaeb\x00aey\x00affrag" +
+ "c\x00agd\x00agg\x00agm\x00ago\x00agq\x00aha\x00ahl\x00aho\x00ajg\x00akka" +
+ "akk\x00ala\x00ali\x00aln\x00alt\x00ammhamm\x00amn\x00amo\x00amp\x00anrga" +
+ "nc\x00ank\x00ann\x00any\x00aoj\x00aom\x00aoz\x00apc\x00apd\x00ape\x00apr" +
+ "\x00aps\x00apz\x00arraarc\x00arh\x00arn\x00aro\x00arq\x00ars\x00ary\x00a" +
+ "rz\x00assmasa\x00ase\x00asg\x00aso\x00ast\x00ata\x00atg\x00atj\x00auy" +
+ "\x00avvaavl\x00avn\x00avt\x00avu\x00awa\x00awb\x00awo\x00awx\x00ayymayb" +
+ "\x00azzebaakbal\x00ban\x00bap\x00bar\x00bas\x00bav\x00bax\x00bba\x00bbb" +
+ "\x00bbc\x00bbd\x00bbj\x00bbp\x00bbr\x00bcf\x00bch\x00bci\x00bcm\x00bcn" +
+ "\x00bco\x00bcq\x00bcu\x00bdd\x00beelbef\x00beh\x00bej\x00bem\x00bet\x00b" +
+ "ew\x00bex\x00bez\x00bfd\x00bfq\x00bft\x00bfy\x00bgulbgc\x00bgn\x00bgx" +
+ "\x00bhihbhb\x00bhg\x00bhi\x00bhk\x00bhl\x00bho\x00bhy\x00biisbib\x00big" +
+ "\x00bik\x00bim\x00bin\x00bio\x00biq\x00bjh\x00bji\x00bjj\x00bjn\x00bjo" +
+ "\x00bjr\x00bjz\x00bkc\x00bkm\x00bkq\x00bku\x00bkv\x00blt\x00bmambmh\x00b" +
+ "mk\x00bmq\x00bmu\x00bnenbng\x00bnm\x00bnp\x00boodboj\x00bom\x00bon\x00bp" +
+ "y\x00bqc\x00bqi\x00bqp\x00bqv\x00brrebra\x00brh\x00brx\x00brz\x00bsosbsj" +
+ "\x00bsq\x00bss\x00bst\x00bto\x00btt\x00btv\x00bua\x00buc\x00bud\x00bug" +
+ "\x00buk\x00bum\x00buo\x00bus\x00buu\x00bvb\x00bwd\x00bwr\x00bxh\x00bye" +
+ "\x00byn\x00byr\x00bys\x00byv\x00byx\x00bza\x00bze\x00bzf\x00bzh\x00bzw" +
+ "\x00caatcan\x00cbj\x00cch\x00ccp\x00ceheceb\x00cfa\x00cgg\x00chhachk\x00" +
+ "chm\x00cho\x00chp\x00chr\x00cja\x00cjm\x00cjv\x00ckb\x00ckl\x00cko\x00ck" +
+ "y\x00cla\x00cme\x00cooscop\x00cps\x00crrecrj\x00crk\x00crl\x00crm\x00crs" +
+ "\x00csescsb\x00csw\x00ctd\x00cuhucvhvcyymdaandad\x00daf\x00dag\x00dah" +
+ "\x00dak\x00dar\x00dav\x00dbd\x00dbq\x00dcc\x00ddn\x00deeuded\x00den\x00d" +
+ "ga\x00dgh\x00dgi\x00dgl\x00dgr\x00dgz\x00dia\x00dje\x00dnj\x00dob\x00doi" +
+ "\x00dop\x00dow\x00dri\x00drs\x00dsb\x00dtm\x00dtp\x00dts\x00dty\x00dua" +
+ "\x00duc\x00dud\x00dug\x00dvivdva\x00dww\x00dyo\x00dyu\x00dzzodzg\x00ebu" +
+ "\x00eeweefi\x00egl\x00egy\x00eky\x00elllema\x00emi\x00enngenn\x00enq\x00" +
+ "eopoeri\x00es\x00\x05esu\x00etstetr\x00ett\x00etu\x00etx\x00euusewo\x00e" +
+ "xt\x00faasfaa\x00fab\x00fag\x00fai\x00fan\x00ffulffi\x00ffm\x00fiinfia" +
+ "\x00fil\x00fit\x00fjijflr\x00fmp\x00foaofod\x00fon\x00for\x00fpe\x00fqs" +
+ "\x00frrafrc\x00frp\x00frr\x00frs\x00fub\x00fud\x00fue\x00fuf\x00fuh\x00f" +
+ "uq\x00fur\x00fuv\x00fuy\x00fvr\x00fyrygalegaa\x00gaf\x00gag\x00gah\x00ga" +
+ "j\x00gam\x00gan\x00gaw\x00gay\x00gbf\x00gbm\x00gby\x00gbz\x00gcr\x00gdla" +
+ "gde\x00gdn\x00gdr\x00geb\x00gej\x00gel\x00gez\x00gfk\x00ggn\x00ghs\x00gi" +
+ "l\x00gim\x00gjk\x00gjn\x00gju\x00gkn\x00gkp\x00gllgglk\x00gmm\x00gmv\x00" +
+ "gnrngnd\x00gng\x00god\x00gof\x00goi\x00gom\x00gon\x00gor\x00gos\x00got" +
+ "\x00grc\x00grt\x00grw\x00gsw\x00guujgub\x00guc\x00gud\x00gur\x00guw\x00g" +
+ "ux\x00guz\x00gvlvgvf\x00gvr\x00gvs\x00gwc\x00gwi\x00gwt\x00gyi\x00haauha" +
+ "g\x00hak\x00ham\x00haw\x00haz\x00hbb\x00hdy\x00heebhhy\x00hiinhia\x00hif" +
+ "\x00hig\x00hih\x00hil\x00hla\x00hlu\x00hmd\x00hmt\x00hnd\x00hne\x00hnj" +
+ "\x00hnn\x00hno\x00homohoc\x00hoj\x00hot\x00hrrvhsb\x00hsn\x00htathuunhui" +
+ "\x00hyyehzerianaian\x00iar\x00iba\x00ibb\x00iby\x00ica\x00ich\x00idndidd" +
+ "\x00idi\x00idu\x00ieleigboigb\x00ige\x00iiiiijj\x00ikpkikk\x00ikt\x00ikw" +
+ "\x00ikx\x00ilo\x00imo\x00inndinh\x00iodoiou\x00iri\x00isslittaiukuiw\x00" +
+ "\x03iwm\x00iws\x00izh\x00izi\x00japnjab\x00jam\x00jbo\x00jbu\x00jen\x00j" +
+ "gk\x00jgo\x00ji\x00\x06jib\x00jmc\x00jml\x00jra\x00jut\x00jvavjwavkaatka" +
+ "a\x00kab\x00kac\x00kad\x00kai\x00kaj\x00kam\x00kao\x00kbd\x00kbm\x00kbp" +
+ "\x00kbq\x00kbx\x00kby\x00kcg\x00kck\x00kcl\x00kct\x00kde\x00kdh\x00kdl" +
+ "\x00kdt\x00kea\x00ken\x00kez\x00kfo\x00kfr\x00kfy\x00kgonkge\x00kgf\x00k" +
+ "gp\x00kha\x00khb\x00khn\x00khq\x00khs\x00kht\x00khw\x00khz\x00kiikkij" +
+ "\x00kiu\x00kiw\x00kjuakjd\x00kjg\x00kjs\x00kjy\x00kkazkkc\x00kkj\x00klal" +
+ "kln\x00klq\x00klt\x00klx\x00kmhmkmb\x00kmh\x00kmo\x00kms\x00kmu\x00kmw" +
+ "\x00knanknp\x00koorkoi\x00kok\x00kol\x00kos\x00koz\x00kpe\x00kpf\x00kpo" +
+ "\x00kpr\x00kpx\x00kqb\x00kqf\x00kqs\x00kqy\x00kraukrc\x00kri\x00krj\x00k" +
+ "rl\x00krs\x00kru\x00ksasksb\x00ksd\x00ksf\x00ksh\x00ksj\x00ksr\x00ktb" +
+ "\x00ktm\x00kto\x00kuurkub\x00kud\x00kue\x00kuj\x00kum\x00kun\x00kup\x00k" +
+ "us\x00kvomkvg\x00kvr\x00kvx\x00kw\x00\x01kwj\x00kwo\x00kxa\x00kxc\x00kxm" +
+ "\x00kxp\x00kxw\x00kxz\x00kyirkye\x00kyx\x00kzr\x00laatlab\x00lad\x00lag" +
+ "\x00lah\x00laj\x00las\x00lbtzlbe\x00lbu\x00lbw\x00lcm\x00lcp\x00ldb\x00l" +
+ "ed\x00lee\x00lem\x00lep\x00leq\x00leu\x00lez\x00lguglgg\x00liimlia\x00li" +
+ "d\x00lif\x00lig\x00lih\x00lij\x00lis\x00ljp\x00lki\x00lkt\x00lle\x00lln" +
+ "\x00lmn\x00lmo\x00lmp\x00lninlns\x00lnu\x00loaoloj\x00lok\x00lol\x00lor" +
+ "\x00los\x00loz\x00lrc\x00ltitltg\x00luublua\x00luo\x00luy\x00luz\x00lvav" +
+ "lwl\x00lzh\x00lzz\x00mad\x00maf\x00mag\x00mai\x00mak\x00man\x00mas\x00ma" +
+ "w\x00maz\x00mbh\x00mbo\x00mbq\x00mbu\x00mbw\x00mci\x00mcp\x00mcq\x00mcr" +
+ "\x00mcu\x00mda\x00mde\x00mdf\x00mdh\x00mdj\x00mdr\x00mdx\x00med\x00mee" +
+ "\x00mek\x00men\x00mer\x00met\x00meu\x00mfa\x00mfe\x00mfn\x00mfo\x00mfq" +
+ "\x00mglgmgh\x00mgl\x00mgo\x00mgp\x00mgy\x00mhahmhi\x00mhl\x00mirimif\x00" +
+ "min\x00mis\x00miw\x00mkkdmki\x00mkl\x00mkp\x00mkw\x00mlalmle\x00mlp\x00m" +
+ "ls\x00mmo\x00mmu\x00mmx\x00mnonmna\x00mnf\x00mni\x00mnw\x00moolmoa\x00mo" +
+ "e\x00moh\x00mos\x00mox\x00mpp\x00mps\x00mpt\x00mpx\x00mql\x00mrarmrd\x00" +
+ "mrj\x00mro\x00mssamtltmtc\x00mtf\x00mti\x00mtr\x00mua\x00mul\x00mur\x00m" +
+ "us\x00mva\x00mvn\x00mvy\x00mwk\x00mwr\x00mwv\x00mxc\x00mxm\x00myyamyk" +
+ "\x00mym\x00myv\x00myw\x00myx\x00myz\x00mzk\x00mzm\x00mzn\x00mzp\x00mzw" +
+ "\x00mzz\x00naaunac\x00naf\x00nah\x00nak\x00nan\x00nap\x00naq\x00nas\x00n" +
+ "bobnca\x00nce\x00ncf\x00nch\x00nco\x00ncu\x00nddendc\x00nds\x00neepneb" +
+ "\x00new\x00nex\x00nfr\x00ngdonga\x00ngb\x00ngl\x00nhb\x00nhe\x00nhw\x00n" +
+ "if\x00nii\x00nij\x00nin\x00niu\x00niy\x00niz\x00njo\x00nkg\x00nko\x00nll" +
+ "dnmg\x00nmz\x00nnnonnf\x00nnh\x00nnk\x00nnm\x00noornod\x00noe\x00non\x00" +
+ "nop\x00nou\x00nqo\x00nrblnrb\x00nsk\x00nsn\x00nso\x00nss\x00ntm\x00ntr" +
+ "\x00nui\x00nup\x00nus\x00nuv\x00nux\x00nvavnwb\x00nxq\x00nxr\x00nyyanym" +
+ "\x00nyn\x00nzi\x00occiogc\x00ojjiokr\x00okv\x00omrmong\x00onn\x00ons\x00" +
+ "opm\x00orrioro\x00oru\x00osssosa\x00ota\x00otk\x00ozm\x00paanpag\x00pal" +
+ "\x00pam\x00pap\x00pau\x00pbi\x00pcd\x00pcm\x00pdc\x00pdt\x00ped\x00peo" +
+ "\x00pex\x00pfl\x00phl\x00phn\x00pilipil\x00pip\x00pka\x00pko\x00plolpla" +
+ "\x00pms\x00png\x00pnn\x00pnt\x00pon\x00ppo\x00pra\x00prd\x00prg\x00psusp" +
+ "ss\x00ptorptp\x00puu\x00pwa\x00quuequc\x00qug\x00rai\x00raj\x00rao\x00rc" +
+ "f\x00rej\x00rel\x00res\x00rgn\x00rhg\x00ria\x00rif\x00rjs\x00rkt\x00rmoh" +
+ "rmf\x00rmo\x00rmt\x00rmu\x00rnunrna\x00rng\x00roonrob\x00rof\x00roo\x00r" +
+ "ro\x00rtm\x00ruusrue\x00rug\x00rw\x00\x04rwk\x00rwo\x00ryu\x00saansaf" +
+ "\x00sah\x00saq\x00sas\x00sat\x00saz\x00sba\x00sbe\x00sbp\x00scrdsck\x00s" +
+ "cl\x00scn\x00sco\x00scs\x00sdndsdc\x00sdh\x00semesef\x00seh\x00sei\x00se" +
+ "s\x00sgagsga\x00sgs\x00sgw\x00sgz\x00sh\x00\x02shi\x00shk\x00shn\x00shu" +
+ "\x00siinsid\x00sig\x00sil\x00sim\x00sjr\x00sklkskc\x00skr\x00sks\x00sllv" +
+ "sld\x00sli\x00sll\x00sly\x00smmosma\x00smi\x00smj\x00smn\x00smp\x00smq" +
+ "\x00sms\x00snnasnc\x00snk\x00snp\x00snx\x00sny\x00soomsok\x00soq\x00sou" +
+ "\x00soy\x00spd\x00spl\x00sps\x00sqqisrrpsrb\x00srn\x00srr\x00srx\x00sssw" +
+ "ssd\x00ssg\x00ssy\x00stotstk\x00stq\x00suunsua\x00sue\x00suk\x00sur\x00s" +
+ "us\x00svweswwaswb\x00swc\x00swg\x00swp\x00swv\x00sxn\x00sxw\x00syl\x00sy" +
+ "r\x00szl\x00taamtaj\x00tal\x00tan\x00taq\x00tbc\x00tbd\x00tbf\x00tbg\x00" +
+ "tbo\x00tbw\x00tbz\x00tci\x00tcy\x00tdd\x00tdg\x00tdh\x00teelted\x00tem" +
+ "\x00teo\x00tet\x00tfi\x00tggktgc\x00tgo\x00tgu\x00thhathl\x00thq\x00thr" +
+ "\x00tiirtif\x00tig\x00tik\x00tim\x00tio\x00tiv\x00tkuktkl\x00tkr\x00tkt" +
+ "\x00tlgltlf\x00tlx\x00tly\x00tmh\x00tmy\x00tnsntnh\x00toontof\x00tog\x00" +
+ "toq\x00tpi\x00tpm\x00tpz\x00tqo\x00trurtru\x00trv\x00trw\x00tssotsd\x00t" +
+ "sf\x00tsg\x00tsj\x00tsw\x00ttatttd\x00tte\x00ttj\x00ttr\x00tts\x00ttt" +
+ "\x00tuh\x00tul\x00tum\x00tuq\x00tvd\x00tvl\x00tvu\x00twwitwh\x00twq\x00t" +
+ "xg\x00tyahtya\x00tyv\x00tzm\x00ubu\x00udm\x00ugiguga\x00ukkruli\x00umb" +
+ "\x00und\x00unr\x00unx\x00urrduri\x00urt\x00urw\x00usa\x00utr\x00uvh\x00u" +
+ "vl\x00uzzbvag\x00vai\x00van\x00veenvec\x00vep\x00viievic\x00viv\x00vls" +
+ "\x00vmf\x00vmw\x00voolvot\x00vro\x00vun\x00vut\x00walnwae\x00waj\x00wal" +
+ "\x00wan\x00war\x00wbp\x00wbq\x00wbr\x00wci\x00wer\x00wgi\x00whg\x00wib" +
+ "\x00wiu\x00wiv\x00wja\x00wji\x00wls\x00wmo\x00wnc\x00wni\x00wnu\x00woolw" +
+ "ob\x00wos\x00wrs\x00wsk\x00wtm\x00wuu\x00wuv\x00wwa\x00xav\x00xbi\x00xcr" +
+ "\x00xes\x00xhhoxla\x00xlc\x00xld\x00xmf\x00xmn\x00xmr\x00xna\x00xnr\x00x" +
+ "og\x00xon\x00xpr\x00xrb\x00xsa\x00xsi\x00xsm\x00xsr\x00xwe\x00yam\x00yao" +
+ "\x00yap\x00yas\x00yat\x00yav\x00yay\x00yaz\x00yba\x00ybb\x00yby\x00yer" +
+ "\x00ygr\x00ygw\x00yiidyko\x00yle\x00ylg\x00yll\x00yml\x00yooryon\x00yrb" +
+ "\x00yre\x00yrl\x00yss\x00yua\x00yue\x00yuj\x00yut\x00yuw\x00zahazag\x00z" +
+ "bl\x00zdj\x00zea\x00zgh\x00zhhozia\x00zlm\x00zmi\x00zne\x00zuulzxx\x00zz" +
+ "a\x00\xff\xff\xff\xff"
+
+const langNoIndexOffset = 1319
+
+// langNoIndex is a bit vector of all 3-letter language codes that are not used as an index
+// in lookup tables. The language ids for these language codes are derived directly
+// from the letters and are not consecutive.
+// Size: 2197 bytes, 2197 elements
+var langNoIndex = [2197]uint8{
+ // Entry 0 - 3F
+ 0xff, 0xf8, 0xed, 0xfe, 0xeb, 0xd7, 0x3b, 0xd2,
+ 0xfb, 0xbf, 0x7a, 0xfa, 0x37, 0x1d, 0x3c, 0x57,
+ 0x6e, 0x97, 0x73, 0x38, 0xfb, 0xea, 0xbf, 0x70,
+ 0xad, 0x03, 0xff, 0xff, 0xcf, 0x05, 0x84, 0x62,
+ 0xe9, 0xbf, 0xfd, 0xbf, 0xbf, 0xf7, 0xfd, 0x77,
+ 0x0f, 0xff, 0xef, 0x6f, 0xff, 0xfb, 0xdf, 0xe2,
+ 0xc9, 0xf8, 0x7f, 0x7e, 0x4d, 0xb8, 0x0a, 0x6a,
+ 0x7c, 0xea, 0xe3, 0xfa, 0x7a, 0xbf, 0x67, 0xff,
+ // Entry 40 - 7F
+ 0xff, 0xff, 0xff, 0xdf, 0x2a, 0x54, 0x91, 0xc0,
+ 0x5d, 0xe3, 0x97, 0x14, 0x07, 0x20, 0xdd, 0xed,
+ 0x9f, 0x3f, 0xc9, 0x21, 0xf8, 0x3f, 0x94, 0x35,
+ 0x7c, 0x5f, 0xff, 0x5f, 0x8e, 0x6e, 0xdf, 0xff,
+ 0xff, 0xff, 0x55, 0x7c, 0xd3, 0xfd, 0xbf, 0xb5,
+ 0x7b, 0xdf, 0x7f, 0xf7, 0xca, 0xfe, 0xdb, 0xa3,
+ 0xa8, 0xff, 0x1f, 0x67, 0x7f, 0xeb, 0xef, 0xce,
+ 0xff, 0xff, 0x9f, 0xff, 0xb7, 0xef, 0xfe, 0xcf,
+ // Entry 80 - BF
+ 0xdb, 0xff, 0xf3, 0xcd, 0xfb, 0x2f, 0xff, 0xff,
+ 0xbb, 0xee, 0xf7, 0xbd, 0xdb, 0xff, 0x5f, 0xf7,
+ 0xfd, 0xf2, 0xfd, 0xff, 0x5e, 0x2f, 0x3b, 0xba,
+ 0x7e, 0xff, 0xff, 0xfe, 0xf7, 0xff, 0xdd, 0xff,
+ 0xfd, 0xdf, 0xfb, 0xfe, 0x9d, 0xb4, 0xd3, 0xff,
+ 0xef, 0xff, 0xdf, 0xf7, 0x7f, 0xb7, 0xfd, 0xd5,
+ 0xa5, 0x77, 0x40, 0xff, 0x9c, 0xc1, 0x41, 0x2c,
+ 0x08, 0x20, 0x41, 0x00, 0x50, 0x40, 0x00, 0x80,
+ // Entry C0 - FF
+ 0xfb, 0x4a, 0xf2, 0x9f, 0xb4, 0x42, 0x41, 0x96,
+ 0x1b, 0x14, 0x08, 0xf2, 0x2b, 0xe7, 0x17, 0x56,
+ 0x45, 0x7d, 0x0e, 0x1c, 0x37, 0x71, 0xf3, 0xef,
+ 0x97, 0xff, 0x5d, 0x38, 0x64, 0x08, 0x00, 0x10,
+ 0xbc, 0x87, 0xaf, 0xdf, 0xff, 0xf7, 0x73, 0x35,
+ 0x3e, 0x87, 0xc7, 0xdf, 0xff, 0x00, 0x81, 0x00,
+ 0xb0, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00, 0x03,
+ 0x40, 0x00, 0x40, 0x92, 0x21, 0x50, 0xb1, 0x5d,
+ // Entry 100 - 13F
+ 0xfd, 0xdc, 0xbe, 0x5e, 0x00, 0x00, 0x02, 0x64,
+ 0x0d, 0x19, 0x41, 0xdf, 0x79, 0x22, 0x00, 0x00,
+ 0x00, 0x5e, 0x64, 0xdc, 0x24, 0xe5, 0xd9, 0xe3,
+ 0xfe, 0xff, 0xfd, 0xcb, 0x9f, 0x14, 0x01, 0x0c,
+ 0x86, 0x00, 0xd1, 0x00, 0xf0, 0xc5, 0x67, 0x5f,
+ 0x56, 0x89, 0x5e, 0xb5, 0x6c, 0xaf, 0x03, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0xc0, 0x37, 0xda, 0x56,
+ 0x90, 0x69, 0x01, 0x2c, 0x96, 0x69, 0x20, 0xfb,
+ // Entry 140 - 17F
+ 0xff, 0x3f, 0x00, 0x00, 0x00, 0x01, 0x08, 0x16,
+ 0x01, 0x00, 0x00, 0xb0, 0x14, 0x03, 0x50, 0x06,
+ 0x0a, 0x00, 0x01, 0x00, 0x00, 0x00, 0x11, 0x09,
+ 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x10,
+ 0x00, 0x00, 0x44, 0x00, 0x00, 0x10, 0x00, 0x04,
+ 0x08, 0x00, 0x00, 0x04, 0x00, 0x80, 0x28, 0x04,
+ 0x00, 0x00, 0x50, 0xd5, 0x2d, 0x00, 0x64, 0x35,
+ 0x24, 0x52, 0xf4, 0xd4, 0xbd, 0x62, 0xc9, 0x03,
+ // Entry 180 - 1BF
+ 0x00, 0x80, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x04, 0x13, 0x39, 0x01, 0xdd, 0x57, 0x98,
+ 0x21, 0x18, 0x81, 0x00, 0x00, 0x01, 0x40, 0x82,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x40, 0x00, 0x44, 0x00, 0x00, 0x80, 0xea,
+ 0xa9, 0x39, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+ // Entry 1C0 - 1FF
+ 0x00, 0x01, 0x28, 0x05, 0x00, 0x00, 0x00, 0x00,
+ 0x04, 0x20, 0x04, 0xa6, 0x00, 0x04, 0x00, 0x00,
+ 0x81, 0x50, 0x00, 0x00, 0x00, 0x11, 0x84, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x55,
+ 0x02, 0x10, 0x08, 0x04, 0x00, 0x00, 0x00, 0x40,
+ 0x30, 0x83, 0x01, 0x00, 0x00, 0x00, 0x11, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x1e, 0xcd, 0xbf, 0x7e, 0xbf,
+ // Entry 200 - 23F
+ 0xdf, 0xc3, 0x83, 0x82, 0xc0, 0xfb, 0x57, 0x27,
+ 0xcd, 0x55, 0xe7, 0x01, 0x00, 0x20, 0xb2, 0xc5,
+ 0xa4, 0x45, 0x25, 0x9b, 0x02, 0xcf, 0xe0, 0xdf,
+ 0x03, 0x44, 0x08, 0x10, 0x01, 0x04, 0x01, 0xe3,
+ 0x92, 0x54, 0xdb, 0x28, 0xd1, 0x5f, 0xf6, 0x6d,
+ 0x79, 0xed, 0x1c, 0x7d, 0x04, 0x08, 0x00, 0x01,
+ 0x21, 0x12, 0x6c, 0x5f, 0xdd, 0x0e, 0x85, 0x4f,
+ 0x40, 0x40, 0x00, 0x04, 0xf1, 0xfd, 0x3d, 0x54,
+ // Entry 240 - 27F
+ 0xe8, 0x03, 0xb4, 0x27, 0x23, 0x0d, 0x00, 0x00,
+ 0x20, 0x7b, 0x38, 0x02, 0x05, 0x84, 0x00, 0xf0,
+ 0xbb, 0x7e, 0x5a, 0x00, 0x18, 0x04, 0x81, 0x00,
+ 0x00, 0x00, 0x80, 0x10, 0x90, 0x1c, 0x01, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x10, 0x40, 0x00, 0x04,
+ 0x08, 0xa0, 0x70, 0xa5, 0x0c, 0x40, 0x00, 0x00,
+ 0x11, 0x04, 0x04, 0x68, 0x00, 0x20, 0x70, 0xff,
+ 0x7b, 0x7f, 0x60, 0x00, 0x05, 0x9b, 0xdd, 0x66,
+ // Entry 280 - 2BF
+ 0x03, 0x00, 0x11, 0x00, 0x00, 0x00, 0x40, 0x05,
+ 0xb5, 0xb6, 0x80, 0x08, 0x04, 0x00, 0x04, 0x51,
+ 0xe2, 0xef, 0xfd, 0x3f, 0x05, 0x09, 0x08, 0x05,
+ 0x40, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x60,
+ 0xe5, 0x48, 0x00, 0x81, 0x20, 0xc0, 0x05, 0x80,
+ 0x03, 0x00, 0x00, 0x00, 0xcc, 0x50, 0x40, 0x04,
+ 0x84, 0x47, 0x84, 0x40, 0x20, 0x10, 0x00, 0x20,
+ // Entry 2C0 - 2FF
+ 0x02, 0x50, 0x80, 0x11, 0x00, 0x91, 0x6c, 0xe2,
+ 0x50, 0x27, 0x1d, 0x11, 0x29, 0x06, 0x59, 0xe9,
+ 0x33, 0x08, 0x00, 0x20, 0x04, 0x40, 0x10, 0x00,
+ 0x00, 0x00, 0x50, 0x44, 0x92, 0x49, 0xd6, 0x5d,
+ 0xa7, 0x81, 0x47, 0x97, 0xfb, 0x00, 0x10, 0x00,
+ 0x08, 0x00, 0x80, 0x00, 0x40, 0x04, 0x00, 0x01,
+ 0x02, 0x00, 0x01, 0x40, 0x80, 0x00, 0x00, 0x08,
+ 0xd8, 0xeb, 0xf6, 0x39, 0xc4, 0x89, 0x12, 0x00,
+ // Entry 300 - 33F
+ 0x00, 0x0c, 0x04, 0x01, 0x20, 0x20, 0xdd, 0xa0,
+ 0x01, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00,
+ 0x04, 0x10, 0xd0, 0x9d, 0x95, 0x13, 0x04, 0x80,
+ 0x00, 0x01, 0xd0, 0x12, 0x40, 0x00, 0x10, 0xb0,
+ 0x10, 0x62, 0x4c, 0xd2, 0x02, 0x01, 0x4a, 0x00,
+ 0x46, 0x04, 0x00, 0x08, 0x02, 0x00, 0x20, 0x80,
+ 0x00, 0x80, 0x06, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x00, 0xf0, 0xd8, 0x6f, 0x15, 0x02, 0x08, 0x00,
+ // Entry 340 - 37F
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x10, 0x01,
+ 0x00, 0x10, 0x00, 0x00, 0x00, 0xf0, 0x84, 0xe3,
+ 0xdd, 0xbf, 0xf9, 0xf9, 0x3b, 0x7f, 0x7f, 0xdb,
+ 0xfd, 0xfc, 0xfe, 0xdf, 0xff, 0xfd, 0xff, 0xf6,
+ 0xfb, 0xfc, 0xf7, 0x1f, 0xff, 0xb3, 0x6c, 0xff,
+ 0xd9, 0xad, 0xdf, 0xfe, 0xef, 0xba, 0xdf, 0xff,
+ 0xff, 0xff, 0xb7, 0xdd, 0x7d, 0xbf, 0xab, 0xff,
+ 0xfd, 0xfd, 0xdf, 0x2f, 0x9c, 0xdf, 0xf3, 0x6f,
+ // Entry 380 - 3BF
+ 0xdf, 0xdd, 0xff, 0xfb, 0xee, 0xd2, 0xab, 0x5f,
+ 0xd5, 0xdf, 0x7f, 0xff, 0xeb, 0xff, 0xe4, 0x4d,
+ 0xf9, 0xff, 0xfe, 0xf7, 0xfd, 0xdf, 0xfb, 0xbf,
+ 0xee, 0xdb, 0x6f, 0xef, 0xff, 0x7f, 0xff, 0xff,
+ 0xf7, 0x5f, 0xd3, 0x3b, 0xfd, 0xd9, 0xdf, 0xeb,
+ 0xbc, 0x08, 0x05, 0x24, 0xff, 0x07, 0x70, 0xfe,
+ 0xe6, 0x5e, 0x00, 0x08, 0x00, 0x83, 0x3d, 0x1b,
+ 0x06, 0xe6, 0x72, 0x60, 0xd1, 0x3c, 0x7f, 0x44,
+ // Entry 3C0 - 3FF
+ 0x02, 0x30, 0x9f, 0x7a, 0x16, 0xbd, 0x7f, 0x57,
+ 0xf2, 0xff, 0x31, 0xff, 0xf2, 0x1e, 0x90, 0xf7,
+ 0xf1, 0xf9, 0x45, 0x80, 0x01, 0x02, 0x00, 0x00,
+ 0x40, 0x54, 0x9f, 0x8a, 0xd9, 0xd9, 0x0e, 0x11,
+ 0x84, 0x51, 0xc0, 0xf3, 0xfb, 0x47, 0x00, 0x01,
+ 0x05, 0xd1, 0x50, 0x58, 0x00, 0x00, 0x00, 0x10,
+ 0x04, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x17, 0xd2,
+ 0xb9, 0xfd, 0xfc, 0xba, 0xfe, 0xef, 0xc7, 0xbe,
+ // Entry 400 - 43F
+ 0x53, 0x6f, 0xdf, 0xe7, 0xdb, 0x65, 0xbb, 0x7f,
+ 0xfa, 0xff, 0x77, 0xf3, 0xef, 0xbf, 0xfd, 0xf7,
+ 0xdf, 0xdf, 0x9b, 0x7f, 0xff, 0xff, 0x7f, 0x6f,
+ 0xf7, 0xfb, 0xeb, 0xdf, 0xbc, 0xff, 0xbf, 0x6b,
+ 0x7b, 0xfb, 0xff, 0xce, 0x76, 0xbd, 0xf7, 0xf7,
+ 0xdf, 0xdc, 0xf7, 0xf7, 0xff, 0xdf, 0xf3, 0xfe,
+ 0xef, 0xff, 0xff, 0xff, 0xb6, 0x7f, 0x7f, 0xde,
+ 0xf7, 0xb9, 0xeb, 0x77, 0xff, 0xfb, 0xbf, 0xdf,
+ // Entry 440 - 47F
+ 0xfd, 0xfe, 0xfb, 0xff, 0xfe, 0xeb, 0x1f, 0x7d,
+ 0x2f, 0xfd, 0xb6, 0xb5, 0xa5, 0xfc, 0xff, 0xfd,
+ 0x7f, 0x4e, 0xbf, 0x8e, 0xae, 0xff, 0xee, 0xdf,
+ 0x7f, 0xf7, 0x73, 0x02, 0x02, 0x04, 0xfc, 0xf7,
+ 0xff, 0xb7, 0xd7, 0xef, 0xfe, 0xcd, 0xf5, 0xce,
+ 0xe2, 0x8e, 0xe7, 0xbf, 0xb7, 0xff, 0x56, 0xbd,
+ 0xcd, 0xff, 0xfb, 0xff, 0xdf, 0xd7, 0xea, 0xff,
+ 0xe5, 0x5f, 0x6d, 0x0f, 0xa7, 0x51, 0x04, 0x44,
+ // Entry 480 - 4BF
+ 0x13, 0x50, 0x5d, 0xaf, 0xa6, 0xfd, 0x99, 0xfb,
+ 0x63, 0x1d, 0x53, 0xff, 0xef, 0xb7, 0x35, 0x20,
+ 0x14, 0x00, 0x55, 0x51, 0x82, 0x65, 0xf5, 0x41,
+ 0xe2, 0xff, 0xfc, 0xdf, 0x00, 0x05, 0xc5, 0x05,
+ 0x00, 0x22, 0x00, 0x74, 0x69, 0x10, 0x08, 0x04,
+ 0x41, 0x00, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x51, 0x20, 0x05, 0x04, 0x01, 0x00, 0x00,
+ 0x06, 0x01, 0x20, 0x00, 0x18, 0x01, 0x92, 0xb1,
+ // Entry 4C0 - 4FF
+ 0xfd, 0x47, 0x49, 0x06, 0x95, 0x06, 0x57, 0xed,
+ 0xfb, 0x4c, 0x1c, 0x6b, 0x83, 0x04, 0x62, 0x40,
+ 0x00, 0x11, 0x42, 0x00, 0x00, 0x00, 0x54, 0x83,
+ 0xb8, 0x4f, 0x10, 0x8c, 0x89, 0x46, 0xde, 0xf7,
+ 0x13, 0x31, 0x00, 0x20, 0x00, 0x00, 0x00, 0x90,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0xf0, 0x5b, 0xf4, 0xbe, 0x3d,
+ 0xba, 0xcf, 0xf7, 0xaf, 0x42, 0x04, 0x84, 0x41,
+ // Entry 500 - 53F
+ 0x30, 0xff, 0x79, 0x72, 0x04, 0x00, 0x00, 0x49,
+ 0x2d, 0x14, 0x27, 0x57, 0xed, 0xf1, 0x3f, 0xe7,
+ 0x3f, 0x00, 0x00, 0x02, 0xc6, 0xa0, 0x1e, 0xf8,
+ 0xbb, 0xff, 0xfd, 0xfb, 0xb7, 0xfd, 0xe5, 0xf7,
+ 0xfd, 0xfc, 0xd5, 0xed, 0x47, 0xf4, 0x7e, 0x10,
+ 0x01, 0x01, 0x84, 0x6d, 0xff, 0xf7, 0xdd, 0xf9,
+ 0x5b, 0x05, 0x86, 0xed, 0xf5, 0x77, 0xbd, 0x3c,
+ 0x00, 0x00, 0x00, 0x42, 0x71, 0x42, 0x00, 0x40,
+ // Entry 540 - 57F
+ 0x00, 0x00, 0x01, 0x43, 0x19, 0x00, 0x08, 0x00,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ // Entry 580 - 5BF
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xab, 0xbd, 0xe7, 0x57, 0xee, 0x13, 0x5d,
+ 0x09, 0xc1, 0x40, 0x21, 0xfa, 0x17, 0x01, 0x80,
+ 0x00, 0x00, 0x00, 0x00, 0xf0, 0xce, 0xfb, 0xbf,
+ 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00,
+ 0x00, 0x30, 0x15, 0xa3, 0x10, 0x00, 0x00, 0x00,
+ 0x11, 0x04, 0x16, 0x00, 0x00, 0x02, 0x00, 0x81,
+ 0xa3, 0x01, 0x50, 0x00, 0x00, 0x83, 0x11, 0x40,
+ // Entry 5C0 - 5FF
+ 0x00, 0x00, 0x00, 0xf0, 0xdd, 0x7b, 0x3e, 0x02,
+ 0xaa, 0x10, 0x5d, 0x98, 0x52, 0x00, 0x80, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x02, 0x02,
+ 0x19, 0x00, 0x10, 0x02, 0x10, 0x61, 0x5a, 0x9d,
+ 0x31, 0x00, 0x00, 0x00, 0x01, 0x10, 0x02, 0x20,
+ 0x00, 0x00, 0x01, 0x00, 0x42, 0x00, 0x20, 0x00,
+ 0x00, 0x1f, 0xdf, 0xf2, 0xb9, 0xff, 0xfd, 0x3f,
+ 0x1f, 0x18, 0xcf, 0x9c, 0xbf, 0xaf, 0x5f, 0xfe,
+ // Entry 600 - 63F
+ 0x7b, 0x4b, 0x40, 0x10, 0xe1, 0xfd, 0xaf, 0xd9,
+ 0xb7, 0xf6, 0xfb, 0xb3, 0xc7, 0xff, 0x6f, 0xf1,
+ 0x73, 0xb1, 0x7f, 0x9f, 0x7f, 0xbd, 0xfc, 0xb7,
+ 0xee, 0x1c, 0xfa, 0xcb, 0xef, 0xdd, 0xf9, 0xbd,
+ 0x6e, 0xae, 0x55, 0xfd, 0x6e, 0x81, 0x76, 0x1f,
+ 0xd4, 0x77, 0xf5, 0x7d, 0xfb, 0xff, 0xeb, 0xfe,
+ 0xbe, 0x5f, 0x46, 0x1b, 0xe9, 0x5f, 0x50, 0x18,
+ 0x02, 0xfa, 0xf7, 0x9d, 0x15, 0x97, 0x05, 0x0f,
+ // Entry 640 - 67F
+ 0x75, 0xc4, 0x7d, 0x81, 0x82, 0xf1, 0x57, 0x6c,
+ 0xff, 0xe4, 0xef, 0x6f, 0xff, 0xfc, 0xdd, 0xde,
+ 0xfc, 0xfd, 0x76, 0x5f, 0x7a, 0x1f, 0x00, 0x98,
+ 0x02, 0xfb, 0xa3, 0xef, 0xf3, 0xd6, 0xf2, 0xff,
+ 0xb9, 0xda, 0x7d, 0x50, 0x1e, 0x15, 0x7b, 0xb4,
+ 0xf5, 0x3e, 0xff, 0xff, 0xf1, 0xf7, 0xff, 0xe7,
+ 0x5f, 0xff, 0xff, 0x9e, 0xdb, 0xf6, 0xd7, 0xb9,
+ 0xef, 0x27, 0x80, 0xbb, 0xc5, 0xff, 0xff, 0xe3,
+ // Entry 680 - 6BF
+ 0x97, 0x9d, 0xbf, 0x9f, 0xf7, 0xc7, 0xfd, 0x37,
+ 0xce, 0x7f, 0x04, 0x1d, 0x53, 0x7f, 0xf8, 0xda,
+ 0x5d, 0xce, 0x7d, 0x06, 0xb9, 0xea, 0x69, 0xa0,
+ 0x1a, 0x20, 0x00, 0x30, 0x02, 0x04, 0x24, 0x08,
+ 0x04, 0x00, 0x00, 0x40, 0xd4, 0x02, 0x04, 0x00,
+ 0x00, 0x04, 0x00, 0x04, 0x00, 0x20, 0x01, 0x06,
+ 0x50, 0x00, 0x08, 0x00, 0x00, 0x00, 0x24, 0x00,
+ 0x04, 0x00, 0x10, 0x8c, 0x58, 0xd5, 0x0d, 0x0f,
+ // Entry 6C0 - 6FF
+ 0x14, 0x4d, 0xf1, 0x16, 0x44, 0xd1, 0x42, 0x08,
+ 0x40, 0x00, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00,
+ 0x00, 0xdc, 0xfb, 0xcb, 0x0e, 0x58, 0x08, 0x41,
+ 0x04, 0x20, 0x04, 0x00, 0x30, 0x12, 0x40, 0x00,
+ 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x80, 0x10, 0x10, 0xab,
+ 0x6d, 0x93, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x80, 0x80, 0x25, 0x00, 0x00,
+ // Entry 700 - 73F
+ 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,
+ 0x80, 0x86, 0xc2, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0xdf, 0x18, 0x00, 0x00, 0x02, 0xf0, 0xfd, 0x79,
+ 0x3b, 0x00, 0x25, 0x00, 0x00, 0x00, 0x02, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00,
+ 0x03, 0x00, 0x09, 0x20, 0x00, 0x00, 0x01, 0x00,
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ // Entry 740 - 77F
+ 0x00, 0x00, 0x00, 0xef, 0xd5, 0xfd, 0xcf, 0x7e,
+ 0xa0, 0x11, 0x00, 0x00, 0x00, 0x92, 0x01, 0x44,
+ 0xcd, 0xf9, 0x5c, 0x00, 0x01, 0x00, 0x30, 0x04,
+ 0x04, 0x55, 0x00, 0x01, 0x04, 0xf4, 0x3f, 0x4a,
+ 0x01, 0x00, 0x00, 0xb0, 0x80, 0x00, 0x55, 0x55,
+ 0x97, 0x7c, 0x9f, 0x31, 0xcc, 0x68, 0xd1, 0x03,
+ 0xd5, 0x57, 0x27, 0x14, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x2c, 0xf7, 0xcb, 0x1f, 0x14, 0x60,
+ // Entry 780 - 7BF
+ 0x03, 0x68, 0x01, 0x10, 0x8b, 0x38, 0x8a, 0x01,
+ 0x00, 0x00, 0x20, 0x00, 0x24, 0x44, 0x00, 0x00,
+ 0x10, 0x03, 0x11, 0x02, 0x01, 0x00, 0x00, 0xf0,
+ 0xf5, 0xff, 0xd5, 0x97, 0xbc, 0x70, 0xd6, 0x78,
+ 0x78, 0x15, 0x50, 0x00, 0xa4, 0x84, 0xa9, 0x41,
+ 0x00, 0x00, 0x00, 0x6b, 0x39, 0x52, 0x74, 0x00,
+ 0xe8, 0x30, 0x90, 0x6a, 0x92, 0x00, 0x00, 0x02,
+ 0xff, 0xef, 0xff, 0x4b, 0x85, 0x53, 0xf4, 0xed,
+ // Entry 7C0 - 7FF
+ 0xdd, 0xbf, 0x72, 0x19, 0xc7, 0x0c, 0xd5, 0x42,
+ 0x54, 0xdd, 0x77, 0x14, 0x00, 0x80, 0x40, 0x56,
+ 0xcc, 0x16, 0x9e, 0xea, 0x35, 0x7d, 0xef, 0xff,
+ 0xbd, 0xa4, 0xaf, 0x01, 0x44, 0x18, 0x01, 0x4d,
+ 0x4e, 0x4a, 0x08, 0x50, 0x28, 0x30, 0xe0, 0x80,
+ 0x10, 0x20, 0x24, 0x00, 0xff, 0x2f, 0xd3, 0x60,
+ 0xfe, 0x01, 0x02, 0x88, 0x0a, 0x40, 0x16, 0x01,
+ 0x01, 0x15, 0x2b, 0x3c, 0x01, 0x00, 0x00, 0x10,
+ // Entry 800 - 83F
+ 0x90, 0x49, 0x41, 0x02, 0x02, 0x01, 0xe1, 0xbf,
+ 0xbf, 0x03, 0x00, 0x00, 0x10, 0xd4, 0xa3, 0xd1,
+ 0x40, 0x9c, 0x44, 0xdf, 0xf5, 0x8f, 0x66, 0xb3,
+ 0x55, 0x20, 0xd4, 0xc1, 0xd8, 0x30, 0x3d, 0x80,
+ 0x00, 0x00, 0x00, 0x04, 0xd4, 0x11, 0xc5, 0x84,
+ 0x2e, 0x50, 0x00, 0x22, 0x50, 0x6e, 0xbd, 0x93,
+ 0x07, 0x00, 0x20, 0x10, 0x84, 0xb2, 0x45, 0x10,
+ 0x06, 0x44, 0x00, 0x00, 0x12, 0x02, 0x11, 0x00,
+ // Entry 840 - 87F
+ 0xf0, 0xfb, 0xfd, 0x3f, 0x05, 0x00, 0x12, 0x81,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x02,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x30, 0x02, 0x28,
+ 0x84, 0x00, 0x23, 0xc0, 0x23, 0x24, 0x00, 0x00,
+ 0x00, 0xcb, 0xe4, 0x3a, 0x42, 0x88, 0x14, 0xf1,
+ 0xef, 0xff, 0x7f, 0x12, 0x01, 0x01, 0x84, 0x50,
+ 0x07, 0xfc, 0xff, 0xff, 0x0f, 0x01, 0x00, 0x40,
+ 0x10, 0x38, 0x01, 0x01, 0x1c, 0x12, 0x40, 0xe1,
+ // Entry 880 - 8BF
+ 0x76, 0x16, 0x08, 0x03, 0x10, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x24,
+ 0x0a, 0x00, 0x80, 0x00, 0x00,
+}
+
+// altLangISO3 holds an alphabetically sorted list of 3-letter language code alternatives
+// to 2-letter language codes that cannot be derived using the method described above.
+// Each 3-letter code is followed by its 1-byte langID.
+var altLangISO3 tag.Index = "---\x00cor\x00hbs\x01heb\x02kin\x03spa\x04yid\x05\xff\xff\xff\xff"
+
+// altLangIndex is used to convert indexes in altLangISO3 to langIDs.
+// Size: 12 bytes, 6 elements
+var altLangIndex = [6]uint16{
+ 0x0278, 0x03fd, 0x01f3, 0x03dc, 0x0139, 0x0200,
+}
+
+// langAliasMap maps langIDs to their suggested replacements.
+// Size: 644 bytes, 161 elements
+var langAliasMap = [161]fromTo{
+ 0: {from: 0x81, to: 0x87},
+ 1: {from: 0x181, to: 0x1a7},
+ 2: {from: 0x1eb, to: 0x1da},
+ 3: {from: 0x1f3, to: 0x1b5},
+ 4: {from: 0x200, to: 0x508},
+ 5: {from: 0x207, to: 0x206},
+ 6: {from: 0x307, to: 0x3d3},
+ 7: {from: 0x33e, to: 0x366},
+ 8: {from: 0x3fd, to: 0x428},
+ 9: {from: 0x470, to: 0x14e},
+ 10: {from: 0x486, to: 0x447},
+ 11: {from: 0x498, to: 0x20},
+ 12: {from: 0x533, to: 0x539},
+ 13: {from: 0x584, to: 0x129},
+ 14: {from: 0x625, to: 0x1ea6},
+ 15: {from: 0x646, to: 0x427},
+ 16: {from: 0x657, to: 0x427},
+ 17: {from: 0x6e2, to: 0x39},
+ 18: {from: 0x6ed, to: 0x1d0},
+ 19: {from: 0x733, to: 0x2196},
+ 20: {from: 0x7a8, to: 0x55},
+ 21: {from: 0x7ae, to: 0x2990},
+ 22: {from: 0x7ba, to: 0x57},
+ 23: {from: 0x7db, to: 0x140},
+ 24: {from: 0x801, to: 0x59},
+ 25: {from: 0x80a, to: 0x8c},
+ 26: {from: 0x873, to: 0x805},
+ 27: {from: 0x8b8, to: 0xed8},
+ 28: {from: 0x9e4, to: 0x328},
+ 29: {from: 0xa2b, to: 0x2bc},
+ 30: {from: 0xa32, to: 0xbd},
+ 31: {from: 0xab3, to: 0x3317},
+ 32: {from: 0xb2d, to: 0x51f},
+ 33: {from: 0xb6a, to: 0x264f},
+ 34: {from: 0xb73, to: 0xbb8},
+ 35: {from: 0xb90, to: 0x444},
+ 36: {from: 0xbb1, to: 0x421e},
+ 37: {from: 0xbb4, to: 0x51f},
+ 38: {from: 0xbf3, to: 0x2d9c},
+ 39: {from: 0xc23, to: 0x3176},
+ 40: {from: 0xcae, to: 0xf0},
+ 41: {from: 0xcfd, to: 0xf6},
+ 42: {from: 0xdbd, to: 0x116},
+ 43: {from: 0xdcc, to: 0x324},
+ 44: {from: 0xded, to: 0xdf0},
+ 45: {from: 0xdf3, to: 0x526},
+ 46: {from: 0xed4, to: 0x204f},
+ 47: {from: 0xee3, to: 0x2e8f},
+ 48: {from: 0xf2e, to: 0x35e},
+ 49: {from: 0x10c5, to: 0x13b},
+ 50: {from: 0x10f9, to: 0x2c7},
+ 51: {from: 0x1195, to: 0x1e4},
+ 52: {from: 0x126e, to: 0x20},
+ 53: {from: 0x1419, to: 0x159},
+ 54: {from: 0x1465, to: 0x149},
+ 55: {from: 0x1514, to: 0xd90},
+ 56: {from: 0x1518, to: 0x387},
+ 57: {from: 0x1527, to: 0x16ba},
+ 58: {from: 0x1575, to: 0x208},
+ 59: {from: 0x1578, to: 0x109},
+ 60: {from: 0x1598, to: 0x3ca4},
+ 61: {from: 0x165f, to: 0x195},
+ 62: {from: 0x16bd, to: 0x131},
+ 63: {from: 0x16f5, to: 0x29ed},
+ 64: {from: 0x170d, to: 0x18e},
+ 65: {from: 0x171c, to: 0xf34},
+ 66: {from: 0x176f, to: 0x1519},
+ 67: {from: 0x17fe, to: 0x17ab},
+ 68: {from: 0x180b, to: 0x18e8},
+ 69: {from: 0x187f, to: 0x42c},
+ 70: {from: 0x196e, to: 0x1cf6},
+ 71: {from: 0x1a69, to: 0x2ba5},
+ 72: {from: 0x1a7f, to: 0x1f0},
+ 73: {from: 0x1b4f, to: 0x1f2},
+ 74: {from: 0x1b7b, to: 0x150a},
+ 75: {from: 0x202d, to: 0x37a6},
+ 76: {from: 0x2032, to: 0x20d2},
+ 77: {from: 0x204f, to: 0x302},
+ 78: {from: 0x20d8, to: 0x26b},
+ 79: {from: 0x20e3, to: 0x25a},
+ 80: {from: 0x20e7, to: 0x225},
+ 81: {from: 0x20ee, to: 0x24d},
+ 82: {from: 0x2104, to: 0x21e0},
+ 83: {from: 0x212a, to: 0x274},
+ 84: {from: 0x218e, to: 0x11d},
+ 85: {from: 0x21c3, to: 0x1556},
+ 86: {from: 0x21db, to: 0x4fa},
+ 87: {from: 0x21e9, to: 0x495},
+ 88: {from: 0x2222, to: 0x11d},
+ 89: {from: 0x222c, to: 0x11d},
+ 90: {from: 0x2257, to: 0x91f},
+ 91: {from: 0x230b, to: 0x321b},
+ 92: {from: 0x2377, to: 0x335a},
+ 93: {from: 0x2467, to: 0x2be},
+ 94: {from: 0x24d9, to: 0x2f6},
+ 95: {from: 0x24e5, to: 0x2f1},
+ 96: {from: 0x24ef, to: 0x316},
+ 97: {from: 0x2545, to: 0xb50},
+ 98: {from: 0x259e, to: 0xe0},
+ 99: {from: 0x2633, to: 0x2c7},
+ 100: {from: 0x26be, to: 0x26a9},
+ 101: {from: 0x26ee, to: 0x3bf},
+ 102: {from: 0x271c, to: 0x3ca4},
+ 103: {from: 0x275a, to: 0x26a9},
+ 104: {from: 0x277e, to: 0x434d},
+ 105: {from: 0x28e4, to: 0x282c},
+ 106: {from: 0x2909, to: 0x348},
+ 107: {from: 0x297b, to: 0x2d9c},
+ 108: {from: 0x2b0f, to: 0x384},
+ 109: {from: 0x2bf1, to: 0x38c},
+ 110: {from: 0x2c34, to: 0x3ca4},
+ 111: {from: 0x2cf1, to: 0x3b5},
+ 112: {from: 0x2d08, to: 0x58c},
+ 113: {from: 0x2d3c, to: 0x143},
+ 114: {from: 0x2d3d, to: 0x143},
+ 115: {from: 0x2df4, to: 0x2e8},
+ 116: {from: 0x2dfd, to: 0x19c1},
+ 117: {from: 0x2e0f, to: 0x2d8a},
+ 118: {from: 0x2e16, to: 0x289},
+ 119: {from: 0x2e49, to: 0x7c},
+ 120: {from: 0x2e5a, to: 0x2277},
+ 121: {from: 0x2e95, to: 0x2e90},
+ 122: {from: 0x2ee4, to: 0x2ecc},
+ 123: {from: 0x3188, to: 0x3bb},
+ 124: {from: 0x335b, to: 0x3383},
+ 125: {from: 0x341f, to: 0x3d3},
+ 126: {from: 0x34e3, to: 0x18c5},
+ 127: {from: 0x35db, to: 0x408},
+ 128: {from: 0x364d, to: 0x23e},
+ 129: {from: 0x366b, to: 0x3ea},
+ 130: {from: 0x36f2, to: 0x43b},
+ 131: {from: 0x37b5, to: 0x11d},
+ 132: {from: 0x380b, to: 0x38e7},
+ 133: {from: 0x3820, to: 0x2c90},
+ 134: {from: 0x3824, to: 0xa7},
+ 135: {from: 0x3827, to: 0x321d},
+ 136: {from: 0x3861, to: 0x399b},
+ 137: {from: 0x3887, to: 0x3fb5},
+ 138: {from: 0x389a, to: 0x39cc},
+ 139: {from: 0x38a9, to: 0x1f99},
+ 140: {from: 0x38aa, to: 0x2e8f},
+ 141: {from: 0x3951, to: 0x474},
+ 142: {from: 0x3b43, to: 0xd86},
+ 143: {from: 0x3b6d, to: 0x132},
+ 144: {from: 0x3c8e, to: 0x4b2},
+ 145: {from: 0x3fb2, to: 0xfc},
+ 146: {from: 0x41fd, to: 0xa86},
+ 147: {from: 0x42b3, to: 0x568},
+ 148: {from: 0x42ee, to: 0x3f55},
+ 149: {from: 0x436d, to: 0x251},
+ 150: {from: 0x43c0, to: 0x36c0},
+ 151: {from: 0x43c2, to: 0x10b},
+ 152: {from: 0x44a4, to: 0x3317},
+ 153: {from: 0x44d8, to: 0x508},
+ 154: {from: 0x45bf, to: 0x23fe},
+ 155: {from: 0x45d2, to: 0x26d1},
+ 156: {from: 0x4605, to: 0x48a3},
+ 157: {from: 0x46a3, to: 0x4695},
+ 158: {from: 0x4733, to: 0x473a},
+ 159: {from: 0x490b, to: 0x316},
+ 160: {from: 0x499c, to: 0x519},
+}
+
+// Size: 161 bytes, 161 elements
+var langAliasTypes = [161]langAliasType{
+ // Entry 0 - 3F
+ 1, 0, 0, 0, 0, 0, 0, 1, 2, 2, 0, 1, 0, 0, 1, 2,
+ 1, 1, 2, 0, 1, 0, 1, 2, 1, 1, 0, 0, 2, 1, 1, 0,
+ 2, 0, 0, 1, 0, 1, 0, 0, 1, 2, 1, 1, 1, 1, 0, 0,
+ 2, 1, 1, 1, 1, 2, 1, 0, 1, 1, 2, 2, 0, 1, 2, 0,
+ // Entry 40 - 7F
+ 1, 0, 1, 1, 1, 1, 0, 0, 2, 1, 0, 0, 0, 1, 1, 1,
+ 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 2, 2,
+ 2, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1,
+ 0, 2, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 2, 0, 2,
+ // Entry 80 - BF
+ 1, 1, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1, 1, 0,
+ 1, 2, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1,
+ 1,
+}
+
+const (
+ _Latn = 82
+ _Hani = 50
+ _Hans = 52
+ _Hant = 53
+ _Qaaa = 131
+ _Qaai = 139
+ _Qabx = 180
+ _Zinh = 224
+ _Zyyy = 229
+ _Zzzz = 230
+)
+
+// script is an alphabetically sorted list of ISO 15924 codes. The index
+// of the script in the string, divided by 4, is the internal scriptID.
+var script tag.Index = "" + // Size: 928 bytes
+ "----AdlmAfakAghbAhomArabAranArmiArmnAvstBaliBamuBassBatkBengBhksBlisBopo" +
+ "BrahBraiBugiBuhdCakmCansCariChamCherCirtCoptCprtCyrlCyrsDevaDsrtDuplEgyd" +
+ "EgyhEgypElbaEthiGeokGeorGlagGothGranGrekGujrGuruHanbHangHaniHanoHansHant" +
+ "HatrHebrHiraHluwHmngHrktHungIndsItalJamoJavaJpanJurcKaliKanaKharKhmrKhoj" +
+ "KitlKitsKndaKoreKpelKthiLanaLaooLatfLatgLatnLekeLepcLimbLinaLinbLisuLoma" +
+ "LyciLydiMahjMandManiMarcMayaMendMercMeroMlymModiMongMoonMrooMteiMultMymr" +
+ "NarbNbatNewaNkgbNkooNshuOgamOlckOrkhOryaOsgeOsmaPalmPaucPermPhagPhliPhlp" +
+ "PhlvPhnxPiqdPlrdPrtiQaaaQaabQaacQaadQaaeQaafQaagQaahQaaiQaajQaakQaalQaam" +
+ "QaanQaaoQaapQaaqQaarQaasQaatQaauQaavQaawQaaxQaayQaazQabaQabbQabcQabdQabe" +
+ "QabfQabgQabhQabiQabjQabkQablQabmQabnQaboQabpQabqQabrQabsQabtQabuQabvQabw" +
+ "QabxRjngRoroRunrSamrSaraSarbSaurSgnwShawShrdSiddSindSinhSoraSundSyloSyrc" +
+ "SyreSyrjSyrnTagbTakrTaleTaluTamlTangTavtTeluTengTfngTglgThaaThaiTibtTirh" +
+ "UgarVaiiVispWaraWoleXpeoXsuxYiiiZinhZmthZsyeZsymZxxxZyyyZzzz\xff\xff\xff" +
+ "\xff"
+
+// suppressScript is an index from langID to the dominant script for that language,
+// if it exists. If a script is given, it should be suppressed from the language tag.
+// Size: 1319 bytes, 1319 elements
+var suppressScript = [1319]uint8{
+ // Entry 0 - 3F
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ // Entry 40 - 7F
+ 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00,
+ // Entry 80 - BF
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ // Entry C0 - FF
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x52, 0x52, 0x00, 0x00,
+ // Entry 100 - 13F
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00,
+ 0x00, 0xd6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x2d, 0x00, 0x00, 0x52, 0x00, 0x00, 0x52,
+ 0x00, 0x52, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00,
+ // Entry 140 - 17F
+ 0x52, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00,
+ 0x52, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x52, 0x00, 0x00, 0x52, 0x52, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x52, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ // Entry 180 - 1BF
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x52, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x52, 0x2e, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x37, 0x00, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ // Entry 1C0 - 1FF
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x52, 0x52, 0x00, 0x52, 0x52, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00,
+ 0x52, 0x52, 0x00, 0x37, 0x00, 0x00, 0x00, 0x00,
+ 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ // Entry 200 - 23F
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x1e, 0x00, 0x00, 0x52, 0x00, 0x00,
+ // Entry 240 - 27F
+ 0x00, 0x00, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x4a, 0x00, 0x4b, 0x00, 0x20, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ // Entry 280 - 2BF
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x4f,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00,
+ // Entry 2C0 - 2FF
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00,
+ 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00,
+ // Entry 300 - 33F
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x52, 0x52,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x6b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00,
+ // Entry 340 - 37F
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, 0x52,
+ 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00,
+ 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x70, 0x52, 0x00, 0x00,
+ 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00,
+ // Entry 380 - 3BF
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52,
+ 0x00, 0x00, 0x00, 0x00, 0x75, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x2f, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x52,
+ 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00,
+ // Entry 3C0 - 3FF
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00,
+ 0x52, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x1e, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ // Entry 400 - 43F
+ 0x00, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x52, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00,
+ 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00,
+ 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x52, 0x52, 0x00, 0x00, 0x00, 0x00,
+ // Entry 440 - 47F
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcd, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0,
+ 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xd5, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00,
+ 0x52, 0x00, 0x00, 0x00, 0x52, 0x00, 0x52, 0x00,
+ 0x52, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00,
+ // Entry 480 - 4BF
+ 0x52, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00,
+ 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ // Entry 4C0 - 4FF
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ // Entry 500 - 53F
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00,
+}
+
+const (
+ _001 = 1
+ _419 = 30
+ _BR = 64
+ _CA = 72
+ _ES = 109
+ _GB = 122
+ _MD = 187
+ _PT = 237
+ _UK = 305
+ _US = 308
+ _ZZ = 356
+ _XA = 322
+ _XC = 324
+ _XK = 332
+)
+
+// isoRegionOffset needs to be added to the index of regionISO to obtain the regionID
+// for 2-letter ISO codes. (The first isoRegionOffset regionIDs are reserved for
+// the UN.M49 codes used for groups.)
+const isoRegionOffset = 31
+
+// regionTypes defines the status of a region for various standards.
+// Size: 357 bytes, 357 elements
+var regionTypes = [357]uint8{
+ // Entry 0 - 3F
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05,
+ 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
+ 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
+ 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
+ 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
+ // Entry 40 - 7F
+ 0x06, 0x06, 0x06, 0x04, 0x06, 0x06, 0x06, 0x06,
+ 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
+ 0x06, 0x06, 0x06, 0x06, 0x04, 0x06, 0x04, 0x00,
+ 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x04, 0x06,
+ 0x04, 0x06, 0x06, 0x06, 0x06, 0x00, 0x06, 0x04,
+ 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
+ 0x04, 0x06, 0x06, 0x06, 0x06, 0x06, 0x00, 0x06,
+ 0x04, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
+ // Entry 80 - BF
+ 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
+ 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
+ 0x06, 0x06, 0x00, 0x04, 0x06, 0x06, 0x06, 0x06,
+ 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
+ 0x06, 0x06, 0x00, 0x06, 0x06, 0x06, 0x06, 0x06,
+ 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
+ 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
+ 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
+ // Entry C0 - FF
+ 0x00, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
+ 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
+ 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x00, 0x06,
+ 0x06, 0x06, 0x06, 0x00, 0x06, 0x04, 0x06, 0x06,
+ 0x06, 0x06, 0x00, 0x06, 0x06, 0x06, 0x06, 0x06,
+ 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x00, 0x06,
+ 0x06, 0x00, 0x06, 0x05, 0x05, 0x05, 0x05, 0x05,
+ 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
+ // Entry 100 - 13F
+ 0x05, 0x06, 0x00, 0x06, 0x06, 0x06, 0x06, 0x06,
+ 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
+ 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
+ 0x06, 0x06, 0x06, 0x06, 0x06, 0x04, 0x06, 0x06,
+ 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
+ 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
+ 0x06, 0x02, 0x06, 0x04, 0x06, 0x06, 0x06, 0x06,
+ 0x06, 0x00, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
+ // Entry 140 - 17F
+ 0x00, 0x06, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
+ 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
+ 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
+ 0x05, 0x05, 0x05, 0x05, 0x04, 0x06, 0x06, 0x04,
+ 0x06, 0x06, 0x04, 0x06, 0x05,
+}
+
+// regionISO holds a list of alphabetically sorted 2-letter ISO region codes.
+// Each 2-letter codes is followed by two bytes with the following meaning:
+// - [A-Z}{2}: the first letter of the 2-letter code plus these two
+// letters form the 3-letter ISO code.
+// - 0, n: index into altRegionISO3.
+var regionISO tag.Index = "" + // Size: 1308 bytes
+ "AAAAACSCADNDAEREAFFGAGTGAIIAALLBAMRMANNTAOGOAQTAARRGASSMATUTAUUSAWBWAXLA" +
+ "AZZEBAIHBBRBBDGDBEELBFFABGGRBHHRBIDIBJENBLLMBMMUBNRNBOOLBQESBRRABSHSBTTN" +
+ "BUURBVVTBWWABYLRBZLZCAANCCCKCDODCFAFCGOGCHHECIIVCKOKCLHLCMMRCNHNCOOLCPPT" +
+ "CRRICS\x00\x00CTTECUUBCVPVCWUWCXXRCYYPCZZEDDDRDEEUDGGADJJIDKNKDMMADOOMDY" +
+ "HYDZZAEA ECCUEESTEGGYEHSHERRIESSPETTHEU\x00\x03EZ FIINFJJIFKLKFMSMFORO" +
+ "FQ\x00\x18FRRAFXXXGAABGBBRGDRDGEEOGFUFGGGYGHHAGIIBGLRLGMMBGNINGPLPGQNQGR" +
+ "RCGS\x00\x06GTTMGUUMGWNBGYUYHKKGHMMDHNNDHRRVHTTIHUUNHVVOIC IDDNIERLILSR" +
+ "IMMNINNDIOOTIQRQIRRNISSLITTAJEEYJMAMJOORJPPNJTTNKEENKGGZKHHMKIIRKM\x00" +
+ "\x09KNNAKP\x00\x0cKRORKWWTKY\x00\x0fKZAZLAAOLBBNLCCALIIELKKALRBRLSSOLTTU" +
+ "LUUXLVVALYBYMAARMCCOMDDAMENEMFAFMGDGMHHLMIIDMKKDMLLIMMMRMNNGMOACMPNPMQTQ" +
+ "MRRTMSSRMTLTMUUSMVDVMWWIMXEXMYYSMZOZNAAMNCCLNEERNFFKNGGANHHBNIICNLLDNOOR" +
+ "NPPLNQ\x00\x1eNRRUNTTZNUIUNZZLOMMNPAANPCCIPEERPFYFPGNGPHHLPKAKPLOLPM\x00" +
+ "\x12PNCNPRRIPSSEPTRTPUUSPWLWPYRYPZCZQAATQMMMQNNNQOOOQPPPQQQQQRRRQSSSQTTT" +
+ "QU\x00\x03QVVVQWWWQXXXQYYYQZZZREEURHHOROOURS\x00\x15RUUSRWWASAAUSBLBSCYC" +
+ "SDDNSEWESGGPSHHNSIVNSJJMSKVKSLLESMMRSNENSOOMSRURSSSDSTTPSUUNSVLVSXXMSYYR" +
+ "SZWZTAAATCCATDCDTF\x00\x18TGGOTHHATJJKTKKLTLLSTMKMTNUNTOONTPMPTRURTTTOTV" +
+ "UVTWWNTZZAUAKRUGGAUK UMMIUN USSAUYRYUZZBVAATVCCTVDDRVEENVGGBVIIRVNNMVU" +
+ "UTWFLFWKAKWSSMXAAAXBBBXCCCXDDDXEEEXFFFXGGGXHHHXIIIXJJJXKKKXLLLXMMMXNNNXO" +
+ "OOXPPPXQQQXRRRXSSSXTTTXUUUXVVVXWWWXXXXXYYYXZZZYDMDYEEMYT\x00\x1bYUUGZAAF" +
+ "ZMMBZRARZWWEZZZZ\xff\xff\xff\xff"
+
+// altRegionISO3 holds a list of 3-letter region codes that cannot be
+// mapped to 2-letter codes using the default algorithm. This is a short list.
+var altRegionISO3 string = "SCGQUUSGSCOMPRKCYMSPMSRBATFMYTATN"
+
+// altRegionIDs holds a list of regionIDs the positions of which match those
+// of the 3-letter ISO codes in altRegionISO3.
+// Size: 22 bytes, 11 elements
+var altRegionIDs = [11]uint16{
+ 0x0056, 0x006f, 0x0087, 0x00a7, 0x00a9, 0x00ac, 0x00e9, 0x0104,
+ 0x0120, 0x015e, 0x00db,
+}
+
+// Size: 80 bytes, 20 elements
+var regionOldMap = [20]fromTo{
+ 0: {from: 0x43, to: 0xc3},
+ 1: {from: 0x57, to: 0xa6},
+ 2: {from: 0x5e, to: 0x5f},
+ 3: {from: 0x65, to: 0x3a},
+ 4: {from: 0x78, to: 0x77},
+ 5: {from: 0x92, to: 0x36},
+ 6: {from: 0xa2, to: 0x132},
+ 7: {from: 0xc0, to: 0x132},
+ 8: {from: 0xd6, to: 0x13e},
+ 9: {from: 0xdb, to: 0x2a},
+ 10: {from: 0xee, to: 0x132},
+ 11: {from: 0xf1, to: 0xe1},
+ 12: {from: 0xfb, to: 0x6f},
+ 13: {from: 0x102, to: 0x163},
+ 14: {from: 0x129, to: 0x125},
+ 15: {from: 0x131, to: 0x7a},
+ 16: {from: 0x139, to: 0x13d},
+ 17: {from: 0x140, to: 0x132},
+ 18: {from: 0x15c, to: 0x15d},
+ 19: {from: 0x162, to: 0x4a},
+}
+
+// m49 maps regionIDs to UN.M49 codes. The first isoRegionOffset entries are
+// codes indicating collections of regions.
+// Size: 714 bytes, 357 elements
+var m49 = [357]int16{
+ // Entry 0 - 3F
+ 0, 1, 2, 3, 5, 9, 11, 13,
+ 14, 15, 17, 18, 19, 21, 29, 30,
+ 34, 35, 39, 53, 54, 57, 61, 142,
+ 143, 145, 150, 151, 154, 155, 419, 958,
+ 0, 20, 784, 4, 28, 660, 8, 51,
+ 530, 24, 10, 32, 16, 40, 36, 533,
+ 248, 31, 70, 52, 50, 56, 854, 100,
+ 48, 108, 204, 652, 60, 96, 68, 535,
+ // Entry 40 - 7F
+ 76, 44, 64, 104, 74, 72, 112, 84,
+ 124, 166, 180, 140, 178, 756, 384, 184,
+ 152, 120, 156, 170, 0, 188, 891, 296,
+ 192, 132, 531, 162, 196, 203, 278, 276,
+ 0, 262, 208, 212, 214, 204, 12, 0,
+ 218, 233, 818, 732, 232, 724, 231, 967,
+ 0, 246, 242, 238, 583, 234, 0, 250,
+ 249, 266, 826, 308, 268, 254, 831, 288,
+ // Entry 80 - BF
+ 292, 304, 270, 324, 312, 226, 300, 239,
+ 320, 316, 624, 328, 344, 334, 340, 191,
+ 332, 348, 854, 0, 360, 372, 376, 833,
+ 356, 86, 368, 364, 352, 380, 832, 388,
+ 400, 392, 581, 404, 417, 116, 296, 174,
+ 659, 408, 410, 414, 136, 398, 418, 422,
+ 662, 438, 144, 430, 426, 440, 442, 428,
+ 434, 504, 492, 498, 499, 663, 450, 584,
+ // Entry C0 - FF
+ 581, 807, 466, 104, 496, 446, 580, 474,
+ 478, 500, 470, 480, 462, 454, 484, 458,
+ 508, 516, 540, 562, 574, 566, 548, 558,
+ 528, 578, 524, 10, 520, 536, 570, 554,
+ 512, 591, 0, 604, 258, 598, 608, 586,
+ 616, 666, 612, 630, 275, 620, 581, 585,
+ 600, 591, 634, 959, 960, 961, 962, 963,
+ 964, 965, 966, 967, 968, 969, 970, 971,
+ // Entry 100 - 13F
+ 972, 638, 716, 642, 688, 643, 646, 682,
+ 90, 690, 729, 752, 702, 654, 705, 744,
+ 703, 694, 674, 686, 706, 740, 728, 678,
+ 810, 222, 534, 760, 748, 0, 796, 148,
+ 260, 768, 764, 762, 772, 626, 795, 788,
+ 776, 626, 792, 780, 798, 158, 834, 804,
+ 800, 826, 581, 0, 840, 858, 860, 336,
+ 670, 704, 862, 92, 850, 704, 548, 876,
+ // Entry 140 - 17F
+ 581, 882, 973, 974, 975, 976, 977, 978,
+ 979, 980, 981, 982, 983, 984, 985, 986,
+ 987, 988, 989, 990, 991, 992, 993, 994,
+ 995, 996, 997, 998, 720, 887, 175, 891,
+ 710, 894, 180, 716, 999,
+}
+
+// m49Index gives indexes into fromM49 based on the three most significant bits
+// of a 10-bit UN.M49 code. To search an UN.M49 code in fromM49, search in
+// fromM49[m49Index[msb39(code)]:m49Index[msb3(code)+1]]
+// for an entry where the first 7 bits match the 7 lsb of the UN.M49 code.
+// The region code is stored in the 9 lsb of the indexed value.
+// Size: 18 bytes, 9 elements
+var m49Index = [9]int16{
+ 0, 59, 107, 142, 180, 219, 258, 290,
+ 332,
+}
+
+// fromM49 contains entries to map UN.M49 codes to regions. See m49Index for details.
+// Size: 664 bytes, 332 elements
+var fromM49 = [332]uint16{
+ // Entry 0 - 3F
+ 0x0201, 0x0402, 0x0603, 0x0823, 0x0a04, 0x1026, 0x1205, 0x142a,
+ 0x1606, 0x1866, 0x1a07, 0x1c08, 0x1e09, 0x202c, 0x220a, 0x240b,
+ 0x260c, 0x2821, 0x2a0d, 0x3029, 0x3824, 0x3a0e, 0x3c0f, 0x3e31,
+ 0x402b, 0x4410, 0x4611, 0x482e, 0x4e12, 0x502d, 0x5841, 0x6038,
+ 0x6434, 0x6627, 0x6833, 0x6a13, 0x6c14, 0x7035, 0x7215, 0x783c,
+ 0x7a16, 0x8042, 0x883e, 0x8c32, 0x9045, 0x9444, 0x9840, 0xa847,
+ 0xac99, 0xb508, 0xb93b, 0xc03d, 0xc837, 0xd0c3, 0xd839, 0xe046,
+ 0xe8a5, 0xf051, 0xf848, 0x0859, 0x10ac, 0x184b, 0x1c17, 0x1e18,
+ // Entry 40 - 7F
+ 0x20b2, 0x2219, 0x291f, 0x2c1a, 0x2e1b, 0x3050, 0x341c, 0x361d,
+ 0x3852, 0x3d2d, 0x445b, 0x4c49, 0x5453, 0x5ca7, 0x5f5e, 0x644c,
+ 0x684a, 0x704f, 0x7855, 0x7e8f, 0x8058, 0x885c, 0x965d, 0x983a,
+ 0xa062, 0xa863, 0xac64, 0xb468, 0xbd19, 0xc485, 0xcc6e, 0xce6e,
+ 0xd06c, 0xd269, 0xd475, 0xdc73, 0xde87, 0xe472, 0xec71, 0xf030,
+ 0xf278, 0xf477, 0xfc7d, 0x04e4, 0x0920, 0x0c61, 0x1479, 0x187c,
+ 0x1c82, 0x26ec, 0x285f, 0x2c5e, 0x305f, 0x407f, 0x4880, 0x50a6,
+ 0x5886, 0x6081, 0x687b, 0x7084, 0x7889, 0x8088, 0x8883, 0x908b,
+ // Entry 80 - BF
+ 0x9890, 0x9c8d, 0xa137, 0xa88e, 0xb08c, 0xb891, 0xc09c, 0xc898,
+ 0xd094, 0xd89b, 0xe09a, 0xe895, 0xf096, 0xf89d, 0x004e, 0x089f,
+ 0x10a1, 0x1cad, 0x20a0, 0x28a3, 0x30a9, 0x34aa, 0x3cab, 0x42a4,
+ 0x44ae, 0x461e, 0x4caf, 0x54b4, 0x58b7, 0x5cb3, 0x64b8, 0x6cb1,
+ 0x70b5, 0x74b6, 0x7cc5, 0x84be, 0x8ccd, 0x94cf, 0x9ccc, 0xa4c2,
+ 0xacca, 0xb4c7, 0xbcc8, 0xc0cb, 0xc8ce, 0xd8ba, 0xe0c4, 0xe4bb,
+ 0xe6bc, 0xe8c9, 0xf0b9, 0xf8d0, 0x00e0, 0x08d1, 0x10dc, 0x18da,
+ 0x20d8, 0x2428, 0x265a, 0x2a2f, 0x2d1a, 0x2e3f, 0x30dd, 0x38d2,
+ // Entry C0 - FF
+ 0x493e, 0x54df, 0x5cd7, 0x64d3, 0x6cd5, 0x74de, 0x7cd4, 0x84d9,
+ 0x88c6, 0x8b32, 0x8e74, 0x90bf, 0x92ef, 0x94e7, 0x9ee1, 0xace5,
+ 0xb0f0, 0xb8e3, 0xc0e6, 0xc8ea, 0xd0e8, 0xd8ed, 0xe08a, 0xe525,
+ 0xeceb, 0xf4f2, 0xfd01, 0x0503, 0x0705, 0x0d06, 0x183b, 0x1d0d,
+ 0x26a8, 0x2825, 0x2cb0, 0x2ebd, 0x34e9, 0x3d38, 0x4512, 0x4d17,
+ 0x5507, 0x5d13, 0x6104, 0x6509, 0x6d11, 0x7d0c, 0x7f10, 0x813d,
+ 0x830e, 0x8514, 0x8d60, 0x9963, 0xa15c, 0xa86d, 0xb116, 0xb30a,
+ 0xb86b, 0xc10a, 0xc915, 0xd10f, 0xd91c, 0xe10b, 0xe84d, 0xf11b,
+ // Entry 100 - 13F
+ 0xf523, 0xf922, 0x0121, 0x0924, 0x1128, 0x192b, 0x2022, 0x2927,
+ 0x312a, 0x3726, 0x391e, 0x3d2c, 0x4130, 0x492f, 0x4ec1, 0x5518,
+ 0x646a, 0x747a, 0x7e7e, 0x809e, 0x8297, 0x852e, 0x9134, 0xa53c,
+ 0xac36, 0xb535, 0xb936, 0xbd3a, 0xd93f, 0xe541, 0xed5d, 0xef5d,
+ 0xf656, 0xfd61, 0x7c1f, 0x7ef3, 0x80f4, 0x82f5, 0x84f6, 0x86f7,
+ 0x88f8, 0x8af9, 0x8cfa, 0x8e6f, 0x90fc, 0x92fd, 0x94fe, 0x96ff,
+ 0x9900, 0x9b42, 0x9d43, 0x9f44, 0xa145, 0xa346, 0xa547, 0xa748,
+ 0xa949, 0xab4a, 0xad4b, 0xaf4c, 0xb14d, 0xb34e, 0xb54f, 0xb750,
+ // Entry 140 - 17F
+ 0xb951, 0xbb52, 0xbd53, 0xbf54, 0xc155, 0xc356, 0xc557, 0xc758,
+ 0xc959, 0xcb5a, 0xcd5b, 0xcf64,
+}
+
+// Size: 1463 bytes
+var variantIndex = map[string]uint8{
+ "1606nict": 0x0,
+ "1694acad": 0x1,
+ "1901": 0x2,
+ "1959acad": 0x3,
+ "1994": 0x45,
+ "1996": 0x4,
+ "abl1943": 0x5,
+ "alalc97": 0x47,
+ "aluku": 0x6,
+ "ao1990": 0x7,
+ "arevela": 0x8,
+ "arevmda": 0x9,
+ "baku1926": 0xa,
+ "balanka": 0xb,
+ "barla": 0xc,
+ "basiceng": 0xd,
+ "bauddha": 0xe,
+ "biscayan": 0xf,
+ "biske": 0x40,
+ "bohoric": 0x10,
+ "boont": 0x11,
+ "colb1945": 0x12,
+ "cornu": 0x13,
+ "dajnko": 0x14,
+ "ekavsk": 0x15,
+ "emodeng": 0x16,
+ "fonipa": 0x48,
+ "fonnapa": 0x49,
+ "fonupa": 0x4a,
+ "fonxsamp": 0x4b,
+ "hepburn": 0x17,
+ "heploc": 0x46,
+ "hognorsk": 0x18,
+ "ijekavsk": 0x19,
+ "itihasa": 0x1a,
+ "jauer": 0x1b,
+ "jyutping": 0x1c,
+ "kkcor": 0x1d,
+ "kociewie": 0x1e,
+ "kscor": 0x1f,
+ "laukika": 0x20,
+ "lipaw": 0x41,
+ "luna1918": 0x21,
+ "metelko": 0x22,
+ "monoton": 0x23,
+ "ndyuka": 0x24,
+ "nedis": 0x25,
+ "newfound": 0x26,
+ "njiva": 0x42,
+ "nulik": 0x27,
+ "osojs": 0x43,
+ "oxendict": 0x28,
+ "pamaka": 0x29,
+ "petr1708": 0x2a,
+ "pinyin": 0x2b,
+ "polyton": 0x2c,
+ "puter": 0x2d,
+ "rigik": 0x2e,
+ "rozaj": 0x2f,
+ "rumgr": 0x30,
+ "scotland": 0x31,
+ "scouse": 0x32,
+ "simple": 0x4c,
+ "solba": 0x44,
+ "sotav": 0x33,
+ "surmiran": 0x34,
+ "sursilv": 0x35,
+ "sutsilv": 0x36,
+ "tarask": 0x37,
+ "uccor": 0x38,
+ "ucrcor": 0x39,
+ "ulster": 0x3a,
+ "unifon": 0x3b,
+ "vaidika": 0x3c,
+ "valencia": 0x3d,
+ "vallader": 0x3e,
+ "wadegile": 0x3f,
+}
+
+// variantNumSpecialized is the number of specialized variants in variants.
+const variantNumSpecialized = 71
+
+// nRegionGroups is the number of region groups.
+const nRegionGroups = 32
+
+type likelyLangRegion struct {
+ lang uint16
+ region uint16
+}
+
+// likelyScript is a lookup table, indexed by scriptID, for the most likely
+// languages and regions given a script.
+// Size: 928 bytes, 232 elements
+var likelyScript = [232]likelyLangRegion{
+ 1: {lang: 0x149, region: 0x83},
+ 3: {lang: 0x299, region: 0x105},
+ 4: {lang: 0x1e, region: 0x98},
+ 5: {lang: 0x39, region: 0x6a},
+ 7: {lang: 0x3a, region: 0x9b},
+ 8: {lang: 0x1d0, region: 0x27},
+ 9: {lang: 0x12, region: 0x9b},
+ 10: {lang: 0x5a, region: 0x94},
+ 11: {lang: 0x5f, region: 0x51},
+ 12: {lang: 0xb7, region: 0xb3},
+ 13: {lang: 0x62, region: 0x94},
+ 14: {lang: 0xa3, region: 0x34},
+ 15: {lang: 0x3e0, region: 0x98},
+ 17: {lang: 0x51f, region: 0x12d},
+ 18: {lang: 0x3a8, region: 0x98},
+ 19: {lang: 0x159, region: 0x77},
+ 20: {lang: 0xc0, region: 0x94},
+ 21: {lang: 0x9b, region: 0xe6},
+ 22: {lang: 0xd9, region: 0x34},
+ 23: {lang: 0xf0, region: 0x48},
+ 24: {lang: 0x4e6, region: 0x12a},
+ 25: {lang: 0xe5, region: 0x13d},
+ 26: {lang: 0xe3, region: 0x134},
+ 28: {lang: 0xee, region: 0x6a},
+ 29: {lang: 0x199, region: 0x5c},
+ 30: {lang: 0x3d9, region: 0x105},
+ 32: {lang: 0x1b7, region: 0x98},
+ 34: {lang: 0x159, region: 0x77},
+ 37: {lang: 0x12f, region: 0x6a},
+ 38: {lang: 0x427, region: 0x26},
+ 39: {lang: 0x26, region: 0x6e},
+ 41: {lang: 0x208, region: 0x7c},
+ 42: {lang: 0xfa, region: 0x37},
+ 43: {lang: 0x198, region: 0x12f},
+ 44: {lang: 0x3e0, region: 0x98},
+ 45: {lang: 0x131, region: 0x86},
+ 46: {lang: 0x19d, region: 0x98},
+ 47: {lang: 0x394, region: 0x98},
+ 48: {lang: 0x51f, region: 0x12d},
+ 49: {lang: 0x24b, region: 0xaa},
+ 50: {lang: 0x51f, region: 0x52},
+ 51: {lang: 0x1c4, region: 0xe6},
+ 52: {lang: 0x51f, region: 0x52},
+ 53: {lang: 0x51f, region: 0x12d},
+ 54: {lang: 0x2f4, region: 0x9a},
+ 55: {lang: 0x1b5, region: 0x96},
+ 56: {lang: 0x1f8, region: 0xa1},
+ 57: {lang: 0x1be, region: 0x12a},
+ 58: {lang: 0x1c3, region: 0xae},
+ 60: {lang: 0x1ce, region: 0x91},
+ 62: {lang: 0x13d, region: 0x9d},
+ 63: {lang: 0x24b, region: 0xaa},
+ 64: {lang: 0x206, region: 0x94},
+ 65: {lang: 0x1f8, region: 0xa1},
+ 67: {lang: 0x130, region: 0xc3},
+ 68: {lang: 0x1f8, region: 0xa1},
+ 69: {lang: 0x3b2, region: 0xe7},
+ 70: {lang: 0x242, region: 0xa5},
+ 71: {lang: 0x3f0, region: 0x98},
+ 74: {lang: 0x249, region: 0x98},
+ 75: {lang: 0x24b, region: 0xaa},
+ 77: {lang: 0x87, region: 0x98},
+ 78: {lang: 0x367, region: 0x122},
+ 79: {lang: 0x2af, region: 0xae},
+ 84: {lang: 0x296, region: 0x98},
+ 85: {lang: 0x29f, region: 0x98},
+ 86: {lang: 0x286, region: 0x86},
+ 87: {lang: 0x199, region: 0x86},
+ 88: {lang: 0x2a3, region: 0x52},
+ 90: {lang: 0x4ea, region: 0x12a},
+ 91: {lang: 0x4eb, region: 0x12a},
+ 92: {lang: 0x1b7, region: 0x98},
+ 93: {lang: 0x32e, region: 0x9b},
+ 94: {lang: 0x4ed, region: 0x52},
+ 95: {lang: 0xa7, region: 0x52},
+ 97: {lang: 0x2df, region: 0x111},
+ 98: {lang: 0x4ee, region: 0x10a},
+ 99: {lang: 0x4ee, region: 0x10a},
+ 100: {lang: 0x2fb, region: 0x98},
+ 101: {lang: 0x312, region: 0x98},
+ 102: {lang: 0x302, region: 0x52},
+ 104: {lang: 0x315, region: 0x34},
+ 105: {lang: 0x305, region: 0x98},
+ 106: {lang: 0x40a, region: 0xe7},
+ 107: {lang: 0x328, region: 0xc3},
+ 108: {lang: 0x4ef, region: 0x107},
+ 109: {lang: 0x3a, region: 0xa0},
+ 110: {lang: 0x34a, region: 0xda},
+ 112: {lang: 0x2c7, region: 0x83},
+ 114: {lang: 0x3f9, region: 0x95},
+ 115: {lang: 0x3e5, region: 0x98},
+ 116: {lang: 0x392, region: 0xc4},
+ 117: {lang: 0x38c, region: 0x98},
+ 118: {lang: 0x390, region: 0x134},
+ 119: {lang: 0x41f, region: 0x114},
+ 120: {lang: 0x3a, region: 0x11b},
+ 121: {lang: 0xf9, region: 0xc3},
+ 122: {lang: 0x274, region: 0x105},
+ 123: {lang: 0x2c0, region: 0x52},
+ 124: {lang: 0x396, region: 0x9b},
+ 125: {lang: 0x396, region: 0x52},
+ 127: {lang: 0x3a4, region: 0xaf},
+ 129: {lang: 0x1bf, region: 0x52},
+ 130: {lang: 0x4f3, region: 0x9b},
+ 181: {lang: 0x3c2, region: 0x94},
+ 183: {lang: 0x369, region: 0x10b},
+ 184: {lang: 0x416, region: 0x96},
+ 186: {lang: 0x4f5, region: 0x15d},
+ 187: {lang: 0x3e6, region: 0x98},
+ 188: {lang: 0x44, region: 0x134},
+ 189: {lang: 0x134, region: 0x7a},
+ 190: {lang: 0x3e0, region: 0x98},
+ 191: {lang: 0x3e0, region: 0x98},
+ 192: {lang: 0x3f0, region: 0x98},
+ 193: {lang: 0x402, region: 0xb2},
+ 194: {lang: 0x429, region: 0x98},
+ 195: {lang: 0x434, region: 0x94},
+ 196: {lang: 0x443, region: 0x34},
+ 197: {lang: 0x444, region: 0x9a},
+ 201: {lang: 0x450, region: 0xe6},
+ 202: {lang: 0x116, region: 0x98},
+ 203: {lang: 0x454, region: 0x52},
+ 204: {lang: 0x22a, region: 0x52},
+ 205: {lang: 0x446, region: 0x98},
+ 206: {lang: 0x49b, region: 0x52},
+ 207: {lang: 0x9d, region: 0x13d},
+ 208: {lang: 0x457, region: 0x98},
+ 210: {lang: 0x51e, region: 0xb9},
+ 211: {lang: 0x14e, region: 0xe6},
+ 212: {lang: 0x124, region: 0xcc},
+ 213: {lang: 0x461, region: 0x122},
+ 214: {lang: 0xa7, region: 0x52},
+ 215: {lang: 0x2c5, region: 0x98},
+ 216: {lang: 0x4a3, region: 0x11b},
+ 217: {lang: 0x4b4, region: 0xb3},
+ 219: {lang: 0x1c7, region: 0x98},
+ 221: {lang: 0x3a0, region: 0x9b},
+ 222: {lang: 0x21, region: 0x9a},
+ 223: {lang: 0x1e2, region: 0x52},
+}
+
+type likelyScriptRegion struct {
+ region uint16
+ script uint8
+ flags uint8
+}
+
+// likelyLang is a lookup table, indexed by langID, for the most likely
+// scripts and regions given incomplete information. If more entries exist for a
+// given language, region and script are the index and size respectively
+// of the list in likelyLangList.
+// Size: 5276 bytes, 1319 elements
+var likelyLang = [1319]likelyScriptRegion{
+ 0: {region: 0x134, script: 0x52, flags: 0x0},
+ 1: {region: 0x6e, script: 0x52, flags: 0x0},
+ 2: {region: 0x164, script: 0x52, flags: 0x0},
+ 3: {region: 0x164, script: 0x52, flags: 0x0},
+ 4: {region: 0x164, script: 0x52, flags: 0x0},
+ 5: {region: 0x7c, script: 0x1e, flags: 0x0},
+ 6: {region: 0x164, script: 0x52, flags: 0x0},
+ 7: {region: 0x7f, script: 0x52, flags: 0x0},
+ 8: {region: 0x164, script: 0x52, flags: 0x0},
+ 9: {region: 0x164, script: 0x52, flags: 0x0},
+ 10: {region: 0x164, script: 0x52, flags: 0x0},
+ 11: {region: 0x94, script: 0x52, flags: 0x0},
+ 12: {region: 0x130, script: 0x52, flags: 0x0},
+ 13: {region: 0x7f, script: 0x52, flags: 0x0},
+ 14: {region: 0x164, script: 0x52, flags: 0x0},
+ 15: {region: 0x164, script: 0x52, flags: 0x0},
+ 16: {region: 0x105, script: 0x1e, flags: 0x0},
+ 17: {region: 0x164, script: 0x52, flags: 0x0},
+ 18: {region: 0x9b, script: 0x9, flags: 0x0},
+ 19: {region: 0x127, script: 0x5, flags: 0x0},
+ 20: {region: 0x164, script: 0x52, flags: 0x0},
+ 21: {region: 0x160, script: 0x52, flags: 0x0},
+ 22: {region: 0x164, script: 0x52, flags: 0x0},
+ 23: {region: 0x164, script: 0x52, flags: 0x0},
+ 24: {region: 0x164, script: 0x52, flags: 0x0},
+ 25: {region: 0x164, script: 0x52, flags: 0x0},
+ 26: {region: 0x164, script: 0x52, flags: 0x0},
+ 27: {region: 0x51, script: 0x52, flags: 0x0},
+ 28: {region: 0x164, script: 0x52, flags: 0x0},
+ 29: {region: 0x164, script: 0x52, flags: 0x0},
+ 30: {region: 0x98, script: 0x4, flags: 0x0},
+ 31: {region: 0x164, script: 0x52, flags: 0x0},
+ 32: {region: 0x7f, script: 0x52, flags: 0x0},
+ 33: {region: 0x9a, script: 0xde, flags: 0x0},
+ 34: {region: 0x164, script: 0x52, flags: 0x0},
+ 35: {region: 0x164, script: 0x52, flags: 0x0},
+ 36: {region: 0x14c, script: 0x52, flags: 0x0},
+ 37: {region: 0x105, script: 0x1e, flags: 0x0},
+ 38: {region: 0x6e, script: 0x27, flags: 0x0},
+ 39: {region: 0x164, script: 0x52, flags: 0x0},
+ 40: {region: 0x164, script: 0x52, flags: 0x0},
+ 41: {region: 0xd5, script: 0x52, flags: 0x0},
+ 42: {region: 0x164, script: 0x52, flags: 0x0},
+ 44: {region: 0x164, script: 0x52, flags: 0x0},
+ 45: {region: 0x164, script: 0x52, flags: 0x0},
+ 46: {region: 0x164, script: 0x52, flags: 0x0},
+ 47: {region: 0x164, script: 0x52, flags: 0x0},
+ 48: {region: 0x164, script: 0x52, flags: 0x0},
+ 49: {region: 0x164, script: 0x52, flags: 0x0},
+ 50: {region: 0x94, script: 0x52, flags: 0x0},
+ 51: {region: 0x164, script: 0x5, flags: 0x0},
+ 52: {region: 0x121, script: 0x5, flags: 0x0},
+ 53: {region: 0x164, script: 0x52, flags: 0x0},
+ 54: {region: 0x164, script: 0x52, flags: 0x0},
+ 55: {region: 0x164, script: 0x52, flags: 0x0},
+ 56: {region: 0x164, script: 0x52, flags: 0x0},
+ 57: {region: 0x6a, script: 0x5, flags: 0x0},
+ 58: {region: 0x0, script: 0x3, flags: 0x1},
+ 59: {region: 0x164, script: 0x52, flags: 0x0},
+ 60: {region: 0x50, script: 0x52, flags: 0x0},
+ 61: {region: 0x3e, script: 0x52, flags: 0x0},
+ 62: {region: 0x66, script: 0x5, flags: 0x0},
+ 64: {region: 0xb9, script: 0x5, flags: 0x0},
+ 65: {region: 0x6a, script: 0x5, flags: 0x0},
+ 66: {region: 0x98, script: 0xe, flags: 0x0},
+ 67: {region: 0x12e, script: 0x52, flags: 0x0},
+ 68: {region: 0x134, script: 0xbc, flags: 0x0},
+ 69: {region: 0x164, script: 0x52, flags: 0x0},
+ 70: {region: 0x164, script: 0x52, flags: 0x0},
+ 71: {region: 0x6d, script: 0x52, flags: 0x0},
+ 72: {region: 0x164, script: 0x52, flags: 0x0},
+ 73: {region: 0x164, script: 0x52, flags: 0x0},
+ 74: {region: 0x48, script: 0x52, flags: 0x0},
+ 75: {region: 0x164, script: 0x52, flags: 0x0},
+ 76: {region: 0x105, script: 0x1e, flags: 0x0},
+ 77: {region: 0x164, script: 0x5, flags: 0x0},
+ 78: {region: 0x164, script: 0x52, flags: 0x0},
+ 79: {region: 0x164, script: 0x52, flags: 0x0},
+ 80: {region: 0x164, script: 0x52, flags: 0x0},
+ 81: {region: 0x98, script: 0x20, flags: 0x0},
+ 82: {region: 0x164, script: 0x52, flags: 0x0},
+ 83: {region: 0x164, script: 0x52, flags: 0x0},
+ 84: {region: 0x164, script: 0x52, flags: 0x0},
+ 85: {region: 0x3e, script: 0x52, flags: 0x0},
+ 86: {region: 0x164, script: 0x52, flags: 0x0},
+ 87: {region: 0x3, script: 0x5, flags: 0x1},
+ 88: {region: 0x105, script: 0x1e, flags: 0x0},
+ 89: {region: 0xe7, script: 0x5, flags: 0x0},
+ 90: {region: 0x94, script: 0x52, flags: 0x0},
+ 91: {region: 0xda, script: 0x20, flags: 0x0},
+ 92: {region: 0x2d, script: 0x52, flags: 0x0},
+ 93: {region: 0x51, script: 0x52, flags: 0x0},
+ 94: {region: 0x164, script: 0x52, flags: 0x0},
+ 95: {region: 0x51, script: 0xb, flags: 0x0},
+ 96: {region: 0x164, script: 0x52, flags: 0x0},
+ 97: {region: 0x164, script: 0x52, flags: 0x0},
+ 98: {region: 0x94, script: 0x52, flags: 0x0},
+ 99: {region: 0x164, script: 0x52, flags: 0x0},
+ 100: {region: 0x51, script: 0x52, flags: 0x0},
+ 101: {region: 0x164, script: 0x52, flags: 0x0},
+ 102: {region: 0x164, script: 0x52, flags: 0x0},
+ 103: {region: 0x164, script: 0x52, flags: 0x0},
+ 104: {region: 0x164, script: 0x52, flags: 0x0},
+ 105: {region: 0x4e, script: 0x52, flags: 0x0},
+ 106: {region: 0x164, script: 0x52, flags: 0x0},
+ 107: {region: 0x164, script: 0x52, flags: 0x0},
+ 108: {region: 0x164, script: 0x52, flags: 0x0},
+ 109: {region: 0x164, script: 0x27, flags: 0x0},
+ 110: {region: 0x164, script: 0x52, flags: 0x0},
+ 111: {region: 0x164, script: 0x52, flags: 0x0},
+ 112: {region: 0x46, script: 0x1e, flags: 0x0},
+ 113: {region: 0x164, script: 0x52, flags: 0x0},
+ 114: {region: 0x164, script: 0x52, flags: 0x0},
+ 115: {region: 0x10a, script: 0x5, flags: 0x0},
+ 116: {region: 0x161, script: 0x52, flags: 0x0},
+ 117: {region: 0x164, script: 0x52, flags: 0x0},
+ 118: {region: 0x94, script: 0x52, flags: 0x0},
+ 119: {region: 0x164, script: 0x52, flags: 0x0},
+ 120: {region: 0x12e, script: 0x52, flags: 0x0},
+ 121: {region: 0x51, script: 0x52, flags: 0x0},
+ 122: {region: 0x98, script: 0xcd, flags: 0x0},
+ 123: {region: 0xe7, script: 0x5, flags: 0x0},
+ 124: {region: 0x98, script: 0x20, flags: 0x0},
+ 125: {region: 0x37, script: 0x1e, flags: 0x0},
+ 126: {region: 0x98, script: 0x20, flags: 0x0},
+ 127: {region: 0xe7, script: 0x5, flags: 0x0},
+ 128: {region: 0x12a, script: 0x2d, flags: 0x0},
+ 130: {region: 0x98, script: 0x20, flags: 0x0},
+ 131: {region: 0x164, script: 0x52, flags: 0x0},
+ 132: {region: 0x98, script: 0x20, flags: 0x0},
+ 133: {region: 0xe6, script: 0x52, flags: 0x0},
+ 134: {region: 0x164, script: 0x52, flags: 0x0},
+ 135: {region: 0x98, script: 0x20, flags: 0x0},
+ 136: {region: 0x164, script: 0x52, flags: 0x0},
+ 137: {region: 0x13e, script: 0x52, flags: 0x0},
+ 138: {region: 0x164, script: 0x52, flags: 0x0},
+ 139: {region: 0x164, script: 0x52, flags: 0x0},
+ 140: {region: 0xe6, script: 0x52, flags: 0x0},
+ 141: {region: 0x164, script: 0x52, flags: 0x0},
+ 142: {region: 0xd5, script: 0x52, flags: 0x0},
+ 143: {region: 0x164, script: 0x52, flags: 0x0},
+ 144: {region: 0x164, script: 0x52, flags: 0x0},
+ 145: {region: 0x164, script: 0x52, flags: 0x0},
+ 146: {region: 0x164, script: 0x27, flags: 0x0},
+ 147: {region: 0x98, script: 0x20, flags: 0x0},
+ 148: {region: 0x94, script: 0x52, flags: 0x0},
+ 149: {region: 0x164, script: 0x52, flags: 0x0},
+ 150: {region: 0x164, script: 0x52, flags: 0x0},
+ 151: {region: 0x164, script: 0x52, flags: 0x0},
+ 152: {region: 0x164, script: 0x52, flags: 0x0},
+ 153: {region: 0x51, script: 0x52, flags: 0x0},
+ 154: {region: 0x164, script: 0x52, flags: 0x0},
+ 155: {region: 0xe6, script: 0x52, flags: 0x0},
+ 156: {region: 0x164, script: 0x52, flags: 0x0},
+ 157: {region: 0x13d, script: 0xcf, flags: 0x0},
+ 158: {region: 0xc2, script: 0x52, flags: 0x0},
+ 159: {region: 0x164, script: 0x52, flags: 0x0},
+ 160: {region: 0x164, script: 0x52, flags: 0x0},
+ 161: {region: 0xc2, script: 0x52, flags: 0x0},
+ 162: {region: 0x164, script: 0x52, flags: 0x0},
+ 163: {region: 0x34, script: 0xe, flags: 0x0},
+ 164: {region: 0x164, script: 0x52, flags: 0x0},
+ 165: {region: 0x164, script: 0x52, flags: 0x0},
+ 166: {region: 0x164, script: 0x52, flags: 0x0},
+ 167: {region: 0x52, script: 0xd6, flags: 0x0},
+ 168: {region: 0x164, script: 0x52, flags: 0x0},
+ 169: {region: 0x164, script: 0x52, flags: 0x0},
+ 170: {region: 0x164, script: 0x52, flags: 0x0},
+ 171: {region: 0x98, script: 0xe, flags: 0x0},
+ 172: {region: 0x164, script: 0x52, flags: 0x0},
+ 173: {region: 0x9b, script: 0x5, flags: 0x0},
+ 174: {region: 0x164, script: 0x52, flags: 0x0},
+ 175: {region: 0x4e, script: 0x52, flags: 0x0},
+ 176: {region: 0x77, script: 0x52, flags: 0x0},
+ 177: {region: 0x98, script: 0x20, flags: 0x0},
+ 178: {region: 0xe7, script: 0x5, flags: 0x0},
+ 179: {region: 0x98, script: 0x20, flags: 0x0},
+ 180: {region: 0x164, script: 0x52, flags: 0x0},
+ 181: {region: 0x32, script: 0x52, flags: 0x0},
+ 182: {region: 0x164, script: 0x52, flags: 0x0},
+ 183: {region: 0xb3, script: 0xc, flags: 0x0},
+ 184: {region: 0x51, script: 0x52, flags: 0x0},
+ 185: {region: 0x164, script: 0x27, flags: 0x0},
+ 186: {region: 0xe6, script: 0x52, flags: 0x0},
+ 187: {region: 0x164, script: 0x52, flags: 0x0},
+ 188: {region: 0xe7, script: 0x20, flags: 0x0},
+ 189: {region: 0x105, script: 0x1e, flags: 0x0},
+ 190: {region: 0x15e, script: 0x52, flags: 0x0},
+ 191: {region: 0x164, script: 0x52, flags: 0x0},
+ 192: {region: 0x94, script: 0x52, flags: 0x0},
+ 193: {region: 0x164, script: 0x52, flags: 0x0},
+ 194: {region: 0x51, script: 0x52, flags: 0x0},
+ 195: {region: 0x164, script: 0x52, flags: 0x0},
+ 196: {region: 0x164, script: 0x52, flags: 0x0},
+ 197: {region: 0x164, script: 0x52, flags: 0x0},
+ 198: {region: 0x85, script: 0x52, flags: 0x0},
+ 199: {region: 0x164, script: 0x52, flags: 0x0},
+ 200: {region: 0x164, script: 0x52, flags: 0x0},
+ 201: {region: 0x164, script: 0x52, flags: 0x0},
+ 202: {region: 0x164, script: 0x52, flags: 0x0},
+ 203: {region: 0x6c, script: 0x27, flags: 0x0},
+ 204: {region: 0x164, script: 0x52, flags: 0x0},
+ 205: {region: 0x164, script: 0x52, flags: 0x0},
+ 206: {region: 0x51, script: 0x52, flags: 0x0},
+ 207: {region: 0x164, script: 0x52, flags: 0x0},
+ 208: {region: 0x164, script: 0x52, flags: 0x0},
+ 209: {region: 0xc2, script: 0x52, flags: 0x0},
+ 210: {region: 0x164, script: 0x52, flags: 0x0},
+ 211: {region: 0x164, script: 0x52, flags: 0x0},
+ 212: {region: 0x164, script: 0x52, flags: 0x0},
+ 213: {region: 0x6d, script: 0x52, flags: 0x0},
+ 214: {region: 0x164, script: 0x52, flags: 0x0},
+ 215: {region: 0x164, script: 0x52, flags: 0x0},
+ 216: {region: 0xd5, script: 0x52, flags: 0x0},
+ 217: {region: 0x8, script: 0x2, flags: 0x1},
+ 218: {region: 0x105, script: 0x1e, flags: 0x0},
+ 219: {region: 0xe6, script: 0x52, flags: 0x0},
+ 220: {region: 0x164, script: 0x52, flags: 0x0},
+ 221: {region: 0x130, script: 0x52, flags: 0x0},
+ 222: {region: 0x89, script: 0x52, flags: 0x0},
+ 223: {region: 0x74, script: 0x52, flags: 0x0},
+ 224: {region: 0x105, script: 0x1e, flags: 0x0},
+ 225: {region: 0x134, script: 0x52, flags: 0x0},
+ 226: {region: 0x48, script: 0x52, flags: 0x0},
+ 227: {region: 0x134, script: 0x1a, flags: 0x0},
+ 228: {region: 0xa5, script: 0x5, flags: 0x0},
+ 229: {region: 0x13d, script: 0x19, flags: 0x0},
+ 230: {region: 0x164, script: 0x52, flags: 0x0},
+ 231: {region: 0x9a, script: 0x5, flags: 0x0},
+ 232: {region: 0x164, script: 0x52, flags: 0x0},
+ 233: {region: 0x164, script: 0x52, flags: 0x0},
+ 234: {region: 0x164, script: 0x52, flags: 0x0},
+ 235: {region: 0x164, script: 0x52, flags: 0x0},
+ 236: {region: 0x164, script: 0x52, flags: 0x0},
+ 237: {region: 0x77, script: 0x52, flags: 0x0},
+ 238: {region: 0x6a, script: 0x1c, flags: 0x0},
+ 239: {region: 0xe6, script: 0x52, flags: 0x0},
+ 240: {region: 0x48, script: 0x17, flags: 0x0},
+ 241: {region: 0x48, script: 0x17, flags: 0x0},
+ 242: {region: 0x48, script: 0x17, flags: 0x0},
+ 243: {region: 0x48, script: 0x17, flags: 0x0},
+ 244: {region: 0x48, script: 0x17, flags: 0x0},
+ 245: {region: 0x109, script: 0x52, flags: 0x0},
+ 246: {region: 0x5d, script: 0x52, flags: 0x0},
+ 247: {region: 0xe8, script: 0x52, flags: 0x0},
+ 248: {region: 0x48, script: 0x17, flags: 0x0},
+ 249: {region: 0xc3, script: 0x79, flags: 0x0},
+ 250: {region: 0xa, script: 0x2, flags: 0x1},
+ 251: {region: 0x105, script: 0x1e, flags: 0x0},
+ 252: {region: 0x7a, script: 0x52, flags: 0x0},
+ 253: {region: 0x62, script: 0x52, flags: 0x0},
+ 254: {region: 0x164, script: 0x52, flags: 0x0},
+ 255: {region: 0x164, script: 0x52, flags: 0x0},
+ 256: {region: 0x164, script: 0x52, flags: 0x0},
+ 257: {region: 0x164, script: 0x52, flags: 0x0},
+ 258: {region: 0x134, script: 0x52, flags: 0x0},
+ 259: {region: 0x105, script: 0x1e, flags: 0x0},
+ 260: {region: 0xa3, script: 0x52, flags: 0x0},
+ 261: {region: 0x164, script: 0x52, flags: 0x0},
+ 262: {region: 0x164, script: 0x52, flags: 0x0},
+ 263: {region: 0x98, script: 0x5, flags: 0x0},
+ 264: {region: 0x164, script: 0x52, flags: 0x0},
+ 265: {region: 0x5f, script: 0x52, flags: 0x0},
+ 266: {region: 0x164, script: 0x52, flags: 0x0},
+ 267: {region: 0x48, script: 0x52, flags: 0x0},
+ 268: {region: 0x164, script: 0x52, flags: 0x0},
+ 269: {region: 0x164, script: 0x52, flags: 0x0},
+ 270: {region: 0x164, script: 0x52, flags: 0x0},
+ 271: {region: 0x164, script: 0x5, flags: 0x0},
+ 272: {region: 0x48, script: 0x52, flags: 0x0},
+ 273: {region: 0x164, script: 0x52, flags: 0x0},
+ 274: {region: 0x164, script: 0x52, flags: 0x0},
+ 275: {region: 0xd3, script: 0x52, flags: 0x0},
+ 276: {region: 0x4e, script: 0x52, flags: 0x0},
+ 277: {region: 0x164, script: 0x52, flags: 0x0},
+ 278: {region: 0x98, script: 0x5, flags: 0x0},
+ 279: {region: 0x164, script: 0x52, flags: 0x0},
+ 280: {region: 0x164, script: 0x52, flags: 0x0},
+ 281: {region: 0x164, script: 0x52, flags: 0x0},
+ 282: {region: 0x164, script: 0x27, flags: 0x0},
+ 283: {region: 0x5f, script: 0x52, flags: 0x0},
+ 284: {region: 0xc2, script: 0x52, flags: 0x0},
+ 285: {region: 0xcf, script: 0x52, flags: 0x0},
+ 286: {region: 0x164, script: 0x52, flags: 0x0},
+ 287: {region: 0xda, script: 0x20, flags: 0x0},
+ 288: {region: 0x51, script: 0x52, flags: 0x0},
+ 289: {region: 0x164, script: 0x52, flags: 0x0},
+ 290: {region: 0x164, script: 0x52, flags: 0x0},
+ 291: {region: 0x164, script: 0x52, flags: 0x0},
+ 292: {region: 0xcc, script: 0xd4, flags: 0x0},
+ 293: {region: 0x164, script: 0x52, flags: 0x0},
+ 294: {region: 0x164, script: 0x52, flags: 0x0},
+ 295: {region: 0x113, script: 0x52, flags: 0x0},
+ 296: {region: 0x36, script: 0x52, flags: 0x0},
+ 297: {region: 0x42, script: 0xd6, flags: 0x0},
+ 298: {region: 0x164, script: 0x52, flags: 0x0},
+ 299: {region: 0xa3, script: 0x52, flags: 0x0},
+ 300: {region: 0x7f, script: 0x52, flags: 0x0},
+ 301: {region: 0xd5, script: 0x52, flags: 0x0},
+ 302: {region: 0x9d, script: 0x52, flags: 0x0},
+ 303: {region: 0x6a, script: 0x25, flags: 0x0},
+ 304: {region: 0xc3, script: 0x43, flags: 0x0},
+ 305: {region: 0x86, script: 0x2d, flags: 0x0},
+ 306: {region: 0x164, script: 0x52, flags: 0x0},
+ 307: {region: 0x164, script: 0x52, flags: 0x0},
+ 308: {region: 0xc, script: 0x2, flags: 0x1},
+ 309: {region: 0x164, script: 0x52, flags: 0x0},
+ 310: {region: 0x164, script: 0x52, flags: 0x0},
+ 311: {region: 0x1, script: 0x52, flags: 0x0},
+ 312: {region: 0x164, script: 0x52, flags: 0x0},
+ 313: {region: 0x6d, script: 0x52, flags: 0x0},
+ 314: {region: 0x134, script: 0x52, flags: 0x0},
+ 315: {region: 0x69, script: 0x52, flags: 0x0},
+ 316: {region: 0x164, script: 0x52, flags: 0x0},
+ 317: {region: 0x9d, script: 0x3e, flags: 0x0},
+ 318: {region: 0x164, script: 0x52, flags: 0x0},
+ 319: {region: 0x164, script: 0x52, flags: 0x0},
+ 320: {region: 0x6d, script: 0x52, flags: 0x0},
+ 321: {region: 0x51, script: 0x52, flags: 0x0},
+ 322: {region: 0x6d, script: 0x52, flags: 0x0},
+ 323: {region: 0x9b, script: 0x5, flags: 0x0},
+ 324: {region: 0x164, script: 0x52, flags: 0x0},
+ 325: {region: 0x164, script: 0x52, flags: 0x0},
+ 326: {region: 0x164, script: 0x52, flags: 0x0},
+ 327: {region: 0x164, script: 0x52, flags: 0x0},
+ 328: {region: 0x85, script: 0x52, flags: 0x0},
+ 329: {region: 0xe, script: 0x2, flags: 0x1},
+ 330: {region: 0x164, script: 0x52, flags: 0x0},
+ 331: {region: 0xc2, script: 0x52, flags: 0x0},
+ 332: {region: 0x71, script: 0x52, flags: 0x0},
+ 333: {region: 0x10a, script: 0x5, flags: 0x0},
+ 334: {region: 0xe6, script: 0x52, flags: 0x0},
+ 335: {region: 0x10b, script: 0x52, flags: 0x0},
+ 336: {region: 0x72, script: 0x52, flags: 0x0},
+ 337: {region: 0x164, script: 0x52, flags: 0x0},
+ 338: {region: 0x164, script: 0x52, flags: 0x0},
+ 339: {region: 0x75, script: 0x52, flags: 0x0},
+ 340: {region: 0x164, script: 0x52, flags: 0x0},
+ 341: {region: 0x3a, script: 0x52, flags: 0x0},
+ 342: {region: 0x164, script: 0x52, flags: 0x0},
+ 343: {region: 0x164, script: 0x52, flags: 0x0},
+ 344: {region: 0x164, script: 0x52, flags: 0x0},
+ 345: {region: 0x77, script: 0x52, flags: 0x0},
+ 346: {region: 0x134, script: 0x52, flags: 0x0},
+ 347: {region: 0x77, script: 0x52, flags: 0x0},
+ 348: {region: 0x5f, script: 0x52, flags: 0x0},
+ 349: {region: 0x5f, script: 0x52, flags: 0x0},
+ 350: {region: 0x51, script: 0x5, flags: 0x0},
+ 351: {region: 0x13f, script: 0x52, flags: 0x0},
+ 352: {region: 0x164, script: 0x52, flags: 0x0},
+ 353: {region: 0x83, script: 0x52, flags: 0x0},
+ 354: {region: 0x164, script: 0x52, flags: 0x0},
+ 355: {region: 0xd3, script: 0x52, flags: 0x0},
+ 356: {region: 0x9d, script: 0x52, flags: 0x0},
+ 357: {region: 0xd5, script: 0x52, flags: 0x0},
+ 358: {region: 0x164, script: 0x52, flags: 0x0},
+ 359: {region: 0x10a, script: 0x52, flags: 0x0},
+ 360: {region: 0xd8, script: 0x52, flags: 0x0},
+ 361: {region: 0x95, script: 0x52, flags: 0x0},
+ 362: {region: 0x7f, script: 0x52, flags: 0x0},
+ 363: {region: 0x164, script: 0x52, flags: 0x0},
+ 364: {region: 0xbb, script: 0x52, flags: 0x0},
+ 365: {region: 0x164, script: 0x52, flags: 0x0},
+ 366: {region: 0x164, script: 0x52, flags: 0x0},
+ 367: {region: 0x164, script: 0x52, flags: 0x0},
+ 368: {region: 0x52, script: 0x34, flags: 0x0},
+ 369: {region: 0x164, script: 0x52, flags: 0x0},
+ 370: {region: 0x94, script: 0x52, flags: 0x0},
+ 371: {region: 0x164, script: 0x52, flags: 0x0},
+ 372: {region: 0x98, script: 0x20, flags: 0x0},
+ 373: {region: 0x164, script: 0x52, flags: 0x0},
+ 374: {region: 0x9b, script: 0x5, flags: 0x0},
+ 375: {region: 0x7d, script: 0x52, flags: 0x0},
+ 376: {region: 0x7a, script: 0x52, flags: 0x0},
+ 377: {region: 0x164, script: 0x52, flags: 0x0},
+ 378: {region: 0x164, script: 0x52, flags: 0x0},
+ 379: {region: 0x164, script: 0x52, flags: 0x0},
+ 380: {region: 0x164, script: 0x52, flags: 0x0},
+ 381: {region: 0x164, script: 0x52, flags: 0x0},
+ 382: {region: 0x164, script: 0x52, flags: 0x0},
+ 383: {region: 0x6e, script: 0x27, flags: 0x0},
+ 384: {region: 0x164, script: 0x52, flags: 0x0},
+ 385: {region: 0xda, script: 0x20, flags: 0x0},
+ 386: {region: 0x164, script: 0x52, flags: 0x0},
+ 387: {region: 0xa6, script: 0x52, flags: 0x0},
+ 388: {region: 0x164, script: 0x52, flags: 0x0},
+ 389: {region: 0xe7, script: 0x5, flags: 0x0},
+ 390: {region: 0x164, script: 0x52, flags: 0x0},
+ 391: {region: 0xe7, script: 0x5, flags: 0x0},
+ 392: {region: 0x164, script: 0x52, flags: 0x0},
+ 393: {region: 0x164, script: 0x52, flags: 0x0},
+ 394: {region: 0x6d, script: 0x52, flags: 0x0},
+ 395: {region: 0x9b, script: 0x5, flags: 0x0},
+ 396: {region: 0x164, script: 0x52, flags: 0x0},
+ 397: {region: 0x164, script: 0x27, flags: 0x0},
+ 398: {region: 0xf0, script: 0x52, flags: 0x0},
+ 399: {region: 0x164, script: 0x52, flags: 0x0},
+ 400: {region: 0x164, script: 0x52, flags: 0x0},
+ 401: {region: 0x164, script: 0x52, flags: 0x0},
+ 402: {region: 0x164, script: 0x27, flags: 0x0},
+ 403: {region: 0x164, script: 0x52, flags: 0x0},
+ 404: {region: 0x98, script: 0x20, flags: 0x0},
+ 405: {region: 0x98, script: 0xd0, flags: 0x0},
+ 406: {region: 0x94, script: 0x52, flags: 0x0},
+ 407: {region: 0xd8, script: 0x52, flags: 0x0},
+ 408: {region: 0x12f, script: 0x2b, flags: 0x0},
+ 409: {region: 0x10, script: 0x2, flags: 0x1},
+ 410: {region: 0x98, script: 0xe, flags: 0x0},
+ 411: {region: 0x164, script: 0x52, flags: 0x0},
+ 412: {region: 0x4d, script: 0x52, flags: 0x0},
+ 413: {region: 0x98, script: 0x2e, flags: 0x0},
+ 414: {region: 0x40, script: 0x52, flags: 0x0},
+ 415: {region: 0x53, script: 0x52, flags: 0x0},
+ 416: {region: 0x164, script: 0x52, flags: 0x0},
+ 417: {region: 0x7f, script: 0x52, flags: 0x0},
+ 418: {region: 0x164, script: 0x52, flags: 0x0},
+ 419: {region: 0x164, script: 0x52, flags: 0x0},
+ 420: {region: 0xa3, script: 0x52, flags: 0x0},
+ 421: {region: 0x97, script: 0x52, flags: 0x0},
+ 422: {region: 0x164, script: 0x52, flags: 0x0},
+ 423: {region: 0xda, script: 0x20, flags: 0x0},
+ 424: {region: 0x164, script: 0x52, flags: 0x0},
+ 425: {region: 0x164, script: 0x5, flags: 0x0},
+ 426: {region: 0x48, script: 0x52, flags: 0x0},
+ 427: {region: 0x164, script: 0x5, flags: 0x0},
+ 428: {region: 0x164, script: 0x52, flags: 0x0},
+ 429: {region: 0x12, script: 0x3, flags: 0x1},
+ 430: {region: 0x164, script: 0x52, flags: 0x0},
+ 431: {region: 0x52, script: 0x34, flags: 0x0},
+ 432: {region: 0x164, script: 0x52, flags: 0x0},
+ 433: {region: 0x134, script: 0x52, flags: 0x0},
+ 434: {region: 0x23, script: 0x5, flags: 0x0},
+ 435: {region: 0x164, script: 0x52, flags: 0x0},
+ 436: {region: 0x164, script: 0x27, flags: 0x0},
+ 437: {region: 0x96, script: 0x37, flags: 0x0},
+ 438: {region: 0x164, script: 0x52, flags: 0x0},
+ 439: {region: 0x98, script: 0x20, flags: 0x0},
+ 440: {region: 0x164, script: 0x52, flags: 0x0},
+ 441: {region: 0x72, script: 0x52, flags: 0x0},
+ 442: {region: 0x164, script: 0x52, flags: 0x0},
+ 443: {region: 0x164, script: 0x52, flags: 0x0},
+ 444: {region: 0xe6, script: 0x52, flags: 0x0},
+ 445: {region: 0x164, script: 0x52, flags: 0x0},
+ 446: {region: 0x12a, script: 0x39, flags: 0x0},
+ 447: {region: 0x52, script: 0x81, flags: 0x0},
+ 448: {region: 0x164, script: 0x52, flags: 0x0},
+ 449: {region: 0xe7, script: 0x5, flags: 0x0},
+ 450: {region: 0x98, script: 0x20, flags: 0x0},
+ 451: {region: 0xae, script: 0x3a, flags: 0x0},
+ 452: {region: 0xe6, script: 0x52, flags: 0x0},
+ 453: {region: 0xe7, script: 0x5, flags: 0x0},
+ 454: {region: 0xe5, script: 0x52, flags: 0x0},
+ 455: {region: 0x98, script: 0x20, flags: 0x0},
+ 456: {region: 0x98, script: 0x20, flags: 0x0},
+ 457: {region: 0x164, script: 0x52, flags: 0x0},
+ 458: {region: 0x8f, script: 0x52, flags: 0x0},
+ 459: {region: 0x5f, script: 0x52, flags: 0x0},
+ 460: {region: 0x52, script: 0x34, flags: 0x0},
+ 461: {region: 0x90, script: 0x52, flags: 0x0},
+ 462: {region: 0x91, script: 0x52, flags: 0x0},
+ 463: {region: 0x164, script: 0x52, flags: 0x0},
+ 464: {region: 0x27, script: 0x8, flags: 0x0},
+ 465: {region: 0xd1, script: 0x52, flags: 0x0},
+ 466: {region: 0x77, script: 0x52, flags: 0x0},
+ 467: {region: 0x164, script: 0x52, flags: 0x0},
+ 468: {region: 0x164, script: 0x52, flags: 0x0},
+ 469: {region: 0xcf, script: 0x52, flags: 0x0},
+ 470: {region: 0xd5, script: 0x52, flags: 0x0},
+ 471: {region: 0x164, script: 0x52, flags: 0x0},
+ 472: {region: 0x164, script: 0x52, flags: 0x0},
+ 473: {region: 0x164, script: 0x52, flags: 0x0},
+ 474: {region: 0x94, script: 0x52, flags: 0x0},
+ 475: {region: 0x164, script: 0x52, flags: 0x0},
+ 476: {region: 0x164, script: 0x52, flags: 0x0},
+ 477: {region: 0x164, script: 0x52, flags: 0x0},
+ 479: {region: 0xd5, script: 0x52, flags: 0x0},
+ 480: {region: 0x164, script: 0x52, flags: 0x0},
+ 481: {region: 0x164, script: 0x52, flags: 0x0},
+ 482: {region: 0x52, script: 0xdf, flags: 0x0},
+ 483: {region: 0x164, script: 0x52, flags: 0x0},
+ 484: {region: 0x134, script: 0x52, flags: 0x0},
+ 485: {region: 0x164, script: 0x52, flags: 0x0},
+ 486: {region: 0x48, script: 0x52, flags: 0x0},
+ 487: {region: 0x164, script: 0x52, flags: 0x0},
+ 488: {region: 0x164, script: 0x52, flags: 0x0},
+ 489: {region: 0xe6, script: 0x52, flags: 0x0},
+ 490: {region: 0x164, script: 0x52, flags: 0x0},
+ 491: {region: 0x94, script: 0x52, flags: 0x0},
+ 492: {region: 0x105, script: 0x1e, flags: 0x0},
+ 494: {region: 0x164, script: 0x52, flags: 0x0},
+ 495: {region: 0x164, script: 0x52, flags: 0x0},
+ 496: {region: 0x9c, script: 0x52, flags: 0x0},
+ 497: {region: 0x9d, script: 0x52, flags: 0x0},
+ 498: {region: 0x48, script: 0x17, flags: 0x0},
+ 499: {region: 0x96, script: 0x37, flags: 0x0},
+ 500: {region: 0x164, script: 0x52, flags: 0x0},
+ 501: {region: 0x164, script: 0x52, flags: 0x0},
+ 502: {region: 0x105, script: 0x52, flags: 0x0},
+ 503: {region: 0x164, script: 0x52, flags: 0x0},
+ 504: {region: 0xa1, script: 0x41, flags: 0x0},
+ 505: {region: 0x164, script: 0x52, flags: 0x0},
+ 506: {region: 0x9f, script: 0x52, flags: 0x0},
+ 508: {region: 0x164, script: 0x52, flags: 0x0},
+ 509: {region: 0x164, script: 0x52, flags: 0x0},
+ 510: {region: 0x164, script: 0x52, flags: 0x0},
+ 511: {region: 0x51, script: 0x52, flags: 0x0},
+ 512: {region: 0x12f, script: 0x37, flags: 0x0},
+ 513: {region: 0x164, script: 0x52, flags: 0x0},
+ 514: {region: 0x12e, script: 0x52, flags: 0x0},
+ 515: {region: 0xda, script: 0x20, flags: 0x0},
+ 516: {region: 0x164, script: 0x52, flags: 0x0},
+ 517: {region: 0x62, script: 0x52, flags: 0x0},
+ 518: {region: 0x94, script: 0x52, flags: 0x0},
+ 519: {region: 0x94, script: 0x52, flags: 0x0},
+ 520: {region: 0x7c, script: 0x29, flags: 0x0},
+ 521: {region: 0x136, script: 0x1e, flags: 0x0},
+ 522: {region: 0x66, script: 0x52, flags: 0x0},
+ 523: {region: 0xc3, script: 0x52, flags: 0x0},
+ 524: {region: 0x164, script: 0x52, flags: 0x0},
+ 525: {region: 0x164, script: 0x52, flags: 0x0},
+ 526: {region: 0xd5, script: 0x52, flags: 0x0},
+ 527: {region: 0xa3, script: 0x52, flags: 0x0},
+ 528: {region: 0xc2, script: 0x52, flags: 0x0},
+ 529: {region: 0x105, script: 0x1e, flags: 0x0},
+ 530: {region: 0x164, script: 0x52, flags: 0x0},
+ 531: {region: 0x164, script: 0x52, flags: 0x0},
+ 532: {region: 0x164, script: 0x52, flags: 0x0},
+ 533: {region: 0x164, script: 0x52, flags: 0x0},
+ 534: {region: 0xd3, script: 0x5, flags: 0x0},
+ 535: {region: 0xd5, script: 0x52, flags: 0x0},
+ 536: {region: 0x163, script: 0x52, flags: 0x0},
+ 537: {region: 0x164, script: 0x52, flags: 0x0},
+ 538: {region: 0x164, script: 0x52, flags: 0x0},
+ 539: {region: 0x12e, script: 0x52, flags: 0x0},
+ 540: {region: 0x121, script: 0x5, flags: 0x0},
+ 541: {region: 0x164, script: 0x52, flags: 0x0},
+ 542: {region: 0x122, script: 0xd5, flags: 0x0},
+ 543: {region: 0x59, script: 0x52, flags: 0x0},
+ 544: {region: 0x51, script: 0x52, flags: 0x0},
+ 545: {region: 0x164, script: 0x52, flags: 0x0},
+ 546: {region: 0x4e, script: 0x52, flags: 0x0},
+ 547: {region: 0x98, script: 0x20, flags: 0x0},
+ 548: {region: 0x98, script: 0x20, flags: 0x0},
+ 549: {region: 0x4a, script: 0x52, flags: 0x0},
+ 550: {region: 0x94, script: 0x52, flags: 0x0},
+ 551: {region: 0x164, script: 0x52, flags: 0x0},
+ 552: {region: 0x40, script: 0x52, flags: 0x0},
+ 553: {region: 0x98, script: 0x52, flags: 0x0},
+ 554: {region: 0x52, script: 0xcc, flags: 0x0},
+ 555: {region: 0x98, script: 0x20, flags: 0x0},
+ 556: {region: 0xc2, script: 0x52, flags: 0x0},
+ 557: {region: 0x164, script: 0x52, flags: 0x0},
+ 558: {region: 0x98, script: 0x6b, flags: 0x0},
+ 559: {region: 0xe7, script: 0x5, flags: 0x0},
+ 560: {region: 0x164, script: 0x52, flags: 0x0},
+ 561: {region: 0xa3, script: 0x52, flags: 0x0},
+ 562: {region: 0x164, script: 0x52, flags: 0x0},
+ 563: {region: 0x12a, script: 0x52, flags: 0x0},
+ 564: {region: 0x164, script: 0x52, flags: 0x0},
+ 565: {region: 0xd1, script: 0x52, flags: 0x0},
+ 566: {region: 0x164, script: 0x52, flags: 0x0},
+ 567: {region: 0xae, script: 0x4f, flags: 0x0},
+ 568: {region: 0x164, script: 0x52, flags: 0x0},
+ 569: {region: 0x164, script: 0x52, flags: 0x0},
+ 570: {region: 0x15, script: 0x6, flags: 0x1},
+ 571: {region: 0x164, script: 0x52, flags: 0x0},
+ 572: {region: 0x51, script: 0x52, flags: 0x0},
+ 573: {region: 0x81, script: 0x52, flags: 0x0},
+ 574: {region: 0xa3, script: 0x52, flags: 0x0},
+ 575: {region: 0x164, script: 0x52, flags: 0x0},
+ 576: {region: 0x164, script: 0x52, flags: 0x0},
+ 577: {region: 0x164, script: 0x52, flags: 0x0},
+ 578: {region: 0xa5, script: 0x46, flags: 0x0},
+ 579: {region: 0x29, script: 0x52, flags: 0x0},
+ 580: {region: 0x164, script: 0x52, flags: 0x0},
+ 581: {region: 0x164, script: 0x52, flags: 0x0},
+ 582: {region: 0x164, script: 0x52, flags: 0x0},
+ 583: {region: 0x164, script: 0x52, flags: 0x0},
+ 584: {region: 0x164, script: 0x52, flags: 0x0},
+ 585: {region: 0x98, script: 0x4a, flags: 0x0},
+ 586: {region: 0x164, script: 0x52, flags: 0x0},
+ 587: {region: 0xaa, script: 0x4b, flags: 0x0},
+ 588: {region: 0x105, script: 0x1e, flags: 0x0},
+ 589: {region: 0x98, script: 0x20, flags: 0x0},
+ 590: {region: 0x164, script: 0x52, flags: 0x0},
+ 591: {region: 0x74, script: 0x52, flags: 0x0},
+ 592: {region: 0x164, script: 0x52, flags: 0x0},
+ 593: {region: 0xb3, script: 0x52, flags: 0x0},
+ 594: {region: 0x164, script: 0x52, flags: 0x0},
+ 595: {region: 0x164, script: 0x52, flags: 0x0},
+ 596: {region: 0x164, script: 0x52, flags: 0x0},
+ 597: {region: 0x164, script: 0x52, flags: 0x0},
+ 598: {region: 0x164, script: 0x52, flags: 0x0},
+ 599: {region: 0x164, script: 0x52, flags: 0x0},
+ 600: {region: 0x164, script: 0x52, flags: 0x0},
+ 601: {region: 0x164, script: 0x27, flags: 0x0},
+ 603: {region: 0x105, script: 0x1e, flags: 0x0},
+ 604: {region: 0x111, script: 0x52, flags: 0x0},
+ 605: {region: 0xe6, script: 0x52, flags: 0x0},
+ 606: {region: 0x105, script: 0x52, flags: 0x0},
+ 607: {region: 0x164, script: 0x52, flags: 0x0},
+ 608: {region: 0x98, script: 0x20, flags: 0x0},
+ 609: {region: 0x98, script: 0x5, flags: 0x0},
+ 610: {region: 0x12e, script: 0x52, flags: 0x0},
+ 611: {region: 0x164, script: 0x52, flags: 0x0},
+ 612: {region: 0x51, script: 0x52, flags: 0x0},
+ 613: {region: 0x5f, script: 0x52, flags: 0x0},
+ 614: {region: 0x164, script: 0x52, flags: 0x0},
+ 615: {region: 0x164, script: 0x52, flags: 0x0},
+ 616: {region: 0x164, script: 0x27, flags: 0x0},
+ 617: {region: 0x164, script: 0x52, flags: 0x0},
+ 618: {region: 0x164, script: 0x52, flags: 0x0},
+ 619: {region: 0x1b, script: 0x3, flags: 0x1},
+ 620: {region: 0x164, script: 0x52, flags: 0x0},
+ 621: {region: 0x164, script: 0x52, flags: 0x0},
+ 622: {region: 0x164, script: 0x52, flags: 0x0},
+ 623: {region: 0x164, script: 0x52, flags: 0x0},
+ 624: {region: 0x105, script: 0x1e, flags: 0x0},
+ 625: {region: 0x164, script: 0x52, flags: 0x0},
+ 626: {region: 0x164, script: 0x52, flags: 0x0},
+ 627: {region: 0x164, script: 0x52, flags: 0x0},
+ 628: {region: 0x105, script: 0x1e, flags: 0x0},
+ 629: {region: 0x164, script: 0x52, flags: 0x0},
+ 630: {region: 0x94, script: 0x52, flags: 0x0},
+ 631: {region: 0xe7, script: 0x5, flags: 0x0},
+ 632: {region: 0x7a, script: 0x52, flags: 0x0},
+ 633: {region: 0x164, script: 0x52, flags: 0x0},
+ 634: {region: 0x164, script: 0x52, flags: 0x0},
+ 635: {region: 0x164, script: 0x52, flags: 0x0},
+ 636: {region: 0x164, script: 0x27, flags: 0x0},
+ 637: {region: 0x122, script: 0xd5, flags: 0x0},
+ 638: {region: 0xe7, script: 0x5, flags: 0x0},
+ 639: {region: 0x164, script: 0x52, flags: 0x0},
+ 640: {region: 0x164, script: 0x52, flags: 0x0},
+ 641: {region: 0x1e, script: 0x5, flags: 0x1},
+ 642: {region: 0x164, script: 0x52, flags: 0x0},
+ 643: {region: 0x164, script: 0x52, flags: 0x0},
+ 644: {region: 0x164, script: 0x52, flags: 0x0},
+ 645: {region: 0x137, script: 0x52, flags: 0x0},
+ 646: {region: 0x86, script: 0x56, flags: 0x0},
+ 647: {region: 0x96, script: 0x37, flags: 0x0},
+ 648: {region: 0x12e, script: 0x52, flags: 0x0},
+ 649: {region: 0xe7, script: 0x5, flags: 0x0},
+ 650: {region: 0x130, script: 0x52, flags: 0x0},
+ 651: {region: 0x164, script: 0x52, flags: 0x0},
+ 652: {region: 0xb6, script: 0x52, flags: 0x0},
+ 653: {region: 0x105, script: 0x1e, flags: 0x0},
+ 654: {region: 0x164, script: 0x52, flags: 0x0},
+ 655: {region: 0x94, script: 0x52, flags: 0x0},
+ 656: {region: 0x164, script: 0x52, flags: 0x0},
+ 657: {region: 0x52, script: 0xd5, flags: 0x0},
+ 658: {region: 0x164, script: 0x52, flags: 0x0},
+ 659: {region: 0x164, script: 0x52, flags: 0x0},
+ 660: {region: 0x164, script: 0x52, flags: 0x0},
+ 661: {region: 0x164, script: 0x52, flags: 0x0},
+ 662: {region: 0x98, script: 0x54, flags: 0x0},
+ 663: {region: 0x164, script: 0x52, flags: 0x0},
+ 664: {region: 0x164, script: 0x52, flags: 0x0},
+ 665: {region: 0x105, script: 0x1e, flags: 0x0},
+ 666: {region: 0x130, script: 0x52, flags: 0x0},
+ 667: {region: 0x164, script: 0x52, flags: 0x0},
+ 668: {region: 0xd8, script: 0x52, flags: 0x0},
+ 669: {region: 0x164, script: 0x52, flags: 0x0},
+ 670: {region: 0x164, script: 0x52, flags: 0x0},
+ 671: {region: 0x23, script: 0x2, flags: 0x1},
+ 672: {region: 0x164, script: 0x52, flags: 0x0},
+ 673: {region: 0x164, script: 0x52, flags: 0x0},
+ 674: {region: 0x9d, script: 0x52, flags: 0x0},
+ 675: {region: 0x52, script: 0x58, flags: 0x0},
+ 676: {region: 0x94, script: 0x52, flags: 0x0},
+ 677: {region: 0x9b, script: 0x5, flags: 0x0},
+ 678: {region: 0x134, script: 0x52, flags: 0x0},
+ 679: {region: 0x164, script: 0x52, flags: 0x0},
+ 680: {region: 0x164, script: 0x52, flags: 0x0},
+ 681: {region: 0x98, script: 0xd0, flags: 0x0},
+ 682: {region: 0x9d, script: 0x52, flags: 0x0},
+ 683: {region: 0x164, script: 0x52, flags: 0x0},
+ 684: {region: 0x4a, script: 0x52, flags: 0x0},
+ 685: {region: 0x164, script: 0x52, flags: 0x0},
+ 686: {region: 0x164, script: 0x52, flags: 0x0},
+ 687: {region: 0xae, script: 0x4f, flags: 0x0},
+ 688: {region: 0x164, script: 0x52, flags: 0x0},
+ 689: {region: 0x164, script: 0x52, flags: 0x0},
+ 690: {region: 0x4a, script: 0x52, flags: 0x0},
+ 691: {region: 0x164, script: 0x52, flags: 0x0},
+ 692: {region: 0x164, script: 0x52, flags: 0x0},
+ 693: {region: 0x161, script: 0x52, flags: 0x0},
+ 694: {region: 0x9b, script: 0x5, flags: 0x0},
+ 695: {region: 0xb5, script: 0x52, flags: 0x0},
+ 696: {region: 0xb7, script: 0x52, flags: 0x0},
+ 697: {region: 0x4a, script: 0x52, flags: 0x0},
+ 698: {region: 0x4a, script: 0x52, flags: 0x0},
+ 699: {region: 0xa3, script: 0x52, flags: 0x0},
+ 700: {region: 0xa3, script: 0x52, flags: 0x0},
+ 701: {region: 0x9b, script: 0x5, flags: 0x0},
+ 702: {region: 0xb7, script: 0x52, flags: 0x0},
+ 703: {region: 0x122, script: 0xd5, flags: 0x0},
+ 704: {region: 0x52, script: 0x34, flags: 0x0},
+ 705: {region: 0x12a, script: 0x52, flags: 0x0},
+ 706: {region: 0x94, script: 0x52, flags: 0x0},
+ 707: {region: 0x51, script: 0x52, flags: 0x0},
+ 708: {region: 0x98, script: 0x20, flags: 0x0},
+ 709: {region: 0x98, script: 0x20, flags: 0x0},
+ 710: {region: 0x94, script: 0x52, flags: 0x0},
+ 711: {region: 0x25, script: 0x3, flags: 0x1},
+ 712: {region: 0xa3, script: 0x52, flags: 0x0},
+ 713: {region: 0x164, script: 0x52, flags: 0x0},
+ 714: {region: 0xce, script: 0x52, flags: 0x0},
+ 715: {region: 0x164, script: 0x52, flags: 0x0},
+ 716: {region: 0x164, script: 0x52, flags: 0x0},
+ 717: {region: 0x164, script: 0x52, flags: 0x0},
+ 718: {region: 0x164, script: 0x52, flags: 0x0},
+ 719: {region: 0x164, script: 0x52, flags: 0x0},
+ 720: {region: 0x164, script: 0x52, flags: 0x0},
+ 721: {region: 0x164, script: 0x52, flags: 0x0},
+ 722: {region: 0x164, script: 0x52, flags: 0x0},
+ 723: {region: 0x164, script: 0x52, flags: 0x0},
+ 724: {region: 0x164, script: 0x52, flags: 0x0},
+ 725: {region: 0x164, script: 0x52, flags: 0x0},
+ 726: {region: 0x164, script: 0x5, flags: 0x0},
+ 727: {region: 0x105, script: 0x1e, flags: 0x0},
+ 728: {region: 0xe6, script: 0x52, flags: 0x0},
+ 729: {region: 0x164, script: 0x52, flags: 0x0},
+ 730: {region: 0x94, script: 0x52, flags: 0x0},
+ 731: {region: 0x164, script: 0x27, flags: 0x0},
+ 732: {region: 0x164, script: 0x52, flags: 0x0},
+ 733: {region: 0x164, script: 0x52, flags: 0x0},
+ 734: {region: 0x164, script: 0x52, flags: 0x0},
+ 735: {region: 0x111, script: 0x52, flags: 0x0},
+ 736: {region: 0xa3, script: 0x52, flags: 0x0},
+ 737: {region: 0x164, script: 0x52, flags: 0x0},
+ 738: {region: 0x164, script: 0x52, flags: 0x0},
+ 739: {region: 0x122, script: 0x5, flags: 0x0},
+ 740: {region: 0xcb, script: 0x52, flags: 0x0},
+ 741: {region: 0x164, script: 0x52, flags: 0x0},
+ 742: {region: 0x164, script: 0x52, flags: 0x0},
+ 743: {region: 0x164, script: 0x52, flags: 0x0},
+ 744: {region: 0xbe, script: 0x52, flags: 0x0},
+ 745: {region: 0xd0, script: 0x52, flags: 0x0},
+ 746: {region: 0x164, script: 0x52, flags: 0x0},
+ 747: {region: 0x51, script: 0x52, flags: 0x0},
+ 748: {region: 0xda, script: 0x20, flags: 0x0},
+ 749: {region: 0x12e, script: 0x52, flags: 0x0},
+ 750: {region: 0xbf, script: 0x52, flags: 0x0},
+ 751: {region: 0x164, script: 0x52, flags: 0x0},
+ 752: {region: 0x164, script: 0x52, flags: 0x0},
+ 753: {region: 0xdf, script: 0x52, flags: 0x0},
+ 754: {region: 0x164, script: 0x52, flags: 0x0},
+ 755: {region: 0x94, script: 0x52, flags: 0x0},
+ 756: {region: 0x9a, script: 0x36, flags: 0x0},
+ 757: {region: 0x164, script: 0x52, flags: 0x0},
+ 758: {region: 0xc1, script: 0x1e, flags: 0x0},
+ 759: {region: 0x164, script: 0x5, flags: 0x0},
+ 760: {region: 0x164, script: 0x52, flags: 0x0},
+ 761: {region: 0x164, script: 0x52, flags: 0x0},
+ 762: {region: 0x164, script: 0x52, flags: 0x0},
+ 763: {region: 0x98, script: 0x64, flags: 0x0},
+ 764: {region: 0x164, script: 0x52, flags: 0x0},
+ 765: {region: 0x164, script: 0x52, flags: 0x0},
+ 766: {region: 0x10a, script: 0x52, flags: 0x0},
+ 767: {region: 0x164, script: 0x52, flags: 0x0},
+ 768: {region: 0x164, script: 0x52, flags: 0x0},
+ 769: {region: 0x164, script: 0x52, flags: 0x0},
+ 770: {region: 0x28, script: 0x3, flags: 0x1},
+ 771: {region: 0x164, script: 0x52, flags: 0x0},
+ 772: {region: 0x164, script: 0x52, flags: 0x0},
+ 773: {region: 0x98, script: 0xe, flags: 0x0},
+ 774: {region: 0xc3, script: 0x6b, flags: 0x0},
+ 776: {region: 0x164, script: 0x52, flags: 0x0},
+ 777: {region: 0x48, script: 0x52, flags: 0x0},
+ 778: {region: 0x48, script: 0x52, flags: 0x0},
+ 779: {region: 0x36, script: 0x52, flags: 0x0},
+ 780: {region: 0x164, script: 0x52, flags: 0x0},
+ 781: {region: 0x164, script: 0x52, flags: 0x0},
+ 782: {region: 0x164, script: 0x52, flags: 0x0},
+ 783: {region: 0x164, script: 0x52, flags: 0x0},
+ 784: {region: 0x164, script: 0x52, flags: 0x0},
+ 785: {region: 0x164, script: 0x52, flags: 0x0},
+ 786: {region: 0x98, script: 0x20, flags: 0x0},
+ 787: {region: 0xda, script: 0x20, flags: 0x0},
+ 788: {region: 0x105, script: 0x1e, flags: 0x0},
+ 789: {region: 0x34, script: 0x68, flags: 0x0},
+ 790: {region: 0x2b, script: 0x3, flags: 0x1},
+ 791: {region: 0xca, script: 0x52, flags: 0x0},
+ 792: {region: 0x164, script: 0x52, flags: 0x0},
+ 793: {region: 0x164, script: 0x52, flags: 0x0},
+ 794: {region: 0x164, script: 0x52, flags: 0x0},
+ 795: {region: 0x98, script: 0x20, flags: 0x0},
+ 796: {region: 0x51, script: 0x52, flags: 0x0},
+ 798: {region: 0x164, script: 0x52, flags: 0x0},
+ 799: {region: 0x134, script: 0x52, flags: 0x0},
+ 800: {region: 0x164, script: 0x52, flags: 0x0},
+ 801: {region: 0x164, script: 0x52, flags: 0x0},
+ 802: {region: 0xe7, script: 0x5, flags: 0x0},
+ 803: {region: 0xc2, script: 0x52, flags: 0x0},
+ 804: {region: 0x98, script: 0x20, flags: 0x0},
+ 805: {region: 0x94, script: 0x52, flags: 0x0},
+ 806: {region: 0x163, script: 0x52, flags: 0x0},
+ 807: {region: 0x164, script: 0x52, flags: 0x0},
+ 808: {region: 0xc3, script: 0x6b, flags: 0x0},
+ 809: {region: 0x164, script: 0x52, flags: 0x0},
+ 810: {region: 0x164, script: 0x27, flags: 0x0},
+ 811: {region: 0x105, script: 0x1e, flags: 0x0},
+ 812: {region: 0x164, script: 0x52, flags: 0x0},
+ 813: {region: 0x130, script: 0x52, flags: 0x0},
+ 814: {region: 0x9b, script: 0x5d, flags: 0x0},
+ 815: {region: 0x164, script: 0x52, flags: 0x0},
+ 816: {region: 0x164, script: 0x52, flags: 0x0},
+ 817: {region: 0x9b, script: 0x5, flags: 0x0},
+ 818: {region: 0x164, script: 0x52, flags: 0x0},
+ 819: {region: 0x164, script: 0x52, flags: 0x0},
+ 820: {region: 0x164, script: 0x52, flags: 0x0},
+ 821: {region: 0xdc, script: 0x52, flags: 0x0},
+ 822: {region: 0x164, script: 0x52, flags: 0x0},
+ 823: {region: 0x164, script: 0x52, flags: 0x0},
+ 825: {region: 0x164, script: 0x52, flags: 0x0},
+ 826: {region: 0x52, script: 0x34, flags: 0x0},
+ 827: {region: 0x9d, script: 0x52, flags: 0x0},
+ 828: {region: 0xd1, script: 0x52, flags: 0x0},
+ 829: {region: 0x164, script: 0x52, flags: 0x0},
+ 830: {region: 0xd9, script: 0x52, flags: 0x0},
+ 831: {region: 0x164, script: 0x52, flags: 0x0},
+ 832: {region: 0x164, script: 0x52, flags: 0x0},
+ 833: {region: 0x164, script: 0x52, flags: 0x0},
+ 834: {region: 0xce, script: 0x52, flags: 0x0},
+ 835: {region: 0x164, script: 0x52, flags: 0x0},
+ 836: {region: 0x164, script: 0x52, flags: 0x0},
+ 837: {region: 0x163, script: 0x52, flags: 0x0},
+ 838: {region: 0xd0, script: 0x52, flags: 0x0},
+ 839: {region: 0x5f, script: 0x52, flags: 0x0},
+ 840: {region: 0xda, script: 0x20, flags: 0x0},
+ 841: {region: 0x164, script: 0x52, flags: 0x0},
+ 842: {region: 0xda, script: 0x20, flags: 0x0},
+ 843: {region: 0x164, script: 0x52, flags: 0x0},
+ 844: {region: 0x164, script: 0x52, flags: 0x0},
+ 845: {region: 0xd1, script: 0x52, flags: 0x0},
+ 846: {region: 0x164, script: 0x52, flags: 0x0},
+ 847: {region: 0x164, script: 0x52, flags: 0x0},
+ 848: {region: 0xd0, script: 0x52, flags: 0x0},
+ 849: {region: 0x164, script: 0x52, flags: 0x0},
+ 850: {region: 0xce, script: 0x52, flags: 0x0},
+ 851: {region: 0xce, script: 0x52, flags: 0x0},
+ 852: {region: 0x164, script: 0x52, flags: 0x0},
+ 853: {region: 0x164, script: 0x52, flags: 0x0},
+ 854: {region: 0x94, script: 0x52, flags: 0x0},
+ 855: {region: 0x164, script: 0x52, flags: 0x0},
+ 856: {region: 0xde, script: 0x52, flags: 0x0},
+ 857: {region: 0x164, script: 0x52, flags: 0x0},
+ 858: {region: 0x164, script: 0x52, flags: 0x0},
+ 859: {region: 0x98, script: 0x52, flags: 0x0},
+ 860: {region: 0x164, script: 0x52, flags: 0x0},
+ 861: {region: 0x164, script: 0x52, flags: 0x0},
+ 862: {region: 0xd8, script: 0x52, flags: 0x0},
+ 863: {region: 0x51, script: 0x52, flags: 0x0},
+ 864: {region: 0x164, script: 0x52, flags: 0x0},
+ 865: {region: 0xd9, script: 0x52, flags: 0x0},
+ 866: {region: 0x164, script: 0x52, flags: 0x0},
+ 867: {region: 0x51, script: 0x52, flags: 0x0},
+ 868: {region: 0x164, script: 0x52, flags: 0x0},
+ 869: {region: 0x164, script: 0x52, flags: 0x0},
+ 870: {region: 0xd9, script: 0x52, flags: 0x0},
+ 871: {region: 0x122, script: 0x4e, flags: 0x0},
+ 872: {region: 0x98, script: 0x20, flags: 0x0},
+ 873: {region: 0x10b, script: 0xb7, flags: 0x0},
+ 874: {region: 0x164, script: 0x52, flags: 0x0},
+ 875: {region: 0x164, script: 0x52, flags: 0x0},
+ 876: {region: 0x83, script: 0x70, flags: 0x0},
+ 877: {region: 0x160, script: 0x52, flags: 0x0},
+ 878: {region: 0x164, script: 0x52, flags: 0x0},
+ 879: {region: 0x48, script: 0x17, flags: 0x0},
+ 880: {region: 0x164, script: 0x52, flags: 0x0},
+ 881: {region: 0x160, script: 0x52, flags: 0x0},
+ 882: {region: 0x164, script: 0x52, flags: 0x0},
+ 883: {region: 0x164, script: 0x52, flags: 0x0},
+ 884: {region: 0x164, script: 0x52, flags: 0x0},
+ 885: {region: 0x164, script: 0x52, flags: 0x0},
+ 886: {region: 0x164, script: 0x52, flags: 0x0},
+ 887: {region: 0x116, script: 0x52, flags: 0x0},
+ 888: {region: 0x164, script: 0x52, flags: 0x0},
+ 889: {region: 0x164, script: 0x52, flags: 0x0},
+ 890: {region: 0x134, script: 0x52, flags: 0x0},
+ 891: {region: 0x164, script: 0x52, flags: 0x0},
+ 892: {region: 0x52, script: 0x52, flags: 0x0},
+ 893: {region: 0x164, script: 0x52, flags: 0x0},
+ 894: {region: 0xcd, script: 0x52, flags: 0x0},
+ 895: {region: 0x12e, script: 0x52, flags: 0x0},
+ 896: {region: 0x130, script: 0x52, flags: 0x0},
+ 897: {region: 0x7f, script: 0x52, flags: 0x0},
+ 898: {region: 0x77, script: 0x52, flags: 0x0},
+ 899: {region: 0x164, script: 0x52, flags: 0x0},
+ 901: {region: 0x164, script: 0x52, flags: 0x0},
+ 902: {region: 0x164, script: 0x52, flags: 0x0},
+ 903: {region: 0x6e, script: 0x52, flags: 0x0},
+ 904: {region: 0x164, script: 0x52, flags: 0x0},
+ 905: {region: 0x164, script: 0x52, flags: 0x0},
+ 906: {region: 0x164, script: 0x52, flags: 0x0},
+ 907: {region: 0x164, script: 0x52, flags: 0x0},
+ 908: {region: 0x98, script: 0x75, flags: 0x0},
+ 909: {region: 0x164, script: 0x52, flags: 0x0},
+ 910: {region: 0x164, script: 0x5, flags: 0x0},
+ 911: {region: 0x7c, script: 0x1e, flags: 0x0},
+ 912: {region: 0x134, script: 0x76, flags: 0x0},
+ 913: {region: 0x164, script: 0x5, flags: 0x0},
+ 914: {region: 0xc4, script: 0x74, flags: 0x0},
+ 915: {region: 0x164, script: 0x52, flags: 0x0},
+ 916: {region: 0x2e, script: 0x3, flags: 0x1},
+ 917: {region: 0xe6, script: 0x52, flags: 0x0},
+ 918: {region: 0x31, script: 0x2, flags: 0x1},
+ 919: {region: 0xe6, script: 0x52, flags: 0x0},
+ 920: {region: 0x2f, script: 0x52, flags: 0x0},
+ 921: {region: 0xef, script: 0x52, flags: 0x0},
+ 922: {region: 0x164, script: 0x52, flags: 0x0},
+ 923: {region: 0x77, script: 0x52, flags: 0x0},
+ 924: {region: 0xd5, script: 0x52, flags: 0x0},
+ 925: {region: 0x134, script: 0x52, flags: 0x0},
+ 926: {region: 0x48, script: 0x52, flags: 0x0},
+ 927: {region: 0x164, script: 0x52, flags: 0x0},
+ 928: {region: 0x9b, script: 0xdd, flags: 0x0},
+ 929: {region: 0x164, script: 0x52, flags: 0x0},
+ 930: {region: 0x5f, script: 0x52, flags: 0x0},
+ 931: {region: 0x164, script: 0x5, flags: 0x0},
+ 932: {region: 0xaf, script: 0x7f, flags: 0x0},
+ 934: {region: 0x164, script: 0x52, flags: 0x0},
+ 935: {region: 0x164, script: 0x52, flags: 0x0},
+ 936: {region: 0x98, script: 0x12, flags: 0x0},
+ 937: {region: 0xa3, script: 0x52, flags: 0x0},
+ 938: {region: 0xe8, script: 0x52, flags: 0x0},
+ 939: {region: 0x164, script: 0x52, flags: 0x0},
+ 940: {region: 0x9d, script: 0x52, flags: 0x0},
+ 941: {region: 0x164, script: 0x52, flags: 0x0},
+ 942: {region: 0x164, script: 0x52, flags: 0x0},
+ 943: {region: 0x86, script: 0x2d, flags: 0x0},
+ 944: {region: 0x74, script: 0x52, flags: 0x0},
+ 945: {region: 0x164, script: 0x52, flags: 0x0},
+ 946: {region: 0xe7, script: 0x45, flags: 0x0},
+ 947: {region: 0x9b, script: 0x5, flags: 0x0},
+ 948: {region: 0x1, script: 0x52, flags: 0x0},
+ 949: {region: 0x23, script: 0x5, flags: 0x0},
+ 950: {region: 0x164, script: 0x52, flags: 0x0},
+ 951: {region: 0x40, script: 0x52, flags: 0x0},
+ 952: {region: 0x164, script: 0x52, flags: 0x0},
+ 953: {region: 0x79, script: 0x52, flags: 0x0},
+ 954: {region: 0x164, script: 0x52, flags: 0x0},
+ 955: {region: 0xe3, script: 0x52, flags: 0x0},
+ 956: {region: 0x88, script: 0x52, flags: 0x0},
+ 957: {region: 0x68, script: 0x52, flags: 0x0},
+ 958: {region: 0x164, script: 0x52, flags: 0x0},
+ 959: {region: 0x98, script: 0x20, flags: 0x0},
+ 960: {region: 0x164, script: 0x52, flags: 0x0},
+ 961: {region: 0x101, script: 0x52, flags: 0x0},
+ 962: {region: 0x94, script: 0x52, flags: 0x0},
+ 963: {region: 0x164, script: 0x52, flags: 0x0},
+ 964: {region: 0x164, script: 0x52, flags: 0x0},
+ 965: {region: 0x9d, script: 0x52, flags: 0x0},
+ 966: {region: 0x164, script: 0x5, flags: 0x0},
+ 967: {region: 0x98, script: 0x52, flags: 0x0},
+ 968: {region: 0x33, script: 0x2, flags: 0x1},
+ 969: {region: 0xda, script: 0x20, flags: 0x0},
+ 970: {region: 0x34, script: 0xe, flags: 0x0},
+ 971: {region: 0x4d, script: 0x52, flags: 0x0},
+ 972: {region: 0x71, script: 0x52, flags: 0x0},
+ 973: {region: 0x4d, script: 0x52, flags: 0x0},
+ 974: {region: 0x9b, script: 0x5, flags: 0x0},
+ 975: {region: 0x10b, script: 0x52, flags: 0x0},
+ 976: {region: 0x39, script: 0x52, flags: 0x0},
+ 977: {region: 0x164, script: 0x52, flags: 0x0},
+ 978: {region: 0xd0, script: 0x52, flags: 0x0},
+ 979: {region: 0x103, script: 0x52, flags: 0x0},
+ 980: {region: 0x94, script: 0x52, flags: 0x0},
+ 981: {region: 0x12e, script: 0x52, flags: 0x0},
+ 982: {region: 0x164, script: 0x52, flags: 0x0},
+ 983: {region: 0x164, script: 0x52, flags: 0x0},
+ 984: {region: 0x72, script: 0x52, flags: 0x0},
+ 985: {region: 0x105, script: 0x1e, flags: 0x0},
+ 986: {region: 0x12f, script: 0x1e, flags: 0x0},
+ 987: {region: 0x108, script: 0x52, flags: 0x0},
+ 988: {region: 0x106, script: 0x52, flags: 0x0},
+ 989: {region: 0x12e, script: 0x52, flags: 0x0},
+ 990: {region: 0x164, script: 0x52, flags: 0x0},
+ 991: {region: 0xa1, script: 0x44, flags: 0x0},
+ 992: {region: 0x98, script: 0x20, flags: 0x0},
+ 993: {region: 0x7f, script: 0x52, flags: 0x0},
+ 994: {region: 0x105, script: 0x1e, flags: 0x0},
+ 995: {region: 0xa3, script: 0x52, flags: 0x0},
+ 996: {region: 0x94, script: 0x52, flags: 0x0},
+ 997: {region: 0x98, script: 0x52, flags: 0x0},
+ 998: {region: 0x98, script: 0xbb, flags: 0x0},
+ 999: {region: 0x164, script: 0x52, flags: 0x0},
+ 1000: {region: 0x164, script: 0x52, flags: 0x0},
+ 1001: {region: 0x12e, script: 0x52, flags: 0x0},
+ 1002: {region: 0x9d, script: 0x52, flags: 0x0},
+ 1003: {region: 0x98, script: 0x20, flags: 0x0},
+ 1004: {region: 0x164, script: 0x5, flags: 0x0},
+ 1005: {region: 0x9d, script: 0x52, flags: 0x0},
+ 1006: {region: 0x7a, script: 0x52, flags: 0x0},
+ 1007: {region: 0x48, script: 0x52, flags: 0x0},
+ 1008: {region: 0x35, script: 0x4, flags: 0x1},
+ 1009: {region: 0x9d, script: 0x52, flags: 0x0},
+ 1010: {region: 0x9b, script: 0x5, flags: 0x0},
+ 1011: {region: 0xd9, script: 0x52, flags: 0x0},
+ 1012: {region: 0x4e, script: 0x52, flags: 0x0},
+ 1013: {region: 0xd0, script: 0x52, flags: 0x0},
+ 1014: {region: 0xce, script: 0x52, flags: 0x0},
+ 1015: {region: 0xc2, script: 0x52, flags: 0x0},
+ 1016: {region: 0x4b, script: 0x52, flags: 0x0},
+ 1017: {region: 0x95, script: 0x72, flags: 0x0},
+ 1018: {region: 0xb5, script: 0x52, flags: 0x0},
+ 1019: {region: 0x164, script: 0x27, flags: 0x0},
+ 1020: {region: 0x164, script: 0x52, flags: 0x0},
+ 1022: {region: 0xb9, script: 0xd2, flags: 0x0},
+ 1023: {region: 0x164, script: 0x52, flags: 0x0},
+ 1024: {region: 0xc3, script: 0x6b, flags: 0x0},
+ 1025: {region: 0x164, script: 0x5, flags: 0x0},
+ 1026: {region: 0xb2, script: 0xc1, flags: 0x0},
+ 1027: {region: 0x6e, script: 0x52, flags: 0x0},
+ 1028: {region: 0x164, script: 0x52, flags: 0x0},
+ 1029: {region: 0x164, script: 0x52, flags: 0x0},
+ 1030: {region: 0x164, script: 0x52, flags: 0x0},
+ 1031: {region: 0x164, script: 0x52, flags: 0x0},
+ 1032: {region: 0x110, script: 0x52, flags: 0x0},
+ 1033: {region: 0x164, script: 0x52, flags: 0x0},
+ 1034: {region: 0xe7, script: 0x5, flags: 0x0},
+ 1035: {region: 0x164, script: 0x52, flags: 0x0},
+ 1036: {region: 0x10e, script: 0x52, flags: 0x0},
+ 1037: {region: 0x164, script: 0x52, flags: 0x0},
+ 1038: {region: 0xe8, script: 0x52, flags: 0x0},
+ 1039: {region: 0x164, script: 0x52, flags: 0x0},
+ 1040: {region: 0x94, script: 0x52, flags: 0x0},
+ 1041: {region: 0x141, script: 0x52, flags: 0x0},
+ 1042: {region: 0x10b, script: 0x52, flags: 0x0},
+ 1044: {region: 0x10b, script: 0x52, flags: 0x0},
+ 1045: {region: 0x71, script: 0x52, flags: 0x0},
+ 1046: {region: 0x96, script: 0xb8, flags: 0x0},
+ 1047: {region: 0x164, script: 0x52, flags: 0x0},
+ 1048: {region: 0x71, script: 0x52, flags: 0x0},
+ 1049: {region: 0x163, script: 0x52, flags: 0x0},
+ 1050: {region: 0x164, script: 0x52, flags: 0x0},
+ 1051: {region: 0xc2, script: 0x52, flags: 0x0},
+ 1052: {region: 0x164, script: 0x52, flags: 0x0},
+ 1053: {region: 0x164, script: 0x52, flags: 0x0},
+ 1054: {region: 0x164, script: 0x52, flags: 0x0},
+ 1055: {region: 0x114, script: 0x52, flags: 0x0},
+ 1056: {region: 0x164, script: 0x52, flags: 0x0},
+ 1057: {region: 0x164, script: 0x52, flags: 0x0},
+ 1058: {region: 0x122, script: 0xd5, flags: 0x0},
+ 1059: {region: 0x164, script: 0x52, flags: 0x0},
+ 1060: {region: 0x164, script: 0x52, flags: 0x0},
+ 1061: {region: 0x164, script: 0x52, flags: 0x0},
+ 1062: {region: 0x164, script: 0x52, flags: 0x0},
+ 1063: {region: 0x26, script: 0x52, flags: 0x0},
+ 1064: {region: 0x39, script: 0x5, flags: 0x1},
+ 1065: {region: 0x98, script: 0xc2, flags: 0x0},
+ 1066: {region: 0x115, script: 0x52, flags: 0x0},
+ 1067: {region: 0x113, script: 0x52, flags: 0x0},
+ 1068: {region: 0x98, script: 0x20, flags: 0x0},
+ 1069: {region: 0x160, script: 0x52, flags: 0x0},
+ 1070: {region: 0x164, script: 0x52, flags: 0x0},
+ 1071: {region: 0x164, script: 0x52, flags: 0x0},
+ 1072: {region: 0x6c, script: 0x52, flags: 0x0},
+ 1073: {region: 0x160, script: 0x52, flags: 0x0},
+ 1074: {region: 0x164, script: 0x52, flags: 0x0},
+ 1075: {region: 0x5f, script: 0x52, flags: 0x0},
+ 1076: {region: 0x94, script: 0x52, flags: 0x0},
+ 1077: {region: 0x164, script: 0x52, flags: 0x0},
+ 1078: {region: 0x164, script: 0x52, flags: 0x0},
+ 1079: {region: 0x12e, script: 0x52, flags: 0x0},
+ 1080: {region: 0x164, script: 0x52, flags: 0x0},
+ 1081: {region: 0x83, script: 0x52, flags: 0x0},
+ 1082: {region: 0x10b, script: 0x52, flags: 0x0},
+ 1083: {region: 0x12e, script: 0x52, flags: 0x0},
+ 1084: {region: 0x15e, script: 0x5, flags: 0x0},
+ 1085: {region: 0x4a, script: 0x52, flags: 0x0},
+ 1086: {region: 0x5f, script: 0x52, flags: 0x0},
+ 1087: {region: 0x164, script: 0x52, flags: 0x0},
+ 1088: {region: 0x98, script: 0x20, flags: 0x0},
+ 1089: {region: 0x94, script: 0x52, flags: 0x0},
+ 1090: {region: 0x164, script: 0x52, flags: 0x0},
+ 1091: {region: 0x34, script: 0xe, flags: 0x0},
+ 1092: {region: 0x9a, script: 0xc5, flags: 0x0},
+ 1093: {region: 0xe8, script: 0x52, flags: 0x0},
+ 1094: {region: 0x98, script: 0xcd, flags: 0x0},
+ 1095: {region: 0xda, script: 0x20, flags: 0x0},
+ 1096: {region: 0x164, script: 0x52, flags: 0x0},
+ 1097: {region: 0x164, script: 0x52, flags: 0x0},
+ 1098: {region: 0x164, script: 0x52, flags: 0x0},
+ 1099: {region: 0x164, script: 0x52, flags: 0x0},
+ 1100: {region: 0x164, script: 0x52, flags: 0x0},
+ 1101: {region: 0x164, script: 0x52, flags: 0x0},
+ 1102: {region: 0x164, script: 0x52, flags: 0x0},
+ 1103: {region: 0x164, script: 0x52, flags: 0x0},
+ 1104: {region: 0xe6, script: 0x52, flags: 0x0},
+ 1105: {region: 0x164, script: 0x52, flags: 0x0},
+ 1106: {region: 0x164, script: 0x52, flags: 0x0},
+ 1107: {region: 0x98, script: 0x4a, flags: 0x0},
+ 1108: {region: 0x52, script: 0xcb, flags: 0x0},
+ 1109: {region: 0xda, script: 0x20, flags: 0x0},
+ 1110: {region: 0xda, script: 0x20, flags: 0x0},
+ 1111: {region: 0x98, script: 0xd0, flags: 0x0},
+ 1112: {region: 0x164, script: 0x52, flags: 0x0},
+ 1113: {region: 0x111, script: 0x52, flags: 0x0},
+ 1114: {region: 0x130, script: 0x52, flags: 0x0},
+ 1115: {region: 0x125, script: 0x52, flags: 0x0},
+ 1116: {region: 0x164, script: 0x52, flags: 0x0},
+ 1117: {region: 0x3e, script: 0x3, flags: 0x1},
+ 1118: {region: 0x164, script: 0x52, flags: 0x0},
+ 1119: {region: 0x164, script: 0x52, flags: 0x0},
+ 1120: {region: 0x164, script: 0x52, flags: 0x0},
+ 1121: {region: 0x122, script: 0xd5, flags: 0x0},
+ 1122: {region: 0xda, script: 0x20, flags: 0x0},
+ 1123: {region: 0xda, script: 0x20, flags: 0x0},
+ 1124: {region: 0xda, script: 0x20, flags: 0x0},
+ 1125: {region: 0x6e, script: 0x27, flags: 0x0},
+ 1126: {region: 0x164, script: 0x52, flags: 0x0},
+ 1127: {region: 0x6c, script: 0x27, flags: 0x0},
+ 1128: {region: 0x164, script: 0x52, flags: 0x0},
+ 1129: {region: 0x164, script: 0x52, flags: 0x0},
+ 1130: {region: 0x164, script: 0x52, flags: 0x0},
+ 1131: {region: 0xd5, script: 0x52, flags: 0x0},
+ 1132: {region: 0x126, script: 0x52, flags: 0x0},
+ 1133: {region: 0x124, script: 0x52, flags: 0x0},
+ 1134: {region: 0x31, script: 0x52, flags: 0x0},
+ 1135: {region: 0xda, script: 0x20, flags: 0x0},
+ 1136: {region: 0xe6, script: 0x52, flags: 0x0},
+ 1137: {region: 0x164, script: 0x52, flags: 0x0},
+ 1138: {region: 0x164, script: 0x52, flags: 0x0},
+ 1139: {region: 0x31, script: 0x52, flags: 0x0},
+ 1140: {region: 0xd3, script: 0x52, flags: 0x0},
+ 1141: {region: 0x164, script: 0x52, flags: 0x0},
+ 1142: {region: 0x160, script: 0x52, flags: 0x0},
+ 1143: {region: 0x164, script: 0x52, flags: 0x0},
+ 1144: {region: 0x128, script: 0x52, flags: 0x0},
+ 1145: {region: 0x164, script: 0x52, flags: 0x0},
+ 1146: {region: 0xcd, script: 0x52, flags: 0x0},
+ 1147: {region: 0x164, script: 0x52, flags: 0x0},
+ 1148: {region: 0xe5, script: 0x52, flags: 0x0},
+ 1149: {region: 0x164, script: 0x52, flags: 0x0},
+ 1150: {region: 0x164, script: 0x52, flags: 0x0},
+ 1151: {region: 0x164, script: 0x52, flags: 0x0},
+ 1152: {region: 0x12a, script: 0x52, flags: 0x0},
+ 1153: {region: 0x12a, script: 0x52, flags: 0x0},
+ 1154: {region: 0x12d, script: 0x52, flags: 0x0},
+ 1155: {region: 0x164, script: 0x5, flags: 0x0},
+ 1156: {region: 0x160, script: 0x52, flags: 0x0},
+ 1157: {region: 0x86, script: 0x2d, flags: 0x0},
+ 1158: {region: 0xda, script: 0x20, flags: 0x0},
+ 1159: {region: 0xe6, script: 0x52, flags: 0x0},
+ 1160: {region: 0x42, script: 0xd6, flags: 0x0},
+ 1161: {region: 0x164, script: 0x52, flags: 0x0},
+ 1162: {region: 0x105, script: 0x1e, flags: 0x0},
+ 1163: {region: 0x164, script: 0x52, flags: 0x0},
+ 1164: {region: 0x164, script: 0x52, flags: 0x0},
+ 1165: {region: 0x130, script: 0x52, flags: 0x0},
+ 1166: {region: 0x164, script: 0x52, flags: 0x0},
+ 1167: {region: 0x122, script: 0xd5, flags: 0x0},
+ 1168: {region: 0x31, script: 0x52, flags: 0x0},
+ 1169: {region: 0x164, script: 0x52, flags: 0x0},
+ 1170: {region: 0x164, script: 0x52, flags: 0x0},
+ 1171: {region: 0xcd, script: 0x52, flags: 0x0},
+ 1172: {region: 0x164, script: 0x52, flags: 0x0},
+ 1173: {region: 0x164, script: 0x52, flags: 0x0},
+ 1174: {region: 0x12c, script: 0x52, flags: 0x0},
+ 1175: {region: 0x164, script: 0x52, flags: 0x0},
+ 1177: {region: 0x164, script: 0x52, flags: 0x0},
+ 1178: {region: 0xd3, script: 0x52, flags: 0x0},
+ 1179: {region: 0x52, script: 0xce, flags: 0x0},
+ 1180: {region: 0xe4, script: 0x52, flags: 0x0},
+ 1181: {region: 0x164, script: 0x52, flags: 0x0},
+ 1182: {region: 0x105, script: 0x1e, flags: 0x0},
+ 1183: {region: 0xb9, script: 0x52, flags: 0x0},
+ 1184: {region: 0x164, script: 0x52, flags: 0x0},
+ 1185: {region: 0x105, script: 0x1e, flags: 0x0},
+ 1186: {region: 0x41, script: 0x4, flags: 0x1},
+ 1187: {region: 0x11b, script: 0xd8, flags: 0x0},
+ 1188: {region: 0x12f, script: 0x1e, flags: 0x0},
+ 1189: {region: 0x74, script: 0x52, flags: 0x0},
+ 1190: {region: 0x29, script: 0x52, flags: 0x0},
+ 1192: {region: 0x45, script: 0x3, flags: 0x1},
+ 1193: {region: 0x98, script: 0xe, flags: 0x0},
+ 1194: {region: 0xe7, script: 0x5, flags: 0x0},
+ 1195: {region: 0x164, script: 0x52, flags: 0x0},
+ 1196: {region: 0x164, script: 0x52, flags: 0x0},
+ 1197: {region: 0x164, script: 0x52, flags: 0x0},
+ 1198: {region: 0x164, script: 0x52, flags: 0x0},
+ 1199: {region: 0x164, script: 0x52, flags: 0x0},
+ 1200: {region: 0x164, script: 0x52, flags: 0x0},
+ 1201: {region: 0x164, script: 0x52, flags: 0x0},
+ 1202: {region: 0x48, script: 0x4, flags: 0x1},
+ 1203: {region: 0x164, script: 0x52, flags: 0x0},
+ 1204: {region: 0xb3, script: 0xd9, flags: 0x0},
+ 1205: {region: 0x164, script: 0x52, flags: 0x0},
+ 1206: {region: 0x160, script: 0x52, flags: 0x0},
+ 1207: {region: 0x9d, script: 0x52, flags: 0x0},
+ 1208: {region: 0x105, script: 0x52, flags: 0x0},
+ 1209: {region: 0x13d, script: 0x52, flags: 0x0},
+ 1210: {region: 0x11a, script: 0x52, flags: 0x0},
+ 1211: {region: 0x164, script: 0x52, flags: 0x0},
+ 1212: {region: 0x35, script: 0x52, flags: 0x0},
+ 1213: {region: 0x5f, script: 0x52, flags: 0x0},
+ 1214: {region: 0xd0, script: 0x52, flags: 0x0},
+ 1215: {region: 0x1, script: 0x52, flags: 0x0},
+ 1216: {region: 0x105, script: 0x52, flags: 0x0},
+ 1217: {region: 0x69, script: 0x52, flags: 0x0},
+ 1218: {region: 0x12e, script: 0x52, flags: 0x0},
+ 1219: {region: 0x164, script: 0x52, flags: 0x0},
+ 1220: {region: 0x35, script: 0x52, flags: 0x0},
+ 1221: {region: 0x4d, script: 0x52, flags: 0x0},
+ 1222: {region: 0x164, script: 0x52, flags: 0x0},
+ 1223: {region: 0x6e, script: 0x27, flags: 0x0},
+ 1224: {region: 0x164, script: 0x52, flags: 0x0},
+ 1225: {region: 0xe6, script: 0x52, flags: 0x0},
+ 1226: {region: 0x2e, script: 0x52, flags: 0x0},
+ 1227: {region: 0x98, script: 0xd0, flags: 0x0},
+ 1228: {region: 0x98, script: 0x20, flags: 0x0},
+ 1229: {region: 0x164, script: 0x52, flags: 0x0},
+ 1230: {region: 0x164, script: 0x52, flags: 0x0},
+ 1231: {region: 0x164, script: 0x52, flags: 0x0},
+ 1232: {region: 0x164, script: 0x52, flags: 0x0},
+ 1233: {region: 0x164, script: 0x52, flags: 0x0},
+ 1234: {region: 0x164, script: 0x52, flags: 0x0},
+ 1235: {region: 0x164, script: 0x52, flags: 0x0},
+ 1236: {region: 0x164, script: 0x52, flags: 0x0},
+ 1237: {region: 0x164, script: 0x52, flags: 0x0},
+ 1238: {region: 0x13f, script: 0x52, flags: 0x0},
+ 1239: {region: 0x164, script: 0x52, flags: 0x0},
+ 1240: {region: 0x164, script: 0x52, flags: 0x0},
+ 1241: {region: 0xa7, script: 0x5, flags: 0x0},
+ 1242: {region: 0x164, script: 0x52, flags: 0x0},
+ 1243: {region: 0x113, script: 0x52, flags: 0x0},
+ 1244: {region: 0x164, script: 0x52, flags: 0x0},
+ 1245: {region: 0x164, script: 0x52, flags: 0x0},
+ 1246: {region: 0x164, script: 0x52, flags: 0x0},
+ 1247: {region: 0x164, script: 0x52, flags: 0x0},
+ 1248: {region: 0x98, script: 0x20, flags: 0x0},
+ 1249: {region: 0x52, script: 0x34, flags: 0x0},
+ 1250: {region: 0x164, script: 0x52, flags: 0x0},
+ 1251: {region: 0x164, script: 0x52, flags: 0x0},
+ 1252: {region: 0x40, script: 0x52, flags: 0x0},
+ 1253: {region: 0x164, script: 0x52, flags: 0x0},
+ 1254: {region: 0x12a, script: 0x18, flags: 0x0},
+ 1255: {region: 0x164, script: 0x52, flags: 0x0},
+ 1256: {region: 0x160, script: 0x52, flags: 0x0},
+ 1257: {region: 0x164, script: 0x52, flags: 0x0},
+ 1258: {region: 0x12a, script: 0x5a, flags: 0x0},
+ 1259: {region: 0x12a, script: 0x5b, flags: 0x0},
+ 1260: {region: 0x7c, script: 0x29, flags: 0x0},
+ 1261: {region: 0x52, script: 0x5e, flags: 0x0},
+ 1262: {region: 0x10a, script: 0x62, flags: 0x0},
+ 1263: {region: 0x107, script: 0x6c, flags: 0x0},
+ 1264: {region: 0x98, script: 0x20, flags: 0x0},
+ 1265: {region: 0x130, script: 0x52, flags: 0x0},
+ 1266: {region: 0x164, script: 0x52, flags: 0x0},
+ 1267: {region: 0x9b, script: 0x82, flags: 0x0},
+ 1268: {region: 0x164, script: 0x52, flags: 0x0},
+ 1269: {region: 0x15d, script: 0xba, flags: 0x0},
+ 1270: {region: 0x164, script: 0x52, flags: 0x0},
+ 1271: {region: 0x164, script: 0x52, flags: 0x0},
+ 1272: {region: 0xda, script: 0x20, flags: 0x0},
+ 1273: {region: 0x164, script: 0x52, flags: 0x0},
+ 1274: {region: 0x164, script: 0x52, flags: 0x0},
+ 1275: {region: 0xd0, script: 0x52, flags: 0x0},
+ 1276: {region: 0x74, script: 0x52, flags: 0x0},
+ 1277: {region: 0x164, script: 0x52, flags: 0x0},
+ 1278: {region: 0x164, script: 0x52, flags: 0x0},
+ 1279: {region: 0x51, script: 0x52, flags: 0x0},
+ 1280: {region: 0x164, script: 0x52, flags: 0x0},
+ 1281: {region: 0x164, script: 0x52, flags: 0x0},
+ 1282: {region: 0x164, script: 0x52, flags: 0x0},
+ 1283: {region: 0x51, script: 0x52, flags: 0x0},
+ 1284: {region: 0x164, script: 0x52, flags: 0x0},
+ 1285: {region: 0x164, script: 0x52, flags: 0x0},
+ 1286: {region: 0x164, script: 0x52, flags: 0x0},
+ 1287: {region: 0x164, script: 0x52, flags: 0x0},
+ 1288: {region: 0x1, script: 0x37, flags: 0x0},
+ 1289: {region: 0x164, script: 0x52, flags: 0x0},
+ 1290: {region: 0x164, script: 0x52, flags: 0x0},
+ 1291: {region: 0x164, script: 0x52, flags: 0x0},
+ 1292: {region: 0x164, script: 0x52, flags: 0x0},
+ 1293: {region: 0x164, script: 0x52, flags: 0x0},
+ 1294: {region: 0xd5, script: 0x52, flags: 0x0},
+ 1295: {region: 0x164, script: 0x52, flags: 0x0},
+ 1296: {region: 0x164, script: 0x52, flags: 0x0},
+ 1297: {region: 0x164, script: 0x52, flags: 0x0},
+ 1298: {region: 0x40, script: 0x52, flags: 0x0},
+ 1299: {region: 0x164, script: 0x52, flags: 0x0},
+ 1300: {region: 0xce, script: 0x52, flags: 0x0},
+ 1301: {region: 0x4c, script: 0x3, flags: 0x1},
+ 1302: {region: 0x164, script: 0x52, flags: 0x0},
+ 1303: {region: 0x164, script: 0x52, flags: 0x0},
+ 1304: {region: 0x164, script: 0x52, flags: 0x0},
+ 1305: {region: 0x52, script: 0x52, flags: 0x0},
+ 1306: {region: 0x10a, script: 0x52, flags: 0x0},
+ 1308: {region: 0xa7, script: 0x5, flags: 0x0},
+ 1309: {region: 0xd8, script: 0x52, flags: 0x0},
+ 1310: {region: 0xb9, script: 0xd2, flags: 0x0},
+ 1311: {region: 0x4f, script: 0x14, flags: 0x1},
+ 1312: {region: 0x164, script: 0x52, flags: 0x0},
+ 1313: {region: 0x121, script: 0x52, flags: 0x0},
+ 1314: {region: 0xcf, script: 0x52, flags: 0x0},
+ 1315: {region: 0x164, script: 0x52, flags: 0x0},
+ 1316: {region: 0x160, script: 0x52, flags: 0x0},
+ 1318: {region: 0x12a, script: 0x52, flags: 0x0},
+}
+
+// likelyLangList holds lists info associated with likelyLang.
+// Size: 396 bytes, 99 elements
+var likelyLangList = [99]likelyScriptRegion{
+ 0: {region: 0x9b, script: 0x7, flags: 0x0},
+ 1: {region: 0xa0, script: 0x6d, flags: 0x2},
+ 2: {region: 0x11b, script: 0x78, flags: 0x2},
+ 3: {region: 0x31, script: 0x52, flags: 0x0},
+ 4: {region: 0x9a, script: 0x5, flags: 0x4},
+ 5: {region: 0x9b, script: 0x5, flags: 0x4},
+ 6: {region: 0x105, script: 0x1e, flags: 0x4},
+ 7: {region: 0x9b, script: 0x5, flags: 0x2},
+ 8: {region: 0x98, script: 0xe, flags: 0x0},
+ 9: {region: 0x34, script: 0x16, flags: 0x2},
+ 10: {region: 0x105, script: 0x1e, flags: 0x0},
+ 11: {region: 0x37, script: 0x2a, flags: 0x2},
+ 12: {region: 0x134, script: 0x52, flags: 0x0},
+ 13: {region: 0x7a, script: 0xbd, flags: 0x2},
+ 14: {region: 0x113, script: 0x52, flags: 0x0},
+ 15: {region: 0x83, script: 0x1, flags: 0x2},
+ 16: {region: 0x5c, script: 0x1d, flags: 0x0},
+ 17: {region: 0x86, script: 0x57, flags: 0x2},
+ 18: {region: 0xd5, script: 0x52, flags: 0x0},
+ 19: {region: 0x51, script: 0x5, flags: 0x4},
+ 20: {region: 0x10a, script: 0x5, flags: 0x4},
+ 21: {region: 0xad, script: 0x1e, flags: 0x0},
+ 22: {region: 0x23, script: 0x5, flags: 0x4},
+ 23: {region: 0x52, script: 0x5, flags: 0x4},
+ 24: {region: 0x9b, script: 0x5, flags: 0x4},
+ 25: {region: 0xc4, script: 0x5, flags: 0x4},
+ 26: {region: 0x52, script: 0x5, flags: 0x2},
+ 27: {region: 0x12a, script: 0x52, flags: 0x0},
+ 28: {region: 0xaf, script: 0x5, flags: 0x4},
+ 29: {region: 0x9a, script: 0x5, flags: 0x2},
+ 30: {region: 0xa4, script: 0x1e, flags: 0x0},
+ 31: {region: 0x52, script: 0x5, flags: 0x4},
+ 32: {region: 0x12a, script: 0x52, flags: 0x4},
+ 33: {region: 0x52, script: 0x5, flags: 0x2},
+ 34: {region: 0x12a, script: 0x52, flags: 0x2},
+ 35: {region: 0xda, script: 0x20, flags: 0x0},
+ 36: {region: 0x98, script: 0x55, flags: 0x2},
+ 37: {region: 0x82, script: 0x52, flags: 0x0},
+ 38: {region: 0x83, script: 0x70, flags: 0x4},
+ 39: {region: 0x83, script: 0x70, flags: 0x2},
+ 40: {region: 0xc4, script: 0x1e, flags: 0x0},
+ 41: {region: 0x52, script: 0x66, flags: 0x4},
+ 42: {region: 0x52, script: 0x66, flags: 0x2},
+ 43: {region: 0xcf, script: 0x52, flags: 0x0},
+ 44: {region: 0x49, script: 0x5, flags: 0x4},
+ 45: {region: 0x94, script: 0x5, flags: 0x4},
+ 46: {region: 0x98, script: 0x2f, flags: 0x0},
+ 47: {region: 0xe7, script: 0x5, flags: 0x4},
+ 48: {region: 0xe7, script: 0x5, flags: 0x2},
+ 49: {region: 0x9b, script: 0x7c, flags: 0x0},
+ 50: {region: 0x52, script: 0x7d, flags: 0x2},
+ 51: {region: 0xb9, script: 0xd2, flags: 0x0},
+ 52: {region: 0xd8, script: 0x52, flags: 0x4},
+ 53: {region: 0xe7, script: 0x5, flags: 0x0},
+ 54: {region: 0x98, script: 0x20, flags: 0x2},
+ 55: {region: 0x98, script: 0x47, flags: 0x2},
+ 56: {region: 0x98, script: 0xc0, flags: 0x2},
+ 57: {region: 0x104, script: 0x1e, flags: 0x0},
+ 58: {region: 0xbc, script: 0x52, flags: 0x4},
+ 59: {region: 0x103, script: 0x52, flags: 0x4},
+ 60: {region: 0x105, script: 0x52, flags: 0x4},
+ 61: {region: 0x12a, script: 0x52, flags: 0x4},
+ 62: {region: 0x123, script: 0x1e, flags: 0x0},
+ 63: {region: 0xe7, script: 0x5, flags: 0x4},
+ 64: {region: 0xe7, script: 0x5, flags: 0x2},
+ 65: {region: 0x52, script: 0x5, flags: 0x0},
+ 66: {region: 0xad, script: 0x1e, flags: 0x4},
+ 67: {region: 0xc4, script: 0x1e, flags: 0x4},
+ 68: {region: 0xad, script: 0x1e, flags: 0x2},
+ 69: {region: 0x98, script: 0xe, flags: 0x0},
+ 70: {region: 0xda, script: 0x20, flags: 0x4},
+ 71: {region: 0xda, script: 0x20, flags: 0x2},
+ 72: {region: 0x136, script: 0x52, flags: 0x0},
+ 73: {region: 0x23, script: 0x5, flags: 0x4},
+ 74: {region: 0x52, script: 0x1e, flags: 0x4},
+ 75: {region: 0x23, script: 0x5, flags: 0x2},
+ 76: {region: 0x8c, script: 0x35, flags: 0x0},
+ 77: {region: 0x52, script: 0x34, flags: 0x4},
+ 78: {region: 0x52, script: 0x34, flags: 0x2},
+ 79: {region: 0x52, script: 0x34, flags: 0x0},
+ 80: {region: 0x2e, script: 0x35, flags: 0x4},
+ 81: {region: 0x3d, script: 0x35, flags: 0x4},
+ 82: {region: 0x7a, script: 0x35, flags: 0x4},
+ 83: {region: 0x7d, script: 0x35, flags: 0x4},
+ 84: {region: 0x8c, script: 0x35, flags: 0x4},
+ 85: {region: 0x94, script: 0x35, flags: 0x4},
+ 86: {region: 0xc5, script: 0x35, flags: 0x4},
+ 87: {region: 0xcf, script: 0x35, flags: 0x4},
+ 88: {region: 0xe1, script: 0x35, flags: 0x4},
+ 89: {region: 0xe4, script: 0x35, flags: 0x4},
+ 90: {region: 0xe6, script: 0x35, flags: 0x4},
+ 91: {region: 0x115, script: 0x35, flags: 0x4},
+ 92: {region: 0x122, script: 0x35, flags: 0x4},
+ 93: {region: 0x12d, script: 0x35, flags: 0x4},
+ 94: {region: 0x134, script: 0x35, flags: 0x4},
+ 95: {region: 0x13d, script: 0x35, flags: 0x4},
+ 96: {region: 0x12d, script: 0x11, flags: 0x2},
+ 97: {region: 0x12d, script: 0x30, flags: 0x2},
+ 98: {region: 0x12d, script: 0x35, flags: 0x2},
+}
+
+type likelyLangScript struct {
+ lang uint16
+ script uint8
+ flags uint8
+}
+
+// likelyRegion is a lookup table, indexed by regionID, for the most likely
+// languages and scripts given incomplete information. If more entries exist
+// for a given regionID, lang and script are the index and size respectively
+// of the list in likelyRegionList.
+// TODO: exclude containers and user-definable regions from the list.
+// Size: 1428 bytes, 357 elements
+var likelyRegion = [357]likelyLangScript{
+ 33: {lang: 0xd5, script: 0x52, flags: 0x0},
+ 34: {lang: 0x39, script: 0x5, flags: 0x0},
+ 35: {lang: 0x0, script: 0x2, flags: 0x1},
+ 38: {lang: 0x2, script: 0x2, flags: 0x1},
+ 39: {lang: 0x4, script: 0x2, flags: 0x1},
+ 41: {lang: 0x3b7, script: 0x52, flags: 0x0},
+ 42: {lang: 0x0, script: 0x52, flags: 0x0},
+ 43: {lang: 0x139, script: 0x52, flags: 0x0},
+ 44: {lang: 0x411, script: 0x52, flags: 0x0},
+ 45: {lang: 0x109, script: 0x52, flags: 0x0},
+ 47: {lang: 0x35e, script: 0x52, flags: 0x0},
+ 48: {lang: 0x43a, script: 0x52, flags: 0x0},
+ 49: {lang: 0x57, script: 0x52, flags: 0x0},
+ 50: {lang: 0x6, script: 0x2, flags: 0x1},
+ 52: {lang: 0xa3, script: 0xe, flags: 0x0},
+ 53: {lang: 0x35e, script: 0x52, flags: 0x0},
+ 54: {lang: 0x159, script: 0x52, flags: 0x0},
+ 55: {lang: 0x7d, script: 0x1e, flags: 0x0},
+ 56: {lang: 0x39, script: 0x5, flags: 0x0},
+ 57: {lang: 0x3d0, script: 0x52, flags: 0x0},
+ 58: {lang: 0x159, script: 0x52, flags: 0x0},
+ 59: {lang: 0x159, script: 0x52, flags: 0x0},
+ 61: {lang: 0x316, script: 0x52, flags: 0x0},
+ 62: {lang: 0x139, script: 0x52, flags: 0x0},
+ 63: {lang: 0x398, script: 0x52, flags: 0x0},
+ 64: {lang: 0x3b7, script: 0x52, flags: 0x0},
+ 66: {lang: 0x8, script: 0x2, flags: 0x1},
+ 68: {lang: 0x0, script: 0x52, flags: 0x0},
+ 70: {lang: 0x70, script: 0x1e, flags: 0x0},
+ 72: {lang: 0x508, script: 0x37, flags: 0x2},
+ 73: {lang: 0x316, script: 0x5, flags: 0x2},
+ 74: {lang: 0x43b, script: 0x52, flags: 0x0},
+ 75: {lang: 0x159, script: 0x52, flags: 0x0},
+ 76: {lang: 0x159, script: 0x52, flags: 0x0},
+ 77: {lang: 0x109, script: 0x52, flags: 0x0},
+ 78: {lang: 0x159, script: 0x52, flags: 0x0},
+ 80: {lang: 0x139, script: 0x52, flags: 0x0},
+ 81: {lang: 0x159, script: 0x52, flags: 0x0},
+ 82: {lang: 0xa, script: 0x5, flags: 0x1},
+ 83: {lang: 0x139, script: 0x52, flags: 0x0},
+ 84: {lang: 0x0, script: 0x52, flags: 0x0},
+ 85: {lang: 0x139, script: 0x52, flags: 0x0},
+ 88: {lang: 0x139, script: 0x52, flags: 0x0},
+ 89: {lang: 0x3b7, script: 0x52, flags: 0x0},
+ 90: {lang: 0x398, script: 0x52, flags: 0x0},
+ 92: {lang: 0xf, script: 0x2, flags: 0x1},
+ 93: {lang: 0xf6, script: 0x52, flags: 0x0},
+ 95: {lang: 0x109, script: 0x52, flags: 0x0},
+ 97: {lang: 0x1, script: 0x52, flags: 0x0},
+ 98: {lang: 0xfd, script: 0x52, flags: 0x0},
+ 100: {lang: 0x139, script: 0x52, flags: 0x0},
+ 102: {lang: 0x11, script: 0x2, flags: 0x1},
+ 103: {lang: 0x139, script: 0x52, flags: 0x0},
+ 104: {lang: 0x139, script: 0x52, flags: 0x0},
+ 105: {lang: 0x13b, script: 0x52, flags: 0x0},
+ 106: {lang: 0x39, script: 0x5, flags: 0x0},
+ 107: {lang: 0x39, script: 0x5, flags: 0x0},
+ 108: {lang: 0x465, script: 0x27, flags: 0x0},
+ 109: {lang: 0x139, script: 0x52, flags: 0x0},
+ 110: {lang: 0x13, script: 0x2, flags: 0x1},
+ 112: {lang: 0x109, script: 0x52, flags: 0x0},
+ 113: {lang: 0x14c, script: 0x52, flags: 0x0},
+ 114: {lang: 0x1b9, script: 0x20, flags: 0x2},
+ 117: {lang: 0x153, script: 0x52, flags: 0x0},
+ 119: {lang: 0x159, script: 0x52, flags: 0x0},
+ 121: {lang: 0x159, script: 0x52, flags: 0x0},
+ 122: {lang: 0x15, script: 0x2, flags: 0x1},
+ 124: {lang: 0x17, script: 0x3, flags: 0x1},
+ 125: {lang: 0x159, script: 0x52, flags: 0x0},
+ 127: {lang: 0x20, script: 0x52, flags: 0x0},
+ 129: {lang: 0x23d, script: 0x52, flags: 0x0},
+ 131: {lang: 0x159, script: 0x52, flags: 0x0},
+ 132: {lang: 0x159, script: 0x52, flags: 0x0},
+ 133: {lang: 0x139, script: 0x52, flags: 0x0},
+ 134: {lang: 0x1a, script: 0x2, flags: 0x1},
+ 135: {lang: 0x0, script: 0x52, flags: 0x0},
+ 136: {lang: 0x139, script: 0x52, flags: 0x0},
+ 138: {lang: 0x3b7, script: 0x52, flags: 0x0},
+ 140: {lang: 0x51f, script: 0x35, flags: 0x0},
+ 141: {lang: 0x0, script: 0x52, flags: 0x0},
+ 142: {lang: 0x139, script: 0x52, flags: 0x0},
+ 143: {lang: 0x1ca, script: 0x52, flags: 0x0},
+ 144: {lang: 0x1cd, script: 0x52, flags: 0x0},
+ 145: {lang: 0x1ce, script: 0x52, flags: 0x0},
+ 147: {lang: 0x139, script: 0x52, flags: 0x0},
+ 148: {lang: 0x1c, script: 0x2, flags: 0x1},
+ 150: {lang: 0x1b5, script: 0x37, flags: 0x0},
+ 152: {lang: 0x1e, script: 0x3, flags: 0x1},
+ 154: {lang: 0x39, script: 0x5, flags: 0x0},
+ 155: {lang: 0x21, script: 0x2, flags: 0x1},
+ 156: {lang: 0x1f0, script: 0x52, flags: 0x0},
+ 157: {lang: 0x1f1, script: 0x52, flags: 0x0},
+ 160: {lang: 0x39, script: 0x5, flags: 0x0},
+ 161: {lang: 0x1f8, script: 0x41, flags: 0x0},
+ 163: {lang: 0x43b, script: 0x52, flags: 0x0},
+ 164: {lang: 0x281, script: 0x1e, flags: 0x0},
+ 165: {lang: 0x23, script: 0x3, flags: 0x1},
+ 167: {lang: 0x26, script: 0x2, flags: 0x1},
+ 169: {lang: 0x24b, script: 0x4b, flags: 0x0},
+ 170: {lang: 0x24b, script: 0x4b, flags: 0x0},
+ 171: {lang: 0x39, script: 0x5, flags: 0x0},
+ 173: {lang: 0x3d9, script: 0x1e, flags: 0x0},
+ 174: {lang: 0x28, script: 0x2, flags: 0x1},
+ 175: {lang: 0x39, script: 0x5, flags: 0x0},
+ 177: {lang: 0x109, script: 0x52, flags: 0x0},
+ 178: {lang: 0x402, script: 0xc1, flags: 0x0},
+ 180: {lang: 0x431, script: 0x52, flags: 0x0},
+ 181: {lang: 0x2b7, script: 0x52, flags: 0x0},
+ 182: {lang: 0x159, script: 0x52, flags: 0x0},
+ 183: {lang: 0x2be, script: 0x52, flags: 0x0},
+ 184: {lang: 0x39, script: 0x5, flags: 0x0},
+ 185: {lang: 0x2a, script: 0x2, flags: 0x1},
+ 186: {lang: 0x159, script: 0x52, flags: 0x0},
+ 187: {lang: 0x2c, script: 0x2, flags: 0x1},
+ 188: {lang: 0x428, script: 0x52, flags: 0x0},
+ 189: {lang: 0x159, script: 0x52, flags: 0x0},
+ 190: {lang: 0x2e8, script: 0x52, flags: 0x0},
+ 193: {lang: 0x2e, script: 0x2, flags: 0x1},
+ 194: {lang: 0x9e, script: 0x52, flags: 0x0},
+ 195: {lang: 0x30, script: 0x2, flags: 0x1},
+ 196: {lang: 0x32, script: 0x2, flags: 0x1},
+ 197: {lang: 0x34, script: 0x2, flags: 0x1},
+ 199: {lang: 0x159, script: 0x52, flags: 0x0},
+ 200: {lang: 0x36, script: 0x2, flags: 0x1},
+ 202: {lang: 0x317, script: 0x52, flags: 0x0},
+ 203: {lang: 0x38, script: 0x3, flags: 0x1},
+ 204: {lang: 0x124, script: 0xd4, flags: 0x0},
+ 206: {lang: 0x139, script: 0x52, flags: 0x0},
+ 207: {lang: 0x316, script: 0x52, flags: 0x0},
+ 208: {lang: 0x3b7, script: 0x52, flags: 0x0},
+ 209: {lang: 0x15, script: 0x52, flags: 0x0},
+ 210: {lang: 0x159, script: 0x52, flags: 0x0},
+ 211: {lang: 0x1ad, script: 0x52, flags: 0x0},
+ 213: {lang: 0x1ad, script: 0x5, flags: 0x2},
+ 215: {lang: 0x139, script: 0x52, flags: 0x0},
+ 216: {lang: 0x35e, script: 0x52, flags: 0x0},
+ 217: {lang: 0x33e, script: 0x52, flags: 0x0},
+ 218: {lang: 0x348, script: 0x20, flags: 0x0},
+ 224: {lang: 0x39, script: 0x5, flags: 0x0},
+ 225: {lang: 0x139, script: 0x52, flags: 0x0},
+ 227: {lang: 0x139, script: 0x52, flags: 0x0},
+ 228: {lang: 0x159, script: 0x52, flags: 0x0},
+ 229: {lang: 0x47c, script: 0x52, flags: 0x0},
+ 230: {lang: 0x14e, script: 0x52, flags: 0x0},
+ 231: {lang: 0x3b, script: 0x3, flags: 0x1},
+ 232: {lang: 0x3e, script: 0x2, flags: 0x1},
+ 233: {lang: 0x159, script: 0x52, flags: 0x0},
+ 235: {lang: 0x139, script: 0x52, flags: 0x0},
+ 236: {lang: 0x39, script: 0x5, flags: 0x0},
+ 237: {lang: 0x3b7, script: 0x52, flags: 0x0},
+ 239: {lang: 0x399, script: 0x52, flags: 0x0},
+ 240: {lang: 0x18e, script: 0x52, flags: 0x0},
+ 242: {lang: 0x39, script: 0x5, flags: 0x0},
+ 257: {lang: 0x159, script: 0x52, flags: 0x0},
+ 259: {lang: 0x40, script: 0x2, flags: 0x1},
+ 260: {lang: 0x428, script: 0x1e, flags: 0x0},
+ 261: {lang: 0x42, script: 0x2, flags: 0x1},
+ 262: {lang: 0x3dc, script: 0x52, flags: 0x0},
+ 263: {lang: 0x39, script: 0x5, flags: 0x0},
+ 265: {lang: 0x159, script: 0x52, flags: 0x0},
+ 266: {lang: 0x39, script: 0x5, flags: 0x0},
+ 267: {lang: 0x44, script: 0x2, flags: 0x1},
+ 270: {lang: 0x40c, script: 0x52, flags: 0x0},
+ 271: {lang: 0x33e, script: 0x52, flags: 0x0},
+ 272: {lang: 0x46, script: 0x2, flags: 0x1},
+ 274: {lang: 0x1f1, script: 0x52, flags: 0x0},
+ 275: {lang: 0x159, script: 0x52, flags: 0x0},
+ 276: {lang: 0x41f, script: 0x52, flags: 0x0},
+ 277: {lang: 0x35e, script: 0x52, flags: 0x0},
+ 279: {lang: 0x3b7, script: 0x52, flags: 0x0},
+ 281: {lang: 0x139, script: 0x52, flags: 0x0},
+ 283: {lang: 0x48, script: 0x2, flags: 0x1},
+ 287: {lang: 0x159, script: 0x52, flags: 0x0},
+ 288: {lang: 0x159, script: 0x52, flags: 0x0},
+ 289: {lang: 0x4a, script: 0x2, flags: 0x1},
+ 290: {lang: 0x4c, script: 0x3, flags: 0x1},
+ 291: {lang: 0x4f, script: 0x2, flags: 0x1},
+ 292: {lang: 0x46d, script: 0x52, flags: 0x0},
+ 293: {lang: 0x3b7, script: 0x52, flags: 0x0},
+ 294: {lang: 0x46c, script: 0x52, flags: 0x0},
+ 295: {lang: 0x51, script: 0x2, flags: 0x1},
+ 296: {lang: 0x478, script: 0x52, flags: 0x0},
+ 298: {lang: 0x53, script: 0x4, flags: 0x1},
+ 300: {lang: 0x496, script: 0x52, flags: 0x0},
+ 301: {lang: 0x57, script: 0x2, flags: 0x1},
+ 302: {lang: 0x43b, script: 0x52, flags: 0x0},
+ 303: {lang: 0x59, script: 0x3, flags: 0x1},
+ 304: {lang: 0x43b, script: 0x52, flags: 0x0},
+ 308: {lang: 0x508, script: 0x37, flags: 0x2},
+ 309: {lang: 0x139, script: 0x52, flags: 0x0},
+ 310: {lang: 0x4b2, script: 0x52, flags: 0x0},
+ 311: {lang: 0x1f1, script: 0x52, flags: 0x0},
+ 314: {lang: 0x139, script: 0x52, flags: 0x0},
+ 317: {lang: 0x4b9, script: 0x52, flags: 0x0},
+ 318: {lang: 0x89, script: 0x52, flags: 0x0},
+ 319: {lang: 0x159, script: 0x52, flags: 0x0},
+ 321: {lang: 0x411, script: 0x52, flags: 0x0},
+ 332: {lang: 0x5c, script: 0x2, flags: 0x1},
+ 349: {lang: 0x39, script: 0x5, flags: 0x0},
+ 350: {lang: 0x5e, script: 0x2, flags: 0x1},
+ 355: {lang: 0x419, script: 0x52, flags: 0x0},
+}
+
+// likelyRegionList holds lists info associated with likelyRegion.
+// Size: 384 bytes, 96 elements
+var likelyRegionList = [96]likelyLangScript{
+ 0: {lang: 0x143, script: 0x5, flags: 0x0},
+ 1: {lang: 0x46c, script: 0x52, flags: 0x0},
+ 2: {lang: 0x427, script: 0x52, flags: 0x0},
+ 3: {lang: 0x2f6, script: 0x1e, flags: 0x0},
+ 4: {lang: 0x1d0, script: 0x8, flags: 0x0},
+ 5: {lang: 0x26b, script: 0x52, flags: 0x0},
+ 6: {lang: 0xb5, script: 0x52, flags: 0x0},
+ 7: {lang: 0x428, script: 0x1e, flags: 0x0},
+ 8: {lang: 0x129, script: 0xd6, flags: 0x0},
+ 9: {lang: 0x348, script: 0x20, flags: 0x0},
+ 10: {lang: 0x51f, script: 0x34, flags: 0x0},
+ 11: {lang: 0x4a2, script: 0x5, flags: 0x0},
+ 12: {lang: 0x515, script: 0x35, flags: 0x0},
+ 13: {lang: 0x519, script: 0x52, flags: 0x0},
+ 14: {lang: 0x291, script: 0xd5, flags: 0x0},
+ 15: {lang: 0x131, script: 0x2d, flags: 0x0},
+ 16: {lang: 0x480, script: 0x52, flags: 0x0},
+ 17: {lang: 0x39, script: 0x5, flags: 0x0},
+ 18: {lang: 0x159, script: 0x52, flags: 0x0},
+ 19: {lang: 0x26, script: 0x27, flags: 0x0},
+ 20: {lang: 0x134, script: 0x52, flags: 0x0},
+ 21: {lang: 0x261, script: 0x5, flags: 0x2},
+ 22: {lang: 0x508, script: 0x37, flags: 0x2},
+ 23: {lang: 0x208, script: 0x29, flags: 0x0},
+ 24: {lang: 0x5, script: 0x1e, flags: 0x0},
+ 25: {lang: 0x26b, script: 0x52, flags: 0x0},
+ 26: {lang: 0x131, script: 0x2d, flags: 0x0},
+ 27: {lang: 0x2f6, script: 0x1e, flags: 0x0},
+ 28: {lang: 0x1da, script: 0x52, flags: 0x0},
+ 29: {lang: 0x316, script: 0x5, flags: 0x0},
+ 30: {lang: 0x1b7, script: 0x20, flags: 0x0},
+ 31: {lang: 0x4aa, script: 0x5, flags: 0x0},
+ 32: {lang: 0x22e, script: 0x6b, flags: 0x0},
+ 33: {lang: 0x143, script: 0x5, flags: 0x0},
+ 34: {lang: 0x46c, script: 0x52, flags: 0x0},
+ 35: {lang: 0x242, script: 0x46, flags: 0x0},
+ 36: {lang: 0xe4, script: 0x5, flags: 0x0},
+ 37: {lang: 0x21e, script: 0xd5, flags: 0x0},
+ 38: {lang: 0x39, script: 0x5, flags: 0x0},
+ 39: {lang: 0x159, script: 0x52, flags: 0x0},
+ 40: {lang: 0x2af, script: 0x4f, flags: 0x0},
+ 41: {lang: 0x21e, script: 0xd5, flags: 0x0},
+ 42: {lang: 0x39, script: 0x5, flags: 0x0},
+ 43: {lang: 0x159, script: 0x52, flags: 0x0},
+ 44: {lang: 0x3d3, script: 0x52, flags: 0x0},
+ 45: {lang: 0x4a4, script: 0x1e, flags: 0x0},
+ 46: {lang: 0x2f6, script: 0x1e, flags: 0x0},
+ 47: {lang: 0x427, script: 0x52, flags: 0x0},
+ 48: {lang: 0x328, script: 0x6b, flags: 0x0},
+ 49: {lang: 0x20b, script: 0x52, flags: 0x0},
+ 50: {lang: 0x302, script: 0x1e, flags: 0x0},
+ 51: {lang: 0x23a, script: 0x5, flags: 0x0},
+ 52: {lang: 0x51f, script: 0x35, flags: 0x0},
+ 53: {lang: 0x3b7, script: 0x52, flags: 0x0},
+ 54: {lang: 0x39, script: 0x5, flags: 0x0},
+ 55: {lang: 0x159, script: 0x52, flags: 0x0},
+ 56: {lang: 0x2e4, script: 0x52, flags: 0x0},
+ 57: {lang: 0x4aa, script: 0x5, flags: 0x0},
+ 58: {lang: 0x87, script: 0x20, flags: 0x0},
+ 59: {lang: 0x4aa, script: 0x5, flags: 0x0},
+ 60: {lang: 0x4aa, script: 0x5, flags: 0x0},
+ 61: {lang: 0xbc, script: 0x20, flags: 0x0},
+ 62: {lang: 0x3aa, script: 0x52, flags: 0x0},
+ 63: {lang: 0x70, script: 0x1e, flags: 0x0},
+ 64: {lang: 0x3d3, script: 0x52, flags: 0x0},
+ 65: {lang: 0x7d, script: 0x1e, flags: 0x0},
+ 66: {lang: 0x3d9, script: 0x1e, flags: 0x0},
+ 67: {lang: 0x25e, script: 0x52, flags: 0x0},
+ 68: {lang: 0x43a, script: 0x52, flags: 0x0},
+ 69: {lang: 0x508, script: 0x37, flags: 0x0},
+ 70: {lang: 0x408, script: 0x52, flags: 0x0},
+ 71: {lang: 0x4a4, script: 0x1e, flags: 0x0},
+ 72: {lang: 0x39, script: 0x5, flags: 0x0},
+ 73: {lang: 0x159, script: 0x52, flags: 0x0},
+ 74: {lang: 0x159, script: 0x52, flags: 0x0},
+ 75: {lang: 0x34, script: 0x5, flags: 0x0},
+ 76: {lang: 0x461, script: 0xd5, flags: 0x0},
+ 77: {lang: 0x2e3, script: 0x5, flags: 0x0},
+ 78: {lang: 0x306, script: 0x6b, flags: 0x0},
+ 79: {lang: 0x45d, script: 0x1e, flags: 0x0},
+ 80: {lang: 0x143, script: 0x5, flags: 0x0},
+ 81: {lang: 0x39, script: 0x5, flags: 0x0},
+ 82: {lang: 0x159, script: 0x52, flags: 0x0},
+ 83: {lang: 0x480, script: 0x52, flags: 0x0},
+ 84: {lang: 0x57, script: 0x5, flags: 0x0},
+ 85: {lang: 0x211, script: 0x1e, flags: 0x0},
+ 86: {lang: 0x80, script: 0x2d, flags: 0x0},
+ 87: {lang: 0x51f, script: 0x35, flags: 0x0},
+ 88: {lang: 0x482, script: 0x52, flags: 0x0},
+ 89: {lang: 0x4a4, script: 0x1e, flags: 0x0},
+ 90: {lang: 0x508, script: 0x37, flags: 0x0},
+ 91: {lang: 0x3aa, script: 0x52, flags: 0x0},
+ 92: {lang: 0x427, script: 0x52, flags: 0x0},
+ 93: {lang: 0x428, script: 0x1e, flags: 0x0},
+ 94: {lang: 0x159, script: 0x52, flags: 0x0},
+ 95: {lang: 0x43c, script: 0x5, flags: 0x0},
+}
+
+type likelyTag struct {
+ lang uint16
+ region uint16
+ script uint8
+}
+
+// Size: 192 bytes, 32 elements
+var likelyRegionGroup = [32]likelyTag{
+ 1: {lang: 0x134, region: 0xd5, script: 0x52},
+ 2: {lang: 0x134, region: 0x134, script: 0x52},
+ 3: {lang: 0x3b7, region: 0x40, script: 0x52},
+ 4: {lang: 0x134, region: 0x2e, script: 0x52},
+ 5: {lang: 0x134, region: 0xd5, script: 0x52},
+ 6: {lang: 0x139, region: 0xce, script: 0x52},
+ 7: {lang: 0x43b, region: 0x12e, script: 0x52},
+ 8: {lang: 0x39, region: 0x6a, script: 0x5},
+ 9: {lang: 0x43b, region: 0x4a, script: 0x52},
+ 10: {lang: 0x134, region: 0x160, script: 0x52},
+ 11: {lang: 0x134, region: 0x134, script: 0x52},
+ 12: {lang: 0x134, region: 0x134, script: 0x52},
+ 13: {lang: 0x139, region: 0x58, script: 0x52},
+ 14: {lang: 0x51f, region: 0x52, script: 0x34},
+ 15: {lang: 0x1b7, region: 0x98, script: 0x20},
+ 16: {lang: 0x1da, region: 0x94, script: 0x52},
+ 17: {lang: 0x1f1, region: 0x9d, script: 0x52},
+ 18: {lang: 0x134, region: 0x2e, script: 0x52},
+ 19: {lang: 0x134, region: 0xe5, script: 0x52},
+ 20: {lang: 0x134, region: 0x89, script: 0x52},
+ 21: {lang: 0x411, region: 0x141, script: 0x52},
+ 22: {lang: 0x51f, region: 0x52, script: 0x34},
+ 23: {lang: 0x4b2, region: 0x136, script: 0x52},
+ 24: {lang: 0x39, region: 0x107, script: 0x5},
+ 25: {lang: 0x3d9, region: 0x105, script: 0x1e},
+ 26: {lang: 0x3d9, region: 0x105, script: 0x1e},
+ 27: {lang: 0x134, region: 0x7a, script: 0x52},
+ 28: {lang: 0x109, region: 0x5f, script: 0x52},
+ 29: {lang: 0x139, region: 0x1e, script: 0x52},
+ 30: {lang: 0x134, region: 0x99, script: 0x52},
+ 31: {lang: 0x134, region: 0x7a, script: 0x52},
+}
+
+type mutualIntelligibility struct {
+ want uint16
+ have uint16
+ conf uint8
+ oneway bool
+}
+
+type scriptIntelligibility struct {
+ lang uint16
+ want uint8
+ have uint8
+ conf uint8
+}
+
+// matchLang holds pairs of langIDs of base languages that are typically
+// mutually intelligible. Each pair is associated with a confidence and
+// whether the intelligibility goes one or both ways.
+// Size: 708 bytes, 118 elements
+var matchLang = [118]mutualIntelligibility{
+ 0: {want: 0x366, have: 0x33e, conf: 0x2, oneway: false},
+ 1: {want: 0x26b, have: 0xe7, conf: 0x2, oneway: false},
+ 2: {want: 0x1ca, have: 0xb5, conf: 0x2, oneway: false},
+ 3: {want: 0x3fd, have: 0xb5, conf: 0x2, oneway: false},
+ 4: {want: 0x428, have: 0xb5, conf: 0x2, oneway: false},
+ 5: {want: 0x3fd, have: 0x1ca, conf: 0x2, oneway: false},
+ 6: {want: 0x428, have: 0x1ca, conf: 0x2, oneway: false},
+ 7: {want: 0x3fd, have: 0x428, conf: 0x2, oneway: false},
+ 8: {want: 0x430, have: 0x1, conf: 0x2, oneway: false},
+ 9: {want: 0x19c, have: 0x109, conf: 0x2, oneway: true},
+ 10: {want: 0x28c, have: 0x109, conf: 0x2, oneway: true},
+ 11: {want: 0xfd, have: 0x366, conf: 0x2, oneway: false},
+ 12: {want: 0xfd, have: 0x33e, conf: 0x2, oneway: false},
+ 13: {want: 0xe7, have: 0x26b, conf: 0x2, oneway: false},
+ 14: {want: 0x5, have: 0x3d9, conf: 0x2, oneway: true},
+ 15: {want: 0xc, have: 0x134, conf: 0x2, oneway: true},
+ 16: {want: 0x15, have: 0x35e, conf: 0x2, oneway: true},
+ 17: {want: 0x20, have: 0x134, conf: 0x2, oneway: true},
+ 18: {want: 0x55, have: 0x139, conf: 0x2, oneway: true},
+ 19: {want: 0x57, have: 0x3d9, conf: 0x2, oneway: true},
+ 20: {want: 0x70, have: 0x3d9, conf: 0x2, oneway: true},
+ 21: {want: 0x74, have: 0x134, conf: 0x2, oneway: true},
+ 22: {want: 0x81, have: 0x1b7, conf: 0x2, oneway: true},
+ 23: {want: 0xa3, have: 0x134, conf: 0x2, oneway: true},
+ 24: {want: 0xb0, have: 0x159, conf: 0x2, oneway: true},
+ 25: {want: 0xdb, have: 0x14e, conf: 0x2, oneway: true},
+ 26: {want: 0xe3, have: 0x134, conf: 0x2, oneway: true},
+ 27: {want: 0xe7, have: 0x39, conf: 0x2, oneway: true},
+ 28: {want: 0xed, have: 0x159, conf: 0x2, oneway: true},
+ 29: {want: 0xf5, have: 0x159, conf: 0x2, oneway: true},
+ 30: {want: 0xfc, have: 0x134, conf: 0x2, oneway: true},
+ 31: {want: 0x12c, have: 0x134, conf: 0x2, oneway: true},
+ 32: {want: 0x137, have: 0x134, conf: 0x2, oneway: true},
+ 33: {want: 0x13b, have: 0x14c, conf: 0x2, oneway: true},
+ 34: {want: 0x140, have: 0x139, conf: 0x2, oneway: true},
+ 35: {want: 0x153, have: 0xfd, conf: 0x2, oneway: true},
+ 36: {want: 0x168, have: 0x35e, conf: 0x2, oneway: true},
+ 37: {want: 0x169, have: 0x134, conf: 0x2, oneway: true},
+ 38: {want: 0x16a, have: 0x134, conf: 0x2, oneway: true},
+ 39: {want: 0x178, have: 0x134, conf: 0x2, oneway: true},
+ 40: {want: 0x18a, have: 0x139, conf: 0x2, oneway: true},
+ 41: {want: 0x18e, have: 0x139, conf: 0x2, oneway: true},
+ 42: {want: 0x19d, have: 0x1b7, conf: 0x2, oneway: true},
+ 43: {want: 0x1ad, have: 0x134, conf: 0x2, oneway: true},
+ 44: {want: 0x1b1, have: 0x134, conf: 0x2, oneway: true},
+ 45: {want: 0x1cd, have: 0x159, conf: 0x2, oneway: true},
+ 46: {want: 0x1d0, have: 0x3d9, conf: 0x2, oneway: true},
+ 47: {want: 0x1d2, have: 0x134, conf: 0x2, oneway: true},
+ 48: {want: 0x1df, have: 0x134, conf: 0x2, oneway: true},
+ 49: {want: 0x1f0, have: 0x134, conf: 0x2, oneway: true},
+ 50: {want: 0x206, have: 0x1da, conf: 0x2, oneway: true},
+ 51: {want: 0x208, have: 0x134, conf: 0x2, oneway: true},
+ 52: {want: 0x225, have: 0x159, conf: 0x2, oneway: true},
+ 53: {want: 0x23a, have: 0x3d9, conf: 0x2, oneway: true},
+ 54: {want: 0x242, have: 0x134, conf: 0x2, oneway: true},
+ 55: {want: 0x249, have: 0x134, conf: 0x2, oneway: true},
+ 56: {want: 0x25c, have: 0x134, conf: 0x2, oneway: true},
+ 57: {want: 0x26b, have: 0x480, conf: 0x2, oneway: true},
+ 58: {want: 0x281, have: 0x3d9, conf: 0x2, oneway: true},
+ 59: {want: 0x285, have: 0x1f1, conf: 0x2, oneway: true},
+ 60: {want: 0x29a, have: 0x134, conf: 0x2, oneway: true},
+ 61: {want: 0x2ac, have: 0x159, conf: 0x2, oneway: true},
+ 62: {want: 0x2af, have: 0x134, conf: 0x2, oneway: true},
+ 63: {want: 0x2b5, have: 0x134, conf: 0x2, oneway: true},
+ 64: {want: 0x2ba, have: 0x159, conf: 0x2, oneway: true},
+ 65: {want: 0x2e4, have: 0x134, conf: 0x2, oneway: true},
+ 66: {want: 0x2e8, have: 0x159, conf: 0x2, oneway: true},
+ 67: {want: 0x2f1, have: 0x134, conf: 0x2, oneway: true},
+ 68: {want: 0x2f6, have: 0x7d, conf: 0x2, oneway: true},
+ 69: {want: 0x2fb, have: 0x134, conf: 0x2, oneway: true},
+ 70: {want: 0x302, have: 0x3d9, conf: 0x2, oneway: true},
+ 71: {want: 0x312, have: 0x1b7, conf: 0x2, oneway: true},
+ 72: {want: 0x316, have: 0x1da, conf: 0x2, oneway: true},
+ 73: {want: 0x317, have: 0x134, conf: 0x2, oneway: true},
+ 74: {want: 0x328, have: 0x134, conf: 0x2, oneway: true},
+ 75: {want: 0x348, have: 0x134, conf: 0x2, oneway: true},
+ 76: {want: 0x361, have: 0x33e, conf: 0x2, oneway: false},
+ 77: {want: 0x361, have: 0x366, conf: 0x2, oneway: true},
+ 78: {want: 0x371, have: 0x134, conf: 0x2, oneway: true},
+ 79: {want: 0x37e, have: 0x134, conf: 0x2, oneway: true},
+ 80: {want: 0x380, have: 0x134, conf: 0x2, oneway: true},
+ 81: {want: 0x382, have: 0x159, conf: 0x2, oneway: true},
+ 82: {want: 0x387, have: 0x134, conf: 0x2, oneway: true},
+ 83: {want: 0x38c, have: 0x134, conf: 0x2, oneway: true},
+ 84: {want: 0x394, have: 0x134, conf: 0x2, oneway: true},
+ 85: {want: 0x39c, have: 0x134, conf: 0x2, oneway: true},
+ 86: {want: 0x3b5, have: 0x134, conf: 0x2, oneway: true},
+ 87: {want: 0x3bb, have: 0x139, conf: 0x2, oneway: true},
+ 88: {want: 0x3cb, have: 0x109, conf: 0x2, oneway: true},
+ 89: {want: 0x3d0, have: 0x134, conf: 0x2, oneway: true},
+ 90: {want: 0x3dc, have: 0x159, conf: 0x2, oneway: true},
+ 91: {want: 0x3e0, have: 0x1b7, conf: 0x2, oneway: true},
+ 92: {want: 0x3f0, have: 0x134, conf: 0x2, oneway: true},
+ 93: {want: 0x402, have: 0x134, conf: 0x2, oneway: true},
+ 94: {want: 0x419, have: 0x134, conf: 0x2, oneway: true},
+ 95: {want: 0x41f, have: 0x134, conf: 0x2, oneway: true},
+ 96: {want: 0x427, have: 0x134, conf: 0x2, oneway: true},
+ 97: {want: 0x431, have: 0x134, conf: 0x2, oneway: true},
+ 98: {want: 0x434, have: 0x1da, conf: 0x2, oneway: true},
+ 99: {want: 0x43b, have: 0x134, conf: 0x2, oneway: true},
+ 100: {want: 0x446, have: 0x134, conf: 0x2, oneway: true},
+ 101: {want: 0x457, have: 0x134, conf: 0x2, oneway: true},
+ 102: {want: 0x45d, have: 0x3d9, conf: 0x2, oneway: true},
+ 103: {want: 0x465, have: 0x134, conf: 0x2, oneway: true},
+ 104: {want: 0x46c, have: 0x3d9, conf: 0x2, oneway: true},
+ 105: {want: 0x3878, have: 0x134, conf: 0x2, oneway: true},
+ 106: {want: 0x476, have: 0x134, conf: 0x2, oneway: true},
+ 107: {want: 0x478, have: 0x134, conf: 0x2, oneway: true},
+ 108: {want: 0x48a, have: 0x3d9, conf: 0x2, oneway: true},
+ 109: {want: 0x493, have: 0x134, conf: 0x2, oneway: true},
+ 110: {want: 0x4a2, have: 0x51f, conf: 0x2, oneway: true},
+ 111: {want: 0x4aa, have: 0x134, conf: 0x2, oneway: true},
+ 112: {want: 0x4b2, have: 0x3d9, conf: 0x2, oneway: true},
+ 113: {want: 0x4db, have: 0x159, conf: 0x2, oneway: true},
+ 114: {want: 0x4e8, have: 0x134, conf: 0x2, oneway: true},
+ 115: {want: 0x508, have: 0x134, conf: 0x2, oneway: true},
+ 116: {want: 0x50e, have: 0x134, conf: 0x2, oneway: true},
+ 117: {want: 0x524, have: 0x134, conf: 0x2, oneway: true},
+}
+
+// matchScript holds pairs of scriptIDs where readers of one script
+// can typically also read the other. Each is associated with a confidence.
+// Size: 24 bytes, 4 elements
+var matchScript = [4]scriptIntelligibility{
+ 0: {lang: 0x428, want: 0x52, have: 0x1e, conf: 0x2},
+ 1: {lang: 0x428, want: 0x1e, have: 0x52, conf: 0x2},
+ 2: {lang: 0x0, want: 0x34, have: 0x35, conf: 0x1},
+ 3: {lang: 0x0, want: 0x35, have: 0x34, conf: 0x1},
+}
+
+// Size: 128 bytes, 32 elements
+var regionContainment = [32]uint32{
+ 0xffffffff, 0x000007a2, 0x00003044, 0x00000008,
+ 0x403c0010, 0x00000020, 0x00000040, 0x00000080,
+ 0x00000100, 0x00000200, 0x00000400, 0x2000384c,
+ 0x00001000, 0x00002000, 0x00004000, 0x00008000,
+ 0x00010000, 0x00020000, 0x00040000, 0x00080000,
+ 0x00100000, 0x00200000, 0x01c1c000, 0x00800000,
+ 0x01000000, 0x1e020000, 0x04000000, 0x08000000,
+ 0x10000000, 0x20002048, 0x40000000, 0x80000000,
+}
+
+// regionInclusion maps region identifiers to sets of regions in regionInclusionBits,
+// where each set holds all groupings that are directly connected in a region
+// containment graph.
+// Size: 357 bytes, 357 elements
+var regionInclusion = [357]uint8{
+ // Entry 0 - 3F
+ 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06,
+ 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e,
+ 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16,
+ 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x20,
+ 0x21, 0x22, 0x23, 0x24, 0x25, 0x25, 0x22, 0x23,
+ 0x25, 0x26, 0x21, 0x27, 0x28, 0x29, 0x2a, 0x25,
+ 0x2b, 0x23, 0x22, 0x25, 0x24, 0x29, 0x2c, 0x2d,
+ 0x23, 0x2e, 0x2c, 0x25, 0x2f, 0x30, 0x27, 0x25,
+ // Entry 40 - 7F
+ 0x27, 0x25, 0x24, 0x30, 0x21, 0x31, 0x32, 0x33,
+ 0x2f, 0x21, 0x26, 0x26, 0x26, 0x34, 0x2c, 0x28,
+ 0x27, 0x26, 0x35, 0x27, 0x21, 0x33, 0x22, 0x20,
+ 0x25, 0x2c, 0x25, 0x21, 0x36, 0x2d, 0x34, 0x29,
+ 0x21, 0x2e, 0x37, 0x25, 0x25, 0x20, 0x38, 0x38,
+ 0x27, 0x37, 0x38, 0x38, 0x2e, 0x39, 0x2e, 0x1f,
+ 0x20, 0x37, 0x3a, 0x27, 0x3b, 0x2b, 0x20, 0x29,
+ 0x34, 0x26, 0x37, 0x25, 0x23, 0x27, 0x2b, 0x2c,
+ // Entry 80 - BF
+ 0x22, 0x2f, 0x2c, 0x2c, 0x25, 0x26, 0x39, 0x21,
+ 0x33, 0x3b, 0x2c, 0x27, 0x35, 0x21, 0x33, 0x39,
+ 0x25, 0x2d, 0x20, 0x38, 0x30, 0x37, 0x23, 0x2b,
+ 0x24, 0x21, 0x23, 0x24, 0x2b, 0x39, 0x2b, 0x25,
+ 0x23, 0x35, 0x20, 0x2e, 0x3c, 0x30, 0x3b, 0x2e,
+ 0x25, 0x35, 0x35, 0x23, 0x25, 0x3c, 0x30, 0x23,
+ 0x25, 0x34, 0x24, 0x2c, 0x31, 0x37, 0x29, 0x37,
+ 0x38, 0x38, 0x34, 0x32, 0x22, 0x25, 0x2e, 0x3b,
+ // Entry C0 - FF
+ 0x20, 0x22, 0x2c, 0x30, 0x35, 0x35, 0x3b, 0x25,
+ 0x2c, 0x25, 0x39, 0x2e, 0x24, 0x2e, 0x33, 0x30,
+ 0x2e, 0x31, 0x3a, 0x2c, 0x2a, 0x2c, 0x20, 0x33,
+ 0x29, 0x2b, 0x24, 0x20, 0x3b, 0x23, 0x28, 0x2a,
+ 0x23, 0x33, 0x20, 0x27, 0x28, 0x3a, 0x30, 0x24,
+ 0x2d, 0x2f, 0x28, 0x25, 0x23, 0x39, 0x20, 0x3b,
+ 0x27, 0x20, 0x23, 0x20, 0x20, 0x1e, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ // Entry 100 - 13F
+ 0x20, 0x2e, 0x20, 0x2d, 0x22, 0x32, 0x2e, 0x23,
+ 0x3a, 0x2e, 0x38, 0x37, 0x30, 0x2c, 0x39, 0x2b,
+ 0x2d, 0x2c, 0x22, 0x2c, 0x2e, 0x27, 0x2e, 0x26,
+ 0x32, 0x33, 0x25, 0x23, 0x31, 0x21, 0x25, 0x26,
+ 0x21, 0x2c, 0x30, 0x3c, 0x28, 0x30, 0x3c, 0x38,
+ 0x28, 0x30, 0x23, 0x25, 0x28, 0x35, 0x2e, 0x32,
+ 0x2e, 0x20, 0x21, 0x20, 0x2f, 0x27, 0x3c, 0x22,
+ 0x25, 0x20, 0x27, 0x25, 0x25, 0x30, 0x3a, 0x28,
+ // Entry 140 - 17F
+ 0x20, 0x28, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x22, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x23, 0x23, 0x2e, 0x22,
+ 0x31, 0x2e, 0x26, 0x2e, 0x20,
+}
+
+// regionInclusionBits is an array of bit vectors where every vector represents
+// a set of region groupings. These sets are used to compute the distance
+// between two regions for the purpose of language matching.
+// Size: 288 bytes, 72 elements
+var regionInclusionBits = [72]uint32{
+ // Entry 0 - 1F
+ 0x82400813, 0x000007a3, 0x00003844, 0x20000808,
+ 0x403c0011, 0x00000022, 0x20000844, 0x00000082,
+ 0x00000102, 0x00000202, 0x00000402, 0x2000384d,
+ 0x00001804, 0x20002804, 0x00404000, 0x00408000,
+ 0x00410000, 0x02020000, 0x00040010, 0x00080010,
+ 0x00100010, 0x00200010, 0x01c1c001, 0x00c00000,
+ 0x01400000, 0x1e020001, 0x06000000, 0x0a000000,
+ 0x12000000, 0x20002848, 0x40000010, 0x80000001,
+ // Entry 20 - 3F
+ 0x00000001, 0x40000000, 0x00020000, 0x01000000,
+ 0x00008000, 0x00002000, 0x00000200, 0x00000008,
+ 0x00200000, 0x90000000, 0x00040000, 0x08000000,
+ 0x00000020, 0x84000000, 0x00000080, 0x00001000,
+ 0x00010000, 0x00000400, 0x04000000, 0x00000040,
+ 0x10000000, 0x00004000, 0x81000000, 0x88000000,
+ 0x00000100, 0x80020000, 0x00080000, 0x00100000,
+ 0x00800000, 0xffffffff, 0x82400fb3, 0xc27c0813,
+ // Entry 40 - 5F
+ 0xa240385f, 0x83c1c813, 0x9e420813, 0x92000001,
+ 0x86000001, 0x81400001, 0x8a000001, 0x82020001,
+}
+
+// regionInclusionNext marks, for each entry in regionInclusionBits, the set of
+// all groups that are reachable from the groups set in the respective entry.
+// Size: 72 bytes, 72 elements
+var regionInclusionNext = [72]uint8{
+ // Entry 0 - 3F
+ 0x3d, 0x3e, 0x0b, 0x0b, 0x3f, 0x01, 0x0b, 0x01,
+ 0x01, 0x01, 0x01, 0x40, 0x0b, 0x0b, 0x16, 0x16,
+ 0x16, 0x19, 0x04, 0x04, 0x04, 0x04, 0x41, 0x16,
+ 0x16, 0x42, 0x19, 0x19, 0x19, 0x0b, 0x04, 0x00,
+ 0x00, 0x1e, 0x11, 0x18, 0x0f, 0x0d, 0x09, 0x03,
+ 0x15, 0x43, 0x12, 0x1b, 0x05, 0x44, 0x07, 0x0c,
+ 0x10, 0x0a, 0x1a, 0x06, 0x1c, 0x0e, 0x45, 0x46,
+ 0x08, 0x47, 0x13, 0x14, 0x17, 0x3d, 0x3d, 0x3d,
+ // Entry 40 - 7F
+ 0x3d, 0x3d, 0x3d, 0x42, 0x42, 0x41, 0x42, 0x42,
+}
+
+type parentRel struct {
+ lang uint16
+ script uint8
+ maxScript uint8
+ toRegion uint16
+ fromRegion []uint16
+}
+
+// Size: 412 bytes, 5 elements
+var parents = [5]parentRel{
+ 0: {lang: 0x134, script: 0x0, maxScript: 0x52, toRegion: 0x1, fromRegion: []uint16{0x1a, 0x24, 0x25, 0x2e, 0x33, 0x35, 0x3c, 0x41, 0x45, 0x47, 0x48, 0x49, 0x4f, 0x51, 0x5b, 0x5c, 0x60, 0x63, 0x6c, 0x72, 0x73, 0x74, 0x7a, 0x7b, 0x7e, 0x7f, 0x80, 0x82, 0x8b, 0x8c, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9e, 0x9f, 0xa3, 0xa6, 0xa8, 0xac, 0xb0, 0xb3, 0xb4, 0xbe, 0xc5, 0xc9, 0xca, 0xcb, 0xcd, 0xcf, 0xd1, 0xd4, 0xd5, 0xdc, 0xde, 0xdf, 0xe5, 0xe6, 0xe7, 0xea, 0xef, 0x106, 0x108, 0x109, 0x10a, 0x10c, 0x10d, 0x111, 0x116, 0x11a, 0x11c, 0x11e, 0x124, 0x128, 0x12b, 0x12c, 0x12e, 0x130, 0x138, 0x13b, 0x13e, 0x141, 0x160, 0x161, 0x163}},
+ 1: {lang: 0x134, script: 0x0, maxScript: 0x52, toRegion: 0x1a, fromRegion: []uint16{0x2d, 0x4d, 0x5f, 0x62, 0x71, 0xd8, 0x10b, 0x10e}},
+ 2: {lang: 0x139, script: 0x0, maxScript: 0x52, toRegion: 0x1e, fromRegion: []uint16{0x2b, 0x3e, 0x40, 0x50, 0x53, 0x55, 0x58, 0x64, 0x68, 0x88, 0x8e, 0xce, 0xd7, 0xe1, 0xe3, 0xeb, 0xf0, 0x119, 0x134, 0x135, 0x13a}},
+ 3: {lang: 0x3b7, script: 0x0, maxScript: 0x52, toRegion: 0xed, fromRegion: []uint16{0x29, 0x4d, 0x59, 0x85, 0x8a, 0xb6, 0xc5, 0xd0, 0x117, 0x125}},
+ 4: {lang: 0x51f, script: 0x35, maxScript: 0x35, toRegion: 0x8c, fromRegion: []uint16{0xc5}},
+}
+
+// Total table size 25825 bytes (25KiB); checksum: 4E97CC5E
diff --git a/Godeps/_workspace/src/golang.org/x/text/language/tags.go b/vendor/golang.org/x/text/language/tags.go
index de30155a2..de30155a2 100644
--- a/Godeps/_workspace/src/golang.org/x/text/language/tags.go
+++ b/vendor/golang.org/x/text/language/tags.go
diff --git a/Godeps/_workspace/src/golang.org/x/text/runes/cond.go b/vendor/golang.org/x/text/runes/cond.go
index ae7a92158..df7aa02db 100644
--- a/Godeps/_workspace/src/golang.org/x/text/runes/cond.go
+++ b/vendor/golang.org/x/text/runes/cond.go
@@ -41,20 +41,35 @@ func If(s Set, tIn, tNotIn transform.Transformer) Transformer {
if tNotIn == nil {
tNotIn = transform.Nop
}
+ sIn, ok := tIn.(transform.SpanningTransformer)
+ if !ok {
+ sIn = dummySpan{tIn}
+ }
+ sNotIn, ok := tNotIn.(transform.SpanningTransformer)
+ if !ok {
+ sNotIn = dummySpan{tNotIn}
+ }
+
a := &cond{
- tIn: tIn,
- tNotIn: tNotIn,
+ tIn: sIn,
+ tNotIn: sNotIn,
f: s.Contains,
}
a.Reset()
return Transformer{a}
}
+type dummySpan struct{ transform.Transformer }
+
+func (d dummySpan) Span(src []byte, atEOF bool) (n int, err error) {
+ return 0, transform.ErrEndOfSpan
+}
+
type cond struct {
- tIn, tNotIn transform.Transformer
+ tIn, tNotIn transform.SpanningTransformer
f func(rune) bool
- check func(rune) bool // current check to perform
- t transform.Transformer // current transformer to use
+ check func(rune) bool // current check to perform
+ t transform.SpanningTransformer // current transformer to use
}
// Reset implements transform.Transformer.
@@ -84,6 +99,51 @@ func (t *cond) isNot(r rune) bool {
return false
}
+// This implementation of Span doesn't help all too much, but it needs to be
+// there to satisfy this package's Transformer interface.
+// TODO: there are certainly room for improvements, though. For example, if
+// t.t == transform.Nop (which will a common occurrence) it will save a bundle
+// to special-case that loop.
+func (t *cond) Span(src []byte, atEOF bool) (n int, err error) {
+ p := 0
+ for n < len(src) && err == nil {
+ // Don't process too much at a time as the Spanner that will be
+ // called on this block may terminate early.
+ const maxChunk = 4096
+ max := len(src)
+ if v := n + maxChunk; v < max {
+ max = v
+ }
+ atEnd := false
+ size := 0
+ current := t.t
+ for ; p < max; p += size {
+ r := rune(src[p])
+ if r < utf8.RuneSelf {
+ size = 1
+ } else if r, size = utf8.DecodeRune(src[p:]); size == 1 {
+ if !atEOF && !utf8.FullRune(src[p:]) {
+ err = transform.ErrShortSrc
+ break
+ }
+ }
+ if !t.check(r) {
+ // The next rune will be the start of a new run.
+ atEnd = true
+ break
+ }
+ }
+ n2, err2 := current.Span(src[n:p], atEnd || (atEOF && p == len(src)))
+ n += n2
+ if err2 != nil {
+ return n, err2
+ }
+ // At this point either err != nil or t.check will pass for the rune at p.
+ p = n + size
+ }
+ return n, err
+}
+
func (t *cond) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) {
p := 0
for nSrc < len(src) && err == nil {
@@ -99,9 +159,10 @@ func (t *cond) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error
size := 0
current := t.t
for ; p < max; p += size {
- var r rune
- r, size = utf8.DecodeRune(src[p:])
- if r == utf8.RuneError && size == 1 {
+ r := rune(src[p])
+ if r < utf8.RuneSelf {
+ size = 1
+ } else if r, size = utf8.DecodeRune(src[p:]); size == 1 {
if !atEOF && !utf8.FullRune(src[p:]) {
err = transform.ErrShortSrc
break
diff --git a/Godeps/_workspace/src/golang.org/x/text/runes/runes.go b/vendor/golang.org/x/text/runes/runes.go
index 291de656b..71933696f 100644
--- a/Godeps/_workspace/src/golang.org/x/text/runes/runes.go
+++ b/vendor/golang.org/x/text/runes/runes.go
@@ -3,7 +3,7 @@
// license that can be found in the LICENSE file.
// Package runes provide transforms for UTF-8 encoded text.
-package runes
+package runes // import "golang.org/x/text/runes"
import (
"unicode"
@@ -46,9 +46,19 @@ func Predicate(f func(rune) bool) Set {
// Transformer implements the transform.Transformer interface.
type Transformer struct {
- transform.Transformer
+ t transform.SpanningTransformer
}
+func (t Transformer) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) {
+ return t.t.Transform(dst, src, atEOF)
+}
+
+func (t Transformer) Span(b []byte, atEOF bool) (n int, err error) {
+ return t.t.Span(b, atEOF)
+}
+
+func (t Transformer) Reset() { t.t.Reset() }
+
// Bytes returns a new byte slice with the result of converting b using t. It
// calls Reset on t. It returns nil if any error was found. This can only happen
// if an error-producing Transformer is passed to If.
@@ -96,39 +106,57 @@ type remove func(r rune) bool
func (remove) Reset() {}
+// Span implements transform.Spanner.
+func (t remove) Span(src []byte, atEOF bool) (n int, err error) {
+ for r, size := rune(0), 0; n < len(src); {
+ if r = rune(src[n]); r < utf8.RuneSelf {
+ size = 1
+ } else if r, size = utf8.DecodeRune(src[n:]); size == 1 {
+ // Invalid rune.
+ if !atEOF && !utf8.FullRune(src[n:]) {
+ err = transform.ErrShortSrc
+ } else {
+ err = transform.ErrEndOfSpan
+ }
+ break
+ }
+ if t(r) {
+ err = transform.ErrEndOfSpan
+ break
+ }
+ n += size
+ }
+ return
+}
+
// Transform implements transform.Transformer.
func (t remove) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) {
for r, size := rune(0), 0; nSrc < len(src); {
if r = rune(src[nSrc]); r < utf8.RuneSelf {
size = 1
- } else {
- r, size = utf8.DecodeRune(src[nSrc:])
-
- if size == 1 {
- // Invalid rune.
- if !atEOF && !utf8.FullRune(src[nSrc:]) {
- err = transform.ErrShortSrc
+ } else if r, size = utf8.DecodeRune(src[nSrc:]); size == 1 {
+ // Invalid rune.
+ if !atEOF && !utf8.FullRune(src[nSrc:]) {
+ err = transform.ErrShortSrc
+ break
+ }
+ // We replace illegal bytes with RuneError. Not doing so might
+ // otherwise turn a sequence of invalid UTF-8 into valid UTF-8.
+ // The resulting byte sequence may subsequently contain runes
+ // for which t(r) is true that were passed unnoticed.
+ if !t(utf8.RuneError) {
+ if nDst+3 > len(dst) {
+ err = transform.ErrShortDst
break
}
- // We replace illegal bytes with RuneError. Not doing so might
- // otherwise turn a sequence of invalid UTF-8 into valid UTF-8.
- // The resulting byte sequence may subsequently contain runes
- // for which t(r) is true that were passed unnoticed.
- if !t(utf8.RuneError) {
- if nDst+3 > len(dst) {
- err = transform.ErrShortDst
- break
- }
- dst[nDst+0] = runeErrorString[0]
- dst[nDst+1] = runeErrorString[1]
- dst[nDst+2] = runeErrorString[2]
- nDst += 3
- }
- nSrc++
- continue
+ dst[nDst+0] = runeErrorString[0]
+ dst[nDst+1] = runeErrorString[1]
+ dst[nDst+2] = runeErrorString[2]
+ nDst += 3
}
+ nSrc++
+ continue
}
-
if t(r) {
nSrc += size
continue
@@ -157,6 +185,28 @@ type mapper func(rune) rune
func (mapper) Reset() {}
+// Span implements transform.Spanner.
+func (t mapper) Span(src []byte, atEOF bool) (n int, err error) {
+ for r, size := rune(0), 0; n < len(src); n += size {
+ if r = rune(src[n]); r < utf8.RuneSelf {
+ size = 1
+ } else if r, size = utf8.DecodeRune(src[n:]); size == 1 {
+ // Invalid rune.
+ if !atEOF && !utf8.FullRune(src[n:]) {
+ err = transform.ErrShortSrc
+ } else {
+ err = transform.ErrEndOfSpan
+ }
+ break
+ }
+ if t(r) != r {
+ err = transform.ErrEndOfSpan
+ break
+ }
+ }
+ return n, err
+}
+
// Transform implements transform.Transformer.
func (t mapper) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) {
var replacement rune
@@ -230,24 +280,51 @@ func ReplaceIllFormed() Transformer {
type replaceIllFormed struct{ transform.NopResetter }
+func (t replaceIllFormed) Span(src []byte, atEOF bool) (n int, err error) {
+ for n < len(src) {
+ // ASCII fast path.
+ if src[n] < utf8.RuneSelf {
+ n++
+ continue
+ }
+
+ r, size := utf8.DecodeRune(src[n:])
+
+ // Look for a valid non-ASCII rune.
+ if r != utf8.RuneError || size != 1 {
+ n += size
+ continue
+ }
+
+ // Look for short source data.
+ if !atEOF && !utf8.FullRune(src[n:]) {
+ err = transform.ErrShortSrc
+ break
+ }
+
+ // We have an invalid rune.
+ err = transform.ErrEndOfSpan
+ break
+ }
+ return n, err
+}
+
func (t replaceIllFormed) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) {
for nSrc < len(src) {
- r, size := utf8.DecodeRune(src[nSrc:])
-
- // Look for an ASCII rune.
- if r < utf8.RuneSelf {
+ // ASCII fast path.
+ if r := src[nSrc]; r < utf8.RuneSelf {
if nDst == len(dst) {
err = transform.ErrShortDst
break
}
- dst[nDst] = byte(r)
+ dst[nDst] = r
nDst++
nSrc++
continue
}
// Look for a valid non-ASCII rune.
- if r != utf8.RuneError || size != 1 {
+ if _, size := utf8.DecodeRune(src[nSrc:]); size != 1 {
if size != copy(dst[nDst:], src[nSrc:nSrc+size]) {
err = transform.ErrShortDst
break
diff --git a/Godeps/_workspace/src/golang.org/x/text/transform/transform.go b/vendor/golang.org/x/text/transform/transform.go
index 51862b02b..fe47b9b35 100644
--- a/Godeps/_workspace/src/golang.org/x/text/transform/transform.go
+++ b/vendor/golang.org/x/text/transform/transform.go
@@ -6,7 +6,7 @@
// bytes passing through as well as various transformations. Example
// transformations provided by other packages include normalization and
// conversion between character sets.
-package transform
+package transform // import "golang.org/x/text/transform"
import (
"bytes"
@@ -24,6 +24,10 @@ var (
// complete the transformation.
ErrShortSrc = errors.New("transform: short source buffer")
+ // ErrEndOfSpan means that the input and output (the transformed input)
+ // are not identical.
+ ErrEndOfSpan = errors.New("transform: input and output are not identical")
+
// errInconsistentByteCount means that Transform returned success (nil
// error) but also returned nSrc inconsistent with the src argument.
errInconsistentByteCount = errors.New("transform: inconsistent byte count returned")
@@ -60,6 +64,41 @@ type Transformer interface {
Reset()
}
+// SpanningTransformer extends the Transformer interface with a Span method
+// that determines how much of the input already conforms to the Transformer.
+type SpanningTransformer interface {
+ Transformer
+
+ // Span returns a position in src such that transforming src[:n] results in
+ // identical output src[:n] for these bytes. It does not necessarily return
+ // the largest such n. The atEOF argument tells whether src represents the
+ // last bytes of the input.
+ //
+ // Callers should always account for the n bytes consumed before
+ // considering the error err.
+ //
+ // A nil error means that all input bytes are known to be identical to the
+ // output produced by the Transformer. A nil error can be be returned
+ // regardless of whether atEOF is true. If err is nil, then then n must
+ // equal len(src); the converse is not necessarily true.
+ //
+ // ErrEndOfSpan means that the Transformer output may differ from the
+ // input after n bytes. Note that n may be len(src), meaning that the output
+ // would contain additional bytes after otherwise identical output.
+ // ErrShortSrc means that src had insufficient data to determine whether the
+ // remaining bytes would change. Other than the error conditions listed
+ // here, implementations are free to report other errors that arise.
+ //
+ // Calling Span can modify the Transformer state as a side effect. In
+ // effect, it does the transformation just as calling Transform would, only
+ // without copying to a destination buffer and only up to a point it can
+ // determine the input and output bytes are the same. This is obviously more
+ // limited than calling Transform, but can be more efficient in terms of
+ // copying and allocating buffers. Calls to Span and Transform may be
+ // interleaved.
+ Span(src []byte, atEOF bool) (n int, err error)
+}
+
// NopResetter can be embedded by implementations of Transformer to add a nop
// Reset method.
type NopResetter struct{}
@@ -278,6 +317,10 @@ func (nop) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) {
return n, n, err
}
+func (nop) Span(src []byte, atEOF bool) (n int, err error) {
+ return len(src), nil
+}
+
type discard struct{ NopResetter }
func (discard) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) {
@@ -289,8 +332,8 @@ var (
// by consuming all bytes and writing nothing.
Discard Transformer = discard{}
- // Nop is a Transformer that copies src to dst.
- Nop Transformer = nop{}
+ // Nop is a SpanningTransformer that copies src to dst.
+ Nop SpanningTransformer = nop{}
)
// chain is a sequence of links. A chain with N Transformers has N+1 links and
@@ -358,6 +401,8 @@ func (c *chain) Reset() {
}
}
+// TODO: make chain use Span (is going to be fun to implement!)
+
// Transform applies the transformers of c in sequence.
func (c *chain) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) {
// Set up src and dst in the chain.
@@ -448,8 +493,7 @@ func (c *chain) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err erro
return dstL.n, srcL.p, err
}
-// RemoveFunc returns a Transformer that removes from the input all runes r for
-// which f(r) is true. Illegal bytes in the input are replaced by RuneError.
+// Deprecated: use runes.Remove instead.
func RemoveFunc(f func(r rune) bool) Transformer {
return removeF(f)
}
diff --git a/vendor/golang.org/x/text/unicode/cldr/base.go b/vendor/golang.org/x/text/unicode/cldr/base.go
new file mode 100644
index 000000000..2382f4d6d
--- /dev/null
+++ b/vendor/golang.org/x/text/unicode/cldr/base.go
@@ -0,0 +1,100 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package cldr
+
+import (
+ "encoding/xml"
+ "regexp"
+ "strconv"
+)
+
+// Elem is implemented by every XML element.
+type Elem interface {
+ setEnclosing(Elem)
+ setName(string)
+ enclosing() Elem
+
+ GetCommon() *Common
+}
+
+type hidden struct {
+ CharData string `xml:",chardata"`
+ Alias *struct {
+ Common
+ Source string `xml:"source,attr"`
+ Path string `xml:"path,attr"`
+ } `xml:"alias"`
+ Def *struct {
+ Common
+ Choice string `xml:"choice,attr,omitempty"`
+ Type string `xml:"type,attr,omitempty"`
+ } `xml:"default"`
+}
+
+// Common holds several of the most common attributes and sub elements
+// of an XML element.
+type Common struct {
+ XMLName xml.Name
+ name string
+ enclElem Elem
+ Type string `xml:"type,attr,omitempty"`
+ Reference string `xml:"reference,attr,omitempty"`
+ Alt string `xml:"alt,attr,omitempty"`
+ ValidSubLocales string `xml:"validSubLocales,attr,omitempty"`
+ Draft string `xml:"draft,attr,omitempty"`
+ hidden
+}
+
+// Default returns the default type to select from the enclosed list
+// or "" if no default value is specified.
+func (e *Common) Default() string {
+ if e.Def == nil {
+ return ""
+ }
+ if e.Def.Choice != "" {
+ return e.Def.Choice
+ } else if e.Def.Type != "" {
+ // Type is still used by the default element in collation.
+ return e.Def.Type
+ }
+ return ""
+}
+
+// GetCommon returns e. It is provided such that Common implements Elem.
+func (e *Common) GetCommon() *Common {
+ return e
+}
+
+// Data returns the character data accumulated for this element.
+func (e *Common) Data() string {
+ e.CharData = charRe.ReplaceAllStringFunc(e.CharData, replaceUnicode)
+ return e.CharData
+}
+
+func (e *Common) setName(s string) {
+ e.name = s
+}
+
+func (e *Common) enclosing() Elem {
+ return e.enclElem
+}
+
+func (e *Common) setEnclosing(en Elem) {
+ e.enclElem = en
+}
+
+// Escape characters that can be escaped without further escaping the string.
+var charRe = regexp.MustCompile(`&#x[0-9a-fA-F]*;|\\u[0-9a-fA-F]{4}|\\U[0-9a-fA-F]{8}|\\x[0-9a-fA-F]{2}|\\[0-7]{3}|\\[abtnvfr]`)
+
+// replaceUnicode converts hexadecimal Unicode codepoint notations to a one-rune string.
+// It assumes the input string is correctly formatted.
+func replaceUnicode(s string) string {
+ if s[1] == '#' {
+ r, _ := strconv.ParseInt(s[3:len(s)-1], 16, 32)
+ return string(r)
+ }
+ r, _, _, _ := strconv.UnquoteChar(s, 0)
+ return string(r)
+}
diff --git a/vendor/golang.org/x/text/unicode/cldr/cldr.go b/vendor/golang.org/x/text/unicode/cldr/cldr.go
new file mode 100644
index 000000000..2197f8ac2
--- /dev/null
+++ b/vendor/golang.org/x/text/unicode/cldr/cldr.go
@@ -0,0 +1,130 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:generate go run makexml.go -output xml.go
+
+// Package cldr provides a parser for LDML and related XML formats.
+// This package is intended to be used by the table generation tools
+// for the various internationalization-related packages.
+// As the XML types are generated from the CLDR DTD, and as the CLDR standard
+// is periodically amended, this package may change considerably over time.
+// This mostly means that data may appear and disappear between versions.
+// That is, old code should keep compiling for newer versions, but data
+// may have moved or changed.
+// CLDR version 22 is the first version supported by this package.
+// Older versions may not work.
+package cldr // import "golang.org/x/text/unicode/cldr"
+
+import (
+ "fmt"
+ "sort"
+)
+
+// CLDR provides access to parsed data of the Unicode Common Locale Data Repository.
+type CLDR struct {
+ parent map[string][]string
+ locale map[string]*LDML
+ resolved map[string]*LDML
+ bcp47 *LDMLBCP47
+ supp *SupplementalData
+}
+
+func makeCLDR() *CLDR {
+ return &CLDR{
+ parent: make(map[string][]string),
+ locale: make(map[string]*LDML),
+ resolved: make(map[string]*LDML),
+ bcp47: &LDMLBCP47{},
+ supp: &SupplementalData{},
+ }
+}
+
+// BCP47 returns the parsed BCP47 LDML data. If no such data was parsed, nil is returned.
+func (cldr *CLDR) BCP47() *LDMLBCP47 {
+ return nil
+}
+
+// Draft indicates the draft level of an element.
+type Draft int
+
+const (
+ Approved Draft = iota
+ Contributed
+ Provisional
+ Unconfirmed
+)
+
+var drafts = []string{"unconfirmed", "provisional", "contributed", "approved", ""}
+
+// ParseDraft returns the Draft value corresponding to the given string. The
+// empty string corresponds to Approved.
+func ParseDraft(level string) (Draft, error) {
+ if level == "" {
+ return Approved, nil
+ }
+ for i, s := range drafts {
+ if level == s {
+ return Unconfirmed - Draft(i), nil
+ }
+ }
+ return Approved, fmt.Errorf("cldr: unknown draft level %q", level)
+}
+
+func (d Draft) String() string {
+ return drafts[len(drafts)-1-int(d)]
+}
+
+// SetDraftLevel sets which draft levels to include in the evaluated LDML.
+// Any draft element for which the draft level is higher than lev will be excluded.
+// If multiple draft levels are available for a single element, the one with the
+// lowest draft level will be selected, unless preferDraft is true, in which case
+// the highest draft will be chosen.
+// It is assumed that the underlying LDML is canonicalized.
+func (cldr *CLDR) SetDraftLevel(lev Draft, preferDraft bool) {
+ // TODO: implement
+ cldr.resolved = make(map[string]*LDML)
+}
+
+// RawLDML returns the LDML XML for id in unresolved form.
+// id must be one of the strings returned by Locales.
+func (cldr *CLDR) RawLDML(loc string) *LDML {
+ return cldr.locale[loc]
+}
+
+// LDML returns the fully resolved LDML XML for loc, which must be one of
+// the strings returned by Locales.
+func (cldr *CLDR) LDML(loc string) (*LDML, error) {
+ return cldr.resolve(loc)
+}
+
+// Supplemental returns the parsed supplemental data. If no such data was parsed,
+// nil is returned.
+func (cldr *CLDR) Supplemental() *SupplementalData {
+ return cldr.supp
+}
+
+// Locales returns the locales for which there exist files.
+// Valid sublocales for which there is no file are not included.
+// The root locale is always sorted first.
+func (cldr *CLDR) Locales() []string {
+ loc := []string{"root"}
+ hasRoot := false
+ for l, _ := range cldr.locale {
+ if l == "root" {
+ hasRoot = true
+ continue
+ }
+ loc = append(loc, l)
+ }
+ sort.Strings(loc[1:])
+ if !hasRoot {
+ return loc[1:]
+ }
+ return loc
+}
+
+// Get fills in the fields of x based on the XPath path.
+func Get(e Elem, path string) (res Elem, err error) {
+ return walkXPath(e, path)
+}
diff --git a/vendor/golang.org/x/text/unicode/cldr/collate.go b/vendor/golang.org/x/text/unicode/cldr/collate.go
new file mode 100644
index 000000000..80ee28d79
--- /dev/null
+++ b/vendor/golang.org/x/text/unicode/cldr/collate.go
@@ -0,0 +1,359 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package cldr
+
+import (
+ "bufio"
+ "encoding/xml"
+ "errors"
+ "fmt"
+ "strconv"
+ "strings"
+ "unicode"
+ "unicode/utf8"
+)
+
+// RuleProcessor can be passed to Collator's Process method, which
+// parses the rules and calls the respective method for each rule found.
+type RuleProcessor interface {
+ Reset(anchor string, before int) error
+ Insert(level int, str, context, extend string) error
+ Index(id string)
+}
+
+const (
+ // cldrIndex is a Unicode-reserved sentinel value used to mark the start
+ // of a grouping within an index.
+ // We ignore any rule that starts with this rune.
+ // See http://unicode.org/reports/tr35/#Collation_Elements for details.
+ cldrIndex = "\uFDD0"
+
+ // specialAnchor is the format in which to represent logical reset positions,
+ // such as "first tertiary ignorable".
+ specialAnchor = "<%s/>"
+)
+
+// Process parses the rules for the tailorings of this collation
+// and calls the respective methods of p for each rule found.
+func (c Collation) Process(p RuleProcessor) (err error) {
+ if len(c.Cr) > 0 {
+ if len(c.Cr) > 1 {
+ return fmt.Errorf("multiple cr elements, want 0 or 1")
+ }
+ return processRules(p, c.Cr[0].Data())
+ }
+ if c.Rules.Any != nil {
+ return c.processXML(p)
+ }
+ return errors.New("no tailoring data")
+}
+
+// processRules parses rules in the Collation Rule Syntax defined in
+// http://www.unicode.org/reports/tr35/tr35-collation.html#Collation_Tailorings.
+func processRules(p RuleProcessor, s string) (err error) {
+ chk := func(s string, e error) string {
+ if err == nil {
+ err = e
+ }
+ return s
+ }
+ i := 0 // Save the line number for use after the loop.
+ scanner := bufio.NewScanner(strings.NewReader(s))
+ for ; scanner.Scan() && err == nil; i++ {
+ for s := skipSpace(scanner.Text()); s != "" && s[0] != '#'; s = skipSpace(s) {
+ level := 5
+ var ch byte
+ switch ch, s = s[0], s[1:]; ch {
+ case '&': // followed by <anchor> or '[' <key> ']'
+ if s = skipSpace(s); consume(&s, '[') {
+ s = chk(parseSpecialAnchor(p, s))
+ } else {
+ s = chk(parseAnchor(p, 0, s))
+ }
+ case '<': // sort relation '<'{1,4}, optionally followed by '*'.
+ for level = 1; consume(&s, '<'); level++ {
+ }
+ if level > 4 {
+ err = fmt.Errorf("level %d > 4", level)
+ }
+ fallthrough
+ case '=': // identity relation, optionally followed by *.
+ if consume(&s, '*') {
+ s = chk(parseSequence(p, level, s))
+ } else {
+ s = chk(parseOrder(p, level, s))
+ }
+ default:
+ chk("", fmt.Errorf("illegal operator %q", ch))
+ break
+ }
+ }
+ }
+ if chk("", scanner.Err()); err != nil {
+ return fmt.Errorf("%d: %v", i, err)
+ }
+ return nil
+}
+
+// parseSpecialAnchor parses the anchor syntax which is either of the form
+// ['before' <level>] <anchor>
+// or
+// [<label>]
+// The starting should already be consumed.
+func parseSpecialAnchor(p RuleProcessor, s string) (tail string, err error) {
+ i := strings.IndexByte(s, ']')
+ if i == -1 {
+ return "", errors.New("unmatched bracket")
+ }
+ a := strings.TrimSpace(s[:i])
+ s = s[i+1:]
+ if strings.HasPrefix(a, "before ") {
+ l, err := strconv.ParseUint(skipSpace(a[len("before "):]), 10, 3)
+ if err != nil {
+ return s, err
+ }
+ return parseAnchor(p, int(l), s)
+ }
+ return s, p.Reset(fmt.Sprintf(specialAnchor, a), 0)
+}
+
+func parseAnchor(p RuleProcessor, level int, s string) (tail string, err error) {
+ anchor, s, err := scanString(s)
+ if err != nil {
+ return s, err
+ }
+ return s, p.Reset(anchor, level)
+}
+
+func parseOrder(p RuleProcessor, level int, s string) (tail string, err error) {
+ var value, context, extend string
+ if value, s, err = scanString(s); err != nil {
+ return s, err
+ }
+ if strings.HasPrefix(value, cldrIndex) {
+ p.Index(value[len(cldrIndex):])
+ return
+ }
+ if consume(&s, '|') {
+ if context, s, err = scanString(s); err != nil {
+ return s, errors.New("missing string after context")
+ }
+ }
+ if consume(&s, '/') {
+ if extend, s, err = scanString(s); err != nil {
+ return s, errors.New("missing string after extension")
+ }
+ }
+ return s, p.Insert(level, value, context, extend)
+}
+
+// scanString scans a single input string.
+func scanString(s string) (str, tail string, err error) {
+ if s = skipSpace(s); s == "" {
+ return s, s, errors.New("missing string")
+ }
+ buf := [16]byte{} // small but enough to hold most cases.
+ value := buf[:0]
+ for s != "" {
+ if consume(&s, '\'') {
+ i := strings.IndexByte(s, '\'')
+ if i == -1 {
+ return "", "", errors.New(`unmatched single quote`)
+ }
+ if i == 0 {
+ value = append(value, '\'')
+ } else {
+ value = append(value, s[:i]...)
+ }
+ s = s[i+1:]
+ continue
+ }
+ r, sz := utf8.DecodeRuneInString(s)
+ if unicode.IsSpace(r) || strings.ContainsRune("&<=#", r) {
+ break
+ }
+ value = append(value, s[:sz]...)
+ s = s[sz:]
+ }
+ return string(value), skipSpace(s), nil
+}
+
+func parseSequence(p RuleProcessor, level int, s string) (tail string, err error) {
+ if s = skipSpace(s); s == "" {
+ return s, errors.New("empty sequence")
+ }
+ last := rune(0)
+ for s != "" {
+ r, sz := utf8.DecodeRuneInString(s)
+ s = s[sz:]
+
+ if r == '-' {
+ // We have a range. The first element was already written.
+ if last == 0 {
+ return s, errors.New("range without starter value")
+ }
+ r, sz = utf8.DecodeRuneInString(s)
+ s = s[sz:]
+ if r == utf8.RuneError || r < last {
+ return s, fmt.Errorf("invalid range %q-%q", last, r)
+ }
+ for i := last + 1; i <= r; i++ {
+ if err := p.Insert(level, string(i), "", ""); err != nil {
+ return s, err
+ }
+ }
+ last = 0
+ continue
+ }
+
+ if unicode.IsSpace(r) || unicode.IsPunct(r) {
+ break
+ }
+
+ // normal case
+ if err := p.Insert(level, string(r), "", ""); err != nil {
+ return s, err
+ }
+ last = r
+ }
+ return s, nil
+}
+
+func skipSpace(s string) string {
+ return strings.TrimLeftFunc(s, unicode.IsSpace)
+}
+
+// consumes returns whether the next byte is ch. If so, it gobbles it by
+// updating s.
+func consume(s *string, ch byte) (ok bool) {
+ if *s == "" || (*s)[0] != ch {
+ return false
+ }
+ *s = (*s)[1:]
+ return true
+}
+
+// The following code parses Collation rules of CLDR version 24 and before.
+
+var lmap = map[byte]int{
+ 'p': 1,
+ 's': 2,
+ 't': 3,
+ 'i': 5,
+}
+
+type rulesElem struct {
+ Rules struct {
+ Common
+ Any []*struct {
+ XMLName xml.Name
+ rule
+ } `xml:",any"`
+ } `xml:"rules"`
+}
+
+type rule struct {
+ Value string `xml:",chardata"`
+ Before string `xml:"before,attr"`
+ Any []*struct {
+ XMLName xml.Name
+ rule
+ } `xml:",any"`
+}
+
+var emptyValueError = errors.New("cldr: empty rule value")
+
+func (r *rule) value() (string, error) {
+ // Convert hexadecimal Unicode codepoint notation to a string.
+ s := charRe.ReplaceAllStringFunc(r.Value, replaceUnicode)
+ r.Value = s
+ if s == "" {
+ if len(r.Any) != 1 {
+ return "", emptyValueError
+ }
+ r.Value = fmt.Sprintf(specialAnchor, r.Any[0].XMLName.Local)
+ r.Any = nil
+ } else if len(r.Any) != 0 {
+ return "", fmt.Errorf("cldr: XML elements found in collation rule: %v", r.Any)
+ }
+ return r.Value, nil
+}
+
+func (r rule) process(p RuleProcessor, name, context, extend string) error {
+ v, err := r.value()
+ if err != nil {
+ return err
+ }
+ switch name {
+ case "p", "s", "t", "i":
+ if strings.HasPrefix(v, cldrIndex) {
+ p.Index(v[len(cldrIndex):])
+ return nil
+ }
+ if err := p.Insert(lmap[name[0]], v, context, extend); err != nil {
+ return err
+ }
+ case "pc", "sc", "tc", "ic":
+ level := lmap[name[0]]
+ for _, s := range v {
+ if err := p.Insert(level, string(s), context, extend); err != nil {
+ return err
+ }
+ }
+ default:
+ return fmt.Errorf("cldr: unsupported tag: %q", name)
+ }
+ return nil
+}
+
+// processXML parses the format of CLDR versions 24 and older.
+func (c Collation) processXML(p RuleProcessor) (err error) {
+ // Collation is generated and defined in xml.go.
+ var v string
+ for _, r := range c.Rules.Any {
+ switch r.XMLName.Local {
+ case "reset":
+ level := 0
+ switch r.Before {
+ case "primary", "1":
+ level = 1
+ case "secondary", "2":
+ level = 2
+ case "tertiary", "3":
+ level = 3
+ case "":
+ default:
+ return fmt.Errorf("cldr: unknown level %q", r.Before)
+ }
+ v, err = r.value()
+ if err == nil {
+ err = p.Reset(v, level)
+ }
+ case "x":
+ var context, extend string
+ for _, r1 := range r.Any {
+ v, err = r1.value()
+ switch r1.XMLName.Local {
+ case "context":
+ context = v
+ case "extend":
+ extend = v
+ }
+ }
+ for _, r1 := range r.Any {
+ if t := r1.XMLName.Local; t == "context" || t == "extend" {
+ continue
+ }
+ r1.rule.process(p, r1.XMLName.Local, context, extend)
+ }
+ default:
+ err = r.rule.process(p, r.XMLName.Local, "", "")
+ }
+ if err != nil {
+ return err
+ }
+ }
+ return nil
+}
diff --git a/vendor/golang.org/x/text/unicode/cldr/decode.go b/vendor/golang.org/x/text/unicode/cldr/decode.go
new file mode 100644
index 000000000..e5ee4aed1
--- /dev/null
+++ b/vendor/golang.org/x/text/unicode/cldr/decode.go
@@ -0,0 +1,171 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package cldr
+
+import (
+ "archive/zip"
+ "bytes"
+ "encoding/xml"
+ "fmt"
+ "io"
+ "io/ioutil"
+ "log"
+ "os"
+ "path/filepath"
+ "regexp"
+)
+
+// A Decoder loads an archive of CLDR data.
+type Decoder struct {
+ dirFilter []string
+ sectionFilter []string
+ loader Loader
+ cldr *CLDR
+ curLocale string
+}
+
+// SetSectionFilter takes a list top-level LDML element names to which
+// evaluation of LDML should be limited. It automatically calls SetDirFilter.
+func (d *Decoder) SetSectionFilter(filter ...string) {
+ d.sectionFilter = filter
+ // TODO: automatically set dir filter
+}
+
+// SetDirFilter limits the loading of LDML XML files of the specied directories.
+// Note that sections may be split across directories differently for different CLDR versions.
+// For more robust code, use SetSectionFilter.
+func (d *Decoder) SetDirFilter(dir ...string) {
+ d.dirFilter = dir
+}
+
+// A Loader provides access to the files of a CLDR archive.
+type Loader interface {
+ Len() int
+ Path(i int) string
+ Reader(i int) (io.ReadCloser, error)
+}
+
+var fileRe = regexp.MustCompile(".*/(.*)/(.*)\\.xml")
+
+// Decode loads and decodes the files represented by l.
+func (d *Decoder) Decode(l Loader) (cldr *CLDR, err error) {
+ d.cldr = makeCLDR()
+ for i := 0; i < l.Len(); i++ {
+ fname := l.Path(i)
+ if m := fileRe.FindStringSubmatch(fname); m != nil {
+ if len(d.dirFilter) > 0 && !in(d.dirFilter, m[1]) {
+ continue
+ }
+ var r io.Reader
+ if r, err = l.Reader(i); err == nil {
+ err = d.decode(m[1], m[2], r)
+ }
+ if err != nil {
+ return nil, err
+ }
+ }
+ }
+ d.cldr.finalize(d.sectionFilter)
+ return d.cldr, nil
+}
+
+func (d *Decoder) decode(dir, id string, r io.Reader) error {
+ var v interface{}
+ var l *LDML
+ cldr := d.cldr
+ switch {
+ case dir == "supplemental":
+ v = cldr.supp
+ case dir == "transforms":
+ return nil
+ case dir == "bcp47":
+ v = cldr.bcp47
+ case dir == "validity":
+ return nil
+ default:
+ ok := false
+ if v, ok = cldr.locale[id]; !ok {
+ l = &LDML{}
+ v, cldr.locale[id] = l, l
+ }
+ }
+ x := xml.NewDecoder(r)
+ if err := x.Decode(v); err != nil {
+ log.Printf("%s/%s: %v", dir, id, err)
+ return err
+ }
+ if l != nil {
+ if l.Identity == nil {
+ return fmt.Errorf("%s/%s: missing identity element", dir, id)
+ }
+ // TODO: verify when CLDR bug http://unicode.org/cldr/trac/ticket/8970
+ // is resolved.
+ // path := strings.Split(id, "_")
+ // if lang := l.Identity.Language.Type; lang != path[0] {
+ // return fmt.Errorf("%s/%s: language was %s; want %s", dir, id, lang, path[0])
+ // }
+ }
+ return nil
+}
+
+type pathLoader []string
+
+func makePathLoader(path string) (pl pathLoader, err error) {
+ err = filepath.Walk(path, func(path string, _ os.FileInfo, err error) error {
+ pl = append(pl, path)
+ return err
+ })
+ return pl, err
+}
+
+func (pl pathLoader) Len() int {
+ return len(pl)
+}
+
+func (pl pathLoader) Path(i int) string {
+ return pl[i]
+}
+
+func (pl pathLoader) Reader(i int) (io.ReadCloser, error) {
+ return os.Open(pl[i])
+}
+
+// DecodePath loads CLDR data from the given path.
+func (d *Decoder) DecodePath(path string) (cldr *CLDR, err error) {
+ loader, err := makePathLoader(path)
+ if err != nil {
+ return nil, err
+ }
+ return d.Decode(loader)
+}
+
+type zipLoader struct {
+ r *zip.Reader
+}
+
+func (zl zipLoader) Len() int {
+ return len(zl.r.File)
+}
+
+func (zl zipLoader) Path(i int) string {
+ return zl.r.File[i].Name
+}
+
+func (zl zipLoader) Reader(i int) (io.ReadCloser, error) {
+ return zl.r.File[i].Open()
+}
+
+// DecodeZip loads CLDR data from the zip archive for which r is the source.
+func (d *Decoder) DecodeZip(r io.Reader) (cldr *CLDR, err error) {
+ buffer, err := ioutil.ReadAll(r)
+ if err != nil {
+ return nil, err
+ }
+ archive, err := zip.NewReader(bytes.NewReader(buffer), int64(len(buffer)))
+ if err != nil {
+ return nil, err
+ }
+ return d.Decode(zipLoader{archive})
+}
diff --git a/vendor/golang.org/x/text/unicode/cldr/makexml.go b/vendor/golang.org/x/text/unicode/cldr/makexml.go
new file mode 100644
index 000000000..6114d01cb
--- /dev/null
+++ b/vendor/golang.org/x/text/unicode/cldr/makexml.go
@@ -0,0 +1,400 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build ignore
+
+// This tool generates types for the various XML formats of CLDR.
+package main
+
+import (
+ "archive/zip"
+ "bytes"
+ "encoding/xml"
+ "flag"
+ "fmt"
+ "io"
+ "io/ioutil"
+ "log"
+ "os"
+ "regexp"
+ "strings"
+
+ "golang.org/x/text/internal/gen"
+)
+
+var outputFile = flag.String("output", "xml.go", "output file name")
+
+func main() {
+ flag.Parse()
+
+ r := gen.OpenCLDRCoreZip()
+ buffer, err := ioutil.ReadAll(r)
+ if err != nil {
+ log.Fatal("Could not read zip file")
+ }
+ r.Close()
+ z, err := zip.NewReader(bytes.NewReader(buffer), int64(len(buffer)))
+ if err != nil {
+ log.Fatalf("Could not read zip archive: %v", err)
+ }
+
+ var buf bytes.Buffer
+
+ version := gen.CLDRVersion()
+
+ for _, dtd := range files {
+ for _, f := range z.File {
+ if strings.HasSuffix(f.Name, dtd.file+".dtd") {
+ r, err := f.Open()
+ failOnError(err)
+
+ b := makeBuilder(&buf, dtd)
+ b.parseDTD(r)
+ b.resolve(b.index[dtd.top[0]])
+ b.write()
+ if b.version != "" && version != b.version {
+ println(f.Name)
+ log.Fatalf("main: inconsistent versions: found %s; want %s", b.version, version)
+ }
+ break
+ }
+ }
+ }
+ fmt.Fprintln(&buf, "// Version is the version of CLDR from which the XML definitions are generated.")
+ fmt.Fprintf(&buf, "const Version = %q\n", version)
+
+ gen.WriteGoFile(*outputFile, "cldr", buf.Bytes())
+}
+
+func failOnError(err error) {
+ if err != nil {
+ log.New(os.Stderr, "", log.Lshortfile).Output(2, err.Error())
+ os.Exit(1)
+ }
+}
+
+// configuration data per DTD type
+type dtd struct {
+ file string // base file name
+ root string // Go name of the root XML element
+ top []string // create a different type for this section
+
+ skipElem []string // hard-coded or deprecated elements
+ skipAttr []string // attributes to exclude
+ predefined []string // hard-coded elements exist of the form <name>Elem
+ forceRepeat []string // elements to make slices despite DTD
+}
+
+var files = []dtd{
+ {
+ file: "ldmlBCP47",
+ root: "LDMLBCP47",
+ top: []string{"ldmlBCP47"},
+ skipElem: []string{
+ "cldrVersion", // deprecated, not used
+ },
+ },
+ {
+ file: "ldmlSupplemental",
+ root: "SupplementalData",
+ top: []string{"supplementalData"},
+ skipElem: []string{
+ "cldrVersion", // deprecated, not used
+ },
+ forceRepeat: []string{
+ "plurals", // data defined in plurals.xml and ordinals.xml
+ },
+ },
+ {
+ file: "ldml",
+ root: "LDML",
+ top: []string{
+ "ldml", "collation", "calendar", "timeZoneNames", "localeDisplayNames", "numbers",
+ },
+ skipElem: []string{
+ "cp", // not used anywhere
+ "special", // not used anywhere
+ "fallback", // deprecated, not used
+ "alias", // in Common
+ "default", // in Common
+ },
+ skipAttr: []string{
+ "hiraganaQuarternary", // typo in DTD, correct version included as well
+ },
+ predefined: []string{"rules"},
+ },
+}
+
+var comments = map[string]string{
+ "ldmlBCP47": `
+// LDMLBCP47 holds information on allowable values for various variables in LDML.
+`,
+ "supplementalData": `
+// SupplementalData holds information relevant for internationalization
+// and proper use of CLDR, but that is not contained in the locale hierarchy.
+`,
+ "ldml": `
+// LDML is the top-level type for locale-specific data.
+`,
+ "collation": `
+// Collation contains rules that specify a certain sort-order,
+// as a tailoring of the root order.
+// The parsed rules are obtained by passing a RuleProcessor to Collation's
+// Process method.
+`,
+ "calendar": `
+// Calendar specifies the fields used for formatting and parsing dates and times.
+// The month and quarter names are identified numerically, starting at 1.
+// The day (of the week) names are identified with short strings, since there is
+// no universally-accepted numeric designation.
+`,
+ "dates": `
+// Dates contains information regarding the format and parsing of dates and times.
+`,
+ "localeDisplayNames": `
+// LocaleDisplayNames specifies localized display names for for scripts, languages,
+// countries, currencies, and variants.
+`,
+ "numbers": `
+// Numbers supplies information for formatting and parsing numbers and currencies.
+`,
+}
+
+type element struct {
+ name string // XML element name
+ category string // elements contained by this element
+ signature string // category + attrKey*
+
+ attr []*attribute // attributes supported by this element.
+ sub []struct { // parsed and evaluated sub elements of this element.
+ e *element
+ repeat bool // true if the element needs to be a slice
+ }
+
+ resolved bool // prevent multiple resolutions of this element.
+}
+
+type attribute struct {
+ name string
+ key string
+ list []string
+
+ tag string // Go tag
+}
+
+var (
+ reHead = regexp.MustCompile(` *(\w+) +([\w\-]+)`)
+ reAttr = regexp.MustCompile(` *(\w+) *(?:(\w+)|\(([\w\- \|]+)\)) *(?:#([A-Z]*) *(?:\"([\.\d+])\")?)? *("[\w\-:]*")?`)
+ reElem = regexp.MustCompile(`^ *(EMPTY|ANY|\(.*\)[\*\+\?]?) *$`)
+ reToken = regexp.MustCompile(`\w\-`)
+)
+
+// builder is used to read in the DTD files from CLDR and generate Go code
+// to be used with the encoding/xml package.
+type builder struct {
+ w io.Writer
+ index map[string]*element
+ elem []*element
+ info dtd
+ version string
+}
+
+func makeBuilder(w io.Writer, d dtd) builder {
+ return builder{
+ w: w,
+ index: make(map[string]*element),
+ elem: []*element{},
+ info: d,
+ }
+}
+
+// parseDTD parses a DTD file.
+func (b *builder) parseDTD(r io.Reader) {
+ for d := xml.NewDecoder(r); ; {
+ t, err := d.Token()
+ if t == nil {
+ break
+ }
+ failOnError(err)
+ dir, ok := t.(xml.Directive)
+ if !ok {
+ continue
+ }
+ m := reHead.FindSubmatch(dir)
+ dir = dir[len(m[0]):]
+ ename := string(m[2])
+ el, elementFound := b.index[ename]
+ switch string(m[1]) {
+ case "ELEMENT":
+ if elementFound {
+ log.Fatal("parseDTD: duplicate entry for element %q", ename)
+ }
+ m := reElem.FindSubmatch(dir)
+ if m == nil {
+ log.Fatalf("parseDTD: invalid element %q", string(dir))
+ }
+ if len(m[0]) != len(dir) {
+ log.Fatal("parseDTD: invalid element %q", string(dir), len(dir), len(m[0]), string(m[0]))
+ }
+ s := string(m[1])
+ el = &element{
+ name: ename,
+ category: s,
+ }
+ b.index[ename] = el
+ case "ATTLIST":
+ if !elementFound {
+ log.Fatalf("parseDTD: unknown element %q", ename)
+ }
+ s := string(dir)
+ m := reAttr.FindStringSubmatch(s)
+ if m == nil {
+ log.Fatal(fmt.Errorf("parseDTD: invalid attribute %q", string(dir)))
+ }
+ if m[4] == "FIXED" {
+ b.version = m[5]
+ } else {
+ switch m[1] {
+ case "draft", "references", "alt", "validSubLocales", "standard" /* in Common */ :
+ case "type", "choice":
+ default:
+ el.attr = append(el.attr, &attribute{
+ name: m[1],
+ key: s,
+ list: reToken.FindAllString(m[3], -1),
+ })
+ el.signature = fmt.Sprintf("%s=%s+%s", el.signature, m[1], m[2])
+ }
+ }
+ }
+ }
+}
+
+var reCat = regexp.MustCompile(`[ ,\|]*(?:(\(|\)|\#?[\w_-]+)([\*\+\?]?))?`)
+
+// resolve takes a parsed element and converts it into structured data
+// that can be used to generate the XML code.
+func (b *builder) resolve(e *element) {
+ if e.resolved {
+ return
+ }
+ b.elem = append(b.elem, e)
+ e.resolved = true
+ s := e.category
+ found := make(map[string]bool)
+ sequenceStart := []int{}
+ for len(s) > 0 {
+ m := reCat.FindStringSubmatch(s)
+ if m == nil {
+ log.Fatalf("%s: invalid category string %q", e.name, s)
+ }
+ repeat := m[2] == "*" || m[2] == "+" || in(b.info.forceRepeat, m[1])
+ switch m[1] {
+ case "":
+ case "(":
+ sequenceStart = append(sequenceStart, len(e.sub))
+ case ")":
+ if len(sequenceStart) == 0 {
+ log.Fatalf("%s: unmatched closing parenthesis", e.name)
+ }
+ for i := sequenceStart[len(sequenceStart)-1]; i < len(e.sub); i++ {
+ e.sub[i].repeat = e.sub[i].repeat || repeat
+ }
+ sequenceStart = sequenceStart[:len(sequenceStart)-1]
+ default:
+ if in(b.info.skipElem, m[1]) {
+ } else if sub, ok := b.index[m[1]]; ok {
+ if !found[sub.name] {
+ e.sub = append(e.sub, struct {
+ e *element
+ repeat bool
+ }{sub, repeat})
+ found[sub.name] = true
+ b.resolve(sub)
+ }
+ } else if m[1] == "#PCDATA" || m[1] == "ANY" {
+ } else if m[1] != "EMPTY" {
+ log.Fatalf("resolve:%s: element %q not found", e.name, m[1])
+ }
+ }
+ s = s[len(m[0]):]
+ }
+}
+
+// return true if s is contained in set.
+func in(set []string, s string) bool {
+ for _, v := range set {
+ if v == s {
+ return true
+ }
+ }
+ return false
+}
+
+var repl = strings.NewReplacer("-", " ", "_", " ")
+
+// title puts the first character or each character following '_' in title case and
+// removes all occurrences of '_'.
+func title(s string) string {
+ return strings.Replace(strings.Title(repl.Replace(s)), " ", "", -1)
+}
+
+// writeElem generates Go code for a single element, recursively.
+func (b *builder) writeElem(tab int, e *element) {
+ p := func(f string, x ...interface{}) {
+ f = strings.Replace(f, "\n", "\n"+strings.Repeat("\t", tab), -1)
+ fmt.Fprintf(b.w, f, x...)
+ }
+ if len(e.sub) == 0 && len(e.attr) == 0 {
+ p("Common")
+ return
+ }
+ p("struct {")
+ tab++
+ p("\nCommon")
+ for _, attr := range e.attr {
+ if !in(b.info.skipAttr, attr.name) {
+ p("\n%s string `xml:\"%s,attr\"`", title(attr.name), attr.name)
+ }
+ }
+ for _, sub := range e.sub {
+ if in(b.info.predefined, sub.e.name) {
+ p("\n%sElem", sub.e.name)
+ continue
+ }
+ if in(b.info.skipElem, sub.e.name) {
+ continue
+ }
+ p("\n%s ", title(sub.e.name))
+ if sub.repeat {
+ p("[]")
+ }
+ p("*")
+ if in(b.info.top, sub.e.name) {
+ p(title(sub.e.name))
+ } else {
+ b.writeElem(tab, sub.e)
+ }
+ p(" `xml:\"%s\"`", sub.e.name)
+ }
+ tab--
+ p("\n}")
+}
+
+// write generates the Go XML code.
+func (b *builder) write() {
+ for i, name := range b.info.top {
+ e := b.index[name]
+ if e != nil {
+ fmt.Fprintf(b.w, comments[name])
+ name := title(e.name)
+ if i == 0 {
+ name = b.info.root
+ }
+ fmt.Fprintf(b.w, "type %s ", name)
+ b.writeElem(0, e)
+ fmt.Fprint(b.w, "\n")
+ }
+ }
+}
diff --git a/vendor/golang.org/x/text/unicode/cldr/resolve.go b/vendor/golang.org/x/text/unicode/cldr/resolve.go
new file mode 100644
index 000000000..691b5903f
--- /dev/null
+++ b/vendor/golang.org/x/text/unicode/cldr/resolve.go
@@ -0,0 +1,602 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package cldr
+
+// This file implements the various inheritance constructs defined by LDML.
+// See http://www.unicode.org/reports/tr35/#Inheritance_and_Validity
+// for more details.
+
+import (
+ "fmt"
+ "log"
+ "reflect"
+ "regexp"
+ "sort"
+ "strings"
+)
+
+// fieldIter iterates over fields in a struct. It includes
+// fields of embedded structs.
+type fieldIter struct {
+ v reflect.Value
+ index, n []int
+}
+
+func iter(v reflect.Value) fieldIter {
+ if v.Kind() != reflect.Struct {
+ log.Panicf("value %v must be a struct", v)
+ }
+ i := fieldIter{
+ v: v,
+ index: []int{0},
+ n: []int{v.NumField()},
+ }
+ i.descent()
+ return i
+}
+
+func (i *fieldIter) descent() {
+ for f := i.field(); f.Anonymous && f.Type.NumField() > 0; f = i.field() {
+ i.index = append(i.index, 0)
+ i.n = append(i.n, f.Type.NumField())
+ }
+}
+
+func (i *fieldIter) done() bool {
+ return len(i.index) == 1 && i.index[0] >= i.n[0]
+}
+
+func skip(f reflect.StructField) bool {
+ return !f.Anonymous && (f.Name[0] < 'A' || f.Name[0] > 'Z')
+}
+
+func (i *fieldIter) next() {
+ for {
+ k := len(i.index) - 1
+ i.index[k]++
+ if i.index[k] < i.n[k] {
+ if !skip(i.field()) {
+ break
+ }
+ } else {
+ if k == 0 {
+ return
+ }
+ i.index = i.index[:k]
+ i.n = i.n[:k]
+ }
+ }
+ i.descent()
+}
+
+func (i *fieldIter) value() reflect.Value {
+ return i.v.FieldByIndex(i.index)
+}
+
+func (i *fieldIter) field() reflect.StructField {
+ return i.v.Type().FieldByIndex(i.index)
+}
+
+type visitor func(v reflect.Value) error
+
+var stopDescent = fmt.Errorf("do not recurse")
+
+func (f visitor) visit(x interface{}) error {
+ return f.visitRec(reflect.ValueOf(x))
+}
+
+// visit recursively calls f on all nodes in v.
+func (f visitor) visitRec(v reflect.Value) error {
+ if v.Kind() == reflect.Ptr {
+ if v.IsNil() {
+ return nil
+ }
+ return f.visitRec(v.Elem())
+ }
+ if err := f(v); err != nil {
+ if err == stopDescent {
+ return nil
+ }
+ return err
+ }
+ switch v.Kind() {
+ case reflect.Struct:
+ for i := iter(v); !i.done(); i.next() {
+ if err := f.visitRec(i.value()); err != nil {
+ return err
+ }
+ }
+ case reflect.Slice:
+ for i := 0; i < v.Len(); i++ {
+ if err := f.visitRec(v.Index(i)); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+}
+
+// getPath is used for error reporting purposes only.
+func getPath(e Elem) string {
+ if e == nil {
+ return "<nil>"
+ }
+ if e.enclosing() == nil {
+ return e.GetCommon().name
+ }
+ if e.GetCommon().Type == "" {
+ return fmt.Sprintf("%s.%s", getPath(e.enclosing()), e.GetCommon().name)
+ }
+ return fmt.Sprintf("%s.%s[type=%s]", getPath(e.enclosing()), e.GetCommon().name, e.GetCommon().Type)
+}
+
+// xmlName returns the xml name of the element or attribute
+func xmlName(f reflect.StructField) (name string, attr bool) {
+ tags := strings.Split(f.Tag.Get("xml"), ",")
+ for _, s := range tags {
+ attr = attr || s == "attr"
+ }
+ return tags[0], attr
+}
+
+func findField(v reflect.Value, key string) (reflect.Value, error) {
+ v = reflect.Indirect(v)
+ for i := iter(v); !i.done(); i.next() {
+ if n, _ := xmlName(i.field()); n == key {
+ return i.value(), nil
+ }
+ }
+ return reflect.Value{}, fmt.Errorf("cldr: no field %q in element %#v", key, v.Interface())
+}
+
+var xpathPart = regexp.MustCompile(`(\pL+)(?:\[@(\pL+)='([\w-]+)'\])?`)
+
+func walkXPath(e Elem, path string) (res Elem, err error) {
+ for _, c := range strings.Split(path, "/") {
+ if c == ".." {
+ if e = e.enclosing(); e == nil {
+ panic("path ..")
+ return nil, fmt.Errorf(`cldr: ".." moves past root in path %q`, path)
+ }
+ continue
+ } else if c == "" {
+ continue
+ }
+ m := xpathPart.FindStringSubmatch(c)
+ if len(m) == 0 || len(m[0]) != len(c) {
+ return nil, fmt.Errorf("cldr: syntax error in path component %q", c)
+ }
+ v, err := findField(reflect.ValueOf(e), m[1])
+ if err != nil {
+ return nil, err
+ }
+ switch v.Kind() {
+ case reflect.Slice:
+ i := 0
+ if m[2] != "" || v.Len() > 1 {
+ if m[2] == "" {
+ m[2] = "type"
+ if m[3] = e.GetCommon().Default(); m[3] == "" {
+ return nil, fmt.Errorf("cldr: type selector or default value needed for element %s", m[1])
+ }
+ }
+ for ; i < v.Len(); i++ {
+ vi := v.Index(i)
+ key, err := findField(vi.Elem(), m[2])
+ if err != nil {
+ return nil, err
+ }
+ key = reflect.Indirect(key)
+ if key.Kind() == reflect.String && key.String() == m[3] {
+ break
+ }
+ }
+ }
+ if i == v.Len() || v.Index(i).IsNil() {
+ return nil, fmt.Errorf("no %s found with %s==%s", m[1], m[2], m[3])
+ }
+ e = v.Index(i).Interface().(Elem)
+ case reflect.Ptr:
+ if v.IsNil() {
+ return nil, fmt.Errorf("cldr: element %q not found within element %q", m[1], e.GetCommon().name)
+ }
+ var ok bool
+ if e, ok = v.Interface().(Elem); !ok {
+ return nil, fmt.Errorf("cldr: %q is not an XML element", m[1])
+ } else if m[2] != "" || m[3] != "" {
+ return nil, fmt.Errorf("cldr: no type selector allowed for element %s", m[1])
+ }
+ default:
+ return nil, fmt.Errorf("cldr: %q is not an XML element", m[1])
+ }
+ }
+ return e, nil
+}
+
+const absPrefix = "//ldml/"
+
+func (cldr *CLDR) resolveAlias(e Elem, src, path string) (res Elem, err error) {
+ if src != "locale" {
+ if !strings.HasPrefix(path, absPrefix) {
+ return nil, fmt.Errorf("cldr: expected absolute path, found %q", path)
+ }
+ path = path[len(absPrefix):]
+ if e, err = cldr.resolve(src); err != nil {
+ return nil, err
+ }
+ }
+ return walkXPath(e, path)
+}
+
+func (cldr *CLDR) resolveAndMergeAlias(e Elem) error {
+ alias := e.GetCommon().Alias
+ if alias == nil {
+ return nil
+ }
+ a, err := cldr.resolveAlias(e, alias.Source, alias.Path)
+ if err != nil {
+ return fmt.Errorf("%v: error evaluating path %q: %v", getPath(e), alias.Path, err)
+ }
+ // Ensure alias node was already evaluated. TODO: avoid double evaluation.
+ err = cldr.resolveAndMergeAlias(a)
+ v := reflect.ValueOf(e).Elem()
+ for i := iter(reflect.ValueOf(a).Elem()); !i.done(); i.next() {
+ if vv := i.value(); vv.Kind() != reflect.Ptr || !vv.IsNil() {
+ if _, attr := xmlName(i.field()); !attr {
+ v.FieldByIndex(i.index).Set(vv)
+ }
+ }
+ }
+ return err
+}
+
+func (cldr *CLDR) aliasResolver() visitor {
+ return func(v reflect.Value) (err error) {
+ if e, ok := v.Addr().Interface().(Elem); ok {
+ err = cldr.resolveAndMergeAlias(e)
+ if err == nil && blocking[e.GetCommon().name] {
+ return stopDescent
+ }
+ }
+ return err
+ }
+}
+
+// elements within blocking elements do not inherit.
+// Taken from CLDR's supplementalMetaData.xml.
+var blocking = map[string]bool{
+ "identity": true,
+ "supplementalData": true,
+ "cldrTest": true,
+ "collation": true,
+ "transform": true,
+}
+
+// Distinguishing attributes affect inheritance; two elements with different
+// distinguishing attributes are treated as different for purposes of inheritance,
+// except when such attributes occur in the indicated elements.
+// Taken from CLDR's supplementalMetaData.xml.
+var distinguishing = map[string][]string{
+ "key": nil,
+ "request_id": nil,
+ "id": nil,
+ "registry": nil,
+ "alt": nil,
+ "iso4217": nil,
+ "iso3166": nil,
+ "mzone": nil,
+ "from": nil,
+ "to": nil,
+ "type": []string{
+ "abbreviationFallback",
+ "default",
+ "mapping",
+ "measurementSystem",
+ "preferenceOrdering",
+ },
+ "numberSystem": nil,
+}
+
+func in(set []string, s string) bool {
+ for _, v := range set {
+ if v == s {
+ return true
+ }
+ }
+ return false
+}
+
+// attrKey computes a key based on the distinguishable attributes of
+// an element and it's values.
+func attrKey(v reflect.Value, exclude ...string) string {
+ parts := []string{}
+ ename := v.Interface().(Elem).GetCommon().name
+ v = v.Elem()
+ for i := iter(v); !i.done(); i.next() {
+ if name, attr := xmlName(i.field()); attr {
+ if except, ok := distinguishing[name]; ok && !in(exclude, name) && !in(except, ename) {
+ v := i.value()
+ if v.Kind() == reflect.Ptr {
+ v = v.Elem()
+ }
+ if v.IsValid() {
+ parts = append(parts, fmt.Sprintf("%s=%s", name, v.String()))
+ }
+ }
+ }
+ }
+ sort.Strings(parts)
+ return strings.Join(parts, ";")
+}
+
+// Key returns a key for e derived from all distinguishing attributes
+// except those specified by exclude.
+func Key(e Elem, exclude ...string) string {
+ return attrKey(reflect.ValueOf(e), exclude...)
+}
+
+// linkEnclosing sets the enclosing element as well as the name
+// for all sub-elements of child, recursively.
+func linkEnclosing(parent, child Elem) {
+ child.setEnclosing(parent)
+ v := reflect.ValueOf(child).Elem()
+ for i := iter(v); !i.done(); i.next() {
+ vf := i.value()
+ if vf.Kind() == reflect.Slice {
+ for j := 0; j < vf.Len(); j++ {
+ linkEnclosing(child, vf.Index(j).Interface().(Elem))
+ }
+ } else if vf.Kind() == reflect.Ptr && !vf.IsNil() && vf.Elem().Kind() == reflect.Struct {
+ linkEnclosing(child, vf.Interface().(Elem))
+ }
+ }
+}
+
+func setNames(e Elem, name string) {
+ e.setName(name)
+ v := reflect.ValueOf(e).Elem()
+ for i := iter(v); !i.done(); i.next() {
+ vf := i.value()
+ name, _ = xmlName(i.field())
+ if vf.Kind() == reflect.Slice {
+ for j := 0; j < vf.Len(); j++ {
+ setNames(vf.Index(j).Interface().(Elem), name)
+ }
+ } else if vf.Kind() == reflect.Ptr && !vf.IsNil() && vf.Elem().Kind() == reflect.Struct {
+ setNames(vf.Interface().(Elem), name)
+ }
+ }
+}
+
+// deepCopy copies elements of v recursively. All elements of v that may
+// be modified by inheritance are explicitly copied.
+func deepCopy(v reflect.Value) reflect.Value {
+ switch v.Kind() {
+ case reflect.Ptr:
+ if v.IsNil() || v.Elem().Kind() != reflect.Struct {
+ return v
+ }
+ nv := reflect.New(v.Elem().Type())
+ nv.Elem().Set(v.Elem())
+ deepCopyRec(nv.Elem(), v.Elem())
+ return nv
+ case reflect.Slice:
+ nv := reflect.MakeSlice(v.Type(), v.Len(), v.Len())
+ for i := 0; i < v.Len(); i++ {
+ deepCopyRec(nv.Index(i), v.Index(i))
+ }
+ return nv
+ }
+ panic("deepCopy: must be called with pointer or slice")
+}
+
+// deepCopyRec is only called by deepCopy.
+func deepCopyRec(nv, v reflect.Value) {
+ if v.Kind() == reflect.Struct {
+ t := v.Type()
+ for i := 0; i < v.NumField(); i++ {
+ if name, attr := xmlName(t.Field(i)); name != "" && !attr {
+ deepCopyRec(nv.Field(i), v.Field(i))
+ }
+ }
+ } else {
+ nv.Set(deepCopy(v))
+ }
+}
+
+// newNode is used to insert a missing node during inheritance.
+func (cldr *CLDR) newNode(v, enc reflect.Value) reflect.Value {
+ n := reflect.New(v.Type())
+ for i := iter(v); !i.done(); i.next() {
+ if name, attr := xmlName(i.field()); name == "" || attr {
+ n.Elem().FieldByIndex(i.index).Set(i.value())
+ }
+ }
+ n.Interface().(Elem).GetCommon().setEnclosing(enc.Addr().Interface().(Elem))
+ return n
+}
+
+// v, parent must be pointers to struct
+func (cldr *CLDR) inheritFields(v, parent reflect.Value) (res reflect.Value, err error) {
+ t := v.Type()
+ nv := reflect.New(t)
+ nv.Elem().Set(v)
+ for i := iter(v); !i.done(); i.next() {
+ vf := i.value()
+ f := i.field()
+ name, attr := xmlName(f)
+ if name == "" || attr {
+ continue
+ }
+ pf := parent.FieldByIndex(i.index)
+ if blocking[name] {
+ if vf.IsNil() {
+ vf = pf
+ }
+ nv.Elem().FieldByIndex(i.index).Set(deepCopy(vf))
+ continue
+ }
+ switch f.Type.Kind() {
+ case reflect.Ptr:
+ if f.Type.Elem().Kind() == reflect.Struct {
+ if !vf.IsNil() {
+ if vf, err = cldr.inheritStructPtr(vf, pf); err != nil {
+ return reflect.Value{}, err
+ }
+ vf.Interface().(Elem).setEnclosing(nv.Interface().(Elem))
+ nv.Elem().FieldByIndex(i.index).Set(vf)
+ } else if !pf.IsNil() {
+ n := cldr.newNode(pf.Elem(), v)
+ if vf, err = cldr.inheritStructPtr(n, pf); err != nil {
+ return reflect.Value{}, err
+ }
+ vf.Interface().(Elem).setEnclosing(nv.Interface().(Elem))
+ nv.Elem().FieldByIndex(i.index).Set(vf)
+ }
+ }
+ case reflect.Slice:
+ vf, err := cldr.inheritSlice(nv.Elem(), vf, pf)
+ if err != nil {
+ return reflect.Zero(t), err
+ }
+ nv.Elem().FieldByIndex(i.index).Set(vf)
+ }
+ }
+ return nv, nil
+}
+
+func root(e Elem) *LDML {
+ for ; e.enclosing() != nil; e = e.enclosing() {
+ }
+ return e.(*LDML)
+}
+
+// inheritStructPtr first merges possible aliases in with v and then inherits
+// any underspecified elements from parent.
+func (cldr *CLDR) inheritStructPtr(v, parent reflect.Value) (r reflect.Value, err error) {
+ if !v.IsNil() {
+ e := v.Interface().(Elem).GetCommon()
+ alias := e.Alias
+ if alias == nil && !parent.IsNil() {
+ alias = parent.Interface().(Elem).GetCommon().Alias
+ }
+ if alias != nil {
+ a, err := cldr.resolveAlias(v.Interface().(Elem), alias.Source, alias.Path)
+ if a != nil {
+ if v, err = cldr.inheritFields(v.Elem(), reflect.ValueOf(a).Elem()); err != nil {
+ return reflect.Value{}, err
+ }
+ }
+ }
+ if !parent.IsNil() {
+ return cldr.inheritFields(v.Elem(), parent.Elem())
+ }
+ } else if parent.IsNil() {
+ panic("should not reach here")
+ }
+ return v, nil
+}
+
+// Must be slice of struct pointers.
+func (cldr *CLDR) inheritSlice(enc, v, parent reflect.Value) (res reflect.Value, err error) {
+ t := v.Type()
+ index := make(map[string]reflect.Value)
+ if !v.IsNil() {
+ for i := 0; i < v.Len(); i++ {
+ vi := v.Index(i)
+ key := attrKey(vi)
+ index[key] = vi
+ }
+ }
+ if !parent.IsNil() {
+ for i := 0; i < parent.Len(); i++ {
+ vi := parent.Index(i)
+ key := attrKey(vi)
+ if w, ok := index[key]; ok {
+ index[key], err = cldr.inheritStructPtr(w, vi)
+ } else {
+ n := cldr.newNode(vi.Elem(), enc)
+ index[key], err = cldr.inheritStructPtr(n, vi)
+ }
+ index[key].Interface().(Elem).setEnclosing(enc.Addr().Interface().(Elem))
+ if err != nil {
+ return v, err
+ }
+ }
+ }
+ keys := make([]string, 0, len(index))
+ for k, _ := range index {
+ keys = append(keys, k)
+ }
+ sort.Strings(keys)
+ sl := reflect.MakeSlice(t, len(index), len(index))
+ for i, k := range keys {
+ sl.Index(i).Set(index[k])
+ }
+ return sl, nil
+}
+
+func parentLocale(loc string) string {
+ parts := strings.Split(loc, "_")
+ if len(parts) == 1 {
+ return "root"
+ }
+ parts = parts[:len(parts)-1]
+ key := strings.Join(parts, "_")
+ return key
+}
+
+func (cldr *CLDR) resolve(loc string) (res *LDML, err error) {
+ if r := cldr.resolved[loc]; r != nil {
+ return r, nil
+ }
+ x := cldr.RawLDML(loc)
+ if x == nil {
+ return nil, fmt.Errorf("cldr: unknown locale %q", loc)
+ }
+ var v reflect.Value
+ if loc == "root" {
+ x = deepCopy(reflect.ValueOf(x)).Interface().(*LDML)
+ linkEnclosing(nil, x)
+ err = cldr.aliasResolver().visit(x)
+ } else {
+ key := parentLocale(loc)
+ var parent *LDML
+ for ; cldr.locale[key] == nil; key = parentLocale(key) {
+ }
+ if parent, err = cldr.resolve(key); err != nil {
+ return nil, err
+ }
+ v, err = cldr.inheritFields(reflect.ValueOf(x).Elem(), reflect.ValueOf(parent).Elem())
+ x = v.Interface().(*LDML)
+ linkEnclosing(nil, x)
+ }
+ if err != nil {
+ return nil, err
+ }
+ cldr.resolved[loc] = x
+ return x, err
+}
+
+// finalize finalizes the initialization of the raw LDML structs. It also
+// removed unwanted fields, as specified by filter, so that they will not
+// be unnecessarily evaluated.
+func (cldr *CLDR) finalize(filter []string) {
+ for _, x := range cldr.locale {
+ if filter != nil {
+ v := reflect.ValueOf(x).Elem()
+ t := v.Type()
+ for i := 0; i < v.NumField(); i++ {
+ f := t.Field(i)
+ name, _ := xmlName(f)
+ if name != "" && name != "identity" && !in(filter, name) {
+ v.Field(i).Set(reflect.Zero(f.Type))
+ }
+ }
+ }
+ linkEnclosing(nil, x) // for resolving aliases and paths
+ setNames(x, "ldml")
+ }
+}
diff --git a/vendor/golang.org/x/text/unicode/cldr/slice.go b/vendor/golang.org/x/text/unicode/cldr/slice.go
new file mode 100644
index 000000000..388c983ff
--- /dev/null
+++ b/vendor/golang.org/x/text/unicode/cldr/slice.go
@@ -0,0 +1,144 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package cldr
+
+import (
+ "fmt"
+ "reflect"
+ "sort"
+)
+
+// Slice provides utilities for modifying slices of elements.
+// It can be wrapped around any slice of which the element type implements
+// interface Elem.
+type Slice struct {
+ ptr reflect.Value
+ typ reflect.Type
+}
+
+// Value returns the reflect.Value of the underlying slice.
+func (s *Slice) Value() reflect.Value {
+ return s.ptr.Elem()
+}
+
+// MakeSlice wraps a pointer to a slice of Elems.
+// It replaces the array pointed to by the slice so that subsequent modifications
+// do not alter the data in a CLDR type.
+// It panics if an incorrect type is passed.
+func MakeSlice(slicePtr interface{}) Slice {
+ ptr := reflect.ValueOf(slicePtr)
+ if ptr.Kind() != reflect.Ptr {
+ panic(fmt.Sprintf("MakeSlice: argument must be pointer to slice, found %v", ptr.Type()))
+ }
+ sl := ptr.Elem()
+ if sl.Kind() != reflect.Slice {
+ panic(fmt.Sprintf("MakeSlice: argument must point to a slice, found %v", sl.Type()))
+ }
+ intf := reflect.TypeOf((*Elem)(nil)).Elem()
+ if !sl.Type().Elem().Implements(intf) {
+ panic(fmt.Sprintf("MakeSlice: element type of slice (%v) does not implement Elem", sl.Type().Elem()))
+ }
+ nsl := reflect.MakeSlice(sl.Type(), sl.Len(), sl.Len())
+ reflect.Copy(nsl, sl)
+ sl.Set(nsl)
+ return Slice{
+ ptr: ptr,
+ typ: sl.Type().Elem().Elem(),
+ }
+}
+
+func (s Slice) indexForAttr(a string) []int {
+ for i := iter(reflect.Zero(s.typ)); !i.done(); i.next() {
+ if n, _ := xmlName(i.field()); n == a {
+ return i.index
+ }
+ }
+ panic(fmt.Sprintf("MakeSlice: no attribute %q for type %v", a, s.typ))
+}
+
+// Filter filters s to only include elements for which fn returns true.
+func (s Slice) Filter(fn func(e Elem) bool) {
+ k := 0
+ sl := s.Value()
+ for i := 0; i < sl.Len(); i++ {
+ vi := sl.Index(i)
+ if fn(vi.Interface().(Elem)) {
+ sl.Index(k).Set(vi)
+ k++
+ }
+ }
+ sl.Set(sl.Slice(0, k))
+}
+
+// Group finds elements in s for which fn returns the same value and groups
+// them in a new Slice.
+func (s Slice) Group(fn func(e Elem) string) []Slice {
+ m := make(map[string][]reflect.Value)
+ sl := s.Value()
+ for i := 0; i < sl.Len(); i++ {
+ vi := sl.Index(i)
+ key := fn(vi.Interface().(Elem))
+ m[key] = append(m[key], vi)
+ }
+ keys := []string{}
+ for k, _ := range m {
+ keys = append(keys, k)
+ }
+ sort.Strings(keys)
+ res := []Slice{}
+ for _, k := range keys {
+ nsl := reflect.New(sl.Type())
+ nsl.Elem().Set(reflect.Append(nsl.Elem(), m[k]...))
+ res = append(res, MakeSlice(nsl.Interface()))
+ }
+ return res
+}
+
+// SelectAnyOf filters s to contain only elements for which attr matches
+// any of the values.
+func (s Slice) SelectAnyOf(attr string, values ...string) {
+ index := s.indexForAttr(attr)
+ s.Filter(func(e Elem) bool {
+ vf := reflect.ValueOf(e).Elem().FieldByIndex(index)
+ return in(values, vf.String())
+ })
+}
+
+// SelectOnePerGroup filters s to include at most one element e per group of
+// elements matching Key(attr), where e has an attribute a that matches any
+// the values in v.
+// If more than one element in a group matches a value in v preference
+// is given to the element that matches the first value in v.
+func (s Slice) SelectOnePerGroup(a string, v []string) {
+ index := s.indexForAttr(a)
+ grouped := s.Group(func(e Elem) string { return Key(e, a) })
+ sl := s.Value()
+ sl.Set(sl.Slice(0, 0))
+ for _, g := range grouped {
+ e := reflect.Value{}
+ found := len(v)
+ gsl := g.Value()
+ for i := 0; i < gsl.Len(); i++ {
+ vi := gsl.Index(i).Elem().FieldByIndex(index)
+ j := 0
+ for ; j < len(v) && v[j] != vi.String(); j++ {
+ }
+ if j < found {
+ found = j
+ e = gsl.Index(i)
+ }
+ }
+ if found < len(v) {
+ sl.Set(reflect.Append(sl, e))
+ }
+ }
+}
+
+// SelectDraft drops all elements from the list with a draft level smaller than d
+// and selects the highest draft level of the remaining.
+// This method assumes that the input CLDR is canonicalized.
+func (s Slice) SelectDraft(d Draft) {
+ s.SelectOnePerGroup("draft", drafts[len(drafts)-2-int(d):])
+}
diff --git a/vendor/golang.org/x/text/unicode/cldr/xml.go b/vendor/golang.org/x/text/unicode/cldr/xml.go
new file mode 100644
index 000000000..a1550ed95
--- /dev/null
+++ b/vendor/golang.org/x/text/unicode/cldr/xml.go
@@ -0,0 +1,1456 @@
+// This file was generated by go generate; DO NOT EDIT
+
+package cldr
+
+// LDMLBCP47 holds information on allowable values for various variables in LDML.
+type LDMLBCP47 struct {
+ Common
+ Version *struct {
+ Common
+ Number string `xml:"number,attr"`
+ } `xml:"version"`
+ Generation *struct {
+ Common
+ Date string `xml:"date,attr"`
+ } `xml:"generation"`
+ Keyword []*struct {
+ Common
+ Key []*struct {
+ Common
+ Extension string `xml:"extension,attr"`
+ Name string `xml:"name,attr"`
+ Description string `xml:"description,attr"`
+ Deprecated string `xml:"deprecated,attr"`
+ Preferred string `xml:"preferred,attr"`
+ Alias string `xml:"alias,attr"`
+ ValueType string `xml:"valueType,attr"`
+ Since string `xml:"since,attr"`
+ Type []*struct {
+ Common
+ Name string `xml:"name,attr"`
+ Description string `xml:"description,attr"`
+ Deprecated string `xml:"deprecated,attr"`
+ Preferred string `xml:"preferred,attr"`
+ Alias string `xml:"alias,attr"`
+ Since string `xml:"since,attr"`
+ } `xml:"type"`
+ } `xml:"key"`
+ } `xml:"keyword"`
+ Attribute []*struct {
+ Common
+ Name string `xml:"name,attr"`
+ Description string `xml:"description,attr"`
+ Deprecated string `xml:"deprecated,attr"`
+ Preferred string `xml:"preferred,attr"`
+ Since string `xml:"since,attr"`
+ } `xml:"attribute"`
+}
+
+// SupplementalData holds information relevant for internationalization
+// and proper use of CLDR, but that is not contained in the locale hierarchy.
+type SupplementalData struct {
+ Common
+ Version *struct {
+ Common
+ Number string `xml:"number,attr"`
+ } `xml:"version"`
+ Generation *struct {
+ Common
+ Date string `xml:"date,attr"`
+ } `xml:"generation"`
+ CurrencyData *struct {
+ Common
+ Fractions []*struct {
+ Common
+ Info []*struct {
+ Common
+ Iso4217 string `xml:"iso4217,attr"`
+ Digits string `xml:"digits,attr"`
+ Rounding string `xml:"rounding,attr"`
+ CashDigits string `xml:"cashDigits,attr"`
+ CashRounding string `xml:"cashRounding,attr"`
+ } `xml:"info"`
+ } `xml:"fractions"`
+ Region []*struct {
+ Common
+ Iso3166 string `xml:"iso3166,attr"`
+ Currency []*struct {
+ Common
+ Before string `xml:"before,attr"`
+ From string `xml:"from,attr"`
+ To string `xml:"to,attr"`
+ Iso4217 string `xml:"iso4217,attr"`
+ Digits string `xml:"digits,attr"`
+ Rounding string `xml:"rounding,attr"`
+ CashRounding string `xml:"cashRounding,attr"`
+ Tender string `xml:"tender,attr"`
+ Alternate []*struct {
+ Common
+ Iso4217 string `xml:"iso4217,attr"`
+ } `xml:"alternate"`
+ } `xml:"currency"`
+ } `xml:"region"`
+ } `xml:"currencyData"`
+ TerritoryContainment *struct {
+ Common
+ Group []*struct {
+ Common
+ Contains string `xml:"contains,attr"`
+ Grouping string `xml:"grouping,attr"`
+ Status string `xml:"status,attr"`
+ } `xml:"group"`
+ } `xml:"territoryContainment"`
+ SubdivisionContainment *struct {
+ Common
+ Subgroup []*struct {
+ Common
+ Subtype string `xml:"subtype,attr"`
+ Contains string `xml:"contains,attr"`
+ } `xml:"subgroup"`
+ } `xml:"subdivisionContainment"`
+ LanguageData *struct {
+ Common
+ Language []*struct {
+ Common
+ Scripts string `xml:"scripts,attr"`
+ Territories string `xml:"territories,attr"`
+ Variants string `xml:"variants,attr"`
+ } `xml:"language"`
+ } `xml:"languageData"`
+ TerritoryInfo *struct {
+ Common
+ Territory []*struct {
+ Common
+ Gdp string `xml:"gdp,attr"`
+ LiteracyPercent string `xml:"literacyPercent,attr"`
+ Population string `xml:"population,attr"`
+ LanguagePopulation []*struct {
+ Common
+ WritingPercent string `xml:"writingPercent,attr"`
+ PopulationPercent string `xml:"populationPercent,attr"`
+ OfficialStatus string `xml:"officialStatus,attr"`
+ } `xml:"languagePopulation"`
+ } `xml:"territory"`
+ } `xml:"territoryInfo"`
+ PostalCodeData *struct {
+ Common
+ PostCodeRegex []*struct {
+ Common
+ TerritoryId string `xml:"territoryId,attr"`
+ } `xml:"postCodeRegex"`
+ } `xml:"postalCodeData"`
+ CalendarData *struct {
+ Common
+ Calendar []*struct {
+ Common
+ Territories string `xml:"territories,attr"`
+ CalendarSystem *Common `xml:"calendarSystem"`
+ Eras *struct {
+ Common
+ Era []*struct {
+ Common
+ Start string `xml:"start,attr"`
+ End string `xml:"end,attr"`
+ } `xml:"era"`
+ } `xml:"eras"`
+ } `xml:"calendar"`
+ } `xml:"calendarData"`
+ CalendarPreferenceData *struct {
+ Common
+ CalendarPreference []*struct {
+ Common
+ Territories string `xml:"territories,attr"`
+ Ordering string `xml:"ordering,attr"`
+ } `xml:"calendarPreference"`
+ } `xml:"calendarPreferenceData"`
+ WeekData *struct {
+ Common
+ MinDays []*struct {
+ Common
+ Count string `xml:"count,attr"`
+ Territories string `xml:"territories,attr"`
+ } `xml:"minDays"`
+ FirstDay []*struct {
+ Common
+ Day string `xml:"day,attr"`
+ Territories string `xml:"territories,attr"`
+ } `xml:"firstDay"`
+ WeekendStart []*struct {
+ Common
+ Day string `xml:"day,attr"`
+ Territories string `xml:"territories,attr"`
+ } `xml:"weekendStart"`
+ WeekendEnd []*struct {
+ Common
+ Day string `xml:"day,attr"`
+ Territories string `xml:"territories,attr"`
+ } `xml:"weekendEnd"`
+ WeekOfPreference []*struct {
+ Common
+ Locales string `xml:"locales,attr"`
+ Ordering string `xml:"ordering,attr"`
+ } `xml:"weekOfPreference"`
+ } `xml:"weekData"`
+ TimeData *struct {
+ Common
+ Hours []*struct {
+ Common
+ Allowed string `xml:"allowed,attr"`
+ Preferred string `xml:"preferred,attr"`
+ Regions string `xml:"regions,attr"`
+ } `xml:"hours"`
+ } `xml:"timeData"`
+ MeasurementData *struct {
+ Common
+ MeasurementSystem []*struct {
+ Common
+ Category string `xml:"category,attr"`
+ Territories string `xml:"territories,attr"`
+ } `xml:"measurementSystem"`
+ PaperSize []*struct {
+ Common
+ Territories string `xml:"territories,attr"`
+ } `xml:"paperSize"`
+ } `xml:"measurementData"`
+ UnitPreferenceData *struct {
+ Common
+ UnitPreferences []*struct {
+ Common
+ Category string `xml:"category,attr"`
+ Usage string `xml:"usage,attr"`
+ Scope string `xml:"scope,attr"`
+ UnitPreference []*struct {
+ Common
+ Regions string `xml:"regions,attr"`
+ } `xml:"unitPreference"`
+ } `xml:"unitPreferences"`
+ } `xml:"unitPreferenceData"`
+ TimezoneData *struct {
+ Common
+ MapTimezones []*struct {
+ Common
+ OtherVersion string `xml:"otherVersion,attr"`
+ TypeVersion string `xml:"typeVersion,attr"`
+ MapZone []*struct {
+ Common
+ Other string `xml:"other,attr"`
+ Territory string `xml:"territory,attr"`
+ } `xml:"mapZone"`
+ } `xml:"mapTimezones"`
+ ZoneFormatting []*struct {
+ Common
+ Multizone string `xml:"multizone,attr"`
+ TzidVersion string `xml:"tzidVersion,attr"`
+ ZoneItem []*struct {
+ Common
+ Territory string `xml:"territory,attr"`
+ Aliases string `xml:"aliases,attr"`
+ } `xml:"zoneItem"`
+ } `xml:"zoneFormatting"`
+ } `xml:"timezoneData"`
+ Characters *struct {
+ Common
+ CharacterFallback []*struct {
+ Common
+ Character []*struct {
+ Common
+ Value string `xml:"value,attr"`
+ Substitute []*Common `xml:"substitute"`
+ } `xml:"character"`
+ } `xml:"character-fallback"`
+ } `xml:"characters"`
+ Transforms *struct {
+ Common
+ Transform []*struct {
+ Common
+ Source string `xml:"source,attr"`
+ Target string `xml:"target,attr"`
+ Variant string `xml:"variant,attr"`
+ Direction string `xml:"direction,attr"`
+ Alias string `xml:"alias,attr"`
+ BackwardAlias string `xml:"backwardAlias,attr"`
+ Visibility string `xml:"visibility,attr"`
+ Comment []*Common `xml:"comment"`
+ TRule []*Common `xml:"tRule"`
+ } `xml:"transform"`
+ } `xml:"transforms"`
+ Metadata *struct {
+ Common
+ AttributeOrder *Common `xml:"attributeOrder"`
+ ElementOrder *Common `xml:"elementOrder"`
+ SerialElements *Common `xml:"serialElements"`
+ Suppress *struct {
+ Common
+ Attributes []*struct {
+ Common
+ Element string `xml:"element,attr"`
+ Attribute string `xml:"attribute,attr"`
+ AttributeValue string `xml:"attributeValue,attr"`
+ } `xml:"attributes"`
+ } `xml:"suppress"`
+ Validity *struct {
+ Common
+ Variable []*struct {
+ Common
+ Id string `xml:"id,attr"`
+ } `xml:"variable"`
+ AttributeValues []*struct {
+ Common
+ Dtds string `xml:"dtds,attr"`
+ Elements string `xml:"elements,attr"`
+ Attributes string `xml:"attributes,attr"`
+ Order string `xml:"order,attr"`
+ } `xml:"attributeValues"`
+ } `xml:"validity"`
+ Alias *struct {
+ Common
+ LanguageAlias []*struct {
+ Common
+ Replacement string `xml:"replacement,attr"`
+ Reason string `xml:"reason,attr"`
+ } `xml:"languageAlias"`
+ ScriptAlias []*struct {
+ Common
+ Replacement string `xml:"replacement,attr"`
+ Reason string `xml:"reason,attr"`
+ } `xml:"scriptAlias"`
+ TerritoryAlias []*struct {
+ Common
+ Replacement string `xml:"replacement,attr"`
+ Reason string `xml:"reason,attr"`
+ } `xml:"territoryAlias"`
+ SubdivisionAlias []*struct {
+ Common
+ Replacement string `xml:"replacement,attr"`
+ Reason string `xml:"reason,attr"`
+ } `xml:"subdivisionAlias"`
+ VariantAlias []*struct {
+ Common
+ Replacement string `xml:"replacement,attr"`
+ Reason string `xml:"reason,attr"`
+ } `xml:"variantAlias"`
+ ZoneAlias []*struct {
+ Common
+ Replacement string `xml:"replacement,attr"`
+ Reason string `xml:"reason,attr"`
+ } `xml:"zoneAlias"`
+ } `xml:"alias"`
+ Deprecated *struct {
+ Common
+ DeprecatedItems []*struct {
+ Common
+ Elements string `xml:"elements,attr"`
+ Attributes string `xml:"attributes,attr"`
+ Values string `xml:"values,attr"`
+ } `xml:"deprecatedItems"`
+ } `xml:"deprecated"`
+ Distinguishing *struct {
+ Common
+ DistinguishingItems []*struct {
+ Common
+ Exclude string `xml:"exclude,attr"`
+ Elements string `xml:"elements,attr"`
+ Attributes string `xml:"attributes,attr"`
+ } `xml:"distinguishingItems"`
+ } `xml:"distinguishing"`
+ Blocking *struct {
+ Common
+ BlockingItems []*struct {
+ Common
+ Elements string `xml:"elements,attr"`
+ } `xml:"blockingItems"`
+ } `xml:"blocking"`
+ CoverageAdditions *struct {
+ Common
+ LanguageCoverage []*struct {
+ Common
+ Values string `xml:"values,attr"`
+ } `xml:"languageCoverage"`
+ ScriptCoverage []*struct {
+ Common
+ Values string `xml:"values,attr"`
+ } `xml:"scriptCoverage"`
+ TerritoryCoverage []*struct {
+ Common
+ Values string `xml:"values,attr"`
+ } `xml:"territoryCoverage"`
+ CurrencyCoverage []*struct {
+ Common
+ Values string `xml:"values,attr"`
+ } `xml:"currencyCoverage"`
+ TimezoneCoverage []*struct {
+ Common
+ Values string `xml:"values,attr"`
+ } `xml:"timezoneCoverage"`
+ } `xml:"coverageAdditions"`
+ SkipDefaultLocale *struct {
+ Common
+ Services string `xml:"services,attr"`
+ } `xml:"skipDefaultLocale"`
+ DefaultContent *struct {
+ Common
+ Locales string `xml:"locales,attr"`
+ } `xml:"defaultContent"`
+ } `xml:"metadata"`
+ CodeMappings *struct {
+ Common
+ LanguageCodes []*struct {
+ Common
+ Alpha3 string `xml:"alpha3,attr"`
+ } `xml:"languageCodes"`
+ TerritoryCodes []*struct {
+ Common
+ Numeric string `xml:"numeric,attr"`
+ Alpha3 string `xml:"alpha3,attr"`
+ Fips10 string `xml:"fips10,attr"`
+ Internet string `xml:"internet,attr"`
+ } `xml:"territoryCodes"`
+ CurrencyCodes []*struct {
+ Common
+ Numeric string `xml:"numeric,attr"`
+ } `xml:"currencyCodes"`
+ } `xml:"codeMappings"`
+ ParentLocales *struct {
+ Common
+ ParentLocale []*struct {
+ Common
+ Parent string `xml:"parent,attr"`
+ Locales string `xml:"locales,attr"`
+ } `xml:"parentLocale"`
+ } `xml:"parentLocales"`
+ LikelySubtags *struct {
+ Common
+ LikelySubtag []*struct {
+ Common
+ From string `xml:"from,attr"`
+ To string `xml:"to,attr"`
+ } `xml:"likelySubtag"`
+ } `xml:"likelySubtags"`
+ MetazoneInfo *struct {
+ Common
+ Timezone []*struct {
+ Common
+ UsesMetazone []*struct {
+ Common
+ From string `xml:"from,attr"`
+ To string `xml:"to,attr"`
+ Mzone string `xml:"mzone,attr"`
+ } `xml:"usesMetazone"`
+ } `xml:"timezone"`
+ } `xml:"metazoneInfo"`
+ Plurals []*struct {
+ Common
+ PluralRules []*struct {
+ Common
+ Locales string `xml:"locales,attr"`
+ PluralRule []*struct {
+ Common
+ Count string `xml:"count,attr"`
+ } `xml:"pluralRule"`
+ } `xml:"pluralRules"`
+ PluralRanges []*struct {
+ Common
+ Locales string `xml:"locales,attr"`
+ PluralRange []*struct {
+ Common
+ Start string `xml:"start,attr"`
+ End string `xml:"end,attr"`
+ Result string `xml:"result,attr"`
+ } `xml:"pluralRange"`
+ } `xml:"pluralRanges"`
+ } `xml:"plurals"`
+ TelephoneCodeData *struct {
+ Common
+ CodesByTerritory []*struct {
+ Common
+ Territory string `xml:"territory,attr"`
+ TelephoneCountryCode []*struct {
+ Common
+ Code string `xml:"code,attr"`
+ From string `xml:"from,attr"`
+ To string `xml:"to,attr"`
+ } `xml:"telephoneCountryCode"`
+ } `xml:"codesByTerritory"`
+ } `xml:"telephoneCodeData"`
+ NumberingSystems *struct {
+ Common
+ NumberingSystem []*struct {
+ Common
+ Id string `xml:"id,attr"`
+ Radix string `xml:"radix,attr"`
+ Digits string `xml:"digits,attr"`
+ Rules string `xml:"rules,attr"`
+ } `xml:"numberingSystem"`
+ } `xml:"numberingSystems"`
+ Bcp47KeywordMappings *struct {
+ Common
+ MapKeys *struct {
+ Common
+ KeyMap []*struct {
+ Common
+ Bcp47 string `xml:"bcp47,attr"`
+ } `xml:"keyMap"`
+ } `xml:"mapKeys"`
+ MapTypes []*struct {
+ Common
+ TypeMap []*struct {
+ Common
+ Bcp47 string `xml:"bcp47,attr"`
+ } `xml:"typeMap"`
+ } `xml:"mapTypes"`
+ } `xml:"bcp47KeywordMappings"`
+ Gender *struct {
+ Common
+ PersonList []*struct {
+ Common
+ Locales string `xml:"locales,attr"`
+ } `xml:"personList"`
+ } `xml:"gender"`
+ References *struct {
+ Common
+ Reference []*struct {
+ Common
+ Uri string `xml:"uri,attr"`
+ } `xml:"reference"`
+ } `xml:"references"`
+ LanguageMatching *struct {
+ Common
+ LanguageMatches []*struct {
+ Common
+ LanguageMatch []*struct {
+ Common
+ Desired string `xml:"desired,attr"`
+ Oneway string `xml:"oneway,attr"`
+ Percent string `xml:"percent,attr"`
+ Supported string `xml:"supported,attr"`
+ } `xml:"languageMatch"`
+ } `xml:"languageMatches"`
+ } `xml:"languageMatching"`
+ DayPeriodRuleSet []*struct {
+ Common
+ DayPeriodRules []*struct {
+ Common
+ Locales string `xml:"locales,attr"`
+ DayPeriodRule []*struct {
+ Common
+ At string `xml:"at,attr"`
+ After string `xml:"after,attr"`
+ Before string `xml:"before,attr"`
+ From string `xml:"from,attr"`
+ To string `xml:"to,attr"`
+ } `xml:"dayPeriodRule"`
+ } `xml:"dayPeriodRules"`
+ } `xml:"dayPeriodRuleSet"`
+ MetaZones *struct {
+ Common
+ MetazoneInfo *struct {
+ Common
+ Timezone []*struct {
+ Common
+ UsesMetazone []*struct {
+ Common
+ From string `xml:"from,attr"`
+ To string `xml:"to,attr"`
+ Mzone string `xml:"mzone,attr"`
+ } `xml:"usesMetazone"`
+ } `xml:"timezone"`
+ } `xml:"metazoneInfo"`
+ MapTimezones *struct {
+ Common
+ OtherVersion string `xml:"otherVersion,attr"`
+ TypeVersion string `xml:"typeVersion,attr"`
+ MapZone []*struct {
+ Common
+ Other string `xml:"other,attr"`
+ Territory string `xml:"territory,attr"`
+ } `xml:"mapZone"`
+ } `xml:"mapTimezones"`
+ } `xml:"metaZones"`
+ PrimaryZones *struct {
+ Common
+ PrimaryZone []*struct {
+ Common
+ Iso3166 string `xml:"iso3166,attr"`
+ } `xml:"primaryZone"`
+ } `xml:"primaryZones"`
+ WindowsZones *struct {
+ Common
+ MapTimezones *struct {
+ Common
+ OtherVersion string `xml:"otherVersion,attr"`
+ TypeVersion string `xml:"typeVersion,attr"`
+ MapZone []*struct {
+ Common
+ Other string `xml:"other,attr"`
+ Territory string `xml:"territory,attr"`
+ } `xml:"mapZone"`
+ } `xml:"mapTimezones"`
+ } `xml:"windowsZones"`
+ CoverageLevels *struct {
+ Common
+ ApprovalRequirements *struct {
+ Common
+ ApprovalRequirement []*struct {
+ Common
+ Votes string `xml:"votes,attr"`
+ Locales string `xml:"locales,attr"`
+ Paths string `xml:"paths,attr"`
+ } `xml:"approvalRequirement"`
+ } `xml:"approvalRequirements"`
+ CoverageVariable []*struct {
+ Common
+ Key string `xml:"key,attr"`
+ Value string `xml:"value,attr"`
+ } `xml:"coverageVariable"`
+ CoverageLevel []*struct {
+ Common
+ InLanguage string `xml:"inLanguage,attr"`
+ InScript string `xml:"inScript,attr"`
+ InTerritory string `xml:"inTerritory,attr"`
+ Value string `xml:"value,attr"`
+ Match string `xml:"match,attr"`
+ } `xml:"coverageLevel"`
+ } `xml:"coverageLevels"`
+ IdValidity *struct {
+ Common
+ Id []*struct {
+ Common
+ IdStatus string `xml:"idStatus,attr"`
+ } `xml:"id"`
+ } `xml:"idValidity"`
+ RgScope *struct {
+ Common
+ RgPath []*struct {
+ Common
+ Path string `xml:"path,attr"`
+ } `xml:"rgPath"`
+ } `xml:"rgScope"`
+}
+
+// LDML is the top-level type for locale-specific data.
+type LDML struct {
+ Common
+ Version string `xml:"version,attr"`
+ Identity *struct {
+ Common
+ Version *struct {
+ Common
+ Number string `xml:"number,attr"`
+ } `xml:"version"`
+ Generation *struct {
+ Common
+ Date string `xml:"date,attr"`
+ } `xml:"generation"`
+ Language *Common `xml:"language"`
+ Script *Common `xml:"script"`
+ Territory *Common `xml:"territory"`
+ Variant *Common `xml:"variant"`
+ } `xml:"identity"`
+ LocaleDisplayNames *LocaleDisplayNames `xml:"localeDisplayNames"`
+ Layout *struct {
+ Common
+ Orientation []*struct {
+ Common
+ Characters string `xml:"characters,attr"`
+ Lines string `xml:"lines,attr"`
+ CharacterOrder []*Common `xml:"characterOrder"`
+ LineOrder []*Common `xml:"lineOrder"`
+ } `xml:"orientation"`
+ InList []*struct {
+ Common
+ Casing string `xml:"casing,attr"`
+ } `xml:"inList"`
+ InText []*Common `xml:"inText"`
+ } `xml:"layout"`
+ ContextTransforms *struct {
+ Common
+ ContextTransformUsage []*struct {
+ Common
+ ContextTransform []*Common `xml:"contextTransform"`
+ } `xml:"contextTransformUsage"`
+ } `xml:"contextTransforms"`
+ Characters *struct {
+ Common
+ ExemplarCharacters []*Common `xml:"exemplarCharacters"`
+ Ellipsis []*Common `xml:"ellipsis"`
+ MoreInformation []*Common `xml:"moreInformation"`
+ Stopwords []*struct {
+ Common
+ StopwordList []*Common `xml:"stopwordList"`
+ } `xml:"stopwords"`
+ IndexLabels []*struct {
+ Common
+ IndexSeparator []*Common `xml:"indexSeparator"`
+ CompressedIndexSeparator []*Common `xml:"compressedIndexSeparator"`
+ IndexRangePattern []*Common `xml:"indexRangePattern"`
+ IndexLabelBefore []*Common `xml:"indexLabelBefore"`
+ IndexLabelAfter []*Common `xml:"indexLabelAfter"`
+ IndexLabel []*struct {
+ Common
+ IndexSource string `xml:"indexSource,attr"`
+ Priority string `xml:"priority,attr"`
+ } `xml:"indexLabel"`
+ } `xml:"indexLabels"`
+ Mapping []*struct {
+ Common
+ Registry string `xml:"registry,attr"`
+ } `xml:"mapping"`
+ } `xml:"characters"`
+ Delimiters *struct {
+ Common
+ QuotationStart []*Common `xml:"quotationStart"`
+ QuotationEnd []*Common `xml:"quotationEnd"`
+ AlternateQuotationStart []*Common `xml:"alternateQuotationStart"`
+ AlternateQuotationEnd []*Common `xml:"alternateQuotationEnd"`
+ } `xml:"delimiters"`
+ Measurement *struct {
+ Common
+ MeasurementSystem []*Common `xml:"measurementSystem"`
+ PaperSize []*struct {
+ Common
+ Height []*Common `xml:"height"`
+ Width []*Common `xml:"width"`
+ } `xml:"paperSize"`
+ } `xml:"measurement"`
+ Dates *struct {
+ Common
+ LocalizedPatternChars []*Common `xml:"localizedPatternChars"`
+ DateRangePattern []*Common `xml:"dateRangePattern"`
+ Calendars *struct {
+ Common
+ Calendar []*Calendar `xml:"calendar"`
+ } `xml:"calendars"`
+ Fields *struct {
+ Common
+ Field []*struct {
+ Common
+ DisplayName []*struct {
+ Common
+ Count string `xml:"count,attr"`
+ } `xml:"displayName"`
+ Relative []*Common `xml:"relative"`
+ RelativeTime []*struct {
+ Common
+ RelativeTimePattern []*struct {
+ Common
+ Count string `xml:"count,attr"`
+ } `xml:"relativeTimePattern"`
+ } `xml:"relativeTime"`
+ RelativePeriod []*Common `xml:"relativePeriod"`
+ } `xml:"field"`
+ } `xml:"fields"`
+ TimeZoneNames *TimeZoneNames `xml:"timeZoneNames"`
+ } `xml:"dates"`
+ Numbers *Numbers `xml:"numbers"`
+ Units *struct {
+ Common
+ Unit []*struct {
+ Common
+ DisplayName []*struct {
+ Common
+ Count string `xml:"count,attr"`
+ } `xml:"displayName"`
+ UnitPattern []*struct {
+ Common
+ Count string `xml:"count,attr"`
+ } `xml:"unitPattern"`
+ PerUnitPattern []*Common `xml:"perUnitPattern"`
+ } `xml:"unit"`
+ UnitLength []*struct {
+ Common
+ CompoundUnit []*struct {
+ Common
+ CompoundUnitPattern []*Common `xml:"compoundUnitPattern"`
+ } `xml:"compoundUnit"`
+ Unit []*struct {
+ Common
+ DisplayName []*struct {
+ Common
+ Count string `xml:"count,attr"`
+ } `xml:"displayName"`
+ UnitPattern []*struct {
+ Common
+ Count string `xml:"count,attr"`
+ } `xml:"unitPattern"`
+ PerUnitPattern []*Common `xml:"perUnitPattern"`
+ } `xml:"unit"`
+ CoordinateUnit []*struct {
+ Common
+ CoordinateUnitPattern []*Common `xml:"coordinateUnitPattern"`
+ } `xml:"coordinateUnit"`
+ } `xml:"unitLength"`
+ DurationUnit []*struct {
+ Common
+ DurationUnitPattern []*Common `xml:"durationUnitPattern"`
+ } `xml:"durationUnit"`
+ } `xml:"units"`
+ ListPatterns *struct {
+ Common
+ ListPattern []*struct {
+ Common
+ ListPatternPart []*Common `xml:"listPatternPart"`
+ } `xml:"listPattern"`
+ } `xml:"listPatterns"`
+ Collations *struct {
+ Common
+ Version string `xml:"version,attr"`
+ DefaultCollation *Common `xml:"defaultCollation"`
+ Collation []*Collation `xml:"collation"`
+ } `xml:"collations"`
+ Posix *struct {
+ Common
+ Messages []*struct {
+ Common
+ Yesstr []*Common `xml:"yesstr"`
+ Nostr []*Common `xml:"nostr"`
+ Yesexpr []*Common `xml:"yesexpr"`
+ Noexpr []*Common `xml:"noexpr"`
+ } `xml:"messages"`
+ } `xml:"posix"`
+ CharacterLabels *struct {
+ Common
+ CharacterLabelPattern []*struct {
+ Common
+ Count string `xml:"count,attr"`
+ } `xml:"characterLabelPattern"`
+ CharacterLabel []*Common `xml:"characterLabel"`
+ } `xml:"characterLabels"`
+ Segmentations *struct {
+ Common
+ Segmentation []*struct {
+ Common
+ Variables *struct {
+ Common
+ Variable []*struct {
+ Common
+ Id string `xml:"id,attr"`
+ } `xml:"variable"`
+ } `xml:"variables"`
+ SegmentRules *struct {
+ Common
+ Rule []*struct {
+ Common
+ Id string `xml:"id,attr"`
+ } `xml:"rule"`
+ } `xml:"segmentRules"`
+ Exceptions *struct {
+ Common
+ Exception []*Common `xml:"exception"`
+ } `xml:"exceptions"`
+ Suppressions *struct {
+ Common
+ Suppression []*Common `xml:"suppression"`
+ } `xml:"suppressions"`
+ } `xml:"segmentation"`
+ } `xml:"segmentations"`
+ Rbnf *struct {
+ Common
+ RulesetGrouping []*struct {
+ Common
+ Ruleset []*struct {
+ Common
+ Access string `xml:"access,attr"`
+ AllowsParsing string `xml:"allowsParsing,attr"`
+ Rbnfrule []*struct {
+ Common
+ Value string `xml:"value,attr"`
+ Radix string `xml:"radix,attr"`
+ Decexp string `xml:"decexp,attr"`
+ } `xml:"rbnfrule"`
+ } `xml:"ruleset"`
+ } `xml:"rulesetGrouping"`
+ } `xml:"rbnf"`
+ Annotations *struct {
+ Common
+ Annotation []*struct {
+ Common
+ Cp string `xml:"cp,attr"`
+ Tts string `xml:"tts,attr"`
+ } `xml:"annotation"`
+ } `xml:"annotations"`
+ Metadata *struct {
+ Common
+ CasingData *struct {
+ Common
+ CasingItem []*struct {
+ Common
+ Override string `xml:"override,attr"`
+ ForceError string `xml:"forceError,attr"`
+ } `xml:"casingItem"`
+ } `xml:"casingData"`
+ } `xml:"metadata"`
+ References *struct {
+ Common
+ Reference []*struct {
+ Common
+ Uri string `xml:"uri,attr"`
+ } `xml:"reference"`
+ } `xml:"references"`
+}
+
+// Collation contains rules that specify a certain sort-order,
+// as a tailoring of the root order.
+// The parsed rules are obtained by passing a RuleProcessor to Collation's
+// Process method.
+type Collation struct {
+ Common
+ Visibility string `xml:"visibility,attr"`
+ Base *Common `xml:"base"`
+ Import []*struct {
+ Common
+ Source string `xml:"source,attr"`
+ } `xml:"import"`
+ Settings *struct {
+ Common
+ Strength string `xml:"strength,attr"`
+ Alternate string `xml:"alternate,attr"`
+ Backwards string `xml:"backwards,attr"`
+ Normalization string `xml:"normalization,attr"`
+ CaseLevel string `xml:"caseLevel,attr"`
+ CaseFirst string `xml:"caseFirst,attr"`
+ HiraganaQuaternary string `xml:"hiraganaQuaternary,attr"`
+ MaxVariable string `xml:"maxVariable,attr"`
+ Numeric string `xml:"numeric,attr"`
+ Private string `xml:"private,attr"`
+ VariableTop string `xml:"variableTop,attr"`
+ Reorder string `xml:"reorder,attr"`
+ } `xml:"settings"`
+ SuppressContractions *Common `xml:"suppress_contractions"`
+ Optimize *Common `xml:"optimize"`
+ Cr []*Common `xml:"cr"`
+ rulesElem
+}
+
+// Calendar specifies the fields used for formatting and parsing dates and times.
+// The month and quarter names are identified numerically, starting at 1.
+// The day (of the week) names are identified with short strings, since there is
+// no universally-accepted numeric designation.
+type Calendar struct {
+ Common
+ Months *struct {
+ Common
+ MonthContext []*struct {
+ Common
+ MonthWidth []*struct {
+ Common
+ Month []*struct {
+ Common
+ Yeartype string `xml:"yeartype,attr"`
+ } `xml:"month"`
+ } `xml:"monthWidth"`
+ } `xml:"monthContext"`
+ } `xml:"months"`
+ MonthNames *struct {
+ Common
+ Month []*struct {
+ Common
+ Yeartype string `xml:"yeartype,attr"`
+ } `xml:"month"`
+ } `xml:"monthNames"`
+ MonthAbbr *struct {
+ Common
+ Month []*struct {
+ Common
+ Yeartype string `xml:"yeartype,attr"`
+ } `xml:"month"`
+ } `xml:"monthAbbr"`
+ MonthPatterns *struct {
+ Common
+ MonthPatternContext []*struct {
+ Common
+ MonthPatternWidth []*struct {
+ Common
+ MonthPattern []*Common `xml:"monthPattern"`
+ } `xml:"monthPatternWidth"`
+ } `xml:"monthPatternContext"`
+ } `xml:"monthPatterns"`
+ Days *struct {
+ Common
+ DayContext []*struct {
+ Common
+ DayWidth []*struct {
+ Common
+ Day []*Common `xml:"day"`
+ } `xml:"dayWidth"`
+ } `xml:"dayContext"`
+ } `xml:"days"`
+ DayNames *struct {
+ Common
+ Day []*Common `xml:"day"`
+ } `xml:"dayNames"`
+ DayAbbr *struct {
+ Common
+ Day []*Common `xml:"day"`
+ } `xml:"dayAbbr"`
+ Quarters *struct {
+ Common
+ QuarterContext []*struct {
+ Common
+ QuarterWidth []*struct {
+ Common
+ Quarter []*Common `xml:"quarter"`
+ } `xml:"quarterWidth"`
+ } `xml:"quarterContext"`
+ } `xml:"quarters"`
+ Week *struct {
+ Common
+ MinDays []*struct {
+ Common
+ Count string `xml:"count,attr"`
+ } `xml:"minDays"`
+ FirstDay []*struct {
+ Common
+ Day string `xml:"day,attr"`
+ } `xml:"firstDay"`
+ WeekendStart []*struct {
+ Common
+ Day string `xml:"day,attr"`
+ Time string `xml:"time,attr"`
+ } `xml:"weekendStart"`
+ WeekendEnd []*struct {
+ Common
+ Day string `xml:"day,attr"`
+ Time string `xml:"time,attr"`
+ } `xml:"weekendEnd"`
+ } `xml:"week"`
+ Am []*Common `xml:"am"`
+ Pm []*Common `xml:"pm"`
+ DayPeriods *struct {
+ Common
+ DayPeriodContext []*struct {
+ Common
+ DayPeriodWidth []*struct {
+ Common
+ DayPeriod []*Common `xml:"dayPeriod"`
+ } `xml:"dayPeriodWidth"`
+ } `xml:"dayPeriodContext"`
+ } `xml:"dayPeriods"`
+ Eras *struct {
+ Common
+ EraNames *struct {
+ Common
+ Era []*Common `xml:"era"`
+ } `xml:"eraNames"`
+ EraAbbr *struct {
+ Common
+ Era []*Common `xml:"era"`
+ } `xml:"eraAbbr"`
+ EraNarrow *struct {
+ Common
+ Era []*Common `xml:"era"`
+ } `xml:"eraNarrow"`
+ } `xml:"eras"`
+ CyclicNameSets *struct {
+ Common
+ CyclicNameSet []*struct {
+ Common
+ CyclicNameContext []*struct {
+ Common
+ CyclicNameWidth []*struct {
+ Common
+ CyclicName []*Common `xml:"cyclicName"`
+ } `xml:"cyclicNameWidth"`
+ } `xml:"cyclicNameContext"`
+ } `xml:"cyclicNameSet"`
+ } `xml:"cyclicNameSets"`
+ DateFormats *struct {
+ Common
+ DateFormatLength []*struct {
+ Common
+ DateFormat []*struct {
+ Common
+ Pattern []*struct {
+ Common
+ Numbers string `xml:"numbers,attr"`
+ Count string `xml:"count,attr"`
+ } `xml:"pattern"`
+ DisplayName []*struct {
+ Common
+ Count string `xml:"count,attr"`
+ } `xml:"displayName"`
+ } `xml:"dateFormat"`
+ } `xml:"dateFormatLength"`
+ } `xml:"dateFormats"`
+ TimeFormats *struct {
+ Common
+ TimeFormatLength []*struct {
+ Common
+ TimeFormat []*struct {
+ Common
+ Pattern []*struct {
+ Common
+ Numbers string `xml:"numbers,attr"`
+ Count string `xml:"count,attr"`
+ } `xml:"pattern"`
+ DisplayName []*struct {
+ Common
+ Count string `xml:"count,attr"`
+ } `xml:"displayName"`
+ } `xml:"timeFormat"`
+ } `xml:"timeFormatLength"`
+ } `xml:"timeFormats"`
+ DateTimeFormats *struct {
+ Common
+ DateTimeFormatLength []*struct {
+ Common
+ DateTimeFormat []*struct {
+ Common
+ Pattern []*struct {
+ Common
+ Numbers string `xml:"numbers,attr"`
+ Count string `xml:"count,attr"`
+ } `xml:"pattern"`
+ DisplayName []*struct {
+ Common
+ Count string `xml:"count,attr"`
+ } `xml:"displayName"`
+ } `xml:"dateTimeFormat"`
+ } `xml:"dateTimeFormatLength"`
+ AvailableFormats []*struct {
+ Common
+ DateFormatItem []*struct {
+ Common
+ Id string `xml:"id,attr"`
+ Count string `xml:"count,attr"`
+ } `xml:"dateFormatItem"`
+ } `xml:"availableFormats"`
+ AppendItems []*struct {
+ Common
+ AppendItem []*struct {
+ Common
+ Request string `xml:"request,attr"`
+ } `xml:"appendItem"`
+ } `xml:"appendItems"`
+ IntervalFormats []*struct {
+ Common
+ IntervalFormatFallback []*Common `xml:"intervalFormatFallback"`
+ IntervalFormatItem []*struct {
+ Common
+ Id string `xml:"id,attr"`
+ GreatestDifference []*struct {
+ Common
+ Id string `xml:"id,attr"`
+ } `xml:"greatestDifference"`
+ } `xml:"intervalFormatItem"`
+ } `xml:"intervalFormats"`
+ } `xml:"dateTimeFormats"`
+ Fields []*struct {
+ Common
+ Field []*struct {
+ Common
+ DisplayName []*struct {
+ Common
+ Count string `xml:"count,attr"`
+ } `xml:"displayName"`
+ Relative []*Common `xml:"relative"`
+ RelativeTime []*struct {
+ Common
+ RelativeTimePattern []*struct {
+ Common
+ Count string `xml:"count,attr"`
+ } `xml:"relativeTimePattern"`
+ } `xml:"relativeTime"`
+ RelativePeriod []*Common `xml:"relativePeriod"`
+ } `xml:"field"`
+ } `xml:"fields"`
+}
+type TimeZoneNames struct {
+ Common
+ HourFormat []*Common `xml:"hourFormat"`
+ HoursFormat []*Common `xml:"hoursFormat"`
+ GmtFormat []*Common `xml:"gmtFormat"`
+ GmtZeroFormat []*Common `xml:"gmtZeroFormat"`
+ RegionFormat []*Common `xml:"regionFormat"`
+ FallbackFormat []*Common `xml:"fallbackFormat"`
+ FallbackRegionFormat []*Common `xml:"fallbackRegionFormat"`
+ AbbreviationFallback []*Common `xml:"abbreviationFallback"`
+ PreferenceOrdering []*Common `xml:"preferenceOrdering"`
+ SingleCountries []*struct {
+ Common
+ List string `xml:"list,attr"`
+ } `xml:"singleCountries"`
+ Zone []*struct {
+ Common
+ Long []*struct {
+ Common
+ Generic []*Common `xml:"generic"`
+ Standard []*Common `xml:"standard"`
+ Daylight []*Common `xml:"daylight"`
+ } `xml:"long"`
+ Short []*struct {
+ Common
+ Generic []*Common `xml:"generic"`
+ Standard []*Common `xml:"standard"`
+ Daylight []*Common `xml:"daylight"`
+ } `xml:"short"`
+ CommonlyUsed []*struct {
+ Common
+ Used string `xml:"used,attr"`
+ } `xml:"commonlyUsed"`
+ ExemplarCity []*Common `xml:"exemplarCity"`
+ } `xml:"zone"`
+ Metazone []*struct {
+ Common
+ Long []*struct {
+ Common
+ Generic []*Common `xml:"generic"`
+ Standard []*Common `xml:"standard"`
+ Daylight []*Common `xml:"daylight"`
+ } `xml:"long"`
+ Short []*struct {
+ Common
+ Generic []*Common `xml:"generic"`
+ Standard []*Common `xml:"standard"`
+ Daylight []*Common `xml:"daylight"`
+ } `xml:"short"`
+ CommonlyUsed []*struct {
+ Common
+ Used string `xml:"used,attr"`
+ } `xml:"commonlyUsed"`
+ } `xml:"metazone"`
+}
+
+// LocaleDisplayNames specifies localized display names for for scripts, languages,
+// countries, currencies, and variants.
+type LocaleDisplayNames struct {
+ Common
+ LocaleDisplayPattern *struct {
+ Common
+ LocalePattern []*Common `xml:"localePattern"`
+ LocaleSeparator []*Common `xml:"localeSeparator"`
+ LocaleKeyTypePattern []*Common `xml:"localeKeyTypePattern"`
+ } `xml:"localeDisplayPattern"`
+ Languages *struct {
+ Common
+ Language []*Common `xml:"language"`
+ } `xml:"languages"`
+ Scripts *struct {
+ Common
+ Script []*Common `xml:"script"`
+ } `xml:"scripts"`
+ Territories *struct {
+ Common
+ Territory []*Common `xml:"territory"`
+ } `xml:"territories"`
+ Subdivisions *struct {
+ Common
+ Subdivision []*Common `xml:"subdivision"`
+ } `xml:"subdivisions"`
+ Variants *struct {
+ Common
+ Variant []*Common `xml:"variant"`
+ } `xml:"variants"`
+ Keys *struct {
+ Common
+ Key []*Common `xml:"key"`
+ } `xml:"keys"`
+ Types *struct {
+ Common
+ Type []*struct {
+ Common
+ Key string `xml:"key,attr"`
+ } `xml:"type"`
+ } `xml:"types"`
+ TransformNames *struct {
+ Common
+ TransformName []*Common `xml:"transformName"`
+ } `xml:"transformNames"`
+ MeasurementSystemNames *struct {
+ Common
+ MeasurementSystemName []*Common `xml:"measurementSystemName"`
+ } `xml:"measurementSystemNames"`
+ CodePatterns *struct {
+ Common
+ CodePattern []*Common `xml:"codePattern"`
+ } `xml:"codePatterns"`
+}
+
+// Numbers supplies information for formatting and parsing numbers and currencies.
+type Numbers struct {
+ Common
+ DefaultNumberingSystem []*Common `xml:"defaultNumberingSystem"`
+ OtherNumberingSystems []*struct {
+ Common
+ Native []*Common `xml:"native"`
+ Traditional []*Common `xml:"traditional"`
+ Finance []*Common `xml:"finance"`
+ } `xml:"otherNumberingSystems"`
+ MinimumGroupingDigits []*Common `xml:"minimumGroupingDigits"`
+ Symbols []*struct {
+ Common
+ NumberSystem string `xml:"numberSystem,attr"`
+ Decimal []*struct {
+ Common
+ NumberSystem string `xml:"numberSystem,attr"`
+ } `xml:"decimal"`
+ Group []*struct {
+ Common
+ NumberSystem string `xml:"numberSystem,attr"`
+ } `xml:"group"`
+ List []*struct {
+ Common
+ NumberSystem string `xml:"numberSystem,attr"`
+ } `xml:"list"`
+ PercentSign []*struct {
+ Common
+ NumberSystem string `xml:"numberSystem,attr"`
+ } `xml:"percentSign"`
+ NativeZeroDigit []*struct {
+ Common
+ NumberSystem string `xml:"numberSystem,attr"`
+ } `xml:"nativeZeroDigit"`
+ PatternDigit []*struct {
+ Common
+ NumberSystem string `xml:"numberSystem,attr"`
+ } `xml:"patternDigit"`
+ PlusSign []*struct {
+ Common
+ NumberSystem string `xml:"numberSystem,attr"`
+ } `xml:"plusSign"`
+ MinusSign []*struct {
+ Common
+ NumberSystem string `xml:"numberSystem,attr"`
+ } `xml:"minusSign"`
+ Exponential []*struct {
+ Common
+ NumberSystem string `xml:"numberSystem,attr"`
+ } `xml:"exponential"`
+ SuperscriptingExponent []*Common `xml:"superscriptingExponent"`
+ PerMille []*struct {
+ Common
+ NumberSystem string `xml:"numberSystem,attr"`
+ } `xml:"perMille"`
+ Infinity []*struct {
+ Common
+ NumberSystem string `xml:"numberSystem,attr"`
+ } `xml:"infinity"`
+ Nan []*struct {
+ Common
+ NumberSystem string `xml:"numberSystem,attr"`
+ } `xml:"nan"`
+ CurrencyDecimal []*struct {
+ Common
+ NumberSystem string `xml:"numberSystem,attr"`
+ } `xml:"currencyDecimal"`
+ CurrencyGroup []*struct {
+ Common
+ NumberSystem string `xml:"numberSystem,attr"`
+ } `xml:"currencyGroup"`
+ TimeSeparator []*Common `xml:"timeSeparator"`
+ } `xml:"symbols"`
+ DecimalFormats []*struct {
+ Common
+ NumberSystem string `xml:"numberSystem,attr"`
+ DecimalFormatLength []*struct {
+ Common
+ DecimalFormat []*struct {
+ Common
+ Pattern []*struct {
+ Common
+ Numbers string `xml:"numbers,attr"`
+ Count string `xml:"count,attr"`
+ } `xml:"pattern"`
+ } `xml:"decimalFormat"`
+ } `xml:"decimalFormatLength"`
+ } `xml:"decimalFormats"`
+ ScientificFormats []*struct {
+ Common
+ NumberSystem string `xml:"numberSystem,attr"`
+ ScientificFormatLength []*struct {
+ Common
+ ScientificFormat []*struct {
+ Common
+ Pattern []*struct {
+ Common
+ Numbers string `xml:"numbers,attr"`
+ Count string `xml:"count,attr"`
+ } `xml:"pattern"`
+ } `xml:"scientificFormat"`
+ } `xml:"scientificFormatLength"`
+ } `xml:"scientificFormats"`
+ PercentFormats []*struct {
+ Common
+ NumberSystem string `xml:"numberSystem,attr"`
+ PercentFormatLength []*struct {
+ Common
+ PercentFormat []*struct {
+ Common
+ Pattern []*struct {
+ Common
+ Numbers string `xml:"numbers,attr"`
+ Count string `xml:"count,attr"`
+ } `xml:"pattern"`
+ } `xml:"percentFormat"`
+ } `xml:"percentFormatLength"`
+ } `xml:"percentFormats"`
+ CurrencyFormats []*struct {
+ Common
+ NumberSystem string `xml:"numberSystem,attr"`
+ CurrencySpacing []*struct {
+ Common
+ BeforeCurrency []*struct {
+ Common
+ CurrencyMatch []*Common `xml:"currencyMatch"`
+ SurroundingMatch []*Common `xml:"surroundingMatch"`
+ InsertBetween []*Common `xml:"insertBetween"`
+ } `xml:"beforeCurrency"`
+ AfterCurrency []*struct {
+ Common
+ CurrencyMatch []*Common `xml:"currencyMatch"`
+ SurroundingMatch []*Common `xml:"surroundingMatch"`
+ InsertBetween []*Common `xml:"insertBetween"`
+ } `xml:"afterCurrency"`
+ } `xml:"currencySpacing"`
+ CurrencyFormatLength []*struct {
+ Common
+ CurrencyFormat []*struct {
+ Common
+ Pattern []*struct {
+ Common
+ Numbers string `xml:"numbers,attr"`
+ Count string `xml:"count,attr"`
+ } `xml:"pattern"`
+ } `xml:"currencyFormat"`
+ } `xml:"currencyFormatLength"`
+ UnitPattern []*struct {
+ Common
+ Count string `xml:"count,attr"`
+ } `xml:"unitPattern"`
+ } `xml:"currencyFormats"`
+ Currencies *struct {
+ Common
+ Currency []*struct {
+ Common
+ Pattern []*struct {
+ Common
+ Numbers string `xml:"numbers,attr"`
+ Count string `xml:"count,attr"`
+ } `xml:"pattern"`
+ DisplayName []*struct {
+ Common
+ Count string `xml:"count,attr"`
+ } `xml:"displayName"`
+ Symbol []*Common `xml:"symbol"`
+ Decimal []*struct {
+ Common
+ NumberSystem string `xml:"numberSystem,attr"`
+ } `xml:"decimal"`
+ Group []*struct {
+ Common
+ NumberSystem string `xml:"numberSystem,attr"`
+ } `xml:"group"`
+ } `xml:"currency"`
+ } `xml:"currencies"`
+ MiscPatterns []*struct {
+ Common
+ NumberSystem string `xml:"numberSystem,attr"`
+ Pattern []*struct {
+ Common
+ Numbers string `xml:"numbers,attr"`
+ Count string `xml:"count,attr"`
+ } `xml:"pattern"`
+ } `xml:"miscPatterns"`
+}
+
+// Version is the version of CLDR from which the XML definitions are generated.
+const Version = "30"
diff --git a/vendor/golang.org/x/tools/.gitattributes b/vendor/golang.org/x/tools/.gitattributes
new file mode 100644
index 000000000..d2f212e5d
--- /dev/null
+++ b/vendor/golang.org/x/tools/.gitattributes
@@ -0,0 +1,10 @@
+# Treat all files in this repo as binary, with no git magic updating
+# line endings. Windows users contributing to Go will need to use a
+# modern version of git and editors capable of LF line endings.
+#
+# We'll prevent accidental CRLF line endings from entering the repo
+# via the git-review gofmt checks.
+#
+# See golang.org/issue/9281
+
+* -text
diff --git a/vendor/golang.org/x/tools/.gitignore b/vendor/golang.org/x/tools/.gitignore
new file mode 100644
index 000000000..5a9d62efd
--- /dev/null
+++ b/vendor/golang.org/x/tools/.gitignore
@@ -0,0 +1,2 @@
+# Add no patterns to .gitignore except for files generated by the build.
+last-change
diff --git a/vendor/golang.org/x/tools/AUTHORS b/vendor/golang.org/x/tools/AUTHORS
new file mode 100644
index 000000000..15167cd74
--- /dev/null
+++ b/vendor/golang.org/x/tools/AUTHORS
@@ -0,0 +1,3 @@
+# This source code refers to The Go Authors for copyright purposes.
+# The master list of authors is in the main Go distribution,
+# visible at http://tip.golang.org/AUTHORS.
diff --git a/vendor/golang.org/x/tools/CONTRIBUTING.md b/vendor/golang.org/x/tools/CONTRIBUTING.md
new file mode 100644
index 000000000..88dff59bc
--- /dev/null
+++ b/vendor/golang.org/x/tools/CONTRIBUTING.md
@@ -0,0 +1,31 @@
+# Contributing to Go
+
+Go is an open source project.
+
+It is the work of hundreds of contributors. We appreciate your help!
+
+
+## Filing issues
+
+When [filing an issue](https://golang.org/issue/new), make sure to answer these five questions:
+
+1. What version of Go are you using (`go version`)?
+2. What operating system and processor architecture are you using?
+3. What did you do?
+4. What did you expect to see?
+5. What did you see instead?
+
+General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker.
+The gophers there will answer or ask you to file an issue if you've tripped over a bug.
+
+## Contributing code
+
+Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html)
+before sending patches.
+
+**We do not accept GitHub pull requests**
+(we use [Gerrit](https://code.google.com/p/gerrit/) instead for code review).
+
+Unless otherwise noted, the Go source files are distributed under
+the BSD-style license found in the LICENSE file.
+
diff --git a/vendor/golang.org/x/tools/CONTRIBUTORS b/vendor/golang.org/x/tools/CONTRIBUTORS
new file mode 100644
index 000000000..1c4577e96
--- /dev/null
+++ b/vendor/golang.org/x/tools/CONTRIBUTORS
@@ -0,0 +1,3 @@
+# This source code was written by the Go contributors.
+# The master list of contributors is in the main Go distribution,
+# visible at http://tip.golang.org/CONTRIBUTORS.
diff --git a/Godeps/_workspace/src/github.com/syndtr/gosnappy/LICENSE b/vendor/golang.org/x/tools/LICENSE
index 6050c10f4..6a66aea5e 100644
--- a/Godeps/_workspace/src/github.com/syndtr/gosnappy/LICENSE
+++ b/vendor/golang.org/x/tools/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2011 The Snappy-Go Authors. All rights reserved.
+Copyright (c) 2009 The Go Authors. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
diff --git a/Godeps/_workspace/src/golang.org/x/tools/PATENTS b/vendor/golang.org/x/tools/PATENTS
index 733099041..733099041 100644
--- a/Godeps/_workspace/src/golang.org/x/tools/PATENTS
+++ b/vendor/golang.org/x/tools/PATENTS
diff --git a/vendor/golang.org/x/tools/README b/vendor/golang.org/x/tools/README
new file mode 100644
index 000000000..d5944c6db
--- /dev/null
+++ b/vendor/golang.org/x/tools/README
@@ -0,0 +1,10 @@
+This subrepository holds the source for various packages and tools that support
+the Go programming language.
+
+Some of the tools, godoc and vet for example, are included in binary Go distributions.
+Others, including the Go guru and the test coverage tool, can be fetched with "go get".
+
+Packages include a type-checker for Go and an implementation of the
+Static Single Assignment form (SSA) representation for Go programs.
+
+To submit changes to this repository, see http://golang.org/doc/contribute.html.
diff --git a/vendor/golang.org/x/tools/codereview.cfg b/vendor/golang.org/x/tools/codereview.cfg
new file mode 100644
index 000000000..3f8b14b64
--- /dev/null
+++ b/vendor/golang.org/x/tools/codereview.cfg
@@ -0,0 +1 @@
+issuerepo: golang/go
diff --git a/Godeps/_workspace/src/golang.org/x/tools/go/ast/astutil/enclosing.go b/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go
index 6b7052b89..6b7052b89 100644
--- a/Godeps/_workspace/src/golang.org/x/tools/go/ast/astutil/enclosing.go
+++ b/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go
diff --git a/Godeps/_workspace/src/golang.org/x/tools/go/ast/astutil/imports.go b/vendor/golang.org/x/tools/go/ast/astutil/imports.go
index a47bcfa3f..2e81f4d3a 100644
--- a/Godeps/_workspace/src/golang.org/x/tools/go/ast/astutil/imports.go
+++ b/vendor/golang.org/x/tools/go/ast/astutil/imports.go
@@ -3,7 +3,7 @@
// license that can be found in the LICENSE file.
// Package astutil contains common utilities for working with the Go AST.
-package astutil
+package astutil // import "golang.org/x/tools/go/ast/astutil"
import (
"fmt"
@@ -150,7 +150,8 @@ func AddNamedImport(fset *token.FileSet, f *ast.File, name, ipath string) (added
// Merge all the import declarations into the first one.
var first *ast.GenDecl
- for i, decl := range f.Decls {
+ for i := 0; i < len(f.Decls); i++ {
+ decl := f.Decls[i]
gen, ok := decl.(*ast.GenDecl)
if !ok || gen.Tok != token.IMPORT || declImports(gen, "C") {
continue
@@ -159,12 +160,16 @@ func AddNamedImport(fset *token.FileSet, f *ast.File, name, ipath string) (added
first = gen
continue // Don't touch the first one.
}
+ // We now know there is more than one package in this import
+ // declaration. Ensure that it ends up parenthesized.
+ first.Lparen = first.Pos()
// Move the imports of the other import declaration to the first one.
for _, spec := range gen.Specs {
spec.(*ast.ImportSpec).Path.ValuePos = first.Pos()
first.Specs = append(first.Specs, spec)
}
f.Decls = append(f.Decls[:i], f.Decls[i+1:]...)
+ i--
}
return true
@@ -178,6 +183,7 @@ func DeleteImport(fset *token.FileSet, f *ast.File, path string) (deleted bool)
// DeleteNamedImport deletes the import with the given name and path from the file f, if present.
func DeleteNamedImport(fset *token.FileSet, f *ast.File, name, path string) (deleted bool) {
var delspecs []*ast.ImportSpec
+ var delcomments []*ast.CommentGroup
// Find the import nodes that import path, if any.
for i := 0; i < len(f.Decls); i++ {
@@ -214,7 +220,35 @@ func DeleteNamedImport(fset *token.FileSet, f *ast.File, name, path string) (del
i--
break
} else if len(gen.Specs) == 1 {
+ if impspec.Doc != nil {
+ delcomments = append(delcomments, impspec.Doc)
+ }
+ if impspec.Comment != nil {
+ delcomments = append(delcomments, impspec.Comment)
+ }
+ for _, cg := range f.Comments {
+ // Found comment on the same line as the import spec.
+ if cg.End() < impspec.Pos() && fset.Position(cg.End()).Line == fset.Position(impspec.Pos()).Line {
+ delcomments = append(delcomments, cg)
+ break
+ }
+ }
+
gen.Lparen = token.NoPos // drop parens
+ spec := gen.Specs[0].(*ast.ImportSpec)
+ if spec.Doc != nil {
+ // Move the documentation above the import statement.
+ gen.TokPos = spec.Doc.End() + 1
+ }
+
+ for _, cg := range f.Comments {
+ if cg.End() < spec.Pos() && fset.Position(cg.End()).Line == fset.Position(spec.Pos()).Line {
+ for fset.Position(gen.TokPos).Line != fset.Position(spec.Pos()).Line {
+ fset.File(gen.TokPos).MergeLine(fset.Position(gen.TokPos).Line)
+ }
+ break
+ }
+ }
}
if j > 0 {
lastImpspec := gen.Specs[j-1].(*ast.ImportSpec)
@@ -236,7 +270,7 @@ func DeleteNamedImport(fset *token.FileSet, f *ast.File, name, path string) (del
}
}
- // Delete them from f.Imports.
+ // Delete imports from f.Imports.
for i := 0; i < len(f.Imports); i++ {
imp := f.Imports[i]
for j, del := range delspecs {
@@ -251,6 +285,21 @@ func DeleteNamedImport(fset *token.FileSet, f *ast.File, name, path string) (del
}
}
+ // Delete comments from f.Comments.
+ for i := 0; i < len(f.Comments); i++ {
+ cg := f.Comments[i]
+ for j, del := range delcomments {
+ if cg == del {
+ copy(f.Comments[i:], f.Comments[i+1:])
+ f.Comments = f.Comments[:len(f.Comments)-1]
+ copy(delcomments[j:], delcomments[j+1:])
+ delcomments = delcomments[:len(delcomments)-1]
+ i--
+ break
+ }
+ }
+ }
+
if len(delspecs) > 0 {
panic(fmt.Sprintf("deleted specs from Decls but not Imports: %v", delspecs))
}
diff --git a/Godeps/_workspace/src/golang.org/x/tools/go/ast/astutil/util.go b/vendor/golang.org/x/tools/go/ast/astutil/util.go
index 763062982..763062982 100644
--- a/Godeps/_workspace/src/golang.org/x/tools/go/ast/astutil/util.go
+++ b/vendor/golang.org/x/tools/go/ast/astutil/util.go
diff --git a/Godeps/_workspace/src/golang.org/x/tools/imports/fastwalk.go b/vendor/golang.org/x/tools/imports/fastwalk.go
index 157c79225..157c79225 100644
--- a/Godeps/_workspace/src/golang.org/x/tools/imports/fastwalk.go
+++ b/vendor/golang.org/x/tools/imports/fastwalk.go
diff --git a/Godeps/_workspace/src/golang.org/x/tools/imports/fastwalk_dirent_fileno.go b/vendor/golang.org/x/tools/imports/fastwalk_dirent_fileno.go
index f1fd64949..f1fd64949 100644
--- a/Godeps/_workspace/src/golang.org/x/tools/imports/fastwalk_dirent_fileno.go
+++ b/vendor/golang.org/x/tools/imports/fastwalk_dirent_fileno.go
diff --git a/Godeps/_workspace/src/golang.org/x/tools/imports/fastwalk_dirent_ino.go b/vendor/golang.org/x/tools/imports/fastwalk_dirent_ino.go
index ee85bc4dd..ee85bc4dd 100644
--- a/Godeps/_workspace/src/golang.org/x/tools/imports/fastwalk_dirent_ino.go
+++ b/vendor/golang.org/x/tools/imports/fastwalk_dirent_ino.go
diff --git a/Godeps/_workspace/src/golang.org/x/tools/imports/fastwalk_portable.go b/vendor/golang.org/x/tools/imports/fastwalk_portable.go
index 6c2658347..6c2658347 100644
--- a/Godeps/_workspace/src/golang.org/x/tools/imports/fastwalk_portable.go
+++ b/vendor/golang.org/x/tools/imports/fastwalk_portable.go
diff --git a/Godeps/_workspace/src/golang.org/x/tools/imports/fastwalk_unix.go b/vendor/golang.org/x/tools/imports/fastwalk_unix.go
index 5854233db..5854233db 100644
--- a/Godeps/_workspace/src/golang.org/x/tools/imports/fastwalk_unix.go
+++ b/vendor/golang.org/x/tools/imports/fastwalk_unix.go
diff --git a/Godeps/_workspace/src/golang.org/x/tools/imports/fix.go b/vendor/golang.org/x/tools/imports/fix.go
index a241c2976..a241c2976 100644
--- a/Godeps/_workspace/src/golang.org/x/tools/imports/fix.go
+++ b/vendor/golang.org/x/tools/imports/fix.go
diff --git a/Godeps/_workspace/src/golang.org/x/tools/imports/imports.go b/vendor/golang.org/x/tools/imports/imports.go
index 7c6c1b653..c26c1946a 100644
--- a/Godeps/_workspace/src/golang.org/x/tools/imports/imports.go
+++ b/vendor/golang.org/x/tools/imports/imports.go
@@ -6,7 +6,7 @@
// Package imports implements a Go pretty-printer (like package "go/format")
// that also adds or removes import statements as necessary.
-package imports
+package imports // import "golang.org/x/tools/imports"
import (
"bufio"
diff --git a/Godeps/_workspace/src/golang.org/x/tools/imports/mkindex.go b/vendor/golang.org/x/tools/imports/mkindex.go
index 755e2394f..755e2394f 100644
--- a/Godeps/_workspace/src/golang.org/x/tools/imports/mkindex.go
+++ b/vendor/golang.org/x/tools/imports/mkindex.go
diff --git a/Godeps/_workspace/src/golang.org/x/tools/imports/mkstdlib.go b/vendor/golang.org/x/tools/imports/mkstdlib.go
index 1e559e9f5..1e559e9f5 100644
--- a/Godeps/_workspace/src/golang.org/x/tools/imports/mkstdlib.go
+++ b/vendor/golang.org/x/tools/imports/mkstdlib.go
diff --git a/Godeps/_workspace/src/golang.org/x/tools/imports/sortimports.go b/vendor/golang.org/x/tools/imports/sortimports.go
index 653afc517..653afc517 100644
--- a/Godeps/_workspace/src/golang.org/x/tools/imports/sortimports.go
+++ b/vendor/golang.org/x/tools/imports/sortimports.go
diff --git a/Godeps/_workspace/src/golang.org/x/tools/imports/zstdlib.go b/vendor/golang.org/x/tools/imports/zstdlib.go
index 28835da03..28835da03 100644
--- a/Godeps/_workspace/src/golang.org/x/tools/imports/zstdlib.go
+++ b/vendor/golang.org/x/tools/imports/zstdlib.go
diff --git a/Godeps/_workspace/src/gopkg.in/check.v1/.gitignore b/vendor/gopkg.in/check.v1/.gitignore
index 191a5360b..191a5360b 100644
--- a/Godeps/_workspace/src/gopkg.in/check.v1/.gitignore
+++ b/vendor/gopkg.in/check.v1/.gitignore
diff --git a/Godeps/_workspace/src/gopkg.in/check.v1/LICENSE b/vendor/gopkg.in/check.v1/LICENSE
index 545cf2d33..545cf2d33 100644
--- a/Godeps/_workspace/src/gopkg.in/check.v1/LICENSE
+++ b/vendor/gopkg.in/check.v1/LICENSE
diff --git a/Godeps/_workspace/src/gopkg.in/check.v1/README.md b/vendor/gopkg.in/check.v1/README.md
index 0ca9e5726..0ca9e5726 100644
--- a/Godeps/_workspace/src/gopkg.in/check.v1/README.md
+++ b/vendor/gopkg.in/check.v1/README.md
diff --git a/Godeps/_workspace/src/gopkg.in/check.v1/TODO b/vendor/gopkg.in/check.v1/TODO
index 33498270e..33498270e 100644
--- a/Godeps/_workspace/src/gopkg.in/check.v1/TODO
+++ b/vendor/gopkg.in/check.v1/TODO
diff --git a/Godeps/_workspace/src/gopkg.in/check.v1/benchmark.go b/vendor/gopkg.in/check.v1/benchmark.go
index 46ea9dc6d..46ea9dc6d 100644
--- a/Godeps/_workspace/src/gopkg.in/check.v1/benchmark.go
+++ b/vendor/gopkg.in/check.v1/benchmark.go
diff --git a/Godeps/_workspace/src/gopkg.in/check.v1/check.go b/vendor/gopkg.in/check.v1/check.go
index 82c26fa73..82c26fa73 100644
--- a/Godeps/_workspace/src/gopkg.in/check.v1/check.go
+++ b/vendor/gopkg.in/check.v1/check.go
diff --git a/Godeps/_workspace/src/gopkg.in/check.v1/checkers.go b/vendor/gopkg.in/check.v1/checkers.go
index bac338729..bac338729 100644
--- a/Godeps/_workspace/src/gopkg.in/check.v1/checkers.go
+++ b/vendor/gopkg.in/check.v1/checkers.go
diff --git a/Godeps/_workspace/src/gopkg.in/check.v1/helpers.go b/vendor/gopkg.in/check.v1/helpers.go
index 58a733b50..58a733b50 100644
--- a/Godeps/_workspace/src/gopkg.in/check.v1/helpers.go
+++ b/vendor/gopkg.in/check.v1/helpers.go
diff --git a/Godeps/_workspace/src/gopkg.in/check.v1/printer.go b/vendor/gopkg.in/check.v1/printer.go
index e0f7557b5..e0f7557b5 100644
--- a/Godeps/_workspace/src/gopkg.in/check.v1/printer.go
+++ b/vendor/gopkg.in/check.v1/printer.go
diff --git a/Godeps/_workspace/src/gopkg.in/check.v1/reporter.go b/vendor/gopkg.in/check.v1/reporter.go
index fb04f76f6..fb04f76f6 100644
--- a/Godeps/_workspace/src/gopkg.in/check.v1/reporter.go
+++ b/vendor/gopkg.in/check.v1/reporter.go
diff --git a/Godeps/_workspace/src/gopkg.in/check.v1/run.go b/vendor/gopkg.in/check.v1/run.go
index da8fd7987..da8fd7987 100644
--- a/Godeps/_workspace/src/gopkg.in/check.v1/run.go
+++ b/vendor/gopkg.in/check.v1/run.go
diff --git a/Godeps/_workspace/src/gopkg.in/fatih/set.v0/.travis.yml b/vendor/gopkg.in/fatih/set.v0/.travis.yml
index b05e4c53f..b05e4c53f 100644
--- a/Godeps/_workspace/src/gopkg.in/fatih/set.v0/.travis.yml
+++ b/vendor/gopkg.in/fatih/set.v0/.travis.yml
diff --git a/Godeps/_workspace/src/gopkg.in/fatih/set.v0/LICENSE.md b/vendor/gopkg.in/fatih/set.v0/LICENSE.md
index 25fdaf639..25fdaf639 100644
--- a/Godeps/_workspace/src/gopkg.in/fatih/set.v0/LICENSE.md
+++ b/vendor/gopkg.in/fatih/set.v0/LICENSE.md
diff --git a/Godeps/_workspace/src/gopkg.in/fatih/set.v0/README.md b/vendor/gopkg.in/fatih/set.v0/README.md
index 23afdd98d..23afdd98d 100644
--- a/Godeps/_workspace/src/gopkg.in/fatih/set.v0/README.md
+++ b/vendor/gopkg.in/fatih/set.v0/README.md
diff --git a/Godeps/_workspace/src/gopkg.in/fatih/set.v0/set.go b/vendor/gopkg.in/fatih/set.v0/set.go
index ac0240ce7..ac0240ce7 100644
--- a/Godeps/_workspace/src/gopkg.in/fatih/set.v0/set.go
+++ b/vendor/gopkg.in/fatih/set.v0/set.go
diff --git a/Godeps/_workspace/src/gopkg.in/fatih/set.v0/set_nots.go b/vendor/gopkg.in/fatih/set.v0/set_nots.go
index ec1ab2285..ec1ab2285 100644
--- a/Godeps/_workspace/src/gopkg.in/fatih/set.v0/set_nots.go
+++ b/vendor/gopkg.in/fatih/set.v0/set_nots.go
diff --git a/Godeps/_workspace/src/gopkg.in/fatih/set.v0/set_ts.go b/vendor/gopkg.in/fatih/set.v0/set_ts.go
index 50f532565..50f532565 100644
--- a/Godeps/_workspace/src/gopkg.in/fatih/set.v0/set_ts.go
+++ b/vendor/gopkg.in/fatih/set.v0/set_ts.go
diff --git a/Godeps/_workspace/src/gopkg.in/karalabe/cookiejar.v2/LICENSE b/vendor/gopkg.in/karalabe/cookiejar.v2/LICENSE
index 467d60878..467d60878 100644..100755
--- a/Godeps/_workspace/src/gopkg.in/karalabe/cookiejar.v2/LICENSE
+++ b/vendor/gopkg.in/karalabe/cookiejar.v2/LICENSE
diff --git a/vendor/gopkg.in/karalabe/cookiejar.v2/README.md b/vendor/gopkg.in/karalabe/cookiejar.v2/README.md
new file mode 100755
index 000000000..44c420b60
--- /dev/null
+++ b/vendor/gopkg.in/karalabe/cookiejar.v2/README.md
@@ -0,0 +1,109 @@
+ CookieJar - A contestant's toolbox
+======================================
+
+CookieJar is a small collection of common algorithms, data structures and library extensions that were deemed handy for computing competitions at one point or another.
+
+This toolbox is a work in progress for the time being. It may be lacking, and it may change drastically between commits (although every effort is made not to). You're welcome to use it, but it's your head on the line :)
+
+ Installation
+----------------
+
+To get the package, execute:
+
+ go get gopkg.in/karalabe/cookiejar.v2
+
+To import this package, add the following line to your code:
+
+ import "gopkg.in/karalabe/cookiejar.v2"
+
+For more details, see the [package documentation](http://godoc.org/gopkg.in/karalabe/cookiejar.v2).
+
+ Contents
+------------
+
+Algorithms:
+ - Graph
+ - [Breadth First Search](http://godoc.org/gopkg.in/karalabe/cookiejar.v2/graph/bfs)
+ - [Depth First Search](http://godoc.org/gopkg.in/karalabe/cookiejar.v2/graph/dfs)
+
+Data structures:
+ - [Bag](http://godoc.org/gopkg.in/karalabe/cookiejar.v2/collections/bag)
+ - [Deque](http://godoc.org/gopkg.in/karalabe/cookiejar.v2/collections/deque)
+ - [Graph](http://godoc.org/gopkg.in/karalabe/cookiejar.v2/graph)
+ - [Priority Queue](http://godoc.org/gopkg.in/karalabe/cookiejar.v2/collections/prque)
+ - [Queue](http://godoc.org/gopkg.in/karalabe/cookiejar.v2/collections/queue)
+ - [Set](http://godoc.org/gopkg.in/karalabe/cookiejar.v2/collections/set)
+ - [Stack](http://godoc.org/gopkg.in/karalabe/cookiejar.v2/collections/stack)
+
+Extensions:
+ - [fmt](http://godoc.org/gopkg.in/karalabe/cookiejar.v2/exts/fmtext)
+ - `Scan` and `Fscan` for `int`, `float64`, `string` and lines
+ - [math](http://godoc.org/gopkg.in/karalabe/cookiejar.v2/exts/mathext)
+ - `Abs` for `int`
+ - `Min` and `Max` for `int`, `big.Int` and `big.Rat`
+ - `Sign` for `int` and `float64`
+ - [os](http://godoc.org/gopkg.in/karalabe/cookiejar.v2/exts/osext)
+ - `Open` and `Create` without error codes
+ - [sort](http://godoc.org/gopkg.in/karalabe/cookiejar.v2/exts/sortext)
+ - `Sort` and `Search` for `big.Int` and `big.Rat`
+ - `Unique` for any `sort.Interface`
+
+Below are the performance results for the data structures and the complexity analysis for the algorithms.
+
+ Performance
+---------------
+
+Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz:
+```
+- bag
+ - BenchmarkInsert 309 ns/op
+ - BenchmarkRemove 197 ns/op
+ - BenchmarkDo 28.1 ns/op
+- deque
+ - BenchmarkPush 25.4 ns/op
+ - BenchmarkPop 6.72 ns/op
+- prque
+ - BenchmarkPush 171 ns/op
+ - BenchmarkPop 947 ns/op
+- queue
+ - BenchmarkPush 23.0 ns/op
+ - BenchmarkPop 5.92 ns/op
+- set
+ - BenchmarkInsert 259 ns/op
+ - BenchmarkRemove 115 ns/op
+ - BenchmarkDo 20.9 ns/op
+- stack
+ - BenchmarkPush 16.4 ns/op
+ - BenchmarkPop 6.45 ns/op
+```
+
+ Complexity
+--------------
+
+| Algorithm | Time complexity | Space complexity |
+|:---------:|:---------------:|:----------------:|
+| graph/bfs | O(E) | O(V) |
+| graph/dfs | O(E) | O(E) |
+
+ Here be dragons :)
+----------------------
+
+```
+ . _///_,
+ . / ` ' '>
+ ) o' __/_'>
+ ( / _/ )_\'>
+ ' "__/ /_/\_>
+ ____/_/_/_/
+ /,---, _/ /
+ "" /_/_/_/
+ /_(_(_(_ \
+ ( \_\_\\_ )\
+ \'__\_\_\_\__ ).\
+ //____|___\__) )_/
+ | _ \'___'_( /'
+ \_ (-'\'___'_\ __,'_'
+ __) \ \\___(_ __/.__,'
+ ,((,-,__\ '", __\_/. __,'
+ '"./_._._-'
+```
diff --git a/Godeps/_workspace/src/gopkg.in/karalabe/cookiejar.v2/collections/prque/prque.go b/vendor/gopkg.in/karalabe/cookiejar.v2/collections/prque/prque.go
index 5c1967c65..5c1967c65 100644..100755
--- a/Godeps/_workspace/src/gopkg.in/karalabe/cookiejar.v2/collections/prque/prque.go
+++ b/vendor/gopkg.in/karalabe/cookiejar.v2/collections/prque/prque.go
diff --git a/Godeps/_workspace/src/gopkg.in/karalabe/cookiejar.v2/collections/prque/sstack.go b/vendor/gopkg.in/karalabe/cookiejar.v2/collections/prque/sstack.go
index 9f393196e..9f393196e 100644..100755
--- a/Godeps/_workspace/src/gopkg.in/karalabe/cookiejar.v2/collections/prque/sstack.go
+++ b/vendor/gopkg.in/karalabe/cookiejar.v2/collections/prque/sstack.go
diff --git a/vendor/gopkg.in/natefinch/npipe.v2/.gitignore b/vendor/gopkg.in/natefinch/npipe.v2/.gitignore
new file mode 100644
index 000000000..00268614f
--- /dev/null
+++ b/vendor/gopkg.in/natefinch/npipe.v2/.gitignore
@@ -0,0 +1,22 @@
+# Compiled Object files, Static and Dynamic libs (Shared Objects)
+*.o
+*.a
+*.so
+
+# Folders
+_obj
+_test
+
+# Architecture specific extensions/prefixes
+*.[568vq]
+[568vq].out
+
+*.cgo1.go
+*.cgo2.c
+_cgo_defun.c
+_cgo_gotypes.go
+_cgo_export.*
+
+_testmain.go
+
+*.exe
diff --git a/Godeps/_workspace/src/gopkg.in/natefinch/npipe.v2/LICENSE.txt b/vendor/gopkg.in/natefinch/npipe.v2/LICENSE.txt
index a4a11046c..a4a11046c 100644
--- a/Godeps/_workspace/src/gopkg.in/natefinch/npipe.v2/LICENSE.txt
+++ b/vendor/gopkg.in/natefinch/npipe.v2/LICENSE.txt
diff --git a/Godeps/_workspace/src/gopkg.in/natefinch/npipe.v2/README.md b/vendor/gopkg.in/natefinch/npipe.v2/README.md
index 420a4d16c..420a4d16c 100644
--- a/Godeps/_workspace/src/gopkg.in/natefinch/npipe.v2/README.md
+++ b/vendor/gopkg.in/natefinch/npipe.v2/README.md
diff --git a/Godeps/_workspace/src/gopkg.in/natefinch/npipe.v2/doc.go b/vendor/gopkg.in/natefinch/npipe.v2/doc.go
index 3445773b4..3445773b4 100644
--- a/Godeps/_workspace/src/gopkg.in/natefinch/npipe.v2/doc.go
+++ b/vendor/gopkg.in/natefinch/npipe.v2/doc.go
diff --git a/Godeps/_workspace/src/gopkg.in/natefinch/npipe.v2/npipe_windows.go b/vendor/gopkg.in/natefinch/npipe.v2/npipe_windows.go
index 5e7cf13ee..5e7cf13ee 100755
--- a/Godeps/_workspace/src/gopkg.in/natefinch/npipe.v2/npipe_windows.go
+++ b/vendor/gopkg.in/natefinch/npipe.v2/npipe_windows.go
diff --git a/Godeps/_workspace/src/gopkg.in/natefinch/npipe.v2/znpipe_windows_386.go b/vendor/gopkg.in/natefinch/npipe.v2/znpipe_windows_386.go
index c283e6cf9..c283e6cf9 100644
--- a/Godeps/_workspace/src/gopkg.in/natefinch/npipe.v2/znpipe_windows_386.go
+++ b/vendor/gopkg.in/natefinch/npipe.v2/znpipe_windows_386.go
diff --git a/Godeps/_workspace/src/gopkg.in/natefinch/npipe.v2/znpipe_windows_amd64.go b/vendor/gopkg.in/natefinch/npipe.v2/znpipe_windows_amd64.go
index c283e6cf9..c283e6cf9 100644
--- a/Godeps/_workspace/src/gopkg.in/natefinch/npipe.v2/znpipe_windows_amd64.go
+++ b/vendor/gopkg.in/natefinch/npipe.v2/znpipe_windows_amd64.go
diff --git a/vendor/gopkg.in/sourcemap.v1/.travis.yml b/vendor/gopkg.in/sourcemap.v1/.travis.yml
new file mode 100644
index 000000000..814f0e51a
--- /dev/null
+++ b/vendor/gopkg.in/sourcemap.v1/.travis.yml
@@ -0,0 +1,12 @@
+language: go
+
+go:
+ - 1.2
+ - 1.3
+ - 1.4
+ - 1.5
+
+install:
+ - mkdir -p $HOME/gopath/src/gopkg.in
+ - mv $HOME/gopath/src/github.com/go-sourcemap/sourcemap $HOME/gopath/src/gopkg.in/sourcemap.v1
+ - cd $HOME/gopath/src/gopkg.in/sourcemap.v1
diff --git a/vendor/gopkg.in/sourcemap.v1/LICENSE b/vendor/gopkg.in/sourcemap.v1/LICENSE
new file mode 100644
index 000000000..405d20f9c
--- /dev/null
+++ b/vendor/gopkg.in/sourcemap.v1/LICENSE
@@ -0,0 +1,25 @@
+Copyright (c) 2016 The github.com/go-sourcemap/sourcemap Contributors.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/gopkg.in/sourcemap.v1/Makefile b/vendor/gopkg.in/sourcemap.v1/Makefile
new file mode 100644
index 000000000..08381f928
--- /dev/null
+++ b/vendor/gopkg.in/sourcemap.v1/Makefile
@@ -0,0 +1,3 @@
+all:
+ go test ./... -test.v -test.cpu=1,2,4
+ go test ./... -test.v -test.short -test.race
diff --git a/vendor/gopkg.in/sourcemap.v1/README.md b/vendor/gopkg.in/sourcemap.v1/README.md
new file mode 100644
index 000000000..fb319d20f
--- /dev/null
+++ b/vendor/gopkg.in/sourcemap.v1/README.md
@@ -0,0 +1,35 @@
+# Source Maps consumer for Golang [![Build Status](https://travis-ci.org/go-sourcemap/sourcemap.svg?branch=v1)](https://travis-ci.org/go-sourcemap/sourcemap)
+
+## Installation
+
+Install:
+
+ go get gopkg.in/sourcemap.v1
+
+## Quickstart
+
+```go
+func ExampleParse() {
+ mapURL := "http://code.jquery.com/jquery-2.0.3.min.map"
+ resp, err := http.Get(mapURL)
+ if err != nil {
+ panic(err)
+ }
+ defer resp.Body.Close()
+
+ b, err := ioutil.ReadAll(resp.Body)
+ if err != nil {
+ panic(err)
+ }
+
+ smap, err := sourcemap.Parse(mapURL, b)
+ if err != nil {
+ panic(err)
+ }
+
+ line, column := 5, 6789
+ file, fn, line, col, ok := smap.Source(line, column)
+ fmt.Println(file, fn, line, col, ok)
+ // Output: http://code.jquery.com/jquery-2.0.3.js apply 4360 27 true
+}
+```
diff --git a/vendor/gopkg.in/sourcemap.v1/base64vlq/base64_vlq.go b/vendor/gopkg.in/sourcemap.v1/base64vlq/base64_vlq.go
new file mode 100644
index 000000000..598b40460
--- /dev/null
+++ b/vendor/gopkg.in/sourcemap.v1/base64vlq/base64_vlq.go
@@ -0,0 +1,95 @@
+package base64vlq
+
+import (
+ "io"
+)
+
+const encodeStd = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
+
+const (
+ vlqBaseShift = 5
+ vlqBase = 1 << vlqBaseShift
+ vlqBaseMask = vlqBase - 1
+ vlqSignBit = 1
+ vlqContinuationBit = vlqBase
+)
+
+var (
+ decodeMap [256]int
+)
+
+func init() {
+ for i := 0; i < len(encodeStd); i++ {
+ decodeMap[encodeStd[i]] = i
+ }
+}
+
+func toVLQSigned(n int) int {
+ if n < 0 {
+ return -n<<1 + 1
+ } else {
+ return n << 1
+ }
+}
+
+func fromVLQSigned(n int) int {
+ isNeg := n&vlqSignBit != 0
+ n >>= 1
+ if isNeg {
+ return -n
+ }
+ return n
+}
+
+type Encoder struct {
+ w io.ByteWriter
+}
+
+func NewEncoder(w io.ByteWriter) *Encoder {
+ return &Encoder{
+ w: w,
+ }
+}
+
+func (enc *Encoder) Encode(n int) error {
+ n = toVLQSigned(n)
+ for digit := vlqContinuationBit; digit&vlqContinuationBit != 0; {
+ digit = n & vlqBaseMask
+ n >>= vlqBaseShift
+ if n > 0 {
+ digit |= vlqContinuationBit
+ }
+ err := enc.w.WriteByte(encodeStd[digit])
+ if err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+type Decoder struct {
+ r io.ByteReader
+}
+
+func NewDecoder(r io.ByteReader) *Decoder {
+ return &Decoder{
+ r: r,
+ }
+}
+
+func (dec *Decoder) Decode() (n int, err error) {
+ shift := uint(0)
+ for continuation := true; continuation; {
+ c, err := dec.r.ReadByte()
+ if err != nil {
+ return 0, err
+ }
+
+ digit := decodeMap[c]
+ continuation = digit&vlqContinuationBit != 0
+ digit &= vlqBaseMask
+ n = n + digit<<shift
+ shift += vlqBaseShift
+ }
+ return fromVLQSigned(n), nil
+}
diff --git a/vendor/gopkg.in/sourcemap.v1/consumer.go b/vendor/gopkg.in/sourcemap.v1/consumer.go
new file mode 100644
index 000000000..b66761a6c
--- /dev/null
+++ b/vendor/gopkg.in/sourcemap.v1/consumer.go
@@ -0,0 +1,312 @@
+package sourcemap // import "gopkg.in/sourcemap.v1"
+
+import (
+ "encoding/json"
+ "errors"
+ "fmt"
+ "io"
+ "net/url"
+ "path"
+ "sort"
+ "strconv"
+ "strings"
+
+ "gopkg.in/sourcemap.v1/base64vlq"
+)
+
+type Consumer struct {
+ sourceRootURL *url.URL
+ smap *sourceMap
+ mappings []mapping
+}
+
+func Parse(mapURL string, b []byte) (*Consumer, error) {
+ smap := new(sourceMap)
+ err := json.Unmarshal(b, smap)
+ if err != nil {
+ return nil, err
+ }
+
+ if smap.Version != 3 {
+ return nil, errors.New("sourcemap: only 3rd version is supported")
+ }
+
+ var sourceRootURL *url.URL
+ if smap.SourceRoot != "" {
+ u, err := url.Parse(smap.SourceRoot)
+ if err != nil {
+ return nil, err
+ }
+ if u.IsAbs() {
+ sourceRootURL = u
+ }
+ } else if mapURL != "" {
+ u, err := url.Parse(mapURL)
+ if err != nil {
+ return nil, err
+ }
+ if u.IsAbs() {
+ u.Path = path.Dir(u.Path)
+ sourceRootURL = u
+ }
+ }
+
+ mappings, err := parseMappings(smap.Mappings)
+ if err != nil {
+ return nil, err
+ }
+ // Free memory.
+ smap.Mappings = ""
+
+ return &Consumer{
+ sourceRootURL: sourceRootURL,
+ smap: smap,
+ mappings: mappings,
+ }, nil
+}
+
+func (c *Consumer) File() string {
+ return c.smap.File
+}
+
+func (c *Consumer) Source(genLine, genCol int) (source, name string, line, col int, ok bool) {
+ i := sort.Search(len(c.mappings), func(i int) bool {
+ m := &c.mappings[i]
+ if m.genLine == genLine {
+ return m.genCol >= genCol
+ }
+ return m.genLine >= genLine
+ })
+
+ // Mapping not found.
+ if i == len(c.mappings) {
+ return
+ }
+
+ match := &c.mappings[i]
+
+ // Fuzzy match.
+ if match.genCol > genCol && i > 0 {
+ match = &c.mappings[i-1]
+ }
+
+ if match.sourcesInd >= 0 {
+ source = c.absSource(c.smap.Sources[match.sourcesInd])
+ }
+ if match.namesInd >= 0 {
+ iv := c.smap.Names[match.namesInd]
+ switch v := iv.(type) {
+ case string:
+ name = v
+ case float64:
+ name = strconv.FormatFloat(v, 'f', -1, 64)
+ default:
+ name = fmt.Sprint(iv)
+ }
+ }
+ line = match.sourceLine
+ col = match.sourceCol
+ ok = true
+ return
+}
+
+func (c *Consumer) absSource(source string) string {
+ if path.IsAbs(source) {
+ return source
+ }
+
+ if u, err := url.Parse(source); err == nil && u.IsAbs() {
+ return source
+ }
+
+ if c.sourceRootURL != nil {
+ u := *c.sourceRootURL
+ u.Path = path.Join(c.sourceRootURL.Path, source)
+ return u.String()
+ }
+
+ if c.smap.SourceRoot != "" {
+ return path.Join(c.smap.SourceRoot, source)
+ }
+
+ return source
+}
+
+func (c *Consumer) SourceName(genLine, genCol int, genName string) (name string, ok bool) {
+ ind := sort.Search(len(c.mappings), func(i int) bool {
+ m := c.mappings[i]
+ if m.genLine == genLine {
+ return m.genCol >= genCol
+ }
+ return m.genLine >= genLine
+ })
+
+ // Mapping not found.
+ if ind == len(c.mappings) {
+ return "", false
+ }
+
+ for i := ind; i >= 0; i-- {
+ m := c.mappings[i]
+ if m.namesInd == -1 {
+ continue
+ }
+ if c.smap.Names[m.namesInd] == "" {
+
+ }
+ }
+
+ return
+}
+
+type fn func() (fn, error)
+
+type sourceMap struct {
+ Version int `json:"version"`
+ File string `json:"file"`
+ SourceRoot string `json:"sourceRoot"`
+ Sources []string `json:"sources"`
+ Names []interface{} `json:"names"`
+ Mappings string `json:"mappings"`
+}
+
+type mapping struct {
+ genLine int
+ genCol int
+ sourcesInd int
+ sourceLine int
+ sourceCol int
+ namesInd int
+}
+
+type mappings struct {
+ rd *strings.Reader
+ dec *base64vlq.Decoder
+
+ genLine int
+ genCol int
+ sourcesInd int
+ sourceLine int
+ sourceCol int
+ namesInd int
+
+ value mapping
+ values []mapping
+}
+
+func parseMappings(s string) ([]mapping, error) {
+ rd := strings.NewReader(s)
+ m := &mappings{
+ rd: rd,
+ dec: base64vlq.NewDecoder(rd),
+
+ genLine: 1,
+ sourceLine: 1,
+ }
+ m.zeroValue()
+ err := m.parse()
+ if err != nil {
+ return nil, err
+ }
+ return m.values, nil
+}
+
+func (m *mappings) parse() error {
+ next := m.parseGenCol
+ for {
+ c, err := m.rd.ReadByte()
+ if err == io.EOF {
+ m.pushValue()
+ return nil
+ } else if err != nil {
+ return err
+ }
+
+ switch c {
+ case ',':
+ m.pushValue()
+ next = m.parseGenCol
+ case ';':
+ m.pushValue()
+
+ m.genLine++
+ m.genCol = 0
+
+ next = m.parseGenCol
+ default:
+ m.rd.UnreadByte()
+
+ var err error
+ next, err = next()
+ if err != nil {
+ return err
+ }
+ }
+ }
+}
+
+func (m *mappings) parseGenCol() (fn, error) {
+ n, err := m.dec.Decode()
+ if err != nil {
+ return nil, err
+ }
+ m.genCol += n
+ m.value.genCol = m.genCol
+ return m.parseSourcesInd, nil
+}
+
+func (m *mappings) parseSourcesInd() (fn, error) {
+ n, err := m.dec.Decode()
+ if err != nil {
+ return nil, err
+ }
+ m.sourcesInd += n
+ m.value.sourcesInd = m.sourcesInd
+ return m.parseSourceLine, nil
+}
+
+func (m *mappings) parseSourceLine() (fn, error) {
+ n, err := m.dec.Decode()
+ if err != nil {
+ return nil, err
+ }
+ m.sourceLine += n
+ m.value.sourceLine = m.sourceLine
+ return m.parseSourceCol, nil
+}
+
+func (m *mappings) parseSourceCol() (fn, error) {
+ n, err := m.dec.Decode()
+ if err != nil {
+ return nil, err
+ }
+ m.sourceCol += n
+ m.value.sourceCol = m.sourceCol
+ return m.parseNamesInd, nil
+}
+
+func (m *mappings) parseNamesInd() (fn, error) {
+ n, err := m.dec.Decode()
+ if err != nil {
+ return nil, err
+ }
+ m.namesInd += n
+ m.value.namesInd = m.namesInd
+ return m.parseGenCol, nil
+}
+
+func (m *mappings) zeroValue() {
+ m.value = mapping{
+ genLine: m.genLine,
+ genCol: 0,
+ sourcesInd: -1,
+ sourceLine: 0,
+ sourceCol: 0,
+ namesInd: -1,
+ }
+}
+
+func (m *mappings) pushValue() {
+ m.values = append(m.values, m.value)
+ m.zeroValue()
+}
diff --git a/vendor/gopkg.in/urfave/cli.v1/.gitignore b/vendor/gopkg.in/urfave/cli.v1/.gitignore
new file mode 100644
index 000000000..faf70c4c2
--- /dev/null
+++ b/vendor/gopkg.in/urfave/cli.v1/.gitignore
@@ -0,0 +1,2 @@
+*.coverprofile
+node_modules/
diff --git a/vendor/gopkg.in/urfave/cli.v1/.travis.yml b/vendor/gopkg.in/urfave/cli.v1/.travis.yml
new file mode 100644
index 000000000..273d017b4
--- /dev/null
+++ b/vendor/gopkg.in/urfave/cli.v1/.travis.yml
@@ -0,0 +1,40 @@
+language: go
+
+sudo: false
+
+cache:
+ directories:
+ - node_modules
+
+go:
+- 1.2.2
+- 1.3.3
+- 1.4
+- 1.5.4
+- 1.6.2
+- master
+
+matrix:
+ allow_failures:
+ - go: master
+ include:
+ - go: 1.6.2
+ os: osx
+ - go: 1.1.2
+ install: go get -v .
+ before_script: echo skipping gfmxr on $TRAVIS_GO_VERSION
+ script:
+ - ./runtests vet
+ - ./runtests test
+
+before_script:
+- go get github.com/urfave/gfmxr/...
+- if [ ! -f node_modules/.bin/markdown-toc ] ; then
+ npm install markdown-toc ;
+ fi
+
+script:
+- ./runtests vet
+- ./runtests test
+- ./runtests gfmxr
+- ./runtests toc
diff --git a/Godeps/_workspace/src/gopkg.in/urfave/cli.v1/CHANGELOG.md b/vendor/gopkg.in/urfave/cli.v1/CHANGELOG.md
index f623e59b7..be5b3893f 100644
--- a/Godeps/_workspace/src/gopkg.in/urfave/cli.v1/CHANGELOG.md
+++ b/vendor/gopkg.in/urfave/cli.v1/CHANGELOG.md
@@ -4,6 +4,32 @@
## [Unreleased]
+## [1.18.1] - 2016-08-28
+### Fixed
+- Removed deprecation warnings to STDERR to avoid them leaking to the end-user (backported)
+
+## [1.18.0] - 2016-06-27
+### Added
+- `./runtests` test runner with coverage tracking by default
+- testing on OS X
+- testing on Windows
+- `UintFlag`, `Uint64Flag`, and `Int64Flag` types and supporting code
+
+### Changed
+- Use spaces for alignment in help/usage output instead of tabs, making the
+ output alignment consistent regardless of tab width
+
+### Fixed
+- Printing of command aliases in help text
+- Printing of visible flags for both struct and struct pointer flags
+- Display the `help` subcommand when using `CommandCategories`
+- No longer swallows `panic`s that occur within the `Action`s themselves when
+ detecting the signature of the `Action` field
+
+## [1.17.1] - 2016-08-28
+### Fixed
+- Removed deprecation warnings to STDERR to avoid them leaking to the end-user
+
## [1.17.0] - 2016-05-09
### Added
- Pluggable flag-level help text rendering via `cli.DefaultFlagStringFunc`
@@ -23,7 +49,11 @@
makes it easier to script around apps built using `cli` since they can trust
that a 0 exit code indicated a successful execution.
- cleanups based on [Go Report Card
- feedback](https://goreportcard.com/report/github.com/codegangsta/cli)
+ feedback](https://goreportcard.com/report/github.com/urfave/cli)
+
+## [1.16.1] - 2016-08-28
+### Fixed
+- Removed deprecation warnings to STDERR to avoid them leaking to the end-user
## [1.16.0] - 2016-05-02
### Added
@@ -283,28 +313,29 @@ signature of `func(*cli.Context) error`, as defined by `cli.ActionFunc`.
### Added
- Initial implementation.
-[Unreleased]: https://github.com/codegangsta/cli/compare/v1.17.0...HEAD
-[1.17.0]: https://github.com/codegangsta/cli/compare/v1.16.0...v1.17.0
-[1.16.0]: https://github.com/codegangsta/cli/compare/v1.15.0...v1.16.0
-[1.15.0]: https://github.com/codegangsta/cli/compare/v1.14.0...v1.15.0
-[1.14.0]: https://github.com/codegangsta/cli/compare/v1.13.0...v1.14.0
-[1.13.0]: https://github.com/codegangsta/cli/compare/v1.12.0...v1.13.0
-[1.12.0]: https://github.com/codegangsta/cli/compare/v1.11.1...v1.12.0
-[1.11.1]: https://github.com/codegangsta/cli/compare/v1.11.0...v1.11.1
-[1.11.0]: https://github.com/codegangsta/cli/compare/v1.10.2...v1.11.0
-[1.10.2]: https://github.com/codegangsta/cli/compare/v1.10.1...v1.10.2
-[1.10.1]: https://github.com/codegangsta/cli/compare/v1.10.0...v1.10.1
-[1.10.0]: https://github.com/codegangsta/cli/compare/v1.9.0...v1.10.0
-[1.9.0]: https://github.com/codegangsta/cli/compare/v1.8.0...v1.9.0
-[1.8.0]: https://github.com/codegangsta/cli/compare/v1.7.1...v1.8.0
-[1.7.1]: https://github.com/codegangsta/cli/compare/v1.7.0...v1.7.1
-[1.7.0]: https://github.com/codegangsta/cli/compare/v1.6.0...v1.7.0
-[1.6.0]: https://github.com/codegangsta/cli/compare/v1.5.0...v1.6.0
-[1.5.0]: https://github.com/codegangsta/cli/compare/v1.4.1...v1.5.0
-[1.4.1]: https://github.com/codegangsta/cli/compare/v1.4.0...v1.4.1
-[1.4.0]: https://github.com/codegangsta/cli/compare/v1.3.1...v1.4.0
-[1.3.1]: https://github.com/codegangsta/cli/compare/v1.3.0...v1.3.1
-[1.3.0]: https://github.com/codegangsta/cli/compare/v1.2.0...v1.3.0
-[1.2.0]: https://github.com/codegangsta/cli/compare/v1.1.0...v1.2.0
-[1.1.0]: https://github.com/codegangsta/cli/compare/v1.0.0...v1.1.0
-[1.0.0]: https://github.com/codegangsta/cli/compare/v0.1.0...v1.0.0
+[Unreleased]: https://github.com/urfave/cli/compare/v1.18.0...HEAD
+[1.18.0]: https://github.com/urfave/cli/compare/v1.17.0...v1.18.0
+[1.17.0]: https://github.com/urfave/cli/compare/v1.16.0...v1.17.0
+[1.16.0]: https://github.com/urfave/cli/compare/v1.15.0...v1.16.0
+[1.15.0]: https://github.com/urfave/cli/compare/v1.14.0...v1.15.0
+[1.14.0]: https://github.com/urfave/cli/compare/v1.13.0...v1.14.0
+[1.13.0]: https://github.com/urfave/cli/compare/v1.12.0...v1.13.0
+[1.12.0]: https://github.com/urfave/cli/compare/v1.11.1...v1.12.0
+[1.11.1]: https://github.com/urfave/cli/compare/v1.11.0...v1.11.1
+[1.11.0]: https://github.com/urfave/cli/compare/v1.10.2...v1.11.0
+[1.10.2]: https://github.com/urfave/cli/compare/v1.10.1...v1.10.2
+[1.10.1]: https://github.com/urfave/cli/compare/v1.10.0...v1.10.1
+[1.10.0]: https://github.com/urfave/cli/compare/v1.9.0...v1.10.0
+[1.9.0]: https://github.com/urfave/cli/compare/v1.8.0...v1.9.0
+[1.8.0]: https://github.com/urfave/cli/compare/v1.7.1...v1.8.0
+[1.7.1]: https://github.com/urfave/cli/compare/v1.7.0...v1.7.1
+[1.7.0]: https://github.com/urfave/cli/compare/v1.6.0...v1.7.0
+[1.6.0]: https://github.com/urfave/cli/compare/v1.5.0...v1.6.0
+[1.5.0]: https://github.com/urfave/cli/compare/v1.4.1...v1.5.0
+[1.4.1]: https://github.com/urfave/cli/compare/v1.4.0...v1.4.1
+[1.4.0]: https://github.com/urfave/cli/compare/v1.3.1...v1.4.0
+[1.3.1]: https://github.com/urfave/cli/compare/v1.3.0...v1.3.1
+[1.3.0]: https://github.com/urfave/cli/compare/v1.2.0...v1.3.0
+[1.2.0]: https://github.com/urfave/cli/compare/v1.1.0...v1.2.0
+[1.1.0]: https://github.com/urfave/cli/compare/v1.0.0...v1.1.0
+[1.0.0]: https://github.com/urfave/cli/compare/v0.1.0...v1.0.0
diff --git a/vendor/gopkg.in/urfave/cli.v1/LICENSE b/vendor/gopkg.in/urfave/cli.v1/LICENSE
new file mode 100644
index 000000000..42a597e29
--- /dev/null
+++ b/vendor/gopkg.in/urfave/cli.v1/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2016 Jeremy Saenz & Contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/vendor/gopkg.in/urfave/cli.v1/README.md b/vendor/gopkg.in/urfave/cli.v1/README.md
new file mode 100644
index 000000000..ebb1d7413
--- /dev/null
+++ b/vendor/gopkg.in/urfave/cli.v1/README.md
@@ -0,0 +1,1309 @@
+cli
+===
+
+[![Build Status](https://travis-ci.org/urfave/cli.svg?branch=master)](https://travis-ci.org/urfave/cli)
+[![Windows Build Status](https://ci.appveyor.com/api/projects/status/rtgk5xufi932pb2v?svg=true)](https://ci.appveyor.com/project/urfave/cli)
+[![GoDoc](https://godoc.org/github.com/urfave/cli?status.svg)](https://godoc.org/github.com/urfave/cli)
+[![codebeat](https://codebeat.co/badges/0a8f30aa-f975-404b-b878-5fab3ae1cc5f)](https://codebeat.co/projects/github-com-urfave-cli)
+[![Go Report Card](https://goreportcard.com/badge/urfave/cli)](https://goreportcard.com/report/urfave/cli)
+[![top level coverage](https://gocover.io/_badge/github.com/urfave/cli?0 "top level coverage")](http://gocover.io/github.com/urfave/cli) /
+[![altsrc coverage](https://gocover.io/_badge/github.com/urfave/cli/altsrc?0 "altsrc coverage")](http://gocover.io/github.com/urfave/cli/altsrc)
+
+**Notice:** This is the library formerly known as
+`github.com/codegangsta/cli` -- Github will automatically redirect requests
+to this repository, but we recommend updating your references for clarity.
+
+cli is a simple, fast, and fun package for building command line apps in Go. The
+goal is to enable developers to write fast and distributable command line
+applications in an expressive way.
+
+<!-- toc -->
+
+- [Overview](#overview)
+- [Installation](#installation)
+ * [Supported platforms](#supported-platforms)
+ * [Using the `v2` branch](#using-the-v2-branch)
+ * [Pinning to the `v1` branch](#pinning-to-the-v1-branch)
+- [Getting Started](#getting-started)
+- [Examples](#examples)
+ * [Arguments](#arguments)
+ * [Flags](#flags)
+ + [Placeholder Values](#placeholder-values)
+ + [Alternate Names](#alternate-names)
+ + [Values from the Environment](#values-from-the-environment)
+ + [Values from alternate input sources (YAML and others)](#values-from-alternate-input-sources-yaml-and-others)
+ * [Subcommands](#subcommands)
+ * [Subcommands categories](#subcommands-categories)
+ * [Exit code](#exit-code)
+ * [Bash Completion](#bash-completion)
+ + [Enabling](#enabling)
+ + [Distribution](#distribution)
+ + [Customization](#customization)
+ * [Generated Help Text](#generated-help-text)
+ + [Customization](#customization-1)
+ * [Version Flag](#version-flag)
+ + [Customization](#customization-2)
+ + [Full API Example](#full-api-example)
+- [Contribution Guidelines](#contribution-guidelines)
+
+<!-- tocstop -->
+
+## Overview
+
+Command line apps are usually so tiny that there is absolutely no reason why
+your code should *not* be self-documenting. Things like generating help text and
+parsing command flags/options should not hinder productivity when writing a
+command line app.
+
+**This is where cli comes into play.** cli makes command line programming fun,
+organized, and expressive!
+
+## Installation
+
+Make sure you have a working Go environment. Go version 1.1+ is required for
+core cli, whereas use of the [`./altsrc`](./altsrc) input extensions requires Go
+version 1.2+. [See the install
+instructions](http://golang.org/doc/install.html).
+
+To install cli, simply run:
+```
+$ go get github.com/urfave/cli
+```
+
+Make sure your `PATH` includes to the `$GOPATH/bin` directory so your commands
+can be easily used:
+```
+export PATH=$PATH:$GOPATH/bin
+```
+
+### Supported platforms
+
+cli is tested against multiple versions of Go on Linux, and against the latest
+released version of Go on OS X and Windows. For full details, see
+[`./.travis.yml`](./.travis.yml) and [`./appveyor.yml`](./appveyor.yml).
+
+### Using the `v2` branch
+
+**Warning**: The `v2` branch is currently unreleased and considered unstable.
+
+There is currently a long-lived branch named `v2` that is intended to land as
+the new `master` branch once development there has settled down. The current
+`master` branch (mirrored as `v1`) is being manually merged into `v2` on
+an irregular human-based schedule, but generally if one wants to "upgrade" to
+`v2` *now* and accept the volatility (read: "awesomeness") that comes along with
+that, please use whatever version pinning of your preference, such as via
+`gopkg.in`:
+
+```
+$ go get gopkg.in/urfave/cli.v2
+```
+
+``` go
+...
+import (
+ "gopkg.in/urfave/cli.v2" // imports as package "cli"
+)
+...
+```
+
+### Pinning to the `v1` branch
+
+Similarly to the section above describing use of the `v2` branch, if one wants
+to avoid any unexpected compatibility pains once `v2` becomes `master`, then
+pinning to the `v1` branch is an acceptable option, e.g.:
+
+```
+$ go get gopkg.in/urfave/cli.v1
+```
+
+``` go
+...
+import (
+ "gopkg.in/urfave/cli.v1" // imports as package "cli"
+)
+...
+```
+
+## Getting Started
+
+One of the philosophies behind cli is that an API should be playful and full of
+discovery. So a cli app can be as little as one line of code in `main()`.
+
+<!-- {
+ "args": ["&#45;&#45;help"],
+ "output": "A new cli application"
+} -->
+``` go
+package main
+
+import (
+ "os"
+
+ "github.com/urfave/cli"
+)
+
+func main() {
+ cli.NewApp().Run(os.Args)
+}
+```
+
+This app will run and show help text, but is not very useful. Let's give an
+action to execute and some help documentation:
+
+<!-- {
+ "output": "boom! I say!"
+} -->
+``` go
+package main
+
+import (
+ "fmt"
+ "os"
+
+ "github.com/urfave/cli"
+)
+
+func main() {
+ app := cli.NewApp()
+ app.Name = "boom"
+ app.Usage = "make an explosive entrance"
+ app.Action = func(c *cli.Context) error {
+ fmt.Println("boom! I say!")
+ return nil
+ }
+
+ app.Run(os.Args)
+}
+```
+
+Running this already gives you a ton of functionality, plus support for things
+like subcommands and flags, which are covered below.
+
+## Examples
+
+Being a programmer can be a lonely job. Thankfully by the power of automation
+that is not the case! Let's create a greeter app to fend off our demons of
+loneliness!
+
+Start by creating a directory named `greet`, and within it, add a file,
+`greet.go` with the following code in it:
+
+<!-- {
+ "output": "Hello friend!"
+} -->
+``` go
+package main
+
+import (
+ "fmt"
+ "os"
+
+ "github.com/urfave/cli"
+)
+
+func main() {
+ app := cli.NewApp()
+ app.Name = "greet"
+ app.Usage = "fight the loneliness!"
+ app.Action = func(c *cli.Context) error {
+ fmt.Println("Hello friend!")
+ return nil
+ }
+
+ app.Run(os.Args)
+}
+```
+
+Install our command to the `$GOPATH/bin` directory:
+
+```
+$ go install
+```
+
+Finally run our new command:
+
+```
+$ greet
+Hello friend!
+```
+
+cli also generates neat help text:
+
+```
+$ greet help
+NAME:
+ greet - fight the loneliness!
+
+USAGE:
+ greet [global options] command [command options] [arguments...]
+
+VERSION:
+ 0.0.0
+
+COMMANDS:
+ help, h Shows a list of commands or help for one command
+
+GLOBAL OPTIONS
+ --version Shows version information
+```
+
+### Arguments
+
+You can lookup arguments by calling the `Args` function on `cli.Context`, e.g.:
+
+<!-- {
+ "output": "Hello \""
+} -->
+``` go
+package main
+
+import (
+ "fmt"
+ "os"
+
+ "github.com/urfave/cli"
+)
+
+func main() {
+ app := cli.NewApp()
+
+ app.Action = func(c *cli.Context) error {
+ fmt.Printf("Hello %q", c.Args().Get(0))
+ return nil
+ }
+
+ app.Run(os.Args)
+}
+```
+
+### Flags
+
+Setting and querying flags is simple.
+
+<!-- {
+ "output": "Hello Nefertiti"
+} -->
+``` go
+package main
+
+import (
+ "fmt"
+ "os"
+
+ "github.com/urfave/cli"
+)
+
+func main() {
+ app := cli.NewApp()
+
+ app.Flags = []cli.Flag {
+ cli.StringFlag{
+ Name: "lang",
+ Value: "english",
+ Usage: "language for the greeting",
+ },
+ }
+
+ app.Action = func(c *cli.Context) error {
+ name := "Nefertiti"
+ if c.NArg() > 0 {
+ name = c.Args().Get(0)
+ }
+ if c.String("lang") == "spanish" {
+ fmt.Println("Hola", name)
+ } else {
+ fmt.Println("Hello", name)
+ }
+ return nil
+ }
+
+ app.Run(os.Args)
+}
+```
+
+You can also set a destination variable for a flag, to which the content will be
+scanned.
+
+<!-- {
+ "output": "Hello someone"
+} -->
+``` go
+package main
+
+import (
+ "os"
+ "fmt"
+
+ "github.com/urfave/cli"
+)
+
+func main() {
+ var language string
+
+ app := cli.NewApp()
+
+ app.Flags = []cli.Flag {
+ cli.StringFlag{
+ Name: "lang",
+ Value: "english",
+ Usage: "language for the greeting",
+ Destination: &language,
+ },
+ }
+
+ app.Action = func(c *cli.Context) error {
+ name := "someone"
+ if c.NArg() > 0 {
+ name = c.Args()[0]
+ }
+ if language == "spanish" {
+ fmt.Println("Hola", name)
+ } else {
+ fmt.Println("Hello", name)
+ }
+ return nil
+ }
+
+ app.Run(os.Args)
+}
+```
+
+See full list of flags at http://godoc.org/github.com/urfave/cli
+
+#### Placeholder Values
+
+Sometimes it's useful to specify a flag's value within the usage string itself.
+Such placeholders are indicated with back quotes.
+
+For example this:
+
+<!-- {
+ "args": ["&#45;&#45;help"],
+ "output": "&#45;&#45;config FILE, &#45;c FILE"
+} -->
+```go
+package main
+
+import (
+ "os"
+
+ "github.com/urfave/cli"
+)
+
+func main() {
+ app := cli.NewApp()
+
+ app.Flags = []cli.Flag{
+ cli.StringFlag{
+ Name: "config, c",
+ Usage: "Load configuration from `FILE`",
+ },
+ }
+
+ app.Run(os.Args)
+}
+```
+
+Will result in help output like:
+
+```
+--config FILE, -c FILE Load configuration from FILE
+```
+
+Note that only the first placeholder is used. Subsequent back-quoted words will
+be left as-is.
+
+#### Alternate Names
+
+You can set alternate (or short) names for flags by providing a comma-delimited
+list for the `Name`. e.g.
+
+<!-- {
+ "args": ["&#45;&#45;help"],
+ "output": "&#45;&#45;lang value, &#45;l value.*language for the greeting.*default: \"english\""
+} -->
+``` go
+package main
+
+import (
+ "os"
+
+ "github.com/urfave/cli"
+)
+
+func main() {
+ app := cli.NewApp()
+
+ app.Flags = []cli.Flag {
+ cli.StringFlag{
+ Name: "lang, l",
+ Value: "english",
+ Usage: "language for the greeting",
+ },
+ }
+
+ app.Run(os.Args)
+}
+```
+
+That flag can then be set with `--lang spanish` or `-l spanish`. Note that
+giving two different forms of the same flag in the same command invocation is an
+error.
+
+#### Values from the Environment
+
+You can also have the default value set from the environment via `EnvVar`. e.g.
+
+<!-- {
+ "args": ["&#45;&#45;help"],
+ "output": "language for the greeting.*APP_LANG"
+} -->
+``` go
+package main
+
+import (
+ "os"
+
+ "github.com/urfave/cli"
+)
+
+func main() {
+ app := cli.NewApp()
+
+ app.Flags = []cli.Flag {
+ cli.StringFlag{
+ Name: "lang, l",
+ Value: "english",
+ Usage: "language for the greeting",
+ EnvVar: "APP_LANG",
+ },
+ }
+
+ app.Run(os.Args)
+}
+```
+
+The `EnvVar` may also be given as a comma-delimited "cascade", where the first
+environment variable that resolves is used as the default.
+
+<!-- {
+ "args": ["&#45;&#45;help"],
+ "output": "language for the greeting.*LEGACY_COMPAT_LANG.*APP_LANG.*LANG"
+} -->
+``` go
+package main
+
+import (
+ "os"
+
+ "github.com/urfave/cli"
+)
+
+func main() {
+ app := cli.NewApp()
+
+ app.Flags = []cli.Flag {
+ cli.StringFlag{
+ Name: "lang, l",
+ Value: "english",
+ Usage: "language for the greeting",
+ EnvVar: "LEGACY_COMPAT_LANG,APP_LANG,LANG",
+ },
+ }
+
+ app.Run(os.Args)
+}
+```
+
+#### Values from alternate input sources (YAML and others)
+
+There is a separate package altsrc that adds support for getting flag values
+from other input sources like YAML.
+
+In order to get values for a flag from an alternate input source the following
+code would be added to wrap an existing cli.Flag like below:
+
+``` go
+ altsrc.NewIntFlag(cli.IntFlag{Name: "test"})
+```
+
+Initialization must also occur for these flags. Below is an example initializing
+getting data from a yaml file below.
+
+``` go
+ command.Before = altsrc.InitInputSourceWithContext(command.Flags, NewYamlSourceFromFlagFunc("load"))
+```
+
+The code above will use the "load" string as a flag name to get the file name of
+a yaml file from the cli.Context. It will then use that file name to initialize
+the yaml input source for any flags that are defined on that command. As a note
+the "load" flag used would also have to be defined on the command flags in order
+for this code snipped to work.
+
+Currently only YAML files are supported but developers can add support for other
+input sources by implementing the altsrc.InputSourceContext for their given
+sources.
+
+Here is a more complete sample of a command using YAML support:
+
+<!-- {
+ "args": ["test-cmd", "&#45;&#45;help"],
+ "output": "&#45&#45;test value.*default: 0"
+} -->
+``` go
+package notmain
+
+import (
+ "fmt"
+ "os"
+
+ "github.com/urfave/cli"
+ "github.com/urfave/cli/altsrc"
+)
+
+func main() {
+ app := cli.NewApp()
+
+ flags := []cli.Flag{
+ altsrc.NewIntFlag(cli.IntFlag{Name: "test"}),
+ cli.StringFlag{Name: "load"},
+ }
+
+ app.Action = func(c *cli.Context) error {
+ fmt.Println("yaml ist rad")
+ return nil
+ }
+
+ app.Before = altsrc.InitInputSourceWithContext(flags, altsrc.NewYamlSourceFromFlagFunc("load"))
+ app.Flags = flags
+
+ app.Run(os.Args)
+}
+```
+
+### Subcommands
+
+Subcommands can be defined for a more git-like command line app.
+
+<!-- {
+ "args": ["template", "add"],
+ "output": "new task template: .+"
+} -->
+```go
+package main
+
+import (
+ "fmt"
+ "os"
+
+ "github.com/urfave/cli"
+)
+
+func main() {
+ app := cli.NewApp()
+
+ app.Commands = []cli.Command{
+ {
+ Name: "add",
+ Aliases: []string{"a"},
+ Usage: "add a task to the list",
+ Action: func(c *cli.Context) error {
+ fmt.Println("added task: ", c.Args().First())
+ return nil
+ },
+ },
+ {
+ Name: "complete",
+ Aliases: []string{"c"},
+ Usage: "complete a task on the list",
+ Action: func(c *cli.Context) error {
+ fmt.Println("completed task: ", c.Args().First())
+ return nil
+ },
+ },
+ {
+ Name: "template",
+ Aliases: []string{"t"},
+ Usage: "options for task templates",
+ Subcommands: []cli.Command{
+ {
+ Name: "add",
+ Usage: "add a new template",
+ Action: func(c *cli.Context) error {
+ fmt.Println("new task template: ", c.Args().First())
+ return nil
+ },
+ },
+ {
+ Name: "remove",
+ Usage: "remove an existing template",
+ Action: func(c *cli.Context) error {
+ fmt.Println("removed task template: ", c.Args().First())
+ return nil
+ },
+ },
+ },
+ },
+ }
+
+ app.Run(os.Args)
+}
+```
+
+### Subcommands categories
+
+For additional organization in apps that have many subcommands, you can
+associate a category for each command to group them together in the help
+output.
+
+E.g.
+
+```go
+package main
+
+import (
+ "os"
+
+ "github.com/urfave/cli"
+)
+
+func main() {
+ app := cli.NewApp()
+
+ app.Commands = []cli.Command{
+ {
+ Name: "noop",
+ },
+ {
+ Name: "add",
+ Category: "template",
+ },
+ {
+ Name: "remove",
+ Category: "template",
+ },
+ }
+
+ app.Run(os.Args)
+}
+```
+
+Will include:
+
+```
+COMMANDS:
+ noop
+
+ Template actions:
+ add
+ remove
+```
+
+### Exit code
+
+Calling `App.Run` will not automatically call `os.Exit`, which means that by
+default the exit code will "fall through" to being `0`. An explicit exit code
+may be set by returning a non-nil error that fulfills `cli.ExitCoder`, *or* a
+`cli.MultiError` that includes an error that fulfills `cli.ExitCoder`, e.g.:
+
+``` go
+package main
+
+import (
+ "os"
+
+ "github.com/urfave/cli"
+)
+
+func main() {
+ app := cli.NewApp()
+ app.Flags = []cli.Flag{
+ cli.BoolTFlag{
+ Name: "ginger-crouton",
+ Usage: "is it in the soup?",
+ },
+ }
+ app.Action = func(ctx *cli.Context) error {
+ if !ctx.Bool("ginger-crouton") {
+ return cli.NewExitError("it is not in the soup", 86)
+ }
+ return nil
+ }
+
+ app.Run(os.Args)
+}
+```
+
+### Bash Completion
+
+You can enable completion commands by setting the `EnableBashCompletion`
+flag on the `App` object. By default, this setting will only auto-complete to
+show an app's subcommands, but you can write your own completion methods for
+the App or its subcommands.
+
+<!-- {
+ "args": ["complete", "&#45;&#45;generate&#45;bash&#45;completion"],
+ "output": "laundry"
+} -->
+``` go
+package main
+
+import (
+ "fmt"
+ "os"
+
+ "github.com/urfave/cli"
+)
+
+func main() {
+ tasks := []string{"cook", "clean", "laundry", "eat", "sleep", "code"}
+
+ app := cli.NewApp()
+ app.EnableBashCompletion = true
+ app.Commands = []cli.Command{
+ {
+ Name: "complete",
+ Aliases: []string{"c"},
+ Usage: "complete a task on the list",
+ Action: func(c *cli.Context) error {
+ fmt.Println("completed task: ", c.Args().First())
+ return nil
+ },
+ BashComplete: func(c *cli.Context) {
+ // This will complete if no args are passed
+ if c.NArg() > 0 {
+ return
+ }
+ for _, t := range tasks {
+ fmt.Println(t)
+ }
+ },
+ },
+ }
+
+ app.Run(os.Args)
+}
+```
+
+#### Enabling
+
+Source the `autocomplete/bash_autocomplete` file in your `.bashrc` file while
+setting the `PROG` variable to the name of your program:
+
+`PROG=myprogram source /.../cli/autocomplete/bash_autocomplete`
+
+#### Distribution
+
+Copy `autocomplete/bash_autocomplete` into `/etc/bash_completion.d/` and rename
+it to the name of the program you wish to add autocomplete support for (or
+automatically install it there if you are distributing a package). Don't forget
+to source the file to make it active in the current shell.
+
+```
+sudo cp src/bash_autocomplete /etc/bash_completion.d/<myprogram>
+source /etc/bash_completion.d/<myprogram>
+```
+
+Alternatively, you can just document that users should source the generic
+`autocomplete/bash_autocomplete` in their bash configuration with `$PROG` set
+to the name of their program (as above).
+
+#### Customization
+
+The default bash completion flag (`--generate-bash-completion`) is defined as
+`cli.BashCompletionFlag`, and may be redefined if desired, e.g.:
+
+<!-- {
+ "args": ["&#45;&#45;compgen"],
+ "output": "wat\nhelp\nh"
+} -->
+``` go
+package main
+
+import (
+ "os"
+
+ "github.com/urfave/cli"
+)
+
+func main() {
+ cli.BashCompletionFlag = cli.BoolFlag{
+ Name: "compgen",
+ Hidden: true,
+ }
+
+ app := cli.NewApp()
+ app.EnableBashCompletion = true
+ app.Commands = []cli.Command{
+ {
+ Name: "wat",
+ },
+ }
+ app.Run(os.Args)
+}
+```
+
+### Generated Help Text
+
+The default help flag (`-h/--help`) is defined as `cli.HelpFlag` and is checked
+by the cli internals in order to print generated help text for the app, command,
+or subcommand, and break execution.
+
+#### Customization
+
+All of the help text generation may be customized, and at multiple levels. The
+templates are exposed as variables `AppHelpTemplate`, `CommandHelpTemplate`, and
+`SubcommandHelpTemplate` which may be reassigned or augmented, and full override
+is possible by assigning a compatible func to the `cli.HelpPrinter` variable,
+e.g.:
+
+<!-- {
+ "output": "Ha HA. I pwnd the help!!1"
+} -->
+``` go
+package main
+
+import (
+ "fmt"
+ "io"
+ "os"
+
+ "github.com/urfave/cli"
+)
+
+func main() {
+ // EXAMPLE: Append to an existing template
+ cli.AppHelpTemplate = fmt.Sprintf(`%s
+
+WEBSITE: http://awesometown.example.com
+
+SUPPORT: support@awesometown.example.com
+
+`, cli.AppHelpTemplate)
+
+ // EXAMPLE: Override a template
+ cli.AppHelpTemplate = `NAME:
+ {{.Name}} - {{.Usage}}
+USAGE:
+ {{.HelpName}} {{if .VisibleFlags}}[global options]{{end}}{{if .Commands}} command
+[command options]{{end}} {{if
+.ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}
+ {{if len .Authors}}
+AUTHOR(S):
+ {{range .Authors}}{{ . }}{{end}}
+ {{end}}{{if .Commands}}
+COMMANDS:
+{{range .Commands}}{{if not .HideHelp}} {{join .Names ", "}}{{ "\t"
+}}{{.Usage}}{{ "\n" }}{{end}}{{end}}{{end}}{{if .VisibleFlags}}
+GLOBAL OPTIONS:
+ {{range .VisibleFlags}}{{.}}
+ {{end}}{{end}}{{if .Copyright }}
+COPYRIGHT:
+ {{.Copyright}}
+ {{end}}{{if .Version}}
+VERSION:
+ {{.Version}}
+ {{end}}
+`
+
+ // EXAMPLE: Replace the `HelpPrinter` func
+ cli.HelpPrinter = func(w io.Writer, templ string, data interface{}) {
+ fmt.Println("Ha HA. I pwnd the help!!1")
+ }
+
+ cli.NewApp().Run(os.Args)
+}
+```
+
+The default flag may be customized to something other than `-h/--help` by
+setting `cli.HelpFlag`, e.g.:
+
+<!-- {
+ "args": ["&#45;&#45halp"],
+ "output": "haaaaalp.*HALP"
+} -->
+``` go
+package main
+
+import (
+ "os"
+
+ "github.com/urfave/cli"
+)
+
+func main() {
+ cli.HelpFlag = cli.BoolFlag{
+ Name: "halp, haaaaalp",
+ Usage: "HALP",
+ EnvVar: "SHOW_HALP,HALPPLZ",
+ }
+
+ cli.NewApp().Run(os.Args)
+}
+```
+
+### Version Flag
+
+The default version flag (`-v/--version`) is defined as `cli.VersionFlag`, which
+is checked by the cli internals in order to print the `App.Version` via
+`cli.VersionPrinter` and break execution.
+
+#### Customization
+
+The default flag may be cusomized to something other than `-v/--version` by
+setting `cli.VersionFlag`, e.g.:
+
+<!-- {
+ "args": ["&#45;&#45print-version"],
+ "output": "partay version v19\\.99\\.0"
+} -->
+``` go
+package main
+
+import (
+ "os"
+
+ "github.com/urfave/cli"
+)
+
+func main() {
+ cli.VersionFlag = cli.BoolFlag{
+ Name: "print-version, V",
+ Usage: "print only the version",
+ }
+
+ app := cli.NewApp()
+ app.Name = "partay"
+ app.Version = "v19.99.0"
+ app.Run(os.Args)
+}
+```
+
+Alternatively, the version printer at `cli.VersionPrinter` may be overridden, e.g.:
+
+<!-- {
+ "args": ["&#45;&#45version"],
+ "output": "version=v19\\.99\\.0 revision=fafafaf"
+} -->
+``` go
+package main
+
+import (
+ "fmt"
+ "os"
+
+ "github.com/urfave/cli"
+)
+
+var (
+ Revision = "fafafaf"
+)
+
+func main() {
+ cli.VersionPrinter = func(c *cli.Context) {
+ fmt.Printf("version=%s revision=%s\n", c.App.Version, Revision)
+ }
+
+ app := cli.NewApp()
+ app.Name = "partay"
+ app.Version = "v19.99.0"
+ app.Run(os.Args)
+}
+```
+
+#### Full API Example
+
+**Notice**: This is a contrived (functioning) example meant strictly for API
+demonstration purposes. Use of one's imagination is encouraged.
+
+<!-- {
+ "output": "made it!\nPhew!"
+} -->
+``` go
+package main
+
+import (
+ "errors"
+ "flag"
+ "fmt"
+ "io"
+ "io/ioutil"
+ "os"
+ "time"
+
+ "github.com/urfave/cli"
+)
+
+func init() {
+ cli.AppHelpTemplate += "\nCUSTOMIZED: you bet ur muffins\n"
+ cli.CommandHelpTemplate += "\nYMMV\n"
+ cli.SubcommandHelpTemplate += "\nor something\n"
+
+ cli.HelpFlag = cli.BoolFlag{Name: "halp"}
+ cli.BashCompletionFlag = cli.BoolFlag{Name: "compgen", Hidden: true}
+ cli.VersionFlag = cli.BoolFlag{Name: "print-version, V"}
+
+ cli.HelpPrinter = func(w io.Writer, templ string, data interface{}) {
+ fmt.Fprintf(w, "best of luck to you\n")
+ }
+ cli.VersionPrinter = func(c *cli.Context) {
+ fmt.Fprintf(c.App.Writer, "version=%s\n", c.App.Version)
+ }
+ cli.OsExiter = func(c int) {
+ fmt.Fprintf(cli.ErrWriter, "refusing to exit %d\n", c)
+ }
+ cli.ErrWriter = ioutil.Discard
+ cli.FlagStringer = func(fl cli.Flag) string {
+ return fmt.Sprintf("\t\t%s", fl.GetName())
+ }
+}
+
+type hexWriter struct{}
+
+func (w *hexWriter) Write(p []byte) (int, error) {
+ for _, b := range p {
+ fmt.Printf("%x", b)
+ }
+ fmt.Printf("\n")
+
+ return len(p), nil
+}
+
+type genericType struct{
+ s string
+}
+
+func (g *genericType) Set(value string) error {
+ g.s = value
+ return nil
+}
+
+func (g *genericType) String() string {
+ return g.s
+}
+
+func main() {
+ app := cli.NewApp()
+ app.Name = "kənˈtrīv"
+ app.Version = "v19.99.0"
+ app.Compiled = time.Now()
+ app.Authors = []cli.Author{
+ cli.Author{
+ Name: "Example Human",
+ Email: "human@example.com",
+ },
+ }
+ app.Copyright = "(c) 1999 Serious Enterprise"
+ app.HelpName = "contrive"
+ app.Usage = "demonstrate available API"
+ app.UsageText = "contrive - demonstrating the available API"
+ app.ArgsUsage = "[args and such]"
+ app.Commands = []cli.Command{
+ cli.Command{
+ Name: "doo",
+ Aliases: []string{"do"},
+ Category: "motion",
+ Usage: "do the doo",
+ UsageText: "doo - does the dooing",
+ Description: "no really, there is a lot of dooing to be done",
+ ArgsUsage: "[arrgh]",
+ Flags: []cli.Flag{
+ cli.BoolFlag{Name: "forever, forevvarr"},
+ },
+ Subcommands: cli.Commands{
+ cli.Command{
+ Name: "wop",
+ Action: wopAction,
+ },
+ },
+ SkipFlagParsing: false,
+ HideHelp: false,
+ Hidden: false,
+ HelpName: "doo!",
+ BashComplete: func(c *cli.Context) {
+ fmt.Fprintf(c.App.Writer, "--better\n")
+ },
+ Before: func(c *cli.Context) error {
+ fmt.Fprintf(c.App.Writer, "brace for impact\n")
+ return nil
+ },
+ After: func(c *cli.Context) error {
+ fmt.Fprintf(c.App.Writer, "did we lose anyone?\n")
+ return nil
+ },
+ Action: func(c *cli.Context) error {
+ c.Command.FullName()
+ c.Command.HasName("wop")
+ c.Command.Names()
+ c.Command.VisibleFlags()
+ fmt.Fprintf(c.App.Writer, "dodododododoodododddooooododododooo\n")
+ if c.Bool("forever") {
+ c.Command.Run(c)
+ }
+ return nil
+ },
+ OnUsageError: func(c *cli.Context, err error, isSubcommand bool) error {
+ fmt.Fprintf(c.App.Writer, "for shame\n")
+ return err
+ },
+ },
+ }
+ app.Flags = []cli.Flag{
+ cli.BoolFlag{Name: "fancy"},
+ cli.BoolTFlag{Name: "fancier"},
+ cli.DurationFlag{Name: "howlong, H", Value: time.Second * 3},
+ cli.Float64Flag{Name: "howmuch"},
+ cli.GenericFlag{Name: "wat", Value: &genericType{}},
+ cli.Int64Flag{Name: "longdistance"},
+ cli.Int64SliceFlag{Name: "intervals"},
+ cli.IntFlag{Name: "distance"},
+ cli.IntSliceFlag{Name: "times"},
+ cli.StringFlag{Name: "dance-move, d"},
+ cli.StringSliceFlag{Name: "names, N"},
+ cli.UintFlag{Name: "age"},
+ cli.Uint64Flag{Name: "bigage"},
+ }
+ app.EnableBashCompletion = true
+ app.HideHelp = false
+ app.HideVersion = false
+ app.BashComplete = func(c *cli.Context) {
+ fmt.Fprintf(c.App.Writer, "lipstick\nkiss\nme\nlipstick\nringo\n")
+ }
+ app.Before = func(c *cli.Context) error {
+ fmt.Fprintf(c.App.Writer, "HEEEERE GOES\n")
+ return nil
+ }
+ app.After = func(c *cli.Context) error {
+ fmt.Fprintf(c.App.Writer, "Phew!\n")
+ return nil
+ }
+ app.CommandNotFound = func(c *cli.Context, command string) {
+ fmt.Fprintf(c.App.Writer, "Thar be no %q here.\n", command)
+ }
+ app.OnUsageError = func(c *cli.Context, err error, isSubcommand bool) error {
+ if isSubcommand {
+ return err
+ }
+
+ fmt.Fprintf(c.App.Writer, "WRONG: %#v\n", err)
+ return nil
+ }
+ app.Action = func(c *cli.Context) error {
+ cli.DefaultAppComplete(c)
+ cli.HandleExitCoder(errors.New("not an exit coder, though"))
+ cli.ShowAppHelp(c)
+ cli.ShowCommandCompletions(c, "nope")
+ cli.ShowCommandHelp(c, "also-nope")
+ cli.ShowCompletions(c)
+ cli.ShowSubcommandHelp(c)
+ cli.ShowVersion(c)
+
+ categories := c.App.Categories()
+ categories.AddCommand("sounds", cli.Command{
+ Name: "bloop",
+ })
+
+ for _, category := range c.App.Categories() {
+ fmt.Fprintf(c.App.Writer, "%s\n", category.Name)
+ fmt.Fprintf(c.App.Writer, "%#v\n", category.Commands)
+ fmt.Fprintf(c.App.Writer, "%#v\n", category.VisibleCommands())
+ }
+
+ fmt.Printf("%#v\n", c.App.Command("doo"))
+ if c.Bool("infinite") {
+ c.App.Run([]string{"app", "doo", "wop"})
+ }
+
+ if c.Bool("forevar") {
+ c.App.RunAsSubcommand(c)
+ }
+ c.App.Setup()
+ fmt.Printf("%#v\n", c.App.VisibleCategories())
+ fmt.Printf("%#v\n", c.App.VisibleCommands())
+ fmt.Printf("%#v\n", c.App.VisibleFlags())
+
+ fmt.Printf("%#v\n", c.Args().First())
+ if len(c.Args()) > 0 {
+ fmt.Printf("%#v\n", c.Args()[1])
+ }
+ fmt.Printf("%#v\n", c.Args().Present())
+ fmt.Printf("%#v\n", c.Args().Tail())
+
+ set := flag.NewFlagSet("contrive", 0)
+ nc := cli.NewContext(c.App, set, c)
+
+ fmt.Printf("%#v\n", nc.Args())
+ fmt.Printf("%#v\n", nc.Bool("nope"))
+ fmt.Printf("%#v\n", nc.BoolT("nerp"))
+ fmt.Printf("%#v\n", nc.Duration("howlong"))
+ fmt.Printf("%#v\n", nc.Float64("hay"))
+ fmt.Printf("%#v\n", nc.Generic("bloop"))
+ fmt.Printf("%#v\n", nc.Int64("bonk"))
+ fmt.Printf("%#v\n", nc.Int64Slice("burnks"))
+ fmt.Printf("%#v\n", nc.Int("bips"))
+ fmt.Printf("%#v\n", nc.IntSlice("blups"))
+ fmt.Printf("%#v\n", nc.String("snurt"))
+ fmt.Printf("%#v\n", nc.StringSlice("snurkles"))
+ fmt.Printf("%#v\n", nc.Uint("flub"))
+ fmt.Printf("%#v\n", nc.Uint64("florb"))
+ fmt.Printf("%#v\n", nc.GlobalBool("global-nope"))
+ fmt.Printf("%#v\n", nc.GlobalBoolT("global-nerp"))
+ fmt.Printf("%#v\n", nc.GlobalDuration("global-howlong"))
+ fmt.Printf("%#v\n", nc.GlobalFloat64("global-hay"))
+ fmt.Printf("%#v\n", nc.GlobalGeneric("global-bloop"))
+ fmt.Printf("%#v\n", nc.GlobalInt("global-bips"))
+ fmt.Printf("%#v\n", nc.GlobalIntSlice("global-blups"))
+ fmt.Printf("%#v\n", nc.GlobalString("global-snurt"))
+ fmt.Printf("%#v\n", nc.GlobalStringSlice("global-snurkles"))
+
+ fmt.Printf("%#v\n", nc.FlagNames())
+ fmt.Printf("%#v\n", nc.GlobalFlagNames())
+ fmt.Printf("%#v\n", nc.GlobalIsSet("wat"))
+ fmt.Printf("%#v\n", nc.GlobalSet("wat", "nope"))
+ fmt.Printf("%#v\n", nc.NArg())
+ fmt.Printf("%#v\n", nc.NumFlags())
+ fmt.Printf("%#v\n", nc.Parent())
+
+ nc.Set("wat", "also-nope")
+
+ ec := cli.NewExitError("ohwell", 86)
+ fmt.Fprintf(c.App.Writer, "%d", ec.ExitCode())
+ fmt.Printf("made it!\n")
+ return ec
+ }
+
+ if os.Getenv("HEXY") != "" {
+ app.Writer = &hexWriter{}
+ app.ErrWriter = &hexWriter{}
+ }
+
+ app.Metadata = map[string]interface{}{
+ "layers": "many",
+ "explicable": false,
+ "whatever-values": 19.99,
+ }
+
+ app.Run(os.Args)
+}
+
+func wopAction(c *cli.Context) error {
+ fmt.Fprintf(c.App.Writer, ":wave: over here, eh\n")
+ return nil
+}
+```
+
+## Contribution Guidelines
+
+Feel free to put up a pull request to fix a bug or maybe add a feature. I will
+give it a code review and make sure that it does not break backwards
+compatibility. If I or any other collaborators agree that it is in line with
+the vision of the project, we will work with you to get the code into
+a mergeable state and merge it into the master branch.
+
+If you have contributed something significant to the project, we will most
+likely add you as a collaborator. As a collaborator you are given the ability
+to merge others pull requests. It is very important that new code does not
+break existing code, so be careful about what code you do choose to merge.
+
+If you feel like you have contributed to the project but have not yet been
+added as a collaborator, we probably forgot to add you, please open an issue.
diff --git a/Godeps/_workspace/src/gopkg.in/urfave/cli.v1/app.go b/vendor/gopkg.in/urfave/cli.v1/app.go
index 7c9b95804..2a519528f 100644
--- a/Godeps/_workspace/src/gopkg.in/urfave/cli.v1/app.go
+++ b/vendor/gopkg.in/urfave/cli.v1/app.go
@@ -8,11 +8,12 @@ import (
"path/filepath"
"reflect"
"sort"
+ "strings"
"time"
)
var (
- changeLogURL = "https://github.com/codegangsta/cli/blob/master/CHANGELOG.md"
+ changeLogURL = "https://github.com/urfave/cli/blob/master/CHANGELOG.md"
appActionDeprecationURL = fmt.Sprintf("%s#deprecated-cli-app-action-signature", changeLogURL)
runAndExitOnErrorDeprecationURL = fmt.Sprintf("%s#deprecated-cli-app-runandexitonerror", changeLogURL)
@@ -62,9 +63,9 @@ type App struct {
// It is run even if Action() panics
After AfterFunc
// The action to execute when no subcommands are specified
+ // Expects a `cli.ActionFunc` but will accept the *deprecated* signature of `func(*cli.Context) {}`
+ // *Note*: support for the deprecated `Action` signature will be removed in a future version
Action interface{}
- // TODO: replace `Action: interface{}` with `Action: ActionFunc` once some kind
- // of deprecation period has passed, maybe?
// Execute this function if the proper command cannot be found
CommandNotFound CommandNotFoundFunc
@@ -139,13 +140,6 @@ func (a *App) Setup() {
}
a.Commands = newCmds
- a.categories = CommandCategories{}
- for _, command := range a.Commands {
- a.categories = a.categories.AddCommand(command.Category, command)
- }
- sort.Sort(a.categories)
-
- // append help to commands
if a.Command(helpCommand.Name) == nil && !a.HideHelp {
a.Commands = append(a.Commands, helpCommand)
if (HelpFlag != BoolFlag{}) {
@@ -153,7 +147,6 @@ func (a *App) Setup() {
}
}
- //append version/help flags
if a.EnableBashCompletion {
a.appendFlag(BashCompletionFlag)
}
@@ -161,6 +154,12 @@ func (a *App) Setup() {
if !a.HideVersion {
a.appendFlag(VersionFlag)
}
+
+ a.categories = CommandCategories{}
+ for _, command := range a.Commands {
+ a.categories = a.categories.AddCommand(command.Category, command)
+ }
+ sort.Sort(a.categories)
}
// Run is the entry point to the cli app. Parses the arguments slice and routes
@@ -244,11 +243,12 @@ func (a *App) Run(arguments []string) (err error) {
return err
}
-// DEPRECATED: Another entry point to the cli app, takes care of passing arguments and error handling
+// RunAndExitOnError calls .Run() and exits non-zero if an error was returned
+//
+// Deprecated: instead you should return an error that fulfills cli.ExitCoder
+// to cli.App.Run. This will cause the application to exit with the given eror
+// code in the cli.ExitCoder
func (a *App) RunAndExitOnError() {
- fmt.Fprintf(a.errWriter(),
- "DEPRECATED cli.App.RunAndExitOnError. %s See %s\n",
- contactSysadmin, runAndExitOnErrorDeprecationURL)
if err := a.Run(os.Args); err != nil {
fmt.Fprintln(a.errWriter(), err)
OsExiter(1)
@@ -464,11 +464,13 @@ func (a Author) String() string {
func HandleAction(action interface{}, context *Context) (err error) {
defer func() {
if r := recover(); r != nil {
- switch r.(type) {
- case error:
- err = r.(error)
- default:
- err = NewExitError(fmt.Sprintf("ERROR unknown Action error: %v. See %s", r, appActionDeprecationURL), 2)
+ // Try to detect a known reflection error from *this scope*, rather than
+ // swallowing all panics that may happen when calling an Action func.
+ s := fmt.Sprintf("%v", r)
+ if strings.HasPrefix(s, "reflect: ") && strings.Contains(s, "too many input arguments") {
+ err = NewExitError(fmt.Sprintf("ERROR unknown Action error: %v. See %s", r, appActionDeprecationURL), 2)
+ } else {
+ panic(r)
}
}
}()
@@ -480,9 +482,6 @@ func HandleAction(action interface{}, context *Context) (err error) {
vals := reflect.ValueOf(action).Call([]reflect.Value{reflect.ValueOf(context)})
if len(vals) == 0 {
- fmt.Fprintf(ErrWriter,
- "DEPRECATED Action signature. Must be `cli.ActionFunc`. %s See %s\n",
- contactSysadmin, appActionDeprecationURL)
return nil
}
diff --git a/vendor/gopkg.in/urfave/cli.v1/appveyor.yml b/vendor/gopkg.in/urfave/cli.v1/appveyor.yml
new file mode 100644
index 000000000..173086e5f
--- /dev/null
+++ b/vendor/gopkg.in/urfave/cli.v1/appveyor.yml
@@ -0,0 +1,25 @@
+version: "{build}"
+
+os: Windows Server 2012 R2
+
+clone_folder: c:\gopath\src\github.com\urfave\cli
+
+environment:
+ GOPATH: C:\gopath
+ GOVERSION: 1.6
+ PYTHON: C:\Python27-x64
+ PYTHON_VERSION: 2.7.x
+ PYTHON_ARCH: 64
+ GFMXR_DEBUG: 1
+
+install:
+- set PATH=%GOPATH%\bin;C:\go\bin;%PATH%
+- go version
+- go env
+- go get github.com/urfave/gfmxr/...
+- go get -v -t ./...
+
+build_script:
+- python runtests vet
+- python runtests test
+- python runtests gfmxr
diff --git a/Godeps/_workspace/src/gopkg.in/urfave/cli.v1/category.go b/vendor/gopkg.in/urfave/cli.v1/category.go
index 1a6055023..1a6055023 100644
--- a/Godeps/_workspace/src/gopkg.in/urfave/cli.v1/category.go
+++ b/vendor/gopkg.in/urfave/cli.v1/category.go
diff --git a/Godeps/_workspace/src/gopkg.in/urfave/cli.v1/cli.go b/vendor/gopkg.in/urfave/cli.v1/cli.go
index f0440c563..f0440c563 100644
--- a/Godeps/_workspace/src/gopkg.in/urfave/cli.v1/cli.go
+++ b/vendor/gopkg.in/urfave/cli.v1/cli.go
diff --git a/Godeps/_workspace/src/gopkg.in/urfave/cli.v1/command.go b/vendor/gopkg.in/urfave/cli.v1/command.go
index 8950ccae4..8950ccae4 100644
--- a/Godeps/_workspace/src/gopkg.in/urfave/cli.v1/command.go
+++ b/vendor/gopkg.in/urfave/cli.v1/command.go
diff --git a/Godeps/_workspace/src/gopkg.in/urfave/cli.v1/context.go b/vendor/gopkg.in/urfave/cli.v1/context.go
index c34246369..879bae5ec 100644
--- a/Godeps/_workspace/src/gopkg.in/urfave/cli.v1/context.go
+++ b/vendor/gopkg.in/urfave/cli.v1/context.go
@@ -31,6 +31,21 @@ func (c *Context) Int(name string) int {
return lookupInt(name, c.flagSet)
}
+// Int64 looks up the value of a local int flag, returns 0 if no int flag exists
+func (c *Context) Int64(name string) int64 {
+ return lookupInt64(name, c.flagSet)
+}
+
+// Uint looks up the value of a local int flag, returns 0 if no int flag exists
+func (c *Context) Uint(name string) uint {
+ return lookupUint(name, c.flagSet)
+}
+
+// Uint64 looks up the value of a local int flag, returns 0 if no int flag exists
+func (c *Context) Uint64(name string) uint64 {
+ return lookupUint64(name, c.flagSet)
+}
+
// Duration looks up the value of a local time.Duration flag, returns 0 if no
// time.Duration flag exists
func (c *Context) Duration(name string) time.Duration {
@@ -70,6 +85,12 @@ func (c *Context) IntSlice(name string) []int {
return lookupIntSlice(name, c.flagSet)
}
+// Int64Slice looks up the value of a local int slice flag, returns nil if no int
+// slice flag exists
+func (c *Context) Int64Slice(name string) []int64 {
+ return lookupInt64Slice(name, c.flagSet)
+}
+
// Generic looks up the value of a local generic flag, returns nil if no generic
// flag exists
func (c *Context) Generic(name string) interface{} {
@@ -84,6 +105,30 @@ func (c *Context) GlobalInt(name string) int {
return 0
}
+// GlobalInt64 looks up the value of a global int flag, returns 0 if no int flag exists
+func (c *Context) GlobalInt64(name string) int64 {
+ if fs := lookupGlobalFlagSet(name, c); fs != nil {
+ return lookupInt64(name, fs)
+ }
+ return 0
+}
+
+// GlobalUint looks up the value of a global int flag, returns 0 if no int flag exists
+func (c *Context) GlobalUint(name string) uint {
+ if fs := lookupGlobalFlagSet(name, c); fs != nil {
+ return lookupUint(name, fs)
+ }
+ return 0
+}
+
+// GlobalUint64 looks up the value of a global int flag, returns 0 if no int flag exists
+func (c *Context) GlobalUint64(name string) uint64 {
+ if fs := lookupGlobalFlagSet(name, c); fs != nil {
+ return lookupUint64(name, fs)
+ }
+ return 0
+}
+
// GlobalFloat64 looks up the value of a global float64 flag, returns float64(0)
// if no float64 flag exists
func (c *Context) GlobalFloat64(name string) float64 {
@@ -147,6 +192,15 @@ func (c *Context) GlobalIntSlice(name string) []int {
return nil
}
+// GlobalInt64Slice looks up the value of a global int slice flag, returns nil if
+// no int slice flag exists
+func (c *Context) GlobalInt64Slice(name string) []int64 {
+ if fs := lookupGlobalFlagSet(name, c); fs != nil {
+ return lookupInt64Slice(name, fs)
+ }
+ return nil
+}
+
// GlobalGeneric looks up the value of a global generic flag, returns nil if no
// generic flag exists
func (c *Context) GlobalGeneric(name string) interface{} {
@@ -306,7 +360,46 @@ func lookupGlobalFlagSet(name string, ctx *Context) *flag.FlagSet {
func lookupInt(name string, set *flag.FlagSet) int {
f := set.Lookup(name)
if f != nil {
- val, err := strconv.Atoi(f.Value.String())
+ val, err := strconv.ParseInt(f.Value.String(), 0, 64)
+ if err != nil {
+ return 0
+ }
+ return int(val)
+ }
+
+ return 0
+}
+
+func lookupInt64(name string, set *flag.FlagSet) int64 {
+ f := set.Lookup(name)
+ if f != nil {
+ val, err := strconv.ParseInt(f.Value.String(), 0, 64)
+ if err != nil {
+ return 0
+ }
+ return val
+ }
+
+ return 0
+}
+
+func lookupUint(name string, set *flag.FlagSet) uint {
+ f := set.Lookup(name)
+ if f != nil {
+ val, err := strconv.ParseUint(f.Value.String(), 0, 64)
+ if err != nil {
+ return 0
+ }
+ return uint(val)
+ }
+
+ return 0
+}
+
+func lookupUint64(name string, set *flag.FlagSet) uint64 {
+ f := set.Lookup(name)
+ if f != nil {
+ val, err := strconv.ParseUint(f.Value.String(), 0, 64)
if err != nil {
return 0
}
@@ -370,6 +463,16 @@ func lookupIntSlice(name string, set *flag.FlagSet) []int {
return nil
}
+func lookupInt64Slice(name string, set *flag.FlagSet) []int64 {
+ f := set.Lookup(name)
+ if f != nil {
+ return (f.Value.(*Int64Slice)).Value()
+
+ }
+
+ return nil
+}
+
func lookupGeneric(name string, set *flag.FlagSet) interface{} {
f := set.Lookup(name)
if f != nil {
diff --git a/Godeps/_workspace/src/gopkg.in/urfave/cli.v1/errors.go b/vendor/gopkg.in/urfave/cli.v1/errors.go
index ea551be16..ea551be16 100644
--- a/Godeps/_workspace/src/gopkg.in/urfave/cli.v1/errors.go
+++ b/vendor/gopkg.in/urfave/cli.v1/errors.go
diff --git a/Godeps/_workspace/src/gopkg.in/urfave/cli.v1/flag.go b/vendor/gopkg.in/urfave/cli.v1/flag.go
index 1e8112e7e..f8a28d119 100644
--- a/Godeps/_workspace/src/gopkg.in/urfave/cli.v1/flag.go
+++ b/vendor/gopkg.in/urfave/cli.v1/flag.go
@@ -189,7 +189,7 @@ func (f *IntSlice) Set(value string) error {
// String returns a readable representation of this value (for usage defaults)
func (f *IntSlice) String() string {
- return fmt.Sprintf("%d", *f)
+ return fmt.Sprintf("%#v", *f)
}
// Value returns the slice of ints set by this flag
@@ -245,6 +245,77 @@ func (f IntSliceFlag) GetName() string {
return f.Name
}
+// Int64Slice is an opaque type for []int to satisfy flag.Value
+type Int64Slice []int64
+
+// Set parses the value into an integer and appends it to the list of values
+func (f *Int64Slice) Set(value string) error {
+ tmp, err := strconv.ParseInt(value, 10, 64)
+ if err != nil {
+ return err
+ }
+ *f = append(*f, tmp)
+ return nil
+}
+
+// String returns a readable representation of this value (for usage defaults)
+func (f *Int64Slice) String() string {
+ return fmt.Sprintf("%#v", *f)
+}
+
+// Value returns the slice of ints set by this flag
+func (f *Int64Slice) Value() []int64 {
+ return *f
+}
+
+// Int64SliceFlag is an int flag that can be specified multiple times on the
+// command-line
+type Int64SliceFlag struct {
+ Name string
+ Value *Int64Slice
+ Usage string
+ EnvVar string
+ Hidden bool
+}
+
+// String returns the usage
+func (f Int64SliceFlag) String() string {
+ return FlagStringer(f)
+}
+
+// Apply populates the flag given the flag set and environment
+func (f Int64SliceFlag) Apply(set *flag.FlagSet) {
+ if f.EnvVar != "" {
+ for _, envVar := range strings.Split(f.EnvVar, ",") {
+ envVar = strings.TrimSpace(envVar)
+ if envVal := os.Getenv(envVar); envVal != "" {
+ newVal := &Int64Slice{}
+ for _, s := range strings.Split(envVal, ",") {
+ s = strings.TrimSpace(s)
+ err := newVal.Set(s)
+ if err != nil {
+ fmt.Fprintf(ErrWriter, err.Error())
+ }
+ }
+ f.Value = newVal
+ break
+ }
+ }
+ }
+
+ eachName(f.Name, func(name string) {
+ if f.Value == nil {
+ f.Value = &Int64Slice{}
+ }
+ set.Var(f.Value, name, f.Usage)
+ })
+}
+
+// GetName returns the name of the flag.
+func (f Int64SliceFlag) GetName() string {
+ return f.Name
+}
+
// BoolFlag is a switch that defaults to false
type BoolFlag struct {
Name string
@@ -376,7 +447,6 @@ func (f StringFlag) GetName() string {
}
// IntFlag is a flag that takes an integer
-// Errors if the value provided cannot be parsed
type IntFlag struct {
Name string
Value int
@@ -420,6 +490,138 @@ func (f IntFlag) GetName() string {
return f.Name
}
+// Int64Flag is a flag that takes a 64-bit integer
+type Int64Flag struct {
+ Name string
+ Value int64
+ Usage string
+ EnvVar string
+ Destination *int64
+ Hidden bool
+}
+
+// String returns the usage
+func (f Int64Flag) String() string {
+ return FlagStringer(f)
+}
+
+// Apply populates the flag given the flag set and environment
+func (f Int64Flag) Apply(set *flag.FlagSet) {
+ if f.EnvVar != "" {
+ for _, envVar := range strings.Split(f.EnvVar, ",") {
+ envVar = strings.TrimSpace(envVar)
+ if envVal := os.Getenv(envVar); envVal != "" {
+ envValInt, err := strconv.ParseInt(envVal, 0, 64)
+ if err == nil {
+ f.Value = envValInt
+ break
+ }
+ }
+ }
+ }
+
+ eachName(f.Name, func(name string) {
+ if f.Destination != nil {
+ set.Int64Var(f.Destination, name, f.Value, f.Usage)
+ return
+ }
+ set.Int64(name, f.Value, f.Usage)
+ })
+}
+
+// GetName returns the name of the flag.
+func (f Int64Flag) GetName() string {
+ return f.Name
+}
+
+// UintFlag is a flag that takes an unsigned integer
+type UintFlag struct {
+ Name string
+ Value uint
+ Usage string
+ EnvVar string
+ Destination *uint
+ Hidden bool
+}
+
+// String returns the usage
+func (f UintFlag) String() string {
+ return FlagStringer(f)
+}
+
+// Apply populates the flag given the flag set and environment
+func (f UintFlag) Apply(set *flag.FlagSet) {
+ if f.EnvVar != "" {
+ for _, envVar := range strings.Split(f.EnvVar, ",") {
+ envVar = strings.TrimSpace(envVar)
+ if envVal := os.Getenv(envVar); envVal != "" {
+ envValInt, err := strconv.ParseUint(envVal, 0, 64)
+ if err == nil {
+ f.Value = uint(envValInt)
+ break
+ }
+ }
+ }
+ }
+
+ eachName(f.Name, func(name string) {
+ if f.Destination != nil {
+ set.UintVar(f.Destination, name, f.Value, f.Usage)
+ return
+ }
+ set.Uint(name, f.Value, f.Usage)
+ })
+}
+
+// GetName returns the name of the flag.
+func (f UintFlag) GetName() string {
+ return f.Name
+}
+
+// Uint64Flag is a flag that takes an unsigned 64-bit integer
+type Uint64Flag struct {
+ Name string
+ Value uint64
+ Usage string
+ EnvVar string
+ Destination *uint64
+ Hidden bool
+}
+
+// String returns the usage
+func (f Uint64Flag) String() string {
+ return FlagStringer(f)
+}
+
+// Apply populates the flag given the flag set and environment
+func (f Uint64Flag) Apply(set *flag.FlagSet) {
+ if f.EnvVar != "" {
+ for _, envVar := range strings.Split(f.EnvVar, ",") {
+ envVar = strings.TrimSpace(envVar)
+ if envVal := os.Getenv(envVar); envVal != "" {
+ envValInt, err := strconv.ParseUint(envVal, 0, 64)
+ if err == nil {
+ f.Value = uint64(envValInt)
+ break
+ }
+ }
+ }
+ }
+
+ eachName(f.Name, func(name string) {
+ if f.Destination != nil {
+ set.Uint64Var(f.Destination, name, f.Value, f.Usage)
+ return
+ }
+ set.Uint64(name, f.Value, f.Usage)
+ })
+}
+
+// GetName returns the name of the flag.
+func (f Uint64Flag) GetName() string {
+ return f.Name
+}
+
// DurationFlag is a flag that takes a duration specified in Go's duration
// format: https://golang.org/pkg/time/#ParseDuration
type DurationFlag struct {
@@ -466,7 +668,6 @@ func (f DurationFlag) GetName() string {
}
// Float64Flag is a flag that takes an float value
-// Errors if the value provided cannot be parsed
type Float64Flag struct {
Name string
Value float64
@@ -512,7 +713,7 @@ func (f Float64Flag) GetName() string {
func visibleFlags(fl []Flag) []Flag {
visible := []Flag{}
for _, flag := range fl {
- if !reflect.ValueOf(flag).FieldByName("Hidden").Bool() {
+ if !flagValue(flag).FieldByName("Hidden").Bool() {
visible = append(visible, flag)
}
}
@@ -578,13 +779,24 @@ func withEnvHint(envVar, str string) string {
return str + envText
}
-func stringifyFlag(f Flag) string {
+func flagValue(f Flag) reflect.Value {
fv := reflect.ValueOf(f)
+ for fv.Kind() == reflect.Ptr {
+ fv = reflect.Indirect(fv)
+ }
+ return fv
+}
+
+func stringifyFlag(f Flag) string {
+ fv := flagValue(f)
switch f.(type) {
case IntSliceFlag:
return withEnvHint(fv.FieldByName("EnvVar").String(),
stringifyIntSliceFlag(f.(IntSliceFlag)))
+ case Int64SliceFlag:
+ return withEnvHint(fv.FieldByName("EnvVar").String(),
+ stringifyInt64SliceFlag(f.(Int64SliceFlag)))
case StringSliceFlag:
return withEnvHint(fv.FieldByName("EnvVar").String(),
stringifyStringSliceFlag(f.(StringSliceFlag)))
@@ -630,6 +842,17 @@ func stringifyIntSliceFlag(f IntSliceFlag) string {
return stringifySliceFlag(f.Usage, f.Name, defaultVals)
}
+func stringifyInt64SliceFlag(f Int64SliceFlag) string {
+ defaultVals := []string{}
+ if f.Value != nil && len(f.Value.Value()) > 0 {
+ for _, i := range f.Value.Value() {
+ defaultVals = append(defaultVals, fmt.Sprintf("%d", i))
+ }
+ }
+
+ return stringifySliceFlag(f.Usage, f.Name, defaultVals)
+}
+
func stringifyStringSliceFlag(f StringSliceFlag) string {
defaultVals := []string{}
if f.Value != nil && len(f.Value.Value()) > 0 {
diff --git a/Godeps/_workspace/src/gopkg.in/urfave/cli.v1/funcs.go b/vendor/gopkg.in/urfave/cli.v1/funcs.go
index cba5e6cb0..cba5e6cb0 100644
--- a/Godeps/_workspace/src/gopkg.in/urfave/cli.v1/funcs.go
+++ b/vendor/gopkg.in/urfave/cli.v1/funcs.go
diff --git a/Godeps/_workspace/src/gopkg.in/urfave/cli.v1/help.go b/vendor/gopkg.in/urfave/cli.v1/help.go
index 801d2b167..0f4cf14cd 100644
--- a/Godeps/_workspace/src/gopkg.in/urfave/cli.v1/help.go
+++ b/vendor/gopkg.in/urfave/cli.v1/help.go
@@ -26,7 +26,7 @@ AUTHOR(S):
{{end}}{{if .VisibleCommands}}
COMMANDS:{{range .VisibleCategories}}{{if .Name}}
{{.Name}}:{{end}}{{range .VisibleCommands}}
- {{.Name}}{{with .ShortName}}, {{.}}{{end}}{{"\t"}}{{.Usage}}{{end}}
+ {{join .Names ", "}}{{"\t"}}{{.Usage}}{{end}}
{{end}}{{end}}{{if .VisibleFlags}}
GLOBAL OPTIONS:
{{range .VisibleFlags}}{{.}}
@@ -67,7 +67,7 @@ USAGE:
COMMANDS:{{range .VisibleCategories}}{{if .Name}}
{{.Name}}:{{end}}{{range .VisibleCommands}}
- {{.Name}}{{with .ShortName}}, {{.}}{{end}}{{"\t"}}{{.Usage}}{{end}}
+ {{join .Names ", "}}{{"\t"}}{{.Usage}}{{end}}
{{end}}{{if .VisibleFlags}}
OPTIONS:
{{range .VisibleFlags}}{{.}}
@@ -117,8 +117,9 @@ var HelpPrinter helpPrinter = printHelp
var VersionPrinter = printVersion
// ShowAppHelp is an action that displays the help.
-func ShowAppHelp(c *Context) {
+func ShowAppHelp(c *Context) error {
HelpPrinter(c.App.Writer, AppHelpTemplate, c.App)
+ return nil
}
// DefaultAppComplete prints the list of subcommands as the default app completion method
@@ -191,7 +192,7 @@ func printHelp(out io.Writer, templ string, data interface{}) {
"join": strings.Join,
}
- w := tabwriter.NewWriter(out, 0, 8, 1, '\t', 0)
+ w := tabwriter.NewWriter(out, 1, 8, 2, ' ', 0)
t := template.Must(template.New("help").Funcs(funcMap).Parse(templ))
err := t.Execute(w, data)
if err != nil {
diff --git a/vendor/gopkg.in/urfave/cli.v1/runtests b/vendor/gopkg.in/urfave/cli.v1/runtests
new file mode 100755
index 000000000..0a7b483e3
--- /dev/null
+++ b/vendor/gopkg.in/urfave/cli.v1/runtests
@@ -0,0 +1,105 @@
+#!/usr/bin/env python
+from __future__ import print_function
+
+import argparse
+import os
+import sys
+import tempfile
+
+from subprocess import check_call, check_output
+
+
+PACKAGE_NAME = os.environ.get(
+ 'CLI_PACKAGE_NAME', 'github.com/urfave/cli'
+)
+
+
+def main(sysargs=sys.argv[:]):
+ targets = {
+ 'vet': _vet,
+ 'test': _test,
+ 'gfmxr': _gfmxr,
+ 'toc': _toc,
+ }
+
+ parser = argparse.ArgumentParser()
+ parser.add_argument(
+ 'target', nargs='?', choices=tuple(targets.keys()), default='test'
+ )
+ args = parser.parse_args(sysargs[1:])
+
+ targets[args.target]()
+ return 0
+
+
+def _test():
+ if check_output('go version'.split()).split()[2] < 'go1.2':
+ _run('go test -v .'.split())
+ return
+
+ coverprofiles = []
+ for subpackage in ['', 'altsrc']:
+ coverprofile = 'cli.coverprofile'
+ if subpackage != '':
+ coverprofile = '{}.coverprofile'.format(subpackage)
+
+ coverprofiles.append(coverprofile)
+
+ _run('go test -v'.split() + [
+ '-coverprofile={}'.format(coverprofile),
+ ('{}/{}'.format(PACKAGE_NAME, subpackage)).rstrip('/')
+ ])
+
+ combined_name = _combine_coverprofiles(coverprofiles)
+ _run('go tool cover -func={}'.format(combined_name).split())
+ os.remove(combined_name)
+
+
+def _gfmxr():
+ _run(['gfmxr', '-c', str(_gfmxr_count()), '-s', 'README.md'])
+
+
+def _vet():
+ _run('go vet ./...'.split())
+
+
+def _toc():
+ _run(['node_modules/.bin/markdown-toc', '-i', 'README.md'])
+ _run(['git', 'diff', '--quiet'])
+
+
+def _run(command):
+ print('runtests: {}'.format(' '.join(command)), file=sys.stderr)
+ check_call(command)
+
+
+def _gfmxr_count():
+ with open('README.md') as infile:
+ lines = infile.read().splitlines()
+ return len(filter(_is_go_runnable, lines))
+
+
+def _is_go_runnable(line):
+ return line.startswith('package main')
+
+
+def _combine_coverprofiles(coverprofiles):
+ combined = tempfile.NamedTemporaryFile(
+ suffix='.coverprofile', delete=False
+ )
+ combined.write('mode: set\n')
+
+ for coverprofile in coverprofiles:
+ with open(coverprofile, 'r') as infile:
+ for line in infile.readlines():
+ if not line.startswith('mode: '):
+ combined.write(line)
+
+ combined.flush()
+ name = combined.name
+ combined.close()
+ return name
+
+
+if __name__ == '__main__':
+ sys.exit(main())