From 30b3277c59d5198ac897634ffc29ed3e492a2c4f Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 14:08:30 +0800 Subject: [PATCH 01/78] Switch from outside to meson subprojects --- .gitmodules | 18 ++++++++++++++++++ subprojects/commonmark-legacy | 1 + subprojects/ed25519 | 1 + subprojects/http-parser-legacy | 1 + subprojects/murmur3 | 1 + subprojects/softfloat3 | 1 + subprojects/urbit-scrypt | 1 + 7 files changed, 24 insertions(+) create mode 100644 .gitmodules create mode 160000 subprojects/commonmark-legacy create mode 160000 subprojects/ed25519 create mode 160000 subprojects/http-parser-legacy create mode 160000 subprojects/murmur3 create mode 160000 subprojects/softfloat3 create mode 160000 subprojects/urbit-scrypt diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..87b3577d1 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,18 @@ +[submodule "subprojects/softfloat3"] + path = subprojects/softfloat3 + url = https://github.com/mikolajpp/berkeley-softfloat-3.git +[submodule "subprojects/ed25519"] + path = subprojects/ed25519 + url = https://github.com/mikolajpp/ed25519.git +[submodule "subprojects/urbit-scrypt"] + path = subprojects/urbit-scrypt + url = https://github.com/mikolajpp/urbit-scrypt.git +[submodule "subprojects/murmur3"] + path = subprojects/murmur3 + url = https://github.com/mikolajpp/murmur3.git +[submodule "subprojects/http-parser-legacy"] + path = subprojects/http-parser-legacy + url = git@github.com:mikolajpp/http-parser-legacy.git +[submodule "subprojects/commonmark-legacy"] + path = subprojects/commonmark-legacy + url = git@github.com:mikolajpp/commonmark-legacy.git diff --git a/subprojects/commonmark-legacy b/subprojects/commonmark-legacy new file mode 160000 index 000000000..f29c8f27b --- /dev/null +++ b/subprojects/commonmark-legacy @@ -0,0 +1 @@ +Subproject commit f29c8f27b63335ee9ed29a78cce507a013d49f88 diff --git a/subprojects/ed25519 b/subprojects/ed25519 new file mode 160000 index 000000000..d2a134b1a --- /dev/null +++ b/subprojects/ed25519 @@ -0,0 +1 @@ +Subproject commit d2a134b1a24c9021aaf4e154ee5f5dbaeab459aa diff --git a/subprojects/http-parser-legacy b/subprojects/http-parser-legacy new file mode 160000 index 000000000..1fa6899e3 --- /dev/null +++ b/subprojects/http-parser-legacy @@ -0,0 +1 @@ +Subproject commit 1fa6899e3641c4d447022caf6b4ddc78930d9e8b diff --git a/subprojects/murmur3 b/subprojects/murmur3 new file mode 160000 index 000000000..53dec3429 --- /dev/null +++ b/subprojects/murmur3 @@ -0,0 +1 @@ +Subproject commit 53dec342963a90828fba27ec03b86a1dcca94db6 diff --git a/subprojects/softfloat3 b/subprojects/softfloat3 new file mode 160000 index 000000000..32ff41602 --- /dev/null +++ b/subprojects/softfloat3 @@ -0,0 +1 @@ +Subproject commit 32ff41602f3d72295bc7a7d608787d1d85fadca1 diff --git a/subprojects/urbit-scrypt b/subprojects/urbit-scrypt new file mode 160000 index 000000000..2fe918321 --- /dev/null +++ b/subprojects/urbit-scrypt @@ -0,0 +1 @@ +Subproject commit 2fe9183218ef33060141a7d7a8b7e24731fe2901 From 48d3ed55d322fd2a0af068b41639a0db23edfc1f Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 14:08:46 +0800 Subject: [PATCH 02/78] Remove outside/ --- outside/anachronism/.gitignore | 1 - outside/anachronism/LICENSE | 19 - outside/anachronism/Makefile | 70 - outside/anachronism/README.md | 158 - outside/anachronism/doc/channels.md | 50 - outside/anachronism/doc/parser.png | Bin 151838 -> 0 bytes .../anachronism/include/anachronism/common.h | 24 - outside/anachronism/include/anachronism/nvt.h | 214 - .../anachronism/include/anachronism/parser.h | 73 - outside/anachronism/src/README.md | 6 - outside/anachronism/src/nvt.c | 631 - outside/anachronism/src/parser.c | 455 - outside/anachronism/src/parser.rl | 211 - outside/anachronism/src/parser_common.rl | 85 - outside/commonmark/.editorconfig | 23 - outside/commonmark/.gitignore | 33 - outside/commonmark/.travis.yml | 10 - outside/commonmark/CMakeLists.txt | 24 - outside/commonmark/LICENSE | 70 - outside/commonmark/Makefile | 194 - outside/commonmark/Makefile.nmake | 57 - outside/commonmark/Makefile.old | 47 - outside/commonmark/README.md | 298 - .../commonmark/alternative-html-blocks.txt | 247 - outside/commonmark/api_test/CMakeLists.txt | 25 - outside/commonmark/api_test/cplusplus.cpp | 15 - outside/commonmark/api_test/harness.c | 102 - outside/commonmark/api_test/harness.h | 42 - outside/commonmark/api_test/main.c | 622 - outside/commonmark/bench/statistics.py | 595 - outside/commonmark/bench/stats.py | 19 - outside/commonmark/benchmarks.md | 33 - outside/commonmark/changelog.spec | 10 - outside/commonmark/data/CaseFolding-3.2.0.txt | 912 -- outside/commonmark/dingus.html | 151 - outside/commonmark/js/.npmignore | 3 - outside/commonmark/js/LICENSE | 30 - outside/commonmark/js/README.md | 24 - outside/commonmark/js/ansi/ansi.js | 405 - outside/commonmark/js/ansi/newlines.js | 71 - outside/commonmark/js/bench.js | 35 - outside/commonmark/js/bin/commonmark | 33 - outside/commonmark/js/index.html | 12 - outside/commonmark/js/lib/blocks.js | 698 - outside/commonmark/js/lib/from-code-point.js | 58 - outside/commonmark/js/lib/html-renderer.js | 168 - outside/commonmark/js/lib/html5-entities.js | 2147 --- outside/commonmark/js/lib/index.js | 20 - outside/commonmark/js/lib/inlines.js | 854 -- outside/commonmark/js/package.json | 25 - outside/commonmark/js/test.js | 82 - outside/commonmark/man/CMakeLists.txt | 5 - outside/commonmark/man/make_man_page.py | 102 - outside/commonmark/man/man1/cmark.1 | 31 - outside/commonmark/man/man3/cmark.3 | 275 - outside/commonmark/mkcasefold.pl | 22 - outside/commonmark/nmake.bat | 1 - outside/commonmark/spec.txt | 6971 --------- outside/commonmark/spec2js.js | 17 - outside/commonmark/spec2md.pl | 36 - outside/commonmark/specfilter.hs | 37 - outside/commonmark/src/CMakeLists.txt | 144 - outside/commonmark/src/bench.h | 27 - outside/commonmark/src/blocks.c | 897 -- outside/commonmark/src/buffer.c | 375 - outside/commonmark/src/buffer.h | 177 - outside/commonmark/src/case_fold_switch.inc | 2637 ---- outside/commonmark/src/chunk.h | 122 - outside/commonmark/src/cmark.c | 21 - outside/commonmark/src/cmark.h | 343 - outside/commonmark/src/config.h.in | 49 - outside/commonmark/src/debug.h | 36 - outside/commonmark/src/html/houdini.h | 52 - outside/commonmark/src/html/houdini_href_e.c | 107 - outside/commonmark/src/html/houdini_html_e.c | 81 - outside/commonmark/src/html/houdini_html_u.c | 112 - outside/commonmark/src/html/html.c | 357 - .../commonmark/src/html/html_unescape.gperf | 2131 --- outside/commonmark/src/html/html_unescape.h | 9736 ------------ outside/commonmark/src/inlines.c | 987 -- outside/commonmark/src/inlines.h | 19 - outside/commonmark/src/main.c | 114 - outside/commonmark/src/node.c | 655 - outside/commonmark/src/node.h | 76 - outside/commonmark/src/parser.h | 27 - outside/commonmark/src/print.c | 169 - outside/commonmark/src/references.c | 154 - outside/commonmark/src/references.h | 37 - outside/commonmark/src/scanners.c | 12398 ---------------- outside/commonmark/src/scanners.h | 38 - outside/commonmark/src/scanners.re | 235 - outside/commonmark/src/utf8.c | 462 - outside/commonmark/src/utf8.h | 22 - outside/commonmark/template.html | 104 - outside/commonmark/template.tex | 229 - outside/commonmark/test/CMakeLists.txt | 24 - outside/commonmark/test/cmark.py | 38 - outside/commonmark/test/normalize.py | 141 - outside/commonmark/test/pathological_tests.py | 56 - outside/commonmark/test/spec_tests.py | 140 - outside/commonmark/toolchain-mingw32.cmake | 17 - outside/commonmark/wrapper.lua | 201 - outside/commonmark/wrapper.py | 23 - outside/commonmark/wrapper.rb | 15 - outside/ed25519/.gitignore | 1 - outside/ed25519/Makefile | 23 - outside/ed25519/readme.md | 165 - outside/ed25519/src/add_scalar.c | 56 - outside/ed25519/src/ed25519.h | 38 - outside/ed25519/src/fe.c | 1491 -- outside/ed25519/src/fe.h | 41 - outside/ed25519/src/fixedint.h | 11 - outside/ed25519/src/ge.c | 467 - outside/ed25519/src/ge.h | 74 - outside/ed25519/src/key_exchange.c | 79 - outside/ed25519/src/keypair.c | 16 - outside/ed25519/src/precomp_data.h | 1391 -- outside/ed25519/src/sc.c | 809 - outside/ed25519/src/sc.h | 12 - outside/ed25519/src/seed.c | 40 - outside/ed25519/src/sha512.c | 275 - outside/ed25519/src/sha512.h | 21 - outside/ed25519/src/sign.c | 31 - outside/ed25519/src/verify.c | 77 - outside/ed25519/test.c | 149 - outside/jhttp/http_parser.c | 2016 --- outside/jhttp/http_parser.h | 314 - outside/libuv-v1.7.5/.gitignore | 75 - outside/libuv-v1.7.5/.mailmap | 38 - outside/libuv-v1.7.5/AUTHORS | 227 - outside/libuv-v1.7.5/CONTRIBUTING.md | 166 - outside/libuv-v1.7.5/ChangeLog | 2273 --- outside/libuv-v1.7.5/LICENSE | 46 - outside/libuv-v1.7.5/MAINTAINERS.md | 36 - outside/libuv-v1.7.5/Makefile.am | 343 - outside/libuv-v1.7.5/Makefile.mingw | 84 - outside/libuv-v1.7.5/README.md | 245 - outside/libuv-v1.7.5/android-configure | 20 - outside/libuv-v1.7.5/appveyor.yml | 36 - outside/libuv-v1.7.5/autogen.sh | 46 - outside/libuv-v1.7.5/checksparse.sh | 234 - outside/libuv-v1.7.5/common.gypi | 211 - outside/libuv-v1.7.5/configure.ac | 68 - outside/libuv-v1.7.5/docs/Makefile | 178 - outside/libuv-v1.7.5/docs/make.bat | 243 - outside/libuv-v1.7.5/docs/src/async.rst | 57 - outside/libuv-v1.7.5/docs/src/check.rst | 46 - outside/libuv-v1.7.5/docs/src/conf.py | 348 - outside/libuv-v1.7.5/docs/src/design.rst | 137 - outside/libuv-v1.7.5/docs/src/dll.rst | 44 - outside/libuv-v1.7.5/docs/src/dns.rst | 108 - outside/libuv-v1.7.5/docs/src/errors.rst | 331 - outside/libuv-v1.7.5/docs/src/fs.rst | 290 - outside/libuv-v1.7.5/docs/src/fs_event.rst | 108 - outside/libuv-v1.7.5/docs/src/fs_poll.rst | 72 - outside/libuv-v1.7.5/docs/src/handle.rst | 181 - outside/libuv-v1.7.5/docs/src/idle.rst | 54 - outside/libuv-v1.7.5/docs/src/index.rst | 95 - outside/libuv-v1.7.5/docs/src/loop.rst | 166 - .../docs/src/migration_010_100.rst | 244 - outside/libuv-v1.7.5/docs/src/misc.rst | 290 - outside/libuv-v1.7.5/docs/src/pipe.rst | 104 - outside/libuv-v1.7.5/docs/src/poll.rst | 103 - outside/libuv-v1.7.5/docs/src/prepare.rst | 46 - outside/libuv-v1.7.5/docs/src/process.rst | 225 - outside/libuv-v1.7.5/docs/src/request.rst | 82 - outside/libuv-v1.7.5/docs/src/signal.rst | 77 - .../docs/src/sphinx-plugins/manpage.py | 46 - .../docs/src/static/architecture.png | Bin 206767 -> 0 bytes .../src/static/diagrams.key/Data/st0-311.jpg | Bin 19328 -> 0 bytes .../src/static/diagrams.key/Data/st1-475.jpg | Bin 12655 -> 0 bytes .../docs/src/static/diagrams.key/Index.zip | Bin 71160 -> 0 bytes .../Metadata/BuildVersionHistory.plist | 8 - .../diagrams.key/Metadata/DocumentIdentifier | 1 - .../diagrams.key/Metadata/Properties.plist | Bin 340 -> 0 bytes .../src/static/diagrams.key/preview-micro.jpg | Bin 1425 -> 0 bytes .../src/static/diagrams.key/preview-web.jpg | Bin 8106 -> 0 bytes .../docs/src/static/diagrams.key/preview.jpg | Bin 107456 -> 0 bytes .../libuv-v1.7.5/docs/src/static/favicon.ico | Bin 15086 -> 0 bytes outside/libuv-v1.7.5/docs/src/static/logo.png | Bin 33545 -> 0 bytes .../docs/src/static/loop_iteration.png | Bin 80528 -> 0 bytes outside/libuv-v1.7.5/docs/src/stream.rst | 219 - outside/libuv-v1.7.5/docs/src/tcp.rst | 108 - outside/libuv-v1.7.5/docs/src/threading.rst | 160 - outside/libuv-v1.7.5/docs/src/threadpool.rst | 67 - outside/libuv-v1.7.5/docs/src/timer.rst | 76 - outside/libuv-v1.7.5/docs/src/tty.rst | 93 - outside/libuv-v1.7.5/docs/src/udp.rst | 295 - outside/libuv-v1.7.5/docs/src/version.rst | 60 - outside/libuv-v1.7.5/gyp_uv.py | 96 - outside/libuv-v1.7.5/img/banner.png | Bin 44102 -> 0 bytes outside/libuv-v1.7.5/img/logos.svg | 152 - .../libuv-v1.7.5/include/android-ifaddrs.h | 54 - outside/libuv-v1.7.5/include/pthread-fixes.h | 72 - .../libuv-v1.7.5/include/stdint-msvc2008.h | 247 - outside/libuv-v1.7.5/include/tree.h | 768 - outside/libuv-v1.7.5/include/uv-aix.h | 32 - outside/libuv-v1.7.5/include/uv-bsd.h | 34 - outside/libuv-v1.7.5/include/uv-darwin.h | 61 - outside/libuv-v1.7.5/include/uv-errno.h | 418 - outside/libuv-v1.7.5/include/uv-linux.h | 34 - outside/libuv-v1.7.5/include/uv-sunos.h | 44 - outside/libuv-v1.7.5/include/uv-threadpool.h | 37 - outside/libuv-v1.7.5/include/uv-unix.h | 383 - outside/libuv-v1.7.5/include/uv-version.h | 43 - outside/libuv-v1.7.5/include/uv-win.h | 653 - outside/libuv-v1.7.5/include/uv.h | 1472 -- outside/libuv-v1.7.5/libuv.nsi | 86 - outside/libuv-v1.7.5/libuv.pc.in | 11 - outside/libuv-v1.7.5/m4/.gitignore | 4 - outside/libuv-v1.7.5/m4/as_case.m4 | 21 - outside/libuv-v1.7.5/m4/libuv-check-flags.m4 | 319 - outside/libuv-v1.7.5/samples/.gitignore | 22 - .../samples/socks5-proxy/.gitignore | 21 - .../libuv-v1.7.5/samples/socks5-proxy/LICENSE | 53 - .../samples/socks5-proxy/Makefile | 46 - .../samples/socks5-proxy/build.gyp | 46 - .../samples/socks5-proxy/client.c | 737 - .../libuv-v1.7.5/samples/socks5-proxy/defs.h | 139 - .../samples/socks5-proxy/getopt.c | 131 - .../libuv-v1.7.5/samples/socks5-proxy/main.c | 99 - .../libuv-v1.7.5/samples/socks5-proxy/s5.c | 271 - .../libuv-v1.7.5/samples/socks5-proxy/s5.h | 94 - .../samples/socks5-proxy/server.c | 241 - .../libuv-v1.7.5/samples/socks5-proxy/util.c | 72 - outside/libuv-v1.7.5/src/fs-poll.c | 255 - outside/libuv-v1.7.5/src/heap-inl.h | 245 - outside/libuv-v1.7.5/src/inet.c | 313 - outside/libuv-v1.7.5/src/queue.h | 94 - outside/libuv-v1.7.5/src/threadpool.c | 308 - outside/libuv-v1.7.5/src/unix/aix.c | 1158 -- .../libuv-v1.7.5/src/unix/android-ifaddrs.c | 703 - outside/libuv-v1.7.5/src/unix/async.c | 284 - outside/libuv-v1.7.5/src/unix/atomic-ops.h | 72 - outside/libuv-v1.7.5/src/unix/core.c | 1091 -- .../libuv-v1.7.5/src/unix/darwin-proctitle.c | 206 - outside/libuv-v1.7.5/src/unix/darwin.c | 333 - outside/libuv-v1.7.5/src/unix/dl.c | 83 - outside/libuv-v1.7.5/src/unix/freebsd.c | 448 - outside/libuv-v1.7.5/src/unix/fs.c | 1255 -- outside/libuv-v1.7.5/src/unix/fsevents.c | 899 -- outside/libuv-v1.7.5/src/unix/getaddrinfo.c | 202 - outside/libuv-v1.7.5/src/unix/getnameinfo.c | 120 - outside/libuv-v1.7.5/src/unix/internal.h | 316 - outside/libuv-v1.7.5/src/unix/kqueue.c | 426 - outside/libuv-v1.7.5/src/unix/linux-core.c | 897 -- outside/libuv-v1.7.5/src/unix/linux-inotify.c | 257 - .../libuv-v1.7.5/src/unix/linux-syscalls.c | 471 - .../libuv-v1.7.5/src/unix/linux-syscalls.h | 158 - outside/libuv-v1.7.5/src/unix/loop-watcher.c | 63 - outside/libuv-v1.7.5/src/unix/loop.c | 155 - outside/libuv-v1.7.5/src/unix/netbsd.c | 368 - outside/libuv-v1.7.5/src/unix/openbsd.c | 384 - outside/libuv-v1.7.5/src/unix/pipe.c | 288 - outside/libuv-v1.7.5/src/unix/poll.c | 113 - outside/libuv-v1.7.5/src/unix/process.c | 552 - outside/libuv-v1.7.5/src/unix/proctitle.c | 102 - outside/libuv-v1.7.5/src/unix/pthread-fixes.c | 104 - outside/libuv-v1.7.5/src/unix/signal.c | 465 - outside/libuv-v1.7.5/src/unix/spinlock.h | 53 - outside/libuv-v1.7.5/src/unix/stream.c | 1615 -- outside/libuv-v1.7.5/src/unix/sunos.c | 763 - outside/libuv-v1.7.5/src/unix/tcp.c | 362 - outside/libuv-v1.7.5/src/unix/thread.c | 525 - outside/libuv-v1.7.5/src/unix/timer.c | 172 - outside/libuv-v1.7.5/src/unix/tty.c | 270 - outside/libuv-v1.7.5/src/unix/udp.c | 871 -- outside/libuv-v1.7.5/src/uv-common.c | 626 - outside/libuv-v1.7.5/src/uv-common.h | 223 - outside/libuv-v1.7.5/src/version.c | 45 - outside/libuv-v1.7.5/src/win/async.c | 99 - outside/libuv-v1.7.5/src/win/atomicops-inl.h | 56 - outside/libuv-v1.7.5/src/win/core.c | 457 - outside/libuv-v1.7.5/src/win/dl.c | 113 - outside/libuv-v1.7.5/src/win/error.c | 169 - outside/libuv-v1.7.5/src/win/fs-event.c | 543 - outside/libuv-v1.7.5/src/win/fs.c | 2349 --- outside/libuv-v1.7.5/src/win/getaddrinfo.c | 361 - outside/libuv-v1.7.5/src/win/getnameinfo.c | 150 - outside/libuv-v1.7.5/src/win/handle-inl.h | 179 - outside/libuv-v1.7.5/src/win/handle.c | 154 - outside/libuv-v1.7.5/src/win/internal.h | 381 - outside/libuv-v1.7.5/src/win/loop-watcher.c | 122 - outside/libuv-v1.7.5/src/win/pipe.c | 2114 --- outside/libuv-v1.7.5/src/win/poll.c | 635 - outside/libuv-v1.7.5/src/win/process-stdio.c | 510 - outside/libuv-v1.7.5/src/win/process.c | 1247 -- outside/libuv-v1.7.5/src/win/req-inl.h | 224 - outside/libuv-v1.7.5/src/win/req.c | 25 - outside/libuv-v1.7.5/src/win/signal.c | 356 - outside/libuv-v1.7.5/src/win/stream-inl.h | 56 - outside/libuv-v1.7.5/src/win/stream.c | 249 - outside/libuv-v1.7.5/src/win/tcp.c | 1507 -- outside/libuv-v1.7.5/src/win/thread.c | 697 - outside/libuv-v1.7.5/src/win/timer.c | 200 - outside/libuv-v1.7.5/src/win/tty.c | 2084 --- outside/libuv-v1.7.5/src/win/udp.c | 926 -- outside/libuv-v1.7.5/src/win/util.c | 1220 -- outside/libuv-v1.7.5/src/win/winapi.c | 142 - outside/libuv-v1.7.5/src/win/winapi.h | 4703 ------ outside/libuv-v1.7.5/src/win/winsock.c | 561 - outside/libuv-v1.7.5/src/win/winsock.h | 190 - .../test/benchmark-async-pummel.c | 119 - outside/libuv-v1.7.5/test/benchmark-async.c | 141 - outside/libuv-v1.7.5/test/benchmark-fs-stat.c | 136 - .../libuv-v1.7.5/test/benchmark-getaddrinfo.c | 92 - outside/libuv-v1.7.5/test/benchmark-list.h | 163 - .../libuv-v1.7.5/test/benchmark-loop-count.c | 92 - .../test/benchmark-million-async.c | 112 - .../test/benchmark-million-timers.c | 86 - .../test/benchmark-multi-accept.c | 447 - .../libuv-v1.7.5/test/benchmark-ping-pongs.c | 221 - outside/libuv-v1.7.5/test/benchmark-pound.c | 351 - outside/libuv-v1.7.5/test/benchmark-pump.c | 476 - outside/libuv-v1.7.5/test/benchmark-sizes.c | 46 - outside/libuv-v1.7.5/test/benchmark-spawn.c | 164 - .../test/benchmark-tcp-write-batch.c | 144 - outside/libuv-v1.7.5/test/benchmark-thread.c | 64 - .../libuv-v1.7.5/test/benchmark-udp-pummel.c | 243 - outside/libuv-v1.7.5/test/blackhole-server.c | 121 - outside/libuv-v1.7.5/test/dns-server.c | 340 - outside/libuv-v1.7.5/test/echo-server.c | 378 - outside/libuv-v1.7.5/test/fixtures/empty_file | 0 .../test/fixtures/load_error.node | 1 - outside/libuv-v1.7.5/test/run-benchmarks.c | 65 - outside/libuv-v1.7.5/test/run-tests.c | 181 - outside/libuv-v1.7.5/test/runner-unix.c | 400 - outside/libuv-v1.7.5/test/runner-unix.h | 36 - outside/libuv-v1.7.5/test/runner-win.c | 371 - outside/libuv-v1.7.5/test/runner-win.h | 43 - outside/libuv-v1.7.5/test/runner.c | 464 - outside/libuv-v1.7.5/test/runner.h | 178 - outside/libuv-v1.7.5/test/task.h | 250 - outside/libuv-v1.7.5/test/test-active.c | 84 - .../libuv-v1.7.5/test/test-async-null-cb.c | 55 - outside/libuv-v1.7.5/test/test-async.c | 134 - outside/libuv-v1.7.5/test/test-barrier.c | 106 - .../libuv-v1.7.5/test/test-callback-order.c | 77 - .../libuv-v1.7.5/test/test-callback-stack.c | 205 - outside/libuv-v1.7.5/test/test-close-fd.c | 76 - outside/libuv-v1.7.5/test/test-close-order.c | 80 - outside/libuv-v1.7.5/test/test-condvar.c | 173 - .../libuv-v1.7.5/test/test-connection-fail.c | 151 - .../libuv-v1.7.5/test/test-cwd-and-chdir.c | 51 - .../test/test-default-loop-close.c | 59 - .../libuv-v1.7.5/test/test-delayed-accept.c | 189 - outside/libuv-v1.7.5/test/test-dlerror.c | 55 - outside/libuv-v1.7.5/test/test-embed.c | 138 - outside/libuv-v1.7.5/test/test-emfile.c | 111 - outside/libuv-v1.7.5/test/test-error.c | 50 - outside/libuv-v1.7.5/test/test-fail-always.c | 29 - outside/libuv-v1.7.5/test/test-fs-event.c | 883 -- outside/libuv-v1.7.5/test/test-fs-poll.c | 186 - outside/libuv-v1.7.5/test/test-fs.c | 2540 ---- .../libuv-v1.7.5/test/test-get-currentexe.c | 86 - outside/libuv-v1.7.5/test/test-get-loadavg.c | 36 - outside/libuv-v1.7.5/test/test-get-memory.c | 38 - outside/libuv-v1.7.5/test/test-getaddrinfo.c | 182 - outside/libuv-v1.7.5/test/test-getnameinfo.c | 101 - outside/libuv-v1.7.5/test/test-getsockname.c | 361 - .../libuv-v1.7.5/test/test-handle-fileno.c | 121 - outside/libuv-v1.7.5/test/test-homedir.c | 49 - outside/libuv-v1.7.5/test/test-hrtime.c | 54 - outside/libuv-v1.7.5/test/test-idle.c | 99 - outside/libuv-v1.7.5/test/test-ip4-addr.c | 46 - outside/libuv-v1.7.5/test/test-ip6-addr.c | 141 - .../libuv-v1.7.5/test/test-ipc-send-recv.c | 236 - outside/libuv-v1.7.5/test/test-ipc.c | 779 - outside/libuv-v1.7.5/test/test-list.h | 722 - outside/libuv-v1.7.5/test/test-loop-alive.c | 67 - outside/libuv-v1.7.5/test/test-loop-close.c | 53 - .../libuv-v1.7.5/test/test-loop-configure.c | 38 - outside/libuv-v1.7.5/test/test-loop-handles.c | 337 - outside/libuv-v1.7.5/test/test-loop-stop.c | 71 - outside/libuv-v1.7.5/test/test-loop-time.c | 63 - .../libuv-v1.7.5/test/test-multiple-listen.c | 109 - outside/libuv-v1.7.5/test/test-mutexes.c | 122 - outside/libuv-v1.7.5/test/test-osx-select.c | 140 - outside/libuv-v1.7.5/test/test-pass-always.c | 28 - outside/libuv-v1.7.5/test/test-ping-pong.c | 270 - .../libuv-v1.7.5/test/test-pipe-bind-error.c | 136 - .../test/test-pipe-close-stdout-read-stdin.c | 104 - .../test/test-pipe-connect-error.c | 95 - .../test/test-pipe-connect-multiple.c | 104 - .../test/test-pipe-connect-prepare.c | 83 - .../libuv-v1.7.5/test/test-pipe-getsockname.c | 263 - .../test/test-pipe-pending-instances.c | 59 - outside/libuv-v1.7.5/test/test-pipe-sendmsg.c | 169 - .../test/test-pipe-server-close.c | 91 - .../test/test-pipe-set-non-blocking.c | 99 - .../libuv-v1.7.5/test/test-platform-output.c | 126 - .../test-poll-close-doesnt-corrupt-stack.c | 114 - outside/libuv-v1.7.5/test/test-poll-close.c | 73 - .../libuv-v1.7.5/test/test-poll-closesocket.c | 89 - outside/libuv-v1.7.5/test/test-poll.c | 560 - .../libuv-v1.7.5/test/test-process-title.c | 53 - outside/libuv-v1.7.5/test/test-ref.c | 442 - outside/libuv-v1.7.5/test/test-run-nowait.c | 45 - outside/libuv-v1.7.5/test/test-run-once.c | 48 - outside/libuv-v1.7.5/test/test-semaphore.c | 111 - .../libuv-v1.7.5/test/test-shutdown-close.c | 108 - outside/libuv-v1.7.5/test/test-shutdown-eof.c | 182 - .../libuv-v1.7.5/test/test-shutdown-twice.c | 84 - .../test/test-signal-multiple-loops.c | 290 - outside/libuv-v1.7.5/test/test-signal.c | 152 - .../test/test-socket-buffer-size.c | 77 - outside/libuv-v1.7.5/test/test-spawn.c | 1706 --- .../libuv-v1.7.5/test/test-stdio-over-pipes.c | 255 - .../libuv-v1.7.5/test/test-tcp-bind-error.c | 216 - .../libuv-v1.7.5/test/test-tcp-bind6-error.c | 176 - .../libuv-v1.7.5/test/test-tcp-close-accept.c | 188 - .../test/test-tcp-close-while-connecting.c | 86 - outside/libuv-v1.7.5/test/test-tcp-close.c | 136 - .../test/test-tcp-connect-error-after-write.c | 98 - .../test/test-tcp-connect-error.c | 73 - .../test/test-tcp-connect-timeout.c | 91 - .../test/test-tcp-connect6-error.c | 71 - .../test/test-tcp-create-socket-early.c | 206 - outside/libuv-v1.7.5/test/test-tcp-flags.c | 52 - outside/libuv-v1.7.5/test/test-tcp-oob.c | 128 - outside/libuv-v1.7.5/test/test-tcp-open.c | 220 - .../libuv-v1.7.5/test/test-tcp-read-stop.c | 76 - .../test/test-tcp-shutdown-after-write.c | 138 - .../libuv-v1.7.5/test/test-tcp-try-write.c | 130 - .../test/test-tcp-unexpected-read.c | 117 - .../test/test-tcp-write-after-connect.c | 68 - .../libuv-v1.7.5/test/test-tcp-write-fail.c | 115 - .../test/test-tcp-write-queue-order.c | 137 - .../test-tcp-write-to-half-open-connection.c | 141 - .../libuv-v1.7.5/test/test-tcp-writealot.c | 176 - outside/libuv-v1.7.5/test/test-thread-equal.c | 45 - outside/libuv-v1.7.5/test/test-thread.c | 211 - .../test/test-threadpool-cancel.c | 361 - outside/libuv-v1.7.5/test/test-threadpool.c | 76 - outside/libuv-v1.7.5/test/test-timer-again.c | 141 - .../libuv-v1.7.5/test/test-timer-from-check.c | 80 - outside/libuv-v1.7.5/test/test-timer.c | 303 - outside/libuv-v1.7.5/test/test-tty.c | 181 - outside/libuv-v1.7.5/test/test-udp-bind.c | 93 - .../test/test-udp-create-socket-early.c | 132 - .../test/test-udp-dgram-too-big.c | 91 - outside/libuv-v1.7.5/test/test-udp-ipv6.c | 172 - .../test/test-udp-multicast-interface.c | 99 - .../test/test-udp-multicast-interface6.c | 103 - .../test/test-udp-multicast-join.c | 150 - .../test/test-udp-multicast-join6.c | 161 - .../test/test-udp-multicast-ttl.c | 94 - outside/libuv-v1.7.5/test/test-udp-open.c | 204 - outside/libuv-v1.7.5/test/test-udp-options.c | 126 - .../test/test-udp-send-and-recv.c | 214 - .../test/test-udp-send-immediate.c | 148 - .../test/test-udp-send-unreachable.c | 150 - outside/libuv-v1.7.5/test/test-udp-try-send.c | 133 - outside/libuv-v1.7.5/test/test-walk-handles.c | 77 - .../test/test-watcher-cross-stop.c | 103 - outside/libuv-v1.7.5/uv.gyp | 500 - outside/libuv-v1.7.5/vcbuild.bat | 153 - outside/murmur3/MurmurHash3.c | 328 - outside/murmur3/MurmurHash3.h | 37 - outside/scrypt/Makefile | 16 - outside/scrypt/crypto_scrypt-nosse.c | 329 - outside/scrypt/crypto_scrypt.h | 50 - outside/scrypt/sha256.c | 411 - outside/scrypt/sha256.h | 62 - outside/scrypt/sysendian.h | 129 - outside/softfloat-3/COPYING.txt | 37 - outside/softfloat-3/README.html | 49 - outside/softfloat-3/README.txt | 21 - .../softfloat-3/build/Linux-386-GCC/Makefile | 323 - .../build/Linux-386-GCC/platform.h | 48 - .../build/Linux-386-SSE2-GCC/Makefile | 323 - .../build/Linux-386-SSE2-GCC/platform.h | 48 - .../build/Linux-x86_64-GCC/Makefile | 388 - .../build/Linux-x86_64-GCC/platform.h | 48 - .../softfloat-3/build/Win32-MinGW/Makefile | 323 - .../softfloat-3/build/Win32-MinGW/platform.h | 48 - .../build/Win32-SSE2-MinGW/Makefile | 323 - .../build/Win32-SSE2-MinGW/platform.h | 48 - .../build/Win64-MinGW-w64/Makefile | 388 - .../build/Win64-MinGW-w64/platform.h | 48 - .../build/template-FAST_INT64/Makefile | 389 - .../build/template-FAST_INT64/platform.h | 50 - .../build/template-not-FAST_INT64/Makefile | 323 - .../build/template-not-FAST_INT64/platform.h | 50 - .../softfloat-3/doc/SoftFloat-history.html | 197 - outside/softfloat-3/doc/SoftFloat-source.html | 624 - outside/softfloat-3/doc/SoftFloat.html | 1526 -- .../source/8086-SSE/extF80M_isSignalingNaN.c | 57 - .../source/8086-SSE/f128M_isSignalingNaN.c | 60 - .../source/8086-SSE/s_commonNaNToExtF80M.c | 56 - .../source/8086-SSE/s_commonNaNToExtF80UI.c | 56 - .../source/8086-SSE/s_commonNaNToF128M.c | 56 - .../source/8086-SSE/s_commonNaNToF128UI.c | 55 - .../source/8086-SSE/s_commonNaNToF16UI.c | 51 - .../source/8086-SSE/s_commonNaNToF32UI.c | 51 - .../source/8086-SSE/s_commonNaNToF64UI.c | 53 - .../source/8086-SSE/s_extF80MToCommonNaN.c | 62 - .../source/8086-SSE/s_extF80UIToCommonNaN.c | 62 - .../source/8086-SSE/s_f128MToCommonNaN.c | 62 - .../source/8086-SSE/s_f128UIToCommonNaN.c | 65 - .../source/8086-SSE/s_f16UIToCommonNaN.c | 59 - .../source/8086-SSE/s_f32UIToCommonNaN.c | 59 - .../source/8086-SSE/s_f64UIToCommonNaN.c | 59 - .../source/8086-SSE/s_propagateNaNExtF80M.c | 107 - .../source/8086-SSE/s_propagateNaNExtF80UI.c | 106 - .../source/8086-SSE/s_propagateNaNF128M.c | 76 - .../source/8086-SSE/s_propagateNaNF128UI.c | 81 - .../source/8086-SSE/s_propagateNaNF16UI.c | 63 - .../source/8086-SSE/s_propagateNaNF32UI.c | 63 - .../source/8086-SSE/s_propagateNaNF64UI.c | 63 - .../source/8086-SSE/softfloat_raiseFlags.c | 52 - .../softfloat-3/source/8086-SSE/specialize.h | 375 - .../source/8086/extF80M_isSignalingNaN.c | 57 - .../source/8086/f128M_isSignalingNaN.c | 60 - .../source/8086/s_commonNaNToExtF80M.c | 56 - .../source/8086/s_commonNaNToExtF80UI.c | 56 - .../source/8086/s_commonNaNToF128M.c | 56 - .../source/8086/s_commonNaNToF128UI.c | 55 - .../source/8086/s_commonNaNToF16UI.c | 51 - .../source/8086/s_commonNaNToF32UI.c | 51 - .../source/8086/s_commonNaNToF64UI.c | 53 - .../source/8086/s_extF80MToCommonNaN.c | 62 - .../source/8086/s_extF80UIToCommonNaN.c | 62 - .../source/8086/s_f128MToCommonNaN.c | 62 - .../source/8086/s_f128UIToCommonNaN.c | 65 - .../source/8086/s_f16UIToCommonNaN.c | 59 - .../source/8086/s_f32UIToCommonNaN.c | 59 - .../source/8086/s_f64UIToCommonNaN.c | 59 - .../source/8086/s_propagateNaNExtF80M.c | 107 - .../source/8086/s_propagateNaNExtF80UI.c | 106 - .../source/8086/s_propagateNaNF128M.c | 108 - .../source/8086/s_propagateNaNF128UI.c | 105 - .../source/8086/s_propagateNaNF16UI.c | 84 - .../source/8086/s_propagateNaNF32UI.c | 84 - .../source/8086/s_propagateNaNF64UI.c | 84 - .../source/8086/softfloat_raiseFlags.c | 52 - outside/softfloat-3/source/8086/specialize.h | 375 - outside/softfloat-3/source/extF80M_add.c | 100 - outside/softfloat-3/source/extF80M_div.c | 194 - outside/softfloat-3/source/extF80M_eq.c | 98 - .../softfloat-3/source/extF80M_eq_signaling.c | 92 - outside/softfloat-3/source/extF80M_le.c | 106 - outside/softfloat-3/source/extF80M_le_quiet.c | 112 - outside/softfloat-3/source/extF80M_lt.c | 106 - outside/softfloat-3/source/extF80M_lt_quiet.c | 112 - outside/softfloat-3/source/extF80M_mul.c | 139 - outside/softfloat-3/source/extF80M_rem.c | 204 - .../softfloat-3/source/extF80M_roundToInt.c | 169 - outside/softfloat-3/source/extF80M_sqrt.c | 176 - outside/softfloat-3/source/extF80M_sub.c | 100 - outside/softfloat-3/source/extF80M_to_f128M.c | 125 - outside/softfloat-3/source/extF80M_to_f16.c | 112 - outside/softfloat-3/source/extF80M_to_f32.c | 112 - outside/softfloat-3/source/extF80M_to_f64.c | 112 - outside/softfloat-3/source/extF80M_to_i32.c | 100 - .../source/extF80M_to_i32_r_minMag.c | 120 - outside/softfloat-3/source/extF80M_to_i64.c | 97 - .../source/extF80M_to_i64_r_minMag.c | 115 - outside/softfloat-3/source/extF80M_to_ui32.c | 101 - .../source/extF80M_to_ui32_r_minMag.c | 111 - outside/softfloat-3/source/extF80M_to_ui64.c | 97 - .../source/extF80M_to_ui64_r_minMag.c | 108 - outside/softfloat-3/source/extF80_add.c | 80 - outside/softfloat-3/source/extF80_div.c | 203 - outside/softfloat-3/source/extF80_eq.c | 73 - .../softfloat-3/source/extF80_eq_signaling.c | 67 - .../source/extF80_isSignalingNaN.c | 51 - outside/softfloat-3/source/extF80_le.c | 73 - outside/softfloat-3/source/extF80_le_quiet.c | 78 - outside/softfloat-3/source/extF80_lt.c | 73 - outside/softfloat-3/source/extF80_lt_quiet.c | 78 - outside/softfloat-3/source/extF80_mul.c | 158 - outside/softfloat-3/source/extF80_rem.c | 225 - .../softfloat-3/source/extF80_roundToInt.c | 147 - outside/softfloat-3/source/extF80_sqrt.c | 168 - outside/softfloat-3/source/extF80_sub.c | 80 - outside/softfloat-3/source/extF80_to_f128.c | 75 - outside/softfloat-3/source/extF80_to_f16.c | 96 - outside/softfloat-3/source/extF80_to_f32.c | 96 - outside/softfloat-3/source/extF80_to_f64.c | 96 - outside/softfloat-3/source/extF80_to_i32.c | 83 - .../source/extF80_to_i32_r_minMag.c | 97 - outside/softfloat-3/source/extF80_to_i64.c | 89 - .../source/extF80_to_i64_r_minMag.c | 94 - outside/softfloat-3/source/extF80_to_ui32.c | 83 - .../source/extF80_to_ui32_r_minMag.c | 88 - outside/softfloat-3/source/extF80_to_ui64.c | 84 - .../source/extF80_to_ui64_r_minMag.c | 88 - outside/softfloat-3/source/f128M_add.c | 97 - outside/softfloat-3/source/f128M_div.c | 187 - outside/softfloat-3/source/f128M_eq.c | 100 - .../softfloat-3/source/f128M_eq_signaling.c | 92 - outside/softfloat-3/source/f128M_le.c | 93 - outside/softfloat-3/source/f128M_le_quiet.c | 96 - outside/softfloat-3/source/f128M_lt.c | 93 - outside/softfloat-3/source/f128M_lt_quiet.c | 96 - outside/softfloat-3/source/f128M_mul.c | 158 - outside/softfloat-3/source/f128M_mulAdd.c | 92 - outside/softfloat-3/source/f128M_rem.c | 182 - outside/softfloat-3/source/f128M_roundToInt.c | 216 - outside/softfloat-3/source/f128M_sqrt.c | 216 - outside/softfloat-3/source/f128M_sub.c | 97 - outside/softfloat-3/source/f128M_to_extF80M.c | 101 - outside/softfloat-3/source/f128M_to_f16.c | 113 - outside/softfloat-3/source/f128M_to_f32.c | 109 - outside/softfloat-3/source/f128M_to_f64.c | 112 - outside/softfloat-3/source/f128M_to_i32.c | 98 - .../source/f128M_to_i32_r_minMag.c | 106 - outside/softfloat-3/source/f128M_to_i64.c | 102 - .../source/f128M_to_i64_r_minMag.c | 124 - outside/softfloat-3/source/f128M_to_ui32.c | 98 - .../source/f128M_to_ui32_r_minMag.c | 102 - outside/softfloat-3/source/f128M_to_ui64.c | 102 - .../source/f128M_to_ui64_r_minMag.c | 114 - outside/softfloat-3/source/f128_add.c | 78 - outside/softfloat-3/source/f128_div.c | 199 - outside/softfloat-3/source/f128_eq.c | 73 - .../softfloat-3/source/f128_eq_signaling.c | 67 - .../softfloat-3/source/f128_isSignalingNaN.c | 51 - outside/softfloat-3/source/f128_le.c | 72 - outside/softfloat-3/source/f128_le_quiet.c | 78 - outside/softfloat-3/source/f128_lt.c | 72 - outside/softfloat-3/source/f128_lt_quiet.c | 78 - outside/softfloat-3/source/f128_mul.c | 163 - outside/softfloat-3/source/f128_mulAdd.c | 63 - outside/softfloat-3/source/f128_rem.c | 190 - outside/softfloat-3/source/f128_roundToInt.c | 160 - outside/softfloat-3/source/f128_sqrt.c | 194 - outside/softfloat-3/source/f128_sub.c | 78 - outside/softfloat-3/source/f128_to_extF80.c | 109 - outside/softfloat-3/source/f128_to_f16.c | 95 - outside/softfloat-3/source/f128_to_f32.c | 95 - outside/softfloat-3/source/f128_to_f64.c | 100 - outside/softfloat-3/source/f128_to_i32.c | 85 - .../softfloat-3/source/f128_to_i32_r_minMag.c | 100 - outside/softfloat-3/source/f128_to_i64.c | 95 - .../softfloat-3/source/f128_to_i64_r_minMag.c | 113 - outside/softfloat-3/source/f128_to_ui32.c | 86 - .../source/f128_to_ui32_r_minMag.c | 89 - outside/softfloat-3/source/f128_to_ui64.c | 96 - .../source/f128_to_ui64_r_minMag.c | 105 - outside/softfloat-3/source/f16_add.c | 70 - outside/softfloat-3/source/f16_div.c | 186 - outside/softfloat-3/source/f16_eq.c | 66 - outside/softfloat-3/source/f16_eq_signaling.c | 61 - .../softfloat-3/source/f16_isSignalingNaN.c | 51 - outside/softfloat-3/source/f16_le.c | 66 - outside/softfloat-3/source/f16_le_quiet.c | 71 - outside/softfloat-3/source/f16_lt.c | 66 - outside/softfloat-3/source/f16_lt_quiet.c | 71 - outside/softfloat-3/source/f16_mul.c | 140 - outside/softfloat-3/source/f16_mulAdd.c | 60 - outside/softfloat-3/source/f16_rem.c | 171 - outside/softfloat-3/source/f16_roundToInt.c | 112 - outside/softfloat-3/source/f16_sqrt.c | 136 - outside/softfloat-3/source/f16_sub.c | 70 - outside/softfloat-3/source/f16_to_extF80.c | 101 - outside/softfloat-3/source/f16_to_extF80M.c | 111 - outside/softfloat-3/source/f16_to_f128.c | 96 - outside/softfloat-3/source/f16_to_f128M.c | 112 - outside/softfloat-3/source/f16_to_f32.c | 93 - outside/softfloat-3/source/f16_to_f64.c | 93 - outside/softfloat-3/source/f16_to_i32.c | 87 - .../softfloat-3/source/f16_to_i32_r_minMag.c | 88 - outside/softfloat-3/source/f16_to_i64.c | 87 - .../softfloat-3/source/f16_to_i64_r_minMag.c | 88 - outside/softfloat-3/source/f16_to_ui32.c | 84 - .../softfloat-3/source/f16_to_ui32_r_minMag.c | 87 - outside/softfloat-3/source/f16_to_ui64.c | 84 - .../softfloat-3/source/f16_to_ui64_r_minMag.c | 87 - outside/softfloat-3/source/f32_add.c | 70 - outside/softfloat-3/source/f32_div.c | 180 - outside/softfloat-3/source/f32_eq.c | 66 - outside/softfloat-3/source/f32_eq_signaling.c | 61 - .../softfloat-3/source/f32_isSignalingNaN.c | 51 - outside/softfloat-3/source/f32_le.c | 66 - outside/softfloat-3/source/f32_le_quiet.c | 71 - outside/softfloat-3/source/f32_lt.c | 66 - outside/softfloat-3/source/f32_lt_quiet.c | 71 - outside/softfloat-3/source/f32_mul.c | 137 - outside/softfloat-3/source/f32_mulAdd.c | 60 - outside/softfloat-3/source/f32_rem.c | 168 - outside/softfloat-3/source/f32_roundToInt.c | 112 - outside/softfloat-3/source/f32_sqrt.c | 121 - outside/softfloat-3/source/f32_sub.c | 70 - outside/softfloat-3/source/f32_to_extF80.c | 101 - outside/softfloat-3/source/f32_to_extF80M.c | 111 - outside/softfloat-3/source/f32_to_f128.c | 96 - outside/softfloat-3/source/f32_to_f128M.c | 115 - outside/softfloat-3/source/f32_to_f16.c | 88 - outside/softfloat-3/source/f32_to_f64.c | 93 - outside/softfloat-3/source/f32_to_i32.c | 84 - .../softfloat-3/source/f32_to_i32_r_minMag.c | 89 - outside/softfloat-3/source/f32_to_i64.c | 96 - .../softfloat-3/source/f32_to_i64_r_minMag.c | 94 - outside/softfloat-3/source/f32_to_ui32.c | 84 - .../softfloat-3/source/f32_to_ui32_r_minMag.c | 88 - outside/softfloat-3/source/f32_to_ui64.c | 96 - .../softfloat-3/source/f32_to_ui64_r_minMag.c | 90 - outside/softfloat-3/source/f64_add.c | 74 - outside/softfloat-3/source/f64_div.c | 172 - outside/softfloat-3/source/f64_eq.c | 66 - outside/softfloat-3/source/f64_eq_signaling.c | 61 - .../softfloat-3/source/f64_isSignalingNaN.c | 51 - outside/softfloat-3/source/f64_le.c | 67 - outside/softfloat-3/source/f64_le_quiet.c | 72 - outside/softfloat-3/source/f64_lt.c | 67 - outside/softfloat-3/source/f64_lt_quiet.c | 72 - outside/softfloat-3/source/f64_mul.c | 150 - outside/softfloat-3/source/f64_mulAdd.c | 60 - outside/softfloat-3/source/f64_rem.c | 189 - outside/softfloat-3/source/f64_roundToInt.c | 112 - outside/softfloat-3/source/f64_sqrt.c | 133 - outside/softfloat-3/source/f64_sub.c | 74 - outside/softfloat-3/source/f64_to_extF80.c | 101 - outside/softfloat-3/source/f64_to_extF80M.c | 111 - outside/softfloat-3/source/f64_to_f128.c | 98 - outside/softfloat-3/source/f64_to_f128M.c | 117 - outside/softfloat-3/source/f64_to_f16.c | 88 - outside/softfloat-3/source/f64_to_f32.c | 88 - outside/softfloat-3/source/f64_to_i32.c | 82 - .../softfloat-3/source/f64_to_i32_r_minMag.c | 96 - outside/softfloat-3/source/f64_to_i64.c | 103 - .../softfloat-3/source/f64_to_i64_r_minMag.c | 100 - outside/softfloat-3/source/f64_to_ui32.c | 82 - .../softfloat-3/source/f64_to_ui32_r_minMag.c | 88 - outside/softfloat-3/source/f64_to_ui64.c | 103 - .../softfloat-3/source/f64_to_ui64_r_minMag.c | 93 - outside/softfloat-3/source/i32_to_extF80.c | 65 - outside/softfloat-3/source/i32_to_extF80M.c | 78 - outside/softfloat-3/source/i32_to_f128.c | 64 - outside/softfloat-3/source/i32_to_f128M.c | 81 - outside/softfloat-3/source/i32_to_f16.c | 71 - outside/softfloat-3/source/i32_to_f32.c | 58 - outside/softfloat-3/source/i32_to_f64.c | 65 - outside/softfloat-3/source/i64_to_extF80.c | 65 - outside/softfloat-3/source/i64_to_extF80M.c | 78 - outside/softfloat-3/source/i64_to_f128.c | 72 - outside/softfloat-3/source/i64_to_f128M.c | 92 - outside/softfloat-3/source/i64_to_f16.c | 70 - outside/softfloat-3/source/i64_to_f32.c | 70 - outside/softfloat-3/source/i64_to_f64.c | 58 - .../softfloat-3/source/include/internals.h | 278 - .../source/include/primitiveTypes.h | 85 - .../softfloat-3/source/include/primitives.h | 1160 -- .../softfloat-3/source/include/softfloat.h | 372 - .../source/include/softfloat_types.h | 81 - outside/softfloat-3/source/s_add128.c | 55 - outside/softfloat-3/source/s_add256M.c | 65 - outside/softfloat-3/source/s_addCarryM.c | 70 - outside/softfloat-3/source/s_addComplCarryM.c | 70 - outside/softfloat-3/source/s_addExtF80M.c | 186 - outside/softfloat-3/source/s_addF128M.c | 211 - outside/softfloat-3/source/s_addM.c | 70 - outside/softfloat-3/source/s_addMagsExtF80.c | 156 - outside/softfloat-3/source/s_addMagsF128.c | 154 - outside/softfloat-3/source/s_addMagsF16.c | 183 - outside/softfloat-3/source/s_addMagsF32.c | 126 - outside/softfloat-3/source/s_addMagsF64.c | 128 - .../softfloat-3/source/s_approxRecip32_1.c | 66 - .../source/s_approxRecipSqrt32_1.c | 73 - .../source/s_approxRecipSqrt_1Ks.c | 49 - .../softfloat-3/source/s_approxRecip_1Ks.c | 49 - outside/softfloat-3/source/s_compare128M.c | 62 - outside/softfloat-3/source/s_compare96M.c | 62 - .../source/s_compareNonnormExtF80M.c | 111 - .../source/s_countLeadingZeros16.c | 60 - .../source/s_countLeadingZeros32.c | 64 - .../source/s_countLeadingZeros64.c | 73 - .../softfloat-3/source/s_countLeadingZeros8.c | 59 - outside/softfloat-3/source/s_eq128.c | 51 - outside/softfloat-3/source/s_invalidExtF80M.c | 49 - outside/softfloat-3/source/s_invalidF128M.c | 53 - outside/softfloat-3/source/s_isNaNF128M.c | 57 - outside/softfloat-3/source/s_le128.c | 51 - outside/softfloat-3/source/s_lt128.c | 51 - outside/softfloat-3/source/s_mul128By32.c | 58 - outside/softfloat-3/source/s_mul128MTo256M.c | 100 - outside/softfloat-3/source/s_mul128To256M.c | 71 - .../source/s_mul64ByShifted32To128.c | 56 - outside/softfloat-3/source/s_mul64To128.c | 66 - outside/softfloat-3/source/s_mul64To128M.c | 68 - outside/softfloat-3/source/s_mulAddF128.c | 350 - outside/softfloat-3/source/s_mulAddF128M.c | 382 - outside/softfloat-3/source/s_mulAddF16.c | 226 - outside/softfloat-3/source/s_mulAddF32.c | 224 - outside/softfloat-3/source/s_mulAddF64.c | 496 - outside/softfloat-3/source/s_negXM.c | 63 - outside/softfloat-3/source/s_normExtF80SigM.c | 52 - .../source/s_normRoundPackMToExtF80M.c | 78 - .../source/s_normRoundPackMToF128M.c | 73 - .../source/s_normRoundPackToExtF80.c | 71 - .../source/s_normRoundPackToF128.c | 81 - .../softfloat-3/source/s_normRoundPackToF16.c | 58 - .../softfloat-3/source/s_normRoundPackToF32.c | 58 - .../softfloat-3/source/s_normRoundPackToF64.c | 58 - .../source/s_normSubnormalExtF80Sig.c | 52 - .../source/s_normSubnormalF128Sig.c | 65 - .../source/s_normSubnormalF128SigM.c | 61 - .../source/s_normSubnormalF16Sig.c | 52 - .../source/s_normSubnormalF32Sig.c | 52 - .../source/s_normSubnormalF64Sig.c | 52 - outside/softfloat-3/source/s_remStepMBy32.c | 86 - outside/softfloat-3/source/s_roundMToI64.c | 88 - outside/softfloat-3/source/s_roundMToUI64.c | 84 - .../source/s_roundPackMToExtF80M.c | 256 - .../softfloat-3/source/s_roundPackMToF128M.c | 178 - .../softfloat-3/source/s_roundPackToExtF80.c | 256 - .../softfloat-3/source/s_roundPackToF128.c | 171 - outside/softfloat-3/source/s_roundPackToF16.c | 113 - outside/softfloat-3/source/s_roundPackToF32.c | 113 - outside/softfloat-3/source/s_roundPackToF64.c | 117 - outside/softfloat-3/source/s_roundToI32.c | 84 - outside/softfloat-3/source/s_roundToI64.c | 89 - outside/softfloat-3/source/s_roundToUI32.c | 80 - outside/softfloat-3/source/s_roundToUI64.c | 85 - outside/softfloat-3/source/s_shiftLeftM.c | 91 - .../softfloat-3/source/s_shiftNormSigF128M.c | 78 - .../softfloat-3/source/s_shiftRightJam128.c | 69 - .../source/s_shiftRightJam128Extra.c | 77 - .../softfloat-3/source/s_shiftRightJam256M.c | 126 - .../softfloat-3/source/s_shiftRightJam32.c | 51 - .../softfloat-3/source/s_shiftRightJam64.c | 51 - .../source/s_shiftRightJam64Extra.c | 62 - outside/softfloat-3/source/s_shiftRightJamM.c | 101 - outside/softfloat-3/source/s_shiftRightM.c | 91 - .../softfloat-3/source/s_shortShiftLeft128.c | 55 - .../source/s_shortShiftLeft64To96M.c | 56 - .../softfloat-3/source/s_shortShiftLeftM.c | 70 - .../softfloat-3/source/s_shortShiftRight128.c | 55 - .../source/s_shortShiftRightExtendM.c | 73 - .../source/s_shortShiftRightJam128.c | 60 - .../source/s_shortShiftRightJam128Extra.c | 59 - .../source/s_shortShiftRightJam64.c | 50 - .../source/s_shortShiftRightJam64Extra.c | 56 - .../source/s_shortShiftRightJamM.c | 72 - .../softfloat-3/source/s_shortShiftRightM.c | 70 - outside/softfloat-3/source/s_sub128.c | 55 - outside/softfloat-3/source/s_sub1XM.c | 60 - outside/softfloat-3/source/s_sub256M.c | 65 - outside/softfloat-3/source/s_subM.c | 70 - outside/softfloat-3/source/s_subMagsExtF80.c | 158 - outside/softfloat-3/source/s_subMagsF128.c | 139 - outside/softfloat-3/source/s_subMagsF16.c | 187 - outside/softfloat-3/source/s_subMagsF32.c | 143 - outside/softfloat-3/source/s_subMagsF64.c | 141 - .../source/s_tryPropagateNaNExtF80M.c | 64 - .../source/s_tryPropagateNaNF128M.c | 55 - outside/softfloat-3/source/softfloat_state.c | 52 - outside/softfloat-3/source/ui32_to_extF80.c | 59 - outside/softfloat-3/source/ui32_to_extF80M.c | 74 - outside/softfloat-3/source/ui32_to_f128.c | 60 - outside/softfloat-3/source/ui32_to_f128M.c | 76 - outside/softfloat-3/source/ui32_to_f16.c | 65 - outside/softfloat-3/source/ui32_to_f32.c | 57 - outside/softfloat-3/source/ui32_to_f64.c | 59 - outside/softfloat-3/source/ui64_to_extF80.c | 59 - outside/softfloat-3/source/ui64_to_extF80M.c | 74 - outside/softfloat-3/source/ui64_to_f128.c | 68 - outside/softfloat-3/source/ui64_to_f128M.c | 86 - outside/softfloat-3/source/ui64_to_f16.c | 64 - outside/softfloat-3/source/ui64_to_f32.c | 64 - outside/softfloat-3/source/ui64_to_f64.c | 59 - 863 files changed, 189537 deletions(-) delete mode 100644 outside/anachronism/.gitignore delete mode 100644 outside/anachronism/LICENSE delete mode 100644 outside/anachronism/Makefile delete mode 100644 outside/anachronism/README.md delete mode 100644 outside/anachronism/doc/channels.md delete mode 100644 outside/anachronism/doc/parser.png delete mode 100644 outside/anachronism/include/anachronism/common.h delete mode 100644 outside/anachronism/include/anachronism/nvt.h delete mode 100644 outside/anachronism/include/anachronism/parser.h delete mode 100644 outside/anachronism/src/README.md delete mode 100644 outside/anachronism/src/nvt.c delete mode 100644 outside/anachronism/src/parser.c delete mode 100644 outside/anachronism/src/parser.rl delete mode 100644 outside/anachronism/src/parser_common.rl delete mode 100644 outside/commonmark/.editorconfig delete mode 100644 outside/commonmark/.gitignore delete mode 100644 outside/commonmark/.travis.yml delete mode 100644 outside/commonmark/CMakeLists.txt delete mode 100644 outside/commonmark/LICENSE delete mode 100644 outside/commonmark/Makefile delete mode 100644 outside/commonmark/Makefile.nmake delete mode 100644 outside/commonmark/Makefile.old delete mode 100644 outside/commonmark/README.md delete mode 100644 outside/commonmark/alternative-html-blocks.txt delete mode 100644 outside/commonmark/api_test/CMakeLists.txt delete mode 100644 outside/commonmark/api_test/cplusplus.cpp delete mode 100644 outside/commonmark/api_test/harness.c delete mode 100644 outside/commonmark/api_test/harness.h delete mode 100644 outside/commonmark/api_test/main.c delete mode 100644 outside/commonmark/bench/statistics.py delete mode 100644 outside/commonmark/bench/stats.py delete mode 100644 outside/commonmark/benchmarks.md delete mode 100644 outside/commonmark/changelog.spec delete mode 100644 outside/commonmark/data/CaseFolding-3.2.0.txt delete mode 100644 outside/commonmark/dingus.html delete mode 100644 outside/commonmark/js/.npmignore delete mode 100644 outside/commonmark/js/LICENSE delete mode 100644 outside/commonmark/js/README.md delete mode 100644 outside/commonmark/js/ansi/ansi.js delete mode 100644 outside/commonmark/js/ansi/newlines.js delete mode 100644 outside/commonmark/js/bench.js delete mode 100755 outside/commonmark/js/bin/commonmark delete mode 100644 outside/commonmark/js/index.html delete mode 100644 outside/commonmark/js/lib/blocks.js delete mode 100644 outside/commonmark/js/lib/from-code-point.js delete mode 100644 outside/commonmark/js/lib/html-renderer.js delete mode 100644 outside/commonmark/js/lib/html5-entities.js delete mode 100755 outside/commonmark/js/lib/index.js delete mode 100644 outside/commonmark/js/lib/inlines.js delete mode 100644 outside/commonmark/js/package.json delete mode 100755 outside/commonmark/js/test.js delete mode 100644 outside/commonmark/man/CMakeLists.txt delete mode 100644 outside/commonmark/man/make_man_page.py delete mode 100644 outside/commonmark/man/man1/cmark.1 delete mode 100644 outside/commonmark/man/man3/cmark.3 delete mode 100644 outside/commonmark/mkcasefold.pl delete mode 100644 outside/commonmark/nmake.bat delete mode 100644 outside/commonmark/spec.txt delete mode 100755 outside/commonmark/spec2js.js delete mode 100644 outside/commonmark/spec2md.pl delete mode 100755 outside/commonmark/specfilter.hs delete mode 100644 outside/commonmark/src/CMakeLists.txt delete mode 100644 outside/commonmark/src/bench.h delete mode 100644 outside/commonmark/src/blocks.c delete mode 100644 outside/commonmark/src/buffer.c delete mode 100644 outside/commonmark/src/buffer.h delete mode 100644 outside/commonmark/src/case_fold_switch.inc delete mode 100644 outside/commonmark/src/chunk.h delete mode 100644 outside/commonmark/src/cmark.c delete mode 100644 outside/commonmark/src/cmark.h delete mode 100644 outside/commonmark/src/config.h.in delete mode 100644 outside/commonmark/src/debug.h delete mode 100644 outside/commonmark/src/html/houdini.h delete mode 100644 outside/commonmark/src/html/houdini_href_e.c delete mode 100644 outside/commonmark/src/html/houdini_html_e.c delete mode 100644 outside/commonmark/src/html/houdini_html_u.c delete mode 100644 outside/commonmark/src/html/html.c delete mode 100644 outside/commonmark/src/html/html_unescape.gperf delete mode 100644 outside/commonmark/src/html/html_unescape.h delete mode 100644 outside/commonmark/src/inlines.c delete mode 100644 outside/commonmark/src/inlines.h delete mode 100644 outside/commonmark/src/main.c delete mode 100644 outside/commonmark/src/node.c delete mode 100644 outside/commonmark/src/node.h delete mode 100644 outside/commonmark/src/parser.h delete mode 100644 outside/commonmark/src/print.c delete mode 100644 outside/commonmark/src/references.c delete mode 100644 outside/commonmark/src/references.h delete mode 100644 outside/commonmark/src/scanners.c delete mode 100644 outside/commonmark/src/scanners.h delete mode 100644 outside/commonmark/src/scanners.re delete mode 100644 outside/commonmark/src/utf8.c delete mode 100644 outside/commonmark/src/utf8.h delete mode 100644 outside/commonmark/template.html delete mode 100644 outside/commonmark/template.tex delete mode 100644 outside/commonmark/test/CMakeLists.txt delete mode 100644 outside/commonmark/test/cmark.py delete mode 100644 outside/commonmark/test/normalize.py delete mode 100644 outside/commonmark/test/pathological_tests.py delete mode 100755 outside/commonmark/test/spec_tests.py delete mode 100644 outside/commonmark/toolchain-mingw32.cmake delete mode 100755 outside/commonmark/wrapper.lua delete mode 100755 outside/commonmark/wrapper.py delete mode 100755 outside/commonmark/wrapper.rb delete mode 100644 outside/ed25519/.gitignore delete mode 100644 outside/ed25519/Makefile delete mode 100644 outside/ed25519/readme.md delete mode 100644 outside/ed25519/src/add_scalar.c delete mode 100644 outside/ed25519/src/ed25519.h delete mode 100644 outside/ed25519/src/fe.c delete mode 100644 outside/ed25519/src/fe.h delete mode 100644 outside/ed25519/src/fixedint.h delete mode 100644 outside/ed25519/src/ge.c delete mode 100644 outside/ed25519/src/ge.h delete mode 100644 outside/ed25519/src/key_exchange.c delete mode 100644 outside/ed25519/src/keypair.c delete mode 100644 outside/ed25519/src/precomp_data.h delete mode 100644 outside/ed25519/src/sc.c delete mode 100644 outside/ed25519/src/sc.h delete mode 100644 outside/ed25519/src/seed.c delete mode 100644 outside/ed25519/src/sha512.c delete mode 100644 outside/ed25519/src/sha512.h delete mode 100644 outside/ed25519/src/sign.c delete mode 100644 outside/ed25519/src/verify.c delete mode 100644 outside/ed25519/test.c delete mode 100755 outside/jhttp/http_parser.c delete mode 100755 outside/jhttp/http_parser.h delete mode 100644 outside/libuv-v1.7.5/.gitignore delete mode 100644 outside/libuv-v1.7.5/.mailmap delete mode 100644 outside/libuv-v1.7.5/AUTHORS delete mode 100644 outside/libuv-v1.7.5/CONTRIBUTING.md delete mode 100644 outside/libuv-v1.7.5/ChangeLog delete mode 100644 outside/libuv-v1.7.5/LICENSE delete mode 100644 outside/libuv-v1.7.5/MAINTAINERS.md delete mode 100644 outside/libuv-v1.7.5/Makefile.am delete mode 100644 outside/libuv-v1.7.5/Makefile.mingw delete mode 100644 outside/libuv-v1.7.5/README.md delete mode 100755 outside/libuv-v1.7.5/android-configure delete mode 100644 outside/libuv-v1.7.5/appveyor.yml delete mode 100755 outside/libuv-v1.7.5/autogen.sh delete mode 100755 outside/libuv-v1.7.5/checksparse.sh delete mode 100644 outside/libuv-v1.7.5/common.gypi delete mode 100644 outside/libuv-v1.7.5/configure.ac delete mode 100644 outside/libuv-v1.7.5/docs/Makefile delete mode 100644 outside/libuv-v1.7.5/docs/make.bat delete mode 100644 outside/libuv-v1.7.5/docs/src/async.rst delete mode 100644 outside/libuv-v1.7.5/docs/src/check.rst delete mode 100644 outside/libuv-v1.7.5/docs/src/conf.py delete mode 100644 outside/libuv-v1.7.5/docs/src/design.rst delete mode 100644 outside/libuv-v1.7.5/docs/src/dll.rst delete mode 100644 outside/libuv-v1.7.5/docs/src/dns.rst delete mode 100644 outside/libuv-v1.7.5/docs/src/errors.rst delete mode 100644 outside/libuv-v1.7.5/docs/src/fs.rst delete mode 100644 outside/libuv-v1.7.5/docs/src/fs_event.rst delete mode 100644 outside/libuv-v1.7.5/docs/src/fs_poll.rst delete mode 100644 outside/libuv-v1.7.5/docs/src/handle.rst delete mode 100644 outside/libuv-v1.7.5/docs/src/idle.rst delete mode 100644 outside/libuv-v1.7.5/docs/src/index.rst delete mode 100644 outside/libuv-v1.7.5/docs/src/loop.rst delete mode 100644 outside/libuv-v1.7.5/docs/src/migration_010_100.rst delete mode 100644 outside/libuv-v1.7.5/docs/src/misc.rst delete mode 100644 outside/libuv-v1.7.5/docs/src/pipe.rst delete mode 100644 outside/libuv-v1.7.5/docs/src/poll.rst delete mode 100644 outside/libuv-v1.7.5/docs/src/prepare.rst delete mode 100644 outside/libuv-v1.7.5/docs/src/process.rst delete mode 100644 outside/libuv-v1.7.5/docs/src/request.rst delete mode 100644 outside/libuv-v1.7.5/docs/src/signal.rst delete mode 100644 outside/libuv-v1.7.5/docs/src/sphinx-plugins/manpage.py delete mode 100644 outside/libuv-v1.7.5/docs/src/static/architecture.png delete mode 100644 outside/libuv-v1.7.5/docs/src/static/diagrams.key/Data/st0-311.jpg delete mode 100644 outside/libuv-v1.7.5/docs/src/static/diagrams.key/Data/st1-475.jpg delete mode 100644 outside/libuv-v1.7.5/docs/src/static/diagrams.key/Index.zip delete mode 100644 outside/libuv-v1.7.5/docs/src/static/diagrams.key/Metadata/BuildVersionHistory.plist delete mode 100644 outside/libuv-v1.7.5/docs/src/static/diagrams.key/Metadata/DocumentIdentifier delete mode 100644 outside/libuv-v1.7.5/docs/src/static/diagrams.key/Metadata/Properties.plist delete mode 100644 outside/libuv-v1.7.5/docs/src/static/diagrams.key/preview-micro.jpg delete mode 100644 outside/libuv-v1.7.5/docs/src/static/diagrams.key/preview-web.jpg delete mode 100644 outside/libuv-v1.7.5/docs/src/static/diagrams.key/preview.jpg delete mode 100644 outside/libuv-v1.7.5/docs/src/static/favicon.ico delete mode 100644 outside/libuv-v1.7.5/docs/src/static/logo.png delete mode 100644 outside/libuv-v1.7.5/docs/src/static/loop_iteration.png delete mode 100644 outside/libuv-v1.7.5/docs/src/stream.rst delete mode 100644 outside/libuv-v1.7.5/docs/src/tcp.rst delete mode 100644 outside/libuv-v1.7.5/docs/src/threading.rst delete mode 100644 outside/libuv-v1.7.5/docs/src/threadpool.rst delete mode 100644 outside/libuv-v1.7.5/docs/src/timer.rst delete mode 100644 outside/libuv-v1.7.5/docs/src/tty.rst delete mode 100644 outside/libuv-v1.7.5/docs/src/udp.rst delete mode 100644 outside/libuv-v1.7.5/docs/src/version.rst delete mode 100755 outside/libuv-v1.7.5/gyp_uv.py delete mode 100644 outside/libuv-v1.7.5/img/banner.png delete mode 100644 outside/libuv-v1.7.5/img/logos.svg delete mode 100644 outside/libuv-v1.7.5/include/android-ifaddrs.h delete mode 100644 outside/libuv-v1.7.5/include/pthread-fixes.h delete mode 100644 outside/libuv-v1.7.5/include/stdint-msvc2008.h delete mode 100644 outside/libuv-v1.7.5/include/tree.h delete mode 100644 outside/libuv-v1.7.5/include/uv-aix.h delete mode 100644 outside/libuv-v1.7.5/include/uv-bsd.h delete mode 100644 outside/libuv-v1.7.5/include/uv-darwin.h delete mode 100644 outside/libuv-v1.7.5/include/uv-errno.h delete mode 100644 outside/libuv-v1.7.5/include/uv-linux.h delete mode 100644 outside/libuv-v1.7.5/include/uv-sunos.h delete mode 100644 outside/libuv-v1.7.5/include/uv-threadpool.h delete mode 100644 outside/libuv-v1.7.5/include/uv-unix.h delete mode 100644 outside/libuv-v1.7.5/include/uv-version.h delete mode 100644 outside/libuv-v1.7.5/include/uv-win.h delete mode 100644 outside/libuv-v1.7.5/include/uv.h delete mode 100644 outside/libuv-v1.7.5/libuv.nsi delete mode 100644 outside/libuv-v1.7.5/libuv.pc.in delete mode 100644 outside/libuv-v1.7.5/m4/.gitignore delete mode 100644 outside/libuv-v1.7.5/m4/as_case.m4 delete mode 100644 outside/libuv-v1.7.5/m4/libuv-check-flags.m4 delete mode 100644 outside/libuv-v1.7.5/samples/.gitignore delete mode 100644 outside/libuv-v1.7.5/samples/socks5-proxy/.gitignore delete mode 100644 outside/libuv-v1.7.5/samples/socks5-proxy/LICENSE delete mode 100644 outside/libuv-v1.7.5/samples/socks5-proxy/Makefile delete mode 100644 outside/libuv-v1.7.5/samples/socks5-proxy/build.gyp delete mode 100644 outside/libuv-v1.7.5/samples/socks5-proxy/client.c delete mode 100644 outside/libuv-v1.7.5/samples/socks5-proxy/defs.h delete mode 100644 outside/libuv-v1.7.5/samples/socks5-proxy/getopt.c delete mode 100644 outside/libuv-v1.7.5/samples/socks5-proxy/main.c delete mode 100644 outside/libuv-v1.7.5/samples/socks5-proxy/s5.c delete mode 100644 outside/libuv-v1.7.5/samples/socks5-proxy/s5.h delete mode 100644 outside/libuv-v1.7.5/samples/socks5-proxy/server.c delete mode 100644 outside/libuv-v1.7.5/samples/socks5-proxy/util.c delete mode 100644 outside/libuv-v1.7.5/src/fs-poll.c delete mode 100644 outside/libuv-v1.7.5/src/heap-inl.h delete mode 100644 outside/libuv-v1.7.5/src/inet.c delete mode 100644 outside/libuv-v1.7.5/src/queue.h delete mode 100644 outside/libuv-v1.7.5/src/threadpool.c delete mode 100644 outside/libuv-v1.7.5/src/unix/aix.c delete mode 100644 outside/libuv-v1.7.5/src/unix/android-ifaddrs.c delete mode 100644 outside/libuv-v1.7.5/src/unix/async.c delete mode 100644 outside/libuv-v1.7.5/src/unix/atomic-ops.h delete mode 100644 outside/libuv-v1.7.5/src/unix/core.c delete mode 100644 outside/libuv-v1.7.5/src/unix/darwin-proctitle.c delete mode 100644 outside/libuv-v1.7.5/src/unix/darwin.c delete mode 100644 outside/libuv-v1.7.5/src/unix/dl.c delete mode 100644 outside/libuv-v1.7.5/src/unix/freebsd.c delete mode 100644 outside/libuv-v1.7.5/src/unix/fs.c delete mode 100644 outside/libuv-v1.7.5/src/unix/fsevents.c delete mode 100644 outside/libuv-v1.7.5/src/unix/getaddrinfo.c delete mode 100644 outside/libuv-v1.7.5/src/unix/getnameinfo.c delete mode 100644 outside/libuv-v1.7.5/src/unix/internal.h delete mode 100644 outside/libuv-v1.7.5/src/unix/kqueue.c delete mode 100644 outside/libuv-v1.7.5/src/unix/linux-core.c delete mode 100644 outside/libuv-v1.7.5/src/unix/linux-inotify.c delete mode 100644 outside/libuv-v1.7.5/src/unix/linux-syscalls.c delete mode 100644 outside/libuv-v1.7.5/src/unix/linux-syscalls.h delete mode 100644 outside/libuv-v1.7.5/src/unix/loop-watcher.c delete mode 100644 outside/libuv-v1.7.5/src/unix/loop.c delete mode 100644 outside/libuv-v1.7.5/src/unix/netbsd.c delete mode 100644 outside/libuv-v1.7.5/src/unix/openbsd.c delete mode 100644 outside/libuv-v1.7.5/src/unix/pipe.c delete mode 100644 outside/libuv-v1.7.5/src/unix/poll.c delete mode 100644 outside/libuv-v1.7.5/src/unix/process.c delete mode 100644 outside/libuv-v1.7.5/src/unix/proctitle.c delete mode 100644 outside/libuv-v1.7.5/src/unix/pthread-fixes.c delete mode 100644 outside/libuv-v1.7.5/src/unix/signal.c delete mode 100644 outside/libuv-v1.7.5/src/unix/spinlock.h delete mode 100644 outside/libuv-v1.7.5/src/unix/stream.c delete mode 100644 outside/libuv-v1.7.5/src/unix/sunos.c delete mode 100644 outside/libuv-v1.7.5/src/unix/tcp.c delete mode 100644 outside/libuv-v1.7.5/src/unix/thread.c delete mode 100644 outside/libuv-v1.7.5/src/unix/timer.c delete mode 100644 outside/libuv-v1.7.5/src/unix/tty.c delete mode 100644 outside/libuv-v1.7.5/src/unix/udp.c delete mode 100644 outside/libuv-v1.7.5/src/uv-common.c delete mode 100644 outside/libuv-v1.7.5/src/uv-common.h delete mode 100644 outside/libuv-v1.7.5/src/version.c delete mode 100644 outside/libuv-v1.7.5/src/win/async.c delete mode 100644 outside/libuv-v1.7.5/src/win/atomicops-inl.h delete mode 100644 outside/libuv-v1.7.5/src/win/core.c delete mode 100644 outside/libuv-v1.7.5/src/win/dl.c delete mode 100644 outside/libuv-v1.7.5/src/win/error.c delete mode 100644 outside/libuv-v1.7.5/src/win/fs-event.c delete mode 100644 outside/libuv-v1.7.5/src/win/fs.c delete mode 100644 outside/libuv-v1.7.5/src/win/getaddrinfo.c delete mode 100644 outside/libuv-v1.7.5/src/win/getnameinfo.c delete mode 100644 outside/libuv-v1.7.5/src/win/handle-inl.h delete mode 100644 outside/libuv-v1.7.5/src/win/handle.c delete mode 100644 outside/libuv-v1.7.5/src/win/internal.h delete mode 100644 outside/libuv-v1.7.5/src/win/loop-watcher.c delete mode 100644 outside/libuv-v1.7.5/src/win/pipe.c delete mode 100644 outside/libuv-v1.7.5/src/win/poll.c delete mode 100644 outside/libuv-v1.7.5/src/win/process-stdio.c delete mode 100644 outside/libuv-v1.7.5/src/win/process.c delete mode 100644 outside/libuv-v1.7.5/src/win/req-inl.h delete mode 100644 outside/libuv-v1.7.5/src/win/req.c delete mode 100644 outside/libuv-v1.7.5/src/win/signal.c delete mode 100644 outside/libuv-v1.7.5/src/win/stream-inl.h delete mode 100644 outside/libuv-v1.7.5/src/win/stream.c delete mode 100644 outside/libuv-v1.7.5/src/win/tcp.c delete mode 100644 outside/libuv-v1.7.5/src/win/thread.c delete mode 100644 outside/libuv-v1.7.5/src/win/timer.c delete mode 100644 outside/libuv-v1.7.5/src/win/tty.c delete mode 100644 outside/libuv-v1.7.5/src/win/udp.c delete mode 100644 outside/libuv-v1.7.5/src/win/util.c delete mode 100644 outside/libuv-v1.7.5/src/win/winapi.c delete mode 100644 outside/libuv-v1.7.5/src/win/winapi.h delete mode 100644 outside/libuv-v1.7.5/src/win/winsock.c delete mode 100644 outside/libuv-v1.7.5/src/win/winsock.h delete mode 100644 outside/libuv-v1.7.5/test/benchmark-async-pummel.c delete mode 100644 outside/libuv-v1.7.5/test/benchmark-async.c delete mode 100644 outside/libuv-v1.7.5/test/benchmark-fs-stat.c delete mode 100644 outside/libuv-v1.7.5/test/benchmark-getaddrinfo.c delete mode 100644 outside/libuv-v1.7.5/test/benchmark-list.h delete mode 100644 outside/libuv-v1.7.5/test/benchmark-loop-count.c delete mode 100644 outside/libuv-v1.7.5/test/benchmark-million-async.c delete mode 100644 outside/libuv-v1.7.5/test/benchmark-million-timers.c delete mode 100644 outside/libuv-v1.7.5/test/benchmark-multi-accept.c delete mode 100644 outside/libuv-v1.7.5/test/benchmark-ping-pongs.c delete mode 100644 outside/libuv-v1.7.5/test/benchmark-pound.c delete mode 100644 outside/libuv-v1.7.5/test/benchmark-pump.c delete mode 100644 outside/libuv-v1.7.5/test/benchmark-sizes.c delete mode 100644 outside/libuv-v1.7.5/test/benchmark-spawn.c delete mode 100644 outside/libuv-v1.7.5/test/benchmark-tcp-write-batch.c delete mode 100644 outside/libuv-v1.7.5/test/benchmark-thread.c delete mode 100644 outside/libuv-v1.7.5/test/benchmark-udp-pummel.c delete mode 100644 outside/libuv-v1.7.5/test/blackhole-server.c delete mode 100644 outside/libuv-v1.7.5/test/dns-server.c delete mode 100644 outside/libuv-v1.7.5/test/echo-server.c delete mode 100644 outside/libuv-v1.7.5/test/fixtures/empty_file delete mode 100644 outside/libuv-v1.7.5/test/fixtures/load_error.node delete mode 100644 outside/libuv-v1.7.5/test/run-benchmarks.c delete mode 100644 outside/libuv-v1.7.5/test/run-tests.c delete mode 100644 outside/libuv-v1.7.5/test/runner-unix.c delete mode 100644 outside/libuv-v1.7.5/test/runner-unix.h delete mode 100644 outside/libuv-v1.7.5/test/runner-win.c delete mode 100644 outside/libuv-v1.7.5/test/runner-win.h delete mode 100644 outside/libuv-v1.7.5/test/runner.c delete mode 100644 outside/libuv-v1.7.5/test/runner.h delete mode 100644 outside/libuv-v1.7.5/test/task.h delete mode 100644 outside/libuv-v1.7.5/test/test-active.c delete mode 100644 outside/libuv-v1.7.5/test/test-async-null-cb.c delete mode 100644 outside/libuv-v1.7.5/test/test-async.c delete mode 100644 outside/libuv-v1.7.5/test/test-barrier.c delete mode 100644 outside/libuv-v1.7.5/test/test-callback-order.c delete mode 100644 outside/libuv-v1.7.5/test/test-callback-stack.c delete mode 100644 outside/libuv-v1.7.5/test/test-close-fd.c delete mode 100644 outside/libuv-v1.7.5/test/test-close-order.c delete mode 100644 outside/libuv-v1.7.5/test/test-condvar.c delete mode 100644 outside/libuv-v1.7.5/test/test-connection-fail.c delete mode 100644 outside/libuv-v1.7.5/test/test-cwd-and-chdir.c delete mode 100644 outside/libuv-v1.7.5/test/test-default-loop-close.c delete mode 100644 outside/libuv-v1.7.5/test/test-delayed-accept.c delete mode 100644 outside/libuv-v1.7.5/test/test-dlerror.c delete mode 100644 outside/libuv-v1.7.5/test/test-embed.c delete mode 100644 outside/libuv-v1.7.5/test/test-emfile.c delete mode 100644 outside/libuv-v1.7.5/test/test-error.c delete mode 100644 outside/libuv-v1.7.5/test/test-fail-always.c delete mode 100644 outside/libuv-v1.7.5/test/test-fs-event.c delete mode 100644 outside/libuv-v1.7.5/test/test-fs-poll.c delete mode 100644 outside/libuv-v1.7.5/test/test-fs.c delete mode 100644 outside/libuv-v1.7.5/test/test-get-currentexe.c delete mode 100644 outside/libuv-v1.7.5/test/test-get-loadavg.c delete mode 100644 outside/libuv-v1.7.5/test/test-get-memory.c delete mode 100644 outside/libuv-v1.7.5/test/test-getaddrinfo.c delete mode 100644 outside/libuv-v1.7.5/test/test-getnameinfo.c delete mode 100644 outside/libuv-v1.7.5/test/test-getsockname.c delete mode 100644 outside/libuv-v1.7.5/test/test-handle-fileno.c delete mode 100644 outside/libuv-v1.7.5/test/test-homedir.c delete mode 100644 outside/libuv-v1.7.5/test/test-hrtime.c delete mode 100644 outside/libuv-v1.7.5/test/test-idle.c delete mode 100644 outside/libuv-v1.7.5/test/test-ip4-addr.c delete mode 100644 outside/libuv-v1.7.5/test/test-ip6-addr.c delete mode 100644 outside/libuv-v1.7.5/test/test-ipc-send-recv.c delete mode 100644 outside/libuv-v1.7.5/test/test-ipc.c delete mode 100644 outside/libuv-v1.7.5/test/test-list.h delete mode 100644 outside/libuv-v1.7.5/test/test-loop-alive.c delete mode 100644 outside/libuv-v1.7.5/test/test-loop-close.c delete mode 100644 outside/libuv-v1.7.5/test/test-loop-configure.c delete mode 100644 outside/libuv-v1.7.5/test/test-loop-handles.c delete mode 100644 outside/libuv-v1.7.5/test/test-loop-stop.c delete mode 100644 outside/libuv-v1.7.5/test/test-loop-time.c delete mode 100644 outside/libuv-v1.7.5/test/test-multiple-listen.c delete mode 100644 outside/libuv-v1.7.5/test/test-mutexes.c delete mode 100644 outside/libuv-v1.7.5/test/test-osx-select.c delete mode 100644 outside/libuv-v1.7.5/test/test-pass-always.c delete mode 100644 outside/libuv-v1.7.5/test/test-ping-pong.c delete mode 100644 outside/libuv-v1.7.5/test/test-pipe-bind-error.c delete mode 100644 outside/libuv-v1.7.5/test/test-pipe-close-stdout-read-stdin.c delete mode 100644 outside/libuv-v1.7.5/test/test-pipe-connect-error.c delete mode 100644 outside/libuv-v1.7.5/test/test-pipe-connect-multiple.c delete mode 100644 outside/libuv-v1.7.5/test/test-pipe-connect-prepare.c delete mode 100644 outside/libuv-v1.7.5/test/test-pipe-getsockname.c delete mode 100644 outside/libuv-v1.7.5/test/test-pipe-pending-instances.c delete mode 100644 outside/libuv-v1.7.5/test/test-pipe-sendmsg.c delete mode 100644 outside/libuv-v1.7.5/test/test-pipe-server-close.c delete mode 100644 outside/libuv-v1.7.5/test/test-pipe-set-non-blocking.c delete mode 100644 outside/libuv-v1.7.5/test/test-platform-output.c delete mode 100644 outside/libuv-v1.7.5/test/test-poll-close-doesnt-corrupt-stack.c delete mode 100644 outside/libuv-v1.7.5/test/test-poll-close.c delete mode 100644 outside/libuv-v1.7.5/test/test-poll-closesocket.c delete mode 100644 outside/libuv-v1.7.5/test/test-poll.c delete mode 100644 outside/libuv-v1.7.5/test/test-process-title.c delete mode 100644 outside/libuv-v1.7.5/test/test-ref.c delete mode 100644 outside/libuv-v1.7.5/test/test-run-nowait.c delete mode 100644 outside/libuv-v1.7.5/test/test-run-once.c delete mode 100644 outside/libuv-v1.7.5/test/test-semaphore.c delete mode 100644 outside/libuv-v1.7.5/test/test-shutdown-close.c delete mode 100644 outside/libuv-v1.7.5/test/test-shutdown-eof.c delete mode 100644 outside/libuv-v1.7.5/test/test-shutdown-twice.c delete mode 100644 outside/libuv-v1.7.5/test/test-signal-multiple-loops.c delete mode 100644 outside/libuv-v1.7.5/test/test-signal.c delete mode 100644 outside/libuv-v1.7.5/test/test-socket-buffer-size.c delete mode 100644 outside/libuv-v1.7.5/test/test-spawn.c delete mode 100644 outside/libuv-v1.7.5/test/test-stdio-over-pipes.c delete mode 100644 outside/libuv-v1.7.5/test/test-tcp-bind-error.c delete mode 100644 outside/libuv-v1.7.5/test/test-tcp-bind6-error.c delete mode 100644 outside/libuv-v1.7.5/test/test-tcp-close-accept.c delete mode 100644 outside/libuv-v1.7.5/test/test-tcp-close-while-connecting.c delete mode 100644 outside/libuv-v1.7.5/test/test-tcp-close.c delete mode 100644 outside/libuv-v1.7.5/test/test-tcp-connect-error-after-write.c delete mode 100644 outside/libuv-v1.7.5/test/test-tcp-connect-error.c delete mode 100644 outside/libuv-v1.7.5/test/test-tcp-connect-timeout.c delete mode 100644 outside/libuv-v1.7.5/test/test-tcp-connect6-error.c delete mode 100644 outside/libuv-v1.7.5/test/test-tcp-create-socket-early.c delete mode 100644 outside/libuv-v1.7.5/test/test-tcp-flags.c delete mode 100644 outside/libuv-v1.7.5/test/test-tcp-oob.c delete mode 100644 outside/libuv-v1.7.5/test/test-tcp-open.c delete mode 100644 outside/libuv-v1.7.5/test/test-tcp-read-stop.c delete mode 100644 outside/libuv-v1.7.5/test/test-tcp-shutdown-after-write.c delete mode 100644 outside/libuv-v1.7.5/test/test-tcp-try-write.c delete mode 100644 outside/libuv-v1.7.5/test/test-tcp-unexpected-read.c delete mode 100644 outside/libuv-v1.7.5/test/test-tcp-write-after-connect.c delete mode 100644 outside/libuv-v1.7.5/test/test-tcp-write-fail.c delete mode 100644 outside/libuv-v1.7.5/test/test-tcp-write-queue-order.c delete mode 100644 outside/libuv-v1.7.5/test/test-tcp-write-to-half-open-connection.c delete mode 100644 outside/libuv-v1.7.5/test/test-tcp-writealot.c delete mode 100644 outside/libuv-v1.7.5/test/test-thread-equal.c delete mode 100644 outside/libuv-v1.7.5/test/test-thread.c delete mode 100644 outside/libuv-v1.7.5/test/test-threadpool-cancel.c delete mode 100644 outside/libuv-v1.7.5/test/test-threadpool.c delete mode 100644 outside/libuv-v1.7.5/test/test-timer-again.c delete mode 100644 outside/libuv-v1.7.5/test/test-timer-from-check.c delete mode 100644 outside/libuv-v1.7.5/test/test-timer.c delete mode 100644 outside/libuv-v1.7.5/test/test-tty.c delete mode 100644 outside/libuv-v1.7.5/test/test-udp-bind.c delete mode 100644 outside/libuv-v1.7.5/test/test-udp-create-socket-early.c delete mode 100644 outside/libuv-v1.7.5/test/test-udp-dgram-too-big.c delete mode 100644 outside/libuv-v1.7.5/test/test-udp-ipv6.c delete mode 100644 outside/libuv-v1.7.5/test/test-udp-multicast-interface.c delete mode 100644 outside/libuv-v1.7.5/test/test-udp-multicast-interface6.c delete mode 100644 outside/libuv-v1.7.5/test/test-udp-multicast-join.c delete mode 100644 outside/libuv-v1.7.5/test/test-udp-multicast-join6.c delete mode 100644 outside/libuv-v1.7.5/test/test-udp-multicast-ttl.c delete mode 100644 outside/libuv-v1.7.5/test/test-udp-open.c delete mode 100644 outside/libuv-v1.7.5/test/test-udp-options.c delete mode 100644 outside/libuv-v1.7.5/test/test-udp-send-and-recv.c delete mode 100644 outside/libuv-v1.7.5/test/test-udp-send-immediate.c delete mode 100644 outside/libuv-v1.7.5/test/test-udp-send-unreachable.c delete mode 100644 outside/libuv-v1.7.5/test/test-udp-try-send.c delete mode 100644 outside/libuv-v1.7.5/test/test-walk-handles.c delete mode 100644 outside/libuv-v1.7.5/test/test-watcher-cross-stop.c delete mode 100644 outside/libuv-v1.7.5/uv.gyp delete mode 100644 outside/libuv-v1.7.5/vcbuild.bat delete mode 100644 outside/murmur3/MurmurHash3.c delete mode 100644 outside/murmur3/MurmurHash3.h delete mode 100644 outside/scrypt/Makefile delete mode 100644 outside/scrypt/crypto_scrypt-nosse.c delete mode 100644 outside/scrypt/crypto_scrypt.h delete mode 100644 outside/scrypt/sha256.c delete mode 100644 outside/scrypt/sha256.h delete mode 100644 outside/scrypt/sysendian.h delete mode 100644 outside/softfloat-3/COPYING.txt delete mode 100644 outside/softfloat-3/README.html delete mode 100644 outside/softfloat-3/README.txt delete mode 100644 outside/softfloat-3/build/Linux-386-GCC/Makefile delete mode 100644 outside/softfloat-3/build/Linux-386-GCC/platform.h delete mode 100644 outside/softfloat-3/build/Linux-386-SSE2-GCC/Makefile delete mode 100644 outside/softfloat-3/build/Linux-386-SSE2-GCC/platform.h delete mode 100644 outside/softfloat-3/build/Linux-x86_64-GCC/Makefile delete mode 100644 outside/softfloat-3/build/Linux-x86_64-GCC/platform.h delete mode 100644 outside/softfloat-3/build/Win32-MinGW/Makefile delete mode 100644 outside/softfloat-3/build/Win32-MinGW/platform.h delete mode 100644 outside/softfloat-3/build/Win32-SSE2-MinGW/Makefile delete mode 100644 outside/softfloat-3/build/Win32-SSE2-MinGW/platform.h delete mode 100644 outside/softfloat-3/build/Win64-MinGW-w64/Makefile delete mode 100644 outside/softfloat-3/build/Win64-MinGW-w64/platform.h delete mode 100644 outside/softfloat-3/build/template-FAST_INT64/Makefile delete mode 100644 outside/softfloat-3/build/template-FAST_INT64/platform.h delete mode 100644 outside/softfloat-3/build/template-not-FAST_INT64/Makefile delete mode 100644 outside/softfloat-3/build/template-not-FAST_INT64/platform.h delete mode 100644 outside/softfloat-3/doc/SoftFloat-history.html delete mode 100644 outside/softfloat-3/doc/SoftFloat-source.html delete mode 100644 outside/softfloat-3/doc/SoftFloat.html delete mode 100644 outside/softfloat-3/source/8086-SSE/extF80M_isSignalingNaN.c delete mode 100644 outside/softfloat-3/source/8086-SSE/f128M_isSignalingNaN.c delete mode 100644 outside/softfloat-3/source/8086-SSE/s_commonNaNToExtF80M.c delete mode 100644 outside/softfloat-3/source/8086-SSE/s_commonNaNToExtF80UI.c delete mode 100644 outside/softfloat-3/source/8086-SSE/s_commonNaNToF128M.c delete mode 100644 outside/softfloat-3/source/8086-SSE/s_commonNaNToF128UI.c delete mode 100644 outside/softfloat-3/source/8086-SSE/s_commonNaNToF16UI.c delete mode 100644 outside/softfloat-3/source/8086-SSE/s_commonNaNToF32UI.c delete mode 100644 outside/softfloat-3/source/8086-SSE/s_commonNaNToF64UI.c delete mode 100644 outside/softfloat-3/source/8086-SSE/s_extF80MToCommonNaN.c delete mode 100644 outside/softfloat-3/source/8086-SSE/s_extF80UIToCommonNaN.c delete mode 100644 outside/softfloat-3/source/8086-SSE/s_f128MToCommonNaN.c delete mode 100644 outside/softfloat-3/source/8086-SSE/s_f128UIToCommonNaN.c delete mode 100644 outside/softfloat-3/source/8086-SSE/s_f16UIToCommonNaN.c delete mode 100644 outside/softfloat-3/source/8086-SSE/s_f32UIToCommonNaN.c delete mode 100644 outside/softfloat-3/source/8086-SSE/s_f64UIToCommonNaN.c delete mode 100644 outside/softfloat-3/source/8086-SSE/s_propagateNaNExtF80M.c delete mode 100644 outside/softfloat-3/source/8086-SSE/s_propagateNaNExtF80UI.c delete mode 100644 outside/softfloat-3/source/8086-SSE/s_propagateNaNF128M.c delete mode 100644 outside/softfloat-3/source/8086-SSE/s_propagateNaNF128UI.c delete mode 100644 outside/softfloat-3/source/8086-SSE/s_propagateNaNF16UI.c delete mode 100644 outside/softfloat-3/source/8086-SSE/s_propagateNaNF32UI.c delete mode 100644 outside/softfloat-3/source/8086-SSE/s_propagateNaNF64UI.c delete mode 100644 outside/softfloat-3/source/8086-SSE/softfloat_raiseFlags.c delete mode 100644 outside/softfloat-3/source/8086-SSE/specialize.h delete mode 100644 outside/softfloat-3/source/8086/extF80M_isSignalingNaN.c delete mode 100644 outside/softfloat-3/source/8086/f128M_isSignalingNaN.c delete mode 100644 outside/softfloat-3/source/8086/s_commonNaNToExtF80M.c delete mode 100644 outside/softfloat-3/source/8086/s_commonNaNToExtF80UI.c delete mode 100644 outside/softfloat-3/source/8086/s_commonNaNToF128M.c delete mode 100644 outside/softfloat-3/source/8086/s_commonNaNToF128UI.c delete mode 100644 outside/softfloat-3/source/8086/s_commonNaNToF16UI.c delete mode 100644 outside/softfloat-3/source/8086/s_commonNaNToF32UI.c delete mode 100644 outside/softfloat-3/source/8086/s_commonNaNToF64UI.c delete mode 100644 outside/softfloat-3/source/8086/s_extF80MToCommonNaN.c delete mode 100644 outside/softfloat-3/source/8086/s_extF80UIToCommonNaN.c delete mode 100644 outside/softfloat-3/source/8086/s_f128MToCommonNaN.c delete mode 100644 outside/softfloat-3/source/8086/s_f128UIToCommonNaN.c delete mode 100644 outside/softfloat-3/source/8086/s_f16UIToCommonNaN.c delete mode 100644 outside/softfloat-3/source/8086/s_f32UIToCommonNaN.c delete mode 100644 outside/softfloat-3/source/8086/s_f64UIToCommonNaN.c delete mode 100644 outside/softfloat-3/source/8086/s_propagateNaNExtF80M.c delete mode 100644 outside/softfloat-3/source/8086/s_propagateNaNExtF80UI.c delete mode 100644 outside/softfloat-3/source/8086/s_propagateNaNF128M.c delete mode 100644 outside/softfloat-3/source/8086/s_propagateNaNF128UI.c delete mode 100644 outside/softfloat-3/source/8086/s_propagateNaNF16UI.c delete mode 100644 outside/softfloat-3/source/8086/s_propagateNaNF32UI.c delete mode 100644 outside/softfloat-3/source/8086/s_propagateNaNF64UI.c delete mode 100644 outside/softfloat-3/source/8086/softfloat_raiseFlags.c delete mode 100644 outside/softfloat-3/source/8086/specialize.h delete mode 100644 outside/softfloat-3/source/extF80M_add.c delete mode 100644 outside/softfloat-3/source/extF80M_div.c delete mode 100644 outside/softfloat-3/source/extF80M_eq.c delete mode 100644 outside/softfloat-3/source/extF80M_eq_signaling.c delete mode 100644 outside/softfloat-3/source/extF80M_le.c delete mode 100644 outside/softfloat-3/source/extF80M_le_quiet.c delete mode 100644 outside/softfloat-3/source/extF80M_lt.c delete mode 100644 outside/softfloat-3/source/extF80M_lt_quiet.c delete mode 100644 outside/softfloat-3/source/extF80M_mul.c delete mode 100644 outside/softfloat-3/source/extF80M_rem.c delete mode 100644 outside/softfloat-3/source/extF80M_roundToInt.c delete mode 100644 outside/softfloat-3/source/extF80M_sqrt.c delete mode 100644 outside/softfloat-3/source/extF80M_sub.c delete mode 100644 outside/softfloat-3/source/extF80M_to_f128M.c delete mode 100644 outside/softfloat-3/source/extF80M_to_f16.c delete mode 100644 outside/softfloat-3/source/extF80M_to_f32.c delete mode 100644 outside/softfloat-3/source/extF80M_to_f64.c delete mode 100644 outside/softfloat-3/source/extF80M_to_i32.c delete mode 100644 outside/softfloat-3/source/extF80M_to_i32_r_minMag.c delete mode 100644 outside/softfloat-3/source/extF80M_to_i64.c delete mode 100644 outside/softfloat-3/source/extF80M_to_i64_r_minMag.c delete mode 100644 outside/softfloat-3/source/extF80M_to_ui32.c delete mode 100644 outside/softfloat-3/source/extF80M_to_ui32_r_minMag.c delete mode 100644 outside/softfloat-3/source/extF80M_to_ui64.c delete mode 100644 outside/softfloat-3/source/extF80M_to_ui64_r_minMag.c delete mode 100644 outside/softfloat-3/source/extF80_add.c delete mode 100644 outside/softfloat-3/source/extF80_div.c delete mode 100644 outside/softfloat-3/source/extF80_eq.c delete mode 100644 outside/softfloat-3/source/extF80_eq_signaling.c delete mode 100644 outside/softfloat-3/source/extF80_isSignalingNaN.c delete mode 100644 outside/softfloat-3/source/extF80_le.c delete mode 100644 outside/softfloat-3/source/extF80_le_quiet.c delete mode 100644 outside/softfloat-3/source/extF80_lt.c delete mode 100644 outside/softfloat-3/source/extF80_lt_quiet.c delete mode 100644 outside/softfloat-3/source/extF80_mul.c delete mode 100644 outside/softfloat-3/source/extF80_rem.c delete mode 100644 outside/softfloat-3/source/extF80_roundToInt.c delete mode 100644 outside/softfloat-3/source/extF80_sqrt.c delete mode 100644 outside/softfloat-3/source/extF80_sub.c delete mode 100644 outside/softfloat-3/source/extF80_to_f128.c delete mode 100644 outside/softfloat-3/source/extF80_to_f16.c delete mode 100644 outside/softfloat-3/source/extF80_to_f32.c delete mode 100644 outside/softfloat-3/source/extF80_to_f64.c delete mode 100644 outside/softfloat-3/source/extF80_to_i32.c delete mode 100644 outside/softfloat-3/source/extF80_to_i32_r_minMag.c delete mode 100644 outside/softfloat-3/source/extF80_to_i64.c delete mode 100644 outside/softfloat-3/source/extF80_to_i64_r_minMag.c delete mode 100644 outside/softfloat-3/source/extF80_to_ui32.c delete mode 100644 outside/softfloat-3/source/extF80_to_ui32_r_minMag.c delete mode 100644 outside/softfloat-3/source/extF80_to_ui64.c delete mode 100644 outside/softfloat-3/source/extF80_to_ui64_r_minMag.c delete mode 100644 outside/softfloat-3/source/f128M_add.c delete mode 100644 outside/softfloat-3/source/f128M_div.c delete mode 100644 outside/softfloat-3/source/f128M_eq.c delete mode 100644 outside/softfloat-3/source/f128M_eq_signaling.c delete mode 100644 outside/softfloat-3/source/f128M_le.c delete mode 100644 outside/softfloat-3/source/f128M_le_quiet.c delete mode 100644 outside/softfloat-3/source/f128M_lt.c delete mode 100644 outside/softfloat-3/source/f128M_lt_quiet.c delete mode 100644 outside/softfloat-3/source/f128M_mul.c delete mode 100644 outside/softfloat-3/source/f128M_mulAdd.c delete mode 100644 outside/softfloat-3/source/f128M_rem.c delete mode 100644 outside/softfloat-3/source/f128M_roundToInt.c delete mode 100644 outside/softfloat-3/source/f128M_sqrt.c delete mode 100644 outside/softfloat-3/source/f128M_sub.c delete mode 100644 outside/softfloat-3/source/f128M_to_extF80M.c delete mode 100644 outside/softfloat-3/source/f128M_to_f16.c delete mode 100644 outside/softfloat-3/source/f128M_to_f32.c delete mode 100644 outside/softfloat-3/source/f128M_to_f64.c delete mode 100644 outside/softfloat-3/source/f128M_to_i32.c delete mode 100644 outside/softfloat-3/source/f128M_to_i32_r_minMag.c delete mode 100644 outside/softfloat-3/source/f128M_to_i64.c delete mode 100644 outside/softfloat-3/source/f128M_to_i64_r_minMag.c delete mode 100644 outside/softfloat-3/source/f128M_to_ui32.c delete mode 100644 outside/softfloat-3/source/f128M_to_ui32_r_minMag.c delete mode 100644 outside/softfloat-3/source/f128M_to_ui64.c delete mode 100644 outside/softfloat-3/source/f128M_to_ui64_r_minMag.c delete mode 100644 outside/softfloat-3/source/f128_add.c delete mode 100644 outside/softfloat-3/source/f128_div.c delete mode 100644 outside/softfloat-3/source/f128_eq.c delete mode 100644 outside/softfloat-3/source/f128_eq_signaling.c delete mode 100644 outside/softfloat-3/source/f128_isSignalingNaN.c delete mode 100644 outside/softfloat-3/source/f128_le.c delete mode 100644 outside/softfloat-3/source/f128_le_quiet.c delete mode 100644 outside/softfloat-3/source/f128_lt.c delete mode 100644 outside/softfloat-3/source/f128_lt_quiet.c delete mode 100644 outside/softfloat-3/source/f128_mul.c delete mode 100644 outside/softfloat-3/source/f128_mulAdd.c delete mode 100644 outside/softfloat-3/source/f128_rem.c delete mode 100644 outside/softfloat-3/source/f128_roundToInt.c delete mode 100644 outside/softfloat-3/source/f128_sqrt.c delete mode 100644 outside/softfloat-3/source/f128_sub.c delete mode 100644 outside/softfloat-3/source/f128_to_extF80.c delete mode 100644 outside/softfloat-3/source/f128_to_f16.c delete mode 100644 outside/softfloat-3/source/f128_to_f32.c delete mode 100644 outside/softfloat-3/source/f128_to_f64.c delete mode 100644 outside/softfloat-3/source/f128_to_i32.c delete mode 100644 outside/softfloat-3/source/f128_to_i32_r_minMag.c delete mode 100644 outside/softfloat-3/source/f128_to_i64.c delete mode 100644 outside/softfloat-3/source/f128_to_i64_r_minMag.c delete mode 100644 outside/softfloat-3/source/f128_to_ui32.c delete mode 100644 outside/softfloat-3/source/f128_to_ui32_r_minMag.c delete mode 100644 outside/softfloat-3/source/f128_to_ui64.c delete mode 100644 outside/softfloat-3/source/f128_to_ui64_r_minMag.c delete mode 100644 outside/softfloat-3/source/f16_add.c delete mode 100644 outside/softfloat-3/source/f16_div.c delete mode 100644 outside/softfloat-3/source/f16_eq.c delete mode 100644 outside/softfloat-3/source/f16_eq_signaling.c delete mode 100644 outside/softfloat-3/source/f16_isSignalingNaN.c delete mode 100644 outside/softfloat-3/source/f16_le.c delete mode 100644 outside/softfloat-3/source/f16_le_quiet.c delete mode 100644 outside/softfloat-3/source/f16_lt.c delete mode 100644 outside/softfloat-3/source/f16_lt_quiet.c delete mode 100644 outside/softfloat-3/source/f16_mul.c delete mode 100644 outside/softfloat-3/source/f16_mulAdd.c delete mode 100644 outside/softfloat-3/source/f16_rem.c delete mode 100644 outside/softfloat-3/source/f16_roundToInt.c delete mode 100644 outside/softfloat-3/source/f16_sqrt.c delete mode 100644 outside/softfloat-3/source/f16_sub.c delete mode 100644 outside/softfloat-3/source/f16_to_extF80.c delete mode 100644 outside/softfloat-3/source/f16_to_extF80M.c delete mode 100644 outside/softfloat-3/source/f16_to_f128.c delete mode 100644 outside/softfloat-3/source/f16_to_f128M.c delete mode 100644 outside/softfloat-3/source/f16_to_f32.c delete mode 100644 outside/softfloat-3/source/f16_to_f64.c delete mode 100644 outside/softfloat-3/source/f16_to_i32.c delete mode 100644 outside/softfloat-3/source/f16_to_i32_r_minMag.c delete mode 100644 outside/softfloat-3/source/f16_to_i64.c delete mode 100644 outside/softfloat-3/source/f16_to_i64_r_minMag.c delete mode 100644 outside/softfloat-3/source/f16_to_ui32.c delete mode 100644 outside/softfloat-3/source/f16_to_ui32_r_minMag.c delete mode 100644 outside/softfloat-3/source/f16_to_ui64.c delete mode 100644 outside/softfloat-3/source/f16_to_ui64_r_minMag.c delete mode 100644 outside/softfloat-3/source/f32_add.c delete mode 100644 outside/softfloat-3/source/f32_div.c delete mode 100644 outside/softfloat-3/source/f32_eq.c delete mode 100644 outside/softfloat-3/source/f32_eq_signaling.c delete mode 100644 outside/softfloat-3/source/f32_isSignalingNaN.c delete mode 100644 outside/softfloat-3/source/f32_le.c delete mode 100644 outside/softfloat-3/source/f32_le_quiet.c delete mode 100644 outside/softfloat-3/source/f32_lt.c delete mode 100644 outside/softfloat-3/source/f32_lt_quiet.c delete mode 100644 outside/softfloat-3/source/f32_mul.c delete mode 100644 outside/softfloat-3/source/f32_mulAdd.c delete mode 100644 outside/softfloat-3/source/f32_rem.c delete mode 100644 outside/softfloat-3/source/f32_roundToInt.c delete mode 100644 outside/softfloat-3/source/f32_sqrt.c delete mode 100644 outside/softfloat-3/source/f32_sub.c delete mode 100644 outside/softfloat-3/source/f32_to_extF80.c delete mode 100644 outside/softfloat-3/source/f32_to_extF80M.c delete mode 100644 outside/softfloat-3/source/f32_to_f128.c delete mode 100644 outside/softfloat-3/source/f32_to_f128M.c delete mode 100644 outside/softfloat-3/source/f32_to_f16.c delete mode 100644 outside/softfloat-3/source/f32_to_f64.c delete mode 100644 outside/softfloat-3/source/f32_to_i32.c delete mode 100644 outside/softfloat-3/source/f32_to_i32_r_minMag.c delete mode 100644 outside/softfloat-3/source/f32_to_i64.c delete mode 100644 outside/softfloat-3/source/f32_to_i64_r_minMag.c delete mode 100644 outside/softfloat-3/source/f32_to_ui32.c delete mode 100644 outside/softfloat-3/source/f32_to_ui32_r_minMag.c delete mode 100644 outside/softfloat-3/source/f32_to_ui64.c delete mode 100644 outside/softfloat-3/source/f32_to_ui64_r_minMag.c delete mode 100644 outside/softfloat-3/source/f64_add.c delete mode 100644 outside/softfloat-3/source/f64_div.c delete mode 100644 outside/softfloat-3/source/f64_eq.c delete mode 100644 outside/softfloat-3/source/f64_eq_signaling.c delete mode 100644 outside/softfloat-3/source/f64_isSignalingNaN.c delete mode 100644 outside/softfloat-3/source/f64_le.c delete mode 100644 outside/softfloat-3/source/f64_le_quiet.c delete mode 100644 outside/softfloat-3/source/f64_lt.c delete mode 100644 outside/softfloat-3/source/f64_lt_quiet.c delete mode 100644 outside/softfloat-3/source/f64_mul.c delete mode 100644 outside/softfloat-3/source/f64_mulAdd.c delete mode 100644 outside/softfloat-3/source/f64_rem.c delete mode 100644 outside/softfloat-3/source/f64_roundToInt.c delete mode 100644 outside/softfloat-3/source/f64_sqrt.c delete mode 100644 outside/softfloat-3/source/f64_sub.c delete mode 100644 outside/softfloat-3/source/f64_to_extF80.c delete mode 100644 outside/softfloat-3/source/f64_to_extF80M.c delete mode 100644 outside/softfloat-3/source/f64_to_f128.c delete mode 100644 outside/softfloat-3/source/f64_to_f128M.c delete mode 100644 outside/softfloat-3/source/f64_to_f16.c delete mode 100644 outside/softfloat-3/source/f64_to_f32.c delete mode 100644 outside/softfloat-3/source/f64_to_i32.c delete mode 100644 outside/softfloat-3/source/f64_to_i32_r_minMag.c delete mode 100644 outside/softfloat-3/source/f64_to_i64.c delete mode 100644 outside/softfloat-3/source/f64_to_i64_r_minMag.c delete mode 100644 outside/softfloat-3/source/f64_to_ui32.c delete mode 100644 outside/softfloat-3/source/f64_to_ui32_r_minMag.c delete mode 100644 outside/softfloat-3/source/f64_to_ui64.c delete mode 100644 outside/softfloat-3/source/f64_to_ui64_r_minMag.c delete mode 100644 outside/softfloat-3/source/i32_to_extF80.c delete mode 100644 outside/softfloat-3/source/i32_to_extF80M.c delete mode 100644 outside/softfloat-3/source/i32_to_f128.c delete mode 100644 outside/softfloat-3/source/i32_to_f128M.c delete mode 100644 outside/softfloat-3/source/i32_to_f16.c delete mode 100644 outside/softfloat-3/source/i32_to_f32.c delete mode 100644 outside/softfloat-3/source/i32_to_f64.c delete mode 100644 outside/softfloat-3/source/i64_to_extF80.c delete mode 100644 outside/softfloat-3/source/i64_to_extF80M.c delete mode 100644 outside/softfloat-3/source/i64_to_f128.c delete mode 100644 outside/softfloat-3/source/i64_to_f128M.c delete mode 100644 outside/softfloat-3/source/i64_to_f16.c delete mode 100644 outside/softfloat-3/source/i64_to_f32.c delete mode 100644 outside/softfloat-3/source/i64_to_f64.c delete mode 100644 outside/softfloat-3/source/include/internals.h delete mode 100644 outside/softfloat-3/source/include/primitiveTypes.h delete mode 100644 outside/softfloat-3/source/include/primitives.h delete mode 100644 outside/softfloat-3/source/include/softfloat.h delete mode 100644 outside/softfloat-3/source/include/softfloat_types.h delete mode 100644 outside/softfloat-3/source/s_add128.c delete mode 100644 outside/softfloat-3/source/s_add256M.c delete mode 100644 outside/softfloat-3/source/s_addCarryM.c delete mode 100644 outside/softfloat-3/source/s_addComplCarryM.c delete mode 100644 outside/softfloat-3/source/s_addExtF80M.c delete mode 100644 outside/softfloat-3/source/s_addF128M.c delete mode 100644 outside/softfloat-3/source/s_addM.c delete mode 100644 outside/softfloat-3/source/s_addMagsExtF80.c delete mode 100644 outside/softfloat-3/source/s_addMagsF128.c delete mode 100644 outside/softfloat-3/source/s_addMagsF16.c delete mode 100644 outside/softfloat-3/source/s_addMagsF32.c delete mode 100644 outside/softfloat-3/source/s_addMagsF64.c delete mode 100644 outside/softfloat-3/source/s_approxRecip32_1.c delete mode 100644 outside/softfloat-3/source/s_approxRecipSqrt32_1.c delete mode 100644 outside/softfloat-3/source/s_approxRecipSqrt_1Ks.c delete mode 100644 outside/softfloat-3/source/s_approxRecip_1Ks.c delete mode 100644 outside/softfloat-3/source/s_compare128M.c delete mode 100644 outside/softfloat-3/source/s_compare96M.c delete mode 100644 outside/softfloat-3/source/s_compareNonnormExtF80M.c delete mode 100644 outside/softfloat-3/source/s_countLeadingZeros16.c delete mode 100644 outside/softfloat-3/source/s_countLeadingZeros32.c delete mode 100644 outside/softfloat-3/source/s_countLeadingZeros64.c delete mode 100644 outside/softfloat-3/source/s_countLeadingZeros8.c delete mode 100644 outside/softfloat-3/source/s_eq128.c delete mode 100644 outside/softfloat-3/source/s_invalidExtF80M.c delete mode 100644 outside/softfloat-3/source/s_invalidF128M.c delete mode 100644 outside/softfloat-3/source/s_isNaNF128M.c delete mode 100644 outside/softfloat-3/source/s_le128.c delete mode 100644 outside/softfloat-3/source/s_lt128.c delete mode 100644 outside/softfloat-3/source/s_mul128By32.c delete mode 100644 outside/softfloat-3/source/s_mul128MTo256M.c delete mode 100644 outside/softfloat-3/source/s_mul128To256M.c delete mode 100644 outside/softfloat-3/source/s_mul64ByShifted32To128.c delete mode 100644 outside/softfloat-3/source/s_mul64To128.c delete mode 100644 outside/softfloat-3/source/s_mul64To128M.c delete mode 100644 outside/softfloat-3/source/s_mulAddF128.c delete mode 100644 outside/softfloat-3/source/s_mulAddF128M.c delete mode 100644 outside/softfloat-3/source/s_mulAddF16.c delete mode 100644 outside/softfloat-3/source/s_mulAddF32.c delete mode 100644 outside/softfloat-3/source/s_mulAddF64.c delete mode 100644 outside/softfloat-3/source/s_negXM.c delete mode 100644 outside/softfloat-3/source/s_normExtF80SigM.c delete mode 100644 outside/softfloat-3/source/s_normRoundPackMToExtF80M.c delete mode 100644 outside/softfloat-3/source/s_normRoundPackMToF128M.c delete mode 100644 outside/softfloat-3/source/s_normRoundPackToExtF80.c delete mode 100644 outside/softfloat-3/source/s_normRoundPackToF128.c delete mode 100644 outside/softfloat-3/source/s_normRoundPackToF16.c delete mode 100644 outside/softfloat-3/source/s_normRoundPackToF32.c delete mode 100644 outside/softfloat-3/source/s_normRoundPackToF64.c delete mode 100644 outside/softfloat-3/source/s_normSubnormalExtF80Sig.c delete mode 100644 outside/softfloat-3/source/s_normSubnormalF128Sig.c delete mode 100644 outside/softfloat-3/source/s_normSubnormalF128SigM.c delete mode 100644 outside/softfloat-3/source/s_normSubnormalF16Sig.c delete mode 100644 outside/softfloat-3/source/s_normSubnormalF32Sig.c delete mode 100644 outside/softfloat-3/source/s_normSubnormalF64Sig.c delete mode 100644 outside/softfloat-3/source/s_remStepMBy32.c delete mode 100644 outside/softfloat-3/source/s_roundMToI64.c delete mode 100644 outside/softfloat-3/source/s_roundMToUI64.c delete mode 100644 outside/softfloat-3/source/s_roundPackMToExtF80M.c delete mode 100644 outside/softfloat-3/source/s_roundPackMToF128M.c delete mode 100644 outside/softfloat-3/source/s_roundPackToExtF80.c delete mode 100644 outside/softfloat-3/source/s_roundPackToF128.c delete mode 100644 outside/softfloat-3/source/s_roundPackToF16.c delete mode 100644 outside/softfloat-3/source/s_roundPackToF32.c delete mode 100644 outside/softfloat-3/source/s_roundPackToF64.c delete mode 100644 outside/softfloat-3/source/s_roundToI32.c delete mode 100644 outside/softfloat-3/source/s_roundToI64.c delete mode 100644 outside/softfloat-3/source/s_roundToUI32.c delete mode 100644 outside/softfloat-3/source/s_roundToUI64.c delete mode 100644 outside/softfloat-3/source/s_shiftLeftM.c delete mode 100644 outside/softfloat-3/source/s_shiftNormSigF128M.c delete mode 100644 outside/softfloat-3/source/s_shiftRightJam128.c delete mode 100644 outside/softfloat-3/source/s_shiftRightJam128Extra.c delete mode 100644 outside/softfloat-3/source/s_shiftRightJam256M.c delete mode 100644 outside/softfloat-3/source/s_shiftRightJam32.c delete mode 100644 outside/softfloat-3/source/s_shiftRightJam64.c delete mode 100644 outside/softfloat-3/source/s_shiftRightJam64Extra.c delete mode 100644 outside/softfloat-3/source/s_shiftRightJamM.c delete mode 100644 outside/softfloat-3/source/s_shiftRightM.c delete mode 100644 outside/softfloat-3/source/s_shortShiftLeft128.c delete mode 100644 outside/softfloat-3/source/s_shortShiftLeft64To96M.c delete mode 100644 outside/softfloat-3/source/s_shortShiftLeftM.c delete mode 100644 outside/softfloat-3/source/s_shortShiftRight128.c delete mode 100644 outside/softfloat-3/source/s_shortShiftRightExtendM.c delete mode 100644 outside/softfloat-3/source/s_shortShiftRightJam128.c delete mode 100644 outside/softfloat-3/source/s_shortShiftRightJam128Extra.c delete mode 100644 outside/softfloat-3/source/s_shortShiftRightJam64.c delete mode 100644 outside/softfloat-3/source/s_shortShiftRightJam64Extra.c delete mode 100644 outside/softfloat-3/source/s_shortShiftRightJamM.c delete mode 100644 outside/softfloat-3/source/s_shortShiftRightM.c delete mode 100644 outside/softfloat-3/source/s_sub128.c delete mode 100644 outside/softfloat-3/source/s_sub1XM.c delete mode 100644 outside/softfloat-3/source/s_sub256M.c delete mode 100644 outside/softfloat-3/source/s_subM.c delete mode 100644 outside/softfloat-3/source/s_subMagsExtF80.c delete mode 100644 outside/softfloat-3/source/s_subMagsF128.c delete mode 100644 outside/softfloat-3/source/s_subMagsF16.c delete mode 100644 outside/softfloat-3/source/s_subMagsF32.c delete mode 100644 outside/softfloat-3/source/s_subMagsF64.c delete mode 100644 outside/softfloat-3/source/s_tryPropagateNaNExtF80M.c delete mode 100644 outside/softfloat-3/source/s_tryPropagateNaNF128M.c delete mode 100644 outside/softfloat-3/source/softfloat_state.c delete mode 100644 outside/softfloat-3/source/ui32_to_extF80.c delete mode 100644 outside/softfloat-3/source/ui32_to_extF80M.c delete mode 100644 outside/softfloat-3/source/ui32_to_f128.c delete mode 100644 outside/softfloat-3/source/ui32_to_f128M.c delete mode 100644 outside/softfloat-3/source/ui32_to_f16.c delete mode 100644 outside/softfloat-3/source/ui32_to_f32.c delete mode 100644 outside/softfloat-3/source/ui32_to_f64.c delete mode 100644 outside/softfloat-3/source/ui64_to_extF80.c delete mode 100644 outside/softfloat-3/source/ui64_to_extF80M.c delete mode 100644 outside/softfloat-3/source/ui64_to_f128.c delete mode 100644 outside/softfloat-3/source/ui64_to_f128M.c delete mode 100644 outside/softfloat-3/source/ui64_to_f16.c delete mode 100644 outside/softfloat-3/source/ui64_to_f32.c delete mode 100644 outside/softfloat-3/source/ui64_to_f64.c diff --git a/outside/anachronism/.gitignore b/outside/anachronism/.gitignore deleted file mode 100644 index 567609b12..000000000 --- a/outside/anachronism/.gitignore +++ /dev/null @@ -1 +0,0 @@ -build/ diff --git a/outside/anachronism/LICENSE b/outside/anachronism/LICENSE deleted file mode 100644 index 72d4b706e..000000000 --- a/outside/anachronism/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2010 Jonathan Castello - -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/outside/anachronism/Makefile b/outside/anachronism/Makefile deleted file mode 100644 index 123576f13..000000000 --- a/outside/anachronism/Makefile +++ /dev/null @@ -1,70 +0,0 @@ -SHELL = sh -UNAME = $(shell uname) - -ifneq ($(UNAME),FreeBSD) -CC = gcc -else -CC = cc -endif -FLAGS = -c -fPIC -Iinclude/ -CFLAGS = --pedantic -Wall -Wextra -march=native -std=gnu99 -INCLUDE = include/anachronism - -VERSION_MAJOR = 0 -VERSION = $(VERSION_MAJOR).3.1 - -SO = libanachronism.so -SOFILE = $(SO).$(VERSION) -SONAME = $(SO).$(VERSION_MAJOR) - - -all: static shared -shared: build/ build/$(SOFILE) -static: build/ build/libanachronism.a - -build/: - mkdir build - -build/$(SOFILE): build/nvt.o build/parser.o - $(CC) -shared -Wl,-soname,$(SONAME) -o build/$(SOFILE) build/nvt.o build/parser.o - -build/libanachronism.a: build/nvt.o build/parser.o - ar rcs build/libanachronism.a build/nvt.o build/parser.o - -build/nvt.o: src/nvt.c $(INCLUDE)/nvt.h $(INCLUDE)/common.h - $(CC) $(FLAGS) $(CFLAGS) src/nvt.c -o build/nvt.o - -build/parser.o: src/parser.c $(INCLUDE)/parser.h $(INCLUDE)/common.h - $(CC) $(FLAGS) $(CFLAGS) src/parser.c -o build/parser.o - -src/parser.c: src/parser.rl src/parser_common.rl - ragel -C -G2 src/parser.rl -o src/parser.c - - -graph: doc/parser.png - -doc/parser.png: src/parser.rl src/parser_common.rl - ragel -V -p src/parser.rl | dot -Tpng > doc/parser.png - -install: all - install -D -d /usr/local/include/anachronism/ /usr/local/lib - install -D include/anachronism/* /usr/local/include/anachronism/ - install -D build/$(SOFILE) /usr/local/lib/$(SOFILE) - install -D build/libanachronism.a /usr/local/lib/libanachronism.a - ln -s -f /usr/local/lib/$(SOFILE) /usr/local/lib/$(SONAME) - ln -s -f /usr/local/lib/$(SOFILE) /usr/local/lib/$(SO) - -uninstall: - -rm -rf /usr/local/include/anachronism - -rm /usr/local/lib/libanachronism.a - -rm /usr/local/lib/$(SOFILE) - -rm /usr/local/lib/$(SONAME) - -rm /usr/local/lib/$(SO) - -clean: - -rm -f build/nvt.o build/router.o build/parser.o - -distclean: clean - -rm -f build/libanachronism.a build/$(SOFILE) - -.PHONY: all static shared clean distclean install uninstall diff --git a/outside/anachronism/README.md b/outside/anachronism/README.md deleted file mode 100644 index 894825e04..000000000 --- a/outside/anachronism/README.md +++ /dev/null @@ -1,158 +0,0 @@ -# Anachronism -Anachronism is a fully-compliant implementation of [the Telnet protocol][wiki-telnet]. Fallen -out of favor in this day and age, most people only know it as a command-line -tool for debugging HTTP. Today, Telnet is most commonly used in the realm of -[MUDs][wiki-muds], though there are still a few other niches filled by Telnet. - -Anachronism offers a simple API for translating between streams of data and -events, and is completely network-agnostic. Anachronism also offers **channels**, an -abstraction layer which treats Telnet as a data multiplexer. Channels make it -extremely easy to build reusable modules for Telnet sub-protocols such -as MCCP (MUD Client Compression Protocol), which can be written once and plugged -into any application that wants to include support. - -[wiki-telnet]: http://en.wikipedia.org/wiki/Telnet (Telnet at Wikipedia) -[wiki-muds]: http://en.wikipedia.org/wiki/MUD (MUDs at Wikipedia) - -## Installation -While Anachronism has no dependencies and is theoretically cross-platform, I've -only written a Makefile for Linux. Help would be appreciated for making this -work across more platforms. - - make - sudo make install - -This will install Anachronism's shared and static libraries to /usr/local/lib, -and its header files to /usr/local/include/anachronism/. You may also need to -run `ldconfig` to make Anachronism available to your project's compiler/linker. - -## Usage -The anachronism/nvt.h header can be consulted for more complete documentation. - -### Basic usage -The core type exposed by Anachronism is the telnet\_nvt, which represents the -Telnet RFC's "Network Virtual Terminal". An NVT is created using -telnet\_nvt\_new(). When creating an NVT, you must provide it with a set of -callbacks to send events to, and an optional void\* to store as the event -handler's context. You can use telnet\_recv() to process incoming data, and -the telnet\_send\_\*() set of functions to emit outgoing data. - - #include - #include - - void on_event(telnet_nvt* nvt, telnet_event* event) - { - switch (event->type) - { - // A data event (normal text received) - case TELNET_EV_DATA: - { - telnet_data_event* ev = (telnet_data_event*)event; - printf("[IN]: %.*s\n", ev->length, ev->data); - break; - } - - // Outgoing data emitted by the NVT - case TELNET_EV_SEND: - { - telnet_send_event* ev = (telnet_send_event*)event; - printf("[OUT]: %.*s\n", ev->length, ev->data); - break; - } - } - } - - int main() - { - // Create an NVT - telnet_nvt* nvt = telnet_nvt_new(NULL, &on_event, NULL, NULL); - - // Process some incoming data - const char* data = "foo bar baz"; - telnet_receive(nvt, (const telnet_byte*)data, strlen(data), NULL); - - // Free the NVT - telnet_nvt_free(nvt); - return 0; - } - -### Telopts -Anachronism provides an easy-to-use interface to Telnet's "telopt" functionality -via the telnet\_telopt\_*() set of functions. As telopts are negotiated and -utilized, events are sent to the telopt callback provided to telnet_nvt_new(). - - #include - #include - - void on_event(telnet_nvt* nvt, telnet_event* event) - { - switch (event->type) - { - // Outgoing data emitted by the NVT - case TELNET_EV_SEND: - { - telnet_send_event* ev = (telnet_send_event*)event; - printf("[OUT]: %.*s\n", ev->length, ev->data); - break; - } - } - } - - void on_telopt_event(telnet_nvt* nvt, telnet_byte telopt, telnet_telopt_event* event) - { - // telopt is the telopt this event was triggered for - - switch (event->type) - { - case TELNET_EV_TELOPT_TOGGLE: - telnet_telopt_toggle_event* ev = (telnet_telopt_toggle_event*)event; - // ev->where is TELNET_TELOPT_LOCAL or TELNET_TELOPT_REMOTE, - // corresponding to Telnet's WILL/WONT and DO/DONT commands. - // ev->status is TELNET_TELOPT_ON or TELNET_TELOPT_OFF. - break; - case TELNET_EV_TELOPT_FOCUS: - telnet_telopt_focus_event* ev = (telnet_telopt_focus_event*)event; - // ev->focus is 1 or 0 depending on if a subnegotiation packet has - // begun or ended. - break; - case TELNET_EV_TELOPT_DATA: - telnet_telopt_data_event* ev = (telnet_telopt_data_event*)event; - // ev->data is a pointer to the received data. - // ev->length is the length of the data buffer. - break; - } - } - - int main() - { - // Create an NVT - telnet_nvt* nvt = telnet_nvt_new(NULL, &on_event, &on_telopt_event, NULL); - - // Ask to enable a telopt locally (a WILL command) - telnet_request_enable(nvt, 230, TELNET_LOCAL); - - // Process some incoming data - const char* data = "\xFF\xFD\xE6" // IAC DO 230 (turn channel on) - "\xFF\xFA\xE6" // IAC SB 230 (switch to channel) - "foo bar baz" (send data) - "\xFF\xF0"; // IAC SE (switch to main) - telnet_receive(nvt, (const telnet_byte*)data, strlen(data), NULL); - - // Free the NVT - telnet_nvt_free(nvt); - return 0; - } - -### Interrupting - TODO: Explain how to interrupt the parser. - -## Alternatives -* [libtelnet][github-libtelnet], by Elanthis
- It incorporates a number of (rather MUD-specific) protocols by default, - though its API is quite different. - -[github-libtelnet]: https://github.com/elanthis/libtelnet (libtelnet on GitHub) - -## Credits -Someone from #startups on Freenode IRC suggested the name (I'm sure as a joke). -If you read this, remind me who you are so I can credit you properly! diff --git a/outside/anachronism/doc/channels.md b/outside/anachronism/doc/channels.md deleted file mode 100644 index bfcbf838c..000000000 --- a/outside/anachronism/doc/channels.md +++ /dev/null @@ -1,50 +0,0 @@ -# Telnet - -## Channels -Telnet supports data multiplexing by way of 256 built-in sub-channels, each -identified by a byte in the interval [\x00-\xFF]. By switching between -channels, you can send completely separate streams of data through the same -connection. - -All channels start out closed by default. To open a channel, one host must -request or offer a channel using IAC WILL <id> or IAC DO <id>. The remote host -then responds with IAC DO <id> or IAC WILL <id>, respectively. Alternatively, -the request may be denied using IAC DONT <id> or IAC WONT <id>, respectively. - -In order to switch to a specific channel, the IAC SB <id> sequence must -be used. All data sent afterwards will be routed through that specific channel. -To switch back to the main channel, IAC SE must be used. Note that subchannels -do not support any IAC sequences except IAC IAC (an escaped \xFF byte) and -IAC SE (return to the main channel). In particular, you cannot switch directly -from one subchannel to another: you must revert to the main channel first. - -Due to the unbiased nature of Telnet, neither side of the connection is -automatically recognized as the server or the client. However, a host may either -request a channel (as a client) or offer a channel (as a server). The WILL/WONT -commands are used in the role of server ("I will", "I wont"), while DO/DONT -are used in the role of client ("You do", "You do not"). As such, a channel -may be opened twice (even simultaneously). - -As an example, lets assume a terminal is connected to a server using Telnet. The -server offers MCCP (data compression), but wants to know what the terminal's -window size is. The following communication might occur: - - IAC DO NAWS - IAC WILL MCCP - IAC WILL NAWS - IAC SB NAWS \x50 \x00 \x50 \x00 IAC SE - IAC DO MCCP - IAC SB MCCP IAC SE - (compressed data) - -Notice that MCCP was negotiated such that the server offers the compression. -Only the server-to-client flow of data is compressed; the client would not -compress its data unless the channel was negotiated in the other direction as -well. - -In general, a specific subchannel is tied to a specific Telnet subprotocol. For -example, the EXOPL subprotocol is assigned to channel 255, so that channel -should be avoided for any other purpose. A full list of registered subprotocols -can be found on the [IANA website][1]. - -[1]: http://www.iana.org/assignments/telnet-options diff --git a/outside/anachronism/doc/parser.png b/outside/anachronism/doc/parser.png deleted file mode 100644 index b6a5e05a9ee09a76d10f6a50413832b2ffc71c65..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 151838 zcmb5WcRZJG8$SN76fG2?5K*X%GBdJDMph_fm5>nGWJZ%xQe;IWA!Kh_Lb6v>ls&UU z#P7I^KF{~}*Y|rrub0OM-S7Lpu5%pcaUSP&OI=ld^M)N8NF>r`MTMgpB+~jvB+}~p z6sz%*wt<2|{NFm`y=jEB`?vz530? z|KD#N4$+4G_d78rKjr`ai{YE?yjYeArELX<>5y=ZNOMhdlZ(=NL|$IALL75fBhS6|SzX{_@iI zH#-ksmS|4D8`nfnwsK2@`_CFzkrw1#UFQm2Cj*$ppY5oqsaYDy>F}H%$uTH!T1!sO zxMPQ8k6whR{W0pRb+PhNR&SD0i}P(disRiwvN?W6Qw0|=yPB@taV+;!;QCA!Q%x;r zqss$v=gI;qOwv<&q#l@M*$jE4D-1qlCE+D#X!?nSwmQx*1XQwu%v#+eI_YZI8Q0W^l z&y`WiP`6(mN}fNhEJH0JA%X9Cnj$#q7#a1{)z6$e*I?q`I$QT}aB#3nq9VOQ?+*FU z&``;2r~j@a*BQ2Nzi{C~>!(j2A0HOSV~;QV`t@rwqwuG;HVaG3g1o$}g;*hL9TxYi z=g*w^_UPa_6aG-_hrfU2XPXiO4Gp&Tu)}WIVPRo6ZrqT4LM>0b;TpaR3v0tx?9Ag| zSp)O)!`St=>^Z+gMMd#;a`N&81qD(rB4T1~4Gj>)hGO#9iAcY5qC;Vrt>U2cNYY zeSCa&29HT9#Z9~xv6x6^q)O3A>x_@`w6GIuQugv%`dZ*DQq0K2ByqkvLf+HwMvvCM zhyL_@o@23j1qFBpMn=ZIo}TH^j*{okxma0Wb#xd}U-kC(jyoQ5`t<4d@7_HM50|p) zkv~Q_;-Bl{6|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qdVo>ki0nfMP-9y(k7*TG>~ zeReJHd3#IztBG@dy!CBkbQNou7|=b_ruOsatNBQ8W>Q|77a3!5sr6Lfl?`8&rrj9D zs4AG2HZc!YIp?0AlDY92MALV!T0MWYFYGV3JKn)(=E(=EtP4NfxZ&ktu(0dP17Ru~ z5|1wLxp(@CgvKA1!PCdL-Iru$SY66plTi5W`{ek-%6XAiCQr6b{@9TSoUguX-IQ`X z(vapF8`IEqc*yL-UH9LbzVIn6(K(A=L)lGtp7^yoz1(?Xe;;XX{S<~TXw03Xc%KxiN~I7{QBw@?8z^0GJibg^Y6TyPigD>elI=$bz4etb;sQ|DDMH%7k;o- zf2UP_qk*=;12b2ebf57qd9D88x|h-GqL*?@bS~uP<`P0$TneM=6&41VTyYf?aln1V z>0Cvc&~3(E$A!jYkwt`mp%hW!Hmc{Bc2oX|zVce@DtczU)5^*U3VoevGbXFnJQtgH z@TGl9`R34<wR?<|M`=r+HT*Ujmpo{8+sVNzP$gg|LtAkf0;dF L-t;KlWjp>4O^#+{ diff --git a/outside/anachronism/include/anachronism/common.h b/outside/anachronism/include/anachronism/common.h deleted file mode 100644 index 9dcc157a8..000000000 --- a/outside/anachronism/include/anachronism/common.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef ANACHRONISM_COMMON_H -#define ANACHRONISM_COMMON_H - -#include /* for size_t */ - -// Telnet bytes must be unsigned -typedef unsigned char telnet_byte; - -// Error codes returned from API functions -// Positive codes are success/notice codes. -// Nonpositive codes are errors. -// ALLOC is 0 for parity with the NULL result from malloc(). -typedef enum telnet_error -{ - TELNET_E_NOT_SUBNEGOTIABLE = -4, // The telopt is not open for subnegotiation. - TELNET_E_BAD_PARSER = -3, // The telnet_parser* passed is NULL - TELNET_E_BAD_NVT = -2, // The telnet_nvt* passed is NULL - TELNET_E_INVALID_COMMAND = -1, // The telnet_byte passed is not an allowed command in this API method - TELNET_E_ALLOC = 0, // Not enough memory to allocate essential library structures - TELNET_E_OK = 1, // Huge Success! - TELNET_E_INTERRUPT = 2, // Parser interrupted by user code. -} telnet_error; - -#endif // ANACHRONISM_COMMON_H diff --git a/outside/anachronism/include/anachronism/nvt.h b/outside/anachronism/include/anachronism/nvt.h deleted file mode 100644 index 3ab5d5a57..000000000 --- a/outside/anachronism/include/anachronism/nvt.h +++ /dev/null @@ -1,214 +0,0 @@ -#ifndef ANACHRONISM_ANACHRONISM_H -#define ANACHRONISM_ANACHRONISM_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -// predefined Telnet commands from 240-255 -enum -{ - IAC_SE = 240, - IAC_NOP, - IAC_DM, - IAC_BRK, - IAC_IP, - IAC_AO, - IAC_AYT, - IAC_EC, - IAC_EL, - IAC_GA, - IAC_SB, - IAC_WILL, - IAC_WONT, - IAC_DO, - IAC_DONT, - IAC_IAC, -}; - -typedef enum telnet_telopt_location -{ - TELNET_LOCAL, - TELNET_REMOTE, -} telnet_telopt_location; - - -/** - * NVT Events - */ - -typedef enum telnet_event_type -{ - TELNET_EV_DATA, /* A stretch of plain data was received. (data, length) */ - TELNET_EV_COMMAND, /* A simple IAC comamnd was recevied. (command) */ - TELNET_EV_WARNING, /* A non-fatal invalid sequence was received. (message, position) */ - TELNET_EV_SEND, /* Outgoing data to be sent. (data, length) */ -} telnet_event_type; - -typedef struct telnet_event -{ - telnet_event_type type; -} telnet_event; - -typedef struct telnet_data_event -{ - telnet_event SUPER_; - const telnet_byte* data; - size_t length; -} telnet_data_event; - -typedef struct telnet_command_event -{ - telnet_event SUPER_; - telnet_byte command; -} telnet_command_event; - -typedef struct telnet_warning_event -{ - telnet_event SUPER_; - const char* message; - size_t position; -} telnet_warning_event; - -typedef struct telnet_send_event -{ - telnet_event SUPER_; - const telnet_byte* data; - size_t length; -} telnet_send_event; - - -/** - * Telopt Events - */ - -typedef enum telnet_telopt_event_type -{ - TELNET_EV_TELOPT_TOGGLE, - TELNET_EV_TELOPT_FOCUS, - TELNET_EV_TELOPT_DATA, -} telnet_telopt_event_type; - -typedef struct telnet_telopt_event -{ - telnet_telopt_event_type type; -} telnet_telopt_event; - -typedef struct telnet_telopt_toggle_event -{ - telnet_telopt_event SUPER_; - telnet_telopt_location where; - unsigned char status; -} telnet_telopt_toggle_event; - -typedef struct telnet_telopt_focus_event -{ - telnet_telopt_event SUPER_; - unsigned char focus; -} telnet_telopt_focus_event; - -typedef struct telnet_telopt_data_event -{ - telnet_telopt_event SUPER_; - const telnet_byte* data; - size_t length; -} telnet_telopt_data_event; - - - -typedef struct telnet_nvt telnet_nvt; - - -typedef void (*telnet_nvt_event_callback)(telnet_nvt* nvt, telnet_event* event); -typedef void (*telnet_telopt_event_callback)(telnet_nvt* nvt, telnet_byte telopt, telnet_telopt_event* event); -typedef unsigned char (*telnet_negotiate_event_callback)(telnet_nvt* nvt, telnet_byte telopt, telnet_telopt_location where); - -/** - Creates a new Telnet NVT. - - Errors: - TELNET_E_ALLOC - Unable to allocate enough memory for the NVT. - */ -telnet_nvt* telnet_nvt_new(void* userdata, - telnet_nvt_event_callback nvt_callback, - telnet_telopt_event_callback telopt_callback, - telnet_negotiate_event_callback negotiate_callback); - -void telnet_nvt_free(telnet_nvt* nvt); - -/** - Every NVT can have some user-specific data attached, such as a user-defined struct. - This can be accessed (primarily by event callbacks) to differentiate between NVTs. - - Errors: - TELNET_E_BAD_NVT - Invalid telnet_nvt* parameter. - - Example: - // assuming a FILE was passed to telnet_nvt_new(): - FILE out = NULL; - telnet_get_userdata(nvt, (void**)&out); - */ -telnet_error telnet_get_userdata(telnet_nvt* nvt, void** udata); - -/** - Processes incoming data. - If `bytes_used` is non-NULL, it will be set to the length of the string that - was read. This is generally only useful if you use telnet_halt() in a callback. - - Errors: - TELNET_E_BAD_NVT - Invalid telnet_nvt* parameter. - TELNET_E_ALLOC - Unable to allocate destination buffer for incoming text. - TELNET_E_INTERRUPT - User code interrupted the parser. - */ -telnet_error telnet_receive(telnet_nvt* nvt, const telnet_byte* data, size_t length, size_t* bytes_used); - -/** - If currently parsing (i.e. telnet_recv() is running), interrupts the parser. - This is useful for things such as MCCP, where a Telnet sequence hails the start of - data that must be decompressed before being parsed. - - Errors: - TELNET_E_BAD_NVT - Invalid telnet_nvt* parameter. - */ -telnet_error telnet_interrupt(telnet_nvt* nvt); - - -/** - Sends a string as a stream of escaped Telnet data. - - Errors: - TELNET_E_BAD_NVT - Invalid telnet_nvt* parameter. - TELNET_E_ALLOC - Unable to allocate destination buffer for outgoing text. - */ -telnet_error telnet_send_data(telnet_nvt* nvt, const telnet_byte* data, const size_t length); - -/** - Sends a Telnet command. - - Errors: - TELNET_E_BAD_NVT - Invalid telnet_nvt* parameter. - TELNET_E_INVALID_COMMAND - The command cannot be WILL, WONT, DO, DONT, SB, or SE. - */ -telnet_error telnet_send_command(telnet_nvt* nvt, const telnet_byte command); - -/** - Sends a subnegotiation packet. - - Errors: - TELNET_E_BAD_NVT - Invalid telnet_nvt* parameter. - TELNET_E_ALLOC - Unable to allocate destination buffer for outgoing text. - */ -telnet_error telnet_send_subnegotiation(telnet_nvt* nvt, const telnet_byte option, const telnet_byte* data, const size_t length); - - -telnet_error telnet_telopt_enable(telnet_nvt* nvt, const telnet_byte telopt, telnet_telopt_location where); -telnet_error telnet_telopt_disable(telnet_nvt* nvt, const telnet_byte telopt, telnet_telopt_location where); -telnet_error telnet_telopt_status(telnet_nvt* nvt, const telnet_byte telopt, telnet_telopt_location where, unsigned char* status); - -#ifdef __cplusplus -} -#endif - -#endif // ANACHRONISM_ANACHRONISM_H diff --git a/outside/anachronism/include/anachronism/parser.h b/outside/anachronism/include/anachronism/parser.h deleted file mode 100644 index 8309ee5ae..000000000 --- a/outside/anachronism/include/anachronism/parser.h +++ /dev/null @@ -1,73 +0,0 @@ -#ifndef ANACHRONISM_PARSER_H -#define ANACHRONISM_PARSER_H - -#include - -typedef enum telnet_parser_event_type -{ - TELNET_EV_PARSER_DATA, - TELNET_EV_PARSER_COMMAND, - TELNET_EV_PARSER_OPTION, - TELNET_EV_PARSER_SUBNEGOTIATION, - TELNET_EV_PARSER_WARNING, -} telnet_parser_event_type; - -typedef struct telnet_parser_event -{ - telnet_parser_event_type type; -} telnet_parser_event; - -typedef struct telnet_parser_data_event -{ - telnet_parser_event SUPER_; - const telnet_byte* data; - size_t length; -} telnet_parser_data_event; - -typedef struct telnet_parser_command_event -{ - telnet_parser_event SUPER_; - telnet_byte command; -} telnet_parser_command_event; - -typedef struct telnet_parser_option_event -{ - telnet_parser_event SUPER_; - telnet_byte command; - telnet_byte option; -} telnet_parser_option_event; - -typedef struct telnet_parser_subnegotiation_event -{ - telnet_parser_event SUPER_; - int active; - telnet_byte option; -} telnet_parser_subnegotiation_event; - -typedef struct telnet_parser_warning_event -{ - telnet_parser_event SUPER_; - const char* message; - size_t position; -} telnet_parser_warning_event; - - - -typedef struct telnet_parser telnet_parser; - -typedef void (*telnet_parser_callback)(telnet_parser* parser, telnet_parser_event* event); - - -telnet_parser* telnet_parser_new(void* userdata, telnet_parser_callback callback); -void telnet_parser_free(telnet_parser* parser); - -telnet_error telnet_parser_get_userdata(telnet_parser* parser, void** userdata); - -telnet_error telnet_parser_parse(telnet_parser* parser, - const telnet_byte* data, - size_t length, - size_t* bytes_used); - -telnet_error telnet_parser_interrupt(telnet_parser* parser); - -#endif // ANACHRONISM_PARSER_H diff --git a/outside/anachronism/src/README.md b/outside/anachronism/src/README.md deleted file mode 100644 index 8ee680823..000000000 --- a/outside/anachronism/src/README.md +++ /dev/null @@ -1,6 +0,0 @@ -* parser_common.rl -
The language-agnostic Ragel grammar for the Telnet protocol. -* parser.rl -
The C implementation of the Ragel grammar. Compiled to parser.c by Ragel. -* nvt.c -
The core implementation of Anachronism's NVT and Channel constructs. diff --git a/outside/anachronism/src/nvt.c b/outside/anachronism/src/nvt.c deleted file mode 100644 index f33d93f75..000000000 --- a/outside/anachronism/src/nvt.c +++ /dev/null @@ -1,631 +0,0 @@ -#include -#include -#include -#include - - -#define TELOPT_TOGGLE_CALLBACK(nvt, telopt, where_, status_) do { \ - if ((nvt)->telopt_callback) { \ - telnet_telopt_toggle_event ev; \ - ev.SUPER_.type = TELNET_EV_TELOPT_TOGGLE; \ - ev.where = (where_); \ - ev.status = (status_); \ - \ - (nvt)->telopt_callback((nvt), (telopt), (telnet_telopt_event*)&ev); \ - } \ -} while (0) - -#define TELOPT_FOCUS_CALLBACK(nvt, telopt, status_) do { \ - if ((nvt)->telopt_callback) { \ - telnet_telopt_focus_event ev; \ - ev.SUPER_.type = TELNET_EV_TELOPT_FOCUS; \ - ev.status = (status_); \ - \ - (nvt)->telopt_callback((nvt), (telopt), (telnet_telopt_event*)&ev); \ - } \ -} while (0) - -#define TELOPT_DATA_CALLBACK(nvt, telopt, data_, length_) do { \ - if ((nvt)->telopt_callback) { \ - telnet_telopt_data_event ev; \ - ev.SUPER_.type = TELNET_EV_TELOPT_DATA; \ - ev.data = (data_); \ - ev.length = (length_); \ - \ - (nvt)->telopt_callback((nvt), (telopt), (telnet_telopt_event*)&ev); \ - } \ -} while (0) - -#define SEND_CALLBACK(nvt, data_, length_) do { \ - if ((nvt)->callback) { \ - telnet_send_event ev; \ - ev.SUPER_.type = TELNET_EV_SEND; \ - ev.data = (data_); \ - ev.length = (length_); \ - \ - (nvt)->callback((nvt), (telnet_event*)&ev); \ - } \ -} while (0) - - -// Q Method of Implementing TELNET Option Negotiation -// ftp://ftp.rfc-editor.org/in-notes/rfc1143.txt -typedef enum qstate { - Q_NO = 0, Q_WANTYES, Q_WANTYESNO, - Q_YES, Q_WANTNO, Q_WANTNOYES, -} qstate; - -typedef struct telnet_qstate -{ - unsigned remote : 3; - unsigned local : 3; -} telnet_qstate; - -struct telnet_nvt -{ - telnet_parser* parser; - telnet_qstate options[256]; // track the state of each subnegotiation option - short current_remote; - - telnet_nvt_event_callback callback; - telnet_telopt_event_callback telopt_callback; - telnet_negotiate_event_callback negotiate_callback; - - void* userdata; -}; - -static unsigned char telopt_status(telnet_nvt* nvt, - telnet_byte telopt, - telnet_telopt_location where) -{ - unsigned int qval = (where == TELNET_LOCAL) ? - nvt->options[telopt].local : - nvt->options[telopt].remote; - - switch (qval) { - case Q_YES: case Q_WANTNO: case Q_WANTNOYES: - return 1; - default: - return 0; - } -} -#define telopt_subnegotiable(nvt, telopt) (telopt_status((nvt), (telopt), TELNET_REMOTE) || telopt_status((nvt), (telopt), TELNET_LOCAL)) - - -static void send_option(telnet_nvt* nvt, telnet_byte command, telnet_byte telopt) -{ - const telnet_byte buf[] = {IAC_IAC, command, telopt}; - SEND_CALLBACK(nvt, buf, 3); -} - -static void process_option_event(telnet_nvt* nvt, - telnet_byte command, - telnet_byte telopt) -{ - telnet_qstate* q = &nvt->options[telopt]; - // Every qstate begins zeroed-out, and Q_NO is 0. - - switch (command) - { - case IAC_WILL: - switch (q->remote) - { - case Q_NO: - if (nvt->negotiate_callback && nvt->negotiate_callback(nvt, telopt, TELNET_REMOTE)) { - send_option(nvt, IAC_DO, telopt); - q->remote = Q_YES; - TELOPT_TOGGLE_CALLBACK(nvt, telopt, TELNET_REMOTE, 1); - } else { - send_option(nvt, IAC_DONT, telopt); - } - break; - case Q_WANTNO: - // error - q->remote = Q_NO; - break; - case Q_WANTNOYES: - // error - q->remote = Q_YES; - TELOPT_TOGGLE_CALLBACK(nvt, telopt, TELNET_REMOTE, 1); - break; - case Q_WANTYES: - q->remote = Q_YES; - TELOPT_TOGGLE_CALLBACK(nvt, telopt, TELNET_REMOTE, 1); - break; - case Q_WANTYESNO: - send_option(nvt, IAC_DONT, telopt); - q->remote = Q_WANTNO; - TELOPT_TOGGLE_CALLBACK(nvt, telopt, TELNET_REMOTE, 1); - break; - } - break; - case IAC_WONT: - switch (q->remote) - { - case Q_YES: - send_option(nvt, IAC_DONT, telopt); - q->remote = Q_NO; - TELOPT_TOGGLE_CALLBACK(nvt, telopt, TELNET_REMOTE, 0); - break; - case Q_WANTNO: - q->remote = Q_NO; - break; - case Q_WANTNOYES: - send_option(nvt, IAC_DO, telopt); - q->remote = Q_WANTYES; - break; - case Q_WANTYES: - q->remote = Q_NO; - break; - case Q_WANTYESNO: - q->remote = Q_NO; - break; - } - break; - case IAC_DO: - switch (q->local) - { - case Q_NO: - if (nvt->negotiate_callback && nvt->negotiate_callback(nvt, telopt, TELNET_LOCAL)) { - send_option(nvt, IAC_WILL, telopt); - q->local = Q_YES; - TELOPT_TOGGLE_CALLBACK(nvt, telopt, TELNET_LOCAL, 1); - } else { - send_option(nvt, IAC_WONT, telopt); - } - break; - case Q_WANTNO: - // error - q->local = Q_NO; - break; - case Q_WANTNOYES: - // error - q->local = Q_YES; - TELOPT_TOGGLE_CALLBACK(nvt, telopt, TELNET_LOCAL, 1); - break; - case Q_WANTYES: - q->local = Q_YES; - TELOPT_TOGGLE_CALLBACK(nvt, telopt, TELNET_LOCAL, 1); - break; - case Q_WANTYESNO: - send_option(nvt, IAC_WONT, telopt); - q->local = Q_WANTNO; - TELOPT_TOGGLE_CALLBACK(nvt, telopt, TELNET_LOCAL, 1); - break; - } - break; - case IAC_DONT: - switch (q->local) - { - case Q_YES: - send_option(nvt, IAC_DONT, telopt); - q->local = Q_NO; - TELOPT_TOGGLE_CALLBACK(nvt, telopt, TELNET_LOCAL, 0); - break; - case Q_WANTNO: - q->local = Q_NO; - break; - case Q_WANTNOYES: - send_option(nvt, IAC_WILL, telopt); - q->local = Q_WANTYES; - break; - case Q_WANTYES: - q->local = Q_NO; - break; - case Q_WANTYESNO: - q->local = Q_NO; - break; - } - break; - } -} - -static void process_data_event(telnet_nvt* nvt, - const telnet_byte* data, - size_t length) -{ - if (nvt->current_remote == -1) { - // Main-line data - if (nvt->callback) { - telnet_data_event ev; - ev.SUPER_.type = TELNET_EV_DATA; - ev.data = data; - ev.length = length; - nvt->callback(nvt, (telnet_event*)&ev); - } - } else { - // Telopt data - telnet_byte telopt = (telnet_byte)nvt->current_remote; - - if (nvt->telopt_callback) { - // Make sure the telopt is enabled - if (telopt_subnegotiable(nvt, telopt)) { - telnet_telopt_data_event ev; - ev.SUPER_.type = TELNET_EV_TELOPT_DATA; - ev.data = data; - ev.length = length; - nvt->telopt_callback(nvt, telopt, (telnet_telopt_event*)&ev); - } - } - } -} - -static void process_subnegotiation_event(telnet_nvt* nvt, - int open, - telnet_byte telopt) -{ - if (open) { - nvt->current_remote = telopt; - } else { - nvt->current_remote = -1; - } - - if (nvt->telopt_callback) { - // Make sure the telopt is enabled - if (telopt_subnegotiable(nvt, telopt)) { - telnet_telopt_focus_event ev; - ev.SUPER_.type = TELNET_EV_TELOPT_FOCUS; - ev.focus = open; - nvt->telopt_callback(nvt, telopt, (telnet_telopt_event*)&ev); - } - } -} - -static void process_event(telnet_parser* parser, telnet_parser_event* event) -{ - telnet_nvt* nvt = NULL; - telnet_parser_get_userdata(parser, (void*)&nvt); - - switch (event->type) - { - case TELNET_EV_PARSER_DATA: - { - telnet_parser_data_event* ev = (telnet_parser_data_event*)event; - process_data_event(nvt, ev->data, ev->length); - break; - } - - case TELNET_EV_PARSER_OPTION: - { - telnet_parser_option_event* ev = (telnet_parser_option_event*)event; - process_option_event(nvt, ev->command, ev->option); - break; - } - - case TELNET_EV_PARSER_SUBNEGOTIATION: - { - telnet_parser_subnegotiation_event* ev = (telnet_parser_subnegotiation_event*)event; - process_subnegotiation_event(nvt, ev->active, ev->option); - break; - } - - case TELNET_EV_PARSER_COMMAND: - { - if (nvt->callback) { - telnet_parser_command_event* parser_ev = (telnet_parser_command_event*) event; - - telnet_command_event ev; - ev.SUPER_.type = TELNET_EV_COMMAND; - ev.command = parser_ev->command; - nvt->callback(nvt, (telnet_event*)&ev); - } - break; - } - - case TELNET_EV_PARSER_WARNING: - { - if (nvt->callback) { - telnet_parser_warning_event* parser_ev = (telnet_parser_warning_event*) event; - - telnet_warning_event ev; - ev.SUPER_.type = TELNET_EV_WARNING; - ev.message = parser_ev->message; - ev.position = parser_ev->position; - nvt->callback(nvt, (telnet_event*)&ev); - } - break; - } - - default: - break; - } -} - - -telnet_nvt* telnet_nvt_new(void* userdata, - telnet_nvt_event_callback nvt_callback, - telnet_telopt_event_callback telopt_callback, - telnet_negotiate_event_callback negotiate_callback) -{ - telnet_nvt* nvt = malloc(sizeof(telnet_nvt)); - if (nvt) - { - telnet_parser* parser = telnet_parser_new((void*)nvt, &process_event); - if (parser) - { - memset(nvt, 0, sizeof(*nvt)); - nvt->parser = parser; - nvt->callback = nvt_callback; - nvt->telopt_callback = telopt_callback; - nvt->negotiate_callback = negotiate_callback; - nvt->userdata = userdata; - nvt->current_remote = -1; - } - else - { - free(nvt); - nvt = NULL; - } - } - return nvt; -} - -void telnet_nvt_free(telnet_nvt* nvt) -{ - if (nvt) - { - telnet_parser_free(nvt->parser); - free(nvt); - } -} - -telnet_error telnet_get_userdata(telnet_nvt* nvt, void** userdata) -{ - if (!nvt) - return TELNET_E_BAD_NVT; - - *userdata = nvt->userdata; - return TELNET_E_OK; -} - -telnet_error telnet_receive(telnet_nvt* nvt, const telnet_byte* data, size_t length, size_t* bytes_used) -{ - if (!nvt) - return TELNET_E_BAD_NVT; - - return telnet_parser_parse(nvt->parser, data, length, bytes_used); -} - -telnet_error telnet_interrupt(telnet_nvt* nvt) -{ - if (!nvt) - return TELNET_E_BAD_NVT; - - return telnet_parser_interrupt(nvt->parser); -} - - -static int safe_concat(const telnet_byte* in, size_t inlen, telnet_byte* out, size_t outlen) -{ - // Copy as much as possible into the buffer. - memcpy(out, in, (outlen < inlen) ? outlen : inlen); - - // true if everything could be copied, false otherwise - return outlen >= inlen; -} - -// Escapes any special characters in data, writing the result data to out. -// Returns -1 if not everything could be copied (and out is full). -// Otherwise returns the length of the data in out. -// -// To avoid potential -1 return values, pass in an out buffer double the length of the data buffer. -static size_t telnet_escape(const telnet_byte* data, size_t length, telnet_byte* out, size_t outsize) -{ - if (data == NULL || out == NULL) - return 0; - - size_t outlen = 0; - size_t left = 0; - size_t right = 0; - const char* seq = NULL; - for (; right < length; ++right) - { - switch (data[right]) - { - case IAC_IAC: - seq = "\xFF\xFF"; - break; - case '\r': - // Only escape \r if it doesn't immediately precede \n. - if (right + 1 >= length || data[right+1] != '\n') - { - seq = "\r\0"; - break; - } - // !!FALLTHROUGH!! - default: - continue; // Move to the next character - } - - // Add any normal data that hasn't been added yet. - if (safe_concat(data+left, right-left, out+outlen, outsize-outlen) == 0) - return -1; - outlen += right - left; - left = right + 1; - - // Add the escape sequence. - if (safe_concat((const telnet_byte*)seq, 2, out+outlen, outsize-outlen) == 0) - return -1; - outlen += 2; - } - - // Add any leftover normal data. - if (left < right) - { - if (safe_concat(data+left, right-left, out+outlen, outsize-outlen) == 0) - return -1; - outlen += right - left; - } - - return outlen; -} - -telnet_error telnet_send_data(telnet_nvt* nvt, const telnet_byte* data, const size_t length) -{ - if (!nvt) - return TELNET_E_BAD_NVT; - else if (!nvt->callback) - return TELNET_E_OK; // immediate success since they apparently don't want the data to go anywhere - - // Due to the nature of the protocol, the most any one byte can be encoded as is two bytes. - // Hence, the smallest buffer guaranteed to contain any input is double the length of the source. - size_t bufsize = sizeof(telnet_byte) * length * 2; - telnet_byte* buf = malloc(bufsize); - if (!buf) - return TELNET_E_ALLOC; - - bufsize = telnet_escape(data, length, buf, bufsize); - - SEND_CALLBACK(nvt, buf, bufsize); - - free(buf); - buf = NULL; - - return TELNET_E_OK; -} - -telnet_error telnet_send_command(telnet_nvt* nvt, const telnet_byte command) -{ - if (!nvt) - return TELNET_E_BAD_NVT; - else if (command >= IAC_SB || command == IAC_SE) - return TELNET_E_INVALID_COMMAND; // Invalid command - - const telnet_byte buf[] = {IAC_IAC, command}; - SEND_CALLBACK(nvt, buf, 2); - - return TELNET_E_OK; -} - -telnet_error telnet_send_subnegotiation(telnet_nvt* nvt, const telnet_byte option, const telnet_byte* data, const size_t length) -{ - if (!nvt) - return TELNET_E_BAD_NVT; - else if (!telopt_subnegotiable(nvt, option)) - return TELNET_E_NOT_SUBNEGOTIABLE; - else if (!nvt->callback) - return TELNET_E_OK; - - // length*2 is the maximum buffer size needed for an escaped string. - // The extra five bytes are for the IAC, SB,
begins -with an [open tag](#open-tag), [HTML comment](#html-comment), -[processing instruction](#processing-instruction), -[declaration](#declaration), or [CDATA section](#cdata-section). -This opening element may optionally be preceded by 1-3 spaces, -and must not be followed on a line by anything other than white space. - -If the opening tag is self-closing, or if it is an [HTML -comment](#html-comment), [processing -instruction](#processing-instruction), [declaration](#declaration), or -[CDATA section](#cdata-section), then the [HTML block](#html-block) -contains just that tag. - -If it is an [open tag](#open-tag), then the [HTML block](#html-block) -continues until a matching closing tag is found, or until the end -of the document. Note that the matching closing tag is not necessarily -the first closing tag of the same type that is encountered, since -that tag may close a later open tag of the same type. Open and closing -tags must be balanced. - -The contents of the HTML block are interpreted as raw HTML, and will not -be escaped in HTML output. - -Some simple examples: - -. - - - - -
- hi -
- -okay. -. - - - - -
- hi -
-

okay.

-. - - -. -
- -
- -

fooö

- -
- -
-. -
- -
- -

fooö

- -
- -
-. - -A self-closing tag: - -. -
-. -
-. - -Here we have an unclosed tag, and the block continues to the end of -the document: - -. -
-
-foo -
- -*bar* -. -
-
-foo -
- -*bar* -. - -A comment: - -. - -. - -. - -A processing instruction: - -. - -. - -. - -CDATA: - -. - -. - -. - -The opening tag can be indented 1-3 spaces, but not 4: - -. - - -. - -
<!-- foo -->
-
-. - -The opening tag must be on a line (or lines) by itself: - -. -
-foo -
-. -

foo

-. - -. -bar -. -

bar

-. - -The opening tag need not be an HTML block tag or even an HTML tag: - -. -
-foo - -. - -foo - -. - -. - -bar - -. - -bar - -. - -So, note the difference: - -. - -bar - - -bar -. - -bar - -

bar

-. - -This rule differs from John Gruber's original markdown syntax -specification, which says: - -> The only restrictions are that block-level HTML elements — -> e.g. `
`, ``, `
`, `

`, etc. — must be separated from -> surrounding content by blank lines, and the start and end tags of the -> block should not be indented with tabs or spaces. - -In some ways Gruber's rule is more restrictive than the one given -here: - -- It requires that an HTML block be preceded and followed by a blank line. -- It does not allow the start tag to be indented. -- It does not allow the end tag to be indented. -- It does not require that the open tag be an HTML block-level tag. - -Indeed, most markdown implementations, including some of Gruber's -own perl implementations, do not impose these restrictions. - -However, unlike Gruber's rule, this one requires that the open -tag be on a line by itself. It also differs from most markdown -implementations in how it handles the case where there is no matching -closing tag (a case not mentioned in Gruber's rule). In such a case, -the rule stated above includes the whole rest of the document in the -HTML block. - diff --git a/outside/commonmark/api_test/CMakeLists.txt b/outside/commonmark/api_test/CMakeLists.txt deleted file mode 100644 index f64961fde..000000000 --- a/outside/commonmark/api_test/CMakeLists.txt +++ /dev/null @@ -1,25 +0,0 @@ -add_executable(api_test - cplusplus.cpp - harness.c - harness.h - main.c -) -include_directories( - ${PROJECT_SOURCE_DIR}/src - ${PROJECT_BINARY_DIR}/src -) -target_link_libraries(api_test libcmark) - -# Compiler flags -if(MSVC) - # Force to always compile with W4 - if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]") - string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") - else() - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4") - endif() - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4127 /wd4244 /wd4267 /wd4706 /wd4800 /D_CRT_SECURE_NO_WARNINGS") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /TP") -elseif(CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -std=c99 -pedantic") -endif() diff --git a/outside/commonmark/api_test/cplusplus.cpp b/outside/commonmark/api_test/cplusplus.cpp deleted file mode 100644 index ea64b0617..000000000 --- a/outside/commonmark/api_test/cplusplus.cpp +++ /dev/null @@ -1,15 +0,0 @@ -#include - -#include "cmark.h" - -#include "harness.h" - -extern "C" void -test_cplusplus(test_batch_runner *runner) -{ - static const char md[] = "paragraph\n"; - char *html = cmark_markdown_to_html(md, sizeof(md) - 1); - STR_EQ(runner, html, "

paragraph

\n", "libcmark works with C++"); - free(html); -} - diff --git a/outside/commonmark/api_test/harness.c b/outside/commonmark/api_test/harness.c deleted file mode 100644 index e8f320c54..000000000 --- a/outside/commonmark/api_test/harness.c +++ /dev/null @@ -1,102 +0,0 @@ -#include -#include -#include -#include - -#include "harness.h" - -test_batch_runner* -test_batch_runner_new() -{ - return (test_batch_runner *)calloc(1, sizeof(test_batch_runner)); -} - -static void -test_result(test_batch_runner *runner, int cond, const char *msg, va_list ap) -{ - ++runner->test_num; - - if (cond) { - ++runner->num_passed; - } - else { - fprintf(stderr, "FAILED test %d: ", runner->test_num); - vfprintf(stderr, msg, ap); - fprintf(stderr, "\n"); - ++runner->num_failed; - } -} - -void -SKIP(test_batch_runner *runner, int num_tests) -{ - runner->test_num += num_tests; - runner->num_skipped += num_tests; -} - -void -OK(test_batch_runner *runner, int cond, const char *msg, ...) -{ - va_list ap; - va_start(ap, msg); - test_result(runner, cond, msg, ap); - va_end(ap); -} - -void -INT_EQ(test_batch_runner *runner, int got, int expected, const char *msg, ...) -{ - int cond = got == expected; - - va_list ap; - va_start(ap, msg); - test_result(runner, cond, msg, ap); - va_end(ap); - - if (!cond) { - fprintf(stderr, " Got: %d\n", got); - fprintf(stderr, " Expected: %d\n", expected); - } -} - -void -STR_EQ(test_batch_runner *runner, const char *got, const char *expected, - const char *msg, ...) -{ - int cond = strcmp(got, expected) == 0; - - va_list ap; - va_start(ap, msg); - test_result(runner, cond, msg, ap); - va_end(ap); - - if (!cond) { - fprintf(stderr, " Got: \"%s\"\n", got); - fprintf(stderr, " Expected: \"%s\"\n", expected); - } -} - -int -test_ok(test_batch_runner *runner) -{ - return runner->num_failed == 0; -} - -void -test_print_summary(test_batch_runner *runner) -{ - int num_passed = runner->num_passed; - int num_skipped = runner->num_skipped; - int num_failed = runner->num_failed; - - fprintf(stderr, "%d tests passed, %d failed, %d skipped\n", - num_passed, num_failed, num_skipped); - - if (test_ok(runner)) { - fprintf(stderr, "PASS\n"); - } - else { - fprintf(stderr, "FAIL\n"); - } -} - diff --git a/outside/commonmark/api_test/harness.h b/outside/commonmark/api_test/harness.h deleted file mode 100644 index 55a623228..000000000 --- a/outside/commonmark/api_test/harness.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef CMARK_API_TEST_HARNESS_H -#define CMARK_API_TEST_HARNESS_H - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct { - int test_num; - int num_passed; - int num_failed; - int num_skipped; -} test_batch_runner; - -test_batch_runner* -test_batch_runner_new(); - -void -SKIP(test_batch_runner *runner, int num_tests); - -void -OK(test_batch_runner *runner, int cond, const char *msg, ...); - -void -INT_EQ(test_batch_runner *runner, int got, int expected, const char *msg, ...); - -void -STR_EQ(test_batch_runner *runner, const char *got, const char *expected, - const char *msg, ...); - -int -test_ok(test_batch_runner *runner); - -void -test_print_summary(test_batch_runner *runner); - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/outside/commonmark/api_test/main.c b/outside/commonmark/api_test/main.c deleted file mode 100644 index 1f42807e0..000000000 --- a/outside/commonmark/api_test/main.c +++ /dev/null @@ -1,622 +0,0 @@ -#include -#include -#include - -#define CMARK_NO_SHORT_NAMES -#include "cmark.h" -#include "node.h" - -#include "harness.h" - -#define UTF8_REPL "\xEF\xBF\xBD" - -void -test_cplusplus(test_batch_runner *runner); - -static const cmark_node_type node_types[] = { - CMARK_NODE_DOCUMENT, - CMARK_NODE_BLOCK_QUOTE, - CMARK_NODE_LIST, - CMARK_NODE_LIST_ITEM, - CMARK_NODE_CODE_BLOCK, - CMARK_NODE_HTML, - CMARK_NODE_PARAGRAPH, - CMARK_NODE_HEADER, - CMARK_NODE_HRULE, - CMARK_NODE_REFERENCE_DEF, - CMARK_NODE_TEXT, - CMARK_NODE_SOFTBREAK, - CMARK_NODE_LINEBREAK, - CMARK_NODE_INLINE_CODE, - CMARK_NODE_INLINE_HTML, - CMARK_NODE_EMPH, - CMARK_NODE_STRONG, - CMARK_NODE_LINK, - CMARK_NODE_IMAGE -}; -static const int num_node_types = sizeof(node_types) / sizeof(*node_types); - -static void -test_md_to_html(test_batch_runner *runner, const char *markdown, - const char *expected_html, const char *msg); - -static void -test_content(test_batch_runner *runner, cmark_node_type type, - int allowed_content); - -static void -test_char(test_batch_runner *runner, int valid, const char *utf8, - const char *msg); - -static void -test_incomplete_char(test_batch_runner *runner, const char *utf8, - const char *msg); - -static void -test_continuation_byte(test_batch_runner *runner, const char *utf8); - -static void -constructor(test_batch_runner *runner) -{ - for (int i = 0; i < num_node_types; ++i) { - cmark_node_type type = node_types[i]; - cmark_node *node = cmark_node_new(type); - OK(runner, node != NULL, "new type %d", type); - INT_EQ(runner, cmark_node_get_type(node), type, - "get_type %d", type); - - switch (node->type) { - case CMARK_NODE_HEADER: - INT_EQ(runner, cmark_node_get_header_level(node), 1, - "default header level is 1"); - node->as.header.level = 1; - break; - - case CMARK_NODE_LIST: - INT_EQ(runner, cmark_node_get_list_type(node), - CMARK_BULLET_LIST, - "default is list type is bullet"); - INT_EQ(runner, cmark_node_get_list_start(node), 1, - "default is list start is 1"); - INT_EQ(runner, cmark_node_get_list_tight(node), 0, - "default is list is loose"); - break; - - default: - break; - } - - cmark_node_free(node); - } -} - -static void -accessors(test_batch_runner *runner) -{ - static const char markdown[] = - "## Header\n" - "\n" - "* Item 1\n" - "* Item 2\n" - "\n" - "2. Item 1\n" - "\n" - "3. Item 2\n" - "\n" - "\n" - " code\n" - "\n" - "``` lang\n" - "fenced\n" - "```\n" - "\n" - "
html
\n" - "\n" - "[link](url 'title')\n"; - - cmark_node *doc = cmark_parse_document(markdown, sizeof(markdown) - 1); - - // Getters - - cmark_node *header = cmark_node_first_child(doc); - INT_EQ(runner, cmark_node_get_header_level(header), 2, - "get_header_level"); - - cmark_node *bullet_list = cmark_node_next(header); - INT_EQ(runner, cmark_node_get_list_type(bullet_list), - CMARK_BULLET_LIST, "get_list_type bullet"); - INT_EQ(runner, cmark_node_get_list_tight(bullet_list), 1, - "get_list_tight tight"); - - cmark_node *ordered_list = cmark_node_next(bullet_list); - INT_EQ(runner, cmark_node_get_list_type(ordered_list), - CMARK_ORDERED_LIST, "get_list_type ordered"); - INT_EQ(runner, cmark_node_get_list_start(ordered_list), 2, - "get_list_start"); - INT_EQ(runner, cmark_node_get_list_tight(ordered_list), 0, - "get_list_tight loose"); - - cmark_node *code = cmark_node_next(ordered_list); - STR_EQ(runner, cmark_node_get_string_content(code), "code\n", - "get_string_content indented code"); - - cmark_node *fenced = cmark_node_next(code); - STR_EQ(runner, cmark_node_get_string_content(fenced), "fenced\n", - "get_string_content fenced code"); - STR_EQ(runner, cmark_node_get_fence_info(fenced), "lang", - "get_fence_info"); - - cmark_node *html = cmark_node_next(fenced); - STR_EQ(runner, cmark_node_get_string_content(html), - "
html
\n", "get_string_content html"); - - cmark_node *paragraph = cmark_node_next(html); - INT_EQ(runner, cmark_node_get_start_line(paragraph), 19, - "get_start_line"); - INT_EQ(runner, cmark_node_get_start_column(paragraph), 1, - "get_start_column"); - INT_EQ(runner, cmark_node_get_end_line(paragraph), 19, - "get_end_line"); - - cmark_node *link = cmark_node_first_child(paragraph); - STR_EQ(runner, cmark_node_get_url(link), "url", - "get_url"); - STR_EQ(runner, cmark_node_get_title(link), "title", - "get_title"); - - cmark_node *string = cmark_node_first_child(link); - STR_EQ(runner, cmark_node_get_string_content(string), "link", - "get_string_content string"); - - // Setters - - OK(runner, cmark_node_set_header_level(header, 3), - "set_header_level"); - - OK(runner, cmark_node_set_list_type(bullet_list, CMARK_ORDERED_LIST), - "set_list_type ordered"); - OK(runner, cmark_node_set_list_start(bullet_list, 3), - "set_list_start"); - OK(runner, cmark_node_set_list_tight(bullet_list, 0), - "set_list_tight loose"); - - OK(runner, cmark_node_set_list_type(ordered_list, CMARK_BULLET_LIST), - "set_list_type bullet"); - OK(runner, cmark_node_set_list_tight(ordered_list, 1), - "set_list_tight tight"); - - OK(runner, cmark_node_set_string_content(code, "CODE\n"), - "set_string_content indented code"); - - OK(runner, cmark_node_set_string_content(fenced, "FENCED\n"), - "set_string_content fenced code"); - OK(runner, cmark_node_set_fence_info(fenced, "LANG"), - "set_fence_info"); - - OK(runner, cmark_node_set_string_content(html, "
HTML
\n"), - "set_string_content html"); - - OK(runner, cmark_node_set_url(link, "URL"), - "set_url"); - OK(runner, cmark_node_set_title(link, "TITLE"), - "set_title"); - - OK(runner, cmark_node_set_string_content(string, "LINK"), - "set_string_content string"); - - char *rendered_html = cmark_render_html(doc); - static const char expected_html[] = - "

Header

\n" - "
    \n" - "
  1. \n" - "

    Item 1

    \n" - "
  2. \n" - "
  3. \n" - "

    Item 2

    \n" - "
  4. \n" - "
\n" - "
    \n" - "
  • Item 1
  • \n" - "
  • Item 2
  • \n" - "
\n" - "
CODE\n"
-		"
\n" - "
FENCED\n"
-		"
\n" - "
HTML
\n" - "

LINK

\n"; - STR_EQ(runner, rendered_html, expected_html, "setters work"); - free(rendered_html); - - // Getter errors - - INT_EQ(runner, cmark_node_get_header_level(bullet_list), 0, - "get_header_level error"); - INT_EQ(runner, cmark_node_get_list_type(header), CMARK_NO_LIST, - "get_list_type error"); - INT_EQ(runner, cmark_node_get_list_start(code), 0, - "get_list_start error"); - INT_EQ(runner, cmark_node_get_list_tight(fenced), 0, - "get_list_tight error"); - OK(runner, cmark_node_get_string_content(ordered_list) == NULL, - "get_string_content error"); - OK(runner, cmark_node_get_fence_info(paragraph) == NULL, - "get_fence_info error"); - OK(runner, cmark_node_get_url(html) == NULL, - "get_url error"); - OK(runner, cmark_node_get_title(header) == NULL, - "get_title error"); - - // Setter errors - - OK(runner, !cmark_node_set_header_level(bullet_list, 3), - "set_header_level error"); - OK(runner, !cmark_node_set_list_type(header, CMARK_ORDERED_LIST), - "set_list_type error"); - OK(runner, !cmark_node_set_list_start(code, 3), - "set_list_start error"); - OK(runner, !cmark_node_set_list_tight(fenced, 0), - "set_list_tight error"); - OK(runner, !cmark_node_set_string_content(ordered_list, "content\n"), - "set_string_content error"); - OK(runner, !cmark_node_set_fence_info(paragraph, "lang"), - "set_fence_info error"); - OK(runner, !cmark_node_set_url(html, "url"), - "set_url error"); - OK(runner, !cmark_node_set_title(header, "title"), - "set_title error"); - - OK(runner, !cmark_node_set_header_level(header, 0), - "set_header_level too small"); - OK(runner, !cmark_node_set_header_level(header, 7), - "set_header_level too large"); - OK(runner, !cmark_node_set_list_type(bullet_list, CMARK_NO_LIST), - "set_list_type invalid"); - OK(runner, !cmark_node_set_list_start(bullet_list, -1), - "set_list_start negative"); - - cmark_node_free(doc); -} - -static void -node_check(test_batch_runner *runner) { - // Construct an incomplete tree. - cmark_node *doc = cmark_node_new(CMARK_NODE_DOCUMENT); - cmark_node *p1 = cmark_node_new(CMARK_NODE_PARAGRAPH); - cmark_node *p2 = cmark_node_new(CMARK_NODE_PARAGRAPH); - doc->first_child = p1; - p1->next = p2; - - INT_EQ(runner, cmark_node_check(doc, NULL), 4, "node_check works"); - INT_EQ(runner, cmark_node_check(doc, NULL), 0, - "node_check fixes tree"); - - cmark_node_free(doc); -} - -static void -create_tree(test_batch_runner *runner) -{ - char *html; - cmark_node *doc = cmark_node_new(CMARK_NODE_DOCUMENT); - - cmark_node *p = cmark_node_new(CMARK_NODE_PARAGRAPH); - OK(runner, !cmark_node_insert_before(doc, p), - "insert before root fails"); - OK(runner, !cmark_node_insert_after(doc, p), - "insert after root fails"); - OK(runner, cmark_node_append_child(doc, p), "append1"); - INT_EQ(runner, cmark_node_check(doc, NULL), 0, "append1 consistent"); - OK(runner, cmark_node_parent(p) == doc, "node_parent"); - - cmark_node *emph = cmark_node_new(CMARK_NODE_EMPH); - OK(runner, cmark_node_prepend_child(p, emph), "prepend1"); - INT_EQ(runner, cmark_node_check(doc, NULL), 0, "prepend1 consistent"); - - cmark_node *str1 = cmark_node_new(CMARK_NODE_TEXT); - cmark_node_set_string_content(str1, "Hello, "); - OK(runner, cmark_node_prepend_child(p, str1), "prepend2"); - INT_EQ(runner, cmark_node_check(doc, NULL), 0, "prepend2 consistent"); - - cmark_node *str3 = cmark_node_new(CMARK_NODE_TEXT); - cmark_node_set_string_content(str3, "!"); - OK(runner, cmark_node_append_child(p, str3), "append2"); - INT_EQ(runner, cmark_node_check(doc, NULL), 0, "append2 consistent"); - - cmark_node *str2 = cmark_node_new(CMARK_NODE_TEXT); - cmark_node_set_string_content(str2, "world"); - OK(runner, cmark_node_append_child(emph, str2), "append3"); - INT_EQ(runner, cmark_node_check(doc, NULL), 0, "append3 consistent"); - - html = cmark_render_html(doc); - STR_EQ(runner, html, "

Hello, world!

\n", - "render_html"); - free(html); - - OK(runner, cmark_node_insert_before(str1, str3), "ins before1"); - INT_EQ(runner, cmark_node_check(doc, NULL), 0, - "ins before1 consistent"); - // 31e - OK(runner, cmark_node_first_child(p) == str3, "ins before1 works"); - - OK(runner, cmark_node_insert_before(str1, emph), "ins before2"); - INT_EQ(runner, cmark_node_check(doc, NULL), 0, - "ins before2 consistent"); - // 3e1 - OK(runner, cmark_node_last_child(p) == str1, "ins before2 works"); - - OK(runner, cmark_node_insert_after(str1, str3), "ins after1"); - INT_EQ(runner, cmark_node_check(doc, NULL), 0, - "ins after1 consistent"); - // e13 - OK(runner, cmark_node_next(str1) == str3, "ins after1 works"); - - OK(runner, cmark_node_insert_after(str1, emph), "ins after2"); - INT_EQ(runner, cmark_node_check(doc, NULL), 0, - "ins after2 consistent"); - // 1e3 - OK(runner, cmark_node_previous(emph) == str1, "ins after2 works"); - - cmark_node_unlink(emph); - - html = cmark_render_html(doc); - STR_EQ(runner, html, "

Hello, !

\n", - "render_html after shuffling"); - free(html); - - cmark_node_free(doc); - - // TODO: Test that the contents of an unlinked inline are valid - // after the parent block was destroyed. This doesn't work so far. - cmark_node_free(emph); -} - -void -hierarchy(test_batch_runner *runner) -{ - cmark_node *bquote1 = cmark_node_new(CMARK_NODE_BLOCK_QUOTE); - cmark_node *bquote2 = cmark_node_new(CMARK_NODE_BLOCK_QUOTE); - cmark_node *bquote3 = cmark_node_new(CMARK_NODE_BLOCK_QUOTE); - - OK(runner, cmark_node_append_child(bquote1, bquote2), - "append bquote2"); - OK(runner, cmark_node_append_child(bquote2, bquote3), - "append bquote3"); - OK(runner, !cmark_node_append_child(bquote3, bquote3), - "adding a node as child of itself fails"); - OK(runner, !cmark_node_append_child(bquote3, bquote1), - "adding a parent as child fails"); - - cmark_node_free(bquote1); - - int max_node_type = CMARK_NODE_LAST_BLOCK > CMARK_NODE_LAST_INLINE - ? CMARK_NODE_LAST_BLOCK : CMARK_NODE_LAST_INLINE; - OK(runner, max_node_type < 32, "all node types < 32"); - - int list_item_flag = 1 << CMARK_NODE_LIST_ITEM; - int top_level_blocks = - (1 << CMARK_NODE_BLOCK_QUOTE) | - (1 << CMARK_NODE_LIST) | - (1 << CMARK_NODE_CODE_BLOCK) | - (1 << CMARK_NODE_HTML) | - (1 << CMARK_NODE_PARAGRAPH) | - (1 << CMARK_NODE_HEADER) | - (1 << CMARK_NODE_HRULE) | - (1 << CMARK_NODE_REFERENCE_DEF); - int all_inlines = - (1 << CMARK_NODE_TEXT) | - (1 << CMARK_NODE_SOFTBREAK) | - (1 << CMARK_NODE_LINEBREAK) | - (1 << CMARK_NODE_INLINE_CODE) | - (1 << CMARK_NODE_INLINE_HTML) | - (1 << CMARK_NODE_EMPH) | - (1 << CMARK_NODE_STRONG) | - (1 << CMARK_NODE_LINK) | - (1 << CMARK_NODE_IMAGE); - - test_content(runner, CMARK_NODE_DOCUMENT, top_level_blocks); - test_content(runner, CMARK_NODE_BLOCK_QUOTE, top_level_blocks); - test_content(runner, CMARK_NODE_LIST, list_item_flag); - test_content(runner, CMARK_NODE_LIST_ITEM, top_level_blocks); - test_content(runner, CMARK_NODE_CODE_BLOCK , 0); - test_content(runner, CMARK_NODE_HTML, 0); - test_content(runner, CMARK_NODE_PARAGRAPH, all_inlines); - test_content(runner, CMARK_NODE_HEADER, all_inlines); - test_content(runner, CMARK_NODE_HRULE, 0); - test_content(runner, CMARK_NODE_REFERENCE_DEF, 0); - test_content(runner, CMARK_NODE_TEXT, 0); - test_content(runner, CMARK_NODE_SOFTBREAK, 0); - test_content(runner, CMARK_NODE_LINEBREAK, 0); - test_content(runner, CMARK_NODE_INLINE_CODE, 0); - test_content(runner, CMARK_NODE_INLINE_HTML, 0); - test_content(runner, CMARK_NODE_EMPH, all_inlines); - test_content(runner, CMARK_NODE_STRONG, all_inlines); - test_content(runner, CMARK_NODE_LINK, all_inlines); - test_content(runner, CMARK_NODE_IMAGE, all_inlines); -} - -static void -test_content(test_batch_runner *runner, cmark_node_type type, - int allowed_content) -{ - cmark_node *node = cmark_node_new(type); - - for (int i = 0; i < num_node_types; ++i) { - cmark_node_type child_type = node_types[i]; - cmark_node *child = cmark_node_new(child_type); - - int got = cmark_node_append_child(node, child); - int expected = (allowed_content >> child_type) & 1; - - INT_EQ(runner, got, expected, - "add %d as child of %d", child_type, type); - - cmark_node_free(child); - } - - cmark_node_free(node); -} - -static void -parser(test_batch_runner *runner) -{ - test_md_to_html(runner, "No newline", "

No newline

\n", - "document without trailing newline"); -} - -static void -render_html(test_batch_runner *runner) -{ - char *html; - - static const char markdown[] = - "foo *bar*\n" - "\n" - "paragraph 2\n"; - cmark_node *doc = cmark_parse_document(markdown, sizeof(markdown) - 1); - - cmark_node *paragraph = cmark_node_first_child(doc); - html = cmark_render_html(paragraph); - STR_EQ(runner, html, "

foo bar

\n", - "render single paragraph"); - free(html); - - cmark_node *string = cmark_node_first_child(paragraph); - html = cmark_render_html(string); - STR_EQ(runner, html, "foo ", "render single inline"); - free(html); - - cmark_node *emph = cmark_node_next(string); - html = cmark_render_html(emph); - STR_EQ(runner, html, "bar", "render inline with children"); - free(html); - - cmark_node_free(doc); -} - -static void -utf8(test_batch_runner *runner) -{ - // Ranges - test_char(runner, 1, "\x01", "valid utf8 01"); - test_char(runner, 1, "\x7F", "valid utf8 7F"); - test_char(runner, 0, "\x80", "invalid utf8 80"); - test_char(runner, 0, "\xBF", "invalid utf8 BF"); - test_char(runner, 0, "\xC0\x80", "invalid utf8 C080"); - test_char(runner, 0, "\xC1\xBF", "invalid utf8 C1BF"); - test_char(runner, 1, "\xC2\x80", "valid utf8 C280"); - test_char(runner, 1, "\xDF\xBF", "valid utf8 DFBF"); - test_char(runner, 0, "\xE0\x80\x80", "invalid utf8 E08080"); - test_char(runner, 0, "\xE0\x9F\xBF", "invalid utf8 E09FBF"); - test_char(runner, 1, "\xE0\xA0\x80", "valid utf8 E0A080"); - test_char(runner, 1, "\xED\x9F\xBF", "valid utf8 ED9FBF"); - test_char(runner, 0, "\xED\xA0\x80", "invalid utf8 EDA080"); - test_char(runner, 0, "\xED\xBF\xBF", "invalid utf8 EDBFBF"); - test_char(runner, 0, "\xF0\x80\x80\x80", "invalid utf8 F0808080"); - test_char(runner, 0, "\xF0\x8F\xBF\xBF", "invalid utf8 F08FBFBF"); - test_char(runner, 1, "\xF0\x90\x80\x80", "valid utf8 F0908080"); - test_char(runner, 1, "\xF4\x8F\xBF\xBF", "valid utf8 F48FBFBF"); - test_char(runner, 0, "\xF4\x90\x80\x80", "invalid utf8 F4908080"); - test_char(runner, 0, "\xF7\xBF\xBF\xBF", "invalid utf8 F7BFBFBF"); - test_char(runner, 0, "\xF8", "invalid utf8 F8"); - test_char(runner, 0, "\xFF", "invalid utf8 FF"); - - // Incomplete byte sequences at end of input - test_incomplete_char(runner, "\xE0\xA0", "invalid utf8 E0A0"); - test_incomplete_char(runner, "\xF0\x90\x80", "invalid utf8 F09080"); - - // Invalid continuation bytes - test_continuation_byte(runner, "\xC2\x80"); - test_continuation_byte(runner, "\xE0\xA0\x80"); - test_continuation_byte(runner, "\xF0\x90\x80\x80"); - - // Test string containing null character - static const char string_with_null[] = "((((\0))))"; - char *html = cmark_markdown_to_html(string_with_null, - sizeof(string_with_null) - 1); - STR_EQ(runner, html, "

((((" UTF8_REPL "))))

\n", - "utf8 with U+0000"); - free(html); -} - -static void -test_char(test_batch_runner *runner, int valid, const char *utf8, - const char *msg) -{ - char buf[20]; - sprintf(buf, "((((%s))))", utf8); - - if (valid) { - char expected[30]; - sprintf(expected, "

((((%s))))

\n", utf8); - test_md_to_html(runner, buf, expected, msg); - } - else { - test_md_to_html(runner, buf, "

((((" UTF8_REPL "))))

\n", - msg); - } -} - -static void -test_incomplete_char(test_batch_runner *runner, const char *utf8, - const char *msg) -{ - char buf[20]; - sprintf(buf, "----%s", utf8); - test_md_to_html(runner, buf, "

----" UTF8_REPL "

\n", msg); -} - -static void -test_continuation_byte(test_batch_runner *runner, const char *utf8) -{ - int len = strlen(utf8); - - for (int pos = 1; pos < len; ++pos) { - char buf[20]; - sprintf(buf, "((((%s))))", utf8); - buf[4+pos] = '\x20'; - - char expected[50]; - strcpy(expected, "

((((" UTF8_REPL "\x20"); - for (int i = pos + 1; i < len; ++i) { - strcat(expected, UTF8_REPL); - } - strcat(expected, "))))

\n"); - - char *html = cmark_markdown_to_html(buf, strlen(buf)); - STR_EQ(runner, html, expected, - "invalid utf8 continuation byte %d/%d", pos, len); - free(html); - } -} - -static void -test_md_to_html(test_batch_runner *runner, const char *markdown, - const char *expected_html, const char *msg) -{ - char *html = cmark_markdown_to_html(markdown, strlen(markdown)); - STR_EQ(runner, html, expected_html, msg); - free(html); -} - -int main() { - int retval; - test_batch_runner *runner = test_batch_runner_new(); - - constructor(runner); - accessors(runner); - node_check(runner); - create_tree(runner); - hierarchy(runner); - parser(runner); - render_html(runner); - utf8(runner); - test_cplusplus(runner); - - test_print_summary(runner); - retval = test_ok(runner) ? 0 : 1; - free(runner); - - return retval; -} - diff --git a/outside/commonmark/bench/statistics.py b/outside/commonmark/bench/statistics.py deleted file mode 100644 index 25a26d4aa..000000000 --- a/outside/commonmark/bench/statistics.py +++ /dev/null @@ -1,595 +0,0 @@ -## Module statistics.py -## -## Copyright (c) 2013 Steven D'Aprano . -## -## Licensed under the Apache License, Version 2.0 (the "License"); -## you may not use this file except in compliance with the License. -## You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. - - -""" -Basic statistics module. - -This module provides functions for calculating statistics of data, including -averages, variance, and standard deviation. - -Calculating averages --------------------- - -================== ============================================= -Function Description -================== ============================================= -mean Arithmetic mean (average) of data. -median Median (middle value) of data. -median_low Low median of data. -median_high High median of data. -median_grouped Median, or 50th percentile, of grouped data. -mode Mode (most common value) of data. -================== ============================================= - -Calculate the arithmetic mean ("the average") of data: - ->>> mean([-1.0, 2.5, 3.25, 5.75]) -2.625 - - -Calculate the standard median of discrete data: - ->>> median([2, 3, 4, 5]) -3.5 - - -Calculate the median, or 50th percentile, of data grouped into class intervals -centred on the data values provided. E.g. if your data points are rounded to -the nearest whole number: - ->>> median_grouped([2, 2, 3, 3, 3, 4]) #doctest: +ELLIPSIS -2.8333333333... - -This should be interpreted in this way: you have two data points in the class -interval 1.5-2.5, three data points in the class interval 2.5-3.5, and one in -the class interval 3.5-4.5. The median of these data points is 2.8333... - - -Calculating variability or spread ---------------------------------- - -================== ============================================= -Function Description -================== ============================================= -pvariance Population variance of data. -variance Sample variance of data. -pstdev Population standard deviation of data. -stdev Sample standard deviation of data. -================== ============================================= - -Calculate the standard deviation of sample data: - ->>> stdev([2.5, 3.25, 5.5, 11.25, 11.75]) #doctest: +ELLIPSIS -4.38961843444... - -If you have previously calculated the mean, you can pass it as the optional -second argument to the four "spread" functions to avoid recalculating it: - ->>> data = [1, 2, 2, 4, 4, 4, 5, 6] ->>> mu = mean(data) ->>> pvariance(data, mu) -2.5 - - -Exceptions ----------- - -A single exception is defined: StatisticsError is a subclass of ValueError. - -""" - -__all__ = [ 'StatisticsError', - 'pstdev', 'pvariance', 'stdev', 'variance', - 'median', 'median_low', 'median_high', 'median_grouped', - 'mean', 'mode', - ] - - -import collections -import math - -from fractions import Fraction -from decimal import Decimal - - -# === Exceptions === - -class StatisticsError(ValueError): - pass - - -# === Private utilities === - -def _sum(data, start=0): - """_sum(data [, start]) -> value - - Return a high-precision sum of the given numeric data. If optional - argument ``start`` is given, it is added to the total. If ``data`` is - empty, ``start`` (defaulting to 0) is returned. - - - Examples - -------- - - >>> _sum([3, 2.25, 4.5, -0.5, 1.0], 0.75) - 11.0 - - Some sources of round-off error will be avoided: - - >>> _sum([1e50, 1, -1e50] * 1000) # Built-in sum returns zero. - 1000.0 - - Fractions and Decimals are also supported: - - >>> from fractions import Fraction as F - >>> _sum([F(2, 3), F(7, 5), F(1, 4), F(5, 6)]) - Fraction(63, 20) - - >>> from decimal import Decimal as D - >>> data = [D("0.1375"), D("0.2108"), D("0.3061"), D("0.0419")] - >>> _sum(data) - Decimal('0.6963') - - Mixed types are currently treated as an error, except that int is - allowed. - """ - # We fail as soon as we reach a value that is not an int or the type of - # the first value which is not an int. E.g. _sum([int, int, float, int]) - # is okay, but sum([int, int, float, Fraction]) is not. - allowed_types = set([int, type(start)]) - n, d = _exact_ratio(start) - partials = {d: n} # map {denominator: sum of numerators} - # Micro-optimizations. - exact_ratio = _exact_ratio - partials_get = partials.get - # Add numerators for each denominator. - for x in data: - _check_type(type(x), allowed_types) - n, d = exact_ratio(x) - partials[d] = partials_get(d, 0) + n - # Find the expected result type. If allowed_types has only one item, it - # will be int; if it has two, use the one which isn't int. - assert len(allowed_types) in (1, 2) - if len(allowed_types) == 1: - assert allowed_types.pop() is int - T = int - else: - T = (allowed_types - set([int])).pop() - if None in partials: - assert issubclass(T, (float, Decimal)) - assert not math.isfinite(partials[None]) - return T(partials[None]) - total = Fraction() - for d, n in sorted(partials.items()): - total += Fraction(n, d) - if issubclass(T, int): - assert total.denominator == 1 - return T(total.numerator) - if issubclass(T, Decimal): - return T(total.numerator)/total.denominator - return T(total) - - -def _check_type(T, allowed): - if T not in allowed: - if len(allowed) == 1: - allowed.add(T) - else: - types = ', '.join([t.__name__ for t in allowed] + [T.__name__]) - raise TypeError("unsupported mixed types: %s" % types) - - -def _exact_ratio(x): - """Convert Real number x exactly to (numerator, denominator) pair. - - >>> _exact_ratio(0.25) - (1, 4) - - x is expected to be an int, Fraction, Decimal or float. - """ - try: - try: - # int, Fraction - return (x.numerator, x.denominator) - except AttributeError: - # float - try: - return x.as_integer_ratio() - except AttributeError: - # Decimal - try: - return _decimal_to_ratio(x) - except AttributeError: - msg = "can't convert type '{}' to numerator/denominator" - raise TypeError(msg.format(type(x).__name__)) from None - except (OverflowError, ValueError): - # INF or NAN - if __debug__: - # Decimal signalling NANs cannot be converted to float :-( - if isinstance(x, Decimal): - assert not x.is_finite() - else: - assert not math.isfinite(x) - return (x, None) - - -# FIXME This is faster than Fraction.from_decimal, but still too slow. -def _decimal_to_ratio(d): - """Convert Decimal d to exact integer ratio (numerator, denominator). - - >>> from decimal import Decimal - >>> _decimal_to_ratio(Decimal("2.6")) - (26, 10) - - """ - sign, digits, exp = d.as_tuple() - if exp in ('F', 'n', 'N'): # INF, NAN, sNAN - assert not d.is_finite() - raise ValueError - num = 0 - for digit in digits: - num = num*10 + digit - if exp < 0: - den = 10**-exp - else: - num *= 10**exp - den = 1 - if sign: - num = -num - return (num, den) - - -def _counts(data): - # Generate a table of sorted (value, frequency) pairs. - table = collections.Counter(iter(data)).most_common() - if not table: - return table - # Extract the values with the highest frequency. - maxfreq = table[0][1] - for i in range(1, len(table)): - if table[i][1] != maxfreq: - table = table[:i] - break - return table - - -# === Measures of central tendency (averages) === - -def mean(data): - """Return the sample arithmetic mean of data. - - >>> mean([1, 2, 3, 4, 4]) - 2.8 - - >>> from fractions import Fraction as F - >>> mean([F(3, 7), F(1, 21), F(5, 3), F(1, 3)]) - Fraction(13, 21) - - >>> from decimal import Decimal as D - >>> mean([D("0.5"), D("0.75"), D("0.625"), D("0.375")]) - Decimal('0.5625') - - If ``data`` is empty, StatisticsError will be raised. - """ - if iter(data) is data: - data = list(data) - n = len(data) - if n < 1: - raise StatisticsError('mean requires at least one data point') - return _sum(data)/n - - -# FIXME: investigate ways to calculate medians without sorting? Quickselect? -def median(data): - """Return the median (middle value) of numeric data. - - When the number of data points is odd, return the middle data point. - When the number of data points is even, the median is interpolated by - taking the average of the two middle values: - - >>> median([1, 3, 5]) - 3 - >>> median([1, 3, 5, 7]) - 4.0 - - """ - data = sorted(data) - n = len(data) - if n == 0: - raise StatisticsError("no median for empty data") - if n%2 == 1: - return data[n//2] - else: - i = n//2 - return (data[i - 1] + data[i])/2 - - -def median_low(data): - """Return the low median of numeric data. - - When the number of data points is odd, the middle value is returned. - When it is even, the smaller of the two middle values is returned. - - >>> median_low([1, 3, 5]) - 3 - >>> median_low([1, 3, 5, 7]) - 3 - - """ - data = sorted(data) - n = len(data) - if n == 0: - raise StatisticsError("no median for empty data") - if n%2 == 1: - return data[n//2] - else: - return data[n//2 - 1] - - -def median_high(data): - """Return the high median of data. - - When the number of data points is odd, the middle value is returned. - When it is even, the larger of the two middle values is returned. - - >>> median_high([1, 3, 5]) - 3 - >>> median_high([1, 3, 5, 7]) - 5 - - """ - data = sorted(data) - n = len(data) - if n == 0: - raise StatisticsError("no median for empty data") - return data[n//2] - - -def median_grouped(data, interval=1): - """"Return the 50th percentile (median) of grouped continuous data. - - >>> median_grouped([1, 2, 2, 3, 4, 4, 4, 4, 4, 5]) - 3.7 - >>> median_grouped([52, 52, 53, 54]) - 52.5 - - This calculates the median as the 50th percentile, and should be - used when your data is continuous and grouped. In the above example, - the values 1, 2, 3, etc. actually represent the midpoint of classes - 0.5-1.5, 1.5-2.5, 2.5-3.5, etc. The middle value falls somewhere in - class 3.5-4.5, and interpolation is used to estimate it. - - Optional argument ``interval`` represents the class interval, and - defaults to 1. Changing the class interval naturally will change the - interpolated 50th percentile value: - - >>> median_grouped([1, 3, 3, 5, 7], interval=1) - 3.25 - >>> median_grouped([1, 3, 3, 5, 7], interval=2) - 3.5 - - This function does not check whether the data points are at least - ``interval`` apart. - """ - data = sorted(data) - n = len(data) - if n == 0: - raise StatisticsError("no median for empty data") - elif n == 1: - return data[0] - # Find the value at the midpoint. Remember this corresponds to the - # centre of the class interval. - x = data[n//2] - for obj in (x, interval): - if isinstance(obj, (str, bytes)): - raise TypeError('expected number but got %r' % obj) - try: - L = x - interval/2 # The lower limit of the median interval. - except TypeError: - # Mixed type. For now we just coerce to float. - L = float(x) - float(interval)/2 - cf = data.index(x) # Number of values below the median interval. - # FIXME The following line could be more efficient for big lists. - f = data.count(x) # Number of data points in the median interval. - return L + interval*(n/2 - cf)/f - - -def mode(data): - """Return the most common data point from discrete or nominal data. - - ``mode`` assumes discrete data, and returns a single value. This is the - standard treatment of the mode as commonly taught in schools: - - >>> mode([1, 1, 2, 3, 3, 3, 3, 4]) - 3 - - This also works with nominal (non-numeric) data: - - >>> mode(["red", "blue", "blue", "red", "green", "red", "red"]) - 'red' - - If there is not exactly one most common value, ``mode`` will raise - StatisticsError. - """ - # Generate a table of sorted (value, frequency) pairs. - table = _counts(data) - if len(table) == 1: - return table[0][0] - elif table: - raise StatisticsError( - 'no unique mode; found %d equally common values' % len(table) - ) - else: - raise StatisticsError('no mode for empty data') - - -# === Measures of spread === - -# See http://mathworld.wolfram.com/Variance.html -# http://mathworld.wolfram.com/SampleVariance.html -# http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance -# -# Under no circumstances use the so-called "computational formula for -# variance", as that is only suitable for hand calculations with a small -# amount of low-precision data. It has terrible numeric properties. -# -# See a comparison of three computational methods here: -# http://www.johndcook.com/blog/2008/09/26/comparing-three-methods-of-computing-standard-deviation/ - -def _ss(data, c=None): - """Return sum of square deviations of sequence data. - - If ``c`` is None, the mean is calculated in one pass, and the deviations - from the mean are calculated in a second pass. Otherwise, deviations are - calculated from ``c`` as given. Use the second case with care, as it can - lead to garbage results. - """ - if c is None: - c = mean(data) - ss = _sum((x-c)**2 for x in data) - # The following sum should mathematically equal zero, but due to rounding - # error may not. - ss -= _sum((x-c) for x in data)**2/len(data) - assert not ss < 0, 'negative sum of square deviations: %f' % ss - return ss - - -def variance(data, xbar=None): - """Return the sample variance of data. - - data should be an iterable of Real-valued numbers, with at least two - values. The optional argument xbar, if given, should be the mean of - the data. If it is missing or None, the mean is automatically calculated. - - Use this function when your data is a sample from a population. To - calculate the variance from the entire population, see ``pvariance``. - - Examples: - - >>> data = [2.75, 1.75, 1.25, 0.25, 0.5, 1.25, 3.5] - >>> variance(data) - 1.3720238095238095 - - If you have already calculated the mean of your data, you can pass it as - the optional second argument ``xbar`` to avoid recalculating it: - - >>> m = mean(data) - >>> variance(data, m) - 1.3720238095238095 - - This function does not check that ``xbar`` is actually the mean of - ``data``. Giving arbitrary values for ``xbar`` may lead to invalid or - impossible results. - - Decimals and Fractions are supported: - - >>> from decimal import Decimal as D - >>> variance([D("27.5"), D("30.25"), D("30.25"), D("34.5"), D("41.75")]) - Decimal('31.01875') - - >>> from fractions import Fraction as F - >>> variance([F(1, 6), F(1, 2), F(5, 3)]) - Fraction(67, 108) - - """ - if iter(data) is data: - data = list(data) - n = len(data) - if n < 2: - raise StatisticsError('variance requires at least two data points') - ss = _ss(data, xbar) - return ss/(n-1) - - -def pvariance(data, mu=None): - """Return the population variance of ``data``. - - data should be an iterable of Real-valued numbers, with at least one - value. The optional argument mu, if given, should be the mean of - the data. If it is missing or None, the mean is automatically calculated. - - Use this function to calculate the variance from the entire population. - To estimate the variance from a sample, the ``variance`` function is - usually a better choice. - - Examples: - - >>> data = [0.0, 0.25, 0.25, 1.25, 1.5, 1.75, 2.75, 3.25] - >>> pvariance(data) - 1.25 - - If you have already calculated the mean of the data, you can pass it as - the optional second argument to avoid recalculating it: - - >>> mu = mean(data) - >>> pvariance(data, mu) - 1.25 - - This function does not check that ``mu`` is actually the mean of ``data``. - Giving arbitrary values for ``mu`` may lead to invalid or impossible - results. - - Decimals and Fractions are supported: - - >>> from decimal import Decimal as D - >>> pvariance([D("27.5"), D("30.25"), D("30.25"), D("34.5"), D("41.75")]) - Decimal('24.815') - - >>> from fractions import Fraction as F - >>> pvariance([F(1, 4), F(5, 4), F(1, 2)]) - Fraction(13, 72) - - """ - if iter(data) is data: - data = list(data) - n = len(data) - if n < 1: - raise StatisticsError('pvariance requires at least one data point') - ss = _ss(data, mu) - return ss/n - - -def stdev(data, xbar=None): - """Return the square root of the sample variance. - - See ``variance`` for arguments and other details. - - >>> stdev([1.5, 2.5, 2.5, 2.75, 3.25, 4.75]) - 1.0810874155219827 - - """ - var = variance(data, xbar) - try: - return var.sqrt() - except AttributeError: - return math.sqrt(var) - - -def pstdev(data, mu=None): - """Return the square root of the population variance. - - See ``pvariance`` for arguments and other details. - - >>> pstdev([1.5, 2.5, 2.5, 2.75, 3.25, 4.75]) - 0.986893273527251 - - """ - var = pvariance(data, mu) - try: - return var.sqrt() - except AttributeError: - return math.sqrt(var) diff --git a/outside/commonmark/bench/stats.py b/outside/commonmark/bench/stats.py deleted file mode 100644 index c244b419f..000000000 --- a/outside/commonmark/bench/stats.py +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env python3 - -import sys -import statistics - -def pairs(l, n): - return zip(*[l[i::n] for i in range(n)]) - -# data comes in pairs: -# n - time for running the program with no input -# m - time for running it with the benchmark input -# we measure (m - n) - -values = [ float(y) - float(x) for (x,y) in pairs(sys.stdin.readlines(),2)] - -print("mean = %.4f, median = %.4f, stdev = %.4f" % - (statistics.mean(values), statistics.median(values), - statistics.stdev(values))) - diff --git a/outside/commonmark/benchmarks.md b/outside/commonmark/benchmarks.md deleted file mode 100644 index 80a50fde6..000000000 --- a/outside/commonmark/benchmarks.md +++ /dev/null @@ -1,33 +0,0 @@ -# Benchmarks - -Some benchmarks, run on an ancient Thinkpad running Intel Core 2 Duo at 2GHz. - -|Implementation | Time (sec)| Factor | -|-------------------|-----------:|--------:| -| Markdown.pl | 2921.24 | 14606.2 | -| PHP markdown | 20.85 | 104.3 | -| kramdown | 20.83 | 104.1 | -| lunamark | 6.295 | 31.5 | -| cheapskate | 5.760 | 28.8 | -| peg-markdown | 5.450 | 27.3 | -| **commonmark.js** | 2.675 | 13.4 | -| marked | 1.855 | 9.3 | -| discount | 1.705 | 8.5 | -| **cmark** | 0.295 | 1.5 | -| sundown | 0.200 | 1.0 | - - -To run these benchmarks, use `make bench PROG=/path/to/program`. - -The input text is a 10MB Markdown file built by concatenating 20 copies -of the Markdown source of the first edition of [*Pro -Git*](https://github.com/progit/progit/tree/master/en) by Scott Chacon. - -`time` is used to measure execution speed. The reported -time is the *difference* between the time to run the program -with the benchmark input and the time to run it with no input. -(This procedure ensures that implementations in dynamic languages are -not prenalized by startup time.) A median of ten runs is taken. The -process is reniced to a high priority so that the system doesn't -interrupt runs. - diff --git a/outside/commonmark/changelog.spec b/outside/commonmark/changelog.spec deleted file mode 100644 index 4c834703d..000000000 --- a/outside/commonmark/changelog.spec +++ /dev/null @@ -1,10 +0,0 @@ -[since 0.12] - -* Updated path of test program. -* Use terminology "plain textual content" instead of "string." -* Added condition that conforming parsers strip or replace NULL characters. -* Changed Example 196 to reflect the spec's rules. It should not be a loose - list as it has no blank lines. -* Adjusted semantically insignificant formatting of HTML output. -* Added example to spec of shortcut link with following space (#214). - diff --git a/outside/commonmark/data/CaseFolding-3.2.0.txt b/outside/commonmark/data/CaseFolding-3.2.0.txt deleted file mode 100644 index 104a8237b..000000000 --- a/outside/commonmark/data/CaseFolding-3.2.0.txt +++ /dev/null @@ -1,912 +0,0 @@ -# CaseFolding-3.2.0.txt -# Date: 2002-03-22,20:54:33 GMT [MD] -# -# Case Folding Properties -# -# This file is a supplement to the UnicodeData file. -# It provides a case folding mapping generated from the Unicode Character Database. -# If all characters are mapped according to the full mapping below, then -# case differences (according to UnicodeData.txt and SpecialCasing.txt) -# are eliminated. -# -# The data supports both implementations that require simple case foldings -# (where string lengths don't change), and implementations that allow full case folding -# (where string lengths may grow). Note that where they can be supported, the -# full case foldings are superior: for example, they allow "MASSE" and "Mae" to match. -# -# NOTE: case folding does not preserve normalization formats! -# -# For information on case folding, see -# UTR #21 Case Mappings, at http://www.unicode.org/unicode/reports/tr21/ -# -# ================================================================================ -# Format -# ================================================================================ -# The entries in this file are in the following machine-readable format: -# -# ; ; ; # -# -# The status field is: -# C: common case folding, common mappings shared by both simple and full mappings. -# F: full case folding, mappings that cause strings to grow in length. Multiple characters are separated by spaces. -# S: simple case folding, mappings to single characters where different from F. -# T: special case for uppercase I and dotted uppercase I -# - For non-Turkic languages, this mapping is normally not used. -# - For Turkic languages (tr, az), this mapping can be used instead of the normal mapping for these characters. -# -# Usage: -# A. To do a simple case folding, use the mappings with status C + S. -# B. To do a full case folding, use the mappings with status C + F. -# -# The mappings with status T can be used or omitted depending on the desired case-folding -# behavior. (The default option is to exclude them.) -# -# ================================================================= - -0041; C; 0061; # LATIN CAPITAL LETTER A -0042; C; 0062; # LATIN CAPITAL LETTER B -0043; C; 0063; # LATIN CAPITAL LETTER C -0044; C; 0064; # LATIN CAPITAL LETTER D -0045; C; 0065; # LATIN CAPITAL LETTER E -0046; C; 0066; # LATIN CAPITAL LETTER F -0047; C; 0067; # LATIN CAPITAL LETTER G -0048; C; 0068; # LATIN CAPITAL LETTER H -0049; C; 0069; # LATIN CAPITAL LETTER I -0049; T; 0131; # LATIN CAPITAL LETTER I -004A; C; 006A; # LATIN CAPITAL LETTER J -004B; C; 006B; # LATIN CAPITAL LETTER K -004C; C; 006C; # LATIN CAPITAL LETTER L -004D; C; 006D; # LATIN CAPITAL LETTER M -004E; C; 006E; # LATIN CAPITAL LETTER N -004F; C; 006F; # LATIN CAPITAL LETTER O -0050; C; 0070; # LATIN CAPITAL LETTER P -0051; C; 0071; # LATIN CAPITAL LETTER Q -0052; C; 0072; # LATIN CAPITAL LETTER R -0053; C; 0073; # LATIN CAPITAL LETTER S -0054; C; 0074; # LATIN CAPITAL LETTER T -0055; C; 0075; # LATIN CAPITAL LETTER U -0056; C; 0076; # LATIN CAPITAL LETTER V -0057; C; 0077; # LATIN CAPITAL LETTER W -0058; C; 0078; # LATIN CAPITAL LETTER X -0059; C; 0079; # LATIN CAPITAL LETTER Y -005A; C; 007A; # LATIN CAPITAL LETTER Z -00B5; C; 03BC; # MICRO SIGN -00C0; C; 00E0; # LATIN CAPITAL LETTER A WITH GRAVE -00C1; C; 00E1; # LATIN CAPITAL LETTER A WITH ACUTE -00C2; C; 00E2; # LATIN CAPITAL LETTER A WITH CIRCUMFLEX -00C3; C; 00E3; # LATIN CAPITAL LETTER A WITH TILDE -00C4; C; 00E4; # LATIN CAPITAL LETTER A WITH DIAERESIS -00C5; C; 00E5; # LATIN CAPITAL LETTER A WITH RING ABOVE -00C6; C; 00E6; # LATIN CAPITAL LETTER AE -00C7; C; 00E7; # LATIN CAPITAL LETTER C WITH CEDILLA -00C8; C; 00E8; # LATIN CAPITAL LETTER E WITH GRAVE -00C9; C; 00E9; # LATIN CAPITAL LETTER E WITH ACUTE -00CA; C; 00EA; # LATIN CAPITAL LETTER E WITH CIRCUMFLEX -00CB; C; 00EB; # LATIN CAPITAL LETTER E WITH DIAERESIS -00CC; C; 00EC; # LATIN CAPITAL LETTER I WITH GRAVE -00CD; C; 00ED; # LATIN CAPITAL LETTER I WITH ACUTE -00CE; C; 00EE; # LATIN CAPITAL LETTER I WITH CIRCUMFLEX -00CF; C; 00EF; # LATIN CAPITAL LETTER I WITH DIAERESIS -00D0; C; 00F0; # LATIN CAPITAL LETTER ETH -00D1; C; 00F1; # LATIN CAPITAL LETTER N WITH TILDE -00D2; C; 00F2; # LATIN CAPITAL LETTER O WITH GRAVE -00D3; C; 00F3; # LATIN CAPITAL LETTER O WITH ACUTE -00D4; C; 00F4; # LATIN CAPITAL LETTER O WITH CIRCUMFLEX -00D5; C; 00F5; # LATIN CAPITAL LETTER O WITH TILDE -00D6; C; 00F6; # LATIN CAPITAL LETTER O WITH DIAERESIS -00D8; C; 00F8; # LATIN CAPITAL LETTER O WITH STROKE -00D9; C; 00F9; # LATIN CAPITAL LETTER U WITH GRAVE -00DA; C; 00FA; # LATIN CAPITAL LETTER U WITH ACUTE -00DB; C; 00FB; # LATIN CAPITAL LETTER U WITH CIRCUMFLEX -00DC; C; 00FC; # LATIN CAPITAL LETTER U WITH DIAERESIS -00DD; C; 00FD; # LATIN CAPITAL LETTER Y WITH ACUTE -00DE; C; 00FE; # LATIN CAPITAL LETTER THORN -00DF; F; 0073 0073; # LATIN SMALL LETTER SHARP S -0100; C; 0101; # LATIN CAPITAL LETTER A WITH MACRON -0102; C; 0103; # LATIN CAPITAL LETTER A WITH BREVE -0104; C; 0105; # LATIN CAPITAL LETTER A WITH OGONEK -0106; C; 0107; # LATIN CAPITAL LETTER C WITH ACUTE -0108; C; 0109; # LATIN CAPITAL LETTER C WITH CIRCUMFLEX -010A; C; 010B; # LATIN CAPITAL LETTER C WITH DOT ABOVE -010C; C; 010D; # LATIN CAPITAL LETTER C WITH CARON -010E; C; 010F; # LATIN CAPITAL LETTER D WITH CARON -0110; C; 0111; # LATIN CAPITAL LETTER D WITH STROKE -0112; C; 0113; # LATIN CAPITAL LETTER E WITH MACRON -0114; C; 0115; # LATIN CAPITAL LETTER E WITH BREVE -0116; C; 0117; # LATIN CAPITAL LETTER E WITH DOT ABOVE -0118; C; 0119; # LATIN CAPITAL LETTER E WITH OGONEK -011A; C; 011B; # LATIN CAPITAL LETTER E WITH CARON -011C; C; 011D; # LATIN CAPITAL LETTER G WITH CIRCUMFLEX -011E; C; 011F; # LATIN CAPITAL LETTER G WITH BREVE -0120; C; 0121; # LATIN CAPITAL LETTER G WITH DOT ABOVE -0122; C; 0123; # LATIN CAPITAL LETTER G WITH CEDILLA -0124; C; 0125; # LATIN CAPITAL LETTER H WITH CIRCUMFLEX -0126; C; 0127; # LATIN CAPITAL LETTER H WITH STROKE -0128; C; 0129; # LATIN CAPITAL LETTER I WITH TILDE -012A; C; 012B; # LATIN CAPITAL LETTER I WITH MACRON -012C; C; 012D; # LATIN CAPITAL LETTER I WITH BREVE -012E; C; 012F; # LATIN CAPITAL LETTER I WITH OGONEK -0130; F; 0069 0307; # LATIN CAPITAL LETTER I WITH DOT ABOVE -0130; T; 0069; # LATIN CAPITAL LETTER I WITH DOT ABOVE -0132; C; 0133; # LATIN CAPITAL LIGATURE IJ -0134; C; 0135; # LATIN CAPITAL LETTER J WITH CIRCUMFLEX -0136; C; 0137; # LATIN CAPITAL LETTER K WITH CEDILLA -0139; C; 013A; # LATIN CAPITAL LETTER L WITH ACUTE -013B; C; 013C; # LATIN CAPITAL LETTER L WITH CEDILLA -013D; C; 013E; # LATIN CAPITAL LETTER L WITH CARON -013F; C; 0140; # LATIN CAPITAL LETTER L WITH MIDDLE DOT -0141; C; 0142; # LATIN CAPITAL LETTER L WITH STROKE -0143; C; 0144; # LATIN CAPITAL LETTER N WITH ACUTE -0145; C; 0146; # LATIN CAPITAL LETTER N WITH CEDILLA -0147; C; 0148; # LATIN CAPITAL LETTER N WITH CARON -0149; F; 02BC 006E; # LATIN SMALL LETTER N PRECEDED BY APOSTROPHE -014A; C; 014B; # LATIN CAPITAL LETTER ENG -014C; C; 014D; # LATIN CAPITAL LETTER O WITH MACRON -014E; C; 014F; # LATIN CAPITAL LETTER O WITH BREVE -0150; C; 0151; # LATIN CAPITAL LETTER O WITH DOUBLE ACUTE -0152; C; 0153; # LATIN CAPITAL LIGATURE OE -0154; C; 0155; # LATIN CAPITAL LETTER R WITH ACUTE -0156; C; 0157; # LATIN CAPITAL LETTER R WITH CEDILLA -0158; C; 0159; # LATIN CAPITAL LETTER R WITH CARON -015A; C; 015B; # LATIN CAPITAL LETTER S WITH ACUTE -015C; C; 015D; # LATIN CAPITAL LETTER S WITH CIRCUMFLEX -015E; C; 015F; # LATIN CAPITAL LETTER S WITH CEDILLA -0160; C; 0161; # LATIN CAPITAL LETTER S WITH CARON -0162; C; 0163; # LATIN CAPITAL LETTER T WITH CEDILLA -0164; C; 0165; # LATIN CAPITAL LETTER T WITH CARON -0166; C; 0167; # LATIN CAPITAL LETTER T WITH STROKE -0168; C; 0169; # LATIN CAPITAL LETTER U WITH TILDE -016A; C; 016B; # LATIN CAPITAL LETTER U WITH MACRON -016C; C; 016D; # LATIN CAPITAL LETTER U WITH BREVE -016E; C; 016F; # LATIN CAPITAL LETTER U WITH RING ABOVE -0170; C; 0171; # LATIN CAPITAL LETTER U WITH DOUBLE ACUTE -0172; C; 0173; # LATIN CAPITAL LETTER U WITH OGONEK -0174; C; 0175; # LATIN CAPITAL LETTER W WITH CIRCUMFLEX -0176; C; 0177; # LATIN CAPITAL LETTER Y WITH CIRCUMFLEX -0178; C; 00FF; # LATIN CAPITAL LETTER Y WITH DIAERESIS -0179; C; 017A; # LATIN CAPITAL LETTER Z WITH ACUTE -017B; C; 017C; # LATIN CAPITAL LETTER Z WITH DOT ABOVE -017D; C; 017E; # LATIN CAPITAL LETTER Z WITH CARON -017F; C; 0073; # LATIN SMALL LETTER LONG S -0181; C; 0253; # LATIN CAPITAL LETTER B WITH HOOK -0182; C; 0183; # LATIN CAPITAL LETTER B WITH TOPBAR -0184; C; 0185; # LATIN CAPITAL LETTER TONE SIX -0186; C; 0254; # LATIN CAPITAL LETTER OPEN O -0187; C; 0188; # LATIN CAPITAL LETTER C WITH HOOK -0189; C; 0256; # LATIN CAPITAL LETTER AFRICAN D -018A; C; 0257; # LATIN CAPITAL LETTER D WITH HOOK -018B; C; 018C; # LATIN CAPITAL LETTER D WITH TOPBAR -018E; C; 01DD; # LATIN CAPITAL LETTER REVERSED E -018F; C; 0259; # LATIN CAPITAL LETTER SCHWA -0190; C; 025B; # LATIN CAPITAL LETTER OPEN E -0191; C; 0192; # LATIN CAPITAL LETTER F WITH HOOK -0193; C; 0260; # LATIN CAPITAL LETTER G WITH HOOK -0194; C; 0263; # LATIN CAPITAL LETTER GAMMA -0196; C; 0269; # LATIN CAPITAL LETTER IOTA -0197; C; 0268; # LATIN CAPITAL LETTER I WITH STROKE -0198; C; 0199; # LATIN CAPITAL LETTER K WITH HOOK -019C; C; 026F; # LATIN CAPITAL LETTER TURNED M -019D; C; 0272; # LATIN CAPITAL LETTER N WITH LEFT HOOK -019F; C; 0275; # LATIN CAPITAL LETTER O WITH MIDDLE TILDE -01A0; C; 01A1; # LATIN CAPITAL LETTER O WITH HORN -01A2; C; 01A3; # LATIN CAPITAL LETTER OI -01A4; C; 01A5; # LATIN CAPITAL LETTER P WITH HOOK -01A6; C; 0280; # LATIN LETTER YR -01A7; C; 01A8; # LATIN CAPITAL LETTER TONE TWO -01A9; C; 0283; # LATIN CAPITAL LETTER ESH -01AC; C; 01AD; # LATIN CAPITAL LETTER T WITH HOOK -01AE; C; 0288; # LATIN CAPITAL LETTER T WITH RETROFLEX HOOK -01AF; C; 01B0; # LATIN CAPITAL LETTER U WITH HORN -01B1; C; 028A; # LATIN CAPITAL LETTER UPSILON -01B2; C; 028B; # LATIN CAPITAL LETTER V WITH HOOK -01B3; C; 01B4; # LATIN CAPITAL LETTER Y WITH HOOK -01B5; C; 01B6; # LATIN CAPITAL LETTER Z WITH STROKE -01B7; C; 0292; # LATIN CAPITAL LETTER EZH -01B8; C; 01B9; # LATIN CAPITAL LETTER EZH REVERSED -01BC; C; 01BD; # LATIN CAPITAL LETTER TONE FIVE -01C4; C; 01C6; # LATIN CAPITAL LETTER DZ WITH CARON -01C5; C; 01C6; # LATIN CAPITAL LETTER D WITH SMALL LETTER Z WITH CARON -01C7; C; 01C9; # LATIN CAPITAL LETTER LJ -01C8; C; 01C9; # LATIN CAPITAL LETTER L WITH SMALL LETTER J -01CA; C; 01CC; # LATIN CAPITAL LETTER NJ -01CB; C; 01CC; # LATIN CAPITAL LETTER N WITH SMALL LETTER J -01CD; C; 01CE; # LATIN CAPITAL LETTER A WITH CARON -01CF; C; 01D0; # LATIN CAPITAL LETTER I WITH CARON -01D1; C; 01D2; # LATIN CAPITAL LETTER O WITH CARON -01D3; C; 01D4; # LATIN CAPITAL LETTER U WITH CARON -01D5; C; 01D6; # LATIN CAPITAL LETTER U WITH DIAERESIS AND MACRON -01D7; C; 01D8; # LATIN CAPITAL LETTER U WITH DIAERESIS AND ACUTE -01D9; C; 01DA; # LATIN CAPITAL LETTER U WITH DIAERESIS AND CARON -01DB; C; 01DC; # LATIN CAPITAL LETTER U WITH DIAERESIS AND GRAVE -01DE; C; 01DF; # LATIN CAPITAL LETTER A WITH DIAERESIS AND MACRON -01E0; C; 01E1; # LATIN CAPITAL LETTER A WITH DOT ABOVE AND MACRON -01E2; C; 01E3; # LATIN CAPITAL LETTER AE WITH MACRON -01E4; C; 01E5; # LATIN CAPITAL LETTER G WITH STROKE -01E6; C; 01E7; # LATIN CAPITAL LETTER G WITH CARON -01E8; C; 01E9; # LATIN CAPITAL LETTER K WITH CARON -01EA; C; 01EB; # LATIN CAPITAL LETTER O WITH OGONEK -01EC; C; 01ED; # LATIN CAPITAL LETTER O WITH OGONEK AND MACRON -01EE; C; 01EF; # LATIN CAPITAL LETTER EZH WITH CARON -01F0; F; 006A 030C; # LATIN SMALL LETTER J WITH CARON -01F1; C; 01F3; # LATIN CAPITAL LETTER DZ -01F2; C; 01F3; # LATIN CAPITAL LETTER D WITH SMALL LETTER Z -01F4; C; 01F5; # LATIN CAPITAL LETTER G WITH ACUTE -01F6; C; 0195; # LATIN CAPITAL LETTER HWAIR -01F7; C; 01BF; # LATIN CAPITAL LETTER WYNN -01F8; C; 01F9; # LATIN CAPITAL LETTER N WITH GRAVE -01FA; C; 01FB; # LATIN CAPITAL LETTER A WITH RING ABOVE AND ACUTE -01FC; C; 01FD; # LATIN CAPITAL LETTER AE WITH ACUTE -01FE; C; 01FF; # LATIN CAPITAL LETTER O WITH STROKE AND ACUTE -0200; C; 0201; # LATIN CAPITAL LETTER A WITH DOUBLE GRAVE -0202; C; 0203; # LATIN CAPITAL LETTER A WITH INVERTED BREVE -0204; C; 0205; # LATIN CAPITAL LETTER E WITH DOUBLE GRAVE -0206; C; 0207; # LATIN CAPITAL LETTER E WITH INVERTED BREVE -0208; C; 0209; # LATIN CAPITAL LETTER I WITH DOUBLE GRAVE -020A; C; 020B; # LATIN CAPITAL LETTER I WITH INVERTED BREVE -020C; C; 020D; # LATIN CAPITAL LETTER O WITH DOUBLE GRAVE -020E; C; 020F; # LATIN CAPITAL LETTER O WITH INVERTED BREVE -0210; C; 0211; # LATIN CAPITAL LETTER R WITH DOUBLE GRAVE -0212; C; 0213; # LATIN CAPITAL LETTER R WITH INVERTED BREVE -0214; C; 0215; # LATIN CAPITAL LETTER U WITH DOUBLE GRAVE -0216; C; 0217; # LATIN CAPITAL LETTER U WITH INVERTED BREVE -0218; C; 0219; # LATIN CAPITAL LETTER S WITH COMMA BELOW -021A; C; 021B; # LATIN CAPITAL LETTER T WITH COMMA BELOW -021C; C; 021D; # LATIN CAPITAL LETTER YOGH -021E; C; 021F; # LATIN CAPITAL LETTER H WITH CARON -0220; C; 019E; # LATIN CAPITAL LETTER N WITH LONG RIGHT LEG -0222; C; 0223; # LATIN CAPITAL LETTER OU -0224; C; 0225; # LATIN CAPITAL LETTER Z WITH HOOK -0226; C; 0227; # LATIN CAPITAL LETTER A WITH DOT ABOVE -0228; C; 0229; # LATIN CAPITAL LETTER E WITH CEDILLA -022A; C; 022B; # LATIN CAPITAL LETTER O WITH DIAERESIS AND MACRON -022C; C; 022D; # LATIN CAPITAL LETTER O WITH TILDE AND MACRON -022E; C; 022F; # LATIN CAPITAL LETTER O WITH DOT ABOVE -0230; C; 0231; # LATIN CAPITAL LETTER O WITH DOT ABOVE AND MACRON -0232; C; 0233; # LATIN CAPITAL LETTER Y WITH MACRON -0345; C; 03B9; # COMBINING GREEK YPOGEGRAMMENI -0386; C; 03AC; # GREEK CAPITAL LETTER ALPHA WITH TONOS -0388; C; 03AD; # GREEK CAPITAL LETTER EPSILON WITH TONOS -0389; C; 03AE; # GREEK CAPITAL LETTER ETA WITH TONOS -038A; C; 03AF; # GREEK CAPITAL LETTER IOTA WITH TONOS -038C; C; 03CC; # GREEK CAPITAL LETTER OMICRON WITH TONOS -038E; C; 03CD; # GREEK CAPITAL LETTER UPSILON WITH TONOS -038F; C; 03CE; # GREEK CAPITAL LETTER OMEGA WITH TONOS -0390; F; 03B9 0308 0301; # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS -0391; C; 03B1; # GREEK CAPITAL LETTER ALPHA -0392; C; 03B2; # GREEK CAPITAL LETTER BETA -0393; C; 03B3; # GREEK CAPITAL LETTER GAMMA -0394; C; 03B4; # GREEK CAPITAL LETTER DELTA -0395; C; 03B5; # GREEK CAPITAL LETTER EPSILON -0396; C; 03B6; # GREEK CAPITAL LETTER ZETA -0397; C; 03B7; # GREEK CAPITAL LETTER ETA -0398; C; 03B8; # GREEK CAPITAL LETTER THETA -0399; C; 03B9; # GREEK CAPITAL LETTER IOTA -039A; C; 03BA; # GREEK CAPITAL LETTER KAPPA -039B; C; 03BB; # GREEK CAPITAL LETTER LAMDA -039C; C; 03BC; # GREEK CAPITAL LETTER MU -039D; C; 03BD; # GREEK CAPITAL LETTER NU -039E; C; 03BE; # GREEK CAPITAL LETTER XI -039F; C; 03BF; # GREEK CAPITAL LETTER OMICRON -03A0; C; 03C0; # GREEK CAPITAL LETTER PI -03A1; C; 03C1; # GREEK CAPITAL LETTER RHO -03A3; C; 03C3; # GREEK CAPITAL LETTER SIGMA -03A4; C; 03C4; # GREEK CAPITAL LETTER TAU -03A5; C; 03C5; # GREEK CAPITAL LETTER UPSILON -03A6; C; 03C6; # GREEK CAPITAL LETTER PHI -03A7; C; 03C7; # GREEK CAPITAL LETTER CHI -03A8; C; 03C8; # GREEK CAPITAL LETTER PSI -03A9; C; 03C9; # GREEK CAPITAL LETTER OMEGA -03AA; C; 03CA; # GREEK CAPITAL LETTER IOTA WITH DIALYTIKA -03AB; C; 03CB; # GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA -03B0; F; 03C5 0308 0301; # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS -03C2; C; 03C3; # GREEK SMALL LETTER FINAL SIGMA -03D0; C; 03B2; # GREEK BETA SYMBOL -03D1; C; 03B8; # GREEK THETA SYMBOL -03D5; C; 03C6; # GREEK PHI SYMBOL -03D6; C; 03C0; # GREEK PI SYMBOL -03D8; C; 03D9; # GREEK LETTER ARCHAIC KOPPA -03DA; C; 03DB; # GREEK LETTER STIGMA -03DC; C; 03DD; # GREEK LETTER DIGAMMA -03DE; C; 03DF; # GREEK LETTER KOPPA -03E0; C; 03E1; # GREEK LETTER SAMPI -03E2; C; 03E3; # COPTIC CAPITAL LETTER SHEI -03E4; C; 03E5; # COPTIC CAPITAL LETTER FEI -03E6; C; 03E7; # COPTIC CAPITAL LETTER KHEI -03E8; C; 03E9; # COPTIC CAPITAL LETTER HORI -03EA; C; 03EB; # COPTIC CAPITAL LETTER GANGIA -03EC; C; 03ED; # COPTIC CAPITAL LETTER SHIMA -03EE; C; 03EF; # COPTIC CAPITAL LETTER DEI -03F0; C; 03BA; # GREEK KAPPA SYMBOL -03F1; C; 03C1; # GREEK RHO SYMBOL -03F2; C; 03C3; # GREEK LUNATE SIGMA SYMBOL -03F4; C; 03B8; # GREEK CAPITAL THETA SYMBOL -03F5; C; 03B5; # GREEK LUNATE EPSILON SYMBOL -0400; C; 0450; # CYRILLIC CAPITAL LETTER IE WITH GRAVE -0401; C; 0451; # CYRILLIC CAPITAL LETTER IO -0402; C; 0452; # CYRILLIC CAPITAL LETTER DJE -0403; C; 0453; # CYRILLIC CAPITAL LETTER GJE -0404; C; 0454; # CYRILLIC CAPITAL LETTER UKRAINIAN IE -0405; C; 0455; # CYRILLIC CAPITAL LETTER DZE -0406; C; 0456; # CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I -0407; C; 0457; # CYRILLIC CAPITAL LETTER YI -0408; C; 0458; # CYRILLIC CAPITAL LETTER JE -0409; C; 0459; # CYRILLIC CAPITAL LETTER LJE -040A; C; 045A; # CYRILLIC CAPITAL LETTER NJE -040B; C; 045B; # CYRILLIC CAPITAL LETTER TSHE -040C; C; 045C; # CYRILLIC CAPITAL LETTER KJE -040D; C; 045D; # CYRILLIC CAPITAL LETTER I WITH GRAVE -040E; C; 045E; # CYRILLIC CAPITAL LETTER SHORT U -040F; C; 045F; # CYRILLIC CAPITAL LETTER DZHE -0410; C; 0430; # CYRILLIC CAPITAL LETTER A -0411; C; 0431; # CYRILLIC CAPITAL LETTER BE -0412; C; 0432; # CYRILLIC CAPITAL LETTER VE -0413; C; 0433; # CYRILLIC CAPITAL LETTER GHE -0414; C; 0434; # CYRILLIC CAPITAL LETTER DE -0415; C; 0435; # CYRILLIC CAPITAL LETTER IE -0416; C; 0436; # CYRILLIC CAPITAL LETTER ZHE -0417; C; 0437; # CYRILLIC CAPITAL LETTER ZE -0418; C; 0438; # CYRILLIC CAPITAL LETTER I -0419; C; 0439; # CYRILLIC CAPITAL LETTER SHORT I -041A; C; 043A; # CYRILLIC CAPITAL LETTER KA -041B; C; 043B; # CYRILLIC CAPITAL LETTER EL -041C; C; 043C; # CYRILLIC CAPITAL LETTER EM -041D; C; 043D; # CYRILLIC CAPITAL LETTER EN -041E; C; 043E; # CYRILLIC CAPITAL LETTER O -041F; C; 043F; # CYRILLIC CAPITAL LETTER PE -0420; C; 0440; # CYRILLIC CAPITAL LETTER ER -0421; C; 0441; # CYRILLIC CAPITAL LETTER ES -0422; C; 0442; # CYRILLIC CAPITAL LETTER TE -0423; C; 0443; # CYRILLIC CAPITAL LETTER U -0424; C; 0444; # CYRILLIC CAPITAL LETTER EF -0425; C; 0445; # CYRILLIC CAPITAL LETTER HA -0426; C; 0446; # CYRILLIC CAPITAL LETTER TSE -0427; C; 0447; # CYRILLIC CAPITAL LETTER CHE -0428; C; 0448; # CYRILLIC CAPITAL LETTER SHA -0429; C; 0449; # CYRILLIC CAPITAL LETTER SHCHA -042A; C; 044A; # CYRILLIC CAPITAL LETTER HARD SIGN -042B; C; 044B; # CYRILLIC CAPITAL LETTER YERU -042C; C; 044C; # CYRILLIC CAPITAL LETTER SOFT SIGN -042D; C; 044D; # CYRILLIC CAPITAL LETTER E -042E; C; 044E; # CYRILLIC CAPITAL LETTER YU -042F; C; 044F; # CYRILLIC CAPITAL LETTER YA -0460; C; 0461; # CYRILLIC CAPITAL LETTER OMEGA -0462; C; 0463; # CYRILLIC CAPITAL LETTER YAT -0464; C; 0465; # CYRILLIC CAPITAL LETTER IOTIFIED E -0466; C; 0467; # CYRILLIC CAPITAL LETTER LITTLE YUS -0468; C; 0469; # CYRILLIC CAPITAL LETTER IOTIFIED LITTLE YUS -046A; C; 046B; # CYRILLIC CAPITAL LETTER BIG YUS -046C; C; 046D; # CYRILLIC CAPITAL LETTER IOTIFIED BIG YUS -046E; C; 046F; # CYRILLIC CAPITAL LETTER KSI -0470; C; 0471; # CYRILLIC CAPITAL LETTER PSI -0472; C; 0473; # CYRILLIC CAPITAL LETTER FITA -0474; C; 0475; # CYRILLIC CAPITAL LETTER IZHITSA -0476; C; 0477; # CYRILLIC CAPITAL LETTER IZHITSA WITH DOUBLE GRAVE ACCENT -0478; C; 0479; # CYRILLIC CAPITAL LETTER UK -047A; C; 047B; # CYRILLIC CAPITAL LETTER ROUND OMEGA -047C; C; 047D; # CYRILLIC CAPITAL LETTER OMEGA WITH TITLO -047E; C; 047F; # CYRILLIC CAPITAL LETTER OT -0480; C; 0481; # CYRILLIC CAPITAL LETTER KOPPA -048A; C; 048B; # CYRILLIC CAPITAL LETTER SHORT I WITH TAIL -048C; C; 048D; # CYRILLIC CAPITAL LETTER SEMISOFT SIGN -048E; C; 048F; # CYRILLIC CAPITAL LETTER ER WITH TICK -0490; C; 0491; # CYRILLIC CAPITAL LETTER GHE WITH UPTURN -0492; C; 0493; # CYRILLIC CAPITAL LETTER GHE WITH STROKE -0494; C; 0495; # CYRILLIC CAPITAL LETTER GHE WITH MIDDLE HOOK -0496; C; 0497; # CYRILLIC CAPITAL LETTER ZHE WITH DESCENDER -0498; C; 0499; # CYRILLIC CAPITAL LETTER ZE WITH DESCENDER -049A; C; 049B; # CYRILLIC CAPITAL LETTER KA WITH DESCENDER -049C; C; 049D; # CYRILLIC CAPITAL LETTER KA WITH VERTICAL STROKE -049E; C; 049F; # CYRILLIC CAPITAL LETTER KA WITH STROKE -04A0; C; 04A1; # CYRILLIC CAPITAL LETTER BASHKIR KA -04A2; C; 04A3; # CYRILLIC CAPITAL LETTER EN WITH DESCENDER -04A4; C; 04A5; # CYRILLIC CAPITAL LIGATURE EN GHE -04A6; C; 04A7; # CYRILLIC CAPITAL LETTER PE WITH MIDDLE HOOK -04A8; C; 04A9; # CYRILLIC CAPITAL LETTER ABKHASIAN HA -04AA; C; 04AB; # CYRILLIC CAPITAL LETTER ES WITH DESCENDER -04AC; C; 04AD; # CYRILLIC CAPITAL LETTER TE WITH DESCENDER -04AE; C; 04AF; # CYRILLIC CAPITAL LETTER STRAIGHT U -04B0; C; 04B1; # CYRILLIC CAPITAL LETTER STRAIGHT U WITH STROKE -04B2; C; 04B3; # CYRILLIC CAPITAL LETTER HA WITH DESCENDER -04B4; C; 04B5; # CYRILLIC CAPITAL LIGATURE TE TSE -04B6; C; 04B7; # CYRILLIC CAPITAL LETTER CHE WITH DESCENDER -04B8; C; 04B9; # CYRILLIC CAPITAL LETTER CHE WITH VERTICAL STROKE -04BA; C; 04BB; # CYRILLIC CAPITAL LETTER SHHA -04BC; C; 04BD; # CYRILLIC CAPITAL LETTER ABKHASIAN CHE -04BE; C; 04BF; # CYRILLIC CAPITAL LETTER ABKHASIAN CHE WITH DESCENDER -04C1; C; 04C2; # CYRILLIC CAPITAL LETTER ZHE WITH BREVE -04C3; C; 04C4; # CYRILLIC CAPITAL LETTER KA WITH HOOK -04C5; C; 04C6; # CYRILLIC CAPITAL LETTER EL WITH TAIL -04C7; C; 04C8; # CYRILLIC CAPITAL LETTER EN WITH HOOK -04C9; C; 04CA; # CYRILLIC CAPITAL LETTER EN WITH TAIL -04CB; C; 04CC; # CYRILLIC CAPITAL LETTER KHAKASSIAN CHE -04CD; C; 04CE; # CYRILLIC CAPITAL LETTER EM WITH TAIL -04D0; C; 04D1; # CYRILLIC CAPITAL LETTER A WITH BREVE -04D2; C; 04D3; # CYRILLIC CAPITAL LETTER A WITH DIAERESIS -04D4; C; 04D5; # CYRILLIC CAPITAL LIGATURE A IE -04D6; C; 04D7; # CYRILLIC CAPITAL LETTER IE WITH BREVE -04D8; C; 04D9; # CYRILLIC CAPITAL LETTER SCHWA -04DA; C; 04DB; # CYRILLIC CAPITAL LETTER SCHWA WITH DIAERESIS -04DC; C; 04DD; # CYRILLIC CAPITAL LETTER ZHE WITH DIAERESIS -04DE; C; 04DF; # CYRILLIC CAPITAL LETTER ZE WITH DIAERESIS -04E0; C; 04E1; # CYRILLIC CAPITAL LETTER ABKHASIAN DZE -04E2; C; 04E3; # CYRILLIC CAPITAL LETTER I WITH MACRON -04E4; C; 04E5; # CYRILLIC CAPITAL LETTER I WITH DIAERESIS -04E6; C; 04E7; # CYRILLIC CAPITAL LETTER O WITH DIAERESIS -04E8; C; 04E9; # CYRILLIC CAPITAL LETTER BARRED O -04EA; C; 04EB; # CYRILLIC CAPITAL LETTER BARRED O WITH DIAERESIS -04EC; C; 04ED; # CYRILLIC CAPITAL LETTER E WITH DIAERESIS -04EE; C; 04EF; # CYRILLIC CAPITAL LETTER U WITH MACRON -04F0; C; 04F1; # CYRILLIC CAPITAL LETTER U WITH DIAERESIS -04F2; C; 04F3; # CYRILLIC CAPITAL LETTER U WITH DOUBLE ACUTE -04F4; C; 04F5; # CYRILLIC CAPITAL LETTER CHE WITH DIAERESIS -04F8; C; 04F9; # CYRILLIC CAPITAL LETTER YERU WITH DIAERESIS -0500; C; 0501; # CYRILLIC CAPITAL LETTER KOMI DE -0502; C; 0503; # CYRILLIC CAPITAL LETTER KOMI DJE -0504; C; 0505; # CYRILLIC CAPITAL LETTER KOMI ZJE -0506; C; 0507; # CYRILLIC CAPITAL LETTER KOMI DZJE -0508; C; 0509; # CYRILLIC CAPITAL LETTER KOMI LJE -050A; C; 050B; # CYRILLIC CAPITAL LETTER KOMI NJE -050C; C; 050D; # CYRILLIC CAPITAL LETTER KOMI SJE -050E; C; 050F; # CYRILLIC CAPITAL LETTER KOMI TJE -0531; C; 0561; # ARMENIAN CAPITAL LETTER AYB -0532; C; 0562; # ARMENIAN CAPITAL LETTER BEN -0533; C; 0563; # ARMENIAN CAPITAL LETTER GIM -0534; C; 0564; # ARMENIAN CAPITAL LETTER DA -0535; C; 0565; # ARMENIAN CAPITAL LETTER ECH -0536; C; 0566; # ARMENIAN CAPITAL LETTER ZA -0537; C; 0567; # ARMENIAN CAPITAL LETTER EH -0538; C; 0568; # ARMENIAN CAPITAL LETTER ET -0539; C; 0569; # ARMENIAN CAPITAL LETTER TO -053A; C; 056A; # ARMENIAN CAPITAL LETTER ZHE -053B; C; 056B; # ARMENIAN CAPITAL LETTER INI -053C; C; 056C; # ARMENIAN CAPITAL LETTER LIWN -053D; C; 056D; # ARMENIAN CAPITAL LETTER XEH -053E; C; 056E; # ARMENIAN CAPITAL LETTER CA -053F; C; 056F; # ARMENIAN CAPITAL LETTER KEN -0540; C; 0570; # ARMENIAN CAPITAL LETTER HO -0541; C; 0571; # ARMENIAN CAPITAL LETTER JA -0542; C; 0572; # ARMENIAN CAPITAL LETTER GHAD -0543; C; 0573; # ARMENIAN CAPITAL LETTER CHEH -0544; C; 0574; # ARMENIAN CAPITAL LETTER MEN -0545; C; 0575; # ARMENIAN CAPITAL LETTER YI -0546; C; 0576; # ARMENIAN CAPITAL LETTER NOW -0547; C; 0577; # ARMENIAN CAPITAL LETTER SHA -0548; C; 0578; # ARMENIAN CAPITAL LETTER VO -0549; C; 0579; # ARMENIAN CAPITAL LETTER CHA -054A; C; 057A; # ARMENIAN CAPITAL LETTER PEH -054B; C; 057B; # ARMENIAN CAPITAL LETTER JHEH -054C; C; 057C; # ARMENIAN CAPITAL LETTER RA -054D; C; 057D; # ARMENIAN CAPITAL LETTER SEH -054E; C; 057E; # ARMENIAN CAPITAL LETTER VEW -054F; C; 057F; # ARMENIAN CAPITAL LETTER TIWN -0550; C; 0580; # ARMENIAN CAPITAL LETTER REH -0551; C; 0581; # ARMENIAN CAPITAL LETTER CO -0552; C; 0582; # ARMENIAN CAPITAL LETTER YIWN -0553; C; 0583; # ARMENIAN CAPITAL LETTER PIWR -0554; C; 0584; # ARMENIAN CAPITAL LETTER KEH -0555; C; 0585; # ARMENIAN CAPITAL LETTER OH -0556; C; 0586; # ARMENIAN CAPITAL LETTER FEH -0587; F; 0565 0582; # ARMENIAN SMALL LIGATURE ECH YIWN -1E00; C; 1E01; # LATIN CAPITAL LETTER A WITH RING BELOW -1E02; C; 1E03; # LATIN CAPITAL LETTER B WITH DOT ABOVE -1E04; C; 1E05; # LATIN CAPITAL LETTER B WITH DOT BELOW -1E06; C; 1E07; # LATIN CAPITAL LETTER B WITH LINE BELOW -1E08; C; 1E09; # LATIN CAPITAL LETTER C WITH CEDILLA AND ACUTE -1E0A; C; 1E0B; # LATIN CAPITAL LETTER D WITH DOT ABOVE -1E0C; C; 1E0D; # LATIN CAPITAL LETTER D WITH DOT BELOW -1E0E; C; 1E0F; # LATIN CAPITAL LETTER D WITH LINE BELOW -1E10; C; 1E11; # LATIN CAPITAL LETTER D WITH CEDILLA -1E12; C; 1E13; # LATIN CAPITAL LETTER D WITH CIRCUMFLEX BELOW -1E14; C; 1E15; # LATIN CAPITAL LETTER E WITH MACRON AND GRAVE -1E16; C; 1E17; # LATIN CAPITAL LETTER E WITH MACRON AND ACUTE -1E18; C; 1E19; # LATIN CAPITAL LETTER E WITH CIRCUMFLEX BELOW -1E1A; C; 1E1B; # LATIN CAPITAL LETTER E WITH TILDE BELOW -1E1C; C; 1E1D; # LATIN CAPITAL LETTER E WITH CEDILLA AND BREVE -1E1E; C; 1E1F; # LATIN CAPITAL LETTER F WITH DOT ABOVE -1E20; C; 1E21; # LATIN CAPITAL LETTER G WITH MACRON -1E22; C; 1E23; # LATIN CAPITAL LETTER H WITH DOT ABOVE -1E24; C; 1E25; # LATIN CAPITAL LETTER H WITH DOT BELOW -1E26; C; 1E27; # LATIN CAPITAL LETTER H WITH DIAERESIS -1E28; C; 1E29; # LATIN CAPITAL LETTER H WITH CEDILLA -1E2A; C; 1E2B; # LATIN CAPITAL LETTER H WITH BREVE BELOW -1E2C; C; 1E2D; # LATIN CAPITAL LETTER I WITH TILDE BELOW -1E2E; C; 1E2F; # LATIN CAPITAL LETTER I WITH DIAERESIS AND ACUTE -1E30; C; 1E31; # LATIN CAPITAL LETTER K WITH ACUTE -1E32; C; 1E33; # LATIN CAPITAL LETTER K WITH DOT BELOW -1E34; C; 1E35; # LATIN CAPITAL LETTER K WITH LINE BELOW -1E36; C; 1E37; # LATIN CAPITAL LETTER L WITH DOT BELOW -1E38; C; 1E39; # LATIN CAPITAL LETTER L WITH DOT BELOW AND MACRON -1E3A; C; 1E3B; # LATIN CAPITAL LETTER L WITH LINE BELOW -1E3C; C; 1E3D; # LATIN CAPITAL LETTER L WITH CIRCUMFLEX BELOW -1E3E; C; 1E3F; # LATIN CAPITAL LETTER M WITH ACUTE -1E40; C; 1E41; # LATIN CAPITAL LETTER M WITH DOT ABOVE -1E42; C; 1E43; # LATIN CAPITAL LETTER M WITH DOT BELOW -1E44; C; 1E45; # LATIN CAPITAL LETTER N WITH DOT ABOVE -1E46; C; 1E47; # LATIN CAPITAL LETTER N WITH DOT BELOW -1E48; C; 1E49; # LATIN CAPITAL LETTER N WITH LINE BELOW -1E4A; C; 1E4B; # LATIN CAPITAL LETTER N WITH CIRCUMFLEX BELOW -1E4C; C; 1E4D; # LATIN CAPITAL LETTER O WITH TILDE AND ACUTE -1E4E; C; 1E4F; # LATIN CAPITAL LETTER O WITH TILDE AND DIAERESIS -1E50; C; 1E51; # LATIN CAPITAL LETTER O WITH MACRON AND GRAVE -1E52; C; 1E53; # LATIN CAPITAL LETTER O WITH MACRON AND ACUTE -1E54; C; 1E55; # LATIN CAPITAL LETTER P WITH ACUTE -1E56; C; 1E57; # LATIN CAPITAL LETTER P WITH DOT ABOVE -1E58; C; 1E59; # LATIN CAPITAL LETTER R WITH DOT ABOVE -1E5A; C; 1E5B; # LATIN CAPITAL LETTER R WITH DOT BELOW -1E5C; C; 1E5D; # LATIN CAPITAL LETTER R WITH DOT BELOW AND MACRON -1E5E; C; 1E5F; # LATIN CAPITAL LETTER R WITH LINE BELOW -1E60; C; 1E61; # LATIN CAPITAL LETTER S WITH DOT ABOVE -1E62; C; 1E63; # LATIN CAPITAL LETTER S WITH DOT BELOW -1E64; C; 1E65; # LATIN CAPITAL LETTER S WITH ACUTE AND DOT ABOVE -1E66; C; 1E67; # LATIN CAPITAL LETTER S WITH CARON AND DOT ABOVE -1E68; C; 1E69; # LATIN CAPITAL LETTER S WITH DOT BELOW AND DOT ABOVE -1E6A; C; 1E6B; # LATIN CAPITAL LETTER T WITH DOT ABOVE -1E6C; C; 1E6D; # LATIN CAPITAL LETTER T WITH DOT BELOW -1E6E; C; 1E6F; # LATIN CAPITAL LETTER T WITH LINE BELOW -1E70; C; 1E71; # LATIN CAPITAL LETTER T WITH CIRCUMFLEX BELOW -1E72; C; 1E73; # LATIN CAPITAL LETTER U WITH DIAERESIS BELOW -1E74; C; 1E75; # LATIN CAPITAL LETTER U WITH TILDE BELOW -1E76; C; 1E77; # LATIN CAPITAL LETTER U WITH CIRCUMFLEX BELOW -1E78; C; 1E79; # LATIN CAPITAL LETTER U WITH TILDE AND ACUTE -1E7A; C; 1E7B; # LATIN CAPITAL LETTER U WITH MACRON AND DIAERESIS -1E7C; C; 1E7D; # LATIN CAPITAL LETTER V WITH TILDE -1E7E; C; 1E7F; # LATIN CAPITAL LETTER V WITH DOT BELOW -1E80; C; 1E81; # LATIN CAPITAL LETTER W WITH GRAVE -1E82; C; 1E83; # LATIN CAPITAL LETTER W WITH ACUTE -1E84; C; 1E85; # LATIN CAPITAL LETTER W WITH DIAERESIS -1E86; C; 1E87; # LATIN CAPITAL LETTER W WITH DOT ABOVE -1E88; C; 1E89; # LATIN CAPITAL LETTER W WITH DOT BELOW -1E8A; C; 1E8B; # LATIN CAPITAL LETTER X WITH DOT ABOVE -1E8C; C; 1E8D; # LATIN CAPITAL LETTER X WITH DIAERESIS -1E8E; C; 1E8F; # LATIN CAPITAL LETTER Y WITH DOT ABOVE -1E90; C; 1E91; # LATIN CAPITAL LETTER Z WITH CIRCUMFLEX -1E92; C; 1E93; # LATIN CAPITAL LETTER Z WITH DOT BELOW -1E94; C; 1E95; # LATIN CAPITAL LETTER Z WITH LINE BELOW -1E96; F; 0068 0331; # LATIN SMALL LETTER H WITH LINE BELOW -1E97; F; 0074 0308; # LATIN SMALL LETTER T WITH DIAERESIS -1E98; F; 0077 030A; # LATIN SMALL LETTER W WITH RING ABOVE -1E99; F; 0079 030A; # LATIN SMALL LETTER Y WITH RING ABOVE -1E9A; F; 0061 02BE; # LATIN SMALL LETTER A WITH RIGHT HALF RING -1E9B; C; 1E61; # LATIN SMALL LETTER LONG S WITH DOT ABOVE -1EA0; C; 1EA1; # LATIN CAPITAL LETTER A WITH DOT BELOW -1EA2; C; 1EA3; # LATIN CAPITAL LETTER A WITH HOOK ABOVE -1EA4; C; 1EA5; # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND ACUTE -1EA6; C; 1EA7; # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND GRAVE -1EA8; C; 1EA9; # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE -1EAA; C; 1EAB; # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND TILDE -1EAC; C; 1EAD; # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND DOT BELOW -1EAE; C; 1EAF; # LATIN CAPITAL LETTER A WITH BREVE AND ACUTE -1EB0; C; 1EB1; # LATIN CAPITAL LETTER A WITH BREVE AND GRAVE -1EB2; C; 1EB3; # LATIN CAPITAL LETTER A WITH BREVE AND HOOK ABOVE -1EB4; C; 1EB5; # LATIN CAPITAL LETTER A WITH BREVE AND TILDE -1EB6; C; 1EB7; # LATIN CAPITAL LETTER A WITH BREVE AND DOT BELOW -1EB8; C; 1EB9; # LATIN CAPITAL LETTER E WITH DOT BELOW -1EBA; C; 1EBB; # LATIN CAPITAL LETTER E WITH HOOK ABOVE -1EBC; C; 1EBD; # LATIN CAPITAL LETTER E WITH TILDE -1EBE; C; 1EBF; # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND ACUTE -1EC0; C; 1EC1; # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND GRAVE -1EC2; C; 1EC3; # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE -1EC4; C; 1EC5; # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND TILDE -1EC6; C; 1EC7; # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND DOT BELOW -1EC8; C; 1EC9; # LATIN CAPITAL LETTER I WITH HOOK ABOVE -1ECA; C; 1ECB; # LATIN CAPITAL LETTER I WITH DOT BELOW -1ECC; C; 1ECD; # LATIN CAPITAL LETTER O WITH DOT BELOW -1ECE; C; 1ECF; # LATIN CAPITAL LETTER O WITH HOOK ABOVE -1ED0; C; 1ED1; # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND ACUTE -1ED2; C; 1ED3; # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND GRAVE -1ED4; C; 1ED5; # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE -1ED6; C; 1ED7; # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND TILDE -1ED8; C; 1ED9; # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND DOT BELOW -1EDA; C; 1EDB; # LATIN CAPITAL LETTER O WITH HORN AND ACUTE -1EDC; C; 1EDD; # LATIN CAPITAL LETTER O WITH HORN AND GRAVE -1EDE; C; 1EDF; # LATIN CAPITAL LETTER O WITH HORN AND HOOK ABOVE -1EE0; C; 1EE1; # LATIN CAPITAL LETTER O WITH HORN AND TILDE -1EE2; C; 1EE3; # LATIN CAPITAL LETTER O WITH HORN AND DOT BELOW -1EE4; C; 1EE5; # LATIN CAPITAL LETTER U WITH DOT BELOW -1EE6; C; 1EE7; # LATIN CAPITAL LETTER U WITH HOOK ABOVE -1EE8; C; 1EE9; # LATIN CAPITAL LETTER U WITH HORN AND ACUTE -1EEA; C; 1EEB; # LATIN CAPITAL LETTER U WITH HORN AND GRAVE -1EEC; C; 1EED; # LATIN CAPITAL LETTER U WITH HORN AND HOOK ABOVE -1EEE; C; 1EEF; # LATIN CAPITAL LETTER U WITH HORN AND TILDE -1EF0; C; 1EF1; # LATIN CAPITAL LETTER U WITH HORN AND DOT BELOW -1EF2; C; 1EF3; # LATIN CAPITAL LETTER Y WITH GRAVE -1EF4; C; 1EF5; # LATIN CAPITAL LETTER Y WITH DOT BELOW -1EF6; C; 1EF7; # LATIN CAPITAL LETTER Y WITH HOOK ABOVE -1EF8; C; 1EF9; # LATIN CAPITAL LETTER Y WITH TILDE -1F08; C; 1F00; # GREEK CAPITAL LETTER ALPHA WITH PSILI -1F09; C; 1F01; # GREEK CAPITAL LETTER ALPHA WITH DASIA -1F0A; C; 1F02; # GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA -1F0B; C; 1F03; # GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA -1F0C; C; 1F04; # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA -1F0D; C; 1F05; # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA -1F0E; C; 1F06; # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI -1F0F; C; 1F07; # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI -1F18; C; 1F10; # GREEK CAPITAL LETTER EPSILON WITH PSILI -1F19; C; 1F11; # GREEK CAPITAL LETTER EPSILON WITH DASIA -1F1A; C; 1F12; # GREEK CAPITAL LETTER EPSILON WITH PSILI AND VARIA -1F1B; C; 1F13; # GREEK CAPITAL LETTER EPSILON WITH DASIA AND VARIA -1F1C; C; 1F14; # GREEK CAPITAL LETTER EPSILON WITH PSILI AND OXIA -1F1D; C; 1F15; # GREEK CAPITAL LETTER EPSILON WITH DASIA AND OXIA -1F28; C; 1F20; # GREEK CAPITAL LETTER ETA WITH PSILI -1F29; C; 1F21; # GREEK CAPITAL LETTER ETA WITH DASIA -1F2A; C; 1F22; # GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA -1F2B; C; 1F23; # GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA -1F2C; C; 1F24; # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA -1F2D; C; 1F25; # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA -1F2E; C; 1F26; # GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI -1F2F; C; 1F27; # GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI -1F38; C; 1F30; # GREEK CAPITAL LETTER IOTA WITH PSILI -1F39; C; 1F31; # GREEK CAPITAL LETTER IOTA WITH DASIA -1F3A; C; 1F32; # GREEK CAPITAL LETTER IOTA WITH PSILI AND VARIA -1F3B; C; 1F33; # GREEK CAPITAL LETTER IOTA WITH DASIA AND VARIA -1F3C; C; 1F34; # GREEK CAPITAL LETTER IOTA WITH PSILI AND OXIA -1F3D; C; 1F35; # GREEK CAPITAL LETTER IOTA WITH DASIA AND OXIA -1F3E; C; 1F36; # GREEK CAPITAL LETTER IOTA WITH PSILI AND PERISPOMENI -1F3F; C; 1F37; # GREEK CAPITAL LETTER IOTA WITH DASIA AND PERISPOMENI -1F48; C; 1F40; # GREEK CAPITAL LETTER OMICRON WITH PSILI -1F49; C; 1F41; # GREEK CAPITAL LETTER OMICRON WITH DASIA -1F4A; C; 1F42; # GREEK CAPITAL LETTER OMICRON WITH PSILI AND VARIA -1F4B; C; 1F43; # GREEK CAPITAL LETTER OMICRON WITH DASIA AND VARIA -1F4C; C; 1F44; # GREEK CAPITAL LETTER OMICRON WITH PSILI AND OXIA -1F4D; C; 1F45; # GREEK CAPITAL LETTER OMICRON WITH DASIA AND OXIA -1F50; F; 03C5 0313; # GREEK SMALL LETTER UPSILON WITH PSILI -1F52; F; 03C5 0313 0300; # GREEK SMALL LETTER UPSILON WITH PSILI AND VARIA -1F54; F; 03C5 0313 0301; # GREEK SMALL LETTER UPSILON WITH PSILI AND OXIA -1F56; F; 03C5 0313 0342; # GREEK SMALL LETTER UPSILON WITH PSILI AND PERISPOMENI -1F59; C; 1F51; # GREEK CAPITAL LETTER UPSILON WITH DASIA -1F5B; C; 1F53; # GREEK CAPITAL LETTER UPSILON WITH DASIA AND VARIA -1F5D; C; 1F55; # GREEK CAPITAL LETTER UPSILON WITH DASIA AND OXIA -1F5F; C; 1F57; # GREEK CAPITAL LETTER UPSILON WITH DASIA AND PERISPOMENI -1F68; C; 1F60; # GREEK CAPITAL LETTER OMEGA WITH PSILI -1F69; C; 1F61; # GREEK CAPITAL LETTER OMEGA WITH DASIA -1F6A; C; 1F62; # GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA -1F6B; C; 1F63; # GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA -1F6C; C; 1F64; # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA -1F6D; C; 1F65; # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA -1F6E; C; 1F66; # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI -1F6F; C; 1F67; # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI -1F80; F; 1F00 03B9; # GREEK SMALL LETTER ALPHA WITH PSILI AND YPOGEGRAMMENI -1F81; F; 1F01 03B9; # GREEK SMALL LETTER ALPHA WITH DASIA AND YPOGEGRAMMENI -1F82; F; 1F02 03B9; # GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA AND YPOGEGRAMMENI -1F83; F; 1F03 03B9; # GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA AND YPOGEGRAMMENI -1F84; F; 1F04 03B9; # GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA AND YPOGEGRAMMENI -1F85; F; 1F05 03B9; # GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA AND YPOGEGRAMMENI -1F86; F; 1F06 03B9; # GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI -1F87; F; 1F07 03B9; # GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI -1F88; F; 1F00 03B9; # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PROSGEGRAMMENI -1F88; S; 1F80; # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PROSGEGRAMMENI -1F89; F; 1F01 03B9; # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PROSGEGRAMMENI -1F89; S; 1F81; # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PROSGEGRAMMENI -1F8A; F; 1F02 03B9; # GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA AND PROSGEGRAMMENI -1F8A; S; 1F82; # GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA AND PROSGEGRAMMENI -1F8B; F; 1F03 03B9; # GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA AND PROSGEGRAMMENI -1F8B; S; 1F83; # GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA AND PROSGEGRAMMENI -1F8C; F; 1F04 03B9; # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA AND PROSGEGRAMMENI -1F8C; S; 1F84; # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA AND PROSGEGRAMMENI -1F8D; F; 1F05 03B9; # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA AND PROSGEGRAMMENI -1F8D; S; 1F85; # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA AND PROSGEGRAMMENI -1F8E; F; 1F06 03B9; # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI -1F8E; S; 1F86; # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI -1F8F; F; 1F07 03B9; # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI -1F8F; S; 1F87; # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI -1F90; F; 1F20 03B9; # GREEK SMALL LETTER ETA WITH PSILI AND YPOGEGRAMMENI -1F91; F; 1F21 03B9; # GREEK SMALL LETTER ETA WITH DASIA AND YPOGEGRAMMENI -1F92; F; 1F22 03B9; # GREEK SMALL LETTER ETA WITH PSILI AND VARIA AND YPOGEGRAMMENI -1F93; F; 1F23 03B9; # GREEK SMALL LETTER ETA WITH DASIA AND VARIA AND YPOGEGRAMMENI -1F94; F; 1F24 03B9; # GREEK SMALL LETTER ETA WITH PSILI AND OXIA AND YPOGEGRAMMENI -1F95; F; 1F25 03B9; # GREEK SMALL LETTER ETA WITH DASIA AND OXIA AND YPOGEGRAMMENI -1F96; F; 1F26 03B9; # GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI -1F97; F; 1F27 03B9; # GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI -1F98; F; 1F20 03B9; # GREEK CAPITAL LETTER ETA WITH PSILI AND PROSGEGRAMMENI -1F98; S; 1F90; # GREEK CAPITAL LETTER ETA WITH PSILI AND PROSGEGRAMMENI -1F99; F; 1F21 03B9; # GREEK CAPITAL LETTER ETA WITH DASIA AND PROSGEGRAMMENI -1F99; S; 1F91; # GREEK CAPITAL LETTER ETA WITH DASIA AND PROSGEGRAMMENI -1F9A; F; 1F22 03B9; # GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA AND PROSGEGRAMMENI -1F9A; S; 1F92; # GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA AND PROSGEGRAMMENI -1F9B; F; 1F23 03B9; # GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA AND PROSGEGRAMMENI -1F9B; S; 1F93; # GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA AND PROSGEGRAMMENI -1F9C; F; 1F24 03B9; # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA AND PROSGEGRAMMENI -1F9C; S; 1F94; # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA AND PROSGEGRAMMENI -1F9D; F; 1F25 03B9; # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA AND PROSGEGRAMMENI -1F9D; S; 1F95; # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA AND PROSGEGRAMMENI -1F9E; F; 1F26 03B9; # GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI -1F9E; S; 1F96; # GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI -1F9F; F; 1F27 03B9; # GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI -1F9F; S; 1F97; # GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI -1FA0; F; 1F60 03B9; # GREEK SMALL LETTER OMEGA WITH PSILI AND YPOGEGRAMMENI -1FA1; F; 1F61 03B9; # GREEK SMALL LETTER OMEGA WITH DASIA AND YPOGEGRAMMENI -1FA2; F; 1F62 03B9; # GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA AND YPOGEGRAMMENI -1FA3; F; 1F63 03B9; # GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA AND YPOGEGRAMMENI -1FA4; F; 1F64 03B9; # GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA AND YPOGEGRAMMENI -1FA5; F; 1F65 03B9; # GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA AND YPOGEGRAMMENI -1FA6; F; 1F66 03B9; # GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI -1FA7; F; 1F67 03B9; # GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI -1FA8; F; 1F60 03B9; # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PROSGEGRAMMENI -1FA8; S; 1FA0; # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PROSGEGRAMMENI -1FA9; F; 1F61 03B9; # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PROSGEGRAMMENI -1FA9; S; 1FA1; # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PROSGEGRAMMENI -1FAA; F; 1F62 03B9; # GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA AND PROSGEGRAMMENI -1FAA; S; 1FA2; # GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA AND PROSGEGRAMMENI -1FAB; F; 1F63 03B9; # GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA AND PROSGEGRAMMENI -1FAB; S; 1FA3; # GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA AND PROSGEGRAMMENI -1FAC; F; 1F64 03B9; # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA AND PROSGEGRAMMENI -1FAC; S; 1FA4; # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA AND PROSGEGRAMMENI -1FAD; F; 1F65 03B9; # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA AND PROSGEGRAMMENI -1FAD; S; 1FA5; # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA AND PROSGEGRAMMENI -1FAE; F; 1F66 03B9; # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI -1FAE; S; 1FA6; # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI -1FAF; F; 1F67 03B9; # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI -1FAF; S; 1FA7; # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI -1FB2; F; 1F70 03B9; # GREEK SMALL LETTER ALPHA WITH VARIA AND YPOGEGRAMMENI -1FB3; F; 03B1 03B9; # GREEK SMALL LETTER ALPHA WITH YPOGEGRAMMENI -1FB4; F; 03AC 03B9; # GREEK SMALL LETTER ALPHA WITH OXIA AND YPOGEGRAMMENI -1FB6; F; 03B1 0342; # GREEK SMALL LETTER ALPHA WITH PERISPOMENI -1FB7; F; 03B1 0342 03B9; # GREEK SMALL LETTER ALPHA WITH PERISPOMENI AND YPOGEGRAMMENI -1FB8; C; 1FB0; # GREEK CAPITAL LETTER ALPHA WITH VRACHY -1FB9; C; 1FB1; # GREEK CAPITAL LETTER ALPHA WITH MACRON -1FBA; C; 1F70; # GREEK CAPITAL LETTER ALPHA WITH VARIA -1FBB; C; 1F71; # GREEK CAPITAL LETTER ALPHA WITH OXIA -1FBC; F; 03B1 03B9; # GREEK CAPITAL LETTER ALPHA WITH PROSGEGRAMMENI -1FBC; S; 1FB3; # GREEK CAPITAL LETTER ALPHA WITH PROSGEGRAMMENI -1FBE; C; 03B9; # GREEK PROSGEGRAMMENI -1FC2; F; 1F74 03B9; # GREEK SMALL LETTER ETA WITH VARIA AND YPOGEGRAMMENI -1FC3; F; 03B7 03B9; # GREEK SMALL LETTER ETA WITH YPOGEGRAMMENI -1FC4; F; 03AE 03B9; # GREEK SMALL LETTER ETA WITH OXIA AND YPOGEGRAMMENI -1FC6; F; 03B7 0342; # GREEK SMALL LETTER ETA WITH PERISPOMENI -1FC7; F; 03B7 0342 03B9; # GREEK SMALL LETTER ETA WITH PERISPOMENI AND YPOGEGRAMMENI -1FC8; C; 1F72; # GREEK CAPITAL LETTER EPSILON WITH VARIA -1FC9; C; 1F73; # GREEK CAPITAL LETTER EPSILON WITH OXIA -1FCA; C; 1F74; # GREEK CAPITAL LETTER ETA WITH VARIA -1FCB; C; 1F75; # GREEK CAPITAL LETTER ETA WITH OXIA -1FCC; F; 03B7 03B9; # GREEK CAPITAL LETTER ETA WITH PROSGEGRAMMENI -1FCC; S; 1FC3; # GREEK CAPITAL LETTER ETA WITH PROSGEGRAMMENI -1FD2; F; 03B9 0308 0300; # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND VARIA -1FD3; F; 03B9 0308 0301; # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND OXIA -1FD6; F; 03B9 0342; # GREEK SMALL LETTER IOTA WITH PERISPOMENI -1FD7; F; 03B9 0308 0342; # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND PERISPOMENI -1FD8; C; 1FD0; # GREEK CAPITAL LETTER IOTA WITH VRACHY -1FD9; C; 1FD1; # GREEK CAPITAL LETTER IOTA WITH MACRON -1FDA; C; 1F76; # GREEK CAPITAL LETTER IOTA WITH VARIA -1FDB; C; 1F77; # GREEK CAPITAL LETTER IOTA WITH OXIA -1FE2; F; 03C5 0308 0300; # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND VARIA -1FE3; F; 03C5 0308 0301; # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND OXIA -1FE4; F; 03C1 0313; # GREEK SMALL LETTER RHO WITH PSILI -1FE6; F; 03C5 0342; # GREEK SMALL LETTER UPSILON WITH PERISPOMENI -1FE7; F; 03C5 0308 0342; # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND PERISPOMENI -1FE8; C; 1FE0; # GREEK CAPITAL LETTER UPSILON WITH VRACHY -1FE9; C; 1FE1; # GREEK CAPITAL LETTER UPSILON WITH MACRON -1FEA; C; 1F7A; # GREEK CAPITAL LETTER UPSILON WITH VARIA -1FEB; C; 1F7B; # GREEK CAPITAL LETTER UPSILON WITH OXIA -1FEC; C; 1FE5; # GREEK CAPITAL LETTER RHO WITH DASIA -1FF2; F; 1F7C 03B9; # GREEK SMALL LETTER OMEGA WITH VARIA AND YPOGEGRAMMENI -1FF3; F; 03C9 03B9; # GREEK SMALL LETTER OMEGA WITH YPOGEGRAMMENI -1FF4; F; 03CE 03B9; # GREEK SMALL LETTER OMEGA WITH OXIA AND YPOGEGRAMMENI -1FF6; F; 03C9 0342; # GREEK SMALL LETTER OMEGA WITH PERISPOMENI -1FF7; F; 03C9 0342 03B9; # GREEK SMALL LETTER OMEGA WITH PERISPOMENI AND YPOGEGRAMMENI -1FF8; C; 1F78; # GREEK CAPITAL LETTER OMICRON WITH VARIA -1FF9; C; 1F79; # GREEK CAPITAL LETTER OMICRON WITH OXIA -1FFA; C; 1F7C; # GREEK CAPITAL LETTER OMEGA WITH VARIA -1FFB; C; 1F7D; # GREEK CAPITAL LETTER OMEGA WITH OXIA -1FFC; F; 03C9 03B9; # GREEK CAPITAL LETTER OMEGA WITH PROSGEGRAMMENI -1FFC; S; 1FF3; # GREEK CAPITAL LETTER OMEGA WITH PROSGEGRAMMENI -2126; C; 03C9; # OHM SIGN -212A; C; 006B; # KELVIN SIGN -212B; C; 00E5; # ANGSTROM SIGN -2160; C; 2170; # ROMAN NUMERAL ONE -2161; C; 2171; # ROMAN NUMERAL TWO -2162; C; 2172; # ROMAN NUMERAL THREE -2163; C; 2173; # ROMAN NUMERAL FOUR -2164; C; 2174; # ROMAN NUMERAL FIVE -2165; C; 2175; # ROMAN NUMERAL SIX -2166; C; 2176; # ROMAN NUMERAL SEVEN -2167; C; 2177; # ROMAN NUMERAL EIGHT -2168; C; 2178; # ROMAN NUMERAL NINE -2169; C; 2179; # ROMAN NUMERAL TEN -216A; C; 217A; # ROMAN NUMERAL ELEVEN -216B; C; 217B; # ROMAN NUMERAL TWELVE -216C; C; 217C; # ROMAN NUMERAL FIFTY -216D; C; 217D; # ROMAN NUMERAL ONE HUNDRED -216E; C; 217E; # ROMAN NUMERAL FIVE HUNDRED -216F; C; 217F; # ROMAN NUMERAL ONE THOUSAND -24B6; C; 24D0; # CIRCLED LATIN CAPITAL LETTER A -24B7; C; 24D1; # CIRCLED LATIN CAPITAL LETTER B -24B8; C; 24D2; # CIRCLED LATIN CAPITAL LETTER C -24B9; C; 24D3; # CIRCLED LATIN CAPITAL LETTER D -24BA; C; 24D4; # CIRCLED LATIN CAPITAL LETTER E -24BB; C; 24D5; # CIRCLED LATIN CAPITAL LETTER F -24BC; C; 24D6; # CIRCLED LATIN CAPITAL LETTER G -24BD; C; 24D7; # CIRCLED LATIN CAPITAL LETTER H -24BE; C; 24D8; # CIRCLED LATIN CAPITAL LETTER I -24BF; C; 24D9; # CIRCLED LATIN CAPITAL LETTER J -24C0; C; 24DA; # CIRCLED LATIN CAPITAL LETTER K -24C1; C; 24DB; # CIRCLED LATIN CAPITAL LETTER L -24C2; C; 24DC; # CIRCLED LATIN CAPITAL LETTER M -24C3; C; 24DD; # CIRCLED LATIN CAPITAL LETTER N -24C4; C; 24DE; # CIRCLED LATIN CAPITAL LETTER O -24C5; C; 24DF; # CIRCLED LATIN CAPITAL LETTER P -24C6; C; 24E0; # CIRCLED LATIN CAPITAL LETTER Q -24C7; C; 24E1; # CIRCLED LATIN CAPITAL LETTER R -24C8; C; 24E2; # CIRCLED LATIN CAPITAL LETTER S -24C9; C; 24E3; # CIRCLED LATIN CAPITAL LETTER T -24CA; C; 24E4; # CIRCLED LATIN CAPITAL LETTER U -24CB; C; 24E5; # CIRCLED LATIN CAPITAL LETTER V -24CC; C; 24E6; # CIRCLED LATIN CAPITAL LETTER W -24CD; C; 24E7; # CIRCLED LATIN CAPITAL LETTER X -24CE; C; 24E8; # CIRCLED LATIN CAPITAL LETTER Y -24CF; C; 24E9; # CIRCLED LATIN CAPITAL LETTER Z -FB00; F; 0066 0066; # LATIN SMALL LIGATURE FF -FB01; F; 0066 0069; # LATIN SMALL LIGATURE FI -FB02; F; 0066 006C; # LATIN SMALL LIGATURE FL -FB03; F; 0066 0066 0069; # LATIN SMALL LIGATURE FFI -FB04; F; 0066 0066 006C; # LATIN SMALL LIGATURE FFL -FB05; F; 0073 0074; # LATIN SMALL LIGATURE LONG S T -FB06; F; 0073 0074; # LATIN SMALL LIGATURE ST -FB13; F; 0574 0576; # ARMENIAN SMALL LIGATURE MEN NOW -FB14; F; 0574 0565; # ARMENIAN SMALL LIGATURE MEN ECH -FB15; F; 0574 056B; # ARMENIAN SMALL LIGATURE MEN INI -FB16; F; 057E 0576; # ARMENIAN SMALL LIGATURE VEW NOW -FB17; F; 0574 056D; # ARMENIAN SMALL LIGATURE MEN XEH -FF21; C; FF41; # FULLWIDTH LATIN CAPITAL LETTER A -FF22; C; FF42; # FULLWIDTH LATIN CAPITAL LETTER B -FF23; C; FF43; # FULLWIDTH LATIN CAPITAL LETTER C -FF24; C; FF44; # FULLWIDTH LATIN CAPITAL LETTER D -FF25; C; FF45; # FULLWIDTH LATIN CAPITAL LETTER E -FF26; C; FF46; # FULLWIDTH LATIN CAPITAL LETTER F -FF27; C; FF47; # FULLWIDTH LATIN CAPITAL LETTER G -FF28; C; FF48; # FULLWIDTH LATIN CAPITAL LETTER H -FF29; C; FF49; # FULLWIDTH LATIN CAPITAL LETTER I -FF2A; C; FF4A; # FULLWIDTH LATIN CAPITAL LETTER J -FF2B; C; FF4B; # FULLWIDTH LATIN CAPITAL LETTER K -FF2C; C; FF4C; # FULLWIDTH LATIN CAPITAL LETTER L -FF2D; C; FF4D; # FULLWIDTH LATIN CAPITAL LETTER M -FF2E; C; FF4E; # FULLWIDTH LATIN CAPITAL LETTER N -FF2F; C; FF4F; # FULLWIDTH LATIN CAPITAL LETTER O -FF30; C; FF50; # FULLWIDTH LATIN CAPITAL LETTER P -FF31; C; FF51; # FULLWIDTH LATIN CAPITAL LETTER Q -FF32; C; FF52; # FULLWIDTH LATIN CAPITAL LETTER R -FF33; C; FF53; # FULLWIDTH LATIN CAPITAL LETTER S -FF34; C; FF54; # FULLWIDTH LATIN CAPITAL LETTER T -FF35; C; FF55; # FULLWIDTH LATIN CAPITAL LETTER U -FF36; C; FF56; # FULLWIDTH LATIN CAPITAL LETTER V -FF37; C; FF57; # FULLWIDTH LATIN CAPITAL LETTER W -FF38; C; FF58; # FULLWIDTH LATIN CAPITAL LETTER X -FF39; C; FF59; # FULLWIDTH LATIN CAPITAL LETTER Y -FF3A; C; FF5A; # FULLWIDTH LATIN CAPITAL LETTER Z -10400; C; 10428; # DESERET CAPITAL LETTER LONG I -10401; C; 10429; # DESERET CAPITAL LETTER LONG E -10402; C; 1042A; # DESERET CAPITAL LETTER LONG A -10403; C; 1042B; # DESERET CAPITAL LETTER LONG AH -10404; C; 1042C; # DESERET CAPITAL LETTER LONG O -10405; C; 1042D; # DESERET CAPITAL LETTER LONG OO -10406; C; 1042E; # DESERET CAPITAL LETTER SHORT I -10407; C; 1042F; # DESERET CAPITAL LETTER SHORT E -10408; C; 10430; # DESERET CAPITAL LETTER SHORT A -10409; C; 10431; # DESERET CAPITAL LETTER SHORT AH -1040A; C; 10432; # DESERET CAPITAL LETTER SHORT O -1040B; C; 10433; # DESERET CAPITAL LETTER SHORT OO -1040C; C; 10434; # DESERET CAPITAL LETTER AY -1040D; C; 10435; # DESERET CAPITAL LETTER OW -1040E; C; 10436; # DESERET CAPITAL LETTER WU -1040F; C; 10437; # DESERET CAPITAL LETTER YEE -10410; C; 10438; # DESERET CAPITAL LETTER H -10411; C; 10439; # DESERET CAPITAL LETTER PEE -10412; C; 1043A; # DESERET CAPITAL LETTER BEE -10413; C; 1043B; # DESERET CAPITAL LETTER TEE -10414; C; 1043C; # DESERET CAPITAL LETTER DEE -10415; C; 1043D; # DESERET CAPITAL LETTER CHEE -10416; C; 1043E; # DESERET CAPITAL LETTER JEE -10417; C; 1043F; # DESERET CAPITAL LETTER KAY -10418; C; 10440; # DESERET CAPITAL LETTER GAY -10419; C; 10441; # DESERET CAPITAL LETTER EF -1041A; C; 10442; # DESERET CAPITAL LETTER VEE -1041B; C; 10443; # DESERET CAPITAL LETTER ETH -1041C; C; 10444; # DESERET CAPITAL LETTER THEE -1041D; C; 10445; # DESERET CAPITAL LETTER ES -1041E; C; 10446; # DESERET CAPITAL LETTER ZEE -1041F; C; 10447; # DESERET CAPITAL LETTER ESH -10420; C; 10448; # DESERET CAPITAL LETTER ZHEE -10421; C; 10449; # DESERET CAPITAL LETTER ER -10422; C; 1044A; # DESERET CAPITAL LETTER EL -10423; C; 1044B; # DESERET CAPITAL LETTER EM -10424; C; 1044C; # DESERET CAPITAL LETTER EN -10425; C; 1044D; # DESERET CAPITAL LETTER ENG diff --git a/outside/commonmark/dingus.html b/outside/commonmark/dingus.html deleted file mode 100644 index 73c294f3c..000000000 --- a/outside/commonmark/dingus.html +++ /dev/null @@ -1,151 +0,0 @@ - - - - - commonmark.js demo - - - - - - - - -
-
-
-

commonmark.js dingus

-
-
-
-
-

clear 

- -
    -
    Parsed in - ms. Rendered in ms.
    -
    -
    - -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - - diff --git a/outside/commonmark/js/.npmignore b/outside/commonmark/js/.npmignore deleted file mode 100644 index d73e230f8..000000000 --- a/outside/commonmark/js/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -commonmark.js -*.tgz -index.html diff --git a/outside/commonmark/js/LICENSE b/outside/commonmark/js/LICENSE deleted file mode 100644 index bb8c36f58..000000000 --- a/outside/commonmark/js/LICENSE +++ /dev/null @@ -1,30 +0,0 @@ -Copyright (c) 2014, John MacFarlane - -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 John MacFarlane nor the names of other - 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/outside/commonmark/js/README.md b/outside/commonmark/js/README.md deleted file mode 100644 index 9f1e0433b..000000000 --- a/outside/commonmark/js/README.md +++ /dev/null @@ -1,24 +0,0 @@ -CommonMark -========== - -CommonMark is a rationalized version of Markdown syntax, -with a [spec][the spec] and BSD3-licensed reference -implementations in C and JavaScript. - -For more information, see . - -To play with this library without installing it, see -the live dingus at . - -This package includes the commonmark library and a -command-line executable, `commonmark`. - -Basic usage example: - - var reader = new commonmark.DocParser(); - var writer = new commonmark.HtmlRenderer(); - var parsed = reader.parse("Hello *world*"); - var result = writer.render(parsed); - - [the spec]: http://spec.commonmark.org - diff --git a/outside/commonmark/js/ansi/ansi.js b/outside/commonmark/js/ansi/ansi.js deleted file mode 100644 index 52fc8ec8b..000000000 --- a/outside/commonmark/js/ansi/ansi.js +++ /dev/null @@ -1,405 +0,0 @@ - -/** - * References: - * - * - http://en.wikipedia.org/wiki/ANSI_escape_code - * - http://www.termsys.demon.co.uk/vtansi.htm - * - */ - -/** - * Module dependencies. - */ - -var emitNewlineEvents = require('./newlines') - , prefix = '\x1b[' // For all escape codes - , suffix = 'm' // Only for color codes - -/** - * The ANSI escape sequences. - */ - -var codes = { - up: 'A' - , down: 'B' - , forward: 'C' - , back: 'D' - , nextLine: 'E' - , previousLine: 'F' - , horizontalAbsolute: 'G' - , eraseData: 'J' - , eraseLine: 'K' - , scrollUp: 'S' - , scrollDown: 'T' - , savePosition: 's' - , restorePosition: 'u' - , queryPosition: '6n' - , hide: '?25l' - , show: '?25h' -} - -/** - * Rendering ANSI codes. - */ - -var styles = { - bold: 1 - , italic: 3 - , underline: 4 - , inverse: 7 -} - -/** - * The negating ANSI code for the rendering modes. - */ - -var reset = { - bold: 22 - , italic: 23 - , underline: 24 - , inverse: 27 -} - -/** - * The standard, styleable ANSI colors. - */ - -var colors = { - white: 37 - , black: 30 - , blue: 34 - , cyan: 36 - , green: 32 - , magenta: 35 - , red: 31 - , yellow: 33 - , grey: 90 - , brightBlack: 90 - , brightRed: 91 - , brightGreen: 92 - , brightYellow: 93 - , brightBlue: 94 - , brightMagenta: 95 - , brightCyan: 96 - , brightWhite: 97 -} - - -/** - * Creates a Cursor instance based off the given `writable stream` instance. - */ - -function ansi (stream, options) { - if (stream._ansicursor) { - return stream._ansicursor - } else { - return stream._ansicursor = new Cursor(stream, options) - } -} -module.exports = exports = ansi - -/** - * The `Cursor` class. - */ - -function Cursor (stream, options) { - if (!(this instanceof Cursor)) { - return new Cursor(stream, options) - } - if (typeof stream != 'object' || typeof stream.write != 'function') { - throw new Error('a valid Stream instance must be passed in') - } - - // the stream to use - this.stream = stream - - // when 'enabled' is false then all the functions are no-ops except for write() - this.enabled = options && options.enabled - if (typeof this.enabled === 'undefined') { - this.enabled = stream.isTTY - } - this.enabled = !!this.enabled - - // then `buffering` is true, then `write()` calls are buffered in - // memory until `flush()` is invoked - this.buffering = !!(options && options.buffering) - this._buffer = [] - - // controls the foreground and background colors - this.fg = this.foreground = new Colorer(this, 0) - this.bg = this.background = new Colorer(this, 10) - - // defaults - this.Bold = false - this.Italic = false - this.Underline = false - this.Inverse = false - - // keep track of the number of "newlines" that get encountered - this.newlines = 0 - emitNewlineEvents(stream) - stream.on('newline', function () { - this.newlines++ - }.bind(this)) -} -exports.Cursor = Cursor - -/** - * Helper function that calls `write()` on the underlying Stream. - * Returns `this` instead of the write() return value to keep - * the chaining going. - */ - -Cursor.prototype.write = function (data) { - if (this.buffering) { - this._buffer.push(arguments) - } else { - this.stream.write.apply(this.stream, arguments) - } - return this -} - -/** - * Buffer `write()` calls into memory. - * - * @api public - */ - -Cursor.prototype.buffer = function () { - this.buffering = true - return this -} - -/** - * Write out the in-memory buffer. - * - * @api public - */ - -Cursor.prototype.flush = function () { - this.buffering = false - var str = this._buffer.map(function (args) { - if (args.length != 1) throw new Error('unexpected args length! ' + args.length); - return args[0]; - }).join(''); - this._buffer.splice(0); // empty - this.write(str); - return this -} - - -/** - * The `Colorer` class manages both the background and foreground colors. - */ - -function Colorer (cursor, base) { - this.current = null - this.cursor = cursor - this.base = base -} -exports.Colorer = Colorer - -/** - * Write an ANSI color code, ensuring that the same code doesn't get rewritten. - */ - -Colorer.prototype._setColorCode = function setColorCode (code) { - var c = String(code) - if (this.current === c) return - this.cursor.enabled && this.cursor.write(prefix + c + suffix) - this.current = c - return this -} - - -/** - * Set up the positional ANSI codes. - */ - -Object.keys(codes).forEach(function (name) { - var code = String(codes[name]) - Cursor.prototype[name] = function () { - var c = code - if (arguments.length > 0) { - c = toArray(arguments).map(Math.round).join(';') + code - } - this.enabled && this.write(prefix + c) - return this - } -}) - -/** - * Set up the functions for the rendering ANSI codes. - */ - -Object.keys(styles).forEach(function (style) { - var name = style[0].toUpperCase() + style.substring(1) - , c = styles[style] - , r = reset[style] - - Cursor.prototype[style] = function () { - if (this[name]) return - this.enabled && this.write(prefix + c + suffix) - this[name] = true - return this - } - - Cursor.prototype['reset' + name] = function () { - if (!this[name]) return - this.enabled && this.write(prefix + r + suffix) - this[name] = false - return this - } -}) - -/** - * Setup the functions for the standard colors. - */ - -Object.keys(colors).forEach(function (color) { - var code = colors[color] - - Colorer.prototype[color] = function () { - this._setColorCode(this.base + code) - return this.cursor - } - - Cursor.prototype[color] = function () { - return this.foreground[color]() - } -}) - -/** - * Makes a beep sound! - */ - -Cursor.prototype.beep = function () { - this.enabled && this.write('\x07') - return this -} - -/** - * Moves cursor to specific position - */ - -Cursor.prototype.goto = function (x, y) { - x = x | 0 - y = y | 0 - this.enabled && this.write(prefix + y + ';' + x + 'H') - return this -} - -/** - * Resets the color. - */ - -Colorer.prototype.reset = function () { - this._setColorCode(this.base + 39) - return this.cursor -} - -/** - * Resets all ANSI formatting on the stream. - */ - -Cursor.prototype.reset = function () { - this.enabled && this.write(prefix + '0' + suffix) - this.Bold = false - this.Italic = false - this.Underline = false - this.Inverse = false - this.foreground.current = null - this.background.current = null - return this -} - -/** - * Sets the foreground color with the given RGB values. - * The closest match out of the 216 colors is picked. - */ - -Colorer.prototype.rgb = function (r, g, b) { - var base = this.base + 38 - , code = rgb(r, g, b) - this._setColorCode(base + ';5;' + code) - return this.cursor -} - -/** - * Same as `cursor.fg.rgb(r, g, b)`. - */ - -Cursor.prototype.rgb = function (r, g, b) { - return this.foreground.rgb(r, g, b) -} - -/** - * Accepts CSS color codes for use with ANSI escape codes. - * For example: `#FF000` would be bright red. - */ - -Colorer.prototype.hex = function (color) { - return this.rgb.apply(this, hex(color)) -} - -/** - * Same as `cursor.fg.hex(color)`. - */ - -Cursor.prototype.hex = function (color) { - return this.foreground.hex(color) -} - - -// UTIL FUNCTIONS // - -/** - * Translates a 255 RGB value to a 0-5 ANSI RGV value, - * then returns the single ANSI color code to use. - */ - -function rgb (r, g, b) { - var red = r / 255 * 5 - , green = g / 255 * 5 - , blue = b / 255 * 5 - return rgb5(red, green, blue) -} - -/** - * Turns rgb 0-5 values into a single ANSI color code to use. - */ - -function rgb5 (r, g, b) { - var red = Math.round(r) - , green = Math.round(g) - , blue = Math.round(b) - return 16 + (red*36) + (green*6) + blue -} - -/** - * Accepts a hex CSS color code string (# is optional) and - * translates it into an Array of 3 RGB 0-255 values, which - * can then be used with rgb(). - */ - -function hex (color) { - var c = color[0] === '#' ? color.substring(1) : color - , r = c.substring(0, 2) - , g = c.substring(2, 4) - , b = c.substring(4, 6) - return [parseInt(r, 16), parseInt(g, 16), parseInt(b, 16)] -} - -/** - * Turns an array-like object into a real array. - */ - -function toArray (a) { - var i = 0 - , l = a.length - , rtn = [] - for (; i 0) { - var len = data.length - , i = 0 - // now try to calculate any deltas - if (typeof data == 'string') { - for (; ihtml', function() { - var doc = new sm.DocParser().parse(contents); - var renderer = new sm.HtmlRenderer(); - renderer.renderBlock(doc); -}) - -.add('showdown.js markdown->html', function() { - var converter = new showdown.converter(); - converter.makeHtml(contents); -}) - -.add('marked.js markdown->html', function() { - marked(contents); -}) - -.on('cycle', function(event) { - console.log(String(event.target)); -}) -.run(); - diff --git a/outside/commonmark/js/bin/commonmark b/outside/commonmark/js/bin/commonmark deleted file mode 100755 index 1d395e02a..000000000 --- a/outside/commonmark/js/bin/commonmark +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env node -var fs = require('fs'); -var util = require('util'); -var commonmark = require('../lib/index.js'); - -var parser = new commonmark.DocParser(); -var renderer; -var inps = []; - -var output_ast = false; -var files = []; - -if (process.argv[2] === '--ast') { - output_ast = true; - files = process.argv.slice(3); - renderer = { render: function(x) { - return util.inspect(x, null, Infinity) + '\n'; - } }; -} else { - files = process.argv.slice(2); - renderer = new commonmark.HtmlRenderer(); -} - -if (files.length === 0) { - files = ['/dev/stdin']; -} - -for (var i = 0; i < files.length; i++) { - file = files[i]; - inps.push(fs.readFileSync(file, 'utf8')); -} - -process.stdout.write(renderer.render(parser.parse(inps.join('\n')))); diff --git a/outside/commonmark/js/index.html b/outside/commonmark/js/index.html deleted file mode 100644 index 3f6c904fe..000000000 --- a/outside/commonmark/js/index.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - CommonMark dingus - - - -

    The most recent version of the CommonMark dingus can be found -at /dingus.html/.

    - - diff --git a/outside/commonmark/js/lib/blocks.js b/outside/commonmark/js/lib/blocks.js deleted file mode 100644 index 53fe2b96c..000000000 --- a/outside/commonmark/js/lib/blocks.js +++ /dev/null @@ -1,698 +0,0 @@ -var C_GREATERTHAN = 62; -var C_SPACE = 32; -var C_OPEN_BRACKET = 91; - -var InlineParser = require('./inlines'); -var unescapeString = new InlineParser().unescapeString; - -// Returns true if string contains only space characters. -var isBlank = function(s) { - return /^\s*$/.test(s); -}; - -// Convert tabs to spaces on each line using a 4-space tab stop. -var detabLine = function(text) { - if (text.indexOf('\t') == -1) { - return text; - } else { - var lastStop = 0; - return text.replace(/\t/g, function(match, offset) { - var result = ' '.slice((offset - lastStop) % 4); - lastStop = offset + 1; - return result; - }); - } -}; - -// Attempt to match a regex in string s at offset offset. -// Return index of match or -1. -var matchAt = function(re, s, offset) { - var res = s.slice(offset).match(re); - if (res) { - return offset + res.index; - } else { - return -1; - } -}; - -var BLOCKTAGNAME = '(?:article|header|aside|hgroup|iframe|blockquote|hr|body|li|map|button|object|canvas|ol|caption|output|col|p|colgroup|pre|dd|progress|div|section|dl|table|td|dt|tbody|embed|textarea|fieldset|tfoot|figcaption|th|figure|thead|footer|footer|tr|form|ul|h1|h2|h3|h4|h5|h6|video|script|style)'; -var HTMLBLOCKOPEN = "<(?:" + BLOCKTAGNAME + "[\\s/>]" + "|" + - "/" + BLOCKTAGNAME + "[\\s>]" + "|" + "[?!])"; -var reHtmlBlockOpen = new RegExp('^' + HTMLBLOCKOPEN, 'i'); - -var reHrule = /^(?:(?:\* *){3,}|(?:_ *){3,}|(?:- *){3,}) *$/; - - -// DOC PARSER - -// These are methods of a DocParser object, defined below. - -var makeBlock = function(tag, start_line, start_column) { - return { t: tag, - open: true, - last_line_blank: false, - start_line: start_line, - start_column: start_column, - end_line: start_line, - children: [], - parent: null, - // string_content is formed by concatenating strings, in finalize: - string_content: "", - strings: [], - inline_content: [] - }; -}; - -// Returns true if parent block can contain child block. -var canContain = function(parent_type, child_type) { - return ( parent_type == 'Document' || - parent_type == 'BlockQuote' || - parent_type == 'ListItem' || - (parent_type == 'List' && child_type == 'ListItem') ); -}; - -// Returns true if block type can accept lines of text. -var acceptsLines = function(block_type) { - return ( block_type == 'Paragraph' || - block_type == 'IndentedCode' || - block_type == 'FencedCode' ); -}; - -// Returns true if block ends with a blank line, descending if needed -// into lists and sublists. -var endsWithBlankLine = function(block) { - if (block.last_line_blank) { - return true; - } - if ((block.t == 'List' || block.t == 'ListItem') && block.children.length > 0) { - return endsWithBlankLine(block.children[block.children.length - 1]); - } else { - return false; - } -}; - -// Break out of all containing lists, resetting the tip of the -// document to the parent of the highest list, and finalizing -// all the lists. (This is used to implement the "two blank lines -// break of of all lists" feature.) -var breakOutOfLists = function(block, line_number) { - var b = block; - var last_list = null; - do { - if (b.t === 'List') { - last_list = b; - } - b = b.parent; - } while (b); - - if (last_list) { - while (block != last_list) { - this.finalize(block, line_number); - block = block.parent; - } - this.finalize(last_list, line_number); - this.tip = last_list.parent; - } -}; - -// Add a line to the block at the tip. We assume the tip -// can accept lines -- that check should be done before calling this. -var addLine = function(ln, offset) { - var s = ln.slice(offset); - if (!(this.tip.open)) { - throw({ msg: "Attempted to add line (" + ln + ") to closed container." }); - } - this.tip.strings.push(s); -}; - -// Add block of type tag as a child of the tip. If the tip can't -// accept children, close and finalize it and try its parent, -// and so on til we find a block that can accept children. -var addChild = function(tag, line_number, offset) { - while (!canContain(this.tip.t, tag)) { - this.finalize(this.tip, line_number); - } - - var column_number = offset + 1; // offset 0 = column 1 - var newBlock = makeBlock(tag, line_number, column_number); - this.tip.children.push(newBlock); - newBlock.parent = this.tip; - this.tip = newBlock; - return newBlock; -}; - -// Parse a list marker and return data on the marker (type, -// start, delimiter, bullet character, padding) or null. -var parseListMarker = function(ln, offset) { - var rest = ln.slice(offset); - var match; - var spaces_after_marker; - var data = {}; - if (rest.match(reHrule)) { - return null; - } - if ((match = rest.match(/^[*+-]( +|$)/))) { - spaces_after_marker = match[1].length; - data.type = 'Bullet'; - data.bullet_char = match[0][0]; - - } else if ((match = rest.match(/^(\d+)([.)])( +|$)/))) { - spaces_after_marker = match[3].length; - data.type = 'Ordered'; - data.start = parseInt(match[1]); - data.delimiter = match[2]; - } else { - return null; - } - var blank_item = match[0].length === rest.length; - if (spaces_after_marker >= 5 || - spaces_after_marker < 1 || - blank_item) { - data.padding = match[0].length - spaces_after_marker + 1; - } else { - data.padding = match[0].length; - } - return data; -}; - -// Returns true if the two list items are of the same type, -// with the same delimiter and bullet character. This is used -// in agglomerating list items into lists. -var listsMatch = function(list_data, item_data) { - return (list_data.type === item_data.type && - list_data.delimiter === item_data.delimiter && - list_data.bullet_char === item_data.bullet_char); -}; - -// Analyze a line of text and update the document appropriately. -// We parse markdown text by calling this on each line of input, -// then finalizing the document. -var incorporateLine = function(ln, line_number) { - - var all_matched = true; - var last_child; - var first_nonspace; - var offset = 0; - var match; - var data; - var blank; - var indent; - var last_matched_container; - var i; - var CODE_INDENT = 4; - - var container = this.doc; - var oldtip = this.tip; - - // Convert tabs to spaces: - ln = detabLine(ln); - - // For each containing block, try to parse the associated line start. - // Bail out on failure: container will point to the last matching block. - // Set all_matched to false if not all containers match. - while (container.children.length > 0) { - last_child = container.children[container.children.length - 1]; - if (!last_child.open) { - break; - } - container = last_child; - - match = matchAt(/[^ ]/, ln, offset); - if (match === -1) { - first_nonspace = ln.length; - blank = true; - } else { - first_nonspace = match; - blank = false; - } - indent = first_nonspace - offset; - - switch (container.t) { - case 'BlockQuote': - if (indent <= 3 && ln.charCodeAt(first_nonspace) === C_GREATERTHAN) { - offset = first_nonspace + 1; - if (ln.charCodeAt(offset) === C_SPACE) { - offset++; - } - } else { - all_matched = false; - } - break; - - case 'ListItem': - if (indent >= container.list_data.marker_offset + - container.list_data.padding) { - offset += container.list_data.marker_offset + - container.list_data.padding; - } else if (blank) { - offset = first_nonspace; - } else { - all_matched = false; - } - break; - - case 'IndentedCode': - if (indent >= CODE_INDENT) { - offset += CODE_INDENT; - } else if (blank) { - offset = first_nonspace; - } else { - all_matched = false; - } - break; - - case 'Header': - case 'HorizontalRule': - // a header can never container > 1 line, so fail to match: - all_matched = false; - if (blank) { - container.last_line_blank = true; - } - break; - - case 'FencedCode': - // skip optional spaces of fence offset - i = container.fence_offset; - while (i > 0 && ln.charCodeAt(offset) === C_SPACE) { - offset++; - i--; - } - break; - - case 'HtmlBlock': - if (blank) { - container.last_line_blank = true; - all_matched = false; - } - break; - - case 'Paragraph': - if (blank) { - container.last_line_blank = true; - all_matched = false; - } - break; - - default: - } - - if (!all_matched) { - container = container.parent; // back up to last matching block - break; - } - } - - last_matched_container = container; - - // This function is used to finalize and close any unmatched - // blocks. We aren't ready to do this now, because we might - // have a lazy paragraph continuation, in which case we don't - // want to close unmatched blocks. So we store this closure for - // use later, when we have more information. - var closeUnmatchedBlocks = function(mythis) { - // finalize any blocks not matched - while (!already_done && oldtip != last_matched_container) { - mythis.finalize(oldtip, line_number); - oldtip = oldtip.parent; - } - var already_done = true; - }; - - // Check to see if we've hit 2nd blank line; if so break out of list: - if (blank && container.last_line_blank) { - this.breakOutOfLists(container, line_number); - } - - // Unless last matched container is a code block, try new container starts, - // adding children to the last matched container: - while (container.t != 'FencedCode' && - container.t != 'IndentedCode' && - container.t != 'HtmlBlock' && - // this is a little performance optimization: - matchAt(/^[ #`~*+_=<>0-9-]/,ln,offset) !== -1) { - - match = matchAt(/[^ ]/, ln, offset); - if (match === -1) { - first_nonspace = ln.length; - blank = true; - } else { - first_nonspace = match; - blank = false; - } - indent = first_nonspace - offset; - - if (indent >= CODE_INDENT) { - // indented code - if (this.tip.t != 'Paragraph' && !blank) { - offset += CODE_INDENT; - closeUnmatchedBlocks(this); - container = this.addChild('IndentedCode', line_number, offset); - } else { // indent > 4 in a lazy paragraph continuation - break; - } - - } else if (ln.charCodeAt(first_nonspace) === C_GREATERTHAN) { - // blockquote - offset = first_nonspace + 1; - // optional following space - if (ln.charCodeAt(offset) === C_SPACE) { - offset++; - } - closeUnmatchedBlocks(this); - container = this.addChild('BlockQuote', line_number, offset); - - } else if ((match = ln.slice(first_nonspace).match(/^#{1,6}(?: +|$)/))) { - // ATX header - offset = first_nonspace + match[0].length; - closeUnmatchedBlocks(this); - container = this.addChild('Header', line_number, first_nonspace); - container.level = match[0].trim().length; // number of #s - // remove trailing ###s: - container.strings = - [ln.slice(offset).replace(/^ *#+ *$/, '').replace(/ +#+ *$/,'')]; - break; - - } else if ((match = ln.slice(first_nonspace).match(/^`{3,}(?!.*`)|^~{3,}(?!.*~)/))) { - // fenced code block - var fence_length = match[0].length; - closeUnmatchedBlocks(this); - container = this.addChild('FencedCode', line_number, first_nonspace); - container.fence_length = fence_length; - container.fence_char = match[0][0]; - container.fence_offset = first_nonspace - offset; - offset = first_nonspace + fence_length; - break; - - } else if (matchAt(reHtmlBlockOpen, ln, first_nonspace) !== -1) { - // html block - closeUnmatchedBlocks(this); - container = this.addChild('HtmlBlock', line_number, first_nonspace); - // note, we don't adjust offset because the tag is part of the text - break; - - } else if (container.t == 'Paragraph' && - container.strings.length === 1 && - ((match = ln.slice(first_nonspace).match(/^(?:=+|-+) *$/)))) { - // setext header line - closeUnmatchedBlocks(this); - container.t = 'Header'; // convert Paragraph to SetextHeader - container.level = match[0][0] === '=' ? 1 : 2; - offset = ln.length; - - } else if (matchAt(reHrule, ln, first_nonspace) !== -1) { - // hrule - closeUnmatchedBlocks(this); - container = this.addChild('HorizontalRule', line_number, first_nonspace); - offset = ln.length - 1; - break; - - } else if ((data = parseListMarker(ln, first_nonspace))) { - // list item - closeUnmatchedBlocks(this); - data.marker_offset = indent; - offset = first_nonspace + data.padding; - - // add the list if needed - if (container.t !== 'List' || - !(listsMatch(container.list_data, data))) { - container = this.addChild('List', line_number, first_nonspace); - container.list_data = data; - } - - // add the list item - container = this.addChild('ListItem', line_number, first_nonspace); - container.list_data = data; - - } else { - break; - - } - - if (acceptsLines(container.t)) { - // if it's a line container, it can't contain other containers - break; - } - } - - // What remains at the offset is a text line. Add the text to the - // appropriate container. - - match = matchAt(/[^ ]/, ln, offset); - if (match === -1) { - first_nonspace = ln.length; - blank = true; - } else { - first_nonspace = match; - blank = false; - } - indent = first_nonspace - offset; - - // First check for a lazy paragraph continuation: - if (this.tip !== last_matched_container && - !blank && - this.tip.t == 'Paragraph' && - this.tip.strings.length > 0) { - // lazy paragraph continuation - - this.last_line_blank = false; - this.addLine(ln, offset); - - } else { // not a lazy continuation - - // finalize any blocks not matched - closeUnmatchedBlocks(this); - - // Block quote lines are never blank as they start with > - // and we don't count blanks in fenced code for purposes of tight/loose - // lists or breaking out of lists. We also don't set last_line_blank - // on an empty list item. - container.last_line_blank = blank && - !(container.t == 'BlockQuote' || - container.t == 'Header' || - container.t == 'FencedCode' || - (container.t == 'ListItem' && - container.children.length === 0 && - container.start_line == line_number)); - - var cont = container; - while (cont.parent) { - cont.parent.last_line_blank = false; - cont = cont.parent; - } - - switch (container.t) { - case 'IndentedCode': - case 'HtmlBlock': - this.addLine(ln, offset); - break; - - case 'FencedCode': - // check for closing code fence: - match = (indent <= 3 && - ln.charAt(first_nonspace) == container.fence_char && - ln.slice(first_nonspace).match(/^(?:`{3,}|~{3,})(?= *$)/)); - if (match && match[0].length >= container.fence_length) { - // don't add closing fence to container; instead, close it: - this.finalize(container, line_number); - } else { - this.addLine(ln, offset); - } - break; - - case 'Header': - case 'HorizontalRule': - // nothing to do; we already added the contents. - break; - - default: - if (acceptsLines(container.t)) { - this.addLine(ln, first_nonspace); - } else if (blank) { - // do nothing - } else if (container.t != 'HorizontalRule' && - container.t != 'Header') { - // create paragraph container for line - container = this.addChild('Paragraph', line_number, first_nonspace); - this.addLine(ln, first_nonspace); - } else { - console.log("Line " + line_number.toString() + - " with container type " + container.t + - " did not match any condition."); - - } - } - } -}; - -// Finalize a block. Close it and do any necessary postprocessing, -// e.g. creating string_content from strings, setting the 'tight' -// or 'loose' status of a list, and parsing the beginnings -// of paragraphs for reference definitions. Reset the tip to the -// parent of the closed block. -var finalize = function(block, line_number) { - var pos; - // don't do anything if the block is already closed - if (!block.open) { - return 0; - } - block.open = false; - if (line_number > block.start_line) { - block.end_line = line_number - 1; - } else { - block.end_line = line_number; - } - - switch (block.t) { - case 'Paragraph': - block.string_content = block.strings.join('\n').replace(/^ */m,''); - // delete block.strings; - - // try parsing the beginning as link reference definitions: - while (block.string_content.charCodeAt(0) === C_OPEN_BRACKET && - (pos = this.inlineParser.parseReference(block.string_content, - this.refmap))) { - block.string_content = block.string_content.slice(pos); - if (isBlank(block.string_content)) { - block.t = 'ReferenceDef'; - break; - } - } - break; - - case 'Header': - case 'HtmlBlock': - block.string_content = block.strings.join('\n'); - break; - - case 'IndentedCode': - block.string_content = block.strings.join('\n').replace(/(\n *)*$/,'\n'); - block.t = 'CodeBlock'; - break; - - case 'FencedCode': - // first line becomes info string - block.info = unescapeString(block.strings[0].trim()); - if (block.strings.length == 1) { - block.string_content = ''; - } else { - block.string_content = block.strings.slice(1).join('\n') + '\n'; - } - block.t = 'CodeBlock'; - break; - - case 'List': - block.tight = true; // tight by default - - var numitems = block.children.length; - var i = 0; - while (i < numitems) { - var item = block.children[i]; - // check for non-final list item ending with blank line: - var last_item = i == numitems - 1; - if (endsWithBlankLine(item) && !last_item) { - block.tight = false; - break; - } - // recurse into children of list item, to see if there are - // spaces between any of them: - var numsubitems = item.children.length; - var j = 0; - while (j < numsubitems) { - var subitem = item.children[j]; - var last_subitem = j == numsubitems - 1; - if (endsWithBlankLine(subitem) && !(last_item && last_subitem)) { - block.tight = false; - break; - } - j++; - } - i++; - } - break; - - default: - break; - } - - this.tip = block.parent || this.top; -}; - -// Walk through a block & children recursively, parsing string content -// into inline content where appropriate. Returns new object. -var processInlines = function(block) { - var newblock = {}; - newblock.t = block.t; - newblock.start_line = block.start_line; - newblock.start_column = block.start_column; - newblock.end_line = block.end_line; - - switch(block.t) { - case 'Paragraph': - newblock.inline_content = - this.inlineParser.parse(block.string_content.trim(), this.refmap); - break; - case 'Header': - newblock.inline_content = - this.inlineParser.parse(block.string_content.trim(), this.refmap); - newblock.level = block.level; - break; - case 'List': - newblock.list_data = block.list_data; - newblock.tight = block.tight; - break; - case 'CodeBlock': - newblock.string_content = block.string_content; - newblock.info = block.info; - break; - case 'HtmlBlock': - newblock.string_content = block.string_content; - break; - default: - break; - } - - if (block.children) { - var newchildren = []; - for (var i = 0; i < block.children.length; i++) { - newchildren.push(this.processInlines(block.children[i])); - } - newblock.children = newchildren; - } - return newblock; -}; - -// The main parsing function. Returns a parsed document AST. -var parse = function(input) { - this.doc = makeBlock('Document', 1, 1); - this.tip = this.doc; - this.refmap = {}; - var lines = input.replace(/\n$/,'').split(/\r\n|\n|\r/); - var len = lines.length; - for (var i = 0; i < len; i++) { - this.incorporateLine(lines[i], i+1); - } - while (this.tip) { - this.finalize(this.tip, len - 1); - } - return this.processInlines(this.doc); -}; - - -// The DocParser object. -function DocParser(){ - return { - doc: makeBlock('Document', 1, 1), - tip: this.doc, - refmap: {}, - inlineParser: new InlineParser(), - breakOutOfLists: breakOutOfLists, - addLine: addLine, - addChild: addChild, - incorporateLine: incorporateLine, - finalize: finalize, - processInlines: processInlines, - parse: parse - }; -} - -module.exports = DocParser; diff --git a/outside/commonmark/js/lib/from-code-point.js b/outside/commonmark/js/lib/from-code-point.js deleted file mode 100644 index 037c35e8c..000000000 --- a/outside/commonmark/js/lib/from-code-point.js +++ /dev/null @@ -1,58 +0,0 @@ -// derived from https://github.com/mathiasbynens/String.fromCodePoint -/*! http://mths.be/fromcodepoint v0.2.1 by @mathias */ -if (String.fromCodePoint) { - - module.exports = function (_) { - try { - return String.fromCodePoint(_); - } catch (e) { - if (e instanceof RangeError) { - return String.fromCharCode(0xFFFD); - } - throw e; - } - } - -} else { - - var stringFromCharCode = String.fromCharCode; - var floor = Math.floor; - var fromCodePoint = function(_) { - var MAX_SIZE = 0x4000; - var codeUnits = []; - var highSurrogate; - var lowSurrogate; - var index = -1; - var length = arguments.length; - if (!length) { - return ''; - } - var result = ''; - while (++index < length) { - var codePoint = Number(arguments[index]); - if ( - !isFinite(codePoint) || // `NaN`, `+Infinity`, or `-Infinity` - codePoint < 0 || // not a valid Unicode code point - codePoint > 0x10FFFF || // not a valid Unicode code point - floor(codePoint) != codePoint // not an integer - ) { - return String.fromCharCode(0xFFFD); - } - if (codePoint <= 0xFFFF) { // BMP code point - codeUnits.push(codePoint); - } else { // Astral code point; split in surrogate halves - // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae - codePoint -= 0x10000; - highSurrogate = (codePoint >> 10) + 0xD800; - lowSurrogate = (codePoint % 0x400) + 0xDC00; - codeUnits.push(highSurrogate, lowSurrogate); - } - if (index + 1 == length || codeUnits.length > MAX_SIZE) { - result += stringFromCharCode.apply(null, codeUnits); - codeUnits.length = 0; - } - } - return result; - }; - module.exports = fromCodePoint; -} diff --git a/outside/commonmark/js/lib/html-renderer.js b/outside/commonmark/js/lib/html-renderer.js deleted file mode 100644 index f3fa44e11..000000000 --- a/outside/commonmark/js/lib/html-renderer.js +++ /dev/null @@ -1,168 +0,0 @@ -// Helper function to produce content in a pair of HTML tags. -var inTags = function(tag, attribs, contents, selfclosing) { - var result = '<' + tag; - if (attribs) { - var i = 0; - var attrib; - while ((attrib = attribs[i]) !== undefined) { - result = result.concat(' ', attrib[0], '="', attrib[1], '"'); - i++; - } - } - if (contents) { - result = result.concat('>', contents, ''); - } else if (selfclosing) { - result = result + ' />'; - } else { - result = result.concat('>'); - } - return result; -}; - -// Render an inline element as HTML. -var renderInline = function(inline) { - var attrs; - switch (inline.t) { - case 'Text': - return this.escape(inline.c); - case 'Softbreak': - return this.softbreak; - case 'Hardbreak': - return inTags('br',[],"",true) + '\n'; - case 'Emph': - return inTags('em', [], this.renderInlines(inline.c)); - case 'Strong': - return inTags('strong', [], this.renderInlines(inline.c)); - case 'Html': - return inline.c; - case 'Link': - attrs = [['href', this.escape(inline.destination, true)]]; - if (inline.title) { - attrs.push(['title', this.escape(inline.title, true)]); - } - return inTags('a', attrs, this.renderInlines(inline.label)); - case 'Image': - attrs = [['src', this.escape(inline.destination, true)], - ['alt', this.renderInlines(inline.label). - replace(/\<[^>]*alt="([^"]*)"[^>]*\>/g, '$1'). - replace(/\<[^>]*\>/g,'')]]; - if (inline.title) { - attrs.push(['title', this.escape(inline.title, true)]); - } - return inTags('img', attrs, "", true); - case 'Code': - return inTags('code', [], this.escape(inline.c)); - default: - console.log("Unknown inline type " + inline.t); - return ""; - } -}; - -// Render a list of inlines. -var renderInlines = function(inlines) { - var result = ''; - for (var i=0; i < inlines.length; i++) { - result = result + this.renderInline(inlines[i]); - } - return result; -}; - -// Render a single block element. -var renderBlock = function(block, in_tight_list) { - var tag; - var attr; - var info_words; - switch (block.t) { - case 'Document': - var whole_doc = this.renderBlocks(block.children); - return (whole_doc === '' ? '' : whole_doc + '\n'); - case 'Paragraph': - if (in_tight_list) { - return this.renderInlines(block.inline_content); - } else { - return inTags('p', [], this.renderInlines(block.inline_content)); - } - break; - case 'BlockQuote': - var filling = this.renderBlocks(block.children); - return inTags('blockquote', [], filling === '' ? this.innersep : - this.innersep + filling + this.innersep); - case 'ListItem': - var contents = this.renderBlocks(block.children, in_tight_list); - if (/^[<]/.test(contents)) { - contents = '\n' + contents; - } - if (/[>]$/.test(contents)) { - contents = contents + '\n'; - } - return inTags('li', [], contents, false).trim(); - case 'List': - tag = block.list_data.type == 'Bullet' ? 'ul' : 'ol'; - attr = (!block.list_data.start || block.list_data.start == 1) ? - [] : [['start', block.list_data.start.toString()]]; - return inTags(tag, attr, this.innersep + - this.renderBlocks(block.children, block.tight) + - this.innersep); - case 'Header': - tag = 'h' + block.level; - return inTags(tag, [], this.renderInlines(block.inline_content)); - case 'CodeBlock': - info_words = block.info ? block.info.split(/ +/) : []; - attr = (info_words.length === 0 || info_words[0].length === 0) ? - [] : [['class','language-' + this.escape(info_words[0],true)]]; - return inTags('pre', [], - inTags('code', attr, this.escape(block.string_content))); - case 'HtmlBlock': - return block.string_content; - case 'ReferenceDef': - return ""; - case 'HorizontalRule': - return inTags('hr',[],"",true); - default: - console.log("Unknown block type " + block.t); - return ""; - } -}; - -// Render a list of block elements, separated by this.blocksep. -var renderBlocks = function(blocks, in_tight_list) { - var result = []; - for (var i=0; i < blocks.length; i++) { - if (blocks[i].t !== 'ReferenceDef') { - result.push(this.renderBlock(blocks[i], in_tight_list)); - } - } - return result.join(this.blocksep); -}; - -// The HtmlRenderer object. -function HtmlRenderer(){ - return { - // default options: - blocksep: '\n', // space between blocks - innersep: '\n', // space between block container tag and contents - softbreak: '\n', // by default, soft breaks are rendered as newlines in HTML - // set to "
    " to make them hard breaks - // set to " " if you want to ignore line wrapping in source - escape: function(s, preserve_entities) { - if (preserve_entities) { - return s.replace(/[&](?![#](x[a-f0-9]{1,8}|[0-9]{1,8});|[a-z][a-z0-9]{1,31};)/gi,'&') - .replace(/[<]/g,'<') - .replace(/[>]/g,'>') - .replace(/["]/g,'"'); - } else { - return s.replace(/[&]/g,'&') - .replace(/[<]/g,'<') - .replace(/[>]/g,'>') - .replace(/["]/g,'"'); - } - }, - renderInline: renderInline, - renderInlines: renderInlines, - renderBlock: renderBlock, - renderBlocks: renderBlocks, - render: renderBlock - }; -} - -module.exports = HtmlRenderer; diff --git a/outside/commonmark/js/lib/html5-entities.js b/outside/commonmark/js/lib/html5-entities.js deleted file mode 100644 index 235fc6663..000000000 --- a/outside/commonmark/js/lib/html5-entities.js +++ /dev/null @@ -1,2147 +0,0 @@ -var fromCodePoint = require('./from-code-point'); - -var entities = { AAacute: 'Á', - aacute: 'á', - Abreve: 'Ă', - abreve: 'ă', - ac: '∾', - acd: '∿', - acE: '∾', - Acirc: 'Â', - acirc: 'â', - acute: '´', - Acy: 'А', - acy: 'а', - AElig: 'Æ', - aelig: 'æ', - af: '⁡', - Afr: '𝔄', - afr: '𝔞', - Agrave: 'À', - agrave: 'à', - alefsym: 'ℵ', - aleph: 'ℵ', - Alpha: 'Α', - alpha: 'α', - Amacr: 'Ā', - amacr: 'ā', - amalg: '⨿', - amp: '&', - AMP: '&', - andand: '⩕', - And: '⩓', - and: '∧', - andd: '⩜', - andslope: '⩘', - andv: '⩚', - ang: '∠', - ange: '⦤', - angle: '∠', - angmsdaa: '⦨', - angmsdab: '⦩', - angmsdac: '⦪', - angmsdad: '⦫', - angmsdae: '⦬', - angmsdaf: '⦭', - angmsdag: '⦮', - angmsdah: '⦯', - angmsd: '∡', - angrt: '∟', - angrtvb: '⊾', - angrtvbd: '⦝', - angsph: '∢', - angst: 'Å', - angzarr: '⍼', - Aogon: 'Ą', - aogon: 'ą', - Aopf: '𝔸', - aopf: '𝕒', - apacir: '⩯', - ap: '≈', - apE: '⩰', - ape: '≊', - apid: '≋', - apos: '\'', - ApplyFunction: '⁡', - approx: '≈', - approxeq: '≊', - Aring: 'Å', - aring: 'å', - Ascr: '𝒜', - ascr: '𝒶', - Assign: '≔', - ast: '*', - asymp: '≈', - asympeq: '≍', - Atilde: 'Ã', - atilde: 'ã', - Auml: 'Ä', - auml: 'ä', - awconint: '∳', - awint: '⨑', - backcong: '≌', - backepsilon: '϶', - backprime: '‵', - backsim: '∽', - backsimeq: '⋍', - Backslash: '∖', - Barv: '⫧', - barvee: '⊽', - barwed: '⌅', - Barwed: '⌆', - barwedge: '⌅', - bbrk: '⎵', - bbrktbrk: '⎶', - bcong: '≌', - Bcy: 'Б', - bcy: 'б', - bdquo: '„', - becaus: '∵', - because: '∵', - Because: '∵', - bemptyv: '⦰', - bepsi: '϶', - bernou: 'ℬ', - Bernoullis: 'ℬ', - Beta: 'Β', - beta: 'β', - beth: 'ℶ', - between: '≬', - Bfr: '𝔅', - bfr: '𝔟', - bigcap: '⋂', - bigcirc: '◯', - bigcup: '⋃', - bigodot: '⨀', - bigoplus: '⨁', - bigotimes: '⨂', - bigsqcup: '⨆', - bigstar: '★', - bigtriangledown: '▽', - bigtriangleup: '△', - biguplus: '⨄', - bigvee: '⋁', - bigwedge: '⋀', - bkarow: '⤍', - blacklozenge: '⧫', - blacksquare: '▪', - blacktriangle: '▴', - blacktriangledown: '▾', - blacktriangleleft: '◂', - blacktriangleright: '▸', - blank: '␣', - blk12: '▒', - blk14: '░', - blk34: '▓', - block: '█', - bne: '=', - bnequiv: '≡', - bNot: '⫭', - bnot: '⌐', - Bopf: '𝔹', - bopf: '𝕓', - bot: '⊥', - bottom: '⊥', - bowtie: '⋈', - boxbox: '⧉', - boxdl: '┐', - boxdL: '╕', - boxDl: '╖', - boxDL: '╗', - boxdr: '┌', - boxdR: '╒', - boxDr: '╓', - boxDR: '╔', - boxh: '─', - boxH: '═', - boxhd: '┬', - boxHd: '╤', - boxhD: '╥', - boxHD: '╦', - boxhu: '┴', - boxHu: '╧', - boxhU: '╨', - boxHU: '╩', - boxminus: '⊟', - boxplus: '⊞', - boxtimes: '⊠', - boxul: '┘', - boxuL: '╛', - boxUl: '╜', - boxUL: '╝', - boxur: '└', - boxuR: '╘', - boxUr: '╙', - boxUR: '╚', - boxv: '│', - boxV: '║', - boxvh: '┼', - boxvH: '╪', - boxVh: '╫', - boxVH: '╬', - boxvl: '┤', - boxvL: '╡', - boxVl: '╢', - boxVL: '╣', - boxvr: '├', - boxvR: '╞', - boxVr: '╟', - boxVR: '╠', - bprime: '‵', - breve: '˘', - Breve: '˘', - brvbar: '¦', - bscr: '𝒷', - Bscr: 'ℬ', - bsemi: '⁏', - bsim: '∽', - bsime: '⋍', - bsolb: '⧅', - bsol: '\\', - bsolhsub: '⟈', - bull: '•', - bullet: '•', - bump: '≎', - bumpE: '⪮', - bumpe: '≏', - Bumpeq: '≎', - bumpeq: '≏', - Cacute: 'Ć', - cacute: 'ć', - capand: '⩄', - capbrcup: '⩉', - capcap: '⩋', - cap: '∩', - Cap: '⋒', - capcup: '⩇', - capdot: '⩀', - CapitalDifferentialD: 'ⅅ', - caps: '∩', - caret: '⁁', - caron: 'ˇ', - Cayleys: 'ℭ', - ccaps: '⩍', - Ccaron: 'Č', - ccaron: 'č', - Ccedil: 'Ç', - ccedil: 'ç', - Ccirc: 'Ĉ', - ccirc: 'ĉ', - Cconint: '∰', - ccups: '⩌', - ccupssm: '⩐', - Cdot: 'Ċ', - cdot: 'ċ', - cedil: '¸', - Cedilla: '¸', - cemptyv: '⦲', - cent: '¢', - centerdot: '·', - CenterDot: '·', - cfr: '𝔠', - Cfr: 'ℭ', - CHcy: 'Ч', - chcy: 'ч', - check: '✓', - checkmark: '✓', - Chi: 'Χ', - chi: 'χ', - circ: 'ˆ', - circeq: '≗', - circlearrowleft: '↺', - circlearrowright: '↻', - circledast: '⊛', - circledcirc: '⊚', - circleddash: '⊝', - CircleDot: '⊙', - circledR: '®', - circledS: 'Ⓢ', - CircleMinus: '⊖', - CirclePlus: '⊕', - CircleTimes: '⊗', - cir: '○', - cirE: '⧃', - cire: '≗', - cirfnint: '⨐', - cirmid: '⫯', - cirscir: '⧂', - ClockwiseContourIntegral: '∲', - CloseCurlyDoubleQuote: '”', - CloseCurlyQuote: '’', - clubs: '♣', - clubsuit: '♣', - colon: ':', - Colon: '∷', - Colone: '⩴', - colone: '≔', - coloneq: '≔', - comma: ',', - commat: '@', - comp: '∁', - compfn: '∘', - complement: '∁', - complexes: 'ℂ', - cong: '≅', - congdot: '⩭', - Congruent: '≡', - conint: '∮', - Conint: '∯', - ContourIntegral: '∮', - copf: '𝕔', - Copf: 'ℂ', - coprod: '∐', - Coproduct: '∐', - copy: '©', - COPY: '©', - copysr: '℗', - CounterClockwiseContourIntegral: '∳', - crarr: '↵', - cross: '✗', - Cross: '⨯', - Cscr: '𝒞', - cscr: '𝒸', - csub: '⫏', - csube: '⫑', - csup: '⫐', - csupe: '⫒', - ctdot: '⋯', - cudarrl: '⤸', - cudarrr: '⤵', - cuepr: '⋞', - cuesc: '⋟', - cularr: '↶', - cularrp: '⤽', - cupbrcap: '⩈', - cupcap: '⩆', - CupCap: '≍', - cup: '∪', - Cup: '⋓', - cupcup: '⩊', - cupdot: '⊍', - cupor: '⩅', - cups: '∪', - curarr: '↷', - curarrm: '⤼', - curlyeqprec: '⋞', - curlyeqsucc: '⋟', - curlyvee: '⋎', - curlywedge: '⋏', - curren: '¤', - curvearrowleft: '↶', - curvearrowright: '↷', - cuvee: '⋎', - cuwed: '⋏', - cwconint: '∲', - cwint: '∱', - cylcty: '⌭', - dagger: '†', - Dagger: '‡', - daleth: 'ℸ', - darr: '↓', - Darr: '↡', - dArr: '⇓', - dash: '‐', - Dashv: '⫤', - dashv: '⊣', - dbkarow: '⤏', - dblac: '˝', - Dcaron: 'Ď', - dcaron: 'ď', - Dcy: 'Д', - dcy: 'д', - ddagger: '‡', - ddarr: '⇊', - DD: 'ⅅ', - dd: 'ⅆ', - DDotrahd: '⤑', - ddotseq: '⩷', - deg: '°', - Del: '∇', - Delta: 'Δ', - delta: 'δ', - demptyv: '⦱', - dfisht: '⥿', - Dfr: '𝔇', - dfr: '𝔡', - dHar: '⥥', - dharl: '⇃', - dharr: '⇂', - DiacriticalAcute: '´', - DiacriticalDot: '˙', - DiacriticalDoubleAcute: '˝', - DiacriticalGrave: '`', - DiacriticalTilde: '˜', - diam: '⋄', - diamond: '⋄', - Diamond: '⋄', - diamondsuit: '♦', - diams: '♦', - die: '¨', - DifferentialD: 'ⅆ', - digamma: 'ϝ', - disin: '⋲', - div: '÷', - divide: '÷', - divideontimes: '⋇', - divonx: '⋇', - DJcy: 'Ђ', - djcy: 'ђ', - dlcorn: '⌞', - dlcrop: '⌍', - dollar: '$', - Dopf: '𝔻', - dopf: '𝕕', - Dot: '¨', - dot: '˙', - DotDot: '⃜', - doteq: '≐', - doteqdot: '≑', - DotEqual: '≐', - dotminus: '∸', - dotplus: '∔', - dotsquare: '⊡', - doublebarwedge: '⌆', - DoubleContourIntegral: '∯', - DoubleDot: '¨', - DoubleDownArrow: '⇓', - DoubleLeftArrow: '⇐', - DoubleLeftRightArrow: '⇔', - DoubleLeftTee: '⫤', - DoubleLongLeftArrow: '⟸', - DoubleLongLeftRightArrow: '⟺', - DoubleLongRightArrow: '⟹', - DoubleRightArrow: '⇒', - DoubleRightTee: '⊨', - DoubleUpArrow: '⇑', - DoubleUpDownArrow: '⇕', - DoubleVerticalBar: '∥', - DownArrowBar: '⤓', - downarrow: '↓', - DownArrow: '↓', - Downarrow: '⇓', - DownArrowUpArrow: '⇵', - DownBreve: '̑', - downdownarrows: '⇊', - downharpoonleft: '⇃', - downharpoonright: '⇂', - DownLeftRightVector: '⥐', - DownLeftTeeVector: '⥞', - DownLeftVectorBar: '⥖', - DownLeftVector: '↽', - DownRightTeeVector: '⥟', - DownRightVectorBar: '⥗', - DownRightVector: '⇁', - DownTeeArrow: '↧', - DownTee: '⊤', - drbkarow: '⤐', - drcorn: '⌟', - drcrop: '⌌', - Dscr: '𝒟', - dscr: '𝒹', - DScy: 'Ѕ', - dscy: 'ѕ', - dsol: '⧶', - Dstrok: 'Đ', - dstrok: 'đ', - dtdot: '⋱', - dtri: '▿', - dtrif: '▾', - duarr: '⇵', - duhar: '⥯', - dwangle: '⦦', - DZcy: 'Џ', - dzcy: 'џ', - dzigrarr: '⟿', - Eacute: 'É', - eacute: 'é', - easter: '⩮', - Ecaron: 'Ě', - ecaron: 'ě', - Ecirc: 'Ê', - ecirc: 'ê', - ecir: '≖', - ecolon: '≕', - Ecy: 'Э', - ecy: 'э', - eDDot: '⩷', - Edot: 'Ė', - edot: 'ė', - eDot: '≑', - ee: 'ⅇ', - efDot: '≒', - Efr: '𝔈', - efr: '𝔢', - eg: '⪚', - Egrave: 'È', - egrave: 'è', - egs: '⪖', - egsdot: '⪘', - el: '⪙', - Element: '∈', - elinters: '⏧', - ell: 'ℓ', - els: '⪕', - elsdot: '⪗', - Emacr: 'Ē', - emacr: 'ē', - empty: '∅', - emptyset: '∅', - EmptySmallSquare: '◻', - emptyv: '∅', - EmptyVerySmallSquare: '▫', - emsp13: ' ', - emsp14: ' ', - emsp: ' ', - ENG: 'Ŋ', - eng: 'ŋ', - ensp: ' ', - Eogon: 'Ę', - eogon: 'ę', - Eopf: '𝔼', - eopf: '𝕖', - epar: '⋕', - eparsl: '⧣', - eplus: '⩱', - epsi: 'ε', - Epsilon: 'Ε', - epsilon: 'ε', - epsiv: 'ϵ', - eqcirc: '≖', - eqcolon: '≕', - eqsim: '≂', - eqslantgtr: '⪖', - eqslantless: '⪕', - Equal: '⩵', - equals: '=', - EqualTilde: '≂', - equest: '≟', - Equilibrium: '⇌', - equiv: '≡', - equivDD: '⩸', - eqvparsl: '⧥', - erarr: '⥱', - erDot: '≓', - escr: 'ℯ', - Escr: 'ℰ', - esdot: '≐', - Esim: '⩳', - esim: '≂', - Eta: 'Η', - eta: 'η', - ETH: 'Ð', - eth: 'ð', - Euml: 'Ë', - euml: 'ë', - euro: '€', - excl: '!', - exist: '∃', - Exists: '∃', - expectation: 'ℰ', - exponentiale: 'ⅇ', - ExponentialE: 'ⅇ', - fallingdotseq: '≒', - Fcy: 'Ф', - fcy: 'ф', - female: '♀', - ffilig: 'ffi', - fflig: 'ff', - ffllig: 'ffl', - Ffr: '𝔉', - ffr: '𝔣', - filig: 'fi', - FilledSmallSquare: '◼', - FilledVerySmallSquare: '▪', - fjlig: 'f', - flat: '♭', - fllig: 'fl', - fltns: '▱', - fnof: 'ƒ', - Fopf: '𝔽', - fopf: '𝕗', - forall: '∀', - ForAll: '∀', - fork: '⋔', - forkv: '⫙', - Fouriertrf: 'ℱ', - fpartint: '⨍', - frac12: '½', - frac13: '⅓', - frac14: '¼', - frac15: '⅕', - frac16: '⅙', - frac18: '⅛', - frac23: '⅔', - frac25: '⅖', - frac34: '¾', - frac35: '⅗', - frac38: '⅜', - frac45: '⅘', - frac56: '⅚', - frac58: '⅝', - frac78: '⅞', - frasl: '⁄', - frown: '⌢', - fscr: '𝒻', - Fscr: 'ℱ', - gacute: 'ǵ', - Gamma: 'Γ', - gamma: 'γ', - Gammad: 'Ϝ', - gammad: 'ϝ', - gap: '⪆', - Gbreve: 'Ğ', - gbreve: 'ğ', - Gcedil: 'Ģ', - Gcirc: 'Ĝ', - gcirc: 'ĝ', - Gcy: 'Г', - gcy: 'г', - Gdot: 'Ġ', - gdot: 'ġ', - ge: '≥', - gE: '≧', - gEl: '⪌', - gel: '⋛', - geq: '≥', - geqq: '≧', - geqslant: '⩾', - gescc: '⪩', - ges: '⩾', - gesdot: '⪀', - gesdoto: '⪂', - gesdotol: '⪄', - gesl: '⋛', - gesles: '⪔', - Gfr: '𝔊', - gfr: '𝔤', - gg: '≫', - Gg: '⋙', - ggg: '⋙', - gimel: 'ℷ', - GJcy: 'Ѓ', - gjcy: 'ѓ', - gla: '⪥', - gl: '≷', - glE: '⪒', - glj: '⪤', - gnap: '⪊', - gnapprox: '⪊', - gne: '⪈', - gnE: '≩', - gneq: '⪈', - gneqq: '≩', - gnsim: '⋧', - Gopf: '𝔾', - gopf: '𝕘', - grave: '`', - GreaterEqual: '≥', - GreaterEqualLess: '⋛', - GreaterFullEqual: '≧', - GreaterGreater: '⪢', - GreaterLess: '≷', - GreaterSlantEqual: '⩾', - GreaterTilde: '≳', - Gscr: '𝒢', - gscr: 'ℊ', - gsim: '≳', - gsime: '⪎', - gsiml: '⪐', - gtcc: '⪧', - gtcir: '⩺', - gt: '>', - GT: '>', - Gt: '≫', - gtdot: '⋗', - gtlPar: '⦕', - gtquest: '⩼', - gtrapprox: '⪆', - gtrarr: '⥸', - gtrdot: '⋗', - gtreqless: '⋛', - gtreqqless: '⪌', - gtrless: '≷', - gtrsim: '≳', - gvertneqq: '≩', - gvnE: '≩', - Hacek: 'ˇ', - hairsp: ' ', - half: '½', - hamilt: 'ℋ', - HARDcy: 'Ъ', - hardcy: 'ъ', - harrcir: '⥈', - harr: '↔', - hArr: '⇔', - harrw: '↭', - Hat: '^', - hbar: 'ℏ', - Hcirc: 'Ĥ', - hcirc: 'ĥ', - hearts: '♥', - heartsuit: '♥', - hellip: '…', - hercon: '⊹', - hfr: '𝔥', - Hfr: 'ℌ', - HilbertSpace: 'ℋ', - hksearow: '⤥', - hkswarow: '⤦', - hoarr: '⇿', - homtht: '∻', - hookleftarrow: '↩', - hookrightarrow: '↪', - hopf: '𝕙', - Hopf: 'ℍ', - horbar: '―', - HorizontalLine: '─', - hscr: '𝒽', - Hscr: 'ℋ', - hslash: 'ℏ', - Hstrok: 'Ħ', - hstrok: 'ħ', - HumpDownHump: '≎', - HumpEqual: '≏', - hybull: '⁃', - hyphen: '‐', - Iacute: 'Í', - iacute: 'í', - ic: '⁣', - Icirc: 'Î', - icirc: 'î', - Icy: 'И', - icy: 'и', - Idot: 'İ', - IEcy: 'Е', - iecy: 'е', - iexcl: '¡', - iff: '⇔', - ifr: '𝔦', - Ifr: 'ℑ', - Igrave: 'Ì', - igrave: 'ì', - ii: 'ⅈ', - iiiint: '⨌', - iiint: '∭', - iinfin: '⧜', - iiota: '℩', - IJlig: 'IJ', - ijlig: 'ij', - Imacr: 'Ī', - imacr: 'ī', - image: 'ℑ', - ImaginaryI: 'ⅈ', - imagline: 'ℐ', - imagpart: 'ℑ', - imath: 'ı', - Im: 'ℑ', - imof: '⊷', - imped: 'Ƶ', - Implies: '⇒', - incare: '℅', - in: '∈', - infin: '∞', - infintie: '⧝', - inodot: 'ı', - intcal: '⊺', - int: '∫', - Int: '∬', - integers: 'ℤ', - Integral: '∫', - intercal: '⊺', - Intersection: '⋂', - intlarhk: '⨗', - intprod: '⨼', - InvisibleComma: '⁣', - InvisibleTimes: '⁢', - IOcy: 'Ё', - iocy: 'ё', - Iogon: 'Į', - iogon: 'į', - Iopf: '𝕀', - iopf: '𝕚', - Iota: 'Ι', - iota: 'ι', - iprod: '⨼', - iquest: '¿', - iscr: '𝒾', - Iscr: 'ℐ', - isin: '∈', - isindot: '⋵', - isinE: '⋹', - isins: '⋴', - isinsv: '⋳', - isinv: '∈', - it: '⁢', - Itilde: 'Ĩ', - itilde: 'ĩ', - Iukcy: 'І', - iukcy: 'і', - Iuml: 'Ï', - iuml: 'ï', - Jcirc: 'Ĵ', - jcirc: 'ĵ', - Jcy: 'Й', - jcy: 'й', - Jfr: '𝔍', - jfr: '𝔧', - jmath: 'ȷ', - Jopf: '𝕁', - jopf: '𝕛', - Jscr: '𝒥', - jscr: '𝒿', - Jsercy: 'Ј', - jsercy: 'ј', - Jukcy: 'Є', - jukcy: 'є', - Kappa: 'Κ', - kappa: 'κ', - kappav: 'ϰ', - Kcedil: 'Ķ', - kcedil: 'ķ', - Kcy: 'К', - kcy: 'к', - Kfr: '𝔎', - kfr: '𝔨', - kgreen: 'ĸ', - KHcy: 'Х', - khcy: 'х', - KJcy: 'Ќ', - kjcy: 'ќ', - Kopf: '𝕂', - kopf: '𝕜', - Kscr: '𝒦', - kscr: '𝓀', - lAarr: '⇚', - Lacute: 'Ĺ', - lacute: 'ĺ', - laemptyv: '⦴', - lagran: 'ℒ', - Lambda: 'Λ', - lambda: 'λ', - lang: '⟨', - Lang: '⟪', - langd: '⦑', - langle: '⟨', - lap: '⪅', - Laplacetrf: 'ℒ', - laquo: '«', - larrb: '⇤', - larrbfs: '⤟', - larr: '←', - Larr: '↞', - lArr: '⇐', - larrfs: '⤝', - larrhk: '↩', - larrlp: '↫', - larrpl: '⤹', - larrsim: '⥳', - larrtl: '↢', - latail: '⤙', - lAtail: '⤛', - lat: '⪫', - late: '⪭', - lates: '⪭', - lbarr: '⤌', - lBarr: '⤎', - lbbrk: '❲', - lbrace: '{', - lbrack: '[', - lbrke: '⦋', - lbrksld: '⦏', - lbrkslu: '⦍', - Lcaron: 'Ľ', - lcaron: 'ľ', - Lcedil: 'Ļ', - lcedil: 'ļ', - lceil: '⌈', - lcub: '{', - Lcy: 'Л', - lcy: 'л', - ldca: '⤶', - ldquo: '“', - ldquor: '„', - ldrdhar: '⥧', - ldrushar: '⥋', - ldsh: '↲', - le: '≤', - lE: '≦', - LeftAngleBracket: '⟨', - LeftArrowBar: '⇤', - leftarrow: '←', - LeftArrow: '←', - Leftarrow: '⇐', - LeftArrowRightArrow: '⇆', - leftarrowtail: '↢', - LeftCeiling: '⌈', - LeftDoubleBracket: '⟦', - LeftDownTeeVector: '⥡', - LeftDownVectorBar: '⥙', - LeftDownVector: '⇃', - LeftFloor: '⌊', - leftharpoondown: '↽', - leftharpoonup: '↼', - leftleftarrows: '⇇', - leftrightarrow: '↔', - LeftRightArrow: '↔', - Leftrightarrow: '⇔', - leftrightarrows: '⇆', - leftrightharpoons: '⇋', - leftrightsquigarrow: '↭', - LeftRightVector: '⥎', - LeftTeeArrow: '↤', - LeftTee: '⊣', - LeftTeeVector: '⥚', - leftthreetimes: '⋋', - LeftTriangleBar: '⧏', - LeftTriangle: '⊲', - LeftTriangleEqual: '⊴', - LeftUpDownVector: '⥑', - LeftUpTeeVector: '⥠', - LeftUpVectorBar: '⥘', - LeftUpVector: '↿', - LeftVectorBar: '⥒', - LeftVector: '↼', - lEg: '⪋', - leg: '⋚', - leq: '≤', - leqq: '≦', - leqslant: '⩽', - lescc: '⪨', - les: '⩽', - lesdot: '⩿', - lesdoto: '⪁', - lesdotor: '⪃', - lesg: '⋚', - lesges: '⪓', - lessapprox: '⪅', - lessdot: '⋖', - lesseqgtr: '⋚', - lesseqqgtr: '⪋', - LessEqualGreater: '⋚', - LessFullEqual: '≦', - LessGreater: '≶', - lessgtr: '≶', - LessLess: '⪡', - lesssim: '≲', - LessSlantEqual: '⩽', - LessTilde: '≲', - lfisht: '⥼', - lfloor: '⌊', - Lfr: '𝔏', - lfr: '𝔩', - lg: '≶', - lgE: '⪑', - lHar: '⥢', - lhard: '↽', - lharu: '↼', - lharul: '⥪', - lhblk: '▄', - LJcy: 'Љ', - ljcy: 'љ', - llarr: '⇇', - ll: '≪', - Ll: '⋘', - llcorner: '⌞', - Lleftarrow: '⇚', - llhard: '⥫', - lltri: '◺', - Lmidot: 'Ŀ', - lmidot: 'ŀ', - lmoustache: '⎰', - lmoust: '⎰', - lnap: '⪉', - lnapprox: '⪉', - lne: '⪇', - lnE: '≨', - lneq: '⪇', - lneqq: '≨', - lnsim: '⋦', - loang: '⟬', - loarr: '⇽', - lobrk: '⟦', - longleftarrow: '⟵', - LongLeftArrow: '⟵', - Longleftarrow: '⟸', - longleftrightarrow: '⟷', - LongLeftRightArrow: '⟷', - Longleftrightarrow: '⟺', - longmapsto: '⟼', - longrightarrow: '⟶', - LongRightArrow: '⟶', - Longrightarrow: '⟹', - looparrowleft: '↫', - looparrowright: '↬', - lopar: '⦅', - Lopf: '𝕃', - lopf: '𝕝', - loplus: '⨭', - lotimes: '⨴', - lowast: '∗', - lowbar: '_', - LowerLeftArrow: '↙', - LowerRightArrow: '↘', - loz: '◊', - lozenge: '◊', - lozf: '⧫', - lpar: '(', - lparlt: '⦓', - lrarr: '⇆', - lrcorner: '⌟', - lrhar: '⇋', - lrhard: '⥭', - lrm: '‎', - lrtri: '⊿', - lsaquo: '‹', - lscr: '𝓁', - Lscr: 'ℒ', - lsh: '↰', - Lsh: '↰', - lsim: '≲', - lsime: '⪍', - lsimg: '⪏', - lsqb: '[', - lsquo: '‘', - lsquor: '‚', - Lstrok: 'Ł', - lstrok: 'ł', - ltcc: '⪦', - ltcir: '⩹', - lt: '<', - LT: '<', - Lt: '≪', - ltdot: '⋖', - lthree: '⋋', - ltimes: '⋉', - ltlarr: '⥶', - ltquest: '⩻', - ltri: '◃', - ltrie: '⊴', - ltrif: '◂', - ltrPar: '⦖', - lurdshar: '⥊', - luruhar: '⥦', - lvertneqq: '≨', - lvnE: '≨', - macr: '¯', - male: '♂', - malt: '✠', - maltese: '✠', - Map: '⤅', - map: '↦', - mapsto: '↦', - mapstodown: '↧', - mapstoleft: '↤', - mapstoup: '↥', - marker: '▮', - mcomma: '⨩', - Mcy: 'М', - mcy: 'м', - mdash: '—', - mDDot: '∺', - measuredangle: '∡', - MediumSpace: ' ', - Mellintrf: 'ℳ', - Mfr: '𝔐', - mfr: '𝔪', - mho: '℧', - micro: 'µ', - midast: '*', - midcir: '⫰', - mid: '∣', - middot: '·', - minusb: '⊟', - minus: '−', - minusd: '∸', - minusdu: '⨪', - MinusPlus: '∓', - mlcp: '⫛', - mldr: '…', - mnplus: '∓', - models: '⊧', - Mopf: '𝕄', - mopf: '𝕞', - mp: '∓', - mscr: '𝓂', - Mscr: 'ℳ', - mstpos: '∾', - Mu: 'Μ', - mu: 'μ', - multimap: '⊸', - mumap: '⊸', - nabla: '∇', - Nacute: 'Ń', - nacute: 'ń', - nang: '∠', - nap: '≉', - napE: '⩰', - napid: '≋', - napos: 'ʼn', - napprox: '≉', - natural: '♮', - naturals: 'ℕ', - natur: '♮', - nbsp: ' ', - nbump: '≎', - nbumpe: '≏', - ncap: '⩃', - Ncaron: 'Ň', - ncaron: 'ň', - Ncedil: 'Ņ', - ncedil: 'ņ', - ncong: '≇', - ncongdot: '⩭', - ncup: '⩂', - Ncy: 'Н', - ncy: 'н', - ndash: '–', - nearhk: '⤤', - nearr: '↗', - neArr: '⇗', - nearrow: '↗', - ne: '≠', - nedot: '≐', - NegativeMediumSpace: '​', - NegativeThickSpace: '​', - NegativeThinSpace: '​', - NegativeVeryThinSpace: '​', - nequiv: '≢', - nesear: '⤨', - nesim: '≂', - NestedGreaterGreater: '≫', - NestedLessLess: '≪', - NewLine: '\n', - nexist: '∄', - nexists: '∄', - Nfr: '𝔑', - nfr: '𝔫', - ngE: '≧', - nge: '≱', - ngeq: '≱', - ngeqq: '≧', - ngeqslant: '⩾', - nges: '⩾', - nGg: '⋙', - ngsim: '≵', - nGt: '≫', - ngt: '≯', - ngtr: '≯', - nGtv: '≫', - nharr: '↮', - nhArr: '⇎', - nhpar: '⫲', - ni: '∋', - nis: '⋼', - nisd: '⋺', - niv: '∋', - NJcy: 'Њ', - njcy: 'њ', - nlarr: '↚', - nlArr: '⇍', - nldr: '‥', - nlE: '≦', - nle: '≰', - nleftarrow: '↚', - nLeftarrow: '⇍', - nleftrightarrow: '↮', - nLeftrightarrow: '⇎', - nleq: '≰', - nleqq: '≦', - nleqslant: '⩽', - nles: '⩽', - nless: '≮', - nLl: '⋘', - nlsim: '≴', - nLt: '≪', - nlt: '≮', - nltri: '⋪', - nltrie: '⋬', - nLtv: '≪', - nmid: '∤', - NoBreak: '⁠', - NonBreakingSpace: ' ', - nopf: '𝕟', - Nopf: 'ℕ', - Not: '⫬', - not: '¬', - NotCongruent: '≢', - NotCupCap: '≭', - NotDoubleVerticalBar: '∦', - NotElement: '∉', - NotEqual: '≠', - NotEqualTilde: '≂', - NotExists: '∄', - NotGreater: '≯', - NotGreaterEqual: '≱', - NotGreaterFullEqual: '≧', - NotGreaterGreater: '≫', - NotGreaterLess: '≹', - NotGreaterSlantEqual: '⩾', - NotGreaterTilde: '≵', - NotHumpDownHump: '≎', - NotHumpEqual: '≏', - notin: '∉', - notindot: '⋵', - notinE: '⋹', - notinva: '∉', - notinvb: '⋷', - notinvc: '⋶', - NotLeftTriangleBar: '⧏', - NotLeftTriangle: '⋪', - NotLeftTriangleEqual: '⋬', - NotLess: '≮', - NotLessEqual: '≰', - NotLessGreater: '≸', - NotLessLess: '≪', - NotLessSlantEqual: '⩽', - NotLessTilde: '≴', - NotNestedGreaterGreater: '⪢', - NotNestedLessLess: '⪡', - notni: '∌', - notniva: '∌', - notnivb: '⋾', - notnivc: '⋽', - NotPrecedes: '⊀', - NotPrecedesEqual: '⪯', - NotPrecedesSlantEqual: '⋠', - NotReverseElement: '∌', - NotRightTriangleBar: '⧐', - NotRightTriangle: '⋫', - NotRightTriangleEqual: '⋭', - NotSquareSubset: '⊏', - NotSquareSubsetEqual: '⋢', - NotSquareSuperset: '⊐', - NotSquareSupersetEqual: '⋣', - NotSubset: '⊂', - NotSubsetEqual: '⊈', - NotSucceeds: '⊁', - NotSucceedsEqual: '⪰', - NotSucceedsSlantEqual: '⋡', - NotSucceedsTilde: '≿', - NotSuperset: '⊃', - NotSupersetEqual: '⊉', - NotTilde: '≁', - NotTildeEqual: '≄', - NotTildeFullEqual: '≇', - NotTildeTilde: '≉', - NotVerticalBar: '∤', - nparallel: '∦', - npar: '∦', - nparsl: '⫽', - npart: '∂', - npolint: '⨔', - npr: '⊀', - nprcue: '⋠', - nprec: '⊀', - npreceq: '⪯', - npre: '⪯', - nrarrc: '⤳', - nrarr: '↛', - nrArr: '⇏', - nrarrw: '↝', - nrightarrow: '↛', - nRightarrow: '⇏', - nrtri: '⋫', - nrtrie: '⋭', - nsc: '⊁', - nsccue: '⋡', - nsce: '⪰', - Nscr: '𝒩', - nscr: '𝓃', - nshortmid: '∤', - nshortparallel: '∦', - nsim: '≁', - nsime: '≄', - nsimeq: '≄', - nsmid: '∤', - nspar: '∦', - nsqsube: '⋢', - nsqsupe: '⋣', - nsub: '⊄', - nsubE: '⫅', - nsube: '⊈', - nsubset: '⊂', - nsubseteq: '⊈', - nsubseteqq: '⫅', - nsucc: '⊁', - nsucceq: '⪰', - nsup: '⊅', - nsupE: '⫆', - nsupe: '⊉', - nsupset: '⊃', - nsupseteq: '⊉', - nsupseteqq: '⫆', - ntgl: '≹', - Ntilde: 'Ñ', - ntilde: 'ñ', - ntlg: '≸', - ntriangleleft: '⋪', - ntrianglelefteq: '⋬', - ntriangleright: '⋫', - ntrianglerighteq: '⋭', - Nu: 'Ν', - nu: 'ν', - num: '#', - numero: '№', - numsp: ' ', - nvap: '≍', - nvdash: '⊬', - nvDash: '⊭', - nVdash: '⊮', - nVDash: '⊯', - nvge: '≥', - nvgt: '>', - nvHarr: '⤄', - nvinfin: '⧞', - nvlArr: '⤂', - nvle: '≤', - nvlt: '>', - nvltrie: '⊴', - nvrArr: '⤃', - nvrtrie: '⊵', - nvsim: '∼', - nwarhk: '⤣', - nwarr: '↖', - nwArr: '⇖', - nwarrow: '↖', - nwnear: '⤧', - Oacute: 'Ó', - oacute: 'ó', - oast: '⊛', - Ocirc: 'Ô', - ocirc: 'ô', - ocir: '⊚', - Ocy: 'О', - ocy: 'о', - odash: '⊝', - Odblac: 'Ő', - odblac: 'ő', - odiv: '⨸', - odot: '⊙', - odsold: '⦼', - OElig: 'Œ', - oelig: 'œ', - ofcir: '⦿', - Ofr: '𝔒', - ofr: '𝔬', - ogon: '˛', - Ograve: 'Ò', - ograve: 'ò', - ogt: '⧁', - ohbar: '⦵', - ohm: 'Ω', - oint: '∮', - olarr: '↺', - olcir: '⦾', - olcross: '⦻', - oline: '‾', - olt: '⧀', - Omacr: 'Ō', - omacr: 'ō', - Omega: 'Ω', - omega: 'ω', - Omicron: 'Ο', - omicron: 'ο', - omid: '⦶', - ominus: '⊖', - Oopf: '𝕆', - oopf: '𝕠', - opar: '⦷', - OpenCurlyDoubleQuote: '“', - OpenCurlyQuote: '‘', - operp: '⦹', - oplus: '⊕', - orarr: '↻', - Or: '⩔', - or: '∨', - ord: '⩝', - order: 'ℴ', - orderof: 'ℴ', - ordf: 'ª', - ordm: 'º', - origof: '⊶', - oror: '⩖', - orslope: '⩗', - orv: '⩛', - oS: 'Ⓢ', - Oscr: '𝒪', - oscr: 'ℴ', - Oslash: 'Ø', - oslash: 'ø', - osol: '⊘', - Otilde: 'Õ', - otilde: 'õ', - otimesas: '⨶', - Otimes: '⨷', - otimes: '⊗', - Ouml: 'Ö', - ouml: 'ö', - ovbar: '⌽', - OverBar: '‾', - OverBrace: '⏞', - OverBracket: '⎴', - OverParenthesis: '⏜', - para: '¶', - parallel: '∥', - par: '∥', - parsim: '⫳', - parsl: '⫽', - part: '∂', - PartialD: '∂', - Pcy: 'П', - pcy: 'п', - percnt: '%', - period: '.', - permil: '‰', - perp: '⊥', - pertenk: '‱', - Pfr: '𝔓', - pfr: '𝔭', - Phi: 'Φ', - phi: 'φ', - phiv: 'ϕ', - phmmat: 'ℳ', - phone: '☎', - Pi: 'Π', - pi: 'π', - pitchfork: '⋔', - piv: 'ϖ', - planck: 'ℏ', - planckh: 'ℎ', - plankv: 'ℏ', - plusacir: '⨣', - plusb: '⊞', - pluscir: '⨢', - plus: '+', - plusdo: '∔', - plusdu: '⨥', - pluse: '⩲', - PlusMinus: '±', - plusmn: '±', - plussim: '⨦', - plustwo: '⨧', - pm: '±', - Poincareplane: 'ℌ', - pointint: '⨕', - popf: '𝕡', - Popf: 'ℙ', - pound: '£', - prap: '⪷', - Pr: '⪻', - pr: '≺', - prcue: '≼', - precapprox: '⪷', - prec: '≺', - preccurlyeq: '≼', - Precedes: '≺', - PrecedesEqual: '⪯', - PrecedesSlantEqual: '≼', - PrecedesTilde: '≾', - preceq: '⪯', - precnapprox: '⪹', - precneqq: '⪵', - precnsim: '⋨', - pre: '⪯', - prE: '⪳', - precsim: '≾', - prime: '′', - Prime: '″', - primes: 'ℙ', - prnap: '⪹', - prnE: '⪵', - prnsim: '⋨', - prod: '∏', - Product: '∏', - profalar: '⌮', - profline: '⌒', - profsurf: '⌓', - prop: '∝', - Proportional: '∝', - Proportion: '∷', - propto: '∝', - prsim: '≾', - prurel: '⊰', - Pscr: '𝒫', - pscr: '𝓅', - Psi: 'Ψ', - psi: 'ψ', - puncsp: ' ', - Qfr: '𝔔', - qfr: '𝔮', - qint: '⨌', - qopf: '𝕢', - Qopf: 'ℚ', - qprime: '⁗', - Qscr: '𝒬', - qscr: '𝓆', - quaternions: 'ℍ', - quatint: '⨖', - quest: '?', - questeq: '≟', - quot: '"', - QUOT: '"', - rAarr: '⇛', - race: '∽', - Racute: 'Ŕ', - racute: 'ŕ', - radic: '√', - raemptyv: '⦳', - rang: '⟩', - Rang: '⟫', - rangd: '⦒', - range: '⦥', - rangle: '⟩', - raquo: '»', - rarrap: '⥵', - rarrb: '⇥', - rarrbfs: '⤠', - rarrc: '⤳', - rarr: '→', - Rarr: '↠', - rArr: '⇒', - rarrfs: '⤞', - rarrhk: '↪', - rarrlp: '↬', - rarrpl: '⥅', - rarrsim: '⥴', - Rarrtl: '⤖', - rarrtl: '↣', - rarrw: '↝', - ratail: '⤚', - rAtail: '⤜', - ratio: '∶', - rationals: 'ℚ', - rbarr: '⤍', - rBarr: '⤏', - RBarr: '⤐', - rbbrk: '❳', - rbrace: '}', - rbrack: ']', - rbrke: '⦌', - rbrksld: '⦎', - rbrkslu: '⦐', - Rcaron: 'Ř', - rcaron: 'ř', - Rcedil: 'Ŗ', - rcedil: 'ŗ', - rceil: '⌉', - rcub: '}', - Rcy: 'Р', - rcy: 'р', - rdca: '⤷', - rdldhar: '⥩', - rdquo: '”', - rdquor: '”', - rdsh: '↳', - real: 'ℜ', - realine: 'ℛ', - realpart: 'ℜ', - reals: 'ℝ', - Re: 'ℜ', - rect: '▭', - reg: '®', - REG: '®', - ReverseElement: '∋', - ReverseEquilibrium: '⇋', - ReverseUpEquilibrium: '⥯', - rfisht: '⥽', - rfloor: '⌋', - rfr: '𝔯', - Rfr: 'ℜ', - rHar: '⥤', - rhard: '⇁', - rharu: '⇀', - rharul: '⥬', - Rho: 'Ρ', - rho: 'ρ', - rhov: 'ϱ', - RightAngleBracket: '⟩', - RightArrowBar: '⇥', - rightarrow: '→', - RightArrow: '→', - Rightarrow: '⇒', - RightArrowLeftArrow: '⇄', - rightarrowtail: '↣', - RightCeiling: '⌉', - RightDoubleBracket: '⟧', - RightDownTeeVector: '⥝', - RightDownVectorBar: '⥕', - RightDownVector: '⇂', - RightFloor: '⌋', - rightharpoondown: '⇁', - rightharpoonup: '⇀', - rightleftarrows: '⇄', - rightleftharpoons: '⇌', - rightrightarrows: '⇉', - rightsquigarrow: '↝', - RightTeeArrow: '↦', - RightTee: '⊢', - RightTeeVector: '⥛', - rightthreetimes: '⋌', - RightTriangleBar: '⧐', - RightTriangle: '⊳', - RightTriangleEqual: '⊵', - RightUpDownVector: '⥏', - RightUpTeeVector: '⥜', - RightUpVectorBar: '⥔', - RightUpVector: '↾', - RightVectorBar: '⥓', - RightVector: '⇀', - ring: '˚', - risingdotseq: '≓', - rlarr: '⇄', - rlhar: '⇌', - rlm: '‏', - rmoustache: '⎱', - rmoust: '⎱', - rnmid: '⫮', - roang: '⟭', - roarr: '⇾', - robrk: '⟧', - ropar: '⦆', - ropf: '𝕣', - Ropf: 'ℝ', - roplus: '⨮', - rotimes: '⨵', - RoundImplies: '⥰', - rpar: ')', - rpargt: '⦔', - rppolint: '⨒', - rrarr: '⇉', - Rrightarrow: '⇛', - rsaquo: '›', - rscr: '𝓇', - Rscr: 'ℛ', - rsh: '↱', - Rsh: '↱', - rsqb: ']', - rsquo: '’', - rsquor: '’', - rthree: '⋌', - rtimes: '⋊', - rtri: '▹', - rtrie: '⊵', - rtrif: '▸', - rtriltri: '⧎', - RuleDelayed: '⧴', - ruluhar: '⥨', - rx: '℞', - Sacute: 'Ś', - sacute: 'ś', - sbquo: '‚', - scap: '⪸', - Scaron: 'Š', - scaron: 'š', - Sc: '⪼', - sc: '≻', - sccue: '≽', - sce: '⪰', - scE: '⪴', - Scedil: 'Ş', - scedil: 'ş', - Scirc: 'Ŝ', - scirc: 'ŝ', - scnap: '⪺', - scnE: '⪶', - scnsim: '⋩', - scpolint: '⨓', - scsim: '≿', - Scy: 'С', - scy: 'с', - sdotb: '⊡', - sdot: '⋅', - sdote: '⩦', - searhk: '⤥', - searr: '↘', - seArr: '⇘', - searrow: '↘', - sect: '§', - semi: ';', - seswar: '⤩', - setminus: '∖', - setmn: '∖', - sext: '✶', - Sfr: '𝔖', - sfr: '𝔰', - sfrown: '⌢', - sharp: '♯', - SHCHcy: 'Щ', - shchcy: 'щ', - SHcy: 'Ш', - shcy: 'ш', - ShortDownArrow: '↓', - ShortLeftArrow: '←', - shortmid: '∣', - shortparallel: '∥', - ShortRightArrow: '→', - ShortUpArrow: '↑', - shy: '­', - Sigma: 'Σ', - sigma: 'σ', - sigmaf: 'ς', - sigmav: 'ς', - sim: '∼', - simdot: '⩪', - sime: '≃', - simeq: '≃', - simg: '⪞', - simgE: '⪠', - siml: '⪝', - simlE: '⪟', - simne: '≆', - simplus: '⨤', - simrarr: '⥲', - slarr: '←', - SmallCircle: '∘', - smallsetminus: '∖', - smashp: '⨳', - smeparsl: '⧤', - smid: '∣', - smile: '⌣', - smt: '⪪', - smte: '⪬', - smtes: '⪬', - SOFTcy: 'Ь', - softcy: 'ь', - solbar: '⌿', - solb: '⧄', - sol: '/', - Sopf: '𝕊', - sopf: '𝕤', - spades: '♠', - spadesuit: '♠', - spar: '∥', - sqcap: '⊓', - sqcaps: '⊓', - sqcup: '⊔', - sqcups: '⊔', - Sqrt: '√', - sqsub: '⊏', - sqsube: '⊑', - sqsubset: '⊏', - sqsubseteq: '⊑', - sqsup: '⊐', - sqsupe: '⊒', - sqsupset: '⊐', - sqsupseteq: '⊒', - square: '□', - Square: '□', - SquareIntersection: '⊓', - SquareSubset: '⊏', - SquareSubsetEqual: '⊑', - SquareSuperset: '⊐', - SquareSupersetEqual: '⊒', - SquareUnion: '⊔', - squarf: '▪', - squ: '□', - squf: '▪', - srarr: '→', - Sscr: '𝒮', - sscr: '𝓈', - ssetmn: '∖', - ssmile: '⌣', - sstarf: '⋆', - Star: '⋆', - star: '☆', - starf: '★', - straightepsilon: 'ϵ', - straightphi: 'ϕ', - strns: '¯', - sub: '⊂', - Sub: '⋐', - subdot: '⪽', - subE: '⫅', - sube: '⊆', - subedot: '⫃', - submult: '⫁', - subnE: '⫋', - subne: '⊊', - subplus: '⪿', - subrarr: '⥹', - subset: '⊂', - Subset: '⋐', - subseteq: '⊆', - subseteqq: '⫅', - SubsetEqual: '⊆', - subsetneq: '⊊', - subsetneqq: '⫋', - subsim: '⫇', - subsub: '⫕', - subsup: '⫓', - succapprox: '⪸', - succ: '≻', - succcurlyeq: '≽', - Succeeds: '≻', - SucceedsEqual: '⪰', - SucceedsSlantEqual: '≽', - SucceedsTilde: '≿', - succeq: '⪰', - succnapprox: '⪺', - succneqq: '⪶', - succnsim: '⋩', - succsim: '≿', - SuchThat: '∋', - sum: '∑', - Sum: '∑', - sung: '♪', - sup1: '¹', - sup2: '²', - sup3: '³', - sup: '⊃', - Sup: '⋑', - supdot: '⪾', - supdsub: '⫘', - supE: '⫆', - supe: '⊇', - supedot: '⫄', - Superset: '⊃', - SupersetEqual: '⊇', - suphsol: '⟉', - suphsub: '⫗', - suplarr: '⥻', - supmult: '⫂', - supnE: '⫌', - supne: '⊋', - supplus: '⫀', - supset: '⊃', - Supset: '⋑', - supseteq: '⊇', - supseteqq: '⫆', - supsetneq: '⊋', - supsetneqq: '⫌', - supsim: '⫈', - supsub: '⫔', - supsup: '⫖', - swarhk: '⤦', - swarr: '↙', - swArr: '⇙', - swarrow: '↙', - swnwar: '⤪', - szlig: 'ß', - Tab: ' ', - target: '⌖', - Tau: 'Τ', - tau: 'τ', - tbrk: '⎴', - Tcaron: 'Ť', - tcaron: 'ť', - Tcedil: 'Ţ', - tcedil: 'ţ', - Tcy: 'Т', - tcy: 'т', - tdot: '⃛', - telrec: '⌕', - Tfr: '𝔗', - tfr: '𝔱', - there4: '∴', - therefore: '∴', - Therefore: '∴', - Theta: 'Θ', - theta: 'θ', - thetasym: 'ϑ', - thetav: 'ϑ', - thickapprox: '≈', - thicksim: '∼', - ThickSpace: ' ', - ThinSpace: ' ', - thinsp: ' ', - thkap: '≈', - thksim: '∼', - THORN: 'Þ', - thorn: 'þ', - tilde: '˜', - Tilde: '∼', - TildeEqual: '≃', - TildeFullEqual: '≅', - TildeTilde: '≈', - timesbar: '⨱', - timesb: '⊠', - times: '×', - timesd: '⨰', - tint: '∭', - toea: '⤨', - topbot: '⌶', - topcir: '⫱', - top: '⊤', - Topf: '𝕋', - topf: '𝕥', - topfork: '⫚', - tosa: '⤩', - tprime: '‴', - trade: '™', - TRADE: '™', - triangle: '▵', - triangledown: '▿', - triangleleft: '◃', - trianglelefteq: '⊴', - triangleq: '≜', - triangleright: '▹', - trianglerighteq: '⊵', - tridot: '◬', - trie: '≜', - triminus: '⨺', - TripleDot: '⃛', - triplus: '⨹', - trisb: '⧍', - tritime: '⨻', - trpezium: '⏢', - Tscr: '𝒯', - tscr: '𝓉', - TScy: 'Ц', - tscy: 'ц', - TSHcy: 'Ћ', - tshcy: 'ћ', - Tstrok: 'Ŧ', - tstrok: 'ŧ', - twixt: '≬', - twoheadleftarrow: '↞', - twoheadrightarrow: '↠', - Uacute: 'Ú', - uacute: 'ú', - uarr: '↑', - Uarr: '↟', - uArr: '⇑', - Uarrocir: '⥉', - Ubrcy: 'Ў', - ubrcy: 'ў', - Ubreve: 'Ŭ', - ubreve: 'ŭ', - Ucirc: 'Û', - ucirc: 'û', - Ucy: 'У', - ucy: 'у', - udarr: '⇅', - Udblac: 'Ű', - udblac: 'ű', - udhar: '⥮', - ufisht: '⥾', - Ufr: '𝔘', - ufr: '𝔲', - Ugrave: 'Ù', - ugrave: 'ù', - uHar: '⥣', - uharl: '↿', - uharr: '↾', - uhblk: '▀', - ulcorn: '⌜', - ulcorner: '⌜', - ulcrop: '⌏', - ultri: '◸', - Umacr: 'Ū', - umacr: 'ū', - uml: '¨', - UnderBar: '_', - UnderBrace: '⏟', - UnderBracket: '⎵', - UnderParenthesis: '⏝', - Union: '⋃', - UnionPlus: '⊎', - Uogon: 'Ų', - uogon: 'ų', - Uopf: '𝕌', - uopf: '𝕦', - UpArrowBar: '⤒', - uparrow: '↑', - UpArrow: '↑', - Uparrow: '⇑', - UpArrowDownArrow: '⇅', - updownarrow: '↕', - UpDownArrow: '↕', - Updownarrow: '⇕', - UpEquilibrium: '⥮', - upharpoonleft: '↿', - upharpoonright: '↾', - uplus: '⊎', - UpperLeftArrow: '↖', - UpperRightArrow: '↗', - upsi: 'υ', - Upsi: 'ϒ', - upsih: 'ϒ', - Upsilon: 'Υ', - upsilon: 'υ', - UpTeeArrow: '↥', - UpTee: '⊥', - upuparrows: '⇈', - urcorn: '⌝', - urcorner: '⌝', - urcrop: '⌎', - Uring: 'Ů', - uring: 'ů', - urtri: '◹', - Uscr: '𝒰', - uscr: '𝓊', - utdot: '⋰', - Utilde: 'Ũ', - utilde: 'ũ', - utri: '▵', - utrif: '▴', - uuarr: '⇈', - Uuml: 'Ü', - uuml: 'ü', - uwangle: '⦧', - vangrt: '⦜', - varepsilon: 'ϵ', - varkappa: 'ϰ', - varnothing: '∅', - varphi: 'ϕ', - varpi: 'ϖ', - varpropto: '∝', - varr: '↕', - vArr: '⇕', - varrho: 'ϱ', - varsigma: 'ς', - varsubsetneq: '⊊', - varsubsetneqq: '⫋', - varsupsetneq: '⊋', - varsupsetneqq: '⫌', - vartheta: 'ϑ', - vartriangleleft: '⊲', - vartriangleright: '⊳', - vBar: '⫨', - Vbar: '⫫', - vBarv: '⫩', - Vcy: 'В', - vcy: 'в', - vdash: '⊢', - vDash: '⊨', - Vdash: '⊩', - VDash: '⊫', - Vdashl: '⫦', - veebar: '⊻', - vee: '∨', - Vee: '⋁', - veeeq: '≚', - vellip: '⋮', - verbar: '|', - Verbar: '‖', - vert: '|', - Vert: '‖', - VerticalBar: '∣', - VerticalLine: '|', - VerticalSeparator: '❘', - VerticalTilde: '≀', - VeryThinSpace: ' ', - Vfr: '𝔙', - vfr: '𝔳', - vltri: '⊲', - vnsub: '⊂', - vnsup: '⊃', - Vopf: '𝕍', - vopf: '𝕧', - vprop: '∝', - vrtri: '⊳', - Vscr: '𝒱', - vscr: '𝓋', - vsubnE: '⫋', - vsubne: '⊊', - vsupnE: '⫌', - vsupne: '⊋', - Vvdash: '⊪', - vzigzag: '⦚', - Wcirc: 'Ŵ', - wcirc: 'ŵ', - wedbar: '⩟', - wedge: '∧', - Wedge: '⋀', - wedgeq: '≙', - weierp: '℘', - Wfr: '𝔚', - wfr: '𝔴', - Wopf: '𝕎', - wopf: '𝕨', - wp: '℘', - wr: '≀', - wreath: '≀', - Wscr: '𝒲', - wscr: '𝓌', - xcap: '⋂', - xcirc: '◯', - xcup: '⋃', - xdtri: '▽', - Xfr: '𝔛', - xfr: '𝔵', - xharr: '⟷', - xhArr: '⟺', - Xi: 'Ξ', - xi: 'ξ', - xlarr: '⟵', - xlArr: '⟸', - xmap: '⟼', - xnis: '⋻', - xodot: '⨀', - Xopf: '𝕏', - xopf: '𝕩', - xoplus: '⨁', - xotime: '⨂', - xrarr: '⟶', - xrArr: '⟹', - Xscr: '𝒳', - xscr: '𝓍', - xsqcup: '⨆', - xuplus: '⨄', - xutri: '△', - xvee: '⋁', - xwedge: '⋀', - Yacute: 'Ý', - yacute: 'ý', - YAcy: 'Я', - yacy: 'я', - Ycirc: 'Ŷ', - ycirc: 'ŷ', - Ycy: 'Ы', - ycy: 'ы', - yen: '¥', - Yfr: '𝔜', - yfr: '𝔶', - YIcy: 'Ї', - yicy: 'ї', - Yopf: '𝕐', - yopf: '𝕪', - Yscr: '𝒴', - yscr: '𝓎', - YUcy: 'Ю', - yucy: 'ю', - yuml: 'ÿ', - Yuml: 'Ÿ', - Zacute: 'Ź', - zacute: 'ź', - Zcaron: 'Ž', - zcaron: 'ž', - Zcy: 'З', - zcy: 'з', - Zdot: 'Ż', - zdot: 'ż', - zeetrf: 'ℨ', - ZeroWidthSpace: '​', - Zeta: 'Ζ', - zeta: 'ζ', - zfr: '𝔷', - Zfr: 'ℨ', - ZHcy: 'Ж', - zhcy: 'ж', - zigrarr: '⇝', - zopf: '𝕫', - Zopf: 'ℤ', - Zscr: '𝒵', - zscr: '𝓏', - zwj: '‍', - zwnj: '‌' }; - -var entityToChar = function(m) { - var isNumeric = /^&#/.test(m); - var isHex = /^&#[Xx]/.test(m); - var uchar; - if (isNumeric) { - var num; - if (isHex) { - num = parseInt(m.slice(3,-1), 16); - } else { - num = parseInt(m.slice(2,-1), 10); - } - uchar = fromCodePoint(num); - } else { - uchar = entities[m.slice(1,-1)]; - } - return (uchar || m); -}; - -module.exports.entityToChar = entityToChar; diff --git a/outside/commonmark/js/lib/index.js b/outside/commonmark/js/lib/index.js deleted file mode 100755 index 4c5d390fb..000000000 --- a/outside/commonmark/js/lib/index.js +++ /dev/null @@ -1,20 +0,0 @@ -// commonmark.js - CommomMark in JavaScript -// Copyright (C) 2014 John MacFarlane -// License: BSD3. - -// Basic usage: -// -// var commonmark = require('commonmark'); -// var parser = new commonmark.DocParser(); -// var renderer = new commonmark.HtmlRenderer(); -// console.log(renderer.render(parser.parse('Hello *world*'))); - -var util = require('util'); - -var renderAST = function(tree) { - return util.inspect(tree, {depth: null}); -}; - -module.exports.DocParser = require('./blocks'); -module.exports.HtmlRenderer = require('./html-renderer'); -module.exports.ASTRenderer = renderAST; diff --git a/outside/commonmark/js/lib/inlines.js b/outside/commonmark/js/lib/inlines.js deleted file mode 100644 index f73426bcb..000000000 --- a/outside/commonmark/js/lib/inlines.js +++ /dev/null @@ -1,854 +0,0 @@ -var fromCodePoint = require('./from-code-point.js'); -var entityToChar = require('./html5-entities.js').entityToChar; - -// Constants for character codes: - -var C_NEWLINE = 10; -var C_SPACE = 32; -var C_ASTERISK = 42; -var C_UNDERSCORE = 95; -var C_BACKTICK = 96; -var C_OPEN_BRACKET = 91; -var C_CLOSE_BRACKET = 93; -var C_LESSTHAN = 60; -var C_GREATERTHAN = 62; -var C_BANG = 33; -var C_BACKSLASH = 92; -var C_AMPERSAND = 38; -var C_OPEN_PAREN = 40; -var C_COLON = 58; - -// Some regexps used in inline parser: - -var ESCAPABLE = '[!"#$%&\'()*+,./:;<=>?@[\\\\\\]^_`{|}~-]'; -var ESCAPED_CHAR = '\\\\' + ESCAPABLE; -var IN_DOUBLE_QUOTES = '"(' + ESCAPED_CHAR + '|[^"\\x00])*"'; -var IN_SINGLE_QUOTES = '\'(' + ESCAPED_CHAR + '|[^\'\\x00])*\''; -var IN_PARENS = '\\((' + ESCAPED_CHAR + '|[^)\\x00])*\\)'; -var REG_CHAR = '[^\\\\()\\x00-\\x20]'; -var IN_PARENS_NOSP = '\\((' + REG_CHAR + '|' + ESCAPED_CHAR + ')*\\)'; -var TAGNAME = '[A-Za-z][A-Za-z0-9]*'; -var ATTRIBUTENAME = '[a-zA-Z_:][a-zA-Z0-9:._-]*'; -var UNQUOTEDVALUE = "[^\"'=<>`\\x00-\\x20]+"; -var SINGLEQUOTEDVALUE = "'[^']*'"; -var DOUBLEQUOTEDVALUE = '"[^"]*"'; -var ATTRIBUTEVALUE = "(?:" + UNQUOTEDVALUE + "|" + SINGLEQUOTEDVALUE + "|" + DOUBLEQUOTEDVALUE + ")"; -var ATTRIBUTEVALUESPEC = "(?:" + "\\s*=" + "\\s*" + ATTRIBUTEVALUE + ")"; -var ATTRIBUTE = "(?:" + "\\s+" + ATTRIBUTENAME + ATTRIBUTEVALUESPEC + "?)"; -var OPENTAG = "<" + TAGNAME + ATTRIBUTE + "*" + "\\s*/?>"; -var CLOSETAG = "]"; -var HTMLCOMMENT = ""; -var PROCESSINGINSTRUCTION = "[<][?].*?[?][>]"; -var DECLARATION = "]*>"; -var CDATA = "])*\\]\\]>"; -var HTMLTAG = "(?:" + OPENTAG + "|" + CLOSETAG + "|" + HTMLCOMMENT + "|" + - PROCESSINGINSTRUCTION + "|" + DECLARATION + "|" + CDATA + ")"; -var ENTITY = "&(?:#x[a-f0-9]{1,8}|#[0-9]{1,8}|[a-z][a-z0-9]{1,31});"; - -var reHtmlTag = new RegExp('^' + HTMLTAG, 'i'); - -var reLinkTitle = new RegExp( - '^(?:"(' + ESCAPED_CHAR + '|[^"\\x00])*"' + - '|' + - '\'(' + ESCAPED_CHAR + '|[^\'\\x00])*\'' + - '|' + - '\\((' + ESCAPED_CHAR + '|[^)\\x00])*\\))'); - -var reLinkDestinationBraces = new RegExp( - '^(?:[<](?:[^<>\\n\\\\\\x00]' + '|' + ESCAPED_CHAR + '|' + '\\\\)*[>])'); - -var reLinkDestination = new RegExp( - '^(?:' + REG_CHAR + '+|' + ESCAPED_CHAR + '|' + IN_PARENS_NOSP + ')*'); - -var reEscapable = new RegExp(ESCAPABLE); - -var reAllEscapedChar = new RegExp('\\\\(' + ESCAPABLE + ')', 'g'); - -var reEscapedChar = new RegExp('^\\\\(' + ESCAPABLE + ')'); - -var reEntityHere = new RegExp('^' + ENTITY, 'i'); - -var reEntity = new RegExp(ENTITY, 'gi'); - -// Matches a character with a special meaning in markdown, -// or a string of non-special characters. Note: we match -// clumps of _ or * or `, because they need to be handled in groups. -var reMain = /^(?:[_*`\n]+|[\[\]\\!<&*_]|(?: *[^\n `\[\]\\!<&*_]+)+|[ \n]+)/m; - -// Replace entities and backslash escapes with literal characters. -var unescapeString = function(s) { - return s.replace(reAllEscapedChar, '$1') - .replace(reEntity, entityToChar); -}; - -// Normalize reference label: collapse internal whitespace -// to single space, remove leading/trailing whitespace, case fold. -var normalizeReference = function(s) { - return s.trim() - .replace(/\s+/,' ') - .toUpperCase(); -}; - -// INLINE PARSER - -// These are methods of an InlineParser object, defined below. -// An InlineParser keeps track of a subject (a string to be -// parsed) and a position in that subject. - -// If re matches at current position in the subject, advance -// position in subject and return the match; otherwise return null. -var match = function(re) { - var match = re.exec(this.subject.slice(this.pos)); - if (match) { - this.pos += match.index + match[0].length; - return match[0]; - } else { - return null; - } -}; - -// Returns the code for the character at the current subject position, or -1 -// there are no more characters. -var peek = function() { - if (this.pos < this.subject.length) { - return this.subject.charCodeAt(this.pos); - } else { - return -1; - } -}; - -// Parse zero or more space characters, including at most one newline -var spnl = function() { - this.match(/^ *(?:\n *)?/); - return 1; -}; - -// All of the parsers below try to match something at the current position -// in the subject. If they succeed in matching anything, they -// return the inline matched, advancing the subject. - -// Attempt to parse backticks, returning either a backtick code span or a -// literal sequence of backticks. -var parseBackticks = function(inlines) { - var startpos = this.pos; - var ticks = this.match(/^`+/); - if (!ticks) { - return 0; - } - var afterOpenTicks = this.pos; - var foundCode = false; - var match; - while (!foundCode && (match = this.match(/`+/m))) { - if (match === ticks) { - inlines.push({ t: 'Code', c: this.subject.slice(afterOpenTicks, - this.pos - ticks.length) - .replace(/[ \n]+/g,' ') - .trim() }); - return true; - } - } - // If we got here, we didn't match a closing backtick sequence. - this.pos = afterOpenTicks; - inlines.push({ t: 'Text', c: ticks }); - return true; -}; - -// Parse a backslash-escaped special character, adding either the escaped -// character, a hard line break (if the backslash is followed by a newline), -// or a literal backslash to the 'inlines' list. -var parseBackslash = function(inlines) { - var subj = this.subject, - pos = this.pos; - if (subj.charCodeAt(pos) === C_BACKSLASH) { - if (subj.charAt(pos + 1) === '\n') { - this.pos = this.pos + 2; - inlines.push({ t: 'Hardbreak' }); - } else if (reEscapable.test(subj.charAt(pos + 1))) { - this.pos = this.pos + 2; - inlines.push({ t: 'Text', c: subj.charAt(pos + 1) }); - } else { - this.pos++; - inlines.push({t: 'Text', c: '\\'}); - } - return true; - } else { - return false; - } -}; - -// Attempt to parse an autolink (URL or email in pointy brackets). -var parseAutolink = function(inlines) { - var m; - var dest; - if ((m = this.match(/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/))) { // email autolink - dest = m.slice(1,-1); - inlines.push( - {t: 'Link', - label: [{ t: 'Text', c: dest }], - destination: 'mailto:' + encodeURI(unescape(dest)) }); - return true; - } else if ((m = this.match(/^<(?:coap|doi|javascript|aaa|aaas|about|acap|cap|cid|crid|data|dav|dict|dns|file|ftp|geo|go|gopher|h323|http|https|iax|icap|im|imap|info|ipp|iris|iris.beep|iris.xpc|iris.xpcs|iris.lwz|ldap|mailto|mid|msrp|msrps|mtqp|mupdate|news|nfs|ni|nih|nntp|opaquelocktoken|pop|pres|rtsp|service|session|shttp|sieve|sip|sips|sms|snmp|soap.beep|soap.beeps|tag|tel|telnet|tftp|thismessage|tn3270|tip|tv|urn|vemmi|ws|wss|xcon|xcon-userid|xmlrpc.beep|xmlrpc.beeps|xmpp|z39.50r|z39.50s|adiumxtra|afp|afs|aim|apt|attachment|aw|beshare|bitcoin|bolo|callto|chrome|chrome-extension|com-eventbrite-attendee|content|cvs|dlna-playsingle|dlna-playcontainer|dtn|dvb|ed2k|facetime|feed|finger|fish|gg|git|gizmoproject|gtalk|hcp|icon|ipn|irc|irc6|ircs|itms|jar|jms|keyparc|lastfm|ldaps|magnet|maps|market|message|mms|ms-help|msnim|mumble|mvn|notes|oid|palm|paparazzi|platform|proxy|psyc|query|res|resource|rmi|rsync|rtmp|secondlife|sftp|sgn|skype|smb|soldat|spotify|ssh|steam|svn|teamspeak|things|udp|unreal|ut2004|ventrilo|view-source|webcal|wtai|wyciwyg|xfire|xri|ymsgr):[^<>\x00-\x20]*>/i))) { - dest = m.slice(1,-1); - inlines.push({ - t: 'Link', - label: [{ t: 'Text', c: dest }], - destination: encodeURI(unescape(dest)) }); - return true; - } else { - return false; - } -}; - -// Attempt to parse a raw HTML tag. -var parseHtmlTag = function(inlines) { - var m = this.match(reHtmlTag); - if (m) { - inlines.push({ t: 'Html', c: m }); - return true; - } else { - return false; - } -}; - -// Scan a sequence of characters with code cc, and return information about -// the number of delimiters and whether they are positioned such that -// they can open and/or close emphasis or strong emphasis. A utility -// function for strong/emph parsing. -var scanDelims = function(cc) { - var numdelims = 0; - var first_close_delims = 0; - var char_before, char_after, cc_after; - var startpos = this.pos; - - char_before = this.pos === 0 ? '\n' : - this.subject.charAt(this.pos - 1); - - while (this.peek() === cc) { - numdelims++; - this.pos++; - } - - cc_after = this.peek(); - if (cc_after === -1) { - char_after = '\n'; - } else { - char_after = fromCodePoint(cc_after); - } - - var can_open = numdelims > 0 && !(/\s/.test(char_after)); - var can_close = numdelims > 0 && !(/\s/.test(char_before)); - if (cc === C_UNDERSCORE) { - can_open = can_open && !((/[a-z0-9]/i).test(char_before)); - can_close = can_close && !((/[a-z0-9]/i).test(char_after)); - } - this.pos = startpos; - return { numdelims: numdelims, - can_open: can_open, - can_close: can_close }; -}; - -var Emph = function(ils) { - return {t: 'Emph', c: ils}; -}; - -var Strong = function(ils) { - return {t: 'Strong', c: ils}; -}; - -var Str = function(s) { - return {t: 'Text', c: s}; -}; - -// Attempt to parse emphasis or strong emphasis. -var parseEmphasis = function(cc,inlines) { - - var res = this.scanDelims(cc); - var numdelims = res.numdelims; - var startpos = this.pos; - - if (numdelims === 0) { - return false; - } - - this.pos += numdelims; - inlines.push(Str(this.subject.slice(startpos, this.pos))); - - // Add entry to stack for this opener - this.delimiters = { cc: cc, - numdelims: numdelims, - pos: inlines.length - 1, - previous: this.delimiters, - next: null, - can_open: res.can_open, - can_close: res.can_close}; - if (this.delimiters.previous !== null) { - this.delimiters.previous.next = this.delimiters; - } - - return true; - -}; - -var removeDelimiter = function(delim) { - if (delim.previous !== null) { - delim.previous.next = delim.next; - } - if (delim.next === null) { - // top of stack - this.delimiters = delim.previous; - } else { - delim.next.previous = delim.previous; - } -}; - -var removeGaps = function(inlines) { - // remove gaps from inlines - var i, j; - j = 0; - for (i = 0 ; i < inlines.length; i++) { - if (inlines[i] !== null) { - inlines[j] = inlines[i]; - j++; - } - } - inlines.splice(j); -}; - -var processEmphasis = function(inlines, stack_bottom) { - var opener, closer; - var opener_inl, closer_inl; - var nextstack, tempstack; - var use_delims; - var contents; - var tmp; - var emph; - var i,j; - - // find first closer above stack_bottom: - closer = this.delimiters; - while (closer !== null && closer.previous !== stack_bottom) { - closer = closer.previous; - } - // move forward, looking for closers, and handling each - while (closer !== null) { - if (closer.can_close && (closer.cc === C_UNDERSCORE || closer.cc === C_ASTERISK)) { - // found emphasis closer. now look back for first matching opener: - opener = closer.previous; - while (opener !== null && opener !== stack_bottom) { - if (opener.cc === closer.cc && opener.can_open) { - break; - } - opener = opener.previous; - } - if (opener !== null && opener !== stack_bottom) { - // calculate actual number of delimiters used from this closer - if (closer.numdelims < 3 || opener.numdelims < 3) { - use_delims = closer.numdelims <= opener.numdelims ? - closer.numdelims : opener.numdelims; - } else { - use_delims = closer.numdelims % 2 === 0 ? 2 : 1; - } - - opener_inl = inlines[opener.pos]; - closer_inl = inlines[closer.pos]; - - // remove used delimiters from stack elts and inlines - opener.numdelims -= use_delims; - closer.numdelims -= use_delims; - opener_inl.c = opener_inl.c.slice(0, opener_inl.c.length - use_delims); - closer_inl.c = closer_inl.c.slice(0, closer_inl.c.length - use_delims); - - // build contents for new emph element - contents = inlines.slice(opener.pos + 1, closer.pos); - removeGaps(contents); - - emph = use_delims === 1 ? Emph(contents) : Strong(contents); - - // insert into list of inlines - inlines[opener.pos + 1] = emph; - for (i = opener.pos + 2; i < closer.pos; i++) { - inlines[i] = null; - } - - // remove elts btw opener and closer in delimiters stack - tempstack = closer.previous; - while (tempstack !== null && tempstack !== opener) { - nextstack = tempstack.previous; - this.removeDelimiter(tempstack); - tempstack = nextstack; - } - - // if opener has 0 delims, remove it and the inline - if (opener.numdelims === 0) { - inlines[opener.pos] = null; - this.removeDelimiter(opener); - } - - if (closer.numdelims === 0) { - inlines[closer.pos] = null; - tempstack = closer.next; - this.removeDelimiter(closer); - closer = tempstack; - } - - - } else { - closer = closer.next; - } - - } else { - closer = closer.next; - } - - } - - removeGaps(inlines); - - // remove all delimiters - while (this.delimiters != stack_bottom) { - this.removeDelimiter(this.delimiters); - } -}; - -// Attempt to parse link title (sans quotes), returning the string -// or null if no match. -var parseLinkTitle = function() { - var title = this.match(reLinkTitle); - if (title) { - // chop off quotes from title and unescape: - return unescapeString(title.substr(1, title.length - 2)); - } else { - return null; - } -}; - -// Attempt to parse link destination, returning the string or -// null if no match. -var parseLinkDestination = function() { - var res = this.match(reLinkDestinationBraces); - if (res) { // chop off surrounding <..>: - return encodeURI(unescape(unescapeString(res.substr(1, res.length - 2)))); - } else { - res = this.match(reLinkDestination); - if (res !== null) { - return encodeURI(unescape(unescapeString(res))); - } else { - return null; - } - } -}; - -// Attempt to parse a link label, returning number of characters parsed. -var parseLinkLabel = function() { - var match = this.match(/^\[(?:[^\\\[\]]|\\[\[\]]){0,1000}\]/); - return match === null ? 0 : match.length; -}; - -// Parse raw link label, including surrounding [], and return -// inline contents. (Note: this is not a method of InlineParser.) -var parseRawLabel = function(s) { - // note: parse without a refmap; we don't want links to resolve - // in nested brackets! - return new InlineParser().parse(s.substr(1, s.length - 2), {}); -}; - -// Add open bracket to delimiter stack and add a Str to inlines. -var parseOpenBracket = function(inlines) { - - var startpos = this.pos; - this.pos += 1; - inlines.push(Str("[")); - - // Add entry to stack for this opener - this.delimiters = { cc: C_OPEN_BRACKET, - numdelims: 1, - pos: inlines.length - 1, - previous: this.delimiters, - next: null, - can_open: true, - can_close: false, - index: startpos }; - if (this.delimiters.previous !== null) { - this.delimiters.previous.next = this.delimiters; - } - return true; - -}; - -// IF next character is [, and ! delimiter to delimiter stack and -// add a Str to inlines. Otherwise just add a Str. -var parseBang = function(inlines) { - - var startpos = this.pos; - this.pos += 1; - if (this.peek() === C_OPEN_BRACKET) { - this.pos += 1; - inlines.push(Str("![")); - - // Add entry to stack for this opener - this.delimiters = { cc: C_BANG, - numdelims: 1, - pos: inlines.length - 1, - previous: this.delimiters, - next: null, - can_open: true, - can_close: false, - index: startpos + 1 }; - if (this.delimiters.previous !== null) { - this.delimiters.previous.next = this.delimiters; - } - } else { - inlines.push(Str("!")); - } - return true; -}; - -// Try to match close bracket against an opening in the delimiter -// stack. Add either a link or image, or a plain [ character, -// to the inlines stack. If there is a matching delimiter, -// remove it from the delimiter stack. -var parseCloseBracket = function(inlines) { - var startpos; - var is_image; - var dest; - var title; - var matched = false; - var link_text; - var i; - var opener, closer_above, tempstack; - - this.pos += 1; - startpos = this.pos; - - // look through stack of delimiters for a [ or ! - opener = this.delimiters; - while (opener !== null) { - if (opener.cc === C_OPEN_BRACKET || opener.cc === C_BANG) { - break; - } - opener = opener.previous; - } - - if (opener === null) { - // no matched opener, just return a literal - inlines.push(Str("]")); - return true; - } - - // If we got here, open is a potential opener - is_image = opener.cc === C_BANG; - // instead of copying a slice, we null out the - // parts of inlines that don't correspond to link_text; - // later, we'll collapse them. This is awkward, and could - // be simplified if we made inlines a linked list rather than - // an array: - link_text = inlines.slice(0); - for (i = 0; i < opener.pos + 1; i++) { - link_text[i] = null; - } - - // Check to see if we have a link/image - - // Inline link? - if (this.peek() === C_OPEN_PAREN) { - this.pos++; - if (this.spnl() && - ((dest = this.parseLinkDestination()) !== null) && - this.spnl() && - // make sure there's a space before the title: - (/^\s/.test(this.subject.charAt(this.pos - 1)) && - (title = this.parseLinkTitle() || '') || true) && - this.spnl() && - this.match(/^\)/)) { - matched = true; - } - } else { - - // Next, see if there's a link label - var savepos = this.pos; - this.spnl(); - var beforelabel = this.pos; - n = this.parseLinkLabel(); - if (n === 0 || n === 2) { - // empty or missing second label - reflabel = this.subject.slice(opener.index, startpos); - } else { - reflabel = this.subject.slice(beforelabel, beforelabel + n); - } - if (n === 0) { - // If shortcut reference link, rewind before spaces we skipped. - this.pos = savepos; - } - - // lookup rawlabel in refmap - var link = this.refmap[normalizeReference(reflabel)]; - if (link) { - dest = link.destination; - title = link.title; - matched = true; - } - } - - if (matched) { - this.processEmphasis(link_text, opener.previous); - - // remove the part of inlines that became link_text. - // see note above on why we need to do this instead of splice: - for (i = opener.pos; i < inlines.length; i++) { - inlines[i] = null; - } - - // processEmphasis will remove this and later delimiters. - // Now, for a link, we also remove earlier link openers. - // (no links in links) - if (!is_image) { - opener = this.delimiters; - closer_above = null; - while (opener !== null) { - if (opener.cc === C_OPEN_BRACKET) { - if (closer_above) { - closer_above.previous = opener.previous; - } else { - this.delimiters = opener.previous; - } - } else { - closer_above = opener; - } - opener = opener.previous; - } - } - - inlines.push({t: is_image ? 'Image' : 'Link', - destination: dest, - title: title, - label: link_text}); - return true; - - } else { // no match - - this.removeDelimiter(opener); // remove this opener from stack - this.pos = startpos; - inlines.push(Str("]")); - return true; - } - -}; - -// Attempt to parse an entity, return Entity object if successful. -var parseEntity = function(inlines) { - var m; - if ((m = this.match(reEntityHere))) { - inlines.push({ t: 'Text', c: entityToChar(m) }); - return true; - } else { - return false; - } -}; - -// Parse a run of ordinary characters, or a single character with -// a special meaning in markdown, as a plain string, adding to inlines. -var parseString = function(inlines) { - var m; - if ((m = this.match(reMain))) { - inlines.push({ t: 'Text', c: m }); - return true; - } else { - return false; - } -}; - -// Parse a newline. If it was preceded by two spaces, return a hard -// line break; otherwise a soft line break. -var parseNewline = function(inlines) { - var m = this.match(/^ *\n/); - if (m) { - if (m.length > 2) { - inlines.push({ t: 'Hardbreak' }); - } else if (m.length > 0) { - inlines.push({ t: 'Softbreak' }); - } - return true; - } - return false; -}; - -// Attempt to parse an image. If the opening '!' is not followed -// by a link, return a literal '!'. -var parseImage = function(inlines) { - if (this.match(/^!/)) { - var link = this.parseLink(inlines); - if (link) { - inlines[inlines.length - 1].t = 'Image'; - return true; - } else { - inlines.push({ t: 'Text', c: '!' }); - return true; - } - } else { - return false; - } -}; - -// Attempt to parse a link reference, modifying refmap. -var parseReference = function(s, refmap) { - this.subject = s; - this.pos = 0; - this.label_nest_level = 0; - var rawlabel; - var dest; - var title; - var matchChars; - var startpos = this.pos; - var match; - - // label: - matchChars = this.parseLinkLabel(); - if (matchChars === 0) { - return 0; - } else { - rawlabel = this.subject.substr(0, matchChars); - } - - // colon: - if (this.peek() === C_COLON) { - this.pos++; - } else { - this.pos = startpos; - return 0; - } - - // link url - this.spnl(); - - dest = this.parseLinkDestination(); - if (dest === null || dest.length === 0) { - this.pos = startpos; - return 0; - } - - var beforetitle = this.pos; - this.spnl(); - title = this.parseLinkTitle(); - if (title === null) { - title = ''; - // rewind before spaces - this.pos = beforetitle; - } - - // make sure we're at line end: - if (this.match(/^ *(?:\n|$)/) === null) { - this.pos = startpos; - return 0; - } - - var normlabel = normalizeReference(rawlabel); - - if (!refmap[normlabel]) { - refmap[normlabel] = { destination: dest, title: title }; - } - return this.pos - startpos; -}; - -// Parse the next inline element in subject, advancing subject position. -// On success, add the result to the inlines list, and return true. -// On failure, return false. -var parseInline = function(inlines) { - var startpos = this.pos; - var origlen = inlines.length; - - var c = this.peek(); - if (c === -1) { - return false; - } - var res; - switch(c) { - case C_NEWLINE: - case C_SPACE: - res = this.parseNewline(inlines); - break; - case C_BACKSLASH: - res = this.parseBackslash(inlines); - break; - case C_BACKTICK: - res = this.parseBackticks(inlines); - break; - case C_ASTERISK: - case C_UNDERSCORE: - res = this.parseEmphasis(c, inlines); - break; - case C_OPEN_BRACKET: - res = this.parseOpenBracket(inlines); - break; - case C_BANG: - res = this.parseBang(inlines); - break; - case C_CLOSE_BRACKET: - res = this.parseCloseBracket(inlines); - break; - case C_LESSTHAN: - res = this.parseAutolink(inlines) || this.parseHtmlTag(inlines); - break; - case C_AMPERSAND: - res = this.parseEntity(inlines); - break; - default: - res = this.parseString(inlines); - break; - } - if (!res) { - this.pos += 1; - inlines.push({t: 'Text', c: fromCodePoint(c)}); - } - - return true; -}; - -// Parse s as a list of inlines, using refmap to resolve references. -var parseInlines = function(s, refmap) { - this.subject = s; - this.pos = 0; - this.refmap = refmap || {}; - this.delimiters = null; - var inlines = []; - while (this.parseInline(inlines)) { - } - this.processEmphasis(inlines, null); - return inlines; -}; - -// The InlineParser object. -function InlineParser(){ - return { - subject: '', - label_nest_level: 0, // used by parseLinkLabel method - delimiters: null, // used by parseEmphasis method - pos: 0, - refmap: {}, - match: match, - peek: peek, - spnl: spnl, - unescapeString: unescapeString, - parseBackticks: parseBackticks, - parseBackslash: parseBackslash, - parseAutolink: parseAutolink, - parseHtmlTag: parseHtmlTag, - scanDelims: scanDelims, - parseEmphasis: parseEmphasis, - parseLinkTitle: parseLinkTitle, - parseLinkDestination: parseLinkDestination, - parseLinkLabel: parseLinkLabel, - parseOpenBracket: parseOpenBracket, - parseCloseBracket: parseCloseBracket, - parseBang: parseBang, - parseEntity: parseEntity, - parseString: parseString, - parseNewline: parseNewline, - parseReference: parseReference, - parseInline: parseInline, - processEmphasis: processEmphasis, - removeDelimiter: removeDelimiter, - parse: parseInlines - }; -} - -module.exports = InlineParser; diff --git a/outside/commonmark/js/package.json b/outside/commonmark/js/package.json deleted file mode 100644 index cd70d4531..000000000 --- a/outside/commonmark/js/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ "name": "commonmark", - "description": "a strongly specified, highly compatible variant of Markdown", - "version": "0.12.0", - "homepage": "http://commonmark.org", - "keywords": - [ "markdown", - "commonmark", - "md", - "stmd" ], - "repository": - { "type": "git", - "url": "https://github.com/jgm/CommonMark.git" }, - "author": "John MacFarlane", - "bugs": { "url": "https://github.com/jgm/CommonMark/issues" }, - "license": "BSD-3-Clause", - "main": "./lib/index.js", - "bin": { "commonmark": "./bin/commonmark" }, - "scripts": { "test": "node ./test.js" }, - "directories": { - "lib": "./lib" - }, - "engines": { - "node": "*" - } -} diff --git a/outside/commonmark/js/test.js b/outside/commonmark/js/test.js deleted file mode 100755 index 5427bbf6c..000000000 --- a/outside/commonmark/js/test.js +++ /dev/null @@ -1,82 +0,0 @@ -#!/usr/bin/env node - -var fs = require('fs'); -var commonmark = require('./lib/index.js'); -var ansi = require('./ansi/ansi'); -var cursor = ansi(process.stdout); - -var writer = new commonmark.HtmlRenderer(); -var reader = new commonmark.DocParser(); - -var passed = 0; -var failed = 0; - -var showSpaces = function(s) { - var t = s; - return t.replace(/\t/g,'→') - .replace(/ /g,'␣'); -}; - -fs.readFile('spec.txt', 'utf8', function(err, data) { - if (err) { - return console.log(err); - } - var i; - var examples = []; - var current_section = ""; - var example_number = 0; - var tests = data - .replace(/\r\n?/g, "\n") // Normalize newlines for platform independence - .replace(/^(.|[\n])*/m, ''); - - tests.replace(/^\.\n([\s\S]*?)^\.\n([\s\S]*?)^\.$|^#{1,6} *(.*)$/gm, - function(_,markdownSubmatch,htmlSubmatch,sectionSubmatch){ - if (sectionSubmatch) { - current_section = sectionSubmatch; - } else { - example_number++; - examples.push({markdown: markdownSubmatch, - html: htmlSubmatch, - section: current_section, - number: example_number}); - } - }); - - current_section = ""; - - console.time("Elapsed time"); - - for (i = 0; i < examples.length; i++) { - var example = examples[i]; - if (example.section !== current_section) { - if (current_section !== '') { - cursor.write('\n'); - } - current_section = example.section; - cursor.reset().write(current_section).reset().write(' '); - } - var actual = writer.renderBlock(reader.parse(example.markdown.replace(/→/g, '\t'))); - if (actual === example.html) { - passed++; - cursor.green().write('✓').reset(); - } else { - failed++; - cursor.write('\n'); - - cursor.red().write('✘ Example ' + example.number + '\n'); - cursor.cyan(); - cursor.write('=== markdown ===============\n'); - cursor.write(showSpaces(example.markdown)); - cursor.write('=== expected ===============\n'); - cursor.write(showSpaces(example.html)); - cursor.write('=== got ====================\n'); - cursor.write(showSpaces(actual)); - cursor.reset(); - } - } - cursor.write('\n' + passed.toString() + ' tests passed, ' + - failed.toString() + ' failed.\n'); - - console.timeEnd("Elapsed time"); -}); - diff --git a/outside/commonmark/man/CMakeLists.txt b/outside/commonmark/man/CMakeLists.txt deleted file mode 100644 index afb87114e..000000000 --- a/outside/commonmark/man/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/man1/cmark.1 - DESTINATION share/man/man1) - -INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/man3/cmark.3 - DESTINATION share/man/man3) \ No newline at end of file diff --git a/outside/commonmark/man/make_man_page.py b/outside/commonmark/man/make_man_page.py deleted file mode 100644 index 01a1c6f74..000000000 --- a/outside/commonmark/man/make_man_page.py +++ /dev/null @@ -1,102 +0,0 @@ -#!/usr/bin/env python - -# Creates a man page from a C file. - -# Comments beginning with `/**` are treated as Groff man, except that -# 'this' is converted to \fIthis\fR, and ''this'' to \fBthis\fR. - -# Non-blank lines immediately following a man page comment are treated -# as function signatures or examples and parsed into .Ft, .Fo, .Fa, .Fc. The -# immediately preceding man documentation chunk is printed after the example -# as a comment on it. - -# That's about it! - -import sys, re, os -from datetime import date - -comment_start_re = re.compile('^\/\*\* ?') -comment_delim_re = re.compile('^[/ ]\** ?') -comment_end_re = re.compile('^ \**\/') -function_re = re.compile('^ *(?:CMARK_EXPORT\s+)?(?P(?:const\s+)?\w+(?:\s*[*])?)\s*(?P\w+)\s*\((?P[^)]*)\)') -blank_re = re.compile('^\s*$') -macro_re = re.compile('CMARK_EXPORT *') -typedef_start_re = re.compile('typedef.*{$') -typedef_end_re = re.compile('}') -single_quote_re = re.compile("(?\\\\fR', re.sub(single_quote_re, '\\\\fI\g<1>\\\\fR', s)) - -typedef = False -mdlines = [] -chunk = [] -sig = [] - -if len(sys.argv) > 1: - sourcefile = sys.argv[1] -else: - print("Usage: make_man_page.py sourcefile") - exit(1) - -with open(sourcefile, 'r') as cmarkh: - state = 'default' - for line in cmarkh: - # state transition - oldstate = state - if comment_start_re.match(line): - state = 'man' - elif comment_end_re.match(line) and state == 'man': - continue - elif comment_delim_re.match(line) and state == 'man': - state = 'man' - elif not typedef and blank_re.match(line): - state = 'default' - elif typedef and typedef_end_re.match(line): - typedef = False - elif state == 'man': - state = 'signature' - typedef = typedef_start_re.match(line) - - # handle line - if state == 'man': - chunk.append(handle_quotes(re.sub(comment_delim_re, '', line))) - elif state == 'signature': - ln = re.sub(macro_re, '', line) - if typedef or not re.match(blank_re, ln): - sig.append(ln) - elif oldstate == 'signature' and state != 'signature': - if len(mdlines) > 0 and mdlines[-1] != '\n': - mdlines.append('\n') - rawsig = ''.join(sig) - m = function_re.match(rawsig) - if m: - mdlines.append('\\fI' + m.group('type') + '\\fR' + ' ') - mdlines.append('\\fB' + m.group('name') + '\\fR' + '(') - first = True - for argument in re.split(',', m.group('args')): - if not first: - mdlines.append(', ') - first = False - mdlines.append('\\fI' + argument.strip() + '\\fR') - mdlines.append(')\n') - else: - mdlines.append('.nf\n\\f[C]\n.RS 0n\n') - mdlines += sig - mdlines.append('.RE\n\\f[]\n.fi\n') - if len(mdlines) > 0 and mdlines[-1] != '\n': - mdlines.append('\n') - mdlines.append('.PP\n') - mdlines += chunk - chunk = [] - sig = [] - elif oldstate == 'man' and state != 'signature': - if len(mdlines) > 0 and mdlines[-1] != '\n': - mdlines.append('\n') - mdlines += chunk # add man chunk - chunk = [] - mdlines.append('\n') - -sys.stdout.write('.TH ' + os.path.basename(sourcefile).replace('.h','') + ' 3 "' + date.today().strftime('%B %d, %Y') + '" "LOCAL" "Library Functions Manual"\n') -sys.stdout.write(''.join(mdlines)) diff --git a/outside/commonmark/man/man1/cmark.1 b/outside/commonmark/man/man1/cmark.1 deleted file mode 100644 index 41185207c..000000000 --- a/outside/commonmark/man/man1/cmark.1 +++ /dev/null @@ -1,31 +0,0 @@ -.TH "cmark" "1" "November 30, 2014" "LOCAL" "General Commands Manual" -.SH "NAME" -\fBcmark\fR -\- convert CommonMark formatted text to HTML -.SH "SYNOPSIS" -.HP 6n -\fBcmark\fR -[\fB\-\-ast\fR] -file* -.SH "DESCRIPTION" -\fBcmark\fR -acts as a pipe, reading from -\fRstdin\fR -or from the specified files and writing to -\fRstdout\fR. -It converts Markdown formatted plain text to HTML, using the conventions -described in the CommonMark spec. -If multiple files are specified, the contents of the files are simply -concatenated before parsing. -.SH "OPTIONS" -.TP 12n -\-\--ast -Print an abstract syntax tree instead of HTML. -.TP 12n -\-\-help -Print usage information. -.TP 12n -\-\-version -Print version. -.SH "AUTHORS" -John MacFarlane diff --git a/outside/commonmark/man/man3/cmark.3 b/outside/commonmark/man/man3/cmark.3 deleted file mode 100644 index e5b55fded..000000000 --- a/outside/commonmark/man/man3/cmark.3 +++ /dev/null @@ -1,275 +0,0 @@ -.TH cmark 3 "December 05, 2014" "LOCAL" "Library Functions Manual" -.SH NAME - -.B cmark -\- CommonMark parsing, manipulating, and rendering - -.SH SIMPLE INTERFACE - -.nf -\f[C] -.RS 0n -#define CMARK_VERSION "0.1" -.RE -\f[] -.fi - -.PP -Current version of library. - -\fIchar *\fR \fBcmark_markdown_to_html\fR(\fIconst char *text\fR, \fIint len\fR) - -.PP -Convert \fItext\fR (assumed to be a UTF-8 encoded string with length -\fIlen\fR from CommonMark Markdown to HTML, returning a null-terminated, -UTF-8-encoded string. - -.SH NODE STRUCTURE - -.nf -\f[C] -.RS 0n -typedef enum { - /* Block */ - CMARK_NODE_DOCUMENT, - CMARK_NODE_BLOCK_QUOTE, - CMARK_NODE_LIST, - CMARK_NODE_LIST_ITEM, - CMARK_NODE_CODE_BLOCK, - CMARK_NODE_HTML, - CMARK_NODE_PARAGRAPH, - CMARK_NODE_HEADER, - CMARK_NODE_HRULE, - CMARK_NODE_REFERENCE_DEF, - - CMARK_NODE_FIRST_BLOCK = CMARK_NODE_DOCUMENT, - CMARK_NODE_LAST_BLOCK = CMARK_NODE_REFERENCE_DEF, - - /* Inline */ - CMARK_NODE_TEXT, - CMARK_NODE_SOFTBREAK, - CMARK_NODE_LINEBREAK, - CMARK_NODE_INLINE_CODE, - CMARK_NODE_INLINE_HTML, - CMARK_NODE_EMPH, - CMARK_NODE_STRONG, - CMARK_NODE_LINK, - CMARK_NODE_IMAGE, - - CMARK_NODE_FIRST_INLINE = CMARK_NODE_TEXT, - CMARK_NODE_LAST_INLINE = CMARK_NODE_IMAGE, -} cmark_node_type; -.RE -\f[] -.fi - -.PP - -.nf -\f[C] -.RS 0n -typedef enum { - CMARK_NO_LIST, - CMARK_BULLET_LIST, - CMARK_ORDERED_LIST -} cmark_list_type; -.RE -\f[] -.fi - -.PP - -.nf -\f[C] -.RS 0n -typedef enum { - CMARK_PERIOD_DELIM, - CMARK_PAREN_DELIM -} cmark_delim_type; -.RE -\f[] -.fi - -.PP - - -.SH CREATING AND DESTROYING NODES - -\fIcmark_node*\fR \fBcmark_node_new\fR(\fIcmark_node_type type\fR) - -.PP - -\fIvoid\fR \fBcmark_node_free\fR(\fIcmark_node *node\fR) - -.PP - -\fIcmark_node*\fR \fBcmark_node_next\fR(\fIcmark_node *node\fR) - -.PP - -.SH TREE TRAVERSAL - -\fIcmark_node*\fR \fBcmark_node_previous\fR(\fIcmark_node *node\fR) - -.PP - -\fIcmark_node*\fR \fBcmark_node_parent\fR(\fIcmark_node *node\fR) - -.PP - -\fIcmark_node*\fR \fBcmark_node_first_child\fR(\fIcmark_node *node\fR) - -.PP - -\fIcmark_node*\fR \fBcmark_node_last_child\fR(\fIcmark_node *node\fR) - -.PP - - -.SH ACCESSORS - -\fIcmark_node_type\fR \fBcmark_node_get_type\fR(\fIcmark_node *node\fR) - -.PP - -\fIconst char*\fR \fBcmark_node_get_string_content\fR(\fIcmark_node *node\fR) - -.PP - -\fIint\fR \fBcmark_node_set_string_content\fR(\fIcmark_node *node\fR, \fIconst char *content\fR) - -.PP - -\fIint\fR \fBcmark_node_get_header_level\fR(\fIcmark_node *node\fR) - -.PP - -\fIint\fR \fBcmark_node_set_header_level\fR(\fIcmark_node *node\fR, \fIint level\fR) - -.PP - -\fIcmark_list_type\fR \fBcmark_node_get_list_type\fR(\fIcmark_node *node\fR) - -.PP - -\fIint\fR \fBcmark_node_set_list_type\fR(\fIcmark_node *node\fR, \fIcmark_list_type type\fR) - -.PP - -\fIint\fR \fBcmark_node_get_list_start\fR(\fIcmark_node *node\fR) - -.PP - -\fIint\fR \fBcmark_node_set_list_start\fR(\fIcmark_node *node\fR, \fIint start\fR) - -.PP - -\fIint\fR \fBcmark_node_get_list_tight\fR(\fIcmark_node *node\fR) - -.PP - -\fIint\fR \fBcmark_node_set_list_tight\fR(\fIcmark_node *node\fR, \fIint tight\fR) - -.PP - -\fIconst char*\fR \fBcmark_node_get_fence_info\fR(\fIcmark_node *node\fR) - -.PP - -\fIint\fR \fBcmark_node_set_fence_info\fR(\fIcmark_node *node\fR, \fIconst char *info\fR) - -.PP - -\fIconst char*\fR \fBcmark_node_get_url\fR(\fIcmark_node *node\fR) - -.PP - -\fIint\fR \fBcmark_node_set_url\fR(\fIcmark_node *node\fR, \fIconst char *url\fR) - -.PP - -\fIconst char*\fR \fBcmark_node_get_title\fR(\fIcmark_node *node\fR) - -.PP - -\fIint\fR \fBcmark_node_set_title\fR(\fIcmark_node *node\fR, \fIconst char *title\fR) - -.PP - -\fIint\fR \fBcmark_node_get_start_line\fR(\fIcmark_node *node\fR) - -.PP - -\fIint\fR \fBcmark_node_get_start_column\fR(\fIcmark_node *node\fR) - -.PP - -\fIint\fR \fBcmark_node_get_end_line\fR(\fIcmark_node *node\fR) - -.PP - - -.SH TREE MANIPULATION - -\fIvoid\fR \fBcmark_node_unlink\fR(\fIcmark_node *node\fR) - -.PP - -\fIint\fR \fBcmark_node_insert_before\fR(\fIcmark_node *node\fR, \fIcmark_node *sibling\fR) - -.PP - -\fIint\fR \fBcmark_node_insert_after\fR(\fIcmark_node *node\fR, \fIcmark_node *sibling\fR) - -.PP - -\fIint\fR \fBcmark_node_prepend_child\fR(\fIcmark_node *node\fR, \fIcmark_node *child\fR) - -.PP - -\fIint\fR \fBcmark_node_append_child\fR(\fIcmark_node *node\fR, \fIcmark_node *child\fR) - -.PP - - -.SH PARSING - -\fIcmark_parser *\fR \fBcmark_parser_new\fR(\fI\fR) - -.PP - -\fIvoid\fR \fBcmark_parser_free\fR(\fIcmark_parser *parser\fR) - -.PP - -\fIcmark_node *\fR \fBcmark_parser_finish\fR(\fIcmark_parser *parser\fR) - -.PP - -\fIvoid\fR \fBcmark_parser_feed\fR(\fIcmark_parser *parser\fR, \fIconst char *buffer\fR, \fIsize_t len\fR) - -.PP - -\fIcmark_node *\fR \fBcmark_parse_document\fR(\fIconst char *buffer\fR, \fIsize_t len\fR) - -.PP - -\fIcmark_node *\fR \fBcmark_parse_file\fR(\fIFILE *f\fR) - -.PP - - -.SH RENDERING - -\fIchar *\fR \fBcmark_render_ast\fR(\fIcmark_node *root\fR) - -.PP - -\fIchar *\fR \fBcmark_render_html\fR(\fIcmark_node *root\fR) - -.PP - -.SH AUTHORS - -John MacFarlane, Vicent Marti, Kārlis Gaņģis, Nick Wellnhofer. - diff --git a/outside/commonmark/mkcasefold.pl b/outside/commonmark/mkcasefold.pl deleted file mode 100644 index 740ce77a6..000000000 --- a/outside/commonmark/mkcasefold.pl +++ /dev/null @@ -1,22 +0,0 @@ -binmode STDOUT; -print(" switch (c) {\n"); -my $lastchar = ""; -while () { - if (/^[A-F0-9]/ and / [CF]; /) { - my ($char, $type, $subst) = m/([A-F0-9]+); ([CF]); ([^;]+)/; - if ($char eq $lastchar) { - break; - } - my @subst = $subst =~ m/(\w+)/g; - printf(" case 0x%s:\n", $char); - foreach (@subst) { - printf(" bufpush(0x%s);\n", $_); - } - printf(" break;\n"); - $lastchar = $char; - } -} -printf(" default:\n"); -printf(" bufpush(c);\n"); -print(" }\n"); - diff --git a/outside/commonmark/nmake.bat b/outside/commonmark/nmake.bat deleted file mode 100644 index cd4045326..000000000 --- a/outside/commonmark/nmake.bat +++ /dev/null @@ -1 +0,0 @@ -@nmake.exe /nologo /f Makefile.nmake %* diff --git a/outside/commonmark/spec.txt b/outside/commonmark/spec.txt deleted file mode 100644 index c2084fdcd..000000000 --- a/outside/commonmark/spec.txt +++ /dev/null @@ -1,6971 +0,0 @@ ---- -title: CommonMark Spec -author: -- John MacFarlane -version: 0.12 -date: 2014-11-10 -... - -# Introduction - -## What is Markdown? - -Markdown is a plain text format for writing structured documents, -based on conventions used for indicating formatting in email and -usenet posts. It was developed in 2004 by John Gruber, who wrote -the first Markdown-to-HTML converter in perl, and it soon became -widely used in websites. By 2014 there were dozens of -implementations in many languages. Some of them extended basic -Markdown syntax with conventions for footnotes, definition lists, -tables, and other constructs, and some allowed output not just in -HTML but in LaTeX and many other formats. - -## Why is a spec needed? - -John Gruber's [canonical description of Markdown's -syntax](http://daringfireball.net/projects/markdown/syntax) -does not specify the syntax unambiguously. Here are some examples of -questions it does not answer: - -1. How much indentation is needed for a sublist? The spec says that - continuation paragraphs need to be indented four spaces, but is - not fully explicit about sublists. It is natural to think that - they, too, must be indented four spaces, but `Markdown.pl` does - not require that. This is hardly a "corner case," and divergences - between implementations on this issue often lead to surprises for - users in real documents. (See [this comment by John - Gruber](http://article.gmane.org/gmane.text.markdown.general/1997).) - -2. Is a blank line needed before a block quote or header? - Most implementations do not require the blank line. However, - this can lead to unexpected results in hard-wrapped text, and - also to ambiguities in parsing (note that some implementations - put the header inside the blockquote, while others do not). - (John Gruber has also spoken [in favor of requiring the blank - lines](http://article.gmane.org/gmane.text.markdown.general/2146).) - -3. Is a blank line needed before an indented code block? - (`Markdown.pl` requires it, but this is not mentioned in the - documentation, and some implementations do not require it.) - - ``` markdown - paragraph - code? - ``` - -4. What is the exact rule for determining when list items get - wrapped in `

    ` tags? Can a list be partially "loose" and partially - "tight"? What should we do with a list like this? - - ``` markdown - 1. one - - 2. two - 3. three - ``` - - Or this? - - ``` markdown - 1. one - - a - - - b - 2. two - ``` - - (There are some relevant comments by John Gruber - [here](http://article.gmane.org/gmane.text.markdown.general/2554).) - -5. Can list markers be indented? Can ordered list markers be right-aligned? - - ``` markdown - 8. item 1 - 9. item 2 - 10. item 2a - ``` - -6. Is this one list with a horizontal rule in its second item, - or two lists separated by a horizontal rule? - - ``` markdown - * a - * * * * * - * b - ``` - -7. When list markers change from numbers to bullets, do we have - two lists or one? (The Markdown syntax description suggests two, - but the perl scripts and many other implementations produce one.) - - ``` markdown - 1. fee - 2. fie - - foe - - fum - ``` - -8. What are the precedence rules for the markers of inline structure? - For example, is the following a valid link, or does the code span - take precedence ? - - ``` markdown - [a backtick (`)](/url) and [another backtick (`)](/url). - ``` - -9. What are the precedence rules for markers of emphasis and strong - emphasis? For example, how should the following be parsed? - - ``` markdown - *foo *bar* baz* - ``` - -10. What are the precedence rules between block-level and inline-level - structure? For example, how should the following be parsed? - - ``` markdown - - `a long code span can contain a hyphen like this - - and it can screw things up` - ``` - -11. Can list items include headers? (`Markdown.pl` does not allow this, - but headers can occur in blockquotes.) - - ``` markdown - - # Heading - ``` - -12. Can link references be defined inside block quotes or list items? - - ``` markdown - > Blockquote [foo]. - > - > [foo]: /url - ``` - -13. If there are multiple definitions for the same reference, which takes - precedence? - - ``` markdown - [foo]: /url1 - [foo]: /url2 - - [foo][] - ``` - -In the absence of a spec, early implementers consulted `Markdown.pl` -to resolve these ambiguities. But `Markdown.pl` was quite buggy, and -gave manifestly bad results in many cases, so it was not a -satisfactory replacement for a spec. - -Because there is no unambiguous spec, implementations have diverged -considerably. As a result, users are often surprised to find that -a document that renders one way on one system (say, a github wiki) -renders differently on another (say, converting to docbook using -pandoc). To make matters worse, because nothing in Markdown counts -as a "syntax error," the divergence often isn't discovered right away. - -## About this document - -This document attempts to specify Markdown syntax unambiguously. -It contains many examples with side-by-side Markdown and -HTML. These are intended to double as conformance tests. An -accompanying script `spec_tests.py` can be used to run the tests -against any Markdown program: - - python test/spec_tests.py --spec spec.txt --program PROGRAM - -Since this document describes how Markdown is to be parsed into -an abstract syntax tree, it would have made sense to use an abstract -representation of the syntax tree instead of HTML. But HTML is capable -of representing the structural distinctions we need to make, and the -choice of HTML for the tests makes it possible to run the tests against -an implementation without writing an abstract syntax tree renderer. - -This document is generated from a text file, `spec.txt`, written -in Markdown with a small extension for the side-by-side tests. -The script `spec2md.pl` can be used to turn `spec.txt` into pandoc -Markdown, which can then be converted into other formats. - -In the examples, the `→` character is used to represent tabs. - -# Preprocessing - -A [line](@line) -is a sequence of zero or more [characters](#character) followed by a -line ending (CR, LF, or CRLF) or by the end of file. - -A [character](@character) is a unicode code point. -This spec does not specify an encoding; it thinks of lines as composed -of characters rather than bytes. A conforming parser may be limited -to a certain encoding. - -Tabs in lines are expanded to spaces, with a tab stop of 4 characters: - -. -→foo→baz→→bim -. -

    foo baz     bim
    -
    -. - -. - a→a - ὐ→a -. -
    a   a
    -ὐ   a
    -
    -. - -Line endings are replaced by newline characters (LF). - -A line containing no characters, or a line containing only spaces (after -tab expansion), is called a [blank line](@blank-line). - -For security reasons, a conforming parser must strip or replace the -Unicode character `U+0000`. - -# Blocks and inlines - -We can think of a document as a sequence of -[blocks](@block)---structural -elements like paragraphs, block quotations, -lists, headers, rules, and code blocks. Blocks can contain other -blocks, or they can contain [inline](@inline) content: -words, spaces, links, emphasized text, images, and inline code. - -## Precedence - -Indicators of block structure always take precedence over indicators -of inline structure. So, for example, the following is a list with -two items, not a list with one item containing a code span: - -. -- `one -- two` -. -
      -
    • `one
    • -
    • two`
    • -
    -. - -This means that parsing can proceed in two steps: first, the block -structure of the document can be discerned; second, text lines inside -paragraphs, headers, and other block constructs can be parsed for inline -structure. The second step requires information about link reference -definitions that will be available only at the end of the first -step. Note that the first step requires processing lines in sequence, -but the second can be parallelized, since the inline parsing of -one block element does not affect the inline parsing of any other. - -## Container blocks and leaf blocks - -We can divide blocks into two types: -[container blocks](@container-block), -which can contain other blocks, and [leaf blocks](@leaf-block), -which cannot. - -# Leaf blocks - -This section describes the different kinds of leaf block that make up a -Markdown document. - -## Horizontal rules - -A line consisting of 0-3 spaces of indentation, followed by a sequence -of three or more matching `-`, `_`, or `*` characters, each followed -optionally by any number of spaces, forms a [horizontal -rule](@horizontal-rule). - -. -*** ---- -___ -. -
    -
    -
    -. - -Wrong characters: - -. -+++ -. -

    +++

    -. - -. -=== -. -

    ===

    -. - -Not enough characters: - -. --- -** -__ -. -

    -- -** -__

    -. - -One to three spaces indent are allowed: - -. - *** - *** - *** -. -
    -
    -
    -. - -Four spaces is too many: - -. - *** -. -
    ***
    -
    -. - -. -Foo - *** -. -

    Foo -***

    -. - -More than three characters may be used: - -. -_____________________________________ -. -
    -. - -Spaces are allowed between the characters: - -. - - - - -. -
    -. - -. - ** * ** * ** * ** -. -
    -. - -. -- - - - -. -
    -. - -Spaces are allowed at the end: - -. -- - - - -. -
    -. - -However, no other characters may occur in the line: - -. -_ _ _ _ a - -a------ - ----a--- -. -

    _ _ _ _ a

    -

    a------

    -

    ---a---

    -. - -It is required that all of the non-space characters be the same. -So, this is not a horizontal rule: - -. - *-* -. -

    -

    -. - -Horizontal rules do not need blank lines before or after: - -. -- foo -*** -- bar -. -
      -
    • foo
    • -
    -
    -
      -
    • bar
    • -
    -. - -Horizontal rules can interrupt a paragraph: - -. -Foo -*** -bar -. -

    Foo

    -
    -

    bar

    -. - -If a line of dashes that meets the above conditions for being a -horizontal rule could also be interpreted as the underline of a [setext -header](#setext-header), the interpretation as a -[setext-header](#setext-header) takes precedence. Thus, for example, -this is a setext header, not a paragraph followed by a horizontal rule: - -. -Foo ---- -bar -. -

    Foo

    -

    bar

    -. - -When both a horizontal rule and a list item are possible -interpretations of a line, the horizontal rule is preferred: - -. -* Foo -* * * -* Bar -. -
      -
    • Foo
    • -
    -
    -
      -
    • Bar
    • -
    -. - -If you want a horizontal rule in a list item, use a different bullet: - -. -- Foo -- * * * -. -
      -
    • Foo
    • -
    • -
      -
    • -
    -. - -## ATX headers - -An [ATX header](@atx-header) -consists of a string of characters, parsed as inline content, between an -opening sequence of 1--6 unescaped `#` characters and an optional -closing sequence of any number of `#` characters. The opening sequence -of `#` characters cannot be followed directly by a nonspace character. -The optional closing sequence of `#`s must be preceded by a space and may be -followed by spaces only. The opening `#` character may be indented 0-3 -spaces. The raw contents of the header are stripped of leading and -trailing spaces before being parsed as inline content. The header level -is equal to the number of `#` characters in the opening sequence. - -Simple headers: - -. -# foo -## foo -### foo -#### foo -##### foo -###### foo -. -

    foo

    -

    foo

    -

    foo

    -

    foo

    -
    foo
    -
    foo
    -. - -More than six `#` characters is not a header: - -. -####### foo -. -

    ####### foo

    -. - -A space is required between the `#` characters and the header's -contents. Note that many implementations currently do not require -the space. However, the space was required by the [original ATX -implementation](http://www.aaronsw.com/2002/atx/atx.py), and it helps -prevent things like the following from being parsed as headers: - -. -#5 bolt -. -

    #5 bolt

    -. - -This is not a header, because the first `#` is escaped: - -. -\## foo -. -

    ## foo

    -. - -Contents are parsed as inlines: - -. -# foo *bar* \*baz\* -. -

    foo bar *baz*

    -. - -Leading and trailing blanks are ignored in parsing inline content: - -. -# foo -. -

    foo

    -. - -One to three spaces indentation are allowed: - -. - ### foo - ## foo - # foo -. -

    foo

    -

    foo

    -

    foo

    -. - -Four spaces are too much: - -. - # foo -. -
    # foo
    -
    -. - -. -foo - # bar -. -

    foo -# bar

    -. - -A closing sequence of `#` characters is optional: - -. -## foo ## - ### bar ### -. -

    foo

    -

    bar

    -. - -It need not be the same length as the opening sequence: - -. -# foo ################################## -##### foo ## -. -

    foo

    -
    foo
    -. - -Spaces are allowed after the closing sequence: - -. -### foo ### -. -

    foo

    -. - -A sequence of `#` characters with a nonspace character following it -is not a closing sequence, but counts as part of the contents of the -header: - -. -### foo ### b -. -

    foo ### b

    -. - -The closing sequence must be preceded by a space: - -. -# foo# -. -

    foo#

    -. - -Backslash-escaped `#` characters do not count as part -of the closing sequence: - -. -### foo \### -## foo #\## -# foo \# -. -

    foo ###

    -

    foo ###

    -

    foo #

    -. - -ATX headers need not be separated from surrounding content by blank -lines, and they can interrupt paragraphs: - -. -**** -## foo -**** -. -
    -

    foo

    -
    -. - -. -Foo bar -# baz -Bar foo -. -

    Foo bar

    -

    baz

    -

    Bar foo

    -. - -ATX headers can be empty: - -. -## -# -### ### -. -

    -

    -

    -. - -## Setext headers - -A [setext header](@setext-header) -consists of a line of text, containing at least one nonspace character, -with no more than 3 spaces indentation, followed by a [setext header -underline](#setext-header-underline). The line of text must be -one that, were it not followed by the setext header underline, -would be interpreted as part of a paragraph: it cannot be a code -block, header, blockquote, horizontal rule, or list. A [setext header -underline](@setext-header-underline) -is a sequence of `=` characters or a sequence of `-` characters, with no -more than 3 spaces indentation and any number of trailing -spaces. The header is a level 1 header if `=` characters are used, and -a level 2 header if `-` characters are used. The contents of the header -are the result of parsing the first line as Markdown inline content. - -In general, a setext header need not be preceded or followed by a -blank line. However, it cannot interrupt a paragraph, so when a -setext header comes after a paragraph, a blank line is needed between -them. - -Simple examples: - -. -Foo *bar* -========= - -Foo *bar* ---------- -. -

    Foo bar

    -

    Foo bar

    -. - -The underlining can be any length: - -. -Foo -------------------------- - -Foo -= -. -

    Foo

    -

    Foo

    -. - -The header content can be indented up to three spaces, and need -not line up with the underlining: - -. - Foo ---- - - Foo ------ - - Foo - === -. -

    Foo

    -

    Foo

    -

    Foo

    -. - -Four spaces indent is too much: - -. - Foo - --- - - Foo ---- -. -
    Foo
    ----
    -
    -Foo
    -
    -
    -. - -The setext header underline can be indented up to three spaces, and -may have trailing spaces: - -. -Foo - ---- -. -

    Foo

    -. - -Four spaces is too much: - -. -Foo - --- -. -

    Foo ----

    -. - -The setext header underline cannot contain internal spaces: - -. -Foo -= = - -Foo ---- - -. -

    Foo -= =

    -

    Foo

    -
    -. - -Trailing spaces in the content line do not cause a line break: - -. -Foo ------ -. -

    Foo

    -. - -Nor does a backslash at the end: - -. -Foo\ ----- -. -

    Foo\

    -. - -Since indicators of block structure take precedence over -indicators of inline structure, the following are setext headers: - -. -`Foo ----- -` - - -. -

    `Foo

    -

    `

    -

    <a title="a lot

    -

    of dashes"/>

    -. - -The setext header underline cannot be a [lazy continuation -line](#lazy-continuation-line) in a list item or block quote: - -. -> Foo ---- -. -
    -

    Foo

    -
    -
    -. - -. -- Foo ---- -. -
      -
    • Foo
    • -
    -
    -. - -A setext header cannot interrupt a paragraph: - -. -Foo -Bar ---- - -Foo -Bar -=== -. -

    Foo -Bar

    -
    -

    Foo -Bar -===

    -. - -But in general a blank line is not required before or after: - -. ---- -Foo ---- -Bar ---- -Baz -. -
    -

    Foo

    -

    Bar

    -

    Baz

    -. - -Setext headers cannot be empty: - -. - -==== -. -

    ====

    -. - -Setext header text lines must not be interpretable as block -constructs other than paragraphs. So, the line of dashes -in these examples gets interpreted as a horizontal rule: - -. ---- ---- -. -
    -
    -. - -. -- foo ------ -. -
      -
    • foo
    • -
    -
    -. - -. - foo ---- -. -
    foo
    -
    -
    -. - -. -> foo ------ -. -
    -

    foo

    -
    -
    -. - -If you want a header with `> foo` as its literal text, you can -use backslash escapes: - -. -\> foo ------- -. -

    > foo

    -. - -## Indented code blocks - -An [indented code block](@indented-code-block) -is composed of one or more -[indented chunks](#indented-chunk) separated by blank lines. -An [indented chunk](@indented-chunk) -is a sequence of non-blank lines, each indented four or more -spaces. An indented code block cannot interrupt a paragraph, so -if it occurs before or after a paragraph, there must be an -intervening blank line. The contents of the code block are -the literal contents of the lines, including trailing newlines, -minus four spaces of indentation. An indented code block has no -attributes. - -. - a simple - indented code block -. -
    a simple
    -  indented code block
    -
    -. - -The contents are literal text, and do not get parsed as Markdown: - -. -
    - *hi* - - - one -. -
    <a/>
    -*hi*
    -
    -- one
    -
    -. - -Here we have three chunks separated by blank lines: - -. - chunk1 - - chunk2 - - - - chunk3 -. -
    chunk1
    -
    -chunk2
    -
    -
    -
    -chunk3
    -
    -. - -Any initial spaces beyond four will be included in the content, even -in interior blank lines: - -. - chunk1 - - chunk2 -. -
    chunk1
    -  
    -  chunk2
    -
    -. - -An indented code block cannot interrupt a paragraph. (This -allows hanging indents and the like.) - -. -Foo - bar - -. -

    Foo -bar

    -. - -However, any non-blank line with fewer than four leading spaces ends -the code block immediately. So a paragraph may occur immediately -after indented code: - -. - foo -bar -. -
    foo
    -
    -

    bar

    -. - -And indented code can occur immediately before and after other kinds of -blocks: - -. -# Header - foo -Header ------- - foo ----- -. -

    Header

    -
    foo
    -
    -

    Header

    -
    foo
    -
    -
    -. - -The first line can be indented more than four spaces: - -. - foo - bar -. -
        foo
    -bar
    -
    -. - -Blank lines preceding or following an indented code block -are not included in it: - -. - - - foo - - -. -
    foo
    -
    -. - -Trailing spaces are included in the code block's content: - -. - foo -. -
    foo  
    -
    -. - - -## Fenced code blocks - -A [code fence](@code-fence) is a sequence -of at least three consecutive backtick characters (`` ` ``) or -tildes (`~`). (Tildes and backticks cannot be mixed.) -A [fenced code block](@fenced-code-block) -begins with a code fence, indented no more than three spaces. - -The line with the opening code fence may optionally contain some text -following the code fence; this is trimmed of leading and trailing -spaces and called the [info string](@info-string). -The info string may not contain any backtick -characters. (The reason for this restriction is that otherwise -some inline code would be incorrectly interpreted as the -beginning of a fenced code block.) - -The content of the code block consists of all subsequent lines, until -a closing [code fence](#code-fence) of the same type as the code block -began with (backticks or tildes), and with at least as many backticks -or tildes as the opening code fence. If the leading code fence is -indented N spaces, then up to N spaces of indentation are removed from -each line of the content (if present). (If a content line is not -indented, it is preserved unchanged. If it is indented less than N -spaces, all of the indentation is removed.) - -The closing code fence may be indented up to three spaces, and may be -followed only by spaces, which are ignored. If the end of the -containing block (or document) is reached and no closing code fence -has been found, the code block contains all of the lines after the -opening code fence until the end of the containing block (or -document). (An alternative spec would require backtracking in the -event that a closing code fence is not found. But this makes parsing -much less efficient, and there seems to be no real down side to the -behavior described here.) - -A fenced code block may interrupt a paragraph, and does not require -a blank line either before or after. - -The content of a code fence is treated as literal text, not parsed -as inlines. The first word of the info string is typically used to -specify the language of the code sample, and rendered in the `class` -attribute of the `code` tag. However, this spec does not mandate any -particular treatment of the info string. - -Here is a simple example with backticks: - -. -``` -< - > -``` -. -
    <
    - >
    -
    -. - -With tildes: - -. -~~~ -< - > -~~~ -. -
    <
    - >
    -
    -. - -The closing code fence must use the same character as the opening -fence: - -. -``` -aaa -~~~ -``` -. -
    aaa
    -~~~
    -
    -. - -. -~~~ -aaa -``` -~~~ -. -
    aaa
    -```
    -
    -. - -The closing code fence must be at least as long as the opening fence: - -. -```` -aaa -``` -`````` -. -
    aaa
    -```
    -
    -. - -. -~~~~ -aaa -~~~ -~~~~ -. -
    aaa
    -~~~
    -
    -. - -Unclosed code blocks are closed by the end of the document: - -. -``` -. -
    -. - -. -````` - -``` -aaa -. -
    
    -```
    -aaa
    -
    -. - -A code block can have all empty lines as its content: - -. -``` - - -``` -. -
    
    -  
    -
    -. - -A code block can be empty: - -. -``` -``` -. -
    -. - -Fences can be indented. If the opening fence is indented, -content lines will have equivalent opening indentation removed, -if present: - -. - ``` - aaa -aaa -``` -. -
    aaa
    -aaa
    -
    -. - -. - ``` -aaa - aaa -aaa - ``` -. -
    aaa
    -aaa
    -aaa
    -
    -. - -. - ``` - aaa - aaa - aaa - ``` -. -
    aaa
    - aaa
    -aaa
    -
    -. - -Four spaces indentation produces an indented code block: - -. - ``` - aaa - ``` -. -
    ```
    -aaa
    -```
    -
    -. - -Closing fences may be indented by 0-3 spaces, and their indentation -need not match that of the opening fence: - -. -``` -aaa - ``` -. -
    aaa
    -
    -. - -. - ``` -aaa - ``` -. -
    aaa
    -
    -. - -This is not a closing fence, because it is indented 4 spaces: - -. -``` -aaa - ``` -. -
    aaa
    -    ```
    -
    -. - - -Code fences (opening and closing) cannot contain internal spaces: - -. -``` ``` -aaa -. -

    -aaa

    -. - -. -~~~~~~ -aaa -~~~ ~~ -. -
    aaa
    -~~~ ~~
    -
    -. - -Fenced code blocks can interrupt paragraphs, and can be followed -directly by paragraphs, without a blank line between: - -. -foo -``` -bar -``` -baz -. -

    foo

    -
    bar
    -
    -

    baz

    -. - -Other blocks can also occur before and after fenced code blocks -without an intervening blank line: - -. -foo ---- -~~~ -bar -~~~ -# baz -. -

    foo

    -
    bar
    -
    -

    baz

    -. - -An [info string](#info-string) can be provided after the opening code fence. -Opening and closing spaces will be stripped, and the first word, prefixed -with `language-`, is used as the value for the `class` attribute of the -`code` element within the enclosing `pre` element. - -. -```ruby -def foo(x) - return 3 -end -``` -. -
    def foo(x)
    -  return 3
    -end
    -
    -. - -. -~~~~ ruby startline=3 $%@#$ -def foo(x) - return 3 -end -~~~~~~~ -. -
    def foo(x)
    -  return 3
    -end
    -
    -. - -. -````; -```` -. -
    -. - -Info strings for backtick code blocks cannot contain backticks: - -. -``` aa ``` -foo -. -

    aa -foo

    -. - -Closing code fences cannot have info strings: - -. -``` -``` aaa -``` -. -
    ``` aaa
    -
    -. - - -## HTML blocks - -An [HTML block tag](@html-block-tag) is -an [open tag](#open-tag) or [closing tag](#closing-tag) whose tag -name is one of the following (case-insensitive): -`article`, `header`, `aside`, `hgroup`, `blockquote`, `hr`, `iframe`, -`body`, `li`, `map`, `button`, `object`, `canvas`, `ol`, `caption`, -`output`, `col`, `p`, `colgroup`, `pre`, `dd`, `progress`, `div`, -`section`, `dl`, `table`, `td`, `dt`, `tbody`, `embed`, `textarea`, -`fieldset`, `tfoot`, `figcaption`, `th`, `figure`, `thead`, `footer`, -`tr`, `form`, `ul`, `h1`, `h2`, `h3`, `h4`, `h5`, `h6`, `video`, -`script`, `style`. - -An [HTML block](@html-block) begins with an -[HTML block tag](#html-block-tag), [HTML comment](#html-comment), -[processing instruction](#processing-instruction), -[declaration](#declaration), or [CDATA section](#cdata-section). -It ends when a [blank line](#blank-line) or the end of the -input is encountered. The initial line may be indented up to three -spaces, and subsequent lines may have any indentation. The contents -of the HTML block are interpreted as raw HTML, and will not be escaped -in HTML output. - -Some simple examples: - -. -
    - - - -
    - hi -
    - -okay. -. - - - - -
    - hi -
    -

    okay.

    -. - -. -
    - *hello* - -. -
    - *hello* - -. - -Here we have two HTML blocks with a Markdown paragraph between them: - -. -
    - -*Markdown* - -
    -. -
    -

    Markdown

    -
    -. - -In the following example, what looks like a Markdown code block -is actually part of the HTML block, which continues until a blank -line or the end of the document is reached: - -. -
    -``` c -int x = 33; -``` -. -
    -``` c -int x = 33; -``` -. - -A comment: - -. - -. - -. - -A processing instruction: - -. -'; -?> -. -'; -?> -. - -CDATA: - -. - -. - -. - -The opening tag can be indented 1-3 spaces, but not 4: - -. - - - -. - -
    <!-- foo -->
    -
    -. - -An HTML block can interrupt a paragraph, and need not be preceded -by a blank line. - -. -Foo -
    -bar -
    -. -

    Foo

    -
    -bar -
    -. - -However, a following blank line is always needed, except at the end of -a document: - -. -
    -bar -
    -*foo* -. -
    -bar -
    -*foo* -. - -An incomplete HTML block tag may also start an HTML block: - -. -
    The only restrictions are that block-level HTML elements — -> e.g. `
    `, ``, `
    `, `

    `, etc. — must be separated from -> surrounding content by blank lines, and the start and end tags of the -> block should not be indented with tabs or spaces. - -In some ways Gruber's rule is more restrictive than the one given -here: - -- It requires that an HTML block be preceded by a blank line. -- It does not allow the start tag to be indented. -- It requires a matching end tag, which it also does not allow to - be indented. - -Indeed, most Markdown implementations, including some of Gruber's -own perl implementations, do not impose these restrictions. - -There is one respect, however, in which Gruber's rule is more liberal -than the one given here, since it allows blank lines to occur inside -an HTML block. There are two reasons for disallowing them here. -First, it removes the need to parse balanced tags, which is -expensive and can require backtracking from the end of the document -if no matching end tag is found. Second, it provides a very simple -and flexible way of including Markdown content inside HTML tags: -simply separate the Markdown from the HTML using blank lines: - -. -

    - -*Emphasized* text. - -
    -. -
    -

    Emphasized text.

    -
    -. - -Compare: - -. -
    -*Emphasized* text. -
    -. -
    -*Emphasized* text. -
    -. - -Some Markdown implementations have adopted a convention of -interpreting content inside tags as text if the open tag has -the attribute `markdown=1`. The rule given above seems a simpler and -more elegant way of achieving the same expressive power, which is also -much simpler to parse. - -The main potential drawback is that one can no longer paste HTML -blocks into Markdown documents with 100% reliability. However, -*in most cases* this will work fine, because the blank lines in -HTML are usually followed by HTML block tags. For example: - -. -
    - - - - - - - -
    -Hi -
    -. - - - - -
    -Hi -
    -. - -Moreover, blank lines are usually not necessary and can be -deleted. The exception is inside `
    ` tags; here, one can
    -replace the blank lines with `
    ` entities.
    -
    -So there is no important loss of expressive power with the new rule.
    -
    -## Link reference definitions
    -
    -A [link reference definition](@link-reference-definition)
    -consists of a [link
    -label](#link-label), indented up to three spaces, followed
    -by a colon (`:`), optional blank space (including up to one
    -newline), a [link destination](#link-destination), optional
    -blank space (including up to one newline), and an optional [link
    -title](#link-title), which if it is present must be separated
    -from the [link destination](#link-destination) by whitespace.
    -No further non-space characters may occur on the line.
    -
    -A [link reference-definition](#link-reference-definition)
    -does not correspond to a structural element of a document.  Instead, it
    -defines a label which can be used in [reference links](#reference-link)
    -and reference-style [images](#image) elsewhere in the document.  [Link
    -reference definitions] can come either before or after the links that use
    -them.
    -
    -.
    -[foo]: /url "title"
    -
    -[foo]
    -.
    -

    foo

    -. - -. - [foo]: - /url - 'the title' - -[foo] -. -

    foo

    -. - -. -[Foo*bar\]]:my_(url) 'title (with parens)' - -[Foo*bar\]] -. -

    Foo*bar]

    -. - -. -[Foo bar]: - -'title' - -[Foo bar] -. -

    Foo bar

    -. - -The title may be omitted: - -. -[foo]: -/url - -[foo] -. -

    foo

    -. - -The link destination may not be omitted: - -. -[foo]: - -[foo] -. -

    [foo]:

    -

    [foo]

    -. - -A link can come before its corresponding definition: - -. -[foo] - -[foo]: url -. -

    foo

    -. - -If there are several matching definitions, the first one takes -precedence: - -. -[foo] - -[foo]: first -[foo]: second -. -

    foo

    -. - -As noted in the section on [Links], matching of labels is -case-insensitive (see [matches](#matches)). - -. -[FOO]: /url - -[Foo] -. -

    Foo

    -. - -. -[ΑΓΩ]: /φου - -[αγω] -. -

    αγω

    -. - -Here is a link reference definition with no corresponding link. -It contributes nothing to the document. - -. -[foo]: /url -. -. - -This is not a link reference definition, because there are -non-space characters after the title: - -. -[foo]: /url "title" ok -. -

    [foo]: /url "title" ok

    -. - -This is not a link reference definition, because it is indented -four spaces: - -. - [foo]: /url "title" - -[foo] -. -
    [foo]: /url "title"
    -
    -

    [foo]

    -. - -This is not a link reference definition, because it occurs inside -a code block: - -. -``` -[foo]: /url -``` - -[foo] -. -
    [foo]: /url
    -
    -

    [foo]

    -. - -A [link reference definition](#link-reference-definition) cannot -interrupt a paragraph. - -. -Foo -[bar]: /baz - -[bar] -. -

    Foo -[bar]: /baz

    -

    [bar]

    -. - -However, it can directly follow other block elements, such as headers -and horizontal rules, and it need not be followed by a blank line. - -. -# [Foo] -[foo]: /url -> bar -. -

    Foo

    -
    -

    bar

    -
    -. - -Several [link references](#link-reference) can occur one after another, -without intervening blank lines. - -. -[foo]: /foo-url "foo" -[bar]: /bar-url - "bar" -[baz]: /baz-url - -[foo], -[bar], -[baz] -. -

    foo, -bar, -baz

    -. - -[Link reference definitions](#link-reference-definition) can occur -inside block containers, like lists and block quotations. They -affect the entire document, not just the container in which they -are defined: - -. -[foo] - -> [foo]: /url -. -

    foo

    -
    -
    -. - - -## Paragraphs - -A sequence of non-blank lines that cannot be interpreted as other -kinds of blocks forms a [paragraph](@paragraph). -The contents of the paragraph are the result of parsing the -paragraph's raw content as inlines. The paragraph's raw content -is formed by concatenating the lines and removing initial and final -spaces. - -A simple example with two paragraphs: - -. -aaa - -bbb -. -

    aaa

    -

    bbb

    -. - -Paragraphs can contain multiple lines, but no blank lines: - -. -aaa -bbb - -ccc -ddd -. -

    aaa -bbb

    -

    ccc -ddd

    -. - -Multiple blank lines between paragraph have no effect: - -. -aaa - - -bbb -. -

    aaa

    -

    bbb

    -. - -Leading spaces are skipped: - -. - aaa - bbb -. -

    aaa -bbb

    -. - -Lines after the first may be indented any amount, since indented -code blocks cannot interrupt paragraphs. - -. -aaa - bbb - ccc -. -

    aaa -bbb -ccc

    -. - -However, the first line may be indented at most three spaces, -or an indented code block will be triggered: - -. - aaa -bbb -. -

    aaa -bbb

    -. - -. - aaa -bbb -. -
    aaa
    -
    -

    bbb

    -. - -Final spaces are stripped before inline parsing, so a paragraph -that ends with two or more spaces will not end with a [hard line -break](#hard-line-break): - -. -aaa -bbb -. -

    aaa
    -bbb

    -. - -## Blank lines - -[Blank lines](#blank-line) between block-level elements are ignored, -except for the role they play in determining whether a [list](#list) -is [tight](#tight) or [loose](#loose). - -Blank lines at the beginning and end of the document are also ignored. - -. - - -aaa - - -# aaa - - -. -

    aaa

    -

    aaa

    -. - - -# Container blocks - -A [container block](#container-block) is a block that has other -blocks as its contents. There are two basic kinds of container blocks: -[block quotes](#block-quote) and [list items](#list-item). -[Lists](#list) are meta-containers for [list items](#list-item). - -We define the syntax for container blocks recursively. The general -form of the definition is: - -> If X is a sequence of blocks, then the result of -> transforming X in such-and-such a way is a container of type Y -> with these blocks as its content. - -So, we explain what counts as a block quote or list item by explaining -how these can be *generated* from their contents. This should suffice -to define the syntax, although it does not give a recipe for *parsing* -these constructions. (A recipe is provided below in the section entitled -[A parsing strategy](#appendix-a-a-parsing-strategy).) - -## Block quotes - -A [block quote marker](@block-quote-marker) -consists of 0-3 spaces of initial indent, plus (a) the character `>` together -with a following space, or (b) a single character `>` not followed by a space. - -The following rules define [block quotes](@block-quote): - -1. **Basic case.** If a string of lines *Ls* constitute a sequence - of blocks *Bs*, then the result of prepending a [block quote - marker](#block-quote-marker) to the beginning of each line in *Ls* - is a [block quote](#block-quote) containing *Bs*. - -2. **Laziness.** If a string of lines *Ls* constitute a [block - quote](#block-quote) with contents *Bs*, then the result of deleting - the initial [block quote marker](#block-quote-marker) from one or - more lines in which the next non-space character after the [block - quote marker](#block-quote-marker) is [paragraph continuation - text](#paragraph-continuation-text) is a block quote with *Bs* as - its content. - [Paragraph continuation text](@paragraph-continuation-text) is text - that will be parsed as part of the content of a paragraph, but does - not occur at the beginning of the paragraph. - -3. **Consecutiveness.** A document cannot contain two [block - quotes](#block-quote) in a row unless there is a [blank - line](#blank-line) between them. - -Nothing else counts as a [block quote](#block-quote). - -Here is a simple example: - -. -> # Foo -> bar -> baz -. -
    -

    Foo

    -

    bar -baz

    -
    -. - -The spaces after the `>` characters can be omitted: - -. -># Foo ->bar -> baz -. -
    -

    Foo

    -

    bar -baz

    -
    -. - -The `>` characters can be indented 1-3 spaces: - -. - > # Foo - > bar - > baz -. -
    -

    Foo

    -

    bar -baz

    -
    -. - -Four spaces gives us a code block: - -. - > # Foo - > bar - > baz -. -
    > # Foo
    -> bar
    -> baz
    -
    -. - -The Laziness clause allows us to omit the `>` before a -paragraph continuation line: - -. -> # Foo -> bar -baz -. -
    -

    Foo

    -

    bar -baz

    -
    -. - -A block quote can contain some lazy and some non-lazy -continuation lines: - -. -> bar -baz -> foo -. -
    -

    bar -baz -foo

    -
    -. - -Laziness only applies to lines that are continuations of -paragraphs. Lines containing characters or indentation that indicate -block structure cannot be lazy. - -. -> foo ---- -. -
    -

    foo

    -
    -
    -. - -. -> - foo -- bar -. -
    -
      -
    • foo
    • -
    -
    -
      -
    • bar
    • -
    -. - -. -> foo - bar -. -
    -
    foo
    -
    -
    -
    bar
    -
    -. - -. -> ``` -foo -``` -. -
    -
    -
    -

    foo

    -
    -. - -A block quote can be empty: - -. -> -. -
    -
    -. - -. -> -> -> -. -
    -
    -. - -A block quote can have initial or final blank lines: - -. -> -> foo -> -. -
    -

    foo

    -
    -. - -A blank line always separates block quotes: - -. -> foo - -> bar -. -
    -

    foo

    -
    -
    -

    bar

    -
    -. - -(Most current Markdown implementations, including John Gruber's -original `Markdown.pl`, will parse this example as a single block quote -with two paragraphs. But it seems better to allow the author to decide -whether two block quotes or one are wanted.) - -Consecutiveness means that if we put these block quotes together, -we get a single block quote: - -. -> foo -> bar -. -
    -

    foo -bar

    -
    -. - -To get a block quote with two paragraphs, use: - -. -> foo -> -> bar -. -
    -

    foo

    -

    bar

    -
    -. - -Block quotes can interrupt paragraphs: - -. -foo -> bar -. -

    foo

    -
    -

    bar

    -
    -. - -In general, blank lines are not needed before or after block -quotes: - -. -> aaa -*** -> bbb -. -
    -

    aaa

    -
    -
    -
    -

    bbb

    -
    -. - -However, because of laziness, a blank line is needed between -a block quote and a following paragraph: - -. -> bar -baz -. -
    -

    bar -baz

    -
    -. - -. -> bar - -baz -. -
    -

    bar

    -
    -

    baz

    -. - -. -> bar -> -baz -. -
    -

    bar

    -
    -

    baz

    -. - -It is a consequence of the Laziness rule that any number -of initial `>`s may be omitted on a continuation line of a -nested block quote: - -. -> > > foo -bar -. -
    -
    -
    -

    foo -bar

    -
    -
    -
    -. - -. ->>> foo -> bar ->>baz -. -
    -
    -
    -

    foo -bar -baz

    -
    -
    -
    -. - -When including an indented code block in a block quote, -remember that the [block quote marker](#block-quote-marker) includes -both the `>` and a following space. So *five spaces* are needed after -the `>`: - -. -> code - -> not code -. -
    -
    code
    -
    -
    -
    -

    not code

    -
    -. - - -## List items - -A [list marker](@list-marker) is a -[bullet list marker](#bullet-list-marker) or an [ordered list -marker](#ordered-list-marker). - -A [bullet list marker](@bullet-list-marker) -is a `-`, `+`, or `*` character. - -An [ordered list marker](@ordered-list-marker) -is a sequence of one of more digits (`0-9`), followed by either a -`.` character or a `)` character. - -The following rules define [list items](@list-item): - -1. **Basic case.** If a sequence of lines *Ls* constitute a sequence of - blocks *Bs* starting with a non-space character and not separated - from each other by more than one blank line, and *M* is a list - marker *M* of width *W* followed by 0 < *N* < 5 spaces, then the result - of prepending *M* and the following spaces to the first line of - *Ls*, and indenting subsequent lines of *Ls* by *W + N* spaces, is a - list item with *Bs* as its contents. The type of the list item - (bullet or ordered) is determined by the type of its list marker. - If the list item is ordered, then it is also assigned a start - number, based on the ordered list marker. - -For example, let *Ls* be the lines - -. -A paragraph -with two lines. - - indented code - -> A block quote. -. -

    A paragraph -with two lines.

    -
    indented code
    -
    -
    -

    A block quote.

    -
    -. - -And let *M* be the marker `1.`, and *N* = 2. Then rule #1 says -that the following is an ordered list item with start number 1, -and the same contents as *Ls*: - -. -1. A paragraph - with two lines. - - indented code - - > A block quote. -. -
      -
    1. -

      A paragraph -with two lines.

      -
      indented code
      -
      -
      -

      A block quote.

      -
      -
    2. -
    -. - -The most important thing to notice is that the position of -the text after the list marker determines how much indentation -is needed in subsequent blocks in the list item. If the list -marker takes up two spaces, and there are three spaces between -the list marker and the next nonspace character, then blocks -must be indented five spaces in order to fall under the list -item. - -Here are some examples showing how far content must be indented to be -put under the list item: - -. -- one - - two -. -
      -
    • one
    • -
    -

    two

    -. - -. -- one - - two -. -
      -
    • -

      one

      -

      two

      -
    • -
    -. - -. - - one - - two -. -
      -
    • one
    • -
    -
     two
    -
    -. - -. - - one - - two -. -
      -
    • -

      one

      -

      two

      -
    • -
    -. - -It is tempting to think of this in terms of columns: the continuation -blocks must be indented at least to the column of the first nonspace -character after the list marker. However, that is not quite right. -The spaces after the list marker determine how much relative indentation -is needed. Which column this indentation reaches will depend on -how the list item is embedded in other constructions, as shown by -this example: - -. - > > 1. one ->> ->> two -. -
    -
    -
      -
    1. -

      one

      -

      two

      -
    2. -
    -
    -
    -. - -Here `two` occurs in the same column as the list marker `1.`, -but is actually contained in the list item, because there is -sufficent indentation after the last containing blockquote marker. - -The converse is also possible. In the following example, the word `two` -occurs far to the right of the initial text of the list item, `one`, but -it is not considered part of the list item, because it is not indented -far enough past the blockquote marker: - -. ->>- one ->> - > > two -. -
    -
    -
      -
    • one
    • -
    -

    two

    -
    -
    -. - -A list item may not contain blocks that are separated by more than -one blank line. Thus, two blank lines will end a list, unless the -two blanks are contained in a [fenced code block](#fenced-code-block). - -. -- foo - - bar - -- foo - - - bar - -- ``` - foo - - - bar - ``` -. -
      -
    • -

      foo

      -

      bar

      -
    • -
    • -

      foo

      -
    • -
    -

    bar

    -
      -
    • -
      foo
      -
      -
      -bar
      -
      -
    • -
    -. - -A list item may contain any kind of block: - -. -1. foo - - ``` - bar - ``` - - baz - - > bam -. -
      -
    1. -

      foo

      -
      bar
      -
      -

      baz

      -
      -

      bam

      -
      -
    2. -
    -. - -2. **Item starting with indented code.** If a sequence of lines *Ls* - constitute a sequence of blocks *Bs* starting with an indented code - block and not separated from each other by more than one blank line, - and *M* is a list marker *M* of width *W* followed by - one space, then the result of prepending *M* and the following - space to the first line of *Ls*, and indenting subsequent lines of - *Ls* by *W + 1* spaces, is a list item with *Bs* as its contents. - If a line is empty, then it need not be indented. The type of the - list item (bullet or ordered) is determined by the type of its list - marker. If the list item is ordered, then it is also assigned a - start number, based on the ordered list marker. - -An indented code block will have to be indented four spaces beyond -the edge of the region where text will be included in the list item. -In the following case that is 6 spaces: - -. -- foo - - bar -. -
      -
    • -

      foo

      -
      bar
      -
      -
    • -
    -. - -And in this case it is 11 spaces: - -. - 10. foo - - bar -. -
      -
    1. -

      foo

      -
      bar
      -
      -
    2. -
    -. - -If the *first* block in the list item is an indented code block, -then by rule #2, the contents must be indented *one* space after the -list marker: - -. - indented code - -paragraph - - more code -. -
    indented code
    -
    -

    paragraph

    -
    more code
    -
    -. - -. -1. indented code - - paragraph - - more code -. -
      -
    1. -
      indented code
      -
      -

      paragraph

      -
      more code
      -
      -
    2. -
    -. - -Note that an additional space indent is interpreted as space -inside the code block: - -. -1. indented code - - paragraph - - more code -. -
      -
    1. -
       indented code
      -
      -

      paragraph

      -
      more code
      -
      -
    2. -
    -. - -Note that rules #1 and #2 only apply to two cases: (a) cases -in which the lines to be included in a list item begin with a nonspace -character, and (b) cases in which they begin with an indented code -block. In a case like the following, where the first block begins with -a three-space indent, the rules do not allow us to form a list item by -indenting the whole thing and prepending a list marker: - -. - foo - -bar -. -

    foo

    -

    bar

    -. - -. -- foo - - bar -. -
      -
    • foo
    • -
    -

    bar

    -. - -This is not a significant restriction, because when a block begins -with 1-3 spaces indent, the indentation can always be removed without -a change in interpretation, allowing rule #1 to be applied. So, in -the above case: - -. -- foo - - bar -. -
      -
    • -

      foo

      -

      bar

      -
    • -
    -. - - -3. **Indentation.** If a sequence of lines *Ls* constitutes a list item - according to rule #1 or #2, then the result of indenting each line - of *L* by 1-3 spaces (the same for each line) also constitutes a - list item with the same contents and attributes. If a line is - empty, then it need not be indented. - -Indented one space: - -. - 1. A paragraph - with two lines. - - indented code - - > A block quote. -. -
      -
    1. -

      A paragraph -with two lines.

      -
      indented code
      -
      -
      -

      A block quote.

      -
      -
    2. -
    -. - -Indented two spaces: - -. - 1. A paragraph - with two lines. - - indented code - - > A block quote. -. -
      -
    1. -

      A paragraph -with two lines.

      -
      indented code
      -
      -
      -

      A block quote.

      -
      -
    2. -
    -. - -Indented three spaces: - -. - 1. A paragraph - with two lines. - - indented code - - > A block quote. -. -
      -
    1. -

      A paragraph -with two lines.

      -
      indented code
      -
      -
      -

      A block quote.

      -
      -
    2. -
    -. - -Four spaces indent gives a code block: - -. - 1. A paragraph - with two lines. - - indented code - - > A block quote. -. -
    1.  A paragraph
    -    with two lines.
    -
    -        indented code
    -
    -    > A block quote.
    -
    -. - - -4. **Laziness.** If a string of lines *Ls* constitute a [list - item](#list-item) with contents *Bs*, then the result of deleting - some or all of the indentation from one or more lines in which the - next non-space character after the indentation is - [paragraph continuation text](#paragraph-continuation-text) is a - list item with the same contents and attributes. The unindented - lines are called - [lazy continuation lines](@lazy-continuation-line). - -Here is an example with [lazy continuation -lines](#lazy-continuation-line): - -. - 1. A paragraph -with two lines. - - indented code - - > A block quote. -. -
      -
    1. -

      A paragraph -with two lines.

      -
      indented code
      -
      -
      -

      A block quote.

      -
      -
    2. -
    -. - -Indentation can be partially deleted: - -. - 1. A paragraph - with two lines. -. -
      -
    1. A paragraph -with two lines.
    2. -
    -. - -These examples show how laziness can work in nested structures: - -. -> 1. > Blockquote -continued here. -. -
    -
      -
    1. -
      -

      Blockquote -continued here.

      -
      -
    2. -
    -
    -. - -. -> 1. > Blockquote -> continued here. -. -
    -
      -
    1. -
      -

      Blockquote -continued here.

      -
      -
    2. -
    -
    -. - - -5. **That's all.** Nothing that is not counted as a list item by rules - #1--4 counts as a [list item](#list-item). - -The rules for sublists follow from the general rules above. A sublist -must be indented the same number of spaces a paragraph would need to be -in order to be included in the list item. - -So, in this case we need two spaces indent: - -. -- foo - - bar - - baz -. -
      -
    • foo -
        -
      • bar -
          -
        • baz
        • -
        -
      • -
      -
    • -
    -. - -One is not enough: - -. -- foo - - bar - - baz -. -
      -
    • foo
    • -
    • bar
    • -
    • baz
    • -
    -. - -Here we need four, because the list marker is wider: - -. -10) foo - - bar -. -
      -
    1. foo -
        -
      • bar
      • -
      -
    2. -
    -. - -Three is not enough: - -. -10) foo - - bar -. -
      -
    1. foo
    2. -
    -
      -
    • bar
    • -
    -. - -A list may be the first block in a list item: - -. -- - foo -. -
      -
    • -
        -
      • foo
      • -
      -
    • -
    -. - -. -1. - 2. foo -. -
      -
    1. -
        -
      • -
          -
        1. foo
        2. -
        -
      • -
      -
    2. -
    -. - -A list item may be empty: - -. -- foo -- -- bar -. -
      -
    • foo
    • -
    • -
    • bar
    • -
    -. - -. -- -. -
      -
    • -
    -. - -A list item can contain a header: - -. -- # Foo -- Bar - --- - baz -. -
      -
    • -

      Foo

      -
    • -
    • -

      Bar

      -baz
    • -
    -. - -### Motivation - -John Gruber's Markdown spec says the following about list items: - -1. "List markers typically start at the left margin, but may be indented - by up to three spaces. List markers must be followed by one or more - spaces or a tab." - -2. "To make lists look nice, you can wrap items with hanging indents.... - But if you don't want to, you don't have to." - -3. "List items may consist of multiple paragraphs. Each subsequent - paragraph in a list item must be indented by either 4 spaces or one - tab." - -4. "It looks nice if you indent every line of the subsequent paragraphs, - but here again, Markdown will allow you to be lazy." - -5. "To put a blockquote within a list item, the blockquote's `>` - delimiters need to be indented." - -6. "To put a code block within a list item, the code block needs to be - indented twice — 8 spaces or two tabs." - -These rules specify that a paragraph under a list item must be indented -four spaces (presumably, from the left margin, rather than the start of -the list marker, but this is not said), and that code under a list item -must be indented eight spaces instead of the usual four. They also say -that a block quote must be indented, but not by how much; however, the -example given has four spaces indentation. Although nothing is said -about other kinds of block-level content, it is certainly reasonable to -infer that *all* block elements under a list item, including other -lists, must be indented four spaces. This principle has been called the -*four-space rule*. - -The four-space rule is clear and principled, and if the reference -implementation `Markdown.pl` had followed it, it probably would have -become the standard. However, `Markdown.pl` allowed paragraphs and -sublists to start with only two spaces indentation, at least on the -outer level. Worse, its behavior was inconsistent: a sublist of an -outer-level list needed two spaces indentation, but a sublist of this -sublist needed three spaces. It is not surprising, then, that different -implementations of Markdown have developed very different rules for -determining what comes under a list item. (Pandoc and python-Markdown, -for example, stuck with Gruber's syntax description and the four-space -rule, while discount, redcarpet, marked, PHP Markdown, and others -followed `Markdown.pl`'s behavior more closely.) - -Unfortunately, given the divergences between implementations, there -is no way to give a spec for list items that will be guaranteed not -to break any existing documents. However, the spec given here should -correctly handle lists formatted with either the four-space rule or -the more forgiving `Markdown.pl` behavior, provided they are laid out -in a way that is natural for a human to read. - -The strategy here is to let the width and indentation of the list marker -determine the indentation necessary for blocks to fall under the list -item, rather than having a fixed and arbitrary number. The writer can -think of the body of the list item as a unit which gets indented to the -right enough to fit the list marker (and any indentation on the list -marker). (The laziness rule, #4, then allows continuation lines to be -unindented if needed.) - -This rule is superior, we claim, to any rule requiring a fixed level of -indentation from the margin. The four-space rule is clear but -unnatural. It is quite unintuitive that - -``` markdown -- foo - - bar - - - baz -``` - -should be parsed as two lists with an intervening paragraph, - -``` html -
      -
    • foo
    • -
    -

    bar

    -
      -
    • baz
    • -
    -``` - -as the four-space rule demands, rather than a single list, - -``` html -
      -
    • -

      foo

      -

      bar

      -
        -
      • baz
      • -
      -
    • -
    -``` - -The choice of four spaces is arbitrary. It can be learned, but it is -not likely to be guessed, and it trips up beginners regularly. - -Would it help to adopt a two-space rule? The problem is that such -a rule, together with the rule allowing 1--3 spaces indentation of the -initial list marker, allows text that is indented *less than* the -original list marker to be included in the list item. For example, -`Markdown.pl` parses - -``` markdown - - one - - two -``` - -as a single list item, with `two` a continuation paragraph: - -``` html -
      -
    • -

      one

      -

      two

      -
    • -
    -``` - -and similarly - -``` markdown -> - one -> -> two -``` - -as - -``` html -
    -
      -
    • -

      one

      -

      two

      -
    • -
    -
    -``` - -This is extremely unintuitive. - -Rather than requiring a fixed indent from the margin, we could require -a fixed indent (say, two spaces, or even one space) from the list marker (which -may itself be indented). This proposal would remove the last anomaly -discussed. Unlike the spec presented above, it would count the following -as a list item with a subparagraph, even though the paragraph `bar` -is not indented as far as the first paragraph `foo`: - -``` markdown - 10. foo - - bar -``` - -Arguably this text does read like a list item with `bar` as a subparagraph, -which may count in favor of the proposal. However, on this proposal indented -code would have to be indented six spaces after the list marker. And this -would break a lot of existing Markdown, which has the pattern: - -``` markdown -1. foo - - indented code -``` - -where the code is indented eight spaces. The spec above, by contrast, will -parse this text as expected, since the code block's indentation is measured -from the beginning of `foo`. - -The one case that needs special treatment is a list item that *starts* -with indented code. How much indentation is required in that case, since -we don't have a "first paragraph" to measure from? Rule #2 simply stipulates -that in such cases, we require one space indentation from the list marker -(and then the normal four spaces for the indented code). This will match the -four-space rule in cases where the list marker plus its initial indentation -takes four spaces (a common case), but diverge in other cases. - -## Lists - -A [list](@list) is a sequence of one or more -list items [of the same type](#of-the-same-type). The list items -may be separated by single [blank lines](#blank-line), but two -blank lines end all containing lists. - -Two list items are [of the same type](@of-the-same-type) -if they begin with a [list -marker](#list-marker) of the same type. Two list markers are of the -same type if (a) they are bullet list markers using the same character -(`-`, `+`, or `*`) or (b) they are ordered list numbers with the same -delimiter (either `.` or `)`). - -A list is an [ordered list](@ordered-list) -if its constituent list items begin with -[ordered list markers](#ordered-list-marker), and a [bullet -list](@bullet-list) if its constituent list -items begin with [bullet list markers](#bullet-list-marker). - -The [start number](@start-number) -of an [ordered list](#ordered-list) is determined by the list number of -its initial list item. The numbers of subsequent list items are -disregarded. - -A list is [loose](@loose) if it any of its constituent -list items are separated by blank lines, or if any of its constituent -list items directly contain two block-level elements with a blank line -between them. Otherwise a list is [tight](@tight). -(The difference in HTML output is that paragraphs in a loose list are -wrapped in `

    ` tags, while paragraphs in a tight list are not.) - -Changing the bullet or ordered list delimiter starts a new list: - -. -- foo -- bar -+ baz -. -

      -
    • foo
    • -
    • bar
    • -
    -
      -
    • baz
    • -
    -. - -. -1. foo -2. bar -3) baz -. -
      -
    1. foo
    2. -
    3. bar
    4. -
    -
      -
    1. baz
    2. -
    -. - -In CommonMark, a list can interrupt a paragraph. That is, -no blank line is needed to separate a paragraph from a following -list: - -. -Foo -- bar -- baz -. -

    Foo

    -
      -
    • bar
    • -
    • baz
    • -
    -. - -`Markdown.pl` does not allow this, through fear of triggering a list -via a numeral in a hard-wrapped line: - -. -The number of windows in my house is -14. The number of doors is 6. -. -

    The number of windows in my house is

    -
      -
    1. The number of doors is 6.
    2. -
    -. - -Oddly, `Markdown.pl` *does* allow a blockquote to interrupt a paragraph, -even though the same considerations might apply. We think that the two -cases should be treated the same. Here are two reasons for allowing -lists to interrupt paragraphs: - -First, it is natural and not uncommon for people to start lists without -blank lines: - - I need to buy - - new shoes - - a coat - - a plane ticket - -Second, we are attracted to a - -> [principle of uniformity](@principle-of-uniformity): -> if a span of text has a certain -> meaning, it will continue to have the same meaning when put into a list -> item. - -(Indeed, the spec for [list items](#list-item) presupposes this.) -This principle implies that if - - * I need to buy - - new shoes - - a coat - - a plane ticket - -is a list item containing a paragraph followed by a nested sublist, -as all Markdown implementations agree it is (though the paragraph -may be rendered without `

    ` tags, since the list is "tight"), -then - - I need to buy - - new shoes - - a coat - - a plane ticket - -by itself should be a paragraph followed by a nested sublist. - -Our adherence to the [principle of uniformity](#principle-of-uniformity) -thus inclines us to think that there are two coherent packages: - -1. Require blank lines before *all* lists and blockquotes, - including lists that occur as sublists inside other list items. - -2. Require blank lines in none of these places. - -[reStructuredText](http://docutils.sourceforge.net/rst.html) takes -the first approach, for which there is much to be said. But the second -seems more consistent with established practice with Markdown. - -There can be blank lines between items, but two blank lines end -a list: - -. -- foo - -- bar - - -- baz -. -

      -
    • -

      foo

      -
    • -
    • -

      bar

      -
    • -
    -
      -
    • baz
    • -
    -. - -As illustrated above in the section on [list items](#list-item), -two blank lines between blocks *within* a list item will also end a -list: - -. -- foo - - - bar -- baz -. -
      -
    • foo
    • -
    -

    bar

    -
      -
    • baz
    • -
    -. - -Indeed, two blank lines will end *all* containing lists: - -. -- foo - - bar - - baz - - - bim -. -
      -
    • foo -
        -
      • bar -
          -
        • baz
        • -
        -
      • -
      -
    • -
    -
      bim
    -
    -. - -Thus, two blank lines can be used to separate consecutive lists of -the same type, or to separate a list from an indented code block -that would otherwise be parsed as a subparagraph of the final list -item: - -. -- foo -- bar - - -- baz -- bim -. -
      -
    • foo
    • -
    • bar
    • -
    -
      -
    • baz
    • -
    • bim
    • -
    -. - -. -- foo - - notcode - -- foo - - - code -. -
      -
    • -

      foo

      -

      notcode

      -
    • -
    • -

      foo

      -
    • -
    -
    code
    -
    -. - -List items need not be indented to the same level. The following -list items will be treated as items at the same list level, -since none is indented enough to belong to the previous list -item: - -. -- a - - b - - c - - d - - e - - f -- g -. -
      -
    • a
    • -
    • b
    • -
    • c
    • -
    • d
    • -
    • e
    • -
    • f
    • -
    • g
    • -
    -. - -This is a loose list, because there is a blank line between -two of the list items: - -. -- a -- b - -- c -. -
      -
    • -

      a

      -
    • -
    • -

      b

      -
    • -
    • -

      c

      -
    • -
    -. - -So is this, with a empty second item: - -. -* a -* - -* c -. -
      -
    • -

      a

      -
    • -
    • -
    • -

      c

      -
    • -
    -. - -These are loose lists, even though there is no space between the items, -because one of the items directly contains two block-level elements -with a blank line between them: - -. -- a -- b - - c -- d -. -
      -
    • -

      a

      -
    • -
    • -

      b

      -

      c

      -
    • -
    • -

      d

      -
    • -
    -. - -. -- a -- b - - [ref]: /url -- d -. -
      -
    • -

      a

      -
    • -
    • -

      b

      -
    • -
    • -

      d

      -
    • -
    -. - -This is a tight list, because the blank lines are in a code block: - -. -- a -- ``` - b - - - ``` -- c -. -
      -
    • a
    • -
    • -
      b
      -
      -
      -
      -
    • -
    • c
    • -
    -. - -This is a tight list, because the blank line is between two -paragraphs of a sublist. So the sublist is loose while -the outer list is tight: - -. -- a - - b - - c -- d -. -
      -
    • a -
        -
      • -

        b

        -

        c

        -
      • -
      -
    • -
    • d
    • -
    -. - -This is a tight list, because the blank line is inside the -block quote: - -. -* a - > b - > -* c -. -
      -
    • a -
      -

      b

      -
      -
    • -
    • c
    • -
    -. - -This list is tight, because the consecutive block elements -are not separated by blank lines: - -. -- a - > b - ``` - c - ``` -- d -. -
      -
    • a -
      -

      b

      -
      -
      c
      -
      -
    • -
    • d
    • -
    -. - -A single-paragraph list is tight: - -. -- a -. -
      -
    • a
    • -
    -. - -. -- a - - b -. -
      -
    • a -
        -
      • b
      • -
      -
    • -
    -. - -Here the outer list is loose, the inner list tight: - -. -* foo - * bar - - baz -. -
      -
    • -

      foo

      -
        -
      • bar
      • -
      -

      baz

      -
    • -
    -. - -. -- a - - b - - c - -- d - - e - - f -. -
      -
    • -

      a

      -
        -
      • b
      • -
      • c
      • -
      -
    • -
    • -

      d

      -
        -
      • e
      • -
      • f
      • -
      -
    • -
    -. - -# Inlines - -Inlines are parsed sequentially from the beginning of the character -stream to the end (left to right, in left-to-right languages). -Thus, for example, in - -. -`hi`lo` -. -

    hilo`

    -. - -`hi` is parsed as code, leaving the backtick at the end as a literal -backtick. - -## Backslash escapes - -Any ASCII punctuation character may be backslash-escaped: - -. -\!\"\#\$\%\&\'\(\)\*\+\,\-\.\/\:\;\<\=\>\?\@\[\\\]\^\_\`\{\|\}\~ -. -

    !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~

    -. - -Backslashes before other characters are treated as literal -backslashes: - -. -\→\A\a\ \3\φ\« -. -

    \ \A\a\ \3\φ\«

    -. - -Escaped characters are treated as regular characters and do -not have their usual Markdown meanings: - -. -\*not emphasized* -\
    not a tag -\[not a link](/foo) -\`not code` -1\. not a list -\* not a list -\# not a header -\[foo]: /url "not a reference" -. -

    *not emphasized* -<br/> not a tag -[not a link](/foo) -`not code` -1. not a list -* not a list -# not a header -[foo]: /url "not a reference"

    -. - -If a backslash is itself escaped, the following character is not: - -. -\\*emphasis* -. -

    \emphasis

    -. - -A backslash at the end of the line is a [hard line -break](#hard-line-break): - -. -foo\ -bar -. -

    foo
    -bar

    -. - -Backslash escapes do not work in code blocks, code spans, autolinks, or -raw HTML: - -. -`` \[\` `` -. -

    \[\`

    -. - -. - \[\] -. -
    \[\]
    -
    -. - -. -~~~ -\[\] -~~~ -. -
    \[\]
    -
    -. - -. - -. -

    http://example.com?find=\*

    -. - -. - -. -

    -. - -But they work in all other contexts, including URLs and link titles, -link references, and info strings in [fenced code -blocks](#fenced-code-block): - -. -[foo](/bar\* "ti\*tle") -. -

    foo

    -. - -. -[foo] - -[foo]: /bar\* "ti\*tle" -. -

    foo

    -. - -. -``` foo\+bar -foo -``` -. -
    foo
    -
    -. - - -## Entities - -With the goal of making this standard as HTML-agnostic as possible, all -valid HTML entities in any context are recognized as such and -converted into unicode characters before they are stored in the AST. - -This allows implementations that target HTML output to trivially escape -the entities when generating HTML, and simplifies the job of -implementations targetting other languages, as these will only need to -handle the unicode chars and need not be HTML-entity aware. - -[Named entities](@name-entities) consist of `&` -+ any of the valid HTML5 entity names + `;`. The -[following document](http://www.whatwg.org/specs/web-apps/current-work/multipage/entities.json) -is used as an authoritative source of the valid entity names and their -corresponding codepoints. - -Conforming implementations that target HTML don't need to generate -entities for all the valid named entities that exist, with the exception -of `"` (`"`), `&` (`&`), `<` (`<`) and `>` (`>`), which -always need to be written as entities for security reasons. - -. -  & © Æ Ď ¾ ℋ ⅆ ∲ -. -

      & © Æ Ď ¾ ℋ ⅆ ∲

    -. - -[Decimal entities](@decimal-entities) -consist of `&#` + a string of 1--8 arabic digits + `;`. Again, these -entities need to be recognised and tranformed into their corresponding -UTF8 codepoints. Invalid Unicode codepoints will be written as the -"unknown codepoint" character (`0xFFFD`) - -. -# Ӓ Ϡ � -. -

    # Ӓ Ϡ �

    -. - -[Hexadecimal entities](@hexadecimal-entities) -consist of `&#` + either `X` or `x` + a string of 1-8 hexadecimal digits -+ `;`. They will also be parsed and turned into their corresponding UTF8 values in the AST. - -. -" ആ ಫ -. -

    " ആ ಫ

    -. - -Here are some nonentities: - -. -  &x; &#; &#x; &ThisIsWayTooLongToBeAnEntityIsntIt; &hi?; -. -

    &nbsp &x; &#; &#x; &ThisIsWayTooLongToBeAnEntityIsntIt; &hi?;

    -. - -Although HTML5 does accept some entities without a trailing semicolon -(such as `©`), these are not recognized as entities here, because it -makes the grammar too ambiguous: - -. -© -. -

    &copy

    -. - -Strings that are not on the list of HTML5 named entities are not -recognized as entities either: - -. -&MadeUpEntity; -. -

    &MadeUpEntity;

    -. - -Entities are recognized in any context besides code spans or -code blocks, including raw HTML, URLs, [link titles](#link-title), and -[fenced code block](#fenced-code-block) info strings: - -. - -. -

    -. - -. -[foo](/föö "föö") -. -

    foo

    -. - -. -[foo] - -[foo]: /föö "föö" -. -

    foo

    -. - -. -``` föö -foo -``` -. -
    foo
    -
    -. - -Entities are treated as literal text in code spans and code blocks: - -. -`föö` -. -

    f&ouml;&ouml;

    -. - -. - föfö -. -
    f&ouml;f&ouml;
    -
    -. - -## Code span - -A [backtick string](@backtick-string) -is a string of one or more backtick characters (`` ` ``) that is neither -preceded nor followed by a backtick. - -A [code span](@code-span) begins with a backtick string and ends with a backtick -string of equal length. The contents of the code span are the -characters between the two backtick strings, with leading and trailing -spaces and newlines removed, and consecutive spaces and newlines -collapsed to single spaces. - -This is a simple code span: - -. -`foo` -. -

    foo

    -. - -Here two backticks are used, because the code contains a backtick. -This example also illustrates stripping of leading and trailing spaces: - -. -`` foo ` bar `` -. -

    foo ` bar

    -. - -This example shows the motivation for stripping leading and trailing -spaces: - -. -` `` ` -. -

    ``

    -. - -Newlines are treated like spaces: - -. -`` -foo -`` -. -

    foo

    -. - -Interior spaces and newlines are collapsed into single spaces, just -as they would be by a browser: - -. -`foo bar - baz` -. -

    foo bar baz

    -. - -Q: Why not just leave the spaces, since browsers will collapse them -anyway? A: Because we might be targeting a non-HTML format, and we -shouldn't rely on HTML-specific rendering assumptions. - -(Existing implementations differ in their treatment of internal -spaces and newlines. Some, including `Markdown.pl` and -`showdown`, convert an internal newline into a `
    ` tag. -But this makes things difficult for those who like to hard-wrap -their paragraphs, since a line break in the midst of a code -span will cause an unintended line break in the output. Others -just leave internal spaces as they are, which is fine if only -HTML is being targeted.) - -. -`foo `` bar` -. -

    foo `` bar

    -. - -Note that backslash escapes do not work in code spans. All backslashes -are treated literally: - -. -`foo\`bar` -. -

    foo\bar`

    -. - -Backslash escapes are never needed, because one can always choose a -string of *n* backtick characters as delimiters, where the code does -not contain any strings of exactly *n* backtick characters. - -Code span backticks have higher precedence than any other inline -constructs except HTML tags and autolinks. Thus, for example, this is -not parsed as emphasized text, since the second `*` is part of a code -span: - -. -*foo`*` -. -

    *foo*

    -. - -And this is not parsed as a link: - -. -[not a `link](/foo`) -. -

    [not a link](/foo)

    -. - -But this is a link: - -. -` -. -

    http://foo.bar.`baz`

    -. - -And this is an HTML tag: - -. -` -. -

    `

    -. - -When a backtick string is not closed by a matching backtick string, -we just have literal backticks: - -. -```foo`` -. -

    ```foo``

    -. - -. -`foo -. -

    `foo

    -. - -## Emphasis and strong emphasis - -John Gruber's original [Markdown syntax -description](http://daringfireball.net/projects/markdown/syntax#em) says: - -> Markdown treats asterisks (`*`) and underscores (`_`) as indicators of -> emphasis. Text wrapped with one `*` or `_` will be wrapped with an HTML -> `` tag; double `*`'s or `_`'s will be wrapped with an HTML `` -> tag. - -This is enough for most users, but these rules leave much undecided, -especially when it comes to nested emphasis. The original -`Markdown.pl` test suite makes it clear that triple `***` and -`___` delimiters can be used for strong emphasis, and most -implementations have also allowed the following patterns: - -``` markdown -***strong emph*** -***strong** in emph* -***emph* in strong** -**in strong *emph*** -*in emph **strong*** -``` - -The following patterns are less widely supported, but the intent -is clear and they are useful (especially in contexts like bibliography -entries): - -``` markdown -*emph *with emph* in it* -**strong **with strong** in it** -``` - -Many implementations have also restricted intraword emphasis to -the `*` forms, to avoid unwanted emphasis in words containing -internal underscores. (It is best practice to put these in code -spans, but users often do not.) - -``` markdown -internal emphasis: foo*bar*baz -no emphasis: foo_bar_baz -``` - -The following rules capture all of these patterns, while allowing -for efficient parsing strategies that do not backtrack: - -1. A single `*` character [can open emphasis](@can-open-emphasis) - iff it is not followed by - whitespace. - -2. A single `_` character [can open emphasis](#can-open-emphasis) iff - it is not followed by whitespace and it is not preceded by an - ASCII alphanumeric character. - -3. A single `*` character [can close emphasis](@can-close-emphasis) - iff it is not preceded by whitespace. - -4. A single `_` character [can close emphasis](#can-close-emphasis) iff - it is not preceded by whitespace and it is not followed by an - ASCII alphanumeric character. - -5. A double `**` [can open strong emphasis](@can-open-strong-emphasis) - iff it is not followed by - whitespace. - -6. A double `__` [can open strong emphasis](#can-open-strong-emphasis) - iff it is not followed by whitespace and it is not preceded by an - ASCII alphanumeric character. - -7. A double `**` [can close strong emphasis](@can-close-strong-emphasis) - iff it is not preceded by - whitespace. - -8. A double `__` [can close strong emphasis](#can-close-strong-emphasis) - iff it is not preceded by whitespace and it is not followed by an - ASCII alphanumeric character. - -9. Emphasis begins with a delimiter that [can open - emphasis](#can-open-emphasis) and ends with a delimiter that [can close - emphasis](#can-close-emphasis), and that uses the same - character (`_` or `*`) as the opening delimiter. There must - be a nonempty sequence of inlines between the open delimiter - and the closing delimiter; these form the contents of the emphasis - inline. - -10. Strong emphasis begins with a delimiter that [can open strong - emphasis](#can-open-strong-emphasis) and ends with a delimiter that - [can close strong emphasis](#can-close-strong-emphasis), and that - uses the same character (`_` or `*`) as the opening delimiter. - There must be a nonempty sequence of inlines between the open - delimiter and the closing delimiter; these form the contents of - the strong emphasis inline. - -11. A literal `*` character cannot occur at the beginning or end of - `*`-delimited emphasis or `**`-delimited strong emphasis, unless it - is backslash-escaped. - -12. A literal `_` character cannot occur at the beginning or end of - `_`-delimited emphasis or `__`-delimited strong emphasis, unless it - is backslash-escaped. - -Where rules 1--12 above are compatible with multiple parsings, -the following principles resolve ambiguity: - -13. The number of nestings should be minimized. Thus, for example, - an interpretation `...` is always preferred to - `...`. - -14. An interpretation `...` is always - preferred to `..`. - -15. When two potential emphasis or strong emphasis spans overlap, - so that the second begins before the first ends and ends after - the first ends, the first is preferred. Thus, for example, - `*foo _bar* baz_` is parsed as `foo _bar baz_` rather - than `*foo bar* baz`. For the same reason, - `**foo*bar**` is parsed as `foobar*` - rather than `foo*bar`. - -16. When there are two potential emphasis or strong emphasis spans - with the same closing delimiter, the shorter one (the one that - opens later) is preferred. Thus, for example, - `**foo **bar baz**` is parsed as `**foo bar baz` - rather than `foo **bar baz`. - -17. Inline code spans, links, images, and HTML tags group more tightly - than emphasis. So, when there is a choice between an interpretation - that contains one of these elements and one that does not, the - former always wins. Thus, for example, `*[foo*](bar)` is - parsed as `*
    foo*` rather than as - `[foo](bar)`. - -These rules can be illustrated through a series of examples. - -Rule 1: - -. -*foo bar* -. -

    foo bar

    -. - -This is not emphasis, because the opening `*` is followed by -whitespace: - -. -a * foo bar* -. -

    a * foo bar*

    -. - -Intraword emphasis with `*` is permitted: - -. -foo*bar* -. -

    foobar

    -. - -. -5*6*78 -. -

    5678

    -. - -Rule 2: - -. -_foo bar_ -. -

    foo bar

    -. - -This is not emphasis, because the opening `*` is followed by -whitespace: - -. -_ foo bar_ -. -

    _ foo bar_

    -. - -Emphasis with `_` is not allowed inside ASCII words: - -. -foo_bar_ -. -

    foo_bar_

    -. - -. -5_6_78 -. -

    5_6_78

    -. - -But it is permitted inside non-ASCII words: - -. -пристаням_стремятся_ -. -

    пристанямстремятся

    -. - -Rule 3: - -This is not emphasis, because the closing `*` is preceded by -whitespace: - -. -*foo bar * -. -

    *foo bar *

    -. - -Intraword emphasis with `*` is allowed: - -. -*foo*bar -. -

    foobar

    -. - - -Rule 4: - -This is not emphasis, because the closing `_` is preceded by -whitespace: - -. -_foo bar _ -. -

    _foo bar _

    -. - -Intraword emphasis: - -. -_foo_bar -. -

    _foo_bar

    -. - -. -_пристаням_стремятся -. -

    пристанямстремятся

    -. - -. -_foo_bar_baz_ -. -

    foo_bar_baz

    -. - -Rule 5: - -. -**foo bar** -. -

    foo bar

    -. - -This is not strong emphasis, because the opening delimiter is -followed by whitespace: - -. -** foo bar** -. -

    ** foo bar**

    -. - -Intraword strong emphasis with `**` is permitted: - -. -foo**bar** -. -

    foobar

    -. - -Rule 6: - -. -__foo bar__ -. -

    foo bar

    -. - -This is not strong emphasis, because the opening delimiter is -followed by whitespace: - -. -__ foo bar__ -. -

    __ foo bar__

    -. - -Intraword emphasis examples: - -. -foo__bar__ -. -

    foo__bar__

    -. - -. -5__6__78 -. -

    5__6__78

    -. - -. -пристаням__стремятся__ -. -

    пристанямстремятся

    -. - -. -__foo, __bar__, baz__ -. -

    foo, bar, baz

    -. - -Rule 7: - -This is not strong emphasis, because the closing delimiter is preceded -by whitespace: - -. -**foo bar ** -. -

    **foo bar **

    -. - -(Nor can it be interpreted as an emphasized `*foo bar *`, because of -Rule 11.) - -Intraword emphasis: - -. -**foo**bar -. -

    foobar

    -. - -Rule 8: - -This is not strong emphasis, because the closing delimiter is -preceded by whitespace: - -. -__foo bar __ -. -

    __foo bar __

    -. - -Intraword strong emphasis examples: - -. -__foo__bar -. -

    __foo__bar

    -. - -. -__пристаням__стремятся -. -

    пристанямстремятся

    -. - -. -__foo__bar__baz__ -. -

    foo__bar__baz

    -. - -Rule 9: - -Any nonempty sequence of inline elements can be the contents of an -emphasized span. - -. -*foo [bar](/url)* -. -

    foo bar

    -. - -. -*foo -bar* -. -

    foo -bar

    -. - -In particular, emphasis and strong emphasis can be nested -inside emphasis: - -. -_foo __bar__ baz_ -. -

    foo bar baz

    -. - -. -_foo _bar_ baz_ -. -

    foo bar baz

    -. - -. -__foo_ bar_ -. -

    foo bar

    -. - -. -*foo *bar** -. -

    foo bar

    -. - -. -*foo **bar** baz* -. -

    foo bar baz

    -. - -But note: - -. -*foo**bar**baz* -. -

    foobarbaz

    -. - -The difference is that in the preceding case, -the internal delimiters [can close emphasis](#can-close-emphasis), -while in the cases with spaces, they cannot. - -. -***foo** bar* -. -

    foo bar

    -. - -. -*foo **bar*** -. -

    foo bar

    -. - -Note, however, that in the following case we get no strong -emphasis, because the opening delimiter is closed by the first -`*` before `bar`: - -. -*foo**bar*** -. -

    foobar**

    -. - - -Indefinite levels of nesting are possible: - -. -*foo **bar *baz* bim** bop* -. -

    foo bar baz bim bop

    -. - -. -*foo [*bar*](/url)* -. -

    foo bar

    -. - -There can be no empty emphasis or strong emphasis: - -. -** is not an empty emphasis -. -

    ** is not an empty emphasis

    -. - -. -**** is not an empty strong emphasis -. -

    **** is not an empty strong emphasis

    -. - - -Rule 10: - -Any nonempty sequence of inline elements can be the contents of an -strongly emphasized span. - -. -**foo [bar](/url)** -. -

    foo bar

    -. - -. -**foo -bar** -. -

    foo -bar

    -. - -In particular, emphasis and strong emphasis can be nested -inside strong emphasis: - -. -__foo _bar_ baz__ -. -

    foo bar baz

    -. - -. -__foo __bar__ baz__ -. -

    foo bar baz

    -. - -. -____foo__ bar__ -. -

    foo bar

    -. - -. -**foo **bar**** -. -

    foo bar

    -. - -. -**foo *bar* baz** -. -

    foo bar baz

    -. - -But note: - -. -**foo*bar*baz** -. -

    foobarbaz**

    -. - -The difference is that in the preceding case, -the internal delimiters [can close emphasis](#can-close-emphasis), -while in the cases with spaces, they cannot. - -. -***foo* bar** -. -

    foo bar

    -. - -. -**foo *bar*** -. -

    foo bar

    -. - -Indefinite levels of nesting are possible: - -. -**foo *bar **baz** -bim* bop** -. -

    foo bar baz -bim bop

    -. - -. -**foo [*bar*](/url)** -. -

    foo bar

    -. - -There can be no empty emphasis or strong emphasis: - -. -__ is not an empty emphasis -. -

    __ is not an empty emphasis

    -. - -. -____ is not an empty strong emphasis -. -

    ____ is not an empty strong emphasis

    -. - - -Rule 11: - -. -foo *** -. -

    foo ***

    -. - -. -foo *\** -. -

    foo *

    -. - -. -foo *_* -. -

    foo _

    -. - -. -foo ***** -. -

    foo *****

    -. - -. -foo **\*** -. -

    foo *

    -. - -. -foo **_** -. -

    foo _

    -. - -Note that when delimiters do not match evenly, Rule 11 determines -that the excess literal `*` characters will appear outside of the -emphasis, rather than inside it: - -. -**foo* -. -

    *foo

    -. - -. -*foo** -. -

    foo*

    -. - -. -***foo** -. -

    *foo

    -. - -. -****foo* -. -

    ***foo

    -. - -. -**foo*** -. -

    foo*

    -. - -. -*foo**** -. -

    foo***

    -. - - -Rule 12: - -. -foo ___ -. -

    foo ___

    -. - -. -foo _\__ -. -

    foo _

    -. - -. -foo _*_ -. -

    foo *

    -. - -. -foo _____ -. -

    foo _____

    -. - -. -foo __\___ -. -

    foo _

    -. - -. -foo __*__ -. -

    foo *

    -. - -. -__foo_ -. -

    _foo

    -. - -Note that when delimiters do not match evenly, Rule 12 determines -that the excess literal `_` characters will appear outside of the -emphasis, rather than inside it: - -. -_foo__ -. -

    foo_

    -. - -. -___foo__ -. -

    _foo

    -. - -. -____foo_ -. -

    ___foo

    -. - -. -__foo___ -. -

    foo_

    -. - -. -_foo____ -. -

    foo___

    -. - -Rule 13 implies that if you want emphasis nested directly inside -emphasis, you must use different delimiters: - -. -**foo** -. -

    foo

    -. - -. -*_foo_* -. -

    foo

    -. - -. -__foo__ -. -

    foo

    -. - -. -_*foo*_ -. -

    foo

    -. - -However, strong emphasis within strong emphasisis possible without -switching delimiters: - -. -****foo**** -. -

    foo

    -. - -. -____foo____ -. -

    foo

    -. - - -Rule 13 can be applied to arbitrarily long sequences of -delimiters: - -. -******foo****** -. -

    foo

    -. - -Rule 14: - -. -***foo*** -. -

    foo

    -. - -. -_____foo_____ -. -

    foo

    -. - -Rule 15: - -. -*foo _bar* baz_ -. -

    foo _bar baz_

    -. - -. -**foo*bar** -. -

    foobar*

    -. - - -Rule 16: - -. -**foo **bar baz** -. -

    **foo bar baz

    -. - -. -*foo *bar baz* -. -

    *foo bar baz

    -. - -Rule 17: - -. -*[bar*](/url) -. -

    *bar*

    -. - -. -_foo [bar_](/url) -. -

    _foo bar_

    -. - -. -* -. -

    *

    -. - -. -** -. -

    **

    -. - -. -__ -. -

    __

    -. - -. -*a `*`* -. -

    a *

    -. - -. -_a `_`_ -. -

    a _

    -. - -. -**a -. -

    **ahttp://foo.bar?q=**

    -. - -. -__a -. -

    __ahttp://foo.bar?q=__

    -. - - -## Links - -A link contains [link text](#link-label) (the visible text), -a [destination](#destination) (the URI that is the link destination), -and optionally a [link title](#link-title). There are two basic kinds -of links in Markdown. In [inline links](#inline-links) the destination -and title are given immediately after the link text. In [reference -links](#reference-links) the destination and title are defined elsewhere -in the document. - -A [link text](@link-text) consists of a sequence of zero or more -inline elements enclosed by square brackets (`[` and `]`). The -following rules apply: - -- Links may not contain other links, at any level of nesting. - -- Brackets are allowed in the [link text](#link-text) only if (a) they - are backslash-escaped or (b) they appear as a matched pair of brackets, - with an open bracket `[`, a sequence of zero or more inlines, and - a close bracket `]`. - -- Backtick [code spans](#code-span), [autolinks](#autolink), and - raw [HTML tags](#html-tag) bind more tightly - than the brackets in link text. Thus, for example, - `` [foo`]` `` could not be a link text, since the second `]` - is part of a code span. - -- The brackets in link text bind more tightly than markers for - [emphasis and strong emphasis](#emphasis-and-strong-emphasis). - Thus, for example, `*[foo*](url)` is a link. - -A [link destination](@link-destination) consists of either - -- a sequence of zero or more characters between an opening `<` and a - closing `>` that contains no line breaks or unescaped `<` or `>` - characters, or - -- a nonempty sequence of characters that does not include - ASCII space or control characters, and includes parentheses - only if (a) they are backslash-escaped or (b) they are part of - a balanced pair of unescaped parentheses that is not itself - inside a balanced pair of unescaped paretheses. - -A [link title](@link-title) consists of either - -- a sequence of zero or more characters between straight double-quote - characters (`"`), including a `"` character only if it is - backslash-escaped, or - -- a sequence of zero or more characters between straight single-quote - characters (`'`), including a `'` character only if it is - backslash-escaped, or - -- a sequence of zero or more characters between matching parentheses - (`(...)`), including a `)` character only if it is backslash-escaped. - -An [inline link](@inline-link) -consists of a [link text](#link-text) followed immediately -by a left parenthesis `(`, optional whitespace, -an optional [link destination](#link-destination), -an optional [link title](#link-title) separated from the link -destination by whitespace, optional whitespace, and a right -parenthesis `)`. The link's text consists of the inlines contained -in the [link text](#link-text) (excluding the enclosing square brackets). -The link's URI consists of the link destination, excluding enclosing -`<...>` if present, with backslash-escapes in effect as described -above. The link's title consists of the link title, excluding its -enclosing delimiters, with backslash-escapes in effect as described -above. - -Here is a simple inline link: - -. -[link](/uri "title") -. -

    link

    -. - -The title may be omitted: - -. -[link](/uri) -. -

    link

    -. - -Both the title and the destination may be omitted: - -. -[link]() -. -

    link

    -. - -. -[link](<>) -. -

    link

    -. - -If the destination contains spaces, it must be enclosed in pointy -braces: - -. -[link](/my uri) -. -

    [link](/my uri)

    -. - -. -[link](
    ) -. -

    link

    -. - -The destination cannot contain line breaks, even with pointy braces: - -. -[link](foo -bar) -. -

    [link](foo -bar)

    -. - -One level of balanced parentheses is allowed without escaping: - -. -[link]((foo)and(bar)) -. -

    link

    -. - -However, if you have parentheses within parentheses, you need to escape -or use the `<...>` form: - -. -[link](foo(and(bar))) -. -

    [link](foo(and(bar)))

    -. - -. -[link](foo(and\(bar\))) -. -

    link

    -. - -. -[link]() -. -

    link

    -. - -Parentheses and other symbols can also be escaped, as usual -in Markdown: - -. -[link](foo\)\:) -. -

    link

    -. - -URL-escaping should be left alone inside the destination, as all -URL-escaped characters are also valid URL characters. HTML entities in -the destination will be parsed into their UTF-8 codepoints, as usual, and -optionally URL-escaped when written as HTML. - -. -[link](foo%20bä) -. -

    link

    -. - -Note that, because titles can often be parsed as destinations, -if you try to omit the destination and keep the title, you'll -get unexpected results: - -. -[link]("title") -. -

    link

    -. - -Titles may be in single quotes, double quotes, or parentheses: - -. -[link](/url "title") -[link](/url 'title') -[link](/url (title)) -. -

    link -link -link

    -. - -Backslash escapes and entities may be used in titles: - -. -[link](/url "title \""") -. -

    link

    -. - -Nested balanced quotes are not allowed without escaping: - -. -[link](/url "title "and" title") -. -

    [link](/url "title "and" title")

    -. - -But it is easy to work around this by using a different quote type: - -. -[link](/url 'title "and" title') -. -

    link

    -. - -(Note: `Markdown.pl` did allow double quotes inside a double-quoted -title, and its test suite included a test demonstrating this. -But it is hard to see a good rationale for the extra complexity this -brings, since there are already many ways---backslash escaping, -entities, or using a different quote type for the enclosing title---to -write titles containing double quotes. `Markdown.pl`'s handling of -titles has a number of other strange features. For example, it allows -single-quoted titles in inline links, but not reference links. And, in -reference links but not inline links, it allows a title to begin with -`"` and end with `)`. `Markdown.pl` 1.0.1 even allows titles with no closing -quotation mark, though 1.0.2b8 does not. It seems preferable to adopt -a simple, rational rule that works the same way in inline links and -link reference definitions.) - -Whitespace is allowed around the destination and title: - -. -[link]( /uri - "title" ) -. -

    link

    -. - -But it is not allowed between the link text and the -following parenthesis: - -. -[link] (/uri) -. -

    [link] (/uri)

    -. - -The link text may contain balanced brackets, but not unbalanced ones, -unless they are escaped: - -. -[link [foo [bar]]](/uri) -. -

    link [foo [bar]]

    -. - -. -[link] bar](/uri) -. -

    [link] bar](/uri)

    -. - -. -[link [bar](/uri) -. -

    [link bar

    -. - -. -[link \[bar](/uri) -. -

    link [bar

    -. - -The link text may contain inline content: - -. -[link *foo **bar** `#`*](/uri) -. -

    link foo bar #

    -. - -. -[![moon](moon.jpg)](/uri) -. -

    moon

    -. - -However, links may not contain other links, at any level of nesting. - -. -[foo [bar](/uri)](/uri) -. -

    [foo bar](/uri)

    -. - -. -[foo *[bar [baz](/uri)](/uri)*](/uri) -. -

    [foo [bar baz](/uri)](/uri)

    -. - -These cases illustrate the precedence of link text grouping over -emphasis grouping: - -. -*[foo*](/uri) -. -

    *foo*

    -. - -. -[foo *bar](baz*) -. -

    foo *bar

    -. - -These cases illustrate the precedence of HTML tags, code spans, -and autolinks over link grouping: - -. -[foo -. -

    [foo

    -. - -. -[foo`](/uri)` -. -

    [foo](/uri)

    -. - -. -[foo -. -

    [foohttp://example.com?search=](uri)

    -. - -There are three kinds of [reference links](@reference-link): -[full](#full-reference-link), [collapsed](#collapsed-reference-link), -and [shortcut](#shortcut-reference-link). - -A [full reference link](@full-reference-link) -consists of a [link text](#link-text), optional whitespace, and -a [link label](#link-label) that [matches](#matches) a -[link reference definition](#link-reference-definition) elsewhere in the -document. - -A [link label](@link-label) begins with a left bracket (`[`) and ends -with the first right bracket (`]`) that is not backslash-escaped. -Unescaped square bracket characters are not allowed in -[link labels](#link-label). A link label can have at most 999 -characters inside the square brackets. - -One label [matches](@matches) -another just in case their normalized forms are equal. To normalize a -label, perform the *unicode case fold* and collapse consecutive internal -whitespace to a single space. If there are multiple matching reference -link definitions, the one that comes first in the document is used. (It -is desirable in such cases to emit a warning.) - -The contents of the first link label are parsed as inlines, which are -used as the link's text. The link's URI and title are provided by the -matching [link reference definition](#link-reference-definition). - -Here is a simple example: - -. -[foo][bar] - -[bar]: /url "title" -. -

    foo

    -. - -The rules for the [link text](#link-text) are the same as with -[inline links](#inline-link). Thus: - -The link text may contain balanced brackets, but not unbalanced ones, -unless they are escaped: - -. -[link [foo [bar]]][ref] - -[ref]: /uri -. -

    link [foo [bar]]

    -. - -. -[link \[bar][ref] - -[ref]: /uri -. -

    link [bar

    -. - -The link text may contain inline content: - -. -[link *foo **bar** `#`*][ref] - -[ref]: /uri -. -

    link foo bar #

    -. - -. -[![moon](moon.jpg)][ref] - -[ref]: /uri -. -

    moon

    -. - -However, links may not contain other links, at any level of nesting. - -. -[foo [bar](/uri)][ref] - -[ref]: /uri -. -

    [foo bar]ref

    -. - -. -[foo *bar [baz][ref]*][ref] - -[ref]: /uri -. -

    [foo bar baz]ref

    -. - -(In the examples above, we have two [shortcut reference -links](#shortcut-reference-link) instead of one [full reference -link](#full-reference-link).) - -The following cases illustrate the precedence of link text grouping over -emphasis grouping: - -. -*[foo*][ref] - -[ref]: /uri -. -

    *foo*

    -. - -. -[foo *bar][ref] - -[ref]: /uri -. -

    foo *bar

    -. - -These cases illustrate the precedence of HTML tags, code spans, -and autolinks over link grouping: - -. -[foo - -[ref]: /uri -. -

    [foo

    -. - -. -[foo`][ref]` - -[ref]: /uri -. -

    [foo][ref]

    -. - -. -[foo - -[ref]: /uri -. -

    [foohttp://example.com?search=][ref]

    -. - -Matching is case-insensitive: - -. -[foo][BaR] - -[bar]: /url "title" -. -

    foo

    -. - -Unicode case fold is used: - -. -[Толпой][Толпой] is a Russian word. - -[ТОЛПОЙ]: /url -. -

    Толпой is a Russian word.

    -. - -Consecutive internal whitespace is treated as one space for -purposes of determining matching: - -. -[Foo - bar]: /url - -[Baz][Foo bar] -. -

    Baz

    -. - -There can be whitespace between the [link text](#link-text) and the -[link label](#link-label): - -. -[foo] [bar] - -[bar]: /url "title" -. -

    foo

    -. - -. -[foo] -[bar] - -[bar]: /url "title" -. -

    foo

    -. - -When there are multiple matching [link reference -definitions](#link-reference-definition), the first is used: - -. -[foo]: /url1 - -[foo]: /url2 - -[bar][foo] -. -

    bar

    -. - -Note that matching is performed on normalized strings, not parsed -inline content. So the following does not match, even though the -labels define equivalent inline content: - -. -[bar][foo\!] - -[foo!]: /url -. -

    [bar][foo!]

    -. - -[Link labels](#link-label) cannot contain brackets, unless they are -backslash-escaped: - -. -[foo][ref[] - -[ref[]: /uri -. -

    [foo][ref[]

    -

    [ref[]: /uri

    -. - -. -[foo][ref[bar]] - -[ref[bar]]: /uri -. -

    [foo][ref[bar]]

    -

    [ref[bar]]: /uri

    -. - -. -[[[foo]]] - -[[[foo]]]: /url -. -

    [[[foo]]]

    -

    [[[foo]]]: /url

    -. - -. -[foo][ref\[] - -[ref\[]: /uri -. -

    foo

    -. - -A [collapsed reference link](@collapsed-reference-link) -consists of a [link -label](#link-label) that [matches](#matches) a [link reference -definition](#link-reference-definition) elsewhere in the -document, optional whitespace, and the string `[]`. The contents of the -first link label are parsed as inlines, which are used as the link's -text. The link's URI and title are provided by the matching reference -link definition. Thus, `[foo][]` is equivalent to `[foo][foo]`. - -. -[foo][] - -[foo]: /url "title" -. -

    foo

    -. - -. -[*foo* bar][] - -[*foo* bar]: /url "title" -. -

    foo bar

    -. - -The link labels are case-insensitive: - -. -[Foo][] - -[foo]: /url "title" -. -

    Foo

    -. - - -As with full reference links, whitespace is allowed -between the two sets of brackets: - -. -[foo] -[] - -[foo]: /url "title" -. -

    foo

    -. - -A [shortcut reference link](@shortcut-reference-link) -consists of a [link -label](#link-label) that [matches](#matches) a [link reference -definition](#link-reference-definition) elsewhere in the -document and is not followed by `[]` or a link label. -The contents of the first link label are parsed as inlines, -which are used as the link's text. the link's URI and title -are provided by the matching link reference definition. -Thus, `[foo]` is equivalent to `[foo][]`. - -. -[foo] - -[foo]: /url "title" -. -

    foo

    -. - -. -[*foo* bar] - -[*foo* bar]: /url "title" -. -

    foo bar

    -. - -. -[[*foo* bar]] - -[*foo* bar]: /url "title" -. -

    [foo bar]

    -. - -The link labels are case-insensitive: - -. -[Foo] - -[foo]: /url "title" -. -

    Foo

    -. - -A space after the link text should be preserved: - -. -[foo] bar - -[foo]: /url -. -

    foo bar

    -. - -If you just want bracketed text, you can backslash-escape the -opening bracket to avoid links: - -. -\[foo] - -[foo]: /url "title" -. -

    [foo]

    -. - -Note that this is a link, because a link label ends with the first -following closing bracket: - -. -[foo*]: /url - -*[foo*] -. -

    *foo*

    -. - -This is a link too, for the same reason: - -. -[foo`]: /url - -[foo`]` -. -

    [foo]

    -. - -Full references take precedence over shortcut references: - -. -[foo][bar] - -[foo]: /url1 -[bar]: /url2 -. -

    foo

    -. - -In the following case `[bar][baz]` is parsed as a reference, -`[foo]` as normal text: - -. -[foo][bar][baz] - -[baz]: /url -. -

    [foo]bar

    -. - -Here, though, `[foo][bar]` is parsed as a reference, since -`[bar]` is defined: - -. -[foo][bar][baz] - -[baz]: /url1 -[bar]: /url2 -. -

    foobaz

    -. - -Here `[foo]` is not parsed as a shortcut reference, because it -is followed by a link label (even though `[bar]` is not defined): - -. -[foo][bar][baz] - -[baz]: /url1 -[foo]: /url2 -. -

    [foo]bar

    -. - - -## Images - -Syntax for images is like the syntax for links, with one -difference. Instead of [link text](#link-text), we have an [image -description](@image-description). The rules for this are the -same as for [link text](#link-text), except that (a) an -image description starts with `![` rather than `[`, and -(b) an image description may contain links. -An image description has inline elements -as its contents. When an image is rendered to HTML, -this is standardly used as the image's `alt` attribute. - -. -![foo](/url "title") -. -

    foo

    -. - -. -![foo *bar*] - -[foo *bar*]: train.jpg "train & tracks" -. -

    foo bar

    -. - -. -![foo ![bar](/url)](/url2) -. -

    foo bar

    -. - -. -![foo [bar](/url)](/url2) -. -

    foo bar

    -. - -Though this spec is concerned with parsing, not rendering, it is -recommended that in rendering to HTML, only the plain string content -of the [image description](#image-description) be used. Note that in -the above example, the alt attribute's value is `foo bar`, not `foo -[bar](/url)` or `foo bar`. Only the plain string -content is rendered, without formatting. - -. -![foo *bar*][] - -[foo *bar*]: train.jpg "train & tracks" -. -

    foo bar

    -. - -. -![foo *bar*][foobar] - -[FOOBAR]: train.jpg "train & tracks" -. -

    foo bar

    -. - -. -![foo](train.jpg) -. -

    foo

    -. - -. -My ![foo bar](/path/to/train.jpg "title" ) -. -

    My foo bar

    -. - -. -![foo]() -. -

    foo

    -. - -. -![](/url) -. -

    -. - -Reference-style: - -. -![foo] [bar] - -[bar]: /url -. -

    foo

    -. - -. -![foo] [bar] - -[BAR]: /url -. -

    foo

    -. - -Collapsed: - -. -![foo][] - -[foo]: /url "title" -. -

    foo

    -. - -. -![*foo* bar][] - -[*foo* bar]: /url "title" -. -

    foo bar

    -. - -The labels are case-insensitive: - -. -![Foo][] - -[foo]: /url "title" -. -

    Foo

    -. - -As with full reference links, whitespace is allowed -between the two sets of brackets: - -. -![foo] -[] - -[foo]: /url "title" -. -

    foo

    -. - -Shortcut: - -. -![foo] - -[foo]: /url "title" -. -

    foo

    -. - -. -![*foo* bar] - -[*foo* bar]: /url "title" -. -

    foo bar

    -. - -Note that link labels cannot contain unescaped brackets: - -. -![[foo]] - -[[foo]]: /url "title" -. -

    ![[foo]]

    -

    [[foo]]: /url "title"

    -. - -The link labels are case-insensitive: - -. -![Foo] - -[foo]: /url "title" -. -

    Foo

    -. - -If you just want bracketed text, you can backslash-escape the -opening `!` and `[`: - -. -\!\[foo] - -[foo]: /url "title" -. -

    ![foo]

    -. - -If you want a link after a literal `!`, backslash-escape the -`!`: - -. -\![foo] - -[foo]: /url "title" -. -

    !foo

    -. - -## Autolinks - -[Autolinks](@autolink) are absolute URIs and email addresses inside `<` and `>`. -They are parsed as links, with the URL or email address as the link -label. - -A [URI autolink](@uri-autolink) -consists of `<`, followed by an [absolute -URI](#absolute-uri) not containing `<`, followed by `>`. It is parsed -as a link to the URI, with the URI as the link's label. - -An [absolute URI](@absolute-uri), -for these purposes, consists of a [scheme](#scheme) followed by a colon (`:`) -followed by zero or more characters other than ASCII whitespace and -control characters, `<`, and `>`. If the URI includes these characters, -you must use percent-encoding (e.g. `%20` for a space). - -The following [schemes](@scheme) -are recognized (case-insensitive): -`coap`, `doi`, `javascript`, `aaa`, `aaas`, `about`, `acap`, `cap`, -`cid`, `crid`, `data`, `dav`, `dict`, `dns`, `file`, `ftp`, `geo`, `go`, -`gopher`, `h323`, `http`, `https`, `iax`, `icap`, `im`, `imap`, `info`, -`ipp`, `iris`, `iris.beep`, `iris.xpc`, `iris.xpcs`, `iris.lwz`, `ldap`, -`mailto`, `mid`, `msrp`, `msrps`, `mtqp`, `mupdate`, `news`, `nfs`, -`ni`, `nih`, `nntp`, `opaquelocktoken`, `pop`, `pres`, `rtsp`, -`service`, `session`, `shttp`, `sieve`, `sip`, `sips`, `sms`, `snmp`,` -soap.beep`, `soap.beeps`, `tag`, `tel`, `telnet`, `tftp`, `thismessage`, -`tn3270`, `tip`, `tv`, `urn`, `vemmi`, `ws`, `wss`, `xcon`, -`xcon-userid`, `xmlrpc.beep`, `xmlrpc.beeps`, `xmpp`, `z39.50r`, -`z39.50s`, `adiumxtra`, `afp`, `afs`, `aim`, `apt`,` attachment`, `aw`, -`beshare`, `bitcoin`, `bolo`, `callto`, `chrome`,` chrome-extension`, -`com-eventbrite-attendee`, `content`, `cvs`,` dlna-playsingle`, -`dlna-playcontainer`, `dtn`, `dvb`, `ed2k`, `facetime`, `feed`, -`finger`, `fish`, `gg`, `git`, `gizmoproject`, `gtalk`, `hcp`, `icon`, -`ipn`, `irc`, `irc6`, `ircs`, `itms`, `jar`, `jms`, `keyparc`, `lastfm`, -`ldaps`, `magnet`, `maps`, `market`,` message`, `mms`, `ms-help`, -`msnim`, `mumble`, `mvn`, `notes`, `oid`, `palm`, `paparazzi`, -`platform`, `proxy`, `psyc`, `query`, `res`, `resource`, `rmi`, `rsync`, -`rtmp`, `secondlife`, `sftp`, `sgn`, `skype`, `smb`, `soldat`, -`spotify`, `ssh`, `steam`, `svn`, `teamspeak`, `things`, `udp`, -`unreal`, `ut2004`, `ventrilo`, `view-source`, `webcal`, `wtai`, -`wyciwyg`, `xfire`, `xri`, `ymsgr`. - -Here are some valid autolinks: - -. - -. -

    http://foo.bar.baz

    -. - -. - -. -

    http://foo.bar.baz?q=hello&id=22&boolean

    -. - -. - -. -

    irc://foo.bar:2233/baz

    -. - -Uppercase is also fine: - -. - -. -

    MAILTO:FOO@BAR.BAZ

    -. - -Spaces are not allowed in autolinks: - -. - -. -

    <http://foo.bar/baz bim>

    -. - -An [email autolink](@email-autolink) -consists of `<`, followed by an [email address](#email-address), -followed by `>`. The link's label is the email address, -and the URL is `mailto:` followed by the email address. - -An [email address](@email-address), -for these purposes, is anything that matches -the [non-normative regex from the HTML5 -spec](http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#e-mail-state-%28type=email%29): - - /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])? - (?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/ - -Examples of email autolinks: - -. - -. -

    foo@bar.example.com

    -. - -. - -. -

    foo+special@Bar.baz-bar0.com

    -. - -These are not autolinks: - -. -<> -. -

    <>

    -. - -. - -. -

    <heck://bing.bong>

    -. - -. -< http://foo.bar > -. -

    < http://foo.bar >

    -. - -. - -. -

    <foo.bar.baz>

    -. - -. - -. -

    <localhost:5001/foo>

    -. - -. -http://example.com -. -

    http://example.com

    -. - -. -foo@bar.example.com -. -

    foo@bar.example.com

    -. - -## Raw HTML - -Text between `<` and `>` that looks like an HTML tag is parsed as a -raw HTML tag and will be rendered in HTML without escaping. -Tag and attribute names are not limited to current HTML tags, -so custom tags (and even, say, DocBook tags) may be used. - -Here is the grammar for tags: - -A [tag name](@tag-name) consists of an ASCII letter -followed by zero or more ASCII letters or digits. - -An [attribute](@attribute) consists of whitespace, -an [attribute name](#attribute-name), and an optional -[attribute value specification](#attribute-value-specification). - -An [attribute name](@attribute-name) -consists of an ASCII letter, `_`, or `:`, followed by zero or more ASCII -letters, digits, `_`, `.`, `:`, or `-`. (Note: This is the XML -specification restricted to ASCII. HTML5 is laxer.) - -An [attribute value specification](@attribute-value-specification) -consists of optional whitespace, -a `=` character, optional whitespace, and an [attribute -value](#attribute-value). - -An [attribute value](@attribute-value) -consists of an [unquoted attribute value](#unquoted-attribute-value), -a [single-quoted attribute value](#single-quoted-attribute-value), -or a [double-quoted attribute value](#double-quoted-attribute-value). - -An [unquoted attribute value](@unquoted-attribute-value) -is a nonempty string of characters not -including spaces, `"`, `'`, `=`, `<`, `>`, or `` ` ``. - -A [single-quoted attribute value](@single-quoted-attribute-value) -consists of `'`, zero or more -characters not including `'`, and a final `'`. - -A [double-quoted attribute value](@double-quoted-attribute-value) -consists of `"`, zero or more -characters not including `"`, and a final `"`. - -An [open tag](@open-tag) consists of a `<` character, -a [tag name](#tag-name), zero or more [attributes](#attribute), -optional whitespace, an optional `/` character, and a `>` character. - -A [closing tag](@closing-tag) consists of the -string ``. - -An [HTML comment](@html-comment) consists of the -string ``. - -A [processing instruction](@processing-instruction) -consists of the string ``, and the string -`?>`. - -A [declaration](@declaration) consists of the -string ``, and -the character `>`. - -A [CDATA section](@cdata-section) consists of -the string ``, and the string `]]>`. - -An [HTML tag](@html-tag) consists of an [open -tag](#open-tag), a [closing tag](#closing-tag), an [HTML -comment](#html-comment), a [processing -instruction](#processing-instruction), an [element type -declaration](#element-type-declaration), or a [CDATA -section](#cdata-section). - -Here are some simple open tags: - -. - -. -

    -. - -Empty elements: - -. - -. -

    -. - -Whitespace is allowed: - -. - -. -

    -. - -With attributes: - -. - -. -

    -. - -Illegal tag names, not parsed as HTML: - -. -<33> <__> -. -

    <33> <__>

    -. - -Illegal attribute names: - -. -
    -. -

    <a h*#ref="hi">

    -. - -Illegal attribute values: - -. -
    -. -

    </a href="foo">

    -. - -Comments: - -. -foo -. -

    foo

    -. - -. -foo -. -

    foo <!-- not a comment -- two hyphens -->

    -. - -Processing instructions: - -. -foo -. -

    foo

    -. - -Declarations: - -. -foo -. -

    foo

    -. - -CDATA sections: - -. -foo &<]]> -. -

    foo &<]]>

    -. - -Entities are preserved in HTML attributes: - -. -
    -. -

    -. - -Backslash escapes do not work in HTML attributes: - -. - -. -

    -. - -. - -. -

    <a href=""">

    -. - -## Hard line breaks - -A line break (not in a code span or HTML tag) that is preceded -by two or more spaces and does not occur at the end of a block -is parsed as a [hard line break](@hard-line-break) (rendered -in HTML as a `
    ` tag): - -. -foo -baz -. -

    foo
    -baz

    -. - -For a more visible alternative, a backslash before the newline may be -used instead of two spaces: - -. -foo\ -baz -. -

    foo
    -baz

    -. - -More than two spaces can be used: - -. -foo -baz -. -

    foo
    -baz

    -. - -Leading spaces at the beginning of the next line are ignored: - -. -foo - bar -. -

    foo
    -bar

    -. - -. -foo\ - bar -. -

    foo
    -bar

    -. - -Line breaks can occur inside emphasis, links, and other constructs -that allow inline content: - -. -*foo -bar* -. -

    foo
    -bar

    -. - -. -*foo\ -bar* -. -

    foo
    -bar

    -. - -Line breaks do not occur inside code spans - -. -`code -span` -. -

    code span

    -. - -. -`code\ -span` -. -

    code\ span

    -. - -or HTML tags: - -. -
    -. -

    -. - -. - -. -

    -. - -Hard line breaks are for separating inline content within a block. -Neither syntax for hard line breaks works at the end of a paragraph or -other block element: - -. -foo\ -. -

    foo\

    -. - -. -foo -. -

    foo

    -. - -. -### foo\ -. -

    foo\

    -. - -. -### foo -. -

    foo

    -. - -## Soft line breaks - -A regular line break (not in a code span or HTML tag) that is not -preceded by two or more spaces is parsed as a softbreak. (A -softbreak may be rendered in HTML either as a newline or as a space. -The result will be the same in browsers. In the examples here, a -newline will be used.) - -. -foo -baz -. -

    foo -baz

    -. - -Spaces at the end of the line and beginning of the next line are -removed: - -. -foo - baz -. -

    foo -baz

    -. - -A conforming parser may render a soft line break in HTML either as a -line break or as a space. - -A renderer may also provide an option to render soft line breaks -as hard line breaks. - -## Textual content - -Any characters not given an interpretation by the above rules will -be parsed as plain textual content. - -. -hello $.;'there -. -

    hello $.;'there

    -. - -. -Foo χρῆν -. -

    Foo χρῆν

    -. - -Internal spaces are preserved verbatim: - -. -Multiple spaces -. -

    Multiple spaces

    -. - - - -# Appendix A: A parsing strategy {-} - -## Overview {-} - -Parsing has two phases: - -1. In the first phase, lines of input are consumed and the block -structure of the document---its division into paragraphs, block quotes, -list items, and so on---is constructed. Text is assigned to these -blocks but not parsed. Link reference definitions are parsed and a -map of links is constructed. - -2. In the second phase, the raw text contents of paragraphs and headers -are parsed into sequences of Markdown inline elements (strings, -code spans, links, emphasis, and so on), using the map of link -references constructed in phase 1. - -## The document tree {-} - -At each point in processing, the document is represented as a tree of -**blocks**. The root of the tree is a `document` block. The `document` -may have any number of other blocks as **children**. These children -may, in turn, have other blocks as children. The last child of a block -is normally considered **open**, meaning that subsequent lines of input -can alter its contents. (Blocks that are not open are **closed**.) -Here, for example, is a possible document tree, with the open blocks -marked by arrows: - -``` tree --> document - -> block_quote - paragraph - "Lorem ipsum dolor\nsit amet." - -> list (type=bullet tight=true bullet_char=-) - list_item - paragraph - "Qui *quodsi iracundia*" - -> list_item - -> paragraph - "aliquando id" -``` - -## How source lines alter the document tree {-} - -Each line that is processed has an effect on this tree. The line is -analyzed and, depending on its contents, the document may be altered -in one or more of the following ways: - -1. One or more open blocks may be closed. -2. One or more new blocks may be created as children of the - last open block. -3. Text may be added to the last (deepest) open block remaining - on the tree. - -Once a line has been incorporated into the tree in this way, -it can be discarded, so input can be read in a stream. - -We can see how this works by considering how the tree above is -generated by four lines of Markdown: - -``` markdown -> Lorem ipsum dolor -sit amet. -> - Qui *quodsi iracundia* -> - aliquando id -``` - -At the outset, our document model is just - -``` tree --> document -``` - -The first line of our text, - -``` markdown -> Lorem ipsum dolor -``` - -causes a `block_quote` block to be created as a child of our -open `document` block, and a `paragraph` block as a child of -the `block_quote`. Then the text is added to the last open -block, the `paragraph`: - -``` tree --> document - -> block_quote - -> paragraph - "Lorem ipsum dolor" -``` - -The next line, - -``` markdown -sit amet. -``` - -is a "lazy continuation" of the open `paragraph`, so it gets added -to the paragraph's text: - -``` tree --> document - -> block_quote - -> paragraph - "Lorem ipsum dolor\nsit amet." -``` - -The third line, - -``` markdown -> - Qui *quodsi iracundia* -``` - -causes the `paragraph` block to be closed, and a new `list` block -opened as a child of the `block_quote`. A `list_item` is also -added as a child of the `list`, and a `paragraph` as a child of -the `list_item`. The text is then added to the new `paragraph`: - -``` tree --> document - -> block_quote - paragraph - "Lorem ipsum dolor\nsit amet." - -> list (type=bullet tight=true bullet_char=-) - -> list_item - -> paragraph - "Qui *quodsi iracundia*" -``` - -The fourth line, - -``` markdown -> - aliquando id -``` - -causes the `list_item` (and its child the `paragraph`) to be closed, -and a new `list_item` opened up as child of the `list`. A `paragraph` -is added as a child of the new `list_item`, to contain the text. -We thus obtain the final tree: - -``` tree --> document - -> block_quote - paragraph - "Lorem ipsum dolor\nsit amet." - -> list (type=bullet tight=true bullet_char=-) - list_item - paragraph - "Qui *quodsi iracundia*" - -> list_item - -> paragraph - "aliquando id" -``` - -## From block structure to the final document {-} - -Once all of the input has been parsed, all open blocks are closed. - -We then "walk the tree," visiting every node, and parse raw -string contents of paragraphs and headers as inlines. At this -point we have seen all the link reference definitions, so we can -resolve reference links as we go. - -``` tree -document - block_quote - paragraph - str "Lorem ipsum dolor" - softbreak - str "sit amet." - list (type=bullet tight=true bullet_char=-) - list_item - paragraph - str "Qui " - emph - str "quodsi iracundia" - list_item - paragraph - str "aliquando id" -``` - -Notice how the newline in the first paragraph has been parsed as -a `softbreak`, and the asterisks in the first list item have become -an `emph`. - -The document can be rendered as HTML, or in any other format, given -an appropriate renderer. diff --git a/outside/commonmark/spec2js.js b/outside/commonmark/spec2js.js deleted file mode 100755 index 6bf366f97..000000000 --- a/outside/commonmark/spec2js.js +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env node - -var fs = require('fs'); -var util = require('util'); - -fs.readFile('spec.txt', 'utf8', function(err, data) { - if (err) { - return console.log(err); - } - var examples = []; - data.replace(/^\.\n([\s\S]*?)^\.\n([\s\S]*?)^\.$/gm, - function(_,x,y){ - examples.push({markdown: x, html: y}); - }); - console.log(util.inspect(examples, { depth: null })); - console.warn(examples.length + ' examples'); -}); diff --git a/outside/commonmark/spec2md.pl b/outside/commonmark/spec2md.pl deleted file mode 100644 index 313f86f42..000000000 --- a/outside/commonmark/spec2md.pl +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env perl -use strict; -use warnings; - -my $stage = 0; -my $example = 0; -my @match; -my $section = ""; - -while () { - if (/^\.$/) { - if ($stage == 0) { - $example++; - print "\n
    \n"; - print "\n\n"; - print "````````````````````````````````````````````````````````` markdown\n"; - } elsif ($stage == 1) { - print "`````````````````````````````````````````````````````````\n\n"; - print "````````````````````````````````````````````````````````` html\n"; - } elsif ($stage == 2) { - print "`````````````````````````````````````````````````````````\n\n"; - print "
    \n\n"; - } else { - die "Encountered unknown stage $stage"; - } - $stage = ($stage + 1) % 3; - } else { - if ($stage == 0 && (@match = ($_ =~ /^#{1,6} *(.*)/))) { - $section = $match[0]; - } - if ($stage != 0) { - $_ =~ s/ /␣/g; - } - print $_; - } -} diff --git a/outside/commonmark/specfilter.hs b/outside/commonmark/specfilter.hs deleted file mode 100755 index 67c8fa5ba..000000000 --- a/outside/commonmark/specfilter.hs +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env runhaskell - -import Text.Pandoc.JSON -import Text.Pandoc.Walk - -main = toJSONFilter go - where go :: Pandoc -> Pandoc - go = walk exampleDivs . walk anchors - -exampleDivs :: Block -> Block -exampleDivs (Div (ident, ["example"], kvs) - [ d@(Div (_,["examplenum"],_) _), - c1@(CodeBlock (_,["markdown"],_) _), - c2@(CodeBlock (_,["html"],_) _) - ]) = Div (ident, ["example"], kvs) - [ rawtex "\\begin{minipage}[t]{\\textwidth}\n{\\scriptsize " - , d - , rawtex "\\vspace{-1em}}" - , rawtex "\\begin{minipage}[t]{0.49\\textwidth}\n\\definecolor{shadecolor}{gray}{0.85}\n" - , addBreaks c1 - , rawtex "\\end{minipage}\n\\hfill\n\\begin{minipage}[t]{0.49\\textwidth}\n\\definecolor{shadecolor}{gray}{0.95}\n" - , addBreaks c2 - , rawtex "\\end{minipage}\n\\end{minipage}" - ] - where rawtex = RawBlock (Format "latex") - addBreaks (CodeBlock attrs code) = CodeBlock attrs $ addBreaks' code - addBreaks' code = - if length code > 49 - then take 49 code ++ ('\n':addBreaks' (drop 49 code)) - else code -exampleDivs x = x - -anchors :: Inline -> Inline -anchors (RawInline (Format "html") ('<':'a':' ':'i':'d':'=':'"':xs)) = - RawInline (Format "latex") ("\\hyperdef{}{" ++ lab ++ "}{\\label{" ++ lab ++ "}}") - where lab = takeWhile (/='"') xs -anchors x = x diff --git a/outside/commonmark/src/CMakeLists.txt b/outside/commonmark/src/CMakeLists.txt deleted file mode 100644 index 395c9e298..000000000 --- a/outside/commonmark/src/CMakeLists.txt +++ /dev/null @@ -1,144 +0,0 @@ -cmake_minimum_required(VERSION 2.8) -set(LIBRARY "libcmark") -set(HEADERS - cmark.h - parser.h - buffer.h - node.h - chunk.h - references.h - debug.h - bench.h - utf8.h - scanners.h - inlines.h - html/html_unescape.h - html/houdini.h - ) -set(LIBRARY_SOURCES - cmark.c - node.c - blocks.c - inlines.c - print.c - scanners.c - scanners.re - utf8.c - buffer.c - references.c - html/html.c - html/html_unescape.gperf - html/houdini_href_e.c - html/houdini_html_e.c - html/houdini_html_u.c - ${HEADERS} - ) - -#set(PROGRAM "cmark") -#set(PROGRAM_SOURCES -# ${LIBRARY_SOURCES} -# main.c -# ) - -include_directories(. html ${CMAKE_CURRENT_BINARY_DIR}) -include_directories(../../../i) - -set(RE2C re2c) -if (MSVC) - file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR} DOS_CURRENT_SOURCE_DIR) - add_custom_command( OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/scanners.c - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/scanners.re - COMMAND ${RE2C} --case-insensitive -b -i - --no-generation-date - -o ${DOS_CURRENT_SOURCE_DIR}\\scanners.c - ${DOS_CURRENT_SOURCE_DIR}\\scanners.re ) -else(MSVC) - add_custom_command( OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/scanners.c - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/scanners.re - COMMAND ${RE2C} --case-insensitive -b -i - --no-generation-date - -o ${CMAKE_CURRENT_SOURCE_DIR}/scanners.c - ${CMAKE_CURRENT_SOURCE_DIR}/scanners.re ) -endif(MSVC) - -include (GenerateExportHeader) - -#add_executable(${PROGRAM} ${PROGRAM_SOURCES}) -#add_compiler_export_flags() -# -## Disable the PUBLIC declarations when compiling the executable: -#set_target_properties(${PROGRAM} PROPERTIES -# COMPILE_FLAGS -DCMARK_STATIC_DEFINE) - -# Check integrity of node structure when compiled as debug: -set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DCMARK_DEBUG_NODES") - -if (${CMAKE_MAJOR_VERSION} GREATER 1 AND ${CMAKE_MINOR_VERSION} GREATER 8) - set(CMAKE_C_VISIBILITY_PRESET hidden) - set(CMAKE_VISIBILITY_INLINES_HIDDEN 1) -elseif(CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden") -endif () - -# SHARED add_library(${LIBRARY} SHARED ${LIBRARY_SOURCES}) -add_library(${LIBRARY} STATIC ${LIBRARY_SOURCES}) -set_target_properties(${LIBRARY} - PROPERTIES OUTPUT_NAME "cmark") - -set_property(TARGET ${LIBRARY} - APPEND PROPERTY MACOSX_RPATH true) - -generate_export_header(${LIBRARY} - BASE_NAME ${PROJECT_NAME}) - -#if (MSVC) -# set_property(TARGET ${PROGRAM} -# APPEND PROPERTY LINK_FLAGS /INCREMENTAL:NO) -#endif(MSVC) - -#install(TARGETS ${PROGRAM} # SHARED ${LIBRARY} -# RUNTIME DESTINATION bin -# LIBRARY DESTINATION lib -# ) - -install(FILES cmark.h ${CMAKE_CURRENT_BINARY_DIR}/cmark_export.h - DESTINATION include - ) - -# Feature tests -include(CheckIncludeFile) -include(CheckCSourceCompiles) -CHECK_INCLUDE_FILE(stdbool.h HAVE_STDBOOL_H) -CHECK_C_SOURCE_COMPILES( - "int main() { __builtin_expect(0,0); return 0; }" - HAVE___BUILTIN_EXPECT) -CHECK_C_SOURCE_COMPILES(" - int f(void) __attribute__ (()); - int main() { return 0; } -" HAVE___ATTRIBUTE__) - -CONFIGURE_FILE( - ${CMAKE_CURRENT_SOURCE_DIR}/config.h.in - ${CMAKE_CURRENT_BINARY_DIR}/config.h) - -# Always compile with warnings -if(MSVC) - # Force to always compile with W4 - if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]") - string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") - else() - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4") - endif() - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4127 /wd4244 /wd4267 /wd4706 /wd4800 /D_CRT_SECURE_NO_WARNINGS") -elseif(CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -std=c99 -pedantic") -endif() - -# Compile as C++ under MSVC -if(MSVC) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /TP") -endif() - -if($ENV{TIMER}) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DTIMER=1") -endif($ENV{TIMER}) diff --git a/outside/commonmark/src/bench.h b/outside/commonmark/src/bench.h deleted file mode 100644 index bbea2c67b..000000000 --- a/outside/commonmark/src/bench.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef CMARK_BENCH_H -#define CMARK_BENCH_H - -#include -#include - -#ifdef TIMER -float _cmark_start_time; -float _cmark_end_time; -float _cmark_save_time; - -#define start_timer() \ - _cmark_save_time = _cmark_start_time; \ - _cmark_start_time = (float)clock()/CLOCKS_PER_SEC - -#define end_timer(M) \ - _cmark_end_time = (float)clock()/CLOCKS_PER_SEC; \ - fprintf(stderr, "[TIME] (%s:%d) %4.f ns " M "\n", __FILE__, \ - __LINE__, (_cmark_end_time - _cmark_start_time) * 1000000); \ - _cmark_start_time = _cmark_save_time; - -#else -#define start_timer() -#define end_timer(M) -#endif - -#endif diff --git a/outside/commonmark/src/blocks.c b/outside/commonmark/src/blocks.c deleted file mode 100644 index 4a0a22842..000000000 --- a/outside/commonmark/src/blocks.c +++ /dev/null @@ -1,897 +0,0 @@ -#include -#include -#include -#include - -#include "config.h" -#include "parser.h" -#include "cmark.h" -#include "node.h" -#include "references.h" -#include "utf8.h" -#include "scanners.h" -#include "inlines.h" -#include "html/houdini.h" -#include "buffer.h" -#include "debug.h" - -#define CODE_INDENT 4 -#define peek_at(i, n) (i)->data[n] - -static void -S_parser_feed(cmark_parser *parser, const unsigned char *buffer, size_t len, - bool eof); - -static void -S_process_line(cmark_parser *parser, const unsigned char *buffer, - size_t bytes); - -static cmark_node* make_block(cmark_node_type tag, int start_line, int start_column) -{ - cmark_node* e; - - e = (cmark_node *)calloc(1, sizeof(*e)); - if(e != NULL) { - e->type = tag; - e->open = true; - e->start_line = start_line; - e->start_column = start_column; - e->end_line = start_line; - strbuf_init(&e->string_content, 32); - } - - return e; -} - -// Create a root document cmark_node. -static cmark_node* make_document() -{ - cmark_node *e = make_block(NODE_DOCUMENT, 1, 1); - return e; -} - -cmark_parser *cmark_parser_new() -{ - cmark_parser *parser = (cmark_parser*)malloc(sizeof(cmark_parser)); - cmark_node *document = make_document(); - strbuf *line = (strbuf*)malloc(sizeof(strbuf)); - strbuf *buf = (strbuf*)malloc(sizeof(strbuf)); - cmark_strbuf_init(line, 256); - cmark_strbuf_init(buf, 0); - - parser->refmap = cmark_reference_map_new(); - parser->root = document; - parser->current = document; - parser->line_number = 0; - parser->curline = line; - parser->linebuf = buf; - - return parser; -} - -void cmark_parser_free(cmark_parser *parser) -{ - cmark_strbuf_free(parser->curline); - free(parser->curline); - cmark_strbuf_free(parser->linebuf); - free(parser->linebuf); - cmark_reference_map_free(parser->refmap); - free(parser); -} - -static void finalize(cmark_parser *parser, cmark_node* b, int line_number); - -// Returns true if line has only space characters, else false. -static bool is_blank(strbuf *s, int offset) -{ - while (offset < s->size) { - switch (s->ptr[offset]) { - case '\n': - return true; - case ' ': - offset++; - break; - default: - return false; - } - } - - return true; -} - -static inline bool can_contain(cmark_node_type parent_type, cmark_node_type child_type) -{ - return ( parent_type == NODE_DOCUMENT || - parent_type == NODE_BLOCK_QUOTE || - parent_type == NODE_LIST_ITEM || - (parent_type == NODE_LIST && child_type == NODE_LIST_ITEM) ); -} - -static inline bool accepts_lines(cmark_node_type block_type) -{ - return (block_type == NODE_PARAGRAPH || - block_type == NODE_HEADER || - block_type == NODE_CODE_BLOCK); -} - -static void add_line(cmark_node* cmark_node, chunk *ch, int offset) -{ - assert(cmark_node->open); - strbuf_put(&cmark_node->string_content, ch->data + offset, ch->len - offset); -} - -static void remove_trailing_blank_lines(strbuf *ln) -{ - int i; - - for (i = ln->size - 1; i >= 0; --i) { - unsigned char c = ln->ptr[i]; - - if (c != ' ' && c != '\t' && c != '\r' && c != '\n') - break; - } - - if (i < 0) { - strbuf_clear(ln); - return; - } - - i = strbuf_strchr(ln, '\n', i); - if (i >= 0) - strbuf_truncate(ln, i); -} - -// Check to see if a cmark_node ends with a blank line, descending -// if needed into lists and sublists. -static bool ends_with_blank_line(cmark_node* cmark_node) -{ - if (cmark_node->last_line_blank) { - return true; - } - if ((cmark_node->type == NODE_LIST || cmark_node->type == NODE_LIST_ITEM) && cmark_node->last_child) { - return ends_with_blank_line(cmark_node->last_child); - } else { - return false; - } -} - -// Break out of all containing lists -static int break_out_of_lists(cmark_parser *parser, cmark_node ** bptr, int line_number) -{ - cmark_node *container = *bptr; - cmark_node *b = parser->root; - // find first containing NODE_LIST: - while (b && b->type != NODE_LIST) { - b = b->last_child; - } - if (b) { - while (container && container != b) { - finalize(parser, container, line_number); - container = container->parent; - } - finalize(parser, b, line_number); - *bptr = b->parent; - } - return 0; -} - - -static void finalize(cmark_parser *parser, cmark_node* b, int line_number) -{ - int firstlinelen; - int pos; - cmark_node* item; - cmark_node* subitem; - - if (!b->open) - return; // don't do anything if the cmark_node is already closed - - b->open = false; - if (line_number > b->start_line) { - b->end_line = line_number - 1; - } else { - b->end_line = line_number; - } - - switch (b->type) { - case NODE_PARAGRAPH: - while (strbuf_at(&b->string_content, 0) == '[' && - (pos = cmark_parse_reference_inline(&b->string_content, parser->refmap))) { - - strbuf_drop(&b->string_content, pos); - } - if (is_blank(&b->string_content, 0)) { - b->type = NODE_REFERENCE_DEF; - } - break; - - case NODE_CODE_BLOCK: - if (!b->as.code.fenced) { // indented code - remove_trailing_blank_lines(&b->string_content); - strbuf_putc(&b->string_content, '\n'); - break; - } else { - - // first line of contents becomes info - firstlinelen = strbuf_strchr(&b->string_content, '\n', 0); - - houdini_unescape_html_f( - &b->as.code.info, - b->string_content.ptr, - firstlinelen - ); - - strbuf_drop(&b->string_content, firstlinelen + 1); - - strbuf_trim(&b->as.code.info); - strbuf_unescape(&b->as.code.info); - break; - } - - case NODE_LIST: // determine tight/loose status - b->as.list.tight = true; // tight by default - item = b->first_child; - - while (item) { - // check for non-final non-empty list item ending with blank line: - if (item->last_line_blank && item->next) { - b->as.list.tight = false; - break; - } - // recurse into children of list item, to see if there are - // spaces between them: - subitem = item->first_child; - while (subitem) { - if (ends_with_blank_line(subitem) && - (item->next || subitem->next)) { - b->as.list.tight = false; - break; - } - subitem = subitem->next; - } - if (!(b->as.list.tight)) { - break; - } - item = item->next; - } - - break; - - default: - break; - } -} - -// Add a cmark_node as child of another. Return pointer to child. -static cmark_node* add_child(cmark_parser *parser, cmark_node* parent, - cmark_node_type block_type, int start_line, int start_column) -{ - assert(parent); - - // if 'parent' isn't the kind of cmark_node that can accept this child, - // then back up til we hit a cmark_node that can. - while (!can_contain(parent->type, block_type)) { - finalize(parser, parent, start_line); - parent = parent->parent; - } - - cmark_node* child = make_block(block_type, start_line, start_column); - child->parent = parent; - - if (parent->last_child) { - parent->last_child->next = child; - child->prev = parent->last_child; - } else { - parent->first_child = child; - child->prev = NULL; - } - parent->last_child = child; - return child; -} - - -typedef struct BlockStack { - struct BlockStack *previous; - cmark_node *next_sibling; -} block_stack; - -// Walk through cmark_node and all children, recursively, parsing -// string content into inline content where appropriate. -static void process_inlines(cmark_node* cur, cmark_reference_map *refmap) -{ - block_stack* stack = NULL; - block_stack* newstack = NULL; - - while (cur != NULL) { - switch (cur->type) { - case NODE_PARAGRAPH: - case NODE_HEADER: - cmark_parse_inlines(cur, refmap); - break; - - default: - break; - } - - if (cur->first_child) { - newstack = (block_stack*)malloc(sizeof(block_stack)); - if (newstack == NULL) break; - newstack->previous = stack; - stack = newstack; - stack->next_sibling = cur->next; - cur = cur->first_child; - } else { - cur = cur->next; - } - - while (cur == NULL && stack != NULL) { - cur = stack->next_sibling; - newstack = stack->previous; - free(stack); - stack = newstack; - } - } - while (stack != NULL) { - newstack = stack->previous; - free(stack); - stack = newstack; - } -} - -// Attempts to parse a list item marker (bullet or enumerated). -// On success, returns length of the marker, and populates -// data with the details. On failure, returns 0. -static int parse_list_marker(chunk *input, int pos, cmark_list **dataptr) -{ - unsigned char c; - int startpos; - cmark_list *data; - - startpos = pos; - c = peek_at(input, pos); - - if ((c == '*' || c == '-' || c == '+') && !scan_hrule(input, pos)) { - pos++; - if (!isspace(peek_at(input, pos))) { - return 0; - } - data = (cmark_list *)calloc(1, sizeof(*data)); - if(data == NULL) { - return 0; - } else { - data->marker_offset = 0; // will be adjusted later - data->list_type = CMARK_BULLET_LIST; - data->bullet_char = c; - data->start = 1; - data->delimiter = CMARK_PERIOD_DELIM; - data->tight = false; - } - } else if (isdigit(c)) { - int start = 0; - - do { - start = (10 * start) + (peek_at(input, pos) - '0'); - pos++; - } while (isdigit(peek_at(input, pos))); - - c = peek_at(input, pos); - if (c == '.' || c == ')') { - pos++; - if (!isspace(peek_at(input, pos))) { - return 0; - } - data = (cmark_list *)calloc(1, sizeof(*data)); - if(data == NULL) { - return 0; - } else { - data->marker_offset = 0; // will be adjusted later - data->list_type = CMARK_ORDERED_LIST; - data->bullet_char = 0; - data->start = start; - data->delimiter = (c == '.' ? CMARK_PERIOD_DELIM : CMARK_PAREN_DELIM); - data->tight = false; - } - } else { - return 0; - } - - } else { - return 0; - } - - *dataptr = data; - return (pos - startpos); -} - -// Return 1 if list item belongs in list, else 0. -static int lists_match(cmark_list *list_data, cmark_list *item_data) -{ - return (list_data->list_type == item_data->list_type && - list_data->delimiter == item_data->delimiter && - // list_data->marker_offset == item_data.marker_offset && - list_data->bullet_char == item_data->bullet_char); -} - -static cmark_node *finalize_document(cmark_parser *parser) -{ - while (parser->current != parser->root) { - finalize(parser, parser->current, parser->line_number); - parser->current = parser->current->parent; - } - - finalize(parser, parser->root, parser->line_number); - process_inlines(parser->root, parser->refmap); - - return parser->root; -} - -cmark_node *cmark_parse_file(FILE *f) -{ - unsigned char buffer[4096]; - cmark_parser *parser = cmark_parser_new(); - size_t bytes; - cmark_node *document; - - while ((bytes = fread(buffer, 1, sizeof(buffer), f)) > 0) { - bool eof = bytes < sizeof(buffer); - S_parser_feed(parser, buffer, bytes, eof); - if (eof) { - break; - } - } - - document = cmark_parser_finish(parser); - cmark_parser_free(parser); - return document; -} - -cmark_node *cmark_parse_document(const char *buffer, size_t len) -{ - cmark_parser *parser = cmark_parser_new(); - cmark_node *document; - - S_parser_feed(parser, (const unsigned char *)buffer, len, true); - - document = cmark_parser_finish(parser); - cmark_parser_free(parser); - return document; -} - -void -cmark_parser_feed(cmark_parser *parser, const char *buffer, size_t len) -{ - S_parser_feed(parser, (const unsigned char *)buffer, len, false); -} - -static void -S_parser_feed(cmark_parser *parser, const unsigned char *buffer, size_t len, - bool eof) -{ - const unsigned char *end = buffer + len; - - while (buffer < end) { - const unsigned char *eol - = (const unsigned char *)memchr(buffer, '\n', - end - buffer); - size_t line_len; - - if (eol) { - line_len = eol + 1 - buffer; - } - else if (eof) { - line_len = end - buffer; - } - else { - strbuf_put(parser->linebuf, buffer, end - buffer); - break; - } - - if (parser->linebuf->size > 0) { - strbuf_put(parser->linebuf, buffer, line_len); - S_process_line(parser, parser->linebuf->ptr, - parser->linebuf->size); - strbuf_clear(parser->linebuf); - } - else { - S_process_line(parser, buffer, line_len); - } - - buffer += line_len; - } -} - -static void chop_trailing_hashtags(chunk *ch) -{ - int n, orig_n; - - chunk_rtrim(ch); - orig_n = n = ch->len - 1; - - // if string ends in space followed by #s, remove these: - while (n >= 0 && peek_at(ch, n) == '#') - n--; - - // Check for a be a space before the final #s: - if (n != orig_n && n >= 0 && peek_at(ch, n) == ' ') { - ch->len = n; - chunk_rtrim(ch); - } -} - -static void -S_process_line(cmark_parser *parser, const unsigned char *buffer, size_t bytes) -{ - cmark_node* last_matched_container; - int offset = 0; - int matched = 0; - int lev = 0; - int i; - cmark_list *data = NULL; - bool all_matched = true; - cmark_node* container; - cmark_node* cur = parser->current; - bool blank = false; - int first_nonspace; - int indent; - chunk input; - - utf8proc_detab(parser->curline, buffer, bytes); - - // Add a newline to the end if not present: - // TODO this breaks abstraction: - if (parser->curline->ptr[parser->curline->size - 1] != '\n') { - strbuf_putc(parser->curline, '\n'); - } - input.data = parser->curline->ptr; - input.len = parser->curline->size; - - // container starts at the document root. - container = parser->root; - - parser->line_number++; - - // for each containing cmark_node, try to parse the associated line start. - // bail out on failure: container will point to the last matching cmark_node. - - while (container->last_child && container->last_child->open) { - container = container->last_child; - - first_nonspace = offset; - while (peek_at(&input, first_nonspace) == ' ') { - first_nonspace++; - } - - indent = first_nonspace - offset; - blank = peek_at(&input, first_nonspace) == '\n'; - - if (container->type == NODE_BLOCK_QUOTE) { - matched = indent <= 3 && peek_at(&input, first_nonspace) == '>'; - if (matched) { - offset = first_nonspace + 1; - if (peek_at(&input, offset) == ' ') - offset++; - } else { - all_matched = false; - } - - } else if (container->type == NODE_LIST_ITEM) { - - if (indent >= container->as.list.marker_offset + - container->as.list.padding) { - offset += container->as.list.marker_offset + - container->as.list.padding; - } else if (blank) { - offset = first_nonspace; - } else { - all_matched = false; - } - - } else if (container->type == NODE_CODE_BLOCK) { - - if (!container->as.code.fenced) { // indented - if (indent >= CODE_INDENT) { - offset += CODE_INDENT; - } else if (blank) { - offset = first_nonspace; - } else { - all_matched = false; - } - } else { - // skip optional spaces of fence offset - i = container->as.code.fence_offset; - while (i > 0 && peek_at(&input, offset) == ' ') { - offset++; - i--; - } - } - - } else if (container->type == NODE_HEADER) { - - // a header can never contain more than one line - all_matched = false; - if (blank) { - container->last_line_blank = true; - } - - } else if (container->type == NODE_HTML) { - - if (blank) { - container->last_line_blank = true; - all_matched = false; - } - - } else if (container->type == NODE_PARAGRAPH) { - - if (blank) { - container->last_line_blank = true; - all_matched = false; - } - - } - - if (!all_matched) { - container = container->parent; // back up to last matching cmark_node - break; - } - } - - last_matched_container = container; - - // check to see if we've hit 2nd blank line, break out of list: - if (blank && container->last_line_blank) { - break_out_of_lists(parser, &container, parser->line_number); - } - - // unless last matched container is code cmark_node, try new container starts: - while (container->type != NODE_CODE_BLOCK && - container->type != NODE_HTML) { - - first_nonspace = offset; - while (peek_at(&input, first_nonspace) == ' ') - first_nonspace++; - - indent = first_nonspace - offset; - blank = peek_at(&input, first_nonspace) == '\n'; - - if (indent >= CODE_INDENT) { - if (cur->type != NODE_PARAGRAPH && !blank) { - offset += CODE_INDENT; - container = add_child(parser, container, NODE_CODE_BLOCK, parser->line_number, offset + 1); - container->as.code.fenced = false; - container->as.code.fence_char = 0; - container->as.code.fence_length = 0; - container->as.code.fence_offset = 0; - strbuf_init(&container->as.code.info, 0); - } else { // indent > 4 in lazy line - break; - } - - } else if (peek_at(&input, first_nonspace) == '>') { - - offset = first_nonspace + 1; - // optional following character - if (peek_at(&input, offset) == ' ') - offset++; - container = add_child(parser, container, NODE_BLOCK_QUOTE, parser->line_number, offset + 1); - - } else if ((matched = scan_atx_header_start(&input, first_nonspace))) { - - offset = first_nonspace + matched; - container = add_child(parser, container, NODE_HEADER, parser->line_number, offset + 1); - - int hashpos = chunk_strchr(&input, '#', first_nonspace); - int level = 0; - - while (peek_at(&input, hashpos) == '#') { - level++; - hashpos++; - } - container->as.header.level = level; - container->as.header.setext = false; - - } else if ((matched = scan_open_code_fence(&input, first_nonspace))) { - - container = add_child(parser, container, NODE_CODE_BLOCK, parser->line_number, first_nonspace + 1); - container->as.code.fenced = true; - container->as.code.fence_char = peek_at(&input, first_nonspace); - container->as.code.fence_length = matched; - container->as.code.fence_offset = first_nonspace - offset; - strbuf_init(&container->as.code.info, 0); - offset = first_nonspace + matched; - - } else if ((matched = scan_html_block_tag(&input, first_nonspace))) { - - container = add_child(parser, container, NODE_HTML, parser->line_number, first_nonspace + 1); - // note, we don't adjust offset because the tag is part of the text - - } else if (container->type == NODE_PARAGRAPH && - (lev = scan_setext_header_line(&input, first_nonspace)) && - // check that there is only one line in the paragraph: - strbuf_strrchr(&container->string_content, '\n', - strbuf_len(&container->string_content) - 2) < 0) { - - container->type = NODE_HEADER; - container->as.header.level = lev; - container->as.header.setext = true; - offset = input.len - 1; - - } else if (!(container->type == NODE_PARAGRAPH && !all_matched) && - (matched = scan_hrule(&input, first_nonspace))) { - - // it's only now that we know the line is not part of a setext header: - container = add_child(parser, container, NODE_HRULE, parser->line_number, first_nonspace + 1); - finalize(parser, container, parser->line_number); - container = container->parent; - offset = input.len - 1; - - } else if ((matched = parse_list_marker(&input, first_nonspace, &data))) { - - // compute padding: - offset = first_nonspace + matched; - i = 0; - while (i <= 5 && peek_at(&input, offset + i) == ' ') { - i++; - } - // i = number of spaces after marker, up to 5 - if (i >= 5 || i < 1 || peek_at(&input, offset) == '\n') { - data->padding = matched + 1; - if (i > 0) { - offset += 1; - } - } else { - data->padding = matched + i; - offset += i; - } - - // check container; if it's a list, see if this list item - // can continue the list; otherwise, create a list container. - - data->marker_offset = indent; - - if (container->type != NODE_LIST || - !lists_match(&container->as.list, data)) { - container = add_child(parser, container, NODE_LIST, parser->line_number, - first_nonspace + 1); - - memcpy(&container->as.list, data, sizeof(*data)); - } - - // add the list item - container = add_child(parser, container, NODE_LIST_ITEM, parser->line_number, - first_nonspace + 1); - /* TODO: static */ - memcpy(&container->as.list, data, sizeof(*data)); - free(data); - } else { - break; - } - - if (accepts_lines(container->type)) { - // if it's a line container, it can't contain other containers - break; - } - } - - // what remains at offset is a text line. add the text to the - // appropriate container. - - first_nonspace = offset; - while (peek_at(&input, first_nonspace) == ' ') - first_nonspace++; - - indent = first_nonspace - offset; - blank = peek_at(&input, first_nonspace) == '\n'; - - // cmark_node quote lines are never blank as they start with > - // and we don't count blanks in fenced code for purposes of tight/loose - // lists or breaking out of lists. we also don't set last_line_blank - // on an empty list item. - container->last_line_blank = (blank && - container->type != NODE_BLOCK_QUOTE && - container->type != NODE_HEADER && - (container->type != NODE_CODE_BLOCK && - container->as.code.fenced) && - !(container->type == NODE_LIST_ITEM && - container->first_child == NULL && - container->start_line == parser->line_number)); - - cmark_node *cont = container; - while (cont->parent) { - cont->parent->last_line_blank = false; - cont = cont->parent; - } - - if (cur != last_matched_container && - container == last_matched_container && - !blank && - cur->type == NODE_PARAGRAPH && - strbuf_len(&cur->string_content) > 0) { - - add_line(cur, &input, offset); - - } else { // not a lazy continuation - - // finalize any blocks that were not matched and set cur to container: - while (cur != last_matched_container) { - finalize(parser, cur, parser->line_number); - cur = cur->parent; - assert(cur != NULL); - } - - if (container->type == NODE_CODE_BLOCK && - !container->as.code.fenced) { - - add_line(container, &input, offset); - - } else if (container->type == NODE_CODE_BLOCK && - container->as.code.fenced) { - matched = 0; - - if (indent <= 3 && - peek_at(&input, first_nonspace) == container->as.code.fence_char) { - int fence_len = scan_close_code_fence(&input, first_nonspace); - if (fence_len > container->as.code.fence_length) - matched = 1; - } - - if (matched) { - // if closing fence, don't add line to container; instead, close it: - finalize(parser, container, parser->line_number); - container = container->parent; // back up to parent - } else { - add_line(container, &input, offset); - } - - } else if (container->type == NODE_HTML) { - - add_line(container, &input, offset); - - } else if (blank) { - - // ??? do nothing - - } else if (container->type == NODE_HEADER) { - - chop_trailing_hashtags(&input); - add_line(container, &input, first_nonspace); - finalize(parser, container, parser->line_number); - container = container->parent; - - } else if (accepts_lines(container->type)) { - - add_line(container, &input, first_nonspace); - - } else if (container->type != NODE_HRULE && - container->type != NODE_HEADER) { - - // create paragraph container for line - container = add_child(parser, container, NODE_PARAGRAPH, parser->line_number, first_nonspace + 1); - add_line(container, &input, first_nonspace); - - } else { - assert(false); - } - - parser->current = container; - } - strbuf_clear(parser->curline); - -} - -cmark_node *cmark_parser_finish(cmark_parser *parser) -{ - if (parser->linebuf->size) { - S_process_line(parser, parser->linebuf->ptr, - parser->linebuf->size); - strbuf_clear(parser->linebuf); - } - - finalize_document(parser); - strbuf_free(parser->curline); -#if CMARK_DEBUG_NODES - if (cmark_node_check(parser->root, stderr)) { - abort(); - } -#endif - return parser->root; -} diff --git a/outside/commonmark/src/buffer.c b/outside/commonmark/src/buffer.c deleted file mode 100644 index 45b69846e..000000000 --- a/outside/commonmark/src/buffer.c +++ /dev/null @@ -1,375 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - -#include "buffer.h" - -/* Used as default value for strbuf->ptr so that people can always - * assume ptr is non-NULL and zero terminated even for new strbufs. - */ -unsigned char cmark_strbuf__initbuf[1]; -unsigned char cmark_strbuf__oom[1]; - -#define ENSURE_SIZE(b, d) \ - if ((d) > buf->asize && strbuf_grow(b, (d)) < 0) \ - return -1; - -#ifndef MIN -#define MIN(x,y) ((xasize = 0; - buf->size = 0; - buf->ptr = cmark_strbuf__initbuf; - - if (initial_size) - cmark_strbuf_grow(buf, initial_size); -} - -int cmark_strbuf_try_grow(strbuf *buf, int target_size, bool mark_oom) -{ - unsigned char *new_ptr; - int new_size; - - if (buf->ptr == cmark_strbuf__oom) - return -1; - - if (target_size <= buf->asize) - return 0; - - if (buf->asize == 0) { - new_size = target_size; - new_ptr = NULL; - } else { - new_size = buf->asize; - new_ptr = buf->ptr; - } - - /* grow the buffer size by 1.5, until it's big enough - * to fit our target size */ - while (new_size < target_size) - new_size = (new_size << 1) - (new_size >> 1); - - /* round allocation up to multiple of 8 */ - new_size = (new_size + 7) & ~7; - - new_ptr = (unsigned char *)realloc(new_ptr, new_size); - - if (!new_ptr) { - if (mark_oom) - buf->ptr = cmark_strbuf__oom; - return -1; - } - - buf->asize = new_size; - buf->ptr = new_ptr; - - /* truncate the existing buffer size if necessary */ - if (buf->size >= buf->asize) - buf->size = buf->asize - 1; - buf->ptr[buf->size] = '\0'; - - return 0; -} - -int cmark_strbuf_grow(cmark_strbuf *buf, int target_size) -{ - return cmark_strbuf_try_grow(buf, target_size, true); -} - -bool cmark_strbuf_oom(const cmark_strbuf *buf) -{ - return (buf->ptr == cmark_strbuf__oom); -} - -size_t cmark_strbuf_len(const cmark_strbuf *buf) -{ - return buf->size; -} - -void cmark_strbuf_free(strbuf *buf) -{ - if (!buf) return; - - if (buf->ptr != cmark_strbuf__initbuf && buf->ptr != cmark_strbuf__oom) - free(buf->ptr); - - cmark_strbuf_init(buf, 0); -} - -void cmark_strbuf_clear(strbuf *buf) -{ - buf->size = 0; - - if (buf->asize > 0) - buf->ptr[0] = '\0'; -} - -int cmark_strbuf_set(strbuf *buf, const unsigned char *data, int len) -{ - if (len <= 0 || data == NULL) { - cmark_strbuf_clear(buf); - } else { - if (data != buf->ptr) { - ENSURE_SIZE(buf, len + 1); - memmove(buf->ptr, data, len); - } - buf->size = len; - buf->ptr[buf->size] = '\0'; - } - return 0; -} - -int cmark_strbuf_sets(strbuf *buf, const char *string) -{ - return cmark_strbuf_set(buf, - (const unsigned char *)string, - string ? strlen(string) : 0); -} - -int cmark_strbuf_putc(strbuf *buf, int c) -{ - ENSURE_SIZE(buf, buf->size + 2); - buf->ptr[buf->size++] = c; - buf->ptr[buf->size] = '\0'; - return 0; -} - -int cmark_strbuf_put(strbuf *buf, const unsigned char *data, int len) -{ - if (len <= 0) - return 0; - - ENSURE_SIZE(buf, buf->size + len + 1); - memmove(buf->ptr + buf->size, data, len); - buf->size += len; - buf->ptr[buf->size] = '\0'; - return 0; -} - -int cmark_strbuf_puts(strbuf *buf, const char *string) -{ - return cmark_strbuf_put(buf, (const unsigned char *)string, strlen(string)); -} - -int cmark_strbuf_vprintf(strbuf *buf, const char *format, va_list ap) -{ - const int expected_size = buf->size + (strlen(format) * 2); - int len; - - ENSURE_SIZE(buf, expected_size); - - while (1) { - len = vsnprintf( - (char *)buf->ptr + buf->size, - buf->asize - buf->size, - format, ap - ); - - if (len < 0) { - free(buf->ptr); - buf->ptr = cmark_strbuf__oom; - return -1; - } - - if (len + 1 <= buf->asize - buf->size) { - buf->size += len; - break; - } - - ENSURE_SIZE(buf, buf->size + len + 1); - } - - return 0; -} - -int cmark_strbuf_printf(strbuf *buf, const char *format, ...) -{ - int r; - va_list ap; - - va_start(ap, format); - r = cmark_strbuf_vprintf(buf, format, ap); - va_end(ap); - - return r; -} - -void cmark_strbuf_copy_cstr(char *data, int datasize, const strbuf *buf) -{ - int copylen; - - assert(data && datasize && buf); - - data[0] = '\0'; - - if (buf->size == 0 || buf->asize <= 0) - return; - - copylen = buf->size; - if (copylen > datasize - 1) - copylen = datasize - 1; - memmove(data, buf->ptr, copylen); - data[copylen] = '\0'; -} - -void cmark_strbuf_swap(strbuf *buf_a, strbuf *buf_b) -{ - strbuf t = *buf_a; - *buf_a = *buf_b; - *buf_b = t; -} - -unsigned char *cmark_strbuf_detach(strbuf *buf) -{ - unsigned char *data = buf->ptr; - - if (buf->asize == 0 || buf->ptr == cmark_strbuf__oom) { - /* return an empty string */ - return (unsigned char *)calloc(1, 1); - } - - cmark_strbuf_init(buf, 0); - return data; -} - -void cmark_strbuf_attach(strbuf *buf, unsigned char *ptr, int asize) -{ - cmark_strbuf_free(buf); - - if (ptr) { - buf->ptr = ptr; - buf->size = strlen((char *)ptr); - if (asize) - buf->asize = (asize < buf->size) ? buf->size + 1 : asize; - else /* pass 0 to fall back on strlen + 1 */ - buf->asize = buf->size + 1; - } else { - cmark_strbuf_grow(buf, asize); - } -} - -int cmark_strbuf_cmp(const strbuf *a, const strbuf *b) -{ - int result = memcmp(a->ptr, b->ptr, MIN(a->size, b->size)); - return (result != 0) ? result : - (a->size < b->size) ? -1 : (a->size > b->size) ? 1 : 0; -} - -int cmark_strbuf_strchr(const strbuf *buf, int c, int pos) -{ - const unsigned char *p = (unsigned char *)memchr(buf->ptr + pos, c, buf->size - pos); - if (!p) - return -1; - - return (int)(p - (const unsigned char *)buf->ptr); -} - -int cmark_strbuf_strrchr(const strbuf *buf, int c, int pos) -{ - int i; - - for (i = pos; i >= 0; i--) { - if (buf->ptr[i] == (unsigned char) c) - return i; - } - - return -1; -} - -void cmark_strbuf_truncate(strbuf *buf, int len) -{ - if (len < buf->size) { - buf->size = len; - buf->ptr[buf->size] = '\0'; - } -} - -void cmark_strbuf_drop(strbuf *buf, int n) -{ - if (n > 0) { - buf->size = buf->size - n; - if (buf->size) - memmove(buf->ptr, buf->ptr + n, buf->size); - - buf->ptr[buf->size] = '\0'; - } -} - -void cmark_strbuf_rtrim(strbuf *buf) -{ - if (!buf->size) - return; - - while (buf->size > 0) { - if (!isspace(buf->ptr[buf->size - 1])) - break; - - buf->size--; - } - - buf->ptr[buf->size] = '\0'; -} - -void cmark_strbuf_trim(strbuf *buf) -{ - int i = 0; - - if (!buf->size) - return; - - while (i < buf->size && isspace(buf->ptr[i])) - i++; - - cmark_strbuf_drop(buf, i); - - cmark_strbuf_rtrim(buf); -} - -// Destructively modify string, collapsing consecutive -// space and newline characters into a single space. -void cmark_strbuf_normalize_whitespace(strbuf *s) -{ - bool last_char_was_space = false; - int r, w; - - for (r = 0, w = 0; r < s->size; ++r) { - switch (s->ptr[r]) { - case ' ': - case '\n': - if (last_char_was_space) - break; - - s->ptr[w++] = ' '; - last_char_was_space = true; - break; - - default: - s->ptr[w++] = s->ptr[r]; - last_char_was_space = false; - } - } - - cmark_strbuf_truncate(s, w); -} - -// Destructively unescape a string: remove backslashes before punctuation chars. -extern void cmark_strbuf_unescape(strbuf *buf) -{ - int r, w; - - for (r = 0, w = 0; r < buf->size; ++r) { - if (buf->ptr[r] == '\\' && ispunct(buf->ptr[r + 1])) - continue; - - buf->ptr[w++] = buf->ptr[r]; - } - - cmark_strbuf_truncate(buf, w); -} diff --git a/outside/commonmark/src/buffer.h b/outside/commonmark/src/buffer.h deleted file mode 100644 index 7401b22fb..000000000 --- a/outside/commonmark/src/buffer.h +++ /dev/null @@ -1,177 +0,0 @@ -#ifndef CMARK_BUFFER_H -#define CMARK_BUFFER_H - -#include -#include -#include "config.h" -#include "cmark_export.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct { - unsigned char *ptr; - int asize, size; -} cmark_strbuf; - -CMARK_EXPORT -extern unsigned char cmark_strbuf__initbuf[]; - -CMARK_EXPORT -extern unsigned char cmark_strbuf__oom[]; - -#define CMARK_GH_BUF_INIT { cmark_strbuf__initbuf, 0, 0 } - -/** - * Initialize a strbuf structure. - * - * For the cases where GH_BUF_INIT cannot be used to do static - * initialization. - */ -CMARK_EXPORT -void cmark_strbuf_init(cmark_strbuf *buf, int initial_size); - -/** - * Attempt to grow the buffer to hold at least `target_size` bytes. - * - * If the allocation fails, this will return an error. If mark_oom is true, - * this will mark the buffer as invalid for future operations; if false, - * existing buffer content will be preserved, but calling code must handle - * that buffer was not expanded. - */ -CMARK_EXPORT -int cmark_strbuf_try_grow(cmark_strbuf *buf, int target_size, bool mark_oom); - -/** - * Grow the buffer to hold at least `target_size` bytes. - * - * If the allocation fails, this will return an error and the buffer will be - * marked as invalid for future operations, invaliding contents. - * - * @return 0 on success or -1 on failure - */ -CMARK_EXPORT -int cmark_strbuf_grow(cmark_strbuf *buf, int target_size); - -CMARK_EXPORT -void cmark_strbuf_free(cmark_strbuf *buf); -CMARK_EXPORT -void cmark_strbuf_swap(cmark_strbuf *buf_a, cmark_strbuf *buf_b); - -/** - * Test if there have been any reallocation failures with this strbuf. - * - * Any function that writes to a strbuf can fail due to memory allocation - * issues. If one fails, the strbuf will be marked with an OOM error and - * further calls to modify the buffer will fail. Check strbuf_oom() at the - * end of your sequence and it will be true if you ran out of memory at any - * point with that buffer. - * - * @return false if no error, true if allocation error - */ -CMARK_EXPORT -bool cmark_strbuf_oom(const cmark_strbuf *buf); - -CMARK_EXPORT -size_t cmark_strbuf_len(const cmark_strbuf *buf); - -CMARK_EXPORT -int cmark_strbuf_cmp(const cmark_strbuf *a, const cmark_strbuf *b); - -CMARK_EXPORT -void cmark_strbuf_attach(cmark_strbuf *buf, unsigned char *ptr, int asize); -CMARK_EXPORT -unsigned char *cmark_strbuf_detach(cmark_strbuf *buf); -CMARK_EXPORT -void cmark_strbuf_copy_cstr(char *data, int datasize, const cmark_strbuf *buf); - -static inline const char *cmark_strbuf_cstr(const cmark_strbuf *buf) -{ - return (char *)buf->ptr; -} - -#define cmark_strbuf_at(buf, n) ((buf)->ptr[n]) - -/* - * Functions below that return int value error codes will return 0 on - * success or -1 on failure (which generally means an allocation failed). - * Using a strbuf where the allocation has failed with result in -1 from - * all further calls using that buffer. As a result, you can ignore the - * return code of these functions and call them in a series then just call - * strbuf_oom at the end. - */ -CMARK_EXPORT -int cmark_strbuf_set(cmark_strbuf *buf, const unsigned char *data, int len); -CMARK_EXPORT -int cmark_strbuf_sets(cmark_strbuf *buf, const char *string); -CMARK_EXPORT -int cmark_strbuf_putc(cmark_strbuf *buf, int c); -CMARK_EXPORT -int cmark_strbuf_put(cmark_strbuf *buf, const unsigned char *data, int len); -CMARK_EXPORT -int cmark_strbuf_puts(cmark_strbuf *buf, const char *string); -CMARK_EXPORT -int cmark_strbuf_printf(cmark_strbuf *buf, const char *format, ...) - CMARK_ATTRIBUTE((format (printf, 2, 3))); -CMARK_EXPORT -int cmark_strbuf_vprintf(cmark_strbuf *buf, const char *format, va_list ap); -CMARK_EXPORT -void cmark_strbuf_clear(cmark_strbuf *buf); - -CMARK_EXPORT -int cmark_strbuf_strchr(const cmark_strbuf *buf, int c, int pos); -CMARK_EXPORT -int cmark_strbuf_strrchr(const cmark_strbuf *buf, int c, int pos); -CMARK_EXPORT -void cmark_strbuf_drop(cmark_strbuf *buf, int n); -CMARK_EXPORT -void cmark_strbuf_truncate(cmark_strbuf *buf, int len); -CMARK_EXPORT -void cmark_strbuf_rtrim(cmark_strbuf *buf); -CMARK_EXPORT -void cmark_strbuf_trim(cmark_strbuf *buf); -CMARK_EXPORT -void cmark_strbuf_normalize_whitespace(cmark_strbuf *s); -CMARK_EXPORT -void cmark_strbuf_unescape(cmark_strbuf *s); - -// Convenience macros -#define strbuf cmark_strbuf -#define strbuf__initbuf cmark_strbuf__initbuf -#define strbuf__oom cmark_strbuf__oom -#define GH_BUF_INIT CMARK_GH_BUF_INIT -#define strbuf_init cmark_strbuf_init -#define strbuf_try_grow cmark_strbuf_try_grow -#define strbuf_grow cmark_strbuf_grow -#define strbuf_free cmark_strbuf_free -#define strbuf_swap cmark_strbuf_swap -#define strbuf_oom cmark_strbuf_oom -#define strbuf_len cmark_strbuf_len -#define strbuf_cmp cmark_strbuf_cmp -#define strbuf_attach cmark_strbuf_attach -#define strbuf_detach cmark_strbuf_detach -#define strbuf_copy_cstr cmark_strbuf_copy_cstr -#define strbuf_at cmark_strbuf_at -#define strbuf_set cmark_strbuf_set -#define strbuf_sets cmark_strbuf_sets -#define strbuf_putc cmark_strbuf_putc -#define strbuf_put cmark_strbuf_put -#define strbuf_puts cmark_strbuf_puts -#define strbuf_printf cmark_strbuf_printf -#define strbuf_vprintf cmark_strbuf_vprintf -#define strbuf_clear cmark_strbuf_clear -#define strbuf_strchr cmark_strbuf_strchr -#define strbuf_strrchr cmark_strbuf_strrchr -#define strbuf_drop cmark_strbuf_drop -#define strbuf_truncate cmark_strbuf_truncate -#define strbuf_rtrim cmark_strbuf_rtrim -#define strbuf_trim cmark_strbuf_trim -#define strbuf_normalize_whitespace cmark_strbuf_normalize_whitespace -#define strbuf_unescape cmark_strbuf_unescape - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/outside/commonmark/src/case_fold_switch.inc b/outside/commonmark/src/case_fold_switch.inc deleted file mode 100644 index 70fdd755f..000000000 --- a/outside/commonmark/src/case_fold_switch.inc +++ /dev/null @@ -1,2637 +0,0 @@ - switch (c) { - case 0x0041: - bufpush(0x0061); - break; - case 0x0042: - bufpush(0x0062); - break; - case 0x0043: - bufpush(0x0063); - break; - case 0x0044: - bufpush(0x0064); - break; - case 0x0045: - bufpush(0x0065); - break; - case 0x0046: - bufpush(0x0066); - break; - case 0x0047: - bufpush(0x0067); - break; - case 0x0048: - bufpush(0x0068); - break; - case 0x0049: - bufpush(0x0069); - break; - case 0x004A: - bufpush(0x006A); - break; - case 0x004B: - bufpush(0x006B); - break; - case 0x004C: - bufpush(0x006C); - break; - case 0x004D: - bufpush(0x006D); - break; - case 0x004E: - bufpush(0x006E); - break; - case 0x004F: - bufpush(0x006F); - break; - case 0x0050: - bufpush(0x0070); - break; - case 0x0051: - bufpush(0x0071); - break; - case 0x0052: - bufpush(0x0072); - break; - case 0x0053: - bufpush(0x0073); - break; - case 0x0054: - bufpush(0x0074); - break; - case 0x0055: - bufpush(0x0075); - break; - case 0x0056: - bufpush(0x0076); - break; - case 0x0057: - bufpush(0x0077); - break; - case 0x0058: - bufpush(0x0078); - break; - case 0x0059: - bufpush(0x0079); - break; - case 0x005A: - bufpush(0x007A); - break; - case 0x00B5: - bufpush(0x03BC); - break; - case 0x00C0: - bufpush(0x00E0); - break; - case 0x00C1: - bufpush(0x00E1); - break; - case 0x00C2: - bufpush(0x00E2); - break; - case 0x00C3: - bufpush(0x00E3); - break; - case 0x00C4: - bufpush(0x00E4); - break; - case 0x00C5: - bufpush(0x00E5); - break; - case 0x00C6: - bufpush(0x00E6); - break; - case 0x00C7: - bufpush(0x00E7); - break; - case 0x00C8: - bufpush(0x00E8); - break; - case 0x00C9: - bufpush(0x00E9); - break; - case 0x00CA: - bufpush(0x00EA); - break; - case 0x00CB: - bufpush(0x00EB); - break; - case 0x00CC: - bufpush(0x00EC); - break; - case 0x00CD: - bufpush(0x00ED); - break; - case 0x00CE: - bufpush(0x00EE); - break; - case 0x00CF: - bufpush(0x00EF); - break; - case 0x00D0: - bufpush(0x00F0); - break; - case 0x00D1: - bufpush(0x00F1); - break; - case 0x00D2: - bufpush(0x00F2); - break; - case 0x00D3: - bufpush(0x00F3); - break; - case 0x00D4: - bufpush(0x00F4); - break; - case 0x00D5: - bufpush(0x00F5); - break; - case 0x00D6: - bufpush(0x00F6); - break; - case 0x00D8: - bufpush(0x00F8); - break; - case 0x00D9: - bufpush(0x00F9); - break; - case 0x00DA: - bufpush(0x00FA); - break; - case 0x00DB: - bufpush(0x00FB); - break; - case 0x00DC: - bufpush(0x00FC); - break; - case 0x00DD: - bufpush(0x00FD); - break; - case 0x00DE: - bufpush(0x00FE); - break; - case 0x00DF: - bufpush(0x0073); - bufpush(0x0073); - break; - case 0x0100: - bufpush(0x0101); - break; - case 0x0102: - bufpush(0x0103); - break; - case 0x0104: - bufpush(0x0105); - break; - case 0x0106: - bufpush(0x0107); - break; - case 0x0108: - bufpush(0x0109); - break; - case 0x010A: - bufpush(0x010B); - break; - case 0x010C: - bufpush(0x010D); - break; - case 0x010E: - bufpush(0x010F); - break; - case 0x0110: - bufpush(0x0111); - break; - case 0x0112: - bufpush(0x0113); - break; - case 0x0114: - bufpush(0x0115); - break; - case 0x0116: - bufpush(0x0117); - break; - case 0x0118: - bufpush(0x0119); - break; - case 0x011A: - bufpush(0x011B); - break; - case 0x011C: - bufpush(0x011D); - break; - case 0x011E: - bufpush(0x011F); - break; - case 0x0120: - bufpush(0x0121); - break; - case 0x0122: - bufpush(0x0123); - break; - case 0x0124: - bufpush(0x0125); - break; - case 0x0126: - bufpush(0x0127); - break; - case 0x0128: - bufpush(0x0129); - break; - case 0x012A: - bufpush(0x012B); - break; - case 0x012C: - bufpush(0x012D); - break; - case 0x012E: - bufpush(0x012F); - break; - case 0x0130: - bufpush(0x0069); - bufpush(0x0307); - break; - case 0x0132: - bufpush(0x0133); - break; - case 0x0134: - bufpush(0x0135); - break; - case 0x0136: - bufpush(0x0137); - break; - case 0x0139: - bufpush(0x013A); - break; - case 0x013B: - bufpush(0x013C); - break; - case 0x013D: - bufpush(0x013E); - break; - case 0x013F: - bufpush(0x0140); - break; - case 0x0141: - bufpush(0x0142); - break; - case 0x0143: - bufpush(0x0144); - break; - case 0x0145: - bufpush(0x0146); - break; - case 0x0147: - bufpush(0x0148); - break; - case 0x0149: - bufpush(0x02BC); - bufpush(0x006E); - break; - case 0x014A: - bufpush(0x014B); - break; - case 0x014C: - bufpush(0x014D); - break; - case 0x014E: - bufpush(0x014F); - break; - case 0x0150: - bufpush(0x0151); - break; - case 0x0152: - bufpush(0x0153); - break; - case 0x0154: - bufpush(0x0155); - break; - case 0x0156: - bufpush(0x0157); - break; - case 0x0158: - bufpush(0x0159); - break; - case 0x015A: - bufpush(0x015B); - break; - case 0x015C: - bufpush(0x015D); - break; - case 0x015E: - bufpush(0x015F); - break; - case 0x0160: - bufpush(0x0161); - break; - case 0x0162: - bufpush(0x0163); - break; - case 0x0164: - bufpush(0x0165); - break; - case 0x0166: - bufpush(0x0167); - break; - case 0x0168: - bufpush(0x0169); - break; - case 0x016A: - bufpush(0x016B); - break; - case 0x016C: - bufpush(0x016D); - break; - case 0x016E: - bufpush(0x016F); - break; - case 0x0170: - bufpush(0x0171); - break; - case 0x0172: - bufpush(0x0173); - break; - case 0x0174: - bufpush(0x0175); - break; - case 0x0176: - bufpush(0x0177); - break; - case 0x0178: - bufpush(0x00FF); - break; - case 0x0179: - bufpush(0x017A); - break; - case 0x017B: - bufpush(0x017C); - break; - case 0x017D: - bufpush(0x017E); - break; - case 0x017F: - bufpush(0x0073); - break; - case 0x0181: - bufpush(0x0253); - break; - case 0x0182: - bufpush(0x0183); - break; - case 0x0184: - bufpush(0x0185); - break; - case 0x0186: - bufpush(0x0254); - break; - case 0x0187: - bufpush(0x0188); - break; - case 0x0189: - bufpush(0x0256); - break; - case 0x018A: - bufpush(0x0257); - break; - case 0x018B: - bufpush(0x018C); - break; - case 0x018E: - bufpush(0x01DD); - break; - case 0x018F: - bufpush(0x0259); - break; - case 0x0190: - bufpush(0x025B); - break; - case 0x0191: - bufpush(0x0192); - break; - case 0x0193: - bufpush(0x0260); - break; - case 0x0194: - bufpush(0x0263); - break; - case 0x0196: - bufpush(0x0269); - break; - case 0x0197: - bufpush(0x0268); - break; - case 0x0198: - bufpush(0x0199); - break; - case 0x019C: - bufpush(0x026F); - break; - case 0x019D: - bufpush(0x0272); - break; - case 0x019F: - bufpush(0x0275); - break; - case 0x01A0: - bufpush(0x01A1); - break; - case 0x01A2: - bufpush(0x01A3); - break; - case 0x01A4: - bufpush(0x01A5); - break; - case 0x01A6: - bufpush(0x0280); - break; - case 0x01A7: - bufpush(0x01A8); - break; - case 0x01A9: - bufpush(0x0283); - break; - case 0x01AC: - bufpush(0x01AD); - break; - case 0x01AE: - bufpush(0x0288); - break; - case 0x01AF: - bufpush(0x01B0); - break; - case 0x01B1: - bufpush(0x028A); - break; - case 0x01B2: - bufpush(0x028B); - break; - case 0x01B3: - bufpush(0x01B4); - break; - case 0x01B5: - bufpush(0x01B6); - break; - case 0x01B7: - bufpush(0x0292); - break; - case 0x01B8: - bufpush(0x01B9); - break; - case 0x01BC: - bufpush(0x01BD); - break; - case 0x01C4: - bufpush(0x01C6); - break; - case 0x01C5: - bufpush(0x01C6); - break; - case 0x01C7: - bufpush(0x01C9); - break; - case 0x01C8: - bufpush(0x01C9); - break; - case 0x01CA: - bufpush(0x01CC); - break; - case 0x01CB: - bufpush(0x01CC); - break; - case 0x01CD: - bufpush(0x01CE); - break; - case 0x01CF: - bufpush(0x01D0); - break; - case 0x01D1: - bufpush(0x01D2); - break; - case 0x01D3: - bufpush(0x01D4); - break; - case 0x01D5: - bufpush(0x01D6); - break; - case 0x01D7: - bufpush(0x01D8); - break; - case 0x01D9: - bufpush(0x01DA); - break; - case 0x01DB: - bufpush(0x01DC); - break; - case 0x01DE: - bufpush(0x01DF); - break; - case 0x01E0: - bufpush(0x01E1); - break; - case 0x01E2: - bufpush(0x01E3); - break; - case 0x01E4: - bufpush(0x01E5); - break; - case 0x01E6: - bufpush(0x01E7); - break; - case 0x01E8: - bufpush(0x01E9); - break; - case 0x01EA: - bufpush(0x01EB); - break; - case 0x01EC: - bufpush(0x01ED); - break; - case 0x01EE: - bufpush(0x01EF); - break; - case 0x01F0: - bufpush(0x006A); - bufpush(0x030C); - break; - case 0x01F1: - bufpush(0x01F3); - break; - case 0x01F2: - bufpush(0x01F3); - break; - case 0x01F4: - bufpush(0x01F5); - break; - case 0x01F6: - bufpush(0x0195); - break; - case 0x01F7: - bufpush(0x01BF); - break; - case 0x01F8: - bufpush(0x01F9); - break; - case 0x01FA: - bufpush(0x01FB); - break; - case 0x01FC: - bufpush(0x01FD); - break; - case 0x01FE: - bufpush(0x01FF); - break; - case 0x0200: - bufpush(0x0201); - break; - case 0x0202: - bufpush(0x0203); - break; - case 0x0204: - bufpush(0x0205); - break; - case 0x0206: - bufpush(0x0207); - break; - case 0x0208: - bufpush(0x0209); - break; - case 0x020A: - bufpush(0x020B); - break; - case 0x020C: - bufpush(0x020D); - break; - case 0x020E: - bufpush(0x020F); - break; - case 0x0210: - bufpush(0x0211); - break; - case 0x0212: - bufpush(0x0213); - break; - case 0x0214: - bufpush(0x0215); - break; - case 0x0216: - bufpush(0x0217); - break; - case 0x0218: - bufpush(0x0219); - break; - case 0x021A: - bufpush(0x021B); - break; - case 0x021C: - bufpush(0x021D); - break; - case 0x021E: - bufpush(0x021F); - break; - case 0x0220: - bufpush(0x019E); - break; - case 0x0222: - bufpush(0x0223); - break; - case 0x0224: - bufpush(0x0225); - break; - case 0x0226: - bufpush(0x0227); - break; - case 0x0228: - bufpush(0x0229); - break; - case 0x022A: - bufpush(0x022B); - break; - case 0x022C: - bufpush(0x022D); - break; - case 0x022E: - bufpush(0x022F); - break; - case 0x0230: - bufpush(0x0231); - break; - case 0x0232: - bufpush(0x0233); - break; - case 0x0345: - bufpush(0x03B9); - break; - case 0x0386: - bufpush(0x03AC); - break; - case 0x0388: - bufpush(0x03AD); - break; - case 0x0389: - bufpush(0x03AE); - break; - case 0x038A: - bufpush(0x03AF); - break; - case 0x038C: - bufpush(0x03CC); - break; - case 0x038E: - bufpush(0x03CD); - break; - case 0x038F: - bufpush(0x03CE); - break; - case 0x0390: - bufpush(0x03B9); - bufpush(0x0308); - bufpush(0x0301); - break; - case 0x0391: - bufpush(0x03B1); - break; - case 0x0392: - bufpush(0x03B2); - break; - case 0x0393: - bufpush(0x03B3); - break; - case 0x0394: - bufpush(0x03B4); - break; - case 0x0395: - bufpush(0x03B5); - break; - case 0x0396: - bufpush(0x03B6); - break; - case 0x0397: - bufpush(0x03B7); - break; - case 0x0398: - bufpush(0x03B8); - break; - case 0x0399: - bufpush(0x03B9); - break; - case 0x039A: - bufpush(0x03BA); - break; - case 0x039B: - bufpush(0x03BB); - break; - case 0x039C: - bufpush(0x03BC); - break; - case 0x039D: - bufpush(0x03BD); - break; - case 0x039E: - bufpush(0x03BE); - break; - case 0x039F: - bufpush(0x03BF); - break; - case 0x03A0: - bufpush(0x03C0); - break; - case 0x03A1: - bufpush(0x03C1); - break; - case 0x03A3: - bufpush(0x03C3); - break; - case 0x03A4: - bufpush(0x03C4); - break; - case 0x03A5: - bufpush(0x03C5); - break; - case 0x03A6: - bufpush(0x03C6); - break; - case 0x03A7: - bufpush(0x03C7); - break; - case 0x03A8: - bufpush(0x03C8); - break; - case 0x03A9: - bufpush(0x03C9); - break; - case 0x03AA: - bufpush(0x03CA); - break; - case 0x03AB: - bufpush(0x03CB); - break; - case 0x03B0: - bufpush(0x03C5); - bufpush(0x0308); - bufpush(0x0301); - break; - case 0x03C2: - bufpush(0x03C3); - break; - case 0x03D0: - bufpush(0x03B2); - break; - case 0x03D1: - bufpush(0x03B8); - break; - case 0x03D5: - bufpush(0x03C6); - break; - case 0x03D6: - bufpush(0x03C0); - break; - case 0x03D8: - bufpush(0x03D9); - break; - case 0x03DA: - bufpush(0x03DB); - break; - case 0x03DC: - bufpush(0x03DD); - break; - case 0x03DE: - bufpush(0x03DF); - break; - case 0x03E0: - bufpush(0x03E1); - break; - case 0x03E2: - bufpush(0x03E3); - break; - case 0x03E4: - bufpush(0x03E5); - break; - case 0x03E6: - bufpush(0x03E7); - break; - case 0x03E8: - bufpush(0x03E9); - break; - case 0x03EA: - bufpush(0x03EB); - break; - case 0x03EC: - bufpush(0x03ED); - break; - case 0x03EE: - bufpush(0x03EF); - break; - case 0x03F0: - bufpush(0x03BA); - break; - case 0x03F1: - bufpush(0x03C1); - break; - case 0x03F2: - bufpush(0x03C3); - break; - case 0x03F4: - bufpush(0x03B8); - break; - case 0x03F5: - bufpush(0x03B5); - break; - case 0x0400: - bufpush(0x0450); - break; - case 0x0401: - bufpush(0x0451); - break; - case 0x0402: - bufpush(0x0452); - break; - case 0x0403: - bufpush(0x0453); - break; - case 0x0404: - bufpush(0x0454); - break; - case 0x0405: - bufpush(0x0455); - break; - case 0x0406: - bufpush(0x0456); - break; - case 0x0407: - bufpush(0x0457); - break; - case 0x0408: - bufpush(0x0458); - break; - case 0x0409: - bufpush(0x0459); - break; - case 0x040A: - bufpush(0x045A); - break; - case 0x040B: - bufpush(0x045B); - break; - case 0x040C: - bufpush(0x045C); - break; - case 0x040D: - bufpush(0x045D); - break; - case 0x040E: - bufpush(0x045E); - break; - case 0x040F: - bufpush(0x045F); - break; - case 0x0410: - bufpush(0x0430); - break; - case 0x0411: - bufpush(0x0431); - break; - case 0x0412: - bufpush(0x0432); - break; - case 0x0413: - bufpush(0x0433); - break; - case 0x0414: - bufpush(0x0434); - break; - case 0x0415: - bufpush(0x0435); - break; - case 0x0416: - bufpush(0x0436); - break; - case 0x0417: - bufpush(0x0437); - break; - case 0x0418: - bufpush(0x0438); - break; - case 0x0419: - bufpush(0x0439); - break; - case 0x041A: - bufpush(0x043A); - break; - case 0x041B: - bufpush(0x043B); - break; - case 0x041C: - bufpush(0x043C); - break; - case 0x041D: - bufpush(0x043D); - break; - case 0x041E: - bufpush(0x043E); - break; - case 0x041F: - bufpush(0x043F); - break; - case 0x0420: - bufpush(0x0440); - break; - case 0x0421: - bufpush(0x0441); - break; - case 0x0422: - bufpush(0x0442); - break; - case 0x0423: - bufpush(0x0443); - break; - case 0x0424: - bufpush(0x0444); - break; - case 0x0425: - bufpush(0x0445); - break; - case 0x0426: - bufpush(0x0446); - break; - case 0x0427: - bufpush(0x0447); - break; - case 0x0428: - bufpush(0x0448); - break; - case 0x0429: - bufpush(0x0449); - break; - case 0x042A: - bufpush(0x044A); - break; - case 0x042B: - bufpush(0x044B); - break; - case 0x042C: - bufpush(0x044C); - break; - case 0x042D: - bufpush(0x044D); - break; - case 0x042E: - bufpush(0x044E); - break; - case 0x042F: - bufpush(0x044F); - break; - case 0x0460: - bufpush(0x0461); - break; - case 0x0462: - bufpush(0x0463); - break; - case 0x0464: - bufpush(0x0465); - break; - case 0x0466: - bufpush(0x0467); - break; - case 0x0468: - bufpush(0x0469); - break; - case 0x046A: - bufpush(0x046B); - break; - case 0x046C: - bufpush(0x046D); - break; - case 0x046E: - bufpush(0x046F); - break; - case 0x0470: - bufpush(0x0471); - break; - case 0x0472: - bufpush(0x0473); - break; - case 0x0474: - bufpush(0x0475); - break; - case 0x0476: - bufpush(0x0477); - break; - case 0x0478: - bufpush(0x0479); - break; - case 0x047A: - bufpush(0x047B); - break; - case 0x047C: - bufpush(0x047D); - break; - case 0x047E: - bufpush(0x047F); - break; - case 0x0480: - bufpush(0x0481); - break; - case 0x048A: - bufpush(0x048B); - break; - case 0x048C: - bufpush(0x048D); - break; - case 0x048E: - bufpush(0x048F); - break; - case 0x0490: - bufpush(0x0491); - break; - case 0x0492: - bufpush(0x0493); - break; - case 0x0494: - bufpush(0x0495); - break; - case 0x0496: - bufpush(0x0497); - break; - case 0x0498: - bufpush(0x0499); - break; - case 0x049A: - bufpush(0x049B); - break; - case 0x049C: - bufpush(0x049D); - break; - case 0x049E: - bufpush(0x049F); - break; - case 0x04A0: - bufpush(0x04A1); - break; - case 0x04A2: - bufpush(0x04A3); - break; - case 0x04A4: - bufpush(0x04A5); - break; - case 0x04A6: - bufpush(0x04A7); - break; - case 0x04A8: - bufpush(0x04A9); - break; - case 0x04AA: - bufpush(0x04AB); - break; - case 0x04AC: - bufpush(0x04AD); - break; - case 0x04AE: - bufpush(0x04AF); - break; - case 0x04B0: - bufpush(0x04B1); - break; - case 0x04B2: - bufpush(0x04B3); - break; - case 0x04B4: - bufpush(0x04B5); - break; - case 0x04B6: - bufpush(0x04B7); - break; - case 0x04B8: - bufpush(0x04B9); - break; - case 0x04BA: - bufpush(0x04BB); - break; - case 0x04BC: - bufpush(0x04BD); - break; - case 0x04BE: - bufpush(0x04BF); - break; - case 0x04C1: - bufpush(0x04C2); - break; - case 0x04C3: - bufpush(0x04C4); - break; - case 0x04C5: - bufpush(0x04C6); - break; - case 0x04C7: - bufpush(0x04C8); - break; - case 0x04C9: - bufpush(0x04CA); - break; - case 0x04CB: - bufpush(0x04CC); - break; - case 0x04CD: - bufpush(0x04CE); - break; - case 0x04D0: - bufpush(0x04D1); - break; - case 0x04D2: - bufpush(0x04D3); - break; - case 0x04D4: - bufpush(0x04D5); - break; - case 0x04D6: - bufpush(0x04D7); - break; - case 0x04D8: - bufpush(0x04D9); - break; - case 0x04DA: - bufpush(0x04DB); - break; - case 0x04DC: - bufpush(0x04DD); - break; - case 0x04DE: - bufpush(0x04DF); - break; - case 0x04E0: - bufpush(0x04E1); - break; - case 0x04E2: - bufpush(0x04E3); - break; - case 0x04E4: - bufpush(0x04E5); - break; - case 0x04E6: - bufpush(0x04E7); - break; - case 0x04E8: - bufpush(0x04E9); - break; - case 0x04EA: - bufpush(0x04EB); - break; - case 0x04EC: - bufpush(0x04ED); - break; - case 0x04EE: - bufpush(0x04EF); - break; - case 0x04F0: - bufpush(0x04F1); - break; - case 0x04F2: - bufpush(0x04F3); - break; - case 0x04F4: - bufpush(0x04F5); - break; - case 0x04F8: - bufpush(0x04F9); - break; - case 0x0500: - bufpush(0x0501); - break; - case 0x0502: - bufpush(0x0503); - break; - case 0x0504: - bufpush(0x0505); - break; - case 0x0506: - bufpush(0x0507); - break; - case 0x0508: - bufpush(0x0509); - break; - case 0x050A: - bufpush(0x050B); - break; - case 0x050C: - bufpush(0x050D); - break; - case 0x050E: - bufpush(0x050F); - break; - case 0x0531: - bufpush(0x0561); - break; - case 0x0532: - bufpush(0x0562); - break; - case 0x0533: - bufpush(0x0563); - break; - case 0x0534: - bufpush(0x0564); - break; - case 0x0535: - bufpush(0x0565); - break; - case 0x0536: - bufpush(0x0566); - break; - case 0x0537: - bufpush(0x0567); - break; - case 0x0538: - bufpush(0x0568); - break; - case 0x0539: - bufpush(0x0569); - break; - case 0x053A: - bufpush(0x056A); - break; - case 0x053B: - bufpush(0x056B); - break; - case 0x053C: - bufpush(0x056C); - break; - case 0x053D: - bufpush(0x056D); - break; - case 0x053E: - bufpush(0x056E); - break; - case 0x053F: - bufpush(0x056F); - break; - case 0x0540: - bufpush(0x0570); - break; - case 0x0541: - bufpush(0x0571); - break; - case 0x0542: - bufpush(0x0572); - break; - case 0x0543: - bufpush(0x0573); - break; - case 0x0544: - bufpush(0x0574); - break; - case 0x0545: - bufpush(0x0575); - break; - case 0x0546: - bufpush(0x0576); - break; - case 0x0547: - bufpush(0x0577); - break; - case 0x0548: - bufpush(0x0578); - break; - case 0x0549: - bufpush(0x0579); - break; - case 0x054A: - bufpush(0x057A); - break; - case 0x054B: - bufpush(0x057B); - break; - case 0x054C: - bufpush(0x057C); - break; - case 0x054D: - bufpush(0x057D); - break; - case 0x054E: - bufpush(0x057E); - break; - case 0x054F: - bufpush(0x057F); - break; - case 0x0550: - bufpush(0x0580); - break; - case 0x0551: - bufpush(0x0581); - break; - case 0x0552: - bufpush(0x0582); - break; - case 0x0553: - bufpush(0x0583); - break; - case 0x0554: - bufpush(0x0584); - break; - case 0x0555: - bufpush(0x0585); - break; - case 0x0556: - bufpush(0x0586); - break; - case 0x0587: - bufpush(0x0565); - bufpush(0x0582); - break; - case 0x1E00: - bufpush(0x1E01); - break; - case 0x1E02: - bufpush(0x1E03); - break; - case 0x1E04: - bufpush(0x1E05); - break; - case 0x1E06: - bufpush(0x1E07); - break; - case 0x1E08: - bufpush(0x1E09); - break; - case 0x1E0A: - bufpush(0x1E0B); - break; - case 0x1E0C: - bufpush(0x1E0D); - break; - case 0x1E0E: - bufpush(0x1E0F); - break; - case 0x1E10: - bufpush(0x1E11); - break; - case 0x1E12: - bufpush(0x1E13); - break; - case 0x1E14: - bufpush(0x1E15); - break; - case 0x1E16: - bufpush(0x1E17); - break; - case 0x1E18: - bufpush(0x1E19); - break; - case 0x1E1A: - bufpush(0x1E1B); - break; - case 0x1E1C: - bufpush(0x1E1D); - break; - case 0x1E1E: - bufpush(0x1E1F); - break; - case 0x1E20: - bufpush(0x1E21); - break; - case 0x1E22: - bufpush(0x1E23); - break; - case 0x1E24: - bufpush(0x1E25); - break; - case 0x1E26: - bufpush(0x1E27); - break; - case 0x1E28: - bufpush(0x1E29); - break; - case 0x1E2A: - bufpush(0x1E2B); - break; - case 0x1E2C: - bufpush(0x1E2D); - break; - case 0x1E2E: - bufpush(0x1E2F); - break; - case 0x1E30: - bufpush(0x1E31); - break; - case 0x1E32: - bufpush(0x1E33); - break; - case 0x1E34: - bufpush(0x1E35); - break; - case 0x1E36: - bufpush(0x1E37); - break; - case 0x1E38: - bufpush(0x1E39); - break; - case 0x1E3A: - bufpush(0x1E3B); - break; - case 0x1E3C: - bufpush(0x1E3D); - break; - case 0x1E3E: - bufpush(0x1E3F); - break; - case 0x1E40: - bufpush(0x1E41); - break; - case 0x1E42: - bufpush(0x1E43); - break; - case 0x1E44: - bufpush(0x1E45); - break; - case 0x1E46: - bufpush(0x1E47); - break; - case 0x1E48: - bufpush(0x1E49); - break; - case 0x1E4A: - bufpush(0x1E4B); - break; - case 0x1E4C: - bufpush(0x1E4D); - break; - case 0x1E4E: - bufpush(0x1E4F); - break; - case 0x1E50: - bufpush(0x1E51); - break; - case 0x1E52: - bufpush(0x1E53); - break; - case 0x1E54: - bufpush(0x1E55); - break; - case 0x1E56: - bufpush(0x1E57); - break; - case 0x1E58: - bufpush(0x1E59); - break; - case 0x1E5A: - bufpush(0x1E5B); - break; - case 0x1E5C: - bufpush(0x1E5D); - break; - case 0x1E5E: - bufpush(0x1E5F); - break; - case 0x1E60: - bufpush(0x1E61); - break; - case 0x1E62: - bufpush(0x1E63); - break; - case 0x1E64: - bufpush(0x1E65); - break; - case 0x1E66: - bufpush(0x1E67); - break; - case 0x1E68: - bufpush(0x1E69); - break; - case 0x1E6A: - bufpush(0x1E6B); - break; - case 0x1E6C: - bufpush(0x1E6D); - break; - case 0x1E6E: - bufpush(0x1E6F); - break; - case 0x1E70: - bufpush(0x1E71); - break; - case 0x1E72: - bufpush(0x1E73); - break; - case 0x1E74: - bufpush(0x1E75); - break; - case 0x1E76: - bufpush(0x1E77); - break; - case 0x1E78: - bufpush(0x1E79); - break; - case 0x1E7A: - bufpush(0x1E7B); - break; - case 0x1E7C: - bufpush(0x1E7D); - break; - case 0x1E7E: - bufpush(0x1E7F); - break; - case 0x1E80: - bufpush(0x1E81); - break; - case 0x1E82: - bufpush(0x1E83); - break; - case 0x1E84: - bufpush(0x1E85); - break; - case 0x1E86: - bufpush(0x1E87); - break; - case 0x1E88: - bufpush(0x1E89); - break; - case 0x1E8A: - bufpush(0x1E8B); - break; - case 0x1E8C: - bufpush(0x1E8D); - break; - case 0x1E8E: - bufpush(0x1E8F); - break; - case 0x1E90: - bufpush(0x1E91); - break; - case 0x1E92: - bufpush(0x1E93); - break; - case 0x1E94: - bufpush(0x1E95); - break; - case 0x1E96: - bufpush(0x0068); - bufpush(0x0331); - break; - case 0x1E97: - bufpush(0x0074); - bufpush(0x0308); - break; - case 0x1E98: - bufpush(0x0077); - bufpush(0x030A); - break; - case 0x1E99: - bufpush(0x0079); - bufpush(0x030A); - break; - case 0x1E9A: - bufpush(0x0061); - bufpush(0x02BE); - break; - case 0x1E9B: - bufpush(0x1E61); - break; - case 0x1EA0: - bufpush(0x1EA1); - break; - case 0x1EA2: - bufpush(0x1EA3); - break; - case 0x1EA4: - bufpush(0x1EA5); - break; - case 0x1EA6: - bufpush(0x1EA7); - break; - case 0x1EA8: - bufpush(0x1EA9); - break; - case 0x1EAA: - bufpush(0x1EAB); - break; - case 0x1EAC: - bufpush(0x1EAD); - break; - case 0x1EAE: - bufpush(0x1EAF); - break; - case 0x1EB0: - bufpush(0x1EB1); - break; - case 0x1EB2: - bufpush(0x1EB3); - break; - case 0x1EB4: - bufpush(0x1EB5); - break; - case 0x1EB6: - bufpush(0x1EB7); - break; - case 0x1EB8: - bufpush(0x1EB9); - break; - case 0x1EBA: - bufpush(0x1EBB); - break; - case 0x1EBC: - bufpush(0x1EBD); - break; - case 0x1EBE: - bufpush(0x1EBF); - break; - case 0x1EC0: - bufpush(0x1EC1); - break; - case 0x1EC2: - bufpush(0x1EC3); - break; - case 0x1EC4: - bufpush(0x1EC5); - break; - case 0x1EC6: - bufpush(0x1EC7); - break; - case 0x1EC8: - bufpush(0x1EC9); - break; - case 0x1ECA: - bufpush(0x1ECB); - break; - case 0x1ECC: - bufpush(0x1ECD); - break; - case 0x1ECE: - bufpush(0x1ECF); - break; - case 0x1ED0: - bufpush(0x1ED1); - break; - case 0x1ED2: - bufpush(0x1ED3); - break; - case 0x1ED4: - bufpush(0x1ED5); - break; - case 0x1ED6: - bufpush(0x1ED7); - break; - case 0x1ED8: - bufpush(0x1ED9); - break; - case 0x1EDA: - bufpush(0x1EDB); - break; - case 0x1EDC: - bufpush(0x1EDD); - break; - case 0x1EDE: - bufpush(0x1EDF); - break; - case 0x1EE0: - bufpush(0x1EE1); - break; - case 0x1EE2: - bufpush(0x1EE3); - break; - case 0x1EE4: - bufpush(0x1EE5); - break; - case 0x1EE6: - bufpush(0x1EE7); - break; - case 0x1EE8: - bufpush(0x1EE9); - break; - case 0x1EEA: - bufpush(0x1EEB); - break; - case 0x1EEC: - bufpush(0x1EED); - break; - case 0x1EEE: - bufpush(0x1EEF); - break; - case 0x1EF0: - bufpush(0x1EF1); - break; - case 0x1EF2: - bufpush(0x1EF3); - break; - case 0x1EF4: - bufpush(0x1EF5); - break; - case 0x1EF6: - bufpush(0x1EF7); - break; - case 0x1EF8: - bufpush(0x1EF9); - break; - case 0x1F08: - bufpush(0x1F00); - break; - case 0x1F09: - bufpush(0x1F01); - break; - case 0x1F0A: - bufpush(0x1F02); - break; - case 0x1F0B: - bufpush(0x1F03); - break; - case 0x1F0C: - bufpush(0x1F04); - break; - case 0x1F0D: - bufpush(0x1F05); - break; - case 0x1F0E: - bufpush(0x1F06); - break; - case 0x1F0F: - bufpush(0x1F07); - break; - case 0x1F18: - bufpush(0x1F10); - break; - case 0x1F19: - bufpush(0x1F11); - break; - case 0x1F1A: - bufpush(0x1F12); - break; - case 0x1F1B: - bufpush(0x1F13); - break; - case 0x1F1C: - bufpush(0x1F14); - break; - case 0x1F1D: - bufpush(0x1F15); - break; - case 0x1F28: - bufpush(0x1F20); - break; - case 0x1F29: - bufpush(0x1F21); - break; - case 0x1F2A: - bufpush(0x1F22); - break; - case 0x1F2B: - bufpush(0x1F23); - break; - case 0x1F2C: - bufpush(0x1F24); - break; - case 0x1F2D: - bufpush(0x1F25); - break; - case 0x1F2E: - bufpush(0x1F26); - break; - case 0x1F2F: - bufpush(0x1F27); - break; - case 0x1F38: - bufpush(0x1F30); - break; - case 0x1F39: - bufpush(0x1F31); - break; - case 0x1F3A: - bufpush(0x1F32); - break; - case 0x1F3B: - bufpush(0x1F33); - break; - case 0x1F3C: - bufpush(0x1F34); - break; - case 0x1F3D: - bufpush(0x1F35); - break; - case 0x1F3E: - bufpush(0x1F36); - break; - case 0x1F3F: - bufpush(0x1F37); - break; - case 0x1F48: - bufpush(0x1F40); - break; - case 0x1F49: - bufpush(0x1F41); - break; - case 0x1F4A: - bufpush(0x1F42); - break; - case 0x1F4B: - bufpush(0x1F43); - break; - case 0x1F4C: - bufpush(0x1F44); - break; - case 0x1F4D: - bufpush(0x1F45); - break; - case 0x1F50: - bufpush(0x03C5); - bufpush(0x0313); - break; - case 0x1F52: - bufpush(0x03C5); - bufpush(0x0313); - bufpush(0x0300); - break; - case 0x1F54: - bufpush(0x03C5); - bufpush(0x0313); - bufpush(0x0301); - break; - case 0x1F56: - bufpush(0x03C5); - bufpush(0x0313); - bufpush(0x0342); - break; - case 0x1F59: - bufpush(0x1F51); - break; - case 0x1F5B: - bufpush(0x1F53); - break; - case 0x1F5D: - bufpush(0x1F55); - break; - case 0x1F5F: - bufpush(0x1F57); - break; - case 0x1F68: - bufpush(0x1F60); - break; - case 0x1F69: - bufpush(0x1F61); - break; - case 0x1F6A: - bufpush(0x1F62); - break; - case 0x1F6B: - bufpush(0x1F63); - break; - case 0x1F6C: - bufpush(0x1F64); - break; - case 0x1F6D: - bufpush(0x1F65); - break; - case 0x1F6E: - bufpush(0x1F66); - break; - case 0x1F6F: - bufpush(0x1F67); - break; - case 0x1F80: - bufpush(0x1F00); - bufpush(0x03B9); - break; - case 0x1F81: - bufpush(0x1F01); - bufpush(0x03B9); - break; - case 0x1F82: - bufpush(0x1F02); - bufpush(0x03B9); - break; - case 0x1F83: - bufpush(0x1F03); - bufpush(0x03B9); - break; - case 0x1F84: - bufpush(0x1F04); - bufpush(0x03B9); - break; - case 0x1F85: - bufpush(0x1F05); - bufpush(0x03B9); - break; - case 0x1F86: - bufpush(0x1F06); - bufpush(0x03B9); - break; - case 0x1F87: - bufpush(0x1F07); - bufpush(0x03B9); - break; - case 0x1F88: - bufpush(0x1F00); - bufpush(0x03B9); - break; - case 0x1F89: - bufpush(0x1F01); - bufpush(0x03B9); - break; - case 0x1F8A: - bufpush(0x1F02); - bufpush(0x03B9); - break; - case 0x1F8B: - bufpush(0x1F03); - bufpush(0x03B9); - break; - case 0x1F8C: - bufpush(0x1F04); - bufpush(0x03B9); - break; - case 0x1F8D: - bufpush(0x1F05); - bufpush(0x03B9); - break; - case 0x1F8E: - bufpush(0x1F06); - bufpush(0x03B9); - break; - case 0x1F8F: - bufpush(0x1F07); - bufpush(0x03B9); - break; - case 0x1F90: - bufpush(0x1F20); - bufpush(0x03B9); - break; - case 0x1F91: - bufpush(0x1F21); - bufpush(0x03B9); - break; - case 0x1F92: - bufpush(0x1F22); - bufpush(0x03B9); - break; - case 0x1F93: - bufpush(0x1F23); - bufpush(0x03B9); - break; - case 0x1F94: - bufpush(0x1F24); - bufpush(0x03B9); - break; - case 0x1F95: - bufpush(0x1F25); - bufpush(0x03B9); - break; - case 0x1F96: - bufpush(0x1F26); - bufpush(0x03B9); - break; - case 0x1F97: - bufpush(0x1F27); - bufpush(0x03B9); - break; - case 0x1F98: - bufpush(0x1F20); - bufpush(0x03B9); - break; - case 0x1F99: - bufpush(0x1F21); - bufpush(0x03B9); - break; - case 0x1F9A: - bufpush(0x1F22); - bufpush(0x03B9); - break; - case 0x1F9B: - bufpush(0x1F23); - bufpush(0x03B9); - break; - case 0x1F9C: - bufpush(0x1F24); - bufpush(0x03B9); - break; - case 0x1F9D: - bufpush(0x1F25); - bufpush(0x03B9); - break; - case 0x1F9E: - bufpush(0x1F26); - bufpush(0x03B9); - break; - case 0x1F9F: - bufpush(0x1F27); - bufpush(0x03B9); - break; - case 0x1FA0: - bufpush(0x1F60); - bufpush(0x03B9); - break; - case 0x1FA1: - bufpush(0x1F61); - bufpush(0x03B9); - break; - case 0x1FA2: - bufpush(0x1F62); - bufpush(0x03B9); - break; - case 0x1FA3: - bufpush(0x1F63); - bufpush(0x03B9); - break; - case 0x1FA4: - bufpush(0x1F64); - bufpush(0x03B9); - break; - case 0x1FA5: - bufpush(0x1F65); - bufpush(0x03B9); - break; - case 0x1FA6: - bufpush(0x1F66); - bufpush(0x03B9); - break; - case 0x1FA7: - bufpush(0x1F67); - bufpush(0x03B9); - break; - case 0x1FA8: - bufpush(0x1F60); - bufpush(0x03B9); - break; - case 0x1FA9: - bufpush(0x1F61); - bufpush(0x03B9); - break; - case 0x1FAA: - bufpush(0x1F62); - bufpush(0x03B9); - break; - case 0x1FAB: - bufpush(0x1F63); - bufpush(0x03B9); - break; - case 0x1FAC: - bufpush(0x1F64); - bufpush(0x03B9); - break; - case 0x1FAD: - bufpush(0x1F65); - bufpush(0x03B9); - break; - case 0x1FAE: - bufpush(0x1F66); - bufpush(0x03B9); - break; - case 0x1FAF: - bufpush(0x1F67); - bufpush(0x03B9); - break; - case 0x1FB2: - bufpush(0x1F70); - bufpush(0x03B9); - break; - case 0x1FB3: - bufpush(0x03B1); - bufpush(0x03B9); - break; - case 0x1FB4: - bufpush(0x03AC); - bufpush(0x03B9); - break; - case 0x1FB6: - bufpush(0x03B1); - bufpush(0x0342); - break; - case 0x1FB7: - bufpush(0x03B1); - bufpush(0x0342); - bufpush(0x03B9); - break; - case 0x1FB8: - bufpush(0x1FB0); - break; - case 0x1FB9: - bufpush(0x1FB1); - break; - case 0x1FBA: - bufpush(0x1F70); - break; - case 0x1FBB: - bufpush(0x1F71); - break; - case 0x1FBC: - bufpush(0x03B1); - bufpush(0x03B9); - break; - case 0x1FBE: - bufpush(0x03B9); - break; - case 0x1FC2: - bufpush(0x1F74); - bufpush(0x03B9); - break; - case 0x1FC3: - bufpush(0x03B7); - bufpush(0x03B9); - break; - case 0x1FC4: - bufpush(0x03AE); - bufpush(0x03B9); - break; - case 0x1FC6: - bufpush(0x03B7); - bufpush(0x0342); - break; - case 0x1FC7: - bufpush(0x03B7); - bufpush(0x0342); - bufpush(0x03B9); - break; - case 0x1FC8: - bufpush(0x1F72); - break; - case 0x1FC9: - bufpush(0x1F73); - break; - case 0x1FCA: - bufpush(0x1F74); - break; - case 0x1FCB: - bufpush(0x1F75); - break; - case 0x1FCC: - bufpush(0x03B7); - bufpush(0x03B9); - break; - case 0x1FD2: - bufpush(0x03B9); - bufpush(0x0308); - bufpush(0x0300); - break; - case 0x1FD3: - bufpush(0x03B9); - bufpush(0x0308); - bufpush(0x0301); - break; - case 0x1FD6: - bufpush(0x03B9); - bufpush(0x0342); - break; - case 0x1FD7: - bufpush(0x03B9); - bufpush(0x0308); - bufpush(0x0342); - break; - case 0x1FD8: - bufpush(0x1FD0); - break; - case 0x1FD9: - bufpush(0x1FD1); - break; - case 0x1FDA: - bufpush(0x1F76); - break; - case 0x1FDB: - bufpush(0x1F77); - break; - case 0x1FE2: - bufpush(0x03C5); - bufpush(0x0308); - bufpush(0x0300); - break; - case 0x1FE3: - bufpush(0x03C5); - bufpush(0x0308); - bufpush(0x0301); - break; - case 0x1FE4: - bufpush(0x03C1); - bufpush(0x0313); - break; - case 0x1FE6: - bufpush(0x03C5); - bufpush(0x0342); - break; - case 0x1FE7: - bufpush(0x03C5); - bufpush(0x0308); - bufpush(0x0342); - break; - case 0x1FE8: - bufpush(0x1FE0); - break; - case 0x1FE9: - bufpush(0x1FE1); - break; - case 0x1FEA: - bufpush(0x1F7A); - break; - case 0x1FEB: - bufpush(0x1F7B); - break; - case 0x1FEC: - bufpush(0x1FE5); - break; - case 0x1FF2: - bufpush(0x1F7C); - bufpush(0x03B9); - break; - case 0x1FF3: - bufpush(0x03C9); - bufpush(0x03B9); - break; - case 0x1FF4: - bufpush(0x03CE); - bufpush(0x03B9); - break; - case 0x1FF6: - bufpush(0x03C9); - bufpush(0x0342); - break; - case 0x1FF7: - bufpush(0x03C9); - bufpush(0x0342); - bufpush(0x03B9); - break; - case 0x1FF8: - bufpush(0x1F78); - break; - case 0x1FF9: - bufpush(0x1F79); - break; - case 0x1FFA: - bufpush(0x1F7C); - break; - case 0x1FFB: - bufpush(0x1F7D); - break; - case 0x1FFC: - bufpush(0x03C9); - bufpush(0x03B9); - break; - case 0x2126: - bufpush(0x03C9); - break; - case 0x212A: - bufpush(0x006B); - break; - case 0x212B: - bufpush(0x00E5); - break; - case 0x2160: - bufpush(0x2170); - break; - case 0x2161: - bufpush(0x2171); - break; - case 0x2162: - bufpush(0x2172); - break; - case 0x2163: - bufpush(0x2173); - break; - case 0x2164: - bufpush(0x2174); - break; - case 0x2165: - bufpush(0x2175); - break; - case 0x2166: - bufpush(0x2176); - break; - case 0x2167: - bufpush(0x2177); - break; - case 0x2168: - bufpush(0x2178); - break; - case 0x2169: - bufpush(0x2179); - break; - case 0x216A: - bufpush(0x217A); - break; - case 0x216B: - bufpush(0x217B); - break; - case 0x216C: - bufpush(0x217C); - break; - case 0x216D: - bufpush(0x217D); - break; - case 0x216E: - bufpush(0x217E); - break; - case 0x216F: - bufpush(0x217F); - break; - case 0x24B6: - bufpush(0x24D0); - break; - case 0x24B7: - bufpush(0x24D1); - break; - case 0x24B8: - bufpush(0x24D2); - break; - case 0x24B9: - bufpush(0x24D3); - break; - case 0x24BA: - bufpush(0x24D4); - break; - case 0x24BB: - bufpush(0x24D5); - break; - case 0x24BC: - bufpush(0x24D6); - break; - case 0x24BD: - bufpush(0x24D7); - break; - case 0x24BE: - bufpush(0x24D8); - break; - case 0x24BF: - bufpush(0x24D9); - break; - case 0x24C0: - bufpush(0x24DA); - break; - case 0x24C1: - bufpush(0x24DB); - break; - case 0x24C2: - bufpush(0x24DC); - break; - case 0x24C3: - bufpush(0x24DD); - break; - case 0x24C4: - bufpush(0x24DE); - break; - case 0x24C5: - bufpush(0x24DF); - break; - case 0x24C6: - bufpush(0x24E0); - break; - case 0x24C7: - bufpush(0x24E1); - break; - case 0x24C8: - bufpush(0x24E2); - break; - case 0x24C9: - bufpush(0x24E3); - break; - case 0x24CA: - bufpush(0x24E4); - break; - case 0x24CB: - bufpush(0x24E5); - break; - case 0x24CC: - bufpush(0x24E6); - break; - case 0x24CD: - bufpush(0x24E7); - break; - case 0x24CE: - bufpush(0x24E8); - break; - case 0x24CF: - bufpush(0x24E9); - break; - case 0xFB00: - bufpush(0x0066); - bufpush(0x0066); - break; - case 0xFB01: - bufpush(0x0066); - bufpush(0x0069); - break; - case 0xFB02: - bufpush(0x0066); - bufpush(0x006C); - break; - case 0xFB03: - bufpush(0x0066); - bufpush(0x0066); - bufpush(0x0069); - break; - case 0xFB04: - bufpush(0x0066); - bufpush(0x0066); - bufpush(0x006C); - break; - case 0xFB05: - bufpush(0x0073); - bufpush(0x0074); - break; - case 0xFB06: - bufpush(0x0073); - bufpush(0x0074); - break; - case 0xFB13: - bufpush(0x0574); - bufpush(0x0576); - break; - case 0xFB14: - bufpush(0x0574); - bufpush(0x0565); - break; - case 0xFB15: - bufpush(0x0574); - bufpush(0x056B); - break; - case 0xFB16: - bufpush(0x057E); - bufpush(0x0576); - break; - case 0xFB17: - bufpush(0x0574); - bufpush(0x056D); - break; - case 0xFF21: - bufpush(0xFF41); - break; - case 0xFF22: - bufpush(0xFF42); - break; - case 0xFF23: - bufpush(0xFF43); - break; - case 0xFF24: - bufpush(0xFF44); - break; - case 0xFF25: - bufpush(0xFF45); - break; - case 0xFF26: - bufpush(0xFF46); - break; - case 0xFF27: - bufpush(0xFF47); - break; - case 0xFF28: - bufpush(0xFF48); - break; - case 0xFF29: - bufpush(0xFF49); - break; - case 0xFF2A: - bufpush(0xFF4A); - break; - case 0xFF2B: - bufpush(0xFF4B); - break; - case 0xFF2C: - bufpush(0xFF4C); - break; - case 0xFF2D: - bufpush(0xFF4D); - break; - case 0xFF2E: - bufpush(0xFF4E); - break; - case 0xFF2F: - bufpush(0xFF4F); - break; - case 0xFF30: - bufpush(0xFF50); - break; - case 0xFF31: - bufpush(0xFF51); - break; - case 0xFF32: - bufpush(0xFF52); - break; - case 0xFF33: - bufpush(0xFF53); - break; - case 0xFF34: - bufpush(0xFF54); - break; - case 0xFF35: - bufpush(0xFF55); - break; - case 0xFF36: - bufpush(0xFF56); - break; - case 0xFF37: - bufpush(0xFF57); - break; - case 0xFF38: - bufpush(0xFF58); - break; - case 0xFF39: - bufpush(0xFF59); - break; - case 0xFF3A: - bufpush(0xFF5A); - break; - case 0x10400: - bufpush(0x10428); - break; - case 0x10401: - bufpush(0x10429); - break; - case 0x10402: - bufpush(0x1042A); - break; - case 0x10403: - bufpush(0x1042B); - break; - case 0x10404: - bufpush(0x1042C); - break; - case 0x10405: - bufpush(0x1042D); - break; - case 0x10406: - bufpush(0x1042E); - break; - case 0x10407: - bufpush(0x1042F); - break; - case 0x10408: - bufpush(0x10430); - break; - case 0x10409: - bufpush(0x10431); - break; - case 0x1040A: - bufpush(0x10432); - break; - case 0x1040B: - bufpush(0x10433); - break; - case 0x1040C: - bufpush(0x10434); - break; - case 0x1040D: - bufpush(0x10435); - break; - case 0x1040E: - bufpush(0x10436); - break; - case 0x1040F: - bufpush(0x10437); - break; - case 0x10410: - bufpush(0x10438); - break; - case 0x10411: - bufpush(0x10439); - break; - case 0x10412: - bufpush(0x1043A); - break; - case 0x10413: - bufpush(0x1043B); - break; - case 0x10414: - bufpush(0x1043C); - break; - case 0x10415: - bufpush(0x1043D); - break; - case 0x10416: - bufpush(0x1043E); - break; - case 0x10417: - bufpush(0x1043F); - break; - case 0x10418: - bufpush(0x10440); - break; - case 0x10419: - bufpush(0x10441); - break; - case 0x1041A: - bufpush(0x10442); - break; - case 0x1041B: - bufpush(0x10443); - break; - case 0x1041C: - bufpush(0x10444); - break; - case 0x1041D: - bufpush(0x10445); - break; - case 0x1041E: - bufpush(0x10446); - break; - case 0x1041F: - bufpush(0x10447); - break; - case 0x10420: - bufpush(0x10448); - break; - case 0x10421: - bufpush(0x10449); - break; - case 0x10422: - bufpush(0x1044A); - break; - case 0x10423: - bufpush(0x1044B); - break; - case 0x10424: - bufpush(0x1044C); - break; - case 0x10425: - bufpush(0x1044D); - break; - default: - bufpush(c); - } diff --git a/outside/commonmark/src/chunk.h b/outside/commonmark/src/chunk.h deleted file mode 100644 index 22594b154..000000000 --- a/outside/commonmark/src/chunk.h +++ /dev/null @@ -1,122 +0,0 @@ -#ifndef CMARK_CHUNK_H -#define CMARK_CHUNK_H - -#include -#include -#include -#include -#include "buffer.h" - -typedef struct { - unsigned char *data; - int len; - int alloc; // also implies a NULL-terminated string -} cmark_chunk; - -static inline void cmark_chunk_free(cmark_chunk *c) -{ - if (c->alloc) - free(c->data); - - c->data = NULL; - c->alloc = 0; - c->len = 0; -} - -static inline void cmark_chunk_ltrim(cmark_chunk *c) -{ - assert(!c->alloc); - - while (c->len && isspace(c->data[0])) { - c->data++; - c->len--; - } -} - -static inline void cmark_chunk_rtrim(cmark_chunk *c) -{ - while (c->len > 0) { - if (!isspace(c->data[c->len - 1])) - break; - - c->len--; - } -} - -static inline void cmark_chunk_trim(cmark_chunk *c) -{ - cmark_chunk_ltrim(c); - cmark_chunk_rtrim(c); -} - -static inline int cmark_chunk_strchr(cmark_chunk *ch, int c, int offset) -{ - const unsigned char *p = (unsigned char *)memchr(ch->data + offset, c, ch->len - offset); - return p ? (int)(p - ch->data) : ch->len; -} - -static inline const char *cmark_chunk_to_cstr(cmark_chunk *c) -{ - unsigned char *str; - - if (c->alloc) { - return (char *)c->data; - } - str = (unsigned char *)malloc(c->len + 1); - if(str != NULL) { - memcpy(str, c->data, c->len); - str[c->len] = 0; - } - c->data = str; - c->alloc = 1; - - return (char *)str; -} - -static inline void cmark_chunk_set_cstr(cmark_chunk *c, const char *str) -{ - if (c->alloc) { - free(c->data); - } - c->len = strlen(str); - c->data = (unsigned char *)malloc(c->len + 1); - c->alloc = 1; - memcpy(c->data, str, c->len + 1); -} - -static inline cmark_chunk cmark_chunk_literal(const char *data) -{ - cmark_chunk c = {(unsigned char *)data, data ? strlen(data) : 0, 0}; - return c; -} - -static inline cmark_chunk cmark_chunk_dup(const cmark_chunk *ch, int pos, int len) -{ - cmark_chunk c = {ch->data + pos, len, 0}; - return c; -} - -static inline cmark_chunk cmark_chunk_buf_detach(cmark_strbuf *buf) -{ - cmark_chunk c; - - c.len = buf->size; - c.data = cmark_strbuf_detach(buf); - c.alloc = 1; - - return c; -} - -// Convenience macros -#define chunk cmark_chunk -#define chunk_free cmark_chunk_free -#define chunk_ltrim cmark_chunk_ltrim -#define chunk_rtrim cmark_chunk_rtrim -#define chunk_trim cmark_chunk_trim -#define chunk_strchr cmark_chunk_strchr -#define chunk_to_cstr cmark_chunk_to_cstr -#define chunk_literal cmark_chunk_literal -#define chunk_dup cmark_chunk_dup -#define chunk_buf_detach cmark_chunk_buf_detach - -#endif diff --git a/outside/commonmark/src/cmark.c b/outside/commonmark/src/cmark.c deleted file mode 100644 index 140a14cbc..000000000 --- a/outside/commonmark/src/cmark.c +++ /dev/null @@ -1,21 +0,0 @@ -#include -#include -#include -#include "node.h" -#include "html/houdini.h" -#include "cmark.h" -#include "buffer.h" - -char *cmark_markdown_to_html(const char *text, int len) -{ - cmark_node *doc; - char *result; - - doc = cmark_parse_document(text, len); - - result = cmark_render_html(doc); - cmark_node_free(doc); - - return result; -} - diff --git a/outside/commonmark/src/cmark.h b/outside/commonmark/src/cmark.h deleted file mode 100644 index cae4426b7..000000000 --- a/outside/commonmark/src/cmark.h +++ /dev/null @@ -1,343 +0,0 @@ -#ifndef CMARK_H -#define CMARK_H - -#include -#include "cmark_export.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** .SH NAME - * - * .B cmark - * \- CommonMark parsing, manipulating, and rendering - */ - -/** .SH SIMPLE INTERFACE - */ - -/** Current version of library. - */ -#define CMARK_VERSION "0.1" - -/** Convert 'text' (assumed to be a UTF-8 encoded string with length - * 'len' from CommonMark Markdown to HTML, returning a null-terminated, - * UTF-8-encoded string. - */ -CMARK_EXPORT -char *cmark_markdown_to_html(const char *text, int len); - -/** .SH NODE STRUCTURE - */ - -/** - */ -typedef enum { - /* Block */ - CMARK_NODE_DOCUMENT, - CMARK_NODE_BLOCK_QUOTE, - CMARK_NODE_LIST, - CMARK_NODE_LIST_ITEM, - CMARK_NODE_CODE_BLOCK, - CMARK_NODE_HTML, - CMARK_NODE_PARAGRAPH, - CMARK_NODE_HEADER, - CMARK_NODE_HRULE, - CMARK_NODE_REFERENCE_DEF, - - CMARK_NODE_FIRST_BLOCK = CMARK_NODE_DOCUMENT, - CMARK_NODE_LAST_BLOCK = CMARK_NODE_REFERENCE_DEF, - - /* Inline */ - CMARK_NODE_TEXT, - CMARK_NODE_SOFTBREAK, - CMARK_NODE_LINEBREAK, - CMARK_NODE_INLINE_CODE, - CMARK_NODE_INLINE_HTML, - CMARK_NODE_EMPH, - CMARK_NODE_STRONG, - CMARK_NODE_LINK, - CMARK_NODE_IMAGE, - - CMARK_NODE_FIRST_INLINE = CMARK_NODE_TEXT, - CMARK_NODE_LAST_INLINE = CMARK_NODE_IMAGE, -} cmark_node_type; - - -/** - */ -typedef enum { - CMARK_NO_LIST, - CMARK_BULLET_LIST, - CMARK_ORDERED_LIST -} cmark_list_type; - -/** - */ -typedef enum { - CMARK_PERIOD_DELIM, - CMARK_PAREN_DELIM -} cmark_delim_type; - -typedef struct cmark_node cmark_node; -typedef struct cmark_parser cmark_parser; - -/** - * .SH CREATING AND DESTROYING NODES - */ - -/** - */ -CMARK_EXPORT cmark_node* -cmark_node_new(cmark_node_type type); - -/** - */ -CMARK_EXPORT void -cmark_node_free(cmark_node *node); - -/** - * .SH TREE TRAVERSAL - */ -CMARK_EXPORT cmark_node* -cmark_node_next(cmark_node *node); - -/** - */ -CMARK_EXPORT cmark_node* -cmark_node_previous(cmark_node *node); - -/** - */ -CMARK_EXPORT cmark_node* -cmark_node_parent(cmark_node *node); - -/** - */ -CMARK_EXPORT cmark_node* -cmark_node_first_child(cmark_node *node); - -/** - */ -CMARK_EXPORT cmark_node* -cmark_node_last_child(cmark_node *node); - -/** - * .SH ACCESSORS - */ - -/** - */ -CMARK_EXPORT cmark_node_type -cmark_node_get_type(cmark_node *node); - -/** - */ -CMARK_EXPORT const char* -cmark_node_get_string_content(cmark_node *node); - -/** - */ -CMARK_EXPORT int -cmark_node_set_string_content(cmark_node *node, const char *content); - -/** - */ -CMARK_EXPORT int -cmark_node_get_header_level(cmark_node *node); - -/** - */ -CMARK_EXPORT int -cmark_node_set_header_level(cmark_node *node, int level); - -/** - */ -CMARK_EXPORT cmark_list_type -cmark_node_get_list_type(cmark_node *node); - -/** - */ -CMARK_EXPORT int -cmark_node_set_list_type(cmark_node *node, cmark_list_type type); - -/** - */ -CMARK_EXPORT int -cmark_node_get_list_start(cmark_node *node); - -/** - */ -CMARK_EXPORT int -cmark_node_set_list_start(cmark_node *node, int start); - -/** - */ -CMARK_EXPORT int -cmark_node_get_list_tight(cmark_node *node); - -/** - */ -CMARK_EXPORT int -cmark_node_set_list_tight(cmark_node *node, int tight); - -/** - */ -CMARK_EXPORT const char* -cmark_node_get_fence_info(cmark_node *node); - -/** - */ -CMARK_EXPORT int -cmark_node_set_fence_info(cmark_node *node, const char *info); - -/** - */ -CMARK_EXPORT const char* -cmark_node_get_url(cmark_node *node); - -/** - */ -CMARK_EXPORT int -cmark_node_set_url(cmark_node *node, const char *url); - -/** - */ -CMARK_EXPORT const char* -cmark_node_get_title(cmark_node *node); - -/** - */ -CMARK_EXPORT int -cmark_node_set_title(cmark_node *node, const char *title); - -/** - */ -CMARK_EXPORT int -cmark_node_get_start_line(cmark_node *node); - -/** - */ -CMARK_EXPORT int -cmark_node_get_start_column(cmark_node *node); - -/** - */ -CMARK_EXPORT int -cmark_node_get_end_line(cmark_node *node); - -/** - * .SH TREE MANIPULATION - */ - -/** - */ -CMARK_EXPORT void -cmark_node_unlink(cmark_node *node); - -/** - */ -CMARK_EXPORT int -cmark_node_insert_before(cmark_node *node, cmark_node *sibling); - -/** - */ -CMARK_EXPORT int -cmark_node_insert_after(cmark_node *node, cmark_node *sibling); - -/** - */ -CMARK_EXPORT int -cmark_node_prepend_child(cmark_node *node, cmark_node *child); - -/** - */ -CMARK_EXPORT int -cmark_node_append_child(cmark_node *node, cmark_node *child); - -/** - * .SH PARSING - */ - -/** - */ -CMARK_EXPORT -cmark_parser *cmark_parser_new(); - -/** - */ -CMARK_EXPORT -void cmark_parser_free(cmark_parser *parser); - -/** - */ -CMARK_EXPORT -cmark_node *cmark_parser_finish(cmark_parser *parser); - -/** - */ -CMARK_EXPORT -void cmark_parser_feed(cmark_parser *parser, const char *buffer, size_t len); - -/** - */ -CMARK_EXPORT -cmark_node *cmark_parse_document(const char *buffer, size_t len); - -/** - */ -CMARK_EXPORT -cmark_node *cmark_parse_file(FILE *f); - -/** - * .SH RENDERING - */ - -/** - */ -CMARK_EXPORT -char *cmark_render_ast(cmark_node *root); - -/** - */ -CMARK_EXPORT -char *cmark_render_html(cmark_node *root); - -/** .SH AUTHORS - * - * John MacFarlane, Vicent Marti, Kārlis Gaņģis, Nick Wellnhofer. - */ - -#ifndef CMARK_NO_SHORT_NAMES - #define NODE_DOCUMENT CMARK_NODE_DOCUMENT - #define NODE_BLOCK_QUOTE CMARK_NODE_BLOCK_QUOTE - #define NODE_LIST CMARK_NODE_LIST - #define NODE_LIST_ITEM CMARK_NODE_LIST_ITEM - #define NODE_CODE_BLOCK CMARK_NODE_CODE_BLOCK - #define NODE_HTML CMARK_NODE_HTML - #define NODE_PARAGRAPH CMARK_NODE_PARAGRAPH - #define NODE_HEADER CMARK_NODE_HEADER - #define NODE_HRULE CMARK_NODE_HRULE - #define NODE_REFERENCE_DEF CMARK_NODE_REFERENCE_DEF - #define NODE_TEXT CMARK_NODE_TEXT - #define NODE_SOFTBREAK CMARK_NODE_SOFTBREAK - #define NODE_LINEBREAK CMARK_NODE_LINEBREAK - #define NODE_INLINE_CODE CMARK_NODE_INLINE_CODE - #define NODE_INLINE_HTML CMARK_NODE_INLINE_HTML - #define NODE_EMPH CMARK_NODE_EMPH - #define NODE_STRONG CMARK_NODE_STRONG - #define NODE_LINK CMARK_NODE_LINK - #define NODE_IMAGE CMARK_NODE_IMAGE - #define NODE_LINK_LABEL CMARK_NODE_LINK_LABEL - #define BULLET_LIST CMARK_BULLET_LIST - #define ORDERED_LIST CMARK_ORDERED_LIST - #define PERIOD_DELIM CMARK_PERIOD_DELIM - #define PAREN_DELIM CMARK_PAREN_DELIM -#endif - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/outside/commonmark/src/config.h.in b/outside/commonmark/src/config.h.in deleted file mode 100644 index 8769e041d..000000000 --- a/outside/commonmark/src/config.h.in +++ /dev/null @@ -1,49 +0,0 @@ -#cmakedefine HAVE_STDBOOL_H - -#ifdef HAVE_STDBOOL_H - #include -#elif !defined(__cplusplus) - typedef char bool; -#endif - -#cmakedefine HAVE___BUILTIN_EXPECT - -#cmakedefine HAVE___ATTRIBUTE__ - -#ifdef HAVE___ATTRIBUTE__ - #define CMARK_ATTRIBUTE(list) __attribute__ (list) -#else - #define CMARK_ATTRIBUTE(list) -#endif - -#if 1 -#ifndef U3_ALL -#define U3_ALL -#define malloc(a) u3a_malloc(a) -#define calloc(a,b) u3a_calloc(a,b) -#define realloc(a,b) u3a_realloc(a,b) -#define free(a) u3a_free(a) -/* From i/n/a.h -*/ - /* u3a_malloc(): aligned storage measured in bytes. - */ - void* - u3a_malloc(size_t len_i); - - /* u3a_calloc(): aligned storage measured in bytes. - */ - void* - u3a_calloc(size_t num_i, size_t len_i); - - /* u3a_realloc(): aligned realloc in bytes. - */ - void* - u3a_realloc(void* lag_v, size_t len_i); - - /* u3a_free(): free for aligned malloc. - */ - void - u3a_free(void* tox_v); -#endif -#endif - diff --git a/outside/commonmark/src/debug.h b/outside/commonmark/src/debug.h deleted file mode 100644 index fd2ef62d7..000000000 --- a/outside/commonmark/src/debug.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef CMARK_DEBUG_H -#define CMARK_DEBUG_H -#include -#include -#include - -#ifdef NDEBUG -#define debug(M, ...) -#else -#define debug(M, ...) \ - fprintf(stderr, "DEBUG %s:%d: " M "\n", __FILE__, __LINE__, ##__VA_ARGS__) -#endif - -#define clean_errno() (errno == 0 ? "None" : strerror(errno)) - -#define log_err(M, ...) \ - fprintf(stderr, "[ERROR] (%s:%d: errno: %s) " M "\n", __FILE__, __LINE__, \ - clean_errno(), ##__VA_ARGS__) - -#define log_warn(M, ...) \ - fprintf(stderr, "[WARN] (%s:%d: errno: %s) " M "\n", __FILE__, __LINE__, \ - clean_errno(), ##__VA_ARGS__) - -#define log_info(M, ...) fprintf(stderr, "[INFO] (%s:%d) " M "\n", __FILE__, \ - __LINE__, ##__VA_ARGS__) - -#define check(A, M, ...) \ - if(!(A)) { log_err(M, ##__VA_ARGS__); errno=0; goto error; } - -#define sentinel(M, ...) \ - { log_err(M, ##__VA_ARGS__); errno=0; goto error; } - -#define check_debug(A, M, ...) \ - if(!(A)) { debug(M, ##__VA_ARGS__); errno=0; goto error; } - -#endif diff --git a/outside/commonmark/src/html/houdini.h b/outside/commonmark/src/html/houdini.h deleted file mode 100644 index 9e1200ece..000000000 --- a/outside/commonmark/src/html/houdini.h +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef CMARK_HOUDINI_H -#define CMARK_HOUDINI_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include "config.h" -#include "buffer.h" - -#ifdef HAVE___BUILTIN_EXPECT -# define likely(x) __builtin_expect((x),1) -# define unlikely(x) __builtin_expect((x),0) -#else -# define likely(x) (x) -# define unlikely(x) (x) -#endif - -#ifdef HOUDINI_USE_LOCALE -# define _isxdigit(c) isxdigit(c) -# define _isdigit(c) isdigit(c) -#else -/* - * Helper _isdigit methods -- do not trust the current locale - * */ -# define _isxdigit(c) (strchr("0123456789ABCDEFabcdef", (c)) != NULL) -# define _isdigit(c) ((c) >= '0' && (c) <= '9') -#endif - -#define HOUDINI_ESCAPED_SIZE(x) (((x) * 12) / 10) -#define HOUDINI_UNESCAPED_SIZE(x) (x) - -extern size_t houdini_unescape_ent(strbuf *ob, const uint8_t *src, size_t size); -extern int houdini_escape_html(strbuf *ob, const uint8_t *src, size_t size); -extern int houdini_escape_html0(strbuf *ob, const uint8_t *src, size_t size, int secure); -extern int houdini_unescape_html(strbuf *ob, const uint8_t *src, size_t size); -extern void houdini_unescape_html_f(strbuf *ob, const uint8_t *src, size_t size); -extern int houdini_escape_xml(strbuf *ob, const uint8_t *src, size_t size); -extern int houdini_escape_uri(strbuf *ob, const uint8_t *src, size_t size); -extern int houdini_escape_url(strbuf *ob, const uint8_t *src, size_t size); -extern int houdini_escape_href(strbuf *ob, const uint8_t *src, size_t size); -extern int houdini_unescape_uri(strbuf *ob, const uint8_t *src, size_t size); -extern int houdini_unescape_url(strbuf *ob, const uint8_t *src, size_t size); -extern int houdini_escape_js(strbuf *ob, const uint8_t *src, size_t size); -extern int houdini_unescape_js(strbuf *ob, const uint8_t *src, size_t size); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/outside/commonmark/src/html/houdini_href_e.c b/outside/commonmark/src/html/houdini_href_e.c deleted file mode 100644 index 12456cec6..000000000 --- a/outside/commonmark/src/html/houdini_href_e.c +++ /dev/null @@ -1,107 +0,0 @@ -#include -#include -#include - -#include "html/houdini.h" - -/* - * The following characters will not be escaped: - * - * -_.+!*'(),%#@?=;:/,+&$ alphanum - * - * Note that this character set is the addition of: - * - * - The characters which are safe to be in an URL - * - The characters which are *not* safe to be in - * an URL because they are RESERVED characters. - * - * We asume (lazily) that any RESERVED char that - * appears inside an URL is actually meant to - * have its native function (i.e. as an URL - * component/separator) and hence needs no escaping. - * - * There are two exceptions: the chacters & (amp) - * and ' (single quote) do not appear in the table. - * They are meant to appear in the URL as components, - * yet they require special HTML-entity escaping - * to generate valid HTML markup. - * - * All other characters will be escaped to %XX. - * - */ -static const char HREF_SAFE[] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -}; - -int -houdini_escape_href(strbuf *ob, const uint8_t *src, size_t size) -{ - static const uint8_t hex_chars[] = "0123456789ABCDEF"; - size_t i = 0, org; - uint8_t hex_str[3]; - - hex_str[0] = '%'; - - while (i < size) { - org = i; - while (i < size && HREF_SAFE[src[i]] != 0) - i++; - - if (likely(i > org)) - strbuf_put(ob, src + org, i - org); - - /* escaping */ - if (i >= size) - break; - - switch (src[i]) { - /* amp appears all the time in URLs, but needs - * HTML-entity escaping to be inside an href */ - case '&': - strbuf_puts(ob, "&"); - break; - - /* the single quote is a valid URL character - * according to the standard; it needs HTML - * entity escaping too */ - case '\'': - strbuf_puts(ob, "'"); - break; - - /* the space can be escaped to %20 or a plus - * sign. we're going with the generic escape - * for now. the plus thing is more commonly seen - * when building GET strings */ -#if 0 - case ' ': - strbuf_putc(ob, '+'); - break; -#endif - - /* every other character goes with a %XX escaping */ - default: - hex_str[1] = hex_chars[(src[i] >> 4) & 0xF]; - hex_str[2] = hex_chars[src[i] & 0xF]; - strbuf_put(ob, hex_str, 3); - } - - i++; - } - - return 1; -} diff --git a/outside/commonmark/src/html/houdini_html_e.c b/outside/commonmark/src/html/houdini_html_e.c deleted file mode 100644 index f2e86fe35..000000000 --- a/outside/commonmark/src/html/houdini_html_e.c +++ /dev/null @@ -1,81 +0,0 @@ -#include -#include -#include - -#include "html/houdini.h" - -/** - * According to the OWASP rules: - * - * & --> & - * < --> < - * > --> > - * " --> " - * ' --> ' ' is not recommended - * / --> / forward slash is included as it helps end an HTML entity - * - */ -static const char HTML_ESCAPE_TABLE[] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, 2, 3, 0, 0, 0, 0, 0, 0, 0, 4, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 6, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -}; - -static const char *HTML_ESCAPES[] = { - "", - """, - "&", - "'", - "/", - "<", - ">" -}; - -int -houdini_escape_html0(strbuf *ob, const uint8_t *src, size_t size, int secure) -{ - size_t i = 0, org, esc = 0; - - while (i < size) { - org = i; - while (i < size && (esc = HTML_ESCAPE_TABLE[src[i]]) == 0) - i++; - - if (i > org) - strbuf_put(ob, src + org, i - org); - - /* escaping */ - if (unlikely(i >= size)) - break; - - /* The forward slash is only escaped in secure mode */ - if ((src[i] == '/' || src[i] == '\'') && !secure) { - strbuf_putc(ob, src[i]); - } else { - strbuf_puts(ob, HTML_ESCAPES[esc]); - } - - i++; - } - - return 1; -} - -int -houdini_escape_html(strbuf *ob, const uint8_t *src, size_t size) -{ - return houdini_escape_html0(ob, src, size, 1); -} diff --git a/outside/commonmark/src/html/houdini_html_u.c b/outside/commonmark/src/html/houdini_html_u.c deleted file mode 100644 index b88b9d147..000000000 --- a/outside/commonmark/src/html/houdini_html_u.c +++ /dev/null @@ -1,112 +0,0 @@ -#include -#include -#include - -#include "buffer.h" -#include "houdini.h" -#include "utf8.h" -#include "html_unescape.h" - -size_t -houdini_unescape_ent(strbuf *ob, const uint8_t *src, size_t size) -{ - size_t i = 0; - - if (size > 3 && src[0] == '#') { - int codepoint = 0; - - if (_isdigit(src[1])) { - for (i = 1; i < size && _isdigit(src[i]); ++i) { - int cp = (codepoint * 10) + (src[i] - '0'); - - if (cp < codepoint) - return 0; - - codepoint = cp; - } - } - - else if (src[1] == 'x' || src[1] == 'X') { - for (i = 2; i < size && _isxdigit(src[i]); ++i) { - int cp = (codepoint * 16) + ((src[i] | 32) % 39 - 9); - - if (cp < codepoint) - return 0; - - codepoint = cp; - } - } - - if (i < size && src[i] == ';' && codepoint) { - utf8proc_encode_char(codepoint, ob); - return i + 1; - } - } - - else { - if (size > MAX_WORD_LENGTH) - size = MAX_WORD_LENGTH; - - for (i = MIN_WORD_LENGTH; i < size; ++i) { - if (src[i] == ' ') - break; - - if (src[i] == ';') { - const struct html_ent *entity = find_entity((char *)src, i); - - if (entity != NULL) { - strbuf_put(ob, entity->utf8, entity->utf8_len); - return i + 1; - } - - break; - } - } - } - - return 0; -} - -int -houdini_unescape_html(strbuf *ob, const uint8_t *src, size_t size) -{ - size_t i = 0, org, ent; - - while (i < size) { - org = i; - while (i < size && src[i] != '&') - i++; - - if (likely(i > org)) { - if (unlikely(org == 0)) { - if (i >= size) - return 0; - - strbuf_grow(ob, HOUDINI_UNESCAPED_SIZE(size)); - } - - strbuf_put(ob, src + org, i - org); - } - - /* escaping */ - if (i >= size) - break; - - i++; - - ent = houdini_unescape_ent(ob, src + i, size - i); - i += ent; - - /* not really an entity */ - if (ent == 0) - strbuf_putc(ob, '&'); - } - - return 1; -} - -void houdini_unescape_html_f(strbuf *ob, const uint8_t *src, size_t size) -{ - if (!houdini_unescape_html(ob, src, size)) - strbuf_put(ob, src, size); -} diff --git a/outside/commonmark/src/html/html.c b/outside/commonmark/src/html/html.c deleted file mode 100644 index 0e3dd15b3..000000000 --- a/outside/commonmark/src/html/html.c +++ /dev/null @@ -1,357 +0,0 @@ -#include -#include -#include -#include - -#include "config.h" -#include "cmark.h" -#include "node.h" -#include "buffer.h" -#include "html/houdini.h" - -// Functions to convert cmark_nodes to HTML strings. - -static bool -finish_node(strbuf *html, cmark_node *node, bool tight); - -static void escape_html(strbuf *dest, const unsigned char *source, int length) -{ - if (length < 0) - length = strlen((char *)source); - - houdini_escape_html0(dest, source, (size_t)length, 0); -} - -static void escape_href(strbuf *dest, const unsigned char *source, int length) -{ - if (length < 0) - length = strlen((char *)source); - - houdini_escape_href(dest, source, (size_t)length); -} - -static inline void cr(strbuf *html) -{ - if (html->size && html->ptr[html->size - 1] != '\n') - strbuf_putc(html, '\n'); -} - -// Convert the inline children of a node to a plain string. -static void inlines_to_plain_html(strbuf *html, cmark_node* node) -{ - cmark_node* cur = node->first_child; - - if (cur == NULL) { - return; - } - - while (true) { - switch(cur->type) { - case NODE_TEXT: - case NODE_INLINE_CODE: - case NODE_INLINE_HTML: - escape_html(html, cur->as.literal.data, cur->as.literal.len); - break; - - case NODE_LINEBREAK: - case NODE_SOFTBREAK: - strbuf_putc(html, ' '); - break; - - default: - break; - } - - if (cur->first_child) { - cur = cur->first_child; - continue; - } - - next_sibling: - if (cur->next) { - cur = cur->next; - continue; - } - cur = cur->parent; - if (cur == node) { - break; - } - goto next_sibling; - } -} - - -// Convert a cmark_node to HTML. -static void node_to_html(strbuf *html, cmark_node *node) -{ - cmark_node *cur; - char start_header[] = ""; - bool tight = false; - bool visit_children; - strbuf *info; - - if (node == NULL) { - return; - } - - cur = node; - while (true) { - // Only NODE_IMAGE wants to skip its children. - visit_children = true; - - switch(cur->type) { - case NODE_DOCUMENT: - break; - - case NODE_PARAGRAPH: - if (!tight) { - cr(html); - strbuf_puts(html, "

    "); - } - break; - - case NODE_BLOCK_QUOTE: - cr(html); - strbuf_puts(html, "

    \n"); - // BLOCK_QUOTE doesn't use any of the 'as' structs, - // so the 'list' member can be used to store the - // current value of 'tight'. - cur->as.list.tight = tight; - tight = false; - break; - - case NODE_LIST_ITEM: - cr(html); - strbuf_puts(html, "
  • "); - break; - - case NODE_LIST: { - cmark_list *list = &cur->as.list; - bool tmp; - - // make sure a list starts at the beginning of the line: - cr(html); - - if (list->list_type == CMARK_BULLET_LIST) { - strbuf_puts(html, "
  • \n"); - // Restore old 'tight' value. - tight = list->tight; - list->tight = false; - break; - } - - case NODE_LIST_ITEM: - strbuf_puts(html, "\n"); - break; - - case NODE_LIST: { - cmark_list *list = &node->as.list; - bool tmp; - strbuf_puts(html, - list->list_type == CMARK_BULLET_LIST ? - "\n" : "\n"); - // Restore old 'tight' value. - tmp = tight; - tight = list->tight; - list->tight = tmp; - break; - } - - case NODE_HEADER: - end_header[3] = '0' + node->as.header.level; - strbuf_puts(html, end_header); - break; - - case NODE_CODE_BLOCK: - strbuf_puts(html, "
    \n"); - break; - - case NODE_INLINE_CODE: - strbuf_puts(html, ""); - break; - - case NODE_LINK: - strbuf_puts(html, ""); - break; - - case NODE_STRONG: - strbuf_puts(html, ""); - break; - - case NODE_EMPH: - strbuf_puts(html, ""); - break; - - default: - break; - } - - return tight; -} - -char *cmark_render_html(cmark_node *root) -{ - char *result; - strbuf html = GH_BUF_INIT; - node_to_html(&html, root); - result = (char *)strbuf_detach(&html); - strbuf_free(&html); - return result; -} diff --git a/outside/commonmark/src/html/html_unescape.gperf b/outside/commonmark/src/html/html_unescape.gperf deleted file mode 100644 index 4d46f67e5..000000000 --- a/outside/commonmark/src/html/html_unescape.gperf +++ /dev/null @@ -1,2131 +0,0 @@ -struct html_ent { - const char *entity; - unsigned int utf8_len; - unsigned char utf8[4]; -}; -%% -"Aacute", 2, {195, 129} -"aacute", 2, {195, 161} -"Abreve", 2, {196, 130} -"abreve", 2, {196, 131} -"ac", 3, {226, 136, 190} -"acd", 3, {226, 136, 191} -"acE", 3, {226, 136, 190} -"Acirc", 2, {195, 130} -"acirc", 2, {195, 162} -"acute", 2, {194, 180} -"Acy", 2, {208, 144} -"acy", 2, {208, 176} -"AElig", 2, {195, 134} -"aelig", 2, {195, 166} -"af", 3, {226, 129, 161} -"Afr", 4, {240, 157, 148, 132} -"afr", 4, {240, 157, 148, 158} -"Agrave", 2, {195, 128} -"agrave", 2, {195, 160} -"alefsym", 3, {226, 132, 181} -"aleph", 3, {226, 132, 181} -"Alpha", 2, {206, 145} -"alpha", 2, {206, 177} -"Amacr", 2, {196, 128} -"amacr", 2, {196, 129} -"amalg", 3, {226, 168, 191} -"amp", 1, {38} -"AMP", 1, {38} -"andand", 3, {226, 169, 149} -"And", 3, {226, 169, 147} -"and", 3, {226, 136, 167} -"andd", 3, {226, 169, 156} -"andslope", 3, {226, 169, 152} -"andv", 3, {226, 169, 154} -"ang", 3, {226, 136, 160} -"ange", 3, {226, 166, 164} -"angle", 3, {226, 136, 160} -"angmsdaa", 3, {226, 166, 168} -"angmsdab", 3, {226, 166, 169} -"angmsdac", 3, {226, 166, 170} -"angmsdad", 3, {226, 166, 171} -"angmsdae", 3, {226, 166, 172} -"angmsdaf", 3, {226, 166, 173} -"angmsdag", 3, {226, 166, 174} -"angmsdah", 3, {226, 166, 175} -"angmsd", 3, {226, 136, 161} -"angrt", 3, {226, 136, 159} -"angrtvb", 3, {226, 138, 190} -"angrtvbd", 3, {226, 166, 157} -"angsph", 3, {226, 136, 162} -"angst", 2, {195, 133} -"angzarr", 3, {226, 141, 188} -"Aogon", 2, {196, 132} -"aogon", 2, {196, 133} -"Aopf", 4, {240, 157, 148, 184} -"aopf", 4, {240, 157, 149, 146} -"apacir", 3, {226, 169, 175} -"ap", 3, {226, 137, 136} -"apE", 3, {226, 169, 176} -"ape", 3, {226, 137, 138} -"apid", 3, {226, 137, 139} -"apos", 1, {39} -"ApplyFunction", 3, {226, 129, 161} -"approx", 3, {226, 137, 136} -"approxeq", 3, {226, 137, 138} -"Aring", 2, {195, 133} -"aring", 2, {195, 165} -"Ascr", 4, {240, 157, 146, 156} -"ascr", 4, {240, 157, 146, 182} -"Assign", 3, {226, 137, 148} -"ast", 1, {42} -"asymp", 3, {226, 137, 136} -"asympeq", 3, {226, 137, 141} -"Atilde", 2, {195, 131} -"atilde", 2, {195, 163} -"Auml", 2, {195, 132} -"auml", 2, {195, 164} -"awconint", 3, {226, 136, 179} -"awint", 3, {226, 168, 145} -"backcong", 3, {226, 137, 140} -"backepsilon", 2, {207, 182} -"backprime", 3, {226, 128, 181} -"backsim", 3, {226, 136, 189} -"backsimeq", 3, {226, 139, 141} -"Backslash", 3, {226, 136, 150} -"Barv", 3, {226, 171, 167} -"barvee", 3, {226, 138, 189} -"barwed", 3, {226, 140, 133} -"Barwed", 3, {226, 140, 134} -"barwedge", 3, {226, 140, 133} -"bbrk", 3, {226, 142, 181} -"bbrktbrk", 3, {226, 142, 182} -"bcong", 3, {226, 137, 140} -"Bcy", 2, {208, 145} -"bcy", 2, {208, 177} -"bdquo", 3, {226, 128, 158} -"becaus", 3, {226, 136, 181} -"because", 3, {226, 136, 181} -"Because", 3, {226, 136, 181} -"bemptyv", 3, {226, 166, 176} -"bepsi", 2, {207, 182} -"bernou", 3, {226, 132, 172} -"Bernoullis", 3, {226, 132, 172} -"Beta", 2, {206, 146} -"beta", 2, {206, 178} -"beth", 3, {226, 132, 182} -"between", 3, {226, 137, 172} -"Bfr", 4, {240, 157, 148, 133} -"bfr", 4, {240, 157, 148, 159} -"bigcap", 3, {226, 139, 130} -"bigcirc", 3, {226, 151, 175} -"bigcup", 3, {226, 139, 131} -"bigodot", 3, {226, 168, 128} -"bigoplus", 3, {226, 168, 129} -"bigotimes", 3, {226, 168, 130} -"bigsqcup", 3, {226, 168, 134} -"bigstar", 3, {226, 152, 133} -"bigtriangledown", 3, {226, 150, 189} -"bigtriangleup", 3, {226, 150, 179} -"biguplus", 3, {226, 168, 132} -"bigvee", 3, {226, 139, 129} -"bigwedge", 3, {226, 139, 128} -"bkarow", 3, {226, 164, 141} -"blacklozenge", 3, {226, 167, 171} -"blacksquare", 3, {226, 150, 170} -"blacktriangle", 3, {226, 150, 180} -"blacktriangledown", 3, {226, 150, 190} -"blacktriangleleft", 3, {226, 151, 130} -"blacktriangleright", 3, {226, 150, 184} -"blank", 3, {226, 144, 163} -"blk12", 3, {226, 150, 146} -"blk14", 3, {226, 150, 145} -"blk34", 3, {226, 150, 147} -"block", 3, {226, 150, 136} -"bne", 1, {61} -"bnequiv", 3, {226, 137, 161} -"bNot", 3, {226, 171, 173} -"bnot", 3, {226, 140, 144} -"Bopf", 4, {240, 157, 148, 185} -"bopf", 4, {240, 157, 149, 147} -"bot", 3, {226, 138, 165} -"bottom", 3, {226, 138, 165} -"bowtie", 3, {226, 139, 136} -"boxbox", 3, {226, 167, 137} -"boxdl", 3, {226, 148, 144} -"boxdL", 3, {226, 149, 149} -"boxDl", 3, {226, 149, 150} -"boxDL", 3, {226, 149, 151} -"boxdr", 3, {226, 148, 140} -"boxdR", 3, {226, 149, 146} -"boxDr", 3, {226, 149, 147} -"boxDR", 3, {226, 149, 148} -"boxh", 3, {226, 148, 128} -"boxH", 3, {226, 149, 144} -"boxhd", 3, {226, 148, 172} -"boxHd", 3, {226, 149, 164} -"boxhD", 3, {226, 149, 165} -"boxHD", 3, {226, 149, 166} -"boxhu", 3, {226, 148, 180} -"boxHu", 3, {226, 149, 167} -"boxhU", 3, {226, 149, 168} -"boxHU", 3, {226, 149, 169} -"boxminus", 3, {226, 138, 159} -"boxplus", 3, {226, 138, 158} -"boxtimes", 3, {226, 138, 160} -"boxul", 3, {226, 148, 152} -"boxuL", 3, {226, 149, 155} -"boxUl", 3, {226, 149, 156} -"boxUL", 3, {226, 149, 157} -"boxur", 3, {226, 148, 148} -"boxuR", 3, {226, 149, 152} -"boxUr", 3, {226, 149, 153} -"boxUR", 3, {226, 149, 154} -"boxv", 3, {226, 148, 130} -"boxV", 3, {226, 149, 145} -"boxvh", 3, {226, 148, 188} -"boxvH", 3, {226, 149, 170} -"boxVh", 3, {226, 149, 171} -"boxVH", 3, {226, 149, 172} -"boxvl", 3, {226, 148, 164} -"boxvL", 3, {226, 149, 161} -"boxVl", 3, {226, 149, 162} -"boxVL", 3, {226, 149, 163} -"boxvr", 3, {226, 148, 156} -"boxvR", 3, {226, 149, 158} -"boxVr", 3, {226, 149, 159} -"boxVR", 3, {226, 149, 160} -"bprime", 3, {226, 128, 181} -"breve", 2, {203, 152} -"Breve", 2, {203, 152} -"brvbar", 2, {194, 166} -"bscr", 4, {240, 157, 146, 183} -"Bscr", 3, {226, 132, 172} -"bsemi", 3, {226, 129, 143} -"bsim", 3, {226, 136, 189} -"bsime", 3, {226, 139, 141} -"bsolb", 3, {226, 167, 133} -"bsol", 1, {92} -"bsolhsub", 3, {226, 159, 136} -"bull", 3, {226, 128, 162} -"bullet", 3, {226, 128, 162} -"bump", 3, {226, 137, 142} -"bumpE", 3, {226, 170, 174} -"bumpe", 3, {226, 137, 143} -"Bumpeq", 3, {226, 137, 142} -"bumpeq", 3, {226, 137, 143} -"Cacute", 2, {196, 134} -"cacute", 2, {196, 135} -"capand", 3, {226, 169, 132} -"capbrcup", 3, {226, 169, 137} -"capcap", 3, {226, 169, 139} -"cap", 3, {226, 136, 169} -"Cap", 3, {226, 139, 146} -"capcup", 3, {226, 169, 135} -"capdot", 3, {226, 169, 128} -"CapitalDifferentialD", 3, {226, 133, 133} -"caps", 3, {226, 136, 169} -"caret", 3, {226, 129, 129} -"caron", 2, {203, 135} -"Cayleys", 3, {226, 132, 173} -"ccaps", 3, {226, 169, 141} -"Ccaron", 2, {196, 140} -"ccaron", 2, {196, 141} -"Ccedil", 2, {195, 135} -"ccedil", 2, {195, 167} -"Ccirc", 2, {196, 136} -"ccirc", 2, {196, 137} -"Cconint", 3, {226, 136, 176} -"ccups", 3, {226, 169, 140} -"ccupssm", 3, {226, 169, 144} -"Cdot", 2, {196, 138} -"cdot", 2, {196, 139} -"cedil", 2, {194, 184} -"Cedilla", 2, {194, 184} -"cemptyv", 3, {226, 166, 178} -"cent", 2, {194, 162} -"centerdot", 2, {194, 183} -"CenterDot", 2, {194, 183} -"cfr", 4, {240, 157, 148, 160} -"Cfr", 3, {226, 132, 173} -"CHcy", 2, {208, 167} -"chcy", 2, {209, 135} -"check", 3, {226, 156, 147} -"checkmark", 3, {226, 156, 147} -"Chi", 2, {206, 167} -"chi", 2, {207, 135} -"circ", 2, {203, 134} -"circeq", 3, {226, 137, 151} -"circlearrowleft", 3, {226, 134, 186} -"circlearrowright", 3, {226, 134, 187} -"circledast", 3, {226, 138, 155} -"circledcirc", 3, {226, 138, 154} -"circleddash", 3, {226, 138, 157} -"CircleDot", 3, {226, 138, 153} -"circledR", 2, {194, 174} -"circledS", 3, {226, 147, 136} -"CircleMinus", 3, {226, 138, 150} -"CirclePlus", 3, {226, 138, 149} -"CircleTimes", 3, {226, 138, 151} -"cir", 3, {226, 151, 139} -"cirE", 3, {226, 167, 131} -"cire", 3, {226, 137, 151} -"cirfnint", 3, {226, 168, 144} -"cirmid", 3, {226, 171, 175} -"cirscir", 3, {226, 167, 130} -"ClockwiseContourIntegral", 3, {226, 136, 178} -"CloseCurlyDoubleQuote", 3, {226, 128, 157} -"CloseCurlyQuote", 3, {226, 128, 153} -"clubs", 3, {226, 153, 163} -"clubsuit", 3, {226, 153, 163} -"colon", 1, {58} -"Colon", 3, {226, 136, 183} -"Colone", 3, {226, 169, 180} -"colone", 3, {226, 137, 148} -"coloneq", 3, {226, 137, 148} -"comma", 1, {44} -"commat", 1, {64} -"comp", 3, {226, 136, 129} -"compfn", 3, {226, 136, 152} -"complement", 3, {226, 136, 129} -"complexes", 3, {226, 132, 130} -"cong", 3, {226, 137, 133} -"congdot", 3, {226, 169, 173} -"Congruent", 3, {226, 137, 161} -"conint", 3, {226, 136, 174} -"Conint", 3, {226, 136, 175} -"ContourIntegral", 3, {226, 136, 174} -"copf", 4, {240, 157, 149, 148} -"Copf", 3, {226, 132, 130} -"coprod", 3, {226, 136, 144} -"Coproduct", 3, {226, 136, 144} -"copy", 2, {194, 169} -"COPY", 2, {194, 169} -"copysr", 3, {226, 132, 151} -"CounterClockwiseContourIntegral", 3, {226, 136, 179} -"crarr", 3, {226, 134, 181} -"cross", 3, {226, 156, 151} -"Cross", 3, {226, 168, 175} -"Cscr", 4, {240, 157, 146, 158} -"cscr", 4, {240, 157, 146, 184} -"csub", 3, {226, 171, 143} -"csube", 3, {226, 171, 145} -"csup", 3, {226, 171, 144} -"csupe", 3, {226, 171, 146} -"ctdot", 3, {226, 139, 175} -"cudarrl", 3, {226, 164, 184} -"cudarrr", 3, {226, 164, 181} -"cuepr", 3, {226, 139, 158} -"cuesc", 3, {226, 139, 159} -"cularr", 3, {226, 134, 182} -"cularrp", 3, {226, 164, 189} -"cupbrcap", 3, {226, 169, 136} -"cupcap", 3, {226, 169, 134} -"CupCap", 3, {226, 137, 141} -"cup", 3, {226, 136, 170} -"Cup", 3, {226, 139, 147} -"cupcup", 3, {226, 169, 138} -"cupdot", 3, {226, 138, 141} -"cupor", 3, {226, 169, 133} -"cups", 3, {226, 136, 170} -"curarr", 3, {226, 134, 183} -"curarrm", 3, {226, 164, 188} -"curlyeqprec", 3, {226, 139, 158} -"curlyeqsucc", 3, {226, 139, 159} -"curlyvee", 3, {226, 139, 142} -"curlywedge", 3, {226, 139, 143} -"curren", 2, {194, 164} -"curvearrowleft", 3, {226, 134, 182} -"curvearrowright", 3, {226, 134, 183} -"cuvee", 3, {226, 139, 142} -"cuwed", 3, {226, 139, 143} -"cwconint", 3, {226, 136, 178} -"cwint", 3, {226, 136, 177} -"cylcty", 3, {226, 140, 173} -"dagger", 3, {226, 128, 160} -"Dagger", 3, {226, 128, 161} -"daleth", 3, {226, 132, 184} -"darr", 3, {226, 134, 147} -"Darr", 3, {226, 134, 161} -"dArr", 3, {226, 135, 147} -"dash", 3, {226, 128, 144} -"Dashv", 3, {226, 171, 164} -"dashv", 3, {226, 138, 163} -"dbkarow", 3, {226, 164, 143} -"dblac", 2, {203, 157} -"Dcaron", 2, {196, 142} -"dcaron", 2, {196, 143} -"Dcy", 2, {208, 148} -"dcy", 2, {208, 180} -"ddagger", 3, {226, 128, 161} -"ddarr", 3, {226, 135, 138} -"DD", 3, {226, 133, 133} -"dd", 3, {226, 133, 134} -"DDotrahd", 3, {226, 164, 145} -"ddotseq", 3, {226, 169, 183} -"deg", 2, {194, 176} -"Del", 3, {226, 136, 135} -"Delta", 2, {206, 148} -"delta", 2, {206, 180} -"demptyv", 3, {226, 166, 177} -"dfisht", 3, {226, 165, 191} -"Dfr", 4, {240, 157, 148, 135} -"dfr", 4, {240, 157, 148, 161} -"dHar", 3, {226, 165, 165} -"dharl", 3, {226, 135, 131} -"dharr", 3, {226, 135, 130} -"DiacriticalAcute", 2, {194, 180} -"DiacriticalDot", 2, {203, 153} -"DiacriticalDoubleAcute", 2, {203, 157} -"DiacriticalGrave", 1, {96} -"DiacriticalTilde", 2, {203, 156} -"diam", 3, {226, 139, 132} -"diamond", 3, {226, 139, 132} -"Diamond", 3, {226, 139, 132} -"diamondsuit", 3, {226, 153, 166} -"diams", 3, {226, 153, 166} -"die", 2, {194, 168} -"DifferentialD", 3, {226, 133, 134} -"digamma", 2, {207, 157} -"disin", 3, {226, 139, 178} -"div", 2, {195, 183} -"divide", 2, {195, 183} -"divideontimes", 3, {226, 139, 135} -"divonx", 3, {226, 139, 135} -"DJcy", 2, {208, 130} -"djcy", 2, {209, 146} -"dlcorn", 3, {226, 140, 158} -"dlcrop", 3, {226, 140, 141} -"dollar", 1, {36} -"Dopf", 4, {240, 157, 148, 187} -"dopf", 4, {240, 157, 149, 149} -"Dot", 2, {194, 168} -"dot", 2, {203, 153} -"DotDot", 3, {226, 131, 156} -"doteq", 3, {226, 137, 144} -"doteqdot", 3, {226, 137, 145} -"DotEqual", 3, {226, 137, 144} -"dotminus", 3, {226, 136, 184} -"dotplus", 3, {226, 136, 148} -"dotsquare", 3, {226, 138, 161} -"doublebarwedge", 3, {226, 140, 134} -"DoubleContourIntegral", 3, {226, 136, 175} -"DoubleDot", 2, {194, 168} -"DoubleDownArrow", 3, {226, 135, 147} -"DoubleLeftArrow", 3, {226, 135, 144} -"DoubleLeftRightArrow", 3, {226, 135, 148} -"DoubleLeftTee", 3, {226, 171, 164} -"DoubleLongLeftArrow", 3, {226, 159, 184} -"DoubleLongLeftRightArrow", 3, {226, 159, 186} -"DoubleLongRightArrow", 3, {226, 159, 185} -"DoubleRightArrow", 3, {226, 135, 146} -"DoubleRightTee", 3, {226, 138, 168} -"DoubleUpArrow", 3, {226, 135, 145} -"DoubleUpDownArrow", 3, {226, 135, 149} -"DoubleVerticalBar", 3, {226, 136, 165} -"DownArrowBar", 3, {226, 164, 147} -"downarrow", 3, {226, 134, 147} -"DownArrow", 3, {226, 134, 147} -"Downarrow", 3, {226, 135, 147} -"DownArrowUpArrow", 3, {226, 135, 181} -"DownBreve", 2, {204, 145} -"downdownarrows", 3, {226, 135, 138} -"downharpoonleft", 3, {226, 135, 131} -"downharpoonright", 3, {226, 135, 130} -"DownLeftRightVector", 3, {226, 165, 144} -"DownLeftTeeVector", 3, {226, 165, 158} -"DownLeftVectorBar", 3, {226, 165, 150} -"DownLeftVector", 3, {226, 134, 189} -"DownRightTeeVector", 3, {226, 165, 159} -"DownRightVectorBar", 3, {226, 165, 151} -"DownRightVector", 3, {226, 135, 129} -"DownTeeArrow", 3, {226, 134, 167} -"DownTee", 3, {226, 138, 164} -"drbkarow", 3, {226, 164, 144} -"drcorn", 3, {226, 140, 159} -"drcrop", 3, {226, 140, 140} -"Dscr", 4, {240, 157, 146, 159} -"dscr", 4, {240, 157, 146, 185} -"DScy", 2, {208, 133} -"dscy", 2, {209, 149} -"dsol", 3, {226, 167, 182} -"Dstrok", 2, {196, 144} -"dstrok", 2, {196, 145} -"dtdot", 3, {226, 139, 177} -"dtri", 3, {226, 150, 191} -"dtrif", 3, {226, 150, 190} -"duarr", 3, {226, 135, 181} -"duhar", 3, {226, 165, 175} -"dwangle", 3, {226, 166, 166} -"DZcy", 2, {208, 143} -"dzcy", 2, {209, 159} -"dzigrarr", 3, {226, 159, 191} -"Eacute", 2, {195, 137} -"eacute", 2, {195, 169} -"easter", 3, {226, 169, 174} -"Ecaron", 2, {196, 154} -"ecaron", 2, {196, 155} -"Ecirc", 2, {195, 138} -"ecirc", 2, {195, 170} -"ecir", 3, {226, 137, 150} -"ecolon", 3, {226, 137, 149} -"Ecy", 2, {208, 173} -"ecy", 2, {209, 141} -"eDDot", 3, {226, 169, 183} -"Edot", 2, {196, 150} -"edot", 2, {196, 151} -"eDot", 3, {226, 137, 145} -"ee", 3, {226, 133, 135} -"efDot", 3, {226, 137, 146} -"Efr", 4, {240, 157, 148, 136} -"efr", 4, {240, 157, 148, 162} -"eg", 3, {226, 170, 154} -"Egrave", 2, {195, 136} -"egrave", 2, {195, 168} -"egs", 3, {226, 170, 150} -"egsdot", 3, {226, 170, 152} -"el", 3, {226, 170, 153} -"Element", 3, {226, 136, 136} -"elinters", 3, {226, 143, 167} -"ell", 3, {226, 132, 147} -"els", 3, {226, 170, 149} -"elsdot", 3, {226, 170, 151} -"Emacr", 2, {196, 146} -"emacr", 2, {196, 147} -"empty", 3, {226, 136, 133} -"emptyset", 3, {226, 136, 133} -"EmptySmallSquare", 3, {226, 151, 187} -"emptyv", 3, {226, 136, 133} -"EmptyVerySmallSquare", 3, {226, 150, 171} -"emsp13", 3, {226, 128, 132} -"emsp14", 3, {226, 128, 133} -"emsp", 3, {226, 128, 131} -"ENG", 2, {197, 138} -"eng", 2, {197, 139} -"ensp", 3, {226, 128, 130} -"Eogon", 2, {196, 152} -"eogon", 2, {196, 153} -"Eopf", 4, {240, 157, 148, 188} -"eopf", 4, {240, 157, 149, 150} -"epar", 3, {226, 139, 149} -"eparsl", 3, {226, 167, 163} -"eplus", 3, {226, 169, 177} -"epsi", 2, {206, 181} -"Epsilon", 2, {206, 149} -"epsilon", 2, {206, 181} -"epsiv", 2, {207, 181} -"eqcirc", 3, {226, 137, 150} -"eqcolon", 3, {226, 137, 149} -"eqsim", 3, {226, 137, 130} -"eqslantgtr", 3, {226, 170, 150} -"eqslantless", 3, {226, 170, 149} -"Equal", 3, {226, 169, 181} -"equals", 1, {61} -"EqualTilde", 3, {226, 137, 130} -"equest", 3, {226, 137, 159} -"Equilibrium", 3, {226, 135, 140} -"equiv", 3, {226, 137, 161} -"equivDD", 3, {226, 169, 184} -"eqvparsl", 3, {226, 167, 165} -"erarr", 3, {226, 165, 177} -"erDot", 3, {226, 137, 147} -"escr", 3, {226, 132, 175} -"Escr", 3, {226, 132, 176} -"esdot", 3, {226, 137, 144} -"Esim", 3, {226, 169, 179} -"esim", 3, {226, 137, 130} -"Eta", 2, {206, 151} -"eta", 2, {206, 183} -"ETH", 2, {195, 144} -"eth", 2, {195, 176} -"Euml", 2, {195, 139} -"euml", 2, {195, 171} -"euro", 3, {226, 130, 172} -"excl", 1, {33} -"exist", 3, {226, 136, 131} -"Exists", 3, {226, 136, 131} -"expectation", 3, {226, 132, 176} -"exponentiale", 3, {226, 133, 135} -"ExponentialE", 3, {226, 133, 135} -"fallingdotseq", 3, {226, 137, 146} -"Fcy", 2, {208, 164} -"fcy", 2, {209, 132} -"female", 3, {226, 153, 128} -"ffilig", 3, {239, 172, 131} -"fflig", 3, {239, 172, 128} -"ffllig", 3, {239, 172, 132} -"Ffr", 4, {240, 157, 148, 137} -"ffr", 4, {240, 157, 148, 163} -"filig", 3, {239, 172, 129} -"FilledSmallSquare", 3, {226, 151, 188} -"FilledVerySmallSquare", 3, {226, 150, 170} -"fjlig", 1, {102} -"flat", 3, {226, 153, 173} -"fllig", 3, {239, 172, 130} -"fltns", 3, {226, 150, 177} -"fnof", 2, {198, 146} -"Fopf", 4, {240, 157, 148, 189} -"fopf", 4, {240, 157, 149, 151} -"forall", 3, {226, 136, 128} -"ForAll", 3, {226, 136, 128} -"fork", 3, {226, 139, 148} -"forkv", 3, {226, 171, 153} -"Fouriertrf", 3, {226, 132, 177} -"fpartint", 3, {226, 168, 141} -"frac12", 2, {194, 189} -"frac13", 3, {226, 133, 147} -"frac14", 2, {194, 188} -"frac15", 3, {226, 133, 149} -"frac16", 3, {226, 133, 153} -"frac18", 3, {226, 133, 155} -"frac23", 3, {226, 133, 148} -"frac25", 3, {226, 133, 150} -"frac34", 2, {194, 190} -"frac35", 3, {226, 133, 151} -"frac38", 3, {226, 133, 156} -"frac45", 3, {226, 133, 152} -"frac56", 3, {226, 133, 154} -"frac58", 3, {226, 133, 157} -"frac78", 3, {226, 133, 158} -"frasl", 3, {226, 129, 132} -"frown", 3, {226, 140, 162} -"fscr", 4, {240, 157, 146, 187} -"Fscr", 3, {226, 132, 177} -"gacute", 2, {199, 181} -"Gamma", 2, {206, 147} -"gamma", 2, {206, 179} -"Gammad", 2, {207, 156} -"gammad", 2, {207, 157} -"gap", 3, {226, 170, 134} -"Gbreve", 2, {196, 158} -"gbreve", 2, {196, 159} -"Gcedil", 2, {196, 162} -"Gcirc", 2, {196, 156} -"gcirc", 2, {196, 157} -"Gcy", 2, {208, 147} -"gcy", 2, {208, 179} -"Gdot", 2, {196, 160} -"gdot", 2, {196, 161} -"ge", 3, {226, 137, 165} -"gE", 3, {226, 137, 167} -"gEl", 3, {226, 170, 140} -"gel", 3, {226, 139, 155} -"geq", 3, {226, 137, 165} -"geqq", 3, {226, 137, 167} -"geqslant", 3, {226, 169, 190} -"gescc", 3, {226, 170, 169} -"ges", 3, {226, 169, 190} -"gesdot", 3, {226, 170, 128} -"gesdoto", 3, {226, 170, 130} -"gesdotol", 3, {226, 170, 132} -"gesl", 3, {226, 139, 155} -"gesles", 3, {226, 170, 148} -"Gfr", 4, {240, 157, 148, 138} -"gfr", 4, {240, 157, 148, 164} -"gg", 3, {226, 137, 171} -"Gg", 3, {226, 139, 153} -"ggg", 3, {226, 139, 153} -"gimel", 3, {226, 132, 183} -"GJcy", 2, {208, 131} -"gjcy", 2, {209, 147} -"gla", 3, {226, 170, 165} -"gl", 3, {226, 137, 183} -"glE", 3, {226, 170, 146} -"glj", 3, {226, 170, 164} -"gnap", 3, {226, 170, 138} -"gnapprox", 3, {226, 170, 138} -"gne", 3, {226, 170, 136} -"gnE", 3, {226, 137, 169} -"gneq", 3, {226, 170, 136} -"gneqq", 3, {226, 137, 169} -"gnsim", 3, {226, 139, 167} -"Gopf", 4, {240, 157, 148, 190} -"gopf", 4, {240, 157, 149, 152} -"grave", 1, {96} -"GreaterEqual", 3, {226, 137, 165} -"GreaterEqualLess", 3, {226, 139, 155} -"GreaterFullEqual", 3, {226, 137, 167} -"GreaterGreater", 3, {226, 170, 162} -"GreaterLess", 3, {226, 137, 183} -"GreaterSlantEqual", 3, {226, 169, 190} -"GreaterTilde", 3, {226, 137, 179} -"Gscr", 4, {240, 157, 146, 162} -"gscr", 3, {226, 132, 138} -"gsim", 3, {226, 137, 179} -"gsime", 3, {226, 170, 142} -"gsiml", 3, {226, 170, 144} -"gtcc", 3, {226, 170, 167} -"gtcir", 3, {226, 169, 186} -"gt", 1, {62} -"GT", 1, {62} -"Gt", 3, {226, 137, 171} -"gtdot", 3, {226, 139, 151} -"gtlPar", 3, {226, 166, 149} -"gtquest", 3, {226, 169, 188} -"gtrapprox", 3, {226, 170, 134} -"gtrarr", 3, {226, 165, 184} -"gtrdot", 3, {226, 139, 151} -"gtreqless", 3, {226, 139, 155} -"gtreqqless", 3, {226, 170, 140} -"gtrless", 3, {226, 137, 183} -"gtrsim", 3, {226, 137, 179} -"gvertneqq", 3, {226, 137, 169} -"gvnE", 3, {226, 137, 169} -"Hacek", 2, {203, 135} -"hairsp", 3, {226, 128, 138} -"half", 2, {194, 189} -"hamilt", 3, {226, 132, 139} -"HARDcy", 2, {208, 170} -"hardcy", 2, {209, 138} -"harrcir", 3, {226, 165, 136} -"harr", 3, {226, 134, 148} -"hArr", 3, {226, 135, 148} -"harrw", 3, {226, 134, 173} -"Hat", 1, {94} -"hbar", 3, {226, 132, 143} -"Hcirc", 2, {196, 164} -"hcirc", 2, {196, 165} -"hearts", 3, {226, 153, 165} -"heartsuit", 3, {226, 153, 165} -"hellip", 3, {226, 128, 166} -"hercon", 3, {226, 138, 185} -"hfr", 4, {240, 157, 148, 165} -"Hfr", 3, {226, 132, 140} -"HilbertSpace", 3, {226, 132, 139} -"hksearow", 3, {226, 164, 165} -"hkswarow", 3, {226, 164, 166} -"hoarr", 3, {226, 135, 191} -"homtht", 3, {226, 136, 187} -"hookleftarrow", 3, {226, 134, 169} -"hookrightarrow", 3, {226, 134, 170} -"hopf", 4, {240, 157, 149, 153} -"Hopf", 3, {226, 132, 141} -"horbar", 3, {226, 128, 149} -"HorizontalLine", 3, {226, 148, 128} -"hscr", 4, {240, 157, 146, 189} -"Hscr", 3, {226, 132, 139} -"hslash", 3, {226, 132, 143} -"Hstrok", 2, {196, 166} -"hstrok", 2, {196, 167} -"HumpDownHump", 3, {226, 137, 142} -"HumpEqual", 3, {226, 137, 143} -"hybull", 3, {226, 129, 131} -"hyphen", 3, {226, 128, 144} -"Iacute", 2, {195, 141} -"iacute", 2, {195, 173} -"ic", 3, {226, 129, 163} -"Icirc", 2, {195, 142} -"icirc", 2, {195, 174} -"Icy", 2, {208, 152} -"icy", 2, {208, 184} -"Idot", 2, {196, 176} -"IEcy", 2, {208, 149} -"iecy", 2, {208, 181} -"iexcl", 2, {194, 161} -"iff", 3, {226, 135, 148} -"ifr", 4, {240, 157, 148, 166} -"Ifr", 3, {226, 132, 145} -"Igrave", 2, {195, 140} -"igrave", 2, {195, 172} -"ii", 3, {226, 133, 136} -"iiiint", 3, {226, 168, 140} -"iiint", 3, {226, 136, 173} -"iinfin", 3, {226, 167, 156} -"iiota", 3, {226, 132, 169} -"IJlig", 2, {196, 178} -"ijlig", 2, {196, 179} -"Imacr", 2, {196, 170} -"imacr", 2, {196, 171} -"image", 3, {226, 132, 145} -"ImaginaryI", 3, {226, 133, 136} -"imagline", 3, {226, 132, 144} -"imagpart", 3, {226, 132, 145} -"imath", 2, {196, 177} -"Im", 3, {226, 132, 145} -"imof", 3, {226, 138, 183} -"imped", 2, {198, 181} -"Implies", 3, {226, 135, 146} -"incare", 3, {226, 132, 133} -"in", 3, {226, 136, 136} -"infin", 3, {226, 136, 158} -"infintie", 3, {226, 167, 157} -"inodot", 2, {196, 177} -"intcal", 3, {226, 138, 186} -"int", 3, {226, 136, 171} -"Int", 3, {226, 136, 172} -"integers", 3, {226, 132, 164} -"Integral", 3, {226, 136, 171} -"intercal", 3, {226, 138, 186} -"Intersection", 3, {226, 139, 130} -"intlarhk", 3, {226, 168, 151} -"intprod", 3, {226, 168, 188} -"InvisibleComma", 3, {226, 129, 163} -"InvisibleTimes", 3, {226, 129, 162} -"IOcy", 2, {208, 129} -"iocy", 2, {209, 145} -"Iogon", 2, {196, 174} -"iogon", 2, {196, 175} -"Iopf", 4, {240, 157, 149, 128} -"iopf", 4, {240, 157, 149, 154} -"Iota", 2, {206, 153} -"iota", 2, {206, 185} -"iprod", 3, {226, 168, 188} -"iquest", 2, {194, 191} -"iscr", 4, {240, 157, 146, 190} -"Iscr", 3, {226, 132, 144} -"isin", 3, {226, 136, 136} -"isindot", 3, {226, 139, 181} -"isinE", 3, {226, 139, 185} -"isins", 3, {226, 139, 180} -"isinsv", 3, {226, 139, 179} -"isinv", 3, {226, 136, 136} -"it", 3, {226, 129, 162} -"Itilde", 2, {196, 168} -"itilde", 2, {196, 169} -"Iukcy", 2, {208, 134} -"iukcy", 2, {209, 150} -"Iuml", 2, {195, 143} -"iuml", 2, {195, 175} -"Jcirc", 2, {196, 180} -"jcirc", 2, {196, 181} -"Jcy", 2, {208, 153} -"jcy", 2, {208, 185} -"Jfr", 4, {240, 157, 148, 141} -"jfr", 4, {240, 157, 148, 167} -"jmath", 2, {200, 183} -"Jopf", 4, {240, 157, 149, 129} -"jopf", 4, {240, 157, 149, 155} -"Jscr", 4, {240, 157, 146, 165} -"jscr", 4, {240, 157, 146, 191} -"Jsercy", 2, {208, 136} -"jsercy", 2, {209, 152} -"Jukcy", 2, {208, 132} -"jukcy", 2, {209, 148} -"Kappa", 2, {206, 154} -"kappa", 2, {206, 186} -"kappav", 2, {207, 176} -"Kcedil", 2, {196, 182} -"kcedil", 2, {196, 183} -"Kcy", 2, {208, 154} -"kcy", 2, {208, 186} -"Kfr", 4, {240, 157, 148, 142} -"kfr", 4, {240, 157, 148, 168} -"kgreen", 2, {196, 184} -"KHcy", 2, {208, 165} -"khcy", 2, {209, 133} -"KJcy", 2, {208, 140} -"kjcy", 2, {209, 156} -"Kopf", 4, {240, 157, 149, 130} -"kopf", 4, {240, 157, 149, 156} -"Kscr", 4, {240, 157, 146, 166} -"kscr", 4, {240, 157, 147, 128} -"lAarr", 3, {226, 135, 154} -"Lacute", 2, {196, 185} -"lacute", 2, {196, 186} -"laemptyv", 3, {226, 166, 180} -"lagran", 3, {226, 132, 146} -"Lambda", 2, {206, 155} -"lambda", 2, {206, 187} -"lang", 3, {226, 159, 168} -"Lang", 3, {226, 159, 170} -"langd", 3, {226, 166, 145} -"langle", 3, {226, 159, 168} -"lap", 3, {226, 170, 133} -"Laplacetrf", 3, {226, 132, 146} -"laquo", 2, {194, 171} -"larrb", 3, {226, 135, 164} -"larrbfs", 3, {226, 164, 159} -"larr", 3, {226, 134, 144} -"Larr", 3, {226, 134, 158} -"lArr", 3, {226, 135, 144} -"larrfs", 3, {226, 164, 157} -"larrhk", 3, {226, 134, 169} -"larrlp", 3, {226, 134, 171} -"larrpl", 3, {226, 164, 185} -"larrsim", 3, {226, 165, 179} -"larrtl", 3, {226, 134, 162} -"latail", 3, {226, 164, 153} -"lAtail", 3, {226, 164, 155} -"lat", 3, {226, 170, 171} -"late", 3, {226, 170, 173} -"lates", 3, {226, 170, 173} -"lbarr", 3, {226, 164, 140} -"lBarr", 3, {226, 164, 142} -"lbbrk", 3, {226, 157, 178} -"lbrace", 1, {123} -"lbrack", 1, {91} -"lbrke", 3, {226, 166, 139} -"lbrksld", 3, {226, 166, 143} -"lbrkslu", 3, {226, 166, 141} -"Lcaron", 2, {196, 189} -"lcaron", 2, {196, 190} -"Lcedil", 2, {196, 187} -"lcedil", 2, {196, 188} -"lceil", 3, {226, 140, 136} -"lcub", 1, {123} -"Lcy", 2, {208, 155} -"lcy", 2, {208, 187} -"ldca", 3, {226, 164, 182} -"ldquo", 3, {226, 128, 156} -"ldquor", 3, {226, 128, 158} -"ldrdhar", 3, {226, 165, 167} -"ldrushar", 3, {226, 165, 139} -"ldsh", 3, {226, 134, 178} -"le", 3, {226, 137, 164} -"lE", 3, {226, 137, 166} -"LeftAngleBracket", 3, {226, 159, 168} -"LeftArrowBar", 3, {226, 135, 164} -"leftarrow", 3, {226, 134, 144} -"LeftArrow", 3, {226, 134, 144} -"Leftarrow", 3, {226, 135, 144} -"LeftArrowRightArrow", 3, {226, 135, 134} -"leftarrowtail", 3, {226, 134, 162} -"LeftCeiling", 3, {226, 140, 136} -"LeftDoubleBracket", 3, {226, 159, 166} -"LeftDownTeeVector", 3, {226, 165, 161} -"LeftDownVectorBar", 3, {226, 165, 153} -"LeftDownVector", 3, {226, 135, 131} -"LeftFloor", 3, {226, 140, 138} -"leftharpoondown", 3, {226, 134, 189} -"leftharpoonup", 3, {226, 134, 188} -"leftleftarrows", 3, {226, 135, 135} -"leftrightarrow", 3, {226, 134, 148} -"LeftRightArrow", 3, {226, 134, 148} -"Leftrightarrow", 3, {226, 135, 148} -"leftrightarrows", 3, {226, 135, 134} -"leftrightharpoons", 3, {226, 135, 139} -"leftrightsquigarrow", 3, {226, 134, 173} -"LeftRightVector", 3, {226, 165, 142} -"LeftTeeArrow", 3, {226, 134, 164} -"LeftTee", 3, {226, 138, 163} -"LeftTeeVector", 3, {226, 165, 154} -"leftthreetimes", 3, {226, 139, 139} -"LeftTriangleBar", 3, {226, 167, 143} -"LeftTriangle", 3, {226, 138, 178} -"LeftTriangleEqual", 3, {226, 138, 180} -"LeftUpDownVector", 3, {226, 165, 145} -"LeftUpTeeVector", 3, {226, 165, 160} -"LeftUpVectorBar", 3, {226, 165, 152} -"LeftUpVector", 3, {226, 134, 191} -"LeftVectorBar", 3, {226, 165, 146} -"LeftVector", 3, {226, 134, 188} -"lEg", 3, {226, 170, 139} -"leg", 3, {226, 139, 154} -"leq", 3, {226, 137, 164} -"leqq", 3, {226, 137, 166} -"leqslant", 3, {226, 169, 189} -"lescc", 3, {226, 170, 168} -"les", 3, {226, 169, 189} -"lesdot", 3, {226, 169, 191} -"lesdoto", 3, {226, 170, 129} -"lesdotor", 3, {226, 170, 131} -"lesg", 3, {226, 139, 154} -"lesges", 3, {226, 170, 147} -"lessapprox", 3, {226, 170, 133} -"lessdot", 3, {226, 139, 150} -"lesseqgtr", 3, {226, 139, 154} -"lesseqqgtr", 3, {226, 170, 139} -"LessEqualGreater", 3, {226, 139, 154} -"LessFullEqual", 3, {226, 137, 166} -"LessGreater", 3, {226, 137, 182} -"lessgtr", 3, {226, 137, 182} -"LessLess", 3, {226, 170, 161} -"lesssim", 3, {226, 137, 178} -"LessSlantEqual", 3, {226, 169, 189} -"LessTilde", 3, {226, 137, 178} -"lfisht", 3, {226, 165, 188} -"lfloor", 3, {226, 140, 138} -"Lfr", 4, {240, 157, 148, 143} -"lfr", 4, {240, 157, 148, 169} -"lg", 3, {226, 137, 182} -"lgE", 3, {226, 170, 145} -"lHar", 3, {226, 165, 162} -"lhard", 3, {226, 134, 189} -"lharu", 3, {226, 134, 188} -"lharul", 3, {226, 165, 170} -"lhblk", 3, {226, 150, 132} -"LJcy", 2, {208, 137} -"ljcy", 2, {209, 153} -"llarr", 3, {226, 135, 135} -"ll", 3, {226, 137, 170} -"Ll", 3, {226, 139, 152} -"llcorner", 3, {226, 140, 158} -"Lleftarrow", 3, {226, 135, 154} -"llhard", 3, {226, 165, 171} -"lltri", 3, {226, 151, 186} -"Lmidot", 2, {196, 191} -"lmidot", 2, {197, 128} -"lmoustache", 3, {226, 142, 176} -"lmoust", 3, {226, 142, 176} -"lnap", 3, {226, 170, 137} -"lnapprox", 3, {226, 170, 137} -"lne", 3, {226, 170, 135} -"lnE", 3, {226, 137, 168} -"lneq", 3, {226, 170, 135} -"lneqq", 3, {226, 137, 168} -"lnsim", 3, {226, 139, 166} -"loang", 3, {226, 159, 172} -"loarr", 3, {226, 135, 189} -"lobrk", 3, {226, 159, 166} -"longleftarrow", 3, {226, 159, 181} -"LongLeftArrow", 3, {226, 159, 181} -"Longleftarrow", 3, {226, 159, 184} -"longleftrightarrow", 3, {226, 159, 183} -"LongLeftRightArrow", 3, {226, 159, 183} -"Longleftrightarrow", 3, {226, 159, 186} -"longmapsto", 3, {226, 159, 188} -"longrightarrow", 3, {226, 159, 182} -"LongRightArrow", 3, {226, 159, 182} -"Longrightarrow", 3, {226, 159, 185} -"looparrowleft", 3, {226, 134, 171} -"looparrowright", 3, {226, 134, 172} -"lopar", 3, {226, 166, 133} -"Lopf", 4, {240, 157, 149, 131} -"lopf", 4, {240, 157, 149, 157} -"loplus", 3, {226, 168, 173} -"lotimes", 3, {226, 168, 180} -"lowast", 3, {226, 136, 151} -"lowbar", 1, {95} -"LowerLeftArrow", 3, {226, 134, 153} -"LowerRightArrow", 3, {226, 134, 152} -"loz", 3, {226, 151, 138} -"lozenge", 3, {226, 151, 138} -"lozf", 3, {226, 167, 171} -"lpar", 1, {40} -"lparlt", 3, {226, 166, 147} -"lrarr", 3, {226, 135, 134} -"lrcorner", 3, {226, 140, 159} -"lrhar", 3, {226, 135, 139} -"lrhard", 3, {226, 165, 173} -"lrm", 3, {226, 128, 142} -"lrtri", 3, {226, 138, 191} -"lsaquo", 3, {226, 128, 185} -"lscr", 4, {240, 157, 147, 129} -"Lscr", 3, {226, 132, 146} -"lsh", 3, {226, 134, 176} -"Lsh", 3, {226, 134, 176} -"lsim", 3, {226, 137, 178} -"lsime", 3, {226, 170, 141} -"lsimg", 3, {226, 170, 143} -"lsqb", 1, {91} -"lsquo", 3, {226, 128, 152} -"lsquor", 3, {226, 128, 154} -"Lstrok", 2, {197, 129} -"lstrok", 2, {197, 130} -"ltcc", 3, {226, 170, 166} -"ltcir", 3, {226, 169, 185} -"lt", 1, {60} -"LT", 1, {60} -"Lt", 3, {226, 137, 170} -"ltdot", 3, {226, 139, 150} -"lthree", 3, {226, 139, 139} -"ltimes", 3, {226, 139, 137} -"ltlarr", 3, {226, 165, 182} -"ltquest", 3, {226, 169, 187} -"ltri", 3, {226, 151, 131} -"ltrie", 3, {226, 138, 180} -"ltrif", 3, {226, 151, 130} -"ltrPar", 3, {226, 166, 150} -"lurdshar", 3, {226, 165, 138} -"luruhar", 3, {226, 165, 166} -"lvertneqq", 3, {226, 137, 168} -"lvnE", 3, {226, 137, 168} -"macr", 2, {194, 175} -"male", 3, {226, 153, 130} -"malt", 3, {226, 156, 160} -"maltese", 3, {226, 156, 160} -"Map", 3, {226, 164, 133} -"map", 3, {226, 134, 166} -"mapsto", 3, {226, 134, 166} -"mapstodown", 3, {226, 134, 167} -"mapstoleft", 3, {226, 134, 164} -"mapstoup", 3, {226, 134, 165} -"marker", 3, {226, 150, 174} -"mcomma", 3, {226, 168, 169} -"Mcy", 2, {208, 156} -"mcy", 2, {208, 188} -"mdash", 3, {226, 128, 148} -"mDDot", 3, {226, 136, 186} -"measuredangle", 3, {226, 136, 161} -"MediumSpace", 3, {226, 129, 159} -"Mellintrf", 3, {226, 132, 179} -"Mfr", 4, {240, 157, 148, 144} -"mfr", 4, {240, 157, 148, 170} -"mho", 3, {226, 132, 167} -"micro", 2, {194, 181} -"midast", 1, {42} -"midcir", 3, {226, 171, 176} -"mid", 3, {226, 136, 163} -"middot", 2, {194, 183} -"minusb", 3, {226, 138, 159} -"minus", 3, {226, 136, 146} -"minusd", 3, {226, 136, 184} -"minusdu", 3, {226, 168, 170} -"MinusPlus", 3, {226, 136, 147} -"mlcp", 3, {226, 171, 155} -"mldr", 3, {226, 128, 166} -"mnplus", 3, {226, 136, 147} -"models", 3, {226, 138, 167} -"Mopf", 4, {240, 157, 149, 132} -"mopf", 4, {240, 157, 149, 158} -"mp", 3, {226, 136, 147} -"mscr", 4, {240, 157, 147, 130} -"Mscr", 3, {226, 132, 179} -"mstpos", 3, {226, 136, 190} -"Mu", 2, {206, 156} -"mu", 2, {206, 188} -"multimap", 3, {226, 138, 184} -"mumap", 3, {226, 138, 184} -"nabla", 3, {226, 136, 135} -"Nacute", 2, {197, 131} -"nacute", 2, {197, 132} -"nang", 3, {226, 136, 160} -"nap", 3, {226, 137, 137} -"napE", 3, {226, 169, 176} -"napid", 3, {226, 137, 139} -"napos", 2, {197, 137} -"napprox", 3, {226, 137, 137} -"natural", 3, {226, 153, 174} -"naturals", 3, {226, 132, 149} -"natur", 3, {226, 153, 174} -"nbsp", 2, {194, 160} -"nbump", 3, {226, 137, 142} -"nbumpe", 3, {226, 137, 143} -"ncap", 3, {226, 169, 131} -"Ncaron", 2, {197, 135} -"ncaron", 2, {197, 136} -"Ncedil", 2, {197, 133} -"ncedil", 2, {197, 134} -"ncong", 3, {226, 137, 135} -"ncongdot", 3, {226, 169, 173} -"ncup", 3, {226, 169, 130} -"Ncy", 2, {208, 157} -"ncy", 2, {208, 189} -"ndash", 3, {226, 128, 147} -"nearhk", 3, {226, 164, 164} -"nearr", 3, {226, 134, 151} -"neArr", 3, {226, 135, 151} -"nearrow", 3, {226, 134, 151} -"ne", 3, {226, 137, 160} -"nedot", 3, {226, 137, 144} -"NegativeMediumSpace", 3, {226, 128, 139} -"NegativeThickSpace", 3, {226, 128, 139} -"NegativeThinSpace", 3, {226, 128, 139} -"NegativeVeryThinSpace", 3, {226, 128, 139} -"nequiv", 3, {226, 137, 162} -"nesear", 3, {226, 164, 168} -"nesim", 3, {226, 137, 130} -"NestedGreaterGreater", 3, {226, 137, 171} -"NestedLessLess", 3, {226, 137, 170} -"NewLine", 1, {10} -"nexist", 3, {226, 136, 132} -"nexists", 3, {226, 136, 132} -"Nfr", 4, {240, 157, 148, 145} -"nfr", 4, {240, 157, 148, 171} -"ngE", 3, {226, 137, 167} -"nge", 3, {226, 137, 177} -"ngeq", 3, {226, 137, 177} -"ngeqq", 3, {226, 137, 167} -"ngeqslant", 3, {226, 169, 190} -"nges", 3, {226, 169, 190} -"nGg", 3, {226, 139, 153} -"ngsim", 3, {226, 137, 181} -"nGt", 3, {226, 137, 171} -"ngt", 3, {226, 137, 175} -"ngtr", 3, {226, 137, 175} -"nGtv", 3, {226, 137, 171} -"nharr", 3, {226, 134, 174} -"nhArr", 3, {226, 135, 142} -"nhpar", 3, {226, 171, 178} -"ni", 3, {226, 136, 139} -"nis", 3, {226, 139, 188} -"nisd", 3, {226, 139, 186} -"niv", 3, {226, 136, 139} -"NJcy", 2, {208, 138} -"njcy", 2, {209, 154} -"nlarr", 3, {226, 134, 154} -"nlArr", 3, {226, 135, 141} -"nldr", 3, {226, 128, 165} -"nlE", 3, {226, 137, 166} -"nle", 3, {226, 137, 176} -"nleftarrow", 3, {226, 134, 154} -"nLeftarrow", 3, {226, 135, 141} -"nleftrightarrow", 3, {226, 134, 174} -"nLeftrightarrow", 3, {226, 135, 142} -"nleq", 3, {226, 137, 176} -"nleqq", 3, {226, 137, 166} -"nleqslant", 3, {226, 169, 189} -"nles", 3, {226, 169, 189} -"nless", 3, {226, 137, 174} -"nLl", 3, {226, 139, 152} -"nlsim", 3, {226, 137, 180} -"nLt", 3, {226, 137, 170} -"nlt", 3, {226, 137, 174} -"nltri", 3, {226, 139, 170} -"nltrie", 3, {226, 139, 172} -"nLtv", 3, {226, 137, 170} -"nmid", 3, {226, 136, 164} -"NoBreak", 3, {226, 129, 160} -"NonBreakingSpace", 2, {194, 160} -"nopf", 4, {240, 157, 149, 159} -"Nopf", 3, {226, 132, 149} -"Not", 3, {226, 171, 172} -"not", 2, {194, 172} -"NotCongruent", 3, {226, 137, 162} -"NotCupCap", 3, {226, 137, 173} -"NotDoubleVerticalBar", 3, {226, 136, 166} -"NotElement", 3, {226, 136, 137} -"NotEqual", 3, {226, 137, 160} -"NotEqualTilde", 3, {226, 137, 130} -"NotExists", 3, {226, 136, 132} -"NotGreater", 3, {226, 137, 175} -"NotGreaterEqual", 3, {226, 137, 177} -"NotGreaterFullEqual", 3, {226, 137, 167} -"NotGreaterGreater", 3, {226, 137, 171} -"NotGreaterLess", 3, {226, 137, 185} -"NotGreaterSlantEqual", 3, {226, 169, 190} -"NotGreaterTilde", 3, {226, 137, 181} -"NotHumpDownHump", 3, {226, 137, 142} -"NotHumpEqual", 3, {226, 137, 143} -"notin", 3, {226, 136, 137} -"notindot", 3, {226, 139, 181} -"notinE", 3, {226, 139, 185} -"notinva", 3, {226, 136, 137} -"notinvb", 3, {226, 139, 183} -"notinvc", 3, {226, 139, 182} -"NotLeftTriangleBar", 3, {226, 167, 143} -"NotLeftTriangle", 3, {226, 139, 170} -"NotLeftTriangleEqual", 3, {226, 139, 172} -"NotLess", 3, {226, 137, 174} -"NotLessEqual", 3, {226, 137, 176} -"NotLessGreater", 3, {226, 137, 184} -"NotLessLess", 3, {226, 137, 170} -"NotLessSlantEqual", 3, {226, 169, 189} -"NotLessTilde", 3, {226, 137, 180} -"NotNestedGreaterGreater", 3, {226, 170, 162} -"NotNestedLessLess", 3, {226, 170, 161} -"notni", 3, {226, 136, 140} -"notniva", 3, {226, 136, 140} -"notnivb", 3, {226, 139, 190} -"notnivc", 3, {226, 139, 189} -"NotPrecedes", 3, {226, 138, 128} -"NotPrecedesEqual", 3, {226, 170, 175} -"NotPrecedesSlantEqual", 3, {226, 139, 160} -"NotReverseElement", 3, {226, 136, 140} -"NotRightTriangleBar", 3, {226, 167, 144} -"NotRightTriangle", 3, {226, 139, 171} -"NotRightTriangleEqual", 3, {226, 139, 173} -"NotSquareSubset", 3, {226, 138, 143} -"NotSquareSubsetEqual", 3, {226, 139, 162} -"NotSquareSuperset", 3, {226, 138, 144} -"NotSquareSupersetEqual", 3, {226, 139, 163} -"NotSubset", 3, {226, 138, 130} -"NotSubsetEqual", 3, {226, 138, 136} -"NotSucceeds", 3, {226, 138, 129} -"NotSucceedsEqual", 3, {226, 170, 176} -"NotSucceedsSlantEqual", 3, {226, 139, 161} -"NotSucceedsTilde", 3, {226, 137, 191} -"NotSuperset", 3, {226, 138, 131} -"NotSupersetEqual", 3, {226, 138, 137} -"NotTilde", 3, {226, 137, 129} -"NotTildeEqual", 3, {226, 137, 132} -"NotTildeFullEqual", 3, {226, 137, 135} -"NotTildeTilde", 3, {226, 137, 137} -"NotVerticalBar", 3, {226, 136, 164} -"nparallel", 3, {226, 136, 166} -"npar", 3, {226, 136, 166} -"nparsl", 3, {226, 171, 189} -"npart", 3, {226, 136, 130} -"npolint", 3, {226, 168, 148} -"npr", 3, {226, 138, 128} -"nprcue", 3, {226, 139, 160} -"nprec", 3, {226, 138, 128} -"npreceq", 3, {226, 170, 175} -"npre", 3, {226, 170, 175} -"nrarrc", 3, {226, 164, 179} -"nrarr", 3, {226, 134, 155} -"nrArr", 3, {226, 135, 143} -"nrarrw", 3, {226, 134, 157} -"nrightarrow", 3, {226, 134, 155} -"nRightarrow", 3, {226, 135, 143} -"nrtri", 3, {226, 139, 171} -"nrtrie", 3, {226, 139, 173} -"nsc", 3, {226, 138, 129} -"nsccue", 3, {226, 139, 161} -"nsce", 3, {226, 170, 176} -"Nscr", 4, {240, 157, 146, 169} -"nscr", 4, {240, 157, 147, 131} -"nshortmid", 3, {226, 136, 164} -"nshortparallel", 3, {226, 136, 166} -"nsim", 3, {226, 137, 129} -"nsime", 3, {226, 137, 132} -"nsimeq", 3, {226, 137, 132} -"nsmid", 3, {226, 136, 164} -"nspar", 3, {226, 136, 166} -"nsqsube", 3, {226, 139, 162} -"nsqsupe", 3, {226, 139, 163} -"nsub", 3, {226, 138, 132} -"nsubE", 3, {226, 171, 133} -"nsube", 3, {226, 138, 136} -"nsubset", 3, {226, 138, 130} -"nsubseteq", 3, {226, 138, 136} -"nsubseteqq", 3, {226, 171, 133} -"nsucc", 3, {226, 138, 129} -"nsucceq", 3, {226, 170, 176} -"nsup", 3, {226, 138, 133} -"nsupE", 3, {226, 171, 134} -"nsupe", 3, {226, 138, 137} -"nsupset", 3, {226, 138, 131} -"nsupseteq", 3, {226, 138, 137} -"nsupseteqq", 3, {226, 171, 134} -"ntgl", 3, {226, 137, 185} -"Ntilde", 2, {195, 145} -"ntilde", 2, {195, 177} -"ntlg", 3, {226, 137, 184} -"ntriangleleft", 3, {226, 139, 170} -"ntrianglelefteq", 3, {226, 139, 172} -"ntriangleright", 3, {226, 139, 171} -"ntrianglerighteq", 3, {226, 139, 173} -"Nu", 2, {206, 157} -"nu", 2, {206, 189} -"num", 1, {35} -"numero", 3, {226, 132, 150} -"numsp", 3, {226, 128, 135} -"nvap", 3, {226, 137, 141} -"nvdash", 3, {226, 138, 172} -"nvDash", 3, {226, 138, 173} -"nVdash", 3, {226, 138, 174} -"nVDash", 3, {226, 138, 175} -"nvge", 3, {226, 137, 165} -"nvgt", 1, {62} -"nvHarr", 3, {226, 164, 132} -"nvinfin", 3, {226, 167, 158} -"nvlArr", 3, {226, 164, 130} -"nvle", 3, {226, 137, 164} -"nvlt", 1, {60} -"nvltrie", 3, {226, 138, 180} -"nvrArr", 3, {226, 164, 131} -"nvrtrie", 3, {226, 138, 181} -"nvsim", 3, {226, 136, 188} -"nwarhk", 3, {226, 164, 163} -"nwarr", 3, {226, 134, 150} -"nwArr", 3, {226, 135, 150} -"nwarrow", 3, {226, 134, 150} -"nwnear", 3, {226, 164, 167} -"Oacute", 2, {195, 147} -"oacute", 2, {195, 179} -"oast", 3, {226, 138, 155} -"Ocirc", 2, {195, 148} -"ocirc", 2, {195, 180} -"ocir", 3, {226, 138, 154} -"Ocy", 2, {208, 158} -"ocy", 2, {208, 190} -"odash", 3, {226, 138, 157} -"Odblac", 2, {197, 144} -"odblac", 2, {197, 145} -"odiv", 3, {226, 168, 184} -"odot", 3, {226, 138, 153} -"odsold", 3, {226, 166, 188} -"OElig", 2, {197, 146} -"oelig", 2, {197, 147} -"ofcir", 3, {226, 166, 191} -"Ofr", 4, {240, 157, 148, 146} -"ofr", 4, {240, 157, 148, 172} -"ogon", 2, {203, 155} -"Ograve", 2, {195, 146} -"ograve", 2, {195, 178} -"ogt", 3, {226, 167, 129} -"ohbar", 3, {226, 166, 181} -"ohm", 2, {206, 169} -"oint", 3, {226, 136, 174} -"olarr", 3, {226, 134, 186} -"olcir", 3, {226, 166, 190} -"olcross", 3, {226, 166, 187} -"oline", 3, {226, 128, 190} -"olt", 3, {226, 167, 128} -"Omacr", 2, {197, 140} -"omacr", 2, {197, 141} -"Omega", 2, {206, 169} -"omega", 2, {207, 137} -"Omicron", 2, {206, 159} -"omicron", 2, {206, 191} -"omid", 3, {226, 166, 182} -"ominus", 3, {226, 138, 150} -"Oopf", 4, {240, 157, 149, 134} -"oopf", 4, {240, 157, 149, 160} -"opar", 3, {226, 166, 183} -"OpenCurlyDoubleQuote", 3, {226, 128, 156} -"OpenCurlyQuote", 3, {226, 128, 152} -"operp", 3, {226, 166, 185} -"oplus", 3, {226, 138, 149} -"orarr", 3, {226, 134, 187} -"Or", 3, {226, 169, 148} -"or", 3, {226, 136, 168} -"ord", 3, {226, 169, 157} -"order", 3, {226, 132, 180} -"orderof", 3, {226, 132, 180} -"ordf", 2, {194, 170} -"ordm", 2, {194, 186} -"origof", 3, {226, 138, 182} -"oror", 3, {226, 169, 150} -"orslope", 3, {226, 169, 151} -"orv", 3, {226, 169, 155} -"oS", 3, {226, 147, 136} -"Oscr", 4, {240, 157, 146, 170} -"oscr", 3, {226, 132, 180} -"Oslash", 2, {195, 152} -"oslash", 2, {195, 184} -"osol", 3, {226, 138, 152} -"Otilde", 2, {195, 149} -"otilde", 2, {195, 181} -"otimesas", 3, {226, 168, 182} -"Otimes", 3, {226, 168, 183} -"otimes", 3, {226, 138, 151} -"Ouml", 2, {195, 150} -"ouml", 2, {195, 182} -"ovbar", 3, {226, 140, 189} -"OverBar", 3, {226, 128, 190} -"OverBrace", 3, {226, 143, 158} -"OverBracket", 3, {226, 142, 180} -"OverParenthesis", 3, {226, 143, 156} -"para", 2, {194, 182} -"parallel", 3, {226, 136, 165} -"par", 3, {226, 136, 165} -"parsim", 3, {226, 171, 179} -"parsl", 3, {226, 171, 189} -"part", 3, {226, 136, 130} -"PartialD", 3, {226, 136, 130} -"Pcy", 2, {208, 159} -"pcy", 2, {208, 191} -"percnt", 1, {37} -"period", 1, {46} -"permil", 3, {226, 128, 176} -"perp", 3, {226, 138, 165} -"pertenk", 3, {226, 128, 177} -"Pfr", 4, {240, 157, 148, 147} -"pfr", 4, {240, 157, 148, 173} -"Phi", 2, {206, 166} -"phi", 2, {207, 134} -"phiv", 2, {207, 149} -"phmmat", 3, {226, 132, 179} -"phone", 3, {226, 152, 142} -"Pi", 2, {206, 160} -"pi", 2, {207, 128} -"pitchfork", 3, {226, 139, 148} -"piv", 2, {207, 150} -"planck", 3, {226, 132, 143} -"planckh", 3, {226, 132, 142} -"plankv", 3, {226, 132, 143} -"plusacir", 3, {226, 168, 163} -"plusb", 3, {226, 138, 158} -"pluscir", 3, {226, 168, 162} -"plus", 1, {43} -"plusdo", 3, {226, 136, 148} -"plusdu", 3, {226, 168, 165} -"pluse", 3, {226, 169, 178} -"PlusMinus", 2, {194, 177} -"plusmn", 2, {194, 177} -"plussim", 3, {226, 168, 166} -"plustwo", 3, {226, 168, 167} -"pm", 2, {194, 177} -"Poincareplane", 3, {226, 132, 140} -"pointint", 3, {226, 168, 149} -"popf", 4, {240, 157, 149, 161} -"Popf", 3, {226, 132, 153} -"pound", 2, {194, 163} -"prap", 3, {226, 170, 183} -"Pr", 3, {226, 170, 187} -"pr", 3, {226, 137, 186} -"prcue", 3, {226, 137, 188} -"precapprox", 3, {226, 170, 183} -"prec", 3, {226, 137, 186} -"preccurlyeq", 3, {226, 137, 188} -"Precedes", 3, {226, 137, 186} -"PrecedesEqual", 3, {226, 170, 175} -"PrecedesSlantEqual", 3, {226, 137, 188} -"PrecedesTilde", 3, {226, 137, 190} -"preceq", 3, {226, 170, 175} -"precnapprox", 3, {226, 170, 185} -"precneqq", 3, {226, 170, 181} -"precnsim", 3, {226, 139, 168} -"pre", 3, {226, 170, 175} -"prE", 3, {226, 170, 179} -"precsim", 3, {226, 137, 190} -"prime", 3, {226, 128, 178} -"Prime", 3, {226, 128, 179} -"primes", 3, {226, 132, 153} -"prnap", 3, {226, 170, 185} -"prnE", 3, {226, 170, 181} -"prnsim", 3, {226, 139, 168} -"prod", 3, {226, 136, 143} -"Product", 3, {226, 136, 143} -"profalar", 3, {226, 140, 174} -"profline", 3, {226, 140, 146} -"profsurf", 3, {226, 140, 147} -"prop", 3, {226, 136, 157} -"Proportional", 3, {226, 136, 157} -"Proportion", 3, {226, 136, 183} -"propto", 3, {226, 136, 157} -"prsim", 3, {226, 137, 190} -"prurel", 3, {226, 138, 176} -"Pscr", 4, {240, 157, 146, 171} -"pscr", 4, {240, 157, 147, 133} -"Psi", 2, {206, 168} -"psi", 2, {207, 136} -"puncsp", 3, {226, 128, 136} -"Qfr", 4, {240, 157, 148, 148} -"qfr", 4, {240, 157, 148, 174} -"qint", 3, {226, 168, 140} -"qopf", 4, {240, 157, 149, 162} -"Qopf", 3, {226, 132, 154} -"qprime", 3, {226, 129, 151} -"Qscr", 4, {240, 157, 146, 172} -"qscr", 4, {240, 157, 147, 134} -"quaternions", 3, {226, 132, 141} -"quatint", 3, {226, 168, 150} -"quest", 1, {63} -"questeq", 3, {226, 137, 159} -"quot", 1, {34} -"QUOT", 1, {34} -"rAarr", 3, {226, 135, 155} -"race", 3, {226, 136, 189} -"Racute", 2, {197, 148} -"racute", 2, {197, 149} -"radic", 3, {226, 136, 154} -"raemptyv", 3, {226, 166, 179} -"rang", 3, {226, 159, 169} -"Rang", 3, {226, 159, 171} -"rangd", 3, {226, 166, 146} -"range", 3, {226, 166, 165} -"rangle", 3, {226, 159, 169} -"raquo", 2, {194, 187} -"rarrap", 3, {226, 165, 181} -"rarrb", 3, {226, 135, 165} -"rarrbfs", 3, {226, 164, 160} -"rarrc", 3, {226, 164, 179} -"rarr", 3, {226, 134, 146} -"Rarr", 3, {226, 134, 160} -"rArr", 3, {226, 135, 146} -"rarrfs", 3, {226, 164, 158} -"rarrhk", 3, {226, 134, 170} -"rarrlp", 3, {226, 134, 172} -"rarrpl", 3, {226, 165, 133} -"rarrsim", 3, {226, 165, 180} -"Rarrtl", 3, {226, 164, 150} -"rarrtl", 3, {226, 134, 163} -"rarrw", 3, {226, 134, 157} -"ratail", 3, {226, 164, 154} -"rAtail", 3, {226, 164, 156} -"ratio", 3, {226, 136, 182} -"rationals", 3, {226, 132, 154} -"rbarr", 3, {226, 164, 141} -"rBarr", 3, {226, 164, 143} -"RBarr", 3, {226, 164, 144} -"rbbrk", 3, {226, 157, 179} -"rbrace", 1, {125} -"rbrack", 1, {93} -"rbrke", 3, {226, 166, 140} -"rbrksld", 3, {226, 166, 142} -"rbrkslu", 3, {226, 166, 144} -"Rcaron", 2, {197, 152} -"rcaron", 2, {197, 153} -"Rcedil", 2, {197, 150} -"rcedil", 2, {197, 151} -"rceil", 3, {226, 140, 137} -"rcub", 1, {125} -"Rcy", 2, {208, 160} -"rcy", 2, {209, 128} -"rdca", 3, {226, 164, 183} -"rdldhar", 3, {226, 165, 169} -"rdquo", 3, {226, 128, 157} -"rdquor", 3, {226, 128, 157} -"rdsh", 3, {226, 134, 179} -"real", 3, {226, 132, 156} -"realine", 3, {226, 132, 155} -"realpart", 3, {226, 132, 156} -"reals", 3, {226, 132, 157} -"Re", 3, {226, 132, 156} -"rect", 3, {226, 150, 173} -"reg", 2, {194, 174} -"REG", 2, {194, 174} -"ReverseElement", 3, {226, 136, 139} -"ReverseEquilibrium", 3, {226, 135, 139} -"ReverseUpEquilibrium", 3, {226, 165, 175} -"rfisht", 3, {226, 165, 189} -"rfloor", 3, {226, 140, 139} -"rfr", 4, {240, 157, 148, 175} -"Rfr", 3, {226, 132, 156} -"rHar", 3, {226, 165, 164} -"rhard", 3, {226, 135, 129} -"rharu", 3, {226, 135, 128} -"rharul", 3, {226, 165, 172} -"Rho", 2, {206, 161} -"rho", 2, {207, 129} -"rhov", 2, {207, 177} -"RightAngleBracket", 3, {226, 159, 169} -"RightArrowBar", 3, {226, 135, 165} -"rightarrow", 3, {226, 134, 146} -"RightArrow", 3, {226, 134, 146} -"Rightarrow", 3, {226, 135, 146} -"RightArrowLeftArrow", 3, {226, 135, 132} -"rightarrowtail", 3, {226, 134, 163} -"RightCeiling", 3, {226, 140, 137} -"RightDoubleBracket", 3, {226, 159, 167} -"RightDownTeeVector", 3, {226, 165, 157} -"RightDownVectorBar", 3, {226, 165, 149} -"RightDownVector", 3, {226, 135, 130} -"RightFloor", 3, {226, 140, 139} -"rightharpoondown", 3, {226, 135, 129} -"rightharpoonup", 3, {226, 135, 128} -"rightleftarrows", 3, {226, 135, 132} -"rightleftharpoons", 3, {226, 135, 140} -"rightrightarrows", 3, {226, 135, 137} -"rightsquigarrow", 3, {226, 134, 157} -"RightTeeArrow", 3, {226, 134, 166} -"RightTee", 3, {226, 138, 162} -"RightTeeVector", 3, {226, 165, 155} -"rightthreetimes", 3, {226, 139, 140} -"RightTriangleBar", 3, {226, 167, 144} -"RightTriangle", 3, {226, 138, 179} -"RightTriangleEqual", 3, {226, 138, 181} -"RightUpDownVector", 3, {226, 165, 143} -"RightUpTeeVector", 3, {226, 165, 156} -"RightUpVectorBar", 3, {226, 165, 148} -"RightUpVector", 3, {226, 134, 190} -"RightVectorBar", 3, {226, 165, 147} -"RightVector", 3, {226, 135, 128} -"ring", 2, {203, 154} -"risingdotseq", 3, {226, 137, 147} -"rlarr", 3, {226, 135, 132} -"rlhar", 3, {226, 135, 140} -"rlm", 3, {226, 128, 143} -"rmoustache", 3, {226, 142, 177} -"rmoust", 3, {226, 142, 177} -"rnmid", 3, {226, 171, 174} -"roang", 3, {226, 159, 173} -"roarr", 3, {226, 135, 190} -"robrk", 3, {226, 159, 167} -"ropar", 3, {226, 166, 134} -"ropf", 4, {240, 157, 149, 163} -"Ropf", 3, {226, 132, 157} -"roplus", 3, {226, 168, 174} -"rotimes", 3, {226, 168, 181} -"RoundImplies", 3, {226, 165, 176} -"rpar", 1, {41} -"rpargt", 3, {226, 166, 148} -"rppolint", 3, {226, 168, 146} -"rrarr", 3, {226, 135, 137} -"Rrightarrow", 3, {226, 135, 155} -"rsaquo", 3, {226, 128, 186} -"rscr", 4, {240, 157, 147, 135} -"Rscr", 3, {226, 132, 155} -"rsh", 3, {226, 134, 177} -"Rsh", 3, {226, 134, 177} -"rsqb", 1, {93} -"rsquo", 3, {226, 128, 153} -"rsquor", 3, {226, 128, 153} -"rthree", 3, {226, 139, 140} -"rtimes", 3, {226, 139, 138} -"rtri", 3, {226, 150, 185} -"rtrie", 3, {226, 138, 181} -"rtrif", 3, {226, 150, 184} -"rtriltri", 3, {226, 167, 142} -"RuleDelayed", 3, {226, 167, 180} -"ruluhar", 3, {226, 165, 168} -"rx", 3, {226, 132, 158} -"Sacute", 2, {197, 154} -"sacute", 2, {197, 155} -"sbquo", 3, {226, 128, 154} -"scap", 3, {226, 170, 184} -"Scaron", 2, {197, 160} -"scaron", 2, {197, 161} -"Sc", 3, {226, 170, 188} -"sc", 3, {226, 137, 187} -"sccue", 3, {226, 137, 189} -"sce", 3, {226, 170, 176} -"scE", 3, {226, 170, 180} -"Scedil", 2, {197, 158} -"scedil", 2, {197, 159} -"Scirc", 2, {197, 156} -"scirc", 2, {197, 157} -"scnap", 3, {226, 170, 186} -"scnE", 3, {226, 170, 182} -"scnsim", 3, {226, 139, 169} -"scpolint", 3, {226, 168, 147} -"scsim", 3, {226, 137, 191} -"Scy", 2, {208, 161} -"scy", 2, {209, 129} -"sdotb", 3, {226, 138, 161} -"sdot", 3, {226, 139, 133} -"sdote", 3, {226, 169, 166} -"searhk", 3, {226, 164, 165} -"searr", 3, {226, 134, 152} -"seArr", 3, {226, 135, 152} -"searrow", 3, {226, 134, 152} -"sect", 2, {194, 167} -"semi", 1, {59} -"seswar", 3, {226, 164, 169} -"setminus", 3, {226, 136, 150} -"setmn", 3, {226, 136, 150} -"sext", 3, {226, 156, 182} -"Sfr", 4, {240, 157, 148, 150} -"sfr", 4, {240, 157, 148, 176} -"sfrown", 3, {226, 140, 162} -"sharp", 3, {226, 153, 175} -"SHCHcy", 2, {208, 169} -"shchcy", 2, {209, 137} -"SHcy", 2, {208, 168} -"shcy", 2, {209, 136} -"ShortDownArrow", 3, {226, 134, 147} -"ShortLeftArrow", 3, {226, 134, 144} -"shortmid", 3, {226, 136, 163} -"shortparallel", 3, {226, 136, 165} -"ShortRightArrow", 3, {226, 134, 146} -"ShortUpArrow", 3, {226, 134, 145} -"shy", 2, {194, 173} -"Sigma", 2, {206, 163} -"sigma", 2, {207, 131} -"sigmaf", 2, {207, 130} -"sigmav", 2, {207, 130} -"sim", 3, {226, 136, 188} -"simdot", 3, {226, 169, 170} -"sime", 3, {226, 137, 131} -"simeq", 3, {226, 137, 131} -"simg", 3, {226, 170, 158} -"simgE", 3, {226, 170, 160} -"siml", 3, {226, 170, 157} -"simlE", 3, {226, 170, 159} -"simne", 3, {226, 137, 134} -"simplus", 3, {226, 168, 164} -"simrarr", 3, {226, 165, 178} -"slarr", 3, {226, 134, 144} -"SmallCircle", 3, {226, 136, 152} -"smallsetminus", 3, {226, 136, 150} -"smashp", 3, {226, 168, 179} -"smeparsl", 3, {226, 167, 164} -"smid", 3, {226, 136, 163} -"smile", 3, {226, 140, 163} -"smt", 3, {226, 170, 170} -"smte", 3, {226, 170, 172} -"smtes", 3, {226, 170, 172} -"SOFTcy", 2, {208, 172} -"softcy", 2, {209, 140} -"solbar", 3, {226, 140, 191} -"solb", 3, {226, 167, 132} -"sol", 1, {47} -"Sopf", 4, {240, 157, 149, 138} -"sopf", 4, {240, 157, 149, 164} -"spades", 3, {226, 153, 160} -"spadesuit", 3, {226, 153, 160} -"spar", 3, {226, 136, 165} -"sqcap", 3, {226, 138, 147} -"sqcaps", 3, {226, 138, 147} -"sqcup", 3, {226, 138, 148} -"sqcups", 3, {226, 138, 148} -"Sqrt", 3, {226, 136, 154} -"sqsub", 3, {226, 138, 143} -"sqsube", 3, {226, 138, 145} -"sqsubset", 3, {226, 138, 143} -"sqsubseteq", 3, {226, 138, 145} -"sqsup", 3, {226, 138, 144} -"sqsupe", 3, {226, 138, 146} -"sqsupset", 3, {226, 138, 144} -"sqsupseteq", 3, {226, 138, 146} -"square", 3, {226, 150, 161} -"Square", 3, {226, 150, 161} -"SquareIntersection", 3, {226, 138, 147} -"SquareSubset", 3, {226, 138, 143} -"SquareSubsetEqual", 3, {226, 138, 145} -"SquareSuperset", 3, {226, 138, 144} -"SquareSupersetEqual", 3, {226, 138, 146} -"SquareUnion", 3, {226, 138, 148} -"squarf", 3, {226, 150, 170} -"squ", 3, {226, 150, 161} -"squf", 3, {226, 150, 170} -"srarr", 3, {226, 134, 146} -"Sscr", 4, {240, 157, 146, 174} -"sscr", 4, {240, 157, 147, 136} -"ssetmn", 3, {226, 136, 150} -"ssmile", 3, {226, 140, 163} -"sstarf", 3, {226, 139, 134} -"Star", 3, {226, 139, 134} -"star", 3, {226, 152, 134} -"starf", 3, {226, 152, 133} -"straightepsilon", 2, {207, 181} -"straightphi", 2, {207, 149} -"strns", 2, {194, 175} -"sub", 3, {226, 138, 130} -"Sub", 3, {226, 139, 144} -"subdot", 3, {226, 170, 189} -"subE", 3, {226, 171, 133} -"sube", 3, {226, 138, 134} -"subedot", 3, {226, 171, 131} -"submult", 3, {226, 171, 129} -"subnE", 3, {226, 171, 139} -"subne", 3, {226, 138, 138} -"subplus", 3, {226, 170, 191} -"subrarr", 3, {226, 165, 185} -"subset", 3, {226, 138, 130} -"Subset", 3, {226, 139, 144} -"subseteq", 3, {226, 138, 134} -"subseteqq", 3, {226, 171, 133} -"SubsetEqual", 3, {226, 138, 134} -"subsetneq", 3, {226, 138, 138} -"subsetneqq", 3, {226, 171, 139} -"subsim", 3, {226, 171, 135} -"subsub", 3, {226, 171, 149} -"subsup", 3, {226, 171, 147} -"succapprox", 3, {226, 170, 184} -"succ", 3, {226, 137, 187} -"succcurlyeq", 3, {226, 137, 189} -"Succeeds", 3, {226, 137, 187} -"SucceedsEqual", 3, {226, 170, 176} -"SucceedsSlantEqual", 3, {226, 137, 189} -"SucceedsTilde", 3, {226, 137, 191} -"succeq", 3, {226, 170, 176} -"succnapprox", 3, {226, 170, 186} -"succneqq", 3, {226, 170, 182} -"succnsim", 3, {226, 139, 169} -"succsim", 3, {226, 137, 191} -"SuchThat", 3, {226, 136, 139} -"sum", 3, {226, 136, 145} -"Sum", 3, {226, 136, 145} -"sung", 3, {226, 153, 170} -"sup1", 2, {194, 185} -"sup2", 2, {194, 178} -"sup3", 2, {194, 179} -"sup", 3, {226, 138, 131} -"Sup", 3, {226, 139, 145} -"supdot", 3, {226, 170, 190} -"supdsub", 3, {226, 171, 152} -"supE", 3, {226, 171, 134} -"supe", 3, {226, 138, 135} -"supedot", 3, {226, 171, 132} -"Superset", 3, {226, 138, 131} -"SupersetEqual", 3, {226, 138, 135} -"suphsol", 3, {226, 159, 137} -"suphsub", 3, {226, 171, 151} -"suplarr", 3, {226, 165, 187} -"supmult", 3, {226, 171, 130} -"supnE", 3, {226, 171, 140} -"supne", 3, {226, 138, 139} -"supplus", 3, {226, 171, 128} -"supset", 3, {226, 138, 131} -"Supset", 3, {226, 139, 145} -"supseteq", 3, {226, 138, 135} -"supseteqq", 3, {226, 171, 134} -"supsetneq", 3, {226, 138, 139} -"supsetneqq", 3, {226, 171, 140} -"supsim", 3, {226, 171, 136} -"supsub", 3, {226, 171, 148} -"supsup", 3, {226, 171, 150} -"swarhk", 3, {226, 164, 166} -"swarr", 3, {226, 134, 153} -"swArr", 3, {226, 135, 153} -"swarrow", 3, {226, 134, 153} -"swnwar", 3, {226, 164, 170} -"szlig", 2, {195, 159} -"Tab", 1, {9} -"target", 3, {226, 140, 150} -"Tau", 2, {206, 164} -"tau", 2, {207, 132} -"tbrk", 3, {226, 142, 180} -"Tcaron", 2, {197, 164} -"tcaron", 2, {197, 165} -"Tcedil", 2, {197, 162} -"tcedil", 2, {197, 163} -"Tcy", 2, {208, 162} -"tcy", 2, {209, 130} -"tdot", 3, {226, 131, 155} -"telrec", 3, {226, 140, 149} -"Tfr", 4, {240, 157, 148, 151} -"tfr", 4, {240, 157, 148, 177} -"there4", 3, {226, 136, 180} -"therefore", 3, {226, 136, 180} -"Therefore", 3, {226, 136, 180} -"Theta", 2, {206, 152} -"theta", 2, {206, 184} -"thetasym", 2, {207, 145} -"thetav", 2, {207, 145} -"thickapprox", 3, {226, 137, 136} -"thicksim", 3, {226, 136, 188} -"ThickSpace", 3, {226, 129, 159} -"ThinSpace", 3, {226, 128, 137} -"thinsp", 3, {226, 128, 137} -"thkap", 3, {226, 137, 136} -"thksim", 3, {226, 136, 188} -"THORN", 2, {195, 158} -"thorn", 2, {195, 190} -"tilde", 2, {203, 156} -"Tilde", 3, {226, 136, 188} -"TildeEqual", 3, {226, 137, 131} -"TildeFullEqual", 3, {226, 137, 133} -"TildeTilde", 3, {226, 137, 136} -"timesbar", 3, {226, 168, 177} -"timesb", 3, {226, 138, 160} -"times", 2, {195, 151} -"timesd", 3, {226, 168, 176} -"tint", 3, {226, 136, 173} -"toea", 3, {226, 164, 168} -"topbot", 3, {226, 140, 182} -"topcir", 3, {226, 171, 177} -"top", 3, {226, 138, 164} -"Topf", 4, {240, 157, 149, 139} -"topf", 4, {240, 157, 149, 165} -"topfork", 3, {226, 171, 154} -"tosa", 3, {226, 164, 169} -"tprime", 3, {226, 128, 180} -"trade", 3, {226, 132, 162} -"TRADE", 3, {226, 132, 162} -"triangle", 3, {226, 150, 181} -"triangledown", 3, {226, 150, 191} -"triangleleft", 3, {226, 151, 131} -"trianglelefteq", 3, {226, 138, 180} -"triangleq", 3, {226, 137, 156} -"triangleright", 3, {226, 150, 185} -"trianglerighteq", 3, {226, 138, 181} -"tridot", 3, {226, 151, 172} -"trie", 3, {226, 137, 156} -"triminus", 3, {226, 168, 186} -"TripleDot", 3, {226, 131, 155} -"triplus", 3, {226, 168, 185} -"trisb", 3, {226, 167, 141} -"tritime", 3, {226, 168, 187} -"trpezium", 3, {226, 143, 162} -"Tscr", 4, {240, 157, 146, 175} -"tscr", 4, {240, 157, 147, 137} -"TScy", 2, {208, 166} -"tscy", 2, {209, 134} -"TSHcy", 2, {208, 139} -"tshcy", 2, {209, 155} -"Tstrok", 2, {197, 166} -"tstrok", 2, {197, 167} -"twixt", 3, {226, 137, 172} -"twoheadleftarrow", 3, {226, 134, 158} -"twoheadrightarrow", 3, {226, 134, 160} -"Uacute", 2, {195, 154} -"uacute", 2, {195, 186} -"uarr", 3, {226, 134, 145} -"Uarr", 3, {226, 134, 159} -"uArr", 3, {226, 135, 145} -"Uarrocir", 3, {226, 165, 137} -"Ubrcy", 2, {208, 142} -"ubrcy", 2, {209, 158} -"Ubreve", 2, {197, 172} -"ubreve", 2, {197, 173} -"Ucirc", 2, {195, 155} -"ucirc", 2, {195, 187} -"Ucy", 2, {208, 163} -"ucy", 2, {209, 131} -"udarr", 3, {226, 135, 133} -"Udblac", 2, {197, 176} -"udblac", 2, {197, 177} -"udhar", 3, {226, 165, 174} -"ufisht", 3, {226, 165, 190} -"Ufr", 4, {240, 157, 148, 152} -"ufr", 4, {240, 157, 148, 178} -"Ugrave", 2, {195, 153} -"ugrave", 2, {195, 185} -"uHar", 3, {226, 165, 163} -"uharl", 3, {226, 134, 191} -"uharr", 3, {226, 134, 190} -"uhblk", 3, {226, 150, 128} -"ulcorn", 3, {226, 140, 156} -"ulcorner", 3, {226, 140, 156} -"ulcrop", 3, {226, 140, 143} -"ultri", 3, {226, 151, 184} -"Umacr", 2, {197, 170} -"umacr", 2, {197, 171} -"uml", 2, {194, 168} -"UnderBar", 1, {95} -"UnderBrace", 3, {226, 143, 159} -"UnderBracket", 3, {226, 142, 181} -"UnderParenthesis", 3, {226, 143, 157} -"Union", 3, {226, 139, 131} -"UnionPlus", 3, {226, 138, 142} -"Uogon", 2, {197, 178} -"uogon", 2, {197, 179} -"Uopf", 4, {240, 157, 149, 140} -"uopf", 4, {240, 157, 149, 166} -"UpArrowBar", 3, {226, 164, 146} -"uparrow", 3, {226, 134, 145} -"UpArrow", 3, {226, 134, 145} -"Uparrow", 3, {226, 135, 145} -"UpArrowDownArrow", 3, {226, 135, 133} -"updownarrow", 3, {226, 134, 149} -"UpDownArrow", 3, {226, 134, 149} -"Updownarrow", 3, {226, 135, 149} -"UpEquilibrium", 3, {226, 165, 174} -"upharpoonleft", 3, {226, 134, 191} -"upharpoonright", 3, {226, 134, 190} -"uplus", 3, {226, 138, 142} -"UpperLeftArrow", 3, {226, 134, 150} -"UpperRightArrow", 3, {226, 134, 151} -"upsi", 2, {207, 133} -"Upsi", 2, {207, 146} -"upsih", 2, {207, 146} -"Upsilon", 2, {206, 165} -"upsilon", 2, {207, 133} -"UpTeeArrow", 3, {226, 134, 165} -"UpTee", 3, {226, 138, 165} -"upuparrows", 3, {226, 135, 136} -"urcorn", 3, {226, 140, 157} -"urcorner", 3, {226, 140, 157} -"urcrop", 3, {226, 140, 142} -"Uring", 2, {197, 174} -"uring", 2, {197, 175} -"urtri", 3, {226, 151, 185} -"Uscr", 4, {240, 157, 146, 176} -"uscr", 4, {240, 157, 147, 138} -"utdot", 3, {226, 139, 176} -"Utilde", 2, {197, 168} -"utilde", 2, {197, 169} -"utri", 3, {226, 150, 181} -"utrif", 3, {226, 150, 180} -"uuarr", 3, {226, 135, 136} -"Uuml", 2, {195, 156} -"uuml", 2, {195, 188} -"uwangle", 3, {226, 166, 167} -"vangrt", 3, {226, 166, 156} -"varepsilon", 2, {207, 181} -"varkappa", 2, {207, 176} -"varnothing", 3, {226, 136, 133} -"varphi", 2, {207, 149} -"varpi", 2, {207, 150} -"varpropto", 3, {226, 136, 157} -"varr", 3, {226, 134, 149} -"vArr", 3, {226, 135, 149} -"varrho", 2, {207, 177} -"varsigma", 2, {207, 130} -"varsubsetneq", 3, {226, 138, 138} -"varsubsetneqq", 3, {226, 171, 139} -"varsupsetneq", 3, {226, 138, 139} -"varsupsetneqq", 3, {226, 171, 140} -"vartheta", 2, {207, 145} -"vartriangleleft", 3, {226, 138, 178} -"vartriangleright", 3, {226, 138, 179} -"vBar", 3, {226, 171, 168} -"Vbar", 3, {226, 171, 171} -"vBarv", 3, {226, 171, 169} -"Vcy", 2, {208, 146} -"vcy", 2, {208, 178} -"vdash", 3, {226, 138, 162} -"vDash", 3, {226, 138, 168} -"Vdash", 3, {226, 138, 169} -"VDash", 3, {226, 138, 171} -"Vdashl", 3, {226, 171, 166} -"veebar", 3, {226, 138, 187} -"vee", 3, {226, 136, 168} -"Vee", 3, {226, 139, 129} -"veeeq", 3, {226, 137, 154} -"vellip", 3, {226, 139, 174} -"verbar", 1, {124} -"Verbar", 3, {226, 128, 150} -"vert", 1, {124} -"Vert", 3, {226, 128, 150} -"VerticalBar", 3, {226, 136, 163} -"VerticalLine", 1, {124} -"VerticalSeparator", 3, {226, 157, 152} -"VerticalTilde", 3, {226, 137, 128} -"VeryThinSpace", 3, {226, 128, 138} -"Vfr", 4, {240, 157, 148, 153} -"vfr", 4, {240, 157, 148, 179} -"vltri", 3, {226, 138, 178} -"vnsub", 3, {226, 138, 130} -"vnsup", 3, {226, 138, 131} -"Vopf", 4, {240, 157, 149, 141} -"vopf", 4, {240, 157, 149, 167} -"vprop", 3, {226, 136, 157} -"vrtri", 3, {226, 138, 179} -"Vscr", 4, {240, 157, 146, 177} -"vscr", 4, {240, 157, 147, 139} -"vsubnE", 3, {226, 171, 139} -"vsubne", 3, {226, 138, 138} -"vsupnE", 3, {226, 171, 140} -"vsupne", 3, {226, 138, 139} -"Vvdash", 3, {226, 138, 170} -"vzigzag", 3, {226, 166, 154} -"Wcirc", 2, {197, 180} -"wcirc", 2, {197, 181} -"wedbar", 3, {226, 169, 159} -"wedge", 3, {226, 136, 167} -"Wedge", 3, {226, 139, 128} -"wedgeq", 3, {226, 137, 153} -"weierp", 3, {226, 132, 152} -"Wfr", 4, {240, 157, 148, 154} -"wfr", 4, {240, 157, 148, 180} -"Wopf", 4, {240, 157, 149, 142} -"wopf", 4, {240, 157, 149, 168} -"wp", 3, {226, 132, 152} -"wr", 3, {226, 137, 128} -"wreath", 3, {226, 137, 128} -"Wscr", 4, {240, 157, 146, 178} -"wscr", 4, {240, 157, 147, 140} -"xcap", 3, {226, 139, 130} -"xcirc", 3, {226, 151, 175} -"xcup", 3, {226, 139, 131} -"xdtri", 3, {226, 150, 189} -"Xfr", 4, {240, 157, 148, 155} -"xfr", 4, {240, 157, 148, 181} -"xharr", 3, {226, 159, 183} -"xhArr", 3, {226, 159, 186} -"Xi", 2, {206, 158} -"xi", 2, {206, 190} -"xlarr", 3, {226, 159, 181} -"xlArr", 3, {226, 159, 184} -"xmap", 3, {226, 159, 188} -"xnis", 3, {226, 139, 187} -"xodot", 3, {226, 168, 128} -"Xopf", 4, {240, 157, 149, 143} -"xopf", 4, {240, 157, 149, 169} -"xoplus", 3, {226, 168, 129} -"xotime", 3, {226, 168, 130} -"xrarr", 3, {226, 159, 182} -"xrArr", 3, {226, 159, 185} -"Xscr", 4, {240, 157, 146, 179} -"xscr", 4, {240, 157, 147, 141} -"xsqcup", 3, {226, 168, 134} -"xuplus", 3, {226, 168, 132} -"xutri", 3, {226, 150, 179} -"xvee", 3, {226, 139, 129} -"xwedge", 3, {226, 139, 128} -"Yacute", 2, {195, 157} -"yacute", 2, {195, 189} -"YAcy", 2, {208, 175} -"yacy", 2, {209, 143} -"Ycirc", 2, {197, 182} -"ycirc", 2, {197, 183} -"Ycy", 2, {208, 171} -"ycy", 2, {209, 139} -"yen", 2, {194, 165} -"Yfr", 4, {240, 157, 148, 156} -"yfr", 4, {240, 157, 148, 182} -"YIcy", 2, {208, 135} -"yicy", 2, {209, 151} -"Yopf", 4, {240, 157, 149, 144} -"yopf", 4, {240, 157, 149, 170} -"Yscr", 4, {240, 157, 146, 180} -"yscr", 4, {240, 157, 147, 142} -"YUcy", 2, {208, 174} -"yucy", 2, {209, 142} -"yuml", 2, {195, 191} -"Yuml", 2, {197, 184} -"Zacute", 2, {197, 185} -"zacute", 2, {197, 186} -"Zcaron", 2, {197, 189} -"zcaron", 2, {197, 190} -"Zcy", 2, {208, 151} -"zcy", 2, {208, 183} -"Zdot", 2, {197, 187} -"zdot", 2, {197, 188} -"zeetrf", 3, {226, 132, 168} -"ZeroWidthSpace", 3, {226, 128, 139} -"Zeta", 2, {206, 150} -"zeta", 2, {206, 182} -"zfr", 4, {240, 157, 148, 183} -"Zfr", 3, {226, 132, 168} -"ZHcy", 2, {208, 150} -"zhcy", 2, {208, 182} -"zigrarr", 3, {226, 135, 157} -"zopf", 4, {240, 157, 149, 171} -"Zopf", 3, {226, 132, 164} -"Zscr", 4, {240, 157, 146, 181} -"zscr", 4, {240, 157, 147, 143} -"zwj", 3, {226, 128, 141} -"zwnj", 3, {226, 128, 140} diff --git a/outside/commonmark/src/html/html_unescape.h b/outside/commonmark/src/html/html_unescape.h deleted file mode 100644 index 097f2cf58..000000000 --- a/outside/commonmark/src/html/html_unescape.h +++ /dev/null @@ -1,9736 +0,0 @@ -/* ANSI-C code produced by gperf version 3.0.3 */ -/* Command-line: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/gperf -L ANSI-C -I -t -N find_entity -H hash_entity -K entity -C -l --null-strings -m5 src/html/html_unescape.gperf */ -/* Computed positions: -k'1-7,10,12,$' */ - -#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ - && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ - && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ - && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ - && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ - && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ - && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ - && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ - && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ - && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ - && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ - && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ - && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ - && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ - && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ - && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ - && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ - && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ - && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ - && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ - && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ - && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ - && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)) -/* The character set is not based on ISO-646. */ -#error "gperf generated tables don't work with this execution character set. Please report a bug to ." -#endif - -#line 1 "src/html/html_unescape.gperf" -struct html_ent { - const char *entity; - unsigned int utf8_len; - unsigned char utf8[4]; -}; -#include - -#define TOTAL_KEYWORDS 2125 -#define MIN_WORD_LENGTH 2 -#define MAX_WORD_LENGTH 31 -#define MIN_HASH_VALUE 39 -#define MAX_HASH_VALUE 16000 -/* maximum key range = 15962, duplicates = 0 */ - -#ifdef __GNUC__ -__inline -#else -#ifdef __cplusplus -inline -#endif -#endif -static unsigned int -hash_entity (register const char *str, register unsigned int len) -{ - static const unsigned short asso_values[] = - { - 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, - 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, - 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, - 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, - 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 2, - 3, 7, 2, 4, 8, 16001, 10, 16001, 16001, 16001, - 16001, 16001, 16001, 16001, 16001, 1890, 1538, 220, 165, 1045, - 535, 1971, 1187, 1262, 35, 126, 201, 133, 350, 1487, - 1965, 3, 478, 134, 8, 147, 73, 41, 23, 212, - 9, 16001, 2, 16001, 2, 16001, 16001, 4154, 29, 3168, - 429, 10, 146, 1925, 2307, 280, 1313, 1924, 4, 651, - 27, 1031, 65, 176, 2, 6, 17, 15, 107, 482, - 3207, 3865, 757, 131, 178, 4, 4, 16001, 16001, 16001, - 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, - 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, - 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, - 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, - 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, - 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, - 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, - 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, - 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, - 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, - 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, - 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, - 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001 - }; - register unsigned int hval = len; - - switch (hval) - { - default: - hval += asso_values[(unsigned char)str[11]]; - /*FALLTHROUGH*/ - case 11: - case 10: - hval += asso_values[(unsigned char)str[9]]; - /*FALLTHROUGH*/ - case 9: - case 8: - case 7: - hval += asso_values[(unsigned char)str[6]]; - /*FALLTHROUGH*/ - case 6: - hval += asso_values[(unsigned char)str[5]]; - /*FALLTHROUGH*/ - case 5: - hval += asso_values[(unsigned char)str[4]+1]; - /*FALLTHROUGH*/ - case 4: - hval += asso_values[(unsigned char)str[3]+3]; - /*FALLTHROUGH*/ - case 3: - hval += asso_values[(unsigned char)str[2]+1]; - /*FALLTHROUGH*/ - case 2: - hval += asso_values[(unsigned char)str[1]+4]; - /*FALLTHROUGH*/ - case 1: - hval += asso_values[(unsigned char)str[0]]; - break; - } - return hval + asso_values[(unsigned char)str[len - 1]]; -} - -const struct html_ent * -find_entity (register const char *str, register unsigned int len) -{ - static const unsigned char lengthtable[] = - { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 4, - 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 4, 0, 0, 3, - 0, 0, 0, 0, 0, 0, 6, 0, 6, 5, 0, 5, 3, 4, - 3, 4, 0, 4, 0, 2, 5, 4, 0, 0, 0, 2, 0, 7, - 0, 7, 3, 0, 5, 0, 0, 0, 0, 0, 4, 0, 0, 6, - 0, 0, 0, 3, 6, 0, 4, 0, 0, 0, 0, 6, 4, 5, - 0, 0, 0, 5, 0, 5, 0, 6, 0, 0, 0, 4, 5, 5, - 5, 3, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, - 0, 0, 0, 3, 4, 0, 3, 0, 0, 5, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 5, 0, - 5, 0, 5, 6, 0, 6, 5, 0, 2, 5, 0, 5, 0, 0, - 0, 0, 4, 0, 0, 0, 3, 0, 3, 5, 0, 0, 5, 0, - 0, 0, 6, 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 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15 - }; - static const struct html_ent wordlist[] = - { - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1502 "src/html/html_unescape.gperf" - {"rarr", 3, {226, 134, 146}}, - {(char*)0}, -#line 834 "src/html/html_unescape.gperf" - {"larr", 3, {226, 134, 144}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 845 "src/html/html_unescape.gperf" - {"lat", 3, {226, 170, 171}}, - {(char*)0}, {(char*)0}, -#line 1904 "src/html/html_unescape.gperf" - {"uarr", 3, {226, 134, 145}}, - {(char*)0}, {(char*)0}, -#line 1236 "src/html/html_unescape.gperf" - {"npr", 3, {226, 138, 128}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1511 "src/html/html_unescape.gperf" - {"rarrtl", 3, {226, 134, 163}}, - {(char*)0}, -#line 842 "src/html/html_unescape.gperf" - {"larrtl", 3, {226, 134, 162}}, -#line 1602 "src/html/html_unescape.gperf" - {"roarr", 3, {226, 135, 190}}, - {(char*)0}, -#line 964 "src/html/html_unescape.gperf" - {"loarr", 3, {226, 135, 189}}, -#line 1169 "src/html/html_unescape.gperf" - {"not", 2, {194, 172}}, -#line 1610 "src/html/html_unescape.gperf" - {"rpar", 1, {41}}, -#line 147 "src/html/html_unescape.gperf" - {"bot", 3, {226, 138, 165}}, -#line 990 "src/html/html_unescape.gperf" - {"lpar", 1, {40}}, - {(char*)0}, -#line 1716 "src/html/html_unescape.gperf" - {"spar", 3, {226, 136, 165}}, - {(char*)0}, -#line 946 "src/html/html_unescape.gperf" - {"ll", 3, {226, 137, 170}}, -#line 1927 "src/html/html_unescape.gperf" - {"uharr", 3, {226, 134, 190}}, -#line 506 "src/html/html_unescape.gperf" - {"epar", 3, {226, 139, 149}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 483 "src/html/html_unescape.gperf" - {"el", 3, {226, 170, 153}}, - {(char*)0}, -#line 1608 "src/html/html_unescape.gperf" - {"rotimes", 3, {226, 168, 181}}, - {(char*)0}, -#line 982 "src/html/html_unescape.gperf" - {"lotimes", 3, {226, 168, 180}}, -#line 1389 "src/html/html_unescape.gperf" - {"par", 3, {226, 136, 165}}, - {(char*)0}, -#line 1133 "src/html/html_unescape.gperf" - {"nharr", 3, {226, 134, 174}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1232 "src/html/html_unescape.gperf" - {"npar", 3, {226, 136, 166}}, - {(char*)0}, {(char*)0}, -#line 1873 "src/html/html_unescape.gperf" - {"tprime", 3, {226, 128, 180}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 487 "src/html/html_unescape.gperf" - {"els", 3, {226, 170, 149}}, -#line 507 "src/html/html_unescape.gperf" - {"eparsl", 3, {226, 167, 163}}, - {(char*)0}, -#line 501 "src/html/html_unescape.gperf" - {"ensp", 3, {226, 128, 130}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 194 "src/html/html_unescape.gperf" - {"bprime", 3, {226, 128, 181}}, -#line 956 "src/html/html_unescape.gperf" - {"lnap", 3, {226, 170, 137}}, -#line 138 "src/html/html_unescape.gperf" - {"blk14", 3, {226, 150, 145}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 137 "src/html/html_unescape.gperf" - {"blk12", 3, {226, 150, 146}}, - {(char*)0}, -#line 139 "src/html/html_unescape.gperf" - {"blk34", 3, {226, 150, 147}}, - {(char*)0}, -#line 1233 "src/html/html_unescape.gperf" - {"nparsl", 3, {226, 171, 189}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1144 "src/html/html_unescape.gperf" - {"nldr", 3, {226, 128, 165}}, -#line 1595 "src/html/html_unescape.gperf" - {"rlarr", 3, {226, 135, 132}}, -#line 1234 "src/html/html_unescape.gperf" - {"npart", 3, {226, 136, 130}}, -#line 945 "src/html/html_unescape.gperf" - {"llarr", 3, {226, 135, 135}}, -#line 1159 "src/html/html_unescape.gperf" - {"nlt", 3, {226, 137, 174}}, -#line 1697 "src/html/html_unescape.gperf" - {"slarr", 3, {226, 134, 144}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1231 "src/html/html_unescape.gperf" - {"nparallel", 3, {226, 136, 166}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1826 "src/html/html_unescape.gperf" - {"Tau", 2, {206, 164}}, -#line 1992 "src/html/html_unescape.gperf" - {"varr", 3, {226, 134, 149}}, - {(char*)0}, -#line 1739 "src/html/html_unescape.gperf" - {"squ", 3, {226, 150, 161}}, - {(char*)0}, {(char*)0}, -#line 1142 "src/html/html_unescape.gperf" - {"nlarr", 3, {226, 134, 154}}, - {(char*)0}, {(char*)0}, -#line 1827 "src/html/html_unescape.gperf" - {"tau", 2, {207, 132}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 958 "src/html/html_unescape.gperf" - {"lne", 3, {226, 170, 135}}, -#line 1613 "src/html/html_unescape.gperf" - {"rrarr", 3, {226, 135, 137}}, - {(char*)0}, -#line 992 "src/html/html_unescape.gperf" - {"lrarr", 3, {226, 135, 134}}, - {(char*)0}, -#line 1741 "src/html/html_unescape.gperf" - {"srarr", 3, {226, 134, 146}}, -#line 1557 "src/html/html_unescape.gperf" - {"rharul", 3, {226, 165, 172}}, - {(char*)0}, -#line 941 "src/html/html_unescape.gperf" - {"lharul", 3, {226, 165, 170}}, -#line 526 "src/html/html_unescape.gperf" - {"erarr", 3, {226, 165, 177}}, - {(char*)0}, -#line 1434 "src/html/html_unescape.gperf" - {"pr", 3, {226, 137, 186}}, -#line 1556 "src/html/html_unescape.gperf" - {"rharu", 3, {226, 135, 128}}, - {(char*)0}, -#line 940 "src/html/html_unescape.gperf" - {"lharu", 3, {226, 134, 188}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1905 "src/html/html_unescape.gperf" - {"Uarr", 3, {226, 134, 159}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1129 "src/html/html_unescape.gperf" - {"nGt", 3, {226, 137, 171}}, - {(char*)0}, -#line 141 "src/html/html_unescape.gperf" - {"bne", 1, {61}}, -#line 1242 "src/html/html_unescape.gperf" - {"nrarr", 3, {226, 134, 155}}, - {(char*)0}, {(char*)0}, -#line 1819 "src/html/html_unescape.gperf" - {"swarr", 3, {226, 134, 153}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1498 "src/html/html_unescape.gperf" - {"rarrap", 3, {226, 165, 181}}, - {(char*)0}, -#line 1967 "src/html/html_unescape.gperf" - {"upuparrows", 3, {226, 135, 136}}, - {(char*)0}, -#line 345 "src/html/html_unescape.gperf" - {"Darr", 3, {226, 134, 161}}, - {(char*)0}, {(char*)0}, -#line 1517 "src/html/html_unescape.gperf" - {"rbarr", 3, {226, 164, 141}}, -#line 398 "src/html/html_unescape.gperf" - {"Dot", 2, {194, 168}}, -#line 848 "src/html/html_unescape.gperf" - {"lbarr", 3, {226, 164, 140}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1307 "src/html/html_unescape.gperf" - {"nwarr", 3, {226, 134, 150}}, - {(char*)0}, -#line 1704 "src/html/html_unescape.gperf" - {"smt", 3, {226, 170, 170}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 497 "src/html/html_unescape.gperf" - {"emsp14", 3, {226, 128, 133}}, -#line 1508 "src/html/html_unescape.gperf" - {"rarrpl", 3, {226, 165, 133}}, - {(char*)0}, -#line 840 "src/html/html_unescape.gperf" - {"larrpl", 3, {226, 164, 185}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1406 "src/html/html_unescape.gperf" - {"phmmat", 3, {226, 132, 179}}, - {(char*)0}, -#line 496 "src/html/html_unescape.gperf" - {"emsp13", 3, {226, 128, 132}}, - {(char*)0}, -#line 1014 "src/html/html_unescape.gperf" - {"LT", 1, {60}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 835 "src/html/html_unescape.gperf" - {"Larr", 3, {226, 134, 158}}, -#line 1525 "src/html/html_unescape.gperf" - {"rbrkslu", 3, {226, 166, 144}}, - {(char*)0}, -#line 855 "src/html/html_unescape.gperf" - {"lbrkslu", 3, {226, 166, 141}}, - {(char*)0}, -#line 1082 "src/html/html_unescape.gperf" - {"napos", 2, {197, 137}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1146 "src/html/html_unescape.gperf" - {"nle", 3, {226, 137, 176}}, - {(char*)0}, -#line 1554 "src/html/html_unescape.gperf" - {"rHar", 3, {226, 165, 164}}, - {(char*)0}, -#line 938 "src/html/html_unescape.gperf" - {"lHar", 3, {226, 165, 162}}, -#line 1477 "src/html/html_unescape.gperf" - {"qprime", 3, {226, 129, 151}}, - {(char*)0}, -#line 829 "src/html/html_unescape.gperf" - {"lap", 3, {226, 170, 133}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1087 "src/html/html_unescape.gperf" - {"nbsp", 2, {194, 160}}, -#line 1925 "src/html/html_unescape.gperf" - {"uHar", 3, {226, 165, 163}}, -#line 1868 "src/html/html_unescape.gperf" - {"top", 3, {226, 138, 164}}, - {(char*)0}, -#line 2004 "src/html/html_unescape.gperf" - {"Vbar", 3, {226, 171, 171}}, - {(char*)0}, {(char*)0}, -#line 947 "src/html/html_unescape.gperf" - {"Ll", 3, {226, 139, 152}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1432 "src/html/html_unescape.gperf" - {"prap", 3, {226, 170, 183}}, - {(char*)0}, -#line 498 "src/html/html_unescape.gperf" - {"emsp", 3, {226, 128, 131}}, - {(char*)0}, {(char*)0}, -#line 1079 "src/html/html_unescape.gperf" - {"nap", 3, {226, 137, 137}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 976 "src/html/html_unescape.gperf" - {"looparrowleft", 3, {226, 134, 171}}, - {(char*)0}, -#line 870 "src/html/html_unescape.gperf" - {"le", 3, {226, 137, 164}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1670 "src/html/html_unescape.gperf" - {"sharp", 3, {226, 153, 175}}, - {(char*)0}, -#line 474 "src/html/html_unescape.gperf" - {"ee", 3, {226, 133, 135}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 914 "src/html/html_unescape.gperf" - {"les", 3, {226, 169, 189}}, -#line 745 "src/html/html_unescape.gperf" - {"in", 3, {226, 136, 136}}, -#line 1461 "src/html/html_unescape.gperf" - {"prop", 3, {226, 136, 157}}, - {(char*)0}, -#line 1866 "src/html/html_unescape.gperf" - {"topbot", 3, {226, 140, 182}}, - {(char*)0}, {(char*)0}, -#line 750 "src/html/html_unescape.gperf" - {"int", 3, {226, 136, 171}}, - {(char*)0}, -#line 1105 "src/html/html_unescape.gperf" - {"ne", 3, {226, 137, 160}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1237 "src/html/html_unescape.gperf" - {"nprcue", 3, {226, 139, 160}}, - {(char*)0}, -#line 1447 "src/html/html_unescape.gperf" - {"pre", 3, {226, 170, 175}}, -#line 509 "src/html/html_unescape.gperf" - {"epsi", 2, {206, 181}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1960 "src/html/html_unescape.gperf" - {"upsi", 2, {207, 133}}, -#line 1839 "src/html/html_unescape.gperf" - {"there4", 3, {226, 136, 180}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1523 "src/html/html_unescape.gperf" - {"rbrke", 3, {226, 166, 140}}, -#line 1658 "src/html/html_unescape.gperf" - {"searr", 3, {226, 134, 152}}, -#line 853 "src/html/html_unescape.gperf" - {"lbrke", 3, {226, 166, 139}}, - {(char*)0}, -#line 132 "src/html/html_unescape.gperf" - {"blacktriangle", 3, {226, 150, 180}}, - {(char*)0}, {(char*)0}, -#line 960 "src/html/html_unescape.gperf" - {"lneq", 3, {226, 170, 135}}, - {(char*)0}, {(char*)0}, -#line 961 "src/html/html_unescape.gperf" - {"lneqq", 3, {226, 137, 168}}, - {(char*)0}, -#line 1418 "src/html/html_unescape.gperf" - {"plus", 1, {43}}, -#line 1154 "src/html/html_unescape.gperf" - {"nles", 3, {226, 169, 189}}, -#line 1106 "src/html/html_unescape.gperf" - {"nedot", 3, {226, 137, 144}}, -#line 134 "src/html/html_unescape.gperf" - {"blacktriangleleft", 3, {226, 151, 130}}, -#line 135 "src/html/html_unescape.gperf" - {"blacktriangleright", 3, {226, 150, 184}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1102 "src/html/html_unescape.gperf" - {"nearr", 3, {226, 134, 151}}, - {(char*)0}, {(char*)0}, -#line 133 "src/html/html_unescape.gperf" - {"blacktriangledown", 3, {226, 150, 190}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1155 "src/html/html_unescape.gperf" - {"nless", 3, {226, 137, 174}}, -#line 490 "src/html/html_unescape.gperf" - {"emacr", 2, {196, 147}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 2034 "src/html/html_unescape.gperf" - {"vprop", 3, {226, 136, 157}}, -#line 1934 "src/html/html_unescape.gperf" - {"umacr", 2, {197, 171}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1701 "src/html/html_unescape.gperf" - {"smeparsl", 3, {226, 167, 164}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1033 "src/html/html_unescape.gperf" - {"Map", 3, {226, 164, 133}}, - {(char*)0}, {(char*)0}, -#line 1420 "src/html/html_unescape.gperf" - {"plusdu", 3, {226, 168, 165}}, -#line 1168 "src/html/html_unescape.gperf" - {"Not", 3, {226, 171, 172}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 2019 "src/html/html_unescape.gperf" - {"Verbar", 3, {226, 128, 150}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1399 "src/html/html_unescape.gperf" - {"perp", 3, {226, 138, 165}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 561 "src/html/html_unescape.gperf" - {"fltns", 3, {226, 150, 177}}, -#line 1423 "src/html/html_unescape.gperf" - {"plusmn", 2, {194, 177}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1151 "src/html/html_unescape.gperf" - {"nleq", 3, {226, 137, 176}}, - {(char*)0}, {(char*)0}, -#line 1152 "src/html/html_unescape.gperf" - {"nleqq", 3, {226, 137, 166}}, - {(char*)0}, -#line 579 "src/html/html_unescape.gperf" - {"frac34", 2, {194, 190}}, -#line 573 "src/html/html_unescape.gperf" - {"frac14", 2, {194, 188}}, -#line 2018 "src/html/html_unescape.gperf" - {"verbar", 1, {124}}, -#line 571 "src/html/html_unescape.gperf" - {"frac12", 2, {194, 189}}, -#line 580 "src/html/html_unescape.gperf" - {"frac35", 3, {226, 133, 151}}, -#line 574 "src/html/html_unescape.gperf" - {"frac15", 3, {226, 133, 149}}, -#line 582 "src/html/html_unescape.gperf" - {"frac45", 3, {226, 133, 152}}, - {(char*)0}, {(char*)0}, -#line 578 "src/html/html_unescape.gperf" - {"frac25", 3, {226, 133, 150}}, - {(char*)0}, -#line 572 "src/html/html_unescape.gperf" - {"frac13", 3, {226, 133, 147}}, - {(char*)0}, -#line 575 "src/html/html_unescape.gperf" - {"frac16", 3, {226, 133, 153}}, -#line 1466 "src/html/html_unescape.gperf" - {"prurel", 3, {226, 138, 176}}, -#line 577 "src/html/html_unescape.gperf" - {"frac23", 3, {226, 133, 148}}, -#line 581 "src/html/html_unescape.gperf" - {"frac38", 3, {226, 133, 156}}, -#line 576 "src/html/html_unescape.gperf" - {"frac18", 3, {226, 133, 155}}, -#line 583 "src/html/html_unescape.gperf" - {"frac56", 3, {226, 133, 154}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 584 "src/html/html_unescape.gperf" - {"frac58", 3, {226, 133, 157}}, - {(char*)0}, -#line 585 "src/html/html_unescape.gperf" - {"frac78", 3, {226, 133, 158}}, -#line 910 "src/html/html_unescape.gperf" - {"leq", 3, {226, 137, 164}}, -#line 344 "src/html/html_unescape.gperf" - {"darr", 3, {226, 134, 147}}, - {(char*)0}, {(char*)0}, -#line 1961 "src/html/html_unescape.gperf" - {"Upsi", 2, {207, 146}}, -#line 399 "src/html/html_unescape.gperf" - {"dot", 2, {203, 153}}, -#line 1407 "src/html/html_unescape.gperf" - {"phone", 3, {226, 152, 142}}, - {(char*)0}, {(char*)0}, -#line 219 "src/html/html_unescape.gperf" - {"Cap", 3, {226, 139, 146}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 131 "src/html/html_unescape.gperf" - {"blacksquare", 3, {226, 150, 170}}, -#line 1600 "src/html/html_unescape.gperf" - {"rnmid", 3, {226, 171, 174}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 911 "src/html/html_unescape.gperf" - {"leqq", 3, {226, 137, 166}}, - {(char*)0}, {(char*)0}, -#line 749 "src/html/html_unescape.gperf" - {"intcal", 3, {226, 138, 186}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 372 "src/html/html_unescape.gperf" - {"dharr", 3, {226, 135, 130}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1555 "src/html/html_unescape.gperf" - {"rhard", 3, {226, 135, 129}}, - {(char*)0}, -#line 939 "src/html/html_unescape.gperf" - {"lhard", 3, {226, 134, 189}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1421 "src/html/html_unescape.gperf" - {"pluse", 3, {226, 169, 178}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1933 "src/html/html_unescape.gperf" - {"Umacr", 2, {197, 170}}, -#line 2015 "src/html/html_unescape.gperf" - {"Vee", 3, {226, 139, 129}}, - {(char*)0}, {(char*)0}, -#line 1503 "src/html/html_unescape.gperf" - {"Rarr", 3, {226, 134, 160}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 304 "src/html/html_unescape.gperf" - {"Cross", 3, {226, 168, 175}}, - {(char*)0}, -#line 1620 "src/html/html_unescape.gperf" - {"rsqb", 1, {93}}, - {(char*)0}, -#line 1006 "src/html/html_unescape.gperf" - {"lsqb", 1, {91}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1510 "src/html/html_unescape.gperf" - {"Rarrtl", 3, {226, 164, 150}}, - {(char*)0}, {(char*)0}, -#line 530 "src/html/html_unescape.gperf" - {"esdot", 3, {226, 137, 144}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 2014 "src/html/html_unescape.gperf" - {"vee", 3, {226, 136, 168}}, -#line 1089 "src/html/html_unescape.gperf" - {"nbumpe", 3, {226, 137, 143}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 948 "src/html/html_unescape.gperf" - {"llcorner", 3, {226, 140, 158}}, -#line 570 "src/html/html_unescape.gperf" - {"fpartint", 3, {226, 168, 141}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1740 "src/html/html_unescape.gperf" - {"squf", 3, {226, 150, 170}}, -#line 1414 "src/html/html_unescape.gperf" - {"plankv", 3, {226, 132, 143}}, - {(char*)0}, {(char*)0}, -#line 525 "src/html/html_unescape.gperf" - {"eqvparsl", 3, {226, 167, 165}}, - {(char*)0}, -#line 1930 "src/html/html_unescape.gperf" - {"ulcorner", 3, {226, 140, 156}}, - {(char*)0}, -#line 2055 "src/html/html_unescape.gperf" - {"wp", 3, {226, 132, 152}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 989 "src/html/html_unescape.gperf" - {"lozf", 3, {226, 167, 171}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 299 "src/html/html_unescape.gperf" - {"COPY", 2, {194, 169}}, - {(char*)0}, -#line 1929 "src/html/html_unescape.gperf" - {"ulcorn", 3, {226, 140, 156}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 2013 "src/html/html_unescape.gperf" - {"veebar", 3, {226, 138, 187}}, - {(char*)0}, -#line 1392 "src/html/html_unescape.gperf" - {"part", 3, {226, 136, 130}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1730 "src/html/html_unescape.gperf" - {"square", 3, {226, 150, 161}}, - {(char*)0}, -#line 1088 "src/html/html_unescape.gperf" - {"nbump", 3, {226, 137, 142}}, -#line 108 "src/html/html_unescape.gperf" - {"bernou", 3, {226, 132, 172}}, -#line 2056 "src/html/html_unescape.gperf" - {"wr", 3, {226, 137, 128}}, -#line 1518 "src/html/html_unescape.gperf" - {"rBarr", 3, {226, 164, 143}}, -#line 993 "src/html/html_unescape.gperf" - {"lrcorner", 3, {226, 140, 159}}, -#line 849 "src/html/html_unescape.gperf" - {"lBarr", 3, {226, 164, 142}}, - {(char*)0}, {(char*)0}, -#line 144 "src/html/html_unescape.gperf" - {"bnot", 3, {226, 140, 144}}, - {(char*)0}, -#line 1662 "src/html/html_unescape.gperf" - {"semi", 1, {59}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1969 "src/html/html_unescape.gperf" - {"urcorner", 3, {226, 140, 157}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1218 "src/html/html_unescape.gperf" - {"NotSubset", 3, {226, 138, 130}}, - {(char*)0}, -#line 1605 "src/html/html_unescape.gperf" - {"ropf", 4, {240, 157, 149, 163}}, -#line 1476 "src/html/html_unescape.gperf" - {"Qopf", 3, {226, 132, 154}}, -#line 980 "src/html/html_unescape.gperf" - {"lopf", 4, {240, 157, 149, 157}}, - {(char*)0}, -#line 1713 "src/html/html_unescape.gperf" - {"sopf", 4, {240, 157, 149, 164}}, -#line 1968 "src/html/html_unescape.gperf" - {"urcorn", 3, {226, 140, 157}}, -#line 1869 "src/html/html_unescape.gperf" - {"Topf", 4, {240, 157, 149, 139}}, -#line 2127 "src/html/html_unescape.gperf" - {"Zopf", 3, {226, 132, 164}}, -#line 505 "src/html/html_unescape.gperf" - {"eopf", 4, {240, 157, 149, 150}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1604 "src/html/html_unescape.gperf" - {"ropar", 3, {226, 166, 134}}, -#line 1945 "src/html/html_unescape.gperf" - {"uopf", 4, {240, 157, 149, 166}}, -#line 978 "src/html/html_unescape.gperf" - {"lopar", 3, {226, 166, 133}}, -#line 1870 "src/html/html_unescape.gperf" - {"topf", 4, {240, 157, 149, 165}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 2075 "src/html/html_unescape.gperf" - {"Xopf", 4, {240, 157, 149, 143}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1166 "src/html/html_unescape.gperf" - {"nopf", 4, {240, 157, 149, 159}}, - {(char*)0}, -#line 146 "src/html/html_unescape.gperf" - {"bopf", 4, {240, 157, 149, 147}}, -#line 512 "src/html/html_unescape.gperf" - {"epsiv", 2, {207, 181}}, -#line 562 "src/html/html_unescape.gperf" - {"fnof", 2, {198, 146}}, -#line 734 "src/html/html_unescape.gperf" - {"imacr", 2, {196, 171}}, - {(char*)0}, {(char*)0}, -#line 792 "src/html/html_unescape.gperf" - {"Jopf", 4, {240, 157, 149, 129}}, - {(char*)0}, -#line 1135 "src/html/html_unescape.gperf" - {"nhpar", 3, {226, 171, 178}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 2053 "src/html/html_unescape.gperf" - {"Wopf", 4, {240, 157, 149, 142}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1721 "src/html/html_unescape.gperf" - {"Sqrt", 3, {226, 136, 154}}, -#line 1263 "src/html/html_unescape.gperf" - {"nsub", 3, {226, 138, 132}}, - {(char*)0}, -#line 1081 "src/html/html_unescape.gperf" - {"napid", 3, {226, 137, 139}}, - {(char*)0}, {(char*)0}, -#line 1224 "src/html/html_unescape.gperf" - {"NotSuperset", 3, {226, 138, 131}}, - {(char*)0}, {(char*)0}, -#line 197 "src/html/html_unescape.gperf" - {"brvbar", 2, {194, 166}}, - {(char*)0}, {(char*)0}, -#line 1711 "src/html/html_unescape.gperf" - {"sol", 1, {47}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 461 "src/html/html_unescape.gperf" - {"easter", 3, {226, 169, 174}}, - {(char*)0}, -#line 1429 "src/html/html_unescape.gperf" - {"popf", 4, {240, 157, 149, 161}}, - {(char*)0}, {(char*)0}, -#line 370 "src/html/html_unescape.gperf" - {"dHar", 3, {226, 165, 165}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 2032 "src/html/html_unescape.gperf" - {"Vopf", 4, {240, 157, 149, 141}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1274 "src/html/html_unescape.gperf" - {"nsupset", 3, {226, 138, 131}}, -#line 1271 "src/html/html_unescape.gperf" - {"nsup", 3, {226, 138, 133}}, -#line 2003 "src/html/html_unescape.gperf" - {"vBar", 3, {226, 171, 168}}, - {(char*)0}, -#line 1266 "src/html/html_unescape.gperf" - {"nsubset", 3, {226, 138, 130}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1851 "src/html/html_unescape.gperf" - {"thkap", 3, {226, 137, 136}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1137 "src/html/html_unescape.gperf" - {"nis", 3, {226, 139, 188}}, -#line 1460 "src/html/html_unescape.gperf" - {"profsurf", 3, {226, 140, 147}}, -#line 1710 "src/html/html_unescape.gperf" - {"solb", 3, {226, 167, 132}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 962 "src/html/html_unescape.gperf" - {"lnsim", 3, {226, 139, 166}}, - {(char*)0}, -#line 1709 "src/html/html_unescape.gperf" - {"solbar", 3, {226, 140, 191}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1731 "src/html/html_unescape.gperf" - {"Square", 3, {226, 150, 161}}, - {(char*)0}, -#line 2033 "src/html/html_unescape.gperf" - {"vopf", 4, {240, 157, 149, 167}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1926 "src/html/html_unescape.gperf" - {"uharl", 3, {226, 134, 191}}, - {(char*)0}, -#line 1931 "src/html/html_unescape.gperf" - {"ulcrop", 3, {226, 140, 143}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 515 "src/html/html_unescape.gperf" - {"eqsim", 3, {226, 137, 130}}, -#line 523 "src/html/html_unescape.gperf" - {"equiv", 3, {226, 137, 161}}, - {(char*)0}, {(char*)0}, -#line 486 "src/html/html_unescape.gperf" - {"ell", 3, {226, 132, 147}}, -#line 1700 "src/html/html_unescape.gperf" - {"smashp", 3, {226, 168, 179}}, -#line 1067 "src/html/html_unescape.gperf" - {"mp", 3, {226, 136, 147}}, - {(char*)0}, {(char*)0}, -#line 814 "src/html/html_unescape.gperf" - {"Kopf", 4, {240, 157, 149, 130}}, - {(char*)0}, {(char*)0}, -#line 1696 "src/html/html_unescape.gperf" - {"simrarr", 3, {226, 165, 178}}, - {(char*)0}, -#line 559 "src/html/html_unescape.gperf" - {"flat", 3, {226, 153, 173}}, - {(char*)0}, -#line 1065 "src/html/html_unescape.gperf" - {"Mopf", 4, {240, 157, 149, 132}}, -#line 1712 "src/html/html_unescape.gperf" - {"Sopf", 4, {240, 157, 149, 138}}, -#line 1062 "src/html/html_unescape.gperf" - {"mldr", 3, {226, 128, 166}}, -#line 1597 "src/html/html_unescape.gperf" - {"rlm", 3, {226, 128, 143}}, -#line 768 "src/html/html_unescape.gperf" - {"iprod", 3, {226, 168, 188}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 991 "src/html/html_unescape.gperf" - {"lparlt", 3, {226, 166, 147}}, - {(char*)0}, -#line 564 "src/html/html_unescape.gperf" - {"fopf", 4, {240, 157, 149, 151}}, -#line 1944 "src/html/html_unescape.gperf" - {"Uopf", 4, {240, 157, 149, 140}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1996 "src/html/html_unescape.gperf" - {"varsubsetneq", 3, {226, 138, 138}}, -#line 1997 "src/html/html_unescape.gperf" - {"varsubsetneqq", 3, {226, 171, 139}}, - {(char*)0}, {(char*)0}, -#line 1970 "src/html/html_unescape.gperf" - {"urcrop", 3, {226, 140, 142}}, -#line 928 "src/html/html_unescape.gperf" - {"LessLess", 3, {226, 170, 161}}, - {(char*)0}, -#line 1543 "src/html/html_unescape.gperf" - {"Re", 3, {226, 132, 156}}, - {(char*)0}, {(char*)0}, -#line 1202 "src/html/html_unescape.gperf" - {"NotNestedLessLess", 3, {226, 170, 161}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 396 "src/html/html_unescape.gperf" - {"Dopf", 4, {240, 157, 148, 187}}, - {(char*)0}, -#line 568 "src/html/html_unescape.gperf" - {"forkv", 3, {226, 171, 153}}, - {(char*)0}, -#line 1261 "src/html/html_unescape.gperf" - {"nsqsube", 3, {226, 139, 162}}, - {(char*)0}, -#line 1273 "src/html/html_unescape.gperf" - {"nsupe", 3, {226, 138, 137}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1265 "src/html/html_unescape.gperf" - {"nsube", 3, {226, 138, 136}}, -#line 1475 "src/html/html_unescape.gperf" - {"qopf", 4, {240, 157, 149, 162}}, -#line 1596 "src/html/html_unescape.gperf" - {"rlhar", 3, {226, 135, 140}}, - {(char*)0}, {(char*)0}, -#line 996 "src/html/html_unescape.gperf" - {"lrm", 3, {226, 128, 142}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1157 "src/html/html_unescape.gperf" - {"nlsim", 3, {226, 137, 180}}, - {(char*)0}, -#line 1431 "src/html/html_unescape.gperf" - {"pound", 2, {194, 163}}, -#line 1998 "src/html/html_unescape.gperf" - {"varsupsetneq", 3, {226, 138, 139}}, -#line 1999 "src/html/html_unescape.gperf" - {"varsupsetneqq", 3, {226, 171, 140}}, - {(char*)0}, -#line 142 "src/html/html_unescape.gperf" - {"bnequiv", 3, {226, 137, 161}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 979 "src/html/html_unescape.gperf" - {"Lopf", 4, {240, 157, 149, 131}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1262 "src/html/html_unescape.gperf" - {"nsqsupe", 3, {226, 139, 163}}, - {(char*)0}, {(char*)0}, -#line 1507 "src/html/html_unescape.gperf" - {"rarrlp", 3, {226, 134, 172}}, -#line 2046 "src/html/html_unescape.gperf" - {"wedbar", 3, {226, 169, 159}}, -#line 839 "src/html/html_unescape.gperf" - {"larrlp", 3, {226, 134, 171}}, - {(char*)0}, -#line 2101 "src/html/html_unescape.gperf" - {"Yopf", 4, {240, 157, 149, 144}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1210 "src/html/html_unescape.gperf" - {"NotReverseElement", 3, {226, 136, 140}}, - {(char*)0}, {(char*)0}, -#line 295 "src/html/html_unescape.gperf" - {"Copf", 3, {226, 132, 130}}, -#line 994 "src/html/html_unescape.gperf" - {"lrhar", 3, {226, 135, 139}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1391 "src/html/html_unescape.gperf" - {"parsl", 3, {226, 171, 189}}, -#line 1935 "src/html/html_unescape.gperf" - {"uml", 2, {194, 168}}, -#line 1039 "src/html/html_unescape.gperf" - {"marker", 3, {226, 150, 174}}, -#line 1275 "src/html/html_unescape.gperf" - {"nsupseteq", 3, {226, 138, 137}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1267 "src/html/html_unescape.gperf" - {"nsubseteq", 3, {226, 138, 136}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1738 "src/html/html_unescape.gperf" - {"squarf", 3, {226, 150, 170}}, -#line 2021 "src/html/html_unescape.gperf" - {"Vert", 3, {226, 128, 150}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1736 "src/html/html_unescape.gperf" - {"SquareSupersetEqual", 3, {226, 138, 146}}, - {(char*)0}, -#line 1465 "src/html/html_unescape.gperf" - {"prsim", 3, {226, 137, 190}}, - {(char*)0}, {(char*)0}, -#line 1734 "src/html/html_unescape.gperf" - {"SquareSubsetEqual", 3, {226, 138, 145}}, - {(char*)0}, {(char*)0}, -#line 1735 "src/html/html_unescape.gperf" - {"SquareSuperset", 3, {226, 138, 144}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1733 "src/html/html_unescape.gperf" - {"SquareSubset", 3, {226, 138, 143}}, -#line 1290 "src/html/html_unescape.gperf" - {"nvap", 3, {226, 137, 141}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 765 "src/html/html_unescape.gperf" - {"iopf", 4, {240, 157, 149, 154}}, - {(char*)0}, -#line 1426 "src/html/html_unescape.gperf" - {"pm", 2, {194, 177}}, - {(char*)0}, -#line 2020 "src/html/html_unescape.gperf" - {"vert", 1, {124}}, - {(char*)0}, -#line 1845 "src/html/html_unescape.gperf" - {"thetav", 2, {207, 145}}, - {(char*)0}, {(char*)0}, -#line 987 "src/html/html_unescape.gperf" - {"loz", 3, {226, 151, 138}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1034 "src/html/html_unescape.gperf" - {"map", 3, {226, 134, 166}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 923 "src/html/html_unescape.gperf" - {"lesseqqgtr", 3, {226, 170, 139}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1616 "src/html/html_unescape.gperf" - {"rscr", 4, {240, 157, 147, 135}}, -#line 1478 "src/html/html_unescape.gperf" - {"Qscr", 4, {240, 157, 146, 172}}, -#line 999 "src/html/html_unescape.gperf" - {"lscr", 4, {240, 157, 147, 129}}, - {(char*)0}, -#line 1743 "src/html/html_unescape.gperf" - {"sscr", 4, {240, 157, 147, 136}}, - {(char*)0}, -#line 1891 "src/html/html_unescape.gperf" - {"Tscr", 4, {240, 157, 146, 175}}, -#line 2128 "src/html/html_unescape.gperf" - {"Zscr", 4, {240, 157, 146, 181}}, -#line 528 "src/html/html_unescape.gperf" - {"escr", 3, {226, 132, 175}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1975 "src/html/html_unescape.gperf" - {"uscr", 4, {240, 157, 147, 138}}, - {(char*)0}, -#line 1892 "src/html/html_unescape.gperf" - {"tscr", 4, {240, 157, 147, 137}}, - {(char*)0}, -#line 741 "src/html/html_unescape.gperf" - {"imof", 3, {226, 138, 183}}, -#line 297 "src/html/html_unescape.gperf" - {"Coproduct", 3, {226, 136, 144}}, - {(char*)0}, {(char*)0}, -#line 2081 "src/html/html_unescape.gperf" - {"Xscr", 4, {240, 157, 146, 179}}, -#line 2068 "src/html/html_unescape.gperf" - {"Xi", 2, {206, 158}}, - {(char*)0}, {(char*)0}, -#line 1253 "src/html/html_unescape.gperf" - {"nscr", 4, {240, 157, 147, 131}}, -#line 1136 "src/html/html_unescape.gperf" - {"ni", 3, {226, 136, 139}}, -#line 198 "src/html/html_unescape.gperf" - {"bscr", 4, {240, 157, 146, 183}}, -#line 1167 "src/html/html_unescape.gperf" - {"Nopf", 3, {226, 132, 149}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 794 "src/html/html_unescape.gperf" - {"Jscr", 4, {240, 157, 146, 165}}, -#line 1443 "src/html/html_unescape.gperf" - {"preceq", 3, {226, 170, 175}}, - {(char*)0}, {(char*)0}, -#line 1303 "src/html/html_unescape.gperf" - {"nvrArr", 3, {226, 164, 131}}, -#line 88 "src/html/html_unescape.gperf" - {"backprime", 3, {226, 128, 181}}, -#line 2058 "src/html/html_unescape.gperf" - {"Wscr", 4, {240, 157, 146, 178}}, - {(char*)0}, -#line 1989 "src/html/html_unescape.gperf" - {"varphi", 2, {207, 149}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1259 "src/html/html_unescape.gperf" - {"nsmid", 3, {226, 136, 164}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 393 "src/html/html_unescape.gperf" - {"dlcorn", 3, {226, 140, 158}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1468 "src/html/html_unescape.gperf" - {"pscr", 4, {240, 157, 147, 133}}, -#line 1409 "src/html/html_unescape.gperf" - {"pi", 2, {207, 128}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 2036 "src/html/html_unescape.gperf" - {"Vscr", 4, {240, 157, 146, 177}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1113 "src/html/html_unescape.gperf" - {"nesim", 3, {226, 137, 130}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1694 "src/html/html_unescape.gperf" - {"simne", 3, {226, 137, 134}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1276 "src/html/html_unescape.gperf" - {"nsupseteqq", 3, {226, 171, 134}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1268 "src/html/html_unescape.gperf" - {"nsubseteqq", 3, {226, 171, 133}}, -#line 441 "src/html/html_unescape.gperf" - {"drcorn", 3, {226, 140, 159}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1521 "src/html/html_unescape.gperf" - {"rbrace", 1, {125}}, -#line 2037 "src/html/html_unescape.gperf" - {"vscr", 4, {240, 157, 147, 139}}, -#line 851 "src/html/html_unescape.gperf" - {"lbrace", 1, {123}}, -#line 397 "src/html/html_unescape.gperf" - {"dopf", 4, {240, 157, 149, 149}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 586 "src/html/html_unescape.gperf" - {"frasl", 3, {226, 129, 132}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 931 "src/html/html_unescape.gperf" - {"LessTilde", 3, {226, 137, 178}}, - {(char*)0}, {(char*)0}, -#line 816 "src/html/html_unescape.gperf" - {"Kscr", 4, {240, 157, 146, 166}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1417 "src/html/html_unescape.gperf" - {"pluscir", 3, {226, 168, 162}}, -#line 1069 "src/html/html_unescape.gperf" - {"Mscr", 3, {226, 132, 179}}, -#line 1742 "src/html/html_unescape.gperf" - {"Sscr", 4, {240, 157, 146, 174}}, -#line 1524 "src/html/html_unescape.gperf" - {"rbrksld", 3, {226, 166, 142}}, - {(char*)0}, -#line 854 "src/html/html_unescape.gperf" - {"lbrksld", 3, {226, 166, 143}}, -#line 1519 "src/html/html_unescape.gperf" - {"RBarr", 3, {226, 164, 144}}, - {(char*)0}, {(char*)0}, -#line 1718 "src/html/html_unescape.gperf" - {"sqcaps", 3, {226, 138, 147}}, -#line 1504 "src/html/html_unescape.gperf" - {"rArr", 3, {226, 135, 146}}, -#line 143 "src/html/html_unescape.gperf" - {"bNot", 3, {226, 171, 173}}, -#line 836 "src/html/html_unescape.gperf" - {"lArr", 3, {226, 135, 144}}, - {(char*)0}, -#line 588 "src/html/html_unescape.gperf" - {"fscr", 4, {240, 157, 146, 187}}, -#line 1974 "src/html/html_unescape.gperf" - {"Uscr", 4, {240, 157, 146, 176}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1906 "src/html/html_unescape.gperf" - {"uArr", 3, {226, 135, 145}}, - {(char*)0}, {(char*)0}, -#line 1606 "src/html/html_unescape.gperf" - {"Ropf", 3, {226, 132, 157}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 2054 "src/html/html_unescape.gperf" - {"wopf", 4, {240, 157, 149, 168}}, - {(char*)0}, {(char*)0}, -#line 443 "src/html/html_unescape.gperf" - {"Dscr", 4, {240, 157, 146, 159}}, -#line 1352 "src/html/html_unescape.gperf" - {"opar", 3, {226, 166, 183}}, -#line 1663 "src/html/html_unescape.gperf" - {"seswar", 3, {226, 164, 169}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 363 "src/html/html_unescape.gperf" - {"Del", 3, {226, 136, 135}}, -#line 1486 "src/html/html_unescape.gperf" - {"rAarr", 3, {226, 135, 155}}, -#line 1559 "src/html/html_unescape.gperf" - {"rho", 2, {207, 129}}, -#line 818 "src/html/html_unescape.gperf" - {"lAarr", 3, {226, 135, 154}}, -#line 1438 "src/html/html_unescape.gperf" - {"preccurlyeq", 3, {226, 137, 188}}, -#line 1479 "src/html/html_unescape.gperf" - {"qscr", 4, {240, 157, 147, 134}}, - {(char*)0}, {(char*)0}, -#line 1029 "src/html/html_unescape.gperf" - {"macr", 2, {194, 175}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1186 "src/html/html_unescape.gperf" - {"notin", 3, {226, 136, 137}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 524 "src/html/html_unescape.gperf" - {"equivDD", 3, {226, 169, 184}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1717 "src/html/html_unescape.gperf" - {"sqcap", 3, {226, 138, 147}}, - {(char*)0}, -#line 1260 "src/html/html_unescape.gperf" - {"nspar", 3, {226, 136, 166}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1341 "src/html/html_unescape.gperf" - {"olt", 3, {226, 167, 128}}, -#line 1515 "src/html/html_unescape.gperf" - {"ratio", 3, {226, 136, 182}}, -#line 1000 "src/html/html_unescape.gperf" - {"Lscr", 3, {226, 132, 146}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 371 "src/html/html_unescape.gperf" - {"dharl", 3, {226, 135, 131}}, - {(char*)0}, -#line 394 "src/html/html_unescape.gperf" - {"dlcrop", 3, {226, 140, 141}}, -#line 409 "src/html/html_unescape.gperf" - {"DoubleDot", 2, {194, 168}}, -#line 405 "src/html/html_unescape.gperf" - {"dotplus", 3, {226, 136, 148}}, -#line 1359 "src/html/html_unescape.gperf" - {"or", 3, {226, 136, 168}}, - {(char*)0}, -#line 2103 "src/html/html_unescape.gperf" - {"Yscr", 4, {240, 157, 146, 180}}, - {(char*)0}, {(char*)0}, -#line 563 "src/html/html_unescape.gperf" - {"Fopf", 4, {240, 157, 148, 189}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 305 "src/html/html_unescape.gperf" - {"Cscr", 4, {240, 157, 146, 158}}, -#line 1337 "src/html/html_unescape.gperf" - {"olarr", 3, {226, 134, 186}}, -#line 1244 "src/html/html_unescape.gperf" - {"nrarrw", 3, {226, 134, 157}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1027 "src/html/html_unescape.gperf" - {"lvertneqq", 3, {226, 137, 168}}, -#line 516 "src/html/html_unescape.gperf" - {"eqslantgtr", 3, {226, 170, 150}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1854 "src/html/html_unescape.gperf" - {"thorn", 2, {195, 190}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 517 "src/html/html_unescape.gperf" - {"eqslantless", 3, {226, 170, 149}}, - {(char*)0}, {(char*)0}, -#line 744 "src/html/html_unescape.gperf" - {"incare", 3, {226, 132, 133}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1993 "src/html/html_unescape.gperf" - {"vArr", 3, {226, 135, 149}}, -#line 1612 "src/html/html_unescape.gperf" - {"rppolint", 3, {226, 168, 146}}, -#line 442 "src/html/html_unescape.gperf" - {"drcrop", 3, {226, 140, 140}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1388 "src/html/html_unescape.gperf" - {"parallel", 3, {226, 136, 165}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1357 "src/html/html_unescape.gperf" - {"orarr", 3, {226, 134, 187}}, -#line 1745 "src/html/html_unescape.gperf" - {"ssmile", 3, {226, 140, 163}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 413 "src/html/html_unescape.gperf" - {"DoubleLeftTee", 3, {226, 171, 164}}, -#line 527 "src/html/html_unescape.gperf" - {"erDot", 3, {226, 137, 147}}, -#line 382 "src/html/html_unescape.gperf" - {"diams", 3, {226, 153, 166}}, -#line 1744 "src/html/html_unescape.gperf" - {"ssetmn", 3, {226, 136, 150}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1369 "src/html/html_unescape.gperf" - {"oS", 3, {226, 147, 136}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 770 "src/html/html_unescape.gperf" - {"iscr", 4, {240, 157, 146, 190}}, -#line 726 "src/html/html_unescape.gperf" - {"ii", 3, {226, 133, 136}}, -#line 1544 "src/html/html_unescape.gperf" - {"rect", 3, {226, 150, 173}}, - {(char*)0}, {(char*)0}, -#line 1250 "src/html/html_unescape.gperf" - {"nsccue", 3, {226, 139, 161}}, -#line 1661 "src/html/html_unescape.gperf" - {"sect", 2, {194, 167}}, - {(char*)0}, -#line 1061 "src/html/html_unescape.gperf" - {"mlcp", 3, {226, 171, 155}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1366 "src/html/html_unescape.gperf" - {"oror", 3, {226, 169, 150}}, - {(char*)0}, -#line 408 "src/html/html_unescape.gperf" - {"DoubleContourIntegral", 3, {226, 136, 175}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 519 "src/html/html_unescape.gperf" - {"equals", 1, {61}}, - {(char*)0}, -#line 680 "src/html/html_unescape.gperf" - {"Hat", 1, {94}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1746 "src/html/html_unescape.gperf" - {"sstarf", 3, {226, 139, 134}}, -#line 1070 "src/html/html_unescape.gperf" - {"mstpos", 3, {226, 136, 190}}, - {(char*)0}, -#line 383 "src/html/html_unescape.gperf" - {"die", 2, {194, 168}}, -#line 1045 "src/html/html_unescape.gperf" - {"measuredangle", 3, {226, 136, 161}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 565 "src/html/html_unescape.gperf" - {"forall", 3, {226, 136, 128}}, - {(char*)0}, {(char*)0}, -#line 1190 "src/html/html_unescape.gperf" - {"notinvb", 3, {226, 139, 183}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1066 "src/html/html_unescape.gperf" - {"mopf", 4, {240, 157, 149, 158}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1139 "src/html/html_unescape.gperf" - {"niv", 3, {226, 136, 139}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 2005 "src/html/html_unescape.gperf" - {"vBarv", 3, {226, 171, 169}}, - {(char*)0}, -#line 1252 "src/html/html_unescape.gperf" - {"Nscr", 4, {240, 157, 146, 169}}, - {(char*)0}, -#line 1397 "src/html/html_unescape.gperf" - {"period", 1, {46}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 103 "src/html/html_unescape.gperf" - {"becaus", 3, {226, 136, 181}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 113 "src/html/html_unescape.gperf" - {"between", 3, {226, 137, 172}}, -#line 751 "src/html/html_unescape.gperf" - {"Int", 3, {226, 136, 172}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 104 "src/html/html_unescape.gperf" - {"because", 3, {226, 136, 181}}, -#line 1411 "src/html/html_unescape.gperf" - {"piv", 2, {207, 150}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1552 "src/html/html_unescape.gperf" - {"rfr", 4, {240, 157, 148, 175}}, -#line 1472 "src/html/html_unescape.gperf" - {"Qfr", 4, {240, 157, 148, 148}}, -#line 935 "src/html/html_unescape.gperf" - {"lfr", 4, {240, 157, 148, 169}}, - {(char*)0}, -#line 1668 "src/html/html_unescape.gperf" - {"sfr", 4, {240, 157, 148, 176}}, -#line 1149 "src/html/html_unescape.gperf" - {"nleftrightarrow", 3, {226, 134, 174}}, -#line 1837 "src/html/html_unescape.gperf" - {"Tfr", 4, {240, 157, 148, 151}}, -#line 2122 "src/html/html_unescape.gperf" - {"Zfr", 3, {226, 132, 168}}, -#line 477 "src/html/html_unescape.gperf" - {"efr", 4, {240, 157, 148, 162}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1686 "src/html/html_unescape.gperf" - {"sim", 3, {226, 136, 188}}, -#line 1922 "src/html/html_unescape.gperf" - {"ufr", 4, {240, 157, 148, 178}}, -#line 1607 "src/html/html_unescape.gperf" - {"roplus", 3, {226, 168, 174}}, -#line 1838 "src/html/html_unescape.gperf" - {"tfr", 4, {240, 157, 148, 177}}, -#line 981 "src/html/html_unescape.gperf" - {"loplus", 3, {226, 168, 173}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 2064 "src/html/html_unescape.gperf" - {"Xfr", 4, {240, 157, 148, 155}}, - {(char*)0}, {(char*)0}, -#line 1539 "src/html/html_unescape.gperf" - {"real", 3, {226, 132, 156}}, -#line 1120 "src/html/html_unescape.gperf" - {"nfr", 4, {240, 157, 148, 171}}, - {(char*)0}, -#line 115 "src/html/html_unescape.gperf" - {"bfr", 4, {240, 157, 148, 159}}, - {(char*)0}, -#line 1185 "src/html/html_unescape.gperf" - {"NotHumpEqual", 3, {226, 137, 143}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 789 "src/html/html_unescape.gperf" - {"Jfr", 4, {240, 157, 148, 141}}, - {(char*)0}, -#line 444 "src/html/html_unescape.gperf" - {"dscr", 4, {240, 157, 146, 185}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 2051 "src/html/html_unescape.gperf" - {"Wfr", 4, {240, 157, 148, 154}}, - {(char*)0}, -#line 130 "src/html/html_unescape.gperf" - {"blacklozenge", 3, {226, 167, 171}}, - {(char*)0}, -#line 2126 "src/html/html_unescape.gperf" - {"zopf", 4, {240, 157, 149, 171}}, -#line 1542 "src/html/html_unescape.gperf" - {"reals", 3, {226, 132, 157}}, - {(char*)0}, -#line 1171 "src/html/html_unescape.gperf" - {"NotCupCap", 3, {226, 137, 173}}, - {(char*)0}, {(char*)0}, -#line 1695 "src/html/html_unescape.gperf" - {"simplus", 3, {226, 168, 164}}, - {(char*)0}, -#line 566 "src/html/html_unescape.gperf" - {"ForAll", 3, {226, 136, 128}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1402 "src/html/html_unescape.gperf" - {"pfr", 4, {240, 157, 148, 173}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1343 "src/html/html_unescape.gperf" - {"omacr", 2, {197, 141}}, - {(char*)0}, -#line 2027 "src/html/html_unescape.gperf" - {"Vfr", 4, {240, 157, 148, 153}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 489 "src/html/html_unescape.gperf" - {"Emacr", 2, {196, 146}}, -#line 1617 "src/html/html_unescape.gperf" - {"Rscr", 3, {226, 132, 155}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 2059 "src/html/html_unescape.gperf" - {"wscr", 4, {240, 157, 147, 140}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1680 "src/html/html_unescape.gperf" - {"ShortUpArrow", 3, {226, 134, 145}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1665 "src/html/html_unescape.gperf" - {"setmn", 3, {226, 136, 150}}, - {(char*)0}, -#line 2028 "src/html/html_unescape.gperf" - {"vfr", 4, {240, 157, 148, 179}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 807 "src/html/html_unescape.gperf" - {"Kfr", 4, {240, 157, 148, 142}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1355 "src/html/html_unescape.gperf" - {"operp", 3, {226, 166, 185}}, - {(char*)0}, -#line 1048 "src/html/html_unescape.gperf" - {"Mfr", 4, {240, 157, 148, 144}}, -#line 1667 "src/html/html_unescape.gperf" - {"Sfr", 4, {240, 157, 148, 150}}, - {(char*)0}, {(char*)0}, -#line 1161 "src/html/html_unescape.gperf" - {"nltrie", 3, {226, 139, 172}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 589 "src/html/html_unescape.gperf" - {"Fscr", 3, {226, 132, 177}}, - {(char*)0}, {(char*)0}, -#line 554 "src/html/html_unescape.gperf" - {"ffr", 4, {240, 157, 148, 163}}, -#line 1921 "src/html/html_unescape.gperf" - {"Ufr", 4, {240, 157, 148, 152}}, - {(char*)0}, -#line 1677 "src/html/html_unescape.gperf" - {"shortmid", 3, {226, 136, 163}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1305 "src/html/html_unescape.gperf" - {"nvsim", 3, {226, 136, 188}}, -#line 368 "src/html/html_unescape.gperf" - {"Dfr", 4, {240, 157, 148, 135}}, -#line 921 "src/html/html_unescape.gperf" - {"lessdot", 3, {226, 139, 150}}, - {(char*)0}, {(char*)0}, -#line 1459 "src/html/html_unescape.gperf" - {"profline", 3, {226, 140, 146}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1473 "src/html/html_unescape.gperf" - {"qfr", 4, {240, 157, 148, 174}}, -#line 346 "src/html/html_unescape.gperf" - {"dArr", 3, {226, 135, 147}}, - {(char*)0}, -#line 1248 "src/html/html_unescape.gperf" - {"nrtrie", 3, {226, 139, 173}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1679 "src/html/html_unescape.gperf" - {"ShortRightArrow", 3, {226, 134, 146}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1841 "src/html/html_unescape.gperf" - {"Therefore", 3, {226, 136, 180}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 358 "src/html/html_unescape.gperf" - {"DD", 3, {226, 133, 133}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1840 "src/html/html_unescape.gperf" - {"therefore", 3, {226, 136, 180}}, -#line 934 "src/html/html_unescape.gperf" - {"Lfr", 4, {240, 157, 148, 143}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1825 "src/html/html_unescape.gperf" - {"target", 3, {226, 140, 150}}, - {(char*)0}, {(char*)0}, -#line 484 "src/html/html_unescape.gperf" - {"Element", 3, {226, 136, 136}}, -#line 2097 "src/html/html_unescape.gperf" - {"Yfr", 4, {240, 157, 148, 156}}, -#line 272 "src/html/html_unescape.gperf" - {"ClockwiseContourIntegral", 3, {226, 136, 178}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1338 "src/html/html_unescape.gperf" - {"olcir", 3, {226, 166, 190}}, - {(char*)0}, -#line 246 "src/html/html_unescape.gperf" - {"Cfr", 3, {226, 132, 173}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 549 "src/html/html_unescape.gperf" - {"female", 3, {226, 153, 128}}, -#line 1270 "src/html/html_unescape.gperf" - {"nsucceq", 3, {226, 170, 176}}, -#line 1313 "src/html/html_unescape.gperf" - {"oast", 3, {226, 138, 155}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1396 "src/html/html_unescape.gperf" - {"percnt", 1, {37}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1363 "src/html/html_unescape.gperf" - {"ordf", 2, {194, 170}}, - {(char*)0}, -#line 1360 "src/html/html_unescape.gperf" - {"ord", 3, {226, 169, 157}}, -#line 1558 "src/html/html_unescape.gperf" - {"Rho", 2, {206, 161}}, - {(char*)0}, -#line 1068 "src/html/html_unescape.gperf" - {"mscr", 4, {240, 157, 147, 130}}, - {(char*)0}, -#line 1304 "src/html/html_unescape.gperf" - {"nvrtrie", 3, {226, 138, 181}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 959 "src/html/html_unescape.gperf" - {"lnE", 3, {226, 137, 168}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1134 "src/html/html_unescape.gperf" - {"nhArr", 3, {226, 135, 142}}, -#line 1358 "src/html/html_unescape.gperf" - {"Or", 3, {226, 169, 148}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 388 "src/html/html_unescape.gperf" - {"divide", 2, {195, 183}}, - {(char*)0}, -#line 722 "src/html/html_unescape.gperf" - {"ifr", 4, {240, 157, 148, 166}}, -#line 485 "src/html/html_unescape.gperf" - {"elinters", 3, {226, 143, 167}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 204 "src/html/html_unescape.gperf" - {"bsol", 1, {92}}, -#line 1299 "src/html/html_unescape.gperf" - {"nvlArr", 3, {226, 164, 130}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 733 "src/html/html_unescape.gperf" - {"Imacr", 2, {196, 170}}, - {(char*)0}, -#line 90 "src/html/html_unescape.gperf" - {"backsimeq", 3, {226, 139, 141}}, -#line 1899 "src/html/html_unescape.gperf" - {"twixt", 3, {226, 137, 172}}, -#line 1339 "src/html/html_unescape.gperf" - {"olcross", 3, {226, 166, 187}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1509 "src/html/html_unescape.gperf" - {"rarrsim", 3, {226, 165, 180}}, -#line 410 "src/html/html_unescape.gperf" - {"DoubleDownArrow", 3, {226, 135, 147}}, -#line 841 "src/html/html_unescape.gperf" - {"larrsim", 3, {226, 165, 179}}, -#line 492 "src/html/html_unescape.gperf" - {"emptyset", 3, {226, 136, 133}}, -#line 1351 "src/html/html_unescape.gperf" - {"oopf", 4, {240, 157, 149, 160}}, - {(char*)0}, -#line 541 "src/html/html_unescape.gperf" - {"exist", 3, {226, 136, 131}}, - {(char*)0}, {(char*)0}, -#line 950 "src/html/html_unescape.gperf" - {"llhard", 3, {226, 165, 171}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 540 "src/html/html_unescape.gperf" - {"excl", 1, {33}}, -#line 504 "src/html/html_unescape.gperf" - {"Eopf", 4, {240, 157, 148, 188}}, -#line 1143 "src/html/html_unescape.gperf" - {"nlArr", 3, {226, 135, 141}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1850 "src/html/html_unescape.gperf" - {"thinsp", 3, {226, 128, 137}}, -#line 1219 "src/html/html_unescape.gperf" - {"NotSubsetEqual", 3, {226, 138, 136}}, -#line 1404 "src/html/html_unescape.gperf" - {"phi", 2, {207, 134}}, -#line 411 "src/html/html_unescape.gperf" - {"DoubleLeftArrow", 3, {226, 135, 144}}, - {(char*)0}, -#line 1867 "src/html/html_unescape.gperf" - {"topcir", 3, {226, 171, 177}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 387 "src/html/html_unescape.gperf" - {"div", 2, {195, 183}}, - {(char*)0}, -#line 1119 "src/html/html_unescape.gperf" - {"Nfr", 4, {240, 157, 148, 145}}, -#line 1145 "src/html/html_unescape.gperf" - {"nlE", 3, {226, 137, 166}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 2129 "src/html/html_unescape.gperf" - {"zscr", 4, {240, 157, 147, 143}}, -#line 995 "src/html/html_unescape.gperf" - {"lrhard", 3, {226, 165, 173}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 951 "src/html/html_unescape.gperf" - {"lltri", 3, {226, 151, 186}}, - {(char*)0}, {(char*)0}, -#line 1243 "src/html/html_unescape.gperf" - {"nrArr", 3, {226, 135, 143}}, -#line 1225 "src/html/html_unescape.gperf" - {"NotSupersetEqual", 3, {226, 138, 137}}, - {(char*)0}, -#line 1820 "src/html/html_unescape.gperf" - {"swArr", 3, {226, 135, 153}}, -#line 1848 "src/html/html_unescape.gperf" - {"ThickSpace", 3, {226, 129, 159}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1932 "src/html/html_unescape.gperf" - {"ultri", 3, {226, 151, 184}}, -#line 1205 "src/html/html_unescape.gperf" - {"notnivb", 3, {226, 139, 190}}, - {(char*)0}, -#line 1450 "src/html/html_unescape.gperf" - {"prime", 3, {226, 128, 178}}, - {(char*)0}, {(char*)0}, -#line 1452 "src/html/html_unescape.gperf" - {"primes", 3, {226, 132, 153}}, - {(char*)0}, -#line 1335 "src/html/html_unescape.gperf" - {"ohm", 2, {206, 169}}, - {(char*)0}, {(char*)0}, -#line 265 "src/html/html_unescape.gperf" - {"CircleTimes", 3, {226, 138, 151}}, -#line 1160 "src/html/html_unescape.gperf" - {"nltri", 3, {226, 139, 170}}, - {(char*)0}, {(char*)0}, -#line 1692 "src/html/html_unescape.gperf" - {"siml", 3, {226, 170, 157}}, -#line 1308 "src/html/html_unescape.gperf" - {"nwArr", 3, {226, 135, 150}}, - {(char*)0}, {(char*)0}, -#line 1990 "src/html/html_unescape.gperf" - {"varpi", 2, {207, 150}}, - {(char*)0}, {(char*)0}, -#line 1368 "src/html/html_unescape.gperf" - {"orv", 3, {226, 169, 155}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1664 "src/html/html_unescape.gperf" - {"setminus", 3, {226, 136, 150}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 997 "src/html/html_unescape.gperf" - {"lrtri", 3, {226, 138, 191}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1398 "src/html/html_unescape.gperf" - {"permil", 3, {226, 128, 176}}, -#line 1054 "src/html/html_unescape.gperf" - {"mid", 3, {226, 136, 163}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1973 "src/html/html_unescape.gperf" - {"urtri", 3, {226, 151, 185}}, - {(char*)0}, {(char*)0}, -#line 369 "src/html/html_unescape.gperf" - {"dfr", 4, {240, 157, 148, 161}}, -#line 1050 "src/html/html_unescape.gperf" - {"mho", 3, {226, 132, 167}}, -#line 1448 "src/html/html_unescape.gperf" - {"prE", 3, {226, 170, 179}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 2041 "src/html/html_unescape.gperf" - {"vsupne", 3, {226, 138, 139}}, - {(char*)0}, {(char*)0}, -#line 1247 "src/html/html_unescape.gperf" - {"nrtri", 3, {226, 139, 171}}, -#line 2039 "src/html/html_unescape.gperf" - {"vsubne", 3, {226, 138, 138}}, - {(char*)0}, -#line 473 "src/html/html_unescape.gperf" - {"eDot", 3, {226, 137, 145}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 919 "src/html/html_unescape.gperf" - {"lesges", 3, {226, 170, 147}}, - {(char*)0}, {(char*)0}, -#line 87 "src/html/html_unescape.gperf" - {"backepsilon", 2, {207, 182}}, - {(char*)0}, -#line 1513 "src/html/html_unescape.gperf" - {"ratail", 3, {226, 164, 154}}, - {(char*)0}, -#line 843 "src/html/html_unescape.gperf" - {"latail", 3, {226, 164, 153}}, - {(char*)0}, {(char*)0}, -#line 1954 "src/html/html_unescape.gperf" - {"UpEquilibrium", 3, {226, 165, 174}}, - {(char*)0}, {(char*)0}, -#line 511 "src/html/html_unescape.gperf" - {"epsilon", 2, {206, 181}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1964 "src/html/html_unescape.gperf" - {"upsilon", 2, {207, 133}}, - {(char*)0}, -#line 1052 "src/html/html_unescape.gperf" - {"midast", 1, {42}}, -#line 698 "src/html/html_unescape.gperf" - {"Hopf", 3, {226, 132, 141}}, -#line 2029 "src/html/html_unescape.gperf" - {"vltri", 3, {226, 138, 178}}, - {(char*)0}, -#line 1553 "src/html/html_unescape.gperf" - {"Rfr", 3, {226, 132, 156}}, - {(char*)0}, {(char*)0}, -#line 2048 "src/html/html_unescape.gperf" - {"Wedge", 3, {226, 139, 128}}, -#line 2052 "src/html/html_unescape.gperf" - {"wfr", 4, {240, 157, 148, 180}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 94 "src/html/html_unescape.gperf" - {"barwed", 3, {226, 140, 133}}, - {(char*)0}, {(char*)0}, -#line 1031 "src/html/html_unescape.gperf" - {"malt", 3, {226, 156, 160}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 251 "src/html/html_unescape.gperf" - {"Chi", 2, {206, 167}}, -#line 494 "src/html/html_unescape.gperf" - {"emptyv", 3, {226, 136, 133}}, -#line 1203 "src/html/html_unescape.gperf" - {"notni", 3, {226, 136, 140}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 926 "src/html/html_unescape.gperf" - {"LessGreater", 3, {226, 137, 182}}, - {(char*)0}, -#line 378 "src/html/html_unescape.gperf" - {"diam", 3, {226, 139, 132}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 2035 "src/html/html_unescape.gperf" - {"vrtri", 3, {226, 138, 179}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 263 "src/html/html_unescape.gperf" - {"CircleMinus", 3, {226, 138, 150}}, - {(char*)0}, -#line 1342 "src/html/html_unescape.gperf" - {"Omacr", 2, {197, 140}}, -#line 1659 "src/html/html_unescape.gperf" - {"seArr", 3, {226, 135, 152}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 553 "src/html/html_unescape.gperf" - {"Ffr", 4, {240, 157, 148, 137}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1445 "src/html/html_unescape.gperf" - {"precneqq", 3, {226, 170, 181}}, - {(char*)0}, -#line 380 "src/html/html_unescape.gperf" - {"Diamond", 3, {226, 139, 132}}, -#line 1364 "src/html/html_unescape.gperf" - {"ordm", 2, {194, 186}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1103 "src/html/html_unescape.gperf" - {"neArr", 3, {226, 135, 151}}, -#line 764 "src/html/html_unescape.gperf" - {"Iopf", 4, {240, 157, 149, 128}}, -#line 260 "src/html/html_unescape.gperf" - {"CircleDot", 3, {226, 138, 153}}, - {(char*)0}, {(char*)0}, -#line 1453 "src/html/html_unescape.gperf" - {"prnap", 3, {226, 170, 185}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 404 "src/html/html_unescape.gperf" - {"dotminus", 3, {226, 136, 184}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1254 "src/html/html_unescape.gperf" - {"nshortmid", 3, {226, 136, 164}}, - {(char*)0}, -#line 148 "src/html/html_unescape.gperf" - {"bottom", 3, {226, 138, 165}}, - {(char*)0}, -#line 1428 "src/html/html_unescape.gperf" - {"pointint", 3, {226, 168, 149}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1737 "src/html/html_unescape.gperf" - {"SquareUnion", 3, {226, 138, 148}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 793 "src/html/html_unescape.gperf" - {"jopf", 4, {240, 157, 149, 155}}, - {(char*)0}, {(char*)0}, -#line 1963 "src/html/html_unescape.gperf" - {"Upsilon", 2, {206, 165}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 279 "src/html/html_unescape.gperf" - {"Colone", 3, {226, 169, 180}}, - {(char*)0}, -#line 1301 "src/html/html_unescape.gperf" - {"nvlt", 1, {60}}, - {(char*)0}, {(char*)0}, -#line 1115 "src/html/html_unescape.gperf" - {"NestedLessLess", 3, {226, 137, 170}}, -#line 278 "src/html/html_unescape.gperf" - {"Colon", 3, {226, 136, 183}}, - {(char*)0}, {(char*)0}, -#line 205 "src/html/html_unescape.gperf" - {"bsolhsub", 3, {226, 159, 136}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 412 "src/html/html_unescape.gperf" - {"DoubleLeftRightArrow", 3, {226, 135, 148}}, -#line 1424 "src/html/html_unescape.gperf" - {"plussim", 3, {226, 168, 166}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 735 "src/html/html_unescape.gperf" - {"image", 3, {226, 132, 145}}, -#line 481 "src/html/html_unescape.gperf" - {"egs", 3, {226, 170, 150}}, - {(char*)0}, {(char*)0}, -#line 1371 "src/html/html_unescape.gperf" - {"oscr", 3, {226, 132, 180}}, -#line 1822 "src/html/html_unescape.gperf" - {"swnwar", 3, {226, 164, 170}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 2117 "src/html/html_unescape.gperf" - {"zeetrf", 3, {226, 132, 168}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1032 "src/html/html_unescape.gperf" - {"maltese", 3, {226, 156, 160}}, - {(char*)0}, -#line 1049 "src/html/html_unescape.gperf" - {"mfr", 4, {240, 157, 148, 170}}, -#line 1505 "src/html/html_unescape.gperf" - {"rarrfs", 3, {226, 164, 158}}, -#line 529 "src/html/html_unescape.gperf" - {"Escr", 3, {226, 132, 176}}, -#line 837 "src/html/html_unescape.gperf" - {"larrfs", 3, {226, 164, 157}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1063 "src/html/html_unescape.gperf" - {"mnplus", 3, {226, 136, 147}}, -#line 1130 "src/html/html_unescape.gperf" - {"ngt", 3, {226, 137, 175}}, -#line 1131 "src/html/html_unescape.gperf" - {"ngtr", 3, {226, 137, 175}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 628 "src/html/html_unescape.gperf" - {"gl", 3, {226, 137, 183}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 381 "src/html/html_unescape.gperf" - {"diamondsuit", 3, {226, 153, 166}}, -#line 656 "src/html/html_unescape.gperf" - {"GT", 1, {62}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 929 "src/html/html_unescape.gperf" - {"lesssim", 3, {226, 137, 178}}, -#line 447 "src/html/html_unescape.gperf" - {"dsol", 3, {226, 167, 182}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1955 "src/html/html_unescape.gperf" - {"upharpoonleft", 3, {226, 134, 191}}, -#line 1732 "src/html/html_unescape.gperf" - {"SquareIntersection", 3, {226, 138, 147}}, -#line 1004 "src/html/html_unescape.gperf" - {"lsime", 3, {226, 170, 141}}, - {(char*)0}, -#line 1158 "src/html/html_unescape.gperf" - {"nLt", 3, {226, 137, 170}}, - {(char*)0}, -#line 1195 "src/html/html_unescape.gperf" - {"NotLess", 3, {226, 137, 174}}, - {(char*)0}, -#line 631 "src/html/html_unescape.gperf" - {"gnap", 3, {226, 170, 138}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1635 "src/html/html_unescape.gperf" - {"scap", 3, {226, 170, 184}}, - {(char*)0}, {(char*)0}, -#line 1037 "src/html/html_unescape.gperf" - {"mapstoleft", 3, {226, 134, 164}}, -#line 1198 "src/html/html_unescape.gperf" - {"NotLessLess", 3, {226, 137, 170}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1551 "src/html/html_unescape.gperf" - {"rfloor", 3, {226, 140, 139}}, - {(char*)0}, -#line 933 "src/html/html_unescape.gperf" - {"lfloor", 3, {226, 140, 138}}, - {(char*)0}, {(char*)0}, -#line 1257 "src/html/html_unescape.gperf" - {"nsime", 3, {226, 137, 132}}, - {(char*)0}, -#line 202 "src/html/html_unescape.gperf" - {"bsime", 3, {226, 139, 141}}, -#line 1196 "src/html/html_unescape.gperf" - {"NotLessEqual", 3, {226, 137, 176}}, -#line 1200 "src/html/html_unescape.gperf" - {"NotLessTilde", 3, {226, 137, 180}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1090 "src/html/html_unescape.gperf" - {"ncap", 3, {226, 169, 131}}, - {(char*)0}, {(char*)0}, -#line 1197 "src/html/html_unescape.gperf" - {"NotLessGreater", 3, {226, 137, 184}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1449 "src/html/html_unescape.gperf" - {"precsim", 3, {226, 137, 190}}, - {(char*)0}, -#line 977 "src/html/html_unescape.gperf" - {"looparrowright", 3, {226, 134, 172}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1433 "src/html/html_unescape.gperf" - {"Pr", 3, {226, 170, 187}}, -#line 1531 "src/html/html_unescape.gperf" - {"rcub", 1, {125}}, -#line 1038 "src/html/html_unescape.gperf" - {"mapstoup", 3, {226, 134, 165}}, -#line 861 "src/html/html_unescape.gperf" - {"lcub", 1, {123}}, - {(char*)0}, -#line 2121 "src/html/html_unescape.gperf" - {"zfr", 4, {240, 157, 148, 183}}, - {(char*)0}, {(char*)0}, -#line 1947 "src/html/html_unescape.gperf" - {"uparrow", 3, {226, 134, 145}}, - {(char*)0}, -#line 633 "src/html/html_unescape.gperf" - {"gne", 3, {226, 170, 136}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1641 "src/html/html_unescape.gperf" - {"sce", 3, {226, 170, 176}}, -#line 740 "src/html/html_unescape.gperf" - {"Im", 3, {226, 132, 145}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1527 "src/html/html_unescape.gperf" - {"rcaron", 2, {197, 153}}, - {(char*)0}, -#line 857 "src/html/html_unescape.gperf" - {"lcaron", 2, {196, 190}}, -#line 1350 "src/html/html_unescape.gperf" - {"Oopf", 4, {240, 157, 149, 134}}, -#line 1637 "src/html/html_unescape.gperf" - {"scaron", 2, {197, 161}}, -#line 89 "src/html/html_unescape.gperf" - {"backsim", 3, {226, 136, 189}}, -#line 1829 "src/html/html_unescape.gperf" - {"Tcaron", 2, {197, 164}}, -#line 2111 "src/html/html_unescape.gperf" - {"Zcaron", 2, {197, 189}}, -#line 463 "src/html/html_unescape.gperf" - {"ecaron", 2, {196, 155}}, - {(char*)0}, -#line 109 "src/html/html_unescape.gperf" - {"Bernoullis", 3, {226, 132, 172}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1122 "src/html/html_unescape.gperf" - {"nge", 3, {226, 137, 177}}, -#line 1830 "src/html/html_unescape.gperf" - {"tcaron", 2, {197, 165}}, - {(char*)0}, -#line 567 "src/html/html_unescape.gperf" - {"fork", 3, {226, 139, 148}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 702 "src/html/html_unescape.gperf" - {"Hscr", 3, {226, 132, 139}}, - {(char*)0}, -#line 1092 "src/html/html_unescape.gperf" - {"ncaron", 2, {197, 136}}, -#line 488 "src/html/html_unescape.gperf" - {"elsdot", 3, {226, 170, 151}}, - {(char*)0}, -#line 1828 "src/html/html_unescape.gperf" - {"tbrk", 3, {226, 142, 180}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1887 "src/html/html_unescape.gperf" - {"triplus", 3, {226, 168, 185}}, - {(char*)0}, {(char*)0}, -#line 379 "src/html/html_unescape.gperf" - {"diamond", 3, {226, 139, 132}}, - {(char*)0}, {(char*)0}, -#line 1097 "src/html/html_unescape.gperf" - {"ncup", 3, {226, 169, 130}}, - {(char*)0}, -#line 97 "src/html/html_unescape.gperf" - {"bbrk", 3, {226, 142, 181}}, - {(char*)0}, -#line 587 "src/html/html_unescape.gperf" - {"frown", 3, {226, 140, 162}}, -#line 129 "src/html/html_unescape.gperf" - {"bkarow", 3, {226, 164, 141}}, - {(char*)0}, -#line 1714 "src/html/html_unescape.gperf" - {"spades", 3, {226, 153, 160}}, - {(char*)0}, -#line 1470 "src/html/html_unescape.gperf" - {"psi", 2, {207, 136}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 145 "src/html/html_unescape.gperf" - {"Bopf", 4, {240, 157, 148, 185}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 395 "src/html/html_unescape.gperf" - {"dollar", 1, {36}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 386 "src/html/html_unescape.gperf" - {"disin", 3, {226, 139, 178}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1715 "src/html/html_unescape.gperf" - {"spadesuit", 3, {226, 153, 160}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1226 "src/html/html_unescape.gperf" - {"NotTilde", 3, {226, 137, 129}}, -#line 407 "src/html/html_unescape.gperf" - {"doublebarwedge", 3, {226, 140, 134}}, - {(char*)0}, -#line 595 "src/html/html_unescape.gperf" - {"gap", 3, {226, 170, 134}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 98 "src/html/html_unescape.gperf" - {"bbrktbrk", 3, {226, 142, 182}}, - {(char*)0}, {(char*)0}, -#line 1821 "src/html/html_unescape.gperf" - {"swarrow", 3, {226, 134, 153}}, -#line 107 "src/html/html_unescape.gperf" - {"bepsi", 2, {207, 182}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 771 "src/html/html_unescape.gperf" - {"Iscr", 3, {226, 132, 144}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1228 "src/html/html_unescape.gperf" - {"NotTildeFullEqual", 3, {226, 137, 135}}, -#line 514 "src/html/html_unescape.gperf" - {"eqcolon", 3, {226, 137, 149}}, - {(char*)0}, {(char*)0}, -#line 1864 "src/html/html_unescape.gperf" - {"tint", 3, {226, 136, 173}}, - {(char*)0}, {(char*)0}, -#line 757 "src/html/html_unescape.gperf" - {"intprod", 3, {226, 168, 188}}, - {(char*)0}, -#line 1272 "src/html/html_unescape.gperf" - {"nsupE", 3, {226, 171, 134}}, - {(char*)0}, {(char*)0}, -#line 1309 "src/html/html_unescape.gperf" - {"nwarrow", 3, {226, 134, 150}}, -#line 1264 "src/html/html_unescape.gperf" - {"nsubE", 3, {226, 171, 133}}, - {(char*)0}, {(char*)0}, -#line 1126 "src/html/html_unescape.gperf" - {"nges", 3, {226, 169, 190}}, - {(char*)0}, -#line 1949 "src/html/html_unescape.gperf" - {"Uparrow", 3, {226, 135, 145}}, -#line 605 "src/html/html_unescape.gperf" - {"ge", 3, {226, 137, 165}}, -#line 1353 "src/html/html_unescape.gperf" - {"OpenCurlyDoubleQuote", 3, {226, 128, 156}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1699 "src/html/html_unescape.gperf" - {"smallsetminus", 3, {226, 136, 150}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1636 "src/html/html_unescape.gperf" - {"Scaron", 2, {197, 160}}, - {(char*)0}, -#line 1302 "src/html/html_unescape.gperf" - {"nvltrie", 3, {226, 138, 180}}, -#line 613 "src/html/html_unescape.gperf" - {"ges", 3, {226, 169, 190}}, -#line 136 "src/html/html_unescape.gperf" - {"blank", 3, {226, 144, 163}}, -#line 1485 "src/html/html_unescape.gperf" - {"QUOT", 1, {34}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 140 "src/html/html_unescape.gperf" - {"block", 3, {226, 150, 136}}, -#line 1874 "src/html/html_unescape.gperf" - {"trade", 3, {226, 132, 162}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 795 "src/html/html_unescape.gperf" - {"jscr", 4, {240, 157, 146, 191}}, -#line 2047 "src/html/html_unescape.gperf" - {"wedge", 3, {226, 136, 167}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 30 "src/html/html_unescape.gperf" - {"Amacr", 2, {196, 128}}, - {(char*)0}, -#line 518 "src/html/html_unescape.gperf" - {"Equal", 3, {226, 169, 181}}, - {(char*)0}, {(char*)0}, -#line 352 "src/html/html_unescape.gperf" - {"Dcaron", 2, {196, 142}}, - {(char*)0}, {(char*)0}, -#line 400 "src/html/html_unescape.gperf" - {"DotDot", 3, {226, 131, 156}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 635 "src/html/html_unescape.gperf" - {"gneq", 3, {226, 170, 136}}, -#line 1991 "src/html/html_unescape.gperf" - {"varpropto", 3, {226, 136, 157}}, - {(char*)0}, -#line 636 "src/html/html_unescape.gperf" - {"gneqq", 3, {226, 137, 169}}, -#line 1462 "src/html/html_unescape.gperf" - {"Proportional", 3, {226, 136, 157}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 775 "src/html/html_unescape.gperf" - {"isins", 3, {226, 139, 180}}, - {(char*)0}, -#line 470 "src/html/html_unescape.gperf" - {"eDDot", 3, {226, 169, 183}}, -#line 772 "src/html/html_unescape.gperf" - {"isin", 3, {226, 136, 136}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1886 "src/html/html_unescape.gperf" - {"TripleDot", 3, {226, 131, 155}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 569 "src/html/html_unescape.gperf" - {"Fouriertrf", 3, {226, 132, 177}}, -#line 1463 "src/html/html_unescape.gperf" - {"Proportion", 3, {226, 136, 183}}, - {(char*)0}, {(char*)0}, -#line 1123 "src/html/html_unescape.gperf" - {"ngeq", 3, {226, 137, 177}}, -#line 856 "src/html/html_unescape.gperf" - {"Lcaron", 2, {196, 189}}, - {(char*)0}, -#line 1124 "src/html/html_unescape.gperf" - {"ngeqq", 3, {226, 137, 167}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 871 "src/html/html_unescape.gperf" - {"lE", 3, {226, 137, 166}}, -#line 228 "src/html/html_unescape.gperf" - {"Ccaron", 2, {196, 140}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 200 "src/html/html_unescape.gperf" - {"bsemi", 3, {226, 129, 143}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1464 "src/html/html_unescape.gperf" - {"propto", 3, {226, 136, 157}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 915 "src/html/html_unescape.gperf" - {"lesdot", 3, {226, 169, 191}}, -#line 292 "src/html/html_unescape.gperf" - {"Conint", 3, {226, 136, 175}}, - {(char*)0}, -#line 36 "src/html/html_unescape.gperf" - {"And", 3, {226, 169, 147}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1660 "src/html/html_unescape.gperf" - {"searrow", 3, {226, 134, 152}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1367 "src/html/html_unescape.gperf" - {"orslope", 3, {226, 169, 151}}, -#line 677 "src/html/html_unescape.gperf" - {"harr", 3, {226, 134, 148}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 846 "src/html/html_unescape.gperf" - {"late", 3, {226, 170, 173}}, - {(char*)0}, -#line 244 "src/html/html_unescape.gperf" - {"CenterDot", 2, {194, 183}}, - {(char*)0}, {(char*)0}, -#line 1329 "src/html/html_unescape.gperf" - {"ofr", 4, {240, 157, 148, 172}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1104 "src/html/html_unescape.gperf" - {"nearrow", 3, {226, 134, 151}}, - {(char*)0}, -#line 1474 "src/html/html_unescape.gperf" - {"qint", 3, {226, 168, 140}}, - {(char*)0}, {(char*)0}, -#line 847 "src/html/html_unescape.gperf" - {"lates", 3, {226, 170, 173}}, -#line 802 "src/html/html_unescape.gperf" - {"kappav", 2, {207, 176}}, - {(char*)0}, {(char*)0}, -#line 699 "src/html/html_unescape.gperf" - {"horbar", 3, {226, 128, 149}}, -#line 476 "src/html/html_unescape.gperf" - {"Efr", 4, {240, 157, 148, 136}}, -#line 693 "src/html/html_unescape.gperf" - {"hoarr", 3, {226, 135, 191}}, -#line 1240 "src/html/html_unescape.gperf" - {"npre", 3, {226, 170, 175}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 748 "src/html/html_unescape.gperf" - {"inodot", 2, {196, 177}}, - {(char*)0}, -#line 1916 "src/html/html_unescape.gperf" - {"udarr", 3, {226, 135, 133}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 609 "src/html/html_unescape.gperf" - {"geq", 3, {226, 137, 165}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1258 "src/html/html_unescape.gperf" - {"nsimeq", 3, {226, 137, 132}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 610 "src/html/html_unescape.gperf" - {"geqq", 3, {226, 137, 167}}, - {(char*)0}, {(char*)0}, -#line 475 "src/html/html_unescape.gperf" - {"efDot", 3, {226, 137, 146}}, - {(char*)0}, {(char*)0}, -#line 1611 "src/html/html_unescape.gperf" - {"rpargt", 3, {226, 166, 148}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1370 "src/html/html_unescape.gperf" - {"Oscr", 4, {240, 157, 146, 170}}, - {(char*)0}, {(char*)0}, -#line 1419 "src/html/html_unescape.gperf" - {"plusdo", 3, {226, 136, 148}}, - {(char*)0}, {(char*)0}, -#line 822 "src/html/html_unescape.gperf" - {"lagran", 3, {226, 132, 146}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1847 "src/html/html_unescape.gperf" - {"thicksim", 3, {226, 136, 188}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1446 "src/html/html_unescape.gperf" - {"precnsim", 3, {226, 139, 168}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1091 "src/html/html_unescape.gperf" - {"Ncaron", 2, {197, 135}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1080 "src/html/html_unescape.gperf" - {"napE", 3, {226, 169, 176}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 728 "src/html/html_unescape.gperf" - {"iiint", 3, {226, 136, 173}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 199 "src/html/html_unescape.gperf" - {"Bscr", 3, {226, 132, 172}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1036 "src/html/html_unescape.gperf" - {"mapstodown", 3, {226, 134, 167}}, - {(char*)0}, {(char*)0}, -#line 1994 "src/html/html_unescape.gperf" - {"varrho", 2, {207, 177}}, - {(char*)0}, -#line 776 "src/html/html_unescape.gperf" - {"isinsv", 3, {226, 139, 179}}, - {(char*)0}, {(char*)0}, -#line 1297 "src/html/html_unescape.gperf" - {"nvHarr", 3, {226, 164, 132}}, - {(char*)0}, {(char*)0}, -#line 1192 "src/html/html_unescape.gperf" - {"NotLeftTriangleBar", 3, {226, 167, 143}}, - {(char*)0}, -#line 521 "src/html/html_unescape.gperf" - {"equest", 3, {226, 137, 159}}, - {(char*)0}, -#line 1194 "src/html/html_unescape.gperf" - {"NotLeftTriangleEqual", 3, {226, 139, 172}}, -#line 1193 "src/html/html_unescape.gperf" - {"NotLeftTriangle", 3, {226, 139, 170}}, - {(char*)0}, {(char*)0}, -#line 61 "src/html/html_unescape.gperf" - {"Aopf", 4, {240, 157, 148, 184}}, -#line 681 "src/html/html_unescape.gperf" - {"hbar", 3, {226, 132, 143}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1985 "src/html/html_unescape.gperf" - {"vangrt", 3, {226, 166, 156}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 689 "src/html/html_unescape.gperf" - {"Hfr", 3, {226, 132, 140}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1495 "src/html/html_unescape.gperf" - {"range", 3, {226, 166, 165}}, -#line 1705 "src/html/html_unescape.gperf" - {"smte", 3, {226, 170, 172}}, -#line 1003 "src/html/html_unescape.gperf" - {"lsim", 3, {226, 137, 178}}, - {(char*)0}, -#line 1235 "src/html/html_unescape.gperf" - {"npolint", 3, {226, 168, 148}}, - {(char*)0}, -#line 353 "src/html/html_unescape.gperf" - {"dcaron", 2, {196, 143}}, - {(char*)0}, -#line 532 "src/html/html_unescape.gperf" - {"esim", 3, {226, 137, 130}}, - {(char*)0}, -#line 1940 "src/html/html_unescape.gperf" - {"Union", 3, {226, 139, 131}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1706 "src/html/html_unescape.gperf" - {"smtes", 3, {226, 170, 172}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 815 "src/html/html_unescape.gperf" - {"kopf", 4, {240, 157, 149, 156}}, -#line 639 "src/html/html_unescape.gperf" - {"gopf", 4, {240, 157, 149, 152}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1256 "src/html/html_unescape.gperf" - {"nsim", 3, {226, 137, 129}}, - {(char*)0}, -#line 201 "src/html/html_unescape.gperf" - {"bsim", 3, {226, 136, 189}}, - {(char*)0}, -#line 1698 "src/html/html_unescape.gperf" - {"SmallCircle", 3, {226, 136, 152}}, - {(char*)0}, -#line 1172 "src/html/html_unescape.gperf" - {"NotDoubleVerticalBar", 3, {226, 136, 166}}, -#line 1201 "src/html/html_unescape.gperf" - {"NotNestedGreaterGreater", 3, {226, 170, 162}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 520 "src/html/html_unescape.gperf" - {"EqualTilde", 3, {226, 137, 130}}, - {(char*)0}, {(char*)0}, -#line 1187 "src/html/html_unescape.gperf" - {"notindot", 3, {226, 139, 181}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1526 "src/html/html_unescape.gperf" - {"Rcaron", 2, {197, 152}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1430 "src/html/html_unescape.gperf" - {"Popf", 3, {226, 132, 153}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 638 "src/html/html_unescape.gperf" - {"Gopf", 4, {240, 157, 148, 190}}, - {(char*)0}, {(char*)0}, -#line 723 "src/html/html_unescape.gperf" - {"Ifr", 3, {226, 132, 145}}, - {(char*)0}, {(char*)0}, -#line 2049 "src/html/html_unescape.gperf" - {"wedgeq", 3, {226, 137, 153}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1456 "src/html/html_unescape.gperf" - {"prod", 3, {226, 136, 143}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1374 "src/html/html_unescape.gperf" - {"osol", 3, {226, 138, 152}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 419 "src/html/html_unescape.gperf" - {"DoubleUpArrow", 3, {226, 135, 145}}, - {(char*)0}, {(char*)0}, -#line 290 "src/html/html_unescape.gperf" - {"Congruent", 3, {226, 137, 161}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 637 "src/html/html_unescape.gperf" - {"gnsim", 3, {226, 139, 167}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1651 "src/html/html_unescape.gperf" - {"scsim", 3, {226, 137, 191}}, - {(char*)0}, -#line 790 "src/html/html_unescape.gperf" - {"jfr", 4, {240, 157, 148, 167}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1962 "src/html/html_unescape.gperf" - {"upsih", 2, {207, 146}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1156 "src/html/html_unescape.gperf" - {"nLl", 3, {226, 139, 152}}, - {(char*)0}, {(char*)0}, -#line 420 "src/html/html_unescape.gperf" - {"DoubleUpDownArrow", 3, {226, 135, 149}}, - {(char*)0}, -#line 1128 "src/html/html_unescape.gperf" - {"ngsim", 3, {226, 137, 181}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 684 "src/html/html_unescape.gperf" - {"hearts", 3, {226, 153, 165}}, - {(char*)0}, -#line 922 "src/html/html_unescape.gperf" - {"lesseqgtr", 3, {226, 139, 154}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1112 "src/html/html_unescape.gperf" - {"nesear", 3, {226, 164, 168}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 542 "src/html/html_unescape.gperf" - {"Exists", 3, {226, 136, 131}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1703 "src/html/html_unescape.gperf" - {"smile", 3, {226, 140, 163}}, - {(char*)0}, -#line 1984 "src/html/html_unescape.gperf" - {"uwangle", 3, {226, 166, 167}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 685 "src/html/html_unescape.gperf" - {"heartsuit", 3, {226, 153, 165}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 700 "src/html/html_unescape.gperf" - {"HorizontalLine", 3, {226, 148, 128}}, - {(char*)0}, {(char*)0}, -#line 645 "src/html/html_unescape.gperf" - {"GreaterLess", 3, {226, 137, 183}}, - {(char*)0}, -#line 1615 "src/html/html_unescape.gperf" - {"rsaquo", 3, {226, 128, 186}}, - {(char*)0}, -#line 998 "src/html/html_unescape.gperf" - {"lsaquo", 3, {226, 128, 185}}, - {(char*)0}, -#line 1540 "src/html/html_unescape.gperf" - {"realine", 3, {226, 132, 155}}, -#line 348 "src/html/html_unescape.gperf" - {"Dashv", 3, {226, 171, 164}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1687 "src/html/html_unescape.gperf" - {"simdot", 3, {226, 169, 170}}, -#line 641 "src/html/html_unescape.gperf" - {"GreaterEqual", 3, {226, 137, 165}}, -#line 647 "src/html/html_unescape.gperf" - {"GreaterTilde", 3, {226, 137, 179}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 642 "src/html/html_unescape.gperf" - {"GreaterEqualLess", 3, {226, 139, 155}}, - {(char*)0}, -#line 644 "src/html/html_unescape.gperf" - {"GreaterGreater", 3, {226, 170, 162}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1530 "src/html/html_unescape.gperf" - {"rceil", 3, {226, 140, 137}}, - {(char*)0}, -#line 860 "src/html/html_unescape.gperf" - {"lceil", 3, {226, 140, 136}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 927 "src/html/html_unescape.gperf" - {"lessgtr", 3, {226, 137, 182}}, - {(char*)0}, {(char*)0}, -#line 1340 "src/html/html_unescape.gperf" - {"oline", 3, {226, 128, 190}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1852 "src/html/html_unescape.gperf" - {"thksim", 3, {226, 136, 188}}, - {(char*)0}, -#line 759 "src/html/html_unescape.gperf" - {"InvisibleTimes", 3, {226, 129, 162}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1487 "src/html/html_unescape.gperf" - {"race", 3, {226, 136, 189}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 769 "src/html/html_unescape.gperf" - {"iquest", 2, {194, 191}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 737 "src/html/html_unescape.gperf" - {"imagline", 3, {226, 132, 144}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1966 "src/html/html_unescape.gperf" - {"UpTee", 3, {226, 138, 165}}, - {(char*)0}, -#line 1053 "src/html/html_unescape.gperf" - {"midcir", 3, {226, 171, 176}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1327 "src/html/html_unescape.gperf" - {"ofcir", 3, {226, 166, 191}}, - {(char*)0}, {(char*)0}, -#line 357 "src/html/html_unescape.gperf" - {"ddarr", 3, {226, 135, 138}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1494 "src/html/html_unescape.gperf" - {"rangd", 3, {226, 166, 146}}, - {(char*)0}, -#line 827 "src/html/html_unescape.gperf" - {"langd", 3, {226, 166, 145}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 522 "src/html/html_unescape.gperf" - {"Equilibrium", 3, {226, 135, 140}}, -#line 1390 "src/html/html_unescape.gperf" - {"parsim", 3, {226, 171, 179}}, -#line 2012 "src/html/html_unescape.gperf" - {"Vdashl", 3, {226, 171, 166}}, -#line 1328 "src/html/html_unescape.gperf" - {"Ofr", 4, {240, 157, 148, 146}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 105 "src/html/html_unescape.gperf" - {"Because", 3, {226, 136, 181}}, - {(char*)0}, -#line 1514 "src/html/html_unescape.gperf" - {"rAtail", 3, {226, 164, 156}}, - {(char*)0}, -#line 844 "src/html/html_unescape.gperf" - {"lAtail", 3, {226, 164, 155}}, -#line 1349 "src/html/html_unescape.gperf" - {"ominus", 3, {226, 138, 150}}, -#line 74 "src/html/html_unescape.gperf" - {"Ascr", 4, {240, 157, 146, 156}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 510 "src/html/html_unescape.gperf" - {"Epsilon", 2, {206, 149}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1676 "src/html/html_unescape.gperf" - {"ShortLeftArrow", 3, {226, 134, 144}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 777 "src/html/html_unescape.gperf" - {"isinv", 3, {226, 136, 136}}, - {(char*)0}, -#line 1051 "src/html/html_unescape.gperf" - {"micro", 2, {194, 181}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 2112 "src/html/html_unescape.gperf" - {"zcaron", 2, {197, 190}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 817 "src/html/html_unescape.gperf" - {"kscr", 4, {240, 157, 147, 128}}, -#line 649 "src/html/html_unescape.gperf" - {"gscr", 3, {226, 132, 138}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 114 "src/html/html_unescape.gperf" - {"Bfr", 4, {240, 157, 148, 133}}, -#line 608 "src/html/html_unescape.gperf" - {"gel", 3, {226, 139, 155}}, -#line 687 "src/html/html_unescape.gperf" - {"hercon", 3, {226, 138, 185}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1885 "src/html/html_unescape.gperf" - {"triminus", 3, {226, 168, 186}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 480 "src/html/html_unescape.gperf" - {"egrave", 2, {195, 168}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1655 "src/html/html_unescape.gperf" - {"sdot", 3, {226, 139, 133}}, -#line 1924 "src/html/html_unescape.gperf" - {"ugrave", 2, {195, 185}}, - {(char*)0}, -#line 2115 "src/html/html_unescape.gperf" - {"Zdot", 2, {197, 187}}, -#line 472 "src/html/html_unescape.gperf" - {"edot", 2, {196, 151}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1229 "src/html/html_unescape.gperf" - {"NotTildeTilde", 3, {226, 137, 137}}, - {(char*)0}, -#line 1835 "src/html/html_unescape.gperf" - {"tdot", 3, {226, 131, 155}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1467 "src/html/html_unescape.gperf" - {"Pscr", 4, {240, 157, 146, 171}}, -#line 1408 "src/html/html_unescape.gperf" - {"Pi", 2, {206, 160}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 648 "src/html/html_unescape.gperf" - {"Gscr", 4, {240, 157, 146, 162}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1425 "src/html/html_unescape.gperf" - {"plustwo", 3, {226, 168, 167}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1173 "src/html/html_unescape.gperf" - {"NotElement", 3, {226, 136, 137}}, - {(char*)0}, -#line 1422 "src/html/html_unescape.gperf" - {"PlusMinus", 2, {194, 177}}, - {(char*)0}, {(char*)0}, -#line 697 "src/html/html_unescape.gperf" - {"hopf", 4, {240, 157, 149, 153}}, -#line 594 "src/html/html_unescape.gperf" - {"gammad", 2, {207, 157}}, - {(char*)0}, -#line 1044 "src/html/html_unescape.gperf" - {"mDDot", 3, {226, 136, 186}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 389 "src/html/html_unescape.gperf" - {"divideontimes", 3, {226, 139, 135}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 401 "src/html/html_unescape.gperf" - {"doteq", 3, {226, 137, 144}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1986 "src/html/html_unescape.gperf" - {"varepsilon", 2, {207, 181}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1439 "src/html/html_unescape.gperf" - {"Precedes", 3, {226, 137, 186}}, - {(char*)0}, {(char*)0}, -#line 593 "src/html/html_unescape.gperf" - {"Gammad", 2, {207, 156}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 349 "src/html/html_unescape.gperf" - {"dashv", 3, {226, 138, 163}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1170 "src/html/html_unescape.gperf" - {"NotCongruent", 3, {226, 137, 162}}, - {(char*)0}, {(char*)0}, -#line 1911 "src/html/html_unescape.gperf" - {"ubreve", 2, {197, 173}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1333 "src/html/html_unescape.gperf" - {"ogt", 3, {226, 167, 129}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1609 "src/html/html_unescape.gperf" - {"RoundImplies", 3, {226, 165, 176}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1441 "src/html/html_unescape.gperf" - {"PrecedesSlantEqual", 3, {226, 137, 188}}, - {(char*)0}, {(char*)0}, -#line 1688 "src/html/html_unescape.gperf" - {"sime", 3, {226, 137, 131}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1923 "src/html/html_unescape.gperf" - {"Ugrave", 2, {195, 153}}, - {(char*)0}, -#line 350 "src/html/html_unescape.gperf" - {"dbkarow", 3, {226, 164, 143}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1656 "src/html/html_unescape.gperf" - {"sdote", 3, {226, 169, 166}}, - {(char*)0}, -#line 2016 "src/html/html_unescape.gperf" - {"veeeq", 3, {226, 137, 154}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1035 "src/html/html_unescape.gperf" - {"mapsto", 3, {226, 134, 166}}, - {(char*)0}, {(char*)0}, -#line 1862 "src/html/html_unescape.gperf" - {"times", 2, {195, 151}}, - {(char*)0}, {(char*)0}, -#line 1496 "src/html/html_unescape.gperf" - {"rangle", 3, {226, 159, 169}}, - {(char*)0}, -#line 828 "src/html/html_unescape.gperf" - {"langle", 3, {226, 159, 168}}, - {(char*)0}, {(char*)0}, -#line 878 "src/html/html_unescape.gperf" - {"leftarrowtail", 3, {226, 134, 162}}, -#line 673 "src/html/html_unescape.gperf" - {"hamilt", 3, {226, 132, 139}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1919 "src/html/html_unescape.gperf" - {"udhar", 3, {226, 165, 174}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1138 "src/html/html_unescape.gperf" - {"nisd", 3, {226, 139, 186}}, - {(char*)0}, -#line 1550 "src/html/html_unescape.gperf" - {"rfisht", 3, {226, 165, 189}}, - {(char*)0}, -#line 932 "src/html/html_unescape.gperf" - {"lfisht", 3, {226, 165, 188}}, -#line 676 "src/html/html_unescape.gperf" - {"harrcir", 3, {226, 165, 136}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1354 "src/html/html_unescape.gperf" - {"OpenCurlyQuote", 3, {226, 128, 152}}, - {(char*)0}, -#line 1920 "src/html/html_unescape.gperf" - {"ufisht", 3, {226, 165, 190}}, -#line 1184 "src/html/html_unescape.gperf" - {"NotHumpDownHump", 3, {226, 137, 142}}, - {(char*)0}, {(char*)0}, -#line 896 "src/html/html_unescape.gperf" - {"LeftTee", 3, {226, 138, 163}}, - {(char*)0}, -#line 1618 "src/html/html_unescape.gperf" - {"rsh", 3, {226, 134, 177}}, - {(char*)0}, -#line 1001 "src/html/html_unescape.gperf" - {"lsh", 3, {226, 134, 176}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 668 "src/html/html_unescape.gperf" - {"gvertneqq", 3, {226, 137, 169}}, - {(char*)0}, {(char*)0}, -#line 1861 "src/html/html_unescape.gperf" - {"timesb", 3, {226, 138, 160}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1650 "src/html/html_unescape.gperf" - {"scpolint", 3, {226, 168, 147}}, - {(char*)0}, {(char*)0}, -#line 237 "src/html/html_unescape.gperf" - {"Cdot", 2, {196, 138}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 455 "src/html/html_unescape.gperf" - {"dwangle", 3, {226, 166, 166}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1910 "src/html/html_unescape.gperf" - {"Ubreve", 2, {197, 172}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 905 "src/html/html_unescape.gperf" - {"LeftUpVector", 3, {226, 134, 191}}, - {(char*)0}, {(char*)0}, -#line 904 "src/html/html_unescape.gperf" - {"LeftUpVectorBar", 3, {226, 165, 152}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 462 "src/html/html_unescape.gperf" - {"Ecaron", 2, {196, 154}}, - {(char*)0}, {(char*)0}, -#line 694 "src/html/html_unescape.gperf" - {"homtht", 3, {226, 136, 187}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 725 "src/html/html_unescape.gperf" - {"igrave", 2, {195, 172}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1239 "src/html/html_unescape.gperf" - {"npreceq", 3, {226, 170, 175}}, -#line 467 "src/html/html_unescape.gperf" - {"ecolon", 3, {226, 137, 149}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 359 "src/html/html_unescape.gperf" - {"dd", 3, {226, 133, 134}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1689 "src/html/html_unescape.gperf" - {"simeq", 3, {226, 137, 131}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1188 "src/html/html_unescape.gperf" - {"notinE", 3, {226, 139, 185}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 120 "src/html/html_unescape.gperf" - {"bigoplus", 3, {226, 168, 129}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 22 "src/html/html_unescape.gperf" - {"Afr", 4, {240, 157, 148, 132}}, -#line 874 "src/html/html_unescape.gperf" - {"leftarrow", 3, {226, 134, 144}}, -#line 1336 "src/html/html_unescape.gperf" - {"oint", 3, {226, 136, 174}}, - {(char*)0}, -#line 1824 "src/html/html_unescape.gperf" - {"Tab", 1, {9}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1330 "src/html/html_unescape.gperf" - {"ogon", 2, {203, 155}}, - {(char*)0}, {(char*)0}, -#line 1013 "src/html/html_unescape.gperf" - {"lt", 1, {60}}, -#line 1150 "src/html/html_unescape.gperf" - {"nLeftrightarrow", 3, {226, 135, 142}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1499 "src/html/html_unescape.gperf" - {"rarrb", 3, {226, 135, 165}}, - {(char*)0}, -#line 832 "src/html/html_unescape.gperf" - {"larrb", 3, {226, 135, 164}}, - {(char*)0}, -#line 701 "src/html/html_unescape.gperf" - {"hscr", 4, {240, 157, 146, 189}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 902 "src/html/html_unescape.gperf" - {"LeftUpDownVector", 3, {226, 165, 145}}, - {(char*)0}, -#line 808 "src/html/html_unescape.gperf" - {"kfr", 4, {240, 157, 148, 168}}, -#line 620 "src/html/html_unescape.gperf" - {"gfr", 4, {240, 157, 148, 164}}, -#line 1946 "src/html/html_unescape.gperf" - {"UpArrowBar", 3, {226, 164, 146}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1251 "src/html/html_unescape.gperf" - {"nsce", 3, {226, 170, 176}}, -#line 1016 "src/html/html_unescape.gperf" - {"ltdot", 3, {226, 139, 150}}, -#line 617 "src/html/html_unescape.gperf" - {"gesl", 3, {226, 139, 155}}, -#line 2074 "src/html/html_unescape.gperf" - {"xodot", 3, {226, 168, 128}}, -#line 1748 "src/html/html_unescape.gperf" - {"star", 3, {226, 152, 134}}, - {(char*)0}, {(char*)0}, -#line 984 "src/html/html_unescape.gperf" - {"lowbar", 1, {95}}, - {(char*)0}, -#line 2066 "src/html/html_unescape.gperf" - {"xharr", 3, {226, 159, 183}}, -#line 466 "src/html/html_unescape.gperf" - {"ecir", 3, {226, 137, 150}}, - {(char*)0}, -#line 1976 "src/html/html_unescape.gperf" - {"utdot", 3, {226, 139, 176}}, -#line 1086 "src/html/html_unescape.gperf" - {"natur", 3, {226, 153, 174}}, -#line 1002 "src/html/html_unescape.gperf" - {"Lsh", 3, {226, 134, 176}}, -#line 746 "src/html/html_unescape.gperf" - {"infin", 3, {226, 136, 158}}, - {(char*)0}, -#line 284 "src/html/html_unescape.gperf" - {"comp", 3, {226, 136, 129}}, - {(char*)0}, -#line 1685 "src/html/html_unescape.gperf" - {"sigmav", 2, {207, 130}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 2078 "src/html/html_unescape.gperf" - {"xotime", 3, {226, 168, 130}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1401 "src/html/html_unescape.gperf" - {"Pfr", 4, {240, 157, 148, 147}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 619 "src/html/html_unescape.gperf" - {"Gfr", 4, {240, 157, 148, 138}}, - {(char*)0}, {(char*)0}, -#line 116 "src/html/html_unescape.gperf" - {"bigcap", 3, {226, 139, 130}}, - {(char*)0}, -#line 1693 "src/html/html_unescape.gperf" - {"simlE", 3, {226, 170, 159}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 727 "src/html/html_unescape.gperf" - {"iiiint", 3, {226, 168, 140}}, -#line 96 "src/html/html_unescape.gperf" - {"barwedge", 3, {226, 140, 133}}, -#line 95 "src/html/html_unescape.gperf" - {"Barwed", 3, {226, 140, 134}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 2070 "src/html/html_unescape.gperf" - {"xlarr", 3, {226, 159, 181}}, -#line 924 "src/html/html_unescape.gperf" - {"LessEqualGreater", 3, {226, 139, 154}}, - {(char*)0}, -#line 302 "src/html/html_unescape.gperf" - {"crarr", 3, {226, 134, 181}}, -#line 773 "src/html/html_unescape.gperf" - {"isindot", 3, {226, 139, 181}}, - {(char*)0}, -#line 283 "src/html/html_unescape.gperf" - {"commat", 1, {64}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1055 "src/html/html_unescape.gperf" - {"middot", 2, {194, 183}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 917 "src/html/html_unescape.gperf" - {"lesdotor", 3, {226, 170, 131}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1684 "src/html/html_unescape.gperf" - {"sigmaf", 2, {207, 130}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1500 "src/html/html_unescape.gperf" - {"rarrbfs", 3, {226, 164, 160}}, - {(char*)0}, -#line 833 "src/html/html_unescape.gperf" - {"larrbfs", 3, {226, 164, 159}}, - {(char*)0}, {(char*)0}, -#line 2079 "src/html/html_unescape.gperf" - {"xrarr", 3, {226, 159, 182}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 118 "src/html/html_unescape.gperf" - {"bigcup", 3, {226, 139, 131}}, - {(char*)0}, -#line 275 "src/html/html_unescape.gperf" - {"clubs", 3, {226, 153, 163}}, -#line 678 "src/html/html_unescape.gperf" - {"hArr", 3, {226, 135, 148}}, -#line 1626 "src/html/html_unescape.gperf" - {"rtrie", 3, {226, 138, 181}}, - {(char*)0}, -#line 1022 "src/html/html_unescape.gperf" - {"ltrie", 3, {226, 138, 180}}, -#line 742 "src/html/html_unescape.gperf" - {"imped", 2, {198, 181}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 503 "src/html/html_unescape.gperf" - {"eogon", 2, {196, 153}}, -#line 1631 "src/html/html_unescape.gperf" - {"rx", 3, {226, 132, 158}}, -#line 1024 "src/html/html_unescape.gperf" - {"ltrPar", 3, {226, 166, 150}}, -#line 1747 "src/html/html_unescape.gperf" - {"Star", 3, {226, 139, 134}}, - {(char*)0}, -#line 1943 "src/html/html_unescape.gperf" - {"uogon", 2, {197, 179}}, - {(char*)0}, {(char*)0}, -#line 1856 "src/html/html_unescape.gperf" - {"Tilde", 3, {226, 136, 188}}, - {(char*)0}, -#line 672 "src/html/html_unescape.gperf" - {"half", 2, {194, 189}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1855 "src/html/html_unescape.gperf" - {"tilde", 2, {203, 156}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 876 "src/html/html_unescape.gperf" - {"Leftarrow", 3, {226, 135, 144}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 618 "src/html/html_unescape.gperf" - {"gesles", 3, {226, 170, 148}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 218 "src/html/html_unescape.gperf" - {"cap", 3, {226, 136, 169}}, -#line 1752 "src/html/html_unescape.gperf" - {"strns", 2, {194, 175}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1015 "src/html/html_unescape.gperf" - {"Lt", 3, {226, 137, 170}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1454 "src/html/html_unescape.gperf" - {"prnE", 3, {226, 170, 181}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1727 "src/html/html_unescape.gperf" - {"sqsupe", 3, {226, 138, 146}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1728 "src/html/html_unescape.gperf" - {"sqsupset", 3, {226, 138, 144}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1883 "src/html/html_unescape.gperf" - {"tridot", 3, {226, 151, 172}}, -#line 1361 "src/html/html_unescape.gperf" - {"order", 3, {226, 132, 180}}, - {(char*)0}, {(char*)0}, -#line 223 "src/html/html_unescape.gperf" - {"caps", 3, {226, 136, 169}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 303 "src/html/html_unescape.gperf" - {"cross", 3, {226, 156, 151}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 367 "src/html/html_unescape.gperf" - {"dfisht", 3, {226, 165, 191}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 2072 "src/html/html_unescape.gperf" - {"xmap", 3, {226, 159, 188}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1726 "src/html/html_unescape.gperf" - {"sqsup", 3, {226, 138, 144}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1625 "src/html/html_unescape.gperf" - {"rtri", 3, {226, 150, 185}}, - {(char*)0}, -#line 1021 "src/html/html_unescape.gperf" - {"ltri", 3, {226, 151, 131}}, -#line 778 "src/html/html_unescape.gperf" - {"it", 3, {226, 129, 162}}, -#line 1599 "src/html/html_unescape.gperf" - {"rmoust", 3, {226, 142, 177}}, - {(char*)0}, -#line 955 "src/html/html_unescape.gperf" - {"lmoust", 3, {226, 142, 176}}, -#line 634 "src/html/html_unescape.gperf" - {"gnE", 3, {226, 137, 169}}, -#line 937 "src/html/html_unescape.gperf" - {"lgE", 3, {226, 170, 145}}, - {(char*)0}, {(char*)0}, -#line 1642 "src/html/html_unescape.gperf" - {"scE", 3, {226, 170, 180}}, - {(char*)0}, -#line 1979 "src/html/html_unescape.gperf" - {"utri", 3, {226, 150, 181}}, - {(char*)0}, -#line 2017 "src/html/html_unescape.gperf" - {"vellip", 3, {226, 139, 174}}, - {(char*)0}, -#line 535 "src/html/html_unescape.gperf" - {"ETH", 2, {195, 144}}, - {(char*)0}, {(char*)0}, -#line 953 "src/html/html_unescape.gperf" - {"lmidot", 2, {197, 128}}, - {(char*)0}, -#line 1942 "src/html/html_unescape.gperf" - {"Uogon", 2, {197, 178}}, -#line 301 "src/html/html_unescape.gperf" - {"CounterClockwiseContourIntegral", 3, {226, 136, 179}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1121 "src/html/html_unescape.gperf" - {"ngE", 3, {226, 137, 167}}, -#line 1310 "src/html/html_unescape.gperf" - {"nwnear", 3, {226, 164, 167}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 918 "src/html/html_unescape.gperf" - {"lesg", 3, {226, 139, 154}}, - {(char*)0}, {(char*)0}, -#line 1416 "src/html/html_unescape.gperf" - {"plusb", 3, {226, 138, 158}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1619 "src/html/html_unescape.gperf" - {"Rsh", 3, {226, 134, 177}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 300 "src/html/html_unescape.gperf" - {"copysr", 3, {226, 132, 151}}, - {(char*)0}, -#line 747 "src/html/html_unescape.gperf" - {"infintie", 3, {226, 167, 157}}, - {(char*)0}, -#line 739 "src/html/html_unescape.gperf" - {"imath", 2, {196, 177}}, -#line 531 "src/html/html_unescape.gperf" - {"Esim", 3, {226, 169, 179}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1403 "src/html/html_unescape.gperf" - {"Phi", 2, {206, 166}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 629 "src/html/html_unescape.gperf" - {"glE", 3, {226, 170, 146}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 2031 "src/html/html_unescape.gperf" - {"vnsup", 3, {226, 138, 131}}, - {(char*)0}, {(char*)0}, -#line 1691 "src/html/html_unescape.gperf" - {"simgE", 3, {226, 170, 160}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 414 "src/html/html_unescape.gperf" - {"DoubleLongLeftArrow", 3, {226, 159, 184}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 415 "src/html/html_unescape.gperf" - {"DoubleLongLeftRightArrow", 3, {226, 159, 186}}, - {(char*)0}, {(char*)0}, -#line 1296 "src/html/html_unescape.gperf" - {"nvgt", 1, {62}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1047 "src/html/html_unescape.gperf" - {"Mellintrf", 3, {226, 132, 179}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1451 "src/html/html_unescape.gperf" - {"Prime", 3, {226, 128, 179}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 729 "src/html/html_unescape.gperf" - {"iinfin", 3, {226, 167, 156}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1547 "src/html/html_unescape.gperf" - {"ReverseElement", 3, {226, 136, 139}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 493 "src/html/html_unescape.gperf" - {"EmptySmallSquare", 3, {226, 151, 187}}, -#line 1490 "src/html/html_unescape.gperf" - {"radic", 3, {226, 136, 154}}, - {(char*)0}, {(char*)0}, -#line 688 "src/html/html_unescape.gperf" - {"hfr", 4, {240, 157, 148, 165}}, -#line 2116 "src/html/html_unescape.gperf" - {"zdot", 2, {197, 188}}, -#line 1030 "src/html/html_unescape.gperf" - {"male", 3, {226, 153, 130}}, - {(char*)0}, -#line 1501 "src/html/html_unescape.gperf" - {"rarrc", 3, {226, 164, 179}}, -#line 1437 "src/html/html_unescape.gperf" - {"prec", 3, {226, 137, 186}}, -#line 1647 "src/html/html_unescape.gperf" - {"scnap", 3, {226, 170, 186}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 384 "src/html/html_unescape.gperf" - {"DifferentialD", 3, {226, 133, 134}}, - {(char*)0}, -#line 1064 "src/html/html_unescape.gperf" - {"models", 3, {226, 138, 167}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1012 "src/html/html_unescape.gperf" - {"ltcir", 3, {226, 169, 185}}, -#line 763 "src/html/html_unescape.gperf" - {"iogon", 2, {196, 175}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 217 "src/html/html_unescape.gperf" - {"capcap", 3, {226, 169, 139}}, - {(char*)0}, -#line 721 "src/html/html_unescape.gperf" - {"iff", 3, {226, 135, 148}}, - {(char*)0}, -#line 361 "src/html/html_unescape.gperf" - {"ddotseq", 3, {226, 169, 183}}, - {(char*)0}, -#line 264 "src/html/html_unescape.gperf" - {"CirclePlus", 3, {226, 138, 149}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1623 "src/html/html_unescape.gperf" - {"rthree", 3, {226, 139, 140}}, - {(char*)0}, -#line 1017 "src/html/html_unescape.gperf" - {"lthree", 3, {226, 139, 139}}, - {(char*)0}, {(char*)0}, -#line 1442 "src/html/html_unescape.gperf" - {"PrecedesTilde", 3, {226, 137, 190}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 450 "src/html/html_unescape.gperf" - {"dtdot", 3, {226, 139, 177}}, - {(char*)0}, -#line 276 "src/html/html_unescape.gperf" - {"clubsuit", 3, {226, 153, 163}}, - {(char*)0}, -#line 1489 "src/html/html_unescape.gperf" - {"racute", 2, {197, 149}}, - {(char*)0}, -#line 820 "src/html/html_unescape.gperf" - {"lacute", 2, {196, 186}}, -#line 1890 "src/html/html_unescape.gperf" - {"trpezium", 3, {226, 143, 162}}, -#line 1633 "src/html/html_unescape.gperf" - {"sacute", 2, {197, 155}}, - {(char*)0}, {(char*)0}, -#line 2109 "src/html/html_unescape.gperf" - {"Zacute", 2, {197, 185}}, -#line 460 "src/html/html_unescape.gperf" - {"eacute", 2, {195, 169}}, - {(char*)0}, -#line 1859 "src/html/html_unescape.gperf" - {"TildeTilde", 3, {226, 137, 136}}, - {(char*)0}, -#line 1907 "src/html/html_unescape.gperf" - {"Uarrocir", 3, {226, 165, 137}}, -#line 1903 "src/html/html_unescape.gperf" - {"uacute", 2, {195, 186}}, -#line 983 "src/html/html_unescape.gperf" - {"lowast", 3, {226, 136, 151}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1077 "src/html/html_unescape.gperf" - {"nacute", 2, {197, 132}}, - {(char*)0}, -#line 1207 "src/html/html_unescape.gperf" - {"NotPrecedes", 3, {226, 138, 128}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 952 "src/html/html_unescape.gperf" - {"Lmidot", 2, {196, 191}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1948 "src/html/html_unescape.gperf" - {"UpArrow", 3, {226, 134, 145}}, - {(char*)0}, -#line 1512 "src/html/html_unescape.gperf" - {"rarrw", 3, {226, 134, 157}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 439 "src/html/html_unescape.gperf" - {"DownTee", 3, {226, 138, 164}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 556 "src/html/html_unescape.gperf" - {"FilledSmallSquare", 3, {226, 151, 188}}, -#line 220 "src/html/html_unescape.gperf" - {"capcup", 3, {226, 169, 135}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 643 "src/html/html_unescape.gperf" - {"GreaterFullEqual", 3, {226, 137, 167}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1300 "src/html/html_unescape.gperf" - {"nvle", 3, {226, 137, 164}}, - {(char*)0}, -#line 1884 "src/html/html_unescape.gperf" - {"trie", 3, {226, 137, 156}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1347 "src/html/html_unescape.gperf" - {"omicron", 2, {206, 191}}, - {(char*)0}, -#line 418 "src/html/html_unescape.gperf" - {"DoubleRightTee", 3, {226, 138, 168}}, -#line 234 "src/html/html_unescape.gperf" - {"Cconint", 3, {226, 136, 176}}, -#line 1622 "src/html/html_unescape.gperf" - {"rsquor", 3, {226, 128, 153}}, - {(char*)0}, -#line 1008 "src/html/html_unescape.gperf" - {"lsquor", 3, {226, 128, 154}}, - {(char*)0}, -#line 2125 "src/html/html_unescape.gperf" - {"zigrarr", 3, {226, 135, 157}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 294 "src/html/html_unescape.gperf" - {"copf", 4, {240, 157, 149, 148}}, - {(char*)0}, -#line 293 "src/html/html_unescape.gperf" - {"ContourIntegral", 3, {226, 136, 174}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 671 "src/html/html_unescape.gperf" - {"hairsp", 3, {226, 128, 138}}, -#line 1729 "src/html/html_unescape.gperf" - {"sqsupseteq", 3, {226, 138, 146}}, -#line 307 "src/html/html_unescape.gperf" - {"csub", 3, {226, 171, 143}}, -#line 1956 "src/html/html_unescape.gperf" - {"upharpoonright", 3, {226, 134, 190}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 427 "src/html/html_unescape.gperf" - {"DownBreve", 2, {204, 145}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1675 "src/html/html_unescape.gperf" - {"ShortDownArrow", 3, {226, 134, 147}}, - {(char*)0}, -#line 2076 "src/html/html_unescape.gperf" - {"xopf", 4, {240, 157, 149, 169}}, - {(char*)0}, -#line 1632 "src/html/html_unescape.gperf" - {"Sacute", 2, {197, 154}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 2040 "src/html/html_unescape.gperf" - {"vsupnE", 3, {226, 171, 140}}, -#line 266 "src/html/html_unescape.gperf" - {"cir", 3, {226, 151, 139}}, -#line 1415 "src/html/html_unescape.gperf" - {"plusacir", 3, {226, 168, 163}}, -#line 309 "src/html/html_unescape.gperf" - {"csup", 3, {226, 171, 144}}, -#line 2038 "src/html/html_unescape.gperf" - {"vsubnE", 3, {226, 171, 139}}, -#line 1902 "src/html/html_unescape.gperf" - {"Uacute", 2, {195, 154}}, - {(char*)0}, -#line 774 "src/html/html_unescape.gperf" - {"isinE", 3, {226, 139, 185}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 607 "src/html/html_unescape.gperf" - {"gEl", 3, {226, 170, 140}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1720 "src/html/html_unescape.gperf" - {"sqcups", 3, {226, 138, 148}}, - {(char*)0}, -#line 1702 "src/html/html_unescape.gperf" - {"smid", 3, {226, 136, 163}}, - {(char*)0}, -#line 936 "src/html/html_unescape.gperf" - {"lg", 3, {226, 137, 182}}, - {(char*)0}, -#line 416 "src/html/html_unescape.gperf" - {"DoubleLongRightArrow", 3, {226, 159, 185}}, -#line 1209 "src/html/html_unescape.gperf" - {"NotPrecedesSlantEqual", 3, {226, 139, 160}}, - {(char*)0}, {(char*)0}, -#line 478 "src/html/html_unescape.gperf" - {"eg", 3, {226, 170, 154}}, - {(char*)0}, {(char*)0}, -#line 34 "src/html/html_unescape.gperf" - {"AMP", 1, {38}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1163 "src/html/html_unescape.gperf" - {"nmid", 3, {226, 136, 164}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1863 "src/html/html_unescape.gperf" - {"timesd", 3, {226, 168, 176}}, - {(char*)0}, {(char*)0}, -#line 434 "src/html/html_unescape.gperf" - {"DownLeftVector", 3, {226, 134, 189}}, -#line 2131 "src/html/html_unescape.gperf" - {"zwnj", 3, {226, 128, 140}}, -#line 819 "src/html/html_unescape.gperf" - {"Lacute", 2, {196, 185}}, -#line 433 "src/html/html_unescape.gperf" - {"DownLeftVectorBar", 3, {226, 165, 150}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1332 "src/html/html_unescape.gperf" - {"ograve", 2, {195, 178}}, -#line 2088 "src/html/html_unescape.gperf" - {"Yacute", 2, {195, 157}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1719 "src/html/html_unescape.gperf" - {"sqcup", 3, {226, 138, 148}}, - {(char*)0}, {(char*)0}, -#line 1323 "src/html/html_unescape.gperf" - {"odot", 3, {226, 138, 153}}, -#line 213 "src/html/html_unescape.gperf" - {"Cacute", 2, {196, 134}}, - {(char*)0}, -#line 1286 "src/html/html_unescape.gperf" - {"nu", 2, {206, 189}}, -#line 1889 "src/html/html_unescape.gperf" - {"tritime", 3, {226, 168, 187}}, - {(char*)0}, -#line 479 "src/html/html_unescape.gperf" - {"Egrave", 2, {195, 136}}, -#line 508 "src/html/html_unescape.gperf" - {"eplus", 3, {226, 169, 177}}, - {(char*)0}, -#line 86 "src/html/html_unescape.gperf" - {"backcong", 3, {226, 137, 140}}, - {(char*)0}, {(char*)0}, -#line 1957 "src/html/html_unescape.gperf" - {"uplus", 3, {226, 138, 142}}, - {(char*)0}, -#line 471 "src/html/html_unescape.gperf" - {"Edot", 2, {196, 150}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 310 "src/html/html_unescape.gperf" - {"csupe", 3, {226, 171, 146}}, - {(char*)0}, -#line 1690 "src/html/html_unescape.gperf" - {"simg", 3, {226, 170, 158}}, -#line 1959 "src/html/html_unescape.gperf" - {"UpperRightArrow", 3, {226, 134, 151}}, -#line 308 "src/html/html_unescape.gperf" - {"csube", 3, {226, 171, 145}}, - {(char*)0}, -#line 451 "src/html/html_unescape.gperf" - {"dtri", 3, {226, 150, 191}}, -#line 1455 "src/html/html_unescape.gperf" - {"prnsim", 3, {226, 139, 168}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 178 "src/html/html_unescape.gperf" - {"boxUr", 3, {226, 149, 153}}, -#line 1981 "src/html/html_unescape.gperf" - {"uuarr", 3, {226, 135, 136}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 432 "src/html/html_unescape.gperf" - {"DownLeftTeeVector", 3, {226, 165, 158}}, -#line 651 "src/html/html_unescape.gperf" - {"gsime", 3, {226, 170, 142}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 121 "src/html/html_unescape.gperf" - {"bigotimes", 3, {226, 168, 130}}, -#line 342 "src/html/html_unescape.gperf" - {"Dagger", 3, {226, 128, 161}}, - {(char*)0}, {(char*)0}, -#line 755 "src/html/html_unescape.gperf" - {"Intersection", 3, {226, 139, 130}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 711 "src/html/html_unescape.gperf" - {"iacute", 2, {195, 173}}, - {(char*)0}, -#line 1435 "src/html/html_unescape.gperf" - {"prcue", 3, {226, 137, 188}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 482 "src/html/html_unescape.gperf" - {"egsdot", 3, {226, 170, 152}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 743 "src/html/html_unescape.gperf" - {"Implies", 3, {226, 135, 146}}, -#line 2011 "src/html/html_unescape.gperf" - {"VDash", 3, {226, 138, 171}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 208 "src/html/html_unescape.gperf" - {"bump", 3, {226, 137, 142}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1071 "src/html/html_unescape.gperf" - {"Mu", 2, {206, 156}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 2009 "src/html/html_unescape.gperf" - {"vDash", 3, {226, 138, 168}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1028 "src/html/html_unescape.gperf" - {"lvnE", 3, {226, 137, 168}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 895 "src/html/html_unescape.gperf" - {"LeftTeeArrow", 3, {226, 134, 164}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1076 "src/html/html_unescape.gperf" - {"Nacute", 2, {197, 131}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1937 "src/html/html_unescape.gperf" - {"UnderBrace", 3, {226, 143, 159}}, -#line 1469 "src/html/html_unescape.gperf" - {"Psi", 2, {206, 168}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1560 "src/html/html_unescape.gperf" - {"rhov", 2, {207, 177}}, - {(char*)0}, -#line 913 "src/html/html_unescape.gperf" - {"lescc", 3, {226, 170, 168}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1790 "src/html/html_unescape.gperf" - {"sup1", 2, {194, 185}}, - {(char*)0}, {(char*)0}, -#line 1791 "src/html/html_unescape.gperf" - {"sup2", 2, {194, 178}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1792 "src/html/html_unescape.gperf" - {"sup3", 2, {194, 179}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 119 "src/html/html_unescape.gperf" - {"bigodot", 3, {226, 168, 128}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 425 "src/html/html_unescape.gperf" - {"Downarrow", 3, {226, 135, 147}}, - {(char*)0}, -#line 2083 "src/html/html_unescape.gperf" - {"xsqcup", 3, {226, 168, 134}}, - {(char*)0}, -#line 93 "src/html/html_unescape.gperf" - {"barvee", 3, {226, 138, 189}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1107 "src/html/html_unescape.gperf" - {"NegativeMediumSpace", 3, {226, 128, 139}}, -#line 210 "src/html/html_unescape.gperf" - {"bumpe", 3, {226, 137, 143}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 306 "src/html/html_unescape.gperf" - {"cscr", 4, {240, 157, 146, 184}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1249 "src/html/html_unescape.gperf" - {"nsc", 3, {226, 138, 129}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1793 "src/html/html_unescape.gperf" - {"sup", 3, {226, 138, 131}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 239 "src/html/html_unescape.gperf" - {"cedil", 2, {194, 184}}, - {(char*)0}, {(char*)0}, -#line 192 "src/html/html_unescape.gperf" - {"boxVr", 3, {226, 149, 159}}, - {(char*)0}, -#line 1365 "src/html/html_unescape.gperf" - {"origof", 3, {226, 138, 182}}, -#line 2130 "src/html/html_unescape.gperf" - {"zwj", 3, {226, 128, 141}}, -#line 724 "src/html/html_unescape.gperf" - {"Igrave", 2, {195, 140}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 717 "src/html/html_unescape.gperf" - {"Idot", 2, {196, 176}}, - {(char*)0}, -#line 2082 "src/html/html_unescape.gperf" - {"xscr", 4, {240, 157, 147, 141}}, -#line 2069 "src/html/html_unescape.gperf" - {"xi", 2, {206, 190}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1132 "src/html/html_unescape.gperf" - {"nGtv", 3, {226, 137, 171}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 166 "src/html/html_unescape.gperf" - {"boxHu", 3, {226, 149, 167}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1853 "src/html/html_unescape.gperf" - {"THORN", 2, {195, 158}}, - {(char*)0}, -#line 1488 "src/html/html_unescape.gperf" - {"Racute", 2, {197, 148}}, - {(char*)0}, -#line 1506 "src/html/html_unescape.gperf" - {"rarrhk", 3, {226, 134, 170}}, - {(char*)0}, -#line 838 "src/html/html_unescape.gperf" - {"larrhk", 3, {226, 134, 169}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1628 "src/html/html_unescape.gperf" - {"rtriltri", 3, {226, 167, 142}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 181 "src/html/html_unescape.gperf" - {"boxV", 3, {226, 149, 145}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 341 "src/html/html_unescape.gperf" - {"dagger", 3, {226, 128, 160}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1346 "src/html/html_unescape.gperf" - {"Omicron", 2, {206, 159}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 421 "src/html/html_unescape.gperf" - {"DoubleVerticalBar", 3, {226, 136, 165}}, - {(char*)0}, {(char*)0}, -#line 1118 "src/html/html_unescape.gperf" - {"nexists", 3, {226, 136, 132}}, - {(char*)0}, {(char*)0}, -#line 1285 "src/html/html_unescape.gperf" - {"Nu", 2, {206, 157}}, -#line 1117 "src/html/html_unescape.gperf" - {"nexist", 3, {226, 136, 132}}, -#line 606 "src/html/html_unescape.gperf" - {"gE", 3, {226, 137, 167}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 64 "src/html/html_unescape.gperf" - {"ap", 3, {226, 137, 136}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1794 "src/html/html_unescape.gperf" - {"Sup", 3, {226, 139, 145}}, -#line 402 "src/html/html_unescape.gperf" - {"doteqdot", 3, {226, 137, 145}}, - {(char*)0}, {(char*)0}, -#line 500 "src/html/html_unescape.gperf" - {"eng", 2, {197, 139}}, - {(char*)0}, -#line 225 "src/html/html_unescape.gperf" - {"caron", 2, {203, 135}}, - {(char*)0}, -#line 168 "src/html/html_unescape.gperf" - {"boxHU", 3, {226, 149, 169}}, -#line 614 "src/html/html_unescape.gperf" - {"gesdot", 3, {226, 170, 128}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1548 "src/html/html_unescape.gperf" - {"ReverseEquilibrium", 3, {226, 135, 139}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 175 "src/html/html_unescape.gperf" - {"boxUL", 3, {226, 149, 157}}, - {(char*)0}, -#line 1805 "src/html/html_unescape.gperf" - {"supmult", 3, {226, 171, 130}}, - {(char*)0}, {(char*)0}, -#line 1410 "src/html/html_unescape.gperf" - {"pitchfork", 3, {226, 139, 148}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1289 "src/html/html_unescape.gperf" - {"numsp", 3, {226, 128, 135}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1492 "src/html/html_unescape.gperf" - {"rang", 3, {226, 159, 169}}, - {(char*)0}, -#line 825 "src/html/html_unescape.gperf" - {"lang", 3, {226, 159, 168}}, - {(char*)0}, {(char*)0}, -#line 1316 "src/html/html_unescape.gperf" - {"ocir", 3, {226, 138, 154}}, - {(char*)0}, -#line 1516 "src/html/html_unescape.gperf" - {"rationals", 3, {226, 132, 154}}, - {(char*)0}, -#line 296 "src/html/html_unescape.gperf" - {"coprod", 3, {226, 136, 144}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1019 "src/html/html_unescape.gperf" - {"ltlarr", 3, {226, 165, 182}}, -#line 195 "src/html/html_unescape.gperf" - {"breve", 2, {203, 152}}, - {(char*)0}, -#line 1078 "src/html/html_unescape.gperf" - {"nang", 3, {226, 136, 160}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1818 "src/html/html_unescape.gperf" - {"swarhk", 3, {226, 164, 166}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1497 "src/html/html_unescape.gperf" - {"raquo", 2, {194, 187}}, - {(char*)0}, -#line 831 "src/html/html_unescape.gperf" - {"laquo", 2, {194, 171}}, -#line 1816 "src/html/html_unescape.gperf" - {"supsub", 3, {226, 171, 148}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 322 "src/html/html_unescape.gperf" - {"Cup", 3, {226, 139, 147}}, -#line 66 "src/html/html_unescape.gperf" - {"ape", 3, {226, 137, 138}}, -#line 1482 "src/html/html_unescape.gperf" - {"quest", 1, {63}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1306 "src/html/html_unescape.gperf" - {"nwarhk", 3, {226, 164, 163}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1809 "src/html/html_unescape.gperf" - {"supset", 3, {226, 138, 131}}, - {(char*)0}, -#line 423 "src/html/html_unescape.gperf" - {"downarrow", 3, {226, 134, 147}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 453 "src/html/html_unescape.gperf" - {"duarr", 3, {226, 135, 181}}, - {(char*)0}, -#line 68 "src/html/html_unescape.gperf" - {"apos", 1, {39}}, -#line 1331 "src/html/html_unescape.gperf" - {"Ograve", 2, {195, 146}}, -#line 1678 "src/html/html_unescape.gperf" - {"shortparallel", 3, {226, 136, 165}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1269 "src/html/html_unescape.gperf" - {"nsucc", 3, {226, 138, 129}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 967 "src/html/html_unescape.gperf" - {"LongLeftArrow", 3, {226, 159, 181}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 916 "src/html/html_unescape.gperf" - {"lesdoto", 3, {226, 170, 129}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1807 "src/html/html_unescape.gperf" - {"supne", 3, {226, 138, 139}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1127 "src/html/html_unescape.gperf" - {"nGg", 3, {226, 139, 153}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1491 "src/html/html_unescape.gperf" - {"raemptyv", 3, {226, 166, 179}}, -#line 1817 "src/html/html_unescape.gperf" - {"supsup", 3, {226, 171, 150}}, -#line 821 "src/html/html_unescape.gperf" - {"laemptyv", 3, {226, 166, 180}}, - {(char*)0}, {(char*)0}, -#line 1871 "src/html/html_unescape.gperf" - {"topfork", 3, {226, 171, 154}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 502 "src/html/html_unescape.gperf" - {"Eogon", 2, {196, 152}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1594 "src/html/html_unescape.gperf" - {"risingdotseq", 3, {226, 137, 147}}, - {(char*)0}, -#line 212 "src/html/html_unescape.gperf" - {"bumpeq", 3, {226, 137, 143}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1010 "src/html/html_unescape.gperf" - {"lstrok", 2, {197, 130}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1897 "src/html/html_unescape.gperf" - {"Tstrok", 2, {197, 166}}, -#line 650 "src/html/html_unescape.gperf" - {"gsim", 3, {226, 137, 179}}, - {(char*)0}, {(char*)0}, -#line 106 "src/html/html_unescape.gperf" - {"bemptyv", 3, {226, 166, 176}}, -#line 2110 "src/html/html_unescape.gperf" - {"zacute", 2, {197, 186}}, -#line 652 "src/html/html_unescape.gperf" - {"gsiml", 3, {226, 170, 144}}, - {(char*)0}, {(char*)0}, -#line 1898 "src/html/html_unescape.gperf" - {"tstrok", 2, {197, 167}}, - {(char*)0}, -#line 1601 "src/html/html_unescape.gperf" - {"roang", 3, {226, 159, 173}}, -#line 189 "src/html/html_unescape.gperf" - {"boxVL", 3, {226, 149, 163}}, -#line 963 "src/html/html_unescape.gperf" - {"loang", 3, {226, 159, 172}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1153 "src/html/html_unescape.gperf" - {"nleqslant", 3, {226, 169, 189}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1634 "src/html/html_unescape.gperf" - {"sbquo", 3, {226, 128, 154}}, - {(char*)0}, -#line 1657 "src/html/html_unescape.gperf" - {"searhk", 3, {226, 164, 165}}, -#line 957 "src/html/html_unescape.gperf" - {"lnapprox", 3, {226, 170, 137}}, - {(char*)0}, {(char*)0}, -#line 1810 "src/html/html_unescape.gperf" - {"Supset", 3, {226, 139, 145}}, - {(char*)0}, -#line 162 "src/html/html_unescape.gperf" - {"boxHd", 3, {226, 149, 164}}, -#line 1987 "src/html/html_unescape.gperf" - {"varkappa", 2, {207, 176}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 254 "src/html/html_unescape.gperf" - {"circeq", 3, {226, 137, 151}}, - {(char*)0}, -#line 2102 "src/html/html_unescape.gperf" - {"yopf", 4, {240, 157, 149, 170}}, - {(char*)0}, -#line 1941 "src/html/html_unescape.gperf" - {"UnionPlus", 3, {226, 138, 142}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 826 "src/html/html_unescape.gperf" - {"Lang", 3, {226, 159, 170}}, -#line 1101 "src/html/html_unescape.gperf" - {"nearhk", 3, {226, 164, 164}}, -#line 1674 "src/html/html_unescape.gperf" - {"shcy", 2, {209, 136}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 245 "src/html/html_unescape.gperf" - {"cfr", 4, {240, 157, 148, 160}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 800 "src/html/html_unescape.gperf" - {"Kappa", 2, {206, 154}}, -#line 944 "src/html/html_unescape.gperf" - {"ljcy", 2, {209, 153}}, -#line 1046 "src/html/html_unescape.gperf" - {"MediumSpace", 3, {226, 129, 159}}, - {(char*)0}, {(char*)0}, -#line 1811 "src/html/html_unescape.gperf" - {"supseteq", 3, {226, 138, 135}}, -#line 1812 "src/html/html_unescape.gperf" - {"supseteqq", 3, {226, 171, 134}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1545 "src/html/html_unescape.gperf" - {"reg", 2, {194, 174}}, -#line 31 "src/html/html_unescape.gperf" - {"amacr", 2, {196, 129}}, -#line 909 "src/html/html_unescape.gperf" - {"leg", 3, {226, 139, 154}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 2050 "src/html/html_unescape.gperf" - {"weierp", 3, {226, 132, 152}}, -#line 1893 "src/html/html_unescape.gperf" - {"TScy", 2, {208, 166}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1813 "src/html/html_unescape.gperf" - {"supsetneq", 3, {226, 138, 139}}, -#line 1141 "src/html/html_unescape.gperf" - {"njcy", 2, {209, 154}}, -#line 2065 "src/html/html_unescape.gperf" - {"xfr", 4, {240, 157, 148, 181}}, - {(char*)0}, -#line 1072 "src/html/html_unescape.gperf" - {"mu", 2, {206, 188}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1298 "src/html/html_unescape.gperf" - {"nvinfin", 3, {226, 167, 158}}, -#line 179 "src/html/html_unescape.gperf" - {"boxUR", 3, {226, 149, 154}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 2077 "src/html/html_unescape.gperf" - {"xoplus", 3, {226, 168, 129}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 887 "src/html/html_unescape.gperf" - {"leftleftarrows", 3, {226, 135, 135}}, -#line 1787 "src/html/html_unescape.gperf" - {"sum", 3, {226, 136, 145}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 112 "src/html/html_unescape.gperf" - {"beth", 3, {226, 132, 182}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 286 "src/html/html_unescape.gperf" - {"complement", 3, {226, 136, 129}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1287 "src/html/html_unescape.gperf" - {"num", 1, {35}}, -#line 33 "src/html/html_unescape.gperf" - {"amp", 1, {38}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 174 "src/html/html_unescape.gperf" - {"boxUl", 3, {226, 149, 156}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1177 "src/html/html_unescape.gperf" - {"NotGreater", 3, {226, 137, 175}}, -#line 170 "src/html/html_unescape.gperf" - {"boxplus", 3, {226, 138, 158}}, -#line 791 "src/html/html_unescape.gperf" - {"jmath", 2, {200, 183}}, - {(char*)0}, -#line 1669 "src/html/html_unescape.gperf" - {"sfrown", 3, {226, 140, 162}}, - {(char*)0}, -#line 448 "src/html/html_unescape.gperf" - {"Dstrok", 2, {196, 144}}, - {(char*)0}, -#line 37 "src/html/html_unescape.gperf" - {"and", 3, {226, 136, 167}}, -#line 1180 "src/html/html_unescape.gperf" - {"NotGreaterGreater", 3, {226, 137, 171}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1182 "src/html/html_unescape.gperf" - {"NotGreaterSlantEqual", 3, {226, 169, 190}}, - {(char*)0}, -#line 1181 "src/html/html_unescape.gperf" - {"NotGreaterLess", 3, {226, 137, 185}}, -#line 1484 "src/html/html_unescape.gperf" - {"quot", 1, {34}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1179 "src/html/html_unescape.gperf" - {"NotGreaterFullEqual", 3, {226, 137, 167}}, -#line 709 "src/html/html_unescape.gperf" - {"hyphen", 3, {226, 128, 144}}, -#line 1412 "src/html/html_unescape.gperf" - {"planck", 3, {226, 132, 143}}, - {(char*)0}, -#line 1857 "src/html/html_unescape.gperf" - {"TildeEqual", 3, {226, 137, 131}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1872 "src/html/html_unescape.gperf" - {"tosa", 3, {226, 164, 169}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1009 "src/html/html_unescape.gperf" - {"Lstrok", 2, {197, 129}}, - {(char*)0}, {(char*)0}, -#line 1681 "src/html/html_unescape.gperf" - {"shy", 2, {194, 173}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 2073 "src/html/html_unescape.gperf" - {"xnis", 3, {226, 139, 187}}, -#line 762 "src/html/html_unescape.gperf" - {"Iogon", 2, {196, 174}}, - {(char*)0}, {(char*)0}, -#line 456 "src/html/html_unescape.gperf" - {"DZcy", 2, {208, 143}}, - {(char*)0}, -#line 1334 "src/html/html_unescape.gperf" - {"ohbar", 3, {226, 166, 181}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 271 "src/html/html_unescape.gperf" - {"cirscir", 3, {226, 167, 130}}, - {(char*)0}, -#line 1666 "src/html/html_unescape.gperf" - {"sext", 3, {226, 156, 182}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1387 "src/html/html_unescape.gperf" - {"para", 2, {194, 182}}, - {(char*)0}, {(char*)0}, -#line 77 "src/html/html_unescape.gperf" - {"ast", 1, {42}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1483 "src/html/html_unescape.gperf" - {"questeq", 3, {226, 137, 159}}, - {(char*)0}, -#line 1788 "src/html/html_unescape.gperf" - {"Sum", 3, {226, 136, 145}}, - {(char*)0}, -#line 445 "src/html/html_unescape.gperf" - {"DScy", 2, {208, 133}}, - {(char*)0}, -#line 499 "src/html/html_unescape.gperf" - {"ENG", 2, {197, 138}}, - {(char*)0}, -#line 2123 "src/html/html_unescape.gperf" - {"ZHcy", 2, {208, 150}}, - {(char*)0}, {(char*)0}, -#line 966 "src/html/html_unescape.gperf" - {"longleftarrow", 3, {226, 159, 181}}, - {(char*)0}, -#line 347 "src/html/html_unescape.gperf" - {"dash", 3, {226, 128, 144}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 438 "src/html/html_unescape.gperf" - {"DownTeeArrow", 3, {226, 134, 167}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1814 "src/html/html_unescape.gperf" - {"supsetneqq", 3, {226, 171, 140}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1458 "src/html/html_unescape.gperf" - {"profalar", 3, {226, 140, 174}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1312 "src/html/html_unescape.gperf" - {"oacute", 2, {195, 179}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 193 "src/html/html_unescape.gperf" - {"boxVR", 3, {226, 149, 160}}, - {(char*)0}, {(char*)0}, -#line 459 "src/html/html_unescape.gperf" - {"Eacute", 2, {195, 137}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1808 "src/html/html_unescape.gperf" - {"supplus", 3, {226, 171, 128}}, - {(char*)0}, -#line 695 "src/html/html_unescape.gperf" - {"hookleftarrow", 3, {226, 134, 169}}, - {(char*)0}, {(char*)0}, -#line 274 "src/html/html_unescape.gperf" - {"CloseCurlyQuote", 3, {226, 128, 153}}, - {(char*)0}, {(char*)0}, -#line 1888 "src/html/html_unescape.gperf" - {"trisb", 3, {226, 167, 141}}, -#line 406 "src/html/html_unescape.gperf" - {"dotsquare", 3, {226, 138, 161}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1624 "src/html/html_unescape.gperf" - {"rtimes", 3, {226, 139, 138}}, - {(char*)0}, -#line 1018 "src/html/html_unescape.gperf" - {"ltimes", 3, {226, 139, 137}}, - {(char*)0}, {(char*)0}, -#line 1865 "src/html/html_unescape.gperf" - {"toea", 3, {226, 164, 168}}, -#line 24 "src/html/html_unescape.gperf" - {"Agrave", 2, {195, 128}}, - {(char*)0}, {(char*)0}, -#line 76 "src/html/html_unescape.gperf" - {"Assign", 3, {226, 137, 148}}, -#line 1493 "src/html/html_unescape.gperf" - {"Rang", 3, {226, 159, 171}}, -#line 761 "src/html/html_unescape.gperf" - {"iocy", 2, {209, 145}}, - {(char*)0}, -#line 1208 "src/html/html_unescape.gperf" - {"NotPrecedesEqual", 3, {226, 170, 175}}, - {(char*)0}, -#line 62 "src/html/html_unescape.gperf" - {"aopf", 4, {240, 157, 149, 146}}, - {(char*)0}, -#line 252 "src/html/html_unescape.gperf" - {"chi", 2, {207, 135}}, - {(char*)0}, {(char*)0}, -#line 1480 "src/html/html_unescape.gperf" - {"quaternions", 3, {226, 132, 141}}, -#line 188 "src/html/html_unescape.gperf" - {"boxVl", 3, {226, 149, 162}}, -#line 1178 "src/html/html_unescape.gperf" - {"NotGreaterEqual", 3, {226, 137, 177}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 2067 "src/html/html_unescape.gperf" - {"xhArr", 3, {226, 159, 186}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1362 "src/html/html_unescape.gperf" - {"orderof", 3, {226, 132, 180}}, - {(char*)0}, {(char*)0}, -#line 1621 "src/html/html_unescape.gperf" - {"rsquo", 3, {226, 128, 153}}, - {(char*)0}, -#line 1007 "src/html/html_unescape.gperf" - {"lsquo", 3, {226, 128, 152}}, -#line 2104 "src/html/html_unescape.gperf" - {"yscr", 4, {240, 157, 147, 142}}, - {(char*)0}, {(char*)0}, -#line 604 "src/html/html_unescape.gperf" - {"gdot", 2, {196, 161}}, - {(char*)0}, -#line 1215 "src/html/html_unescape.gperf" - {"NotSquareSubsetEqual", 3, {226, 139, 162}}, -#line 810 "src/html/html_unescape.gperf" - {"KHcy", 2, {208, 165}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 203 "src/html/html_unescape.gperf" - {"bsolb", 3, {226, 167, 133}}, -#line 1214 "src/html/html_unescape.gperf" - {"NotSquareSubset", 3, {226, 138, 143}}, -#line 1673 "src/html/html_unescape.gperf" - {"SHcy", 2, {208, 168}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 2099 "src/html/html_unescape.gperf" - {"YIcy", 2, {208, 135}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 339 "src/html/html_unescape.gperf" - {"cwint", 3, {226, 136, 177}}, - {(char*)0}, {(char*)0}, -#line 1842 "src/html/html_unescape.gperf" - {"Theta", 2, {206, 152}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1843 "src/html/html_unescape.gperf" - {"theta", 2, {206, 184}}, -#line 2071 "src/html/html_unescape.gperf" - {"xlArr", 3, {226, 159, 184}}, - {(char*)0}, -#line 1217 "src/html/html_unescape.gperf" - {"NotSquareSupersetEqual", 3, {226, 139, 163}}, - {(char*)0}, {(char*)0}, -#line 366 "src/html/html_unescape.gperf" - {"demptyv", 3, {226, 166, 177}}, -#line 1876 "src/html/html_unescape.gperf" - {"triangle", 3, {226, 150, 181}}, - {(char*)0}, -#line 603 "src/html/html_unescape.gperf" - {"Gdot", 2, {196, 160}}, - {(char*)0}, -#line 1216 "src/html/html_unescape.gperf" - {"NotSquareSuperset", 3, {226, 138, 144}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 9 "src/html/html_unescape.gperf" - {"Abreve", 2, {196, 130}}, - {(char*)0}, {(char*)0}, -#line 449 "src/html/html_unescape.gperf" - {"dstrok", 2, {196, 145}}, -#line 1400 "src/html/html_unescape.gperf" - {"pertenk", 3, {226, 128, 177}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1522 "src/html/html_unescape.gperf" - {"rbrack", 1, {93}}, - {(char*)0}, -#line 852 "src/html/html_unescape.gperf" - {"lbrack", 1, {91}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1324 "src/html/html_unescape.gperf" - {"odsold", 3, {226, 166, 188}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1348 "src/html/html_unescape.gperf" - {"omid", 3, {226, 166, 182}}, - {(char*)0}, -#line 2080 "src/html/html_unescape.gperf" - {"xrArr", 3, {226, 159, 185}}, - {(char*)0}, -#line 1878 "src/html/html_unescape.gperf" - {"triangleleft", 3, {226, 151, 131}}, -#line 1183 "src/html/html_unescape.gperf" - {"NotGreaterTilde", 3, {226, 137, 181}}, -#line 280 "src/html/html_unescape.gperf" - {"colone", 3, {226, 137, 148}}, - {(char*)0}, -#line 968 "src/html/html_unescape.gperf" - {"Longleftarrow", 3, {226, 159, 184}}, - {(char*)0}, -#line 767 "src/html/html_unescape.gperf" - {"iota", 2, {206, 185}}, - {(char*)0}, -#line 277 "src/html/html_unescape.gperf" - {"colon", 1, {58}}, -#line 2119 "src/html/html_unescape.gperf" - {"Zeta", 2, {206, 150}}, -#line 597 "src/html/html_unescape.gperf" - {"gbreve", 2, {196, 159}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 247 "src/html/html_unescape.gperf" - {"CHcy", 2, {208, 167}}, - {(char*)0}, {(char*)0}, -#line 2105 "src/html/html_unescape.gperf" - {"YUcy", 2, {208, 174}}, -#line 1546 "src/html/html_unescape.gperf" - {"REG", 2, {194, 174}}, -#line 1823 "src/html/html_unescape.gperf" - {"szlig", 2, {195, 159}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 457 "src/html/html_unescape.gperf" - {"dzcy", 2, {209, 159}}, - {(char*)0}, -#line 111 "src/html/html_unescape.gperf" - {"beta", 2, {206, 178}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 539 "src/html/html_unescape.gperf" - {"euro", 3, {226, 130, 172}}, - {(char*)0}, {(char*)0}, -#line 875 "src/html/html_unescape.gperf" - {"LeftArrow", 3, {226, 134, 144}}, - {(char*)0}, {(char*)0}, -#line 222 "src/html/html_unescape.gperf" - {"CapitalDifferentialD", 3, {226, 133, 133}}, - {(char*)0}, -#line 1593 "src/html/html_unescape.gperf" - {"ring", 2, {203, 154}}, -#line 830 "src/html/html_unescape.gperf" - {"Laplacetrf", 3, {226, 132, 146}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 392 "src/html/html_unescape.gperf" - {"djcy", 2, {209, 146}}, - {(char*)0}, -#line 1356 "src/html/html_unescape.gperf" - {"oplus", 3, {226, 138, 149}}, - {(char*)0}, {(char*)0}, -#line 752 "src/html/html_unescape.gperf" - {"integers", 3, {226, 132, 164}}, -#line 596 "src/html/html_unescape.gperf" - {"Gbreve", 2, {196, 158}}, - {(char*)0}, -#line 1909 "src/html/html_unescape.gperf" - {"ubrcy", 2, {209, 158}}, -#line 538 "src/html/html_unescape.gperf" - {"euml", 2, {195, 171}}, - {(char*)0}, {(char*)0}, -#line 362 "src/html/html_unescape.gperf" - {"deg", 2, {194, 176}}, - {(char*)0}, -#line 1983 "src/html/html_unescape.gperf" - {"uuml", 2, {195, 188}}, - {(char*)0}, {(char*)0}, -#line 710 "src/html/html_unescape.gperf" - {"Iacute", 2, {195, 141}}, -#line 1781 "src/html/html_unescape.gperf" - {"succeq", 3, {226, 170, 176}}, - {(char*)0}, -#line 812 "src/html/html_unescape.gperf" - {"KJcy", 2, {208, 140}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 320 "src/html/html_unescape.gperf" - {"CupCap", 3, {226, 137, 141}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1894 "src/html/html_unescape.gperf" - {"tscy", 2, {209, 134}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 242 "src/html/html_unescape.gperf" - {"cent", 2, {194, 162}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 391 "src/html/html_unescape.gperf" - {"DJcy", 2, {208, 130}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1858 "src/html/html_unescape.gperf" - {"TildeFullEqual", 3, {226, 137, 133}}, - {(char*)0}, -#line 1880 "src/html/html_unescape.gperf" - {"triangleq", 3, {226, 137, 156}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 454 "src/html/html_unescape.gperf" - {"duhar", 3, {226, 165, 175}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 880 "src/html/html_unescape.gperf" - {"LeftDoubleBracket", 3, {226, 159, 166}}, - {(char*)0}, -#line 943 "src/html/html_unescape.gperf" - {"LJcy", 2, {208, 137}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 719 "src/html/html_unescape.gperf" - {"iecy", 2, {208, 181}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1879 "src/html/html_unescape.gperf" - {"trianglelefteq", 3, {226, 138, 180}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1111 "src/html/html_unescape.gperf" - {"nequiv", 3, {226, 137, 162}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1255 "src/html/html_unescape.gperf" - {"nshortparallel", 3, {226, 136, 166}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1100 "src/html/html_unescape.gperf" - {"ndash", 3, {226, 128, 147}}, -#line 149 "src/html/html_unescape.gperf" - {"bowtie", 3, {226, 139, 136}}, - {(char*)0}, -#line 558 "src/html/html_unescape.gperf" - {"fjlig", 1, {102}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1908 "src/html/html_unescape.gperf" - {"Ubrcy", 2, {208, 142}}, - {(char*)0}, -#line 2000 "src/html/html_unescape.gperf" - {"vartheta", 2, {207, 145}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1982 "src/html/html_unescape.gperf" - {"Uuml", 2, {195, 156}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 2002 "src/html/html_unescape.gperf" - {"vartriangleright", 3, {226, 138, 179}}, -#line 2001 "src/html/html_unescape.gperf" - {"vartriangleleft", 3, {226, 138, 178}}, -#line 75 "src/html/html_unescape.gperf" - {"ascr", 4, {240, 157, 146, 182}}, - {(char*)0}, {(char*)0}, -#line 1776 "src/html/html_unescape.gperf" - {"succcurlyeq", 3, {226, 137, 189}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 338 "src/html/html_unescape.gperf" - {"cwconint", 3, {226, 136, 178}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1639 "src/html/html_unescape.gperf" - {"sc", 3, {226, 137, 187}}, - {(char*)0}, -#line 560 "src/html/html_unescape.gperf" - {"fllig", 3, {239, 172, 130}}, - {(char*)0}, -#line 257 "src/html/html_unescape.gperf" - {"circledast", 3, {226, 138, 155}}, - {(char*)0}, {(char*)0}, -#line 2010 "src/html/html_unescape.gperf" - {"Vdash", 3, {226, 138, 169}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1293 "src/html/html_unescape.gperf" - {"nVdash", 3, {226, 138, 174}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1804 "src/html/html_unescape.gperf" - {"suplarr", 3, {226, 165, 187}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1603 "src/html/html_unescape.gperf" - {"robrk", 3, {226, 159, 167}}, - {(char*)0}, -#line 965 "src/html/html_unescape.gperf" - {"lobrk", 3, {226, 159, 166}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 2008 "src/html/html_unescape.gperf" - {"vdash", 3, {226, 138, 162}}, -#line 2108 "src/html/html_unescape.gperf" - {"Yuml", 2, {197, 184}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 655 "src/html/html_unescape.gperf" - {"gt", 1, {62}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 227 "src/html/html_unescape.gperf" - {"ccaps", 3, {226, 169, 141}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1777 "src/html/html_unescape.gperf" - {"Succeeds", 3, {226, 137, 187}}, -#line 1311 "src/html/html_unescape.gperf" - {"Oacute", 2, {195, 147}}, -#line 1875 "src/html/html_unescape.gperf" - {"TRADE", 3, {226, 132, 162}}, -#line 1140 "src/html/html_unescape.gperf" - {"NJcy", 2, {208, 138}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 658 "src/html/html_unescape.gperf" - {"gtdot", 3, {226, 139, 151}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 2098 "src/html/html_unescape.gperf" - {"yfr", 4, {240, 157, 148, 182}}, - {(char*)0}, {(char*)0}, -#line 285 "src/html/html_unescape.gperf" - {"compfn", 3, {226, 136, 152}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 657 "src/html/html_unescape.gperf" - {"Gt", 3, {226, 137, 171}}, -#line 1648 "src/html/html_unescape.gperf" - {"scnE", 3, {226, 170, 182}}, -#line 732 "src/html/html_unescape.gperf" - {"ijlig", 2, {196, 179}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 262 "src/html/html_unescape.gperf" - {"circledS", 3, {226, 147, 136}}, - {(char*)0}, {(char*)0}, -#line 2096 "src/html/html_unescape.gperf" - {"yen", 2, {194, 165}}, - {(char*)0}, -#line 1844 "src/html/html_unescape.gperf" - {"thetasym", 2, {207, 145}}, - {(char*)0}, {(char*)0}, -#line 784 "src/html/html_unescape.gperf" - {"iuml", 2, {195, 175}}, -#line 1779 "src/html/html_unescape.gperf" - {"SucceedsSlantEqual", 3, {226, 137, 189}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 160 "src/html/html_unescape.gperf" - {"boxH", 3, {226, 149, 144}}, -#line 1074 "src/html/html_unescape.gperf" - {"mumap", 3, {226, 138, 184}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1578 "src/html/html_unescape.gperf" - {"rightrightarrows", 3, {226, 135, 137}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 281 "src/html/html_unescape.gperf" - {"coloneq", 3, {226, 137, 148}}, - {(char*)0}, -#line 1638 "src/html/html_unescape.gperf" - {"Sc", 3, {226, 170, 188}}, -#line 630 "src/html/html_unescape.gperf" - {"glj", 3, {226, 170, 164}}, -#line 720 "src/html/html_unescape.gperf" - {"iexcl", 2, {194, 161}}, - {(char*)0}, {(char*)0}, -#line 235 "src/html/html_unescape.gperf" - {"ccups", 3, {226, 169, 140}}, - {(char*)0}, -#line 2060 "src/html/html_unescape.gperf" - {"xcap", 3, {226, 139, 130}}, -#line 2124 "src/html/html_unescape.gperf" - {"zhcy", 2, {208, 182}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 164 "src/html/html_unescape.gperf" - {"boxHD", 3, {226, 149, 166}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 912 "src/html/html_unescape.gperf" - {"leqslant", 3, {226, 169, 189}}, - {(char*)0}, -#line 1958 "src/html/html_unescape.gperf" - {"UpperLeftArrow", 3, {226, 134, 150}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 351 "src/html/html_unescape.gperf" - {"dblac", 2, {203, 157}}, - {(char*)0}, {(char*)0}, -#line 1471 "src/html/html_unescape.gperf" - {"puncsp", 3, {226, 128, 136}}, - {(char*)0}, -#line 229 "src/html/html_unescape.gperf" - {"ccaron", 2, {196, 141}}, - {(char*)0}, -#line 1520 "src/html/html_unescape.gperf" - {"rbbrk", 3, {226, 157, 179}}, - {(char*)0}, -#line 850 "src/html/html_unescape.gperf" - {"lbbrk", 3, {226, 157, 178}}, - {(char*)0}, -#line 59 "src/html/html_unescape.gperf" - {"Aogon", 2, {196, 132}}, -#line 899 "src/html/html_unescape.gperf" - {"LeftTriangleBar", 3, {226, 167, 143}}, - {(char*)0}, {(char*)0}, -#line 616 "src/html/html_unescape.gperf" - {"gesdotol", 3, {226, 170, 132}}, -#line 901 "src/html/html_unescape.gperf" - {"LeftTriangleEqual", 3, {226, 138, 180}}, -#line 900 "src/html/html_unescape.gperf" - {"LeftTriangle", 3, {226, 138, 178}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 291 "src/html/html_unescape.gperf" - {"conint", 3, {226, 136, 174}}, - {(char*)0}, {(char*)0}, -#line 440 "src/html/html_unescape.gperf" - {"drbkarow", 3, {226, 164, 144}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1627 "src/html/html_unescape.gperf" - {"rtrif", 3, {226, 150, 184}}, - {(char*)0}, -#line 1023 "src/html/html_unescape.gperf" - {"ltrif", 3, {226, 151, 130}}, - {(char*)0}, {(char*)0}, -#line 1549 "src/html/html_unescape.gperf" - {"ReverseUpEquilibrium", 3, {226, 165, 175}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 879 "src/html/html_unescape.gperf" - {"LeftCeiling", 3, {226, 140, 136}}, - {(char*)0}, -#line 1980 "src/html/html_unescape.gperf" - {"utrif", 3, {226, 150, 180}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 2062 "src/html/html_unescape.gperf" - {"xcup", 3, {226, 139, 131}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 546 "src/html/html_unescape.gperf" - {"fallingdotseq", 3, {226, 137, 146}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1529 "src/html/html_unescape.gperf" - {"rcedil", 2, {197, 151}}, - {(char*)0}, -#line 859 "src/html/html_unescape.gperf" - {"lcedil", 2, {196, 188}}, - {(char*)0}, -#line 1644 "src/html/html_unescape.gperf" - {"scedil", 2, {197, 159}}, - {(char*)0}, -#line 1831 "src/html/html_unescape.gperf" - {"Tcedil", 2, {197, 162}}, - {(char*)0}, -#line 1749 "src/html/html_unescape.gperf" - {"starf", 3, {226, 152, 133}}, -#line 169 "src/html/html_unescape.gperf" - {"boxminus", 3, {226, 138, 159}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1832 "src/html/html_unescape.gperf" - {"tcedil", 2, {197, 163}}, -#line 2118 "src/html/html_unescape.gperf" - {"ZeroWidthSpace", 3, {226, 128, 139}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1094 "src/html/html_unescape.gperf" - {"ncedil", 2, {197, 134}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1405 "src/html/html_unescape.gperf" - {"phiv", 2, {207, 149}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 712 "src/html/html_unescape.gperf" - {"ic", 3, {226, 129, 163}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 221 "src/html/html_unescape.gperf" - {"capdot", 3, {226, 169, 128}}, - {(char*)0}, {(char*)0}, -#line 446 "src/html/html_unescape.gperf" - {"dscy", 2, {209, 149}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 249 "src/html/html_unescape.gperf" - {"check", 3, {226, 156, 147}}, -#line 1382 "src/html/html_unescape.gperf" - {"ovbar", 3, {226, 140, 189}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1281 "src/html/html_unescape.gperf" - {"ntriangleleft", 3, {226, 139, 170}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1581 "src/html/html_unescape.gperf" - {"RightTee", 3, {226, 138, 162}}, -#line 1295 "src/html/html_unescape.gperf" - {"nvge", 3, {226, 137, 165}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 893 "src/html/html_unescape.gperf" - {"leftrightsquigarrow", 3, {226, 134, 173}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 988 "src/html/html_unescape.gperf" - {"lozenge", 3, {226, 151, 138}}, - {(char*)0}, {(char*)0}, -#line 1584 "src/html/html_unescape.gperf" - {"RightTriangleBar", 3, {226, 167, 144}}, - {(char*)0}, -#line 1582 "src/html/html_unescape.gperf" - {"RightTeeVector", 3, {226, 165, 155}}, - {(char*)0}, -#line 1586 "src/html/html_unescape.gperf" - {"RightTriangleEqual", 3, {226, 138, 181}}, -#line 1585 "src/html/html_unescape.gperf" - {"RightTriangle", 3, {226, 138, 179}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 803 "src/html/html_unescape.gperf" - {"Kcedil", 2, {196, 182}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1643 "src/html/html_unescape.gperf" - {"Scedil", 2, {197, 158}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 269 "src/html/html_unescape.gperf" - {"cirfnint", 3, {226, 168, 144}}, - {(char*)0}, {(char*)0}, -#line 491 "src/html/html_unescape.gperf" - {"empty", 3, {226, 136, 133}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 23 "src/html/html_unescape.gperf" - {"afr", 4, {240, 157, 148, 158}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 377 "src/html/html_unescape.gperf" - {"DiacriticalTilde", 2, {203, 156}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 883 "src/html/html_unescape.gperf" - {"LeftDownVector", 3, {226, 135, 131}}, - {(char*)0}, {(char*)0}, -#line 882 "src/html/html_unescape.gperf" - {"LeftDownVectorBar", 3, {226, 165, 153}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 908 "src/html/html_unescape.gperf" - {"lEg", 3, {226, 170, 139}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 69 "src/html/html_unescape.gperf" - {"ApplyFunction", 3, {226, 129, 161}}, - {(char*)0}, {(char*)0}, -#line 209 "src/html/html_unescape.gperf" - {"bumpE", 3, {226, 170, 174}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 858 "src/html/html_unescape.gperf" - {"Lcedil", 2, {196, 187}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 224 "src/html/html_unescape.gperf" - {"caret", 3, {226, 129, 129}}, - {(char*)0}, -#line 92 "src/html/html_unescape.gperf" - {"Barv", 3, {226, 171, 167}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 230 "src/html/html_unescape.gperf" - {"Ccedil", 2, {195, 135}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 261 "src/html/html_unescape.gperf" - {"circledR", 2, {194, 174}}, -#line 881 "src/html/html_unescape.gperf" - {"LeftDownTeeVector", 3, {226, 165, 161}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1896 "src/html/html_unescape.gperf" - {"tshcy", 2, {209, 155}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 403 "src/html/html_unescape.gperf" - {"DotEqual", 3, {226, 137, 144}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 243 "src/html/html_unescape.gperf" - {"centerdot", 2, {194, 183}}, - {(char*)0}, -#line 1282 "src/html/html_unescape.gperf" - {"ntrianglelefteq", 3, {226, 139, 172}}, - {(char*)0}, -#line 1057 "src/html/html_unescape.gperf" - {"minus", 3, {226, 136, 146}}, - {(char*)0}, -#line 624 "src/html/html_unescape.gperf" - {"gimel", 3, {226, 132, 183}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 7 "src/html/html_unescape.gperf" - {"Aacute", 2, {195, 129}}, -#line 654 "src/html/html_unescape.gperf" - {"gtcir", 3, {226, 169, 186}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 662 "src/html/html_unescape.gperf" - {"gtrarr", 3, {226, 165, 184}}, -#line 206 "src/html/html_unescape.gperf" - {"bull", 3, {226, 128, 162}}, - {(char*)0}, {(char*)0}, -#line 424 "src/html/html_unescape.gperf" - {"DownArrow", 3, {226, 134, 147}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1537 "src/html/html_unescape.gperf" - {"rdquor", 3, {226, 128, 157}}, - {(char*)0}, -#line 866 "src/html/html_unescape.gperf" - {"ldquor", 3, {226, 128, 158}}, - {(char*)0}, {(char*)0}, -#line 756 "src/html/html_unescape.gperf" - {"intlarhk", 3, {226, 168, 151}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1978 "src/html/html_unescape.gperf" - {"utilde", 2, {197, 169}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 590 "src/html/html_unescape.gperf" - {"gacute", 2, {199, 181}}, - {(char*)0}, -#line 1279 "src/html/html_unescape.gperf" - {"ntilde", 2, {195, 177}}, -#line 21 "src/html/html_unescape.gperf" - {"af", 3, {226, 129, 161}}, - {(char*)0}, {(char*)0}, -#line 704 "src/html/html_unescape.gperf" - {"Hstrok", 2, {196, 166}}, - {(char*)0}, -#line 544 "src/html/html_unescape.gperf" - {"exponentiale", 3, {226, 133, 135}}, -#line 1056 "src/html/html_unescape.gperf" - {"minusb", 3, {226, 138, 159}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1588 "src/html/html_unescape.gperf" - {"RightUpTeeVector", 3, {226, 165, 156}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1965 "src/html/html_unescape.gperf" - {"UpTeeArrow", 3, {226, 134, 165}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 2120 "src/html/html_unescape.gperf" - {"zeta", 2, {206, 182}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 374 "src/html/html_unescape.gperf" - {"DiacriticalDot", 2, {203, 153}}, -#line 375 "src/html/html_unescape.gperf" - {"DiacriticalDoubleAcute", 2, {203, 157}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1147 "src/html/html_unescape.gperf" - {"nleftarrow", 3, {226, 134, 154}}, -#line 692 "src/html/html_unescape.gperf" - {"hkswarow", 3, {226, 164, 166}}, - {(char*)0}, -#line 730 "src/html/html_unescape.gperf" - {"iiota", 3, {226, 132, 169}}, - {(char*)0}, {(char*)0}, -#line 63 "src/html/html_unescape.gperf" - {"apacir", 3, {226, 169, 175}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1093 "src/html/html_unescape.gperf" - {"Ncedil", 2, {197, 133}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 215 "src/html/html_unescape.gperf" - {"capand", 3, {226, 169, 132}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1043 "src/html/html_unescape.gperf" - {"mdash", 3, {226, 128, 148}}, - {(char*)0}, {(char*)0}, -#line 555 "src/html/html_unescape.gperf" - {"filig", 3, {239, 172, 129}}, -#line 1649 "src/html/html_unescape.gperf" - {"scnsim", 3, {226, 139, 169}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1541 "src/html/html_unescape.gperf" - {"realpart", 3, {226, 132, 156}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 898 "src/html/html_unescape.gperf" - {"leftthreetimes", 3, {226, 139, 139}}, -#line 78 "src/html/html_unescape.gperf" - {"asymp", 3, {226, 137, 136}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 686 "src/html/html_unescape.gperf" - {"hellip", 3, {226, 128, 166}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 452 "src/html/html_unescape.gperf" - {"dtrif", 3, {226, 150, 190}}, - {(char*)0}, -#line 1176 "src/html/html_unescape.gperf" - {"NotExists", 3, {226, 136, 132}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1640 "src/html/html_unescape.gperf" - {"sccue", 3, {226, 137, 189}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 2090 "src/html/html_unescape.gperf" - {"YAcy", 2, {208, 175}}, -#line 1977 "src/html/html_unescape.gperf" - {"Utilde", 2, {197, 168}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1174 "src/html/html_unescape.gperf" - {"NotEqual", 3, {226, 137, 160}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1849 "src/html/html_unescape.gperf" - {"ThinSpace", 3, {226, 128, 137}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 65 "src/html/html_unescape.gperf" - {"apE", 3, {226, 169, 176}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 207 "src/html/html_unescape.gperf" - {"bullet", 3, {226, 128, 162}}, - {(char*)0}, {(char*)0}, -#line 273 "src/html/html_unescape.gperf" - {"CloseCurlyDoubleQuote", 3, {226, 128, 157}}, -#line 364 "src/html/html_unescape.gperf" - {"Delta", 2, {206, 148}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 621 "src/html/html_unescape.gperf" - {"gg", 3, {226, 137, 171}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1379 "src/html/html_unescape.gperf" - {"otimes", 3, {226, 138, 151}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 2057 "src/html/html_unescape.gperf" - {"wreath", 3, {226, 137, 128}}, - {(char*)0}, -#line 1528 "src/html/html_unescape.gperf" - {"Rcedil", 2, {197, 150}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 536 "src/html/html_unescape.gperf" - {"eth", 2, {195, 176}}, -#line 1806 "src/html/html_unescape.gperf" - {"supnE", 3, {226, 171, 140}}, - {(char*)0}, {(char*)0}, -#line 85 "src/html/html_unescape.gperf" - {"awint", 3, {226, 168, 145}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 196 "src/html/html_unescape.gperf" - {"Breve", 2, {203, 152}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 622 "src/html/html_unescape.gperf" - {"Gg", 3, {226, 139, 153}}, - {(char*)0}, -#line 707 "src/html/html_unescape.gperf" - {"HumpEqual", 3, {226, 137, 143}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 949 "src/html/html_unescape.gperf" - {"Lleftarrow", 3, {226, 135, 154}}, -#line 155 "src/html/html_unescape.gperf" - {"boxdr", 3, {226, 148, 140}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1783 "src/html/html_unescape.gperf" - {"succneqq", 3, {226, 170, 182}}, -#line 1972 "src/html/html_unescape.gperf" - {"uring", 2, {197, 175}}, -#line 930 "src/html/html_unescape.gperf" - {"LessSlantEqual", 3, {226, 169, 189}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1291 "src/html/html_unescape.gperf" - {"nvdash", 3, {226, 138, 172}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 670 "src/html/html_unescape.gperf" - {"Hacek", 2, {203, 135}}, -#line 780 "src/html/html_unescape.gperf" - {"itilde", 2, {196, 169}}, - {(char*)0}, {(char*)0}, -#line 766 "src/html/html_unescape.gperf" - {"Iota", 2, {206, 153}}, - {(char*)0}, -#line 760 "src/html/html_unescape.gperf" - {"IOcy", 2, {208, 129}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 157 "src/html/html_unescape.gperf" - {"boxDr", 3, {226, 149, 147}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1780 "src/html/html_unescape.gperf" - {"SucceedsTilde", 3, {226, 137, 191}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 884 "src/html/html_unescape.gperf" - {"LeftFloor", 3, {226, 140, 138}}, -#line 2042 "src/html/html_unescape.gperf" - {"Vvdash", 3, {226, 138, 170}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1877 "src/html/html_unescape.gperf" - {"triangledown", 3, {226, 150, 191}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 970 "src/html/html_unescape.gperf" - {"LongLeftRightArrow", 3, {226, 159, 183}}, -#line 1573 "src/html/html_unescape.gperf" - {"RightFloor", 3, {226, 140, 139}}, - {(char*)0}, {(char*)0}, -#line 435 "src/html/html_unescape.gperf" - {"DownRightTeeVector", 3, {226, 165, 159}}, - {(char*)0}, -#line 1481 "src/html/html_unescape.gperf" - {"quatint", 3, {226, 168, 150}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1278 "src/html/html_unescape.gperf" - {"Ntilde", 2, {195, 145}}, - {(char*)0}, {(char*)0}, -#line 211 "src/html/html_unescape.gperf" - {"Bumpeq", 3, {226, 137, 142}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 669 "src/html/html_unescape.gperf" - {"gvnE", 3, {226, 137, 169}}, - {(char*)0}, -#line 165 "src/html/html_unescape.gperf" - {"boxhu", 3, {226, 148, 180}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 659 "src/html/html_unescape.gperf" - {"gtlPar", 3, {226, 166, 149}}, - {(char*)0}, {(char*)0}, -#line 1238 "src/html/html_unescape.gperf" - {"nprec", 3, {226, 138, 128}}, - {(char*)0}, {(char*)0}, -#line 1381 "src/html/html_unescape.gperf" - {"ouml", 2, {195, 182}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 612 "src/html/html_unescape.gperf" - {"gescc", 3, {226, 170, 169}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 537 "src/html/html_unescape.gperf" - {"Euml", 2, {195, 139}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1971 "src/html/html_unescape.gperf" - {"Uring", 2, {197, 174}}, - {(char*)0}, -#line 1938 "src/html/html_unescape.gperf" - {"UnderBracket", 3, {226, 142, 181}}, -#line 1162 "src/html/html_unescape.gperf" - {"nLtv", 3, {226, 137, 170}}, -#line 873 "src/html/html_unescape.gperf" - {"LeftArrowBar", 3, {226, 135, 164}}, -#line 1096 "src/html/html_unescape.gperf" - {"ncongdot", 3, {226, 169, 173}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 79 "src/html/html_unescape.gperf" - {"asympeq", 3, {226, 137, 141}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1059 "src/html/html_unescape.gperf" - {"minusdu", 3, {226, 168, 170}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 365 "src/html/html_unescape.gperf" - {"delta", 2, {206, 180}}, - {(char*)0}, -#line 679 "src/html/html_unescape.gperf" - {"harrw", 3, {226, 134, 173}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 39 "src/html/html_unescape.gperf" - {"andslope", 3, {226, 169, 152}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 238 "src/html/html_unescape.gperf" - {"cdot", 2, {196, 139}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 226 "src/html/html_unescape.gperf" - {"Cayleys", 3, {226, 132, 173}}, -#line 167 "src/html/html_unescape.gperf" - {"boxhU", 3, {226, 149, 168}}, - {(char*)0}, {(char*)0}, -#line 1785 "src/html/html_unescape.gperf" - {"succsim", 3, {226, 137, 191}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 267 "src/html/html_unescape.gperf" - {"cirE", 3, {226, 167, 131}}, -#line 1654 "src/html/html_unescape.gperf" - {"sdotb", 3, {226, 138, 161}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1319 "src/html/html_unescape.gperf" - {"odash", 3, {226, 138, 157}}, -#line 270 "src/html/html_unescape.gperf" - {"cirmid", 3, {226, 171, 175}}, -#line 1803 "src/html/html_unescape.gperf" - {"suphsub", 3, {226, 171, 151}}, -#line 1796 "src/html/html_unescape.gperf" - {"supdsub", 3, {226, 171, 152}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1795 "src/html/html_unescape.gperf" - {"supdot", 3, {226, 170, 190}}, - {(char*)0}, -#line 84 "src/html/html_unescape.gperf" - {"awconint", 3, {226, 136, 179}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1895 "src/html/html_unescape.gperf" - {"TSHcy", 2, {208, 139}}, - {(char*)0}, {(char*)0}, -#line 640 "src/html/html_unescape.gperf" - {"grave", 1, {96}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1005 "src/html/html_unescape.gperf" - {"lsimg", 3, {226, 170, 143}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1950 "src/html/html_unescape.gperf" - {"UpArrowDownArrow", 3, {226, 135, 133}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 907 "src/html/html_unescape.gperf" - {"LeftVector", 3, {226, 134, 188}}, -#line 417 "src/html/html_unescape.gperf" - {"DoubleRightArrow", 3, {226, 135, 146}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1109 "src/html/html_unescape.gperf" - {"NegativeThinSpace", 3, {226, 128, 139}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 942 "src/html/html_unescape.gperf" - {"lhblk", 3, {226, 150, 132}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 268 "src/html/html_unescape.gperf" - {"cire", 3, {226, 137, 151}}, -#line 1294 "src/html/html_unescape.gperf" - {"nVDash", 3, {226, 138, 175}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1928 "src/html/html_unescape.gperf" - {"uhblk", 3, {226, 150, 128}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 738 "src/html/html_unescape.gperf" - {"imagpart", 3, {226, 132, 145}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1587 "src/html/html_unescape.gperf" - {"RightUpDownVector", 3, {226, 165, 143}}, - {(char*)0}, {(char*)0}, -#line 152 "src/html/html_unescape.gperf" - {"boxdL", 3, {226, 149, 149}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 627 "src/html/html_unescape.gperf" - {"gla", 3, {226, 170, 165}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 783 "src/html/html_unescape.gperf" - {"Iuml", 2, {195, 143}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1326 "src/html/html_unescape.gperf" - {"oelig", 2, {197, 147}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1199 "src/html/html_unescape.gperf" - {"NotLessSlantEqual", 3, {226, 169, 189}}, - {(char*)0}, -#line 154 "src/html/html_unescape.gperf" - {"boxDL", 3, {226, 149, 151}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 592 "src/html/html_unescape.gperf" - {"gamma", 2, {206, 179}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1378 "src/html/html_unescape.gperf" - {"Otimes", 3, {226, 168, 183}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 969 "src/html/html_unescape.gperf" - {"longleftrightarrow", 3, {226, 159, 183}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 591 "src/html/html_unescape.gperf" - {"Gamma", 2, {206, 147}}, -#line 128 "src/html/html_unescape.gperf" - {"bigwedge", 3, {226, 139, 128}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 161 "src/html/html_unescape.gperf" - {"boxhd", 3, {226, 148, 172}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1797 "src/html/html_unescape.gperf" - {"supE", 3, {226, 171, 134}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 903 "src/html/html_unescape.gperf" - {"LeftUpTeeVector", 3, {226, 165, 160}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 615 "src/html/html_unescape.gperf" - {"gesdoto", 3, {226, 170, 130}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 801 "src/html/html_unescape.gperf" - {"kappa", 2, {206, 186}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1125 "src/html/html_unescape.gperf" - {"ngeqslant", 3, {226, 169, 190}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 666 "src/html/html_unescape.gperf" - {"gtrless", 3, {226, 137, 183}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 551 "src/html/html_unescape.gperf" - {"fflig", 3, {239, 172, 128}}, -#line 122 "src/html/html_unescape.gperf" - {"bigsqcup", 3, {226, 168, 134}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 809 "src/html/html_unescape.gperf" - {"kgreen", 2, {196, 184}}, -#line 1798 "src/html/html_unescape.gperf" - {"supe", 3, {226, 138, 135}}, - {(char*)0}, -#line 171 "src/html/html_unescape.gperf" - {"boxtimes", 3, {226, 138, 160}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 632 "src/html/html_unescape.gperf" - {"gnapprox", 3, {226, 170, 138}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 428 "src/html/html_unescape.gperf" - {"downdownarrows", 3, {226, 135, 138}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 126 "src/html/html_unescape.gperf" - {"biguplus", 3, {226, 168, 132}}, -#line 811 "src/html/html_unescape.gperf" - {"khcy", 2, {209, 133}}, - {(char*)0}, -#line 356 "src/html/html_unescape.gperf" - {"ddagger", 3, {226, 128, 161}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1380 "src/html/html_unescape.gperf" - {"Ouml", 2, {195, 150}}, - {(char*)0}, -#line 110 "src/html/html_unescape.gperf" - {"Beta", 2, {206, 146}}, -#line 1058 "src/html/html_unescape.gperf" - {"minusd", 3, {226, 136, 184}}, -#line 1784 "src/html/html_unescape.gperf" - {"succnsim", 3, {226, 139, 169}}, - {(char*)0}, -#line 311 "src/html/html_unescape.gperf" - {"ctdot", 3, {226, 139, 175}}, - {(char*)0}, {(char*)0}, -#line 813 "src/html/html_unescape.gperf" - {"kjcy", 2, {209, 156}}, -#line 626 "src/html/html_unescape.gperf" - {"gjcy", 2, {209, 147}}, - {(char*)0}, -#line 1095 "src/html/html_unescape.gperf" - {"ncong", 3, {226, 137, 135}}, -#line 2086 "src/html/html_unescape.gperf" - {"xvee", 3, {226, 139, 129}}, -#line 99 "src/html/html_unescape.gperf" - {"bcong", 3, {226, 137, 140}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1723 "src/html/html_unescape.gperf" - {"sqsube", 3, {226, 138, 145}}, - {(char*)0}, {(char*)0}, -#line 156 "src/html/html_unescape.gperf" - {"boxdR", 3, {226, 149, 146}}, - {(char*)0}, {(char*)0}, -#line 971 "src/html/html_unescape.gperf" - {"Longleftrightarrow", 3, {226, 159, 186}}, - {(char*)0}, -#line 1722 "src/html/html_unescape.gperf" - {"sqsub", 3, {226, 138, 143}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 431 "src/html/html_unescape.gperf" - {"DownLeftRightVector", 3, {226, 165, 144}}, - {(char*)0}, {(char*)0}, -#line 1724 "src/html/html_unescape.gperf" - {"sqsubset", 3, {226, 138, 143}}, - {(char*)0}, -#line 1230 "src/html/html_unescape.gperf" - {"NotVerticalBar", 3, {226, 136, 164}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1175 "src/html/html_unescape.gperf" - {"NotEqualTilde", 3, {226, 137, 130}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 151 "src/html/html_unescape.gperf" - {"boxdl", 3, {226, 148, 144}}, - {(char*)0}, {(char*)0}, -#line 158 "src/html/html_unescape.gperf" - {"boxDR", 3, {226, 149, 148}}, - {(char*)0}, -#line 35 "src/html/html_unescape.gperf" - {"andand", 3, {226, 169, 149}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1592 "src/html/html_unescape.gperf" - {"RightVector", 3, {226, 135, 128}}, - {(char*)0}, -#line 731 "src/html/html_unescape.gperf" - {"IJlig", 2, {196, 178}}, -#line 1227 "src/html/html_unescape.gperf" - {"NotTildeEqual", 3, {226, 137, 132}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 58 "src/html/html_unescape.gperf" - {"angzarr", 3, {226, 141, 188}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 53 "src/html/html_unescape.gperf" - {"angrt", 3, {226, 136, 159}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 12 "src/html/html_unescape.gperf" - {"acd", 3, {226, 136, 191}}, - {(char*)0}, {(char*)0}, -#line 38 "src/html/html_unescape.gperf" - {"andd", 3, {226, 169, 156}}, - {(char*)0}, -#line 1241 "src/html/html_unescape.gperf" - {"nrarrc", 3, {226, 164, 179}}, -#line 2026 "src/html/html_unescape.gperf" - {"VeryThinSpace", 3, {226, 128, 138}}, - {(char*)0}, -#line 1800 "src/html/html_unescape.gperf" - {"Superset", 3, {226, 138, 131}}, - {(char*)0}, -#line 153 "src/html/html_unescape.gperf" - {"boxDl", 3, {226, 149, 150}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 2030 "src/html/html_unescape.gperf" - {"vnsub", 3, {226, 138, 130}}, - {(char*)0}, {(char*)0}, -#line 236 "src/html/html_unescape.gperf" - {"ccupssm", 3, {226, 169, 144}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1988 "src/html/html_unescape.gperf" - {"varnothing", 3, {226, 136, 133}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1533 "src/html/html_unescape.gperf" - {"rcy", 2, {209, 128}}, - {(char*)0}, -#line 863 "src/html/html_unescape.gperf" - {"lcy", 2, {208, 187}}, - {(char*)0}, -#line 1653 "src/html/html_unescape.gperf" - {"scy", 2, {209, 129}}, - {(char*)0}, -#line 1833 "src/html/html_unescape.gperf" - {"Tcy", 2, {208, 162}}, -#line 2113 "src/html/html_unescape.gperf" - {"Zcy", 2, {208, 151}}, -#line 469 "src/html/html_unescape.gperf" - {"ecy", 2, {209, 141}}, -#line 1538 "src/html/html_unescape.gperf" - {"rdsh", 3, {226, 134, 179}}, - {(char*)0}, -#line 869 "src/html/html_unescape.gperf" - {"ldsh", 3, {226, 134, 178}}, - {(char*)0}, -#line 1915 "src/html/html_unescape.gperf" - {"ucy", 2, {209, 131}}, -#line 185 "src/html/html_unescape.gperf" - {"boxVH", 3, {226, 149, 172}}, -#line 1834 "src/html/html_unescape.gperf" - {"tcy", 2, {209, 130}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1099 "src/html/html_unescape.gperf" - {"ncy", 2, {208, 189}}, - {(char*)0}, -#line 101 "src/html/html_unescape.gperf" - {"bcy", 2, {208, 177}}, -#line 1277 "src/html/html_unescape.gperf" - {"ntgl", 3, {226, 137, 185}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 787 "src/html/html_unescape.gperf" - {"Jcy", 2, {208, 153}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 289 "src/html/html_unescape.gperf" - {"congdot", 3, {226, 169, 173}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 57 "src/html/html_unescape.gperf" - {"angst", 2, {195, 133}}, - {(char*)0}, -#line 1570 "src/html/html_unescape.gperf" - {"RightDownTeeVector", 3, {226, 165, 157}}, - {(char*)0}, {(char*)0}, -#line 1386 "src/html/html_unescape.gperf" - {"OverParenthesis", 3, {226, 143, 156}}, -#line 1020 "src/html/html_unescape.gperf" - {"ltquest", 3, {226, 169, 187}}, - {(char*)0}, -#line 1395 "src/html/html_unescape.gperf" - {"pcy", 2, {208, 191}}, - {(char*)0}, {(char*)0}, -#line 1376 "src/html/html_unescape.gperf" - {"otilde", 2, {195, 181}}, -#line 1536 "src/html/html_unescape.gperf" - {"rdquo", 3, {226, 128, 157}}, - {(char*)0}, -#line 865 "src/html/html_unescape.gperf" - {"ldquo", 3, {226, 128, 156}}, - {(char*)0}, -#line 2006 "src/html/html_unescape.gperf" - {"Vcy", 2, {208, 146}}, - {(char*)0}, {(char*)0}, -#line 216 "src/html/html_unescape.gperf" - {"capbrcup", 3, {226, 169, 137}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 102 "src/html/html_unescape.gperf" - {"bdquo", 3, {226, 128, 158}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 422 "src/html/html_unescape.gperf" - {"DownArrowBar", 3, {226, 164, 147}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 2007 "src/html/html_unescape.gperf" - {"vcy", 2, {208, 178}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 54 "src/html/html_unescape.gperf" - {"angrtvb", 3, {226, 138, 190}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 805 "src/html/html_unescape.gperf" - {"Kcy", 2, {208, 154}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1041 "src/html/html_unescape.gperf" - {"Mcy", 2, {208, 156}}, -#line 1652 "src/html/html_unescape.gperf" - {"Scy", 2, {208, 161}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1116 "src/html/html_unescape.gperf" - {"NewLine", 1, {10}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 548 "src/html/html_unescape.gperf" - {"fcy", 2, {209, 132}}, -#line 1914 "src/html/html_unescape.gperf" - {"Ucy", 2, {208, 163}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 184 "src/html/html_unescape.gperf" - {"boxVh", 3, {226, 149, 171}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 354 "src/html/html_unescape.gperf" - {"Dcy", 2, {208, 148}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 705 "src/html/html_unescape.gperf" - {"hstrok", 2, {196, 167}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 862 "src/html/html_unescape.gperf" - {"Lcy", 2, {208, 155}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 2094 "src/html/html_unescape.gperf" - {"Ycy", 2, {208, 171}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1815 "src/html/html_unescape.gperf" - {"supsim", 3, {226, 171, 136}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1165 "src/html/html_unescape.gperf" - {"NonBreakingSpace", 2, {194, 160}}, -#line 1383 "src/html/html_unescape.gperf" - {"OverBar", 3, {226, 128, 190}}, -#line 1725 "src/html/html_unescape.gperf" - {"sqsubseteq", 3, {226, 138, 145}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 625 "src/html/html_unescape.gperf" - {"GJcy", 2, {208, 131}}, - {(char*)0}, {(char*)0}, -#line 1384 "src/html/html_unescape.gperf" - {"OverBrace", 3, {226, 143, 158}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 513 "src/html/html_unescape.gperf" - {"eqcirc", 3, {226, 137, 150}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1385 "src/html/html_unescape.gperf" - {"OverBracket", 3, {226, 142, 180}}, - {(char*)0}, -#line 82 "src/html/html_unescape.gperf" - {"Auml", 2, {195, 132}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 16 "src/html/html_unescape.gperf" - {"acute", 2, {194, 180}}, -#line 716 "src/html/html_unescape.gperf" - {"icy", 2, {208, 184}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 779 "src/html/html_unescape.gperf" - {"Itilde", 2, {196, 168}}, -#line 690 "src/html/html_unescape.gperf" - {"HilbertSpace", 3, {226, 132, 139}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1345 "src/html/html_unescape.gperf" - {"omega", 2, {207, 137}}, -#line 214 "src/html/html_unescape.gperf" - {"cacute", 2, {196, 135}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1646 "src/html/html_unescape.gperf" - {"scirc", 2, {197, 157}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 465 "src/html/html_unescape.gperf" - {"ecirc", 2, {195, 170}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1913 "src/html/html_unescape.gperf" - {"ucirc", 2, {195, 187}}, - {(char*)0}, -#line 646 "src/html/html_unescape.gperf" - {"GreaterSlantEqual", 3, {226, 169, 190}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 785 "src/html/html_unescape.gperf" - {"Jcirc", 2, {196, 180}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1292 "src/html/html_unescape.gperf" - {"nvDash", 3, {226, 138, 173}}, -#line 2044 "src/html/html_unescape.gperf" - {"Wcirc", 2, {197, 180}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1098 "src/html/html_unescape.gperf" - {"Ncy", 2, {208, 157}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1580 "src/html/html_unescape.gperf" - {"RightTeeArrow", 3, {226, 134, 166}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 925 "src/html/html_unescape.gperf" - {"LessFullEqual", 3, {226, 137, 166}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1011 "src/html/html_unescape.gperf" - {"ltcc", 3, {226, 170, 166}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 27 "src/html/html_unescape.gperf" - {"aleph", 3, {226, 132, 181}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 355 "src/html/html_unescape.gperf" - {"dcy", 2, {208, 180}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1645 "src/html/html_unescape.gperf" - {"Scirc", 2, {197, 156}}, - {(char*)0}, -#line 920 "src/html/html_unescape.gperf" - {"lessapprox", 3, {226, 170, 133}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 718 "src/html/html_unescape.gperf" - {"IEcy", 2, {208, 149}}, -#line 986 "src/html/html_unescape.gperf" - {"LowerRightArrow", 3, {226, 134, 152}}, -#line 1912 "src/html/html_unescape.gperf" - {"Ucirc", 2, {195, 155}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 25 "src/html/html_unescape.gperf" - {"agrave", 2, {195, 160}}, - {(char*)0}, -#line 1060 "src/html/html_unescape.gperf" - {"MinusPlus", 3, {226, 136, 147}}, -#line 127 "src/html/html_unescape.gperf" - {"bigvee", 3, {226, 139, 129}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1532 "src/html/html_unescape.gperf" - {"Rcy", 2, {208, 160}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1802 "src/html/html_unescape.gperf" - {"suphsol", 3, {226, 159, 137}}, - {(char*)0}, {(char*)0}, -#line 495 "src/html/html_unescape.gperf" - {"EmptyVerySmallSquare", 3, {226, 150, 171}}, - {(char*)0}, -#line 163 "src/html/html_unescape.gperf" - {"boxhD", 3, {226, 149, 165}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1436 "src/html/html_unescape.gperf" - {"precapprox", 3, {226, 170, 183}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 55 "src/html/html_unescape.gperf" - {"angrtvbd", 3, {226, 166, 157}}, -#line 2092 "src/html/html_unescape.gperf" - {"Ycirc", 2, {197, 182}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1753 "src/html/html_unescape.gperf" - {"sub", 3, {226, 138, 130}}, - {(char*)0}, {(char*)0}, -#line 1375 "src/html/html_unescape.gperf" - {"Otilde", 2, {195, 149}}, -#line 232 "src/html/html_unescape.gperf" - {"Ccirc", 2, {196, 136}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 547 "src/html/html_unescape.gperf" - {"Fcy", 2, {208, 164}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 287 "src/html/html_unescape.gperf" - {"complexes", 3, {226, 132, 130}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1763 "src/html/html_unescape.gperf" - {"subrarr", 3, {226, 165, 185}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 758 "src/html/html_unescape.gperf" - {"InvisibleComma", 3, {226, 129, 163}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 176 "src/html/html_unescape.gperf" - {"boxur", 3, {226, 148, 148}}, -#line 10 "src/html/html_unescape.gperf" - {"abreve", 2, {196, 131}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1280 "src/html/html_unescape.gperf" - {"ntlg", 3, {226, 137, 184}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 714 "src/html/html_unescape.gperf" - {"icirc", 2, {195, 174}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 2063 "src/html/html_unescape.gperf" - {"xdtri", 3, {226, 150, 189}}, -#line 253 "src/html/html_unescape.gperf" - {"circ", 2, {203, 134}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 663 "src/html/html_unescape.gperf" - {"gtrdot", 3, {226, 139, 151}}, - {(char*)0}, {(char*)0}, -#line 611 "src/html/html_unescape.gperf" - {"geqslant", 3, {226, 169, 190}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1283 "src/html/html_unescape.gperf" - {"ntriangleright", 3, {226, 139, 171}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 314 "src/html/html_unescape.gperf" - {"cuepr", 3, {226, 139, 158}}, -#line 1754 "src/html/html_unescape.gperf" - {"Sub", 3, {226, 139, 144}}, - {(char*)0}, -#line 1042 "src/html/html_unescape.gperf" - {"mcy", 2, {208, 188}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1860 "src/html/html_unescape.gperf" - {"timesbar", 3, {226, 168, 177}}, - {(char*)0}, -#line 691 "src/html/html_unescape.gperf" - {"hksearow", 3, {226, 164, 165}}, - {(char*)0}, {(char*)0}, -#line 1683 "src/html/html_unescape.gperf" - {"sigma", 2, {207, 131}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 325 "src/html/html_unescape.gperf" - {"cupor", 3, {226, 169, 133}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1373 "src/html/html_unescape.gperf" - {"oslash", 2, {195, 184}}, -#line 458 "src/html/html_unescape.gperf" - {"dzigrarr", 3, {226, 159, 191}}, - {(char*)0}, {(char*)0}, -#line 892 "src/html/html_unescape.gperf" - {"leftrightharpoons", 3, {226, 135, 139}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1577 "src/html/html_unescape.gperf" - {"rightleftharpoons", 3, {226, 135, 140}}, - {(char*)0}, -#line 804 "src/html/html_unescape.gperf" - {"kcedil", 2, {196, 183}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1759 "src/html/html_unescape.gperf" - {"submult", 3, {226, 171, 129}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 333 "src/html/html_unescape.gperf" - {"curren", 2, {194, 164}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 897 "src/html/html_unescape.gperf" - {"LeftTeeVector", 3, {226, 165, 154}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 123 "src/html/html_unescape.gperf" - {"bigstar", 3, {226, 152, 133}}, - {(char*)0}, {(char*)0}, -#line 321 "src/html/html_unescape.gperf" - {"cup", 3, {226, 136, 170}}, -#line 974 "src/html/html_unescape.gperf" - {"LongRightArrow", 3, {226, 159, 182}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 598 "src/html/html_unescape.gperf" - {"Gcedil", 2, {196, 162}}, - {(char*)0}, -#line 1440 "src/html/html_unescape.gperf" - {"PrecedesEqual", 3, {226, 170, 175}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 2114 "src/html/html_unescape.gperf" - {"zcy", 2, {208, 183}}, - {(char*)0}, -#line 1413 "src/html/html_unescape.gperf" - {"planckh", 3, {226, 132, 142}}, -#line 1344 "src/html/html_unescape.gperf" - {"Omega", 2, {206, 169}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1772 "src/html/html_unescape.gperf" - {"subsub", 3, {226, 171, 149}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1534 "src/html/html_unescape.gperf" - {"rdca", 3, {226, 164, 183}}, -#line 326 "src/html/html_unescape.gperf" - {"cups", 3, {226, 136, 170}}, -#line 864 "src/html/html_unescape.gperf" - {"ldca", 3, {226, 164, 182}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1764 "src/html/html_unescape.gperf" - {"subset", 3, {226, 138, 130}}, -#line 1220 "src/html/html_unescape.gperf" - {"NotSucceeds", 3, {226, 138, 129}}, -#line 877 "src/html/html_unescape.gperf" - {"LeftArrowRightArrow", 3, {226, 135, 134}}, - {(char*)0}, {(char*)0}, -#line 2045 "src/html/html_unescape.gperf" - {"wcirc", 2, {197, 181}}, -#line 1561 "src/html/html_unescape.gperf" - {"RightAngleBracket", 3, {226, 159, 169}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1284 "src/html/html_unescape.gperf" - {"ntrianglerighteq", 3, {226, 139, 173}}, -#line 1682 "src/html/html_unescape.gperf" - {"Sigma", 2, {206, 163}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1223 "src/html/html_unescape.gperf" - {"NotSucceedsTilde", 3, {226, 137, 191}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 373 "src/html/html_unescape.gperf" - {"DiacriticalAcute", 2, {194, 180}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1761 "src/html/html_unescape.gperf" - {"subne", 3, {226, 138, 138}}, - {(char*)0}, -#line 1457 "src/html/html_unescape.gperf" - {"Product", 3, {226, 136, 143}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 259 "src/html/html_unescape.gperf" - {"circleddash", 3, {226, 138, 157}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1773 "src/html/html_unescape.gperf" - {"subsup", 3, {226, 171, 147}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 298 "src/html/html_unescape.gperf" - {"copy", 2, {194, 169}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 534 "src/html/html_unescape.gperf" - {"eta", 2, {206, 183}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 52 "src/html/html_unescape.gperf" - {"angmsd", 3, {226, 136, 161}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1084 "src/html/html_unescape.gperf" - {"natural", 3, {226, 153, 174}}, - {(char*)0}, -#line 1799 "src/html/html_unescape.gperf" - {"supedot", 3, {226, 171, 132}}, -#line 1085 "src/html/html_unescape.gperf" - {"naturals", 3, {226, 132, 149}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1881 "src/html/html_unescape.gperf" - {"triangleright", 3, {226, 150, 185}}, - {(char*)0}, -#line 376 "src/html/html_unescape.gperf" - {"DiacriticalGrave", 1, {96}}, -#line 173 "src/html/html_unescape.gperf" - {"boxuL", 3, {226, 149, 155}}, -#line 288 "src/html/html_unescape.gperf" - {"cong", 3, {226, 137, 133}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1836 "src/html/html_unescape.gperf" - {"telrec", 3, {226, 140, 149}}, - {(char*)0}, {(char*)0}, -#line 282 "src/html/html_unescape.gperf" - {"comma", 1, {44}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1765 "src/html/html_unescape.gperf" - {"Subset", 3, {226, 139, 144}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1222 "src/html/html_unescape.gperf" - {"NotSucceedsSlantEqual", 3, {226, 139, 161}}, -#line 664 "src/html/html_unescape.gperf" - {"gtreqless", 3, {226, 139, 155}}, -#line 80 "src/html/html_unescape.gperf" - {"Atilde", 2, {195, 131}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 327 "src/html/html_unescape.gperf" - {"curarr", 3, {226, 134, 183}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 313 "src/html/html_unescape.gperf" - {"cudarrr", 3, {226, 164, 181}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 312 "src/html/html_unescape.gperf" - {"cudarrl", 3, {226, 164, 184}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1766 "src/html/html_unescape.gperf" - {"subseteq", 3, {226, 138, 134}}, -#line 1767 "src/html/html_unescape.gperf" - {"subseteqq", 3, {226, 171, 133}}, -#line 1579 "src/html/html_unescape.gperf" - {"rightsquigarrow", 3, {226, 134, 157}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 319 "src/html/html_unescape.gperf" - {"cupcap", 3, {226, 169, 134}}, -#line 1769 "src/html/html_unescape.gperf" - {"subsetneq", 3, {226, 138, 138}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 60 "src/html/html_unescape.gperf" - {"aogon", 2, {196, 133}}, -#line 1191 "src/html/html_unescape.gperf" - {"notinvc", 3, {226, 139, 182}}, -#line 1583 "src/html/html_unescape.gperf" - {"rightthreetimes", 3, {226, 139, 140}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 2089 "src/html/html_unescape.gperf" - {"yacute", 2, {195, 189}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1148 "src/html/html_unescape.gperf" - {"nLeftarrow", 3, {226, 135, 141}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1318 "src/html/html_unescape.gperf" - {"ocy", 2, {208, 190}}, -#line 241 "src/html/html_unescape.gperf" - {"cemptyv", 3, {226, 166, 178}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 468 "src/html/html_unescape.gperf" - {"Ecy", 2, {208, 173}}, - {(char*)0}, {(char*)0}, -#line 323 "src/html/html_unescape.gperf" - {"cupcup", 3, {226, 169, 138}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1882 "src/html/html_unescape.gperf" - {"trianglerighteq", 3, {226, 138, 181}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 889 "src/html/html_unescape.gperf" - {"LeftRightArrow", 3, {226, 134, 148}}, - {(char*)0}, {(char*)0}, -#line 1775 "src/html/html_unescape.gperf" - {"succ", 3, {226, 137, 187}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 426 "src/html/html_unescape.gperf" - {"DownArrowUpArrow", 3, {226, 135, 181}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1325 "src/html/html_unescape.gperf" - {"OElig", 2, {197, 146}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 248 "src/html/html_unescape.gperf" - {"chcy", 2, {209, 135}}, -#line 665 "src/html/html_unescape.gperf" - {"gtreqqless", 3, {226, 170, 140}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 43 "src/html/html_unescape.gperf" - {"angle", 3, {226, 136, 160}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 13 "src/html/html_unescape.gperf" - {"acE", 3, {226, 136, 190}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1598 "src/html/html_unescape.gperf" - {"rmoustache", 3, {226, 142, 177}}, - {(char*)0}, -#line 954 "src/html/html_unescape.gperf" - {"lmoustache", 3, {226, 142, 176}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1110 "src/html/html_unescape.gperf" - {"NegativeVeryThinSpace", 3, {226, 128, 139}}, - {(char*)0}, {(char*)0}, -#line 1083 "src/html/html_unescape.gperf" - {"napprox", 3, {226, 137, 137}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1372 "src/html/html_unescape.gperf" - {"Oslash", 2, {195, 152}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1770 "src/html/html_unescape.gperf" - {"subsetneqq", 3, {226, 171, 139}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 72 "src/html/html_unescape.gperf" - {"Aring", 2, {195, 133}}, -#line 177 "src/html/html_unescape.gperf" - {"boxuR", 3, {226, 149, 152}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1762 "src/html/html_unescape.gperf" - {"subplus", 3, {226, 170, 191}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 2087 "src/html/html_unescape.gperf" - {"xwedge", 3, {226, 139, 128}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 172 "src/html/html_unescape.gperf" - {"boxul", 3, {226, 148, 152}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 190 "src/html/html_unescape.gperf" - {"boxvr", 3, {226, 148, 156}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 706 "src/html/html_unescape.gperf" - {"HumpDownHump", 3, {226, 137, 142}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 715 "src/html/html_unescape.gperf" - {"Icy", 2, {208, 152}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 71 "src/html/html_unescape.gperf" - {"approxeq", 3, {226, 137, 138}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 8 "src/html/html_unescape.gperf" - {"aacute", 2, {195, 161}}, -#line 67 "src/html/html_unescape.gperf" - {"apid", 3, {226, 137, 139}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1952 "src/html/html_unescape.gperf" - {"UpDownArrow", 3, {226, 134, 149}}, - {(char*)0}, -#line 1114 "src/html/html_unescape.gperf" - {"NestedGreaterGreater", 3, {226, 137, 171}}, - {(char*)0}, -#line 788 "src/html/html_unescape.gperf" - {"jcy", 2, {208, 185}}, - {(char*)0}, {(char*)0}, -#line 667 "src/html/html_unescape.gperf" - {"gtrsim", 3, {226, 137, 179}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 180 "src/html/html_unescape.gperf" - {"boxv", 3, {226, 148, 130}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1315 "src/html/html_unescape.gperf" - {"ocirc", 2, {195, 180}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 464 "src/html/html_unescape.gperf" - {"Ecirc", 2, {195, 138}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1206 "src/html/html_unescape.gperf" - {"notnivc", 3, {226, 139, 189}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 125 "src/html/html_unescape.gperf" - {"bigtriangleup", 3, {226, 150, 179}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 343 "src/html/html_unescape.gperf" - {"daleth", 3, {226, 132, 184}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1317 "src/html/html_unescape.gperf" - {"Ocy", 2, {208, 158}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 682 "src/html/html_unescape.gperf" - {"Hcirc", 2, {196, 164}}, -#line 1591 "src/html/html_unescape.gperf" - {"RightVectorBar", 3, {226, 165, 147}}, -#line 19 "src/html/html_unescape.gperf" - {"AElig", 2, {195, 134}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 557 "src/html/html_unescape.gperf" - {"FilledVerySmallSquare", 3, {226, 150, 170}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 623 "src/html/html_unescape.gperf" - {"ggg", 3, {226, 139, 153}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 100 "src/html/html_unescape.gperf" - {"Bcy", 2, {208, 145}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1427 "src/html/html_unescape.gperf" - {"Poincareplane", 3, {226, 132, 140}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 187 "src/html/html_unescape.gperf" - {"boxvL", 3, {226, 149, 161}}, - {(char*)0}, {(char*)0}, -#line 1393 "src/html/html_unescape.gperf" - {"PartialD", 3, {226, 136, 130}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 713 "src/html/html_unescape.gperf" - {"Icirc", 2, {195, 142}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 316 "src/html/html_unescape.gperf" - {"cularr", 3, {226, 134, 182}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 159 "src/html/html_unescape.gperf" - {"boxh", 3, {226, 148, 128}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 40 "src/html/html_unescape.gperf" - {"andv", 3, {226, 169, 154}}, - {(char*)0}, -#line 1789 "src/html/html_unescape.gperf" - {"sung", 3, {226, 153, 170}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1569 "src/html/html_unescape.gperf" - {"RightDoubleBracket", 3, {226, 159, 167}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 786 "src/html/html_unescape.gperf" - {"jcirc", 2, {196, 181}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1936 "src/html/html_unescape.gperf" - {"UnderBar", 1, {95}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1564 "src/html/html_unescape.gperf" - {"RightArrow", 3, {226, 134, 146}}, -#line 258 "src/html/html_unescape.gperf" - {"circledcirc", 3, {226, 138, 154}}, -#line 28 "src/html/html_unescape.gperf" - {"Alpha", 2, {206, 145}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 886 "src/html/html_unescape.gperf" - {"leftharpoonup", 3, {226, 134, 188}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 317 "src/html/html_unescape.gperf" - {"cularrp", 3, {226, 164, 189}}, - {(char*)0}, -#line 1566 "src/html/html_unescape.gperf" - {"RightArrowLeftArrow", 3, {226, 135, 132}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1995 "src/html/html_unescape.gperf" - {"varsigma", 2, {207, 130}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1288 "src/html/html_unescape.gperf" - {"numero", 3, {226, 132, 150}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 552 "src/html/html_unescape.gperf" - {"ffllig", 3, {239, 172, 132}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 985 "src/html/html_unescape.gperf" - {"LowerLeftArrow", 3, {226, 134, 153}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 543 "src/html/html_unescape.gperf" - {"expectation", 3, {226, 132, 176}}, - {(char*)0}, -#line 1314 "src/html/html_unescape.gperf" - {"Ocirc", 2, {195, 148}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 2091 "src/html/html_unescape.gperf" - {"yacy", 2, {209, 143}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 824 "src/html/html_unescape.gperf" - {"lambda", 2, {206, 187}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1221 "src/html/html_unescape.gperf" - {"NotSucceedsEqual", 3, {226, 170, 176}}, -#line 191 "src/html/html_unescape.gperf" - {"boxvR", 3, {226, 149, 158}}, - {(char*)0}, -#line 124 "src/html/html_unescape.gperf" - {"bigtriangledown", 3, {226, 150, 189}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 41 "src/html/html_unescape.gperf" - {"ang", 3, {226, 136, 160}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 2084 "src/html/html_unescape.gperf" - {"xuplus", 3, {226, 168, 132}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1075 "src/html/html_unescape.gperf" - {"nabla", 3, {226, 136, 135}}, -#line 186 "src/html/html_unescape.gperf" - {"boxvl", 3, {226, 148, 164}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 533 "src/html/html_unescape.gperf" - {"Eta", 2, {206, 151}}, - {(char*)0}, -#line 17 "src/html/html_unescape.gperf" - {"Acy", 2, {208, 144}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 806 "src/html/html_unescape.gperf" - {"kcy", 2, {208, 186}}, -#line 602 "src/html/html_unescape.gperf" - {"gcy", 2, {208, 179}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 894 "src/html/html_unescape.gperf" - {"LeftRightVector", 3, {226, 165, 142}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 231 "src/html/html_unescape.gperf" - {"ccedil", 2, {195, 167}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 91 "src/html/html_unescape.gperf" - {"Backslash", 3, {226, 136, 150}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 703 "src/html/html_unescape.gperf" - {"hslash", 3, {226, 132, 143}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1394 "src/html/html_unescape.gperf" - {"Pcy", 2, {208, 159}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 601 "src/html/html_unescape.gperf" - {"Gcy", 2, {208, 147}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 660 "src/html/html_unescape.gperf" - {"gtquest", 3, {226, 169, 188}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 823 "src/html/html_unescape.gperf" - {"Lambda", 2, {206, 155}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1322 "src/html/html_unescape.gperf" - {"odiv", 3, {226, 168, 184}}, - {(char*)0}, -#line 885 "src/html/html_unescape.gperf" - {"leftharpoondown", 3, {226, 134, 189}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 972 "src/html/html_unescape.gperf" - {"longmapsto", 3, {226, 159, 188}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 798 "src/html/html_unescape.gperf" - {"Jukcy", 2, {208, 132}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 867 "src/html/html_unescape.gperf" - {"ldrdhar", 3, {226, 165, 167}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 2085 "src/html/html_unescape.gperf" - {"xutri", 3, {226, 150, 179}}, -#line 1246 "src/html/html_unescape.gperf" - {"nRightarrow", 3, {226, 135, 143}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 545 "src/html/html_unescape.gperf" - {"ExponentialE", 3, {226, 133, 135}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1245 "src/html/html_unescape.gperf" - {"nrightarrow", 3, {226, 134, 155}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 14 "src/html/html_unescape.gperf" - {"Acirc", 2, {195, 130}}, -#line 1164 "src/html/html_unescape.gperf" - {"NoBreak", 3, {226, 129, 160}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 600 "src/html/html_unescape.gperf" - {"gcirc", 2, {196, 157}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 42 "src/html/html_unescape.gperf" - {"ange", 3, {226, 166, 164}}, -#line 328 "src/html/html_unescape.gperf" - {"curarrm", 3, {226, 164, 188}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1671 "src/html/html_unescape.gperf" - {"SHCHcy", 2, {208, 169}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 2107 "src/html/html_unescape.gperf" - {"yuml", 2, {195, 191}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1760 "src/html/html_unescape.gperf" - {"subnE", 3, {226, 171, 139}}, - {(char*)0}, {(char*)0}, -#line 360 "src/html/html_unescape.gperf" - {"DDotrahd", 3, {226, 164, 145}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1629 "src/html/html_unescape.gperf" - {"RuleDelayed", 3, {226, 167, 180}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 599 "src/html/html_unescape.gperf" - {"Gcirc", 2, {196, 156}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 796 "src/html/html_unescape.gperf" - {"Jsercy", 2, {208, 136}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 653 "src/html/html_unescape.gperf" - {"gtcc", 3, {226, 170, 167}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 782 "src/html/html_unescape.gperf" - {"iukcy", 2, {209, 150}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1951 "src/html/html_unescape.gperf" - {"updownarrow", 3, {226, 134, 149}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 331 "src/html/html_unescape.gperf" - {"curlyvee", 3, {226, 139, 142}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 550 "src/html/html_unescape.gperf" - {"ffilig", 3, {239, 172, 131}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 2100 "src/html/html_unescape.gperf" - {"yicy", 2, {209, 151}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 390 "src/html/html_unescape.gperf" - {"divonx", 3, {226, 139, 135}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 661 "src/html/html_unescape.gperf" - {"gtrapprox", 3, {226, 170, 134}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1755 "src/html/html_unescape.gperf" - {"subdot", 3, {226, 170, 189}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 891 "src/html/html_unescape.gperf" - {"leftrightarrows", 3, {226, 135, 134}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 83 "src/html/html_unescape.gperf" - {"auml", 2, {195, 164}}, - {(char*)0}, {(char*)0}, -#line 1953 "src/html/html_unescape.gperf" - {"Updownarrow", 3, {226, 135, 149}}, - {(char*)0}, -#line 1576 "src/html/html_unescape.gperf" - {"rightleftarrows", 3, {226, 135, 132}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 437 "src/html/html_unescape.gperf" - {"DownRightVector", 3, {226, 135, 129}}, - {(char*)0}, {(char*)0}, -#line 436 "src/html/html_unescape.gperf" - {"DownRightVectorBar", 3, {226, 165, 151}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 683 "src/html/html_unescape.gperf" - {"hcirc", 2, {196, 165}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1614 "src/html/html_unescape.gperf" - {"Rrightarrow", 3, {226, 135, 155}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 973 "src/html/html_unescape.gperf" - {"longrightarrow", 3, {226, 159, 182}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 324 "src/html/html_unescape.gperf" - {"cupdot", 3, {226, 138, 141}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 11 "src/html/html_unescape.gperf" - {"ac", 3, {226, 136, 190}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 696 "src/html/html_unescape.gperf" - {"hookrightarrow", 3, {226, 134, 170}}, - {(char*)0}, {(char*)0}, -#line 1108 "src/html/html_unescape.gperf" - {"NegativeThickSpace", 3, {226, 128, 139}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1756 "src/html/html_unescape.gperf" - {"subE", 3, {226, 171, 133}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1901 "src/html/html_unescape.gperf" - {"twoheadrightarrow", 3, {226, 134, 160}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 430 "src/html/html_unescape.gperf" - {"downharpoonright", 3, {226, 135, 130}}, -#line 429 "src/html/html_unescape.gperf" - {"downharpoonleft", 3, {226, 135, 131}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 20 "src/html/html_unescape.gperf" - {"aelig", 2, {195, 166}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1535 "src/html/html_unescape.gperf" - {"rdldhar", 3, {226, 165, 169}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 332 "src/html/html_unescape.gperf" - {"curlywedge", 3, {226, 139, 143}}, - {(char*)0}, -#line 708 "src/html/html_unescape.gperf" - {"hybull", 3, {226, 129, 131}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1757 "src/html/html_unescape.gperf" - {"sube", 3, {226, 138, 134}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 975 "src/html/html_unescape.gperf" - {"Longrightarrow", 3, {226, 159, 185}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 240 "src/html/html_unescape.gperf" - {"Cedilla", 2, {194, 184}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1189 "src/html/html_unescape.gperf" - {"notinva", 3, {226, 136, 137}}, -#line 1778 "src/html/html_unescape.gperf" - {"SucceedsEqual", 3, {226, 170, 176}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 888 "src/html/html_unescape.gperf" - {"leftrightarrow", 3, {226, 134, 148}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1750 "src/html/html_unescape.gperf" - {"straightepsilon", 2, {207, 181}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 32 "src/html/html_unescape.gperf" - {"amalg", 3, {226, 168, 191}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 81 "src/html/html_unescape.gperf" - {"atilde", 2, {195, 163}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1568 "src/html/html_unescape.gperf" - {"RightCeiling", 3, {226, 140, 137}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 890 "src/html/html_unescape.gperf" - {"Leftrightarrow", 3, {226, 135, 148}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1771 "src/html/html_unescape.gperf" - {"subsim", 3, {226, 171, 135}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 2023 "src/html/html_unescape.gperf" - {"VerticalLine", 1, {124}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1590 "src/html/html_unescape.gperf" - {"RightUpVector", 3, {226, 134, 190}}, - {(char*)0}, {(char*)0}, -#line 1589 "src/html/html_unescape.gperf" - {"RightUpVectorBar", 3, {226, 165, 148}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1572 "src/html/html_unescape.gperf" - {"RightDownVector", 3, {226, 135, 130}}, - {(char*)0}, {(char*)0}, -#line 1571 "src/html/html_unescape.gperf" - {"RightDownVectorBar", 3, {226, 165, 149}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 26 "src/html/html_unescape.gperf" - {"alefsym", 3, {226, 132, 181}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 256 "src/html/html_unescape.gperf" - {"circlearrowright", 3, {226, 134, 187}}, -#line 255 "src/html/html_unescape.gperf" - {"circlearrowleft", 3, {226, 134, 186}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 781 "src/html/html_unescape.gperf" - {"Iukcy", 2, {208, 134}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1377 "src/html/html_unescape.gperf" - {"otimesas", 3, {226, 168, 182}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 754 "src/html/html_unescape.gperf" - {"intercal", 3, {226, 138, 186}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1846 "src/html/html_unescape.gperf" - {"thickapprox", 3, {226, 137, 136}}, - {(char*)0}, {(char*)0}, -#line 799 "src/html/html_unescape.gperf" - {"jukcy", 2, {209, 148}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1204 "src/html/html_unescape.gperf" - {"notniva", 3, {226, 136, 140}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1444 "src/html/html_unescape.gperf" - {"precnapprox", 3, {226, 170, 185}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 336 "src/html/html_unescape.gperf" - {"cuvee", 3, {226, 139, 142}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 73 "src/html/html_unescape.gperf" - {"aring", 2, {195, 165}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 233 "src/html/html_unescape.gperf" - {"ccirc", 2, {196, 137}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1563 "src/html/html_unescape.gperf" - {"rightarrow", 3, {226, 134, 146}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 753 "src/html/html_unescape.gperf" - {"Integral", 3, {226, 136, 171}}, -#line 2061 "src/html/html_unescape.gperf" - {"xcirc", 3, {226, 151, 175}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 797 "src/html/html_unescape.gperf" - {"jsercy", 2, {209, 152}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 250 "src/html/html_unescape.gperf" - {"checkmark", 3, {226, 156, 147}}, - {(char*)0}, -#line 2025 "src/html/html_unescape.gperf" - {"VerticalTilde", 3, {226, 137, 128}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 183 "src/html/html_unescape.gperf" - {"boxvH", 3, {226, 149, 170}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1211 "src/html/html_unescape.gperf" - {"NotRightTriangleBar", 3, {226, 167, 144}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1213 "src/html/html_unescape.gperf" - {"NotRightTriangleEqual", 3, {226, 139, 173}}, -#line 1212 "src/html/html_unescape.gperf" - {"NotRightTriangle", 3, {226, 139, 171}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 906 "src/html/html_unescape.gperf" - {"LeftVectorBar", 3, {226, 165, 146}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 182 "src/html/html_unescape.gperf" - {"boxvh", 3, {226, 148, 188}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 150 "src/html/html_unescape.gperf" - {"boxbox", 3, {226, 167, 137}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 2095 "src/html/html_unescape.gperf" - {"ycy", 2, {209, 139}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1758 "src/html/html_unescape.gperf" - {"subedot", 3, {226, 171, 131}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1707 "src/html/html_unescape.gperf" - {"SOFTcy", 2, {208, 172}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1565 "src/html/html_unescape.gperf" - {"Rightarrow", 3, {226, 135, 146}}, - {(char*)0}, -#line 29 "src/html/html_unescape.gperf" - {"alpha", 2, {206, 177}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1672 "src/html/html_unescape.gperf" - {"shchcy", 2, {209, 137}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1708 "src/html/html_unescape.gperf" - {"softcy", 2, {209, 140}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 18 "src/html/html_unescape.gperf" - {"acy", 2, {208, 176}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 2093 "src/html/html_unescape.gperf" - {"ycirc", 2, {197, 183}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 117 "src/html/html_unescape.gperf" - {"bigcirc", 3, {226, 151, 175}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 736 "src/html/html_unescape.gperf" - {"ImaginaryI", 3, {226, 133, 136}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 70 "src/html/html_unescape.gperf" - {"approx", 3, {226, 137, 136}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1801 "src/html/html_unescape.gperf" - {"SupersetEqual", 3, {226, 138, 135}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 2043 "src/html/html_unescape.gperf" - {"vzigzag", 3, {226, 166, 154}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 315 "src/html/html_unescape.gperf" - {"cuesc", 3, {226, 139, 159}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1939 "src/html/html_unescape.gperf" - {"UnderParenthesis", 3, {226, 143, 157}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 15 "src/html/html_unescape.gperf" - {"acirc", 2, {195, 162}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1774 "src/html/html_unescape.gperf" - {"succapprox", 3, {226, 170, 184}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1040 "src/html/html_unescape.gperf" - {"mcomma", 3, {226, 168, 169}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 48 "src/html/html_unescape.gperf" - {"angmsdae", 3, {226, 166, 172}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 45 "src/html/html_unescape.gperf" - {"angmsdab", 3, {226, 166, 169}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 49 "src/html/html_unescape.gperf" - {"angmsdaf", 3, {226, 166, 173}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 56 "src/html/html_unescape.gperf" - {"angsph", 3, {226, 136, 162}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1026 "src/html/html_unescape.gperf" - {"luruhar", 3, {226, 165, 166}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 47 "src/html/html_unescape.gperf" - {"angmsdad", 3, {226, 166, 171}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1900 "src/html/html_unescape.gperf" - {"twoheadleftarrow", 3, {226, 134, 158}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 340 "src/html/html_unescape.gperf" - {"cylcty", 3, {226, 140, 173}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1751 "src/html/html_unescape.gperf" - {"straightphi", 2, {207, 149}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1073 "src/html/html_unescape.gperf" - {"multimap", 3, {226, 138, 184}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1562 "src/html/html_unescape.gperf" - {"RightArrowBar", 3, {226, 135, 165}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 868 "src/html/html_unescape.gperf" - {"ldrushar", 3, {226, 165, 139}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 872 "src/html/html_unescape.gperf" - {"LeftAngleBracket", 3, {226, 159, 168}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1630 "src/html/html_unescape.gperf" - {"ruluhar", 3, {226, 165, 168}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 329 "src/html/html_unescape.gperf" - {"curlyeqprec", 3, {226, 139, 158}}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 2106 "src/html/html_unescape.gperf" - {"yucy", 2, {209, 142}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1025 "src/html/html_unescape.gperf" - {"lurdshar", 3, {226, 165, 138}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 675 "src/html/html_unescape.gperf" - {"hardcy", 2, {209, 138}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1574 "src/html/html_unescape.gperf" - {"rightharpoondown", 3, {226, 135, 129}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1575 "src/html/html_unescape.gperf" - {"rightharpoonup", 3, {226, 135, 128}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 674 "src/html/html_unescape.gperf" - {"HARDcy", 2, {208, 170}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1768 "src/html/html_unescape.gperf" - {"SubsetEqual", 3, {226, 138, 134}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 385 "src/html/html_unescape.gperf" - {"digamma", 2, {207, 157}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1918 "src/html/html_unescape.gperf" - {"udblac", 2, {197, 177}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1786 "src/html/html_unescape.gperf" - {"SuchThat", 3, {226, 136, 139}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 337 "src/html/html_unescape.gperf" - {"cuwed", 3, {226, 139, 143}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1917 "src/html/html_unescape.gperf" - {"Udblac", 2, {197, 176}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 50 "src/html/html_unescape.gperf" - {"angmsdag", 3, {226, 166, 174}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 51 "src/html/html_unescape.gperf" - {"angmsdah", 3, {226, 166, 175}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 2022 "src/html/html_unescape.gperf" - {"VerticalBar", 3, {226, 136, 163}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 2024 "src/html/html_unescape.gperf" - {"VerticalSeparator", 3, {226, 157, 152}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 1567 "src/html/html_unescape.gperf" - {"rightarrowtail", 3, {226, 134, 163}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 1321 "src/html/html_unescape.gperf" - {"odblac", 2, {197, 145}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 1782 "src/html/html_unescape.gperf" - {"succnapprox", 3, {226, 170, 186}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 46 "src/html/html_unescape.gperf" - {"angmsdac", 3, {226, 166, 170}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 1320 "src/html/html_unescape.gperf" - {"Odblac", 2, {197, 144}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, -#line 318 "src/html/html_unescape.gperf" - {"cupbrcap", 3, {226, 169, 136}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 44 "src/html/html_unescape.gperf" - {"angmsdaa", 3, {226, 166, 168}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, -#line 330 "src/html/html_unescape.gperf" - {"curlyeqsucc", 3, {226, 139, 159}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -#line 334 "src/html/html_unescape.gperf" - {"curvearrowleft", 3, {226, 134, 182}}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, - {(char*)0}, {(char*)0}, -#line 335 "src/html/html_unescape.gperf" - {"curvearrowright", 3, {226, 134, 183}} - }; - - if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) - { - unsigned int key = hash_entity (str, len); - - if (key <= MAX_HASH_VALUE) - if (len == lengthtable[key]) - { - register const char *s = wordlist[key].entity; - - if (s && *str == *s && !memcmp (str + 1, s + 1, len - 1)) - return &wordlist[key]; - } - } - return 0; -} diff --git a/outside/commonmark/src/inlines.c b/outside/commonmark/src/inlines.c deleted file mode 100644 index 643837b64..000000000 --- a/outside/commonmark/src/inlines.c +++ /dev/null @@ -1,987 +0,0 @@ -#include -#include -#include -#include - -#include "config.h" -#include "node.h" -#include "parser.h" -#include "references.h" -#include "cmark.h" -#include "html/houdini.h" -#include "utf8.h" -#include "scanners.h" -#include "inlines.h" - - -// Macros for creating various kinds of simple. -#define make_str(s) make_literal(CMARK_NODE_TEXT, s) -#define make_code(s) make_literal(CMARK_NODE_INLINE_CODE, s) -#define make_raw_html(s) make_literal(CMARK_NODE_INLINE_HTML, s) -#define make_linebreak() make_simple(CMARK_NODE_LINEBREAK) -#define make_softbreak() make_simple(CMARK_NODE_SOFTBREAK) -#define make_emph() make_simple(CMARK_NODE_EMPH) -#define make_strong() make_simple(CMARK_NODE_STRONG) - -typedef struct delimiter { - struct delimiter *previous; - struct delimiter *next; - cmark_node *inl_text; - unsigned char delim_char; - int position; - bool can_open; - bool can_close; -} delimiter; - -typedef struct { - chunk input; - int pos; - cmark_reference_map *refmap; - delimiter *last_delim; -} subject; - -static delimiter* -S_insert_emph(subject *subj, delimiter *opener, delimiter *closer); - -static int parse_inline(subject* subj, cmark_node * parent); - -static void subject_from_buf(subject *e, strbuf *buffer, - cmark_reference_map *refmap); -static int subject_find_special_char(subject *subj); - -static unsigned char *cmark_clean_autolink(chunk *url, int is_email) -{ - strbuf buf = GH_BUF_INIT; - - chunk_trim(url); - - if (url->len == 0) - return NULL; - - if (is_email) - strbuf_puts(&buf, "mailto:"); - - houdini_unescape_html_f(&buf, url->data, url->len); - return strbuf_detach(&buf); -} - -static inline cmark_node *make_link(cmark_node *label, unsigned char *url, unsigned char *title) -{ - cmark_node* e = (cmark_node *)calloc(1, sizeof(*e)); - if(e != NULL) { - e->type = CMARK_NODE_LINK; - e->first_child = label; - e->last_child = label; - e->as.link.url = url; - e->as.link.title = title; - e->next = NULL; - label->parent = e; - } - return e; -} - -static inline cmark_node* make_autolink(cmark_node* label, cmark_chunk url, int is_email) -{ - return make_link(label, cmark_clean_autolink(&url, is_email), NULL); -} - -// Create an inline with a literal string value. -static inline cmark_node* make_literal(cmark_node_type t, cmark_chunk s) -{ - cmark_node * e = (cmark_node *)calloc(1, sizeof(*e)); - if(e != NULL) { - e->type = t; - e->as.literal = s; - e->next = NULL; - e->prev = NULL; - e->parent = NULL; - e->first_child = NULL; - e->last_child = NULL; - // These fields aren't used for inlines: - e->start_line = 0; - e->start_column = 0; - e->end_line = 0; - } - return e; -} - -// Create an inline with no value. -static inline cmark_node* make_simple(cmark_node_type t) -{ - cmark_node* e = (cmark_node *)calloc(1, sizeof(*e)); - if(e != NULL) { - e->type = t; - e->next = NULL; - e->prev = NULL; - e->parent = NULL; - e->first_child = NULL; - e->last_child = NULL; - // These fields aren't used for inlines: - e->start_line = 0; - e->start_column = 0; - e->end_line = 0; - } - return e; -} - -static unsigned char *bufdup(const unsigned char *buf) -{ - unsigned char *new_buf = NULL; - - if (buf) { - int len = strlen((char *)buf); - new_buf = (unsigned char *)calloc(len + 1, sizeof(*new_buf)); - if(new_buf != NULL) { - memcpy(new_buf, buf, len + 1); - } - } - - return new_buf; -} - -static void subject_from_buf(subject *e, strbuf *buffer, - cmark_reference_map *refmap) -{ - e->input.data = buffer->ptr; - e->input.len = buffer->size; - e->input.alloc = 0; - e->pos = 0; - e->refmap = refmap; - e->last_delim = NULL; - - chunk_rtrim(&e->input); -} - -static inline int isbacktick(int c) -{ - return (c == '`'); -} - -static inline unsigned char peek_char(subject *subj) -{ - return (subj->pos < subj->input.len) ? subj->input.data[subj->pos] : 0; -} - -static inline unsigned char peek_at(subject *subj, int pos) -{ - return subj->input.data[pos]; -} - -// Return true if there are more characters in the subject. -static inline int is_eof(subject* subj) -{ - return (subj->pos >= subj->input.len); -} - -// Advance the subject. Doesn't check for eof. -#define advance(subj) (subj)->pos += 1 - -// Take characters while a predicate holds, and return a string. -static inline chunk take_while(subject* subj, int (*f)(int)) -{ - unsigned char c; - int startpos = subj->pos; - int len = 0; - - while ((c = peek_char(subj)) && (*f)(c)) { - advance(subj); - len++; - } - - return chunk_dup(&subj->input, startpos, len); -} - -// Try to process a backtick code span that began with a -// span of ticks of length openticklength length (already -// parsed). Return 0 if you don't find matching closing -// backticks, otherwise return the position in the subject -// after the closing backticks. -static int scan_to_closing_backticks(subject* subj, int openticklength) -{ - // read non backticks - unsigned char c; - while ((c = peek_char(subj)) && c != '`') { - advance(subj); - } - if (is_eof(subj)) { - return 0; // did not find closing ticks, return 0 - } - int numticks = 0; - while (peek_char(subj) == '`') { - advance(subj); - numticks++; - } - if (numticks != openticklength){ - return(scan_to_closing_backticks(subj, openticklength)); - } - return (subj->pos); -} - -// Parse backtick code section or raw backticks, return an inline. -// Assumes that the subject has a backtick at the current position. -static cmark_node* handle_backticks(subject *subj) -{ - chunk openticks = take_while(subj, isbacktick); - int startpos = subj->pos; - int endpos = scan_to_closing_backticks(subj, openticks.len); - - if (endpos == 0) { // not found - subj->pos = startpos; // rewind - return make_str(openticks); - } else { - strbuf buf = GH_BUF_INIT; - - strbuf_set(&buf, subj->input.data + startpos, endpos - startpos - openticks.len); - strbuf_trim(&buf); - strbuf_normalize_whitespace(&buf); - - return make_code(chunk_buf_detach(&buf)); - } -} - -// Scan ***, **, or * and return number scanned, or 0. -// Advances position. -static int scan_delims(subject* subj, unsigned char c, bool * can_open, bool * can_close) -{ - int numdelims = 0; - unsigned char char_before, char_after; - - char_before = subj->pos == 0 ? '\n' : peek_at(subj, subj->pos - 1); - while (peek_char(subj) == c) { - numdelims++; - advance(subj); - } - char_after = peek_char(subj); - *can_open = numdelims > 0 && !isspace(char_after); - *can_close = numdelims > 0 && !isspace(char_before); - if (c == '_') { - *can_open = *can_open && !isalnum(char_before); - *can_close = *can_close && !isalnum(char_after); - } - return numdelims; -} - -/* -static void print_delimiters(subject *subj) -{ - delimiter *delim; - delim = subj->last_delim; - while (delim != NULL) { - printf("Item at %p: %d %d %d next(%p) prev(%p)\n", - delim, delim->delim_char, - delim->can_open, delim->can_close, - delim->next, delim->previous); - delim = delim->previous; - } -} -*/ - -static void remove_delimiter(subject *subj, delimiter *delim) -{ - if (delim == NULL) return; - if (delim->next == NULL) { - // end of list: - assert(delim == subj->last_delim); - subj->last_delim = delim->previous; - } else { - delim->next->previous = delim->previous; - } - if (delim->previous != NULL) { - delim->previous->next = delim->next; - } - free(delim); -} - -static void push_delimiter(subject *subj, unsigned char c, bool can_open, - bool can_close, cmark_node *inl_text) -{ - delimiter *delim = - (delimiter*)malloc(sizeof(delimiter)); - if (delim == NULL) { - return; - } - delim->delim_char = c; - delim->can_open = can_open; - delim->can_close = can_close; - delim->inl_text = inl_text; - delim->previous = subj->last_delim; - delim->next = NULL; - if (delim->previous != NULL) { - delim->previous->next = delim; - } - delim->position = subj->pos; - subj->last_delim = delim; -} - -// Parse strong/emph or a fallback. -// Assumes the subject has '_' or '*' at the current position. -static cmark_node* handle_strong_emph(subject* subj, unsigned char c) -{ - int numdelims; - cmark_node * inl_text; - bool can_open, can_close; - - numdelims = scan_delims(subj, c, &can_open, &can_close); - - inl_text = make_str(chunk_dup(&subj->input, subj->pos - numdelims, numdelims)); - - if (can_open || can_close) { - push_delimiter(subj, c, can_open, can_close, inl_text); - } - - return inl_text; -} - -static void process_emphasis(subject *subj, delimiter *start_delim) -{ - delimiter *closer = subj->last_delim; - delimiter *opener; - - // move back to first relevant delim. - while (closer != NULL && closer->previous != start_delim) { - closer = closer->previous; - } - - // now move forward, looking for closers, and handling each - while (closer != NULL) { - if (closer->can_close && - (closer->delim_char == '*' || closer->delim_char == '_')) { - // Now look backwards for first matching opener: - opener = closer->previous; - while (opener != NULL && opener != start_delim) { - if (opener->delim_char == closer->delim_char && - opener->can_open) { - break; - } - opener = opener->previous; - } - if (opener != NULL && opener != start_delim) { - closer = S_insert_emph(subj, opener, closer); - } else { - closer = closer->next; - } - } else { - closer = closer->next; - } - } - // free all delimiters in list until start_delim: - while (subj->last_delim != start_delim) { - remove_delimiter(subj, subj->last_delim); - } -} - -static delimiter* -S_insert_emph(subject *subj, delimiter *opener, delimiter *closer) -{ - delimiter *delim, *tmp_delim; - int use_delims; - cmark_node *opener_inl = opener->inl_text; - cmark_node *closer_inl = closer->inl_text; - int opener_num_chars = opener_inl->as.literal.len; - int closer_num_chars = closer_inl->as.literal.len; - cmark_node *tmp, *emph, *first_child, *last_child; - - // calculate the actual number of characters used from this closer - if (closer_num_chars < 3 || opener_num_chars < 3) { - use_delims = closer_num_chars <= opener_num_chars ? - closer_num_chars : opener_num_chars; - } else { // closer and opener both have >= 3 characters - use_delims = closer_num_chars % 2 == 0 ? 2 : 1; - } - - // remove used characters from associated inlines. - opener_num_chars -= use_delims; - closer_num_chars -= use_delims; - opener_inl->as.literal.len = opener_num_chars; - closer_inl->as.literal.len = closer_num_chars; - - // free delimiters between opener and closer - delim = closer->previous; - while (delim != NULL && delim != opener) { - tmp_delim = delim->previous; - remove_delimiter(subj, delim); - delim = tmp_delim; - } - - first_child = opener_inl->next; - last_child = closer_inl->prev; - - // if opener has 0 characters, remove it and its associated inline - if (opener_num_chars == 0) { - // replace empty opener inline with emph - chunk_free(&(opener_inl->as.literal)); - emph = opener_inl; - emph->type = use_delims == 1 ? NODE_EMPH : NODE_STRONG; - // remove opener from list - remove_delimiter(subj, opener); - } - else { - // create new emph or strong, and splice it in to our inlines - // between the opener and closer - emph = use_delims == 1 ? make_emph() : make_strong(); - emph->parent = opener_inl->parent; - emph->prev = opener_inl; - opener_inl->next = emph; - } - - // push children below emph - emph->next = closer_inl; - closer_inl->prev = emph; - emph->first_child = first_child; - emph->last_child = last_child; - - // fix children pointers - first_child->prev = NULL; - last_child->next = NULL; - for (tmp = first_child; tmp != NULL; tmp = tmp->next) { - tmp->parent = emph; - } - - // if closer has 0 characters, remove it and its associated inline - if (closer_num_chars == 0) { - // remove empty closer inline - cmark_node_free(closer_inl); - // remove closer from list - tmp_delim = closer->next; - remove_delimiter(subj, closer); - closer = tmp_delim; - } - - return closer; -} - -// Parse backslash-escape or just a backslash, returning an inline. -static cmark_node* handle_backslash(subject *subj) -{ - advance(subj); - unsigned char nextchar = peek_char(subj); - if (ispunct(nextchar)) { // only ascii symbols and newline can be escaped - advance(subj); - return make_str(chunk_dup(&subj->input, subj->pos - 1, 1)); - } else if (nextchar == '\n') { - advance(subj); - return make_linebreak(); - } else { - return make_str(chunk_literal("\\")); - } -} - -// Parse an entity or a regular "&" string. -// Assumes the subject has an '&' character at the current position. -static cmark_node* handle_entity(subject* subj) -{ - strbuf ent = GH_BUF_INIT; - size_t len; - - advance(subj); - - len = houdini_unescape_ent(&ent, - subj->input.data + subj->pos, - subj->input.len - subj->pos - ); - - if (len == 0) - return make_str(chunk_literal("&")); - - subj->pos += len; - return make_str(chunk_buf_detach(&ent)); -} - -// Like make_str, but parses entities. -// Returns an inline sequence consisting of str and entity elements. -static cmark_node *make_str_with_entities(chunk *content) -{ - strbuf unescaped = GH_BUF_INIT; - - if (houdini_unescape_html(&unescaped, content->data, (size_t)content->len)) { - return make_str(chunk_buf_detach(&unescaped)); - } else { - return make_str(*content); - } -} - -// Clean a URL: remove surrounding whitespace and surrounding <>, -// and remove \ that escape punctuation. -unsigned char *cmark_clean_url(chunk *url) -{ - strbuf buf = GH_BUF_INIT; - - chunk_trim(url); - - if (url->len == 0) - return NULL; - - if (url->data[0] == '<' && url->data[url->len - 1] == '>') { - houdini_unescape_html_f(&buf, url->data + 1, url->len - 2); - } else { - houdini_unescape_html_f(&buf, url->data, url->len); - } - - strbuf_unescape(&buf); - return strbuf_detach(&buf); -} - -unsigned char *cmark_clean_title(chunk *title) -{ - strbuf buf = GH_BUF_INIT; - unsigned char first, last; - - if (title->len == 0) - return NULL; - - first = title->data[0]; - last = title->data[title->len - 1]; - - // remove surrounding quotes if any: - if ((first == '\'' && last == '\'') || - (first == '(' && last == ')') || - (first == '"' && last == '"')) { - houdini_unescape_html_f(&buf, title->data + 1, title->len - 2); - } else { - houdini_unescape_html_f(&buf, title->data, title->len); - } - - strbuf_unescape(&buf); - return strbuf_detach(&buf); -} - -// Parse an autolink or HTML tag. -// Assumes the subject has a '<' character at the current position. -static cmark_node* handle_pointy_brace(subject* subj) -{ - int matchlen = 0; - chunk contents; - - advance(subj); // advance past first < - - // first try to match a URL autolink - matchlen = scan_autolink_uri(&subj->input, subj->pos); - if (matchlen > 0) { - contents = chunk_dup(&subj->input, subj->pos, matchlen - 1); - subj->pos += matchlen; - - return make_autolink( - make_str_with_entities(&contents), - contents, 0 - ); - } - - // next try to match an email autolink - matchlen = scan_autolink_email(&subj->input, subj->pos); - if (matchlen > 0) { - contents = chunk_dup(&subj->input, subj->pos, matchlen - 1); - subj->pos += matchlen; - - return make_autolink( - make_str_with_entities(&contents), - contents, 1 - ); - } - - // finally, try to match an html tag - matchlen = scan_html_tag(&subj->input, subj->pos); - if (matchlen > 0) { - contents = chunk_dup(&subj->input, subj->pos - 1, matchlen + 1); - subj->pos += matchlen; - return make_raw_html(contents); - } - - // if nothing matches, just return the opening <: - return make_str(chunk_literal("<")); -} - -// Parse a link label. Returns 1 if successful. -// Note: unescaped brackets are not allowed in labels. -// The label begins with `[` and ends with the first `]` character -// encountered. Backticks in labels do not start code spans. -static int link_label(subject* subj, chunk *raw_label) -{ - int startpos = subj->pos; - int length = 0; - unsigned char c; - - // advance past [ - if (peek_char(subj) == '[') { - advance(subj); - } else { - return 0; - } - - while ((c = peek_char(subj)) && c != '[' && c != ']') { - if (c == '\\') { - advance(subj); - length++; - if (ispunct(peek_char(subj))) { - advance(subj); - length++; - } - } else { - advance(subj); - length++; - } - if (length > MAX_LINK_LABEL_LENGTH) { - goto noMatch; - } - } - - if (c == ']') { // match found - *raw_label = chunk_dup(&subj->input, startpos + 1, subj->pos - (startpos + 1)); - advance(subj); // advance past ] - return 1; - } - - noMatch: - subj->pos = startpos; // rewind - return 0; - -} - -// Return a link, an image, or a literal close bracket. -static cmark_node* handle_close_bracket(subject* subj, cmark_node *parent) -{ - int initial_pos; - int starturl, endurl, starttitle, endtitle, endall; - int n; - int sps; - cmark_reference *ref; - bool is_image = false; - chunk urlchunk, titlechunk; - unsigned char *url, *title; - delimiter *opener; - delimiter *tmp_delim; - cmark_node *link_text; - cmark_node *inl; - chunk raw_label; - int found_label; - - advance(subj); // advance past ] - initial_pos = subj->pos; - - // look through list of delimiters for a [ or ! - opener = subj->last_delim; - while (opener) { - if (opener->delim_char == '[' || opener->delim_char == '!') { - break; - } - opener = opener->previous; - } - - if (opener == NULL) { - return make_str(chunk_literal("]")); - } - - // If we got here, we matched a potential link/image text. - is_image = opener->delim_char == '!'; - link_text = opener->inl_text->next; - - // Now we check to see if it's a link/image. - - // First, look for an inline link. - if (peek_char(subj) == '(' && - ((sps = scan_spacechars(&subj->input, subj->pos + 1)) > -1) && - ((n = scan_link_url(&subj->input, subj->pos + 1 + sps)) > -1)) { - - // try to parse an explicit link: - starturl = subj->pos + 1 + sps; // after ( - endurl = starturl + n; - starttitle = endurl + scan_spacechars(&subj->input, endurl); - - // ensure there are spaces btw url and title - endtitle = (starttitle == endurl) ? starttitle : - starttitle + scan_link_title(&subj->input, starttitle); - - endall = endtitle + scan_spacechars(&subj->input, endtitle); - - if (peek_at(subj, endall) == ')') { - subj->pos = endall + 1; - - urlchunk = chunk_dup(&subj->input, starturl, endurl - starturl); - titlechunk = chunk_dup(&subj->input, starttitle, endtitle - starttitle); - url = cmark_clean_url(&urlchunk); - title = cmark_clean_title(&titlechunk); - chunk_free(&urlchunk); - chunk_free(&titlechunk); - goto match; - - } else { - goto noMatch; - } - } - - // Next, look for a following [link label] that matches in refmap. - // skip spaces - subj->pos = subj->pos + scan_spacechars(&subj->input, subj->pos); - raw_label = chunk_literal(""); - found_label = link_label(subj, &raw_label); - if (!found_label || raw_label.len == 0) { - chunk_free(&raw_label); - raw_label = chunk_dup(&subj->input, opener->position, - initial_pos - opener->position - 1); - } - - if (!found_label) { - // If we have a shortcut reference link, back up - // to before the spacse we skipped. - subj->pos = initial_pos; - } - - ref = cmark_reference_lookup(subj->refmap, &raw_label); - chunk_free(&raw_label); - - if (ref != NULL) { // found - url = bufdup(ref->url); - title = bufdup(ref->title); - goto match; - } else { - goto noMatch; - } - -noMatch: - // If we fall through to here, it means we didn't match a link: - remove_delimiter(subj, opener); // remove this opener from delimiter list - subj->pos = initial_pos; - return make_str(chunk_literal("]")); - -match: - inl = opener->inl_text; - inl->type = is_image ? NODE_IMAGE : NODE_LINK; - chunk_free(&inl->as.literal); - inl->first_child = link_text; - process_emphasis(subj, opener->previous); - inl->as.link.url = url; - inl->as.link.title = title; - inl->next = NULL; - if (link_text) { - cmark_node *tmp; - link_text->prev = NULL; - for (tmp = link_text; tmp->next != NULL; tmp = tmp->next) { - tmp->parent = inl; - } - tmp->parent = inl; - inl->last_child = tmp; - } - parent->last_child = inl; - - // process_emphasis will remove this delimiter and all later ones. - // Now, if we have a link, we also want to remove earlier link - // delimiters. (This code can be removed if we decide to allow links - // inside links.) - if (!is_image) { - opener = subj->last_delim; - while (opener != NULL) { - tmp_delim = opener->previous; - if (opener->delim_char == '[') { - remove_delimiter(subj, opener); - } - opener = tmp_delim; - } - } - - return NULL; -} - -// Parse a hard or soft linebreak, returning an inline. -// Assumes the subject has a newline at the current position. -static cmark_node* handle_newline(subject *subj) -{ - int nlpos = subj->pos; - // skip over newline - advance(subj); - // skip spaces at beginning of line - while (peek_char(subj) == ' ') { - advance(subj); - } - if (nlpos > 1 && - peek_at(subj, nlpos - 1) == ' ' && - peek_at(subj, nlpos - 2) == ' ') { - return make_linebreak(); - } else { - return make_softbreak(); - } -} - -static int subject_find_special_char(subject *subj) -{ - // "\n\\`&_*[]pos + 1; - - while (n < subj->input.len) { - if (SPECIAL_CHARS[subj->input.data[n]]) - return n; - n++; - } - - return subj->input.len; -} - -// Parse an inline, advancing subject, and add it as a child of parent. -// Return 0 if no inline can be parsed, 1 otherwise. -static int parse_inline(subject* subj, cmark_node * parent) -{ - cmark_node* new_inl = NULL; - chunk contents; - unsigned char c; - int endpos; - c = peek_char(subj); - if (c == 0) { - return 0; - } - switch(c){ - case '\n': - new_inl = handle_newline(subj); - break; - case '`': - new_inl = handle_backticks(subj); - break; - case '\\': - new_inl = handle_backslash(subj); - break; - case '&': - new_inl = handle_entity(subj); - break; - case '<': - new_inl = handle_pointy_brace(subj); - break; - case '*': - case '_': - new_inl = handle_strong_emph(subj, c); - break; - case '[': - advance(subj); - new_inl = make_str(chunk_literal("[")); - push_delimiter(subj, '[', true, false, new_inl); - break; - case ']': - new_inl = handle_close_bracket(subj, parent); - break; - case '!': - advance(subj); - if (peek_char(subj) == '[') { - advance(subj); - new_inl = make_str(chunk_literal("![")); - push_delimiter(subj, '!', false, true, new_inl); - } else { - new_inl = make_str(chunk_literal("!")); - } - break; - default: - endpos = subject_find_special_char(subj); - contents = chunk_dup(&subj->input, subj->pos, endpos - subj->pos); - subj->pos = endpos; - - // if we're at a newline, strip trailing spaces. - if (peek_char(subj) == '\n') { - chunk_rtrim(&contents); - } - - new_inl = make_str(contents); - } - if (new_inl != NULL) { - cmark_node_append_child(parent, new_inl); - } - - return 1; -} - -// Parse inlines from parent's string_content, adding as children of parent. -extern void cmark_parse_inlines(cmark_node* parent, cmark_reference_map *refmap) -{ - subject subj; - subject_from_buf(&subj, &parent->string_content, refmap); - - while (!is_eof(&subj) && parse_inline(&subj, parent)) ; - - process_emphasis(&subj, NULL); -} - -// Parse zero or more space characters, including at most one newline. -static void spnl(subject* subj) -{ - bool seen_newline = false; - while (peek_char(subj) == ' ' || - (!seen_newline && - (seen_newline = peek_char(subj) == '\n'))) { - advance(subj); - } -} - -// Parse reference. Assumes string begins with '[' character. -// Modify refmap if a reference is encountered. -// Return 0 if no reference found, otherwise position of subject -// after reference is parsed. -int cmark_parse_reference_inline(strbuf *input, cmark_reference_map *refmap) -{ - subject subj; - - chunk lab; - chunk url; - chunk title; - - int matchlen = 0; - int beforetitle; - - subject_from_buf(&subj, input, NULL); - - // parse label: - if (!link_label(&subj, &lab)) - return 0; - - // colon: - if (peek_char(&subj) == ':') { - advance(&subj); - } else { - return 0; - } - - // parse link url: - spnl(&subj); - matchlen = scan_link_url(&subj.input, subj.pos); - if (matchlen) { - url = chunk_dup(&subj.input, subj.pos, matchlen); - subj.pos += matchlen; - } else { - return 0; - } - - // parse optional link_title - beforetitle = subj.pos; - spnl(&subj); - matchlen = scan_link_title(&subj.input, subj.pos); - if (matchlen) { - title = chunk_dup(&subj.input, subj.pos, matchlen); - subj.pos += matchlen; - } else { - subj.pos = beforetitle; - title = chunk_literal(""); - } - // parse final spaces and newline: - while (peek_char(&subj) == ' ') { - advance(&subj); - } - if (peek_char(&subj) == '\n') { - advance(&subj); - } else if (peek_char(&subj) != 0) { - return 0; - } - // insert reference into refmap - cmark_reference_create(refmap, &lab, &url, &title); - return subj.pos; -} diff --git a/outside/commonmark/src/inlines.h b/outside/commonmark/src/inlines.h deleted file mode 100644 index d2ccfb475..000000000 --- a/outside/commonmark/src/inlines.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef CMARK_INLINES_H -#define CMARK_INLINES_H - -#ifdef __cplusplus -extern "C" { -#endif - -unsigned char *cmark_clean_url(cmark_chunk *url); -unsigned char *cmark_clean_title(cmark_chunk *title); - -void cmark_parse_inlines(cmark_node* parent, cmark_reference_map *refmap); - -int cmark_parse_reference_inline(cmark_strbuf *input, cmark_reference_map *refmap); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/outside/commonmark/src/main.c b/outside/commonmark/src/main.c deleted file mode 100644 index 6134b135f..000000000 --- a/outside/commonmark/src/main.c +++ /dev/null @@ -1,114 +0,0 @@ -#include -#include -#include -#include -#include "config.h" -#include "cmark.h" -#include "debug.h" -#include "bench.h" - -void print_usage() -{ - printf("Usage: cmark [FILE*]\n"); - printf("Options: --help, -h Print usage information\n"); - printf(" --ast Print AST instead of HTML\n"); - printf(" --version Print version\n"); -} - -static void print_document(cmark_node *document, bool ast) -{ - char *result; - if (ast) { - result = cmark_render_ast(document); - } else { - - result = cmark_render_html(document); - } - printf("%s", result); - free(result); -} - -int main(int argc, char *argv[]) -{ - int i, numfps = 0; - bool ast = false; - int *files; - char buffer[4096]; - cmark_parser *parser; - size_t bytes; - cmark_node *document; - - parser = cmark_parser_new(); - files = (int *)malloc(argc * sizeof(*files)); - - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "--version") == 0) { - printf("cmark %s", CMARK_VERSION); - printf(" - CommonMark converter (c) 2014 John MacFarlane\n"); - exit(0); - } else if ((strcmp(argv[i], "--help") == 0) || - (strcmp(argv[i], "-h") == 0)) { - print_usage(); - exit(0); - } else if (strcmp(argv[i], "--ast") == 0) { - ast = true; - } else if (*argv[i] == '-') { - print_usage(); - exit(1); - } else { // treat as file argument - files[numfps++] = i; - } - } - - for (i = 0; i < numfps; i++) { - FILE *fp = fopen(argv[files[i]], "r"); - if (fp == NULL) { - fprintf(stderr, "Error opening file %s: %s\n", - argv[files[i]], strerror(errno)); - exit(1); - } - - start_timer(); - while ((bytes = fread(buffer, 1, sizeof(buffer), fp)) > 0) { - cmark_parser_feed(parser, buffer, bytes); - if (bytes < sizeof(buffer)) { - break; - } - } - end_timer("processing lines"); - - fclose(fp); - } - - if (numfps == 0) { - /* - document = cmark_parse_file(stdin); - print_document(document, ast); - exit(0); - */ - - while ((bytes = fread(buffer, 1, sizeof(buffer), stdin)) > 0) { - cmark_parser_feed(parser, buffer, bytes); - if (bytes < sizeof(buffer)) { - break; - } - } - } - - start_timer(); - document = cmark_parser_finish(parser); - end_timer("finishing document"); - cmark_parser_free(parser); - - start_timer(); - print_document(document, ast); - end_timer("print_document"); - - start_timer(); - cmark_node_free(document); - end_timer("free_blocks"); - - free(files); - - return 0; -} diff --git a/outside/commonmark/src/node.c b/outside/commonmark/src/node.c deleted file mode 100644 index fd92fdc6d..000000000 --- a/outside/commonmark/src/node.c +++ /dev/null @@ -1,655 +0,0 @@ -#include -#include - -#include "config.h" -#include "node.h" - -static void -S_node_unlink(cmark_node *node); - -cmark_node* -cmark_node_new(cmark_node_type type) { - cmark_node *node = (cmark_node *)calloc(1, sizeof(*node)); - node->type = type; - - switch (node->type) { - case CMARK_NODE_HEADER: - node->as.header.level = 1; - break; - - case CMARK_NODE_LIST: { - cmark_list *list = &node->as.list; - list->list_type = CMARK_BULLET_LIST; - list->start = 1; - list->tight = false; - break; - } - - default: - break; - } - - return node; -} - -// Free a cmark_node list and any children. -static -void S_free_nodes(cmark_node *e) -{ - cmark_node *next; - while (e != NULL) { - strbuf_free(&e->string_content); - switch (e->type){ - case NODE_CODE_BLOCK: - strbuf_free(&e->as.code.info); - break; - case NODE_TEXT: - case NODE_INLINE_HTML: - case NODE_INLINE_CODE: - cmark_chunk_free(&e->as.literal); - break; - case NODE_LINK: - case NODE_IMAGE: - free(e->as.link.url); - free(e->as.link.title); - break; - default: - break; - } - if (e->last_child) { - // Splice children into list - e->last_child->next = e->next; - e->next = e->first_child; - } - next = e->next; - free(e); - e = next; - } -} - -void -cmark_node_free(cmark_node *node) { - S_node_unlink(node); - node->next = NULL; - S_free_nodes(node); -} - -cmark_node_type -cmark_node_get_type(cmark_node *node) -{ - return node->type; -} - -static const char* -S_type_string(cmark_node *node) -{ - switch (node->type) { - case CMARK_NODE_DOCUMENT: return "DOCUMENT"; - case CMARK_NODE_BLOCK_QUOTE: return "BLOCK_QUOTE"; - case CMARK_NODE_LIST: return "LIST"; - case CMARK_NODE_LIST_ITEM: return "LIST_ITEM"; - case CMARK_NODE_CODE_BLOCK: return "CODE_BLOCK"; - case CMARK_NODE_HTML: return "HTML"; - case CMARK_NODE_PARAGRAPH: return "PARAGRAPH"; - case CMARK_NODE_HEADER: return "HEADER"; - case CMARK_NODE_HRULE: return "HRULE"; - case CMARK_NODE_REFERENCE_DEF: return "REFERENCE_DEF"; - case CMARK_NODE_TEXT: return "TEXT"; - case CMARK_NODE_SOFTBREAK: return "SOFTBREAK"; - case CMARK_NODE_LINEBREAK: return "LINEBREAK"; - case CMARK_NODE_INLINE_CODE: return "INLINE_CODE"; - case CMARK_NODE_INLINE_HTML: return "INLINE_HTML"; - case CMARK_NODE_EMPH: return "EMPH"; - case CMARK_NODE_STRONG: return "STRONG"; - case CMARK_NODE_LINK: return "LINK"; - case CMARK_NODE_IMAGE: return "IMAGE"; - } - - return ""; -} - -cmark_node* -cmark_node_next(cmark_node *node) -{ - return node->next; -} - -cmark_node* -cmark_node_previous(cmark_node *node) -{ - return node->prev; -} - -cmark_node* -cmark_node_parent(cmark_node *node) -{ - return node->parent; -} - -cmark_node* -cmark_node_first_child(cmark_node *node) -{ - return node->first_child; -} - -cmark_node* -cmark_node_last_child(cmark_node *node) -{ - return node->last_child; -} - -static char* -S_strdup(const char *str) { - size_t size = strlen(str) + 1; - char *dup = (char *)malloc(size); - memcpy(dup, str, size); - return dup; -} - -const char* -cmark_node_get_string_content(cmark_node *node) { - switch (node->type) { - case NODE_CODE_BLOCK: - case NODE_HTML: - return cmark_strbuf_cstr(&node->string_content); - - case NODE_TEXT: - case NODE_INLINE_HTML: - case NODE_INLINE_CODE: - return cmark_chunk_to_cstr(&node->as.literal); - - default: - break; - } - - return NULL; -} - -int -cmark_node_set_string_content(cmark_node *node, const char *content) { - switch (node->type) { - case NODE_CODE_BLOCK: - case NODE_HTML: - cmark_strbuf_sets(&node->string_content, content); - return 1; - - case NODE_TEXT: - case NODE_INLINE_HTML: - case NODE_INLINE_CODE: - cmark_chunk_set_cstr(&node->as.literal, content); - return 1; - - default: - break; - } - - return 0; -} - -int -cmark_node_get_header_level(cmark_node *node) { - switch (node->type) { - case CMARK_NODE_HEADER: - return node->as.header.level; - - default: - break; - } - - return 0; -} - -int -cmark_node_set_header_level(cmark_node *node, int level) { - if (level < 1 || level > 6) { - return 0; - } - - switch (node->type) { - case CMARK_NODE_HEADER: - node->as.header.level = level; - return 1; - - default: - break; - } - - return 0; -} - -cmark_list_type -cmark_node_get_list_type(cmark_node *node) { - if (node->type == CMARK_NODE_LIST) { - return node->as.list.list_type; - } - else { - return CMARK_NO_LIST; - } -} - -int -cmark_node_set_list_type(cmark_node *node, cmark_list_type type) { - if (!(type == CMARK_BULLET_LIST || type == CMARK_ORDERED_LIST)) { - return 0; - } - - if (node->type == CMARK_NODE_LIST) { - node->as.list.list_type = type; - return 1; - } - else { - return 0; - } -} - -int -cmark_node_get_list_start(cmark_node *node) { - if (node->type == CMARK_NODE_LIST) { - return node->as.list.start; - } - else { - return 0; - } -} - -int -cmark_node_set_list_start(cmark_node *node, int start) { - if (start < 0) { - return 0; - } - - if (node->type == CMARK_NODE_LIST) { - node->as.list.start = start; - return 1; - } - else { - return 0; - } -} - -int -cmark_node_get_list_tight(cmark_node *node) { - if (node->type == CMARK_NODE_LIST) { - return node->as.list.tight; - } - else { - return 0; - } -} - -int -cmark_node_set_list_tight(cmark_node *node, int tight) { - if (node->type == CMARK_NODE_LIST) { - node->as.list.tight = tight; - return 1; - } - else { - return 0; - } -} - -const char* -cmark_node_get_fence_info(cmark_node *node) { - if (node->type == NODE_CODE_BLOCK) { - return cmark_strbuf_cstr(&node->as.code.info); - } - else { - return NULL; - } -} - -int -cmark_node_set_fence_info(cmark_node *node, const char *info) { - if (node->type == NODE_CODE_BLOCK) { - cmark_strbuf_sets(&node->as.code.info, info); - return 1; - } - else { - return 0; - } -} - -const char* -cmark_node_get_url(cmark_node *node) { - switch (node->type) { - case NODE_LINK: - case NODE_IMAGE: - return (char *)node->as.link.url; - default: - break; - } - - return NULL; -} - -int -cmark_node_set_url(cmark_node *node, const char *url) { - switch (node->type) { - case NODE_LINK: - case NODE_IMAGE: - free(node->as.link.url); - node->as.link.url = (unsigned char *)S_strdup(url); - return 1; - default: - break; - } - - return 0; -} - -const char* -cmark_node_get_title(cmark_node *node) { - switch (node->type) { - case NODE_LINK: - case NODE_IMAGE: - return (char *)node->as.link.title; - default: - break; - } - - return NULL; -} - -int -cmark_node_set_title(cmark_node *node, const char *title) { - switch (node->type) { - case NODE_LINK: - case NODE_IMAGE: - free(node->as.link.title); - node->as.link.title = (unsigned char *)S_strdup(title); - return 1; - default: - break; - } - - return 0; -} - -int -cmark_node_get_start_line(cmark_node *node) { - return node->start_line; -} - -int -cmark_node_get_start_column(cmark_node *node) { - return node->start_column; -} - -int -cmark_node_get_end_line(cmark_node *node) { - return node->end_line; -} - -static inline bool -S_is_block(cmark_node *node) { - return node->type >= CMARK_NODE_FIRST_BLOCK - && node->type <= CMARK_NODE_LAST_BLOCK; -} - -static inline bool -S_is_inline(cmark_node *node) { - return node->type >= CMARK_NODE_FIRST_INLINE - && node->type <= CMARK_NODE_LAST_INLINE; -} - -static bool -S_can_contain(cmark_node *node, cmark_node *child) -{ - cmark_node *cur; - - // Verify that child is not an ancestor of node or equal to node. - cur = node; - do { - if (cur == child) { - return false; - } - cur = cur->parent; - } while (cur != NULL); - - if (child->type == CMARK_NODE_DOCUMENT) { - return false; - } - - switch (node->type) { - case CMARK_NODE_DOCUMENT: - case CMARK_NODE_BLOCK_QUOTE: - case CMARK_NODE_LIST_ITEM: - return S_is_block(child) - && child->type != CMARK_NODE_LIST_ITEM; - - case CMARK_NODE_LIST: - return child->type == CMARK_NODE_LIST_ITEM; - - case CMARK_NODE_PARAGRAPH: - case CMARK_NODE_HEADER: - case CMARK_NODE_EMPH: - case CMARK_NODE_STRONG: - case CMARK_NODE_LINK: - case CMARK_NODE_IMAGE: - return S_is_inline(child); - - default: - break; - } - - return false; -} - -// Unlink a node without adjusting its next, prev, and parent pointers. -static void -S_node_unlink(cmark_node *node) -{ - if (node->prev) { - node->prev->next = node->next; - } - if (node->next) { - node->next->prev = node->prev; - } - - // Adjust first_child and last_child of parent. - cmark_node *parent = node->parent; - if (parent) { - if (parent->first_child == node) { - parent->first_child = node->next; - } - if (parent->last_child == node) { - parent->last_child = node->prev; - } - } -} - -void -cmark_node_unlink(cmark_node *node) { - S_node_unlink(node); - - node->next = NULL; - node->prev = NULL; - node->parent = NULL; - -} - -int -cmark_node_insert_before(cmark_node *node, cmark_node *sibling) -{ - if (!node->parent || !S_can_contain(node->parent, sibling)) { - return 0; - } - - S_node_unlink(sibling); - - cmark_node *old_prev = node->prev; - - // Insert 'sibling' between 'old_prev' and 'node'. - if (old_prev) { - old_prev->next = sibling; - } - sibling->prev = old_prev; - sibling->next = node; - node->prev = sibling; - - // Set new parent. - cmark_node *parent = node->parent; - sibling->parent = parent; - - // Adjust first_child of parent if inserted as first child. - if (parent && !old_prev) { - parent->first_child = sibling; - } - - return 1; -} - -int -cmark_node_insert_after(cmark_node *node, cmark_node *sibling) -{ - if (!node->parent || !S_can_contain(node->parent, sibling)) { - return 0; - } - - S_node_unlink(sibling); - - cmark_node *old_next = node->next; - - // Insert 'sibling' between 'node' and 'old_next'. - if (old_next) { - old_next->prev = sibling; - } - sibling->next = old_next; - sibling->prev = node; - node->next = sibling; - - // Set new parent. - cmark_node *parent = node->parent; - sibling->parent = parent; - - // Adjust last_child of parent if inserted as last child. - if (parent && !old_next) { - parent->last_child = sibling; - } - - return 1; -} - -int -cmark_node_prepend_child(cmark_node *node, cmark_node *child) -{ - if (!S_can_contain(node, child)) { - return 0; - } - - S_node_unlink(child); - - cmark_node *old_first_child = node->first_child; - - child->next = old_first_child; - child->prev = NULL; - child->parent = node; - node->first_child = child; - - if (old_first_child) { - old_first_child->prev = child; - } - else { - // Also set last_child if node previously had no children. - node->last_child = child; - } - - return 1; -} - -int -cmark_node_append_child(cmark_node *node, cmark_node *child) -{ - if (!S_can_contain(node, child)) { - return 0; - } - - S_node_unlink(child); - - cmark_node *old_last_child = node->last_child; - - child->next = NULL; - child->prev = old_last_child; - child->parent = node; - node->last_child = child; - - if (old_last_child) { - old_last_child->next = child; - } - else { - // Also set first_child if node previously had no children. - node->first_child = child; - } - - return 1; -} - -static void -S_print_error(FILE *out, cmark_node *node, const char *elem) -{ - if (out == NULL) { - return; - } - fprintf(out, "Invalid '%s' in node type %s at %d:%d\n", elem, - S_type_string(node), node->start_line, node->start_column); -} - -int -cmark_node_check(cmark_node *node, FILE *out) -{ - cmark_node *cur; - int errors = 0; - - if (!node) { - return 0; - } - - cur = node; - while (true) { - if (cur->first_child) { - if (cur->first_child->prev != NULL) { - S_print_error(out, cur->first_child, "prev"); - cur->first_child->prev = NULL; - ++errors; - } - if (cur->first_child->parent != cur) { - S_print_error(out, cur->first_child, "parent"); - cur->first_child->parent = cur; - ++errors; - } - cur = cur->first_child; - continue; - } - - next_sibling: - if (cur == node) { - break; - } - if (cur->next) { - if (cur->next->prev != cur) { - S_print_error(out, cur->next, "prev"); - cur->next->prev = cur; - ++errors; - } - if (cur->next->parent != cur->parent) { - S_print_error(out, cur->next, "parent"); - cur->next->parent = cur->parent; - ++errors; - } - cur = cur->next; - continue; - } - - if (cur->parent->last_child != cur) { - S_print_error(out, cur->parent, "last_child"); - cur->parent->last_child = cur; - ++errors; - } - cur = cur->parent; - goto next_sibling; - } - - return errors; -} - - diff --git a/outside/commonmark/src/node.h b/outside/commonmark/src/node.h deleted file mode 100644 index b842ed80e..000000000 --- a/outside/commonmark/src/node.h +++ /dev/null @@ -1,76 +0,0 @@ -#ifndef CMARK_NODE_H -#define CMARK_NODE_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#include "cmark.h" -#include "buffer.h" -#include "chunk.h" - -typedef struct { - cmark_list_type list_type; - int marker_offset; - int padding; - int start; - cmark_delim_type delimiter; - unsigned char bullet_char; - bool tight; -} cmark_list; - -typedef struct { - bool fenced; - int fence_length; - int fence_offset; - unsigned char fence_char; - cmark_strbuf info; -} cmark_code; - -typedef struct { - int level; - bool setext; -} cmark_header; - -typedef struct { - unsigned char *url; - unsigned char *title; -} cmark_link; - -struct cmark_node { - cmark_node_type type; - - struct cmark_node *next; - struct cmark_node *prev; - struct cmark_node *parent; - struct cmark_node *first_child; - struct cmark_node *last_child; - - int start_line; - int start_column; - int end_line; - bool open; - bool last_line_blank; - - cmark_strbuf string_content; - - union { - cmark_chunk literal; - cmark_list list; - cmark_code code; - cmark_header header; - cmark_link link; - } as; -}; - -CMARK_EXPORT int -cmark_node_check(cmark_node *node, FILE *out); - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/outside/commonmark/src/parser.h b/outside/commonmark/src/parser.h deleted file mode 100644 index 9d65b6755..000000000 --- a/outside/commonmark/src/parser.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef CMARK_AST_H -#define CMARK_AST_H - -#include -#include "node.h" -#include "buffer.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define MAX_LINK_LABEL_LENGTH 1000 - -struct cmark_parser { - struct cmark_reference_map *refmap; - struct cmark_node* root; - struct cmark_node* current; - int line_number; - cmark_strbuf *curline; - cmark_strbuf *linebuf; -}; - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/outside/commonmark/src/print.c b/outside/commonmark/src/print.c deleted file mode 100644 index d2dfe8c36..000000000 --- a/outside/commonmark/src/print.c +++ /dev/null @@ -1,169 +0,0 @@ -#include -#include -#include -#include "cmark.h" -#include "buffer.h" -#include "node.h" - -#define INDENT 2 - -static void print_str(strbuf* buffer, const unsigned char *s, int len) -{ - int i; - - if (len < 0) - len = strlen((char *)s); - - strbuf_putc(buffer, '"'); - for (i = 0; i < len; ++i) { - unsigned char c = s[i]; - - switch (c) { - case '\n': - strbuf_printf(buffer, "\\n"); - break; - case '"': - strbuf_printf(buffer, "\\\""); - break; - case '\\': - strbuf_printf(buffer, "\\\\"); - break; - default: - strbuf_putc(buffer, (int)c); - } - } - strbuf_putc(buffer, '"'); -} - -// Prettyprint an inline list, for debugging. -static void render_nodes(strbuf* buffer, cmark_node* node, int indent) -{ - int i; - cmark_list *data; - - while(node != NULL) { - for (i=0; i < indent; i++) { - strbuf_putc(buffer, ' '); - } - switch(node->type) { - case NODE_DOCUMENT: - break; - case NODE_BLOCK_QUOTE: - strbuf_printf(buffer, "block_quote\n"); - break; - case NODE_LIST_ITEM: - strbuf_printf(buffer, "list_item\n"); - break; - case NODE_LIST: - data = &(node->as.list); - if (data->list_type == CMARK_ORDERED_LIST) { - strbuf_printf(buffer, "list (type=ordered tight=%s start=%d delim=%s)\n", - (data->tight ? "true" : "false"), - data->start, - (data->delimiter == CMARK_PAREN_DELIM ? "parens" : "period")); - } else { - strbuf_printf(buffer, "list (type=bullet tight=%s bullet_char=%c)\n", - (data->tight ? "true" : "false"), - data->bullet_char); - } - break; - case NODE_HEADER: - strbuf_printf(buffer, "header (level=%d)\n", node->as.header.level); - break; - case NODE_PARAGRAPH: - strbuf_printf(buffer, "paragraph\n"); - break; - case NODE_HRULE: - strbuf_printf(buffer, "hrule\n"); - break; - case NODE_CODE_BLOCK: - strbuf_printf(buffer, "code_block info="); - print_str(buffer, node->as.code.info.ptr, -1); - strbuf_putc(buffer, ' '); - print_str(buffer, node->string_content.ptr, -1); - strbuf_putc(buffer, '\n'); - break; - case NODE_HTML: - strbuf_printf(buffer, "html "); - print_str(buffer, node->string_content.ptr, -1); - strbuf_putc(buffer, '\n'); - break; - case NODE_REFERENCE_DEF: - // skip - // strbuf_printf(buffer, "reference_def\n"); - break; - case NODE_TEXT: - strbuf_printf(buffer, "text "); - print_str(buffer, node->as.literal.data, node->as.literal.len); - strbuf_putc(buffer, '\n'); - break; - case NODE_LINEBREAK: - strbuf_printf(buffer, "linebreak\n"); - break; - case NODE_SOFTBREAK: - strbuf_printf(buffer, "softbreak\n"); - break; - case NODE_INLINE_CODE: - strbuf_printf(buffer, "code "); - print_str(buffer, node->as.literal.data, node->as.literal.len); - strbuf_putc(buffer, '\n'); - break; - case NODE_INLINE_HTML: - strbuf_printf(buffer, "inline_html "); - print_str(buffer, node->as.literal.data, node->as.literal.len); - strbuf_putc(buffer, '\n'); - break; - case NODE_LINK: - case NODE_IMAGE: - strbuf_printf(buffer, "%s url=", node->type == NODE_LINK ? "link" : "image"); - - if (node->as.link.url) - print_str(buffer, node->as.link.url, -1); - - if (node->as.link.title) { - strbuf_printf(buffer, " title="); - print_str(buffer, node->as.link.title, -1); - } - strbuf_putc(buffer, '\n'); - break; - case NODE_STRONG: - strbuf_printf(buffer, "strong\n"); - break; - case NODE_EMPH: - strbuf_printf(buffer, "emph\n"); - break; - default: - break; - } - if (node->first_child) { // render children if any - indent += INDENT; - node = node->first_child; - } else if (node->next) { // otherwise render next sibling - node = node->next; - } else { - node = node->parent; // back up to parent - while (node) { - indent -= INDENT; - if (node->next) { - node = node->next; - break; - } else { - node = node->parent; - } - if (!node) { - break; - } - } - } - } -} - -char *cmark_render_ast(cmark_node *root) -{ - char* result; - strbuf buffer = GH_BUF_INIT; - render_nodes(&buffer, root, -2); - result = (char *)strbuf_detach(&buffer); - strbuf_free(&buffer); - return result; -} diff --git a/outside/commonmark/src/references.c b/outside/commonmark/src/references.c deleted file mode 100644 index 2b1d0a710..000000000 --- a/outside/commonmark/src/references.c +++ /dev/null @@ -1,154 +0,0 @@ -#include "cmark.h" -#include "utf8.h" -#include "parser.h" -#include "references.h" -#include "inlines.h" -#include "chunk.h" - -static unsigned int -refhash(const unsigned char *link_ref) -{ - unsigned int hash = 0; - - while (*link_ref) - hash = (*link_ref++) + (hash << 6) + (hash << 16) - hash; - - return hash; -} - -static void reference_free(cmark_reference *ref) -{ - if(ref != NULL) { - free(ref->label); - free(ref->url); - free(ref->title); - free(ref); - } -} - -// normalize reference: collapse internal whitespace to single space, -// remove leading/trailing whitespace, case fold -// Return NULL if the reference name is actually empty (i.e. composed -// solely from whitespace) -static unsigned char *normalize_reference(chunk *ref) -{ - strbuf normalized = GH_BUF_INIT; - unsigned char *result; - - if(ref == NULL) - return NULL; - - if (ref->len == 0) - return NULL; - - utf8proc_case_fold(&normalized, ref->data, ref->len); - strbuf_trim(&normalized); - strbuf_normalize_whitespace(&normalized); - - result = strbuf_detach(&normalized); - assert(result); - - if (result[0] == '\0') { - free(result); - return NULL; - } - - return result; -} - -static void add_reference(cmark_reference_map *map, cmark_reference* ref) -{ - cmark_reference *t = ref->next = map->table[ref->hash % REFMAP_SIZE]; - - while (t) { - if (t->hash == ref->hash && - !strcmp((char *)t->label, (char *)ref->label)) { - reference_free(ref); - return; - } - - t = t->next; - } - - map->table[ref->hash % REFMAP_SIZE] = ref; -} - -void cmark_reference_create(cmark_reference_map *map, chunk *label, chunk *url, - chunk *title) -{ - cmark_reference *ref; - unsigned char *reflabel = normalize_reference(label); - - /* empty reference name, or composed from only whitespace */ - if (reflabel == NULL) - return; - - ref = (cmark_reference *)calloc(1, sizeof(*ref)); - if(ref != NULL) { - ref->label = reflabel; - ref->hash = refhash(ref->label); - ref->url = cmark_clean_url(url); - ref->title = cmark_clean_title(title); - ref->next = NULL; - - add_reference(map, ref); - } -} - -// Returns reference if refmap contains a reference with matching -// label, otherwise NULL. -cmark_reference* cmark_reference_lookup(cmark_reference_map *map, chunk *label) -{ - cmark_reference *ref = NULL; - unsigned char *norm; - unsigned int hash; - - if (label->len > MAX_LINK_LABEL_LENGTH) - return NULL; - - if (map == NULL) - return NULL; - - norm = normalize_reference(label); - if (norm == NULL) - return NULL; - - hash = refhash(norm); - ref = map->table[hash % REFMAP_SIZE]; - - while (ref) { - if (ref->hash == hash && - !strcmp((char *)ref->label, (char *)norm)) - break; - ref = ref->next; - } - - free(norm); - return ref; -} - -void cmark_reference_map_free(cmark_reference_map *map) -{ - unsigned int i; - - if(map == NULL) - return; - - for (i = 0; i < REFMAP_SIZE; ++i) { - cmark_reference *ref = map->table[i]; - cmark_reference *next; - - while (ref) { - next = ref->next; - reference_free(ref); - ref = next; - } - } - - free(map); -} - -cmark_reference_map *cmark_reference_map_new(void) -{ - return (cmark_reference_map *)calloc(1, sizeof(cmark_reference_map)); -} diff --git a/outside/commonmark/src/references.h b/outside/commonmark/src/references.h deleted file mode 100644 index 69325bbd8..000000000 --- a/outside/commonmark/src/references.h +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef CMARK_REFERENCES_H -#define CMARK_REFERENCES_H - -#include "chunk.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define REFMAP_SIZE 16 - -struct cmark_reference { - struct cmark_reference *next; - unsigned char *label; - unsigned char *url; - unsigned char *title; - unsigned int hash; -}; - -typedef struct cmark_reference cmark_reference; - -struct cmark_reference_map { - cmark_reference *table[REFMAP_SIZE]; -}; - -typedef struct cmark_reference_map cmark_reference_map; - -cmark_reference_map *cmark_reference_map_new(void); -void cmark_reference_map_free(cmark_reference_map *map); -cmark_reference* cmark_reference_lookup(cmark_reference_map *map, cmark_chunk *label); -extern void cmark_reference_create(cmark_reference_map *map, cmark_chunk *label, cmark_chunk *url, cmark_chunk *title); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/outside/commonmark/src/scanners.c b/outside/commonmark/src/scanners.c deleted file mode 100644 index 6728c07d3..000000000 --- a/outside/commonmark/src/scanners.c +++ /dev/null @@ -1,12398 +0,0 @@ -/* Generated by re2c 0.13.6 */ -#include -#include "chunk.h" -#include "scanners.h" - -int _scan_at(int (*scanner)(const unsigned char *), chunk *c, int offset) -{ - int res; - unsigned char *ptr = (unsigned char *)c->data; - unsigned char lim = ptr[c->len]; - - ptr[c->len] = '\0'; - res = scanner(ptr + offset); - ptr[c->len] = lim; - - return res; -} - - - -// Try to match URI autolink after first <, returning number of chars matched. -int _scan_autolink_uri(const unsigned char *p) -{ - const unsigned char *marker = NULL; - const unsigned char *start = p; - -{ - unsigned char yych; - static const unsigned char yybm[] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 0, 128, 0, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 0, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - }; - - yych = *p; - switch (yych) { - case '\n': goto yy2; - case 'A': - case 'a': goto yy6; - case 'B': - case 'b': goto yy24; - case 'C': - case 'c': goto yy3; - case 'D': - case 'd': goto yy4; - case 'E': - case 'e': goto yy25; - case 'F': - case 'f': goto yy7; - case 'G': - case 'g': goto yy8; - case 'H': - case 'h': goto yy9; - case 'I': - case 'i': goto yy10; - case 'J': - case 'j': goto yy5; - case 'K': - case 'k': goto yy26; - case 'L': - case 'l': goto yy11; - case 'M': - case 'm': goto yy12; - case 'N': - case 'n': goto yy13; - case 'O': - case 'o': goto yy14; - case 'P': - case 'p': goto yy15; - case 'Q': - case 'q': goto yy27; - case 'R': - case 'r': goto yy16; - case 'S': - case 's': goto yy17; - case 'T': - case 't': goto yy18; - case 'U': - case 'u': goto yy19; - case 'V': - case 'v': goto yy20; - case 'W': - case 'w': goto yy21; - case 'X': - case 'x': goto yy22; - case 'Y': - case 'y': goto yy28; - case 'Z': - case 'z': goto yy23; - default: goto yy29; - } -yy2: - { return 0; } -yy3: - yych = *(marker = ++p); - switch (yych) { - case 'A': - case 'a': goto yy443; - case 'H': - case 'h': goto yy442; - case 'I': - case 'i': goto yy445; - case 'O': - case 'o': goto yy441; - case 'R': - case 'r': goto yy444; - case 'V': - case 'v': goto yy440; - default: goto yy2; - } -yy4: - yych = *(marker = ++p); - switch (yych) { - case 'A': - case 'a': goto yy416; - case 'I': - case 'i': goto yy415; - case 'L': - case 'l': goto yy413; - case 'N': - case 'n': goto yy414; - case 'O': - case 'o': goto yy417; - case 'T': - case 't': goto yy412; - case 'V': - case 'v': goto yy411; - default: goto yy2; - } -yy5: - yych = *(marker = ++p); - if (yych <= 'M') { - if (yych == 'A') goto yy403; - if (yych <= 'L') goto yy2; - goto yy402; - } else { - if (yych <= 'a') { - if (yych <= '`') goto yy2; - goto yy403; - } else { - if (yych == 'm') goto yy402; - goto yy2; - } - } -yy6: - yych = *(marker = ++p); - switch (yych) { - case 'A': - case 'a': goto yy384; - case 'B': - case 'b': goto yy383; - case 'C': - case 'c': goto yy382; - case 'D': - case 'd': goto yy381; - case 'F': - case 'f': goto yy380; - case 'I': - case 'i': goto yy379; - case 'P': - case 'p': goto yy378; - case 'T': - case 't': goto yy377; - case 'W': - case 'w': goto yy34; - default: goto yy2; - } -yy7: - yych = *(marker = ++p); - if (yych <= 'T') { - if (yych <= 'E') { - if (yych == 'A') goto yy364; - if (yych <= 'D') goto yy2; - goto yy363; - } else { - if (yych == 'I') goto yy362; - if (yych <= 'S') goto yy2; - goto yy365; - } - } else { - if (yych <= 'e') { - if (yych == 'a') goto yy364; - if (yych <= 'd') goto yy2; - goto yy363; - } else { - if (yych <= 'i') { - if (yych <= 'h') goto yy2; - goto yy362; - } else { - if (yych == 't') goto yy365; - goto yy2; - } - } - } -yy8: - yych = *(marker = ++p); - switch (yych) { - case 'E': - case 'e': goto yy347; - case 'G': - case 'g': goto yy34; - case 'I': - case 'i': goto yy345; - case 'O': - case 'o': goto yy346; - case 'T': - case 't': goto yy344; - default: goto yy2; - } -yy9: - yych = *(marker = ++p); - if (yych <= 'S') { - if (yych <= '3') { - if (yych <= '2') goto yy2; - goto yy340; - } else { - if (yych == 'C') goto yy338; - goto yy2; - } - } else { - if (yych <= 'c') { - if (yych <= 'T') goto yy339; - if (yych <= 'b') goto yy2; - goto yy338; - } else { - if (yych == 't') goto yy339; - goto yy2; - } - } -yy10: - yych = *(marker = ++p); - switch (yych) { - case 'A': - case 'a': goto yy320; - case 'C': - case 'c': goto yy317; - case 'M': - case 'm': goto yy319; - case 'N': - case 'n': goto yy318; - case 'P': - case 'p': goto yy316; - case 'R': - case 'r': goto yy315; - case 'T': - case 't': goto yy314; - default: goto yy2; - } -yy11: - yych = *(marker = ++p); - if (yych <= 'D') { - if (yych == 'A') goto yy308; - if (yych <= 'C') goto yy2; - goto yy307; - } else { - if (yych <= 'a') { - if (yych <= '`') goto yy2; - goto yy308; - } else { - if (yych == 'd') goto yy307; - goto yy2; - } - } -yy12: - yych = *(marker = ++p); - switch (yych) { - case 'A': - case 'a': goto yy274; - case 'E': - case 'e': goto yy273; - case 'I': - case 'i': goto yy276; - case 'M': - case 'm': goto yy272; - case 'S': - case 's': goto yy271; - case 'T': - case 't': goto yy275; - case 'U': - case 'u': goto yy270; - case 'V': - case 'v': goto yy269; - default: goto yy2; - } -yy13: - yych = *(marker = ++p); - switch (yych) { - case 'E': - case 'e': goto yy264; - case 'F': - case 'f': goto yy263; - case 'I': - case 'i': goto yy262; - case 'N': - case 'n': goto yy261; - case 'O': - case 'o': goto yy260; - default: goto yy2; - } -yy14: - yych = *(marker = ++p); - if (yych <= 'P') { - if (yych == 'I') goto yy246; - if (yych <= 'O') goto yy2; - goto yy247; - } else { - if (yych <= 'i') { - if (yych <= 'h') goto yy2; - goto yy246; - } else { - if (yych == 'p') goto yy247; - goto yy2; - } - } -yy15: - yych = *(marker = ++p); - if (yych <= 'S') { - if (yych <= 'L') { - if (yych == 'A') goto yy228; - if (yych <= 'K') goto yy2; - goto yy227; - } else { - if (yych <= 'O') { - if (yych <= 'N') goto yy2; - goto yy229; - } else { - if (yych <= 'Q') goto yy2; - if (yych <= 'R') goto yy226; - goto yy225; - } - } - } else { - if (yych <= 'n') { - if (yych <= 'a') { - if (yych <= '`') goto yy2; - goto yy228; - } else { - if (yych == 'l') goto yy227; - goto yy2; - } - } else { - if (yych <= 'q') { - if (yych <= 'o') goto yy229; - goto yy2; - } else { - if (yych <= 'r') goto yy226; - if (yych <= 's') goto yy225; - goto yy2; - } - } - } -yy16: - yych = *(marker = ++p); - if (yych <= 'T') { - if (yych <= 'L') { - if (yych == 'E') goto yy215; - goto yy2; - } else { - if (yych <= 'M') goto yy214; - if (yych <= 'R') goto yy2; - if (yych <= 'S') goto yy213; - goto yy212; - } - } else { - if (yych <= 'm') { - if (yych == 'e') goto yy215; - if (yych <= 'l') goto yy2; - goto yy214; - } else { - if (yych <= 'r') goto yy2; - if (yych <= 's') goto yy213; - if (yych <= 't') goto yy212; - goto yy2; - } - } -yy17: - yych = *(marker = ++p); - switch (yych) { - case 'E': - case 'e': goto yy168; - case 'F': - case 'f': goto yy167; - case 'G': - case 'g': goto yy166; - case 'H': - case 'h': goto yy171; - case 'I': - case 'i': goto yy170; - case 'K': - case 'k': goto yy165; - case 'M': - case 'm': goto yy164; - case 'N': - case 'n': goto yy169; - case 'O': - case 'o': goto yy163; - case 'P': - case 'p': goto yy162; - case 'S': - case 's': goto yy161; - case 'T': - case 't': goto yy160; - case 'V': - case 'v': goto yy159; - default: goto yy2; - } -yy18: - yych = *(marker = ++p); - switch (yych) { - case 'A': - case 'a': goto yy135; - case 'E': - case 'e': goto yy131; - case 'F': - case 'f': goto yy134; - case 'H': - case 'h': goto yy130; - case 'I': - case 'i': goto yy132; - case 'N': - case 'n': goto yy133; - case 'V': - case 'v': goto yy34; - default: goto yy2; - } -yy19: - yych = *(marker = ++p); - if (yych <= 'T') { - if (yych <= 'N') { - if (yych == 'D') goto yy122; - if (yych <= 'M') goto yy2; - goto yy121; - } else { - if (yych == 'R') goto yy123; - if (yych <= 'S') goto yy2; - goto yy120; - } - } else { - if (yych <= 'n') { - if (yych == 'd') goto yy122; - if (yych <= 'm') goto yy2; - goto yy121; - } else { - if (yych <= 'r') { - if (yych <= 'q') goto yy2; - goto yy123; - } else { - if (yych == 't') goto yy120; - goto yy2; - } - } - } -yy20: - yych = *(marker = ++p); - if (yych <= 'I') { - if (yych == 'E') goto yy104; - if (yych <= 'H') goto yy2; - goto yy103; - } else { - if (yych <= 'e') { - if (yych <= 'd') goto yy2; - goto yy104; - } else { - if (yych == 'i') goto yy103; - goto yy2; - } - } -yy21: - yych = *(marker = ++p); - if (yych <= 'Y') { - if (yych <= 'R') { - if (yych == 'E') goto yy93; - goto yy2; - } else { - if (yych <= 'S') goto yy94; - if (yych <= 'T') goto yy92; - if (yych <= 'X') goto yy2; - goto yy91; - } - } else { - if (yych <= 's') { - if (yych == 'e') goto yy93; - if (yych <= 'r') goto yy2; - goto yy94; - } else { - if (yych <= 't') goto yy92; - if (yych == 'y') goto yy91; - goto yy2; - } - } -yy22: - yych = *(marker = ++p); - if (yych <= 'R') { - if (yych <= 'F') { - if (yych == 'C') goto yy70; - if (yych <= 'E') goto yy2; - goto yy68; - } else { - if (yych == 'M') goto yy69; - if (yych <= 'Q') goto yy2; - goto yy67; - } - } else { - if (yych <= 'f') { - if (yych == 'c') goto yy70; - if (yych <= 'e') goto yy2; - goto yy68; - } else { - if (yych <= 'm') { - if (yych <= 'l') goto yy2; - goto yy69; - } else { - if (yych == 'r') goto yy67; - goto yy2; - } - } - } -yy23: - yych = *(marker = ++p); - if (yych == '3') goto yy62; - goto yy2; -yy24: - yych = *(marker = ++p); - if (yych <= 'O') { - if (yych <= 'H') { - if (yych == 'E') goto yy52; - goto yy2; - } else { - if (yych <= 'I') goto yy51; - if (yych <= 'N') goto yy2; - goto yy50; - } - } else { - if (yych <= 'h') { - if (yych == 'e') goto yy52; - goto yy2; - } else { - if (yych <= 'i') goto yy51; - if (yych == 'o') goto yy50; - goto yy2; - } - } -yy25: - yych = *(marker = ++p); - if (yych == 'D') goto yy48; - if (yych == 'd') goto yy48; - goto yy2; -yy26: - yych = *(marker = ++p); - if (yych == 'E') goto yy43; - if (yych == 'e') goto yy43; - goto yy2; -yy27: - yych = *(marker = ++p); - if (yych == 'U') goto yy40; - if (yych == 'u') goto yy40; - goto yy2; -yy28: - yych = *(marker = ++p); - if (yych == 'M') goto yy30; - if (yych == 'm') goto yy30; - goto yy2; -yy29: - yych = *++p; - goto yy2; -yy30: - yych = *++p; - if (yych == 'S') goto yy32; - if (yych == 's') goto yy32; -yy31: - p = marker; - goto yy2; -yy32: - yych = *++p; - if (yych == 'G') goto yy33; - if (yych != 'g') goto yy31; -yy33: - yych = *++p; - if (yych == 'R') goto yy34; - if (yych != 'r') goto yy31; -yy34: - yych = *++p; - if (yych != ':') goto yy31; -yy35: - ++p; - yych = *p; - if (yybm[0+yych] & 128) { - goto yy35; - } - if (yych <= '=') goto yy31; - if (yych <= '>') goto yy38; - ++p; - yych = *p; - if (yych <= '@') { - if (yych <= ' ') goto yy31; - if (yych <= '/') goto yy35; - if (yych <= '9') goto yy31; - goto yy35; - } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy31; - goto yy35; - } else { - if (yych <= 'z') goto yy31; - if (yych <= '~') goto yy35; - goto yy31; - } - } -yy38: - ++p; - { return (p - start); } -yy40: - yych = *++p; - if (yych == 'E') goto yy41; - if (yych != 'e') goto yy31; -yy41: - yych = *++p; - if (yych == 'R') goto yy42; - if (yych != 'r') goto yy31; -yy42: - yych = *++p; - if (yych == 'Y') goto yy34; - if (yych == 'y') goto yy34; - goto yy31; -yy43: - yych = *++p; - if (yych == 'Y') goto yy44; - if (yych != 'y') goto yy31; -yy44: - yych = *++p; - if (yych == 'P') goto yy45; - if (yych != 'p') goto yy31; -yy45: - yych = *++p; - if (yych == 'A') goto yy46; - if (yych != 'a') goto yy31; -yy46: - yych = *++p; - if (yych == 'R') goto yy47; - if (yych != 'r') goto yy31; -yy47: - yych = *++p; - if (yych == 'C') goto yy34; - if (yych == 'c') goto yy34; - goto yy31; -yy48: - yych = *++p; - if (yych != '2') goto yy31; - yych = *++p; - if (yych == 'K') goto yy34; - if (yych == 'k') goto yy34; - goto yy31; -yy50: - yych = *++p; - if (yych == 'L') goto yy61; - if (yych == 'l') goto yy61; - goto yy31; -yy51: - yych = *++p; - if (yych == 'T') goto yy57; - if (yych == 't') goto yy57; - goto yy31; -yy52: - yych = *++p; - if (yych == 'S') goto yy53; - if (yych != 's') goto yy31; -yy53: - yych = *++p; - if (yych == 'H') goto yy54; - if (yych != 'h') goto yy31; -yy54: - yych = *++p; - if (yych == 'A') goto yy55; - if (yych != 'a') goto yy31; -yy55: - yych = *++p; - if (yych == 'R') goto yy56; - if (yych != 'r') goto yy31; -yy56: - yych = *++p; - if (yych == 'E') goto yy34; - if (yych == 'e') goto yy34; - goto yy31; -yy57: - yych = *++p; - if (yych == 'C') goto yy58; - if (yych != 'c') goto yy31; -yy58: - yych = *++p; - if (yych == 'O') goto yy59; - if (yych != 'o') goto yy31; -yy59: - yych = *++p; - if (yych == 'I') goto yy60; - if (yych != 'i') goto yy31; -yy60: - yych = *++p; - if (yych == 'N') goto yy34; - if (yych == 'n') goto yy34; - goto yy31; -yy61: - yych = *++p; - if (yych == 'O') goto yy34; - if (yych == 'o') goto yy34; - goto yy31; -yy62: - yych = *++p; - if (yych != '9') goto yy31; - yych = *++p; - if (yych != '.') goto yy31; - yych = *++p; - if (yych != '5') goto yy31; - yych = *++p; - if (yych != '0') goto yy31; - yych = *++p; - if (yych <= 'Q') goto yy31; - if (yych <= 'S') goto yy34; - if (yych <= 'q') goto yy31; - if (yych <= 's') goto yy34; - goto yy31; -yy67: - yych = *++p; - if (yych == 'I') goto yy34; - if (yych == 'i') goto yy34; - goto yy31; -yy68: - yych = *++p; - if (yych == 'I') goto yy89; - if (yych == 'i') goto yy89; - goto yy31; -yy69: - yych = *++p; - if (yych <= 'P') { - if (yych == 'L') goto yy79; - if (yych <= 'O') goto yy31; - goto yy80; - } else { - if (yych <= 'l') { - if (yych <= 'k') goto yy31; - goto yy79; - } else { - if (yych == 'p') goto yy80; - goto yy31; - } - } -yy70: - yych = *++p; - if (yych == 'O') goto yy71; - if (yych != 'o') goto yy31; -yy71: - yych = *++p; - if (yych == 'N') goto yy72; - if (yych != 'n') goto yy31; -yy72: - yych = *++p; - if (yych == '-') goto yy73; - if (yych == ':') goto yy35; - goto yy31; -yy73: - yych = *++p; - if (yych == 'U') goto yy74; - if (yych != 'u') goto yy31; -yy74: - yych = *++p; - if (yych == 'S') goto yy75; - if (yych != 's') goto yy31; -yy75: - yych = *++p; - if (yych == 'E') goto yy76; - if (yych != 'e') goto yy31; -yy76: - yych = *++p; - if (yych == 'R') goto yy77; - if (yych != 'r') goto yy31; -yy77: - yych = *++p; - if (yych == 'I') goto yy78; - if (yych != 'i') goto yy31; -yy78: - yych = *++p; - if (yych == 'D') goto yy34; - if (yych == 'd') goto yy34; - goto yy31; -yy79: - yych = *++p; - if (yych == 'R') goto yy81; - if (yych == 'r') goto yy81; - goto yy31; -yy80: - yych = *++p; - if (yych == 'P') goto yy34; - if (yych == 'p') goto yy34; - goto yy31; -yy81: - yych = *++p; - if (yych == 'P') goto yy82; - if (yych != 'p') goto yy31; -yy82: - yych = *++p; - if (yych == 'C') goto yy83; - if (yych != 'c') goto yy31; -yy83: - yych = *++p; - if (yych != '.') goto yy31; - yych = *++p; - if (yych == 'B') goto yy85; - if (yych != 'b') goto yy31; -yy85: - yych = *++p; - if (yych == 'E') goto yy86; - if (yych != 'e') goto yy31; -yy86: - yych = *++p; - if (yych == 'E') goto yy87; - if (yych != 'e') goto yy31; -yy87: - yych = *++p; - if (yych == 'P') goto yy88; - if (yych != 'p') goto yy31; -yy88: - yych = *++p; - if (yych <= 'R') { - if (yych == ':') goto yy35; - goto yy31; - } else { - if (yych <= 'S') goto yy34; - if (yych == 's') goto yy34; - goto yy31; - } -yy89: - yych = *++p; - if (yych == 'R') goto yy90; - if (yych != 'r') goto yy31; -yy90: - yych = *++p; - if (yych == 'E') goto yy34; - if (yych == 'e') goto yy34; - goto yy31; -yy91: - yych = *++p; - if (yych == 'C') goto yy99; - if (yych == 'c') goto yy99; - goto yy31; -yy92: - yych = *++p; - if (yych == 'A') goto yy98; - if (yych == 'a') goto yy98; - goto yy31; -yy93: - yych = *++p; - if (yych == 'B') goto yy95; - if (yych == 'b') goto yy95; - goto yy31; -yy94: - yych = *++p; - if (yych <= 'R') { - if (yych == ':') goto yy35; - goto yy31; - } else { - if (yych <= 'S') goto yy34; - if (yych == 's') goto yy34; - goto yy31; - } -yy95: - yych = *++p; - if (yych == 'C') goto yy96; - if (yych != 'c') goto yy31; -yy96: - yych = *++p; - if (yych == 'A') goto yy97; - if (yych != 'a') goto yy31; -yy97: - yych = *++p; - if (yych == 'L') goto yy34; - if (yych == 'l') goto yy34; - goto yy31; -yy98: - yych = *++p; - if (yych == 'I') goto yy34; - if (yych == 'i') goto yy34; - goto yy31; -yy99: - yych = *++p; - if (yych == 'I') goto yy100; - if (yych != 'i') goto yy31; -yy100: - yych = *++p; - if (yych == 'W') goto yy101; - if (yych != 'w') goto yy31; -yy101: - yych = *++p; - if (yych == 'Y') goto yy102; - if (yych != 'y') goto yy31; -yy102: - yych = *++p; - if (yych == 'G') goto yy34; - if (yych == 'g') goto yy34; - goto yy31; -yy103: - yych = *++p; - if (yych == 'E') goto yy112; - if (yych == 'e') goto yy112; - goto yy31; -yy104: - yych = *++p; - if (yych <= 'N') { - if (yych <= 'L') goto yy31; - if (yych >= 'N') goto yy106; - } else { - if (yych <= 'l') goto yy31; - if (yych <= 'm') goto yy105; - if (yych <= 'n') goto yy106; - goto yy31; - } -yy105: - yych = *++p; - if (yych == 'M') goto yy111; - if (yych == 'm') goto yy111; - goto yy31; -yy106: - yych = *++p; - if (yych == 'T') goto yy107; - if (yych != 't') goto yy31; -yy107: - yych = *++p; - if (yych == 'R') goto yy108; - if (yych != 'r') goto yy31; -yy108: - yych = *++p; - if (yych == 'I') goto yy109; - if (yych != 'i') goto yy31; -yy109: - yych = *++p; - if (yych == 'L') goto yy110; - if (yych != 'l') goto yy31; -yy110: - yych = *++p; - if (yych == 'O') goto yy34; - if (yych == 'o') goto yy34; - goto yy31; -yy111: - yych = *++p; - if (yych == 'I') goto yy34; - if (yych == 'i') goto yy34; - goto yy31; -yy112: - yych = *++p; - if (yych == 'W') goto yy113; - if (yych != 'w') goto yy31; -yy113: - yych = *++p; - if (yych != '-') goto yy31; - yych = *++p; - if (yych == 'S') goto yy115; - if (yych != 's') goto yy31; -yy115: - yych = *++p; - if (yych == 'O') goto yy116; - if (yych != 'o') goto yy31; -yy116: - yych = *++p; - if (yych == 'U') goto yy117; - if (yych != 'u') goto yy31; -yy117: - yych = *++p; - if (yych == 'R') goto yy118; - if (yych != 'r') goto yy31; -yy118: - yych = *++p; - if (yych == 'C') goto yy119; - if (yych != 'c') goto yy31; -yy119: - yych = *++p; - if (yych == 'E') goto yy34; - if (yych == 'e') goto yy34; - goto yy31; -yy120: - yych = *++p; - if (yych == '2') goto yy127; - goto yy31; -yy121: - yych = *++p; - if (yych == 'R') goto yy124; - if (yych == 'r') goto yy124; - goto yy31; -yy122: - yych = *++p; - if (yych == 'P') goto yy34; - if (yych == 'p') goto yy34; - goto yy31; -yy123: - yych = *++p; - if (yych == 'N') goto yy34; - if (yych == 'n') goto yy34; - goto yy31; -yy124: - yych = *++p; - if (yych == 'E') goto yy125; - if (yych != 'e') goto yy31; -yy125: - yych = *++p; - if (yych == 'A') goto yy126; - if (yych != 'a') goto yy31; -yy126: - yych = *++p; - if (yych == 'L') goto yy34; - if (yych == 'l') goto yy34; - goto yy31; -yy127: - yych = *++p; - if (yych != '0') goto yy31; - yych = *++p; - if (yych != '0') goto yy31; - yych = *++p; - if (yych == '4') goto yy34; - goto yy31; -yy130: - yych = *++p; - if (yych == 'I') goto yy149; - if (yych == 'i') goto yy149; - goto yy31; -yy131: - yych = *++p; - if (yych <= 'L') { - if (yych == 'A') goto yy141; - if (yych <= 'K') goto yy31; - goto yy140; - } else { - if (yych <= 'a') { - if (yych <= '`') goto yy31; - goto yy141; - } else { - if (yych == 'l') goto yy140; - goto yy31; - } - } -yy132: - yych = *++p; - if (yych == 'P') goto yy34; - if (yych == 'p') goto yy34; - goto yy31; -yy133: - yych = *++p; - if (yych == '3') goto yy137; - goto yy31; -yy134: - yych = *++p; - if (yych == 'T') goto yy136; - if (yych == 't') goto yy136; - goto yy31; -yy135: - yych = *++p; - if (yych == 'G') goto yy34; - if (yych == 'g') goto yy34; - goto yy31; -yy136: - yych = *++p; - if (yych == 'P') goto yy34; - if (yych == 'p') goto yy34; - goto yy31; -yy137: - yych = *++p; - if (yych != '2') goto yy31; - yych = *++p; - if (yych != '7') goto yy31; - yych = *++p; - if (yych == '0') goto yy34; - goto yy31; -yy140: - yych = *++p; - if (yych <= 'M') { - if (yych == ':') goto yy35; - goto yy31; - } else { - if (yych <= 'N') goto yy147; - if (yych == 'n') goto yy147; - goto yy31; - } -yy141: - yych = *++p; - if (yych == 'M') goto yy142; - if (yych != 'm') goto yy31; -yy142: - yych = *++p; - if (yych == 'S') goto yy143; - if (yych != 's') goto yy31; -yy143: - yych = *++p; - if (yych == 'P') goto yy144; - if (yych != 'p') goto yy31; -yy144: - yych = *++p; - if (yych == 'E') goto yy145; - if (yych != 'e') goto yy31; -yy145: - yych = *++p; - if (yych == 'A') goto yy146; - if (yych != 'a') goto yy31; -yy146: - yych = *++p; - if (yych == 'K') goto yy34; - if (yych == 'k') goto yy34; - goto yy31; -yy147: - yych = *++p; - if (yych == 'E') goto yy148; - if (yych != 'e') goto yy31; -yy148: - yych = *++p; - if (yych == 'T') goto yy34; - if (yych == 't') goto yy34; - goto yy31; -yy149: - yych = *++p; - if (yych <= 'S') { - if (yych == 'N') goto yy150; - if (yych <= 'R') goto yy31; - goto yy151; - } else { - if (yych <= 'n') { - if (yych <= 'm') goto yy31; - } else { - if (yych == 's') goto yy151; - goto yy31; - } - } -yy150: - yych = *++p; - if (yych == 'G') goto yy158; - if (yych == 'g') goto yy158; - goto yy31; -yy151: - yych = *++p; - if (yych == 'M') goto yy152; - if (yych != 'm') goto yy31; -yy152: - yych = *++p; - if (yych == 'E') goto yy153; - if (yych != 'e') goto yy31; -yy153: - yych = *++p; - if (yych == 'S') goto yy154; - if (yych != 's') goto yy31; -yy154: - yych = *++p; - if (yych == 'S') goto yy155; - if (yych != 's') goto yy31; -yy155: - yych = *++p; - if (yych == 'A') goto yy156; - if (yych != 'a') goto yy31; -yy156: - yych = *++p; - if (yych == 'G') goto yy157; - if (yych != 'g') goto yy31; -yy157: - yych = *++p; - if (yych == 'E') goto yy34; - if (yych == 'e') goto yy34; - goto yy31; -yy158: - yych = *++p; - if (yych == 'S') goto yy34; - if (yych == 's') goto yy34; - goto yy31; -yy159: - yych = *++p; - if (yych == 'N') goto yy34; - if (yych == 'n') goto yy34; - goto yy31; -yy160: - yych = *++p; - if (yych == 'E') goto yy210; - if (yych == 'e') goto yy210; - goto yy31; -yy161: - yych = *++p; - if (yych == 'H') goto yy34; - if (yych == 'h') goto yy34; - goto yy31; -yy162: - yych = *++p; - if (yych == 'O') goto yy206; - if (yych == 'o') goto yy206; - goto yy31; -yy163: - yych = *++p; - if (yych <= 'L') { - if (yych == 'A') goto yy196; - if (yych <= 'K') goto yy31; - goto yy197; - } else { - if (yych <= 'a') { - if (yych <= '`') goto yy31; - goto yy196; - } else { - if (yych == 'l') goto yy197; - goto yy31; - } - } -yy164: - yych = *++p; - if (yych <= 'S') { - if (yych == 'B') goto yy34; - if (yych <= 'R') goto yy31; - goto yy34; - } else { - if (yych <= 'b') { - if (yych <= 'a') goto yy31; - goto yy34; - } else { - if (yych == 's') goto yy34; - goto yy31; - } - } -yy165: - yych = *++p; - if (yych == 'Y') goto yy194; - if (yych == 'y') goto yy194; - goto yy31; -yy166: - yych = *++p; - if (yych == 'N') goto yy34; - if (yych == 'n') goto yy34; - goto yy31; -yy167: - yych = *++p; - if (yych == 'T') goto yy193; - if (yych == 't') goto yy193; - goto yy31; -yy168: - yych = *++p; - if (yych <= 'S') { - if (yych <= 'C') { - if (yych <= 'B') goto yy31; - goto yy180; - } else { - if (yych <= 'Q') goto yy31; - if (yych <= 'R') goto yy178; - goto yy179; - } - } else { - if (yych <= 'q') { - if (yych == 'c') goto yy180; - goto yy31; - } else { - if (yych <= 'r') goto yy178; - if (yych <= 's') goto yy179; - goto yy31; - } - } -yy169: - yych = *++p; - if (yych == 'M') goto yy177; - if (yych == 'm') goto yy177; - goto yy31; -yy170: - yych = *++p; - if (yych <= 'P') { - if (yych == 'E') goto yy174; - if (yych <= 'O') goto yy31; - goto yy175; - } else { - if (yych <= 'e') { - if (yych <= 'd') goto yy31; - goto yy174; - } else { - if (yych == 'p') goto yy175; - goto yy31; - } - } -yy171: - yych = *++p; - if (yych == 'T') goto yy172; - if (yych != 't') goto yy31; -yy172: - yych = *++p; - if (yych == 'T') goto yy173; - if (yych != 't') goto yy31; -yy173: - yych = *++p; - if (yych == 'P') goto yy34; - if (yych == 'p') goto yy34; - goto yy31; -yy174: - yych = *++p; - if (yych == 'V') goto yy176; - if (yych == 'v') goto yy176; - goto yy31; -yy175: - yych = *++p; - if (yych <= 'R') { - if (yych == ':') goto yy35; - goto yy31; - } else { - if (yych <= 'S') goto yy34; - if (yych == 's') goto yy34; - goto yy31; - } -yy176: - yych = *++p; - if (yych == 'E') goto yy34; - if (yych == 'e') goto yy34; - goto yy31; -yy177: - yych = *++p; - if (yych == 'P') goto yy34; - if (yych == 'p') goto yy34; - goto yy31; -yy178: - yych = *++p; - if (yych == 'V') goto yy190; - if (yych == 'v') goto yy190; - goto yy31; -yy179: - yych = *++p; - if (yych == 'S') goto yy187; - if (yych == 's') goto yy187; - goto yy31; -yy180: - yych = *++p; - if (yych == 'O') goto yy181; - if (yych != 'o') goto yy31; -yy181: - yych = *++p; - if (yych == 'N') goto yy182; - if (yych != 'n') goto yy31; -yy182: - yych = *++p; - if (yych == 'D') goto yy183; - if (yych != 'd') goto yy31; -yy183: - yych = *++p; - if (yych == 'L') goto yy184; - if (yych != 'l') goto yy31; -yy184: - yych = *++p; - if (yych == 'I') goto yy185; - if (yych != 'i') goto yy31; -yy185: - yych = *++p; - if (yych == 'F') goto yy186; - if (yych != 'f') goto yy31; -yy186: - yych = *++p; - if (yych == 'E') goto yy34; - if (yych == 'e') goto yy34; - goto yy31; -yy187: - yych = *++p; - if (yych == 'I') goto yy188; - if (yych != 'i') goto yy31; -yy188: - yych = *++p; - if (yych == 'O') goto yy189; - if (yych != 'o') goto yy31; -yy189: - yych = *++p; - if (yych == 'N') goto yy34; - if (yych == 'n') goto yy34; - goto yy31; -yy190: - yych = *++p; - if (yych == 'I') goto yy191; - if (yych != 'i') goto yy31; -yy191: - yych = *++p; - if (yych == 'C') goto yy192; - if (yych != 'c') goto yy31; -yy192: - yych = *++p; - if (yych == 'E') goto yy34; - if (yych == 'e') goto yy34; - goto yy31; -yy193: - yych = *++p; - if (yych == 'P') goto yy34; - if (yych == 'p') goto yy34; - goto yy31; -yy194: - yych = *++p; - if (yych == 'P') goto yy195; - if (yych != 'p') goto yy31; -yy195: - yych = *++p; - if (yych == 'E') goto yy34; - if (yych == 'e') goto yy34; - goto yy31; -yy196: - yych = *++p; - if (yych == 'P') goto yy200; - if (yych == 'p') goto yy200; - goto yy31; -yy197: - yych = *++p; - if (yych == 'D') goto yy198; - if (yych != 'd') goto yy31; -yy198: - yych = *++p; - if (yych == 'A') goto yy199; - if (yych != 'a') goto yy31; -yy199: - yych = *++p; - if (yych == 'T') goto yy34; - if (yych == 't') goto yy34; - goto yy31; -yy200: - yych = *++p; - if (yych != '.') goto yy31; - yych = *++p; - if (yych == 'B') goto yy202; - if (yych != 'b') goto yy31; -yy202: - yych = *++p; - if (yych == 'E') goto yy203; - if (yych != 'e') goto yy31; -yy203: - yych = *++p; - if (yych == 'E') goto yy204; - if (yych != 'e') goto yy31; -yy204: - yych = *++p; - if (yych == 'P') goto yy205; - if (yych != 'p') goto yy31; -yy205: - yych = *++p; - if (yych <= 'R') { - if (yych == ':') goto yy35; - goto yy31; - } else { - if (yych <= 'S') goto yy34; - if (yych == 's') goto yy34; - goto yy31; - } -yy206: - yych = *++p; - if (yych == 'T') goto yy207; - if (yych != 't') goto yy31; -yy207: - yych = *++p; - if (yych == 'I') goto yy208; - if (yych != 'i') goto yy31; -yy208: - yych = *++p; - if (yych == 'F') goto yy209; - if (yych != 'f') goto yy31; -yy209: - yych = *++p; - if (yych == 'Y') goto yy34; - if (yych == 'y') goto yy34; - goto yy31; -yy210: - yych = *++p; - if (yych == 'A') goto yy211; - if (yych != 'a') goto yy31; -yy211: - yych = *++p; - if (yych == 'M') goto yy34; - if (yych == 'm') goto yy34; - goto yy31; -yy212: - yych = *++p; - if (yych <= 'S') { - if (yych == 'M') goto yy224; - if (yych <= 'R') goto yy31; - goto yy223; - } else { - if (yych <= 'm') { - if (yych <= 'l') goto yy31; - goto yy224; - } else { - if (yych == 's') goto yy223; - goto yy31; - } - } -yy213: - yych = *++p; - if (yych == 'Y') goto yy221; - if (yych == 'y') goto yy221; - goto yy31; -yy214: - yych = *++p; - if (yych == 'I') goto yy34; - if (yych == 'i') goto yy34; - goto yy31; -yy215: - yych = *++p; - if (yych == 'S') goto yy216; - if (yych != 's') goto yy31; -yy216: - yych = *++p; - if (yych <= 'N') { - if (yych == ':') goto yy35; - goto yy31; - } else { - if (yych <= 'O') goto yy217; - if (yych != 'o') goto yy31; - } -yy217: - yych = *++p; - if (yych == 'U') goto yy218; - if (yych != 'u') goto yy31; -yy218: - yych = *++p; - if (yych == 'R') goto yy219; - if (yych != 'r') goto yy31; -yy219: - yych = *++p; - if (yych == 'C') goto yy220; - if (yych != 'c') goto yy31; -yy220: - yych = *++p; - if (yych == 'E') goto yy34; - if (yych == 'e') goto yy34; - goto yy31; -yy221: - yych = *++p; - if (yych == 'N') goto yy222; - if (yych != 'n') goto yy31; -yy222: - yych = *++p; - if (yych == 'C') goto yy34; - if (yych == 'c') goto yy34; - goto yy31; -yy223: - yych = *++p; - if (yych == 'P') goto yy34; - if (yych == 'p') goto yy34; - goto yy31; -yy224: - yych = *++p; - if (yych == 'P') goto yy34; - if (yych == 'p') goto yy34; - goto yy31; -yy225: - yych = *++p; - if (yych == 'Y') goto yy245; - if (yych == 'y') goto yy245; - goto yy31; -yy226: - yych = *++p; - if (yych <= 'O') { - if (yych == 'E') goto yy242; - if (yych <= 'N') goto yy31; - goto yy243; - } else { - if (yych <= 'e') { - if (yych <= 'd') goto yy31; - goto yy242; - } else { - if (yych == 'o') goto yy243; - goto yy31; - } - } -yy227: - yych = *++p; - if (yych == 'A') goto yy237; - if (yych == 'a') goto yy237; - goto yy31; -yy228: - yych = *++p; - if (yych <= 'P') { - if (yych == 'L') goto yy230; - if (yych <= 'O') goto yy31; - goto yy231; - } else { - if (yych <= 'l') { - if (yych <= 'k') goto yy31; - goto yy230; - } else { - if (yych == 'p') goto yy231; - goto yy31; - } - } -yy229: - yych = *++p; - if (yych == 'P') goto yy34; - if (yych == 'p') goto yy34; - goto yy31; -yy230: - yych = *++p; - if (yych == 'M') goto yy34; - if (yych == 'm') goto yy34; - goto yy31; -yy231: - yych = *++p; - if (yych == 'A') goto yy232; - if (yych != 'a') goto yy31; -yy232: - yych = *++p; - if (yych == 'R') goto yy233; - if (yych != 'r') goto yy31; -yy233: - yych = *++p; - if (yych == 'A') goto yy234; - if (yych != 'a') goto yy31; -yy234: - yych = *++p; - if (yych == 'Z') goto yy235; - if (yych != 'z') goto yy31; -yy235: - yych = *++p; - if (yych == 'Z') goto yy236; - if (yych != 'z') goto yy31; -yy236: - yych = *++p; - if (yych == 'I') goto yy34; - if (yych == 'i') goto yy34; - goto yy31; -yy237: - yych = *++p; - if (yych == 'T') goto yy238; - if (yych != 't') goto yy31; -yy238: - yych = *++p; - if (yych == 'F') goto yy239; - if (yych != 'f') goto yy31; -yy239: - yych = *++p; - if (yych == 'O') goto yy240; - if (yych != 'o') goto yy31; -yy240: - yych = *++p; - if (yych == 'R') goto yy241; - if (yych != 'r') goto yy31; -yy241: - yych = *++p; - if (yych == 'M') goto yy34; - if (yych == 'm') goto yy34; - goto yy31; -yy242: - yych = *++p; - if (yych == 'S') goto yy34; - if (yych == 's') goto yy34; - goto yy31; -yy243: - yych = *++p; - if (yych == 'X') goto yy244; - if (yych != 'x') goto yy31; -yy244: - yych = *++p; - if (yych == 'Y') goto yy34; - if (yych == 'y') goto yy34; - goto yy31; -yy245: - yych = *++p; - if (yych == 'C') goto yy34; - if (yych == 'c') goto yy34; - goto yy31; -yy246: - yych = *++p; - if (yych == 'D') goto yy34; - if (yych == 'd') goto yy34; - goto yy31; -yy247: - yych = *++p; - if (yych == 'A') goto yy248; - if (yych != 'a') goto yy31; -yy248: - yych = *++p; - if (yych == 'Q') goto yy249; - if (yych != 'q') goto yy31; -yy249: - yych = *++p; - if (yych == 'U') goto yy250; - if (yych != 'u') goto yy31; -yy250: - yych = *++p; - if (yych == 'E') goto yy251; - if (yych != 'e') goto yy31; -yy251: - yych = *++p; - if (yych == 'L') goto yy252; - if (yych != 'l') goto yy31; -yy252: - yych = *++p; - if (yych == 'O') goto yy253; - if (yych != 'o') goto yy31; -yy253: - yych = *++p; - if (yych == 'C') goto yy254; - if (yych != 'c') goto yy31; -yy254: - yych = *++p; - if (yych == 'K') goto yy255; - if (yych != 'k') goto yy31; -yy255: - yych = *++p; - if (yych == 'T') goto yy256; - if (yych != 't') goto yy31; -yy256: - yych = *++p; - if (yych == 'O') goto yy257; - if (yych != 'o') goto yy31; -yy257: - yych = *++p; - if (yych == 'K') goto yy258; - if (yych != 'k') goto yy31; -yy258: - yych = *++p; - if (yych == 'E') goto yy259; - if (yych != 'e') goto yy31; -yy259: - yych = *++p; - if (yych == 'N') goto yy34; - if (yych == 'n') goto yy34; - goto yy31; -yy260: - yych = *++p; - if (yych == 'T') goto yy267; - if (yych == 't') goto yy267; - goto yy31; -yy261: - yych = *++p; - if (yych == 'T') goto yy266; - if (yych == 't') goto yy266; - goto yy31; -yy262: - yych = *++p; - if (yych <= 'G') { - if (yych == ':') goto yy35; - goto yy31; - } else { - if (yych <= 'H') goto yy34; - if (yych == 'h') goto yy34; - goto yy31; - } -yy263: - yych = *++p; - if (yych == 'S') goto yy34; - if (yych == 's') goto yy34; - goto yy31; -yy264: - yych = *++p; - if (yych == 'W') goto yy265; - if (yych != 'w') goto yy31; -yy265: - yych = *++p; - if (yych == 'S') goto yy34; - if (yych == 's') goto yy34; - goto yy31; -yy266: - yych = *++p; - if (yych == 'P') goto yy34; - if (yych == 'p') goto yy34; - goto yy31; -yy267: - yych = *++p; - if (yych == 'E') goto yy268; - if (yych != 'e') goto yy31; -yy268: - yych = *++p; - if (yych == 'S') goto yy34; - if (yych == 's') goto yy34; - goto yy31; -yy269: - yych = *++p; - if (yych == 'N') goto yy34; - if (yych == 'n') goto yy34; - goto yy31; -yy270: - yych = *++p; - if (yych <= 'P') { - if (yych == 'M') goto yy301; - if (yych <= 'O') goto yy31; - goto yy300; - } else { - if (yych <= 'm') { - if (yych <= 'l') goto yy31; - goto yy301; - } else { - if (yych == 'p') goto yy300; - goto yy31; - } - } -yy271: - yych = *++p; - if (yych <= 'Q') { - if (yych <= '-') { - if (yych <= ',') goto yy31; - goto yy293; - } else { - if (yych == 'N') goto yy294; - goto yy31; - } - } else { - if (yych <= 'n') { - if (yych <= 'R') goto yy292; - if (yych <= 'm') goto yy31; - goto yy294; - } else { - if (yych == 'r') goto yy292; - goto yy31; - } - } -yy272: - yych = *++p; - if (yych == 'S') goto yy34; - if (yych == 's') goto yy34; - goto yy31; -yy273: - yych = *++p; - if (yych == 'S') goto yy288; - if (yych == 's') goto yy288; - goto yy31; -yy274: - yych = *++p; - switch (yych) { - case 'G': - case 'g': goto yy279; - case 'I': - case 'i': goto yy278; - case 'P': - case 'p': goto yy280; - case 'R': - case 'r': goto yy281; - default: goto yy31; - } -yy275: - yych = *++p; - if (yych == 'Q') goto yy277; - if (yych == 'q') goto yy277; - goto yy31; -yy276: - yych = *++p; - if (yych == 'D') goto yy34; - if (yych == 'd') goto yy34; - goto yy31; -yy277: - yych = *++p; - if (yych == 'P') goto yy34; - if (yych == 'p') goto yy34; - goto yy31; -yy278: - yych = *++p; - if (yych == 'L') goto yy286; - if (yych == 'l') goto yy286; - goto yy31; -yy279: - yych = *++p; - if (yych == 'N') goto yy284; - if (yych == 'n') goto yy284; - goto yy31; -yy280: - yych = *++p; - if (yych == 'S') goto yy34; - if (yych == 's') goto yy34; - goto yy31; -yy281: - yych = *++p; - if (yych == 'K') goto yy282; - if (yych != 'k') goto yy31; -yy282: - yych = *++p; - if (yych == 'E') goto yy283; - if (yych != 'e') goto yy31; -yy283: - yych = *++p; - if (yych == 'T') goto yy34; - if (yych == 't') goto yy34; - goto yy31; -yy284: - yych = *++p; - if (yych == 'E') goto yy285; - if (yych != 'e') goto yy31; -yy285: - yych = *++p; - if (yych == 'T') goto yy34; - if (yych == 't') goto yy34; - goto yy31; -yy286: - yych = *++p; - if (yych == 'T') goto yy287; - if (yych != 't') goto yy31; -yy287: - yych = *++p; - if (yych == 'O') goto yy34; - if (yych == 'o') goto yy34; - goto yy31; -yy288: - yych = *++p; - if (yych == 'S') goto yy289; - if (yych != 's') goto yy31; -yy289: - yych = *++p; - if (yych == 'A') goto yy290; - if (yych != 'a') goto yy31; -yy290: - yych = *++p; - if (yych == 'G') goto yy291; - if (yych != 'g') goto yy31; -yy291: - yych = *++p; - if (yych == 'E') goto yy34; - if (yych == 'e') goto yy34; - goto yy31; -yy292: - yych = *++p; - if (yych == 'P') goto yy299; - if (yych == 'p') goto yy299; - goto yy31; -yy293: - yych = *++p; - if (yych == 'H') goto yy296; - if (yych == 'h') goto yy296; - goto yy31; -yy294: - yych = *++p; - if (yych == 'I') goto yy295; - if (yych != 'i') goto yy31; -yy295: - yych = *++p; - if (yych == 'M') goto yy34; - if (yych == 'm') goto yy34; - goto yy31; -yy296: - yych = *++p; - if (yych == 'E') goto yy297; - if (yych != 'e') goto yy31; -yy297: - yych = *++p; - if (yych == 'L') goto yy298; - if (yych != 'l') goto yy31; -yy298: - yych = *++p; - if (yych == 'P') goto yy34; - if (yych == 'p') goto yy34; - goto yy31; -yy299: - yych = *++p; - if (yych <= 'R') { - if (yych == ':') goto yy35; - goto yy31; - } else { - if (yych <= 'S') goto yy34; - if (yych == 's') goto yy34; - goto yy31; - } -yy300: - yych = *++p; - if (yych == 'D') goto yy304; - if (yych == 'd') goto yy304; - goto yy31; -yy301: - yych = *++p; - if (yych == 'B') goto yy302; - if (yych != 'b') goto yy31; -yy302: - yych = *++p; - if (yych == 'L') goto yy303; - if (yych != 'l') goto yy31; -yy303: - yych = *++p; - if (yych == 'E') goto yy34; - if (yych == 'e') goto yy34; - goto yy31; -yy304: - yych = *++p; - if (yych == 'A') goto yy305; - if (yych != 'a') goto yy31; -yy305: - yych = *++p; - if (yych == 'T') goto yy306; - if (yych != 't') goto yy31; -yy306: - yych = *++p; - if (yych == 'E') goto yy34; - if (yych == 'e') goto yy34; - goto yy31; -yy307: - yych = *++p; - if (yych == 'A') goto yy312; - if (yych == 'a') goto yy312; - goto yy31; -yy308: - yych = *++p; - if (yych == 'S') goto yy309; - if (yych != 's') goto yy31; -yy309: - yych = *++p; - if (yych == 'T') goto yy310; - if (yych != 't') goto yy31; -yy310: - yych = *++p; - if (yych == 'F') goto yy311; - if (yych != 'f') goto yy31; -yy311: - yych = *++p; - if (yych == 'M') goto yy34; - if (yych == 'm') goto yy34; - goto yy31; -yy312: - yych = *++p; - if (yych == 'P') goto yy313; - if (yych != 'p') goto yy31; -yy313: - yych = *++p; - if (yych <= 'R') { - if (yych == ':') goto yy35; - goto yy31; - } else { - if (yych <= 'S') goto yy34; - if (yych == 's') goto yy34; - goto yy31; - } -yy314: - yych = *++p; - if (yych == 'M') goto yy337; - if (yych == 'm') goto yy337; - goto yy31; -yy315: - yych = *++p; - if (yych <= 'I') { - if (yych == 'C') goto yy326; - if (yych <= 'H') goto yy31; - goto yy325; - } else { - if (yych <= 'c') { - if (yych <= 'b') goto yy31; - goto yy326; - } else { - if (yych == 'i') goto yy325; - goto yy31; - } - } -yy316: - yych = *++p; - if (yych <= 'P') { - if (yych == 'N') goto yy34; - if (yych <= 'O') goto yy31; - goto yy34; - } else { - if (yych <= 'n') { - if (yych <= 'm') goto yy31; - goto yy34; - } else { - if (yych == 'p') goto yy34; - goto yy31; - } - } -yy317: - yych = *++p; - if (yych <= 'O') { - if (yych == 'A') goto yy323; - if (yych <= 'N') goto yy31; - goto yy324; - } else { - if (yych <= 'a') { - if (yych <= '`') goto yy31; - goto yy323; - } else { - if (yych == 'o') goto yy324; - goto yy31; - } - } -yy318: - yych = *++p; - if (yych == 'F') goto yy322; - if (yych == 'f') goto yy322; - goto yy31; -yy319: - yych = *++p; - if (yych <= '@') { - if (yych == ':') goto yy35; - goto yy31; - } else { - if (yych <= 'A') goto yy321; - if (yych == 'a') goto yy321; - goto yy31; - } -yy320: - yych = *++p; - if (yych == 'X') goto yy34; - if (yych == 'x') goto yy34; - goto yy31; -yy321: - yych = *++p; - if (yych == 'P') goto yy34; - if (yych == 'p') goto yy34; - goto yy31; -yy322: - yych = *++p; - if (yych == 'O') goto yy34; - if (yych == 'o') goto yy34; - goto yy31; -yy323: - yych = *++p; - if (yych == 'P') goto yy34; - if (yych == 'p') goto yy34; - goto yy31; -yy324: - yych = *++p; - if (yych == 'N') goto yy34; - if (yych == 'n') goto yy34; - goto yy31; -yy325: - yych = *++p; - if (yych == 'S') goto yy327; - if (yych == 's') goto yy327; - goto yy31; -yy326: - yych = *++p; - if (yych <= ':') { - if (yych == '6') goto yy34; - if (yych <= '9') goto yy31; - goto yy35; - } else { - if (yych <= 'S') { - if (yych <= 'R') goto yy31; - goto yy34; - } else { - if (yych == 's') goto yy34; - goto yy31; - } - } -yy327: - yych = *++p; - if (yych == '.') goto yy328; - if (yych == ':') goto yy35; - goto yy31; -yy328: - yych = *++p; - if (yych <= 'X') { - if (yych <= 'K') { - if (yych == 'B') goto yy331; - goto yy31; - } else { - if (yych <= 'L') goto yy329; - if (yych <= 'W') goto yy31; - goto yy330; - } - } else { - if (yych <= 'k') { - if (yych == 'b') goto yy331; - goto yy31; - } else { - if (yych <= 'l') goto yy329; - if (yych == 'x') goto yy330; - goto yy31; - } - } -yy329: - yych = *++p; - if (yych == 'W') goto yy336; - if (yych == 'w') goto yy336; - goto yy31; -yy330: - yych = *++p; - if (yych == 'P') goto yy334; - if (yych == 'p') goto yy334; - goto yy31; -yy331: - yych = *++p; - if (yych == 'E') goto yy332; - if (yych != 'e') goto yy31; -yy332: - yych = *++p; - if (yych == 'E') goto yy333; - if (yych != 'e') goto yy31; -yy333: - yych = *++p; - if (yych == 'P') goto yy34; - if (yych == 'p') goto yy34; - goto yy31; -yy334: - yych = *++p; - if (yych == 'C') goto yy335; - if (yych != 'c') goto yy31; -yy335: - yych = *++p; - if (yych <= 'R') { - if (yych == ':') goto yy35; - goto yy31; - } else { - if (yych <= 'S') goto yy34; - if (yych == 's') goto yy34; - goto yy31; - } -yy336: - yych = *++p; - if (yych == 'Z') goto yy34; - if (yych == 'z') goto yy34; - goto yy31; -yy337: - yych = *++p; - if (yych == 'S') goto yy34; - if (yych == 's') goto yy34; - goto yy31; -yy338: - yych = *++p; - if (yych == 'P') goto yy34; - if (yych == 'p') goto yy34; - goto yy31; -yy339: - yych = *++p; - if (yych == 'T') goto yy342; - if (yych == 't') goto yy342; - goto yy31; -yy340: - yych = *++p; - if (yych != '2') goto yy31; - yych = *++p; - if (yych == '3') goto yy34; - goto yy31; -yy342: - yych = *++p; - if (yych == 'P') goto yy343; - if (yych != 'p') goto yy31; -yy343: - yych = *++p; - if (yych <= 'R') { - if (yych == ':') goto yy35; - goto yy31; - } else { - if (yych <= 'S') goto yy34; - if (yych == 's') goto yy34; - goto yy31; - } -yy344: - yych = *++p; - if (yych == 'A') goto yy360; - if (yych == 'a') goto yy360; - goto yy31; -yy345: - yych = *++p; - if (yych <= 'Z') { - if (yych == 'T') goto yy34; - if (yych <= 'Y') goto yy31; - goto yy351; - } else { - if (yych <= 't') { - if (yych <= 's') goto yy31; - goto yy34; - } else { - if (yych == 'z') goto yy351; - goto yy31; - } - } -yy346: - yych = *++p; - if (yych <= 'O') { - if (yych == ':') goto yy35; - goto yy31; - } else { - if (yych <= 'P') goto yy348; - if (yych == 'p') goto yy348; - goto yy31; - } -yy347: - yych = *++p; - if (yych == 'O') goto yy34; - if (yych == 'o') goto yy34; - goto yy31; -yy348: - yych = *++p; - if (yych == 'H') goto yy349; - if (yych != 'h') goto yy31; -yy349: - yych = *++p; - if (yych == 'E') goto yy350; - if (yych != 'e') goto yy31; -yy350: - yych = *++p; - if (yych == 'R') goto yy34; - if (yych == 'r') goto yy34; - goto yy31; -yy351: - yych = *++p; - if (yych == 'M') goto yy352; - if (yych != 'm') goto yy31; -yy352: - yych = *++p; - if (yych == 'O') goto yy353; - if (yych != 'o') goto yy31; -yy353: - yych = *++p; - if (yych == 'P') goto yy354; - if (yych != 'p') goto yy31; -yy354: - yych = *++p; - if (yych == 'R') goto yy355; - if (yych != 'r') goto yy31; -yy355: - yych = *++p; - if (yych == 'O') goto yy356; - if (yych != 'o') goto yy31; -yy356: - yych = *++p; - if (yych == 'J') goto yy357; - if (yych != 'j') goto yy31; -yy357: - yych = *++p; - if (yych == 'E') goto yy358; - if (yych != 'e') goto yy31; -yy358: - yych = *++p; - if (yych == 'C') goto yy359; - if (yych != 'c') goto yy31; -yy359: - yych = *++p; - if (yych == 'T') goto yy34; - if (yych == 't') goto yy34; - goto yy31; -yy360: - yych = *++p; - if (yych == 'L') goto yy361; - if (yych != 'l') goto yy31; -yy361: - yych = *++p; - if (yych == 'K') goto yy34; - if (yych == 'k') goto yy34; - goto yy31; -yy362: - yych = *++p; - if (yych <= 'S') { - if (yych <= 'M') { - if (yych == 'L') goto yy372; - goto yy31; - } else { - if (yych <= 'N') goto yy373; - if (yych <= 'R') goto yy31; - goto yy374; - } - } else { - if (yych <= 'm') { - if (yych == 'l') goto yy372; - goto yy31; - } else { - if (yych <= 'n') goto yy373; - if (yych == 's') goto yy374; - goto yy31; - } - } -yy363: - yych = *++p; - if (yych == 'E') goto yy371; - if (yych == 'e') goto yy371; - goto yy31; -yy364: - yych = *++p; - if (yych == 'C') goto yy366; - if (yych == 'c') goto yy366; - goto yy31; -yy365: - yych = *++p; - if (yych == 'P') goto yy34; - if (yych == 'p') goto yy34; - goto yy31; -yy366: - yych = *++p; - if (yych == 'E') goto yy367; - if (yych != 'e') goto yy31; -yy367: - yych = *++p; - if (yych == 'T') goto yy368; - if (yych != 't') goto yy31; -yy368: - yych = *++p; - if (yych == 'I') goto yy369; - if (yych != 'i') goto yy31; -yy369: - yych = *++p; - if (yych == 'M') goto yy370; - if (yych != 'm') goto yy31; -yy370: - yych = *++p; - if (yych == 'E') goto yy34; - if (yych == 'e') goto yy34; - goto yy31; -yy371: - yych = *++p; - if (yych == 'D') goto yy34; - if (yych == 'd') goto yy34; - goto yy31; -yy372: - yych = *++p; - if (yych == 'E') goto yy34; - if (yych == 'e') goto yy34; - goto yy31; -yy373: - yych = *++p; - if (yych == 'G') goto yy375; - if (yych == 'g') goto yy375; - goto yy31; -yy374: - yych = *++p; - if (yych == 'H') goto yy34; - if (yych == 'h') goto yy34; - goto yy31; -yy375: - yych = *++p; - if (yych == 'E') goto yy376; - if (yych != 'e') goto yy31; -yy376: - yych = *++p; - if (yych == 'R') goto yy34; - if (yych == 'r') goto yy34; - goto yy31; -yy377: - yych = *++p; - if (yych == 'T') goto yy395; - if (yych == 't') goto yy395; - goto yy31; -yy378: - yych = *++p; - if (yych == 'T') goto yy34; - if (yych == 't') goto yy34; - goto yy31; -yy379: - yych = *++p; - if (yych == 'M') goto yy34; - if (yych == 'm') goto yy34; - goto yy31; -yy380: - yych = *++p; - if (yych <= 'S') { - if (yych == 'P') goto yy34; - if (yych <= 'R') goto yy31; - goto yy34; - } else { - if (yych <= 'p') { - if (yych <= 'o') goto yy31; - goto yy34; - } else { - if (yych == 's') goto yy34; - goto yy31; - } - } -yy381: - yych = *++p; - if (yych == 'I') goto yy389; - if (yych == 'i') goto yy389; - goto yy31; -yy382: - yych = *++p; - if (yych == 'A') goto yy388; - if (yych == 'a') goto yy388; - goto yy31; -yy383: - yych = *++p; - if (yych == 'O') goto yy386; - if (yych == 'o') goto yy386; - goto yy31; -yy384: - yych = *++p; - if (yych == 'A') goto yy385; - if (yych != 'a') goto yy31; -yy385: - yych = *++p; - if (yych <= 'R') { - if (yych == ':') goto yy35; - goto yy31; - } else { - if (yych <= 'S') goto yy34; - if (yych == 's') goto yy34; - goto yy31; - } -yy386: - yych = *++p; - if (yych == 'U') goto yy387; - if (yych != 'u') goto yy31; -yy387: - yych = *++p; - if (yych == 'T') goto yy34; - if (yych == 't') goto yy34; - goto yy31; -yy388: - yych = *++p; - if (yych == 'P') goto yy34; - if (yych == 'p') goto yy34; - goto yy31; -yy389: - yych = *++p; - if (yych == 'U') goto yy390; - if (yych != 'u') goto yy31; -yy390: - yych = *++p; - if (yych == 'M') goto yy391; - if (yych != 'm') goto yy31; -yy391: - yych = *++p; - if (yych == 'X') goto yy392; - if (yych != 'x') goto yy31; -yy392: - yych = *++p; - if (yych == 'T') goto yy393; - if (yych != 't') goto yy31; -yy393: - yych = *++p; - if (yych == 'R') goto yy394; - if (yych != 'r') goto yy31; -yy394: - yych = *++p; - if (yych == 'A') goto yy34; - if (yych == 'a') goto yy34; - goto yy31; -yy395: - yych = *++p; - if (yych == 'A') goto yy396; - if (yych != 'a') goto yy31; -yy396: - yych = *++p; - if (yych == 'C') goto yy397; - if (yych != 'c') goto yy31; -yy397: - yych = *++p; - if (yych == 'H') goto yy398; - if (yych != 'h') goto yy31; -yy398: - yych = *++p; - if (yych == 'M') goto yy399; - if (yych != 'm') goto yy31; -yy399: - yych = *++p; - if (yych == 'E') goto yy400; - if (yych != 'e') goto yy31; -yy400: - yych = *++p; - if (yych == 'N') goto yy401; - if (yych != 'n') goto yy31; -yy401: - yych = *++p; - if (yych == 'T') goto yy34; - if (yych == 't') goto yy34; - goto yy31; -yy402: - yych = *++p; - if (yych == 'S') goto yy34; - if (yych == 's') goto yy34; - goto yy31; -yy403: - yych = *++p; - if (yych <= 'V') { - if (yych == 'R') goto yy34; - if (yych <= 'U') goto yy31; - } else { - if (yych <= 'r') { - if (yych <= 'q') goto yy31; - goto yy34; - } else { - if (yych != 'v') goto yy31; - } - } - yych = *++p; - if (yych == 'A') goto yy405; - if (yych != 'a') goto yy31; -yy405: - yych = *++p; - if (yych == 'S') goto yy406; - if (yych != 's') goto yy31; -yy406: - yych = *++p; - if (yych == 'C') goto yy407; - if (yych != 'c') goto yy31; -yy407: - yych = *++p; - if (yych == 'R') goto yy408; - if (yych != 'r') goto yy31; -yy408: - yych = *++p; - if (yych == 'I') goto yy409; - if (yych != 'i') goto yy31; -yy409: - yych = *++p; - if (yych == 'P') goto yy410; - if (yych != 'p') goto yy31; -yy410: - yych = *++p; - if (yych == 'T') goto yy34; - if (yych == 't') goto yy34; - goto yy31; -yy411: - yych = *++p; - if (yych == 'B') goto yy34; - if (yych == 'b') goto yy34; - goto yy31; -yy412: - yych = *++p; - if (yych == 'N') goto yy34; - if (yych == 'n') goto yy34; - goto yy31; -yy413: - yych = *++p; - if (yych == 'N') goto yy420; - if (yych == 'n') goto yy420; - goto yy31; -yy414: - yych = *++p; - if (yych == 'S') goto yy34; - if (yych == 's') goto yy34; - goto yy31; -yy415: - yych = *++p; - if (yych == 'C') goto yy419; - if (yych == 'c') goto yy419; - goto yy31; -yy416: - yych = *++p; - if (yych <= 'V') { - if (yych == 'T') goto yy418; - if (yych <= 'U') goto yy31; - goto yy34; - } else { - if (yych <= 't') { - if (yych <= 's') goto yy31; - goto yy418; - } else { - if (yych == 'v') goto yy34; - goto yy31; - } - } -yy417: - yych = *++p; - if (yych == 'I') goto yy34; - if (yych == 'i') goto yy34; - goto yy31; -yy418: - yych = *++p; - if (yych == 'A') goto yy34; - if (yych == 'a') goto yy34; - goto yy31; -yy419: - yych = *++p; - if (yych == 'T') goto yy34; - if (yych == 't') goto yy34; - goto yy31; -yy420: - yych = *++p; - if (yych == 'A') goto yy421; - if (yych != 'a') goto yy31; -yy421: - yych = *++p; - if (yych != '-') goto yy31; - yych = *++p; - if (yych == 'P') goto yy423; - if (yych != 'p') goto yy31; -yy423: - yych = *++p; - if (yych == 'L') goto yy424; - if (yych != 'l') goto yy31; -yy424: - yych = *++p; - if (yych == 'A') goto yy425; - if (yych != 'a') goto yy31; -yy425: - yych = *++p; - if (yych == 'Y') goto yy426; - if (yych != 'y') goto yy31; -yy426: - yych = *++p; - if (yych <= 'S') { - if (yych == 'C') goto yy427; - if (yych <= 'R') goto yy31; - goto yy428; - } else { - if (yych <= 'c') { - if (yych <= 'b') goto yy31; - } else { - if (yych == 's') goto yy428; - goto yy31; - } - } -yy427: - yych = *++p; - if (yych == 'O') goto yy433; - if (yych == 'o') goto yy433; - goto yy31; -yy428: - yych = *++p; - if (yych == 'I') goto yy429; - if (yych != 'i') goto yy31; -yy429: - yych = *++p; - if (yych == 'N') goto yy430; - if (yych != 'n') goto yy31; -yy430: - yych = *++p; - if (yych == 'G') goto yy431; - if (yych != 'g') goto yy31; -yy431: - yych = *++p; - if (yych == 'L') goto yy432; - if (yych != 'l') goto yy31; -yy432: - yych = *++p; - if (yych == 'E') goto yy34; - if (yych == 'e') goto yy34; - goto yy31; -yy433: - yych = *++p; - if (yych == 'N') goto yy434; - if (yych != 'n') goto yy31; -yy434: - yych = *++p; - if (yych == 'T') goto yy435; - if (yych != 't') goto yy31; -yy435: - yych = *++p; - if (yych == 'A') goto yy436; - if (yych != 'a') goto yy31; -yy436: - yych = *++p; - if (yych == 'I') goto yy437; - if (yych != 'i') goto yy31; -yy437: - yych = *++p; - if (yych == 'N') goto yy438; - if (yych != 'n') goto yy31; -yy438: - yych = *++p; - if (yych == 'E') goto yy439; - if (yych != 'e') goto yy31; -yy439: - yych = *++p; - if (yych == 'R') goto yy34; - if (yych == 'r') goto yy34; - goto yy31; -yy440: - yych = *++p; - if (yych == 'S') goto yy34; - if (yych == 's') goto yy34; - goto yy31; -yy441: - yych = *++p; - if (yych <= 'N') { - if (yych <= 'A') { - if (yych <= '@') goto yy31; - goto yy463; - } else { - if (yych <= 'L') goto yy31; - if (yych <= 'M') goto yy464; - goto yy465; - } - } else { - if (yych <= 'l') { - if (yych == 'a') goto yy463; - goto yy31; - } else { - if (yych <= 'm') goto yy464; - if (yych <= 'n') goto yy465; - goto yy31; - } - } -yy442: - yych = *++p; - if (yych == 'R') goto yy450; - if (yych == 'r') goto yy450; - goto yy31; -yy443: - yych = *++p; - if (yych <= 'P') { - if (yych == 'L') goto yy447; - if (yych <= 'O') goto yy31; - goto yy34; - } else { - if (yych <= 'l') { - if (yych <= 'k') goto yy31; - goto yy447; - } else { - if (yych == 'p') goto yy34; - goto yy31; - } - } -yy444: - yych = *++p; - if (yych == 'I') goto yy446; - if (yych == 'i') goto yy446; - goto yy31; -yy445: - yych = *++p; - if (yych == 'D') goto yy34; - if (yych == 'd') goto yy34; - goto yy31; -yy446: - yych = *++p; - if (yych == 'D') goto yy34; - if (yych == 'd') goto yy34; - goto yy31; -yy447: - yych = *++p; - if (yych == 'L') goto yy448; - if (yych != 'l') goto yy31; -yy448: - yych = *++p; - if (yych == 'T') goto yy449; - if (yych != 't') goto yy31; -yy449: - yych = *++p; - if (yych == 'O') goto yy34; - if (yych == 'o') goto yy34; - goto yy31; -yy450: - yych = *++p; - if (yych == 'O') goto yy451; - if (yych != 'o') goto yy31; -yy451: - yych = *++p; - if (yych == 'M') goto yy452; - if (yych != 'm') goto yy31; -yy452: - yych = *++p; - if (yych == 'E') goto yy453; - if (yych != 'e') goto yy31; -yy453: - yych = *++p; - if (yych == '-') goto yy454; - if (yych == ':') goto yy35; - goto yy31; -yy454: - yych = *++p; - if (yych == 'E') goto yy455; - if (yych != 'e') goto yy31; -yy455: - yych = *++p; - if (yych == 'X') goto yy456; - if (yych != 'x') goto yy31; -yy456: - yych = *++p; - if (yych == 'T') goto yy457; - if (yych != 't') goto yy31; -yy457: - yych = *++p; - if (yych == 'E') goto yy458; - if (yych != 'e') goto yy31; -yy458: - yych = *++p; - if (yych == 'N') goto yy459; - if (yych != 'n') goto yy31; -yy459: - yych = *++p; - if (yych == 'S') goto yy460; - if (yych != 's') goto yy31; -yy460: - yych = *++p; - if (yych == 'I') goto yy461; - if (yych != 'i') goto yy31; -yy461: - yych = *++p; - if (yych == 'O') goto yy462; - if (yych != 'o') goto yy31; -yy462: - yych = *++p; - if (yych == 'N') goto yy34; - if (yych == 'n') goto yy34; - goto yy31; -yy463: - yych = *++p; - if (yych == 'P') goto yy34; - if (yych == 'p') goto yy34; - goto yy31; -yy464: - yych = *++p; - if (yych == '-') goto yy469; - goto yy31; -yy465: - yych = *++p; - if (yych == 'T') goto yy466; - if (yych != 't') goto yy31; -yy466: - yych = *++p; - if (yych == 'E') goto yy467; - if (yych != 'e') goto yy31; -yy467: - yych = *++p; - if (yych == 'N') goto yy468; - if (yych != 'n') goto yy31; -yy468: - yych = *++p; - if (yych == 'T') goto yy34; - if (yych == 't') goto yy34; - goto yy31; -yy469: - yych = *++p; - if (yych == 'E') goto yy470; - if (yych != 'e') goto yy31; -yy470: - yych = *++p; - if (yych == 'V') goto yy471; - if (yych != 'v') goto yy31; -yy471: - yych = *++p; - if (yych == 'E') goto yy472; - if (yych != 'e') goto yy31; -yy472: - yych = *++p; - if (yych == 'N') goto yy473; - if (yych != 'n') goto yy31; -yy473: - yych = *++p; - if (yych == 'T') goto yy474; - if (yych != 't') goto yy31; -yy474: - yych = *++p; - if (yych == 'B') goto yy475; - if (yych != 'b') goto yy31; -yy475: - yych = *++p; - if (yych == 'R') goto yy476; - if (yych != 'r') goto yy31; -yy476: - yych = *++p; - if (yych == 'I') goto yy477; - if (yych != 'i') goto yy31; -yy477: - yych = *++p; - if (yych == 'T') goto yy478; - if (yych != 't') goto yy31; -yy478: - yych = *++p; - if (yych == 'E') goto yy479; - if (yych != 'e') goto yy31; -yy479: - yych = *++p; - if (yych != '-') goto yy31; - yych = *++p; - if (yych == 'A') goto yy481; - if (yych != 'a') goto yy31; -yy481: - yych = *++p; - if (yych == 'T') goto yy482; - if (yych != 't') goto yy31; -yy482: - yych = *++p; - if (yych == 'T') goto yy483; - if (yych != 't') goto yy31; -yy483: - yych = *++p; - if (yych == 'E') goto yy484; - if (yych != 'e') goto yy31; -yy484: - yych = *++p; - if (yych == 'N') goto yy485; - if (yych != 'n') goto yy31; -yy485: - yych = *++p; - if (yych == 'D') goto yy486; - if (yych != 'd') goto yy31; -yy486: - yych = *++p; - if (yych == 'E') goto yy487; - if (yych != 'e') goto yy31; -yy487: - ++p; - if ((yych = *p) == 'E') goto yy34; - if (yych == 'e') goto yy34; - goto yy31; -} - -} - -// Try to match email autolink after first <, returning num of chars matched. -int _scan_autolink_email(const unsigned char *p) -{ - const unsigned char *marker = NULL; - const unsigned char *start = p; - -{ - unsigned char yych; - static const unsigned char yybm[] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 128, 0, 128, 128, 128, 128, 128, - 0, 0, 128, 128, 0, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 0, 0, 0, 128, 0, 128, - 0, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 0, 0, 0, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }; - yych = *p; - if (yych <= ',') { - if (yych <= '!') { - if (yych == '\n') goto yy490; - if (yych <= ' ') goto yy492; - goto yy491; - } else { - if (yych <= '\'') { - if (yych <= '"') goto yy492; - goto yy491; - } else { - if (yych <= ')') goto yy492; - if (yych <= '+') goto yy491; - goto yy492; - } - } - } else { - if (yych <= '?') { - if (yych <= '<') { - if (yych <= '9') goto yy491; - goto yy492; - } else { - if (yych == '>') goto yy492; - goto yy491; - } - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy492; - goto yy491; - } else { - if (yych <= ']') goto yy492; - if (yych <= '~') goto yy491; - goto yy492; - } - } - } -yy490: - { return 0; } -yy491: - yych = *(marker = ++p); - if (yych <= ',') { - if (yych <= '"') { - if (yych == '!') goto yy496; - goto yy490; - } else { - if (yych <= '\'') goto yy496; - if (yych <= ')') goto yy490; - if (yych <= '+') goto yy496; - goto yy490; - } - } else { - if (yych <= '>') { - if (yych <= '9') goto yy496; - if (yych == '=') goto yy496; - goto yy490; - } else { - if (yych <= 'Z') goto yy496; - if (yych <= ']') goto yy490; - if (yych <= '~') goto yy496; - goto yy490; - } - } -yy492: - yych = *++p; - goto yy490; -yy493: - yych = *++p; - if (yych <= '@') { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy497; - } else { - if (yych <= 'Z') goto yy497; - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy497; - } -yy494: - p = marker; - goto yy490; -yy495: - ++p; - yych = *p; -yy496: - if (yybm[0+yych] & 128) { - goto yy495; - } - if (yych == '@') goto yy493; - goto yy494; -yy497: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy499; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy499; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy499; - goto yy494; - } - } - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy627; - if (yych <= '/') goto yy494; - goto yy628; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy628; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy628; - goto yy494; - } - } -yy499: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych <= '-') goto yy627; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy628; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy628; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy628; - goto yy494; - } - } -yy500: - ++p; - yych = *p; - if (yych <= '@') { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy503; - goto yy494; - } else { - if (yych <= 'Z') goto yy503; - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy503; - goto yy494; - } -yy501: - ++p; - { return (p - start); } -yy503: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy505; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy505; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy505; - goto yy494; - } - } - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy506; - if (yych <= '/') goto yy494; - goto yy507; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy507; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy507; - goto yy494; - } - } -yy505: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy507; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy507; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy507; - goto yy494; - } - } -yy506: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy508; - if (yych <= '/') goto yy494; - goto yy509; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy509; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy509; - goto yy494; - } - } -yy507: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy509; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy509; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy509; - goto yy494; - } - } -yy508: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy510; - if (yych <= '/') goto yy494; - goto yy511; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy511; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy511; - goto yy494; - } - } -yy509: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy511; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy511; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy511; - goto yy494; - } - } -yy510: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy512; - if (yych <= '/') goto yy494; - goto yy513; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy513; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy513; - goto yy494; - } - } -yy511: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy513; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy513; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy513; - goto yy494; - } - } -yy512: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy514; - if (yych <= '/') goto yy494; - goto yy515; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy515; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy515; - goto yy494; - } - } -yy513: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy515; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy515; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy515; - goto yy494; - } - } -yy514: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy516; - if (yych <= '/') goto yy494; - goto yy517; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy517; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy517; - goto yy494; - } - } -yy515: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy517; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy517; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy517; - goto yy494; - } - } -yy516: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy518; - if (yych <= '/') goto yy494; - goto yy519; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy519; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy519; - goto yy494; - } - } -yy517: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy519; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy519; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy519; - goto yy494; - } - } -yy518: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy520; - if (yych <= '/') goto yy494; - goto yy521; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy521; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy521; - goto yy494; - } - } -yy519: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy521; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy521; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy521; - goto yy494; - } - } -yy520: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy522; - if (yych <= '/') goto yy494; - goto yy523; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy523; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy523; - goto yy494; - } - } -yy521: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy523; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy523; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy523; - goto yy494; - } - } -yy522: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy524; - if (yych <= '/') goto yy494; - goto yy525; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy525; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy525; - goto yy494; - } - } -yy523: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy525; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy525; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy525; - goto yy494; - } - } -yy524: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy526; - if (yych <= '/') goto yy494; - goto yy527; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy527; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy527; - goto yy494; - } - } -yy525: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy527; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy527; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy527; - goto yy494; - } - } -yy526: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy528; - if (yych <= '/') goto yy494; - goto yy529; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy529; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy529; - goto yy494; - } - } -yy527: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy529; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy529; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy529; - goto yy494; - } - } -yy528: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy530; - if (yych <= '/') goto yy494; - goto yy531; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy531; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy531; - goto yy494; - } - } -yy529: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy531; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy531; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy531; - goto yy494; - } - } -yy530: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy532; - if (yych <= '/') goto yy494; - goto yy533; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy533; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy533; - goto yy494; - } - } -yy531: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy533; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy533; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy533; - goto yy494; - } - } -yy532: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy534; - if (yych <= '/') goto yy494; - goto yy535; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy535; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy535; - goto yy494; - } - } -yy533: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy535; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy535; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy535; - goto yy494; - } - } -yy534: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy536; - if (yych <= '/') goto yy494; - goto yy537; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy537; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy537; - goto yy494; - } - } -yy535: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy537; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy537; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy537; - goto yy494; - } - } -yy536: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy538; - if (yych <= '/') goto yy494; - goto yy539; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy539; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy539; - goto yy494; - } - } -yy537: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy539; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy539; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy539; - goto yy494; - } - } -yy538: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy540; - if (yych <= '/') goto yy494; - goto yy541; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy541; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy541; - goto yy494; - } - } -yy539: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy541; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy541; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy541; - goto yy494; - } - } -yy540: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy542; - if (yych <= '/') goto yy494; - goto yy543; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy543; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy543; - goto yy494; - } - } -yy541: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy543; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy543; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy543; - goto yy494; - } - } -yy542: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy544; - if (yych <= '/') goto yy494; - goto yy545; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy545; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy545; - goto yy494; - } - } -yy543: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy545; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy545; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy545; - goto yy494; - } - } -yy544: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy546; - if (yych <= '/') goto yy494; - goto yy547; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy547; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy547; - goto yy494; - } - } -yy545: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy547; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy547; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy547; - goto yy494; - } - } -yy546: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy548; - if (yych <= '/') goto yy494; - goto yy549; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy549; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy549; - goto yy494; - } - } -yy547: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy549; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy549; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy549; - goto yy494; - } - } -yy548: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy550; - if (yych <= '/') goto yy494; - goto yy551; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy551; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy551; - goto yy494; - } - } -yy549: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy551; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy551; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy551; - goto yy494; - } - } -yy550: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy552; - if (yych <= '/') goto yy494; - goto yy553; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy553; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy553; - goto yy494; - } - } -yy551: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy553; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy553; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy553; - goto yy494; - } - } -yy552: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy554; - if (yych <= '/') goto yy494; - goto yy555; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy555; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy555; - goto yy494; - } - } -yy553: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy555; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy555; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy555; - goto yy494; - } - } -yy554: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy556; - if (yych <= '/') goto yy494; - goto yy557; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy557; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy557; - goto yy494; - } - } -yy555: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy557; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy557; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy557; - goto yy494; - } - } -yy556: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy558; - if (yych <= '/') goto yy494; - goto yy559; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy559; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy559; - goto yy494; - } - } -yy557: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy559; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy559; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy559; - goto yy494; - } - } -yy558: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy560; - if (yych <= '/') goto yy494; - goto yy561; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy561; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy561; - goto yy494; - } - } -yy559: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy561; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy561; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy561; - goto yy494; - } - } -yy560: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy562; - if (yych <= '/') goto yy494; - goto yy563; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy563; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy563; - goto yy494; - } - } -yy561: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy563; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy563; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy563; - goto yy494; - } - } -yy562: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy564; - if (yych <= '/') goto yy494; - goto yy565; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy565; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy565; - goto yy494; - } - } -yy563: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy565; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy565; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy565; - goto yy494; - } - } -yy564: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy566; - if (yych <= '/') goto yy494; - goto yy567; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy567; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy567; - goto yy494; - } - } -yy565: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy567; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy567; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy567; - goto yy494; - } - } -yy566: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy568; - if (yych <= '/') goto yy494; - goto yy569; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy569; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy569; - goto yy494; - } - } -yy567: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy569; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy569; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy569; - goto yy494; - } - } -yy568: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy570; - if (yych <= '/') goto yy494; - goto yy571; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy571; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy571; - goto yy494; - } - } -yy569: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy571; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy571; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy571; - goto yy494; - } - } -yy570: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy572; - if (yych <= '/') goto yy494; - goto yy573; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy573; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy573; - goto yy494; - } - } -yy571: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy573; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy573; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy573; - goto yy494; - } - } -yy572: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy574; - if (yych <= '/') goto yy494; - goto yy575; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy575; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy575; - goto yy494; - } - } -yy573: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy575; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy575; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy575; - goto yy494; - } - } -yy574: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy576; - if (yych <= '/') goto yy494; - goto yy577; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy577; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy577; - goto yy494; - } - } -yy575: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy577; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy577; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy577; - goto yy494; - } - } -yy576: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy578; - if (yych <= '/') goto yy494; - goto yy579; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy579; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy579; - goto yy494; - } - } -yy577: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy579; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy579; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy579; - goto yy494; - } - } -yy578: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy580; - if (yych <= '/') goto yy494; - goto yy581; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy581; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy581; - goto yy494; - } - } -yy579: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy581; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy581; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy581; - goto yy494; - } - } -yy580: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy582; - if (yych <= '/') goto yy494; - goto yy583; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy583; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy583; - goto yy494; - } - } -yy581: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy583; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy583; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy583; - goto yy494; - } - } -yy582: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy584; - if (yych <= '/') goto yy494; - goto yy585; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy585; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy585; - goto yy494; - } - } -yy583: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy585; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy585; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy585; - goto yy494; - } - } -yy584: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy586; - if (yych <= '/') goto yy494; - goto yy587; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy587; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy587; - goto yy494; - } - } -yy585: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy587; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy587; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy587; - goto yy494; - } - } -yy586: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy588; - if (yych <= '/') goto yy494; - goto yy589; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy589; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy589; - goto yy494; - } - } -yy587: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy589; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy589; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy589; - goto yy494; - } - } -yy588: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy590; - if (yych <= '/') goto yy494; - goto yy591; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy591; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy591; - goto yy494; - } - } -yy589: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy591; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy591; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy591; - goto yy494; - } - } -yy590: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy592; - if (yych <= '/') goto yy494; - goto yy593; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy593; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy593; - goto yy494; - } - } -yy591: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy593; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy593; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy593; - goto yy494; - } - } -yy592: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy594; - if (yych <= '/') goto yy494; - goto yy595; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy595; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy595; - goto yy494; - } - } -yy593: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy595; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy595; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy595; - goto yy494; - } - } -yy594: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy596; - if (yych <= '/') goto yy494; - goto yy597; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy597; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy597; - goto yy494; - } - } -yy595: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy597; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy597; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy597; - goto yy494; - } - } -yy596: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy598; - if (yych <= '/') goto yy494; - goto yy599; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy599; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy599; - goto yy494; - } - } -yy597: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy599; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy599; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy599; - goto yy494; - } - } -yy598: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy600; - if (yych <= '/') goto yy494; - goto yy601; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy601; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy601; - goto yy494; - } - } -yy599: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy601; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy601; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy601; - goto yy494; - } - } -yy600: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy602; - if (yych <= '/') goto yy494; - goto yy603; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy603; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy603; - goto yy494; - } - } -yy601: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy603; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy603; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy603; - goto yy494; - } - } -yy602: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy604; - if (yych <= '/') goto yy494; - goto yy605; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy605; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy605; - goto yy494; - } - } -yy603: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy605; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy605; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy605; - goto yy494; - } - } -yy604: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy606; - if (yych <= '/') goto yy494; - goto yy607; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy607; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy607; - goto yy494; - } - } -yy605: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy607; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy607; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy607; - goto yy494; - } - } -yy606: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy608; - if (yych <= '/') goto yy494; - goto yy609; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy609; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy609; - goto yy494; - } - } -yy607: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy609; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy609; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy609; - goto yy494; - } - } -yy608: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy610; - if (yych <= '/') goto yy494; - goto yy611; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy611; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy611; - goto yy494; - } - } -yy609: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy611; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy611; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy611; - goto yy494; - } - } -yy610: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy612; - if (yych <= '/') goto yy494; - goto yy613; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy613; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy613; - goto yy494; - } - } -yy611: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy613; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy613; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy613; - goto yy494; - } - } -yy612: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy614; - if (yych <= '/') goto yy494; - goto yy615; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy615; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy615; - goto yy494; - } - } -yy613: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy615; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy615; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy615; - goto yy494; - } - } -yy614: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy616; - if (yych <= '/') goto yy494; - goto yy617; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy617; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy617; - goto yy494; - } - } -yy615: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy617; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy617; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy617; - goto yy494; - } - } -yy616: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy618; - if (yych <= '/') goto yy494; - goto yy619; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy619; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy619; - goto yy494; - } - } -yy617: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy619; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy619; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy619; - goto yy494; - } - } -yy618: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy620; - if (yych <= '/') goto yy494; - goto yy621; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy621; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy621; - goto yy494; - } - } -yy619: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy621; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy621; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy621; - goto yy494; - } - } -yy620: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy622; - if (yych <= '/') goto yy494; - goto yy623; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy623; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy623; - goto yy494; - } - } -yy621: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy623; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy623; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy623; - goto yy494; - } - } -yy622: - ++p; - yych = *p; - if (yych <= '9') { - if (yych == '-') goto yy624; - if (yych <= '/') goto yy494; - goto yy625; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy625; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy625; - goto yy494; - } - } -yy623: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy625; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy625; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy625; - goto yy494; - } - } -yy624: - ++p; - yych = *p; - if (yych <= '@') { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy626; - goto yy494; - } else { - if (yych <= 'Z') goto yy626; - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy626; - goto yy494; - } -yy625: - ++p; - yych = *p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= '-') goto yy494; - goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych >= ':') goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - } else { - if (yych <= '`') goto yy494; - if (yych >= '{') goto yy494; - } - } -yy626: - ++p; - yych = *p; - if (yych == '.') goto yy500; - if (yych == '>') goto yy501; - goto yy494; -yy627: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy629; - if (yych <= '/') goto yy494; - goto yy630; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy630; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy630; - goto yy494; - } - } -yy628: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy630; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy630; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy630; - goto yy494; - } - } -yy629: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy631; - if (yych <= '/') goto yy494; - goto yy632; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy632; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy632; - goto yy494; - } - } -yy630: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy632; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy632; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy632; - goto yy494; - } - } -yy631: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy633; - if (yych <= '/') goto yy494; - goto yy634; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy634; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy634; - goto yy494; - } - } -yy632: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy634; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy634; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy634; - goto yy494; - } - } -yy633: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy635; - if (yych <= '/') goto yy494; - goto yy636; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy636; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy636; - goto yy494; - } - } -yy634: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy636; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy636; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy636; - goto yy494; - } - } -yy635: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy637; - if (yych <= '/') goto yy494; - goto yy638; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy638; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy638; - goto yy494; - } - } -yy636: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy638; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy638; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy638; - goto yy494; - } - } -yy637: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy639; - if (yych <= '/') goto yy494; - goto yy640; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy640; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy640; - goto yy494; - } - } -yy638: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy640; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy640; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy640; - goto yy494; - } - } -yy639: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy641; - if (yych <= '/') goto yy494; - goto yy642; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy642; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy642; - goto yy494; - } - } -yy640: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy642; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy642; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy642; - goto yy494; - } - } -yy641: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy643; - if (yych <= '/') goto yy494; - goto yy644; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy644; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy644; - goto yy494; - } - } -yy642: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy644; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy644; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy644; - goto yy494; - } - } -yy643: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy645; - if (yych <= '/') goto yy494; - goto yy646; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy646; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy646; - goto yy494; - } - } -yy644: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy646; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy646; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy646; - goto yy494; - } - } -yy645: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy647; - if (yych <= '/') goto yy494; - goto yy648; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy648; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy648; - goto yy494; - } - } -yy646: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy648; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy648; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy648; - goto yy494; - } - } -yy647: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy649; - if (yych <= '/') goto yy494; - goto yy650; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy650; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy650; - goto yy494; - } - } -yy648: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy650; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy650; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy650; - goto yy494; - } - } -yy649: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy651; - if (yych <= '/') goto yy494; - goto yy652; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy652; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy652; - goto yy494; - } - } -yy650: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy652; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy652; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy652; - goto yy494; - } - } -yy651: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy653; - if (yych <= '/') goto yy494; - goto yy654; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy654; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy654; - goto yy494; - } - } -yy652: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy654; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy654; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy654; - goto yy494; - } - } -yy653: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy655; - if (yych <= '/') goto yy494; - goto yy656; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy656; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy656; - goto yy494; - } - } -yy654: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy656; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy656; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy656; - goto yy494; - } - } -yy655: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy657; - if (yych <= '/') goto yy494; - goto yy658; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy658; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy658; - goto yy494; - } - } -yy656: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy658; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy658; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy658; - goto yy494; - } - } -yy657: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy659; - if (yych <= '/') goto yy494; - goto yy660; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy660; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy660; - goto yy494; - } - } -yy658: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy660; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy660; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy660; - goto yy494; - } - } -yy659: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy661; - if (yych <= '/') goto yy494; - goto yy662; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy662; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy662; - goto yy494; - } - } -yy660: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy662; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy662; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy662; - goto yy494; - } - } -yy661: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy663; - if (yych <= '/') goto yy494; - goto yy664; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy664; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy664; - goto yy494; - } - } -yy662: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy664; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy664; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy664; - goto yy494; - } - } -yy663: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy665; - if (yych <= '/') goto yy494; - goto yy666; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy666; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy666; - goto yy494; - } - } -yy664: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy666; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy666; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy666; - goto yy494; - } - } -yy665: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy667; - if (yych <= '/') goto yy494; - goto yy668; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy668; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy668; - goto yy494; - } - } -yy666: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy668; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy668; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy668; - goto yy494; - } - } -yy667: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy669; - if (yych <= '/') goto yy494; - goto yy670; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy670; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy670; - goto yy494; - } - } -yy668: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy670; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy670; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy670; - goto yy494; - } - } -yy669: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy671; - if (yych <= '/') goto yy494; - goto yy672; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy672; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy672; - goto yy494; - } - } -yy670: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy672; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy672; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy672; - goto yy494; - } - } -yy671: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy673; - if (yych <= '/') goto yy494; - goto yy674; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy674; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy674; - goto yy494; - } - } -yy672: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy674; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy674; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy674; - goto yy494; - } - } -yy673: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy675; - if (yych <= '/') goto yy494; - goto yy676; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy676; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy676; - goto yy494; - } - } -yy674: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy676; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy676; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy676; - goto yy494; - } - } -yy675: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy677; - if (yych <= '/') goto yy494; - goto yy678; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy678; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy678; - goto yy494; - } - } -yy676: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy678; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy678; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy678; - goto yy494; - } - } -yy677: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy679; - if (yych <= '/') goto yy494; - goto yy680; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy680; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy680; - goto yy494; - } - } -yy678: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy680; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy680; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy680; - goto yy494; - } - } -yy679: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy681; - if (yych <= '/') goto yy494; - goto yy682; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy682; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy682; - goto yy494; - } - } -yy680: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy682; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy682; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy682; - goto yy494; - } - } -yy681: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy683; - if (yych <= '/') goto yy494; - goto yy684; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy684; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy684; - goto yy494; - } - } -yy682: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy684; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy684; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy684; - goto yy494; - } - } -yy683: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy685; - if (yych <= '/') goto yy494; - goto yy686; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy686; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy686; - goto yy494; - } - } -yy684: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy686; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy686; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy686; - goto yy494; - } - } -yy685: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy687; - if (yych <= '/') goto yy494; - goto yy688; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy688; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy688; - goto yy494; - } - } -yy686: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy688; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy688; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy688; - goto yy494; - } - } -yy687: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy689; - if (yych <= '/') goto yy494; - goto yy690; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy690; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy690; - goto yy494; - } - } -yy688: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy690; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy690; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy690; - goto yy494; - } - } -yy689: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy691; - if (yych <= '/') goto yy494; - goto yy692; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy692; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy692; - goto yy494; - } - } -yy690: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy692; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy692; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy692; - goto yy494; - } - } -yy691: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy693; - if (yych <= '/') goto yy494; - goto yy694; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy694; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy694; - goto yy494; - } - } -yy692: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy694; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy694; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy694; - goto yy494; - } - } -yy693: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy695; - if (yych <= '/') goto yy494; - goto yy696; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy696; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy696; - goto yy494; - } - } -yy694: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy696; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy696; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy696; - goto yy494; - } - } -yy695: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy697; - if (yych <= '/') goto yy494; - goto yy698; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy698; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy698; - goto yy494; - } - } -yy696: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy698; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy698; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy698; - goto yy494; - } - } -yy697: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy699; - if (yych <= '/') goto yy494; - goto yy700; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy700; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy700; - goto yy494; - } - } -yy698: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy700; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy700; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy700; - goto yy494; - } - } -yy699: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy701; - if (yych <= '/') goto yy494; - goto yy702; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy702; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy702; - goto yy494; - } - } -yy700: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy702; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy702; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy702; - goto yy494; - } - } -yy701: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy703; - if (yych <= '/') goto yy494; - goto yy704; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy704; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy704; - goto yy494; - } - } -yy702: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy704; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy704; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy704; - goto yy494; - } - } -yy703: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy705; - if (yych <= '/') goto yy494; - goto yy706; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy706; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy706; - goto yy494; - } - } -yy704: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy706; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy706; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy706; - goto yy494; - } - } -yy705: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy707; - if (yych <= '/') goto yy494; - goto yy708; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy708; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy708; - goto yy494; - } - } -yy706: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy708; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy708; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy708; - goto yy494; - } - } -yy707: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy709; - if (yych <= '/') goto yy494; - goto yy710; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy710; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy710; - goto yy494; - } - } -yy708: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy710; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy710; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy710; - goto yy494; - } - } -yy709: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy711; - if (yych <= '/') goto yy494; - goto yy712; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy712; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy712; - goto yy494; - } - } -yy710: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy712; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy712; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy712; - goto yy494; - } - } -yy711: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy713; - if (yych <= '/') goto yy494; - goto yy714; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy714; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy714; - goto yy494; - } - } -yy712: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy714; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy714; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy714; - goto yy494; - } - } -yy713: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy715; - if (yych <= '/') goto yy494; - goto yy716; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy716; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy716; - goto yy494; - } - } -yy714: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy716; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy716; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy716; - goto yy494; - } - } -yy715: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy717; - if (yych <= '/') goto yy494; - goto yy718; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy718; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy718; - goto yy494; - } - } -yy716: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy718; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy718; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy718; - goto yy494; - } - } -yy717: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy719; - if (yych <= '/') goto yy494; - goto yy720; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy720; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy720; - goto yy494; - } - } -yy718: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy720; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy720; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy720; - goto yy494; - } - } -yy719: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy721; - if (yych <= '/') goto yy494; - goto yy722; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy722; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy722; - goto yy494; - } - } -yy720: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy722; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy722; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy722; - goto yy494; - } - } -yy721: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy723; - if (yych <= '/') goto yy494; - goto yy724; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy724; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy724; - goto yy494; - } - } -yy722: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy724; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy724; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy724; - goto yy494; - } - } -yy723: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy725; - if (yych <= '/') goto yy494; - goto yy726; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy726; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy726; - goto yy494; - } - } -yy724: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy726; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy726; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy726; - goto yy494; - } - } -yy725: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy727; - if (yych <= '/') goto yy494; - goto yy728; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy728; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy728; - goto yy494; - } - } -yy726: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy728; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy728; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy728; - goto yy494; - } - } -yy727: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy729; - if (yych <= '/') goto yy494; - goto yy730; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy730; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy730; - goto yy494; - } - } -yy728: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy730; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy730; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy730; - goto yy494; - } - } -yy729: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy731; - if (yych <= '/') goto yy494; - goto yy732; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy732; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy732; - goto yy494; - } - } -yy730: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy732; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy732; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy732; - goto yy494; - } - } -yy731: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy733; - if (yych <= '/') goto yy494; - goto yy734; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy734; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy734; - goto yy494; - } - } -yy732: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy734; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy734; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy734; - goto yy494; - } - } -yy733: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy735; - if (yych <= '/') goto yy494; - goto yy736; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy736; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy736; - goto yy494; - } - } -yy734: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy736; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy736; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy736; - goto yy494; - } - } -yy735: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy737; - if (yych <= '/') goto yy494; - goto yy738; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy738; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy738; - goto yy494; - } - } -yy736: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy738; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy738; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy738; - goto yy494; - } - } -yy737: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy739; - if (yych <= '/') goto yy494; - goto yy740; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy740; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy740; - goto yy494; - } - } -yy738: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy740; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy740; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy740; - goto yy494; - } - } -yy739: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy741; - if (yych <= '/') goto yy494; - goto yy742; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy742; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy742; - goto yy494; - } - } -yy740: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy742; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy742; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy742; - goto yy494; - } - } -yy741: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy743; - if (yych <= '/') goto yy494; - goto yy744; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy744; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy744; - goto yy494; - } - } -yy742: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy744; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy744; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy744; - goto yy494; - } - } -yy743: - yych = *++p; - if (yych <= '9') { - if (yych == '-') goto yy745; - if (yych <= '/') goto yy494; - goto yy746; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy494; - goto yy746; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy746; - goto yy494; - } - } -yy744: - yych = *++p; - if (yych <= '=') { - if (yych <= '.') { - if (yych <= ',') goto yy494; - if (yych >= '.') goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy746; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy746; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy746; - goto yy494; - } - } -yy745: - yych = *++p; - if (yych <= '@') { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy626; - goto yy494; - } else { - if (yych <= 'Z') goto yy626; - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy626; - goto yy494; - } -yy746: - ++p; - if ((yych = *p) <= '=') { - if (yych <= '.') { - if (yych <= '-') goto yy494; - goto yy500; - } else { - if (yych <= '/') goto yy494; - if (yych <= '9') goto yy626; - goto yy494; - } - } else { - if (yych <= 'Z') { - if (yych <= '>') goto yy501; - if (yych <= '@') goto yy494; - goto yy626; - } else { - if (yych <= '`') goto yy494; - if (yych <= 'z') goto yy626; - goto yy494; - } - } -} - -} - -// Try to match an HTML tag after first <, returning num of chars matched. -int _scan_html_tag(const unsigned char *p) -{ - const unsigned char *marker = NULL; - const unsigned char *start = p; - -{ - unsigned char yych; - static const unsigned char yybm[] = { - /* table 1 .. 8: 0 */ - 0, 230, 230, 230, 230, 230, 230, 230, - 230, 199, 199, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, - 199, 230, 70, 230, 230, 230, 230, 134, - 230, 230, 230, 230, 230, 246, 246, 230, - 254, 254, 254, 254, 254, 254, 254, 254, - 254, 254, 246, 230, 198, 198, 196, 230, - 230, 254, 254, 254, 254, 254, 254, 254, - 254, 254, 254, 254, 254, 254, 254, 254, - 254, 254, 254, 254, 254, 254, 254, 254, - 254, 254, 254, 230, 230, 226, 230, 246, - 198, 254, 254, 254, 254, 254, 254, 254, - 254, 254, 254, 254, 254, 254, 254, 254, - 254, 254, 254, 254, 254, 254, 254, 254, - 254, 254, 254, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, - /* table 9 .. 11: 256 */ - 0, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 32, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 128, - 160, 224, 224, 224, 224, 224, 224, 224, - 224, 224, 224, 224, 224, 224, 224, 224, - 224, 224, 224, 224, 224, 224, 224, 224, - 224, 224, 224, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - }; - yych = *p; - if (yych <= '/') { - if (yych <= ' ') { - if (yych != '\n') goto yy754; - } else { - if (yych <= '!') goto yy752; - if (yych <= '.') goto yy754; - goto yy751; - } - } else { - if (yych <= '@') { - if (yych == '?') goto yy753; - goto yy754; - } else { - if (yych <= 'Z') goto yy750; - if (yych <= '`') goto yy754; - if (yych <= 'z') goto yy750; - goto yy754; - } - } -yy749: - { return 0; } -yy750: - yych = *(marker = ++p); - if (yych <= '9') { - if (yych <= 0x1F) { - if (yych <= 0x08) goto yy749; - if (yych <= '\n') goto yy790; - goto yy749; - } else { - if (yych <= ' ') goto yy790; - if (yych <= '.') goto yy749; - if (yych <= '/') goto yy792; - goto yy788; - } - } else { - if (yych <= '@') { - if (yych == '>') goto yy759; - goto yy749; - } else { - if (yych <= 'Z') goto yy788; - if (yych <= '`') goto yy749; - if (yych <= 'z') goto yy788; - goto yy749; - } - } -yy751: - yych = *(marker = ++p); - if (yych <= '@') goto yy749; - if (yych <= 'Z') goto yy784; - if (yych <= '`') goto yy749; - if (yych <= 'z') goto yy784; - goto yy749; -yy752: - yych = *(marker = ++p); - if (yybm[256+yych] & 64) { - goto yy762; - } - if (yych == '-') goto yy764; - if (yych == '[') goto yy761; - goto yy749; -yy753: - yych = *(marker = ++p); - if (yych <= 0x00) goto yy749; - goto yy756; -yy754: - yych = *++p; - goto yy749; -yy755: - ++p; - yych = *p; -yy756: - if (yybm[256+yych] & 32) { - goto yy755; - } - if (yych >= 0x01) goto yy758; -yy757: - p = marker; - goto yy749; -yy758: - ++p; - yych = *p; - if (yych <= 0x00) goto yy757; - if (yych != '>') goto yy755; -yy759: - ++p; - { return (p - start); } -yy761: - yych = *++p; - if (yych == 'C') goto yy775; - if (yych == 'c') goto yy775; - goto yy757; -yy762: - ++p; - yych = *p; - if (yybm[0+yych] & 1) { - goto yy771; - } - if (yych <= '@') goto yy757; - if (yych <= 'Z') goto yy762; - goto yy757; -yy764: - yych = *++p; - if (yych != '-') goto yy757; -yy765: - ++p; - yych = *p; - if (yybm[256+yych] & 128) { - goto yy765; - } - if (yych <= 0x00) goto yy757; -yy767: - ++p; - yych = *p; - if (yych <= 0x00) goto yy757; - if (yych != '-') goto yy769; - yych = *++p; - if (yych == '>') goto yy759; - goto yy757; -yy769: - ++p; - yych = *p; - if (yych <= 0x00) goto yy757; - if (yych == '-') goto yy767; - goto yy769; -yy771: - ++p; - yych = *p; - if (yybm[0+yych] & 1) { - goto yy771; - } - if (yych <= 0x00) goto yy757; - if (yych == '>') goto yy759; -yy773: - ++p; - yych = *p; - if (yybm[0+yych] & 2) { - goto yy773; - } - if (yych <= 0x00) goto yy757; - goto yy759; -yy775: - yych = *++p; - if (yych == 'D') goto yy776; - if (yych != 'd') goto yy757; -yy776: - yych = *++p; - if (yych == 'A') goto yy777; - if (yych != 'a') goto yy757; -yy777: - yych = *++p; - if (yych == 'T') goto yy778; - if (yych != 't') goto yy757; -yy778: - yych = *++p; - if (yych == 'A') goto yy779; - if (yych != 'a') goto yy757; -yy779: - yych = *++p; - if (yych != '[') goto yy757; -yy780: - ++p; - yych = *p; - if (yybm[0+yych] & 4) { - goto yy780; - } - if (yych <= 0x00) goto yy757; - ++p; - yych = *p; - if (yybm[0+yych] & 4) { - goto yy780; - } - if (yych <= 0x00) goto yy757; - ++p; - yych = *p; - if (yych <= 0x00) goto yy757; - if (yych == '>') goto yy759; - goto yy780; -yy784: - ++p; - yych = *p; - if (yybm[0+yych] & 8) { - goto yy784; - } - if (yych <= 0x1F) { - if (yych <= 0x08) goto yy757; - if (yych >= '\v') goto yy757; - } else { - if (yych <= ' ') goto yy786; - if (yych == '>') goto yy759; - goto yy757; - } -yy786: - ++p; - yych = *p; - if (yych <= 0x1F) { - if (yych <= 0x08) goto yy757; - if (yych <= '\n') goto yy786; - goto yy757; - } else { - if (yych <= ' ') goto yy786; - if (yych == '>') goto yy759; - goto yy757; - } -yy788: - ++p; - yych = *p; - if (yych <= '9') { - if (yych <= 0x1F) { - if (yych <= 0x08) goto yy757; - if (yych >= '\v') goto yy757; - } else { - if (yych <= ' ') goto yy790; - if (yych <= '.') goto yy757; - if (yych <= '/') goto yy792; - goto yy788; - } - } else { - if (yych <= '@') { - if (yych == '>') goto yy759; - goto yy757; - } else { - if (yych <= 'Z') goto yy788; - if (yych <= '`') goto yy757; - if (yych <= 'z') goto yy788; - goto yy757; - } - } -yy790: - ++p; - yych = *p; - if (yych <= ':') { - if (yych <= ' ') { - if (yych <= 0x08) goto yy757; - if (yych <= '\n') goto yy790; - if (yych <= 0x1F) goto yy757; - goto yy790; - } else { - if (yych == '/') goto yy792; - if (yych <= '9') goto yy757; - goto yy793; - } - } else { - if (yych <= 'Z') { - if (yych == '>') goto yy759; - if (yych <= '@') goto yy757; - goto yy793; - } else { - if (yych <= '_') { - if (yych <= '^') goto yy757; - goto yy793; - } else { - if (yych <= '`') goto yy757; - if (yych <= 'z') goto yy793; - goto yy757; - } - } - } -yy792: - yych = *++p; - if (yych == '>') goto yy759; - goto yy757; -yy793: - ++p; - yych = *p; - if (yybm[0+yych] & 16) { - goto yy793; - } - if (yych <= '.') { - if (yych <= '\n') { - if (yych <= 0x08) goto yy757; - } else { - if (yych != ' ') goto yy757; - } - } else { - if (yych <= '<') { - if (yych <= '/') goto yy792; - goto yy757; - } else { - if (yych <= '=') goto yy797; - if (yych <= '>') goto yy759; - goto yy757; - } - } -yy795: - ++p; - yych = *p; - if (yych <= '<') { - if (yych <= ' ') { - if (yych <= 0x08) goto yy757; - if (yych <= '\n') goto yy795; - if (yych <= 0x1F) goto yy757; - goto yy795; - } else { - if (yych <= '/') { - if (yych <= '.') goto yy757; - goto yy792; - } else { - if (yych == ':') goto yy793; - goto yy757; - } - } - } else { - if (yych <= 'Z') { - if (yych <= '=') goto yy797; - if (yych <= '>') goto yy759; - if (yych <= '@') goto yy757; - goto yy793; - } else { - if (yych <= '_') { - if (yych <= '^') goto yy757; - goto yy793; - } else { - if (yych <= '`') goto yy757; - if (yych <= 'z') goto yy793; - goto yy757; - } - } - } -yy797: - ++p; - yych = *p; - if (yybm[0+yych] & 32) { - goto yy799; - } - if (yych <= 0x00) goto yy757; - if (yych <= '!') goto yy798; - if (yych <= '"') goto yy803; - if (yych <= ';') goto yy801; - goto yy757; -yy798: - ++p; - yych = *p; - if (yybm[0+yych] & 32) { - goto yy799; - } - if (yych <= '"') { - if (yych <= 0x00) goto yy757; - if (yych <= '!') goto yy812; - goto yy803; - } else { - if (yych <= ';') goto yy801; - if (yych == '>') goto yy759; - goto yy757; - } -yy799: - ++p; - yych = *p; - if (yybm[0+yych] & 32) { - goto yy799; - } - if (yych <= 0x00) goto yy757; - if (yych <= '!') goto yy806; - if (yych == '>') goto yy759; - goto yy757; -yy801: - ++p; - yych = *p; - if (yybm[0+yych] & 64) { - goto yy801; - } - if (yych <= 0x00) goto yy757; - goto yy805; -yy803: - ++p; - yych = *p; - if (yybm[0+yych] & 128) { - goto yy803; - } - if (yych <= 0x00) goto yy757; -yy805: - ++p; - yych = *p; - if (yych <= ' ') { - if (yych <= 0x08) goto yy757; - if (yych <= '\n') goto yy790; - if (yych <= 0x1F) goto yy757; - goto yy790; - } else { - if (yych <= '/') { - if (yych <= '.') goto yy757; - goto yy792; - } else { - if (yych == '>') goto yy759; - goto yy757; - } - } -yy806: - ++p; - yych = *p; - if (yych <= '9') { - if (yych <= ' ') { - if (yych <= 0x08) { - if (yych <= 0x00) goto yy757; - goto yy799; - } else { - if (yych <= '\n') goto yy806; - if (yych <= 0x1F) goto yy799; - goto yy806; - } - } else { - if (yych <= '"') { - if (yych <= '!') goto yy799; - goto yy757; - } else { - if (yych == '\'') goto yy757; - goto yy799; - } - } - } else { - if (yych <= '@') { - if (yych <= ';') { - if (yych >= ';') goto yy799; - } else { - if (yych <= '=') goto yy757; - if (yych <= '>') goto yy759; - goto yy799; - } - } else { - if (yych <= '_') { - if (yych <= 'Z') goto yy808; - if (yych <= '^') goto yy799; - } else { - if (yych <= '`') goto yy757; - if (yych >= '{') goto yy799; - } - } - } -yy808: - ++p; - yych = *p; - if (yych <= '/') { - if (yych <= '!') { - if (yych <= '\n') { - if (yych <= 0x00) goto yy757; - if (yych <= 0x08) goto yy799; - } else { - if (yych != ' ') goto yy799; - } - } else { - if (yych <= '\'') { - if (yych <= '"') goto yy757; - if (yych <= '&') goto yy799; - goto yy757; - } else { - if (yych <= ',') goto yy799; - if (yych <= '.') goto yy808; - goto yy799; - } - } - } else { - if (yych <= '@') { - if (yych <= '<') { - if (yych <= ':') goto yy808; - if (yych <= ';') goto yy799; - goto yy757; - } else { - if (yych <= '=') goto yy797; - if (yych <= '>') goto yy759; - goto yy799; - } - } else { - if (yych <= '_') { - if (yych <= 'Z') goto yy808; - if (yych <= '^') goto yy799; - goto yy808; - } else { - if (yych <= '`') goto yy757; - if (yych <= 'z') goto yy808; - goto yy799; - } - } - } -yy810: - ++p; - yych = *p; - if (yych <= ':') { - if (yych <= ' ') { - if (yych <= 0x08) { - if (yych <= 0x00) goto yy757; - goto yy799; - } else { - if (yych <= '\n') goto yy810; - if (yych <= 0x1F) goto yy799; - goto yy810; - } - } else { - if (yych <= '&') { - if (yych == '"') goto yy757; - goto yy799; - } else { - if (yych <= '\'') goto yy757; - if (yych <= '9') goto yy799; - goto yy808; - } - } - } else { - if (yych <= '@') { - if (yych <= '<') { - if (yych <= ';') goto yy799; - goto yy757; - } else { - if (yych <= '=') goto yy797; - if (yych <= '>') goto yy759; - goto yy799; - } - } else { - if (yych <= '_') { - if (yych <= 'Z') goto yy808; - if (yych <= '^') goto yy799; - goto yy808; - } else { - if (yych <= '`') goto yy757; - if (yych <= 'z') goto yy808; - goto yy799; - } - } - } -yy812: - ++p; - yych = *p; - if (yych <= '9') { - if (yych <= ' ') { - if (yych <= 0x08) { - if (yych <= 0x00) goto yy757; - goto yy799; - } else { - if (yych <= '\n') goto yy812; - if (yych <= 0x1F) goto yy799; - goto yy812; - } - } else { - if (yych <= '"') { - if (yych <= '!') goto yy799; - goto yy803; - } else { - if (yych == '\'') goto yy801; - goto yy799; - } - } - } else { - if (yych <= '@') { - if (yych <= ';') { - if (yych <= ':') goto yy808; - goto yy799; - } else { - if (yych <= '=') goto yy757; - if (yych <= '>') goto yy759; - goto yy799; - } - } else { - if (yych <= '_') { - if (yych <= 'Z') goto yy808; - if (yych <= '^') goto yy799; - goto yy808; - } else { - if (yych <= '`') goto yy757; - if (yych <= 'z') goto yy808; - goto yy799; - } - } - } -} - -} - -// Try to match an HTML block tag including first <, -// returning num of chars matched. -int _scan_html_block_tag(const unsigned char *p) -{ - const unsigned char *marker = NULL; - const unsigned char *start = p; - -{ - unsigned char yych; - yych = *p; - if (yych == '\n') goto yy816; - if (yych == '<') goto yy817; - goto yy818; -yy816: - { return 0; } -yy817: - yych = *(marker = ++p); - switch (yych) { - case '!': - case '?': goto yy819; - case '/': goto yy838; - case 'A': - case 'a': goto yy823; - case 'B': - case 'b': goto yy826; - case 'C': - case 'c': goto yy830; - case 'D': - case 'd': goto yy831; - case 'E': - case 'e': goto yy834; - case 'F': - case 'f': goto yy835; - case 'H': - case 'h': goto yy824; - case 'I': - case 'i': goto yy825; - case 'L': - case 'l': goto yy827; - case 'M': - case 'm': goto yy828; - case 'O': - case 'o': goto yy829; - case 'P': - case 'p': goto yy821; - case 'S': - case 's': goto yy832; - case 'T': - case 't': goto yy833; - case 'U': - case 'u': goto yy836; - case 'V': - case 'v': goto yy837; - default: goto yy816; - } -yy818: - yych = *++p; - goto yy816; -yy819: - ++p; - { return (p - start); } -yy821: - yych = *++p; - if (yych <= '/') { - if (yych <= 0x1F) { - if (yych <= 0x08) goto yy822; - if (yych <= '\n') goto yy982; - } else { - if (yych <= ' ') goto yy982; - if (yych >= '/') goto yy982; - } - } else { - if (yych <= 'Q') { - if (yych == '>') goto yy982; - } else { - if (yych <= 'R') goto yy1095; - if (yych == 'r') goto yy1095; - } - } -yy822: - p = marker; - goto yy816; -yy823: - yych = *++p; - if (yych <= 'S') { - if (yych <= 'Q') goto yy822; - if (yych <= 'R') goto yy1088; - goto yy1087; - } else { - if (yych <= 'q') goto yy822; - if (yych <= 'r') goto yy1088; - if (yych <= 's') goto yy1087; - goto yy822; - } -yy824: - yych = *++p; - if (yych <= 'Q') { - if (yych <= 'D') { - if (yych <= '0') goto yy822; - if (yych <= '6') goto yy981; - goto yy822; - } else { - if (yych <= 'E') goto yy1080; - if (yych == 'G') goto yy1079; - goto yy822; - } - } else { - if (yych <= 'f') { - if (yych <= 'R') goto yy981; - if (yych == 'e') goto yy1080; - goto yy822; - } else { - if (yych <= 'g') goto yy1079; - if (yych == 'r') goto yy981; - goto yy822; - } - } -yy825: - yych = *++p; - if (yych == 'F') goto yy1075; - if (yych == 'f') goto yy1075; - goto yy822; -yy826: - yych = *++p; - if (yych <= 'U') { - if (yych <= 'N') { - if (yych == 'L') goto yy1063; - goto yy822; - } else { - if (yych <= 'O') goto yy1062; - if (yych <= 'T') goto yy822; - goto yy1061; - } - } else { - if (yych <= 'n') { - if (yych == 'l') goto yy1063; - goto yy822; - } else { - if (yych <= 'o') goto yy1062; - if (yych == 'u') goto yy1061; - goto yy822; - } - } -yy827: - yych = *++p; - if (yych == 'I') goto yy981; - if (yych == 'i') goto yy981; - goto yy822; -yy828: - yych = *++p; - if (yych == 'A') goto yy1060; - if (yych == 'a') goto yy1060; - goto yy822; -yy829: - yych = *++p; - if (yych <= 'U') { - if (yych <= 'K') { - if (yych == 'B') goto yy1053; - goto yy822; - } else { - if (yych <= 'L') goto yy981; - if (yych <= 'T') goto yy822; - goto yy1052; - } - } else { - if (yych <= 'k') { - if (yych == 'b') goto yy1053; - goto yy822; - } else { - if (yych <= 'l') goto yy981; - if (yych == 'u') goto yy1052; - goto yy822; - } - } -yy830: - yych = *++p; - if (yych <= 'O') { - if (yych == 'A') goto yy1039; - if (yych <= 'N') goto yy822; - goto yy1038; - } else { - if (yych <= 'a') { - if (yych <= '`') goto yy822; - goto yy1039; - } else { - if (yych == 'o') goto yy1038; - goto yy822; - } - } -yy831: - yych = *++p; - if (yych <= 'T') { - if (yych <= 'I') { - if (yych == 'D') goto yy981; - if (yych <= 'H') goto yy822; - goto yy1037; - } else { - if (yych == 'L') goto yy981; - if (yych <= 'S') goto yy822; - goto yy981; - } - } else { - if (yych <= 'i') { - if (yych == 'd') goto yy981; - if (yych <= 'h') goto yy822; - goto yy1037; - } else { - if (yych <= 'l') { - if (yych <= 'k') goto yy822; - goto yy981; - } else { - if (yych == 't') goto yy981; - goto yy822; - } - } - } -yy832: - yych = *++p; - if (yych <= 'T') { - if (yych <= 'D') { - if (yych == 'C') goto yy1026; - goto yy822; - } else { - if (yych <= 'E') goto yy1027; - if (yych <= 'S') goto yy822; - goto yy1025; - } - } else { - if (yych <= 'd') { - if (yych == 'c') goto yy1026; - goto yy822; - } else { - if (yych <= 'e') goto yy1027; - if (yych == 't') goto yy1025; - goto yy822; - } - } -yy833: - yych = *++p; - switch (yych) { - case 'A': - case 'a': goto yy1011; - case 'B': - case 'b': goto yy1010; - case 'D': - case 'R': - case 'd': - case 'r': goto yy981; - case 'E': - case 'e': goto yy1009; - case 'F': - case 'f': goto yy1008; - case 'H': - case 'h': goto yy1007; - default: goto yy822; - } -yy834: - yych = *++p; - if (yych == 'M') goto yy1004; - if (yych == 'm') goto yy1004; - goto yy822; -yy835: - yych = *++p; - if (yych <= 'O') { - if (yych == 'I') goto yy985; - if (yych <= 'N') goto yy822; - goto yy984; - } else { - if (yych <= 'i') { - if (yych <= 'h') goto yy822; - goto yy985; - } else { - if (yych == 'o') goto yy984; - goto yy822; - } - } -yy836: - yych = *++p; - if (yych == 'L') goto yy981; - if (yych == 'l') goto yy981; - goto yy822; -yy837: - yych = *++p; - if (yych == 'I') goto yy978; - if (yych == 'i') goto yy978; - goto yy822; -yy838: - yych = *++p; - switch (yych) { - case 'A': - case 'a': goto yy840; - case 'B': - case 'b': goto yy843; - case 'C': - case 'c': goto yy847; - case 'D': - case 'd': goto yy848; - case 'E': - case 'e': goto yy851; - case 'F': - case 'f': goto yy852; - case 'H': - case 'h': goto yy841; - case 'I': - case 'i': goto yy842; - case 'L': - case 'l': goto yy844; - case 'M': - case 'm': goto yy845; - case 'O': - case 'o': goto yy846; - case 'P': - case 'p': goto yy839; - case 'S': - case 's': goto yy849; - case 'T': - case 't': goto yy850; - case 'U': - case 'u': goto yy853; - case 'V': - case 'v': goto yy854; - default: goto yy822; - } -yy839: - yych = *++p; - if (yych <= '=') { - if (yych <= '\n') { - if (yych <= 0x08) goto yy822; - goto yy859; - } else { - if (yych == ' ') goto yy859; - goto yy822; - } - } else { - if (yych <= 'R') { - if (yych <= '>') goto yy859; - if (yych <= 'Q') goto yy822; - goto yy972; - } else { - if (yych == 'r') goto yy972; - goto yy822; - } - } -yy840: - yych = *++p; - if (yych <= 'S') { - if (yych <= 'Q') goto yy822; - if (yych <= 'R') goto yy965; - goto yy964; - } else { - if (yych <= 'q') goto yy822; - if (yych <= 'r') goto yy965; - if (yych <= 's') goto yy964; - goto yy822; - } -yy841: - yych = *++p; - if (yych <= 'Q') { - if (yych <= 'D') { - if (yych <= '0') goto yy822; - if (yych <= '6') goto yy858; - goto yy822; - } else { - if (yych <= 'E') goto yy957; - if (yych == 'G') goto yy956; - goto yy822; - } - } else { - if (yych <= 'f') { - if (yych <= 'R') goto yy858; - if (yych == 'e') goto yy957; - goto yy822; - } else { - if (yych <= 'g') goto yy956; - if (yych == 'r') goto yy858; - goto yy822; - } - } -yy842: - yych = *++p; - if (yych == 'F') goto yy952; - if (yych == 'f') goto yy952; - goto yy822; -yy843: - yych = *++p; - if (yych <= 'U') { - if (yych <= 'N') { - if (yych == 'L') goto yy940; - goto yy822; - } else { - if (yych <= 'O') goto yy939; - if (yych <= 'T') goto yy822; - goto yy938; - } - } else { - if (yych <= 'n') { - if (yych == 'l') goto yy940; - goto yy822; - } else { - if (yych <= 'o') goto yy939; - if (yych == 'u') goto yy938; - goto yy822; - } - } -yy844: - yych = *++p; - if (yych == 'I') goto yy858; - if (yych == 'i') goto yy858; - goto yy822; -yy845: - yych = *++p; - if (yych == 'A') goto yy937; - if (yych == 'a') goto yy937; - goto yy822; -yy846: - yych = *++p; - if (yych <= 'U') { - if (yych <= 'K') { - if (yych == 'B') goto yy930; - goto yy822; - } else { - if (yych <= 'L') goto yy858; - if (yych <= 'T') goto yy822; - goto yy929; - } - } else { - if (yych <= 'k') { - if (yych == 'b') goto yy930; - goto yy822; - } else { - if (yych <= 'l') goto yy858; - if (yych == 'u') goto yy929; - goto yy822; - } - } -yy847: - yych = *++p; - if (yych <= 'O') { - if (yych == 'A') goto yy916; - if (yych <= 'N') goto yy822; - goto yy915; - } else { - if (yych <= 'a') { - if (yych <= '`') goto yy822; - goto yy916; - } else { - if (yych == 'o') goto yy915; - goto yy822; - } - } -yy848: - yych = *++p; - if (yych <= 'T') { - if (yych <= 'I') { - if (yych == 'D') goto yy858; - if (yych <= 'H') goto yy822; - goto yy914; - } else { - if (yych == 'L') goto yy858; - if (yych <= 'S') goto yy822; - goto yy858; - } - } else { - if (yych <= 'i') { - if (yych == 'd') goto yy858; - if (yych <= 'h') goto yy822; - goto yy914; - } else { - if (yych <= 'l') { - if (yych <= 'k') goto yy822; - goto yy858; - } else { - if (yych == 't') goto yy858; - goto yy822; - } - } - } -yy849: - yych = *++p; - if (yych <= 'T') { - if (yych <= 'D') { - if (yych == 'C') goto yy903; - goto yy822; - } else { - if (yych <= 'E') goto yy904; - if (yych <= 'S') goto yy822; - goto yy902; - } - } else { - if (yych <= 'd') { - if (yych == 'c') goto yy903; - goto yy822; - } else { - if (yych <= 'e') goto yy904; - if (yych == 't') goto yy902; - goto yy822; - } - } -yy850: - yych = *++p; - switch (yych) { - case 'A': - case 'a': goto yy888; - case 'B': - case 'b': goto yy887; - case 'D': - case 'R': - case 'd': - case 'r': goto yy858; - case 'E': - case 'e': goto yy886; - case 'F': - case 'f': goto yy885; - case 'H': - case 'h': goto yy884; - default: goto yy822; - } -yy851: - yych = *++p; - if (yych == 'M') goto yy881; - if (yych == 'm') goto yy881; - goto yy822; -yy852: - yych = *++p; - if (yych <= 'O') { - if (yych == 'I') goto yy862; - if (yych <= 'N') goto yy822; - goto yy861; - } else { - if (yych <= 'i') { - if (yych <= 'h') goto yy822; - goto yy862; - } else { - if (yych == 'o') goto yy861; - goto yy822; - } - } -yy853: - yych = *++p; - if (yych == 'L') goto yy858; - if (yych == 'l') goto yy858; - goto yy822; -yy854: - yych = *++p; - if (yych == 'I') goto yy855; - if (yych != 'i') goto yy822; -yy855: - yych = *++p; - if (yych == 'D') goto yy856; - if (yych != 'd') goto yy822; -yy856: - yych = *++p; - if (yych == 'E') goto yy857; - if (yych != 'e') goto yy822; -yy857: - yych = *++p; - if (yych == 'O') goto yy858; - if (yych != 'o') goto yy822; -yy858: - yych = *++p; - if (yych <= 0x1F) { - if (yych <= 0x08) goto yy822; - if (yych >= '\v') goto yy822; - } else { - if (yych <= ' ') goto yy859; - if (yych != '>') goto yy822; - } -yy859: - ++p; - { return (p - start); } -yy861: - yych = *++p; - if (yych <= 'R') { - if (yych == 'O') goto yy877; - if (yych <= 'Q') goto yy822; - goto yy878; - } else { - if (yych <= 'o') { - if (yych <= 'n') goto yy822; - goto yy877; - } else { - if (yych == 'r') goto yy878; - goto yy822; - } - } -yy862: - yych = *++p; - if (yych <= 'G') { - if (yych == 'E') goto yy863; - if (yych <= 'F') goto yy822; - goto yy864; - } else { - if (yych <= 'e') { - if (yych <= 'd') goto yy822; - } else { - if (yych == 'g') goto yy864; - goto yy822; - } - } -yy863: - yych = *++p; - if (yych == 'L') goto yy873; - if (yych == 'l') goto yy873; - goto yy822; -yy864: - yych = *++p; - if (yych <= 'U') { - if (yych == 'C') goto yy866; - if (yych <= 'T') goto yy822; - } else { - if (yych <= 'c') { - if (yych <= 'b') goto yy822; - goto yy866; - } else { - if (yych != 'u') goto yy822; - } - } - yych = *++p; - if (yych == 'R') goto yy872; - if (yych == 'r') goto yy872; - goto yy822; -yy866: - yych = *++p; - if (yych == 'A') goto yy867; - if (yych != 'a') goto yy822; -yy867: - yych = *++p; - if (yych == 'P') goto yy868; - if (yych != 'p') goto yy822; -yy868: - yych = *++p; - if (yych == 'T') goto yy869; - if (yych != 't') goto yy822; -yy869: - yych = *++p; - if (yych == 'I') goto yy870; - if (yych != 'i') goto yy822; -yy870: - yych = *++p; - if (yych == 'O') goto yy871; - if (yych != 'o') goto yy822; -yy871: - yych = *++p; - if (yych == 'N') goto yy858; - if (yych == 'n') goto yy858; - goto yy822; -yy872: - yych = *++p; - if (yych == 'E') goto yy858; - if (yych == 'e') goto yy858; - goto yy822; -yy873: - yych = *++p; - if (yych == 'D') goto yy874; - if (yych != 'd') goto yy822; -yy874: - yych = *++p; - if (yych == 'S') goto yy875; - if (yych != 's') goto yy822; -yy875: - yych = *++p; - if (yych == 'E') goto yy876; - if (yych != 'e') goto yy822; -yy876: - yych = *++p; - if (yych == 'T') goto yy858; - if (yych == 't') goto yy858; - goto yy822; -yy877: - yych = *++p; - if (yych == 'T') goto yy879; - if (yych == 't') goto yy879; - goto yy822; -yy878: - yych = *++p; - if (yych == 'M') goto yy858; - if (yych == 'm') goto yy858; - goto yy822; -yy879: - yych = *++p; - if (yych == 'E') goto yy880; - if (yych != 'e') goto yy822; -yy880: - yych = *++p; - if (yych == 'R') goto yy858; - if (yych == 'r') goto yy858; - goto yy822; -yy881: - yych = *++p; - if (yych == 'B') goto yy882; - if (yych != 'b') goto yy822; -yy882: - yych = *++p; - if (yych == 'E') goto yy883; - if (yych != 'e') goto yy822; -yy883: - yych = *++p; - if (yych == 'D') goto yy858; - if (yych == 'd') goto yy858; - goto yy822; -yy884: - yych = *++p; - if (yych <= '=') { - if (yych <= '\n') { - if (yych <= 0x08) goto yy822; - goto yy859; - } else { - if (yych == ' ') goto yy859; - goto yy822; - } - } else { - if (yych <= 'E') { - if (yych <= '>') goto yy859; - if (yych <= 'D') goto yy822; - goto yy900; - } else { - if (yych == 'e') goto yy900; - goto yy822; - } - } -yy885: - yych = *++p; - if (yych == 'O') goto yy898; - if (yych == 'o') goto yy898; - goto yy822; -yy886: - yych = *++p; - if (yych == 'X') goto yy893; - if (yych == 'x') goto yy893; - goto yy822; -yy887: - yych = *++p; - if (yych == 'O') goto yy891; - if (yych == 'o') goto yy891; - goto yy822; -yy888: - yych = *++p; - if (yych == 'B') goto yy889; - if (yych != 'b') goto yy822; -yy889: - yych = *++p; - if (yych == 'L') goto yy890; - if (yych != 'l') goto yy822; -yy890: - yych = *++p; - if (yych == 'E') goto yy858; - if (yych == 'e') goto yy858; - goto yy822; -yy891: - yych = *++p; - if (yych == 'D') goto yy892; - if (yych != 'd') goto yy822; -yy892: - yych = *++p; - if (yych == 'Y') goto yy858; - if (yych == 'y') goto yy858; - goto yy822; -yy893: - yych = *++p; - if (yych == 'T') goto yy894; - if (yych != 't') goto yy822; -yy894: - yych = *++p; - if (yych == 'A') goto yy895; - if (yych != 'a') goto yy822; -yy895: - yych = *++p; - if (yych == 'R') goto yy896; - if (yych != 'r') goto yy822; -yy896: - yych = *++p; - if (yych == 'E') goto yy897; - if (yych != 'e') goto yy822; -yy897: - yych = *++p; - if (yych == 'A') goto yy858; - if (yych == 'a') goto yy858; - goto yy822; -yy898: - yych = *++p; - if (yych == 'O') goto yy899; - if (yych != 'o') goto yy822; -yy899: - yych = *++p; - if (yych == 'T') goto yy858; - if (yych == 't') goto yy858; - goto yy822; -yy900: - yych = *++p; - if (yych == 'A') goto yy901; - if (yych != 'a') goto yy822; -yy901: - yych = *++p; - if (yych == 'D') goto yy858; - if (yych == 'd') goto yy858; - goto yy822; -yy902: - yych = *++p; - if (yych == 'Y') goto yy912; - if (yych == 'y') goto yy912; - goto yy822; -yy903: - yych = *++p; - if (yych == 'R') goto yy909; - if (yych == 'r') goto yy909; - goto yy822; -yy904: - yych = *++p; - if (yych == 'C') goto yy905; - if (yych != 'c') goto yy822; -yy905: - yych = *++p; - if (yych == 'T') goto yy906; - if (yych != 't') goto yy822; -yy906: - yych = *++p; - if (yych == 'I') goto yy907; - if (yych != 'i') goto yy822; -yy907: - yych = *++p; - if (yych == 'O') goto yy908; - if (yych != 'o') goto yy822; -yy908: - yych = *++p; - if (yych == 'N') goto yy858; - if (yych == 'n') goto yy858; - goto yy822; -yy909: - yych = *++p; - if (yych == 'I') goto yy910; - if (yych != 'i') goto yy822; -yy910: - yych = *++p; - if (yych == 'P') goto yy911; - if (yych != 'p') goto yy822; -yy911: - yych = *++p; - if (yych == 'T') goto yy858; - if (yych == 't') goto yy858; - goto yy822; -yy912: - yych = *++p; - if (yych == 'L') goto yy913; - if (yych != 'l') goto yy822; -yy913: - yych = *++p; - if (yych == 'E') goto yy858; - if (yych == 'e') goto yy858; - goto yy822; -yy914: - yych = *++p; - if (yych == 'V') goto yy858; - if (yych == 'v') goto yy858; - goto yy822; -yy915: - yych = *++p; - if (yych == 'L') goto yy924; - if (yych == 'l') goto yy924; - goto yy822; -yy916: - yych = *++p; - if (yych <= 'P') { - if (yych == 'N') goto yy917; - if (yych <= 'O') goto yy822; - goto yy918; - } else { - if (yych <= 'n') { - if (yych <= 'm') goto yy822; - } else { - if (yych == 'p') goto yy918; - goto yy822; - } - } -yy917: - yych = *++p; - if (yych == 'V') goto yy922; - if (yych == 'v') goto yy922; - goto yy822; -yy918: - yych = *++p; - if (yych == 'T') goto yy919; - if (yych != 't') goto yy822; -yy919: - yych = *++p; - if (yych == 'I') goto yy920; - if (yych != 'i') goto yy822; -yy920: - yych = *++p; - if (yych == 'O') goto yy921; - if (yych != 'o') goto yy822; -yy921: - yych = *++p; - if (yych == 'N') goto yy858; - if (yych == 'n') goto yy858; - goto yy822; -yy922: - yych = *++p; - if (yych == 'A') goto yy923; - if (yych != 'a') goto yy822; -yy923: - yych = *++p; - if (yych == 'S') goto yy858; - if (yych == 's') goto yy858; - goto yy822; -yy924: - yych = *++p; - if (yych <= '=') { - if (yych <= '\n') { - if (yych <= 0x08) goto yy822; - goto yy859; - } else { - if (yych == ' ') goto yy859; - goto yy822; - } - } else { - if (yych <= 'G') { - if (yych <= '>') goto yy859; - if (yych <= 'F') goto yy822; - } else { - if (yych != 'g') goto yy822; - } - } - yych = *++p; - if (yych == 'R') goto yy926; - if (yych != 'r') goto yy822; -yy926: - yych = *++p; - if (yych == 'O') goto yy927; - if (yych != 'o') goto yy822; -yy927: - yych = *++p; - if (yych == 'U') goto yy928; - if (yych != 'u') goto yy822; -yy928: - yych = *++p; - if (yych == 'P') goto yy858; - if (yych == 'p') goto yy858; - goto yy822; -yy929: - yych = *++p; - if (yych == 'T') goto yy934; - if (yych == 't') goto yy934; - goto yy822; -yy930: - yych = *++p; - if (yych == 'J') goto yy931; - if (yych != 'j') goto yy822; -yy931: - yych = *++p; - if (yych == 'E') goto yy932; - if (yych != 'e') goto yy822; -yy932: - yych = *++p; - if (yych == 'C') goto yy933; - if (yych != 'c') goto yy822; -yy933: - yych = *++p; - if (yych == 'T') goto yy858; - if (yych == 't') goto yy858; - goto yy822; -yy934: - yych = *++p; - if (yych == 'P') goto yy935; - if (yych != 'p') goto yy822; -yy935: - yych = *++p; - if (yych == 'U') goto yy936; - if (yych != 'u') goto yy822; -yy936: - yych = *++p; - if (yych == 'T') goto yy858; - if (yych == 't') goto yy858; - goto yy822; -yy937: - yych = *++p; - if (yych == 'P') goto yy858; - if (yych == 'p') goto yy858; - goto yy822; -yy938: - yych = *++p; - if (yych == 'T') goto yy949; - if (yych == 't') goto yy949; - goto yy822; -yy939: - yych = *++p; - if (yych == 'D') goto yy948; - if (yych == 'd') goto yy948; - goto yy822; -yy940: - yych = *++p; - if (yych == 'O') goto yy941; - if (yych != 'o') goto yy822; -yy941: - yych = *++p; - if (yych == 'C') goto yy942; - if (yych != 'c') goto yy822; -yy942: - yych = *++p; - if (yych == 'K') goto yy943; - if (yych != 'k') goto yy822; -yy943: - yych = *++p; - if (yych == 'Q') goto yy944; - if (yych != 'q') goto yy822; -yy944: - yych = *++p; - if (yych == 'U') goto yy945; - if (yych != 'u') goto yy822; -yy945: - yych = *++p; - if (yych == 'O') goto yy946; - if (yych != 'o') goto yy822; -yy946: - yych = *++p; - if (yych == 'T') goto yy947; - if (yych != 't') goto yy822; -yy947: - yych = *++p; - if (yych == 'E') goto yy858; - if (yych == 'e') goto yy858; - goto yy822; -yy948: - yych = *++p; - if (yych == 'Y') goto yy858; - if (yych == 'y') goto yy858; - goto yy822; -yy949: - yych = *++p; - if (yych == 'T') goto yy950; - if (yych != 't') goto yy822; -yy950: - yych = *++p; - if (yych == 'O') goto yy951; - if (yych != 'o') goto yy822; -yy951: - yych = *++p; - if (yych == 'N') goto yy858; - if (yych == 'n') goto yy858; - goto yy822; -yy952: - yych = *++p; - if (yych == 'R') goto yy953; - if (yych != 'r') goto yy822; -yy953: - yych = *++p; - if (yych == 'A') goto yy954; - if (yych != 'a') goto yy822; -yy954: - yych = *++p; - if (yych == 'M') goto yy955; - if (yych != 'm') goto yy822; -yy955: - yych = *++p; - if (yych == 'E') goto yy858; - if (yych == 'e') goto yy858; - goto yy822; -yy956: - yych = *++p; - if (yych == 'R') goto yy961; - if (yych == 'r') goto yy961; - goto yy822; -yy957: - yych = *++p; - if (yych == 'A') goto yy958; - if (yych != 'a') goto yy822; -yy958: - yych = *++p; - if (yych == 'D') goto yy959; - if (yych != 'd') goto yy822; -yy959: - yych = *++p; - if (yych == 'E') goto yy960; - if (yych != 'e') goto yy822; -yy960: - yych = *++p; - if (yych == 'R') goto yy858; - if (yych == 'r') goto yy858; - goto yy822; -yy961: - yych = *++p; - if (yych == 'O') goto yy962; - if (yych != 'o') goto yy822; -yy962: - yych = *++p; - if (yych == 'U') goto yy963; - if (yych != 'u') goto yy822; -yy963: - yych = *++p; - if (yych == 'P') goto yy858; - if (yych == 'p') goto yy858; - goto yy822; -yy964: - yych = *++p; - if (yych == 'I') goto yy970; - if (yych == 'i') goto yy970; - goto yy822; -yy965: - yych = *++p; - if (yych == 'T') goto yy966; - if (yych != 't') goto yy822; -yy966: - yych = *++p; - if (yych == 'I') goto yy967; - if (yych != 'i') goto yy822; -yy967: - yych = *++p; - if (yych == 'C') goto yy968; - if (yych != 'c') goto yy822; -yy968: - yych = *++p; - if (yych == 'L') goto yy969; - if (yych != 'l') goto yy822; -yy969: - yych = *++p; - if (yych == 'E') goto yy858; - if (yych == 'e') goto yy858; - goto yy822; -yy970: - yych = *++p; - if (yych == 'D') goto yy971; - if (yych != 'd') goto yy822; -yy971: - yych = *++p; - if (yych == 'E') goto yy858; - if (yych == 'e') goto yy858; - goto yy822; -yy972: - yych = *++p; - if (yych <= 'O') { - if (yych == 'E') goto yy858; - if (yych <= 'N') goto yy822; - } else { - if (yych <= 'e') { - if (yych <= 'd') goto yy822; - goto yy858; - } else { - if (yych != 'o') goto yy822; - } - } - yych = *++p; - if (yych == 'G') goto yy974; - if (yych != 'g') goto yy822; -yy974: - yych = *++p; - if (yych == 'R') goto yy975; - if (yych != 'r') goto yy822; -yy975: - yych = *++p; - if (yych == 'E') goto yy976; - if (yych != 'e') goto yy822; -yy976: - yych = *++p; - if (yych == 'S') goto yy977; - if (yych != 's') goto yy822; -yy977: - yych = *++p; - if (yych == 'S') goto yy858; - if (yych == 's') goto yy858; - goto yy822; -yy978: - yych = *++p; - if (yych == 'D') goto yy979; - if (yych != 'd') goto yy822; -yy979: - yych = *++p; - if (yych == 'E') goto yy980; - if (yych != 'e') goto yy822; -yy980: - yych = *++p; - if (yych == 'O') goto yy981; - if (yych != 'o') goto yy822; -yy981: - yych = *++p; - if (yych <= ' ') { - if (yych <= 0x08) goto yy822; - if (yych <= '\n') goto yy982; - if (yych <= 0x1F) goto yy822; - } else { - if (yych <= '/') { - if (yych <= '.') goto yy822; - } else { - if (yych != '>') goto yy822; - } - } -yy982: - ++p; - { return (p - start); } -yy984: - yych = *++p; - if (yych <= 'R') { - if (yych == 'O') goto yy1000; - if (yych <= 'Q') goto yy822; - goto yy1001; - } else { - if (yych <= 'o') { - if (yych <= 'n') goto yy822; - goto yy1000; - } else { - if (yych == 'r') goto yy1001; - goto yy822; - } - } -yy985: - yych = *++p; - if (yych <= 'G') { - if (yych == 'E') goto yy986; - if (yych <= 'F') goto yy822; - goto yy987; - } else { - if (yych <= 'e') { - if (yych <= 'd') goto yy822; - } else { - if (yych == 'g') goto yy987; - goto yy822; - } - } -yy986: - yych = *++p; - if (yych == 'L') goto yy996; - if (yych == 'l') goto yy996; - goto yy822; -yy987: - yych = *++p; - if (yych <= 'U') { - if (yych == 'C') goto yy989; - if (yych <= 'T') goto yy822; - } else { - if (yych <= 'c') { - if (yych <= 'b') goto yy822; - goto yy989; - } else { - if (yych != 'u') goto yy822; - } - } - yych = *++p; - if (yych == 'R') goto yy995; - if (yych == 'r') goto yy995; - goto yy822; -yy989: - yych = *++p; - if (yych == 'A') goto yy990; - if (yych != 'a') goto yy822; -yy990: - yych = *++p; - if (yych == 'P') goto yy991; - if (yych != 'p') goto yy822; -yy991: - yych = *++p; - if (yych == 'T') goto yy992; - if (yych != 't') goto yy822; -yy992: - yych = *++p; - if (yych == 'I') goto yy993; - if (yych != 'i') goto yy822; -yy993: - yych = *++p; - if (yych == 'O') goto yy994; - if (yych != 'o') goto yy822; -yy994: - yych = *++p; - if (yych == 'N') goto yy981; - if (yych == 'n') goto yy981; - goto yy822; -yy995: - yych = *++p; - if (yych == 'E') goto yy981; - if (yych == 'e') goto yy981; - goto yy822; -yy996: - yych = *++p; - if (yych == 'D') goto yy997; - if (yych != 'd') goto yy822; -yy997: - yych = *++p; - if (yych == 'S') goto yy998; - if (yych != 's') goto yy822; -yy998: - yych = *++p; - if (yych == 'E') goto yy999; - if (yych != 'e') goto yy822; -yy999: - yych = *++p; - if (yych == 'T') goto yy981; - if (yych == 't') goto yy981; - goto yy822; -yy1000: - yych = *++p; - if (yych == 'T') goto yy1002; - if (yych == 't') goto yy1002; - goto yy822; -yy1001: - yych = *++p; - if (yych == 'M') goto yy981; - if (yych == 'm') goto yy981; - goto yy822; -yy1002: - yych = *++p; - if (yych == 'E') goto yy1003; - if (yych != 'e') goto yy822; -yy1003: - yych = *++p; - if (yych == 'R') goto yy981; - if (yych == 'r') goto yy981; - goto yy822; -yy1004: - yych = *++p; - if (yych == 'B') goto yy1005; - if (yych != 'b') goto yy822; -yy1005: - yych = *++p; - if (yych == 'E') goto yy1006; - if (yych != 'e') goto yy822; -yy1006: - yych = *++p; - if (yych == 'D') goto yy981; - if (yych == 'd') goto yy981; - goto yy822; -yy1007: - yych = *++p; - if (yych <= '/') { - if (yych <= 0x1F) { - if (yych <= 0x08) goto yy822; - if (yych <= '\n') goto yy982; - goto yy822; - } else { - if (yych <= ' ') goto yy982; - if (yych <= '.') goto yy822; - goto yy982; - } - } else { - if (yych <= 'D') { - if (yych == '>') goto yy982; - goto yy822; - } else { - if (yych <= 'E') goto yy1023; - if (yych == 'e') goto yy1023; - goto yy822; - } - } -yy1008: - yych = *++p; - if (yych == 'O') goto yy1021; - if (yych == 'o') goto yy1021; - goto yy822; -yy1009: - yych = *++p; - if (yych == 'X') goto yy1016; - if (yych == 'x') goto yy1016; - goto yy822; -yy1010: - yych = *++p; - if (yych == 'O') goto yy1014; - if (yych == 'o') goto yy1014; - goto yy822; -yy1011: - yych = *++p; - if (yych == 'B') goto yy1012; - if (yych != 'b') goto yy822; -yy1012: - yych = *++p; - if (yych == 'L') goto yy1013; - if (yych != 'l') goto yy822; -yy1013: - yych = *++p; - if (yych == 'E') goto yy981; - if (yych == 'e') goto yy981; - goto yy822; -yy1014: - yych = *++p; - if (yych == 'D') goto yy1015; - if (yych != 'd') goto yy822; -yy1015: - yych = *++p; - if (yych == 'Y') goto yy981; - if (yych == 'y') goto yy981; - goto yy822; -yy1016: - yych = *++p; - if (yych == 'T') goto yy1017; - if (yych != 't') goto yy822; -yy1017: - yych = *++p; - if (yych == 'A') goto yy1018; - if (yych != 'a') goto yy822; -yy1018: - yych = *++p; - if (yych == 'R') goto yy1019; - if (yych != 'r') goto yy822; -yy1019: - yych = *++p; - if (yych == 'E') goto yy1020; - if (yych != 'e') goto yy822; -yy1020: - yych = *++p; - if (yych == 'A') goto yy981; - if (yych == 'a') goto yy981; - goto yy822; -yy1021: - yych = *++p; - if (yych == 'O') goto yy1022; - if (yych != 'o') goto yy822; -yy1022: - yych = *++p; - if (yych == 'T') goto yy981; - if (yych == 't') goto yy981; - goto yy822; -yy1023: - yych = *++p; - if (yych == 'A') goto yy1024; - if (yych != 'a') goto yy822; -yy1024: - yych = *++p; - if (yych == 'D') goto yy981; - if (yych == 'd') goto yy981; - goto yy822; -yy1025: - yych = *++p; - if (yych == 'Y') goto yy1035; - if (yych == 'y') goto yy1035; - goto yy822; -yy1026: - yych = *++p; - if (yych == 'R') goto yy1032; - if (yych == 'r') goto yy1032; - goto yy822; -yy1027: - yych = *++p; - if (yych == 'C') goto yy1028; - if (yych != 'c') goto yy822; -yy1028: - yych = *++p; - if (yych == 'T') goto yy1029; - if (yych != 't') goto yy822; -yy1029: - yych = *++p; - if (yych == 'I') goto yy1030; - if (yych != 'i') goto yy822; -yy1030: - yych = *++p; - if (yych == 'O') goto yy1031; - if (yych != 'o') goto yy822; -yy1031: - yych = *++p; - if (yych == 'N') goto yy981; - if (yych == 'n') goto yy981; - goto yy822; -yy1032: - yych = *++p; - if (yych == 'I') goto yy1033; - if (yych != 'i') goto yy822; -yy1033: - yych = *++p; - if (yych == 'P') goto yy1034; - if (yych != 'p') goto yy822; -yy1034: - yych = *++p; - if (yych == 'T') goto yy981; - if (yych == 't') goto yy981; - goto yy822; -yy1035: - yych = *++p; - if (yych == 'L') goto yy1036; - if (yych != 'l') goto yy822; -yy1036: - yych = *++p; - if (yych == 'E') goto yy981; - if (yych == 'e') goto yy981; - goto yy822; -yy1037: - yych = *++p; - if (yych == 'V') goto yy981; - if (yych == 'v') goto yy981; - goto yy822; -yy1038: - yych = *++p; - if (yych == 'L') goto yy1047; - if (yych == 'l') goto yy1047; - goto yy822; -yy1039: - yych = *++p; - if (yych <= 'P') { - if (yych == 'N') goto yy1040; - if (yych <= 'O') goto yy822; - goto yy1041; - } else { - if (yych <= 'n') { - if (yych <= 'm') goto yy822; - } else { - if (yych == 'p') goto yy1041; - goto yy822; - } - } -yy1040: - yych = *++p; - if (yych == 'V') goto yy1045; - if (yych == 'v') goto yy1045; - goto yy822; -yy1041: - yych = *++p; - if (yych == 'T') goto yy1042; - if (yych != 't') goto yy822; -yy1042: - yych = *++p; - if (yych == 'I') goto yy1043; - if (yych != 'i') goto yy822; -yy1043: - yych = *++p; - if (yych == 'O') goto yy1044; - if (yych != 'o') goto yy822; -yy1044: - yych = *++p; - if (yych == 'N') goto yy981; - if (yych == 'n') goto yy981; - goto yy822; -yy1045: - yych = *++p; - if (yych == 'A') goto yy1046; - if (yych != 'a') goto yy822; -yy1046: - yych = *++p; - if (yych == 'S') goto yy981; - if (yych == 's') goto yy981; - goto yy822; -yy1047: - yych = *++p; - if (yych <= '/') { - if (yych <= 0x1F) { - if (yych <= 0x08) goto yy822; - if (yych <= '\n') goto yy982; - goto yy822; - } else { - if (yych <= ' ') goto yy982; - if (yych <= '.') goto yy822; - goto yy982; - } - } else { - if (yych <= 'F') { - if (yych == '>') goto yy982; - goto yy822; - } else { - if (yych <= 'G') goto yy1048; - if (yych != 'g') goto yy822; - } - } -yy1048: - yych = *++p; - if (yych == 'R') goto yy1049; - if (yych != 'r') goto yy822; -yy1049: - yych = *++p; - if (yych == 'O') goto yy1050; - if (yych != 'o') goto yy822; -yy1050: - yych = *++p; - if (yych == 'U') goto yy1051; - if (yych != 'u') goto yy822; -yy1051: - yych = *++p; - if (yych == 'P') goto yy981; - if (yych == 'p') goto yy981; - goto yy822; -yy1052: - yych = *++p; - if (yych == 'T') goto yy1057; - if (yych == 't') goto yy1057; - goto yy822; -yy1053: - yych = *++p; - if (yych == 'J') goto yy1054; - if (yych != 'j') goto yy822; -yy1054: - yych = *++p; - if (yych == 'E') goto yy1055; - if (yych != 'e') goto yy822; -yy1055: - yych = *++p; - if (yych == 'C') goto yy1056; - if (yych != 'c') goto yy822; -yy1056: - yych = *++p; - if (yych == 'T') goto yy981; - if (yych == 't') goto yy981; - goto yy822; -yy1057: - yych = *++p; - if (yych == 'P') goto yy1058; - if (yych != 'p') goto yy822; -yy1058: - yych = *++p; - if (yych == 'U') goto yy1059; - if (yych != 'u') goto yy822; -yy1059: - yych = *++p; - if (yych == 'T') goto yy981; - if (yych == 't') goto yy981; - goto yy822; -yy1060: - yych = *++p; - if (yych == 'P') goto yy981; - if (yych == 'p') goto yy981; - goto yy822; -yy1061: - yych = *++p; - if (yych == 'T') goto yy1072; - if (yych == 't') goto yy1072; - goto yy822; -yy1062: - yych = *++p; - if (yych == 'D') goto yy1071; - if (yych == 'd') goto yy1071; - goto yy822; -yy1063: - yych = *++p; - if (yych == 'O') goto yy1064; - if (yych != 'o') goto yy822; -yy1064: - yych = *++p; - if (yych == 'C') goto yy1065; - if (yych != 'c') goto yy822; -yy1065: - yych = *++p; - if (yych == 'K') goto yy1066; - if (yych != 'k') goto yy822; -yy1066: - yych = *++p; - if (yych == 'Q') goto yy1067; - if (yych != 'q') goto yy822; -yy1067: - yych = *++p; - if (yych == 'U') goto yy1068; - if (yych != 'u') goto yy822; -yy1068: - yych = *++p; - if (yych == 'O') goto yy1069; - if (yych != 'o') goto yy822; -yy1069: - yych = *++p; - if (yych == 'T') goto yy1070; - if (yych != 't') goto yy822; -yy1070: - yych = *++p; - if (yych == 'E') goto yy981; - if (yych == 'e') goto yy981; - goto yy822; -yy1071: - yych = *++p; - if (yych == 'Y') goto yy981; - if (yych == 'y') goto yy981; - goto yy822; -yy1072: - yych = *++p; - if (yych == 'T') goto yy1073; - if (yych != 't') goto yy822; -yy1073: - yych = *++p; - if (yych == 'O') goto yy1074; - if (yych != 'o') goto yy822; -yy1074: - yych = *++p; - if (yych == 'N') goto yy981; - if (yych == 'n') goto yy981; - goto yy822; -yy1075: - yych = *++p; - if (yych == 'R') goto yy1076; - if (yych != 'r') goto yy822; -yy1076: - yych = *++p; - if (yych == 'A') goto yy1077; - if (yych != 'a') goto yy822; -yy1077: - yych = *++p; - if (yych == 'M') goto yy1078; - if (yych != 'm') goto yy822; -yy1078: - yych = *++p; - if (yych == 'E') goto yy981; - if (yych == 'e') goto yy981; - goto yy822; -yy1079: - yych = *++p; - if (yych == 'R') goto yy1084; - if (yych == 'r') goto yy1084; - goto yy822; -yy1080: - yych = *++p; - if (yych == 'A') goto yy1081; - if (yych != 'a') goto yy822; -yy1081: - yych = *++p; - if (yych == 'D') goto yy1082; - if (yych != 'd') goto yy822; -yy1082: - yych = *++p; - if (yych == 'E') goto yy1083; - if (yych != 'e') goto yy822; -yy1083: - yych = *++p; - if (yych == 'R') goto yy981; - if (yych == 'r') goto yy981; - goto yy822; -yy1084: - yych = *++p; - if (yych == 'O') goto yy1085; - if (yych != 'o') goto yy822; -yy1085: - yych = *++p; - if (yych == 'U') goto yy1086; - if (yych != 'u') goto yy822; -yy1086: - yych = *++p; - if (yych == 'P') goto yy981; - if (yych == 'p') goto yy981; - goto yy822; -yy1087: - yych = *++p; - if (yych == 'I') goto yy1093; - if (yych == 'i') goto yy1093; - goto yy822; -yy1088: - yych = *++p; - if (yych == 'T') goto yy1089; - if (yych != 't') goto yy822; -yy1089: - yych = *++p; - if (yych == 'I') goto yy1090; - if (yych != 'i') goto yy822; -yy1090: - yych = *++p; - if (yych == 'C') goto yy1091; - if (yych != 'c') goto yy822; -yy1091: - yych = *++p; - if (yych == 'L') goto yy1092; - if (yych != 'l') goto yy822; -yy1092: - yych = *++p; - if (yych == 'E') goto yy981; - if (yych == 'e') goto yy981; - goto yy822; -yy1093: - yych = *++p; - if (yych == 'D') goto yy1094; - if (yych != 'd') goto yy822; -yy1094: - yych = *++p; - if (yych == 'E') goto yy981; - if (yych == 'e') goto yy981; - goto yy822; -yy1095: - yych = *++p; - if (yych <= 'O') { - if (yych == 'E') goto yy981; - if (yych <= 'N') goto yy822; - } else { - if (yych <= 'e') { - if (yych <= 'd') goto yy822; - goto yy981; - } else { - if (yych != 'o') goto yy822; - } - } - yych = *++p; - if (yych == 'G') goto yy1097; - if (yych != 'g') goto yy822; -yy1097: - yych = *++p; - if (yych == 'R') goto yy1098; - if (yych != 'r') goto yy822; -yy1098: - yych = *++p; - if (yych == 'E') goto yy1099; - if (yych != 'e') goto yy822; -yy1099: - yych = *++p; - if (yych == 'S') goto yy1100; - if (yych != 's') goto yy822; -yy1100: - ++p; - if ((yych = *p) == 'S') goto yy981; - if (yych == 's') goto yy981; - goto yy822; -} - -} - -// Try to match a URL in a link or reference, return number of chars matched. -// This may optionally be contained in <..>; otherwise -// whitespace and unbalanced right parentheses aren't allowed. -// Newlines aren't ever allowed. -int _scan_link_url(const unsigned char *p) -{ - const unsigned char *marker = NULL; - const unsigned char *start = p; - -{ - unsigned char yych; - unsigned int yyaccept = 0; - static const unsigned char yybm[] = { - 0, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 8, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 72, 112, 112, 112, 112, 112, 112, 112, - 64, 64, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 16, 112, 16, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 128, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, - }; - yych = *p; - if (yych <= '(') { - if (yych <= 0x1F) { - if (yych == '\n') goto yy1104; - goto yy1112; - } else { - if (yych <= ' ') goto yy1106; - if (yych <= '\'') goto yy1108; - goto yy1111; - } - } else { - if (yych <= '<') { - if (yych <= ')') goto yy1112; - if (yych <= ';') goto yy1108; - goto yy1107; - } else { - if (yych == '\\') goto yy1109; - goto yy1108; - } - } -yy1103: - { return (p - start); } -yy1104: - yyaccept = 0; - marker = ++p; - yych = *p; -yy1105: - if (yybm[0+yych] & 8) { - goto yy1104; - } - if (yych <= ')') { - if (yych <= ' ') goto yy1103; - if (yych <= '\'') goto yy1117; - if (yych <= '(') goto yy1113; - goto yy1103; - } else { - if (yych <= '<') { - if (yych <= ';') goto yy1117; - goto yy1120; - } else { - if (yych == '\\') goto yy1119; - goto yy1117; - } - } -yy1106: - yyaccept = 0; - yych = *(marker = ++p); - goto yy1105; -yy1107: - yyaccept = 0; - yych = *(marker = ++p); - if (yybm[0+yych] & 32) { - goto yy1120; - } - if (yych <= '\'') { - if (yych <= 0x00) goto yy1103; - if (yych == '\n') goto yy1103; - goto yy1127; - } else { - if (yych <= ')') { - if (yych <= '(') goto yy1125; - goto yy1127; - } else { - if (yych <= '=') goto yy1117; - if (yych <= '>') goto yy1122; - goto yy1124; - } - } -yy1108: - yyaccept = 0; - yych = *(marker = ++p); - goto yy1118; -yy1109: - ++p; - if ((yych = *p) <= '@') { - if (yych <= ' ') goto yy1110; - if (yych <= '/') goto yy1117; - if (yych >= ':') goto yy1117; - } else { - if (yych <= '`') { - if (yych >= '[') goto yy1117; - } else { - if (yych <= 'z') goto yy1110; - if (yych <= '~') goto yy1117; - } - } -yy1110: - { return 0; } -yy1111: - yyaccept = 1; - yych = *(marker = ++p); - if (yych <= ' ') goto yy1110; - if (yych == '(') goto yy1110; - goto yy1114; -yy1112: - yych = *++p; - goto yy1110; -yy1113: - ++p; - yych = *p; -yy1114: - if (yybm[0+yych] & 16) { - goto yy1113; - } - if (yych <= '(') goto yy1115; - if (yych <= ')') goto yy1117; - goto yy1116; -yy1115: - p = marker; - if (yyaccept <= 1) { - if (yyaccept == 0) { - goto yy1103; - } else { - goto yy1110; - } - } else { - goto yy1123; - } -yy1116: - ++p; - yych = *p; - if (yych <= '@') { - if (yych <= ' ') goto yy1115; - if (yych <= '/') goto yy1113; - if (yych <= '9') goto yy1115; - goto yy1113; - } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy1115; - goto yy1113; - } else { - if (yych <= 'z') goto yy1115; - if (yych <= '~') goto yy1113; - goto yy1115; - } - } -yy1117: - yyaccept = 0; - marker = ++p; - yych = *p; -yy1118: - if (yych <= '(') { - if (yych <= ' ') goto yy1103; - if (yych <= '\'') goto yy1117; - goto yy1113; - } else { - if (yych <= ')') goto yy1103; - if (yych != '\\') goto yy1117; - } -yy1119: - ++p; - yych = *p; - if (yych <= '@') { - if (yych <= ' ') goto yy1115; - if (yych <= '/') goto yy1117; - if (yych <= '9') goto yy1115; - goto yy1117; - } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy1115; - goto yy1117; - } else { - if (yych <= 'z') goto yy1115; - if (yych <= '~') goto yy1117; - goto yy1115; - } - } -yy1120: - yyaccept = 0; - marker = ++p; - yych = *p; - if (yybm[0+yych] & 32) { - goto yy1120; - } - if (yych <= '\'') { - if (yych <= 0x00) goto yy1103; - if (yych == '\n') goto yy1103; - goto yy1127; - } else { - if (yych <= ')') { - if (yych <= '(') goto yy1125; - goto yy1127; - } else { - if (yych <= '=') goto yy1117; - if (yych >= '?') goto yy1124; - } - } -yy1122: - yyaccept = 2; - yych = *(marker = ++p); - if (yych <= ' ') goto yy1123; - if (yych != ')') goto yy1118; -yy1123: - { return (p - start); } -yy1124: - ++p; - yych = *p; - if (yych <= '>') { - if (yych <= ' ') { - if (yych <= 0x00) goto yy1115; - if (yych == '\n') goto yy1115; - goto yy1127; - } else { - if (yych <= '/') goto yy1120; - if (yych <= '9') goto yy1127; - if (yych <= '=') goto yy1120; - goto yy1137; - } - } else { - if (yych <= '\\') { - if (yych <= '@') goto yy1120; - if (yych <= 'Z') goto yy1127; - if (yych <= '[') goto yy1120; - goto yy1138; - } else { - if (yych <= '`') goto yy1120; - if (yych <= 'z') goto yy1127; - if (yych <= '~') goto yy1120; - goto yy1127; - } - } -yy1125: - ++p; - yych = *p; - if (yych <= ')') { - if (yych <= '\n') { - if (yych <= 0x00) goto yy1115; - if (yych >= '\n') goto yy1115; - } else { - if (yych <= ' ') goto yy1127; - if (yych <= '\'') goto yy1125; - if (yych >= ')') goto yy1120; - } - } else { - if (yych <= '=') { - if (yych == '<') goto yy1113; - goto yy1125; - } else { - if (yych <= '>') goto yy1133; - if (yych == '\\') goto yy1134; - goto yy1125; - } - } -yy1127: - ++p; - yych = *p; - if (yybm[0+yych] & 64) { - goto yy1127; - } - if (yych <= '=') goto yy1115; - if (yych >= '?') goto yy1130; -yy1129: - yych = *++p; - goto yy1123; -yy1130: - ++p; - yych = *p; - if (yybm[0+yych] & 128) { - goto yy1130; - } - if (yych <= '\n') { - if (yych <= 0x00) goto yy1115; - if (yych <= '\t') goto yy1127; - goto yy1115; - } else { - if (yych != '>') goto yy1127; - } - yyaccept = 2; - marker = ++p; - yych = *p; - if (yybm[0+yych] & 64) { - goto yy1127; - } - if (yych <= '=') goto yy1123; - if (yych <= '>') goto yy1129; - goto yy1130; -yy1133: - yyaccept = 2; - yych = *(marker = ++p); - if (yych <= ' ') goto yy1123; - if (yych == '(') goto yy1123; - goto yy1114; -yy1134: - ++p; - yych = *p; - if (yych <= '>') { - if (yych <= ' ') { - if (yych <= 0x00) goto yy1115; - if (yych == '\n') goto yy1115; - goto yy1127; - } else { - if (yych <= '/') goto yy1125; - if (yych <= '9') goto yy1127; - if (yych <= '=') goto yy1125; - } - } else { - if (yych <= '\\') { - if (yych <= '@') goto yy1125; - if (yych <= 'Z') goto yy1127; - if (yych <= '[') goto yy1125; - goto yy1136; - } else { - if (yych <= '`') goto yy1125; - if (yych <= 'z') goto yy1127; - if (yych <= '~') goto yy1125; - goto yy1127; - } - } -yy1135: - yyaccept = 2; - marker = ++p; - yych = *p; - if (yych <= ')') { - if (yych <= '\n') { - if (yych <= 0x00) goto yy1123; - if (yych <= '\t') goto yy1127; - goto yy1123; - } else { - if (yych <= ' ') goto yy1127; - if (yych <= '\'') goto yy1125; - if (yych <= '(') goto yy1127; - goto yy1120; - } - } else { - if (yych <= '=') { - if (yych == '<') goto yy1113; - goto yy1125; - } else { - if (yych <= '>') goto yy1133; - if (yych == '\\') goto yy1134; - goto yy1125; - } - } -yy1136: - ++p; - yych = *p; - if (yych <= '(') { - if (yych <= '\n') { - if (yych <= 0x00) goto yy1115; - if (yych <= '\t') goto yy1127; - goto yy1115; - } else { - if (yych <= ' ') goto yy1127; - if (yych <= '\'') goto yy1125; - goto yy1127; - } - } else { - if (yych <= '>') { - if (yych <= ')') goto yy1120; - if (yych <= '=') goto yy1125; - goto yy1135; - } else { - if (yych == '\\') goto yy1134; - goto yy1125; - } - } -yy1137: - yyaccept = 2; - marker = ++p; - yych = *p; - if (yybm[0+yych] & 32) { - goto yy1120; - } - if (yych <= '\'') { - if (yych <= 0x00) goto yy1123; - if (yych == '\n') goto yy1123; - goto yy1127; - } else { - if (yych <= ')') { - if (yych <= '(') goto yy1125; - goto yy1127; - } else { - if (yych <= '=') goto yy1117; - if (yych <= '>') goto yy1122; - goto yy1124; - } - } -yy1138: - yyaccept = 0; - marker = ++p; - yych = *p; - if (yych <= '(') { - if (yych <= '\n') { - if (yych <= 0x00) goto yy1103; - if (yych <= '\t') goto yy1127; - goto yy1103; - } else { - if (yych <= ' ') goto yy1127; - if (yych <= '\'') goto yy1120; - goto yy1125; - } - } else { - if (yych <= '>') { - if (yych <= ')') goto yy1127; - if (yych <= '=') goto yy1120; - goto yy1137; - } else { - if (yych == '\\') goto yy1124; - goto yy1120; - } - } -} - -} - -// Try to match a link title (in single quotes, in double quotes, or -// in parentheses), returning number of chars matched. Allow one -// level of internal nesting (quotes within quotes). -int _scan_link_title(const unsigned char *p) -{ - const unsigned char *marker = NULL; - const unsigned char *start = p; - -{ - unsigned char yych; - unsigned int yyaccept = 0; - static const unsigned char yybm[] = { - 0, 208, 208, 208, 208, 208, 208, 208, - 208, 208, 208, 208, 208, 208, 208, 208, - 208, 208, 208, 208, 208, 208, 208, 208, - 208, 208, 208, 208, 208, 208, 208, 208, - 208, 208, 80, 208, 208, 208, 208, 144, - 208, 192, 208, 208, 208, 208, 208, 208, - 208, 208, 208, 208, 208, 208, 208, 208, - 208, 208, 208, 208, 208, 208, 208, 208, - 208, 208, 208, 208, 208, 208, 208, 208, - 208, 208, 208, 208, 208, 208, 208, 208, - 208, 208, 208, 208, 208, 208, 208, 208, - 208, 208, 208, 208, 32, 208, 208, 208, - 208, 208, 208, 208, 208, 208, 208, 208, - 208, 208, 208, 208, 208, 208, 208, 208, - 208, 208, 208, 208, 208, 208, 208, 208, - 208, 208, 208, 208, 208, 208, 208, 208, - 208, 208, 208, 208, 208, 208, 208, 208, - 208, 208, 208, 208, 208, 208, 208, 208, - 208, 208, 208, 208, 208, 208, 208, 208, - 208, 208, 208, 208, 208, 208, 208, 208, - 208, 208, 208, 208, 208, 208, 208, 208, - 208, 208, 208, 208, 208, 208, 208, 208, - 208, 208, 208, 208, 208, 208, 208, 208, - 208, 208, 208, 208, 208, 208, 208, 208, - 208, 208, 208, 208, 208, 208, 208, 208, - 208, 208, 208, 208, 208, 208, 208, 208, - 208, 208, 208, 208, 208, 208, 208, 208, - 208, 208, 208, 208, 208, 208, 208, 208, - 208, 208, 208, 208, 208, 208, 208, 208, - 208, 208, 208, 208, 208, 208, 208, 208, - 208, 208, 208, 208, 208, 208, 208, 208, - 208, 208, 208, 208, 208, 208, 208, 208, - }; - yych = *p; - if (yych <= '"') { - if (yych == '\n') goto yy1141; - if (yych <= '!') goto yy1145; - goto yy1142; - } else { - if (yych <= '&') goto yy1145; - if (yych <= '\'') goto yy1143; - if (yych <= '(') goto yy1144; - goto yy1145; - } -yy1141: - { return 0; } -yy1142: - yyaccept = 0; - yych = *(marker = ++p); - if (yych <= 0x00) goto yy1141; - goto yy1162; -yy1143: - yyaccept = 0; - yych = *(marker = ++p); - if (yych <= 0x00) goto yy1141; - goto yy1155; -yy1144: - yyaccept = 0; - yych = *(marker = ++p); - if (yych <= 0x00) goto yy1141; - goto yy1147; -yy1145: - yych = *++p; - goto yy1141; -yy1146: - ++p; - yych = *p; -yy1147: - if (yybm[0+yych] & 16) { - goto yy1146; - } - if (yych <= 0x00) goto yy1148; - if (yych <= '[') goto yy1151; - goto yy1149; -yy1148: - p = marker; - if (yyaccept <= 1) { - if (yyaccept == 0) { - goto yy1141; - } else { - goto yy1152; - } - } else { - if (yyaccept == 2) { - goto yy1159; - } else { - goto yy1166; - } - } -yy1149: - ++p; - yych = *p; - if (yybm[0+yych] & 16) { - goto yy1146; - } - if (yych <= 0x00) goto yy1148; - if (yych <= '[') goto yy1153; - goto yy1149; -yy1151: - ++p; -yy1152: - { return (p - start); } -yy1153: - yyaccept = 1; - marker = ++p; - yych = *p; - if (yybm[0+yych] & 16) { - goto yy1146; - } - if (yych <= 0x00) goto yy1152; - if (yych <= '[') goto yy1151; - goto yy1149; -yy1154: - ++p; - yych = *p; -yy1155: - if (yybm[0+yych] & 64) { - goto yy1154; - } - if (yych <= 0x00) goto yy1148; - if (yych <= '[') goto yy1158; -yy1156: - ++p; - yych = *p; - if (yybm[0+yych] & 64) { - goto yy1154; - } - if (yych <= 0x00) goto yy1148; - if (yych <= '[') goto yy1160; - goto yy1156; -yy1158: - ++p; -yy1159: - { return (p - start); } -yy1160: - yyaccept = 2; - marker = ++p; - yych = *p; - if (yybm[0+yych] & 64) { - goto yy1154; - } - if (yych <= 0x00) goto yy1159; - if (yych <= '[') goto yy1158; - goto yy1156; -yy1161: - ++p; - yych = *p; -yy1162: - if (yybm[0+yych] & 128) { - goto yy1161; - } - if (yych <= 0x00) goto yy1148; - if (yych <= '[') goto yy1165; -yy1163: - ++p; - yych = *p; - if (yybm[0+yych] & 128) { - goto yy1161; - } - if (yych <= 0x00) goto yy1148; - if (yych <= '[') goto yy1167; - goto yy1163; -yy1165: - ++p; -yy1166: - { return (p - start); } -yy1167: - yyaccept = 3; - marker = ++p; - yych = *p; - if (yybm[0+yych] & 128) { - goto yy1161; - } - if (yych <= 0x00) goto yy1166; - if (yych <= '[') goto yy1165; - goto yy1163; -} - -} - -// Match space characters, including newlines. -int _scan_spacechars(const unsigned char *p) -{ - const unsigned char *start = p; \ - -{ - unsigned char yych; - static const unsigned char yybm[] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 128, 128, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 128, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }; - yych = *p; - if (yych <= '\n') { - if (yych <= 0x08) goto yy1174; - if (yych <= '\t') goto yy1171; - goto yy1172; - } else { - if (yych == ' ') goto yy1171; - goto yy1174; - } -yy1170: - { return (p - start); } -yy1171: - yych = *++p; - goto yy1173; -yy1172: - ++p; - yych = *p; -yy1173: - if (yybm[0+yych] & 128) { - goto yy1172; - } - goto yy1170; -yy1174: - ++p; - { return 0; } -} - -} - -// Match ATX header start. -int _scan_atx_header_start(const unsigned char *p) -{ - const unsigned char *marker = NULL; - const unsigned char *start = p; - -{ - unsigned char yych; - static const unsigned char yybm[] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 128, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }; - yych = *p; - if (yych == '\n') goto yy1178; - if (yych == '#') goto yy1179; - goto yy1180; -yy1178: - { return 0; } -yy1179: - yych = *(marker = ++p); - if (yybm[0+yych] & 128) { - goto yy1183; - } - if (yych == '\n') goto yy1181; - if (yych == '#') goto yy1185; - goto yy1178; -yy1180: - yych = *++p; - goto yy1178; -yy1181: - ++p; -yy1182: - { return (p - start); } -yy1183: - ++p; - yych = *p; - if (yybm[0+yych] & 128) { - goto yy1183; - } - goto yy1182; -yy1185: - yych = *++p; - if (yybm[0+yych] & 128) { - goto yy1183; - } - if (yych == '\n') goto yy1181; - if (yych == '#') goto yy1187; -yy1186: - p = marker; - goto yy1178; -yy1187: - yych = *++p; - if (yybm[0+yych] & 128) { - goto yy1183; - } - if (yych == '\n') goto yy1181; - if (yych != '#') goto yy1186; - yych = *++p; - if (yybm[0+yych] & 128) { - goto yy1183; - } - if (yych == '\n') goto yy1181; - if (yych != '#') goto yy1186; - yych = *++p; - if (yybm[0+yych] & 128) { - goto yy1183; - } - if (yych == '\n') goto yy1181; - if (yych != '#') goto yy1186; - ++p; - if (yybm[0+(yych = *p)] & 128) { - goto yy1183; - } - if (yych == '\n') goto yy1181; - goto yy1186; -} - -} - -// Match sexext header line. Return 1 for level-1 header, -// 2 for level-2, 0 for no match. -int _scan_setext_header_line(const unsigned char *p) -{ - const unsigned char *marker = NULL; - -{ - unsigned char yych; - static const unsigned char yybm[] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 32, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 64, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 128, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }; - yych = *p; - if (yych <= ',') { - if (yych != '\n') goto yy1196; - } else { - if (yych <= '-') goto yy1195; - if (yych == '=') goto yy1194; - goto yy1196; - } -yy1193: - { return 0; } -yy1194: - yych = *(marker = ++p); - if (yybm[0+yych] & 128) { - goto yy1208; - } - if (yych == '\n') goto yy1206; - if (yych == ' ') goto yy1204; - goto yy1193; -yy1195: - yych = *(marker = ++p); - if (yybm[0+yych] & 32) { - goto yy1197; - } - if (yych == '\n') goto yy1200; - if (yych == '-') goto yy1202; - goto yy1193; -yy1196: - yych = *++p; - goto yy1193; -yy1197: - ++p; - yych = *p; - if (yybm[0+yych] & 32) { - goto yy1197; - } - if (yych == '\n') goto yy1200; -yy1199: - p = marker; - goto yy1193; -yy1200: - ++p; - { return 2; } -yy1202: - ++p; - yych = *p; - if (yybm[0+yych] & 32) { - goto yy1197; - } - if (yych == '\n') goto yy1200; - if (yych == '-') goto yy1202; - goto yy1199; -yy1204: - ++p; - yych = *p; - if (yych == '\n') goto yy1206; - if (yych == ' ') goto yy1204; - goto yy1199; -yy1206: - ++p; - { return 1; } -yy1208: - ++p; - yych = *p; - if (yybm[0+yych] & 128) { - goto yy1208; - } - if (yych == '\n') goto yy1206; - if (yych == ' ') goto yy1204; - goto yy1199; -} - -} - -// Scan a horizontal rule line: "...three or more hyphens, asterisks, -// or underscores on a line by themselves. If you wish, you may use -// spaces between the hyphens or asterisks." -int _scan_hrule(const unsigned char *p) -{ - const unsigned char *marker = NULL; - const unsigned char *start = p; - -{ - unsigned char yych; - static const unsigned char yybm[] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 32, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 248, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 128, 0, 0, 16, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 64, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }; - yych = *p; - if (yych <= '*') { - if (yych == '\n') goto yy1212; - if (yych <= ')') goto yy1216; - goto yy1213; - } else { - if (yych <= '-') { - if (yych <= ',') goto yy1216; - goto yy1215; - } else { - if (yych == '_') goto yy1214; - goto yy1216; - } - } -yy1212: - { return 0; } -yy1213: - yych = *(marker = ++p); - if (yych == ' ') goto yy1238; - if (yych == '*') goto yy1240; - goto yy1212; -yy1214: - yych = *(marker = ++p); - if (yych == ' ') goto yy1228; - if (yych == '_') goto yy1230; - goto yy1212; -yy1215: - yych = *(marker = ++p); - if (yybm[0+yych] & 8) { - goto yy1217; - } - if (yych == '-') goto yy1220; - goto yy1212; -yy1216: - yych = *++p; - goto yy1212; -yy1217: - ++p; - yych = *p; - if (yybm[0+yych] & 8) { - goto yy1217; - } - if (yych == '-') goto yy1220; -yy1219: - p = marker; - goto yy1212; -yy1220: - ++p; - yych = *p; - if (yych == ' ') goto yy1220; - if (yych != '-') goto yy1219; -yy1222: - ++p; - yych = *p; - if (yybm[0+yych] & 16) { - goto yy1222; - } - if (yych <= 0x08) goto yy1219; - if (yych <= '\t') goto yy1224; - if (yych <= '\n') goto yy1226; - goto yy1219; -yy1224: - ++p; - yych = *p; - if (yybm[0+yych] & 32) { - goto yy1224; - } - if (yych != '\n') goto yy1219; -yy1226: - ++p; - { return (p - start); } -yy1228: - ++p; - yych = *p; - if (yych == ' ') goto yy1228; - if (yych != '_') goto yy1219; -yy1230: - ++p; - yych = *p; - if (yych == ' ') goto yy1230; - if (yych != '_') goto yy1219; -yy1232: - ++p; - yych = *p; - if (yybm[0+yych] & 64) { - goto yy1232; - } - if (yych <= 0x08) goto yy1219; - if (yych <= '\t') goto yy1234; - if (yych <= '\n') goto yy1236; - goto yy1219; -yy1234: - ++p; - yych = *p; - if (yych <= '\n') { - if (yych <= 0x08) goto yy1219; - if (yych <= '\t') goto yy1234; - } else { - if (yych == ' ') goto yy1234; - goto yy1219; - } -yy1236: - ++p; - { return (p - start); } -yy1238: - ++p; - yych = *p; - if (yych == ' ') goto yy1238; - if (yych != '*') goto yy1219; -yy1240: - ++p; - yych = *p; - if (yych == ' ') goto yy1240; - if (yych != '*') goto yy1219; -yy1242: - ++p; - yych = *p; - if (yybm[0+yych] & 128) { - goto yy1242; - } - if (yych <= 0x08) goto yy1219; - if (yych <= '\t') goto yy1244; - if (yych <= '\n') goto yy1246; - goto yy1219; -yy1244: - ++p; - yych = *p; - if (yych <= '\n') { - if (yych <= 0x08) goto yy1219; - if (yych <= '\t') goto yy1244; - } else { - if (yych == ' ') goto yy1244; - goto yy1219; - } -yy1246: - ++p; - { return (p - start); } -} - -} - -// Scan an opening code fence. -int _scan_open_code_fence(const unsigned char *p) -{ - const unsigned char *marker = NULL; - const unsigned char *start = p; - -{ - unsigned char yych; - static const unsigned char yybm[] = { - 0, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 0, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 96, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 144, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, - }; - yych = *p; - if (yych <= '_') { - if (yych != '\n') goto yy1253; - } else { - if (yych <= '`') goto yy1251; - if (yych == '~') goto yy1252; - goto yy1253; - } -yy1250: - { return 0; } -yy1251: - yych = *(marker = ++p); - if (yych == '`') goto yy1262; - goto yy1250; -yy1252: - yych = *(marker = ++p); - if (yych == '~') goto yy1254; - goto yy1250; -yy1253: - yych = *++p; - goto yy1250; -yy1254: - yych = *++p; - if (yybm[0+yych] & 16) { - goto yy1256; - } -yy1255: - p = marker; - goto yy1250; -yy1256: - marker = p + 1; - ++p; - yych = *p; - if (yybm[0+yych] & 32) { - goto yy1258; - } - if (yych <= 0x00) goto yy1255; - if (yych <= '}') goto yy1260; - goto yy1256; -yy1258: - ++p; - yych = *p; - if (yybm[0+yych] & 32) { - goto yy1258; - } - if (yych <= 0x00) goto yy1255; - if (yych >= '~') goto yy1255; -yy1260: - ++p; - p = marker; - { return (p - start); } -yy1262: - yych = *++p; - if (yybm[0+yych] & 64) { - goto yy1263; - } - goto yy1255; -yy1263: - marker = p + 1; - ++p; - yych = *p; - if (yybm[0+yych] & 128) { - goto yy1265; - } - if (yych <= 0x00) goto yy1255; - if (yych <= '_') goto yy1267; - goto yy1263; -yy1265: - ++p; - yych = *p; - if (yybm[0+yych] & 128) { - goto yy1265; - } - if (yych <= 0x00) goto yy1255; - if (yych >= '`') goto yy1255; -yy1267: - ++p; - p = marker; - { return (p - start); } -} - -} - -// Scan a closing code fence with length at least len. -int _scan_close_code_fence(const unsigned char *p) -{ - const unsigned char *marker = NULL; - const unsigned char *start = p; - -{ - unsigned char yych; - unsigned int yyaccept = 0; - static const unsigned char yybm[] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 32, 64, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 32, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 128, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 16, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }; - yych = *p; - if (yych <= '_') { - if (yych != '\n') goto yy1274; - } else { - if (yych <= '`') goto yy1272; - if (yych == '~') goto yy1273; - goto yy1274; - } -yy1271: - { return 0; } -yy1272: - yyaccept = 0; - yych = *(marker = ++p); - if (yych == '`') goto yy1284; - goto yy1271; -yy1273: - yyaccept = 0; - yych = *(marker = ++p); - if (yych == '~') goto yy1275; - goto yy1271; -yy1274: - yych = *++p; - goto yy1271; -yy1275: - yych = *++p; - if (yybm[0+yych] & 16) { - goto yy1277; - } -yy1276: - p = marker; - if (yyaccept == 0) { - goto yy1271; - } else { - goto yy1283; - } -yy1277: - marker = p + 1; - ++p; - yych = *p; - if (yybm[0+yych] & 32) { - goto yy1279; - } - if (yych == '\n') goto yy1281; - if (yych == '~') goto yy1277; - goto yy1276; -yy1279: - ++p; - yych = *p; - if (yybm[0+yych] & 32) { - goto yy1279; - } - if (yych != '\n') goto yy1276; -yy1281: - yyaccept = 1; - marker = ++p; - yych = *p; - if (yybm[0+yych] & 32) { - goto yy1279; - } - if (yych == '\n') goto yy1281; -yy1283: - p = marker; - { return (p - start); } -yy1284: - yych = *++p; - if (yybm[0+yych] & 128) { - goto yy1285; - } - goto yy1276; -yy1285: - marker = p + 1; - ++p; - yych = *p; - if (yybm[0+yych] & 32) { - goto yy1279; - } - if (yych == '\n') goto yy1281; - if (yych == '`') goto yy1285; - goto yy1276; -} - -} - -// Scans an entity. -// Returns number of chars matched. -int _scan_entity(const unsigned char *p) -{ - const unsigned char *marker = NULL; - const unsigned char *start = p; - -{ - unsigned char yych; - yych = *p; - if (yych == '\n') goto yy1289; - if (yych == '&') goto yy1290; - goto yy1291; -yy1289: - { return 0; } -yy1290: - yych = *(marker = ++p); - if (yych <= '@') { - if (yych == '#') goto yy1292; - goto yy1289; - } else { - if (yych <= 'Z') goto yy1294; - if (yych <= '`') goto yy1289; - if (yych <= 'z') goto yy1294; - goto yy1289; - } -yy1291: - yych = *++p; - goto yy1289; -yy1292: - yych = *++p; - if (yych <= 'W') { - if (yych <= '/') goto yy1293; - if (yych <= '9') goto yy1329; - } else { - if (yych <= 'X') goto yy1328; - if (yych == 'x') goto yy1328; - } -yy1293: - p = marker; - goto yy1289; -yy1294: - yych = *++p; - if (yych <= '@') { - if (yych <= '/') goto yy1293; - if (yych >= ':') goto yy1293; - } else { - if (yych <= 'Z') goto yy1295; - if (yych <= '`') goto yy1293; - if (yych >= '{') goto yy1293; - } -yy1295: - yych = *++p; - if (yych <= ';') { - if (yych <= '/') goto yy1293; - if (yych <= '9') goto yy1298; - if (yych <= ':') goto yy1293; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy1293; - goto yy1298; - } else { - if (yych <= '`') goto yy1293; - if (yych <= 'z') goto yy1298; - goto yy1293; - } - } -yy1296: - ++p; - { return (p - start); } -yy1298: - yych = *++p; - if (yych <= ';') { - if (yych <= '/') goto yy1293; - if (yych <= '9') goto yy1299; - if (yych <= ':') goto yy1293; - goto yy1296; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy1293; - } else { - if (yych <= '`') goto yy1293; - if (yych >= '{') goto yy1293; - } - } -yy1299: - yych = *++p; - if (yych <= ';') { - if (yych <= '/') goto yy1293; - if (yych <= '9') goto yy1300; - if (yych <= ':') goto yy1293; - goto yy1296; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy1293; - } else { - if (yych <= '`') goto yy1293; - if (yych >= '{') goto yy1293; - } - } -yy1300: - yych = *++p; - if (yych <= ';') { - if (yych <= '/') goto yy1293; - if (yych <= '9') goto yy1301; - if (yych <= ':') goto yy1293; - goto yy1296; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy1293; - } else { - if (yych <= '`') goto yy1293; - if (yych >= '{') goto yy1293; - } - } -yy1301: - yych = *++p; - if (yych <= ';') { - if (yych <= '/') goto yy1293; - if (yych <= '9') goto yy1302; - if (yych <= ':') goto yy1293; - goto yy1296; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy1293; - } else { - if (yych <= '`') goto yy1293; - if (yych >= '{') goto yy1293; - } - } -yy1302: - yych = *++p; - if (yych <= ';') { - if (yych <= '/') goto yy1293; - if (yych <= '9') goto yy1303; - if (yych <= ':') goto yy1293; - goto yy1296; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy1293; - } else { - if (yych <= '`') goto yy1293; - if (yych >= '{') goto yy1293; - } - } -yy1303: - yych = *++p; - if (yych <= ';') { - if (yych <= '/') goto yy1293; - if (yych <= '9') goto yy1304; - if (yych <= ':') goto yy1293; - goto yy1296; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy1293; - } else { - if (yych <= '`') goto yy1293; - if (yych >= '{') goto yy1293; - } - } -yy1304: - yych = *++p; - if (yych <= ';') { - if (yych <= '/') goto yy1293; - if (yych <= '9') goto yy1305; - if (yych <= ':') goto yy1293; - goto yy1296; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy1293; - } else { - if (yych <= '`') goto yy1293; - if (yych >= '{') goto yy1293; - } - } -yy1305: - yych = *++p; - if (yych <= ';') { - if (yych <= '/') goto yy1293; - if (yych <= '9') goto yy1306; - if (yych <= ':') goto yy1293; - goto yy1296; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy1293; - } else { - if (yych <= '`') goto yy1293; - if (yych >= '{') goto yy1293; - } - } -yy1306: - yych = *++p; - if (yych <= ';') { - if (yych <= '/') goto yy1293; - if (yych <= '9') goto yy1307; - if (yych <= ':') goto yy1293; - goto yy1296; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy1293; - } else { - if (yych <= '`') goto yy1293; - if (yych >= '{') goto yy1293; - } - } -yy1307: - yych = *++p; - if (yych <= ';') { - if (yych <= '/') goto yy1293; - if (yych <= '9') goto yy1308; - if (yych <= ':') goto yy1293; - goto yy1296; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy1293; - } else { - if (yych <= '`') goto yy1293; - if (yych >= '{') goto yy1293; - } - } -yy1308: - yych = *++p; - if (yych <= ';') { - if (yych <= '/') goto yy1293; - if (yych <= '9') goto yy1309; - if (yych <= ':') goto yy1293; - goto yy1296; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy1293; - } else { - if (yych <= '`') goto yy1293; - if (yych >= '{') goto yy1293; - } - } -yy1309: - yych = *++p; - if (yych <= ';') { - if (yych <= '/') goto yy1293; - if (yych <= '9') goto yy1310; - if (yych <= ':') goto yy1293; - goto yy1296; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy1293; - } else { - if (yych <= '`') goto yy1293; - if (yych >= '{') goto yy1293; - } - } -yy1310: - yych = *++p; - if (yych <= ';') { - if (yych <= '/') goto yy1293; - if (yych <= '9') goto yy1311; - if (yych <= ':') goto yy1293; - goto yy1296; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy1293; - } else { - if (yych <= '`') goto yy1293; - if (yych >= '{') goto yy1293; - } - } -yy1311: - yych = *++p; - if (yych <= ';') { - if (yych <= '/') goto yy1293; - if (yych <= '9') goto yy1312; - if (yych <= ':') goto yy1293; - goto yy1296; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy1293; - } else { - if (yych <= '`') goto yy1293; - if (yych >= '{') goto yy1293; - } - } -yy1312: - yych = *++p; - if (yych <= ';') { - if (yych <= '/') goto yy1293; - if (yych <= '9') goto yy1313; - if (yych <= ':') goto yy1293; - goto yy1296; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy1293; - } else { - if (yych <= '`') goto yy1293; - if (yych >= '{') goto yy1293; - } - } -yy1313: - yych = *++p; - if (yych <= ';') { - if (yych <= '/') goto yy1293; - if (yych <= '9') goto yy1314; - if (yych <= ':') goto yy1293; - goto yy1296; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy1293; - } else { - if (yych <= '`') goto yy1293; - if (yych >= '{') goto yy1293; - } - } -yy1314: - yych = *++p; - if (yych <= ';') { - if (yych <= '/') goto yy1293; - if (yych <= '9') goto yy1315; - if (yych <= ':') goto yy1293; - goto yy1296; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy1293; - } else { - if (yych <= '`') goto yy1293; - if (yych >= '{') goto yy1293; - } - } -yy1315: - yych = *++p; - if (yych <= ';') { - if (yych <= '/') goto yy1293; - if (yych <= '9') goto yy1316; - if (yych <= ':') goto yy1293; - goto yy1296; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy1293; - } else { - if (yych <= '`') goto yy1293; - if (yych >= '{') goto yy1293; - } - } -yy1316: - yych = *++p; - if (yych <= ';') { - if (yych <= '/') goto yy1293; - if (yych <= '9') goto yy1317; - if (yych <= ':') goto yy1293; - goto yy1296; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy1293; - } else { - if (yych <= '`') goto yy1293; - if (yych >= '{') goto yy1293; - } - } -yy1317: - yych = *++p; - if (yych <= ';') { - if (yych <= '/') goto yy1293; - if (yych <= '9') goto yy1318; - if (yych <= ':') goto yy1293; - goto yy1296; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy1293; - } else { - if (yych <= '`') goto yy1293; - if (yych >= '{') goto yy1293; - } - } -yy1318: - yych = *++p; - if (yych <= ';') { - if (yych <= '/') goto yy1293; - if (yych <= '9') goto yy1319; - if (yych <= ':') goto yy1293; - goto yy1296; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy1293; - } else { - if (yych <= '`') goto yy1293; - if (yych >= '{') goto yy1293; - } - } -yy1319: - yych = *++p; - if (yych <= ';') { - if (yych <= '/') goto yy1293; - if (yych <= '9') goto yy1320; - if (yych <= ':') goto yy1293; - goto yy1296; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy1293; - } else { - if (yych <= '`') goto yy1293; - if (yych >= '{') goto yy1293; - } - } -yy1320: - yych = *++p; - if (yych <= ';') { - if (yych <= '/') goto yy1293; - if (yych <= '9') goto yy1321; - if (yych <= ':') goto yy1293; - goto yy1296; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy1293; - } else { - if (yych <= '`') goto yy1293; - if (yych >= '{') goto yy1293; - } - } -yy1321: - yych = *++p; - if (yych <= ';') { - if (yych <= '/') goto yy1293; - if (yych <= '9') goto yy1322; - if (yych <= ':') goto yy1293; - goto yy1296; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy1293; - } else { - if (yych <= '`') goto yy1293; - if (yych >= '{') goto yy1293; - } - } -yy1322: - yych = *++p; - if (yych <= ';') { - if (yych <= '/') goto yy1293; - if (yych <= '9') goto yy1323; - if (yych <= ':') goto yy1293; - goto yy1296; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy1293; - } else { - if (yych <= '`') goto yy1293; - if (yych >= '{') goto yy1293; - } - } -yy1323: - yych = *++p; - if (yych <= ';') { - if (yych <= '/') goto yy1293; - if (yych <= '9') goto yy1324; - if (yych <= ':') goto yy1293; - goto yy1296; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy1293; - } else { - if (yych <= '`') goto yy1293; - if (yych >= '{') goto yy1293; - } - } -yy1324: - yych = *++p; - if (yych <= ';') { - if (yych <= '/') goto yy1293; - if (yych <= '9') goto yy1325; - if (yych <= ':') goto yy1293; - goto yy1296; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy1293; - } else { - if (yych <= '`') goto yy1293; - if (yych >= '{') goto yy1293; - } - } -yy1325: - yych = *++p; - if (yych <= ';') { - if (yych <= '/') goto yy1293; - if (yych <= '9') goto yy1326; - if (yych <= ':') goto yy1293; - goto yy1296; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy1293; - } else { - if (yych <= '`') goto yy1293; - if (yych >= '{') goto yy1293; - } - } -yy1326: - yych = *++p; - if (yych <= ';') { - if (yych <= '/') goto yy1293; - if (yych <= '9') goto yy1327; - if (yych <= ':') goto yy1293; - goto yy1296; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy1293; - } else { - if (yych <= '`') goto yy1293; - if (yych >= '{') goto yy1293; - } - } -yy1327: - yych = *++p; - if (yych == ';') goto yy1296; - goto yy1293; -yy1328: - yych = *++p; - if (yych <= '@') { - if (yych <= '/') goto yy1293; - if (yych <= '9') goto yy1336; - goto yy1293; - } else { - if (yych <= 'F') goto yy1336; - if (yych <= '`') goto yy1293; - if (yych <= 'f') goto yy1336; - goto yy1293; - } -yy1329: - yych = *++p; - if (yych <= '/') goto yy1293; - if (yych <= '9') goto yy1330; - if (yych == ';') goto yy1296; - goto yy1293; -yy1330: - yych = *++p; - if (yych <= '/') goto yy1293; - if (yych <= '9') goto yy1331; - if (yych == ';') goto yy1296; - goto yy1293; -yy1331: - yych = *++p; - if (yych <= '/') goto yy1293; - if (yych <= '9') goto yy1332; - if (yych == ';') goto yy1296; - goto yy1293; -yy1332: - yych = *++p; - if (yych <= '/') goto yy1293; - if (yych <= '9') goto yy1333; - if (yych == ';') goto yy1296; - goto yy1293; -yy1333: - yych = *++p; - if (yych <= '/') goto yy1293; - if (yych <= '9') goto yy1334; - if (yych == ';') goto yy1296; - goto yy1293; -yy1334: - yych = *++p; - if (yych <= '/') goto yy1293; - if (yych <= '9') goto yy1335; - if (yych == ';') goto yy1296; - goto yy1293; -yy1335: - yych = *++p; - if (yych <= '/') goto yy1293; - if (yych <= '9') goto yy1327; - if (yych == ';') goto yy1296; - goto yy1293; -yy1336: - yych = *++p; - if (yych <= ';') { - if (yych <= '/') goto yy1293; - if (yych <= '9') goto yy1337; - if (yych <= ':') goto yy1293; - goto yy1296; - } else { - if (yych <= 'F') { - if (yych <= '@') goto yy1293; - } else { - if (yych <= '`') goto yy1293; - if (yych >= 'g') goto yy1293; - } - } -yy1337: - yych = *++p; - if (yych <= ';') { - if (yych <= '/') goto yy1293; - if (yych <= '9') goto yy1338; - if (yych <= ':') goto yy1293; - goto yy1296; - } else { - if (yych <= 'F') { - if (yych <= '@') goto yy1293; - } else { - if (yych <= '`') goto yy1293; - if (yych >= 'g') goto yy1293; - } - } -yy1338: - yych = *++p; - if (yych <= ';') { - if (yych <= '/') goto yy1293; - if (yych <= '9') goto yy1339; - if (yych <= ':') goto yy1293; - goto yy1296; - } else { - if (yych <= 'F') { - if (yych <= '@') goto yy1293; - } else { - if (yych <= '`') goto yy1293; - if (yych >= 'g') goto yy1293; - } - } -yy1339: - yych = *++p; - if (yych <= ';') { - if (yych <= '/') goto yy1293; - if (yych <= '9') goto yy1340; - if (yych <= ':') goto yy1293; - goto yy1296; - } else { - if (yych <= 'F') { - if (yych <= '@') goto yy1293; - } else { - if (yych <= '`') goto yy1293; - if (yych >= 'g') goto yy1293; - } - } -yy1340: - yych = *++p; - if (yych <= ';') { - if (yych <= '/') goto yy1293; - if (yych <= '9') goto yy1341; - if (yych <= ':') goto yy1293; - goto yy1296; - } else { - if (yych <= 'F') { - if (yych <= '@') goto yy1293; - } else { - if (yych <= '`') goto yy1293; - if (yych >= 'g') goto yy1293; - } - } -yy1341: - yych = *++p; - if (yych <= ';') { - if (yych <= '/') goto yy1293; - if (yych <= '9') goto yy1342; - if (yych <= ':') goto yy1293; - goto yy1296; - } else { - if (yych <= 'F') { - if (yych <= '@') goto yy1293; - } else { - if (yych <= '`') goto yy1293; - if (yych >= 'g') goto yy1293; - } - } -yy1342: - ++p; - if ((yych = *p) <= ';') { - if (yych <= '/') goto yy1293; - if (yych <= '9') goto yy1327; - if (yych <= ':') goto yy1293; - goto yy1296; - } else { - if (yych <= 'F') { - if (yych <= '@') goto yy1293; - goto yy1327; - } else { - if (yych <= '`') goto yy1293; - if (yych <= 'f') goto yy1327; - goto yy1293; - } - } -} - -} diff --git a/outside/commonmark/src/scanners.h b/outside/commonmark/src/scanners.h deleted file mode 100644 index 326911242..000000000 --- a/outside/commonmark/src/scanners.h +++ /dev/null @@ -1,38 +0,0 @@ -#include "cmark.h" - -#ifdef __cplusplus -extern "C" { -#endif - -int _scan_at(int (*scanner)(const unsigned char *), chunk *c, int offset); -int _scan_autolink_uri(const unsigned char *p); -int _scan_autolink_email(const unsigned char *p); -int _scan_html_tag(const unsigned char *p); -int _scan_html_block_tag(const unsigned char *p); -int _scan_link_url(const unsigned char *p); -int _scan_link_title(const unsigned char *p); -int _scan_spacechars(const unsigned char *p); -int _scan_atx_header_start(const unsigned char *p); -int _scan_setext_header_line(const unsigned char *p); -int _scan_hrule(const unsigned char *p); -int _scan_open_code_fence(const unsigned char *p); -int _scan_close_code_fence(const unsigned char *p); -int _scan_entity(const unsigned char *p); - -#define scan_autolink_uri(c, n) _scan_at(&_scan_autolink_uri, c, n) -#define scan_autolink_email(c, n) _scan_at(&_scan_autolink_email, c, n) -#define scan_html_tag(c, n) _scan_at(&_scan_html_tag, c, n) -#define scan_html_block_tag(c, n) _scan_at(&_scan_html_block_tag, c, n) -#define scan_link_url(c, n) _scan_at(&_scan_link_url, c, n) -#define scan_link_title(c, n) _scan_at(&_scan_link_title, c, n) -#define scan_spacechars(c, n) _scan_at(&_scan_spacechars, c, n) -#define scan_atx_header_start(c, n) _scan_at(&_scan_atx_header_start, c, n) -#define scan_setext_header_line(c, n) _scan_at(&_scan_setext_header_line, c, n) -#define scan_hrule(c, n) _scan_at(&_scan_hrule, c, n) -#define scan_open_code_fence(c, n) _scan_at(&_scan_open_code_fence, c, n) -#define scan_close_code_fence(c, n) _scan_at(&_scan_close_code_fence, c, n) -#define scan_entity(c, n) _scan_at(&_scan_entity, c, n) - -#ifdef __cplusplus -} -#endif diff --git a/outside/commonmark/src/scanners.re b/outside/commonmark/src/scanners.re deleted file mode 100644 index 5e7487340..000000000 --- a/outside/commonmark/src/scanners.re +++ /dev/null @@ -1,235 +0,0 @@ -#include -#include "chunk.h" -#include "scanners.h" - -int _scan_at(int (*scanner)(const unsigned char *), chunk *c, int offset) -{ - int res; - unsigned char *ptr = (unsigned char *)c->data; - unsigned char lim = ptr[c->len]; - - ptr[c->len] = '\0'; - res = scanner(ptr + offset); - ptr[c->len] = lim; - - return res; -} - -/*!re2c - re2c:define:YYCTYPE = "unsigned char"; - re2c:define:YYCURSOR = p; - re2c:define:YYMARKER = marker; - re2c:define:YYCTXMARKER = marker; - re2c:yyfill:enable = 0; - - wordchar = [^\x00-\x20]; - - spacechar = [ \t\n]; - - reg_char = [^\\()\x00-\x20]; - - escaped_char = [\\][!"#$%&'()*+,./:;<=>?@[\\\]^_`{|}~-]; - - tagname = [A-Za-z][A-Za-z0-9]*; - - blocktagname = 'article'|'header'|'aside'|'hgroup'|'iframe'|'blockquote'|'hr'|'body'|'li'|'map'|'button'|'object'|'canvas'|'ol'|'caption'|'output'|'col'|'p'|'colgroup'|'pre'|'dd'|'progress'|'div'|'section'|'dl'|'table'|'td'|'dt'|'tbody'|'embed'|'textarea'|'fieldset'|'tfoot'|'figcaption'|'th'|'figure'|'thead'|'footer'|'footer'|'tr'|'form'|'ul'|'h1'|'h2'|'h3'|'h4'|'h5'|'h6'|'video'|'script'|'style'; - - attributename = [a-zA-Z_:][a-zA-Z0-9:._-]*; - - unquotedvalue = [^\"'=<>`\x00]+; - singlequotedvalue = ['][^'\x00]*[']; - doublequotedvalue = [\"][^\"\x00]*[\"]; - - attributevalue = unquotedvalue | singlequotedvalue | doublequotedvalue; - - attributevaluespec = spacechar* [=] spacechar* attributevalue; - - attribute = spacechar+ attributename attributevaluespec?; - - opentag = tagname attribute* spacechar* [/]? [>]; - closetag = [/] tagname spacechar* [>]; - - htmlcomment = "!--" ([^-\x00]+ | [-][^-\x00]+)* "-->"; - - processinginstruction = "?" ([^?>\x00]+ | [?][^>\x00] | [>])* "?>"; - - declaration = "!" [A-Z]+ spacechar+ [^>\x00]* ">"; - - cdata = "![CDATA[" ([^\]\x00]+ | "]" [^\]\x00] | "]]" [^>\x00])* "]]>"; - - htmltag = opentag | closetag | htmlcomment | processinginstruction | - declaration | cdata; - - in_parens_nosp = [(] (reg_char|escaped_char)* [)]; - - in_double_quotes = ["] (escaped_char|[^"\x00])* ["]; - in_single_quotes = ['] (escaped_char|[^'\x00])* [']; - in_parens = [(] (escaped_char|[^)\x00])* [)]; - - scheme = 'coap'|'doi'|'javascript'|'aaa'|'aaas'|'about'|'acap'|'cap'|'cid'|'crid'|'data'|'dav'|'dict'|'dns'|'file'|'ftp'|'geo'|'go'|'gopher'|'h323'|'http'|'https'|'iax'|'icap'|'im'|'imap'|'info'|'ipp'|'iris'|'iris.beep'|'iris.xpc'|'iris.xpcs'|'iris.lwz'|'ldap'|'mailto'|'mid'|'msrp'|'msrps'|'mtqp'|'mupdate'|'news'|'nfs'|'ni'|'nih'|'nntp'|'opaquelocktoken'|'pop'|'pres'|'rtsp'|'service'|'session'|'shttp'|'sieve'|'sip'|'sips'|'sms'|'snmp'|'soap.beep'|'soap.beeps'|'tag'|'tel'|'telnet'|'tftp'|'thismessage'|'tn3270'|'tip'|'tv'|'urn'|'vemmi'|'ws'|'wss'|'xcon'|'xcon-userid'|'xmlrpc.beep'|'xmlrpc.beeps'|'xmpp'|'z39.50r'|'z39.50s'|'adiumxtra'|'afp'|'afs'|'aim'|'apt'|'attachment'|'aw'|'beshare'|'bitcoin'|'bolo'|'callto'|'chrome'|'chrome-extension'|'com-eventbrite-attendee'|'content'|'cvs'|'dlna-playsingle'|'dlna-playcontainer'|'dtn'|'dvb'|'ed2k'|'facetime'|'feed'|'finger'|'fish'|'gg'|'git'|'gizmoproject'|'gtalk'|'hcp'|'icon'|'ipn'|'irc'|'irc6'|'ircs'|'itms'|'jar'|'jms'|'keyparc'|'lastfm'|'ldaps'|'magnet'|'maps'|'market'|'message'|'mms'|'ms-help'|'msnim'|'mumble'|'mvn'|'notes'|'oid'|'palm'|'paparazzi'|'platform'|'proxy'|'psyc'|'query'|'res'|'resource'|'rmi'|'rsync'|'rtmp'|'secondlife'|'sftp'|'sgn'|'skype'|'smb'|'soldat'|'spotify'|'ssh'|'steam'|'svn'|'teamspeak'|'things'|'udp'|'unreal'|'ut2004'|'ventrilo'|'view-source'|'webcal'|'wtai'|'wyciwyg'|'xfire'|'xri'|'ymsgr'; -*/ - -// Try to match URI autolink after first <, returning number of chars matched. -int _scan_autolink_uri(const unsigned char *p) -{ - const unsigned char *marker = NULL; - const unsigned char *start = p; -/*!re2c - scheme [:]([^\x00-\x20<>\\]|escaped_char)*[>] { return (p - start); } - .? { return 0; } -*/ -} - -// Try to match email autolink after first <, returning num of chars matched. -int _scan_autolink_email(const unsigned char *p) -{ - const unsigned char *marker = NULL; - const unsigned char *start = p; -/*!re2c - [a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+ - [@] - [a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])? - ([.][a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)* - [>] { return (p - start); } - .? { return 0; } -*/ -} - -// Try to match an HTML tag after first <, returning num of chars matched. -int _scan_html_tag(const unsigned char *p) -{ - const unsigned char *marker = NULL; - const unsigned char *start = p; -/*!re2c - htmltag { return (p - start); } - .? { return 0; } -*/ -} - -// Try to match an HTML block tag including first <, -// returning num of chars matched. -int _scan_html_block_tag(const unsigned char *p) -{ - const unsigned char *marker = NULL; - const unsigned char *start = p; -/*!re2c - [<] [/] blocktagname (spacechar | [>]) { return (p - start); } - [<] blocktagname (spacechar | [/>]) { return (p - start); } - [<] [!?] { return (p - start); } - .? { return 0; } -*/ -} - -// Try to match a URL in a link or reference, return number of chars matched. -// This may optionally be contained in <..>; otherwise -// whitespace and unbalanced right parentheses aren't allowed. -// Newlines aren't ever allowed. -int _scan_link_url(const unsigned char *p) -{ - const unsigned char *marker = NULL; - const unsigned char *start = p; -/*!re2c - [ \n]* [<] ([^<>\n\\\x00] | escaped_char | [\\])* [>] { return (p - start); } - [ \n]* (reg_char+ | escaped_char | in_parens_nosp)* { return (p - start); } - .? { return 0; } -*/ -} - -// Try to match a link title (in single quotes, in double quotes, or -// in parentheses), returning number of chars matched. Allow one -// level of internal nesting (quotes within quotes). -int _scan_link_title(const unsigned char *p) -{ - const unsigned char *marker = NULL; - const unsigned char *start = p; -/*!re2c - ["] (escaped_char|[^"\x00])* ["] { return (p - start); } - ['] (escaped_char|[^'\x00])* ['] { return (p - start); } - [(] (escaped_char|[^)\x00])* [)] { return (p - start); } - .? { return 0; } -*/ -} - -// Match space characters, including newlines. -int _scan_spacechars(const unsigned char *p) -{ - const unsigned char *start = p; \ -/*!re2c - [ \t\n]* { return (p - start); } - . { return 0; } -*/ -} - -// Match ATX header start. -int _scan_atx_header_start(const unsigned char *p) -{ - const unsigned char *marker = NULL; - const unsigned char *start = p; -/*!re2c - [#]{1,6} ([ ]+|[\n]) { return (p - start); } - .? { return 0; } -*/ -} - -// Match sexext header line. Return 1 for level-1 header, -// 2 for level-2, 0 for no match. -int _scan_setext_header_line(const unsigned char *p) -{ - const unsigned char *marker = NULL; -/*!re2c - [=]+ [ ]* [\n] { return 1; } - [-]+ [ ]* [\n] { return 2; } - .? { return 0; } -*/ -} - -// Scan a horizontal rule line: "...three or more hyphens, asterisks, -// or underscores on a line by themselves. If you wish, you may use -// spaces between the hyphens or asterisks." -int _scan_hrule(const unsigned char *p) -{ - const unsigned char *marker = NULL; - const unsigned char *start = p; -/*!re2c - ([*][ ]*){3,} [ \t]* [\n] { return (p - start); } - ([_][ ]*){3,} [ \t]* [\n] { return (p - start); } - ([-][ ]*){3,} [ \t]* [\n] { return (p - start); } - .? { return 0; } -*/ -} - -// Scan an opening code fence. -int _scan_open_code_fence(const unsigned char *p) -{ - const unsigned char *marker = NULL; - const unsigned char *start = p; -/*!re2c - [`]{3,} / [^`\n\x00]*[\n] { return (p - start); } - [~]{3,} / [^~\n\x00]*[\n] { return (p - start); } - .? { return 0; } -*/ -} - -// Scan a closing code fence with length at least len. -int _scan_close_code_fence(const unsigned char *p) -{ - const unsigned char *marker = NULL; - const unsigned char *start = p; -/*!re2c - ([`]{3,} | [~]{3,}) / spacechar* [\n] { return (p - start); } - .? { return 0; } -*/ -} - -// Scans an entity. -// Returns number of chars matched. -int _scan_entity(const unsigned char *p) -{ - const unsigned char *marker = NULL; - const unsigned char *start = p; -/*!re2c - [&] ([#] ([Xx][A-Fa-f0-9]{1,8}|[0-9]{1,8}) |[A-Za-z][A-Za-z0-9]{1,31} ) [;] - { return (p - start); } - .? { return 0; } -*/ -} diff --git a/outside/commonmark/src/utf8.c b/outside/commonmark/src/utf8.c deleted file mode 100644 index e4ea8e280..000000000 --- a/outside/commonmark/src/utf8.c +++ /dev/null @@ -1,462 +0,0 @@ -#include -#include -#include - -#include "utf8.h" - -static const int8_t utf8proc_utf8class[256] = { - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0 }; - -static void encode_unknown(strbuf *buf) -{ - static const uint8_t repl[] = {239, 191, 189}; - strbuf_put(buf, repl, 3); -} - -static int utf8proc_charlen(const uint8_t *str, int str_len) -{ - int length, i; - - if (!str_len) - return 0; - - length = utf8proc_utf8class[str[0]]; - - if (!length) - return -1; - - if (str_len >= 0 && length > str_len) - return -str_len; - - for (i = 1; i < length; i++) { - if ((str[i] & 0xC0) != 0x80) - return -i; - } - - return length; -} - -// Validate a single UTF-8 character according to RFC 3629. -static int utf8proc_valid(const uint8_t *str, int str_len) -{ - int length = utf8proc_charlen(str, str_len); - - if (length <= 0) - return length; - - switch (length) { - case 1: - if (str[0] == 0x00) { - // ASCII NUL is technically valid but rejected - // for security reasons. - return -length; - } - break; - - case 2: - if (str[0] < 0xC2) { - // Overlong - return -length; - } - break; - - case 3: - if (str[0] == 0xE0) { - if (str[1] < 0xA0) { - // Overlong - return -length; - } - } - else if (str[0] == 0xED) { - if (str[1] >= 0xA0) { - // Surrogate - return -length; - } - } - break; - - case 4: - if (str[0] == 0xF0) { - if (str[1] < 0x90) { - // Overlong - return -length; - } - } - else if (str[0] >= 0xF4) { - if (str[0] > 0xF4 || str[1] >= 0x90) { - // Above 0x10FFFF - return -length; - } - } - break; - } - - return length; -} - -void utf8proc_detab(strbuf *ob, const uint8_t *line, size_t size) -{ - static const uint8_t whitespace[] = " "; - - size_t i = 0, tab = 0; - - while (i < size) { - size_t org = i; - - while (i < size && line[i] != '\t' && line[i] != '\0' - && line[i] < 0x80) { - i++; tab++; - } - - if (i > org) - strbuf_put(ob, line + org, i - org); - - if (i >= size) - break; - - if (line[i] == '\t') { - int numspaces = 4 - (tab % 4); - strbuf_put(ob, whitespace, numspaces); - i += 1; - tab += numspaces; - } else { - int charlen = utf8proc_valid(line + i, size - i); - - if (charlen >= 0) { - strbuf_put(ob, line + i, charlen); - } else { - encode_unknown(ob); - charlen = -charlen; - } - - i += charlen; - tab += 1; - } - } -} - -int utf8proc_iterate(const uint8_t *str, int str_len, int32_t *dst) -{ - int length; - int32_t uc = -1; - - *dst = -1; - length = utf8proc_charlen(str, str_len); - if (length < 0) - return -1; - - switch (length) { - case 1: - uc = str[0]; - break; - case 2: - uc = ((str[0] & 0x1F) << 6) + (str[1] & 0x3F); - if (uc < 0x80) uc = -1; - break; - case 3: - uc = ((str[0] & 0x0F) << 12) + ((str[1] & 0x3F) << 6) - + (str[2] & 0x3F); - if (uc < 0x800 || (uc >= 0xD800 && uc < 0xE000) || - (uc >= 0xFDD0 && uc < 0xFDF0)) uc = -1; - break; - case 4: - uc = ((str[0] & 0x07) << 18) + ((str[1] & 0x3F) << 12) - + ((str[2] & 0x3F) << 6) + (str[3] & 0x3F); - if (uc < 0x10000 || uc >= 0x110000) uc = -1; - break; - } - - if (uc < 0 || ((uc & 0xFFFF) >= 0xFFFE)) - return -1; - - *dst = uc; - return length; -} - -void utf8proc_encode_char(int32_t uc, strbuf *buf) -{ - uint8_t dst[4]; - int len = 0; - - assert(uc >= 0); - - if (uc < 0x80) { - dst[0] = uc; - len = 1; - } else if (uc < 0x800) { - dst[0] = 0xC0 + (uc >> 6); - dst[1] = 0x80 + (uc & 0x3F); - len = 2; - } else if (uc == 0xFFFF) { - dst[0] = 0xFF; - len = 1; - } else if (uc == 0xFFFE) { - dst[0] = 0xFE; - len = 1; - } else if (uc < 0x10000) { - dst[0] = 0xE0 + (uc >> 12); - dst[1] = 0x80 + ((uc >> 6) & 0x3F); - dst[2] = 0x80 + (uc & 0x3F); - len = 3; - } else if (uc < 0x110000) { - dst[0] = 0xF0 + (uc >> 18); - dst[1] = 0x80 + ((uc >> 12) & 0x3F); - dst[2] = 0x80 + ((uc >> 6) & 0x3F); - dst[3] = 0x80 + (uc & 0x3F); - len = 4; - } else { - encode_unknown(buf); - return; - } - - strbuf_put(buf, dst, len); -} - -void utf8proc_case_fold(strbuf *dest, const uint8_t *str, int len) -{ - int32_t c; - -#define bufpush(x) \ - utf8proc_encode_char(x, dest) - - while (len > 0) { - int char_len = utf8proc_iterate(str, len, &c); - - if (char_len >= 0) { -#include "case_fold_switch.inc" - } else { - encode_unknown(dest); - char_len = -char_len; - } - - str += char_len; - len -= char_len; - } -} - -// matches anything in the Zs class, plus LF, CR, TAB, FF. -int utf8proc_is_space(int32_t uc) -{ - return (uc == 9 || - uc == 10 || - uc == 12 || - uc == 13 || - uc == 32 || - uc == 160 || - uc == 5760 || - (uc >= 8192 && uc <= 8202) || - uc == 8239 || - uc == 8287 || - uc == 12288); -} - -// matches anything in the P[cdefios] classes. -int utf8proc_is_punctuation(int32_t uc) -{ - return ((uc >= 33 && uc <= 35) || - (uc >= 37 && uc <= 42) || - (uc >= 44 && uc <= 47) || - uc == 58 || - uc == 59 || - uc == 63 || - uc == 64 || - (uc >= 91 && uc <= 93) || - uc == 95 || - uc == 123 || - uc == 125 || - uc == 161 || - uc == 167 || - uc == 171 || - uc == 182 || - uc == 183 || - uc == 187 || - uc == 191 || - uc == 894 || - uc == 903 || - (uc >= 1370 && uc <= 1375) || - uc == 1417 || - uc == 1418 || - uc == 1470 || - uc == 1472 || - uc == 1475 || - uc == 1478 || - uc == 1523 || - uc == 1524 || - uc == 1545 || - uc == 1546 || - uc == 1548 || - uc == 1549 || - uc == 1563 || - uc == 1566 || - uc == 1567 || - (uc >= 1642 && uc <= 1645) || - uc == 1748 || - (uc >= 1792 && uc <= 1805) || - (uc >= 2039 && uc <= 2041) || - (uc >= 2096 && uc <= 2110) || - uc == 2142 || - uc == 2404 || - uc == 2405 || - uc == 2416 || - uc == 2800 || - uc == 3572 || - uc == 3663 || - uc == 3674 || - uc == 3675 || - (uc >= 3844 && uc <= 3858) || - uc == 3860 || - (uc >= 3898 && uc <= 3901) || - uc == 3973 || - (uc >= 4048 && uc <= 4052) || - uc == 4057 || - uc == 4058 || - (uc >= 4170 && uc <= 4175) || - uc == 4347 || - (uc >= 4960 && uc <= 4968) || - uc == 5120 || - uc == 5741 || - uc == 5742 || - uc == 5787 || - uc == 5788 || - (uc >= 5867 && uc <= 5869) || - uc == 5941 || - uc == 5942 || - (uc >= 6100 && uc <= 6102) || - (uc >= 6104 && uc <= 6106) || - (uc >= 6144 && uc <= 6154) || - uc == 6468 || - uc == 6469 || - uc == 6686 || - uc == 6687 || - (uc >= 6816 && uc <= 6822) || - (uc >= 6824 && uc <= 6829) || - (uc >= 7002 && uc <= 7008) || - (uc >= 7164 && uc <= 7167) || - (uc >= 7227 && uc <= 7231) || - uc == 7294 || - uc == 7295 || - (uc >= 7360 && uc <= 7367) || - uc == 7379 || - (uc >= 8208 && uc <= 8231) || - (uc >= 8240 && uc <= 8259) || - (uc >= 8261 && uc <= 8273) || - (uc >= 8275 && uc <= 8286) || - uc == 8317 || - uc == 8318 || - uc == 8333 || - uc == 8334 || - (uc >= 8968 && uc <= 8971) || - uc == 9001 || - uc == 9002 || - (uc >= 10088 && uc <= 10101) || - uc == 10181 || - uc == 10182 || - (uc >= 10214 && uc <= 10223) || - (uc >= 10627 && uc <= 10648) || - (uc >= 10712 && uc <= 10715) || - uc == 10748 || - uc == 10749 || - (uc >= 11513 && uc <= 11516) || - uc == 11518 || - uc == 11519 || - uc == 11632 || - (uc >= 11776 && uc <= 11822) || - (uc >= 11824 && uc <= 11842) || - (uc >= 12289 && uc <= 12291) || - (uc >= 12296 && uc <= 12305) || - (uc >= 12308 && uc <= 12319) || - uc == 12336 || - uc == 12349 || - uc == 12448 || - uc == 12539 || - uc == 42238 || - uc == 42239 || - (uc >= 42509 && uc <= 42511) || - uc == 42611 || - uc == 42622 || - (uc >= 42738 && uc <= 42743) || - (uc >= 43124 && uc <= 43127) || - uc == 43214 || - uc == 43215 || - (uc >= 43256 && uc <= 43258) || - uc == 43310 || - uc == 43311 || - uc == 43359 || - (uc >= 43457 && uc <= 43469) || - uc == 43486 || - uc == 43487 || - (uc >= 43612 && uc <= 43615) || - uc == 43742 || - uc == 43743 || - uc == 43760 || - uc == 43761 || - uc == 44011 || - uc == 64830 || - uc == 64831 || - (uc >= 65040 && uc <= 65049) || - (uc >= 65072 && uc <= 65106) || - (uc >= 65108 && uc <= 65121) || - uc == 65123 || - uc == 65128 || - uc == 65130 || - uc == 65131 || - (uc >= 65281 && uc <= 65283) || - (uc >= 65285 && uc <= 65290) || - (uc >= 65292 && uc <= 65295) || - uc == 65306 || - uc == 65307 || - uc == 65311 || - uc == 65312 || - (uc >= 65339 && uc <= 65341) || - uc == 65343 || - uc == 65371 || - uc == 65373 || - (uc >= 65375 && uc <= 65381) || - (uc >= 65792 && uc <= 65794) || - uc == 66463 || - uc == 66512 || - uc == 66927 || - uc == 67671 || - uc == 67871 || - uc == 67903 || - (uc >= 68176 && uc <= 68184) || - uc == 68223 || - (uc >= 68336 && uc <= 68342) || - (uc >= 68409 && uc <= 68415) || - (uc >= 68505 && uc <= 68508) || - (uc >= 69703 && uc <= 69709) || - uc == 69819 || - uc == 69820 || - (uc >= 69822 && uc <= 69825) || - (uc >= 69952 && uc <= 69955) || - uc == 70004 || - uc == 70005 || - (uc >= 70085 && uc <= 70088) || - uc == 70093 || - (uc >= 70200 && uc <= 70205) || - uc == 70854 || - (uc >= 71105 && uc <= 71113) || - (uc >= 71233 && uc <= 71235) || - (uc >= 74864 && uc <= 74868) || - uc == 92782 || - uc == 92783 || - uc == 92917 || - (uc >= 92983 && uc <= 92987) || - uc == 92996 || - uc == 113823); -} diff --git a/outside/commonmark/src/utf8.h b/outside/commonmark/src/utf8.h deleted file mode 100644 index 7df15737e..000000000 --- a/outside/commonmark/src/utf8.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef CMARK_UTF8_H -#define CMARK_UTF8_H - -#include -#include "buffer.h" - -#ifdef __cplusplus -extern "C" { -#endif - -void utf8proc_case_fold(cmark_strbuf *dest, const uint8_t *str, int len); -void utf8proc_encode_char(int32_t uc, cmark_strbuf *buf); -int utf8proc_iterate(const uint8_t *str, int str_len, int32_t *dst); -void utf8proc_detab(cmark_strbuf *dest, const uint8_t *line, size_t size); -int utf8proc_is_space(int32_t uc); -int utf8proc_is_punctuation(int32_t uc); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/outside/commonmark/template.html b/outside/commonmark/template.html deleted file mode 100644 index f9723c64d..000000000 --- a/outside/commonmark/template.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - -$title$ - - - - - -$if(title)$ -

    $title$

    -$endif$ -$if(version)$ -
    Version $version$ ($date$)
    -$endif$ -
    -$for(author)$$author$$sep$; $endfor$ -
    -
    -$toc$ -
    -
    -$body$ - - diff --git a/outside/commonmark/template.tex b/outside/commonmark/template.tex deleted file mode 100644 index d083b7234..000000000 --- a/outside/commonmark/template.tex +++ /dev/null @@ -1,229 +0,0 @@ -\documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$lang$,$endif$$if(papersize)$$papersize$,$endif$$for(classoption)$$classoption$$sep$,$endfor$]{$documentclass$} -$if(fontfamily)$ -\usepackage{$fontfamily$} -$else$ -\usepackage{lmodern} -$endif$ -$if(linestretch)$ -\usepackage{setspace} -\setstretch{$linestretch$} -$endif$ -\usepackage{amssymb,amsmath} -\usepackage{ifxetex,ifluatex} -\usepackage{fixltx2e} % provides \textsubscript -\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex - \usepackage[T1]{fontenc} - \usepackage[utf8]{inputenc} -$if(euro)$ - \usepackage{eurosym} -$endif$ -\else % if luatex or xelatex - \ifxetex - \usepackage{mathspec} - \usepackage{xltxtra,xunicode} - \else - \usepackage{fontspec} - \fi - \defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase} - \newcommand{\euro}{€} -$if(mainfont)$ - \setmainfont{$mainfont$} -$endif$ -$if(sansfont)$ - \setsansfont{$sansfont$} -$endif$ -$if(monofont)$ - \setmonofont[Mapping=tex-ansi]{$monofont$} -$endif$ -$if(mathfont)$ - \setmathfont(Digits,Latin,Greek){$mathfont$} -$endif$ -\fi -% use upquote if available, for straight quotes in verbatim environments -\IfFileExists{upquote.sty}{\usepackage{upquote}}{} -% use microtype if available -\IfFileExists{microtype.sty}{\usepackage{microtype}}{} -\usepackage[margin=1in]{geometry} -$if(natbib)$ -\usepackage{natbib} -\bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$} -$endif$ -$if(biblatex)$ -\usepackage{biblatex} -$if(biblio-files)$ -\bibliography{$biblio-files$} -$endif$ -$endif$ -$if(listings)$ -\usepackage{listings} -$endif$ -$if(lhs)$ -\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{} -$endif$ -\usepackage{fancyvrb} -\usepackage{color,framed} -\newcommand{\VerbBar}{|} -\newcommand{\VERB}{\Verb[commandchars=\\\{\}]} -\DefineVerbatimEnvironment{Highlighting}{Verbatim}{commandchars=\\\{\},fontsize=\small} -% Add ',fontsize=\small' for more characters per line -\definecolor{shadecolor}{gray}{1} -\newenvironment{Shaded}{\begin{snugshade}}{\end{snugshade}} -\newcommand{\NormalTok}[1]{{#1}} -\let\KeywordTok\NormalTok -\let\DataTypeTok\NormalTok -\let\DecValTok\NormalTok -\let\BaseNTok\NormalTok -\let\FloatTok\NormalTok -\let\CharTok\NormalTok -\let\StringTok\NormalTok -\let\CommentTok\NormalTok -\let\OtherTok\NormalTok -\let\AlertTok\NormalTok -\let\FunctionTok\NormalTok -\let\RegionMarkerTok\NormalTok -\let\ErrorTok\NormalTok -%\newcommand{\KeywordTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{\textbf{{#1}}}} -%\newcommand{\DataTypeTok}[1]{\textcolor[rgb]{0.56,0.13,0.00}{{#1}}} -%\newcommand{\DecValTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{{#1}}} -%\newcommand{\BaseNTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{{#1}}} -%\newcommand{\FloatTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{{#1}}} -%\newcommand{\CharTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{{#1}}} -%\newcommand{\StringTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{{#1}}} -%\newcommand{\CommentTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textit{{#1}}}} -%\newcommand{\OtherTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{{#1}}} -%\newcommand{\AlertTok}[1]{\textcolor[rgb]{1.00,0.00,0.00}{\textbf{{#1}}}} -%\newcommand{\FunctionTok}[1]{\textcolor[rgb]{0.02,0.16,0.49}{{#1}}} -%\newcommand{\RegionMarkerTok}[1]{{#1}} -%\newcommand{\ErrorTok}[1]{\textcolor[rgb]{1.00,0.00,0.00}{\textbf{{#1}}}} -$if(verbatim-in-note)$ -\usepackage{fancyvrb} -$endif$ -$if(tables)$ -\usepackage{longtable,booktabs} -$endif$ -$if(graphics)$ -\usepackage{graphicx} -\makeatletter -\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi} -\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi} -\makeatother -% Scale images if necessary, so that they will not overflow the page -% margins by default, and it is still possible to overwrite the defaults -% using explicit options in \includegraphics[width, height, ...]{} -\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio} -$endif$ -\ifxetex - \usepackage[setpagesize=false, % page size defined by xetex - unicode=false, % unicode breaks when used with xetex - xetex]{hyperref} -\else - \usepackage[unicode=true]{hyperref} -\fi -\hypersetup{breaklinks=true, - bookmarks=true, - pdfauthor={$author-meta$}, - pdftitle={$title-meta$}, - colorlinks=true, - citecolor=$if(citecolor)$$citecolor$$else$blue$endif$, - urlcolor=$if(urlcolor)$$urlcolor$$else$blue$endif$, - linkcolor=$if(linkcolor)$$linkcolor$$else$magenta$endif$, - pdfborder={0 0 0}} -\urlstyle{same} % don't use monospace font for urls -$if(links-as-notes)$ -% Make links footnotes instead of hotlinks: -\renewcommand{\href}[2]{#2\footnote{\url{#1}}} -$endif$ -$if(strikeout)$ -\usepackage[normalem]{ulem} -% avoid problems with \sout in headers with hyperref: -\pdfstringdefDisableCommands{\renewcommand{\sout}{}} -$endif$ -\setlength{\parindent}{0pt} -\setlength{\parskip}{6pt plus 2pt minus 1pt} -\setlength{\emergencystretch}{3em} % prevent overfull lines -$if(numbersections)$ -\setcounter{secnumdepth}{5} -$else$ -\setcounter{secnumdepth}{0} -$endif$ -$if(verbatim-in-note)$ -\VerbatimFootnotes % allows verbatim text in footnotes -$endif$ -$if(lang)$ -\ifxetex - \usepackage{polyglossia} - \setmainlanguage{$mainlang$} -\else - \usepackage[$lang$]{babel} -\fi -$endif$ - -\usepackage{titlesec} -\titleformat{\chapter}[hang]{\Huge\bfseries}{\thechapter\ }{0pt}{\Huge\bfseries} - -\usepackage{fancyhdr} -\pagestyle{fancy} -\pagenumbering{arabic} -\lhead{\itshape $title$} -\chead{} -\rhead{\itshape{\nouppercase{\rightmark}}} -\lfoot{v$version$ ($date$)} -\cfoot{} -\rfoot{\thepage} - -$if(title)$ -\title{$title$$if(subtitle)$\\\vspace{0.5em}{\large $subtitle$}$endif$} -$endif$ -$if(author)$ -\author{$for(author)$$author$$sep$ \and $endfor$} -$endif$ -\date{$date$} -$for(header-includes)$ -$header-includes$ -$endfor$ - -\begin{document} -$if(title)$ -\maketitle -$endif$ -$if(abstract)$ -\begin{abstract} -$abstract$ -\end{abstract} -$endif$ - -$for(include-before)$ -$include-before$ - -$endfor$ -$if(toc)$ -{ -\hypersetup{linkcolor=black} -\setcounter{tocdepth}{$toc-depth$} -\tableofcontents -} -$endif$ -$body$ - -$if(natbib)$ -$if(biblio-files)$ -$if(biblio-title)$ -$if(book-class)$ -\renewcommand\bibname{$biblio-title$} -$else$ -\renewcommand\refname{$biblio-title$} -$endif$ -$endif$ -\bibliography{$biblio-files$} - -$endif$ -$endif$ -$if(biblatex)$ -\printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$ - -$endif$ -$for(include-after)$ -$include-after$ - -$endfor$ -\end{document} diff --git a/outside/commonmark/test/CMakeLists.txt b/outside/commonmark/test/CMakeLists.txt deleted file mode 100644 index 6761317aa..000000000 --- a/outside/commonmark/test/CMakeLists.txt +++ /dev/null @@ -1,24 +0,0 @@ -# To get verbose output: cmake --build build --target "test" -- ARGS='-V' - -if (WIN32) - file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR}/src WIN_DLL_DIR) - set_tests_properties(api_test PROPERTIES - ENVIRONMENT "PATH=${WIN_DLL_DIR};$ENV{PATH}" - ) -endif(WIN32) - -add_test(spectest_library - python "${CMAKE_CURRENT_SOURCE_DIR}/spec_tests.py" "--no-normalize" "--spec" - "${CMAKE_SOURCE_DIR}/spec.txt" "--library-dir" "${CMAKE_BINARY_DIR}/src" -) - -add_test(pathological_tests_library - python "${CMAKE_CURRENT_SOURCE_DIR}/pathological_tests.py" - "--library-dir" "${CMAKE_BINARY_DIR}/src" -) - -add_test(NAME api_test COMMAND api_test) - -add_test(spectest_executable - python "${CMAKE_CURRENT_SOURCE_DIR}/spec_tests.py" "--no-normalize" "--spec" "${CMAKE_SOURCE_DIR}/spec.txt" "--program" "${CMAKE_BINARY_DIR}/src/cmark" -) \ No newline at end of file diff --git a/outside/commonmark/test/cmark.py b/outside/commonmark/test/cmark.py deleted file mode 100644 index 432a3e03b..000000000 --- a/outside/commonmark/test/cmark.py +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -from ctypes import CDLL, c_char_p, c_long -from subprocess import * -import platform - -def pipe_through_prog(prog, text): - p1 = Popen(prog.split(), stdout=PIPE, stdin=PIPE, stderr=PIPE) - [result, err] = p1.communicate(input=text) - return [p1.returncode, result, err] - -def use_library(lib, text): - return [0, lib(text, len(text)), ''] - -class CMark: - def __init__(self, prog=None, library_dir=None): - self.prog = prog - if prog: - self.to_html = lambda x: pipe_through_prog(prog, x) - else: - sysname = platform.system() - libname = "libcmark" - if sysname == 'Darwin': - libname += ".dylib" - elif sysname == 'Windows': - libname += ".dll" - else: - libname += ".so" - if library_dir: - libpath = library_dir + "/" + libname - else: - libpath = "build/src/" + libname - cmark = CDLL(libpath) - markdown = cmark.cmark_markdown_to_html - markdown.restype = c_char_p - markdown.argtypes = [c_char_p, c_long] - self.to_html = lambda x: use_library(markdown, x) diff --git a/outside/commonmark/test/normalize.py b/outside/commonmark/test/normalize.py deleted file mode 100644 index 6cb11b43d..000000000 --- a/outside/commonmark/test/normalize.py +++ /dev/null @@ -1,141 +0,0 @@ -from HTMLParser import HTMLParser, HTMLParseError -from htmlentitydefs import name2codepoint -import sys -import re -import cgi - -# Normalization code, adapted from -# https://github.com/karlcow/markdown-testsuite/ -significant_attrs = ["alt", "href", "src", "title"] -whitespace_re = re.compile('/s+/') -class MyHTMLParser(HTMLParser): - def __init__(self): - HTMLParser.__init__(self) - self.last = "starttag" - self.in_pre = False - self.output = u"" - self.last_tag = "" - def handle_data(self, data): - after_tag = self.last == "endtag" or self.last == "starttag" - after_block_tag = after_tag and self.is_block_tag(self.last_tag) - if after_tag and self.last_tag == "br": - data = data.lstrip('\n') - data = whitespace_re.sub(' ', data) - if after_block_tag and not self.in_pre: - if self.last == "starttag": - data = data.lstrip() - elif self.last == "endtag": - data = data.strip() - self.output += data - self.last = "data" - def handle_endtag(self, tag): - if tag == "pre": - self.in_pre = False - if self.is_block_tag(tag): - self.output = self.output.rstrip() - self.output += "" - self.last_tag = tag - self.last = "endtag" - def handle_starttag(self, tag, attrs): - if tag == "pre": - self.in_pre = True - self.output += "<" + tag - # For now we don't strip out 'extra' attributes, because of - # raw HTML test cases. - # attrs = filter(lambda attr: attr[0] in significant_attrs, attrs) - if attrs: - attrs.sort() - for (k,v) in attrs: - self.output += " " + k - if v != None: - self.output += ("=" + '"' + cgi.escape(v,quote=True) + '"') - self.output += ">" - self.last_tag = tag - self.last = "starttag" - def handle_startendtag(self, tag, attrs): - """Ignore closing tag for self-closing """ - self.handle_starttag(tag, attrs) - self.last_tag = tag - self.last = "endtag" - def handle_comment(self, data): - self.output += '' - self.last = "comment" - def handle_decl(self, data): - self.output += '' - self.last = "decl" - def unknown_decl(self, data): - self.output += '' - self.last = "decl" - def handle_pi(self,data): - self.output += '' - self.last = "pi" - def handle_entityref(self, name): - try: - c = unichr(name2codepoint[name]) - except KeyError: - c = None - self.output_char(c, '&' + name + ';') - self.last = "ref" - def handle_charref(self, name): - try: - if name.startswith("x"): - c = unichr(int(name[1:], 16)) - else: - c = unichr(int(name)) - except ValueError: - c = None - self.output_char(c, '&' + name + ';') - self.last = "ref" - # Helpers. - def output_char(self, c, fallback): - if c == u'<': - self.output += "<" - elif c == u'>': - self.output += ">" - elif c == u'&': - self.output += "&" - elif c == u'"': - self.output += """ - elif c == None: - self.output += fallback - else: - self.output += c - - def is_block_tag(self,tag): - return (tag in ['article', 'header', 'aside', 'hgroup', 'blockquote', - 'hr', 'iframe', 'body', 'li', 'map', 'button', 'object', 'canvas', - 'ol', 'caption', 'output', 'col', 'p', 'colgroup', 'pre', 'dd', - 'progress', 'div', 'section', 'dl', 'table', 'td', 'dt', - 'tbody', 'embed', 'textarea', 'fieldset', 'tfoot', 'figcaption', - 'th', 'figure', 'thead', 'footer', 'tr', 'form', 'ul', - 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'video', 'script', 'style']) - -def normalize_html(html): - r""" - Return normalized form of HTML which ignores insignificant output - differences: - - * Multiple inner whitespaces are collapsed to a single space (except - in pre tags). - * Outer whitespace (outside block-level tags) is removed. - * Self-closing tags are converted to open tags. - * Attributes are sorted and lowercased. - * References are converted to unicode, except that '<', '>', '&', and - '&' are rendered using entities. - """ - html_chunk_re = re.compile("(\|\<[^>]*\>|[^<]+)") - try: - parser = MyHTMLParser() - # We work around HTMLParser's limitations parsing CDATA - # by breaking the input into chunks and passing CDATA chunks - # through verbatim. - for chunk in re.finditer(html_chunk_re, html): - if chunk.group(0)[:8] == "" + ("a a " * 100000) + "b" + - (" a a" * 100000) + "

    "), - "nested brackets": - (("[" * 50000) + "a" + ("]" * 50000), - "

    " + ("[" * 50000) + "a" + ("]" * 50000) + "

    ") - } - -whitespace_re = re.compile('/s+/') -passed = 0 -errored = 0 -failed = 0 - -print "Testing pathological cases:" -for description in pathological: - print description - (inp, expected) = pathological[description] - [rc, actual, err] = cmark.to_html(inp) - if rc != 0: - errored += 1 - print description - print "program returned error code %d" % rc - print(err) - elif whitespace_re.sub(' ', actual.rstrip()) == expected.rstrip(): - passed += 1 - else: - print description, 'failed' - print(actual) - failed += 1 - -print "%d passed, %d failed, %d errored" % (passed, failed, errored) -if (failed == 0 and errored == 0): - exit(0) -else: - exit(1) diff --git a/outside/commonmark/test/spec_tests.py b/outside/commonmark/test/spec_tests.py deleted file mode 100755 index 23ae50291..000000000 --- a/outside/commonmark/test/spec_tests.py +++ /dev/null @@ -1,140 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -import sys -from difflib import unified_diff -import argparse -import re -import json -from cmark import CMark -from normalize import normalize_html - -if __name__ == "__main__": - parser = argparse.ArgumentParser(description='Run cmark tests.') - parser.add_argument('--program', dest='program', nargs='?', default=None, - help='program to test') - parser.add_argument('--spec', dest='spec', nargs='?', default='spec.txt', - help='path to spec') - parser.add_argument('--pattern', dest='pattern', nargs='?', - default=None, help='limit to sections matching regex pattern') - parser.add_argument('--library-dir', dest='library_dir', nargs='?', - default=None, help='directory containing dynamic library') - parser.add_argument('--no-normalize', dest='normalize', - action='store_const', const=False, default=True, - help='do not normalize HTML') - parser.add_argument('--dump-tests', dest='dump_tests', - action='store_const', const=True, default=False, - help='dump tests in JSON format') - parser.add_argument('--debug-normalization', dest='debug_normalization', - action='store_const', const=True, - default=False, help='filter stdin through normalizer for testing') - args = parser.parse_args(sys.argv[1:]) - -def print_test_header(headertext, example_number, start_line, end_line): - print "Example %d (lines %d-%d) %s" % (example_number,start_line,end_line,headertext) - -def do_test(test, normalize): - [retcode, actual_html, err] = cmark.to_html(test['markdown']) - if retcode == 0: - expected_html = test['html'] - if normalize: - passed = normalize_html(actual_html) == normalize_html(expected_html) - else: - passed = actual_html == expected_html - if passed: - return 'pass' - else: - print_test_header(test['section'], test['example'], test['start_line'], test['end_line']) - sys.stdout.write(test['markdown']) - expected_html_lines = expected_html.splitlines(True) - actual_html_lines = actual_html.splitlines(True) - for diffline in unified_diff(expected_html_lines, actual_html_lines, - "expected HTML", "actual HTML"): - sys.stdout.write(diffline) - sys.stdout.write('\n') - return 'fail' - else: - print_test_header(test['section'], test['example'], test['start_line'], test['end_line']) - print "program returned error code %d" % retcode - print(err) - return 'error' - -def get_tests(specfile): - line_number = 0 - start_line = 0 - end_line = 0 - example_number = 0 - markdown_lines = [] - html_lines = [] - state = 0 # 0 regular text, 1 markdown example, 2 html output - headertext = '' - tests = [] - - header_re = re.compile('#+ ') - - with open(specfile, 'r') as specf: - for line in specf: - line_number = line_number + 1 - if state == 0 and re.match(header_re, line): - headertext = header_re.sub('', line).strip() - if line.strip() == ".": - state = (state + 1) % 3 - if state == 0: - example_number = example_number + 1 - end_line = line_number - tests.append({ - "markdown":''.join(markdown_lines).replace('→',"\t"), - "html":''.join(html_lines), - "example": example_number, - "start_line": start_line, - "end_line": end_line, - "section": headertext}) - start_line = 0 - markdown_lines = [] - html_lines = [] - elif state == 1: - if start_line == 0: - start_line = line_number - 1 - markdown_lines.append(line) - elif state == 2: - html_lines.append(line) - return tests - -def do_tests(cmark, tests, pattern, normalize): - passed = 0 - errored = 0 - failed = 0 - skipped = 0 - if pattern: - pattern_re = re.compile(pattern, re.IGNORECASE) - else: - pattern_re = re.compile('.') - for test in tests: - if re.search(pattern_re, test['section']): - result = do_test(test, normalize) - if result == 'pass': - passed += 1 - elif result == 'fail': - failed += 1 - else: - errored += 1 - else: - skipped += 1 - print "%d passed, %d failed, %d errored, %d skipped" % (passed, failed, errored, skipped) - return (failed == 0 and errored == 0) - -if __name__ == "__main__": - if args.debug_normalization: - print normalize_html(sys.stdin.read()) - exit(0) - - tests = get_tests(args.spec) - if args.dump_tests: - print json.dumps(tests, ensure_ascii=False, indent=2) - exit(0) - else: - cmark = CMark(prog=args.program, library_dir=args.library_dir) - if do_tests(cmark, tests, args.pattern, args.normalize): - exit(0) - else: - exit(1) diff --git a/outside/commonmark/toolchain-mingw32.cmake b/outside/commonmark/toolchain-mingw32.cmake deleted file mode 100644 index 61c62a831..000000000 --- a/outside/commonmark/toolchain-mingw32.cmake +++ /dev/null @@ -1,17 +0,0 @@ -# the name of the target operating system -SET(CMAKE_SYSTEM_NAME Windows) - -# which compilers to use for C and C++ -SET(CMAKE_C_COMPILER i586-mingw32msvc-gcc) -SET(CMAKE_CXX_COMPILER i586-mingw32msvc-g++) -SET(CMAKE_RC_COMPILER i586-mingw32msvc-windres) - -# here is the target environment located -SET(CMAKE_FIND_ROOT_PATH /usr/i586-mingw32msvc "${CMAKE_SOURCE_DIR}/windows") - -# adjust the default behaviour of the FIND_XXX() commands: -# search headers and libraries in the target environment, search -# programs in the host environment -set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) -set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) diff --git a/outside/commonmark/wrapper.lua b/outside/commonmark/wrapper.lua deleted file mode 100755 index 11c518328..000000000 --- a/outside/commonmark/wrapper.lua +++ /dev/null @@ -1,201 +0,0 @@ -#!/usr/bin/env luajit - -local ffi = require("ffi") - -cmark = ffi.load("libcmark") - -ffi.cdef[[ - - char *cmark_markdown_to_html(const char *text, int len); - typedef enum { - /* Block */ - CMARK_NODE_DOCUMENT, - CMARK_NODE_BLOCK_QUOTE, - CMARK_NODE_LIST, - CMARK_NODE_LIST_ITEM, - CMARK_NODE_CODE_BLOCK, - CMARK_NODE_HTML, - CMARK_NODE_PARAGRAPH, - CMARK_NODE_HEADER, - CMARK_NODE_HRULE, - CMARK_NODE_REFERENCE_DEF, - - CMARK_NODE_FIRST_BLOCK = CMARK_NODE_DOCUMENT, - CMARK_NODE_LAST_BLOCK = CMARK_NODE_REFERENCE_DEF, - - /* Inline */ - CMARK_NODE_TEXT, - CMARK_NODE_SOFTBREAK, - CMARK_NODE_LINEBREAK, - CMARK_NODE_INLINE_CODE, - CMARK_NODE_INLINE_HTML, - CMARK_NODE_EMPH, - CMARK_NODE_STRONG, - CMARK_NODE_LINK, - CMARK_NODE_IMAGE, - - CMARK_NODE_FIRST_INLINE = CMARK_NODE_TEXT, - CMARK_NODE_LAST_INLINE = CMARK_NODE_IMAGE, - } cmark_node_type; - - typedef enum { - CMARK_NO_LIST, - CMARK_BULLET_LIST, - CMARK_ORDERED_LIST - } cmark_list_type; - - typedef enum { - CMARK_PERIOD_DELIM, - CMARK_PAREN_DELIM - } cmark_delim_type; - - typedef struct cmark_node cmark_node; - typedef struct cmark_parser cmark_parser; - - cmark_node* cmark_node_new(cmark_node_type type); - - void - cmark_node_free(cmark_node *node); - - cmark_node* cmark_node_next(cmark_node *node); - - cmark_node* cmark_node_previous(cmark_node *node); - - cmark_node* cmark_node_parent(cmark_node *node); - - cmark_node* cmark_node_first_child(cmark_node *node); - - cmark_node* cmark_node_last_child(cmark_node *node); - - cmark_node_type cmark_node_get_type(cmark_node *node); - - const char* cmark_node_get_string_content(cmark_node *node); - - int cmark_node_set_string_content(cmark_node *node, const char *content); - - int cmark_node_get_header_level(cmark_node *node); - - int cmark_node_set_header_level(cmark_node *node, int level); - - cmark_list_type cmark_node_get_list_type(cmark_node *node); - - int cmark_node_set_list_type(cmark_node *node, cmark_list_type type); - - int cmark_node_get_list_start(cmark_node *node); - - int cmark_node_set_list_start(cmark_node *node, int start); - - int cmark_node_get_list_tight(cmark_node *node); - - int cmark_node_set_list_tight(cmark_node *node, int tight); - - const char* cmark_node_get_fence_info(cmark_node *node); - - int cmark_node_set_fence_info(cmark_node *node, const char *info); - - const char* cmark_node_get_url(cmark_node *node); - - int cmark_node_set_url(cmark_node *node, const char *url); - - const char* cmark_node_get_title(cmark_node *node); - - int cmark_node_set_title(cmark_node *node, const char *title); - - int cmark_node_get_start_line(cmark_node *node); - - int cmark_node_get_start_column(cmark_node *node); - - int cmark_node_get_end_line(cmark_node *node); - - void cmark_node_unlink(cmark_node *node); - - int cmark_node_insert_before(cmark_node *node, cmark_node *sibling); - - int cmark_node_insert_after(cmark_node *node, cmark_node *sibling); - - int cmark_node_prepend_child(cmark_node *node, cmark_node *child); - - int cmark_node_append_child(cmark_node *node, cmark_node *child); - - cmark_parser *cmark_parser_new(); - - void cmark_parser_free(cmark_parser *parser); - - cmark_node *cmark_parser_finish(cmark_parser *parser); - - void cmark_parser_feed(cmark_parser *parser, const char *buffer, size_t len); - - cmark_node *cmark_parse_document(const char *buffer, size_t len); - - char *cmark_render_ast(cmark_node *root); - - char *cmark_render_html(cmark_node *root); - - ]] - -local inp = io.read("*all") -local doc = cmark.cmark_parse_document(inp, string.len(inp)) - -local cur = doc -local next -local child - -local walk = function(action) - level = 0 - while cur ~= nil do - action(cur, level) - child = cmark.cmark_node_first_child(cur) - if child == nil then - next = cmark.cmark_node_next(cur) - while next == nil do - cur = cmark.cmark_node_parent(cur) - level = level - 1 - if cur == nil then - break - else - next = cmark.cmark_node_next(cur) - end - end - cur = next - else - level = level + 1 - cur = child - end - end -end - -local type_table = { - 'BLOCK_QUOTE', - 'LIST', - 'LIST_ITEM', - 'CODE_BLOCK', - 'HTML', - 'PARAGRAPH', - 'HEADER', - 'HRULE', - 'REFERENCE_DEF', - 'TEXT', - 'SOFTBREAK', - 'LINEBREAK', - 'INLINE_CODE', - 'INLINE_HTML', - 'EMPH', - 'STRONG', - 'LINK', - 'IMAGE', -} -type_table[0] = 'DOCUMENT' - -local function print_type(node, level) - local t = tonumber(cmark.cmark_node_get_type(node)) - io.write(string.rep(' ', level) .. type_table[t]) - if t == cmark.CMARK_NODE_TEXT then - io.write(' ' .. ffi.string(cmark.cmark_node_get_string_content(node))) - end - io.write('\n') -end - -walk(print_type) - --- local html = ffi.string(cmark.cmark_render_html(doc)) --- print(html) diff --git a/outside/commonmark/wrapper.py b/outside/commonmark/wrapper.py deleted file mode 100755 index 52cbfc75a..000000000 --- a/outside/commonmark/wrapper.py +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env python - -# Example for using the shared library from python - -from ctypes import CDLL, c_char_p, c_long -import sys -import platform - -sysname = platform.system() - -if sysname == 'Darwin': - cmark = CDLL("build/src/libcmark.dylib") -else: - cmark = CDLL("build/src/libcmark.so") - -markdown = cmark.cmark_markdown_to_html -markdown.restype = c_char_p -markdown.argtypes = [c_char_p, c_long] - -def md2html(text): - return markdown(text, len(text)) - -sys.stdout.write(md2html(sys.stdin.read())) diff --git a/outside/commonmark/wrapper.rb b/outside/commonmark/wrapper.rb deleted file mode 100755 index 59a9b8756..000000000 --- a/outside/commonmark/wrapper.rb +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env ruby -require 'ffi' - -module CMark - extend FFI::Library - ffi_lib ['libcmark', 'cmark'] - attach_function :cmark_markdown_to_html, [:string, :int], :string -end - -def markdown_to_html(s) - len = s.bytesize - CMark::cmark_markdown_to_html(s, len) -end - -STDOUT.write(markdown_to_html(ARGF.read())) diff --git a/outside/ed25519/.gitignore b/outside/ed25519/.gitignore deleted file mode 100644 index 9c8cd8d8b..000000000 --- a/outside/ed25519/.gitignore +++ /dev/null @@ -1 +0,0 @@ -ed25519.a diff --git a/outside/ed25519/Makefile b/outside/ed25519/Makefile deleted file mode 100644 index c276c8ecb..000000000 --- a/outside/ed25519/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -# A simple makefile. -# -CFLAGS= -O2 -g -Wall - -.c.o: - $(CC) -c $(CFLAGS) -o $@ $< - -OFILES=\ - src/add_scalar.o \ - src/fe.o \ - src/ge.o \ - src/key_exchange.o \ - src/keypair.o \ - src/sc.o \ - src/seed.o \ - src/sha512.o \ - src/sign.o \ - src/verify.o - -all: ed25519.a($(OFILES)) - -clean: - -rm -f $(OFILES) ed25519.a diff --git a/outside/ed25519/readme.md b/outside/ed25519/readme.md deleted file mode 100644 index b20289277..000000000 --- a/outside/ed25519/readme.md +++ /dev/null @@ -1,165 +0,0 @@ -Ed25519 -======= - -This is a portable implementation of [Ed25519](http://ed25519.cr.yp.to/) based -on the SUPERCOP "ref10" implementation. Additionally there is key exchanging -and scalar addition included to further aid building a PKI using Ed25519. All -code is in the public domain. - -All code is pure ANSI C without any dependencies, except for the random seed -generation which uses standard OS cryptography APIs (`CryptGenRandom` on -Windows, `/dev/urandom` on nix). If you wish to be entirely portable define -`ED25519_NO_SEED`. This disables the `ed25519_create_seed` function, so if your -application requires key generation you must supply your own seeding function -(which is simply a 256 bit (32 byte) cryptographic random number generator). - - -Performance ------------ - -On a Windows machine with an Intel Pentium B970 @ 2.3GHz I got the following -speeds (running on only one a single core): - - Seed generation: 64us (15625 per second) - Key generation: 88us (11364 per second) - Message signing (short message): 87us (11494 per second) - Message verifying (short message): 228us (4386 per second) - Scalar addition: 100us (10000 per second) - Key exchange: 220us (4545 per second) - -The speeds on other machines may vary. Sign/verify times will be higher with -longer messages. The implementation significantly benefits from 64 bit -architectures, if possible compile as 64 bit. - - -Usage ------ - -Simply add all .c and .h files in the `src/` folder to your project and include -`ed25519.h` in any file you want to use the API. If you prefer to use a shared -library, only copy `ed25519.h` and define `ED25519_DLL` before importing. A -windows DLL is pre-built. - -There are no defined types for seeds, private keys, public keys, shared secrets -or signatures. Instead simple `unsigned char` buffers are used with the -following sizes: - -```c -unsigned char seed[32]; -unsigned char signature[64]; -unsigned char public_key[32]; -unsigned char private_key[64]; -unsigned char scalar[32]; -unsigned char shared_secret[32]; -``` - -API ---- - -```c -int ed25519_create_seed(unsigned char *seed); -``` - -Creates a 32 byte random seed in `seed` for key generation. `seed` must be a -writable 32 byte buffer. Returns 0 on success, and nonzero on failure. - -```c -void ed25519_create_keypair(unsigned char *public_key, unsigned char *private_key, const unsigned char *seed); -``` - -Creates a new key pair from the given seed. `public_key` must be a writable 32 -byte buffer, `private_key` must be a writable 64 byte buffer and `seed` must be -a 32 byte buffer. - -```c -void ed25519_sign(unsigned char *signature, - const unsigned char *message, size_t message_len, - const unsigned char *public_key, const unsigned char *private_key); -``` - -Creates a signature of the given message with the given key pair. `signature` -must be a writable 64 byte buffer. `message` must have at least `message_len` -bytes to be read. - -```c -int ed25519_verify(const unsigned char *signature, - const unsigned char *message, size_t message_len, - const unsigned char *public_key); -``` - -Verifies the signature on the given message using `public_key`. `signature` -must be a readable 64 byte buffer. `message` must have at least `message_len` -bytes to be read. Returns 1 if the signature matches, 0 otherwise. - -```c -void ed25519_add_scalar(unsigned char *public_key, unsigned char *private_key, - const unsigned char *scalar); -``` - -Adds `scalar` to the given key pair where scalar is a 32 byte buffer (possibly -generated with `ed25519_create_seed`), generating a new key pair. You can -calculate the public key sum without knowing the private key and vice versa by -passing in `NULL` for the key you don't know. This is useful for enforcing -randomness on a key pair by a third party while only knowing the public key, -among other things. Warning: the last bit of the scalar is ignored - if -comparing scalars make sure to clear it with `scalar[31] &= 127`. - - -```c -void ed25519_key_exchange(unsigned char *shared_secret, - const unsigned char *public_key, const unsigned char *private_key); -``` - -Performs a key exchange on the given public key and private key, producing a -shared secret. It is recommended to hash the shared secret before using it. -`shared_secret` must be a 32 byte writable buffer where the shared secret will -be stored. - -Example -------- - -```c -unsigned char seed[32], public_key[32], private_key[64], signature[64]; -unsigned char other_public_key[32], other_private_key[64], shared_secret[32]; -const unsigned char message[] = "TEST MESSAGE"; - -/* create a random seed, and a key pair out of that seed */ -if (ed25519_create_seed(seed)) { - printf("error while generating seed\n"); - exit(1); -} - -ed25519_create_keypair(public_key, private_key, seed); - -/* create signature on the message with the key pair */ -ed25519_sign(signature, message, strlen(message), public_key, private_key); - -/* verify the signature */ -if (ed25519_verify(signature, message, strlen(message), public_key)) { - printf("valid signature\n"); -} else { - printf("invalid signature\n"); -} - -/* create a dummy keypair to use for a key exchange, normally you'd only have -the public key and receive it through some communication channel */ -if (ed25519_create_seed(seed)) { - printf("error while generating seed\n"); - exit(1); -} - -ed25519_create_keypair(other_public_key, other_private_key, seed); - -/* do a key exchange with other_public_key */ -ed25519_key_exchange(shared_secret, other_public_key, private_key); - -/* - the magic here is that ed25519_key_exchange(shared_secret, public_key, - other_private_key); would result in the same shared_secret -*/ - -``` - -License -------- -All code is in the public domain. diff --git a/outside/ed25519/src/add_scalar.c b/outside/ed25519/src/add_scalar.c deleted file mode 100644 index 262ec7251..000000000 --- a/outside/ed25519/src/add_scalar.c +++ /dev/null @@ -1,56 +0,0 @@ -#include "ed25519.h" -#include "ge.h" -#include "sc.h" - - -/* see http://crypto.stackexchange.com/a/6215/4697 */ -void ed25519_add_scalar(unsigned char *public_key, unsigned char *private_key, const unsigned char *scalar) { - const unsigned char SC_1[32] = {1}; /* scalar with value 1 */ - - unsigned char n[32]; - ge_p3 nB; - ge_p1p1 A_p1p1; - ge_p3 A; - ge_p3 public_key_unpacked; - ge_cached T; - - int i; - - /* copy the scalar and clear highest bit */ - for (i = 0; i < 31; ++i) { - n[i] = scalar[i]; - } - n[31] = scalar[31] & 127; - - /* private key: a = n + t */ - if (private_key) { - sc_muladd(private_key, SC_1, n, private_key); - } - - /* public key: A = nB + T */ - if (public_key) { - /* if we know the private key we don't need a point addition, which is faster */ - /* using a "timing attack" you could find out wether or not we know the private - key, but this information seems rather useless - if this is important pass - public_key and private_key seperately in 2 function calls */ - if (private_key) { - ge_scalarmult_base(&A, private_key); - } else { - /* unpack public key into T */ - ge_frombytes_negate_vartime(&public_key_unpacked, public_key); - fe_neg(public_key_unpacked.X, public_key_unpacked.X); // undo negate - fe_neg(public_key_unpacked.T, public_key_unpacked.T); // undo negate - ge_p3_to_cached(&T, &public_key_unpacked); - - /* calculate n*B */ - ge_scalarmult_base(&nB, n); - - /* A = n*B + T */ - ge_add(&A_p1p1, &nB, &T); - ge_p1p1_to_p3(&A, &A_p1p1); - } - - /* pack public key */ - ge_p3_tobytes(public_key, &A); - } -} diff --git a/outside/ed25519/src/ed25519.h b/outside/ed25519/src/ed25519.h deleted file mode 100644 index bb34f893a..000000000 --- a/outside/ed25519/src/ed25519.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef ED25519_H -#define ED25519_H - -#include - -#if defined(_WIN32) - #if defined(ED25519_BUILD_DLL) - #define ED25519_DECLSPEC __declspec(dllexport) - #elif defined(ED25519_DLL) - #define ED25519_DECLSPEC __declspec(dllimport) - #else - #define ED25519_DECLSPEC - #endif -#else - #define ED25519_DECLSPEC -#endif - - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef ED25519_NO_SEED -int ED25519_DECLSPEC ed25519_create_seed(unsigned char *seed); -#endif - -void ED25519_DECLSPEC ed25519_create_keypair(unsigned char *public_key, unsigned char *private_key, const unsigned char *seed); -void ED25519_DECLSPEC ed25519_sign(unsigned char *signature, const unsigned char *message, size_t message_len, const unsigned char *public_key, const unsigned char *private_key); -int ED25519_DECLSPEC ed25519_verify(const unsigned char *signature, const unsigned char *message, size_t message_len, const unsigned char *private_key); -void ED25519_DECLSPEC ed25519_add_scalar(unsigned char *public_key, unsigned char *private_key, const unsigned char *scalar); -void ED25519_DECLSPEC ed25519_key_exchange(unsigned char *shared_secret, const unsigned char *public_key, const unsigned char *private_key); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/outside/ed25519/src/fe.c b/outside/ed25519/src/fe.c deleted file mode 100644 index 448e3e920..000000000 --- a/outside/ed25519/src/fe.c +++ /dev/null @@ -1,1491 +0,0 @@ -#include "fixedint.h" -#include "fe.h" - - -/* - helper functions -*/ -static uint64_t load_3(const unsigned char *in) { - uint64_t result; - - result = (uint64_t) in[0]; - result |= ((uint64_t) in[1]) << 8; - result |= ((uint64_t) in[2]) << 16; - - return result; -} - -static uint64_t load_4(const unsigned char *in) { - uint64_t result; - - result = (uint64_t) in[0]; - result |= ((uint64_t) in[1]) << 8; - result |= ((uint64_t) in[2]) << 16; - result |= ((uint64_t) in[3]) << 24; - - return result; -} - - - -/* - h = 0 -*/ - -void fe_0(fe h) { - h[0] = 0; - h[1] = 0; - h[2] = 0; - h[3] = 0; - h[4] = 0; - h[5] = 0; - h[6] = 0; - h[7] = 0; - h[8] = 0; - h[9] = 0; -} - - - -/* - h = 1 -*/ - -void fe_1(fe h) { - h[0] = 1; - h[1] = 0; - h[2] = 0; - h[3] = 0; - h[4] = 0; - h[5] = 0; - h[6] = 0; - h[7] = 0; - h[8] = 0; - h[9] = 0; -} - - - -/* - h = f + g - Can overlap h with f or g. - - Preconditions: - |f| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. - |g| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. - - Postconditions: - |h| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc. -*/ - -void fe_add(fe h, const fe f, const fe g) { - int32_t f0 = f[0]; - int32_t f1 = f[1]; - int32_t f2 = f[2]; - int32_t f3 = f[3]; - int32_t f4 = f[4]; - int32_t f5 = f[5]; - int32_t f6 = f[6]; - int32_t f7 = f[7]; - int32_t f8 = f[8]; - int32_t f9 = f[9]; - int32_t g0 = g[0]; - int32_t g1 = g[1]; - int32_t g2 = g[2]; - int32_t g3 = g[3]; - int32_t g4 = g[4]; - int32_t g5 = g[5]; - int32_t g6 = g[6]; - int32_t g7 = g[7]; - int32_t g8 = g[8]; - int32_t g9 = g[9]; - int32_t h0 = f0 + g0; - int32_t h1 = f1 + g1; - int32_t h2 = f2 + g2; - int32_t h3 = f3 + g3; - int32_t h4 = f4 + g4; - int32_t h5 = f5 + g5; - int32_t h6 = f6 + g6; - int32_t h7 = f7 + g7; - int32_t h8 = f8 + g8; - int32_t h9 = f9 + g9; - - h[0] = h0; - h[1] = h1; - h[2] = h2; - h[3] = h3; - h[4] = h4; - h[5] = h5; - h[6] = h6; - h[7] = h7; - h[8] = h8; - h[9] = h9; -} - - - -/* - Replace (f,g) with (g,g) if b == 1; - replace (f,g) with (f,g) if b == 0. - - Preconditions: b in {0,1}. -*/ - -void fe_cmov(fe f, const fe g, unsigned int b) { - int32_t f0 = f[0]; - int32_t f1 = f[1]; - int32_t f2 = f[2]; - int32_t f3 = f[3]; - int32_t f4 = f[4]; - int32_t f5 = f[5]; - int32_t f6 = f[6]; - int32_t f7 = f[7]; - int32_t f8 = f[8]; - int32_t f9 = f[9]; - int32_t g0 = g[0]; - int32_t g1 = g[1]; - int32_t g2 = g[2]; - int32_t g3 = g[3]; - int32_t g4 = g[4]; - int32_t g5 = g[5]; - int32_t g6 = g[6]; - int32_t g7 = g[7]; - int32_t g8 = g[8]; - int32_t g9 = g[9]; - int32_t x0 = f0 ^ g0; - int32_t x1 = f1 ^ g1; - int32_t x2 = f2 ^ g2; - int32_t x3 = f3 ^ g3; - int32_t x4 = f4 ^ g4; - int32_t x5 = f5 ^ g5; - int32_t x6 = f6 ^ g6; - int32_t x7 = f7 ^ g7; - int32_t x8 = f8 ^ g8; - int32_t x9 = f9 ^ g9; - - b = (unsigned int) (- (int) b); /* silence warning */ - x0 &= b; - x1 &= b; - x2 &= b; - x3 &= b; - x4 &= b; - x5 &= b; - x6 &= b; - x7 &= b; - x8 &= b; - x9 &= b; - - f[0] = f0 ^ x0; - f[1] = f1 ^ x1; - f[2] = f2 ^ x2; - f[3] = f3 ^ x3; - f[4] = f4 ^ x4; - f[5] = f5 ^ x5; - f[6] = f6 ^ x6; - f[7] = f7 ^ x7; - f[8] = f8 ^ x8; - f[9] = f9 ^ x9; -} - -/* - Replace (f,g) with (g,f) if b == 1; - replace (f,g) with (f,g) if b == 0. - - Preconditions: b in {0,1}. -*/ - -void fe_cswap(fe f,fe g,unsigned int b) { - int32_t f0 = f[0]; - int32_t f1 = f[1]; - int32_t f2 = f[2]; - int32_t f3 = f[3]; - int32_t f4 = f[4]; - int32_t f5 = f[5]; - int32_t f6 = f[6]; - int32_t f7 = f[7]; - int32_t f8 = f[8]; - int32_t f9 = f[9]; - int32_t g0 = g[0]; - int32_t g1 = g[1]; - int32_t g2 = g[2]; - int32_t g3 = g[3]; - int32_t g4 = g[4]; - int32_t g5 = g[5]; - int32_t g6 = g[6]; - int32_t g7 = g[7]; - int32_t g8 = g[8]; - int32_t g9 = g[9]; - int32_t x0 = f0 ^ g0; - int32_t x1 = f1 ^ g1; - int32_t x2 = f2 ^ g2; - int32_t x3 = f3 ^ g3; - int32_t x4 = f4 ^ g4; - int32_t x5 = f5 ^ g5; - int32_t x6 = f6 ^ g6; - int32_t x7 = f7 ^ g7; - int32_t x8 = f8 ^ g8; - int32_t x9 = f9 ^ g9; - b = -b; - x0 &= b; - x1 &= b; - x2 &= b; - x3 &= b; - x4 &= b; - x5 &= b; - x6 &= b; - x7 &= b; - x8 &= b; - x9 &= b; - f[0] = f0 ^ x0; - f[1] = f1 ^ x1; - f[2] = f2 ^ x2; - f[3] = f3 ^ x3; - f[4] = f4 ^ x4; - f[5] = f5 ^ x5; - f[6] = f6 ^ x6; - f[7] = f7 ^ x7; - f[8] = f8 ^ x8; - f[9] = f9 ^ x9; - g[0] = g0 ^ x0; - g[1] = g1 ^ x1; - g[2] = g2 ^ x2; - g[3] = g3 ^ x3; - g[4] = g4 ^ x4; - g[5] = g5 ^ x5; - g[6] = g6 ^ x6; - g[7] = g7 ^ x7; - g[8] = g8 ^ x8; - g[9] = g9 ^ x9; -} - - - -/* - h = f -*/ - -void fe_copy(fe h, const fe f) { - int32_t f0 = f[0]; - int32_t f1 = f[1]; - int32_t f2 = f[2]; - int32_t f3 = f[3]; - int32_t f4 = f[4]; - int32_t f5 = f[5]; - int32_t f6 = f[6]; - int32_t f7 = f[7]; - int32_t f8 = f[8]; - int32_t f9 = f[9]; - - h[0] = f0; - h[1] = f1; - h[2] = f2; - h[3] = f3; - h[4] = f4; - h[5] = f5; - h[6] = f6; - h[7] = f7; - h[8] = f8; - h[9] = f9; -} - - - -/* - Ignores top bit of h. -*/ - -void fe_frombytes(fe h, const unsigned char *s) { - int64_t h0 = load_4(s); - int64_t h1 = load_3(s + 4) << 6; - int64_t h2 = load_3(s + 7) << 5; - int64_t h3 = load_3(s + 10) << 3; - int64_t h4 = load_3(s + 13) << 2; - int64_t h5 = load_4(s + 16); - int64_t h6 = load_3(s + 20) << 7; - int64_t h7 = load_3(s + 23) << 5; - int64_t h8 = load_3(s + 26) << 4; - int64_t h9 = (load_3(s + 29) & 8388607) << 2; - int64_t carry0; - int64_t carry1; - int64_t carry2; - int64_t carry3; - int64_t carry4; - int64_t carry5; - int64_t carry6; - int64_t carry7; - int64_t carry8; - int64_t carry9; - - carry9 = (h9 + (int64_t) (1 << 24)) >> 25; - h0 += carry9 * 19; - h9 -= carry9 << 25; - carry1 = (h1 + (int64_t) (1 << 24)) >> 25; - h2 += carry1; - h1 -= carry1 << 25; - carry3 = (h3 + (int64_t) (1 << 24)) >> 25; - h4 += carry3; - h3 -= carry3 << 25; - carry5 = (h5 + (int64_t) (1 << 24)) >> 25; - h6 += carry5; - h5 -= carry5 << 25; - carry7 = (h7 + (int64_t) (1 << 24)) >> 25; - h8 += carry7; - h7 -= carry7 << 25; - carry0 = (h0 + (int64_t) (1 << 25)) >> 26; - h1 += carry0; - h0 -= carry0 << 26; - carry2 = (h2 + (int64_t) (1 << 25)) >> 26; - h3 += carry2; - h2 -= carry2 << 26; - carry4 = (h4 + (int64_t) (1 << 25)) >> 26; - h5 += carry4; - h4 -= carry4 << 26; - carry6 = (h6 + (int64_t) (1 << 25)) >> 26; - h7 += carry6; - h6 -= carry6 << 26; - carry8 = (h8 + (int64_t) (1 << 25)) >> 26; - h9 += carry8; - h8 -= carry8 << 26; - - h[0] = (int32_t) h0; - h[1] = (int32_t) h1; - h[2] = (int32_t) h2; - h[3] = (int32_t) h3; - h[4] = (int32_t) h4; - h[5] = (int32_t) h5; - h[6] = (int32_t) h6; - h[7] = (int32_t) h7; - h[8] = (int32_t) h8; - h[9] = (int32_t) h9; -} - - - -void fe_invert(fe out, const fe z) { - fe t0; - fe t1; - fe t2; - fe t3; - int i; - - fe_sq(t0, z); - - for (i = 1; i < 1; ++i) { - fe_sq(t0, t0); - } - - fe_sq(t1, t0); - - for (i = 1; i < 2; ++i) { - fe_sq(t1, t1); - } - - fe_mul(t1, z, t1); - fe_mul(t0, t0, t1); - fe_sq(t2, t0); - - for (i = 1; i < 1; ++i) { - fe_sq(t2, t2); - } - - fe_mul(t1, t1, t2); - fe_sq(t2, t1); - - for (i = 1; i < 5; ++i) { - fe_sq(t2, t2); - } - - fe_mul(t1, t2, t1); - fe_sq(t2, t1); - - for (i = 1; i < 10; ++i) { - fe_sq(t2, t2); - } - - fe_mul(t2, t2, t1); - fe_sq(t3, t2); - - for (i = 1; i < 20; ++i) { - fe_sq(t3, t3); - } - - fe_mul(t2, t3, t2); - fe_sq(t2, t2); - - for (i = 1; i < 10; ++i) { - fe_sq(t2, t2); - } - - fe_mul(t1, t2, t1); - fe_sq(t2, t1); - - for (i = 1; i < 50; ++i) { - fe_sq(t2, t2); - } - - fe_mul(t2, t2, t1); - fe_sq(t3, t2); - - for (i = 1; i < 100; ++i) { - fe_sq(t3, t3); - } - - fe_mul(t2, t3, t2); - fe_sq(t2, t2); - - for (i = 1; i < 50; ++i) { - fe_sq(t2, t2); - } - - fe_mul(t1, t2, t1); - fe_sq(t1, t1); - - for (i = 1; i < 5; ++i) { - fe_sq(t1, t1); - } - - fe_mul(out, t1, t0); -} - - - -/* - return 1 if f is in {1,3,5,...,q-2} - return 0 if f is in {0,2,4,...,q-1} - - Preconditions: - |f| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc. -*/ - -int fe_isnegative(const fe f) { - unsigned char s[32]; - - fe_tobytes(s, f); - - return s[0] & 1; -} - - - -/* - return 1 if f == 0 - return 0 if f != 0 - - Preconditions: - |f| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc. -*/ - -int fe_isnonzero(const fe f) { - unsigned char s[32]; - unsigned char r; - - fe_tobytes(s, f); - - r = s[0]; - #define F(i) r |= s[i] - F(1); - F(2); - F(3); - F(4); - F(5); - F(6); - F(7); - F(8); - F(9); - F(10); - F(11); - F(12); - F(13); - F(14); - F(15); - F(16); - F(17); - F(18); - F(19); - F(20); - F(21); - F(22); - F(23); - F(24); - F(25); - F(26); - F(27); - F(28); - F(29); - F(30); - F(31); - #undef F - - return r != 0; -} - - - -/* - h = f * g - Can overlap h with f or g. - - Preconditions: - |f| bounded by 1.65*2^26,1.65*2^25,1.65*2^26,1.65*2^25,etc. - |g| bounded by 1.65*2^26,1.65*2^25,1.65*2^26,1.65*2^25,etc. - - Postconditions: - |h| bounded by 1.01*2^25,1.01*2^24,1.01*2^25,1.01*2^24,etc. - */ - - /* - Notes on implementation strategy: - - Using schoolbook multiplication. - Karatsuba would save a little in some cost models. - - Most multiplications by 2 and 19 are 32-bit precomputations; - cheaper than 64-bit postcomputations. - - There is one remaining multiplication by 19 in the carry chain; - one *19 precomputation can be merged into this, - but the resulting data flow is considerably less clean. - - There are 12 carries below. - 10 of them are 2-way parallelizable and vectorizable. - Can get away with 11 carries, but then data flow is much deeper. - - With tighter constraints on inputs can squeeze carries into int32. -*/ - -void fe_mul(fe h, const fe f, const fe g) { - int32_t f0 = f[0]; - int32_t f1 = f[1]; - int32_t f2 = f[2]; - int32_t f3 = f[3]; - int32_t f4 = f[4]; - int32_t f5 = f[5]; - int32_t f6 = f[6]; - int32_t f7 = f[7]; - int32_t f8 = f[8]; - int32_t f9 = f[9]; - int32_t g0 = g[0]; - int32_t g1 = g[1]; - int32_t g2 = g[2]; - int32_t g3 = g[3]; - int32_t g4 = g[4]; - int32_t g5 = g[5]; - int32_t g6 = g[6]; - int32_t g7 = g[7]; - int32_t g8 = g[8]; - int32_t g9 = g[9]; - int32_t g1_19 = 19 * g1; /* 1.959375*2^29 */ - int32_t g2_19 = 19 * g2; /* 1.959375*2^30; still ok */ - int32_t g3_19 = 19 * g3; - int32_t g4_19 = 19 * g4; - int32_t g5_19 = 19 * g5; - int32_t g6_19 = 19 * g6; - int32_t g7_19 = 19 * g7; - int32_t g8_19 = 19 * g8; - int32_t g9_19 = 19 * g9; - int32_t f1_2 = 2 * f1; - int32_t f3_2 = 2 * f3; - int32_t f5_2 = 2 * f5; - int32_t f7_2 = 2 * f7; - int32_t f9_2 = 2 * f9; - int64_t f0g0 = f0 * (int64_t) g0; - int64_t f0g1 = f0 * (int64_t) g1; - int64_t f0g2 = f0 * (int64_t) g2; - int64_t f0g3 = f0 * (int64_t) g3; - int64_t f0g4 = f0 * (int64_t) g4; - int64_t f0g5 = f0 * (int64_t) g5; - int64_t f0g6 = f0 * (int64_t) g6; - int64_t f0g7 = f0 * (int64_t) g7; - int64_t f0g8 = f0 * (int64_t) g8; - int64_t f0g9 = f0 * (int64_t) g9; - int64_t f1g0 = f1 * (int64_t) g0; - int64_t f1g1_2 = f1_2 * (int64_t) g1; - int64_t f1g2 = f1 * (int64_t) g2; - int64_t f1g3_2 = f1_2 * (int64_t) g3; - int64_t f1g4 = f1 * (int64_t) g4; - int64_t f1g5_2 = f1_2 * (int64_t) g5; - int64_t f1g6 = f1 * (int64_t) g6; - int64_t f1g7_2 = f1_2 * (int64_t) g7; - int64_t f1g8 = f1 * (int64_t) g8; - int64_t f1g9_38 = f1_2 * (int64_t) g9_19; - int64_t f2g0 = f2 * (int64_t) g0; - int64_t f2g1 = f2 * (int64_t) g1; - int64_t f2g2 = f2 * (int64_t) g2; - int64_t f2g3 = f2 * (int64_t) g3; - int64_t f2g4 = f2 * (int64_t) g4; - int64_t f2g5 = f2 * (int64_t) g5; - int64_t f2g6 = f2 * (int64_t) g6; - int64_t f2g7 = f2 * (int64_t) g7; - int64_t f2g8_19 = f2 * (int64_t) g8_19; - int64_t f2g9_19 = f2 * (int64_t) g9_19; - int64_t f3g0 = f3 * (int64_t) g0; - int64_t f3g1_2 = f3_2 * (int64_t) g1; - int64_t f3g2 = f3 * (int64_t) g2; - int64_t f3g3_2 = f3_2 * (int64_t) g3; - int64_t f3g4 = f3 * (int64_t) g4; - int64_t f3g5_2 = f3_2 * (int64_t) g5; - int64_t f3g6 = f3 * (int64_t) g6; - int64_t f3g7_38 = f3_2 * (int64_t) g7_19; - int64_t f3g8_19 = f3 * (int64_t) g8_19; - int64_t f3g9_38 = f3_2 * (int64_t) g9_19; - int64_t f4g0 = f4 * (int64_t) g0; - int64_t f4g1 = f4 * (int64_t) g1; - int64_t f4g2 = f4 * (int64_t) g2; - int64_t f4g3 = f4 * (int64_t) g3; - int64_t f4g4 = f4 * (int64_t) g4; - int64_t f4g5 = f4 * (int64_t) g5; - int64_t f4g6_19 = f4 * (int64_t) g6_19; - int64_t f4g7_19 = f4 * (int64_t) g7_19; - int64_t f4g8_19 = f4 * (int64_t) g8_19; - int64_t f4g9_19 = f4 * (int64_t) g9_19; - int64_t f5g0 = f5 * (int64_t) g0; - int64_t f5g1_2 = f5_2 * (int64_t) g1; - int64_t f5g2 = f5 * (int64_t) g2; - int64_t f5g3_2 = f5_2 * (int64_t) g3; - int64_t f5g4 = f5 * (int64_t) g4; - int64_t f5g5_38 = f5_2 * (int64_t) g5_19; - int64_t f5g6_19 = f5 * (int64_t) g6_19; - int64_t f5g7_38 = f5_2 * (int64_t) g7_19; - int64_t f5g8_19 = f5 * (int64_t) g8_19; - int64_t f5g9_38 = f5_2 * (int64_t) g9_19; - int64_t f6g0 = f6 * (int64_t) g0; - int64_t f6g1 = f6 * (int64_t) g1; - int64_t f6g2 = f6 * (int64_t) g2; - int64_t f6g3 = f6 * (int64_t) g3; - int64_t f6g4_19 = f6 * (int64_t) g4_19; - int64_t f6g5_19 = f6 * (int64_t) g5_19; - int64_t f6g6_19 = f6 * (int64_t) g6_19; - int64_t f6g7_19 = f6 * (int64_t) g7_19; - int64_t f6g8_19 = f6 * (int64_t) g8_19; - int64_t f6g9_19 = f6 * (int64_t) g9_19; - int64_t f7g0 = f7 * (int64_t) g0; - int64_t f7g1_2 = f7_2 * (int64_t) g1; - int64_t f7g2 = f7 * (int64_t) g2; - int64_t f7g3_38 = f7_2 * (int64_t) g3_19; - int64_t f7g4_19 = f7 * (int64_t) g4_19; - int64_t f7g5_38 = f7_2 * (int64_t) g5_19; - int64_t f7g6_19 = f7 * (int64_t) g6_19; - int64_t f7g7_38 = f7_2 * (int64_t) g7_19; - int64_t f7g8_19 = f7 * (int64_t) g8_19; - int64_t f7g9_38 = f7_2 * (int64_t) g9_19; - int64_t f8g0 = f8 * (int64_t) g0; - int64_t f8g1 = f8 * (int64_t) g1; - int64_t f8g2_19 = f8 * (int64_t) g2_19; - int64_t f8g3_19 = f8 * (int64_t) g3_19; - int64_t f8g4_19 = f8 * (int64_t) g4_19; - int64_t f8g5_19 = f8 * (int64_t) g5_19; - int64_t f8g6_19 = f8 * (int64_t) g6_19; - int64_t f8g7_19 = f8 * (int64_t) g7_19; - int64_t f8g8_19 = f8 * (int64_t) g8_19; - int64_t f8g9_19 = f8 * (int64_t) g9_19; - int64_t f9g0 = f9 * (int64_t) g0; - int64_t f9g1_38 = f9_2 * (int64_t) g1_19; - int64_t f9g2_19 = f9 * (int64_t) g2_19; - int64_t f9g3_38 = f9_2 * (int64_t) g3_19; - int64_t f9g4_19 = f9 * (int64_t) g4_19; - int64_t f9g5_38 = f9_2 * (int64_t) g5_19; - int64_t f9g6_19 = f9 * (int64_t) g6_19; - int64_t f9g7_38 = f9_2 * (int64_t) g7_19; - int64_t f9g8_19 = f9 * (int64_t) g8_19; - int64_t f9g9_38 = f9_2 * (int64_t) g9_19; - int64_t h0 = f0g0 + f1g9_38 + f2g8_19 + f3g7_38 + f4g6_19 + f5g5_38 + f6g4_19 + f7g3_38 + f8g2_19 + f9g1_38; - int64_t h1 = f0g1 + f1g0 + f2g9_19 + f3g8_19 + f4g7_19 + f5g6_19 + f6g5_19 + f7g4_19 + f8g3_19 + f9g2_19; - int64_t h2 = f0g2 + f1g1_2 + f2g0 + f3g9_38 + f4g8_19 + f5g7_38 + f6g6_19 + f7g5_38 + f8g4_19 + f9g3_38; - int64_t h3 = f0g3 + f1g2 + f2g1 + f3g0 + f4g9_19 + f5g8_19 + f6g7_19 + f7g6_19 + f8g5_19 + f9g4_19; - int64_t h4 = f0g4 + f1g3_2 + f2g2 + f3g1_2 + f4g0 + f5g9_38 + f6g8_19 + f7g7_38 + f8g6_19 + f9g5_38; - int64_t h5 = f0g5 + f1g4 + f2g3 + f3g2 + f4g1 + f5g0 + f6g9_19 + f7g8_19 + f8g7_19 + f9g6_19; - int64_t h6 = f0g6 + f1g5_2 + f2g4 + f3g3_2 + f4g2 + f5g1_2 + f6g0 + f7g9_38 + f8g8_19 + f9g7_38; - int64_t h7 = f0g7 + f1g6 + f2g5 + f3g4 + f4g3 + f5g2 + f6g1 + f7g0 + f8g9_19 + f9g8_19; - int64_t h8 = f0g8 + f1g7_2 + f2g6 + f3g5_2 + f4g4 + f5g3_2 + f6g2 + f7g1_2 + f8g0 + f9g9_38; - int64_t h9 = f0g9 + f1g8 + f2g7 + f3g6 + f4g5 + f5g4 + f6g3 + f7g2 + f8g1 + f9g0 ; - int64_t carry0; - int64_t carry1; - int64_t carry2; - int64_t carry3; - int64_t carry4; - int64_t carry5; - int64_t carry6; - int64_t carry7; - int64_t carry8; - int64_t carry9; - - carry0 = (h0 + (int64_t) (1 << 25)) >> 26; - h1 += carry0; - h0 -= carry0 << 26; - carry4 = (h4 + (int64_t) (1 << 25)) >> 26; - h5 += carry4; - h4 -= carry4 << 26; - - carry1 = (h1 + (int64_t) (1 << 24)) >> 25; - h2 += carry1; - h1 -= carry1 << 25; - carry5 = (h5 + (int64_t) (1 << 24)) >> 25; - h6 += carry5; - h5 -= carry5 << 25; - - carry2 = (h2 + (int64_t) (1 << 25)) >> 26; - h3 += carry2; - h2 -= carry2 << 26; - carry6 = (h6 + (int64_t) (1 << 25)) >> 26; - h7 += carry6; - h6 -= carry6 << 26; - - carry3 = (h3 + (int64_t) (1 << 24)) >> 25; - h4 += carry3; - h3 -= carry3 << 25; - carry7 = (h7 + (int64_t) (1 << 24)) >> 25; - h8 += carry7; - h7 -= carry7 << 25; - - carry4 = (h4 + (int64_t) (1 << 25)) >> 26; - h5 += carry4; - h4 -= carry4 << 26; - carry8 = (h8 + (int64_t) (1 << 25)) >> 26; - h9 += carry8; - h8 -= carry8 << 26; - - carry9 = (h9 + (int64_t) (1 << 24)) >> 25; - h0 += carry9 * 19; - h9 -= carry9 << 25; - - carry0 = (h0 + (int64_t) (1 << 25)) >> 26; - h1 += carry0; - h0 -= carry0 << 26; - - h[0] = (int32_t) h0; - h[1] = (int32_t) h1; - h[2] = (int32_t) h2; - h[3] = (int32_t) h3; - h[4] = (int32_t) h4; - h[5] = (int32_t) h5; - h[6] = (int32_t) h6; - h[7] = (int32_t) h7; - h[8] = (int32_t) h8; - h[9] = (int32_t) h9; -} - - -/* -h = f * 121666 -Can overlap h with f. - -Preconditions: - |f| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc. - -Postconditions: - |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. -*/ - -void fe_mul121666(fe h, fe f) { - int32_t f0 = f[0]; - int32_t f1 = f[1]; - int32_t f2 = f[2]; - int32_t f3 = f[3]; - int32_t f4 = f[4]; - int32_t f5 = f[5]; - int32_t f6 = f[6]; - int32_t f7 = f[7]; - int32_t f8 = f[8]; - int32_t f9 = f[9]; - int64_t h0 = f0 * (int64_t) 121666; - int64_t h1 = f1 * (int64_t) 121666; - int64_t h2 = f2 * (int64_t) 121666; - int64_t h3 = f3 * (int64_t) 121666; - int64_t h4 = f4 * (int64_t) 121666; - int64_t h5 = f5 * (int64_t) 121666; - int64_t h6 = f6 * (int64_t) 121666; - int64_t h7 = f7 * (int64_t) 121666; - int64_t h8 = f8 * (int64_t) 121666; - int64_t h9 = f9 * (int64_t) 121666; - int64_t carry0; - int64_t carry1; - int64_t carry2; - int64_t carry3; - int64_t carry4; - int64_t carry5; - int64_t carry6; - int64_t carry7; - int64_t carry8; - int64_t carry9; - - carry9 = (h9 + (int64_t) (1<<24)) >> 25; h0 += carry9 * 19; h9 -= carry9 << 25; - carry1 = (h1 + (int64_t) (1<<24)) >> 25; h2 += carry1; h1 -= carry1 << 25; - carry3 = (h3 + (int64_t) (1<<24)) >> 25; h4 += carry3; h3 -= carry3 << 25; - carry5 = (h5 + (int64_t) (1<<24)) >> 25; h6 += carry5; h5 -= carry5 << 25; - carry7 = (h7 + (int64_t) (1<<24)) >> 25; h8 += carry7; h7 -= carry7 << 25; - - carry0 = (h0 + (int64_t) (1<<25)) >> 26; h1 += carry0; h0 -= carry0 << 26; - carry2 = (h2 + (int64_t) (1<<25)) >> 26; h3 += carry2; h2 -= carry2 << 26; - carry4 = (h4 + (int64_t) (1<<25)) >> 26; h5 += carry4; h4 -= carry4 << 26; - carry6 = (h6 + (int64_t) (1<<25)) >> 26; h7 += carry6; h6 -= carry6 << 26; - carry8 = (h8 + (int64_t) (1<<25)) >> 26; h9 += carry8; h8 -= carry8 << 26; - - h[0] = h0; - h[1] = h1; - h[2] = h2; - h[3] = h3; - h[4] = h4; - h[5] = h5; - h[6] = h6; - h[7] = h7; - h[8] = h8; - h[9] = h9; -} - - -/* -h = -f - -Preconditions: - |f| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. - -Postconditions: - |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. -*/ - -void fe_neg(fe h, const fe f) { - int32_t f0 = f[0]; - int32_t f1 = f[1]; - int32_t f2 = f[2]; - int32_t f3 = f[3]; - int32_t f4 = f[4]; - int32_t f5 = f[5]; - int32_t f6 = f[6]; - int32_t f7 = f[7]; - int32_t f8 = f[8]; - int32_t f9 = f[9]; - int32_t h0 = -f0; - int32_t h1 = -f1; - int32_t h2 = -f2; - int32_t h3 = -f3; - int32_t h4 = -f4; - int32_t h5 = -f5; - int32_t h6 = -f6; - int32_t h7 = -f7; - int32_t h8 = -f8; - int32_t h9 = -f9; - - h[0] = h0; - h[1] = h1; - h[2] = h2; - h[3] = h3; - h[4] = h4; - h[5] = h5; - h[6] = h6; - h[7] = h7; - h[8] = h8; - h[9] = h9; -} - - -void fe_pow22523(fe out, const fe z) { - fe t0; - fe t1; - fe t2; - int i; - fe_sq(t0, z); - - for (i = 1; i < 1; ++i) { - fe_sq(t0, t0); - } - - fe_sq(t1, t0); - - for (i = 1; i < 2; ++i) { - fe_sq(t1, t1); - } - - fe_mul(t1, z, t1); - fe_mul(t0, t0, t1); - fe_sq(t0, t0); - - for (i = 1; i < 1; ++i) { - fe_sq(t0, t0); - } - - fe_mul(t0, t1, t0); - fe_sq(t1, t0); - - for (i = 1; i < 5; ++i) { - fe_sq(t1, t1); - } - - fe_mul(t0, t1, t0); - fe_sq(t1, t0); - - for (i = 1; i < 10; ++i) { - fe_sq(t1, t1); - } - - fe_mul(t1, t1, t0); - fe_sq(t2, t1); - - for (i = 1; i < 20; ++i) { - fe_sq(t2, t2); - } - - fe_mul(t1, t2, t1); - fe_sq(t1, t1); - - for (i = 1; i < 10; ++i) { - fe_sq(t1, t1); - } - - fe_mul(t0, t1, t0); - fe_sq(t1, t0); - - for (i = 1; i < 50; ++i) { - fe_sq(t1, t1); - } - - fe_mul(t1, t1, t0); - fe_sq(t2, t1); - - for (i = 1; i < 100; ++i) { - fe_sq(t2, t2); - } - - fe_mul(t1, t2, t1); - fe_sq(t1, t1); - - for (i = 1; i < 50; ++i) { - fe_sq(t1, t1); - } - - fe_mul(t0, t1, t0); - fe_sq(t0, t0); - - for (i = 1; i < 2; ++i) { - fe_sq(t0, t0); - } - - fe_mul(out, t0, z); - return; -} - - -/* -h = f * f -Can overlap h with f. - -Preconditions: - |f| bounded by 1.65*2^26,1.65*2^25,1.65*2^26,1.65*2^25,etc. - -Postconditions: - |h| bounded by 1.01*2^25,1.01*2^24,1.01*2^25,1.01*2^24,etc. -*/ - -/* -See fe_mul.c for discussion of implementation strategy. -*/ - -void fe_sq(fe h, const fe f) { - int32_t f0 = f[0]; - int32_t f1 = f[1]; - int32_t f2 = f[2]; - int32_t f3 = f[3]; - int32_t f4 = f[4]; - int32_t f5 = f[5]; - int32_t f6 = f[6]; - int32_t f7 = f[7]; - int32_t f8 = f[8]; - int32_t f9 = f[9]; - int32_t f0_2 = 2 * f0; - int32_t f1_2 = 2 * f1; - int32_t f2_2 = 2 * f2; - int32_t f3_2 = 2 * f3; - int32_t f4_2 = 2 * f4; - int32_t f5_2 = 2 * f5; - int32_t f6_2 = 2 * f6; - int32_t f7_2 = 2 * f7; - int32_t f5_38 = 38 * f5; /* 1.959375*2^30 */ - int32_t f6_19 = 19 * f6; /* 1.959375*2^30 */ - int32_t f7_38 = 38 * f7; /* 1.959375*2^30 */ - int32_t f8_19 = 19 * f8; /* 1.959375*2^30 */ - int32_t f9_38 = 38 * f9; /* 1.959375*2^30 */ - int64_t f0f0 = f0 * (int64_t) f0; - int64_t f0f1_2 = f0_2 * (int64_t) f1; - int64_t f0f2_2 = f0_2 * (int64_t) f2; - int64_t f0f3_2 = f0_2 * (int64_t) f3; - int64_t f0f4_2 = f0_2 * (int64_t) f4; - int64_t f0f5_2 = f0_2 * (int64_t) f5; - int64_t f0f6_2 = f0_2 * (int64_t) f6; - int64_t f0f7_2 = f0_2 * (int64_t) f7; - int64_t f0f8_2 = f0_2 * (int64_t) f8; - int64_t f0f9_2 = f0_2 * (int64_t) f9; - int64_t f1f1_2 = f1_2 * (int64_t) f1; - int64_t f1f2_2 = f1_2 * (int64_t) f2; - int64_t f1f3_4 = f1_2 * (int64_t) f3_2; - int64_t f1f4_2 = f1_2 * (int64_t) f4; - int64_t f1f5_4 = f1_2 * (int64_t) f5_2; - int64_t f1f6_2 = f1_2 * (int64_t) f6; - int64_t f1f7_4 = f1_2 * (int64_t) f7_2; - int64_t f1f8_2 = f1_2 * (int64_t) f8; - int64_t f1f9_76 = f1_2 * (int64_t) f9_38; - int64_t f2f2 = f2 * (int64_t) f2; - int64_t f2f3_2 = f2_2 * (int64_t) f3; - int64_t f2f4_2 = f2_2 * (int64_t) f4; - int64_t f2f5_2 = f2_2 * (int64_t) f5; - int64_t f2f6_2 = f2_2 * (int64_t) f6; - int64_t f2f7_2 = f2_2 * (int64_t) f7; - int64_t f2f8_38 = f2_2 * (int64_t) f8_19; - int64_t f2f9_38 = f2 * (int64_t) f9_38; - int64_t f3f3_2 = f3_2 * (int64_t) f3; - int64_t f3f4_2 = f3_2 * (int64_t) f4; - int64_t f3f5_4 = f3_2 * (int64_t) f5_2; - int64_t f3f6_2 = f3_2 * (int64_t) f6; - int64_t f3f7_76 = f3_2 * (int64_t) f7_38; - int64_t f3f8_38 = f3_2 * (int64_t) f8_19; - int64_t f3f9_76 = f3_2 * (int64_t) f9_38; - int64_t f4f4 = f4 * (int64_t) f4; - int64_t f4f5_2 = f4_2 * (int64_t) f5; - int64_t f4f6_38 = f4_2 * (int64_t) f6_19; - int64_t f4f7_38 = f4 * (int64_t) f7_38; - int64_t f4f8_38 = f4_2 * (int64_t) f8_19; - int64_t f4f9_38 = f4 * (int64_t) f9_38; - int64_t f5f5_38 = f5 * (int64_t) f5_38; - int64_t f5f6_38 = f5_2 * (int64_t) f6_19; - int64_t f5f7_76 = f5_2 * (int64_t) f7_38; - int64_t f5f8_38 = f5_2 * (int64_t) f8_19; - int64_t f5f9_76 = f5_2 * (int64_t) f9_38; - int64_t f6f6_19 = f6 * (int64_t) f6_19; - int64_t f6f7_38 = f6 * (int64_t) f7_38; - int64_t f6f8_38 = f6_2 * (int64_t) f8_19; - int64_t f6f9_38 = f6 * (int64_t) f9_38; - int64_t f7f7_38 = f7 * (int64_t) f7_38; - int64_t f7f8_38 = f7_2 * (int64_t) f8_19; - int64_t f7f9_76 = f7_2 * (int64_t) f9_38; - int64_t f8f8_19 = f8 * (int64_t) f8_19; - int64_t f8f9_38 = f8 * (int64_t) f9_38; - int64_t f9f9_38 = f9 * (int64_t) f9_38; - int64_t h0 = f0f0 + f1f9_76 + f2f8_38 + f3f7_76 + f4f6_38 + f5f5_38; - int64_t h1 = f0f1_2 + f2f9_38 + f3f8_38 + f4f7_38 + f5f6_38; - int64_t h2 = f0f2_2 + f1f1_2 + f3f9_76 + f4f8_38 + f5f7_76 + f6f6_19; - int64_t h3 = f0f3_2 + f1f2_2 + f4f9_38 + f5f8_38 + f6f7_38; - int64_t h4 = f0f4_2 + f1f3_4 + f2f2 + f5f9_76 + f6f8_38 + f7f7_38; - int64_t h5 = f0f5_2 + f1f4_2 + f2f3_2 + f6f9_38 + f7f8_38; - int64_t h6 = f0f6_2 + f1f5_4 + f2f4_2 + f3f3_2 + f7f9_76 + f8f8_19; - int64_t h7 = f0f7_2 + f1f6_2 + f2f5_2 + f3f4_2 + f8f9_38; - int64_t h8 = f0f8_2 + f1f7_4 + f2f6_2 + f3f5_4 + f4f4 + f9f9_38; - int64_t h9 = f0f9_2 + f1f8_2 + f2f7_2 + f3f6_2 + f4f5_2; - int64_t carry0; - int64_t carry1; - int64_t carry2; - int64_t carry3; - int64_t carry4; - int64_t carry5; - int64_t carry6; - int64_t carry7; - int64_t carry8; - int64_t carry9; - carry0 = (h0 + (int64_t) (1 << 25)) >> 26; - h1 += carry0; - h0 -= carry0 << 26; - carry4 = (h4 + (int64_t) (1 << 25)) >> 26; - h5 += carry4; - h4 -= carry4 << 26; - carry1 = (h1 + (int64_t) (1 << 24)) >> 25; - h2 += carry1; - h1 -= carry1 << 25; - carry5 = (h5 + (int64_t) (1 << 24)) >> 25; - h6 += carry5; - h5 -= carry5 << 25; - carry2 = (h2 + (int64_t) (1 << 25)) >> 26; - h3 += carry2; - h2 -= carry2 << 26; - carry6 = (h6 + (int64_t) (1 << 25)) >> 26; - h7 += carry6; - h6 -= carry6 << 26; - carry3 = (h3 + (int64_t) (1 << 24)) >> 25; - h4 += carry3; - h3 -= carry3 << 25; - carry7 = (h7 + (int64_t) (1 << 24)) >> 25; - h8 += carry7; - h7 -= carry7 << 25; - carry4 = (h4 + (int64_t) (1 << 25)) >> 26; - h5 += carry4; - h4 -= carry4 << 26; - carry8 = (h8 + (int64_t) (1 << 25)) >> 26; - h9 += carry8; - h8 -= carry8 << 26; - carry9 = (h9 + (int64_t) (1 << 24)) >> 25; - h0 += carry9 * 19; - h9 -= carry9 << 25; - carry0 = (h0 + (int64_t) (1 << 25)) >> 26; - h1 += carry0; - h0 -= carry0 << 26; - h[0] = (int32_t) h0; - h[1] = (int32_t) h1; - h[2] = (int32_t) h2; - h[3] = (int32_t) h3; - h[4] = (int32_t) h4; - h[5] = (int32_t) h5; - h[6] = (int32_t) h6; - h[7] = (int32_t) h7; - h[8] = (int32_t) h8; - h[9] = (int32_t) h9; -} - - -/* -h = 2 * f * f -Can overlap h with f. - -Preconditions: - |f| bounded by 1.65*2^26,1.65*2^25,1.65*2^26,1.65*2^25,etc. - -Postconditions: - |h| bounded by 1.01*2^25,1.01*2^24,1.01*2^25,1.01*2^24,etc. -*/ - -/* -See fe_mul.c for discussion of implementation strategy. -*/ - -void fe_sq2(fe h, const fe f) { - int32_t f0 = f[0]; - int32_t f1 = f[1]; - int32_t f2 = f[2]; - int32_t f3 = f[3]; - int32_t f4 = f[4]; - int32_t f5 = f[5]; - int32_t f6 = f[6]; - int32_t f7 = f[7]; - int32_t f8 = f[8]; - int32_t f9 = f[9]; - int32_t f0_2 = 2 * f0; - int32_t f1_2 = 2 * f1; - int32_t f2_2 = 2 * f2; - int32_t f3_2 = 2 * f3; - int32_t f4_2 = 2 * f4; - int32_t f5_2 = 2 * f5; - int32_t f6_2 = 2 * f6; - int32_t f7_2 = 2 * f7; - int32_t f5_38 = 38 * f5; /* 1.959375*2^30 */ - int32_t f6_19 = 19 * f6; /* 1.959375*2^30 */ - int32_t f7_38 = 38 * f7; /* 1.959375*2^30 */ - int32_t f8_19 = 19 * f8; /* 1.959375*2^30 */ - int32_t f9_38 = 38 * f9; /* 1.959375*2^30 */ - int64_t f0f0 = f0 * (int64_t) f0; - int64_t f0f1_2 = f0_2 * (int64_t) f1; - int64_t f0f2_2 = f0_2 * (int64_t) f2; - int64_t f0f3_2 = f0_2 * (int64_t) f3; - int64_t f0f4_2 = f0_2 * (int64_t) f4; - int64_t f0f5_2 = f0_2 * (int64_t) f5; - int64_t f0f6_2 = f0_2 * (int64_t) f6; - int64_t f0f7_2 = f0_2 * (int64_t) f7; - int64_t f0f8_2 = f0_2 * (int64_t) f8; - int64_t f0f9_2 = f0_2 * (int64_t) f9; - int64_t f1f1_2 = f1_2 * (int64_t) f1; - int64_t f1f2_2 = f1_2 * (int64_t) f2; - int64_t f1f3_4 = f1_2 * (int64_t) f3_2; - int64_t f1f4_2 = f1_2 * (int64_t) f4; - int64_t f1f5_4 = f1_2 * (int64_t) f5_2; - int64_t f1f6_2 = f1_2 * (int64_t) f6; - int64_t f1f7_4 = f1_2 * (int64_t) f7_2; - int64_t f1f8_2 = f1_2 * (int64_t) f8; - int64_t f1f9_76 = f1_2 * (int64_t) f9_38; - int64_t f2f2 = f2 * (int64_t) f2; - int64_t f2f3_2 = f2_2 * (int64_t) f3; - int64_t f2f4_2 = f2_2 * (int64_t) f4; - int64_t f2f5_2 = f2_2 * (int64_t) f5; - int64_t f2f6_2 = f2_2 * (int64_t) f6; - int64_t f2f7_2 = f2_2 * (int64_t) f7; - int64_t f2f8_38 = f2_2 * (int64_t) f8_19; - int64_t f2f9_38 = f2 * (int64_t) f9_38; - int64_t f3f3_2 = f3_2 * (int64_t) f3; - int64_t f3f4_2 = f3_2 * (int64_t) f4; - int64_t f3f5_4 = f3_2 * (int64_t) f5_2; - int64_t f3f6_2 = f3_2 * (int64_t) f6; - int64_t f3f7_76 = f3_2 * (int64_t) f7_38; - int64_t f3f8_38 = f3_2 * (int64_t) f8_19; - int64_t f3f9_76 = f3_2 * (int64_t) f9_38; - int64_t f4f4 = f4 * (int64_t) f4; - int64_t f4f5_2 = f4_2 * (int64_t) f5; - int64_t f4f6_38 = f4_2 * (int64_t) f6_19; - int64_t f4f7_38 = f4 * (int64_t) f7_38; - int64_t f4f8_38 = f4_2 * (int64_t) f8_19; - int64_t f4f9_38 = f4 * (int64_t) f9_38; - int64_t f5f5_38 = f5 * (int64_t) f5_38; - int64_t f5f6_38 = f5_2 * (int64_t) f6_19; - int64_t f5f7_76 = f5_2 * (int64_t) f7_38; - int64_t f5f8_38 = f5_2 * (int64_t) f8_19; - int64_t f5f9_76 = f5_2 * (int64_t) f9_38; - int64_t f6f6_19 = f6 * (int64_t) f6_19; - int64_t f6f7_38 = f6 * (int64_t) f7_38; - int64_t f6f8_38 = f6_2 * (int64_t) f8_19; - int64_t f6f9_38 = f6 * (int64_t) f9_38; - int64_t f7f7_38 = f7 * (int64_t) f7_38; - int64_t f7f8_38 = f7_2 * (int64_t) f8_19; - int64_t f7f9_76 = f7_2 * (int64_t) f9_38; - int64_t f8f8_19 = f8 * (int64_t) f8_19; - int64_t f8f9_38 = f8 * (int64_t) f9_38; - int64_t f9f9_38 = f9 * (int64_t) f9_38; - int64_t h0 = f0f0 + f1f9_76 + f2f8_38 + f3f7_76 + f4f6_38 + f5f5_38; - int64_t h1 = f0f1_2 + f2f9_38 + f3f8_38 + f4f7_38 + f5f6_38; - int64_t h2 = f0f2_2 + f1f1_2 + f3f9_76 + f4f8_38 + f5f7_76 + f6f6_19; - int64_t h3 = f0f3_2 + f1f2_2 + f4f9_38 + f5f8_38 + f6f7_38; - int64_t h4 = f0f4_2 + f1f3_4 + f2f2 + f5f9_76 + f6f8_38 + f7f7_38; - int64_t h5 = f0f5_2 + f1f4_2 + f2f3_2 + f6f9_38 + f7f8_38; - int64_t h6 = f0f6_2 + f1f5_4 + f2f4_2 + f3f3_2 + f7f9_76 + f8f8_19; - int64_t h7 = f0f7_2 + f1f6_2 + f2f5_2 + f3f4_2 + f8f9_38; - int64_t h8 = f0f8_2 + f1f7_4 + f2f6_2 + f3f5_4 + f4f4 + f9f9_38; - int64_t h9 = f0f9_2 + f1f8_2 + f2f7_2 + f3f6_2 + f4f5_2; - int64_t carry0; - int64_t carry1; - int64_t carry2; - int64_t carry3; - int64_t carry4; - int64_t carry5; - int64_t carry6; - int64_t carry7; - int64_t carry8; - int64_t carry9; - h0 += h0; - h1 += h1; - h2 += h2; - h3 += h3; - h4 += h4; - h5 += h5; - h6 += h6; - h7 += h7; - h8 += h8; - h9 += h9; - carry0 = (h0 + (int64_t) (1 << 25)) >> 26; - h1 += carry0; - h0 -= carry0 << 26; - carry4 = (h4 + (int64_t) (1 << 25)) >> 26; - h5 += carry4; - h4 -= carry4 << 26; - carry1 = (h1 + (int64_t) (1 << 24)) >> 25; - h2 += carry1; - h1 -= carry1 << 25; - carry5 = (h5 + (int64_t) (1 << 24)) >> 25; - h6 += carry5; - h5 -= carry5 << 25; - carry2 = (h2 + (int64_t) (1 << 25)) >> 26; - h3 += carry2; - h2 -= carry2 << 26; - carry6 = (h6 + (int64_t) (1 << 25)) >> 26; - h7 += carry6; - h6 -= carry6 << 26; - carry3 = (h3 + (int64_t) (1 << 24)) >> 25; - h4 += carry3; - h3 -= carry3 << 25; - carry7 = (h7 + (int64_t) (1 << 24)) >> 25; - h8 += carry7; - h7 -= carry7 << 25; - carry4 = (h4 + (int64_t) (1 << 25)) >> 26; - h5 += carry4; - h4 -= carry4 << 26; - carry8 = (h8 + (int64_t) (1 << 25)) >> 26; - h9 += carry8; - h8 -= carry8 << 26; - carry9 = (h9 + (int64_t) (1 << 24)) >> 25; - h0 += carry9 * 19; - h9 -= carry9 << 25; - carry0 = (h0 + (int64_t) (1 << 25)) >> 26; - h1 += carry0; - h0 -= carry0 << 26; - h[0] = (int32_t) h0; - h[1] = (int32_t) h1; - h[2] = (int32_t) h2; - h[3] = (int32_t) h3; - h[4] = (int32_t) h4; - h[5] = (int32_t) h5; - h[6] = (int32_t) h6; - h[7] = (int32_t) h7; - h[8] = (int32_t) h8; - h[9] = (int32_t) h9; -} - - -/* -h = f - g -Can overlap h with f or g. - -Preconditions: - |f| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. - |g| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. - -Postconditions: - |h| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc. -*/ - -void fe_sub(fe h, const fe f, const fe g) { - int32_t f0 = f[0]; - int32_t f1 = f[1]; - int32_t f2 = f[2]; - int32_t f3 = f[3]; - int32_t f4 = f[4]; - int32_t f5 = f[5]; - int32_t f6 = f[6]; - int32_t f7 = f[7]; - int32_t f8 = f[8]; - int32_t f9 = f[9]; - int32_t g0 = g[0]; - int32_t g1 = g[1]; - int32_t g2 = g[2]; - int32_t g3 = g[3]; - int32_t g4 = g[4]; - int32_t g5 = g[5]; - int32_t g6 = g[6]; - int32_t g7 = g[7]; - int32_t g8 = g[8]; - int32_t g9 = g[9]; - int32_t h0 = f0 - g0; - int32_t h1 = f1 - g1; - int32_t h2 = f2 - g2; - int32_t h3 = f3 - g3; - int32_t h4 = f4 - g4; - int32_t h5 = f5 - g5; - int32_t h6 = f6 - g6; - int32_t h7 = f7 - g7; - int32_t h8 = f8 - g8; - int32_t h9 = f9 - g9; - - h[0] = h0; - h[1] = h1; - h[2] = h2; - h[3] = h3; - h[4] = h4; - h[5] = h5; - h[6] = h6; - h[7] = h7; - h[8] = h8; - h[9] = h9; -} - - - -/* -Preconditions: - |h| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc. - -Write p=2^255-19; q=floor(h/p). -Basic claim: q = floor(2^(-255)(h + 19 2^(-25)h9 + 2^(-1))). - -Proof: - Have |h|<=p so |q|<=1 so |19^2 2^(-255) q|<1/4. - Also have |h-2^230 h9|<2^231 so |19 2^(-255)(h-2^230 h9)|<1/4. - - Write y=2^(-1)-19^2 2^(-255)q-19 2^(-255)(h-2^230 h9). - Then 0> 25; - q = (h0 + q) >> 26; - q = (h1 + q) >> 25; - q = (h2 + q) >> 26; - q = (h3 + q) >> 25; - q = (h4 + q) >> 26; - q = (h5 + q) >> 25; - q = (h6 + q) >> 26; - q = (h7 + q) >> 25; - q = (h8 + q) >> 26; - q = (h9 + q) >> 25; - /* Goal: Output h-(2^255-19)q, which is between 0 and 2^255-20. */ - h0 += 19 * q; - /* Goal: Output h-2^255 q, which is between 0 and 2^255-20. */ - carry0 = h0 >> 26; - h1 += carry0; - h0 -= carry0 << 26; - carry1 = h1 >> 25; - h2 += carry1; - h1 -= carry1 << 25; - carry2 = h2 >> 26; - h3 += carry2; - h2 -= carry2 << 26; - carry3 = h3 >> 25; - h4 += carry3; - h3 -= carry3 << 25; - carry4 = h4 >> 26; - h5 += carry4; - h4 -= carry4 << 26; - carry5 = h5 >> 25; - h6 += carry5; - h5 -= carry5 << 25; - carry6 = h6 >> 26; - h7 += carry6; - h6 -= carry6 << 26; - carry7 = h7 >> 25; - h8 += carry7; - h7 -= carry7 << 25; - carry8 = h8 >> 26; - h9 += carry8; - h8 -= carry8 << 26; - carry9 = h9 >> 25; - h9 -= carry9 << 25; - - /* h10 = carry9 */ - /* - Goal: Output h0+...+2^255 h10-2^255 q, which is between 0 and 2^255-20. - Have h0+...+2^230 h9 between 0 and 2^255-1; - evidently 2^255 h10-2^255 q = 0. - Goal: Output h0+...+2^230 h9. - */ - s[0] = (unsigned char) (h0 >> 0); - s[1] = (unsigned char) (h0 >> 8); - s[2] = (unsigned char) (h0 >> 16); - s[3] = (unsigned char) ((h0 >> 24) | (h1 << 2)); - s[4] = (unsigned char) (h1 >> 6); - s[5] = (unsigned char) (h1 >> 14); - s[6] = (unsigned char) ((h1 >> 22) | (h2 << 3)); - s[7] = (unsigned char) (h2 >> 5); - s[8] = (unsigned char) (h2 >> 13); - s[9] = (unsigned char) ((h2 >> 21) | (h3 << 5)); - s[10] = (unsigned char) (h3 >> 3); - s[11] = (unsigned char) (h3 >> 11); - s[12] = (unsigned char) ((h3 >> 19) | (h4 << 6)); - s[13] = (unsigned char) (h4 >> 2); - s[14] = (unsigned char) (h4 >> 10); - s[15] = (unsigned char) (h4 >> 18); - s[16] = (unsigned char) (h5 >> 0); - s[17] = (unsigned char) (h5 >> 8); - s[18] = (unsigned char) (h5 >> 16); - s[19] = (unsigned char) ((h5 >> 24) | (h6 << 1)); - s[20] = (unsigned char) (h6 >> 7); - s[21] = (unsigned char) (h6 >> 15); - s[22] = (unsigned char) ((h6 >> 23) | (h7 << 3)); - s[23] = (unsigned char) (h7 >> 5); - s[24] = (unsigned char) (h7 >> 13); - s[25] = (unsigned char) ((h7 >> 21) | (h8 << 4)); - s[26] = (unsigned char) (h8 >> 4); - s[27] = (unsigned char) (h8 >> 12); - s[28] = (unsigned char) ((h8 >> 20) | (h9 << 6)); - s[29] = (unsigned char) (h9 >> 2); - s[30] = (unsigned char) (h9 >> 10); - s[31] = (unsigned char) (h9 >> 18); -} diff --git a/outside/ed25519/src/fe.h b/outside/ed25519/src/fe.h deleted file mode 100644 index b4b62d282..000000000 --- a/outside/ed25519/src/fe.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef FE_H -#define FE_H - -#include "fixedint.h" - - -/* - fe means field element. - Here the field is \Z/(2^255-19). - An element t, entries t[0]...t[9], represents the integer - t[0]+2^26 t[1]+2^51 t[2]+2^77 t[3]+2^102 t[4]+...+2^230 t[9]. - Bounds on each t[i] vary depending on context. -*/ - - -typedef int32_t fe[10]; - - -void fe_0(fe h); -void fe_1(fe h); - -void fe_frombytes(fe h, const unsigned char *s); -void fe_tobytes(unsigned char *s, const fe h); - -void fe_copy(fe h, const fe f); -int fe_isnegative(const fe f); -int fe_isnonzero(const fe f); -void fe_cmov(fe f, const fe g, unsigned int b); -void fe_cswap(fe f, fe g, unsigned int b); - -void fe_neg(fe h, const fe f); -void fe_add(fe h, const fe f, const fe g); -void fe_invert(fe out, const fe z); -void fe_sq(fe h, const fe f); -void fe_sq2(fe h, const fe f); -void fe_mul(fe h, const fe f, const fe g); -void fe_mul121666(fe h, fe f); -void fe_pow22523(fe out, const fe z); -void fe_sub(fe h, const fe f, const fe g); - -#endif diff --git a/outside/ed25519/src/fixedint.h b/outside/ed25519/src/fixedint.h deleted file mode 100644 index d53383a97..000000000 --- a/outside/ed25519/src/fixedint.h +++ /dev/null @@ -1,11 +0,0 @@ -/* - Portable header to provide the 32 and 64 bits type. -*/ - -#ifndef FIXEDINT_H_INCLUDED -#define FIXEDINT_H_INCLUDED - -#include -#include - -#endif diff --git a/outside/ed25519/src/ge.c b/outside/ed25519/src/ge.c deleted file mode 100644 index 3c342b1d2..000000000 --- a/outside/ed25519/src/ge.c +++ /dev/null @@ -1,467 +0,0 @@ -#include "ge.h" -#include "precomp_data.h" - - -/* -r = p + q -*/ - -void ge_add(ge_p1p1 *r, const ge_p3 *p, const ge_cached *q) { - fe t0; - fe_add(r->X, p->Y, p->X); - fe_sub(r->Y, p->Y, p->X); - fe_mul(r->Z, r->X, q->YplusX); - fe_mul(r->Y, r->Y, q->YminusX); - fe_mul(r->T, q->T2d, p->T); - fe_mul(r->X, p->Z, q->Z); - fe_add(t0, r->X, r->X); - fe_sub(r->X, r->Z, r->Y); - fe_add(r->Y, r->Z, r->Y); - fe_add(r->Z, t0, r->T); - fe_sub(r->T, t0, r->T); -} - - -static void slide(signed char *r, const unsigned char *a) { - int i; - int b; - int k; - - for (i = 0; i < 256; ++i) { - r[i] = 1 & (a[i >> 3] >> (i & 7)); - } - - for (i = 0; i < 256; ++i) - if (r[i]) { - for (b = 1; b <= 6 && i + b < 256; ++b) { - if (r[i + b]) { - if (r[i] + (r[i + b] << b) <= 15) { - r[i] += r[i + b] << b; - r[i + b] = 0; - } else if (r[i] - (r[i + b] << b) >= -15) { - r[i] -= r[i + b] << b; - - for (k = i + b; k < 256; ++k) { - if (!r[k]) { - r[k] = 1; - break; - } - - r[k] = 0; - } - } else { - break; - } - } - } - } -} - -/* -r = a * A + b * B -where a = a[0]+256*a[1]+...+256^31 a[31]. -and b = b[0]+256*b[1]+...+256^31 b[31]. -B is the Ed25519 base point (x,4/5) with x positive. -*/ - -void ge_double_scalarmult_vartime(ge_p2 *r, const unsigned char *a, const ge_p3 *A, const unsigned char *b) { - signed char aslide[256]; - signed char bslide[256]; - ge_cached Ai[8]; /* A,3A,5A,7A,9A,11A,13A,15A */ - ge_p1p1 t; - ge_p3 u; - ge_p3 A2; - int i; - slide(aslide, a); - slide(bslide, b); - ge_p3_to_cached(&Ai[0], A); - ge_p3_dbl(&t, A); - ge_p1p1_to_p3(&A2, &t); - ge_add(&t, &A2, &Ai[0]); - ge_p1p1_to_p3(&u, &t); - ge_p3_to_cached(&Ai[1], &u); - ge_add(&t, &A2, &Ai[1]); - ge_p1p1_to_p3(&u, &t); - ge_p3_to_cached(&Ai[2], &u); - ge_add(&t, &A2, &Ai[2]); - ge_p1p1_to_p3(&u, &t); - ge_p3_to_cached(&Ai[3], &u); - ge_add(&t, &A2, &Ai[3]); - ge_p1p1_to_p3(&u, &t); - ge_p3_to_cached(&Ai[4], &u); - ge_add(&t, &A2, &Ai[4]); - ge_p1p1_to_p3(&u, &t); - ge_p3_to_cached(&Ai[5], &u); - ge_add(&t, &A2, &Ai[5]); - ge_p1p1_to_p3(&u, &t); - ge_p3_to_cached(&Ai[6], &u); - ge_add(&t, &A2, &Ai[6]); - ge_p1p1_to_p3(&u, &t); - ge_p3_to_cached(&Ai[7], &u); - ge_p2_0(r); - - for (i = 255; i >= 0; --i) { - if (aslide[i] || bslide[i]) { - break; - } - } - - for (; i >= 0; --i) { - ge_p2_dbl(&t, r); - - if (aslide[i] > 0) { - ge_p1p1_to_p3(&u, &t); - ge_add(&t, &u, &Ai[aslide[i] / 2]); - } else if (aslide[i] < 0) { - ge_p1p1_to_p3(&u, &t); - ge_sub(&t, &u, &Ai[(-aslide[i]) / 2]); - } - - if (bslide[i] > 0) { - ge_p1p1_to_p3(&u, &t); - ge_madd(&t, &u, &Bi[bslide[i] / 2]); - } else if (bslide[i] < 0) { - ge_p1p1_to_p3(&u, &t); - ge_msub(&t, &u, &Bi[(-bslide[i]) / 2]); - } - - ge_p1p1_to_p2(r, &t); - } -} - - -static const fe d = { - -10913610, 13857413, -15372611, 6949391, 114729, -8787816, -6275908, -3247719, -18696448, -12055116 -}; - -static const fe sqrtm1 = { - -32595792, -7943725, 9377950, 3500415, 12389472, -272473, -25146209, -2005654, 326686, 11406482 -}; - -int ge_frombytes_negate_vartime(ge_p3 *h, const unsigned char *s) { - fe u; - fe v; - fe v3; - fe vxx; - fe check; - fe_frombytes(h->Y, s); - fe_1(h->Z); - fe_sq(u, h->Y); - fe_mul(v, u, d); - fe_sub(u, u, h->Z); /* u = y^2-1 */ - fe_add(v, v, h->Z); /* v = dy^2+1 */ - fe_sq(v3, v); - fe_mul(v3, v3, v); /* v3 = v^3 */ - fe_sq(h->X, v3); - fe_mul(h->X, h->X, v); - fe_mul(h->X, h->X, u); /* x = uv^7 */ - fe_pow22523(h->X, h->X); /* x = (uv^7)^((q-5)/8) */ - fe_mul(h->X, h->X, v3); - fe_mul(h->X, h->X, u); /* x = uv^3(uv^7)^((q-5)/8) */ - fe_sq(vxx, h->X); - fe_mul(vxx, vxx, v); - fe_sub(check, vxx, u); /* vx^2-u */ - - if (fe_isnonzero(check)) { - fe_add(check, vxx, u); /* vx^2+u */ - - if (fe_isnonzero(check)) { - return -1; - } - - fe_mul(h->X, h->X, sqrtm1); - } - - if (fe_isnegative(h->X) == (s[31] >> 7)) { - fe_neg(h->X, h->X); - } - - fe_mul(h->T, h->X, h->Y); - return 0; -} - - -/* -r = p + q -*/ - -void ge_madd(ge_p1p1 *r, const ge_p3 *p, const ge_precomp *q) { - fe t0; - fe_add(r->X, p->Y, p->X); - fe_sub(r->Y, p->Y, p->X); - fe_mul(r->Z, r->X, q->yplusx); - fe_mul(r->Y, r->Y, q->yminusx); - fe_mul(r->T, q->xy2d, p->T); - fe_add(t0, p->Z, p->Z); - fe_sub(r->X, r->Z, r->Y); - fe_add(r->Y, r->Z, r->Y); - fe_add(r->Z, t0, r->T); - fe_sub(r->T, t0, r->T); -} - - -/* -r = p - q -*/ - -void ge_msub(ge_p1p1 *r, const ge_p3 *p, const ge_precomp *q) { - fe t0; - - fe_add(r->X, p->Y, p->X); - fe_sub(r->Y, p->Y, p->X); - fe_mul(r->Z, r->X, q->yminusx); - fe_mul(r->Y, r->Y, q->yplusx); - fe_mul(r->T, q->xy2d, p->T); - fe_add(t0, p->Z, p->Z); - fe_sub(r->X, r->Z, r->Y); - fe_add(r->Y, r->Z, r->Y); - fe_sub(r->Z, t0, r->T); - fe_add(r->T, t0, r->T); -} - - -/* -r = p -*/ - -void ge_p1p1_to_p2(ge_p2 *r, const ge_p1p1 *p) { - fe_mul(r->X, p->X, p->T); - fe_mul(r->Y, p->Y, p->Z); - fe_mul(r->Z, p->Z, p->T); -} - - - -/* -r = p -*/ - -void ge_p1p1_to_p3(ge_p3 *r, const ge_p1p1 *p) { - fe_mul(r->X, p->X, p->T); - fe_mul(r->Y, p->Y, p->Z); - fe_mul(r->Z, p->Z, p->T); - fe_mul(r->T, p->X, p->Y); -} - - -void ge_p2_0(ge_p2 *h) { - fe_0(h->X); - fe_1(h->Y); - fe_1(h->Z); -} - - - -/* -r = 2 * p -*/ - -void ge_p2_dbl(ge_p1p1 *r, const ge_p2 *p) { - fe t0; - - fe_sq(r->X, p->X); - fe_sq(r->Z, p->Y); - fe_sq2(r->T, p->Z); - fe_add(r->Y, p->X, p->Y); - fe_sq(t0, r->Y); - fe_add(r->Y, r->Z, r->X); - fe_sub(r->Z, r->Z, r->X); - fe_sub(r->X, t0, r->Y); - fe_sub(r->T, r->T, r->Z); -} - - -void ge_p3_0(ge_p3 *h) { - fe_0(h->X); - fe_1(h->Y); - fe_1(h->Z); - fe_0(h->T); -} - - -/* -r = 2 * p -*/ - -void ge_p3_dbl(ge_p1p1 *r, const ge_p3 *p) { - ge_p2 q; - ge_p3_to_p2(&q, p); - ge_p2_dbl(r, &q); -} - - - -/* -r = p -*/ - -static const fe d2 = { - -21827239, -5839606, -30745221, 13898782, 229458, 15978800, -12551817, -6495438, 29715968, 9444199 -}; - -void ge_p3_to_cached(ge_cached *r, const ge_p3 *p) { - fe_add(r->YplusX, p->Y, p->X); - fe_sub(r->YminusX, p->Y, p->X); - fe_copy(r->Z, p->Z); - fe_mul(r->T2d, p->T, d2); -} - - -/* -r = p -*/ - -void ge_p3_to_p2(ge_p2 *r, const ge_p3 *p) { - fe_copy(r->X, p->X); - fe_copy(r->Y, p->Y); - fe_copy(r->Z, p->Z); -} - - -void ge_p3_tobytes(unsigned char *s, const ge_p3 *h) { - fe recip; - fe x; - fe y; - fe_invert(recip, h->Z); - fe_mul(x, h->X, recip); - fe_mul(y, h->Y, recip); - fe_tobytes(s, y); - s[31] ^= fe_isnegative(x) << 7; -} - - -static unsigned char equal(signed char b, signed char c) { - unsigned char ub = b; - unsigned char uc = c; - unsigned char x = ub ^ uc; /* 0: yes; 1..255: no */ - uint64_t y = x; /* 0: yes; 1..255: no */ - y -= 1; /* large: yes; 0..254: no */ - y >>= 63; /* 1: yes; 0: no */ - return (unsigned char) y; -} - -static unsigned char negative(signed char b) { - uint64_t x = b; /* 18446744073709551361..18446744073709551615: yes; 0..255: no */ - x >>= 63; /* 1: yes; 0: no */ - return (unsigned char) x; -} - -static void cmov(ge_precomp *t, ge_precomp *u, unsigned char b) { - fe_cmov(t->yplusx, u->yplusx, b); - fe_cmov(t->yminusx, u->yminusx, b); - fe_cmov(t->xy2d, u->xy2d, b); -} - - -static void select(ge_precomp *t, int pos, signed char b) { - ge_precomp minust; - unsigned char bnegative = negative(b); - unsigned char babs = b - (((-bnegative) & b) << 1); - fe_1(t->yplusx); - fe_1(t->yminusx); - fe_0(t->xy2d); - cmov(t, &base[pos][0], equal(babs, 1)); - cmov(t, &base[pos][1], equal(babs, 2)); - cmov(t, &base[pos][2], equal(babs, 3)); - cmov(t, &base[pos][3], equal(babs, 4)); - cmov(t, &base[pos][4], equal(babs, 5)); - cmov(t, &base[pos][5], equal(babs, 6)); - cmov(t, &base[pos][6], equal(babs, 7)); - cmov(t, &base[pos][7], equal(babs, 8)); - fe_copy(minust.yplusx, t->yminusx); - fe_copy(minust.yminusx, t->yplusx); - fe_neg(minust.xy2d, t->xy2d); - cmov(t, &minust, bnegative); -} - -/* -h = a * B -where a = a[0]+256*a[1]+...+256^31 a[31] -B is the Ed25519 base point (x,4/5) with x positive. - -Preconditions: - a[31] <= 127 -*/ - -void ge_scalarmult_base(ge_p3 *h, const unsigned char *a) { - signed char e[64]; - signed char carry; - ge_p1p1 r; - ge_p2 s; - ge_precomp t; - int i; - - for (i = 0; i < 32; ++i) { - e[2 * i + 0] = (a[i] >> 0) & 15; - e[2 * i + 1] = (a[i] >> 4) & 15; - } - - /* each e[i] is between 0 and 15 */ - /* e[63] is between 0 and 7 */ - carry = 0; - - for (i = 0; i < 63; ++i) { - e[i] += carry; - carry = e[i] + 8; - carry >>= 4; - e[i] -= carry << 4; - } - - e[63] += carry; - /* each e[i] is between -8 and 8 */ - ge_p3_0(h); - - for (i = 1; i < 64; i += 2) { - select(&t, i / 2, e[i]); - ge_madd(&r, h, &t); - ge_p1p1_to_p3(h, &r); - } - - ge_p3_dbl(&r, h); - ge_p1p1_to_p2(&s, &r); - ge_p2_dbl(&r, &s); - ge_p1p1_to_p2(&s, &r); - ge_p2_dbl(&r, &s); - ge_p1p1_to_p2(&s, &r); - ge_p2_dbl(&r, &s); - ge_p1p1_to_p3(h, &r); - - for (i = 0; i < 64; i += 2) { - select(&t, i / 2, e[i]); - ge_madd(&r, h, &t); - ge_p1p1_to_p3(h, &r); - } -} - - -/* -r = p - q -*/ - -void ge_sub(ge_p1p1 *r, const ge_p3 *p, const ge_cached *q) { - fe t0; - - fe_add(r->X, p->Y, p->X); - fe_sub(r->Y, p->Y, p->X); - fe_mul(r->Z, r->X, q->YminusX); - fe_mul(r->Y, r->Y, q->YplusX); - fe_mul(r->T, q->T2d, p->T); - fe_mul(r->X, p->Z, q->Z); - fe_add(t0, r->X, r->X); - fe_sub(r->X, r->Z, r->Y); - fe_add(r->Y, r->Z, r->Y); - fe_sub(r->Z, t0, r->T); - fe_add(r->T, t0, r->T); -} - - -void ge_tobytes(unsigned char *s, const ge_p2 *h) { - fe recip; - fe x; - fe y; - fe_invert(recip, h->Z); - fe_mul(x, h->X, recip); - fe_mul(y, h->Y, recip); - fe_tobytes(s, y); - s[31] ^= fe_isnegative(x) << 7; -} diff --git a/outside/ed25519/src/ge.h b/outside/ed25519/src/ge.h deleted file mode 100644 index 17fde2df1..000000000 --- a/outside/ed25519/src/ge.h +++ /dev/null @@ -1,74 +0,0 @@ -#ifndef GE_H -#define GE_H - -#include "fe.h" - - -/* -ge means group element. - -Here the group is the set of pairs (x,y) of field elements (see fe.h) -satisfying -x^2 + y^2 = 1 + d x^2y^2 -where d = -121665/121666. - -Representations: - ge_p2 (projective): (X:Y:Z) satisfying x=X/Z, y=Y/Z - ge_p3 (extended): (X:Y:Z:T) satisfying x=X/Z, y=Y/Z, XY=ZT - ge_p1p1 (completed): ((X:Z),(Y:T)) satisfying x=X/Z, y=Y/T - ge_precomp (Duif): (y+x,y-x,2dxy) -*/ - -typedef struct { - fe X; - fe Y; - fe Z; -} ge_p2; - -typedef struct { - fe X; - fe Y; - fe Z; - fe T; -} ge_p3; - -typedef struct { - fe X; - fe Y; - fe Z; - fe T; -} ge_p1p1; - -typedef struct { - fe yplusx; - fe yminusx; - fe xy2d; -} ge_precomp; - -typedef struct { - fe YplusX; - fe YminusX; - fe Z; - fe T2d; -} ge_cached; - -void ge_p3_tobytes(unsigned char *s, const ge_p3 *h); -void ge_tobytes(unsigned char *s, const ge_p2 *h); -int ge_frombytes_negate_vartime(ge_p3 *h, const unsigned char *s); - -void ge_add(ge_p1p1 *r, const ge_p3 *p, const ge_cached *q); -void ge_sub(ge_p1p1 *r, const ge_p3 *p, const ge_cached *q); -void ge_double_scalarmult_vartime(ge_p2 *r, const unsigned char *a, const ge_p3 *A, const unsigned char *b); -void ge_madd(ge_p1p1 *r, const ge_p3 *p, const ge_precomp *q); -void ge_msub(ge_p1p1 *r, const ge_p3 *p, const ge_precomp *q); -void ge_scalarmult_base(ge_p3 *h, const unsigned char *a); - -void ge_p1p1_to_p2(ge_p2 *r, const ge_p1p1 *p); -void ge_p1p1_to_p3(ge_p3 *r, const ge_p1p1 *p); -void ge_p2_0(ge_p2 *h); -void ge_p2_dbl(ge_p1p1 *r, const ge_p2 *p); -void ge_p3_0(ge_p3 *h); -void ge_p3_dbl(ge_p1p1 *r, const ge_p3 *p); -void ge_p3_to_cached(ge_cached *r, const ge_p3 *p); -void ge_p3_to_p2(ge_p2 *r, const ge_p3 *p); - -#endif diff --git a/outside/ed25519/src/key_exchange.c b/outside/ed25519/src/key_exchange.c deleted file mode 100644 index abd75da2c..000000000 --- a/outside/ed25519/src/key_exchange.c +++ /dev/null @@ -1,79 +0,0 @@ -#include "ed25519.h" -#include "fe.h" - -void ed25519_key_exchange(unsigned char *shared_secret, const unsigned char *public_key, const unsigned char *private_key) { - unsigned char e[32]; - unsigned int i; - - fe x1; - fe x2; - fe z2; - fe x3; - fe z3; - fe tmp0; - fe tmp1; - - int pos; - unsigned int swap; - unsigned int b; - - /* copy the private key and make sure it's valid */ - for (i = 0; i < 32; ++i) { - e[i] = private_key[i]; - } - - e[0] &= 248; - e[31] &= 63; - e[31] |= 64; - - /* unpack the public key and convert edwards to montgomery */ - /* due to CodesInChaos: montgomeryX = (edwardsY + 1)*inverse(1 - edwardsY) mod p */ - fe_frombytes(x1, public_key); - fe_1(tmp1); - fe_add(tmp0, x1, tmp1); - fe_sub(tmp1, tmp1, x1); - fe_invert(tmp1, tmp1); - fe_mul(x1, tmp0, tmp1); - - fe_1(x2); - fe_0(z2); - fe_copy(x3, x1); - fe_1(z3); - - swap = 0; - for (pos = 254; pos >= 0; --pos) { - b = e[pos / 8] >> (pos & 7); - b &= 1; - swap ^= b; - fe_cswap(x2, x3, swap); - fe_cswap(z2, z3, swap); - swap = b; - - /* from montgomery.h */ - fe_sub(tmp0, x3, z3); - fe_sub(tmp1, x2, z2); - fe_add(x2, x2, z2); - fe_add(z2, x3, z3); - fe_mul(z3, tmp0, x2); - fe_mul(z2, z2, tmp1); - fe_sq(tmp0, tmp1); - fe_sq(tmp1, x2); - fe_add(x3, z3, z2); - fe_sub(z2, z3, z2); - fe_mul(x2, tmp1, tmp0); - fe_sub(tmp1, tmp1, tmp0); - fe_sq(z2, z2); - fe_mul121666(z3, tmp1); - fe_sq(x3, x3); - fe_add(tmp0, tmp0, z3); - fe_mul(z3, x1, z2); - fe_mul(z2, tmp1, tmp0); - } - - fe_cswap(x2, x3, swap); - fe_cswap(z2, z3, swap); - - fe_invert(z2, z2); - fe_mul(x2, x2, z2); - fe_tobytes(shared_secret, x2); -} diff --git a/outside/ed25519/src/keypair.c b/outside/ed25519/src/keypair.c deleted file mode 100644 index dc1b8eccc..000000000 --- a/outside/ed25519/src/keypair.c +++ /dev/null @@ -1,16 +0,0 @@ -#include "ed25519.h" -#include "sha512.h" -#include "ge.h" - - -void ed25519_create_keypair(unsigned char *public_key, unsigned char *private_key, const unsigned char *seed) { - ge_p3 A; - - sha512(seed, 32, private_key); - private_key[0] &= 248; - private_key[31] &= 63; - private_key[31] |= 64; - - ge_scalarmult_base(&A, private_key); - ge_p3_tobytes(public_key, &A); -} diff --git a/outside/ed25519/src/precomp_data.h b/outside/ed25519/src/precomp_data.h deleted file mode 100644 index 776b84f4c..000000000 --- a/outside/ed25519/src/precomp_data.h +++ /dev/null @@ -1,1391 +0,0 @@ -static ge_precomp Bi[8] = { - { - { 25967493, -14356035, 29566456, 3660896, -12694345, 4014787, 27544626, -11754271, -6079156, 2047605 }, - { -12545711, 934262, -2722910, 3049990, -727428, 9406986, 12720692, 5043384, 19500929, -15469378 }, - { -8738181, 4489570, 9688441, -14785194, 10184609, -12363380, 29287919, 11864899, -24514362, -4438546 }, - }, - { - { 15636291, -9688557, 24204773, -7912398, 616977, -16685262, 27787600, -14772189, 28944400, -1550024 }, - { 16568933, 4717097, -11556148, -1102322, 15682896, -11807043, 16354577, -11775962, 7689662, 11199574 }, - { 30464156, -5976125, -11779434, -15670865, 23220365, 15915852, 7512774, 10017326, -17749093, -9920357 }, - }, - { - { 10861363, 11473154, 27284546, 1981175, -30064349, 12577861, 32867885, 14515107, -15438304, 10819380 }, - { 4708026, 6336745, 20377586, 9066809, -11272109, 6594696, -25653668, 12483688, -12668491, 5581306 }, - { 19563160, 16186464, -29386857, 4097519, 10237984, -4348115, 28542350, 13850243, -23678021, -15815942 }, - }, - { - { 5153746, 9909285, 1723747, -2777874, 30523605, 5516873, 19480852, 5230134, -23952439, -15175766 }, - { -30269007, -3463509, 7665486, 10083793, 28475525, 1649722, 20654025, 16520125, 30598449, 7715701 }, - { 28881845, 14381568, 9657904, 3680757, -20181635, 7843316, -31400660, 1370708, 29794553, -1409300 }, - }, - { - { -22518993, -6692182, 14201702, -8745502, -23510406, 8844726, 18474211, -1361450, -13062696, 13821877 }, - { -6455177, -7839871, 3374702, -4740862, -27098617, -10571707, 31655028, -7212327, 18853322, -14220951 }, - { 4566830, -12963868, -28974889, -12240689, -7602672, -2830569, -8514358, -10431137, 2207753, -3209784 }, - }, - { - { -25154831, -4185821, 29681144, 7868801, -6854661, -9423865, -12437364, -663000, -31111463, -16132436 }, - { 25576264, -2703214, 7349804, -11814844, 16472782, 9300885, 3844789, 15725684, 171356, 6466918 }, - { 23103977, 13316479, 9739013, -16149481, 817875, -15038942, 8965339, -14088058, -30714912, 16193877 }, - }, - { - { -33521811, 3180713, -2394130, 14003687, -16903474, -16270840, 17238398, 4729455, -18074513, 9256800 }, - { -25182317, -4174131, 32336398, 5036987, -21236817, 11360617, 22616405, 9761698, -19827198, 630305 }, - { -13720693, 2639453, -24237460, -7406481, 9494427, -5774029, -6554551, -15960994, -2449256, -14291300 }, - }, - { - { -3151181, -5046075, 9282714, 6866145, -31907062, -863023, -18940575, 15033784, 25105118, -7894876 }, - { -24326370, 15950226, -31801215, -14592823, -11662737, -5090925, 1573892, -2625887, 2198790, -15804619 }, - { -3099351, 10324967, -2241613, 7453183, -5446979, -2735503, -13812022, -16236442, -32461234, -12290683 }, - }, -}; - - -/* base[i][j] = (j+1)*256^i*B */ -static ge_precomp base[32][8] = { - { - { - { 25967493, -14356035, 29566456, 3660896, -12694345, 4014787, 27544626, -11754271, -6079156, 2047605 }, - { -12545711, 934262, -2722910, 3049990, -727428, 9406986, 12720692, 5043384, 19500929, -15469378 }, - { -8738181, 4489570, 9688441, -14785194, 10184609, -12363380, 29287919, 11864899, -24514362, -4438546 }, - }, - { - { -12815894, -12976347, -21581243, 11784320, -25355658, -2750717, -11717903, -3814571, -358445, -10211303 }, - { -21703237, 6903825, 27185491, 6451973, -29577724, -9554005, -15616551, 11189268, -26829678, -5319081 }, - { 26966642, 11152617, 32442495, 15396054, 14353839, -12752335, -3128826, -9541118, -15472047, -4166697 }, - }, - { - { 15636291, -9688557, 24204773, -7912398, 616977, -16685262, 27787600, -14772189, 28944400, -1550024 }, - { 16568933, 4717097, -11556148, -1102322, 15682896, -11807043, 16354577, -11775962, 7689662, 11199574 }, - { 30464156, -5976125, -11779434, -15670865, 23220365, 15915852, 7512774, 10017326, -17749093, -9920357 }, - }, - { - { -17036878, 13921892, 10945806, -6033431, 27105052, -16084379, -28926210, 15006023, 3284568, -6276540 }, - { 23599295, -8306047, -11193664, -7687416, 13236774, 10506355, 7464579, 9656445, 13059162, 10374397 }, - { 7798556, 16710257, 3033922, 2874086, 28997861, 2835604, 32406664, -3839045, -641708, -101325 }, - }, - { - { 10861363, 11473154, 27284546, 1981175, -30064349, 12577861, 32867885, 14515107, -15438304, 10819380 }, - { 4708026, 6336745, 20377586, 9066809, -11272109, 6594696, -25653668, 12483688, -12668491, 5581306 }, - { 19563160, 16186464, -29386857, 4097519, 10237984, -4348115, 28542350, 13850243, -23678021, -15815942 }, - }, - { - { -15371964, -12862754, 32573250, 4720197, -26436522, 5875511, -19188627, -15224819, -9818940, -12085777 }, - { -8549212, 109983, 15149363, 2178705, 22900618, 4543417, 3044240, -15689887, 1762328, 14866737 }, - { -18199695, -15951423, -10473290, 1707278, -17185920, 3916101, -28236412, 3959421, 27914454, 4383652 }, - }, - { - { 5153746, 9909285, 1723747, -2777874, 30523605, 5516873, 19480852, 5230134, -23952439, -15175766 }, - { -30269007, -3463509, 7665486, 10083793, 28475525, 1649722, 20654025, 16520125, 30598449, 7715701 }, - { 28881845, 14381568, 9657904, 3680757, -20181635, 7843316, -31400660, 1370708, 29794553, -1409300 }, - }, - { - { 14499471, -2729599, -33191113, -4254652, 28494862, 14271267, 30290735, 10876454, -33154098, 2381726 }, - { -7195431, -2655363, -14730155, 462251, -27724326, 3941372, -6236617, 3696005, -32300832, 15351955 }, - { 27431194, 8222322, 16448760, -3907995, -18707002, 11938355, -32961401, -2970515, 29551813, 10109425 }, - }, - }, - { - { - { -13657040, -13155431, -31283750, 11777098, 21447386, 6519384, -2378284, -1627556, 10092783, -4764171 }, - { 27939166, 14210322, 4677035, 16277044, -22964462, -12398139, -32508754, 12005538, -17810127, 12803510 }, - { 17228999, -15661624, -1233527, 300140, -1224870, -11714777, 30364213, -9038194, 18016357, 4397660 }, - }, - { - { -10958843, -7690207, 4776341, -14954238, 27850028, -15602212, -26619106, 14544525, -17477504, 982639 }, - { 29253598, 15796703, -2863982, -9908884, 10057023, 3163536, 7332899, -4120128, -21047696, 9934963 }, - { 5793303, 16271923, -24131614, -10116404, 29188560, 1206517, -14747930, 4559895, -30123922, -10897950 }, - }, - { - { -27643952, -11493006, 16282657, -11036493, 28414021, -15012264, 24191034, 4541697, -13338309, 5500568 }, - { 12650548, -1497113, 9052871, 11355358, -17680037, -8400164, -17430592, 12264343, 10874051, 13524335 }, - { 25556948, -3045990, 714651, 2510400, 23394682, -10415330, 33119038, 5080568, -22528059, 5376628 }, - }, - { - { -26088264, -4011052, -17013699, -3537628, -6726793, 1920897, -22321305, -9447443, 4535768, 1569007 }, - { -2255422, 14606630, -21692440, -8039818, 28430649, 8775819, -30494562, 3044290, 31848280, 12543772 }, - { -22028579, 2943893, -31857513, 6777306, 13784462, -4292203, -27377195, -2062731, 7718482, 14474653 }, - }, - { - { 2385315, 2454213, -22631320, 46603, -4437935, -15680415, 656965, -7236665, 24316168, -5253567 }, - { 13741529, 10911568, -33233417, -8603737, -20177830, -1033297, 33040651, -13424532, -20729456, 8321686 }, - { 21060490, -2212744, 15712757, -4336099, 1639040, 10656336, 23845965, -11874838, -9984458, 608372 }, - }, - { - { -13672732, -15087586, -10889693, -7557059, -6036909, 11305547, 1123968, -6780577, 27229399, 23887 }, - { -23244140, -294205, -11744728, 14712571, -29465699, -2029617, 12797024, -6440308, -1633405, 16678954 }, - { -29500620, 4770662, -16054387, 14001338, 7830047, 9564805, -1508144, -4795045, -17169265, 4904953 }, - }, - { - { 24059557, 14617003, 19037157, -15039908, 19766093, -14906429, 5169211, 16191880, 2128236, -4326833 }, - { -16981152, 4124966, -8540610, -10653797, 30336522, -14105247, -29806336, 916033, -6882542, -2986532 }, - { -22630907, 12419372, -7134229, -7473371, -16478904, 16739175, 285431, 2763829, 15736322, 4143876 }, - }, - { - { 2379352, 11839345, -4110402, -5988665, 11274298, 794957, 212801, -14594663, 23527084, -16458268 }, - { 33431127, -11130478, -17838966, -15626900, 8909499, 8376530, -32625340, 4087881, -15188911, -14416214 }, - { 1767683, 7197987, -13205226, -2022635, -13091350, 448826, 5799055, 4357868, -4774191, -16323038 }, - }, - }, - { - { - { 6721966, 13833823, -23523388, -1551314, 26354293, -11863321, 23365147, -3949732, 7390890, 2759800 }, - { 4409041, 2052381, 23373853, 10530217, 7676779, -12885954, 21302353, -4264057, 1244380, -12919645 }, - { -4421239, 7169619, 4982368, -2957590, 30256825, -2777540, 14086413, 9208236, 15886429, 16489664 }, - }, - { - { 1996075, 10375649, 14346367, 13311202, -6874135, -16438411, -13693198, 398369, -30606455, -712933 }, - { -25307465, 9795880, -2777414, 14878809, -33531835, 14780363, 13348553, 12076947, -30836462, 5113182 }, - { -17770784, 11797796, 31950843, 13929123, -25888302, 12288344, -30341101, -7336386, 13847711, 5387222 }, - }, - { - { -18582163, -3416217, 17824843, -2340966, 22744343, -10442611, 8763061, 3617786, -19600662, 10370991 }, - { 20246567, -14369378, 22358229, -543712, 18507283, -10413996, 14554437, -8746092, 32232924, 16763880 }, - { 9648505, 10094563, 26416693, 14745928, -30374318, -6472621, 11094161, 15689506, 3140038, -16510092 }, - }, - { - { -16160072, 5472695, 31895588, 4744994, 8823515, 10365685, -27224800, 9448613, -28774454, 366295 }, - { 19153450, 11523972, -11096490, -6503142, -24647631, 5420647, 28344573, 8041113, 719605, 11671788 }, - { 8678025, 2694440, -6808014, 2517372, 4964326, 11152271, -15432916, -15266516, 27000813, -10195553 }, - }, - { - { -15157904, 7134312, 8639287, -2814877, -7235688, 10421742, 564065, 5336097, 6750977, -14521026 }, - { 11836410, -3979488, 26297894, 16080799, 23455045, 15735944, 1695823, -8819122, 8169720, 16220347 }, - { -18115838, 8653647, 17578566, -6092619, -8025777, -16012763, -11144307, -2627664, -5990708, -14166033 }, - }, - { - { -23308498, -10968312, 15213228, -10081214, -30853605, -11050004, 27884329, 2847284, 2655861, 1738395 }, - { -27537433, -14253021, -25336301, -8002780, -9370762, 8129821, 21651608, -3239336, -19087449, -11005278 }, - { 1533110, 3437855, 23735889, 459276, 29970501, 11335377, 26030092, 5821408, 10478196, 8544890 }, - }, - { - { 32173121, -16129311, 24896207, 3921497, 22579056, -3410854, 19270449, 12217473, 17789017, -3395995 }, - { -30552961, -2228401, -15578829, -10147201, 13243889, 517024, 15479401, -3853233, 30460520, 1052596 }, - { -11614875, 13323618, 32618793, 8175907, -15230173, 12596687, 27491595, -4612359, 3179268, -9478891 }, - }, - { - { 31947069, -14366651, -4640583, -15339921, -15125977, -6039709, -14756777, -16411740, 19072640, -9511060 }, - { 11685058, 11822410, 3158003, -13952594, 33402194, -4165066, 5977896, -5215017, 473099, 5040608 }, - { -20290863, 8198642, -27410132, 11602123, 1290375, -2799760, 28326862, 1721092, -19558642, -3131606 }, - }, - }, - { - { - { 7881532, 10687937, 7578723, 7738378, -18951012, -2553952, 21820786, 8076149, -27868496, 11538389 }, - { -19935666, 3899861, 18283497, -6801568, -15728660, -11249211, 8754525, 7446702, -5676054, 5797016 }, - { -11295600, -3793569, -15782110, -7964573, 12708869, -8456199, 2014099, -9050574, -2369172, -5877341 }, - }, - { - { -22472376, -11568741, -27682020, 1146375, 18956691, 16640559, 1192730, -3714199, 15123619, 10811505 }, - { 14352098, -3419715, -18942044, 10822655, 32750596, 4699007, -70363, 15776356, -28886779, -11974553 }, - { -28241164, -8072475, -4978962, -5315317, 29416931, 1847569, -20654173, -16484855, 4714547, -9600655 }, - }, - { - { 15200332, 8368572, 19679101, 15970074, -31872674, 1959451, 24611599, -4543832, -11745876, 12340220 }, - { 12876937, -10480056, 33134381, 6590940, -6307776, 14872440, 9613953, 8241152, 15370987, 9608631 }, - { -4143277, -12014408, 8446281, -391603, 4407738, 13629032, -7724868, 15866074, -28210621, -8814099 }, - }, - { - { 26660628, -15677655, 8393734, 358047, -7401291, 992988, -23904233, 858697, 20571223, 8420556 }, - { 14620715, 13067227, -15447274, 8264467, 14106269, 15080814, 33531827, 12516406, -21574435, -12476749 }, - { 236881, 10476226, 57258, -14677024, 6472998, 2466984, 17258519, 7256740, 8791136, 15069930 }, - }, - { - { 1276410, -9371918, 22949635, -16322807, -23493039, -5702186, 14711875, 4874229, -30663140, -2331391 }, - { 5855666, 4990204, -13711848, 7294284, -7804282, 1924647, -1423175, -7912378, -33069337, 9234253 }, - { 20590503, -9018988, 31529744, -7352666, -2706834, 10650548, 31559055, -11609587, 18979186, 13396066 }, - }, - { - { 24474287, 4968103, 22267082, 4407354, 24063882, -8325180, -18816887, 13594782, 33514650, 7021958 }, - { -11566906, -6565505, -21365085, 15928892, -26158305, 4315421, -25948728, -3916677, -21480480, 12868082 }, - { -28635013, 13504661, 19988037, -2132761, 21078225, 6443208, -21446107, 2244500, -12455797, -8089383 }, - }, - { - { -30595528, 13793479, -5852820, 319136, -25723172, -6263899, 33086546, 8957937, -15233648, 5540521 }, - { -11630176, -11503902, -8119500, -7643073, 2620056, 1022908, -23710744, -1568984, -16128528, -14962807 }, - { 23152971, 775386, 27395463, 14006635, -9701118, 4649512, 1689819, 892185, -11513277, -15205948 }, - }, - { - { 9770129, 9586738, 26496094, 4324120, 1556511, -3550024, 27453819, 4763127, -19179614, 5867134 }, - { -32765025, 1927590, 31726409, -4753295, 23962434, -16019500, 27846559, 5931263, -29749703, -16108455 }, - { 27461885, -2977536, 22380810, 1815854, -23033753, -3031938, 7283490, -15148073, -19526700, 7734629 }, - }, - }, - { - { - { -8010264, -9590817, -11120403, 6196038, 29344158, -13430885, 7585295, -3176626, 18549497, 15302069 }, - { -32658337, -6171222, -7672793, -11051681, 6258878, 13504381, 10458790, -6418461, -8872242, 8424746 }, - { 24687205, 8613276, -30667046, -3233545, 1863892, -1830544, 19206234, 7134917, -11284482, -828919 }, - }, - { - { 11334899, -9218022, 8025293, 12707519, 17523892, -10476071, 10243738, -14685461, -5066034, 16498837 }, - { 8911542, 6887158, -9584260, -6958590, 11145641, -9543680, 17303925, -14124238, 6536641, 10543906 }, - { -28946384, 15479763, -17466835, 568876, -1497683, 11223454, -2669190, -16625574, -27235709, 8876771 }, - }, - { - { -25742899, -12566864, -15649966, -846607, -33026686, -796288, -33481822, 15824474, -604426, -9039817 }, - { 10330056, 70051, 7957388, -9002667, 9764902, 15609756, 27698697, -4890037, 1657394, 3084098 }, - { 10477963, -7470260, 12119566, -13250805, 29016247, -5365589, 31280319, 14396151, -30233575, 15272409 }, - }, - { - { -12288309, 3169463, 28813183, 16658753, 25116432, -5630466, -25173957, -12636138, -25014757, 1950504 }, - { -26180358, 9489187, 11053416, -14746161, -31053720, 5825630, -8384306, -8767532, 15341279, 8373727 }, - { 28685821, 7759505, -14378516, -12002860, -31971820, 4079242, 298136, -10232602, -2878207, 15190420 }, - }, - { - { -32932876, 13806336, -14337485, -15794431, -24004620, 10940928, 8669718, 2742393, -26033313, -6875003 }, - { -1580388, -11729417, -25979658, -11445023, -17411874, -10912854, 9291594, -16247779, -12154742, 6048605 }, - { -30305315, 14843444, 1539301, 11864366, 20201677, 1900163, 13934231, 5128323, 11213262, 9168384 }, - }, - { - { -26280513, 11007847, 19408960, -940758, -18592965, -4328580, -5088060, -11105150, 20470157, -16398701 }, - { -23136053, 9282192, 14855179, -15390078, -7362815, -14408560, -22783952, 14461608, 14042978, 5230683 }, - { 29969567, -2741594, -16711867, -8552442, 9175486, -2468974, 21556951, 3506042, -5933891, -12449708 }, - }, - { - { -3144746, 8744661, 19704003, 4581278, -20430686, 6830683, -21284170, 8971513, -28539189, 15326563 }, - { -19464629, 10110288, -17262528, -3503892, -23500387, 1355669, -15523050, 15300988, -20514118, 9168260 }, - { -5353335, 4488613, -23803248, 16314347, 7780487, -15638939, -28948358, 9601605, 33087103, -9011387 }, - }, - { - { -19443170, -15512900, -20797467, -12445323, -29824447, 10229461, -27444329, -15000531, -5996870, 15664672 }, - { 23294591, -16632613, -22650781, -8470978, 27844204, 11461195, 13099750, -2460356, 18151676, 13417686 }, - { -24722913, -4176517, -31150679, 5988919, -26858785, 6685065, 1661597, -12551441, 15271676, -15452665 }, - }, - }, - { - { - { 11433042, -13228665, 8239631, -5279517, -1985436, -725718, -18698764, 2167544, -6921301, -13440182 }, - { -31436171, 15575146, 30436815, 12192228, -22463353, 9395379, -9917708, -8638997, 12215110, 12028277 }, - { 14098400, 6555944, 23007258, 5757252, -15427832, -12950502, 30123440, 4617780, -16900089, -655628 }, - }, - { - { -4026201, -15240835, 11893168, 13718664, -14809462, 1847385, -15819999, 10154009, 23973261, -12684474 }, - { -26531820, -3695990, -1908898, 2534301, -31870557, -16550355, 18341390, -11419951, 32013174, -10103539 }, - { -25479301, 10876443, -11771086, -14625140, -12369567, 1838104, 21911214, 6354752, 4425632, -837822 }, - }, - { - { -10433389, -14612966, 22229858, -3091047, -13191166, 776729, -17415375, -12020462, 4725005, 14044970 }, - { 19268650, -7304421, 1555349, 8692754, -21474059, -9910664, 6347390, -1411784, -19522291, -16109756 }, - { -24864089, 12986008, -10898878, -5558584, -11312371, -148526, 19541418, 8180106, 9282262, 10282508 }, - }, - { - { -26205082, 4428547, -8661196, -13194263, 4098402, -14165257, 15522535, 8372215, 5542595, -10702683 }, - { -10562541, 14895633, 26814552, -16673850, -17480754, -2489360, -2781891, 6993761, -18093885, 10114655 }, - { -20107055, -929418, 31422704, 10427861, -7110749, 6150669, -29091755, -11529146, 25953725, -106158 }, - }, - { - { -4234397, -8039292, -9119125, 3046000, 2101609, -12607294, 19390020, 6094296, -3315279, 12831125 }, - { -15998678, 7578152, 5310217, 14408357, -33548620, -224739, 31575954, 6326196, 7381791, -2421839 }, - { -20902779, 3296811, 24736065, -16328389, 18374254, 7318640, 6295303, 8082724, -15362489, 12339664 }, - }, - { - { 27724736, 2291157, 6088201, -14184798, 1792727, 5857634, 13848414, 15768922, 25091167, 14856294 }, - { -18866652, 8331043, 24373479, 8541013, -701998, -9269457, 12927300, -12695493, -22182473, -9012899 }, - { -11423429, -5421590, 11632845, 3405020, 30536730, -11674039, -27260765, 13866390, 30146206, 9142070 }, - }, - { - { 3924129, -15307516, -13817122, -10054960, 12291820, -668366, -27702774, 9326384, -8237858, 4171294 }, - { -15921940, 16037937, 6713787, 16606682, -21612135, 2790944, 26396185, 3731949, 345228, -5462949 }, - { -21327538, 13448259, 25284571, 1143661, 20614966, -8849387, 2031539, -12391231, -16253183, -13582083 }, - }, - { - { 31016211, -16722429, 26371392, -14451233, -5027349, 14854137, 17477601, 3842657, 28012650, -16405420 }, - { -5075835, 9368966, -8562079, -4600902, -15249953, 6970560, -9189873, 16292057, -8867157, 3507940 }, - { 29439664, 3537914, 23333589, 6997794, -17555561, -11018068, -15209202, -15051267, -9164929, 6580396 }, - }, - }, - { - { - { -12185861, -7679788, 16438269, 10826160, -8696817, -6235611, 17860444, -9273846, -2095802, 9304567 }, - { 20714564, -4336911, 29088195, 7406487, 11426967, -5095705, 14792667, -14608617, 5289421, -477127 }, - { -16665533, -10650790, -6160345, -13305760, 9192020, -1802462, 17271490, 12349094, 26939669, -3752294 }, - }, - { - { -12889898, 9373458, 31595848, 16374215, 21471720, 13221525, -27283495, -12348559, -3698806, 117887 }, - { 22263325, -6560050, 3984570, -11174646, -15114008, -566785, 28311253, 5358056, -23319780, 541964 }, - { 16259219, 3261970, 2309254, -15534474, -16885711, -4581916, 24134070, -16705829, -13337066, -13552195 }, - }, - { - { 9378160, -13140186, -22845982, -12745264, 28198281, -7244098, -2399684, -717351, 690426, 14876244 }, - { 24977353, -314384, -8223969, -13465086, 28432343, -1176353, -13068804, -12297348, -22380984, 6618999 }, - { -1538174, 11685646, 12944378, 13682314, -24389511, -14413193, 8044829, -13817328, 32239829, -5652762 }, - }, - { - { -18603066, 4762990, -926250, 8885304, -28412480, -3187315, 9781647, -10350059, 32779359, 5095274 }, - { -33008130, -5214506, -32264887, -3685216, 9460461, -9327423, -24601656, 14506724, 21639561, -2630236 }, - { -16400943, -13112215, 25239338, 15531969, 3987758, -4499318, -1289502, -6863535, 17874574, 558605 }, - }, - { - { -13600129, 10240081, 9171883, 16131053, -20869254, 9599700, 33499487, 5080151, 2085892, 5119761 }, - { -22205145, -2519528, -16381601, 414691, -25019550, 2170430, 30634760, -8363614, -31999993, -5759884 }, - { -6845704, 15791202, 8550074, -1312654, 29928809, -12092256, 27534430, -7192145, -22351378, 12961482 }, - }, - { - { -24492060, -9570771, 10368194, 11582341, -23397293, -2245287, 16533930, 8206996, -30194652, -5159638 }, - { -11121496, -3382234, 2307366, 6362031, -135455, 8868177, -16835630, 7031275, 7589640, 8945490 }, - { -32152748, 8917967, 6661220, -11677616, -1192060, -15793393, 7251489, -11182180, 24099109, -14456170 }, - }, - { - { 5019558, -7907470, 4244127, -14714356, -26933272, 6453165, -19118182, -13289025, -6231896, -10280736 }, - { 10853594, 10721687, 26480089, 5861829, -22995819, 1972175, -1866647, -10557898, -3363451, -6441124 }, - { -17002408, 5906790, 221599, -6563147, 7828208, -13248918, 24362661, -2008168, -13866408, 7421392 }, - }, - { - { 8139927, -6546497, 32257646, -5890546, 30375719, 1886181, -21175108, 15441252, 28826358, -4123029 }, - { 6267086, 9695052, 7709135, -16603597, -32869068, -1886135, 14795160, -7840124, 13746021, -1742048 }, - { 28584902, 7787108, -6732942, -15050729, 22846041, -7571236, -3181936, -363524, 4771362, -8419958 }, - }, - }, - { - { - { 24949256, 6376279, -27466481, -8174608, -18646154, -9930606, 33543569, -12141695, 3569627, 11342593 }, - { 26514989, 4740088, 27912651, 3697550, 19331575, -11472339, 6809886, 4608608, 7325975, -14801071 }, - { -11618399, -14554430, -24321212, 7655128, -1369274, 5214312, -27400540, 10258390, -17646694, -8186692 }, - }, - { - { 11431204, 15823007, 26570245, 14329124, 18029990, 4796082, -31446179, 15580664, 9280358, -3973687 }, - { -160783, -10326257, -22855316, -4304997, -20861367, -13621002, -32810901, -11181622, -15545091, 4387441 }, - { -20799378, 12194512, 3937617, -5805892, -27154820, 9340370, -24513992, 8548137, 20617071, -7482001 }, - }, - { - { -938825, -3930586, -8714311, 16124718, 24603125, -6225393, -13775352, -11875822, 24345683, 10325460 }, - { -19855277, -1568885, -22202708, 8714034, 14007766, 6928528, 16318175, -1010689, 4766743, 3552007 }, - { -21751364, -16730916, 1351763, -803421, -4009670, 3950935, 3217514, 14481909, 10988822, -3994762 }, - }, - { - { 15564307, -14311570, 3101243, 5684148, 30446780, -8051356, 12677127, -6505343, -8295852, 13296005 }, - { -9442290, 6624296, -30298964, -11913677, -4670981, -2057379, 31521204, 9614054, -30000824, 12074674 }, - { 4771191, -135239, 14290749, -13089852, 27992298, 14998318, -1413936, -1556716, 29832613, -16391035 }, - }, - { - { 7064884, -7541174, -19161962, -5067537, -18891269, -2912736, 25825242, 5293297, -27122660, 13101590 }, - { -2298563, 2439670, -7466610, 1719965, -27267541, -16328445, 32512469, -5317593, -30356070, -4190957 }, - { -30006540, 10162316, -33180176, 3981723, -16482138, -13070044, 14413974, 9515896, 19568978, 9628812 }, - }, - { - { 33053803, 199357, 15894591, 1583059, 27380243, -4580435, -17838894, -6106839, -6291786, 3437740 }, - { -18978877, 3884493, 19469877, 12726490, 15913552, 13614290, -22961733, 70104, 7463304, 4176122 }, - { -27124001, 10659917, 11482427, -16070381, 12771467, -6635117, -32719404, -5322751, 24216882, 5944158 }, - }, - { - { 8894125, 7450974, -2664149, -9765752, -28080517, -12389115, 19345746, 14680796, 11632993, 5847885 }, - { 26942781, -2315317, 9129564, -4906607, 26024105, 11769399, -11518837, 6367194, -9727230, 4782140 }, - { 19916461, -4828410, -22910704, -11414391, 25606324, -5972441, 33253853, 8220911, 6358847, -1873857 }, - }, - { - { 801428, -2081702, 16569428, 11065167, 29875704, 96627, 7908388, -4480480, -13538503, 1387155 }, - { 19646058, 5720633, -11416706, 12814209, 11607948, 12749789, 14147075, 15156355, -21866831, 11835260 }, - { 19299512, 1155910, 28703737, 14890794, 2925026, 7269399, 26121523, 15467869, -26560550, 5052483 }, - }, - }, - { - { - { -3017432, 10058206, 1980837, 3964243, 22160966, 12322533, -6431123, -12618185, 12228557, -7003677 }, - { 32944382, 14922211, -22844894, 5188528, 21913450, -8719943, 4001465, 13238564, -6114803, 8653815 }, - { 22865569, -4652735, 27603668, -12545395, 14348958, 8234005, 24808405, 5719875, 28483275, 2841751 }, - }, - { - { -16420968, -1113305, -327719, -12107856, 21886282, -15552774, -1887966, -315658, 19932058, -12739203 }, - { -11656086, 10087521, -8864888, -5536143, -19278573, -3055912, 3999228, 13239134, -4777469, -13910208 }, - { 1382174, -11694719, 17266790, 9194690, -13324356, 9720081, 20403944, 11284705, -14013818, 3093230 }, - }, - { - { 16650921, -11037932, -1064178, 1570629, -8329746, 7352753, -302424, 16271225, -24049421, -6691850 }, - { -21911077, -5927941, -4611316, -5560156, -31744103, -10785293, 24123614, 15193618, -21652117, -16739389 }, - { -9935934, -4289447, -25279823, 4372842, 2087473, 10399484, 31870908, 14690798, 17361620, 11864968 }, - }, - { - { -11307610, 6210372, 13206574, 5806320, -29017692, -13967200, -12331205, -7486601, -25578460, -16240689 }, - { 14668462, -12270235, 26039039, 15305210, 25515617, 4542480, 10453892, 6577524, 9145645, -6443880 }, - { 5974874, 3053895, -9433049, -10385191, -31865124, 3225009, -7972642, 3936128, -5652273, -3050304 }, - }, - { - { 30625386, -4729400, -25555961, -12792866, -20484575, 7695099, 17097188, -16303496, -27999779, 1803632 }, - { -3553091, 9865099, -5228566, 4272701, -5673832, -16689700, 14911344, 12196514, -21405489, 7047412 }, - { 20093277, 9920966, -11138194, -5343857, 13161587, 12044805, -32856851, 4124601, -32343828, -10257566 }, - }, - { - { -20788824, 14084654, -13531713, 7842147, 19119038, -13822605, 4752377, -8714640, -21679658, 2288038 }, - { -26819236, -3283715, 29965059, 3039786, -14473765, 2540457, 29457502, 14625692, -24819617, 12570232 }, - { -1063558, -11551823, 16920318, 12494842, 1278292, -5869109, -21159943, -3498680, -11974704, 4724943 }, - }, - { - { 17960970, -11775534, -4140968, -9702530, -8876562, -1410617, -12907383, -8659932, -29576300, 1903856 }, - { 23134274, -14279132, -10681997, -1611936, 20684485, 15770816, -12989750, 3190296, 26955097, 14109738 }, - { 15308788, 5320727, -30113809, -14318877, 22902008, 7767164, 29425325, -11277562, 31960942, 11934971 }, - }, - { - { -27395711, 8435796, 4109644, 12222639, -24627868, 14818669, 20638173, 4875028, 10491392, 1379718 }, - { -13159415, 9197841, 3875503, -8936108, -1383712, -5879801, 33518459, 16176658, 21432314, 12180697 }, - { -11787308, 11500838, 13787581, -13832590, -22430679, 10140205, 1465425, 12689540, -10301319, -13872883 }, - }, - }, - { - { - { 5414091, -15386041, -21007664, 9643570, 12834970, 1186149, -2622916, -1342231, 26128231, 6032912 }, - { -26337395, -13766162, 32496025, -13653919, 17847801, -12669156, 3604025, 8316894, -25875034, -10437358 }, - { 3296484, 6223048, 24680646, -12246460, -23052020, 5903205, -8862297, -4639164, 12376617, 3188849 }, - }, - { - { 29190488, -14659046, 27549113, -1183516, 3520066, -10697301, 32049515, -7309113, -16109234, -9852307 }, - { -14744486, -9309156, 735818, -598978, -20407687, -5057904, 25246078, -15795669, 18640741, -960977 }, - { -6928835, -16430795, 10361374, 5642961, 4910474, 12345252, -31638386, -494430, 10530747, 1053335 }, - }, - { - { -29265967, -14186805, -13538216, -12117373, -19457059, -10655384, -31462369, -2948985, 24018831, 15026644 }, - { -22592535, -3145277, -2289276, 5953843, -13440189, 9425631, 25310643, 13003497, -2314791, -15145616 }, - { -27419985, -603321, -8043984, -1669117, -26092265, 13987819, -27297622, 187899, -23166419, -2531735 }, - }, - { - { -21744398, -13810475, 1844840, 5021428, -10434399, -15911473, 9716667, 16266922, -5070217, 726099 }, - { 29370922, -6053998, 7334071, -15342259, 9385287, 2247707, -13661962, -4839461, 30007388, -15823341 }, - { -936379, 16086691, 23751945, -543318, -1167538, -5189036, 9137109, 730663, 9835848, 4555336 }, - }, - { - { -23376435, 1410446, -22253753, -12899614, 30867635, 15826977, 17693930, 544696, -11985298, 12422646 }, - { 31117226, -12215734, -13502838, 6561947, -9876867, -12757670, -5118685, -4096706, 29120153, 13924425 }, - { -17400879, -14233209, 19675799, -2734756, -11006962, -5858820, -9383939, -11317700, 7240931, -237388 }, - }, - { - { -31361739, -11346780, -15007447, -5856218, -22453340, -12152771, 1222336, 4389483, 3293637, -15551743 }, - { -16684801, -14444245, 11038544, 11054958, -13801175, -3338533, -24319580, 7733547, 12796905, -6335822 }, - { -8759414, -10817836, -25418864, 10783769, -30615557, -9746811, -28253339, 3647836, 3222231, -11160462 }, - }, - { - { 18606113, 1693100, -25448386, -15170272, 4112353, 10045021, 23603893, -2048234, -7550776, 2484985 }, - { 9255317, -3131197, -12156162, -1004256, 13098013, -9214866, 16377220, -2102812, -19802075, -3034702 }, - { -22729289, 7496160, -5742199, 11329249, 19991973, -3347502, -31718148, 9936966, -30097688, -10618797 }, - }, - { - { 21878590, -5001297, 4338336, 13643897, -3036865, 13160960, 19708896, 5415497, -7360503, -4109293 }, - { 27736861, 10103576, 12500508, 8502413, -3413016, -9633558, 10436918, -1550276, -23659143, -8132100 }, - { 19492550, -12104365, -29681976, -852630, -3208171, 12403437, 30066266, 8367329, 13243957, 8709688 }, - }, - }, - { - { - { 12015105, 2801261, 28198131, 10151021, 24818120, -4743133, -11194191, -5645734, 5150968, 7274186 }, - { 2831366, -12492146, 1478975, 6122054, 23825128, -12733586, 31097299, 6083058, 31021603, -9793610 }, - { -2529932, -2229646, 445613, 10720828, -13849527, -11505937, -23507731, 16354465, 15067285, -14147707 }, - }, - { - { 7840942, 14037873, -33364863, 15934016, -728213, -3642706, 21403988, 1057586, -19379462, -12403220 }, - { 915865, -16469274, 15608285, -8789130, -24357026, 6060030, -17371319, 8410997, -7220461, 16527025 }, - { 32922597, -556987, 20336074, -16184568, 10903705, -5384487, 16957574, 52992, 23834301, 6588044 }, - }, - { - { 32752030, 11232950, 3381995, -8714866, 22652988, -10744103, 17159699, 16689107, -20314580, -1305992 }, - { -4689649, 9166776, -25710296, -10847306, 11576752, 12733943, 7924251, -2752281, 1976123, -7249027 }, - { 21251222, 16309901, -2983015, -6783122, 30810597, 12967303, 156041, -3371252, 12331345, -8237197 }, - }, - { - { 8651614, -4477032, -16085636, -4996994, 13002507, 2950805, 29054427, -5106970, 10008136, -4667901 }, - { 31486080, 15114593, -14261250, 12951354, 14369431, -7387845, 16347321, -13662089, 8684155, -10532952 }, - { 19443825, 11385320, 24468943, -9659068, -23919258, 2187569, -26263207, -6086921, 31316348, 14219878 }, - }, - { - { -28594490, 1193785, 32245219, 11392485, 31092169, 15722801, 27146014, 6992409, 29126555, 9207390 }, - { 32382935, 1110093, 18477781, 11028262, -27411763, -7548111, -4980517, 10843782, -7957600, -14435730 }, - { 2814918, 7836403, 27519878, -7868156, -20894015, -11553689, -21494559, 8550130, 28346258, 1994730 }, - }, - { - { -19578299, 8085545, -14000519, -3948622, 2785838, -16231307, -19516951, 7174894, 22628102, 8115180 }, - { -30405132, 955511, -11133838, -15078069, -32447087, -13278079, -25651578, 3317160, -9943017, 930272 }, - { -15303681, -6833769, 28856490, 1357446, 23421993, 1057177, 24091212, -1388970, -22765376, -10650715 }, - }, - { - { -22751231, -5303997, -12907607, -12768866, -15811511, -7797053, -14839018, -16554220, -1867018, 8398970 }, - { -31969310, 2106403, -4736360, 1362501, 12813763, 16200670, 22981545, -6291273, 18009408, -15772772 }, - { -17220923, -9545221, -27784654, 14166835, 29815394, 7444469, 29551787, -3727419, 19288549, 1325865 }, - }, - { - { 15100157, -15835752, -23923978, -1005098, -26450192, 15509408, 12376730, -3479146, 33166107, -8042750 }, - { 20909231, 13023121, -9209752, 16251778, -5778415, -8094914, 12412151, 10018715, 2213263, -13878373 }, - { 32529814, -11074689, 30361439, -16689753, -9135940, 1513226, 22922121, 6382134, -5766928, 8371348 }, - }, - }, - { - { - { 9923462, 11271500, 12616794, 3544722, -29998368, -1721626, 12891687, -8193132, -26442943, 10486144 }, - { -22597207, -7012665, 8587003, -8257861, 4084309, -12970062, 361726, 2610596, -23921530, -11455195 }, - { 5408411, -1136691, -4969122, 10561668, 24145918, 14240566, 31319731, -4235541, 19985175, -3436086 }, - }, - { - { -13994457, 16616821, 14549246, 3341099, 32155958, 13648976, -17577068, 8849297, 65030, 8370684 }, - { -8320926, -12049626, 31204563, 5839400, -20627288, -1057277, -19442942, 6922164, 12743482, -9800518 }, - { -2361371, 12678785, 28815050, 4759974, -23893047, 4884717, 23783145, 11038569, 18800704, 255233 }, - }, - { - { -5269658, -1773886, 13957886, 7990715, 23132995, 728773, 13393847, 9066957, 19258688, -14753793 }, - { -2936654, -10827535, -10432089, 14516793, -3640786, 4372541, -31934921, 2209390, -1524053, 2055794 }, - { 580882, 16705327, 5468415, -2683018, -30926419, -14696000, -7203346, -8994389, -30021019, 7394435 }, - }, - { - { 23838809, 1822728, -15738443, 15242727, 8318092, -3733104, -21672180, -3492205, -4821741, 14799921 }, - { 13345610, 9759151, 3371034, -16137791, 16353039, 8577942, 31129804, 13496856, -9056018, 7402518 }, - { 2286874, -4435931, -20042458, -2008336, -13696227, 5038122, 11006906, -15760352, 8205061, 1607563 }, - }, - { - { 14414086, -8002132, 3331830, -3208217, 22249151, -5594188, 18364661, -2906958, 30019587, -9029278 }, - { -27688051, 1585953, -10775053, 931069, -29120221, -11002319, -14410829, 12029093, 9944378, 8024 }, - { 4368715, -3709630, 29874200, -15022983, -20230386, -11410704, -16114594, -999085, -8142388, 5640030 }, - }, - { - { 10299610, 13746483, 11661824, 16234854, 7630238, 5998374, 9809887, -16694564, 15219798, -14327783 }, - { 27425505, -5719081, 3055006, 10660664, 23458024, 595578, -15398605, -1173195, -18342183, 9742717 }, - { 6744077, 2427284, 26042789, 2720740, -847906, 1118974, 32324614, 7406442, 12420155, 1994844 }, - }, - { - { 14012521, -5024720, -18384453, -9578469, -26485342, -3936439, -13033478, -10909803, 24319929, -6446333 }, - { 16412690, -4507367, 10772641, 15929391, -17068788, -4658621, 10555945, -10484049, -30102368, -4739048 }, - { 22397382, -7767684, -9293161, -12792868, 17166287, -9755136, -27333065, 6199366, 21880021, -12250760 }, - }, - { - { -4283307, 5368523, -31117018, 8163389, -30323063, 3209128, 16557151, 8890729, 8840445, 4957760 }, - { -15447727, 709327, -6919446, -10870178, -29777922, 6522332, -21720181, 12130072, -14796503, 5005757 }, - { -2114751, -14308128, 23019042, 15765735, -25269683, 6002752, 10183197, -13239326, -16395286, -2176112 }, - }, - }, - { - { - { -19025756, 1632005, 13466291, -7995100, -23640451, 16573537, -32013908, -3057104, 22208662, 2000468 }, - { 3065073, -1412761, -25598674, -361432, -17683065, -5703415, -8164212, 11248527, -3691214, -7414184 }, - { 10379208, -6045554, 8877319, 1473647, -29291284, -12507580, 16690915, 2553332, -3132688, 16400289 }, - }, - { - { 15716668, 1254266, -18472690, 7446274, -8448918, 6344164, -22097271, -7285580, 26894937, 9132066 }, - { 24158887, 12938817, 11085297, -8177598, -28063478, -4457083, -30576463, 64452, -6817084, -2692882 }, - { 13488534, 7794716, 22236231, 5989356, 25426474, -12578208, 2350710, -3418511, -4688006, 2364226 }, - }, - { - { 16335052, 9132434, 25640582, 6678888, 1725628, 8517937, -11807024, -11697457, 15445875, -7798101 }, - { 29004207, -7867081, 28661402, -640412, -12794003, -7943086, 31863255, -4135540, -278050, -15759279 }, - { -6122061, -14866665, -28614905, 14569919, -10857999, -3591829, 10343412, -6976290, -29828287, -10815811 }, - }, - { - { 27081650, 3463984, 14099042, -4517604, 1616303, -6205604, 29542636, 15372179, 17293797, 960709 }, - { 20263915, 11434237, -5765435, 11236810, 13505955, -10857102, -16111345, 6493122, -19384511, 7639714 }, - { -2830798, -14839232, 25403038, -8215196, -8317012, -16173699, 18006287, -16043750, 29994677, -15808121 }, - }, - { - { 9769828, 5202651, -24157398, -13631392, -28051003, -11561624, -24613141, -13860782, -31184575, 709464 }, - { 12286395, 13076066, -21775189, -1176622, -25003198, 4057652, -32018128, -8890874, 16102007, 13205847 }, - { 13733362, 5599946, 10557076, 3195751, -5557991, 8536970, -25540170, 8525972, 10151379, 10394400 }, - }, - { - { 4024660, -16137551, 22436262, 12276534, -9099015, -2686099, 19698229, 11743039, -33302334, 8934414 }, - { -15879800, -4525240, -8580747, -2934061, 14634845, -698278, -9449077, 3137094, -11536886, 11721158 }, - { 17555939, -5013938, 8268606, 2331751, -22738815, 9761013, 9319229, 8835153, -9205489, -1280045 }, - }, - { - { -461409, -7830014, 20614118, 16688288, -7514766, -4807119, 22300304, 505429, 6108462, -6183415 }, - { -5070281, 12367917, -30663534, 3234473, 32617080, -8422642, 29880583, -13483331, -26898490, -7867459 }, - { -31975283, 5726539, 26934134, 10237677, -3173717, -605053, 24199304, 3795095, 7592688, -14992079 }, - }, - { - { 21594432, -14964228, 17466408, -4077222, 32537084, 2739898, 6407723, 12018833, -28256052, 4298412 }, - { -20650503, -11961496, -27236275, 570498, 3767144, -1717540, 13891942, -1569194, 13717174, 10805743 }, - { -14676630, -15644296, 15287174, 11927123, 24177847, -8175568, -796431, 14860609, -26938930, -5863836 }, - }, - }, - { - { - { 12962541, 5311799, -10060768, 11658280, 18855286, -7954201, 13286263, -12808704, -4381056, 9882022 }, - { 18512079, 11319350, -20123124, 15090309, 18818594, 5271736, -22727904, 3666879, -23967430, -3299429 }, - { -6789020, -3146043, 16192429, 13241070, 15898607, -14206114, -10084880, -6661110, -2403099, 5276065 }, - }, - { - { 30169808, -5317648, 26306206, -11750859, 27814964, 7069267, 7152851, 3684982, 1449224, 13082861 }, - { 10342826, 3098505, 2119311, 193222, 25702612, 12233820, 23697382, 15056736, -21016438, -8202000 }, - { -33150110, 3261608, 22745853, 7948688, 19370557, -15177665, -26171976, 6482814, -10300080, -11060101 }, - }, - { - { 32869458, -5408545, 25609743, 15678670, -10687769, -15471071, 26112421, 2521008, -22664288, 6904815 }, - { 29506923, 4457497, 3377935, -9796444, -30510046, 12935080, 1561737, 3841096, -29003639, -6657642 }, - { 10340844, -6630377, -18656632, -2278430, 12621151, -13339055, 30878497, -11824370, -25584551, 5181966 }, - }, - { - { 25940115, -12658025, 17324188, -10307374, -8671468, 15029094, 24396252, -16450922, -2322852, -12388574 }, - { -21765684, 9916823, -1300409, 4079498, -1028346, 11909559, 1782390, 12641087, 20603771, -6561742 }, - { -18882287, -11673380, 24849422, 11501709, 13161720, -4768874, 1925523, 11914390, 4662781, 7820689 }, - }, - { - { 12241050, -425982, 8132691, 9393934, 32846760, -1599620, 29749456, 12172924, 16136752, 15264020 }, - { -10349955, -14680563, -8211979, 2330220, -17662549, -14545780, 10658213, 6671822, 19012087, 3772772 }, - { 3753511, -3421066, 10617074, 2028709, 14841030, -6721664, 28718732, -15762884, 20527771, 12988982 }, - }, - { - { -14822485, -5797269, -3707987, 12689773, -898983, -10914866, -24183046, -10564943, 3299665, -12424953 }, - { -16777703, -15253301, -9642417, 4978983, 3308785, 8755439, 6943197, 6461331, -25583147, 8991218 }, - { -17226263, 1816362, -1673288, -6086439, 31783888, -8175991, -32948145, 7417950, -30242287, 1507265 }, - }, - { - { 29692663, 6829891, -10498800, 4334896, 20945975, -11906496, -28887608, 8209391, 14606362, -10647073 }, - { -3481570, 8707081, 32188102, 5672294, 22096700, 1711240, -33020695, 9761487, 4170404, -2085325 }, - { -11587470, 14855945, -4127778, -1531857, -26649089, 15084046, 22186522, 16002000, -14276837, -8400798 }, - }, - { - { -4811456, 13761029, -31703877, -2483919, -3312471, 7869047, -7113572, -9620092, 13240845, 10965870 }, - { -7742563, -8256762, -14768334, -13656260, -23232383, 12387166, 4498947, 14147411, 29514390, 4302863 }, - { -13413405, -12407859, 20757302, -13801832, 14785143, 8976368, -5061276, -2144373, 17846988, -13971927 }, - }, - }, - { - { - { -2244452, -754728, -4597030, -1066309, -6247172, 1455299, -21647728, -9214789, -5222701, 12650267 }, - { -9906797, -16070310, 21134160, 12198166, -27064575, 708126, 387813, 13770293, -19134326, 10958663 }, - { 22470984, 12369526, 23446014, -5441109, -21520802, -9698723, -11772496, -11574455, -25083830, 4271862 }, - }, - { - { -25169565, -10053642, -19909332, 15361595, -5984358, 2159192, 75375, -4278529, -32526221, 8469673 }, - { 15854970, 4148314, -8893890, 7259002, 11666551, 13824734, -30531198, 2697372, 24154791, -9460943 }, - { 15446137, -15806644, 29759747, 14019369, 30811221, -9610191, -31582008, 12840104, 24913809, 9815020 }, - }, - { - { -4709286, -5614269, -31841498, -12288893, -14443537, 10799414, -9103676, 13438769, 18735128, 9466238 }, - { 11933045, 9281483, 5081055, -5183824, -2628162, -4905629, -7727821, -10896103, -22728655, 16199064 }, - { 14576810, 379472, -26786533, -8317236, -29426508, -10812974, -102766, 1876699, 30801119, 2164795 }, - }, - { - { 15995086, 3199873, 13672555, 13712240, -19378835, -4647646, -13081610, -15496269, -13492807, 1268052 }, - { -10290614, -3659039, -3286592, 10948818, 23037027, 3794475, -3470338, -12600221, -17055369, 3565904 }, - { 29210088, -9419337, -5919792, -4952785, 10834811, -13327726, -16512102, -10820713, -27162222, -14030531 }, - }, - { - { -13161890, 15508588, 16663704, -8156150, -28349942, 9019123, -29183421, -3769423, 2244111, -14001979 }, - { -5152875, -3800936, -9306475, -6071583, 16243069, 14684434, -25673088, -16180800, 13491506, 4641841 }, - { 10813417, 643330, -19188515, -728916, 30292062, -16600078, 27548447, -7721242, 14476989, -12767431 }, - }, - { - { 10292079, 9984945, 6481436, 8279905, -7251514, 7032743, 27282937, -1644259, -27912810, 12651324 }, - { -31185513, -813383, 22271204, 11835308, 10201545, 15351028, 17099662, 3988035, 21721536, -3148940 }, - { 10202177, -6545839, -31373232, -9574638, -32150642, -8119683, -12906320, 3852694, 13216206, 14842320 }, - }, - { - { -15815640, -10601066, -6538952, -7258995, -6984659, -6581778, -31500847, 13765824, -27434397, 9900184 }, - { 14465505, -13833331, -32133984, -14738873, -27443187, 12990492, 33046193, 15796406, -7051866, -8040114 }, - { 30924417, -8279620, 6359016, -12816335, 16508377, 9071735, -25488601, 15413635, 9524356, -7018878 }, - }, - { - { 12274201, -13175547, 32627641, -1785326, 6736625, 13267305, 5237659, -5109483, 15663516, 4035784 }, - { -2951309, 8903985, 17349946, 601635, -16432815, -4612556, -13732739, -15889334, -22258478, 4659091 }, - { -16916263, -4952973, -30393711, -15158821, 20774812, 15897498, 5736189, 15026997, -2178256, -13455585 }, - }, - }, - { - { - { -8858980, -2219056, 28571666, -10155518, -474467, -10105698, -3801496, 278095, 23440562, -290208 }, - { 10226241, -5928702, 15139956, 120818, -14867693, 5218603, 32937275, 11551483, -16571960, -7442864 }, - { 17932739, -12437276, -24039557, 10749060, 11316803, 7535897, 22503767, 5561594, -3646624, 3898661 }, - }, - { - { 7749907, -969567, -16339731, -16464, -25018111, 15122143, -1573531, 7152530, 21831162, 1245233 }, - { 26958459, -14658026, 4314586, 8346991, -5677764, 11960072, -32589295, -620035, -30402091, -16716212 }, - { -12165896, 9166947, 33491384, 13673479, 29787085, 13096535, 6280834, 14587357, -22338025, 13987525 }, - }, - { - { -24349909, 7778775, 21116000, 15572597, -4833266, -5357778, -4300898, -5124639, -7469781, -2858068 }, - { 9681908, -6737123, -31951644, 13591838, -6883821, 386950, 31622781, 6439245, -14581012, 4091397 }, - { -8426427, 1470727, -28109679, -1596990, 3978627, -5123623, -19622683, 12092163, 29077877, -14741988 }, - }, - { - { 5269168, -6859726, -13230211, -8020715, 25932563, 1763552, -5606110, -5505881, -20017847, 2357889 }, - { 32264008, -15407652, -5387735, -1160093, -2091322, -3946900, 23104804, -12869908, 5727338, 189038 }, - { 14609123, -8954470, -6000566, -16622781, -14577387, -7743898, -26745169, 10942115, -25888931, -14884697 }, - }, - { - { 20513500, 5557931, -15604613, 7829531, 26413943, -2019404, -21378968, 7471781, 13913677, -5137875 }, - { -25574376, 11967826, 29233242, 12948236, -6754465, 4713227, -8940970, 14059180, 12878652, 8511905 }, - { -25656801, 3393631, -2955415, -7075526, -2250709, 9366908, -30223418, 6812974, 5568676, -3127656 }, - }, - { - { 11630004, 12144454, 2116339, 13606037, 27378885, 15676917, -17408753, -13504373, -14395196, 8070818 }, - { 27117696, -10007378, -31282771, -5570088, 1127282, 12772488, -29845906, 10483306, -11552749, -1028714 }, - { 10637467, -5688064, 5674781, 1072708, -26343588, -6982302, -1683975, 9177853, -27493162, 15431203 }, - }, - { - { 20525145, 10892566, -12742472, 12779443, -29493034, 16150075, -28240519, 14943142, -15056790, -7935931 }, - { -30024462, 5626926, -551567, -9981087, 753598, 11981191, 25244767, -3239766, -3356550, 9594024 }, - { -23752644, 2636870, -5163910, -10103818, 585134, 7877383, 11345683, -6492290, 13352335, -10977084 }, - }, - { - { -1931799, -5407458, 3304649, -12884869, 17015806, -4877091, -29783850, -7752482, -13215537, -319204 }, - { 20239939, 6607058, 6203985, 3483793, -18386976, -779229, -20723742, 15077870, -22750759, 14523817 }, - { 27406042, -6041657, 27423596, -4497394, 4996214, 10002360, -28842031, -4545494, -30172742, -4805667 }, - }, - }, - { - { - { 11374242, 12660715, 17861383, -12540833, 10935568, 1099227, -13886076, -9091740, -27727044, 11358504 }, - { -12730809, 10311867, 1510375, 10778093, -2119455, -9145702, 32676003, 11149336, -26123651, 4985768 }, - { -19096303, 341147, -6197485, -239033, 15756973, -8796662, -983043, 13794114, -19414307, -15621255 }, - }, - { - { 6490081, 11940286, 25495923, -7726360, 8668373, -8751316, 3367603, 6970005, -1691065, -9004790 }, - { 1656497, 13457317, 15370807, 6364910, 13605745, 8362338, -19174622, -5475723, -16796596, -5031438 }, - { -22273315, -13524424, -64685, -4334223, -18605636, -10921968, -20571065, -7007978, -99853, -10237333 }, - }, - { - { 17747465, 10039260, 19368299, -4050591, -20630635, -16041286, 31992683, -15857976, -29260363, -5511971 }, - { 31932027, -4986141, -19612382, 16366580, 22023614, 88450, 11371999, -3744247, 4882242, -10626905 }, - { 29796507, 37186, 19818052, 10115756, -11829032, 3352736, 18551198, 3272828, -5190932, -4162409 }, - }, - { - { 12501286, 4044383, -8612957, -13392385, -32430052, 5136599, -19230378, -3529697, 330070, -3659409 }, - { 6384877, 2899513, 17807477, 7663917, -2358888, 12363165, 25366522, -8573892, -271295, 12071499 }, - { -8365515, -4042521, 25133448, -4517355, -6211027, 2265927, -32769618, 1936675, -5159697, 3829363 }, - }, - { - { 28425966, -5835433, -577090, -4697198, -14217555, 6870930, 7921550, -6567787, 26333140, 14267664 }, - { -11067219, 11871231, 27385719, -10559544, -4585914, -11189312, 10004786, -8709488, -21761224, 8930324 }, - { -21197785, -16396035, 25654216, -1725397, 12282012, 11008919, 1541940, 4757911, -26491501, -16408940 }, - }, - { - { 13537262, -7759490, -20604840, 10961927, -5922820, -13218065, -13156584, 6217254, -15943699, 13814990 }, - { -17422573, 15157790, 18705543, 29619, 24409717, -260476, 27361681, 9257833, -1956526, -1776914 }, - { -25045300, -10191966, 15366585, 15166509, -13105086, 8423556, -29171540, 12361135, -18685978, 4578290 }, - }, - { - { 24579768, 3711570, 1342322, -11180126, -27005135, 14124956, -22544529, 14074919, 21964432, 8235257 }, - { -6528613, -2411497, 9442966, -5925588, 12025640, -1487420, -2981514, -1669206, 13006806, 2355433 }, - { -16304899, -13605259, -6632427, -5142349, 16974359, -10911083, 27202044, 1719366, 1141648, -12796236 }, - }, - { - { -12863944, -13219986, -8318266, -11018091, -6810145, -4843894, 13475066, -3133972, 32674895, 13715045 }, - { 11423335, -5468059, 32344216, 8962751, 24989809, 9241752, -13265253, 16086212, -28740881, -15642093 }, - { -1409668, 12530728, -6368726, 10847387, 19531186, -14132160, -11709148, 7791794, -27245943, 4383347 }, - }, - }, - { - { - { -28970898, 5271447, -1266009, -9736989, -12455236, 16732599, -4862407, -4906449, 27193557, 6245191 }, - { -15193956, 5362278, -1783893, 2695834, 4960227, 12840725, 23061898, 3260492, 22510453, 8577507 }, - { -12632451, 11257346, -32692994, 13548177, -721004, 10879011, 31168030, 13952092, -29571492, -3635906 }, - }, - { - { 3877321, -9572739, 32416692, 5405324, -11004407, -13656635, 3759769, 11935320, 5611860, 8164018 }, - { -16275802, 14667797, 15906460, 12155291, -22111149, -9039718, 32003002, -8832289, 5773085, -8422109 }, - { -23788118, -8254300, 1950875, 8937633, 18686727, 16459170, -905725, 12376320, 31632953, 190926 }, - }, - { - { -24593607, -16138885, -8423991, 13378746, 14162407, 6901328, -8288749, 4508564, -25341555, -3627528 }, - { 8884438, -5884009, 6023974, 10104341, -6881569, -4941533, 18722941, -14786005, -1672488, 827625 }, - { -32720583, -16289296, -32503547, 7101210, 13354605, 2659080, -1800575, -14108036, -24878478, 1541286 }, - }, - { - { 2901347, -1117687, 3880376, -10059388, -17620940, -3612781, -21802117, -3567481, 20456845, -1885033 }, - { 27019610, 12299467, -13658288, -1603234, -12861660, -4861471, -19540150, -5016058, 29439641, 15138866 }, - { 21536104, -6626420, -32447818, -10690208, -22408077, 5175814, -5420040, -16361163, 7779328, 109896 }, - }, - { - { 30279744, 14648750, -8044871, 6425558, 13639621, -743509, 28698390, 12180118, 23177719, -554075 }, - { 26572847, 3405927, -31701700, 12890905, -19265668, 5335866, -6493768, 2378492, 4439158, -13279347 }, - { -22716706, 3489070, -9225266, -332753, 18875722, -1140095, 14819434, -12731527, -17717757, -5461437 }, - }, - { - { -5056483, 16566551, 15953661, 3767752, -10436499, 15627060, -820954, 2177225, 8550082, -15114165 }, - { -18473302, 16596775, -381660, 15663611, 22860960, 15585581, -27844109, -3582739, -23260460, -8428588 }, - { -32480551, 15707275, -8205912, -5652081, 29464558, 2713815, -22725137, 15860482, -21902570, 1494193 }, - }, - { - { -19562091, -14087393, -25583872, -9299552, 13127842, 759709, 21923482, 16529112, 8742704, 12967017 }, - { -28464899, 1553205, 32536856, -10473729, -24691605, -406174, -8914625, -2933896, -29903758, 15553883 }, - { 21877909, 3230008, 9881174, 10539357, -4797115, 2841332, 11543572, 14513274, 19375923, -12647961 }, - }, - { - { 8832269, -14495485, 13253511, 5137575, 5037871, 4078777, 24880818, -6222716, 2862653, 9455043 }, - { 29306751, 5123106, 20245049, -14149889, 9592566, 8447059, -2077124, -2990080, 15511449, 4789663 }, - { -20679756, 7004547, 8824831, -9434977, -4045704, -3750736, -5754762, 108893, 23513200, 16652362 }, - }, - }, - { - { - { -33256173, 4144782, -4476029, -6579123, 10770039, -7155542, -6650416, -12936300, -18319198, 10212860 }, - { 2756081, 8598110, 7383731, -6859892, 22312759, -1105012, 21179801, 2600940, -9988298, -12506466 }, - { -24645692, 13317462, -30449259, -15653928, 21365574, -10869657, 11344424, 864440, -2499677, -16710063 }, - }, - { - { -26432803, 6148329, -17184412, -14474154, 18782929, -275997, -22561534, 211300, 2719757, 4940997 }, - { -1323882, 3911313, -6948744, 14759765, -30027150, 7851207, 21690126, 8518463, 26699843, 5276295 }, - { -13149873, -6429067, 9396249, 365013, 24703301, -10488939, 1321586, 149635, -15452774, 7159369 }, - }, - { - { 9987780, -3404759, 17507962, 9505530, 9731535, -2165514, 22356009, 8312176, 22477218, -8403385 }, - { 18155857, -16504990, 19744716, 9006923, 15154154, -10538976, 24256460, -4864995, -22548173, 9334109 }, - { 2986088, -4911893, 10776628, -3473844, 10620590, -7083203, -21413845, 14253545, -22587149, 536906 }, - }, - { - { 4377756, 8115836, 24567078, 15495314, 11625074, 13064599, 7390551, 10589625, 10838060, -15420424 }, - { -19342404, 867880, 9277171, -3218459, -14431572, -1986443, 19295826, -15796950, 6378260, 699185 }, - { 7895026, 4057113, -7081772, -13077756, -17886831, -323126, -716039, 15693155, -5045064, -13373962 }, - }, - { - { -7737563, -5869402, -14566319, -7406919, 11385654, 13201616, 31730678, -10962840, -3918636, -9669325 }, - { 10188286, -15770834, -7336361, 13427543, 22223443, 14896287, 30743455, 7116568, -21786507, 5427593 }, - { 696102, 13206899, 27047647, -10632082, 15285305, -9853179, 10798490, -4578720, 19236243, 12477404 }, - }, - { - { -11229439, 11243796, -17054270, -8040865, -788228, -8167967, -3897669, 11180504, -23169516, 7733644 }, - { 17800790, -14036179, -27000429, -11766671, 23887827, 3149671, 23466177, -10538171, 10322027, 15313801 }, - { 26246234, 11968874, 32263343, -5468728, 6830755, -13323031, -15794704, -101982, -24449242, 10890804 }, - }, - { - { -31365647, 10271363, -12660625, -6267268, 16690207, -13062544, -14982212, 16484931, 25180797, -5334884 }, - { -586574, 10376444, -32586414, -11286356, 19801893, 10997610, 2276632, 9482883, 316878, 13820577 }, - { -9882808, -4510367, -2115506, 16457136, -11100081, 11674996, 30756178, -7515054, 30696930, -3712849 }, - }, - { - { 32988917, -9603412, 12499366, 7910787, -10617257, -11931514, -7342816, -9985397, -32349517, 7392473 }, - { -8855661, 15927861, 9866406, -3649411, -2396914, -16655781, -30409476, -9134995, 25112947, -2926644 }, - { -2504044, -436966, 25621774, -5678772, 15085042, -5479877, -24884878, -13526194, 5537438, -13914319 }, - }, - }, - { - { - { -11225584, 2320285, -9584280, 10149187, -33444663, 5808648, -14876251, -1729667, 31234590, 6090599 }, - { -9633316, 116426, 26083934, 2897444, -6364437, -2688086, 609721, 15878753, -6970405, -9034768 }, - { -27757857, 247744, -15194774, -9002551, 23288161, -10011936, -23869595, 6503646, 20650474, 1804084 }, - }, - { - { -27589786, 15456424, 8972517, 8469608, 15640622, 4439847, 3121995, -10329713, 27842616, -202328 }, - { -15306973, 2839644, 22530074, 10026331, 4602058, 5048462, 28248656, 5031932, -11375082, 12714369 }, - { 20807691, -7270825, 29286141, 11421711, -27876523, -13868230, -21227475, 1035546, -19733229, 12796920 }, - }, - { - { 12076899, -14301286, -8785001, -11848922, -25012791, 16400684, -17591495, -12899438, 3480665, -15182815 }, - { -32361549, 5457597, 28548107, 7833186, 7303070, -11953545, -24363064, -15921875, -33374054, 2771025 }, - { -21389266, 421932, 26597266, 6860826, 22486084, -6737172, -17137485, -4210226, -24552282, 15673397 }, - }, - { - { -20184622, 2338216, 19788685, -9620956, -4001265, -8740893, -20271184, 4733254, 3727144, -12934448 }, - { 6120119, 814863, -11794402, -622716, 6812205, -15747771, 2019594, 7975683, 31123697, -10958981 }, - { 30069250, -11435332, 30434654, 2958439, 18399564, -976289, 12296869, 9204260, -16432438, 9648165 }, - }, - { - { 32705432, -1550977, 30705658, 7451065, -11805606, 9631813, 3305266, 5248604, -26008332, -11377501 }, - { 17219865, 2375039, -31570947, -5575615, -19459679, 9219903, 294711, 15298639, 2662509, -16297073 }, - { -1172927, -7558695, -4366770, -4287744, -21346413, -8434326, 32087529, -1222777, 32247248, -14389861 }, - }, - { - { 14312628, 1221556, 17395390, -8700143, -4945741, -8684635, -28197744, -9637817, -16027623, -13378845 }, - { -1428825, -9678990, -9235681, 6549687, -7383069, -468664, 23046502, 9803137, 17597934, 2346211 }, - { 18510800, 15337574, 26171504, 981392, -22241552, 7827556, -23491134, -11323352, 3059833, -11782870 }, - }, - { - { 10141598, 6082907, 17829293, -1947643, 9830092, 13613136, -25556636, -5544586, -33502212, 3592096 }, - { 33114168, -15889352, -26525686, -13343397, 33076705, 8716171, 1151462, 1521897, -982665, -6837803 }, - { -32939165, -4255815, 23947181, -324178, -33072974, -12305637, -16637686, 3891704, 26353178, 693168 }, - }, - { - { 30374239, 1595580, -16884039, 13186931, 4600344, 406904, 9585294, -400668, 31375464, 14369965 }, - { -14370654, -7772529, 1510301, 6434173, -18784789, -6262728, 32732230, -13108839, 17901441, 16011505 }, - { 18171223, -11934626, -12500402, 15197122, -11038147, -15230035, -19172240, -16046376, 8764035, 12309598 }, - }, - }, - { - { - { 5975908, -5243188, -19459362, -9681747, -11541277, 14015782, -23665757, 1228319, 17544096, -10593782 }, - { 5811932, -1715293, 3442887, -2269310, -18367348, -8359541, -18044043, -15410127, -5565381, 12348900 }, - { -31399660, 11407555, 25755363, 6891399, -3256938, 14872274, -24849353, 8141295, -10632534, -585479 }, - }, - { - { -12675304, 694026, -5076145, 13300344, 14015258, -14451394, -9698672, -11329050, 30944593, 1130208 }, - { 8247766, -6710942, -26562381, -7709309, -14401939, -14648910, 4652152, 2488540, 23550156, -271232 }, - { 17294316, -3788438, 7026748, 15626851, 22990044, 113481, 2267737, -5908146, -408818, -137719 }, - }, - { - { 16091085, -16253926, 18599252, 7340678, 2137637, -1221657, -3364161, 14550936, 3260525, -7166271 }, - { -4910104, -13332887, 18550887, 10864893, -16459325, -7291596, -23028869, -13204905, -12748722, 2701326 }, - { -8574695, 16099415, 4629974, -16340524, -20786213, -6005432, -10018363, 9276971, 11329923, 1862132 }, - }, - { - { 14763076, -15903608, -30918270, 3689867, 3511892, 10313526, -21951088, 12219231, -9037963, -940300 }, - { 8894987, -3446094, 6150753, 3013931, 301220, 15693451, -31981216, -2909717, -15438168, 11595570 }, - { 15214962, 3537601, -26238722, -14058872, 4418657, -15230761, 13947276, 10730794, -13489462, -4363670 }, - }, - { - { -2538306, 7682793, 32759013, 263109, -29984731, -7955452, -22332124, -10188635, 977108, 699994 }, - { -12466472, 4195084, -9211532, 550904, -15565337, 12917920, 19118110, -439841, -30534533, -14337913 }, - { 31788461, -14507657, 4799989, 7372237, 8808585, -14747943, 9408237, -10051775, 12493932, -5409317 }, - }, - { - { -25680606, 5260744, -19235809, -6284470, -3695942, 16566087, 27218280, 2607121, 29375955, 6024730 }, - { 842132, -2794693, -4763381, -8722815, 26332018, -12405641, 11831880, 6985184, -9940361, 2854096 }, - { -4847262, -7969331, 2516242, -5847713, 9695691, -7221186, 16512645, 960770, 12121869, 16648078 }, - }, - { - { -15218652, 14667096, -13336229, 2013717, 30598287, -464137, -31504922, -7882064, 20237806, 2838411 }, - { -19288047, 4453152, 15298546, -16178388, 22115043, -15972604, 12544294, -13470457, 1068881, -12499905 }, - { -9558883, -16518835, 33238498, 13506958, 30505848, -1114596, -8486907, -2630053, 12521378, 4845654 }, - }, - { - { -28198521, 10744108, -2958380, 10199664, 7759311, -13088600, 3409348, -873400, -6482306, -12885870 }, - { -23561822, 6230156, -20382013, 10655314, -24040585, -11621172, 10477734, -1240216, -3113227, 13974498 }, - { 12966261, 15550616, -32038948, -1615346, 21025980, -629444, 5642325, 7188737, 18895762, 12629579 }, - }, - }, - { - { - { 14741879, -14946887, 22177208, -11721237, 1279741, 8058600, 11758140, 789443, 32195181, 3895677 }, - { 10758205, 15755439, -4509950, 9243698, -4879422, 6879879, -2204575, -3566119, -8982069, 4429647 }, - { -2453894, 15725973, -20436342, -10410672, -5803908, -11040220, -7135870, -11642895, 18047436, -15281743 }, - }, - { - { -25173001, -11307165, 29759956, 11776784, -22262383, -15820455, 10993114, -12850837, -17620701, -9408468 }, - { 21987233, 700364, -24505048, 14972008, -7774265, -5718395, 32155026, 2581431, -29958985, 8773375 }, - { -25568350, 454463, -13211935, 16126715, 25240068, 8594567, 20656846, 12017935, -7874389, -13920155 }, - }, - { - { 6028182, 6263078, -31011806, -11301710, -818919, 2461772, -31841174, -5468042, -1721788, -2776725 }, - { -12278994, 16624277, 987579, -5922598, 32908203, 1248608, 7719845, -4166698, 28408820, 6816612 }, - { -10358094, -8237829, 19549651, -12169222, 22082623, 16147817, 20613181, 13982702, -10339570, 5067943 }, - }, - { - { -30505967, -3821767, 12074681, 13582412, -19877972, 2443951, -19719286, 12746132, 5331210, -10105944 }, - { 30528811, 3601899, -1957090, 4619785, -27361822, -15436388, 24180793, -12570394, 27679908, -1648928 }, - { 9402404, -13957065, 32834043, 10838634, -26580150, -13237195, 26653274, -8685565, 22611444, -12715406 }, - }, - { - { 22190590, 1118029, 22736441, 15130463, -30460692, -5991321, 19189625, -4648942, 4854859, 6622139 }, - { -8310738, -2953450, -8262579, -3388049, -10401731, -271929, 13424426, -3567227, 26404409, 13001963 }, - { -31241838, -15415700, -2994250, 8939346, 11562230, -12840670, -26064365, -11621720, -15405155, 11020693 }, - }, - { - { 1866042, -7949489, -7898649, -10301010, 12483315, 13477547, 3175636, -12424163, 28761762, 1406734 }, - { -448555, -1777666, 13018551, 3194501, -9580420, -11161737, 24760585, -4347088, 25577411, -13378680 }, - { -24290378, 4759345, -690653, -1852816, 2066747, 10693769, -29595790, 9884936, -9368926, 4745410 }, - }, - { - { -9141284, 6049714, -19531061, -4341411, -31260798, 9944276, -15462008, -11311852, 10931924, -11931931 }, - { -16561513, 14112680, -8012645, 4817318, -8040464, -11414606, -22853429, 10856641, -20470770, 13434654 }, - { 22759489, -10073434, -16766264, -1871422, 13637442, -10168091, 1765144, -12654326, 28445307, -5364710 }, - }, - { - { 29875063, 12493613, 2795536, -3786330, 1710620, 15181182, -10195717, -8788675, 9074234, 1167180 }, - { -26205683, 11014233, -9842651, -2635485, -26908120, 7532294, -18716888, -9535498, 3843903, 9367684 }, - { -10969595, -6403711, 9591134, 9582310, 11349256, 108879, 16235123, 8601684, -139197, 4242895 }, - }, - }, - { - { - { 22092954, -13191123, -2042793, -11968512, 32186753, -11517388, -6574341, 2470660, -27417366, 16625501 }, - { -11057722, 3042016, 13770083, -9257922, 584236, -544855, -7770857, 2602725, -27351616, 14247413 }, - { 6314175, -10264892, -32772502, 15957557, -10157730, 168750, -8618807, 14290061, 27108877, -1180880 }, - }, - { - { -8586597, -7170966, 13241782, 10960156, -32991015, -13794596, 33547976, -11058889, -27148451, 981874 }, - { 22833440, 9293594, -32649448, -13618667, -9136966, 14756819, -22928859, -13970780, -10479804, -16197962 }, - { -7768587, 3326786, -28111797, 10783824, 19178761, 14905060, 22680049, 13906969, -15933690, 3797899 }, - }, - { - { 21721356, -4212746, -12206123, 9310182, -3882239, -13653110, 23740224, -2709232, 20491983, -8042152 }, - { 9209270, -15135055, -13256557, -6167798, -731016, 15289673, 25947805, 15286587, 30997318, -6703063 }, - { 7392032, 16618386, 23946583, -8039892, -13265164, -1533858, -14197445, -2321576, 17649998, -250080 }, - }, - { - { -9301088, -14193827, 30609526, -3049543, -25175069, -1283752, -15241566, -9525724, -2233253, 7662146 }, - { -17558673, 1763594, -33114336, 15908610, -30040870, -12174295, 7335080, -8472199, -3174674, 3440183 }, - { -19889700, -5977008, -24111293, -9688870, 10799743, -16571957, 40450, -4431835, 4862400, 1133 }, - }, - { - { -32856209, -7873957, -5422389, 14860950, -16319031, 7956142, 7258061, 311861, -30594991, -7379421 }, - { -3773428, -1565936, 28985340, 7499440, 24445838, 9325937, 29727763, 16527196, 18278453, 15405622 }, - { -4381906, 8508652, -19898366, -3674424, -5984453, 15149970, -13313598, 843523, -21875062, 13626197 }, - }, - { - { 2281448, -13487055, -10915418, -2609910, 1879358, 16164207, -10783882, 3953792, 13340839, 15928663 }, - { 31727126, -7179855, -18437503, -8283652, 2875793, -16390330, -25269894, -7014826, -23452306, 5964753 }, - { 4100420, -5959452, -17179337, 6017714, -18705837, 12227141, -26684835, 11344144, 2538215, -7570755 }, - }, - { - { -9433605, 6123113, 11159803, -2156608, 30016280, 14966241, -20474983, 1485421, -629256, -15958862 }, - { -26804558, 4260919, 11851389, 9658551, -32017107, 16367492, -20205425, -13191288, 11659922, -11115118 }, - { 26180396, 10015009, -30844224, -8581293, 5418197, 9480663, 2231568, -10170080, 33100372, -1306171 }, - }, - { - { 15121113, -5201871, -10389905, 15427821, -27509937, -15992507, 21670947, 4486675, -5931810, -14466380 }, - { 16166486, -9483733, -11104130, 6023908, -31926798, -1364923, 2340060, -16254968, -10735770, -10039824 }, - { 28042865, -3557089, -12126526, 12259706, -3717498, -6945899, 6766453, -8689599, 18036436, 5803270 }, - }, - }, - { - { - { -817581, 6763912, 11803561, 1585585, 10958447, -2671165, 23855391, 4598332, -6159431, -14117438 }, - { -31031306, -14256194, 17332029, -2383520, 31312682, -5967183, 696309, 50292, -20095739, 11763584 }, - { -594563, -2514283, -32234153, 12643980, 12650761, 14811489, 665117, -12613632, -19773211, -10713562 }, - }, - { - { 30464590, -11262872, -4127476, -12734478, 19835327, -7105613, -24396175, 2075773, -17020157, 992471 }, - { 18357185, -6994433, 7766382, 16342475, -29324918, 411174, 14578841, 8080033, -11574335, -10601610 }, - { 19598397, 10334610, 12555054, 2555664, 18821899, -10339780, 21873263, 16014234, 26224780, 16452269 }, - }, - { - { -30223925, 5145196, 5944548, 16385966, 3976735, 2009897, -11377804, -7618186, -20533829, 3698650 }, - { 14187449, 3448569, -10636236, -10810935, -22663880, -3433596, 7268410, -10890444, 27394301, 12015369 }, - { 19695761, 16087646, 28032085, 12999827, 6817792, 11427614, 20244189, -1312777, -13259127, -3402461 }, - }, - { - { 30860103, 12735208, -1888245, -4699734, -16974906, 2256940, -8166013, 12298312, -8550524, -10393462 }, - { -5719826, -11245325, -1910649, 15569035, 26642876, -7587760, -5789354, -15118654, -4976164, 12651793 }, - { -2848395, 9953421, 11531313, -5282879, 26895123, -12697089, -13118820, -16517902, 9768698, -2533218 }, - }, - { - { -24719459, 1894651, -287698, -4704085, 15348719, -8156530, 32767513, 12765450, 4940095, 10678226 }, - { 18860224, 15980149, -18987240, -1562570, -26233012, -11071856, -7843882, 13944024, -24372348, 16582019 }, - { -15504260, 4970268, -29893044, 4175593, -20993212, -2199756, -11704054, 15444560, -11003761, 7989037 }, - }, - { - { 31490452, 5568061, -2412803, 2182383, -32336847, 4531686, -32078269, 6200206, -19686113, -14800171 }, - { -17308668, -15879940, -31522777, -2831, -32887382, 16375549, 8680158, -16371713, 28550068, -6857132 }, - { -28126887, -5688091, 16837845, -1820458, -6850681, 12700016, -30039981, 4364038, 1155602, 5988841 }, - }, - { - { 21890435, -13272907, -12624011, 12154349, -7831873, 15300496, 23148983, -4470481, 24618407, 8283181 }, - { -33136107, -10512751, 9975416, 6841041, -31559793, 16356536, 3070187, -7025928, 1466169, 10740210 }, - { -1509399, -15488185, -13503385, -10655916, 32799044, 909394, -13938903, -5779719, -32164649, -15327040 }, - }, - { - { 3960823, -14267803, -28026090, -15918051, -19404858, 13146868, 15567327, 951507, -3260321, -573935 }, - { 24740841, 5052253, -30094131, 8961361, 25877428, 6165135, -24368180, 14397372, -7380369, -6144105 }, - { -28888365, 3510803, -28103278, -1158478, -11238128, -10631454, -15441463, -14453128, -1625486, -6494814 }, - }, - }, - { - { - { 793299, -9230478, 8836302, -6235707, -27360908, -2369593, 33152843, -4885251, -9906200, -621852 }, - { 5666233, 525582, 20782575, -8038419, -24538499, 14657740, 16099374, 1468826, -6171428, -15186581 }, - { -4859255, -3779343, -2917758, -6748019, 7778750, 11688288, -30404353, -9871238, -1558923, -9863646 }, - }, - { - { 10896332, -7719704, 824275, 472601, -19460308, 3009587, 25248958, 14783338, -30581476, -15757844 }, - { 10566929, 12612572, -31944212, 11118703, -12633376, 12362879, 21752402, 8822496, 24003793, 14264025 }, - { 27713862, -7355973, -11008240, 9227530, 27050101, 2504721, 23886875, -13117525, 13958495, -5732453 }, - }, - { - { -23481610, 4867226, -27247128, 3900521, 29838369, -8212291, -31889399, -10041781, 7340521, -15410068 }, - { 4646514, -8011124, -22766023, -11532654, 23184553, 8566613, 31366726, -1381061, -15066784, -10375192 }, - { -17270517, 12723032, -16993061, 14878794, 21619651, -6197576, 27584817, 3093888, -8843694, 3849921 }, - }, - { - { -9064912, 2103172, 25561640, -15125738, -5239824, 9582958, 32477045, -9017955, 5002294, -15550259 }, - { -12057553, -11177906, 21115585, -13365155, 8808712, -12030708, 16489530, 13378448, -25845716, 12741426 }, - { -5946367, 10645103, -30911586, 15390284, -3286982, -7118677, 24306472, 15852464, 28834118, -7646072 }, - }, - { - { -17335748, -9107057, -24531279, 9434953, -8472084, -583362, -13090771, 455841, 20461858, 5491305 }, - { 13669248, -16095482, -12481974, -10203039, -14569770, -11893198, -24995986, 11293807, -28588204, -9421832 }, - { 28497928, 6272777, -33022994, 14470570, 8906179, -1225630, 18504674, -14165166, 29867745, -8795943 }, - }, - { - { -16207023, 13517196, -27799630, -13697798, 24009064, -6373891, -6367600, -13175392, 22853429, -4012011 }, - { 24191378, 16712145, -13931797, 15217831, 14542237, 1646131, 18603514, -11037887, 12876623, -2112447 }, - { 17902668, 4518229, -411702, -2829247, 26878217, 5258055, -12860753, 608397, 16031844, 3723494 }, - }, - { - { -28632773, 12763728, -20446446, 7577504, 33001348, -13017745, 17558842, -7872890, 23896954, -4314245 }, - { -20005381, -12011952, 31520464, 605201, 2543521, 5991821, -2945064, 7229064, -9919646, -8826859 }, - { 28816045, 298879, -28165016, -15920938, 19000928, -1665890, -12680833, -2949325, -18051778, -2082915 }, - }, - { - { 16000882, -344896, 3493092, -11447198, -29504595, -13159789, 12577740, 16041268, -19715240, 7847707 }, - { 10151868, 10572098, 27312476, 7922682, 14825339, 4723128, -32855931, -6519018, -10020567, 3852848 }, - { -11430470, 15697596, -21121557, -4420647, 5386314, 15063598, 16514493, -15932110, 29330899, -15076224 }, - }, - }, - { - { - { -25499735, -4378794, -15222908, -6901211, 16615731, 2051784, 3303702, 15490, -27548796, 12314391 }, - { 15683520, -6003043, 18109120, -9980648, 15337968, -5997823, -16717435, 15921866, 16103996, -3731215 }, - { -23169824, -10781249, 13588192, -1628807, -3798557, -1074929, -19273607, 5402699, -29815713, -9841101 }, - }, - { - { 23190676, 2384583, -32714340, 3462154, -29903655, -1529132, -11266856, 8911517, -25205859, 2739713 }, - { 21374101, -3554250, -33524649, 9874411, 15377179, 11831242, -33529904, 6134907, 4931255, 11987849 }, - { -7732, -2978858, -16223486, 7277597, 105524, -322051, -31480539, 13861388, -30076310, 10117930 }, - }, - { - { -29501170, -10744872, -26163768, 13051539, -25625564, 5089643, -6325503, 6704079, 12890019, 15728940 }, - { -21972360, -11771379, -951059, -4418840, 14704840, 2695116, 903376, -10428139, 12885167, 8311031 }, - { -17516482, 5352194, 10384213, -13811658, 7506451, 13453191, 26423267, 4384730, 1888765, -5435404 }, - }, - { - { -25817338, -3107312, -13494599, -3182506, 30896459, -13921729, -32251644, -12707869, -19464434, -3340243 }, - { -23607977, -2665774, -526091, 4651136, 5765089, 4618330, 6092245, 14845197, 17151279, -9854116 }, - { -24830458, -12733720, -15165978, 10367250, -29530908, -265356, 22825805, -7087279, -16866484, 16176525 }, - }, - { - { -23583256, 6564961, 20063689, 3798228, -4740178, 7359225, 2006182, -10363426, -28746253, -10197509 }, - { -10626600, -4486402, -13320562, -5125317, 3432136, -6393229, 23632037, -1940610, 32808310, 1099883 }, - { 15030977, 5768825, -27451236, -2887299, -6427378, -15361371, -15277896, -6809350, 2051441, -15225865 }, - }, - { - { -3362323, -7239372, 7517890, 9824992, 23555850, 295369, 5148398, -14154188, -22686354, 16633660 }, - { 4577086, -16752288, 13249841, -15304328, 19958763, -14537274, 18559670, -10759549, 8402478, -9864273 }, - { -28406330, -1051581, -26790155, -907698, -17212414, -11030789, 9453451, -14980072, 17983010, 9967138 }, - }, - { - { -25762494, 6524722, 26585488, 9969270, 24709298, 1220360, -1677990, 7806337, 17507396, 3651560 }, - { -10420457, -4118111, 14584639, 15971087, -15768321, 8861010, 26556809, -5574557, -18553322, -11357135 }, - { 2839101, 14284142, 4029895, 3472686, 14402957, 12689363, -26642121, 8459447, -5605463, -7621941 }, - }, - { - { -4839289, -3535444, 9744961, 2871048, 25113978, 3187018, -25110813, -849066, 17258084, -7977739 }, - { 18164541, -10595176, -17154882, -1542417, 19237078, -9745295, 23357533, -15217008, 26908270, 12150756 }, - { -30264870, -7647865, 5112249, -7036672, -1499807, -6974257, 43168, -5537701, -32302074, 16215819 }, - }, - }, - { - { - { -6898905, 9824394, -12304779, -4401089, -31397141, -6276835, 32574489, 12532905, -7503072, -8675347 }, - { -27343522, -16515468, -27151524, -10722951, 946346, 16291093, 254968, 7168080, 21676107, -1943028 }, - { 21260961, -8424752, -16831886, -11920822, -23677961, 3968121, -3651949, -6215466, -3556191, -7913075 }, - }, - { - { 16544754, 13250366, -16804428, 15546242, -4583003, 12757258, -2462308, -8680336, -18907032, -9662799 }, - { -2415239, -15577728, 18312303, 4964443, -15272530, -12653564, 26820651, 16690659, 25459437, -4564609 }, - { -25144690, 11425020, 28423002, -11020557, -6144921, -15826224, 9142795, -2391602, -6432418, -1644817 }, - }, - { - { -23104652, 6253476, 16964147, -3768872, -25113972, -12296437, -27457225, -16344658, 6335692, 7249989 }, - { -30333227, 13979675, 7503222, -12368314, -11956721, -4621693, -30272269, 2682242, 25993170, -12478523 }, - { 4364628, 5930691, 32304656, -10044554, -8054781, 15091131, 22857016, -10598955, 31820368, 15075278 }, - }, - { - { 31879134, -8918693, 17258761, 90626, -8041836, -4917709, 24162788, -9650886, -17970238, 12833045 }, - { 19073683, 14851414, -24403169, -11860168, 7625278, 11091125, -19619190, 2074449, -9413939, 14905377 }, - { 24483667, -11935567, -2518866, -11547418, -1553130, 15355506, -25282080, 9253129, 27628530, -7555480 }, - }, - { - { 17597607, 8340603, 19355617, 552187, 26198470, -3176583, 4593324, -9157582, -14110875, 15297016 }, - { 510886, 14337390, -31785257, 16638632, 6328095, 2713355, -20217417, -11864220, 8683221, 2921426 }, - { 18606791, 11874196, 27155355, -5281482, -24031742, 6265446, -25178240, -1278924, 4674690, 13890525 }, - }, - { - { 13609624, 13069022, -27372361, -13055908, 24360586, 9592974, 14977157, 9835105, 4389687, 288396 }, - { 9922506, -519394, 13613107, 5883594, -18758345, -434263, -12304062, 8317628, 23388070, 16052080 }, - { 12720016, 11937594, -31970060, -5028689, 26900120, 8561328, -20155687, -11632979, -14754271, -10812892 }, - }, - { - { 15961858, 14150409, 26716931, -665832, -22794328, 13603569, 11829573, 7467844, -28822128, 929275 }, - { 11038231, -11582396, -27310482, -7316562, -10498527, -16307831, -23479533, -9371869, -21393143, 2465074 }, - { 20017163, -4323226, 27915242, 1529148, 12396362, 15675764, 13817261, -9658066, 2463391, -4622140 }, - }, - { - { -16358878, -12663911, -12065183, 4996454, -1256422, 1073572, 9583558, 12851107, 4003896, 12673717 }, - { -1731589, -15155870, -3262930, 16143082, 19294135, 13385325, 14741514, -9103726, 7903886, 2348101 }, - { 24536016, -16515207, 12715592, -3862155, 1511293, 10047386, -3842346, -7129159, -28377538, 10048127 }, - }, - }, - { - { - { -12622226, -6204820, 30718825, 2591312, -10617028, 12192840, 18873298, -7297090, -32297756, 15221632 }, - { -26478122, -11103864, 11546244, -1852483, 9180880, 7656409, -21343950, 2095755, 29769758, 6593415 }, - { -31994208, -2907461, 4176912, 3264766, 12538965, -868111, 26312345, -6118678, 30958054, 8292160 }, - }, - { - { 31429822, -13959116, 29173532, 15632448, 12174511, -2760094, 32808831, 3977186, 26143136, -3148876 }, - { 22648901, 1402143, -22799984, 13746059, 7936347, 365344, -8668633, -1674433, -3758243, -2304625 }, - { -15491917, 8012313, -2514730, -12702462, -23965846, -10254029, -1612713, -1535569, -16664475, 8194478 }, - }, - { - { 27338066, -7507420, -7414224, 10140405, -19026427, -6589889, 27277191, 8855376, 28572286, 3005164 }, - { 26287124, 4821776, 25476601, -4145903, -3764513, -15788984, -18008582, 1182479, -26094821, -13079595 }, - { -7171154, 3178080, 23970071, 6201893, -17195577, -4489192, -21876275, -13982627, 32208683, -1198248 }, - }, - { - { -16657702, 2817643, -10286362, 14811298, 6024667, 13349505, -27315504, -10497842, -27672585, -11539858 }, - { 15941029, -9405932, -21367050, 8062055, 31876073, -238629, -15278393, -1444429, 15397331, -4130193 }, - { 8934485, -13485467, -23286397, -13423241, -32446090, 14047986, 31170398, -1441021, -27505566, 15087184 }, - }, - { - { -18357243, -2156491, 24524913, -16677868, 15520427, -6360776, -15502406, 11461896, 16788528, -5868942 }, - { -1947386, 16013773, 21750665, 3714552, -17401782, -16055433, -3770287, -10323320, 31322514, -11615635 }, - { 21426655, -5650218, -13648287, -5347537, -28812189, -4920970, -18275391, -14621414, 13040862, -12112948 }, - }, - { - { 11293895, 12478086, -27136401, 15083750, -29307421, 14748872, 14555558, -13417103, 1613711, 4896935 }, - { -25894883, 15323294, -8489791, -8057900, 25967126, -13425460, 2825960, -4897045, -23971776, -11267415 }, - { -15924766, -5229880, -17443532, 6410664, 3622847, 10243618, 20615400, 12405433, -23753030, -8436416 }, - }, - { - { -7091295, 12556208, -20191352, 9025187, -17072479, 4333801, 4378436, 2432030, 23097949, -566018 }, - { 4565804, -16025654, 20084412, -7842817, 1724999, 189254, 24767264, 10103221, -18512313, 2424778 }, - { 366633, -11976806, 8173090, -6890119, 30788634, 5745705, -7168678, 1344109, -3642553, 12412659 }, - }, - { - { -24001791, 7690286, 14929416, -168257, -32210835, -13412986, 24162697, -15326504, -3141501, 11179385 }, - { 18289522, -14724954, 8056945, 16430056, -21729724, 7842514, -6001441, -1486897, -18684645, -11443503 }, - { 476239, 6601091, -6152790, -9723375, 17503545, -4863900, 27672959, 13403813, 11052904, 5219329 }, - }, - }, - { - { - { 20678546, -8375738, -32671898, 8849123, -5009758, 14574752, 31186971, -3973730, 9014762, -8579056 }, - { -13644050, -10350239, -15962508, 5075808, -1514661, -11534600, -33102500, 9160280, 8473550, -3256838 }, - { 24900749, 14435722, 17209120, -15292541, -22592275, 9878983, -7689309, -16335821, -24568481, 11788948 }, - }, - { - { -3118155, -11395194, -13802089, 14797441, 9652448, -6845904, -20037437, 10410733, -24568470, -1458691 }, - { -15659161, 16736706, -22467150, 10215878, -9097177, 7563911, 11871841, -12505194, -18513325, 8464118 }, - { -23400612, 8348507, -14585951, -861714, -3950205, -6373419, 14325289, 8628612, 33313881, -8370517 }, - }, - { - { -20186973, -4967935, 22367356, 5271547, -1097117, -4788838, -24805667, -10236854, -8940735, -5818269 }, - { -6948785, -1795212, -32625683, -16021179, 32635414, -7374245, 15989197, -12838188, 28358192, -4253904 }, - { -23561781, -2799059, -32351682, -1661963, -9147719, 10429267, -16637684, 4072016, -5351664, 5596589 }, - }, - { - { -28236598, -3390048, 12312896, 6213178, 3117142, 16078565, 29266239, 2557221, 1768301, 15373193 }, - { -7243358, -3246960, -4593467, -7553353, -127927, -912245, -1090902, -4504991, -24660491, 3442910 }, - { -30210571, 5124043, 14181784, 8197961, 18964734, -11939093, 22597931, 7176455, -18585478, 13365930 }, - }, - { - { -7877390, -1499958, 8324673, 4690079, 6261860, 890446, 24538107, -8570186, -9689599, -3031667 }, - { 25008904, -10771599, -4305031, -9638010, 16265036, 15721635, 683793, -11823784, 15723479, -15163481 }, - { -9660625, 12374379, -27006999, -7026148, -7724114, -12314514, 11879682, 5400171, 519526, -1235876 }, - }, - { - { 22258397, -16332233, -7869817, 14613016, -22520255, -2950923, -20353881, 7315967, 16648397, 7605640 }, - { -8081308, -8464597, -8223311, 9719710, 19259459, -15348212, 23994942, -5281555, -9468848, 4763278 }, - { -21699244, 9220969, -15730624, 1084137, -25476107, -2852390, 31088447, -7764523, -11356529, 728112 }, - }, - { - { 26047220, -11751471, -6900323, -16521798, 24092068, 9158119, -4273545, -12555558, -29365436, -5498272 }, - { 17510331, -322857, 5854289, 8403524, 17133918, -3112612, -28111007, 12327945, 10750447, 10014012 }, - { -10312768, 3936952, 9156313, -8897683, 16498692, -994647, -27481051, -666732, 3424691, 7540221 }, - }, - { - { 30322361, -6964110, 11361005, -4143317, 7433304, 4989748, -7071422, -16317219, -9244265, 15258046 }, - { 13054562, -2779497, 19155474, 469045, -12482797, 4566042, 5631406, 2711395, 1062915, -5136345 }, - { -19240248, -11254599, -29509029, -7499965, -5835763, 13005411, -6066489, 12194497, 32960380, 1459310 }, - }, - }, - { - { - { 19852034, 7027924, 23669353, 10020366, 8586503, -6657907, 394197, -6101885, 18638003, -11174937 }, - { 31395534, 15098109, 26581030, 8030562, -16527914, -5007134, 9012486, -7584354, -6643087, -5442636 }, - { -9192165, -2347377, -1997099, 4529534, 25766844, 607986, -13222, 9677543, -32294889, -6456008 }, - }, - { - { -2444496, -149937, 29348902, 8186665, 1873760, 12489863, -30934579, -7839692, -7852844, -8138429 }, - { -15236356, -15433509, 7766470, 746860, 26346930, -10221762, -27333451, 10754588, -9431476, 5203576 }, - { 31834314, 14135496, -770007, 5159118, 20917671, -16768096, -7467973, -7337524, 31809243, 7347066 }, - }, - { - { -9606723, -11874240, 20414459, 13033986, 13716524, -11691881, 19797970, -12211255, 15192876, -2087490 }, - { -12663563, -2181719, 1168162, -3804809, 26747877, -14138091, 10609330, 12694420, 33473243, -13382104 }, - { 33184999, 11180355, 15832085, -11385430, -1633671, 225884, 15089336, -11023903, -6135662, 14480053 }, - }, - { - { 31308717, -5619998, 31030840, -1897099, 15674547, -6582883, 5496208, 13685227, 27595050, 8737275 }, - { -20318852, -15150239, 10933843, -16178022, 8335352, -7546022, -31008351, -12610604, 26498114, 66511 }, - { 22644454, -8761729, -16671776, 4884562, -3105614, -13559366, 30540766, -4286747, -13327787, -7515095 }, - }, - { - { -28017847, 9834845, 18617207, -2681312, -3401956, -13307506, 8205540, 13585437, -17127465, 15115439 }, - { 23711543, -672915, 31206561, -8362711, 6164647, -9709987, -33535882, -1426096, 8236921, 16492939 }, - { -23910559, -13515526, -26299483, -4503841, 25005590, -7687270, 19574902, 10071562, 6708380, -6222424 }, - }, - { - { 2101391, -4930054, 19702731, 2367575, -15427167, 1047675, 5301017, 9328700, 29955601, -11678310 }, - { 3096359, 9271816, -21620864, -15521844, -14847996, -7592937, -25892142, -12635595, -9917575, 6216608 }, - { -32615849, 338663, -25195611, 2510422, -29213566, -13820213, 24822830, -6146567, -26767480, 7525079 }, - }, - { - { -23066649, -13985623, 16133487, -7896178, -3389565, 778788, -910336, -2782495, -19386633, 11994101 }, - { 21691500, -13624626, -641331, -14367021, 3285881, -3483596, -25064666, 9718258, -7477437, 13381418 }, - { 18445390, -4202236, 14979846, 11622458, -1727110, -3582980, 23111648, -6375247, 28535282, 15779576 }, - }, - { - { 30098053, 3089662, -9234387, 16662135, -21306940, 11308411, -14068454, 12021730, 9955285, -16303356 }, - { 9734894, -14576830, -7473633, -9138735, 2060392, 11313496, -18426029, 9924399, 20194861, 13380996 }, - { -26378102, -7965207, -22167821, 15789297, -18055342, -6168792, -1984914, 15707771, 26342023, 10146099 }, - }, - }, - { - { - { -26016874, -219943, 21339191, -41388, 19745256, -2878700, -29637280, 2227040, 21612326, -545728 }, - { -13077387, 1184228, 23562814, -5970442, -20351244, -6348714, 25764461, 12243797, -20856566, 11649658 }, - { -10031494, 11262626, 27384172, 2271902, 26947504, -15997771, 39944, 6114064, 33514190, 2333242 }, - }, - { - { -21433588, -12421821, 8119782, 7219913, -21830522, -9016134, -6679750, -12670638, 24350578, -13450001 }, - { -4116307, -11271533, -23886186, 4843615, -30088339, 690623, -31536088, -10406836, 8317860, 12352766 }, - { 18200138, -14475911, -33087759, -2696619, -23702521, -9102511, -23552096, -2287550, 20712163, 6719373 }, - }, - { - { 26656208, 6075253, -7858556, 1886072, -28344043, 4262326, 11117530, -3763210, 26224235, -3297458 }, - { -17168938, -14854097, -3395676, -16369877, -19954045, 14050420, 21728352, 9493610, 18620611, -16428628 }, - { -13323321, 13325349, 11432106, 5964811, 18609221, 6062965, -5269471, -9725556, -30701573, -16479657 }, - }, - { - { -23860538, -11233159, 26961357, 1640861, -32413112, -16737940, 12248509, -5240639, 13735342, 1934062 }, - { 25089769, 6742589, 17081145, -13406266, 21909293, -16067981, -15136294, -3765346, -21277997, 5473616 }, - { 31883677, -7961101, 1083432, -11572403, 22828471, 13290673, -7125085, 12469656, 29111212, -5451014 }, - }, - { - { 24244947, -15050407, -26262976, 2791540, -14997599, 16666678, 24367466, 6388839, -10295587, 452383 }, - { -25640782, -3417841, 5217916, 16224624, 19987036, -4082269, -24236251, -5915248, 15766062, 8407814 }, - { -20406999, 13990231, 15495425, 16395525, 5377168, 15166495, -8917023, -4388953, -8067909, 2276718 }, - }, - { - { 30157918, 12924066, -17712050, 9245753, 19895028, 3368142, -23827587, 5096219, 22740376, -7303417 }, - { 2041139, -14256350, 7783687, 13876377, -25946985, -13352459, 24051124, 13742383, -15637599, 13295222 }, - { 33338237, -8505733, 12532113, 7977527, 9106186, -1715251, -17720195, -4612972, -4451357, -14669444 }, - }, - { - { -20045281, 5454097, -14346548, 6447146, 28862071, 1883651, -2469266, -4141880, 7770569, 9620597 }, - { 23208068, 7979712, 33071466, 8149229, 1758231, -10834995, 30945528, -1694323, -33502340, -14767970 }, - { 1439958, -16270480, -1079989, -793782, 4625402, 10647766, -5043801, 1220118, 30494170, -11440799 }, - }, - { - { -5037580, -13028295, -2970559, -3061767, 15640974, -6701666, -26739026, 926050, -1684339, -13333647 }, - { 13908495, -3549272, 30919928, -6273825, -21521863, 7989039, 9021034, 9078865, 3353509, 4033511 }, - { -29663431, -15113610, 32259991, -344482, 24295849, -12912123, 23161163, 8839127, 27485041, 7356032 }, - }, - }, - { - { - { 9661027, 705443, 11980065, -5370154, -1628543, 14661173, -6346142, 2625015, 28431036, -16771834 }, - { -23839233, -8311415, -25945511, 7480958, -17681669, -8354183, -22545972, 14150565, 15970762, 4099461 }, - { 29262576, 16756590, 26350592, -8793563, 8529671, -11208050, 13617293, -9937143, 11465739, 8317062 }, - }, - { - { -25493081, -6962928, 32500200, -9419051, -23038724, -2302222, 14898637, 3848455, 20969334, -5157516 }, - { -20384450, -14347713, -18336405, 13884722, -33039454, 2842114, -21610826, -3649888, 11177095, 14989547 }, - { -24496721, -11716016, 16959896, 2278463, 12066309, 10137771, 13515641, 2581286, -28487508, 9930240 }, - }, - { - { -17751622, -2097826, 16544300, -13009300, -15914807, -14949081, 18345767, -13403753, 16291481, -5314038 }, - { -33229194, 2553288, 32678213, 9875984, 8534129, 6889387, -9676774, 6957617, 4368891, 9788741 }, - { 16660756, 7281060, -10830758, 12911820, 20108584, -8101676, -21722536, -8613148, 16250552, -11111103 }, - }, - { - { -19765507, 2390526, -16551031, 14161980, 1905286, 6414907, 4689584, 10604807, -30190403, 4782747 }, - { -1354539, 14736941, -7367442, -13292886, 7710542, -14155590, -9981571, 4383045, 22546403, 437323 }, - { 31665577, -12180464, -16186830, 1491339, -18368625, 3294682, 27343084, 2786261, -30633590, -14097016 }, - }, - { - { -14467279, -683715, -33374107, 7448552, 19294360, 14334329, -19690631, 2355319, -19284671, -6114373 }, - { 15121312, -15796162, 6377020, -6031361, -10798111, -12957845, 18952177, 15496498, -29380133, 11754228 }, - { -2637277, -13483075, 8488727, -14303896, 12728761, -1622493, 7141596, 11724556, 22761615, -10134141 }, - }, - { - { 16918416, 11729663, -18083579, 3022987, -31015732, -13339659, -28741185, -12227393, 32851222, 11717399 }, - { 11166634, 7338049, -6722523, 4531520, -29468672, -7302055, 31474879, 3483633, -1193175, -4030831 }, - { -185635, 9921305, 31456609, -13536438, -12013818, 13348923, 33142652, 6546660, -19985279, -3948376 }, - }, - { - { -32460596, 11266712, -11197107, -7899103, 31703694, 3855903, -8537131, -12833048, -30772034, -15486313 }, - { -18006477, 12709068, 3991746, -6479188, -21491523, -10550425, -31135347, -16049879, 10928917, 3011958 }, - { -6957757, -15594337, 31696059, 334240, 29576716, 14796075, -30831056, -12805180, 18008031, 10258577 }, - }, - { - { -22448644, 15655569, 7018479, -4410003, -30314266, -1201591, -1853465, 1367120, 25127874, 6671743 }, - { 29701166, -14373934, -10878120, 9279288, -17568, 13127210, 21382910, 11042292, 25838796, 4642684 }, - { -20430234, 14955537, -24126347, 8124619, -5369288, -5990470, 30468147, -13900640, 18423289, 4177476 }, - }, - }, -}; \ No newline at end of file diff --git a/outside/ed25519/src/sc.c b/outside/ed25519/src/sc.c deleted file mode 100644 index ca5bad2ca..000000000 --- a/outside/ed25519/src/sc.c +++ /dev/null @@ -1,809 +0,0 @@ -#include "fixedint.h" -#include "sc.h" - -static uint64_t load_3(const unsigned char *in) { - uint64_t result; - - result = (uint64_t) in[0]; - result |= ((uint64_t) in[1]) << 8; - result |= ((uint64_t) in[2]) << 16; - - return result; -} - -static uint64_t load_4(const unsigned char *in) { - uint64_t result; - - result = (uint64_t) in[0]; - result |= ((uint64_t) in[1]) << 8; - result |= ((uint64_t) in[2]) << 16; - result |= ((uint64_t) in[3]) << 24; - - return result; -} - -/* -Input: - s[0]+256*s[1]+...+256^63*s[63] = s - -Output: - s[0]+256*s[1]+...+256^31*s[31] = s mod l - where l = 2^252 + 27742317777372353535851937790883648493. - Overwrites s in place. -*/ - -void sc_reduce(unsigned char *s) { - int64_t s0 = 2097151 & load_3(s); - int64_t s1 = 2097151 & (load_4(s + 2) >> 5); - int64_t s2 = 2097151 & (load_3(s + 5) >> 2); - int64_t s3 = 2097151 & (load_4(s + 7) >> 7); - int64_t s4 = 2097151 & (load_4(s + 10) >> 4); - int64_t s5 = 2097151 & (load_3(s + 13) >> 1); - int64_t s6 = 2097151 & (load_4(s + 15) >> 6); - int64_t s7 = 2097151 & (load_3(s + 18) >> 3); - int64_t s8 = 2097151 & load_3(s + 21); - int64_t s9 = 2097151 & (load_4(s + 23) >> 5); - int64_t s10 = 2097151 & (load_3(s + 26) >> 2); - int64_t s11 = 2097151 & (load_4(s + 28) >> 7); - int64_t s12 = 2097151 & (load_4(s + 31) >> 4); - int64_t s13 = 2097151 & (load_3(s + 34) >> 1); - int64_t s14 = 2097151 & (load_4(s + 36) >> 6); - int64_t s15 = 2097151 & (load_3(s + 39) >> 3); - int64_t s16 = 2097151 & load_3(s + 42); - int64_t s17 = 2097151 & (load_4(s + 44) >> 5); - int64_t s18 = 2097151 & (load_3(s + 47) >> 2); - int64_t s19 = 2097151 & (load_4(s + 49) >> 7); - int64_t s20 = 2097151 & (load_4(s + 52) >> 4); - int64_t s21 = 2097151 & (load_3(s + 55) >> 1); - int64_t s22 = 2097151 & (load_4(s + 57) >> 6); - int64_t s23 = (load_4(s + 60) >> 3); - int64_t carry0; - int64_t carry1; - int64_t carry2; - int64_t carry3; - int64_t carry4; - int64_t carry5; - int64_t carry6; - int64_t carry7; - int64_t carry8; - int64_t carry9; - int64_t carry10; - int64_t carry11; - int64_t carry12; - int64_t carry13; - int64_t carry14; - int64_t carry15; - int64_t carry16; - - s11 += s23 * 666643; - s12 += s23 * 470296; - s13 += s23 * 654183; - s14 -= s23 * 997805; - s15 += s23 * 136657; - s16 -= s23 * 683901; - s23 = 0; - s10 += s22 * 666643; - s11 += s22 * 470296; - s12 += s22 * 654183; - s13 -= s22 * 997805; - s14 += s22 * 136657; - s15 -= s22 * 683901; - s22 = 0; - s9 += s21 * 666643; - s10 += s21 * 470296; - s11 += s21 * 654183; - s12 -= s21 * 997805; - s13 += s21 * 136657; - s14 -= s21 * 683901; - s21 = 0; - s8 += s20 * 666643; - s9 += s20 * 470296; - s10 += s20 * 654183; - s11 -= s20 * 997805; - s12 += s20 * 136657; - s13 -= s20 * 683901; - s20 = 0; - s7 += s19 * 666643; - s8 += s19 * 470296; - s9 += s19 * 654183; - s10 -= s19 * 997805; - s11 += s19 * 136657; - s12 -= s19 * 683901; - s19 = 0; - s6 += s18 * 666643; - s7 += s18 * 470296; - s8 += s18 * 654183; - s9 -= s18 * 997805; - s10 += s18 * 136657; - s11 -= s18 * 683901; - s18 = 0; - carry6 = (s6 + (1 << 20)) >> 21; - s7 += carry6; - s6 -= carry6 << 21; - carry8 = (s8 + (1 << 20)) >> 21; - s9 += carry8; - s8 -= carry8 << 21; - carry10 = (s10 + (1 << 20)) >> 21; - s11 += carry10; - s10 -= carry10 << 21; - carry12 = (s12 + (1 << 20)) >> 21; - s13 += carry12; - s12 -= carry12 << 21; - carry14 = (s14 + (1 << 20)) >> 21; - s15 += carry14; - s14 -= carry14 << 21; - carry16 = (s16 + (1 << 20)) >> 21; - s17 += carry16; - s16 -= carry16 << 21; - carry7 = (s7 + (1 << 20)) >> 21; - s8 += carry7; - s7 -= carry7 << 21; - carry9 = (s9 + (1 << 20)) >> 21; - s10 += carry9; - s9 -= carry9 << 21; - carry11 = (s11 + (1 << 20)) >> 21; - s12 += carry11; - s11 -= carry11 << 21; - carry13 = (s13 + (1 << 20)) >> 21; - s14 += carry13; - s13 -= carry13 << 21; - carry15 = (s15 + (1 << 20)) >> 21; - s16 += carry15; - s15 -= carry15 << 21; - s5 += s17 * 666643; - s6 += s17 * 470296; - s7 += s17 * 654183; - s8 -= s17 * 997805; - s9 += s17 * 136657; - s10 -= s17 * 683901; - s17 = 0; - s4 += s16 * 666643; - s5 += s16 * 470296; - s6 += s16 * 654183; - s7 -= s16 * 997805; - s8 += s16 * 136657; - s9 -= s16 * 683901; - s16 = 0; - s3 += s15 * 666643; - s4 += s15 * 470296; - s5 += s15 * 654183; - s6 -= s15 * 997805; - s7 += s15 * 136657; - s8 -= s15 * 683901; - s15 = 0; - s2 += s14 * 666643; - s3 += s14 * 470296; - s4 += s14 * 654183; - s5 -= s14 * 997805; - s6 += s14 * 136657; - s7 -= s14 * 683901; - s14 = 0; - s1 += s13 * 666643; - s2 += s13 * 470296; - s3 += s13 * 654183; - s4 -= s13 * 997805; - s5 += s13 * 136657; - s6 -= s13 * 683901; - s13 = 0; - s0 += s12 * 666643; - s1 += s12 * 470296; - s2 += s12 * 654183; - s3 -= s12 * 997805; - s4 += s12 * 136657; - s5 -= s12 * 683901; - s12 = 0; - carry0 = (s0 + (1 << 20)) >> 21; - s1 += carry0; - s0 -= carry0 << 21; - carry2 = (s2 + (1 << 20)) >> 21; - s3 += carry2; - s2 -= carry2 << 21; - carry4 = (s4 + (1 << 20)) >> 21; - s5 += carry4; - s4 -= carry4 << 21; - carry6 = (s6 + (1 << 20)) >> 21; - s7 += carry6; - s6 -= carry6 << 21; - carry8 = (s8 + (1 << 20)) >> 21; - s9 += carry8; - s8 -= carry8 << 21; - carry10 = (s10 + (1 << 20)) >> 21; - s11 += carry10; - s10 -= carry10 << 21; - carry1 = (s1 + (1 << 20)) >> 21; - s2 += carry1; - s1 -= carry1 << 21; - carry3 = (s3 + (1 << 20)) >> 21; - s4 += carry3; - s3 -= carry3 << 21; - carry5 = (s5 + (1 << 20)) >> 21; - s6 += carry5; - s5 -= carry5 << 21; - carry7 = (s7 + (1 << 20)) >> 21; - s8 += carry7; - s7 -= carry7 << 21; - carry9 = (s9 + (1 << 20)) >> 21; - s10 += carry9; - s9 -= carry9 << 21; - carry11 = (s11 + (1 << 20)) >> 21; - s12 += carry11; - s11 -= carry11 << 21; - s0 += s12 * 666643; - s1 += s12 * 470296; - s2 += s12 * 654183; - s3 -= s12 * 997805; - s4 += s12 * 136657; - s5 -= s12 * 683901; - s12 = 0; - carry0 = s0 >> 21; - s1 += carry0; - s0 -= carry0 << 21; - carry1 = s1 >> 21; - s2 += carry1; - s1 -= carry1 << 21; - carry2 = s2 >> 21; - s3 += carry2; - s2 -= carry2 << 21; - carry3 = s3 >> 21; - s4 += carry3; - s3 -= carry3 << 21; - carry4 = s4 >> 21; - s5 += carry4; - s4 -= carry4 << 21; - carry5 = s5 >> 21; - s6 += carry5; - s5 -= carry5 << 21; - carry6 = s6 >> 21; - s7 += carry6; - s6 -= carry6 << 21; - carry7 = s7 >> 21; - s8 += carry7; - s7 -= carry7 << 21; - carry8 = s8 >> 21; - s9 += carry8; - s8 -= carry8 << 21; - carry9 = s9 >> 21; - s10 += carry9; - s9 -= carry9 << 21; - carry10 = s10 >> 21; - s11 += carry10; - s10 -= carry10 << 21; - carry11 = s11 >> 21; - s12 += carry11; - s11 -= carry11 << 21; - s0 += s12 * 666643; - s1 += s12 * 470296; - s2 += s12 * 654183; - s3 -= s12 * 997805; - s4 += s12 * 136657; - s5 -= s12 * 683901; - s12 = 0; - carry0 = s0 >> 21; - s1 += carry0; - s0 -= carry0 << 21; - carry1 = s1 >> 21; - s2 += carry1; - s1 -= carry1 << 21; - carry2 = s2 >> 21; - s3 += carry2; - s2 -= carry2 << 21; - carry3 = s3 >> 21; - s4 += carry3; - s3 -= carry3 << 21; - carry4 = s4 >> 21; - s5 += carry4; - s4 -= carry4 << 21; - carry5 = s5 >> 21; - s6 += carry5; - s5 -= carry5 << 21; - carry6 = s6 >> 21; - s7 += carry6; - s6 -= carry6 << 21; - carry7 = s7 >> 21; - s8 += carry7; - s7 -= carry7 << 21; - carry8 = s8 >> 21; - s9 += carry8; - s8 -= carry8 << 21; - carry9 = s9 >> 21; - s10 += carry9; - s9 -= carry9 << 21; - carry10 = s10 >> 21; - s11 += carry10; - s10 -= carry10 << 21; - - s[0] = (unsigned char) (s0 >> 0); - s[1] = (unsigned char) (s0 >> 8); - s[2] = (unsigned char) ((s0 >> 16) | (s1 << 5)); - s[3] = (unsigned char) (s1 >> 3); - s[4] = (unsigned char) (s1 >> 11); - s[5] = (unsigned char) ((s1 >> 19) | (s2 << 2)); - s[6] = (unsigned char) (s2 >> 6); - s[7] = (unsigned char) ((s2 >> 14) | (s3 << 7)); - s[8] = (unsigned char) (s3 >> 1); - s[9] = (unsigned char) (s3 >> 9); - s[10] = (unsigned char) ((s3 >> 17) | (s4 << 4)); - s[11] = (unsigned char) (s4 >> 4); - s[12] = (unsigned char) (s4 >> 12); - s[13] = (unsigned char) ((s4 >> 20) | (s5 << 1)); - s[14] = (unsigned char) (s5 >> 7); - s[15] = (unsigned char) ((s5 >> 15) | (s6 << 6)); - s[16] = (unsigned char) (s6 >> 2); - s[17] = (unsigned char) (s6 >> 10); - s[18] = (unsigned char) ((s6 >> 18) | (s7 << 3)); - s[19] = (unsigned char) (s7 >> 5); - s[20] = (unsigned char) (s7 >> 13); - s[21] = (unsigned char) (s8 >> 0); - s[22] = (unsigned char) (s8 >> 8); - s[23] = (unsigned char) ((s8 >> 16) | (s9 << 5)); - s[24] = (unsigned char) (s9 >> 3); - s[25] = (unsigned char) (s9 >> 11); - s[26] = (unsigned char) ((s9 >> 19) | (s10 << 2)); - s[27] = (unsigned char) (s10 >> 6); - s[28] = (unsigned char) ((s10 >> 14) | (s11 << 7)); - s[29] = (unsigned char) (s11 >> 1); - s[30] = (unsigned char) (s11 >> 9); - s[31] = (unsigned char) (s11 >> 17); -} - - - -/* -Input: - a[0]+256*a[1]+...+256^31*a[31] = a - b[0]+256*b[1]+...+256^31*b[31] = b - c[0]+256*c[1]+...+256^31*c[31] = c - -Output: - s[0]+256*s[1]+...+256^31*s[31] = (ab+c) mod l - where l = 2^252 + 27742317777372353535851937790883648493. -*/ - -void sc_muladd(unsigned char *s, const unsigned char *a, const unsigned char *b, const unsigned char *c) { - int64_t a0 = 2097151 & load_3(a); - int64_t a1 = 2097151 & (load_4(a + 2) >> 5); - int64_t a2 = 2097151 & (load_3(a + 5) >> 2); - int64_t a3 = 2097151 & (load_4(a + 7) >> 7); - int64_t a4 = 2097151 & (load_4(a + 10) >> 4); - int64_t a5 = 2097151 & (load_3(a + 13) >> 1); - int64_t a6 = 2097151 & (load_4(a + 15) >> 6); - int64_t a7 = 2097151 & (load_3(a + 18) >> 3); - int64_t a8 = 2097151 & load_3(a + 21); - int64_t a9 = 2097151 & (load_4(a + 23) >> 5); - int64_t a10 = 2097151 & (load_3(a + 26) >> 2); - int64_t a11 = (load_4(a + 28) >> 7); - int64_t b0 = 2097151 & load_3(b); - int64_t b1 = 2097151 & (load_4(b + 2) >> 5); - int64_t b2 = 2097151 & (load_3(b + 5) >> 2); - int64_t b3 = 2097151 & (load_4(b + 7) >> 7); - int64_t b4 = 2097151 & (load_4(b + 10) >> 4); - int64_t b5 = 2097151 & (load_3(b + 13) >> 1); - int64_t b6 = 2097151 & (load_4(b + 15) >> 6); - int64_t b7 = 2097151 & (load_3(b + 18) >> 3); - int64_t b8 = 2097151 & load_3(b + 21); - int64_t b9 = 2097151 & (load_4(b + 23) >> 5); - int64_t b10 = 2097151 & (load_3(b + 26) >> 2); - int64_t b11 = (load_4(b + 28) >> 7); - int64_t c0 = 2097151 & load_3(c); - int64_t c1 = 2097151 & (load_4(c + 2) >> 5); - int64_t c2 = 2097151 & (load_3(c + 5) >> 2); - int64_t c3 = 2097151 & (load_4(c + 7) >> 7); - int64_t c4 = 2097151 & (load_4(c + 10) >> 4); - int64_t c5 = 2097151 & (load_3(c + 13) >> 1); - int64_t c6 = 2097151 & (load_4(c + 15) >> 6); - int64_t c7 = 2097151 & (load_3(c + 18) >> 3); - int64_t c8 = 2097151 & load_3(c + 21); - int64_t c9 = 2097151 & (load_4(c + 23) >> 5); - int64_t c10 = 2097151 & (load_3(c + 26) >> 2); - int64_t c11 = (load_4(c + 28) >> 7); - int64_t s0; - int64_t s1; - int64_t s2; - int64_t s3; - int64_t s4; - int64_t s5; - int64_t s6; - int64_t s7; - int64_t s8; - int64_t s9; - int64_t s10; - int64_t s11; - int64_t s12; - int64_t s13; - int64_t s14; - int64_t s15; - int64_t s16; - int64_t s17; - int64_t s18; - int64_t s19; - int64_t s20; - int64_t s21; - int64_t s22; - int64_t s23; - int64_t carry0; - int64_t carry1; - int64_t carry2; - int64_t carry3; - int64_t carry4; - int64_t carry5; - int64_t carry6; - int64_t carry7; - int64_t carry8; - int64_t carry9; - int64_t carry10; - int64_t carry11; - int64_t carry12; - int64_t carry13; - int64_t carry14; - int64_t carry15; - int64_t carry16; - int64_t carry17; - int64_t carry18; - int64_t carry19; - int64_t carry20; - int64_t carry21; - int64_t carry22; - - s0 = c0 + a0 * b0; - s1 = c1 + a0 * b1 + a1 * b0; - s2 = c2 + a0 * b2 + a1 * b1 + a2 * b0; - s3 = c3 + a0 * b3 + a1 * b2 + a2 * b1 + a3 * b0; - s4 = c4 + a0 * b4 + a1 * b3 + a2 * b2 + a3 * b1 + a4 * b0; - s5 = c5 + a0 * b5 + a1 * b4 + a2 * b3 + a3 * b2 + a4 * b1 + a5 * b0; - s6 = c6 + a0 * b6 + a1 * b5 + a2 * b4 + a3 * b3 + a4 * b2 + a5 * b1 + a6 * b0; - s7 = c7 + a0 * b7 + a1 * b6 + a2 * b5 + a3 * b4 + a4 * b3 + a5 * b2 + a6 * b1 + a7 * b0; - s8 = c8 + a0 * b8 + a1 * b7 + a2 * b6 + a3 * b5 + a4 * b4 + a5 * b3 + a6 * b2 + a7 * b1 + a8 * b0; - s9 = c9 + a0 * b9 + a1 * b8 + a2 * b7 + a3 * b6 + a4 * b5 + a5 * b4 + a6 * b3 + a7 * b2 + a8 * b1 + a9 * b0; - s10 = c10 + a0 * b10 + a1 * b9 + a2 * b8 + a3 * b7 + a4 * b6 + a5 * b5 + a6 * b4 + a7 * b3 + a8 * b2 + a9 * b1 + a10 * b0; - s11 = c11 + a0 * b11 + a1 * b10 + a2 * b9 + a3 * b8 + a4 * b7 + a5 * b6 + a6 * b5 + a7 * b4 + a8 * b3 + a9 * b2 + a10 * b1 + a11 * b0; - s12 = a1 * b11 + a2 * b10 + a3 * b9 + a4 * b8 + a5 * b7 + a6 * b6 + a7 * b5 + a8 * b4 + a9 * b3 + a10 * b2 + a11 * b1; - s13 = a2 * b11 + a3 * b10 + a4 * b9 + a5 * b8 + a6 * b7 + a7 * b6 + a8 * b5 + a9 * b4 + a10 * b3 + a11 * b2; - s14 = a3 * b11 + a4 * b10 + a5 * b9 + a6 * b8 + a7 * b7 + a8 * b6 + a9 * b5 + a10 * b4 + a11 * b3; - s15 = a4 * b11 + a5 * b10 + a6 * b9 + a7 * b8 + a8 * b7 + a9 * b6 + a10 * b5 + a11 * b4; - s16 = a5 * b11 + a6 * b10 + a7 * b9 + a8 * b8 + a9 * b7 + a10 * b6 + a11 * b5; - s17 = a6 * b11 + a7 * b10 + a8 * b9 + a9 * b8 + a10 * b7 + a11 * b6; - s18 = a7 * b11 + a8 * b10 + a9 * b9 + a10 * b8 + a11 * b7; - s19 = a8 * b11 + a9 * b10 + a10 * b9 + a11 * b8; - s20 = a9 * b11 + a10 * b10 + a11 * b9; - s21 = a10 * b11 + a11 * b10; - s22 = a11 * b11; - s23 = 0; - carry0 = (s0 + (1 << 20)) >> 21; - s1 += carry0; - s0 -= carry0 << 21; - carry2 = (s2 + (1 << 20)) >> 21; - s3 += carry2; - s2 -= carry2 << 21; - carry4 = (s4 + (1 << 20)) >> 21; - s5 += carry4; - s4 -= carry4 << 21; - carry6 = (s6 + (1 << 20)) >> 21; - s7 += carry6; - s6 -= carry6 << 21; - carry8 = (s8 + (1 << 20)) >> 21; - s9 += carry8; - s8 -= carry8 << 21; - carry10 = (s10 + (1 << 20)) >> 21; - s11 += carry10; - s10 -= carry10 << 21; - carry12 = (s12 + (1 << 20)) >> 21; - s13 += carry12; - s12 -= carry12 << 21; - carry14 = (s14 + (1 << 20)) >> 21; - s15 += carry14; - s14 -= carry14 << 21; - carry16 = (s16 + (1 << 20)) >> 21; - s17 += carry16; - s16 -= carry16 << 21; - carry18 = (s18 + (1 << 20)) >> 21; - s19 += carry18; - s18 -= carry18 << 21; - carry20 = (s20 + (1 << 20)) >> 21; - s21 += carry20; - s20 -= carry20 << 21; - carry22 = (s22 + (1 << 20)) >> 21; - s23 += carry22; - s22 -= carry22 << 21; - carry1 = (s1 + (1 << 20)) >> 21; - s2 += carry1; - s1 -= carry1 << 21; - carry3 = (s3 + (1 << 20)) >> 21; - s4 += carry3; - s3 -= carry3 << 21; - carry5 = (s5 + (1 << 20)) >> 21; - s6 += carry5; - s5 -= carry5 << 21; - carry7 = (s7 + (1 << 20)) >> 21; - s8 += carry7; - s7 -= carry7 << 21; - carry9 = (s9 + (1 << 20)) >> 21; - s10 += carry9; - s9 -= carry9 << 21; - carry11 = (s11 + (1 << 20)) >> 21; - s12 += carry11; - s11 -= carry11 << 21; - carry13 = (s13 + (1 << 20)) >> 21; - s14 += carry13; - s13 -= carry13 << 21; - carry15 = (s15 + (1 << 20)) >> 21; - s16 += carry15; - s15 -= carry15 << 21; - carry17 = (s17 + (1 << 20)) >> 21; - s18 += carry17; - s17 -= carry17 << 21; - carry19 = (s19 + (1 << 20)) >> 21; - s20 += carry19; - s19 -= carry19 << 21; - carry21 = (s21 + (1 << 20)) >> 21; - s22 += carry21; - s21 -= carry21 << 21; - s11 += s23 * 666643; - s12 += s23 * 470296; - s13 += s23 * 654183; - s14 -= s23 * 997805; - s15 += s23 * 136657; - s16 -= s23 * 683901; - s23 = 0; - s10 += s22 * 666643; - s11 += s22 * 470296; - s12 += s22 * 654183; - s13 -= s22 * 997805; - s14 += s22 * 136657; - s15 -= s22 * 683901; - s22 = 0; - s9 += s21 * 666643; - s10 += s21 * 470296; - s11 += s21 * 654183; - s12 -= s21 * 997805; - s13 += s21 * 136657; - s14 -= s21 * 683901; - s21 = 0; - s8 += s20 * 666643; - s9 += s20 * 470296; - s10 += s20 * 654183; - s11 -= s20 * 997805; - s12 += s20 * 136657; - s13 -= s20 * 683901; - s20 = 0; - s7 += s19 * 666643; - s8 += s19 * 470296; - s9 += s19 * 654183; - s10 -= s19 * 997805; - s11 += s19 * 136657; - s12 -= s19 * 683901; - s19 = 0; - s6 += s18 * 666643; - s7 += s18 * 470296; - s8 += s18 * 654183; - s9 -= s18 * 997805; - s10 += s18 * 136657; - s11 -= s18 * 683901; - s18 = 0; - carry6 = (s6 + (1 << 20)) >> 21; - s7 += carry6; - s6 -= carry6 << 21; - carry8 = (s8 + (1 << 20)) >> 21; - s9 += carry8; - s8 -= carry8 << 21; - carry10 = (s10 + (1 << 20)) >> 21; - s11 += carry10; - s10 -= carry10 << 21; - carry12 = (s12 + (1 << 20)) >> 21; - s13 += carry12; - s12 -= carry12 << 21; - carry14 = (s14 + (1 << 20)) >> 21; - s15 += carry14; - s14 -= carry14 << 21; - carry16 = (s16 + (1 << 20)) >> 21; - s17 += carry16; - s16 -= carry16 << 21; - carry7 = (s7 + (1 << 20)) >> 21; - s8 += carry7; - s7 -= carry7 << 21; - carry9 = (s9 + (1 << 20)) >> 21; - s10 += carry9; - s9 -= carry9 << 21; - carry11 = (s11 + (1 << 20)) >> 21; - s12 += carry11; - s11 -= carry11 << 21; - carry13 = (s13 + (1 << 20)) >> 21; - s14 += carry13; - s13 -= carry13 << 21; - carry15 = (s15 + (1 << 20)) >> 21; - s16 += carry15; - s15 -= carry15 << 21; - s5 += s17 * 666643; - s6 += s17 * 470296; - s7 += s17 * 654183; - s8 -= s17 * 997805; - s9 += s17 * 136657; - s10 -= s17 * 683901; - s17 = 0; - s4 += s16 * 666643; - s5 += s16 * 470296; - s6 += s16 * 654183; - s7 -= s16 * 997805; - s8 += s16 * 136657; - s9 -= s16 * 683901; - s16 = 0; - s3 += s15 * 666643; - s4 += s15 * 470296; - s5 += s15 * 654183; - s6 -= s15 * 997805; - s7 += s15 * 136657; - s8 -= s15 * 683901; - s15 = 0; - s2 += s14 * 666643; - s3 += s14 * 470296; - s4 += s14 * 654183; - s5 -= s14 * 997805; - s6 += s14 * 136657; - s7 -= s14 * 683901; - s14 = 0; - s1 += s13 * 666643; - s2 += s13 * 470296; - s3 += s13 * 654183; - s4 -= s13 * 997805; - s5 += s13 * 136657; - s6 -= s13 * 683901; - s13 = 0; - s0 += s12 * 666643; - s1 += s12 * 470296; - s2 += s12 * 654183; - s3 -= s12 * 997805; - s4 += s12 * 136657; - s5 -= s12 * 683901; - s12 = 0; - carry0 = (s0 + (1 << 20)) >> 21; - s1 += carry0; - s0 -= carry0 << 21; - carry2 = (s2 + (1 << 20)) >> 21; - s3 += carry2; - s2 -= carry2 << 21; - carry4 = (s4 + (1 << 20)) >> 21; - s5 += carry4; - s4 -= carry4 << 21; - carry6 = (s6 + (1 << 20)) >> 21; - s7 += carry6; - s6 -= carry6 << 21; - carry8 = (s8 + (1 << 20)) >> 21; - s9 += carry8; - s8 -= carry8 << 21; - carry10 = (s10 + (1 << 20)) >> 21; - s11 += carry10; - s10 -= carry10 << 21; - carry1 = (s1 + (1 << 20)) >> 21; - s2 += carry1; - s1 -= carry1 << 21; - carry3 = (s3 + (1 << 20)) >> 21; - s4 += carry3; - s3 -= carry3 << 21; - carry5 = (s5 + (1 << 20)) >> 21; - s6 += carry5; - s5 -= carry5 << 21; - carry7 = (s7 + (1 << 20)) >> 21; - s8 += carry7; - s7 -= carry7 << 21; - carry9 = (s9 + (1 << 20)) >> 21; - s10 += carry9; - s9 -= carry9 << 21; - carry11 = (s11 + (1 << 20)) >> 21; - s12 += carry11; - s11 -= carry11 << 21; - s0 += s12 * 666643; - s1 += s12 * 470296; - s2 += s12 * 654183; - s3 -= s12 * 997805; - s4 += s12 * 136657; - s5 -= s12 * 683901; - s12 = 0; - carry0 = s0 >> 21; - s1 += carry0; - s0 -= carry0 << 21; - carry1 = s1 >> 21; - s2 += carry1; - s1 -= carry1 << 21; - carry2 = s2 >> 21; - s3 += carry2; - s2 -= carry2 << 21; - carry3 = s3 >> 21; - s4 += carry3; - s3 -= carry3 << 21; - carry4 = s4 >> 21; - s5 += carry4; - s4 -= carry4 << 21; - carry5 = s5 >> 21; - s6 += carry5; - s5 -= carry5 << 21; - carry6 = s6 >> 21; - s7 += carry6; - s6 -= carry6 << 21; - carry7 = s7 >> 21; - s8 += carry7; - s7 -= carry7 << 21; - carry8 = s8 >> 21; - s9 += carry8; - s8 -= carry8 << 21; - carry9 = s9 >> 21; - s10 += carry9; - s9 -= carry9 << 21; - carry10 = s10 >> 21; - s11 += carry10; - s10 -= carry10 << 21; - carry11 = s11 >> 21; - s12 += carry11; - s11 -= carry11 << 21; - s0 += s12 * 666643; - s1 += s12 * 470296; - s2 += s12 * 654183; - s3 -= s12 * 997805; - s4 += s12 * 136657; - s5 -= s12 * 683901; - s12 = 0; - carry0 = s0 >> 21; - s1 += carry0; - s0 -= carry0 << 21; - carry1 = s1 >> 21; - s2 += carry1; - s1 -= carry1 << 21; - carry2 = s2 >> 21; - s3 += carry2; - s2 -= carry2 << 21; - carry3 = s3 >> 21; - s4 += carry3; - s3 -= carry3 << 21; - carry4 = s4 >> 21; - s5 += carry4; - s4 -= carry4 << 21; - carry5 = s5 >> 21; - s6 += carry5; - s5 -= carry5 << 21; - carry6 = s6 >> 21; - s7 += carry6; - s6 -= carry6 << 21; - carry7 = s7 >> 21; - s8 += carry7; - s7 -= carry7 << 21; - carry8 = s8 >> 21; - s9 += carry8; - s8 -= carry8 << 21; - carry9 = s9 >> 21; - s10 += carry9; - s9 -= carry9 << 21; - carry10 = s10 >> 21; - s11 += carry10; - s10 -= carry10 << 21; - - s[0] = (unsigned char) (s0 >> 0); - s[1] = (unsigned char) (s0 >> 8); - s[2] = (unsigned char) ((s0 >> 16) | (s1 << 5)); - s[3] = (unsigned char) (s1 >> 3); - s[4] = (unsigned char) (s1 >> 11); - s[5] = (unsigned char) ((s1 >> 19) | (s2 << 2)); - s[6] = (unsigned char) (s2 >> 6); - s[7] = (unsigned char) ((s2 >> 14) | (s3 << 7)); - s[8] = (unsigned char) (s3 >> 1); - s[9] = (unsigned char) (s3 >> 9); - s[10] = (unsigned char) ((s3 >> 17) | (s4 << 4)); - s[11] = (unsigned char) (s4 >> 4); - s[12] = (unsigned char) (s4 >> 12); - s[13] = (unsigned char) ((s4 >> 20) | (s5 << 1)); - s[14] = (unsigned char) (s5 >> 7); - s[15] = (unsigned char) ((s5 >> 15) | (s6 << 6)); - s[16] = (unsigned char) (s6 >> 2); - s[17] = (unsigned char) (s6 >> 10); - s[18] = (unsigned char) ((s6 >> 18) | (s7 << 3)); - s[19] = (unsigned char) (s7 >> 5); - s[20] = (unsigned char) (s7 >> 13); - s[21] = (unsigned char) (s8 >> 0); - s[22] = (unsigned char) (s8 >> 8); - s[23] = (unsigned char) ((s8 >> 16) | (s9 << 5)); - s[24] = (unsigned char) (s9 >> 3); - s[25] = (unsigned char) (s9 >> 11); - s[26] = (unsigned char) ((s9 >> 19) | (s10 << 2)); - s[27] = (unsigned char) (s10 >> 6); - s[28] = (unsigned char) ((s10 >> 14) | (s11 << 7)); - s[29] = (unsigned char) (s11 >> 1); - s[30] = (unsigned char) (s11 >> 9); - s[31] = (unsigned char) (s11 >> 17); -} diff --git a/outside/ed25519/src/sc.h b/outside/ed25519/src/sc.h deleted file mode 100644 index 8fa727ef1..000000000 --- a/outside/ed25519/src/sc.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef SC_H -#define SC_H - -/* -The set of scalars is \Z/l -where l = 2^252 + 27742317777372353535851937790883648493. -*/ - -void sc_reduce(unsigned char *s); -void sc_muladd(unsigned char *s, const unsigned char *a, const unsigned char *b, const unsigned char *c); - -#endif \ No newline at end of file diff --git a/outside/ed25519/src/seed.c b/outside/ed25519/src/seed.c deleted file mode 100644 index 25e518220..000000000 --- a/outside/ed25519/src/seed.c +++ /dev/null @@ -1,40 +0,0 @@ -#include "ed25519.h" - -#ifndef ED25519_NO_SEED - -#ifdef _WIN32 -#include -#include -#else -#include -#endif - -int ed25519_create_seed(unsigned char *seed) { -#ifdef _WIN32 - HCRYPTPROV prov; - - if (!CryptAcquireContext(&prov, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) { - return 1; - } - - if (!CryptGenRandom(prov, 32, seed)) { - CryptReleaseContext(prov, 0); - return 1; - } - - CryptReleaseContext(prov, 0); -#else - FILE *f = fopen("/dev/urandom", "rb"); - - if (f == NULL) { - return 1; - } - - fread(seed, 1, 32, f); - fclose(f); -#endif - - return 0; -} - -#endif \ No newline at end of file diff --git a/outside/ed25519/src/sha512.c b/outside/ed25519/src/sha512.c deleted file mode 100644 index cb8ae7175..000000000 --- a/outside/ed25519/src/sha512.c +++ /dev/null @@ -1,275 +0,0 @@ -/* LibTomCrypt, modular cryptographic library -- Tom St Denis - * - * LibTomCrypt is a library that provides various cryptographic - * algorithms in a highly modular and flexible manner. - * - * The library is free for all purposes without any express - * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org - */ - -#include "fixedint.h" -#include "sha512.h" - -/* the K array */ -static const uint64_t K[80] = { - UINT64_C(0x428a2f98d728ae22), UINT64_C(0x7137449123ef65cd), - UINT64_C(0xb5c0fbcfec4d3b2f), UINT64_C(0xe9b5dba58189dbbc), - UINT64_C(0x3956c25bf348b538), UINT64_C(0x59f111f1b605d019), - UINT64_C(0x923f82a4af194f9b), UINT64_C(0xab1c5ed5da6d8118), - UINT64_C(0xd807aa98a3030242), UINT64_C(0x12835b0145706fbe), - UINT64_C(0x243185be4ee4b28c), UINT64_C(0x550c7dc3d5ffb4e2), - UINT64_C(0x72be5d74f27b896f), UINT64_C(0x80deb1fe3b1696b1), - UINT64_C(0x9bdc06a725c71235), UINT64_C(0xc19bf174cf692694), - UINT64_C(0xe49b69c19ef14ad2), UINT64_C(0xefbe4786384f25e3), - UINT64_C(0x0fc19dc68b8cd5b5), UINT64_C(0x240ca1cc77ac9c65), - UINT64_C(0x2de92c6f592b0275), UINT64_C(0x4a7484aa6ea6e483), - UINT64_C(0x5cb0a9dcbd41fbd4), UINT64_C(0x76f988da831153b5), - UINT64_C(0x983e5152ee66dfab), UINT64_C(0xa831c66d2db43210), - UINT64_C(0xb00327c898fb213f), UINT64_C(0xbf597fc7beef0ee4), - UINT64_C(0xc6e00bf33da88fc2), UINT64_C(0xd5a79147930aa725), - UINT64_C(0x06ca6351e003826f), UINT64_C(0x142929670a0e6e70), - UINT64_C(0x27b70a8546d22ffc), UINT64_C(0x2e1b21385c26c926), - UINT64_C(0x4d2c6dfc5ac42aed), UINT64_C(0x53380d139d95b3df), - UINT64_C(0x650a73548baf63de), UINT64_C(0x766a0abb3c77b2a8), - UINT64_C(0x81c2c92e47edaee6), UINT64_C(0x92722c851482353b), - UINT64_C(0xa2bfe8a14cf10364), UINT64_C(0xa81a664bbc423001), - UINT64_C(0xc24b8b70d0f89791), UINT64_C(0xc76c51a30654be30), - UINT64_C(0xd192e819d6ef5218), UINT64_C(0xd69906245565a910), - UINT64_C(0xf40e35855771202a), UINT64_C(0x106aa07032bbd1b8), - UINT64_C(0x19a4c116b8d2d0c8), UINT64_C(0x1e376c085141ab53), - UINT64_C(0x2748774cdf8eeb99), UINT64_C(0x34b0bcb5e19b48a8), - UINT64_C(0x391c0cb3c5c95a63), UINT64_C(0x4ed8aa4ae3418acb), - UINT64_C(0x5b9cca4f7763e373), UINT64_C(0x682e6ff3d6b2b8a3), - UINT64_C(0x748f82ee5defb2fc), UINT64_C(0x78a5636f43172f60), - UINT64_C(0x84c87814a1f0ab72), UINT64_C(0x8cc702081a6439ec), - UINT64_C(0x90befffa23631e28), UINT64_C(0xa4506cebde82bde9), - UINT64_C(0xbef9a3f7b2c67915), UINT64_C(0xc67178f2e372532b), - UINT64_C(0xca273eceea26619c), UINT64_C(0xd186b8c721c0c207), - UINT64_C(0xeada7dd6cde0eb1e), UINT64_C(0xf57d4f7fee6ed178), - UINT64_C(0x06f067aa72176fba), UINT64_C(0x0a637dc5a2c898a6), - UINT64_C(0x113f9804bef90dae), UINT64_C(0x1b710b35131c471b), - UINT64_C(0x28db77f523047d84), UINT64_C(0x32caab7b40c72493), - UINT64_C(0x3c9ebe0a15c9bebc), UINT64_C(0x431d67c49c100d4c), - UINT64_C(0x4cc5d4becb3e42b6), UINT64_C(0x597f299cfc657e2a), - UINT64_C(0x5fcb6fab3ad6faec), UINT64_C(0x6c44198c4a475817) -}; - -/* Various logical functions */ - -#define ROR64c(x, y) \ - ( ((((x)&UINT64_C(0xFFFFFFFFFFFFFFFF))>>((uint64_t)(y)&UINT64_C(63))) | \ - ((x)<<((uint64_t)(64-((y)&UINT64_C(63)))))) & UINT64_C(0xFFFFFFFFFFFFFFFF)) - -#define STORE64H(x, y) \ - { (y)[0] = (unsigned char)(((x)>>56)&255); (y)[1] = (unsigned char)(((x)>>48)&255); \ - (y)[2] = (unsigned char)(((x)>>40)&255); (y)[3] = (unsigned char)(((x)>>32)&255); \ - (y)[4] = (unsigned char)(((x)>>24)&255); (y)[5] = (unsigned char)(((x)>>16)&255); \ - (y)[6] = (unsigned char)(((x)>>8)&255); (y)[7] = (unsigned char)((x)&255); } - -#define LOAD64H(x, y) \ - { x = (((uint64_t)((y)[0] & 255))<<56)|(((uint64_t)((y)[1] & 255))<<48) | \ - (((uint64_t)((y)[2] & 255))<<40)|(((uint64_t)((y)[3] & 255))<<32) | \ - (((uint64_t)((y)[4] & 255))<<24)|(((uint64_t)((y)[5] & 255))<<16) | \ - (((uint64_t)((y)[6] & 255))<<8)|(((uint64_t)((y)[7] & 255))); } - - -#define Ch(x,y,z) (z ^ (x & (y ^ z))) -#define Maj(x,y,z) (((x | y) & z) | (x & y)) -#define S(x, n) ROR64c(x, n) -#define R(x, n) (((x) &UINT64_C(0xFFFFFFFFFFFFFFFF))>>((uint64_t)n)) -#define Sigma0(x) (S(x, 28) ^ S(x, 34) ^ S(x, 39)) -#define Sigma1(x) (S(x, 14) ^ S(x, 18) ^ S(x, 41)) -#define Gamma0(x) (S(x, 1) ^ S(x, 8) ^ R(x, 7)) -#define Gamma1(x) (S(x, 19) ^ S(x, 61) ^ R(x, 6)) -#ifndef MIN - #define MIN(x, y) ( ((x)<(y))?(x):(y) ) -#endif - -/* compress 1024-bits */ -static int sha512_compress(sha512_context *md, unsigned char *buf) -{ - uint64_t S[8], W[80], t0, t1; - int i; - - /* copy state into S */ - for (i = 0; i < 8; i++) { - S[i] = md->state[i]; - } - - /* copy the state into 1024-bits into W[0..15] */ - for (i = 0; i < 16; i++) { - LOAD64H(W[i], buf + (8*i)); - } - - /* fill W[16..79] */ - for (i = 16; i < 80; i++) { - W[i] = Gamma1(W[i - 2]) + W[i - 7] + Gamma0(W[i - 15]) + W[i - 16]; - } - -/* Compress */ - #define RND(a,b,c,d,e,f,g,h,i) \ - t0 = h + Sigma1(e) + Ch(e, f, g) + K[i] + W[i]; \ - t1 = Sigma0(a) + Maj(a, b, c);\ - d += t0; \ - h = t0 + t1; - - for (i = 0; i < 80; i += 8) { - RND(S[0],S[1],S[2],S[3],S[4],S[5],S[6],S[7],i+0); - RND(S[7],S[0],S[1],S[2],S[3],S[4],S[5],S[6],i+1); - RND(S[6],S[7],S[0],S[1],S[2],S[3],S[4],S[5],i+2); - RND(S[5],S[6],S[7],S[0],S[1],S[2],S[3],S[4],i+3); - RND(S[4],S[5],S[6],S[7],S[0],S[1],S[2],S[3],i+4); - RND(S[3],S[4],S[5],S[6],S[7],S[0],S[1],S[2],i+5); - RND(S[2],S[3],S[4],S[5],S[6],S[7],S[0],S[1],i+6); - RND(S[1],S[2],S[3],S[4],S[5],S[6],S[7],S[0],i+7); - } - - #undef RND - - - - /* feedback */ - for (i = 0; i < 8; i++) { - md->state[i] = md->state[i] + S[i]; - } - - return 0; -} - - -/** - Initialize the hash state - @param md The hash state you wish to initialize - @return 0 if successful -*/ -int sha512_init(sha512_context * md) { - if (md == NULL) return 1; - - md->curlen = 0; - md->length = 0; - md->state[0] = UINT64_C(0x6a09e667f3bcc908); - md->state[1] = UINT64_C(0xbb67ae8584caa73b); - md->state[2] = UINT64_C(0x3c6ef372fe94f82b); - md->state[3] = UINT64_C(0xa54ff53a5f1d36f1); - md->state[4] = UINT64_C(0x510e527fade682d1); - md->state[5] = UINT64_C(0x9b05688c2b3e6c1f); - md->state[6] = UINT64_C(0x1f83d9abfb41bd6b); - md->state[7] = UINT64_C(0x5be0cd19137e2179); - - return 0; -} - -/** - Process a block of memory though the hash - @param md The hash state - @param in The data to hash - @param inlen The length of the data (octets) - @return 0 if successful -*/ -int sha512_update (sha512_context * md, const unsigned char *in, size_t inlen) -{ - size_t n; - size_t i; - int err; - if (md == NULL) return 1; - if (in == NULL) return 1; - if (md->curlen > sizeof(md->buf)) { - return 1; - } - while (inlen > 0) { - if (md->curlen == 0 && inlen >= 128) { - if ((err = sha512_compress (md, (unsigned char *)in)) != 0) { - return err; - } - md->length += 128 * 8; - in += 128; - inlen -= 128; - } else { - n = MIN(inlen, (128 - md->curlen)); - - for (i = 0; i < n; i++) { - md->buf[i + md->curlen] = in[i]; - } - - - md->curlen += n; - in += n; - inlen -= n; - if (md->curlen == 128) { - if ((err = sha512_compress (md, md->buf)) != 0) { - return err; - } - md->length += 8*128; - md->curlen = 0; - } - } - } - return 0; -} - -/** - Terminate the hash to get the digest - @param md The hash state - @param out [out] The destination of the hash (64 bytes) - @return 0 if successful -*/ - int sha512_final(sha512_context * md, unsigned char *out) - { - int i; - - if (md == NULL) return 1; - if (out == NULL) return 1; - - if (md->curlen >= sizeof(md->buf)) { - return 1; - } - - /* increase the length of the message */ - md->length += md->curlen * UINT64_C(8); - - /* append the '1' bit */ - md->buf[md->curlen++] = (unsigned char)0x80; - - /* if the length is currently above 112 bytes we append zeros - * then compress. Then we can fall back to padding zeros and length - * encoding like normal. - */ - if (md->curlen > 112) { - while (md->curlen < 128) { - md->buf[md->curlen++] = (unsigned char)0; - } - sha512_compress(md, md->buf); - md->curlen = 0; - } - - /* pad upto 120 bytes of zeroes - * note: that from 112 to 120 is the 64 MSB of the length. We assume that you won't hash - * > 2^64 bits of data... :-) - */ -while (md->curlen < 120) { - md->buf[md->curlen++] = (unsigned char)0; -} - - /* store length */ -STORE64H(md->length, md->buf+120); -sha512_compress(md, md->buf); - - /* copy output */ -for (i = 0; i < 8; i++) { - STORE64H(md->state[i], out+(8*i)); -} - -return 0; -} - -int sha512(const unsigned char *message, size_t message_len, unsigned char *out) -{ - sha512_context ctx; - int ret; - if ((ret = sha512_init(&ctx))) return ret; - if ((ret = sha512_update(&ctx, message, message_len))) return ret; - if ((ret = sha512_final(&ctx, out))) return ret; - return 0; -} diff --git a/outside/ed25519/src/sha512.h b/outside/ed25519/src/sha512.h deleted file mode 100644 index e56b00e84..000000000 --- a/outside/ed25519/src/sha512.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef SHA512_H -#define SHA512_H - -#include - -#include "fixedint.h" - -/* state */ -typedef struct sha512_context_ { - uint64_t length, state[8]; - size_t curlen; - unsigned char buf[128]; -} sha512_context; - - -int sha512_init(sha512_context * md); -int sha512_final(sha512_context * md, unsigned char *out); -int sha512_update(sha512_context * md, const unsigned char *in, size_t inlen); -int sha512(const unsigned char *message, size_t message_len, unsigned char *out); - -#endif \ No newline at end of file diff --git a/outside/ed25519/src/sign.c b/outside/ed25519/src/sign.c deleted file mode 100644 index 199a8393b..000000000 --- a/outside/ed25519/src/sign.c +++ /dev/null @@ -1,31 +0,0 @@ -#include "ed25519.h" -#include "sha512.h" -#include "ge.h" -#include "sc.h" - - -void ed25519_sign(unsigned char *signature, const unsigned char *message, size_t message_len, const unsigned char *public_key, const unsigned char *private_key) { - sha512_context hash; - unsigned char hram[64]; - unsigned char r[64]; - ge_p3 R; - - - sha512_init(&hash); - sha512_update(&hash, private_key + 32, 32); - sha512_update(&hash, message, message_len); - sha512_final(&hash, r); - - sc_reduce(r); - ge_scalarmult_base(&R, r); - ge_p3_tobytes(signature, &R); - - sha512_init(&hash); - sha512_update(&hash, signature, 32); - sha512_update(&hash, public_key, 32); - sha512_update(&hash, message, message_len); - sha512_final(&hash, hram); - - sc_reduce(hram); - sc_muladd(signature + 32, hram, private_key, r); -} diff --git a/outside/ed25519/src/verify.c b/outside/ed25519/src/verify.c deleted file mode 100644 index 32f988edc..000000000 --- a/outside/ed25519/src/verify.c +++ /dev/null @@ -1,77 +0,0 @@ -#include "ed25519.h" -#include "sha512.h" -#include "ge.h" -#include "sc.h" - -static int consttime_equal(const unsigned char *x, const unsigned char *y) { - unsigned char r = 0; - - r = x[0] ^ y[0]; - #define F(i) r |= x[i] ^ y[i] - F(1); - F(2); - F(3); - F(4); - F(5); - F(6); - F(7); - F(8); - F(9); - F(10); - F(11); - F(12); - F(13); - F(14); - F(15); - F(16); - F(17); - F(18); - F(19); - F(20); - F(21); - F(22); - F(23); - F(24); - F(25); - F(26); - F(27); - F(28); - F(29); - F(30); - F(31); - #undef F - - return !r; -} - -int ed25519_verify(const unsigned char *signature, const unsigned char *message, size_t message_len, const unsigned char *public_key) { - unsigned char h[64]; - unsigned char checker[32]; - sha512_context hash; - ge_p3 A; - ge_p2 R; - - if (signature[63] & 224) { - return 0; - } - - if (ge_frombytes_negate_vartime(&A, public_key) != 0) { - return 0; - } - - sha512_init(&hash); - sha512_update(&hash, signature, 32); - sha512_update(&hash, public_key, 32); - sha512_update(&hash, message, message_len); - sha512_final(&hash, h); - - sc_reduce(h); - ge_double_scalarmult_vartime(&R, h, &A, signature + 32); - ge_tobytes(checker, &R); - - if (!consttime_equal(checker, signature)) { - return 0; - } - - return 1; -} diff --git a/outside/ed25519/test.c b/outside/ed25519/test.c deleted file mode 100644 index a56d20257..000000000 --- a/outside/ed25519/test.c +++ /dev/null @@ -1,149 +0,0 @@ -#include -#include -#include -#include - -//#define ED25519_DLL -#include "src/ed25519.h" - -#include "src/ge.h" -#include "src/sc.h" - -const char message[] = "Hello, world!"; - - -int main(int argc, char *argv[]) { - unsigned char public_key[32], private_key[64], seed[32], scalar[32]; - unsigned char other_public_key[32], other_private_key[64]; - unsigned char shared_secret[32], other_shared_secret[32]; - unsigned char signature[64]; - - clock_t start; - clock_t end; - int i; - - /* create a random seed, and a keypair out of that seed */ - ed25519_create_seed(seed); - ed25519_create_keypair(public_key, private_key, seed); - - /* create signature on the message with the keypair */ - ed25519_sign(signature, message, strlen(message), public_key, private_key); - - /* verify the signature */ - if (ed25519_verify(signature, message, strlen(message), public_key)) { - printf("valid signature\n"); - } else { - printf("invalid signature\n"); - } - - /* create scalar and add it to the keypair */ - ed25519_create_seed(scalar); - ed25519_add_scalar(public_key, private_key, scalar); - - /* create signature with the new keypair */ - ed25519_sign(signature, message, strlen(message), public_key, private_key); - - /* verify the signature with the new keypair */ - if (ed25519_verify(signature, message, strlen(message), public_key)) { - printf("valid signature\n"); - } else { - printf("invalid signature\n"); - } - - /* make a slight adjustment and verify again */ - signature[44] ^= 0x10; - if (ed25519_verify(signature, message, strlen(message), public_key)) { - printf("did not detect signature change\n"); - } else { - printf("correctly detected signature change\n"); - } - - /* generate two keypairs for testing key exchange */ - ed25519_create_seed(seed); - ed25519_create_keypair(public_key, private_key, seed); - ed25519_create_seed(seed); - ed25519_create_keypair(other_public_key, other_private_key, seed); - - /* create two shared secrets - from both perspectives - and check if they're equal */ - ed25519_key_exchange(shared_secret, other_public_key, private_key); - ed25519_key_exchange(other_shared_secret, public_key, other_private_key); - - for (i = 0; i < 32; ++i) { - if (shared_secret[i] != other_shared_secret[i]) { - printf("key exchange was incorrect\n"); - break; - } - } - - if (i == 32) { - printf("key exchange was correct\n"); - } - - /* test performance */ - printf("testing seed generation performance: "); - start = clock(); - for (i = 0; i < 10000; ++i) { - ed25519_create_seed(seed); - } - end = clock(); - - printf("%fus per seed\n", ((double) ((end - start) * 1000)) / CLOCKS_PER_SEC / i * 1000); - - - printf("testing key generation performance: "); - start = clock(); - for (i = 0; i < 10000; ++i) { - ed25519_create_keypair(public_key, private_key, seed); - } - end = clock(); - - printf("%fus per keypair\n", ((double) ((end - start) * 1000)) / CLOCKS_PER_SEC / i * 1000); - - printf("testing sign performance: "); - start = clock(); - for (i = 0; i < 10000; ++i) { - ed25519_sign(signature, message, strlen(message), public_key, private_key); - } - end = clock(); - - printf("%fus per signature\n", ((double) ((end - start) * 1000)) / CLOCKS_PER_SEC / i * 1000); - - printf("testing verify performance: "); - start = clock(); - for (i = 0; i < 10000; ++i) { - ed25519_verify(signature, message, strlen(message), public_key); - } - end = clock(); - - printf("%fus per signature\n", ((double) ((end - start) * 1000)) / CLOCKS_PER_SEC / i * 1000); - - - printf("testing keypair scalar addition performance: "); - start = clock(); - for (i = 0; i < 10000; ++i) { - ed25519_add_scalar(public_key, private_key, scalar); - } - end = clock(); - - printf("%fus per keypair\n", ((double) ((end - start) * 1000)) / CLOCKS_PER_SEC / i * 1000); - - printf("testing public key scalar addition performance: "); - start = clock(); - for (i = 0; i < 10000; ++i) { - ed25519_add_scalar(public_key, NULL, scalar); - } - end = clock(); - - printf("%fus per key\n", ((double) ((end - start) * 1000)) / CLOCKS_PER_SEC / i * 1000); - - printf("testing key exchange performance: "); - start = clock(); - for (i = 0; i < 10000; ++i) { - ed25519_key_exchange(shared_secret, other_public_key, private_key); - } - end = clock(); - - printf("%fus per shared secret\n", ((double) ((end - start) * 1000)) / CLOCKS_PER_SEC / i * 1000); - - return 0; -} diff --git a/outside/jhttp/http_parser.c b/outside/jhttp/http_parser.c deleted file mode 100755 index 653d0331f..000000000 --- a/outside/jhttp/http_parser.c +++ /dev/null @@ -1,2016 +0,0 @@ -/* Based on src/http/ngx_http_parse.c from NGINX copyright Igor Sysoev - * - * Additional changes are licensed under the same terms as NGINX and - * copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ -#include "http_parser.h" -#include -#include -#include -#include -#include -#include - -#ifndef ULLONG_MAX -# define ULLONG_MAX ((uint64_t) -1) /* 2^64-1 */ -#endif - -#ifndef MIN -# define MIN(a,b) ((a) < (b) ? (a) : (b)) -#endif - - -#if HTTP_PARSER_DEBUG -#define SET_ERRNO(e) \ -do { \ - parser->http_errno = (e); \ - parser->error_lineno = __LINE__; \ -} while (0) -#else -#define SET_ERRNO(e) \ -do { \ - parser->http_errno = (e); \ -} while(0) -#endif - - -/* Run the notify callback FOR, returning ER if it fails */ -#define CALLBACK_NOTIFY_(FOR, ER) \ -do { \ - assert(HTTP_PARSER_ERRNO(parser) == HPE_OK); \ - \ - if (settings->on_##FOR) { \ - if (0 != settings->on_##FOR(parser)) { \ - SET_ERRNO(HPE_CB_##FOR); \ - } \ - \ - /* We either errored above or got paused; get out */ \ - if (HTTP_PARSER_ERRNO(parser) != HPE_OK) { \ - return (ER); \ - } \ - } \ -} while (0) - -/* Run the notify callback FOR and consume the current byte */ -#define CALLBACK_NOTIFY(FOR) CALLBACK_NOTIFY_(FOR, p - data + 1) - -/* Run the notify callback FOR and don't consume the current byte */ -#define CALLBACK_NOTIFY_NOADVANCE(FOR) CALLBACK_NOTIFY_(FOR, p - data) - -/* Run data callback FOR with LEN bytes, returning ER if it fails */ -#define CALLBACK_DATA_(FOR, LEN, ER) \ -do { \ - assert(HTTP_PARSER_ERRNO(parser) == HPE_OK); \ - \ - if (FOR##_mark) { \ - if (settings->on_##FOR) { \ - if (0 != settings->on_##FOR(parser, FOR##_mark, (LEN))) { \ - SET_ERRNO(HPE_CB_##FOR); \ - } \ - \ - /* We either errored above or got paused; get out */ \ - if (HTTP_PARSER_ERRNO(parser) != HPE_OK) { \ - return (ER); \ - } \ - } \ - FOR##_mark = NULL; \ - } \ -} while (0) - -/* Run the data callback FOR and consume the current byte */ -#define CALLBACK_DATA(FOR) \ - CALLBACK_DATA_(FOR, p - FOR##_mark, p - data + 1) - -/* Run the data callback FOR and don't consume the current byte */ -#define CALLBACK_DATA_NOADVANCE(FOR) \ - CALLBACK_DATA_(FOR, p - FOR##_mark, p - data) - -/* Set the mark FOR; non-destructive if mark is already set */ -#define MARK(FOR) \ -do { \ - if (!FOR##_mark) { \ - FOR##_mark = p; \ - } \ -} while (0) - - -#define PROXY_CONNECTION "proxy-connection" -#define CONNECTION "connection" -#define CONTENT_LENGTH "content-length" -#define TRANSFER_ENCODING "transfer-encoding" -#define UPGRADE "upgrade" -#define CHUNKED "chunked" -#define KEEP_ALIVE "keep-alive" -#define CLOSE "close" - - -static const char *method_strings[] = - { "DELETE" - , "GET" - , "HEAD" - , "POST" - , "PUT" - , "CONNECT" - , "OPTIONS" - , "TRACE" - , "COPY" - , "LOCK" - , "MKCOL" - , "MOVE" - , "PROPFIND" - , "PROPPATCH" - , "UNLOCK" - , "REPORT" - , "MKACTIVITY" - , "CHECKOUT" - , "MERGE" - , "M-SEARCH" - , "NOTIFY" - , "SUBSCRIBE" - , "UNSUBSCRIBE" - , "PATCH" - }; - - -/* Tokens as defined by rfc 2616. Also lowercases them. - * token = 1* - * separators = "(" | ")" | "<" | ">" | "@" - * | "," | ";" | ":" | "\" | <"> - * | "/" | "[" | "]" | "?" | "=" - * | "{" | "}" | SP | HT - */ -static const char tokens[256] = { -/* 0 nul 1 soh 2 stx 3 etx 4 eot 5 enq 6 ack 7 bel */ - 0, 0, 0, 0, 0, 0, 0, 0, -/* 8 bs 9 ht 10 nl 11 vt 12 np 13 cr 14 so 15 si */ - 0, 0, 0, 0, 0, 0, 0, 0, -/* 16 dle 17 dc1 18 dc2 19 dc3 20 dc4 21 nak 22 syn 23 etb */ - 0, 0, 0, 0, 0, 0, 0, 0, -/* 24 can 25 em 26 sub 27 esc 28 fs 29 gs 30 rs 31 us */ - 0, 0, 0, 0, 0, 0, 0, 0, -/* 32 sp 33 ! 34 " 35 # 36 $ 37 % 38 & 39 ' */ - 0, '!', 0, '#', '$', '%', '&', '\'', -/* 40 ( 41 ) 42 * 43 + 44 , 45 - 46 . 47 / */ - 0, 0, '*', '+', 0, '-', '.', 0, -/* 48 0 49 1 50 2 51 3 52 4 53 5 54 6 55 7 */ - '0', '1', '2', '3', '4', '5', '6', '7', -/* 56 8 57 9 58 : 59 ; 60 < 61 = 62 > 63 ? */ - '8', '9', 0, 0, 0, 0, 0, 0, -/* 64 @ 65 A 66 B 67 C 68 D 69 E 70 F 71 G */ - 0, 'a', 'b', 'c', 'd', 'e', 'f', 'g', -/* 72 H 73 I 74 J 75 K 76 L 77 M 78 N 79 O */ - 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', -/* 80 P 81 Q 82 R 83 S 84 T 85 U 86 V 87 W */ - 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', -/* 88 X 89 Y 90 Z 91 [ 92 \ 93 ] 94 ^ 95 _ */ - 'x', 'y', 'z', 0, 0, 0, '^', '_', -/* 96 ` 97 a 98 b 99 c 100 d 101 e 102 f 103 g */ - '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', -/* 104 h 105 i 106 j 107 k 108 l 109 m 110 n 111 o */ - 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', -/* 112 p 113 q 114 r 115 s 116 t 117 u 118 v 119 w */ - 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', -/* 120 x 121 y 122 z 123 { 124 | 125 } 126 ~ 127 del */ - 'x', 'y', 'z', 0, '|', 0, '~', 0 }; - - -static const int8_t unhex[256] = - {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 - ,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 - ,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 - , 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,-1,-1,-1,-1,-1,-1 - ,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1 - ,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 - ,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1 - ,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 - }; - - -static const uint8_t normal_url_char[256] = { -/* 0 nul 1 soh 2 stx 3 etx 4 eot 5 enq 6 ack 7 bel */ - 0, 0, 0, 0, 0, 0, 0, 0, -/* 8 bs 9 ht 10 nl 11 vt 12 np 13 cr 14 so 15 si */ - 0, 0, 0, 0, 0, 0, 0, 0, -/* 16 dle 17 dc1 18 dc2 19 dc3 20 dc4 21 nak 22 syn 23 etb */ - 0, 0, 0, 0, 0, 0, 0, 0, -/* 24 can 25 em 26 sub 27 esc 28 fs 29 gs 30 rs 31 us */ - 0, 0, 0, 0, 0, 0, 0, 0, -/* 32 sp 33 ! 34 " 35 # 36 $ 37 % 38 & 39 ' */ - 0, 1, 1, 0, 1, 1, 1, 1, -/* 40 ( 41 ) 42 * 43 + 44 , 45 - 46 . 47 / */ - 1, 1, 1, 1, 1, 1, 1, 1, -/* 48 0 49 1 50 2 51 3 52 4 53 5 54 6 55 7 */ - 1, 1, 1, 1, 1, 1, 1, 1, -/* 56 8 57 9 58 : 59 ; 60 < 61 = 62 > 63 ? */ - 1, 1, 1, 1, 1, 1, 1, 0, -/* 64 @ 65 A 66 B 67 C 68 D 69 E 70 F 71 G */ - 1, 1, 1, 1, 1, 1, 1, 1, -/* 72 H 73 I 74 J 75 K 76 L 77 M 78 N 79 O */ - 1, 1, 1, 1, 1, 1, 1, 1, -/* 80 P 81 Q 82 R 83 S 84 T 85 U 86 V 87 W */ - 1, 1, 1, 1, 1, 1, 1, 1, -/* 88 X 89 Y 90 Z 91 [ 92 \ 93 ] 94 ^ 95 _ */ - 1, 1, 1, 1, 1, 1, 1, 1, -/* 96 ` 97 a 98 b 99 c 100 d 101 e 102 f 103 g */ - 1, 1, 1, 1, 1, 1, 1, 1, -/* 104 h 105 i 106 j 107 k 108 l 109 m 110 n 111 o */ - 1, 1, 1, 1, 1, 1, 1, 1, -/* 112 p 113 q 114 r 115 s 116 t 117 u 118 v 119 w */ - 1, 1, 1, 1, 1, 1, 1, 1, -/* 120 x 121 y 122 z 123 { 124 | 125 } 126 ~ 127 del */ - 1, 1, 1, 1, 1, 1, 1, 0, }; - - -enum state - { s_dead = 1 /* important that this is > 0 */ - - , s_start_req_or_res - , s_res_or_resp_H - , s_start_res - , s_res_H - , s_res_HT - , s_res_HTT - , s_res_HTTP - , s_res_first_http_major - , s_res_http_major - , s_res_first_http_minor - , s_res_http_minor - , s_res_first_status_code - , s_res_status_code - , s_res_status - , s_res_line_almost_done - - , s_start_req - - , s_req_method - , s_req_spaces_before_url - , s_req_schema - , s_req_schema_slash - , s_req_schema_slash_slash - , s_req_host - , s_req_port - , s_req_path - , s_req_query_string_start - , s_req_query_string - , s_req_fragment_start - , s_req_fragment - , s_req_http_start - , s_req_http_H - , s_req_http_HT - , s_req_http_HTT - , s_req_http_HTTP - , s_req_first_http_major - , s_req_http_major - , s_req_first_http_minor - , s_req_http_minor - , s_req_line_almost_done - - , s_header_field_start - , s_header_field - , s_header_value_start - , s_header_value - , s_header_value_lws - - , s_header_almost_done - - , s_chunk_size_start - , s_chunk_size - , s_chunk_parameters - , s_chunk_size_almost_done - - , s_headers_almost_done - , s_headers_done - - /* Important: 's_headers_done' must be the last 'header' state. All - * states beyond this must be 'body' states. It is used for overflow - * checking. See the PARSING_HEADER() macro. - */ - - , s_chunk_data - , s_chunk_data_almost_done - , s_chunk_data_done - - , s_body_identity - , s_body_identity_eof - - , s_message_done - }; - - -#define PARSING_HEADER(state) (state <= s_headers_done) - - -enum header_states - { h_general = 0 - , h_C - , h_CO - , h_CON - - , h_matching_connection - , h_matching_proxy_connection - , h_matching_content_length - , h_matching_transfer_encoding - , h_matching_upgrade - - , h_connection - , h_content_length - , h_transfer_encoding - , h_upgrade - - , h_matching_transfer_encoding_chunked - , h_matching_connection_keep_alive - , h_matching_connection_close - - , h_transfer_encoding_chunked - , h_connection_keep_alive - , h_connection_close - }; - - -/* Macros for character classes; depends on strict-mode */ -#define CR '\r' -#define LF '\n' -#define LOWER(c) (unsigned char)(c | 0x20) -#define IS_ALPHA(c) (LOWER(c) >= 'a' && LOWER(c) <= 'z') -#define IS_NUM(c) ((c) >= '0' && (c) <= '9') -#define IS_ALPHANUM(c) (IS_ALPHA(c) || IS_NUM(c)) - -#if HTTP_PARSER_STRICT -#define TOKEN(c) (tokens[(unsigned char)c]) -#define IS_URL_CHAR(c) (normal_url_char[(unsigned char) (c)]) -#define IS_HOST_CHAR(c) (IS_ALPHANUM(c) || (c) == '.' || (c) == '-') -#else -#define TOKEN(c) ((c == ' ') ? ' ' : tokens[(unsigned char)c]) -#define IS_URL_CHAR(c) \ - (normal_url_char[(unsigned char) (c)] || ((c) & 0x80)) -#define IS_HOST_CHAR(c) \ - (IS_ALPHANUM(c) || (c) == '.' || (c) == '-' || (c) == '_') -#endif - - -#define start_state (parser->type == HTTP_REQUEST ? s_start_req : s_start_res) - - -#if HTTP_PARSER_STRICT -# define STRICT_CHECK(cond) \ -do { \ - if (cond) { \ - SET_ERRNO(HPE_STRICT); \ - goto error; \ - } \ -} while (0) -# define NEW_MESSAGE() (http_should_keep_alive(parser) ? start_state : s_dead) -#else -# define STRICT_CHECK(cond) -# define NEW_MESSAGE() start_state -#endif - - -/* Map errno values to strings for human-readable output */ -#define HTTP_STRERROR_GEN(n, s) { "HPE_" #n, s }, -static struct { - const char *name; - const char *description; -} http_strerror_tab[] = { - HTTP_ERRNO_MAP(HTTP_STRERROR_GEN) -}; -#undef HTTP_STRERROR_GEN - -int http_message_needs_eof(http_parser *parser); - -/* Our URL parser. - * - * This is designed to be shared by http_parser_execute() for URL validation, - * hence it has a state transition + byte-for-byte interface. In addition, it - * is meant to be embedded in http_parser_parse_url(), which does the dirty - * work of turning state transitions URL components for its API. - * - * This function should only be invoked with non-space characters. It is - * assumed that the caller cares about (and can detect) the transition between - * URL and non-URL states by looking for these. - */ -static enum state -parse_url_char(enum state s, const char ch, int is_connect) -{ - if ( isspace(ch) ) { - return s_dead; - } - switch (s) { - case s_req_spaces_before_url: - if (ch == '/' || ch == '*') { - return s_req_path; - } - - /* Proxied requests are followed by scheme of an absolute URI (alpha). - * CONNECT is followed by a hostname, which begins with alphanum. - * All other methods are followed by '/' or '*' (handled above). - */ - if (IS_ALPHA(ch) || (is_connect && IS_NUM(ch))) { - return (is_connect) ? s_req_host : s_req_schema; - } - - break; - - case s_req_schema: - if (IS_ALPHA(ch)) { - return s; - } - - if (ch == ':') { - return s_req_schema_slash; - } - - break; - - case s_req_schema_slash: - if (ch == '/') { - return s_req_schema_slash_slash; - } - - break; - - case s_req_schema_slash_slash: - if (ch == '/') { - return s_req_host; - } - - break; - - case s_req_host: - if (IS_HOST_CHAR(ch)) { - return s; - } - - switch (ch) { - case ':': - return s_req_port; - - case '/': - return s_req_path; - - case '?': - return s_req_query_string_start; - } - - break; - - case s_req_port: - if (IS_NUM(ch)) { - return s; - } - - switch (ch) { - case '/': - return s_req_path; - - case '?': - return s_req_query_string_start; - } - - break; - - case s_req_path: - if (IS_URL_CHAR(ch)) { - return s; - } - - switch (ch) { - case '?': - return s_req_query_string_start; - - case '#': - return s_req_fragment_start; - } - - break; - - case s_req_query_string_start: - if (IS_URL_CHAR(ch)) { - return s_req_query_string; - } - - switch (ch) { - case '?': - /* XXX ignore extra '?' ... is this right? */ - return s; - - case '#': - return s_req_fragment_start; - } - - break; - - case s_req_query_string: - if (IS_URL_CHAR(ch)) { - return s; - } - - switch (ch) { - case '?': - /* allow extra '?' in query string */ - return s; - - case '#': - return s_req_fragment_start; - } - - break; - - case s_req_fragment_start: - if (IS_URL_CHAR(ch)) { - return s_req_fragment; - } - - switch (ch) { - case '?': - return s_req_fragment; - - case '#': - return s; - } - - break; - - case s_req_fragment: - if (IS_URL_CHAR(ch)) { - return s; - } - - switch (ch) { - case '?': - case '#': - return s; - } - - break; - - default: - break; - } - - /* We should never fall out of the switch above unless there's an error */ - return s_dead; -} - -size_t http_parser_execute (http_parser *parser, - const http_parser_settings *settings, - const char *data, - size_t len) -{ - char c, ch; - int8_t unhex_val; - const char *p = data; - const char *header_field_mark = 0; - const char *header_value_mark = 0; - const char *url_mark = 0; - const char *body_mark = 0; - - /* We're in an error state. Don't bother doing anything. */ - if (HTTP_PARSER_ERRNO(parser) != HPE_OK) { - return 0; - } - - if (len == 0) { - switch (parser->state) { - case s_body_identity_eof: - /* Use of CALLBACK_NOTIFY() here would erroneously return 1 byte read if - * we got paused. - */ - CALLBACK_NOTIFY_NOADVANCE(message_complete); - return 0; - - case s_dead: - case s_start_req_or_res: - case s_start_res: - case s_start_req: - return 0; - - default: - SET_ERRNO(HPE_INVALID_EOF_STATE); - return 1; - } - } - - - if (parser->state == s_header_field) - header_field_mark = data; - if (parser->state == s_header_value) - header_value_mark = data; - if (parser->state == s_req_path || - parser->state == s_req_schema || - parser->state == s_req_schema_slash || - parser->state == s_req_schema_slash_slash || - parser->state == s_req_port || - parser->state == s_req_query_string_start || - parser->state == s_req_query_string || - parser->state == s_req_host || - parser->state == s_req_fragment_start || - parser->state == s_req_fragment) - url_mark = data; - - for (p=data; p != data + len; p++) { - ch = *p; - - if (PARSING_HEADER(parser->state)) { - ++parser->nread; - /* Buffer overflow attack */ - if (parser->nread > HTTP_MAX_HEADER_SIZE) { - SET_ERRNO(HPE_HEADER_OVERFLOW); - goto error; - } - } - - reexecute_byte: - switch (parser->state) { - - case s_dead: - /* this state is used after a 'Connection: close' message - * the parser will error out if it reads another message - */ - SET_ERRNO(HPE_CLOSED_CONNECTION); - goto error; - - case s_start_req_or_res: - { - if (ch == CR || ch == LF) - break; - parser->flags = 0; - parser->content_length = ULLONG_MAX; - - if (ch == 'H') { - parser->state = s_res_or_resp_H; - - CALLBACK_NOTIFY(message_begin); - } else { - parser->type = HTTP_REQUEST; - parser->state = s_start_req; - goto reexecute_byte; - } - - break; - } - - case s_res_or_resp_H: - if (ch == 'T') { - parser->type = HTTP_RESPONSE; - parser->state = s_res_HT; - } else { - if (ch != 'E') { - SET_ERRNO(HPE_INVALID_CONSTANT); - goto error; - } - - parser->type = HTTP_REQUEST; - parser->method = HTTP_HEAD; - parser->index = 2; - parser->state = s_req_method; - } - break; - - case s_start_res: - { - parser->flags = 0; - parser->content_length = ULLONG_MAX; - - switch (ch) { - case 'H': - parser->state = s_res_H; - break; - - case CR: - case LF: - break; - - default: - SET_ERRNO(HPE_INVALID_CONSTANT); - goto error; - } - - CALLBACK_NOTIFY(message_begin); - break; - } - - case s_res_H: - STRICT_CHECK(ch != 'T'); - parser->state = s_res_HT; - break; - - case s_res_HT: - STRICT_CHECK(ch != 'T'); - parser->state = s_res_HTT; - break; - - case s_res_HTT: - STRICT_CHECK(ch != 'P'); - parser->state = s_res_HTTP; - break; - - case s_res_HTTP: - STRICT_CHECK(ch != '/'); - parser->state = s_res_first_http_major; - break; - - case s_res_first_http_major: - if (ch < '0' || ch > '9') { - SET_ERRNO(HPE_INVALID_VERSION); - goto error; - } - - parser->http_major = ch - '0'; - parser->state = s_res_http_major; - break; - - /* major HTTP version or dot */ - case s_res_http_major: - { - if (ch == '.') { - parser->state = s_res_first_http_minor; - break; - } - - if (!IS_NUM(ch)) { - SET_ERRNO(HPE_INVALID_VERSION); - goto error; - } - - parser->http_major *= 10; - parser->http_major += ch - '0'; - - if (parser->http_major > 999) { - SET_ERRNO(HPE_INVALID_VERSION); - goto error; - } - - break; - } - - /* first digit of minor HTTP version */ - case s_res_first_http_minor: - if (!IS_NUM(ch)) { - SET_ERRNO(HPE_INVALID_VERSION); - goto error; - } - - parser->http_minor = ch - '0'; - parser->state = s_res_http_minor; - break; - - /* minor HTTP version or end of request line */ - case s_res_http_minor: - { - if (ch == ' ') { - parser->state = s_res_first_status_code; - break; - } - - if (!IS_NUM(ch)) { - SET_ERRNO(HPE_INVALID_VERSION); - goto error; - } - - parser->http_minor *= 10; - parser->http_minor += ch - '0'; - - if (parser->http_minor > 999) { - SET_ERRNO(HPE_INVALID_VERSION); - goto error; - } - - break; - } - - case s_res_first_status_code: - { - if (!IS_NUM(ch)) { - if (ch == ' ') { - break; - } - - SET_ERRNO(HPE_INVALID_STATUS); - goto error; - } - parser->status_code = ch - '0'; - parser->state = s_res_status_code; - break; - } - - case s_res_status_code: - { - if (!IS_NUM(ch)) { - switch (ch) { - case ' ': - parser->state = s_res_status; - break; - case CR: - parser->state = s_res_line_almost_done; - break; - case LF: - parser->state = s_header_field_start; - break; - default: - SET_ERRNO(HPE_INVALID_STATUS); - goto error; - } - break; - } - - parser->status_code *= 10; - parser->status_code += ch - '0'; - - if (parser->status_code > 999) { - SET_ERRNO(HPE_INVALID_STATUS); - goto error; - } - - break; - } - - case s_res_status: - /* the human readable status. e.g. "NOT FOUND" - * we are not humans so just ignore this */ - if (ch == CR) { - parser->state = s_res_line_almost_done; - break; - } - - if (ch == LF) { - parser->state = s_header_field_start; - break; - } - break; - - case s_res_line_almost_done: - STRICT_CHECK(ch != LF); - parser->state = s_header_field_start; - break; - - case s_start_req: - { - if (ch == CR || ch == LF) - break; - parser->flags = 0; - parser->content_length = ULLONG_MAX; - - if (!IS_ALPHA(ch)) { - SET_ERRNO(HPE_INVALID_METHOD); - goto error; - } - - parser->method = (enum http_method) 0; - parser->index = 1; - switch (ch) { - case 'C': parser->method = HTTP_CONNECT; /* or COPY, CHECKOUT */ break; - case 'D': parser->method = HTTP_DELETE; break; - case 'G': parser->method = HTTP_GET; break; - case 'H': parser->method = HTTP_HEAD; break; - case 'L': parser->method = HTTP_LOCK; break; - case 'M': parser->method = HTTP_MKCOL; /* or MOVE, MKACTIVITY, MERGE, M-SEARCH */ break; - case 'N': parser->method = HTTP_NOTIFY; break; - case 'O': parser->method = HTTP_OPTIONS; break; - case 'P': parser->method = HTTP_POST; - /* or PROPFIND or PROPPATCH or PUT or PATCH */ - break; - case 'R': parser->method = HTTP_REPORT; break; - case 'S': parser->method = HTTP_SUBSCRIBE; break; - case 'T': parser->method = HTTP_TRACE; break; - case 'U': parser->method = HTTP_UNLOCK; /* or UNSUBSCRIBE */ break; - default: - SET_ERRNO(HPE_INVALID_METHOD); - goto error; - } - parser->state = s_req_method; - - CALLBACK_NOTIFY(message_begin); - - break; - } - - case s_req_method: - { - const char *matcher; - if (ch == '\0') { - SET_ERRNO(HPE_INVALID_METHOD); - goto error; - } - - matcher = method_strings[parser->method]; - if (ch == ' ' && matcher[parser->index] == '\0') { - parser->state = s_req_spaces_before_url; - } else if (ch == matcher[parser->index]) { - ; /* nada */ - } else if (parser->method == HTTP_CONNECT) { - if (parser->index == 1 && ch == 'H') { - parser->method = HTTP_CHECKOUT; - } else if (parser->index == 2 && ch == 'P') { - parser->method = HTTP_COPY; - } else { - goto error; - } - } else if (parser->method == HTTP_MKCOL) { - if (parser->index == 1 && ch == 'O') { - parser->method = HTTP_MOVE; - } else if (parser->index == 1 && ch == 'E') { - parser->method = HTTP_MERGE; - } else if (parser->index == 1 && ch == '-') { - parser->method = HTTP_MSEARCH; - } else if (parser->index == 2 && ch == 'A') { - parser->method = HTTP_MKACTIVITY; - } else { - goto error; - } - } else if (parser->index == 1 && parser->method == HTTP_POST) { - if (ch == 'R') { - parser->method = HTTP_PROPFIND; /* or HTTP_PROPPATCH */ - } else if (ch == 'U') { - parser->method = HTTP_PUT; - } else if (ch == 'A') { - parser->method = HTTP_PATCH; - } else { - goto error; - } - } else if (parser->index == 2 && parser->method == HTTP_UNLOCK && ch == 'S') { - parser->method = HTTP_UNSUBSCRIBE; - } else if (parser->index == 4 && parser->method == HTTP_PROPFIND && ch == 'P') { - parser->method = HTTP_PROPPATCH; - } else { - SET_ERRNO(HPE_INVALID_METHOD); - goto error; - } - - ++parser->index; - break; - } - - case s_req_spaces_before_url: - { - if (ch == ' ') break; - - MARK(url); - - parser->state = parse_url_char( - (enum state)parser->state, ch, parser->method == HTTP_CONNECT); - if (parser->state == s_dead) { - SET_ERRNO(HPE_INVALID_URL); - goto error; - } - - break; - } - - case s_req_schema: - case s_req_schema_slash: - case s_req_schema_slash_slash: - { - switch (ch) { - /* No whitespace allowed here */ - case ' ': - case CR: - case LF: - SET_ERRNO(HPE_INVALID_URL); - goto error; - default: - parser->state = parse_url_char( - (enum state)parser->state, ch, parser->method == HTTP_CONNECT); - if (parser->state == s_dead) { - SET_ERRNO(HPE_INVALID_URL); - goto error; - } - } - - break; - } - - case s_req_host: - case s_req_port: - case s_req_path: - case s_req_query_string_start: - case s_req_query_string: - case s_req_fragment_start: - case s_req_fragment: - { - /* XXX: There is a bug here where if we're on the first character - * of s_req_host (e.g. our URL is 'http://' and we see a whitespace - * character, we'll consider this a valid URL. This seems incorrect, - * but at least it's bug-compatible with what we had before. - */ - switch (ch) { - case ' ': - parser->state = s_req_http_start; - CALLBACK_DATA(url); - break; - case CR: - case LF: - parser->http_major = 0; - parser->http_minor = 9; - parser->state = (ch == CR) ? - s_req_line_almost_done : - s_header_field_start; - CALLBACK_DATA(url); - break; - default: - parser->state = parse_url_char( - (enum state)parser->state, ch, parser->method == HTTP_CONNECT); - if (parser->state == s_dead) { - SET_ERRNO(HPE_INVALID_URL); - goto error; - } - } - break; - } - - case s_req_http_start: - switch (ch) { - case 'H': - parser->state = s_req_http_H; - break; - case ' ': - break; - default: - SET_ERRNO(HPE_INVALID_CONSTANT); - goto error; - } - break; - - case s_req_http_H: - STRICT_CHECK(ch != 'T'); - parser->state = s_req_http_HT; - break; - - case s_req_http_HT: - STRICT_CHECK(ch != 'T'); - parser->state = s_req_http_HTT; - break; - - case s_req_http_HTT: - STRICT_CHECK(ch != 'P'); - parser->state = s_req_http_HTTP; - break; - - case s_req_http_HTTP: - STRICT_CHECK(ch != '/'); - parser->state = s_req_first_http_major; - break; - - /* first digit of major HTTP version */ - case s_req_first_http_major: - if (ch < '1' || ch > '9') { - SET_ERRNO(HPE_INVALID_VERSION); - goto error; - } - - parser->http_major = ch - '0'; - parser->state = s_req_http_major; - break; - - /* major HTTP version or dot */ - case s_req_http_major: - { - if (ch == '.') { - parser->state = s_req_first_http_minor; - break; - } - - if (!IS_NUM(ch)) { - SET_ERRNO(HPE_INVALID_VERSION); - goto error; - } - - parser->http_major *= 10; - parser->http_major += ch - '0'; - - if (parser->http_major > 999) { - SET_ERRNO(HPE_INVALID_VERSION); - goto error; - } - - break; - } - - /* first digit of minor HTTP version */ - case s_req_first_http_minor: - if (!IS_NUM(ch)) { - SET_ERRNO(HPE_INVALID_VERSION); - goto error; - } - - parser->http_minor = ch - '0'; - parser->state = s_req_http_minor; - break; - - /* minor HTTP version or end of request line */ - case s_req_http_minor: - { - if (ch == CR) { - parser->state = s_req_line_almost_done; - break; - } - - if (ch == LF) { - parser->state = s_header_field_start; - break; - } - - /* XXX allow spaces after digit? */ - - if (!IS_NUM(ch)) { - SET_ERRNO(HPE_INVALID_VERSION); - goto error; - } - - parser->http_minor *= 10; - parser->http_minor += ch - '0'; - - if (parser->http_minor > 999) { - SET_ERRNO(HPE_INVALID_VERSION); - goto error; - } - - break; - } - - /* end of request line */ - case s_req_line_almost_done: - { - if (ch != LF) { - SET_ERRNO(HPE_LF_EXPECTED); - goto error; - } - - parser->state = s_header_field_start; - break; - } - - case s_header_field_start: - { - if (ch == CR) { - parser->state = s_headers_almost_done; - break; - } - - if (ch == LF) { - /* they might be just sending \n instead of \r\n so this would be - * the second \n to denote the end of headers*/ - parser->state = s_headers_almost_done; - goto reexecute_byte; - } - - c = TOKEN(ch); - - if (!c) { - SET_ERRNO(HPE_INVALID_HEADER_TOKEN); - goto error; - } - - MARK(header_field); - - parser->index = 0; - parser->state = s_header_field; - - switch (c) { - case 'c': - parser->header_state = h_C; - break; - - case 'p': - parser->header_state = h_matching_proxy_connection; - break; - - case 't': - parser->header_state = h_matching_transfer_encoding; - break; - - case 'u': - parser->header_state = h_matching_upgrade; - break; - - default: - parser->header_state = h_general; - break; - } - break; - } - - case s_header_field: - { - c = TOKEN(ch); - - if (c) { - switch (parser->header_state) { - case h_general: - break; - - case h_C: - parser->index++; - parser->header_state = (c == 'o' ? h_CO : h_general); - break; - - case h_CO: - parser->index++; - parser->header_state = (c == 'n' ? h_CON : h_general); - break; - - case h_CON: - parser->index++; - switch (c) { - case 'n': - parser->header_state = h_matching_connection; - break; - case 't': - parser->header_state = h_matching_content_length; - break; - default: - parser->header_state = h_general; - break; - } - break; - - /* connection */ - - case h_matching_connection: - parser->index++; - if (parser->index > sizeof(CONNECTION)-1 - || c != CONNECTION[parser->index]) { - parser->header_state = h_general; - } else if (parser->index == sizeof(CONNECTION)-2) { - parser->header_state = h_connection; - } - break; - - /* proxy-connection */ - - case h_matching_proxy_connection: - parser->index++; - if (parser->index > sizeof(PROXY_CONNECTION)-1 - || c != PROXY_CONNECTION[parser->index]) { - parser->header_state = h_general; - } else if (parser->index == sizeof(PROXY_CONNECTION)-2) { - parser->header_state = h_connection; - } - break; - - /* content-length */ - - case h_matching_content_length: - parser->index++; - if (parser->index > sizeof(CONTENT_LENGTH)-1 - || c != CONTENT_LENGTH[parser->index]) { - parser->header_state = h_general; - } else if (parser->index == sizeof(CONTENT_LENGTH)-2) { - parser->header_state = h_content_length; - } - break; - - /* transfer-encoding */ - - case h_matching_transfer_encoding: - parser->index++; - if (parser->index > sizeof(TRANSFER_ENCODING)-1 - || c != TRANSFER_ENCODING[parser->index]) { - parser->header_state = h_general; - } else if (parser->index == sizeof(TRANSFER_ENCODING)-2) { - parser->header_state = h_transfer_encoding; - } - break; - - /* upgrade */ - - case h_matching_upgrade: - parser->index++; - if (parser->index > sizeof(UPGRADE)-1 - || c != UPGRADE[parser->index]) { - parser->header_state = h_general; - } else if (parser->index == sizeof(UPGRADE)-2) { - parser->header_state = h_upgrade; - } - break; - - case h_connection: - case h_content_length: - case h_transfer_encoding: - case h_upgrade: - if (ch != ' ') parser->header_state = h_general; - break; - - default: - assert(0 && "Unknown header_state"); - break; - } - break; - } - - if (ch == ':') { - parser->state = s_header_value_start; - CALLBACK_DATA(header_field); - break; - } - - if (ch == CR) { - parser->state = s_header_almost_done; - CALLBACK_DATA(header_field); - break; - } - - if (ch == LF) { - parser->state = s_header_field_start; - CALLBACK_DATA(header_field); - break; - } - - SET_ERRNO(HPE_INVALID_HEADER_TOKEN); - goto error; - } - - case s_header_value_start: - { - if (ch == ' ' || ch == '\t') break; - - MARK(header_value); - - parser->state = s_header_value; - parser->index = 0; - - if (ch == CR) { - parser->header_state = h_general; - parser->state = s_header_almost_done; - CALLBACK_DATA(header_value); - break; - } - - if (ch == LF) { - parser->state = s_header_field_start; - CALLBACK_DATA(header_value); - break; - } - - c = LOWER(ch); - - switch (parser->header_state) { - case h_upgrade: - parser->flags |= F_UPGRADE; - parser->header_state = h_general; - break; - - case h_transfer_encoding: - /* looking for 'Transfer-Encoding: chunked' */ - if ('c' == c) { - parser->header_state = h_matching_transfer_encoding_chunked; - } else { - parser->header_state = h_general; - } - break; - - case h_content_length: - if (!IS_NUM(ch)) { - SET_ERRNO(HPE_INVALID_CONTENT_LENGTH); - goto error; - } - - parser->content_length = ch - '0'; - break; - - case h_connection: - /* looking for 'Connection: keep-alive' */ - if (c == 'k') { - parser->header_state = h_matching_connection_keep_alive; - /* looking for 'Connection: close' */ - } else if (c == 'c') { - parser->header_state = h_matching_connection_close; - } else { - parser->header_state = h_general; - } - break; - - default: - parser->header_state = h_general; - break; - } - break; - } - - case s_header_value: - { - - if (ch == CR) { - parser->state = s_header_almost_done; - CALLBACK_DATA(header_value); - break; - } - - if (ch == LF) { - parser->state = s_header_almost_done; - CALLBACK_DATA_NOADVANCE(header_value); - goto reexecute_byte; - } - - c = LOWER(ch); - - switch (parser->header_state) { - case h_general: - break; - - case h_connection: - case h_transfer_encoding: - assert(0 && "Shouldn't get here."); - break; - - case h_content_length: - { - uint64_t t; - - if (ch == ' ') break; - - if (!IS_NUM(ch)) { - SET_ERRNO(HPE_INVALID_CONTENT_LENGTH); - goto error; - } - - t = parser->content_length; - t *= 10; - t += ch - '0'; - - /* Overflow? */ - if (t < parser->content_length || t == ULLONG_MAX) { - SET_ERRNO(HPE_INVALID_CONTENT_LENGTH); - goto error; - } - - parser->content_length = t; - break; - } - - /* Transfer-Encoding: chunked */ - case h_matching_transfer_encoding_chunked: - parser->index++; - if (parser->index > sizeof(CHUNKED)-1 - || c != CHUNKED[parser->index]) { - parser->header_state = h_general; - } else if (parser->index == sizeof(CHUNKED)-2) { - parser->header_state = h_transfer_encoding_chunked; - } - break; - - /* looking for 'Connection: keep-alive' */ - case h_matching_connection_keep_alive: - parser->index++; - if (parser->index > sizeof(KEEP_ALIVE)-1 - || c != KEEP_ALIVE[parser->index]) { - parser->header_state = h_general; - } else if (parser->index == sizeof(KEEP_ALIVE)-2) { - parser->header_state = h_connection_keep_alive; - } - break; - - /* looking for 'Connection: close' */ - case h_matching_connection_close: - parser->index++; - if (parser->index > sizeof(CLOSE)-1 || c != CLOSE[parser->index]) { - parser->header_state = h_general; - } else if (parser->index == sizeof(CLOSE)-2) { - parser->header_state = h_connection_close; - } - break; - - case h_transfer_encoding_chunked: - case h_connection_keep_alive: - case h_connection_close: - if (ch != ' ') parser->header_state = h_general; - break; - - default: - parser->state = s_header_value; - parser->header_state = h_general; - break; - } - break; - } - - case s_header_almost_done: - { - STRICT_CHECK(ch != LF); - - parser->state = s_header_value_lws; - - switch (parser->header_state) { - case h_connection_keep_alive: - parser->flags |= F_CONNECTION_KEEP_ALIVE; - break; - case h_connection_close: - parser->flags |= F_CONNECTION_CLOSE; - break; - case h_transfer_encoding_chunked: - parser->flags |= F_CHUNKED; - break; - default: - break; - } - - break; - } - - case s_header_value_lws: - { - if (ch == ' ' || ch == '\t') - parser->state = s_header_value_start; - else - { - parser->state = s_header_field_start; - goto reexecute_byte; - } - break; - } - - case s_headers_almost_done: - { - STRICT_CHECK(ch != LF); - - if (parser->flags & F_TRAILING) { - /* End of a chunked request */ - parser->state = NEW_MESSAGE(); - CALLBACK_NOTIFY(message_complete); - break; - } - - parser->state = s_headers_done; - - /* Set this here so that on_headers_complete() callbacks can see it */ - parser->upgrade = - (parser->flags & F_UPGRADE || parser->method == HTTP_CONNECT); - - /* Here we call the headers_complete callback. This is somewhat - * different than other callbacks because if the user returns 1, we - * will interpret that as saying that this message has no body. This - * is needed for the annoying case of recieving a response to a HEAD - * request. - * - * We'd like to use CALLBACK_NOTIFY_NOADVANCE() here but we cannot, so - * we have to simulate it by handling a change in errno below. - */ - if (settings->on_headers_complete) { - switch (settings->on_headers_complete(parser)) { - case 0: - break; - - case 1: - parser->flags |= F_SKIPBODY; - break; - - default: - SET_ERRNO(HPE_CB_headers_complete); - return p - data; /* Error */ - } - } - - if (HTTP_PARSER_ERRNO(parser) != HPE_OK) { - return p - data; - } - - goto reexecute_byte; - } - - case s_headers_done: - { - STRICT_CHECK(ch != LF); - - parser->nread = 0; - - /* Exit, the rest of the connect is in a different protocol. */ - if (parser->upgrade) { - parser->state = NEW_MESSAGE(); - CALLBACK_NOTIFY(message_complete); - return (p - data) + 1; - } - - if (parser->flags & F_SKIPBODY) { - parser->state = NEW_MESSAGE(); - CALLBACK_NOTIFY(message_complete); - } else if (parser->flags & F_CHUNKED) { - /* chunked encoding - ignore Content-Length header */ - parser->state = s_chunk_size_start; - } else { - if (parser->content_length == 0) { - /* Content-Length header given but zero: Content-Length: 0\r\n */ - parser->state = NEW_MESSAGE(); - CALLBACK_NOTIFY(message_complete); - } else if (parser->content_length != ULLONG_MAX) { - /* Content-Length header given and non-zero */ - parser->state = s_body_identity; - } else { - if (parser->type == HTTP_REQUEST || - !http_message_needs_eof(parser)) { - /* Assume content-length 0 - read the next */ - parser->state = NEW_MESSAGE(); - CALLBACK_NOTIFY(message_complete); - } else { - /* Read body until EOF */ - parser->state = s_body_identity_eof; - } - } - } - - break; - } - - case s_body_identity: - { - uint64_t to_read = MIN(parser->content_length, - (uint64_t) ((data + len) - p)); - - assert(parser->content_length != 0 - && parser->content_length != ULLONG_MAX); - - /* The difference between advancing content_length and p is because - * the latter will automaticaly advance on the next loop iteration. - * Further, if content_length ends up at 0, we want to see the last - * byte again for our message complete callback. - */ - MARK(body); - parser->content_length -= to_read; - p += to_read - 1; - - if (parser->content_length == 0) { - parser->state = s_message_done; - - /* Mimic CALLBACK_DATA_NOADVANCE() but with one extra byte. - * - * The alternative to doing this is to wait for the next byte to - * trigger the data callback, just as in every other case. The - * problem with this is that this makes it difficult for the test - * harness to distinguish between complete-on-EOF and - * complete-on-length. It's not clear that this distinction is - * important for applications, but let's keep it for now. - */ - CALLBACK_DATA_(body, p - body_mark + 1, p - data); - goto reexecute_byte; - } - - break; - } - - /* read until EOF */ - case s_body_identity_eof: - MARK(body); - p = data + len - 1; - - break; - - case s_message_done: - parser->state = NEW_MESSAGE(); - CALLBACK_NOTIFY(message_complete); - break; - - case s_chunk_size_start: - { - assert(parser->nread == 1); - assert(parser->flags & F_CHUNKED); - - unhex_val = unhex[(unsigned char)ch]; - if (unhex_val == -1) { - SET_ERRNO(HPE_INVALID_CHUNK_SIZE); - goto error; - } - - parser->content_length = unhex_val; - parser->state = s_chunk_size; - break; - } - - case s_chunk_size: - { - uint64_t t; - - assert(parser->flags & F_CHUNKED); - - if (ch == CR) { - parser->state = s_chunk_size_almost_done; - break; - } - - unhex_val = unhex[(unsigned char)ch]; - - if (unhex_val == -1) { - if (ch == ';' || ch == ' ') { - parser->state = s_chunk_parameters; - break; - } - - SET_ERRNO(HPE_INVALID_CHUNK_SIZE); - goto error; - } - - t = parser->content_length; - t *= 16; - t += unhex_val; - - /* Overflow? */ - if (t < parser->content_length || t == ULLONG_MAX) { - SET_ERRNO(HPE_INVALID_CONTENT_LENGTH); - goto error; - } - - parser->content_length = t; - break; - } - - case s_chunk_parameters: - { - assert(parser->flags & F_CHUNKED); - /* just ignore this shit. TODO check for overflow */ - if (ch == CR) { - parser->state = s_chunk_size_almost_done; - break; - } - break; - } - - case s_chunk_size_almost_done: - { - assert(parser->flags & F_CHUNKED); - STRICT_CHECK(ch != LF); - - parser->nread = 0; - - if (parser->content_length == 0) { - parser->flags |= F_TRAILING; - parser->state = s_header_field_start; - } else { - parser->state = s_chunk_data; - } - break; - } - - case s_chunk_data: - { - uint64_t to_read = MIN(parser->content_length, - (uint64_t) ((data + len) - p)); - - assert(parser->flags & F_CHUNKED); - assert(parser->content_length != 0 - && parser->content_length != ULLONG_MAX); - - /* See the explanation in s_body_identity for why the content - * length and data pointers are managed this way. - */ - MARK(body); - parser->content_length -= to_read; - p += to_read - 1; - - if (parser->content_length == 0) { - parser->state = s_chunk_data_almost_done; - } - - break; - } - - case s_chunk_data_almost_done: - assert(parser->flags & F_CHUNKED); - assert(parser->content_length == 0); - STRICT_CHECK(ch != CR); - parser->state = s_chunk_data_done; - CALLBACK_DATA(body); - break; - - case s_chunk_data_done: - assert(parser->flags & F_CHUNKED); - STRICT_CHECK(ch != LF); - parser->nread = 0; - parser->state = s_chunk_size_start; - break; - - default: - assert(0 && "unhandled state"); - SET_ERRNO(HPE_INVALID_INTERNAL_STATE); - goto error; - } - } - - /* Run callbacks for any marks that we have leftover after we ran our of - * bytes. There should be at most one of these set, so it's OK to invoke - * them in series (unset marks will not result in callbacks). - * - * We use the NOADVANCE() variety of callbacks here because 'p' has already - * overflowed 'data' and this allows us to correct for the off-by-one that - * we'd otherwise have (since CALLBACK_DATA() is meant to be run with a 'p' - * value that's in-bounds). - */ - - assert(((header_field_mark ? 1 : 0) + - (header_value_mark ? 1 : 0) + - (url_mark ? 1 : 0) + - (body_mark ? 1 : 0)) <= 1); - - CALLBACK_DATA_NOADVANCE(header_field); - CALLBACK_DATA_NOADVANCE(header_value); - CALLBACK_DATA_NOADVANCE(url); - CALLBACK_DATA_NOADVANCE(body); - - return len; - -error: - if (HTTP_PARSER_ERRNO(parser) == HPE_OK) { - SET_ERRNO(HPE_UNKNOWN); - } - - return (p - data); -} - - -/* Does the parser need to see an EOF to find the end of the message? */ -int -http_message_needs_eof (http_parser *parser) -{ - if (parser->type == HTTP_REQUEST) { - return 0; - } - - /* See RFC 2616 section 4.4 */ - if (parser->status_code / 100 == 1 || /* 1xx e.g. Continue */ - parser->status_code == 204 || /* No Content */ - parser->status_code == 304 || /* Not Modified */ - parser->flags & F_SKIPBODY) { /* response to a HEAD request */ - return 0; - } - - if ((parser->flags & F_CHUNKED) || parser->content_length != ULLONG_MAX) { - return 0; - } - - return 1; -} - - -int -http_should_keep_alive (http_parser *parser) -{ - if (parser->http_major > 0 && parser->http_minor > 0) { - /* HTTP/1.1 */ - if (parser->flags & F_CONNECTION_CLOSE) { - return 0; - } - } else { - /* HTTP/1.0 or earlier */ - if (!(parser->flags & F_CONNECTION_KEEP_ALIVE)) { - return 0; - } - } - - return !http_message_needs_eof(parser); -} - - -const char * http_method_str (enum http_method m) -{ - return method_strings[m]; -} - - -void -http_parser_init (http_parser *parser, enum http_parser_type t) -{ - void *data = parser->data; /* preserve application data */ - memset(parser, 0, sizeof(*parser)); - parser->data = data; - parser->type = t; - parser->state = (t == HTTP_REQUEST ? s_start_req : (t == HTTP_RESPONSE ? s_start_res : s_start_req_or_res)); - parser->http_errno = HPE_OK; -} - -const char * -http_errno_name(enum http_errno err) { - // this assert is statically true, making the compiler complain - // assert(err < (sizeof(http_strerror_tab)/sizeof(http_strerror_tab[0]))); - return http_strerror_tab[err].name; -} - -const char * -http_errno_description(enum http_errno err) { - // this assert is statically true, making the compiler complain - // assert(err < (sizeof(http_strerror_tab)/sizeof(http_strerror_tab[0]))); - return http_strerror_tab[err].description; -} - -int -http_parser_parse_url(const char *buf, size_t buflen, int is_connect, - struct http_parser_url *u) -{ - enum state s; - const char *p; - enum http_parser_url_fields uf, old_uf; - - u->port = u->field_set = 0; - s = s_req_spaces_before_url; - uf = old_uf = UF_MAX; - - for (p = buf; p < buf + buflen; p++) { - if ((s = parse_url_char(s, *p, is_connect)) == s_dead) { - return 1; - } - - /* Figure out the next field that we're operating on */ - switch (s) { - case s_req_schema: - case s_req_schema_slash: - case s_req_schema_slash_slash: - uf = UF_SCHEMA; - break; - - case s_req_host: - uf = UF_HOST; - break; - - case s_req_port: - uf = UF_PORT; - break; - - case s_req_path: - uf = UF_PATH; - break; - - case s_req_query_string_start: - case s_req_query_string: - uf = UF_QUERY; - break; - - case s_req_fragment_start: - case s_req_fragment: - uf = UF_FRAGMENT; - break; - - default: - assert(!"Unexpected state"); - return 1; - } - - /* Nothing's changed; soldier on */ - if (uf == old_uf) { - u->field_data[uf].len++; - continue; - } - - /* We ignore the first character in some fields; without this, we end up - * with the query being "?foo=bar" rather than "foo=bar". Callers probably - * don't want this. - */ - switch (uf) { - case UF_QUERY: - case UF_FRAGMENT: - case UF_PORT: - u->field_data[uf].off = p - buf + 1; - u->field_data[uf].len = 0; - break; - - default: - u->field_data[uf].off = p - buf; - u->field_data[uf].len = 1; - break; - } - - u->field_set |= (1 << uf); - old_uf = uf; - } - - if (u->field_set & (1 << UF_PORT)) { - /* Don't bother with endp; we've already validated the string */ - unsigned long v = strtoul(buf + u->field_data[UF_PORT].off, NULL, 10); - - /* Ports have a max value of 2^16 */ - if (v > 0xffff) { - return 1; - } - - u->port = (uint16_t) v; - } - - return 0; -} - -void -http_parser_pause(http_parser *parser, int paused) { - /* Users should only be pausing/unpausing a parser that is not in an error - * state. In non-debug builds, there's not much that we can do about this - * other than ignore it. - */ - if (HTTP_PARSER_ERRNO(parser) == HPE_OK || - HTTP_PARSER_ERRNO(parser) == HPE_PAUSED) { - SET_ERRNO((paused) ? HPE_PAUSED : HPE_OK); - } else { - assert(0 && "Attempting to pause parser in error state"); - } -} diff --git a/outside/jhttp/http_parser.h b/outside/jhttp/http_parser.h deleted file mode 100755 index 6c9f839fe..000000000 --- a/outside/jhttp/http_parser.h +++ /dev/null @@ -1,314 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ -#ifndef http_parser_h -#define http_parser_h -#ifdef __cplusplus -extern "C" { -#endif - -#define HTTP_PARSER_VERSION_MAJOR 1 -#define HTTP_PARSER_VERSION_MINOR 0 - -#include -#if defined(_WIN32) && !defined(__MINGW32__) && (!defined(_MSC_VER) || _MSC_VER<1600) -typedef __int8 int8_t; -typedef unsigned __int8 uint8_t; -typedef __int16 int16_t; -typedef unsigned __int16 uint16_t; -typedef __int32 int32_t; -typedef unsigned __int32 uint32_t; -typedef __int64 int64_t; -typedef unsigned __int64 uint64_t; - -typedef unsigned int size_t; -typedef int ssize_t; -#else -#include -#endif - -/* Compile with -DHTTP_PARSER_STRICT=0 to make less checks, but run - * faster - */ -#ifndef HTTP_PARSER_STRICT -# define HTTP_PARSER_STRICT 1 -#endif - -/* Compile with -DHTTP_PARSER_DEBUG=1 to add extra debugging information to - * the error reporting facility. - */ -#ifndef HTTP_PARSER_DEBUG -# define HTTP_PARSER_DEBUG 0 -#endif - - -/* Maximium header size allowed */ -#define HTTP_MAX_HEADER_SIZE (80*1024) - - -typedef struct http_parser http_parser; -typedef struct http_parser_settings http_parser_settings; -typedef struct http_parser_result http_parser_result; - - -/* Callbacks should return non-zero to indicate an error. The parser will - * then halt execution. - * - * The one exception is on_headers_complete. In a HTTP_RESPONSE parser - * returning '1' from on_headers_complete will tell the parser that it - * should not expect a body. This is used when receiving a response to a - * HEAD request which may contain 'Content-Length' or 'Transfer-Encoding: - * chunked' headers that indicate the presence of a body. - * - * http_data_cb does not return data chunks. It will be call arbitrarally - * many times for each string. E.G. you might get 10 callbacks for "on_path" - * each providing just a few characters more data. - */ -typedef int (*http_data_cb) (http_parser*, const char *at, size_t length); -typedef int (*http_cb) (http_parser*); - - -/* Request Methods */ -enum http_method - { HTTP_DELETE = 0 - , HTTP_GET - , HTTP_HEAD - , HTTP_POST - , HTTP_PUT - /* pathological */ - , HTTP_CONNECT - , HTTP_OPTIONS - , HTTP_TRACE - /* webdav */ - , HTTP_COPY - , HTTP_LOCK - , HTTP_MKCOL - , HTTP_MOVE - , HTTP_PROPFIND - , HTTP_PROPPATCH - , HTTP_UNLOCK - /* subversion */ - , HTTP_REPORT - , HTTP_MKACTIVITY - , HTTP_CHECKOUT - , HTTP_MERGE - /* upnp */ - , HTTP_MSEARCH - , HTTP_NOTIFY - , HTTP_SUBSCRIBE - , HTTP_UNSUBSCRIBE - /* RFC-5789 */ - , HTTP_PATCH - }; - - -enum http_parser_type { HTTP_REQUEST, HTTP_RESPONSE, HTTP_BOTH }; - - -/* Flag values for http_parser.flags field */ -enum flags - { F_CHUNKED = 1 << 0 - , F_CONNECTION_KEEP_ALIVE = 1 << 1 - , F_CONNECTION_CLOSE = 1 << 2 - , F_TRAILING = 1 << 3 - , F_UPGRADE = 1 << 4 - , F_SKIPBODY = 1 << 5 - }; - - -/* Map for errno-related constants - * - * The provided argument should be a macro that takes 2 arguments. - */ -#define HTTP_ERRNO_MAP(XX) \ - /* No error */ \ - XX(OK, "success") \ - \ - /* Callback-related errors */ \ - XX(CB_message_begin, "the on_message_begin callback failed") \ - XX(CB_path, "the on_path callback failed") \ - XX(CB_query_string, "the on_query_string callback failed") \ - XX(CB_url, "the on_url callback failed") \ - XX(CB_fragment, "the on_fragment callback failed") \ - XX(CB_header_field, "the on_header_field callback failed") \ - XX(CB_header_value, "the on_header_value callback failed") \ - XX(CB_headers_complete, "the on_headers_complete callback failed") \ - XX(CB_body, "the on_body callback failed") \ - XX(CB_message_complete, "the on_message_complete callback failed") \ - \ - /* Parsing-related errors */ \ - XX(INVALID_EOF_STATE, "stream ended at an unexpected time") \ - XX(HEADER_OVERFLOW, \ - "too many header bytes seen; overflow detected") \ - XX(CLOSED_CONNECTION, \ - "data received after completed connection: close message") \ - XX(INVALID_VERSION, "invalid HTTP version") \ - XX(INVALID_STATUS, "invalid HTTP status code") \ - XX(INVALID_METHOD, "invalid HTTP method") \ - XX(INVALID_URL, "invalid URL") \ - XX(INVALID_HOST, "invalid host") \ - XX(INVALID_PORT, "invalid port") \ - XX(INVALID_PATH, "invalid path") \ - XX(INVALID_QUERY_STRING, "invalid query string") \ - XX(INVALID_FRAGMENT, "invalid fragment") \ - XX(LF_EXPECTED, "LF character expected") \ - XX(INVALID_HEADER_TOKEN, "invalid character in header") \ - XX(INVALID_CONTENT_LENGTH, \ - "invalid character in content-length header") \ - XX(INVALID_CHUNK_SIZE, \ - "invalid character in chunk size header") \ - XX(INVALID_CONSTANT, "invalid constant string") \ - XX(INVALID_INTERNAL_STATE, "encountered unexpected internal state")\ - XX(STRICT, "strict mode assertion failed") \ - XX(PAUSED, "parser is paused") \ - XX(UNKNOWN, "an unknown error occurred") - - -/* Define HPE_* values for each errno value above */ -#define HTTP_ERRNO_GEN(n, s) HPE_##n, -enum http_errno { - HTTP_ERRNO_MAP(HTTP_ERRNO_GEN) -}; -#undef HTTP_ERRNO_GEN - - -/* Get an http_errno value from an http_parser */ -#define HTTP_PARSER_ERRNO(p) ((enum http_errno) (p)->http_errno) - -/* Get the line number that generated the current error */ -#if HTTP_PARSER_DEBUG -#define HTTP_PARSER_ERRNO_LINE(p) ((p)->error_lineno) -#else -#define HTTP_PARSER_ERRNO_LINE(p) 0 -#endif - - -struct http_parser { - /** PRIVATE **/ - unsigned char type : 2; /* enum http_parser_type */ - unsigned char flags : 6; /* F_* values from 'flags' enum; semi-public */ - unsigned char state; /* enum state from http_parser.c */ - unsigned char header_state; /* enum header_state from http_parser.c */ - unsigned char index; /* index into current matcher */ - - uint32_t nread; /* # bytes read in various scenarios */ - uint64_t content_length; /* # bytes in body (0 if no Content-Length header) */ - - /** READ-ONLY **/ - unsigned short http_major; - unsigned short http_minor; - unsigned short status_code; /* responses only */ - unsigned char method; /* requests only */ - unsigned char http_errno : 7; - - /* 1 = Upgrade header was present and the parser has exited because of that. - * 0 = No upgrade header present. - * Should be checked when http_parser_execute() returns in addition to - * error checking. - */ - unsigned char upgrade : 1; - -#if HTTP_PARSER_DEBUG - uint32_t error_lineno; -#endif - - /** PUBLIC **/ - void *data; /* A pointer to get hook to the "connection" or "socket" object */ -}; - - -struct http_parser_settings { - http_cb on_message_begin; - http_data_cb on_url; - http_data_cb on_header_field; - http_data_cb on_header_value; - http_cb on_headers_complete; - http_data_cb on_body; - http_cb on_message_complete; -}; - - -enum http_parser_url_fields - { UF_SCHEMA = 0 - , UF_HOST = 1 - , UF_PORT = 2 - , UF_PATH = 3 - , UF_QUERY = 4 - , UF_FRAGMENT = 5 - , UF_MAX = 6 - }; - - -/* Result structure for http_parser_parse_url(). - * - * Callers should index into field_data[] with UF_* values iff field_set - * has the relevant (1 << UF_*) bit set. As a courtesy to clients (and - * because we probably have padding left over), we convert any port to - * a uint16_t. - */ -struct http_parser_url { - uint16_t field_set; /* Bitmask of (1 << UF_*) values */ - uint16_t port; /* Converted UF_PORT string */ - - struct { - uint16_t off; /* Offset into buffer in which field starts */ - uint16_t len; /* Length of run in buffer */ - } field_data[UF_MAX]; -}; - - -void http_parser_init(http_parser *parser, enum http_parser_type type); - - -size_t http_parser_execute(http_parser *parser, - const http_parser_settings *settings, - const char *data, - size_t len); - - -/* If http_should_keep_alive() in the on_headers_complete or - * on_message_complete callback returns true, then this will be should be - * the last message on the connection. - * If you are the server, respond with the "Connection: close" header. - * If you are the client, close the connection. - */ -int http_should_keep_alive(http_parser *parser); - -/* Returns a string version of the HTTP method. */ -const char *http_method_str(enum http_method m); - -/* Return a string name of the given error */ -const char *http_errno_name(enum http_errno err); - -/* Return a string description of the given error */ -const char *http_errno_description(enum http_errno err); - -/* Parse a URL; return nonzero on failure */ -int http_parser_parse_url(const char *buf, size_t buflen, - int is_connect, - struct http_parser_url *u); - -/* Pause or un-pause the parser; a nonzero value pauses */ -void http_parser_pause(http_parser *parser, int paused); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/outside/libuv-v1.7.5/.gitignore b/outside/libuv-v1.7.5/.gitignore deleted file mode 100644 index 86a8a5b7b..000000000 --- a/outside/libuv-v1.7.5/.gitignore +++ /dev/null @@ -1,75 +0,0 @@ -*.swp -*.[oa] -*.l[oa] -*.opensdf -*.orig -*.pyc -*.sdf -*.suo -core -vgcore.* -.buildstamp -.dirstamp -.deps/ -/.libs/ -/aclocal.m4 -/ar-lib -/autom4te.cache/ -/compile -/config.guess -/config.log -/config.status -/config.sub -/configure -/depcomp -/install-sh -/libtool -/libuv.a -/libuv.dylib -/libuv.pc -/libuv.so -/ltmain.sh -/missing -/test-driver -Makefile -Makefile.in - -# Generated by gyp for android -*.target.mk - -/out/ -/build/gyp - -/test/.libs/ -/test/run-tests -/test/run-tests.exe -/test/run-tests.dSYM -/test/run-benchmarks -/test/run-benchmarks.exe -/test/run-benchmarks.dSYM - -*.sln -*.sln.cache -*.ncb -*.vcproj -*.vcproj*.user -*.vcxproj -*.vcxproj.filters -*.vcxproj.user -_UpgradeReport_Files/ -UpgradeLog*.XML -Debug -Release -ipch - -# sphinx generated files -/docs/build/ - -# Clion / IntelliJ project files -/.idea/ - -*.xcodeproj -*.xcworkspace - -# make dist output -libuv-*.tar.* diff --git a/outside/libuv-v1.7.5/.mailmap b/outside/libuv-v1.7.5/.mailmap deleted file mode 100644 index eb9b5e0d9..000000000 --- a/outside/libuv-v1.7.5/.mailmap +++ /dev/null @@ -1,38 +0,0 @@ -Aaron Bieber -Alan Gutierrez -Andrius Bentkus -Bert Belder -Bert Belder -Brandon Philips -Brian White -Brian White -Caleb James DeLisle -Christoph Iserlohn -Devchandra Meetei Leishangthem -Fedor Indutny -Frank Denis -Isaac Z. Schlueter -Jason Williams -Justin Venus -Keno Fischer -Keno Fischer -Leith Bade -Leonard Hecker -Maciej Małecki -Marc Schlaich -Michael -Michael Neumann -Rasmus Christian Pedersen -Rasmus Christian Pedersen -Robert Mustacchi -Ryan Dahl -Ryan Emery -Sam Roberts -San-Tai Hsu -Santiago Gimeno -Saúl Ibarra Corretgé -Shigeki Ohtsu -Timothy J. Fontaine -Yasuhiro Matsumoto -Yazhong Liu -Yuki Okumura diff --git a/outside/libuv-v1.7.5/AUTHORS b/outside/libuv-v1.7.5/AUTHORS deleted file mode 100644 index b2397e2df..000000000 --- a/outside/libuv-v1.7.5/AUTHORS +++ /dev/null @@ -1,227 +0,0 @@ -# Authors ordered by first contribution. -Ryan Dahl -Bert Belder -Josh Roesslein -Alan Gutierrez -Joshua Peek -Igor Zinkovsky -San-Tai Hsu -Ben Noordhuis -Henry Rawas -Robert Mustacchi -Matt Stevens -Paul Querna -Shigeki Ohtsu -Tom Hughes -Peter Bright -Jeroen Janssen -Andrea Lattuada -Augusto Henrique Hentz -Clifford Heath -Jorge Chamorro Bieling -Luis Lavena -Matthew Sporleder -Erick Tryzelaar -Isaac Z. Schlueter -Pieter Noordhuis -Marek Jelen -Fedor Indutny -Saúl Ibarra Corretgé -Felix Geisendörfer -Yuki Okumura -Roman Shtylman -Frank Denis -Carter Allen -Tj Holowaychuk -Shimon Doodkin -Ryan Emery -Bruce Mitchener -Maciej Małecki -Yasuhiro Matsumoto -Daisuke Murase -Paddy Byers -Dan VerWeire -Brandon Benvie -Brandon Philips -Nathan Rajlich -Charlie McConnell -Vladimir Dronnikov -Aaron Bieber -Bulat Shakirzyanov -Brian White -Erik Dubbelboer -Keno Fischer -Ira Cooper -Andrius Bentkus -Iñaki Baz Castillo -Mark Cavage -George Yohng -Xidorn Quan -Roman Neuhauser -Shuhei Tanuma -Bryan Cantrill -Trond Norbye -Tim Holy -Prancesco Pertugio -Leonard Hecker -Andrew Paprocki -Luigi Grilli -Shannen Saez -Artur Adib -Hiroaki Nakamura -Ting-Yu Lin -Stephen Gallagher -Shane Holloway -Andrew Shaffer -Vlad Tudose -Ben Leslie -Tim Bradshaw -Timothy J. Fontaine -Marc Schlaich -Brian Mazza -Elliot Saba -Ben Kelly -Nils Maier -Nicholas Vavilov -Miroslav Bajtoš -Sean Silva -Wynn Wilkes -Andrei Sedoi -Alex Crichton -Brent Cook -Brian Kaisner -Luca Bruno -Reini Urban -Maks Naumov -Sean Farrell -Chris Bank -Geert Jansen -Christoph Iserlohn -Steven Kabbes -Alex Gaynor -huxingyi -Tenor Biel -Andrej Manduch -Joshua Neuheisel -Alexis Campailla -Yazhong Liu -Sam Roberts -River Tarnell -Nathan Sweet -Trevor Norris -Oguz Bastemur -Dylan Cali -Austin Foxley -Benjamin Saunders -Geoffry Song -Rasmus Christian Pedersen -William Light -Oleg Efimov -Lars Gierth -Rasmus Christian Pedersen -Justin Venus -Kristian Evensen -Linus Mårtensson -Navaneeth Kedaram Nambiathan -Yorkie -StarWing -thierry-FreeBSD -Isaiah Norton -Raul Martins -David Capello -Paul Tan -Javier Hernández -Tonis Tiigi -Norio Kobota -李港平 -Chernyshev Viacheslav -Stephen von Takach -JD Ballard -Luka Perkov -Ryan Cole -HungMingWu -Jay Satiro -Leith Bade -Peter Atashian -Tim Cooper -Caleb James DeLisle -Jameson Nash -Graham Lee -Andrew Low -Pavel Platto -Tony Kelman -John Firebaugh -lilohuang -Paul Goldsmith -Julien Gilli -Michael Hudson-Doyle -Recep ASLANTAS -Rob Adams -Zachary Newman -Robin Hahling -Jeff Widman -cjihrig -Tomasz Kołodziejski -Unknown W. Brackets -Emmanuel Odeke -Mikhail Mukovnikov -Thorsten Lorenz -Yuri D'Elia -Manos Nikolaidis -Elijah Andrews -Michael Ira Krufky -Helge Deller -Joey Geralnik -Tim Caswell -Logan Rosen -Kenneth Perry -John Marino -Alexey Melnichuk -Johan Bergström -Alex Mo -Luis Martinez de Bartolome -Michael Penick -Michael -Massimiliano Torromeo -TomCrypto -Brett Vickers -Ole André Vadla Ravnås -Kazuho Oku -Ryan Phillips -Brian Green -Devchandra Meetei Leishangthem -Corey Farrell -Per Nilsson -Alan Rogers -Daryl Haresign -Rui Abreu Ferreira -João Reis -farblue68 -Jason Williams -Igor Soarez -Miodrag Milanovic -Cheng Zhao -Michael Neumann -Stefano Cristiano -heshamsafi -A. Hauptmann -John McNamee -Yosuke Furukawa -Santiago Gimeno -guworks -RossBencina -Roger A. Light -chenttuuvv -Richard Lau -ronkorving -Corbin Simpson -Zachary Hamm -Karl Skomski -Jeremy Whitlock -Willem Thiart -Ben Trask -Jianghua Yang -Colin Snover -Sakthipriyan Vairamani -Eli Skeggs -nmushell diff --git a/outside/libuv-v1.7.5/CONTRIBUTING.md b/outside/libuv-v1.7.5/CONTRIBUTING.md deleted file mode 100644 index b46edd492..000000000 --- a/outside/libuv-v1.7.5/CONTRIBUTING.md +++ /dev/null @@ -1,166 +0,0 @@ -# CONTRIBUTING - -The libuv project welcomes new contributors. This document will guide you -through the process. - - -### FORK - -Fork the project [on GitHub](https://github.com/libuv/libuv) and check out -your copy. - -``` -$ git clone https://github.com/username/libuv.git -$ cd libuv -$ git remote add upstream https://github.com/libuv/libuv.git -``` - -Now decide if you want your feature or bug fix to go into the master branch -or the stable branch. As a rule of thumb, bug fixes go into the stable branch -while new features go into the master branch. - -The stable branch is effectively frozen; patches that change the libuv -API/ABI or affect the run-time behavior of applications get rejected. - -In case of doubt, open an issue in the [issue tracker][], post your question -to the [libuv mailing list], or contact one of project maintainers -(@bnoordhuis, @piscisaureus, @indutny or @saghul) on [IRC][]. - -Especially do so if you plan to work on something big. Nothing is more -frustrating than seeing your hard work go to waste because your vision -does not align with that of a project maintainers. - - -### BRANCH - -Okay, so you have decided on the proper branch. Create a feature branch -and start hacking: - -``` -$ git checkout -b my-feature-branch -t origin/v1.x -``` - -(Where v1.x is the latest stable branch as of this writing.) - -### CODE - -Please adhere to libuv's code style. In general it follows the conventions from -the [Google C/C++ style guide]. Some of the key points, as well as some -additional guidelines, are enumerated below. - -* Code that is specific to unix-y platforms should be placed in `src/unix`, and - declarations go into `include/uv-unix.h`. - -* Source code that is Windows-specific goes into `src/win`, and related - publicly exported types, functions and macro declarations should generally - be declared in `include/uv-win.h`. - -* Names should be descriptive and concise. - -* All the symbols and types that libuv makes available publicly should be - prefixed with `uv_` (or `UV_` in case of macros). - -* Internal, non-static functions should be prefixed with `uv__`. - -* Use two spaces and no tabs. - -* Lines should be wrapped at 80 characters. - -* Ensure that lines have no trailing whitespace, and use unix-style (LF) line - endings. - -* Use C89-compliant syntax. In other words, variables can only be declared at - the top of a scope (function, if/for/while-block). - -* When writing comments, use properly constructed sentences, including - punctuation. - -* When documenting APIs and/or source code, don't make assumptions or make - implications about race, gender, religion, political orientation or anything - else that isn't relevant to the project. - -* Remember that source code usually gets written once and read often: ensure - the reader doesn't have to make guesses. Make sure that the purpose and inner - logic are either obvious to a reasonably skilled professional, or add a - comment that explains it. - - -### COMMIT - -Make sure git knows your name and email address: - -``` -$ git config --global user.name "J. Random User" -$ git config --global user.email "j.random.user@example.com" -``` - -Writing good commit logs is important. A commit log should describe what -changed and why. Follow these guidelines when writing one: - -1. The first line should be 50 characters or less and contain a short - description of the change prefixed with the name of the changed - subsystem (e.g. "net: add localAddress and localPort to Socket"). -2. Keep the second line blank. -3. Wrap all other lines at 72 columns. - -A good commit log looks like this: - -``` -subsystem: explaining the commit in one line - -Body of commit message is a few lines of text, explaining things -in more detail, possibly giving some background about the issue -being fixed, etc etc. - -The body of the commit message can be several paragraphs, and -please do proper word-wrap and keep columns shorter than about -72 characters or so. That way `git log` will show things -nicely even when it is indented. -``` - -The header line should be meaningful; it is what other people see when they -run `git shortlog` or `git log --oneline`. - -Check the output of `git log --oneline files_that_you_changed` to find out -what subsystem (or subsystems) your changes touch. - - -### REBASE - -Use `git rebase` (not `git merge`) to sync your work from time to time. - -``` -$ git fetch upstream -$ git rebase upstream/v1.x # or upstream/master -``` - - -### TEST - -Bug fixes and features should come with tests. Add your tests in the -`test/` directory. Tests also need to be registered in `test/test-list.h`. -Look at other tests to see how they should be structured (license boilerplate, -the way entry points are declared, etc.). - -Check README.md file to find out how to run the test suite and make sure that -there are no test regressions. - -### PUSH - -``` -$ git push origin my-feature-branch -``` - -Go to https://github.com/username/libuv and select your feature branch. Click -the 'Pull Request' button and fill out the form. - -Pull requests are usually reviewed within a few days. If there are comments -to address, apply your changes in a separate commit and push that to your -feature branch. Post a comment in the pull request afterwards; GitHub does -not send out notifications when you add commits. - - -[issue tracker]: https://github.com/libuv/libuv/issues -[libuv mailing list]: http://groups.google.com/group/libuv -[IRC]: http://webchat.freelibuv.net/?channels=libuv -[Google C/C++ style guide]: http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml diff --git a/outside/libuv-v1.7.5/ChangeLog b/outside/libuv-v1.7.5/ChangeLog deleted file mode 100644 index aae7ad6f8..000000000 --- a/outside/libuv-v1.7.5/ChangeLog +++ /dev/null @@ -1,2273 +0,0 @@ -2015.09.23, Version 1.7.5 (Stable) - -Changes since version 1.7.4: - -* unix: Support atomic compare & swap xlC on AIX (nmushell) - -* unix: Fix including uv-aix.h on AIX (nmushell) - -* unix: consolidate rwlock tryrdlock trywrlock errors (Saúl Ibarra Corretgé) - -* unix, win: consolidate mutex trylock errors (Saúl Ibarra Corretgé) - -* darwin: fix memory leak in uv_cpu_info (Jianghua Yang) - -* test: add tests for the uv_rwlock implementation (Bert Belder) - -* win: redo/fix the uv_rwlock APIs (Bert Belder) - -* win: don't fetch function pointers to SRWLock APIs (Bert Belder) - - -2015.09.12, Version 1.7.4 (Stable), a7ad4f52189d89cfcba35f78bfc5ff3b1f4105c4 - -Changes since version 1.7.3: - -* doc: uv_read_start and uv_read_cb clarifications (Ben Trask) - -* freebsd: obtain true uptime through clock_gettime() (Jianghua Yang) - -* win, tty: do not convert \r to \r\n (Colin Snover) - -* build,gyp: add DragonFly to the list of OSes (Michael Neumann) - -* fs: fix bug in sendfile for DragonFly (Michael Neumann) - -* doc: add uv_dlsym() return type (Brian White) - -* tests: fix fs tests run w/o full getdents support (Jeremy Whitlock) - -* doc: fix typo (Devchandra Meetei Leishangthem) - -* doc: fix uv-unix.h location (Sakthipriyan Vairamani) - -* unix: fix error check when closing process pipe fd (Ben Noordhuis) - -* test,freebsd: fix ipc_listen_xx_write tests (Santiago Gimeno) - -* win: fix unsavory rwlock fallback implementation (Bert Belder) - -* doc: clarify repeat timer behavior (Eli Skeggs) - - -2015.08.28, Version 1.7.3 (Stable), 93877b11c8b86e0a6befcda83a54555c1e36e4f0 - -Changes since version 1.7.2: - -* threadpool: fix thread starvation bug (Ben Noordhuis) - - -2015.08.25, Version 1.7.2 (Stable), 4d13a013fcfa72311f0102751fdc7951873f466c - -Changes since version 1.7.1: - -* unix, win: make uv_loop_init return on error (Willem Thiart) - -* win: reset pipe handle for pipe servers (Saúl Ibarra Corretgé) - -* win: fix replacing pipe handle for pipe servers (Saúl Ibarra Corretgé) - -* win: fix setting pipe pending instances after bind (Saúl Ibarra Corretgé) - - -2015.08.20, Version 1.7.1 (Stable), 44f4b6bd82d8ae4583ccc4768a83af778ef69f85 - -Changes since version 1.7.0: - -* doc: document the procedure for verifying releases (Saúl Ibarra Corretgé) - -* doc: add note about Windows binaries to the README (Saúl Ibarra Corretgé) - -* doc: use long GPG IDs in MAINTAINERS.md (Saúl Ibarra Corretgé) - -* Revert "stream: squelch ECONNRESET error if already closed" (Saúl Ibarra - Corretgé) - -* doc: clarify uv_read_stop() is idempotent (Corbin Simpson) - -* unix: OpenBSD's setsockopt needs an unsigned char for multicast (Zachary - Hamm) - -* test: Fix two memory leaks (Karl Skomski) - -* unix,win: return EINVAL on nullptr args in uv_fs_{read,write} (Karl Skomski) - -* win: set accepted TCP sockets as non-inheritable (Saúl Ibarra Corretgé) - -* unix: remove superfluous parentheses in fs macros (Ben Noordhuis) - -* unix: don't copy arguments for sync fs requests (Ben Noordhuis) - -* test: plug small memory leak in unix test runner (Ben Noordhuis) - -* unix,windows: allow NULL loop for sync fs requests (Ben Noordhuis) - -* unix,windows: don't assert on unknown error code (Ben Noordhuis) - -* stream: retry write on EPROTOTYPE on OSX (Brian White) - -* common: fix use of snprintf on Windows (Saúl Ibarra Corretgé) - -* tests: refactored fs watch_dir tests for stability (Jeremy Whitlock) - - -2015.08.06, Version 1.7.0 (Stable), 415a865d6365ba58d02b92b89d46ba5d7744ec8b - -Changes since version 1.6.1: - -* win,stream: add slot to remember CRT fd (Bert Belder) - -* win,pipe: properly close when created from CRT fd (Bert Belder) - -* win,pipe: don't close fd 0-2 (Bert Belder) - -* win,tty: convert fd -> handle safely (Bert Belder) - -* win,tty: properly close when created from CRT fd (Bert Belder) - -* win,tty: don't close fd 0-2 (Bert Belder) - -* win,fs: don't close fd 0-2 (Bert Belder) - -* win: include "malloc.h" (Cheng Zhao) - -* windows: MSVC 2015 has C99 inline (Jason Williams) - -* dragonflybsd: fixes for nonblocking and cloexec (Michael Neumann) - -* dragonflybsd: use sendfile(2) for uv_fs_sendfile (Michael Neumann) - -* dragonflybsd: fix uv_exepath (Michael Neumann) - -* win,fs: Fixes align(8) directive on mingw (Stefano Cristiano) - -* unix, win: prevent replacing fd in uv_{udp,tcp,pipe}_t (Saúl Ibarra Corretgé) - -* win: move logic to set socket non-inheritable to uv_tcp_set_socket (Saúl - Ibarra Corretgé) - -* unix, win: add ability to create tcp/udp sockets early (Saúl Ibarra Corretgé) - -* test: retry select() on EINTR, honor milliseconds (Ben Noordhuis) - -* unix: consolidate tcp and udp bind error (Saúl Ibarra Corretgé) - -* test: conditionally skip udp_ipv6_multicast_join6 (heshamsafi) - -* core: add UV_VERSION_HEX macro (Saúl Ibarra Corretgé) - -* doc: add section with version-checking macros and functions (Saúl Ibarra - Corretgé) - -* tty: cleanup handle if uv_tty_init fails (Saúl Ibarra Corretgé) - -* darwin: save a fd when FSEvents is used (Saúl Ibarra Corretgé) - -* win: fix returning thread id in uv_thread_self (Saúl Ibarra Corretgé) - -* common: use offsetof for QUEUE_DATA (Saúl Ibarra Corretgé) - -* win: remove UV_HANDLE_CONNECTED (A. Hauptmann) - -* docs: add Windows specific note for uv_fs_open (Saúl Ibarra Corretgé) - -* doc: add note about uv_fs_scandir (Saúl Ibarra Corretgé) - -* test,unix: reduce stack size of watchdog threads (Ben Noordhuis) - -* win: add support for recursive file watching (Saúl Ibarra Corretgé) - -* win,tty: support consoles with non-default colors (John McNamee) - -* doc: add missing variable name (Yosuke Furukawa) - -* stream: squelch ECONNRESET error if already closed (Santiago Gimeno) - -* build: remove ancient condition from common.gypi (Saúl Ibarra Corretgé) - -* tests: skip some tests when network is unreachable (Luca Bruno) - -* build: proper support for android cross compilation (guworks) - -* android: add missing include to pthread-fixes.c (RossBencina) - -* test: fix compilation warning (Saúl Ibarra Corretgé) - -* doc: add a note about uv_dirent_t.type (Saúl Ibarra Corretgé) - -* win,test: fix shared library build (Saúl Ibarra Corretgé) - -* test: fix compilation warning (Santiago Gimeno) - -* build: add experimental Windows installer (Roger A. Light) - -* threadpool: send signal only when queue is empty (chenttuuvv) - -* aix: fix uv_exepath with relative paths (Richard Lau) - -* build: fix version syntax in AppVeyor file (Saúl Ibarra Corretgé) - -* unix: allow nbufs > IOV_MAX in uv_fs_{read,write} (ronkorving) - - -2015.06.06, Version 1.6.1 (Stable), 30c8be07bb78a66fdee5141626bf53a49a17094a - -Changes since version 1.6.0: - -* unix: handle invalid _SC_GETPW_R_SIZE_MAX values (cjihrig) - - -2015.06.04, Version 1.6.0 (Stable), adfccad76456061dfcf79b8df8e7dbfee51791d7 - -Changes since version 1.5.0: - -* aix: fix setsockopt for multicast options (Michael) - -* unix: don't block for io if any io handle is primed (Saúl Ibarra Corretgé) - -* windows: MSVC 2015 has snprintf() (Rui Abreu Ferreira) - -* windows: Add VS2015 support to vcbuild.bat (Jason Williams) - -* doc: fix typo in tcp.rst (Igor Soarez) - -* linux: work around epoll bug in kernels < 2.6.37 (Ben Noordhuis) - -* unix,win: add uv_os_homedir() (cjihrig) - -* stream: fix `select()` race condition (Fedor Indutny) - -* unix: prevent infinite loop in uv__run_pending (Saúl Ibarra Corretgé) - -* unix: make sure UDP send callbacks are asynchronous (Saúl Ibarra Corretgé) - -* test: fix `platform_output` netmask printing. (Andrew Paprocki) - -* aix: add ahafs autoconf detection and README notes (Andrew Paprocki) - -* core: add ability to customize memory allocator (Saúl Ibarra Corretgé) - - -2015.05.07, Version 1.5.0 (Stable), 4e77f74c7b95b639b3397095db1bc5bcc016c203 - -Changes since version 1.4.2: - -* doc: clarify that the thread pool primites are not thread safe (Andrius - Bentkus) - -* aix: always deregister closing fds from epoll (Michael) - -* unix: fix glibc-2.20+ macro incompatibility (Massimiliano Torromeo) - -* doc: add Sphinx plugin for generating links to man pages (Saúl Ibarra - Corretgé) - -* doc: link system and library calls to man pages (Saúl Ibarra Corretgé) - -* doc: document uv_getnameinfo_t.{host|service} (Saúl Ibarra Corretgé) - -* build: update the location of gyp (Stephen von Takach) - -* win: name all anonymous structs and unions (TomCrypto) - -* linux: work around epoll bug in kernels 3.10-3.19 (Ben Noordhuis) - -* darwin: fix size calculation in select() fallback (Ole André Vadla Ravnås) - -* solaris: fix setsockopt for multicast options (Julien Gilli) - -* test: fix race condition in multithreaded test (Ben Noordhuis) - -* doc: fix long lines in tty.rst (Ben Noordhuis) - -* test: use UV_TTY_MODE_* values in tty test (Ben Noordhuis) - -* unix: don't clobber errno in uv_tty_reset_mode() (Ben Noordhuis) - -* unix: reject non-tty fds in uv_tty_init() (Ben Noordhuis) - -* win: fix pipe blocking writes (Alexis Campailla) - -* build: fix cross-compiling for iOS (Steven Kabbes) - -* win: remove unnecessary malloc.h - -* include: use `extern "c++"` for defining C++ code (Kazuho Oku) - -* unix: reap child on execvp() failure (Ryan Phillips) - -* windows: fix handle leak on EMFILE (Brian Green) - -* test: fix tty_file, close handle if initialized (Saúl Ibarra Corretgé) - -* doc: clarify what uv_*_open accepts (Saúl Ibarra Corretgé) - -* doc: clarify that we don't maintain external doc resources (Saúl Ibarra - Corretgé) - -* build: add documentation for ninja support (Devchandra Meetei Leishangthem) - -* doc: document uv_buf_t members (Corey Farrell) - -* linux: fix epoll_pwait() fallback on arm64 (Ben Noordhuis) - -* android: fix compilation warning (Saúl Ibarra Corretgé) - -* unix: don't close the fds we just setup (Sam Roberts) - -* test: spawn child replacing std{out,err} to stderr (Saúl Ibarra Corretgé) - -* unix: fix swapping fds order in uv_spawn (Saúl Ibarra Corretgé) - -* unix: fix potential bug if dup2 fails in uv_spawn (Saúl Ibarra Corretgé) - -* test: remove LOG and LOGF variadic macros (Saúl Ibarra Corretgé) - -* win: fix uv_fs_access on directories (Saúl Ibarra Corretgé) - -* win: fix of double free in uv_uptime (Per Nilsson) - -* unix: open "/dev/null" instead of "/" for emfile_fd (Alan Rogers) - -* docs: add some missing words (Daryl Haresign) - -* unix: clean up uv_fs_open() O_CLOEXEC logic (Ben Noordhuis) - -* build: set SONAME for shared library in uv.gyp (Rui Abreu Ferreira) - -* windows: define snprintf replacement as inline instead of static (Rui Abreu - Ferreira) - -* win: fix unlink of readonly files (João Reis) - -* doc: fix uv_run(UV_RUN_DEFAULT) description (Ben Noordhuis) - -* linux: intercept syscall when running under memory sanitizer (Keno Fischer) - -* aix: fix uv_interface_addresses return value (farblue68) - -* windows: defer reporting TCP write failure until next tick (Saúl Ibarra - Corretgé) - -* test: add test for deferred TCP write failure (Saúl Ibarra Corretgé) - - -2015.02.27, Version 1.4.2 (Stable), 1a7391348a11d5450c0f69c828d5302e2cb842eb - -Changes since version 1.4.1: - -* stream: ignore EINVAL for SO_OOBINLINE on OS X (Fedor Indutny) - - -2015.02.25, Version 1.4.1 (Stable), e8e3fc5789cc0f02937879d141cca0411274093c - -Changes since version 1.4.0: - -* win: don't use inline keyword in thread.c (Ben Noordhuis) - -* windows: fix setting dirent types on uv_fs_scandir_next (Saúl Ibarra - Corretgé) - -* unix,windows: make uv_thread_create() return errno (Ben Noordhuis) - -* tty: fix build for SmartOS (Julien Gilli) - -* unix: fix for uv_async data race (Michael Penick) - -* unix, windows: map EHOSTDOWN errno (Ben Noordhuis) - -* stream: use SO_OOBINLINE on OS X (Fedor Indutny) - - -2015.02.10, Version 1.4.0 (Stable), 19fb8a90648f3763240db004b77ab984264409be - -Changes since version 1.3.0: - -* unix: check Android support for pthread_cond_timedwait_monotonic_np (Leith - Bade) - -* test: use modified path in test (cjihrig) - -* unix: implement uv_stream_set_blocking() (Ben Noordhuis) - - -2015.01.29, Version 1.3.0 (Stable), 165685b2a9a42cf96501d79cd6d48a18aaa16e3b - -Changes since version 1.2.1: - -* unix, windows: set non-block mode in uv_poll_init (Saúl Ibarra Corretgé) - -* doc: clarify which flags are supported in uv_fs_event_start (Saúl Ibarra - Corretgé) - -* win,unix: move loop functions which have identical implementations (Andrius - Bentkus) - -* doc: explain how the threadpool is allocated (Alex Mo) - -* doc: clarify uv_default_loop (Saúl Ibarra Corretgé) - -* unix: fix implicit declaration compiler warning (Ben Noordhuis) - -* unix: fix long line introduced in commit 94e628fa (Ben Noordhuis) - -* unix, win: add synchronous uv_get{addr,name}info (Saúl Ibarra Corretgé) - -* linux: fix epoll_pwait() regression with < 2.6.19 (Ben Noordhuis) - -* build: compile -D_GNU_SOURCE on linux (Ben Noordhuis) - -* build: use -fvisibility=hidden in autotools build (Ben Noordhuis) - -* fs, pipe: no trailing terminator in exact sized buffers (Andrius Bentkus) - -* style: rename buf to buffer and len to size for consistency (Andrius Bentkus) - -* test: fix test-spawn on MinGW32 (Luis Martinez de Bartolome) - -* win, pipe: fix assertion when destroying timer (Andrius Bentkus) - -* win, unix: add pipe_peername implementation (Andrius Bentkus) - - -2015.01.29, Version 0.10.33 (Stable), 7a2253d33ad8215a26c1b34f1952aee7242dd687 - -Changes since version 0.10.32: - -* linux: fix epoll_pwait() regression with < 2.6.19 (Ben Noordhuis) - -* test: back-port uv_loop_configure() test (Ben Noordhuis) - - -2015.01.15, Version 1.2.1 (Stable), 4ca78e989062a1099dc4b9ad182a98e8374134b1 - -Changes since version 1.2.0: - -* unix: remove unused dtrace file (Saúl Ibarra Corretgé) - -* test: skip TTY select test if /dev/tty can't be opened (Saúl Ibarra Corretgé) - -* doc: clarify the behavior of uv_tty_init (Saúl Ibarra Corretgé) - -* doc: clarify how uv_async_send behaves (Saúl Ibarra Corretgé) - -* build: make dist now generates a full tarball (Johan Bergström) - -* freebsd: make uv_exepath more resilient (Saúl Ibarra Corretgé) - -* unix: make setting the tty mode to the same value a no-op (Saúl Ibarra - Corretgé) - -* win,tcp: support uv_try_write (Bert Belder) - -* test: enable test-tcp-try-write on windows (Bert Belder) - -* win,tty: support uv_try_write (Bert Belder) - -* unix: set non-block mode in uv_{pipe,tcp,udp}_open (Ben Noordhuis) - - -2015.01.06, Version 1.2.0 (Stable), 09f25b13cd149c7981108fc1a75611daf1277f83 - -Changes since version 1.1.0: - -* linux: fix epoll_pwait() sigmask size calculation (Ben Noordhuis) - -* tty: implement binary I/O terminal mode (Yuri D'Elia) - -* test: fix spawn test with autotools build (Ben Noordhuis) - -* test: skip ipv6 tests when ipv6 is not supported (Ben Noordhuis) - -* common: move STATIC_ASSERT to uv-common.h (Alexey Melnichuk) - -* win/thread: store thread handle in a TLS slot (Alexey Melnichuk) - -* unix: fix ttl, multicast ttl and loop options on IPv6 (Saúl Ibarra Corretgé) - -* linux: fix support for preadv/pwritev-less kernels (Ben Noordhuis) - -* unix: make uv_exepath(size=0) return UV_EINVAL (Ben Noordhuis) - -* darwin: fix uv_exepath(smallbuf) UV_EPERM error (Ben Noordhuis) - -* openbsd: fix uv_exepath(smallbuf) UV_EINVAL error (Ben Noordhuis) - -* linux: fix uv_exepath(size=1) UV_EINVAL error (Ben Noordhuis) - -* sunos: preemptively fix uv_exepath(size=1) (Ben Noordhuis) - -* win: fix and clarify comments in winapi.h (Bert Belder) - -* win: make available NtQueryDirectoryFile (Bert Belder) - -* win: add definitions for directory information types (Bert Belder) - -* win: use NtQueryDirectoryFile to implement uv_fs_scandir (Bert Belder) - -* unix: don't unlink unix socket on bind error (Ben Noordhuis) - -* build: fix bad comment in autogen.sh (Ben Noordhuis) - -* build: add AC_PROG_LIBTOOL to configure.ac (Ben Noordhuis) - -* test: skip udp_options6 if there no IPv6 support (Saúl Ibarra Corretgé) - -* win: add definitions for MUI errors mingw lacks (Bert Belder) - -* build: enable warnings in autotools build (Ben Noordhuis) - -* build: remove -Wno-dollar-in-identifier-extension (Ben Noordhuis) - -* build: move flags from Makefile.am to configure.ac (Ben Noordhuis) - - -2015.01.06, Version 0.10.32 (Stable), 378de30c59aef5fdb6d130fa5cfcb0a68fce571c - -Changes since version 0.10.31: - -* linux: fix epoll_pwait() sigmask size calculation (Ben Noordhuis) - - -2014.12.25, Version 1.1.0 (Stable), 9572f3e74a167f59a8017e57ca3ebe91ffd88e18 - -Changes since version 1.0.2: - -* test: test that closing a poll handle doesn't corrupt the stack (Bert Belder) - -* win: fix compilation of tests (Marc Schlaich) - -* Revert "win: keep a reference to AFD_POLL_INFO in cancel poll" (Bert Belder) - -* win: avoid stack corruption when closing a poll handle (Bert Belder) - -* test: fix test-fs-file-loop on Windows (Bert Belder) - -* test: fix test-cwd-and-chdir (Bert Belder) - -* doc: indicate what version uv_loop_configure was added on (Saúl Ibarra - Corretgé) - -* doc: fix sphinx warning (Saúl Ibarra Corretgé) - -* test: skip spawn_setuid_setgid if we get EACCES (Saúl Ibarra Corretgé) - -* test: silence some Clang warnings (Saúl Ibarra Corretgé) - -* test: relax osx_select_many_fds (Saúl Ibarra Corretgé) - -* test: fix compilation warnings when building with Clang (Saúl Ibarra - Corretgé) - -* win: fix autotools build of tests (Luis Lavena) - -* gitignore: ignore Visual Studio files (Marc Schlaich) - -* win: set fallback message if FormatMessage fails (Marc Schlaich) - -* win: fall back to default language in uv_dlerror (Marc Schlaich) - -* test: improve compatibility for dlerror test (Marc Schlaich) - -* test: check dlerror is "no error" in no error case (Marc Schlaich) - -* unix: change uv_cwd not to return a trailing slash (Saúl Ibarra Corretgé) - -* test: fix cwd_and_chdir test on Unix (Saúl Ibarra Corretgé) - -* test: add uv_cwd output to platform_output test (Saúl Ibarra Corretgé) - -* build: fix dragonflybsd autotools build (John Marino) - -* win: scandir use 'ls' for formatting long strings (Kenneth Perry) - -* build: remove clang and gcc_version gyp defines (Ben Noordhuis) - -* unix, windows: don't treat uv_run_mode as a bitmask (Saúl Ibarra Corretgé) - -* unix, windows: fix UV_RUN_ONCE mode if progress was made (Saúl Ibarra - Corretgé) - - -2014.12.25, Version 0.10.31 (Stable), 4dbd27e2219069a6daa769fb37f98673b77b4261 - -Changes since version 0.10.30: - -* test: test that closing a poll handle doesn't corrupt the stack (Bert Belder) - -* win: fix compilation of tests (Marc Schlaich) - -* Revert "win: keep a reference to AFD_POLL_INFO in cancel poll" (Bert Belder) - -* win: avoid stack corruption when closing a poll handle (Bert Belder) - -* gitignore: ignore Visual Studio files (Marc Schlaich) - -* win: set fallback message if FormatMessage fails (Marc Schlaich) - -* win: fall back to default language in uv_dlerror (Marc Schlaich) - -* test: improve compatibility for dlerror test (Marc Schlaich) - -* test: check dlerror is "no error" in no error case (Marc Schlaich) - -* build: link against -pthread (Logan Rosen) - -* win: scandir use 'ls' for formatting long strings (Kenneth Perry) - - -2014.12.10, Version 1.0.2 (Stable), eec671f0059953505f9a3c9aeb7f9f31466dd7cd - -Changes since version 1.0.1: - -* linux: fix sigmask size arg in epoll_pwait() call (Ben Noordhuis) - -* linux: handle O_NONBLOCK != SOCK_NONBLOCK case (Helge Deller) - -* doc: fix spelling (Joey Geralnik) - -* unix, windows: fix typos in comments (Joey Geralnik) - -* test: canonicalize test runner path (Ben Noordhuis) - -* test: fix compilation warnings (Saúl Ibarra Corretgé) - -* test: skip tty test if detected width and height are 0 (Saúl Ibarra Corretgé) - -* doc: update README with IRC channel (Saúl Ibarra Corretgé) - -* Revert "unix: use cfmakeraw() for setting raw TTY mode" (Ben Noordhuis) - -* doc: document how to get result of uv_fs_mkdtemp (Tim Caswell) - -* unix: add flag for blocking SIGPROF during poll (Ben Noordhuis) - -* unix, windows: add uv_loop_configure() function (Ben Noordhuis) - -* win: keep a reference to AFD_POLL_INFO in cancel poll (Marc Schlaich) - -* test: raise fd limit for OSX select test (Saúl Ibarra Corretgé) - -* unix: remove overzealous assert in uv_read_stop (Saúl Ibarra Corretgé) - -* unix: reset the reading flag when a stream gets EOF (Saúl Ibarra Corretgé) - -* unix: stop reading if an error is produced (Saúl Ibarra Corretgé) - -* cleanup: remove all dead assignments (Maciej Małecki) - -* linux: return early if we have no interfaces (Maciej Małecki) - -* cleanup: remove a dead increment (Maciej Małecki) - - -2014.12.10, Version 0.10.30 (Stable), 5a63f5e9546dca482eeebc3054139b21f509f21f - -Changes since version 0.10.29: - -* linux: fix sigmask size arg in epoll_pwait() call (Ben Noordhuis) - -* linux: handle O_NONBLOCK != SOCK_NONBLOCK case (Helge Deller) - -* doc: update project links (Ben Noordhuis) - -* windows: fix compilation of tests (Marc Schlaich) - -* unix: add flag for blocking SIGPROF during poll (Ben Noordhuis) - -* unix, windows: add uv_loop_configure() function (Ben Noordhuis) - -* win: keep a reference to AFD_POLL_INFO in cancel poll (Marc Schlaich) - - -2014.11.27, Version 1.0.1 (Stable), 0a8e81374e861d425b56c45c8599595d848911d2 - -Changes since version 1.0.0: - -* readme: remove Rust from users (Elijah Andrews) - -* doc,build,include: update project links (Ben Noordhuis) - -* doc: fix typo: Strcutures -> Structures (Michael Ira Krufky) - -* unix: fix processing process handles queue (Saúl Ibarra Corretgé) - -* win: replace non-ansi characters in source file (Bert Belder) - - -2014.11.21, Version 1.0.0 (Stable), feb2a9e6947d892f449b2770c4090f7d8c88381b - -Changes since version 1.0.0-rc2: - -* doc: fix git/svn url for gyp repo in README (Emmanuel Odeke) - -* windows: fix fs_read with nbufs > 1 and offset (Unknown W. Brackets) - -* win: add missing IP_ADAPTER_UNICAST_ADDRESS_LH definition for MinGW - (huxingyi) - -* doc: mention homebrew in README (Mikhail Mukovnikov) - -* doc: add learnuv workshop to README (Thorsten Lorenz) - -* doc: fix parameter name in uv_fs_access (Saúl Ibarra Corretgé) - -* unix: use cfmakeraw() for setting raw TTY mode (Yuri D'Elia) - -* win: fix uv_thread_self() (Alexis Campailla) - -* build: add x32 support to gyp build (Ben Noordhuis) - -* build: remove dtrace probes (Ben Noordhuis) - -* doc: fix link in misc.rst (Manos Nikolaidis) - -* mailmap: remove duplicated entries (Saúl Ibarra Corretgé) - -* gyp: fix comment regarding version info location (Saúl Ibarra Corretgé) - - -2014.10.21, Version 1.0.0-rc2 (Pre-release) - -Changes since version 1.0.0-rc1: - -* build: add missing fixtures to distribution tarball (Rob Adams) - -* doc: update references to current stable branch (Zachary Newman) - -* fs: fix readdir on empty directory (Fedor Indutny) - -* fs: rename uv_fs_readdir to uv_fs_scandir (Saúl Ibarra Corretgé) - -* doc: document uv_alloc_cb (Saúl Ibarra Corretgé) - -* doc: add migration guide from version 0.10 (Saúl Ibarra Corretgé) - -* build: add DragonFly BSD support in autotools (Robin Hahling) - -* doc: document missing stream related structures (Saúl Ibarra Corretgé) - -* doc: clarify uv_loop_t.data field lifetime (Saúl Ibarra Corretgé) - -* doc: add documentation for missing functions and structures (Saúl Ibarra - Corretgé) - -* doc: fix punctuation and grammar in README (Jeff Widman) - -* windows: return libuv error codes in uv_poll_init() (cjihrig) - -* unix, windows: add uv_fs_access() (cjihrig) - -* windows: fix netmask detection (Alexis Campailla) - -* unix, windows: don't include null byte in uv_cwd size (Saúl Ibarra Corretgé) - -* unix, windows: add uv_thread_equal (Tomasz Kołodziejski) - -* windows: fix fs_write with nbufs > 1 and offset (Unknown W. Brackets) - - -2014.10.21, Version 0.10.29 (Stable), 2d728542d3790183417f8f122a110693cd85db14 - -Changes since version 0.10.28: - -* darwin: allocate enough space for select() hack (Fedor Indutny) - -* linux: try epoll_pwait if epoll_wait is missing (Michael Hudson-Doyle) - -* windows: map ERROR_INVALID_DRIVE to UV_ENOENT (Saúl Ibarra Corretgé) - - -2014.09.18, Version 1.0.0-rc1 (Unstable), 0c28bbf7b42882853d1799ab96ff68b07f7f8d49 - -Changes since version 0.11.29: - -* windows: improve timer precision (Alexis Campailla) - -* build, gyp: set xcode flags (Recep ASLANTAS) - -* ignore: include m4 files which are created manually (Recep ASLANTAS) - -* build: add m4 for feature/flag-testing (Recep ASLANTAS) - -* ignore: ignore Xcode project and workspace files (Recep ASLANTAS) - -* unix: fix warnings about dollar symbol usage in identifiers (Recep ASLANTAS) - -* unix: fix warnings when loading functions with dlsym (Recep ASLANTAS) - -* linux: try epoll_pwait if epoll_wait is missing (Michael Hudson-Doyle) - -* test: add test for closing and recreating default loop (Saúl Ibarra Corretgé) - -* windows: properly close the default loop (Saúl Ibarra Corretgé) - -* version: add ability to specify a version suffix (Saúl Ibarra Corretgé) - -* doc: add API documentation (Saúl Ibarra Corretgé) - -* test: don't close connection on write error (Trevor Norris) - -* windows: further simplify the code for timers (Saúl Ibarra Corretgé) - -* gyp: remove UNLIMITED_SELECT from dependent define (Fedor Indutny) - -* darwin: allocate enough space for select() hack (Fedor Indutny) - -* unix, windows: don't allow a NULL callback on timers (Saúl Ibarra Corretgé) - -* windows: simplify code in uv_timer_again (Saúl Ibarra Corretgé) - -* test: use less requests on tcp-write-queue-order (Saúl Ibarra Corretgé) - -* unix: stop child process watcher after last one exits (Saúl Ibarra Corretgé) - -* unix: simplify how process handle queue is managed (Saúl Ibarra Corretgé) - -* windows: remove duplicated field (mattn) - -* core: add a reserved field to uv_handle_t and uv_req_t (Saúl Ibarra Corretgé) - -* windows: fix buffer leak after failed udp send (Bert Belder) - -* windows: make sure sockets and handles are reset on close (Saúl Ibarra Corretgé) - -* unix, windows: add uv_fileno (Saúl Ibarra Corretgé) - -* build: use same CFLAGS in autotools build as in gyp (Saúl Ibarra Corretgé) - -* build: remove unneeded define in uv.gyp (Saúl Ibarra Corretgé) - -* test: fix watcher_cross_stop on Windows (Saúl Ibarra Corretgé) - -* unix, windows: move includes for EAI constants (Saúl Ibarra Corretgé) - -* unix: fix exposing EAI_* glibc-isms (Saúl Ibarra Corretgé) - -* unix: fix tcp write after bad connect freezing (Andrius Bentkus) - - -2014.08.20, Version 0.11.29 (Unstable), 35451fed830807095bbae8ef981af004a4b9259e - -Changes since version 0.11.28: - -* windows: make uv_read_stop immediately stop reading (Jameson Nash) - -* windows: fix uv__getaddrinfo_translate_error (Alexis Campailla) - -* netbsd: fix build (Saúl Ibarra Corretgé) - -* unix, windows: add uv_recv_buffer_size and uv_send_buffer_size (Andrius - Bentkus) - -* windows: add support for UNC paths on uv_spawn (Paul Goldsmith) - -* windows: replace use of inet_addr with uv_inet_pton (Saúl Ibarra Corretgé) - -* unix: replace some asserts with returning errors (Andrius Bentkus) - -* windows: use OpenBSD implementation for uv_fs_mkdtemp (Pavel Platto) - -* windows: fix GetNameInfoW error handling (Alexis Campailla) - -* fs: introduce uv_readdir_next() and report types (Fedor Indutny) - -* fs: extend reported types in uv_fs_readdir_next (Saúl Ibarra Corretgé) - -* unix: read on stream even when UV__POLLHUP set. (Julien Gilli) - - -2014.08.08, Version 0.11.28 (Unstable), fc9e2a0bc487b299c0cd3b2c9a23aeb554b5d8d1 - -Changes since version 0.11.27: - -* unix, windows: const-ify handle in uv_udp_getsockname (Rasmus Pedersen) - -* windows: use UV_ECANCELED for aborted TCP writes (Saúl Ibarra Corretgé) - -* windows: add more required environment variables (Jameson Nash) - -* windows: sort environment variables before calling CreateProcess (Jameson - Nash) - -* unix, windows: move uv_loop_close out of assert (John Firebaugh) - -* windows: fix buffer overflow on uv__getnameinfo_work() (lilohuang) - -* windows: add uv_backend_timeout (Jameson Nash) - -* test: disable tcp_close_accept on Windows (Saúl Ibarra Corretgé) - -* windows: read the PATH env var of the child (Alex Crichton) - -* include: avoid using C++ 'template' reserved word (Iñaki Baz Castillo) - -* include: fix version number (Saúl Ibarra Corretgé) - - -2014.07.32, Version 0.11.27 (Unstable), ffe24f955032d060968ea0289af365006afed55e - -Changes since version 0.11.26: - -* unix, windows: use the same threadpool implementation (Saúl Ibarra Corretgé) - -* unix: use struct sockaddr_storage for target UDP addr (Saúl Ibarra Corretgé) - -* doc: add documentation to uv_udp_start_recv (Andrius Bentkus) - -* common: use common uv__count_bufs code (Andrius Bentkus) - -* unix, win: add send_queue_size and send_queue_count to uv_udp_t (Andrius - Bentkus) - -* unix, win: add uv_udp_try_send (Andrius Bentkus) - -* unix: return UV_EAGAIN if uv_try_write cannot write any data (Saúl Ibarra - Corretgé) - -* windows: fix compatibility with cygwin pipes (Jameson Nash) - -* windows: count queued bytes even if request completed immediately (Saúl - Ibarra Corretgé) - -* windows: disable CRT debug handler on MinGW32 (Saúl Ibarra Corretgé) - -* windows: map ERROR_INVALID_DRIVE to UV_ENOENT (Saúl Ibarra Corretgé) - -* unix: try to write immediately in uv_udp_send (Saúl Ibarra Corretgé) - -* unix: remove incorrect assert (Saúl Ibarra Corretgé) - -* openbsd: avoid requiring privileges for uv_resident_set_memory (Aaron Bieber) - -* unix: guarantee write queue cb execution order in streams (Andrius Bentkus) - -* img: add logo files (Saúl Ibarra Corretgé) - -* aix: improve AIX compatibility (Andrew Low) - -* windows: return bind error immediately when implicitly binding (Saúl Ibarra - Corretgé) - -* windows: don't use atexit for cleaning up the threadpool (Saúl Ibarra - Corretgé) - -* windows: destroy work queue elements when colsing a loop (Saúl Ibarra - Corretgé) - -* unix, windows: add uv_fs_mkdtemp (Pavel Platto) - -* build: handle platforms without multiprocessing.synchronize (Saúl Ibarra - Corretgé) - -* windows: change GENERIC_ALL to GENERIC_WRITE in fs__create_junction (Tony - Kelman) - -* windows: relay TCP bind errors via ipc (Alexis Campailla) - - -2014.07.32, Version 0.10.28 (Stable), 9c14b616f5fb84bfd7d45707bab4bbb85894443e - -Changes since version 0.10.27: - -* windows: fix handling closed socket while poll handle is closing (Saúl Ibarra - Corretgé) - -* unix: return system error on EAI_SYSTEM (Saúl Ibarra Corretgé) - -* unix: fix bogus structure field name (Saúl Ibarra Corretgé) - -* darwin: invoke `mach_timebase_info` only once (Fedor Indutny) - - -2014.06.28, Version 0.11.26 (Unstable), 115281a1058c4034d5c5ccedacb667fe3f6327ea - -Changes since version 0.11.25: - -* windows: add VT100 codes ?25l and ?25h (JD Ballard) - -* windows: add invert ANSI (7 / 27) emulation (JD Ballard) - -* unix: fix handling error on UDP socket creation (Saúl Ibarra Corretgé) - -* unix, windows: getnameinfo implementation (Rasmus Pedersen) - -* heap: fix `heap_remove()` (Fedor Indutny) - -* unix, windows: fix parsing scoped IPv6 addresses (Saúl Ibarra Corretgé) - -* windows: fix handling closed socket while poll handle is closing (Saúl Ibarra - Corretgé) - -* thread: barrier functions (Ben Noordhuis) - -* windows: fix PYTHON environment variable usage (Jay Satiro) - -* unix, windows: return system error on EAI_SYSTEM (Saúl Ibarra Corretgé) - -* windows: fix handling closed socket while poll handle is closing (Saúl Ibarra - Corretgé) - -* unix: don't run i/o callbacks after prepare callbacks (Saúl Ibarra Corretgé) - -* windows: add tty unicode support for input (Peter Atashian) - -* header: introduce `uv_loop_size()` (Andrius Bentkus) - -* darwin: invoke `mach_timebase_info` only once (Fedor Indutny) - - -2014.05.02, Version 0.11.25 (Unstable), 2acd544cff7142e06aa3b09ec64b4a33dd9ab996 - -Changes since version 0.11.24: - -* osx: pass const handle pointer to uv___stream_fd (Chernyshev Viacheslav) - -* unix, windows: pass const handle ptr to uv_tcp_get*name (Chernyshev - Viacheslav) - -* common: pass const sockaddr ptr to uv_ip*_name (Chernyshev Viacheslav) - -* unix, windows: validate flags on uv_udp|tcp_bind (Saúl Ibarra Corretgé) - -* unix: handle case when addr is not initialized after recvmsg (Saúl Ibarra - Corretgé) - -* unix, windows: uv_now constness (Rasmus Pedersen) - - -2014.04.15, Version 0.11.24 (Unstable), ed948c29f6e8c290f79325a6f0bc9ef35bcde644 - -Changes since version 0.11.23: - -* linux: reduce file descriptor count of async pipe (Ben Noordhuis) - -* sunos: support IPv6 qualified link-local addresses (Saúl Ibarra Corretgé) - -* windows: fix opening of read-only stdin pipes (Alexis Campailla) - -* windows: Fix an infinite loop in uv_spawn (Alex Crichton) - -* windows: fix console signal handler refcount (李港平) - -* inet: allow scopeid in uv_inet_pton (Fedor Indutny) - - -2014.04.07, Version 0.11.23 (Unstable), e54de537efcacd593f36fcaaf8b4cb9e64313275 - -Changes since version 0.11.22: - -* fs: avoid using readv/writev where possible (Fedor Indutny) - -* mingw: fix build with autotools (Saúl Ibarra Corretgé) - -* bsd: support IPv6 qualified link-local addresses (Saúl Ibarra Corretgé) - -* unix: add UV_HANDLE_IPV6 flag to tcp and udp handles (Saúl Ibarra Corretgé) - -* unix, windows: do not set SO_REUSEADDR by default on udp (Saúl Ibarra - Corretgé) - -* windows: fix check in uv_tty_endgame() (Maks Naumov) - -* unix, windows: add IPv6 support for uv_udp_multicast_interface (Saúl Ibarra - Corretgé) - -* unix: fallback to blocking writes if reopening a tty fails (Saúl Ibarra - Corretgé) - -* unix: fix handling uv__open_cloexec failure (Saúl Ibarra Corretgé) - -* unix, windows: add IPv6 support to uv_udp_set_membership (Saúl Ibarra - Corretgé) - -* unix, windows: removed unused status parameter (Saúl Ibarra Corretgé) - -* android: add support of ifaddrs in android (Javier Hernández) - -* build: fix SunOS and AIX build with autotools (Saúl Ibarra Corretgé) - -* build: freebsd link with libelf if dtrace enabled (Saúl Ibarra Corretgé) - -* stream: do not leak `alloc_cb` buffers on error (Fedor Indutny) - -* unix: fix setting written size on uv_wd (Saúl Ibarra Corretgé) - - -2014.03.11, Version 0.11.22 (Unstable), cd0c19b1d3c56acf0ade7687006e12e75fbda36d - -Changes since version 0.11.21: - -* unix, windows: map ERANGE errno (Saúl Ibarra Corretgé) - -* unix, windows: make uv_cwd be consistent with uv_exepath (Saúl Ibarra - Corretgé) - -* process: remove debug perror() prints (Fedor Indutny) - -* windows: fall back for volume info query (Isaiah Norton) - -* pipe: allow queueing pending handles (Fedor Indutny) - -* windows: fix winsock status codes for address errors (Raul Martins) - -* windows: Remove unused variable from uv__pipe_insert_pending_socket (David - Capello) - -* unix: workaround broken pthread_sigmask on Android (Paul Tan) - -* error: add ENXIO for O_NONBLOCK FIFO open() (Fedor Indutny) - -* freebsd: use accept4, introduced in version 10 (Saúl Ibarra Corretgé) - -* windows: fix warnings of MinGW -Wall -O3 (StarWing) - -* openbsd, osx: fix compilation warning on scandir (Saúl Ibarra Corretgé) - -* linux: always deregister closing fds from epoll (Geoffry Song) - -* unix: reopen tty as /dev/tty (Saúl Ibarra Corretgé) - -* kqueue: invalidate fd in uv_fs_event_t (Fedor Indutny) - - -2014.02.28, Version 0.11.21 (Unstable), 3ef958158ae1019e027ebaa93114160099db5206 - -Changes since version 0.11.20: - -* unix: fix uv_fs_write when using an empty buffer (Saúl Ibarra Corretgé) - -* unix, windows: add assertion in uv_loop_delete (Saúl Ibarra Corretgé) - - -2014.02.27, Version 0.11.20 (Unstable), 88355e081b51c69ee1e2b6b0015a4e3d38bd0579 - -Changes since version 0.11.19: - -* stream: start thread after assignments (Oguz Bastemur) - -* fs: `uv__cloexec()` opened fd (Fedor Indutny) - -* gyp: qualify `library` variable (Fedor Indutny) - -* unix, win: add uv_udp_set_multicast_interface() (Austin Foxley) - -* unix: fix uv_tcp_nodelay return value in case of error (Saúl Ibarra Corretgé) - -* unix: call setgoups before calling setuid/setgid (Saúl Ibarra Corretgé) - -* include: mark close_cb field as private (Saúl Ibarra Corretgé) - -* unix, windows: map EFBIG errno (Saúl Ibarra Corretgé) - -* unix: correct error when calling uv_shutdown twice (Keno Fischer) - -* windows: fix building on MinGW (Alex Crichton) - -* windows: always initialize uv_process_t (Alex Crichton) - -* include: expose libuv version in header files (Saúl Ibarra Corretgé) - -* fs: vectored IO API for filesystem read/write (Benjamin Saunders) - -* windows: freeze in uv_tcp_endgame (Alexis Campailla) - -* sunos: handle rearm errors (Fedor Indutny) - -* unix: use a heap for timers (Ben Noordhuis) - -* linux: always deregister closing fds from epoll (Geoffry Song) - -* linux: include grp.h for setgroups() (William Light) - -* unix, windows: add uv_loop_init and uv_loop_close (Saúl Ibarra Corretgé) - -* unix, windows: add uv_getrusage() function (Oleg Efimov) - -* win: minor error handle fix to uv_pipe_write_impl (Rasmus Pedersen) - -* heap: fix node removal (Keno Fischer) - -* win: fix C99/C++ comment (Rasmus Pedersen) - -* fs: vectored IO API for filesystem read/write (Benjamin Saunders) - -* unix, windows: add uv_pipe_getsockname (Saúl Ibarra Corretgé) - -* unix, windows: map ENOPROTOOPT errno (Saúl Ibarra Corretgé) - -* errno: add ETXTBSY (Fedor Indutny) - -* fsevent: rename filename field to path (Saúl Ibarra Corretgé) - -* unix, windows: add uv_fs_event_getpath (Saúl Ibarra Corretgé) - -* unix, windows: add uv_fs_poll_getpath (Saúl Ibarra Corretgé) - -* unix, windows: map ERANGE errno (Saúl Ibarra Corretgé) - -* unix, windows: set required size on UV_ENOBUFS (Saúl Ibarra Corretgé) - -* unix, windows: clarify what uv_stream_set_blocking does (Saúl Ibarra - Corretgé) - -* fs: use preadv on Linux if available (Brian White) - - -2014.01.30, Version 0.11.19 (Unstable), 336a1825309744f920230ec3e427e78571772347 - -Changes since version 0.11.18: - -* linux: move sscanf() out of the assert() (Trevor Norris) - -* linux: fix C99/C++ comment (Fedor Indutny) - - -2014.05.02, Version 0.10.27 (Stable), 6e24ce23b1e7576059f85a608eca13b766458a01 - -Changes since version 0.10.26: - -* windows: fix console signal handler refcount (Saúl Ibarra Corretgé) - -* win: always leave crit section in get_proc_title (Fedor Indutny) - - -2014.04.07, Version 0.10.26 (Stable), d864907611c25ec986c5e77d4d6d6dee88f26926 - -Changes since version 0.10.25: - -* process: don't close stdio fds during spawn (Tonis Tiigi) - -* build, windows: do not fail on Windows SDK Prompt (Marc Schlaich) - -* build, windows: fix x64 configuration issue (Marc Schlaich) - -* win: fix buffer leak on error in pipe.c (Fedor Indutny) - -* kqueue: invalidate fd in uv_fs_event_t (Fedor Indutny) - -* linux: always deregister closing fds from epoll (Geoffry Song) - -* error: add ENXIO for O_NONBLOCK FIFO open() (Fedor Indutny) - - -2014.02.19, Version 0.10.25 (Stable), d778dc588507588b12b9f9d2905078db542ed751 - -Changes since version 0.10.24: - -* stream: start thread after assignments (Oguz Bastemur) - -* unix: correct error when calling uv_shutdown twice (Saúl Ibarra Corretgé) - -2014.01.30, Version 0.10.24 (Stable), aecd296b6bce9b40f06a61c5c94e43d45ac7308a - -Changes since version 0.10.23: - -* linux: move sscanf() out of the assert() (Trevor Norris) - -* linux: fix C99/C++ comment (Fedor Indutny) - - -2014.01.23, Version 0.11.18 (Unstable), d47962e9d93d4a55a9984623feaf546406c9cdbb - -Changes since version 0.11.17: - -* osx: Fix a possible segfault in uv__io_poll (Alex Crichton) - -* windows: improved handling of invalid FDs (Alexis Campailla) - -* doc: adding ARCHS flag to OS X build command (Nathan Sweet) - -* tcp: reveal bind-time errors before listen (Alexis Campailla) - -* tcp: uv_tcp_dualstack() (Fedor Indutny) - -* linux: relax assumption on /proc/stat parsing (Luca Bruno) - -* openbsd: fix obvious bug in uv_cpu_info (Fedor Indutny) - -* process: close stdio after dup2'ing it (Fedor Indutny) - -* linux: move sscanf() out of the assert() (Trevor Norris) - - -2014.01.23, Version 0.10.23 (Stable), dbd218e699fec8be311d85e4788be9e28ae884f8 - -Changes since version 0.10.22: - -* linux: relax assumption on /proc/stat parsing (Luca Bruno) - -* openbsd: fix obvious bug in uv_cpu_info (Fedor Indutny) - -* process: close stdio after dup2'ing it (Fedor Indutny) - - -2014.01.08, Version 0.10.22 (Stable), f526c90eeff271d9323a9107b9a64a4671fd3103 - -Changes since version 0.10.21: - -* windows: avoid assertion failure when pipe server is closed (Bert Belder) - - -2013.12.32, Version 0.11.17 (Unstable), 589c224d4c2e79fec65db01d361948f1e4976858 - -Changes since version 0.11.16: - -* stream: allow multiple buffers for uv_try_write (Fedor Indutny) - -* unix: fix a possible memory leak in uv_fs_readdir (Alex Crichton) - -* unix, windows: add uv_loop_alive() function (Sam Roberts) - -* windows: avoid assertion failure when pipe server is closed (Bert Belder) - -* osx: Fix a possible segfault in uv__io_poll (Alex Crichton) - -* stream: fix uv__stream_osx_select (Fedor Indutny) - - -2013.12.14, Version 0.11.16 (Unstable), ae0ed8c49d0d313c935c22077511148b6e8408a4 - -Changes since version 0.11.15: - -* fsevents: remove kFSEventStreamCreateFlagNoDefer polyfill (ci-innoq) - -* libuv: add more getaddrinfo errors (Steven Kabbes) - -* unix: fix accept() EMFILE error handling (Ben Noordhuis) - -* linux: fix up SO_REUSEPORT back-port (Ben Noordhuis) - -* fsevents: fix subfolder check (Fedor Indutny) - -* fsevents: fix invalid memory access (huxingyi) - -* windows/timer: fix uv_hrtime discontinuity (Bert Belder) - -* unix: fix various memory leaks and undef behavior (Fedor Indutny) - -* unix, windows: always update loop time (Saúl Ibarra Corretgé) - -* windows: translate system errors in uv_spawn (Alexis Campailla) - -* windows: uv_spawn code refactor (Alexis Campailla) - -* unix, windows: detect errors in uv_ip4/6_addr (Yorkie) - -* stream: introduce uv_try_write(...) (Fedor Indutny) - - -2013.12.13, Version 0.10.20 (Stable), 04141464dd0fba90ace9aa6f7003ce139b888a40 - -Changes since version 0.10.19: - -* linux: fix up SO_REUSEPORT back-port (Ben Noordhuis) - -* fs-event: fix invalid memory access (huxingyi) - - -2013.11.21, Version 0.11.15 (Unstable), bfe645ed7e99ca5670d9279ad472b604c129d2e5 - -Changes since version 0.11.14: - -* fsevents: report errors to user (Fedor Indutny) - -* include: UV_FS_EVENT_RECURSIVE is a flag (Fedor Indutny) - -* linux: use CLOCK_MONOTONIC_COARSE if available (Ben Noordhuis) - -* build: make systemtap probes work with gyp build (Ben Noordhuis) - -* unix: update events from pevents between polls (Fedor Indutny) - -* fsevents: support japaneese characters in path (Chris Bank) - -* linux: don't turn on SO_REUSEPORT socket option (Ben Noordhuis) - -* queue: strengthen type checks (Ben Noordhuis) - -* include: remove uv_strlcat() and uv_strlcpy() (Ben Noordhuis) - -* build: fix windows smp build with gyp (Geert Jansen) - -* unix: return exec errors from uv_spawn, not async (Alex Crichton) - -* fsevents: use native character encoding file paths (Ben Noordhuis) - -* linux: handle EPOLLHUP without EPOLLIN/EPOLLOUT (Ben Noordhuis) - -* windows: use _snwprintf(), not swprintf() (Ben Noordhuis) - -* fsevents: use FlagNoDefer for FSEventStreamCreate (Fedor Indutny) - -* unix: fix reopened fd bug (Fedor Indutny) - -* core: fix fake watcher list and count preservation (Fedor Indutny) - -* unix: set close-on-exec flag on received fds (Ben Noordhuis) - -* netbsd, openbsd: enable futimes() wrapper (Ben Noordhuis) - -* unix: nicer error message when kqueue() fails (Ben Noordhuis) - -* samples: add socks5 proxy sample application (Ben Noordhuis) - - -2013.11.13, Version 0.10.19 (Stable), 33959f7524090b8d2c6c41e2400ca77e31755059 - -Changes since version 0.10.18: - -* darwin: avoid calling GetCurrentProcess (Fedor Indutny) - -* unix: update events from pevents between polls (Fedor Indutny) - -* fsevents: support japaneese characters in path (Chris Bank) - -* linux: don't turn on SO_REUSEPORT socket option (Ben Noordhuis) - -* build: fix windows smp build with gyp (Geert Jansen) - -* linux: handle EPOLLHUP without EPOLLIN/EPOLLOUT (Ben Noordhuis) - -* unix: fix reopened fd bug (Fedor Indutny) - -* core: fix fake watcher list and count preservation (Fedor Indutny) - - -2013.10.30, Version 0.11.14 (Unstable), d7a6482f45c1b4eb4a853dbe1a9ce8090a35633a - -Changes since version 0.11.13: - -* darwin: create fsevents thread on demand (Ben Noordhuis) - -* fsevents: FSEvents is most likely not thread-safe (Fedor Indutny) - -* fsevents: use shared FSEventStream (Fedor Indutny) - -* windows: make uv_fs_chmod() report errors correctly (Bert Belder) - -* windows: make uv_shutdown() for write-only pipes work (Bert Belder) - -* windows/fs: wrap multi-statement macros in do..while block (Bert Belder) - -* windows/fs: make uv_fs_open() report EINVAL correctly (Bert Belder) - -* windows/fs: handle _open_osfhandle() failure correctly (Bert Belder) - -* windows/fs: wrap multi-statement macros in do..while block (Bert Belder) - -* windows/fs: make uv_fs_open() report EINVAL correctly (Bert Belder) - -* windows/fs: handle _open_osfhandle() failure correctly (Bert Belder) - -* build: clarify instructions for Windows (Brian Kaisner) - -* build: remove GCC_WARN_ABOUT_MISSING_NEWLINE (Ben Noordhuis) - -* darwin: fix 10.6 build error in fsevents.c (Ben Noordhuis) - -* windows: run close callbacks after polling for i/o (Saúl Ibarra Corretgé) - -* include: clarify uv_tcp_bind() behavior (Ben Noordhuis) - -* include: clean up includes in uv.h (Ben Noordhuis) - -* include: remove UV_IO_PRIVATE_FIELDS macro (Ben Noordhuis) - -* include: fix typo in comment in uv.h (Ben Noordhuis) - -* include: update uv_is_active() documentation (Ben Noordhuis) - -* include: make uv_process_options_t.cwd const (Ben Noordhuis) - -* unix: wrap long lines at 80 columns (Ben Noordhuis) - -* unix, windows: make uv_is_*() always return 0 or 1 (Ben Noordhuis) - -* bench: measure total/init/dispatch/cleanup times (Ben Noordhuis) - -* build: use -pthread on sunos (Timothy J. Fontaine) - -* windows: remove duplicate check in stream.c (Ben Noordhuis) - -* unix: sanity-check fds before closing (Ben Noordhuis) - -* unix: remove uv__pipe_accept() (Ben Noordhuis) - -* unix: fix uv_spawn() NULL pointer deref on ENOMEM (Ben Noordhuis) - -* unix: don't close inherited fds on uv_spawn() fail (Ben Noordhuis) - -* unix: revert recent FSEvent changes (Ben Noordhuis) - -* fsevents: fix clever rescheduling (Fedor Indutny) - -* linux: ignore fractional time in uv_uptime() (Ben Noordhuis) - -* unix: fix SIGCHLD waitpid() race in process.c (Ben Noordhuis) - -* unix, windows: add uv_fs_event_start/stop functions (Saúl Ibarra Corretgé) - -* unix: fix non-synchronized access in signal.c (Ben Noordhuis) - -* unix: add atomic-ops.h (Ben Noordhuis) - -* unix: add spinlock.h (Ben Noordhuis) - -* unix: clean up uv_tty_set_mode() a little (Ben Noordhuis) - -* unix: make uv_tty_reset_mode() async signal-safe (Ben Noordhuis) - -* include: add E2BIG status code mapping (Ben Noordhuis) - -* windows: fix duplicate case build error (Ben Noordhuis) - -* windows: remove unneeded check (Saúl Ibarra Corretgé) - -* include: document pipe path truncation behavior (Ben Noordhuis) - -* fsevents: increase stack size for OSX 10.9 (Fedor Indutny) - -* windows: _snprintf expected wrong parameter type in string (Maks Naumov) - -* windows: "else" keyword is missing (Maks Naumov) - -* windows: incorrect check for SOCKET_ERROR (Maks Naumov) - -* windows: add stdlib.h to satisfy reference to abort (Sean Farrell) - -* build: fix check target for mingw (Sean Farrell) - -* unix: move uv_shutdown() assertion (Keno Fischer) - -* darwin: avoid calling GetCurrentProcess (Fedor Indutny) - - -2013.10.19, Version 0.10.18 (Stable), 9ec52963b585e822e87bdc5de28d6143aff0d2e5 - -Changes since version 0.10.17: - -* unix: fix uv_spawn() NULL pointer deref on ENOMEM (Ben Noordhuis) - -* unix: don't close inherited fds on uv_spawn() fail (Ben Noordhuis) - -* unix: revert recent FSEvent changes (Ben Noordhuis) - -* unix: fix non-synchronized access in signal.c (Ben Noordhuis) - - -2013.09.25, Version 0.10.17 (Stable), 9670e0a93540c2f0d86c84a375f2303383c11e7e - -Changes since version 0.10.16: - -* build: remove GCC_WARN_ABOUT_MISSING_NEWLINE (Ben Noordhuis) - -* darwin: fix 10.6 build error in fsevents.c (Ben Noordhuis) - - -2013.09.06, Version 0.10.16 (Stable), 2bce230d81f4853a23662cbeb26fe98010b1084b - -Changes since version 0.10.15: - -* windows: make uv_shutdown() for write-only pipes work (Bert Belder) - -* windows: make uv_fs_open() report EINVAL when invalid arguments are passed - (Bert Belder) - -* windows: make uv_fs_open() report _open_osfhandle() failure correctly (Bert - Belder) - -* windows: make uv_fs_chmod() report errors correctly (Bert Belder) - -* windows: wrap multi-statement macros in do..while block (Bert Belder) - - -2013.09.05, Version 0.11.13 (Unstable), f5b6db6c1d7f93d28281207fd47c3841c9a9792e - -Changes since version 0.11.12: - -* unix: define _GNU_SOURCE, exposes glibc-isms (Ben Noordhuis) - -* windows: check for nonconforming swprintf arguments (Brent Cook) - -* build: include internal headers in source list (Brent Cook) - -* include: merge uv_tcp_bind and uv_tcp_bind6 (Ben Noordhuis) - -* include: merge uv_tcp_connect and uv_tcp_connect6 (Ben Noordhuis) - -* include: merge uv_udp_bind and uv_udp_bind6 (Ben Noordhuis) - -* include: merge uv_udp_send and uv_udp_send6 (Ben Noordhuis) - - -2013.09.03, Version 0.11.12 (Unstable), 82d01d5f6780d178f5176a01425ec297583c0811 - -Changes since version 0.11.11: - -* test: fix epoll_wait() usage in test-embed.c (Ben Noordhuis) - -* include: uv_alloc_cb now takes uv_buf_t* (Ben Noordhuis) - -* include: uv_read{2}_cb now takes const uv_buf_t* (Ben Noordhuis) - -* include: uv_ip[46]_addr now takes sockaddr_in* (Ben Noordhuis) - -* include: uv_tcp_bind{6} now takes sockaddr_in* (Ben Noordhuis) - -* include: uv_tcp_connect{6} now takes sockaddr_in* (Ben Noordhuis) - -* include: uv_udp_recv_cb now takes const uv_buf_t* (Ben Noordhuis) - -* include: uv_udp_bind{6} now takes sockaddr_in* (Ben Noordhuis) - -* include: uv_udp_send{6} now takes sockaddr_in* (Ben Noordhuis) - -* include: uv_spawn takes const uv_process_options_t* (Ben Noordhuis) - -* include: make uv_write{2} const correct (Ben Noordhuis) - -* windows: fix flags assignment in uv_fs_readdir() (Ben Noordhuis) - -* windows: fix stray comments (Ben Noordhuis) - -* windows: remove unused is_path_dir() function (Ben Noordhuis) - - -2013.08.30, Version 0.11.11 (Unstable), ba876d53539ed0427c52039012419cd9374c6f0d - -Changes since version 0.11.10: - -* unix, windows: add thread-local storage API (Ben Noordhuis) - -* linux: don't turn on SO_REUSEPORT socket option (Ben Noordhuis) - -* darwin: fix 10.6 build error in fsevents.c (Ben Noordhuis) - -* windows: make uv_shutdown() for write-only pipes work (Bert Belder) - -* include: update uv_udp_open() / uv_udp_bind() docs (Ben Noordhuis) - -* unix: req queue must be empty when destroying loop (Ben Noordhuis) - -* unix: move loop functions from core.c to loop.c (Ben Noordhuis) - -* darwin: remove CoreFoundation dependency (Ben Noordhuis) - -* windows: make autotools build system work with mingw (Keno Fischer) - -* windows: fix mingw build (Alex Crichton) - -* windows: tweak Makefile.mingw for easier usage (Alex Crichton) - -* build: remove _GNU_SOURCE macro definition (Ben Noordhuis) - - -2013.08.25, Version 0.11.10 (Unstable), 742dadcb7154cc7bb89c0c228a223b767a36cf0d - -* windows: Re-implement uv_fs_stat. The st_ctime field now contains the change - time, not the creation time, like on unix systems. st_dev, st_ino, st_blocks - and st_blksize are now also filled out. (Bert Belder) - -* linux: fix setsockopt(SO_REUSEPORT) error handling (Ben Noordhuis) - -* windows: report uv_process_t exit code correctly (Bert Belder) - -* windows: make uv_fs_chmod() report errors correctly (Bert Belder) - -* windows: make some more NT apis available for libuv's internal use (Bert - Belder) - -* windows: squelch some compiler warnings (Bert Belder) - - -2013.08.24, Version 0.11.9 (Unstable), a2d29b5b068cbac93dc16138fb30a74e2669daad - -Changes since version 0.11.8: - -* fsevents: share FSEventStream between multiple FS watchers, which removes a - limit on the maximum number of file watchers that can be created on OS X. - (Fedor Indutny) - -* process: the `exit_status` parameter for a uv_process_t's exit callback now - is an int64_t, and no longer an int. (Bert Belder) - -* process: make uv_spawn() return some types of errors immediately on windows, - instead of passing the error code the the exit callback. This brings it on - par with libuv's behavior on unix. (Bert Belder) - - -2013.08.24, Version 0.10.15 (Stable), 221078a8fdd9b853c6b557b3d9a5dd744b4fdd6b - -Changes since version 0.10.14: - -* fsevents: create FSEvents thread on demand (Ben Noordhuis) - -* fsevents: use a single thread for interacting with FSEvents, because it's not - thread-safe. (Fedor Indutny) - -* fsevents: share FSEventStream between multiple FS watchers, which removes a - limit on the maximum number of file watchers that can be created on OS X. - (Fedor Indutny) - - -2013.08.22, Version 0.11.8 (Unstable), a5260462db80ab0deab6b9e6a8991dd8f5a9a2f8 - -Changes since version 0.11.7: - -* unix: fix missing return value warning in stream.c (Ben Noordhuis) - -* build: serial-tests was added in automake v1.12 (Ben Noordhuis) - -* windows: fix uninitialized local variable warning (Ben Noordhuis) - -* windows: fix missing return value warning (Ben Noordhuis) - -* build: fix string comparisons in autogen.sh (Ben Noordhuis) - -* windows: move INLINE macro, remove UNUSED (Ben Noordhuis) - -* unix: clean up __attribute__((quux)) usage (Ben Noordhuis) - -* sunos: remove futimes() macro (Ben Noordhuis) - -* unix: fix uv__signal_unlock() prototype (Ben Noordhuis) - -* unix, windows: allow NULL async callback (Ben Noordhuis) - -* build: apply dtrace -G to all object files (Timothy J. Fontaine) - -* darwin: fix indentation in uv__hrtime() (Ben Noordhuis) - -* darwin: create fsevents thread on demand (Ben Noordhuis) - -* darwin: reduce fsevents thread stack size (Ben Noordhuis) - -* darwin: call pthread_setname_np() if available (Ben Noordhuis) - -* build: fix automake serial-tests check again (Ben Noordhuis) - -* unix: retry waitpid() on EINTR (Ben Noordhuis) - -* darwin: fix ios build error (Ben Noordhuis) - -* darwin: fix ios compiler warning (Ben Noordhuis) - -* test: simplify test-ip6-addr.c (Ben Noordhuis) - -* unix, windows: fix ipv6 link-local address parsing (Ben Noordhuis) - -* fsevents: FSEvents is most likely not thread-safe (Fedor Indutny) - -* windows: omit stdint.h, fix msvc 2008 build error (Ben Noordhuis) - - -2013.08.22, Version 0.10.14 (Stable), 15d64132151c18b26346afa892444b95e2addad0 - -Changes since version 0.10.13: - -* unix: retry waitpid() on EINTR (Ben Noordhuis) - - -2013.08.07, Version 0.11.7 (Unstable), 3cad361f8776f70941b39d65bd9426bcb1aa817b - -Changes since version 0.11.6: - -* unix, windows: fix uv_fs_chown() function prototype (Ben Noordhuis) - -* unix, windows: remove unused variables (Brian White) - -* test: fix signed/unsigned comparison warnings (Ben Noordhuis) - -* build: dtrace shouldn't break out of tree builds (Timothy J. Fontaine) - -* unix, windows: don't read/recv if buf.len==0 (Ben Noordhuis) - -* build: add mingw makefile (Ben Noordhuis) - -* unix, windows: add MAC to uv_interface_addresses() (Brian White) - -* build: enable AM_INIT_AUTOMAKE([subdir-objects]) (Ben Noordhuis) - -* unix, windows: make buf arg to uv_fs_write const (Ben Noordhuis) - -* sunos: fix build breakage introduced in e3a657c (Ben Noordhuis) - -* aix: fix build breakage introduced in 3ee4d3f (Ben Noordhuis) - -* windows: fix mingw32 build, define JOB_OBJECT_XXX (Yasuhiro Matsumoto) - -* windows: fix mingw32 build, include limits.h (Yasuhiro Matsumoto) - -* test: replace sprintf() with snprintf() (Ben Noordhuis) - -* test: replace strcpy() with strncpy() (Ben Noordhuis) - -* openbsd: fix uv_ip6_addr() unused variable warnings (Ben Noordhuis) - -* openbsd: fix dlerror() const correctness warning (Ben Noordhuis) - -* openbsd: fix uv_fs_sendfile() unused variable warnings (Ben Noordhuis) - -* build: disable parallel automake tests (Ben Noordhuis) - -* test: add windows-only snprintf() function (Ben Noordhuis) - -* build: add automake serial-tests version check (Ben Noordhuis) - - -2013.07.26, Version 0.10.13 (Stable), 381312e1fe6fecbabc943ccd56f0e7d114b3d064 - -Changes since version 0.10.12: - -* unix, windows: fix uv_fs_chown() function prototype (Ben Noordhuis) - - -2013.07.21, Version 0.11.6 (Unstable), 6645b93273e0553d23823c576573b82b129bf28c - -Changes since version 0.11.5: - -* test: open stdout fd in write-only mode (Ben Noordhuis) - -* windows: uv_spawn shouldn't reject reparse points (Bert Belder) - -* windows: use WSAGetLastError(), not errno (Ben Noordhuis) - -* build: darwin: disable -fstrict-aliasing warnings (Ben Noordhuis) - -* test: fix signed/unsigned compiler warning (Ben Noordhuis) - -* test: add 'start timer from check handle' test (Ben Noordhuis) - -* build: `all` now builds static and dynamic lib (Ben Noordhuis) - -* unix, windows: add extra fields to uv_stat_t (Saúl Ibarra Corretgé) - -* build: add install target to the makefile (Navaneeth Kedaram Nambiathan) - -* build: switch to autotools (Ben Noordhuis) - -* build: use AM_PROG_AR conditionally (Ben Noordhuis) - -* test: fix fs_fstat test on sunos (Ben Noordhuis) - -* test: fix fs_chown when running as root (Ben Noordhuis) - -* test: fix spawn_setgid_fails and spawn_setuid_fails (Ben Noordhuis) - -* build: use AM_SILENT_RULES conditionally (Ben Noordhuis) - -* build: add DTrace detection for autotools (Timothy J. Fontaine) - -* linux,darwin,win: link-local IPv6 addresses (Miroslav Bajtoš) - -* unix: fix build when !defined(PTHREAD_MUTEX_ERRORCHECK) (Ben Noordhuis) - -* unix, windows: return error codes directly (Ben Noordhuis) - - -2013.07.10, Version 0.10.12 (Stable), 58a46221bba726746887a661a9f36fe9ff204209 - -Changes since version 0.10.11: - -* linux: add support for MIPS (Andrei Sedoi) - -* windows: uv_spawn shouldn't reject reparse points (Bert Belder) - -* windows: use WSAGetLastError(), not errno (Ben Noordhuis) - -* build: darwin: disable -fstrict-aliasing warnings (Ben Noordhuis) - -* build: `all` now builds static and dynamic lib (Ben Noordhuis) - -* unix: fix build when !defined(PTHREAD_MUTEX_ERRORCHECK) (Ben Noordhuis) - - -2013.06.27, Version 0.11.5 (Unstable), e3c63ff1627a14e96f54c1c62b0d68b446d8425b - -Changes since version 0.11.4: - -* build: remove CSTDFLAG, use only CFLAGS (Ben Noordhuis) - -* unix: support for android builds (Linus Mårtensson) - -* unix: avoid extra read, short-circuit on POLLHUP (Ben Noordhuis) - -* uv: support android libuv standalone build (Linus Mårtensson) - -* src: make queue.h c++ compatible (Ben Noordhuis) - -* unix: s/ngx-queue.h/queue.h/ in checksparse.sh (Ben Noordhuis) - -* unix: unconditionally stop handle on close (Ben Noordhuis) - -* freebsd: don't enable dtrace if it's not available (Brian White) - -* build: make HAVE_DTRACE=0 should disable dtrace (Timothy J. Fontaine) - -* unix: remove overzealous assert (Ben Noordhuis) - -* unix: remove unused function uv_fatal_error() (Ben Noordhuis) - -* unix, windows: clean up uv_thread_create() (Ben Noordhuis) - -* queue: fix pointer truncation on LLP64 platforms (Bert Belder) - -* build: set OS=="android" for android builds (Linus Mårtensson) - -* windows: don't use uppercase in include filename (Ben Noordhuis) - -* stream: add an API to make streams do blocking writes (Henry Rawas) - -* windows: use WSAGetLastError(), not errno (Ben Noordhuis) - - -2013.06.13, Version 0.10.11 (Stable), c3b75406a66a10222a589cb173e8f469e9665c7e - -Changes since version 0.10.10: - -* unix: unconditionally stop handle on close (Ben Noordhuis) - -* freebsd: don't enable dtrace if it's not available (Brian White) - -* build: make HAVE_DTRACE=0 should disable dtrace (Timothy J. Fontaine) - -* unix: remove overzealous assert (Ben Noordhuis) - -* unix: clear UV_STREAM_SHUTTING after shutdown() (Ben Noordhuis) - -* unix: fix busy loop, write if POLLERR or POLLHUP (Ben Noordhuis) - - -2013.06.05, Version 0.10.10 (Stable), 0d95a88bd35fce93863c57a460be613aea34d2c5 - -Changes since version 0.10.9: - -* include: document uv_update_time() and uv_now() (Ben Noordhuis) - -* linux: fix cpu model parsing on newer arm kernels (Ben Noordhuis) - -* linux: fix a memory leak in uv_cpu_info() error path (Ben Noordhuis) - -* linux: don't ignore out-of-memory errors in uv_cpu_info() (Ben Noordhuis) - -* unix, windows: move uv_now() to uv-common.c (Ben Noordhuis) - -* test: fix a compilation problem in test-osx-select.c that was caused by the - use of c-style comments (Bert Belder) - -* darwin: use uv_fs_sendfile() use the sendfile api correctly (Wynn Wilkes) - - -2013.05.30, Version 0.11.4 (Unstable), e43e5b3d954a0989db5588aa110e1fe4fe6e0219 - -Changes since version 0.11.3: - -* windows: make uv_spawn not fail when the libuv embedding application is run - under external job control (Bert Belder) - -* darwin: assume CFRunLoopStop() isn't thread-safe, fixing a race condition - when stopping the 'stdin select hack' thread (Fedor Indutny) - -* win: fix UV_EALREADY not being reported correctly to the libuv user in some - cases (Bert Belder) - -* darwin: make the uv__cf_loop_runner and uv__cf_loop_cb functions static (Ben - Noordhuis) - -* darwin: task_info() cannot fail (Ben Noordhuis) - -* unix: add error mapping for ENETDOWN (Ben Noordhuis) - -* unix: implicitly signal write errors to the libuv user (Ben Noordhuis) - -* unix: fix assertion error on signal pipe overflow (Bert Belder) - -* unix: turn off POLLOUT after stream connect (Ben Noordhuis) - -* unix: fix stream refcounting buglet (Ben Noordhuis) - -* unix: remove assert statements that are no longer correct (Ben Noordhuis) - -* unix: appease warning about non-standard `inline` (Sean Silva) - -* unix: add uv__is_closing() macro (Ben Noordhuis) - -* unix: stop stream POLLOUT watcher on write error (Ben Noordhuis) - -* include: document uv_update_time() and uv_now() (Ben Noordhuis) - -* linux: fix cpu model parsing on newer arm kernels (Ben Noordhuis) - -* linux: fix a memory leak in uv_cpu_info() error path (Ben Noordhuis) - -* linux: don't ignore out-of-memory errors in uv_cpu_info() (Ben Noordhuis) - -* unix, windows: move uv_now() to uv-common.c (Ben Noordhuis) - -* test: fix a compilation problem in test-osx-select.c that was caused by the - use of c-style comments (Bert Belder) - -* darwin: use uv_fs_sendfile() use the sendfile api correctly (Wynn Wilkes) - -* windows: call idle handles on every loop iteration, something the unix - implementation already did (Bert Belder) - -* test: update the idle-starvation test to verify that idle handles are called - in every loop iteration (Bert Belder) - -* unix, windows: ensure that uv_run() in RUN_ONCE mode calls timers that expire - after blocking (Ben Noordhuis) - - -2013.05.29, Version 0.10.9 (Stable), a195f9ace23d92345baf57582678bfc3017e6632 - -Changes since version 0.10.8: - -* unix: fix stream refcounting buglet (Ben Noordhuis) - -* unix: remove erroneous asserts (Ben Noordhuis) - -* unix: add uv__is_closing() macro (Ben Noordhuis) - -* unix: stop stream POLLOUT watcher on write error (Ben Noordhuis) - - -2013.05.25, Version 0.10.8 (Stable), 0f39be12926fe2d8766a9f025797a473003e6504 - -Changes since version 0.10.7: - -* windows: make uv_spawn not fail under job control (Bert Belder) - -* darwin: assume CFRunLoopStop() isn't thread-safe (Fedor Indutny) - -* win: fix UV_EALREADY incorrectly set (Bert Belder) - -* darwin: make two uv__cf_*() functions static (Ben Noordhuis) - -* darwin: task_info() cannot fail (Ben Noordhuis) - -* unix: add mapping for ENETDOWN (Ben Noordhuis) - -* unix: implicitly signal write errors to libuv user (Ben Noordhuis) - -* unix: fix assert on signal pipe overflow (Bert Belder) - -* unix: turn off POLLOUT after stream connect (Ben Noordhuis) - - -2013.05.16, Version 0.11.3 (Unstable), 0a48c05b5988aea84c605751900926fa25443b34 - -Changes since version 0.11.2: - -* unix: clean up uv_accept() (Ben Noordhuis) - -* unix: remove errno preserving code (Ben Noordhuis) - -* darwin: fix ios build, don't require ApplicationServices (Ben Noordhuis) - -* windows: kill child processes when the parent dies (Bert Belder) - -* build: set soname in shared library (Ben Noordhuis) - -* build: make `make test` link against .a again (Ben Noordhuis) - -* build: only set soname on shared object builds (Timothy J. Fontaine) - -* build: convert predefined $PLATFORM to lower case (Elliot Saba) - -* test: fix process_title failing on linux (Miroslav Bajtoš) - -* test, sunos: disable process_title test (Miroslav Bajtoš) - -* test: add error logging to tty unit test (Miroslav Bajtoš) - - -2013.05.15, Version 0.10.7 (Stable), 028baaf0846b686a81e992cb2f2f5a9b8e841fcf - -Changes since version 0.10.6: - -* windows: kill child processes when the parent dies (Bert Belder) - - -2013.05.15, Version 0.10.6 (Stable), 11e6613e6260d95c8cf11bf89a2759c24649319a - -Changes since version 0.10.5: - -* stream: fix osx select hack (Fedor Indutny) - -* stream: fix small nit in select hack, add test (Fedor Indutny) - -* build: link with libkvm on openbsd (Ben Noordhuis) - -* stream: use harder sync restrictions for osx-hack (Fedor Indutny) - -* unix: fix EMFILE error handling (Ben Noordhuis) - -* darwin: fix unnecessary include headers (Daisuke Murase) - -* darwin: rename darwin-getproctitle.m (Ben Noordhuis) - -* build: convert predefined $PLATFORM to lower case (Elliot Saba) - -* build: set soname in shared library (Ben Noordhuis) - -* build: make `make test` link against .a again (Ben Noordhuis) - -* darwin: fix ios build, don't require ApplicationServices (Ben Noordhuis) - -* build: only set soname on shared object builds (Timothy J. Fontaine) - - -2013.05.11, Version 0.11.2 (Unstable), 3fba0bf65f091b91a9760530c05c6339c658d88b - -Changes since version 0.11.1: - -* darwin: look up file path with F_GETPATH (Ben Noordhuis) - -* unix, windows: add uv_has_ref() function (Saúl Ibarra Corretgé) - -* build: avoid double / in paths for dtrace (Timothy J. Fontaine) - -* unix: remove src/unix/cygwin.c (Ben Noordhuis) - -* windows: deal with the fact that GetTickCount might lag (Bert Belder) - -* unix: silence STATIC_ASSERT compiler warnings (Ben Noordhuis) - -* linux: don't use fopen() in uv_resident_set_memory() (Ben Noordhuis) - - -2013.04.24, Version 0.10.5 (Stable), 6595a7732c52eb4f8e57c88655f72997a8567a67 - -Changes since version 0.10.4: - -* unix: silence STATIC_ASSERT compiler warnings (Ben Noordhuis) - -* windows: make timers handle large timeouts (Miroslav Bajtoš) - -* windows: remove superfluous assert statement (Bert Belder) - -* unix: silence STATIC_ASSERT compiler warnings (Ben Noordhuis) - -* linux: don't use fopen() in uv_resident_set_memory() (Ben Noordhuis) - - -2013.04.12, Version 0.10.4 (Stable), 85827e26403ac6dfa331af8ec9916ea7e27bd833 - -Changes since version 0.10.3: - -* include: update uv_backend_fd() documentation (Ben Noordhuis) - -* unix: include uv.h in src/version.c (Ben Noordhuis) - -* unix: don't write more than IOV_MAX iovecs (Fedor Indutny) - -* mingw-w64: don't call _set_invalid_parameter_handler (Nils Maier) - -* build: gyp disable thin archives (Timothy J. Fontaine) - -* sunos: re-export entire library when static (Timothy J. Fontaine) - -* unix: dtrace probes for tick-start and tick-stop (Timothy J. Fontaine) - -* windows: fix memory leak in fs__sendfile (Shannen Saez) - -* windows: remove double initialization in uv_tty_init (Shannen Saez) - -* build: fix dtrace-enabled out of tree build (Ben Noordhuis) - -* build: squelch -Wdollar-in-identifier-extension warnings (Ben Noordhuis) - -* inet: snprintf returns int, not size_t (Brian White) - -* win: refactor uv_cpu_info (Bert Belder) - -* build: add support for Visual Studio 2012 (Nicholas Vavilov) - -* build: -Wno-dollar-in-identifier-extension is clang only (Ben Noordhuis) - - -2013.04.11, Version 0.11.1 (Unstable), 5c10e82ae0bc99eff86d4b9baff1f1aa0bf84c0a - -This is the first versioned release from the current unstable libuv branch. - -Changes since Node.js v0.11.0: - -* all platforms: nanosecond resolution support for uv_fs_[fl]stat (Timothy J. - Fontaine) - -* all platforms: add netmask to uv_interface_address (Ben Kelly) - -* unix: make sure the `status` parameter passed to the `uv_getaddrinfo` is 0 or - -1 (Ben Noordhuis) - -* unix: limit the number of iovecs written in a single `writev` syscall to - IOV_MAX (Fedor Indutny) - -* unix: add dtrace probes for tick-start and tick-stop (Timothy J. Fontaine) - -* mingw-w64: don't call _set_invalid_parameter_handler (Nils Maier) - -* windows: fix memory leak in fs__sendfile (Shannen Saez) - -* windows: fix edge case bugs in uv_cpu_info (Bert Belder) - -* include: no longer ship with / include ngx-queue.h (Ben Noordhuis) - -* include: remove UV_VERSION_* macros from uv.h (Ben Noordhuis) - -* documentation updates (Kristian Evensen, Ben Kelly, Ben Noordhuis) - -* build: fix dtrace-enabled builds (Ben Noordhuis, Timothy J. Fontaine) - -* build: gyp disable thin archives (Timothy J. Fontaine) - -* build: add support for Visual Studio 2012 (Nicholas Vavilov) - - -2013.03.28, Version 0.10.3 (Stable), 31ebe23973dd98fd8a24c042b606f37a794e99d0 - -Changes since version 0.10.2: - -* include: remove extraneous const from uv_version() (Ben Noordhuis) - -* doc: update README, replace `OS` by `PLATFORM` (Ben Noordhuis) - -* build: simplify .buildstamp rule (Ben Noordhuis) - -* build: disable -Wstrict-aliasing on darwin (Ben Noordhuis) - -* darwin: don't select(&exceptfds) in fallback path (Ben Noordhuis) - -* unix: don't clear flags after closing UDP handle (Saúl Ibarra Corretgé) - - -2013.03.25, Version 0.10.2 (Stable), 0f36a00568f3e7608f97f6c6cdb081f4800a50c9 - -This is the first officially versioned release of libuv. Starting now -libuv will make releases independently of Node.js. - -Changes since Node.js v0.10.0: - -* test: add tap output for windows (Timothy J. Fontaine) - -* unix: fix uv_tcp_simultaneous_accepts() logic (Ben Noordhuis) - -* include: bump UV_VERSION_MINOR (Ben Noordhuis) - -* unix: improve uv_guess_handle() implementation (Ben Noordhuis) - -* stream: run try_select only for pipes and ttys (Fedor Indutny) - -Changes since Node.js v0.10.1: - -* build: rename OS to PLATFORM (Ben Noordhuis) - -* unix: make uv_timer_init() initialize repeat (Brian Mazza) - -* unix: make timers handle large timeouts (Ben Noordhuis) - -* build: add OBJC makefile var (Ben Noordhuis) - -* Add `uv_version()` and `uv_version_string()` APIs (Bert Belder) diff --git a/outside/libuv-v1.7.5/LICENSE b/outside/libuv-v1.7.5/LICENSE deleted file mode 100644 index 4d411670e..000000000 --- a/outside/libuv-v1.7.5/LICENSE +++ /dev/null @@ -1,46 +0,0 @@ -libuv is part of the Node project: http://nodejs.org/ -libuv may be distributed alone under Node's license: - -==== - -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -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. - -==== - -This license applies to all parts of libuv that are not externally -maintained libraries. - -The externally maintained libraries used by libuv are: - - - tree.h (from FreeBSD), copyright Niels Provos. Two clause BSD license. - - - inet_pton and inet_ntop implementations, contained in src/inet.c, are - copyright the Internet Systems Consortium, Inc., and licensed under the ISC - license. - - - stdint-msvc2008.h (from msinttypes), copyright Alexander Chemeris. Three - clause BSD license. - - - pthread-fixes.h, pthread-fixes.c, copyright Google Inc. and Sony Mobile - Communications AB. Three clause BSD license. - - - android-ifaddrs.h, android-ifaddrs.c, copyright Berkeley Software Design - Inc, Kenneth MacKay and Emergya (Cloud4all, FP7/2007-2013, grant agreement - n° 289016). Three clause BSD license. diff --git a/outside/libuv-v1.7.5/MAINTAINERS.md b/outside/libuv-v1.7.5/MAINTAINERS.md deleted file mode 100644 index 4db2f5130..000000000 --- a/outside/libuv-v1.7.5/MAINTAINERS.md +++ /dev/null @@ -1,36 +0,0 @@ - -# Project Maintainers - -libuv is currently managed by the following individuals: - -* **Ben Noordhuis** ([@bnoordhuis](https://github.com/bnoordhuis)) - - GPG key: D77B 1E34 243F BAF0 5F8E 9CC3 4F55 C8C8 46AB 89B9 (pubkey-bnoordhuis) -* **Bert Belder** ([@piscisaureus](https://github.com/piscisaureus)) -* **Fedor Indutny** ([@indutny](https://github.com/indutny)) - - GPG key: AF2E EA41 EC34 47BF DD86 FED9 D706 3CCE 19B7 E890 (pubkey-indutny) -* **Saúl Ibarra Corretgé** ([@saghul](https://github.com/saghul)) - - GPG key: FDF5 1936 4458 319F A823 3DC9 410E 5553 AE9B C059 (pubkey-saghul) - -## Storing a maintainer key in Git - -It's quite handy to store a maintainer's signature as a git blob, and have -that object tagged and signed with such key. - -Export your public key: - - $ gpg --armor --export saghul@gmail.com > saghul.asc - -Store it as a blob on the repo: - - $ git hash-object -w saghul.asc - -The previous command returns a hash, copy it. For the sake of this explanation, -we'll assume it's 'abcd1234'. Storing the blob in git is not enough, it could -be garbage collected since nothing references it, so we'll create a tag for it: - - $ git tag -s pubkey-saghul abcd1234 - -Commit the changes and push: - - $ git push origin pubkey-saghul - diff --git a/outside/libuv-v1.7.5/Makefile.am b/outside/libuv-v1.7.5/Makefile.am deleted file mode 100644 index fbf9527ae..000000000 --- a/outside/libuv-v1.7.5/Makefile.am +++ /dev/null @@ -1,343 +0,0 @@ -# Copyright (c) 2013, Ben Noordhuis -# -# Permission to use, copy, modify, and/or distribute this software for any -# purpose with or without fee is hereby granted, provided that the above -# copyright notice and this permission notice appear in all copies. -# -# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -ACLOCAL_AMFLAGS = -I m4 - -AM_CPPFLAGS = -I$(top_srcdir)/include \ - -I$(top_srcdir)/src - -include_HEADERS=include/uv.h include/uv-errno.h include/uv-threadpool.h include/uv-version.h - -CLEANFILES = - -lib_LTLIBRARIES = libuv.la -libuv_la_CFLAGS = @CFLAGS@ -libuv_la_LDFLAGS = -no-undefined -version-info 1:0:0 -libuv_la_SOURCES = src/fs-poll.c \ - src/heap-inl.h \ - src/inet.c \ - src/queue.h \ - src/threadpool.c \ - src/uv-common.c \ - src/uv-common.h \ - src/version.c - -if SUNOS -# Can't be turned into a CC_CHECK_CFLAGS in configure.ac, it makes compilers -# on other platforms complain that the argument is unused during compilation. -libuv_la_CFLAGS += -pthread -endif - -if WINNT - -include_HEADERS += include/uv-win.h include/tree.h -AM_CPPFLAGS += -I$(top_srcdir)/src/win \ - -DWIN32_LEAN_AND_MEAN \ - -D_WIN32_WINNT=0x0600 -LIBS += -lws2_32 -lpsapi -liphlpapi -lshell32 -luserenv -libuv_la_SOURCES += src/win/async.c \ - src/win/atomicops-inl.h \ - src/win/core.c \ - src/win/dl.c \ - src/win/error.c \ - src/win/fs-event.c \ - src/win/fs.c \ - src/win/getaddrinfo.c \ - src/win/getnameinfo.c \ - src/win/handle.c \ - src/win/handle-inl.h \ - src/win/internal.h \ - src/win/loop-watcher.c \ - src/win/pipe.c \ - src/win/poll.c \ - src/win/process-stdio.c \ - src/win/process.c \ - src/win/req.c \ - src/win/req-inl.h \ - src/win/signal.c \ - src/win/stream.c \ - src/win/stream-inl.h \ - src/win/tcp.c \ - src/win/thread.c \ - src/win/timer.c \ - src/win/tty.c \ - src/win/udp.c \ - src/win/util.c \ - src/win/winapi.c \ - src/win/winapi.h \ - src/win/winsock.c \ - src/win/winsock.h - -else # WINNT - -include_HEADERS += include/uv-unix.h -AM_CPPFLAGS += -I$(top_srcdir)/src/unix -libuv_la_SOURCES += src/unix/async.c \ - src/unix/atomic-ops.h \ - src/unix/core.c \ - src/unix/dl.c \ - src/unix/fs.c \ - src/unix/getaddrinfo.c \ - src/unix/getnameinfo.c \ - src/unix/internal.h \ - src/unix/loop-watcher.c \ - src/unix/loop.c \ - src/unix/pipe.c \ - src/unix/poll.c \ - src/unix/process.c \ - src/unix/signal.c \ - src/unix/spinlock.h \ - src/unix/stream.c \ - src/unix/tcp.c \ - src/unix/thread.c \ - src/unix/timer.c \ - src/unix/tty.c \ - src/unix/udp.c - -endif # WINNT - -EXTRA_DIST = test/fixtures/empty_file \ - test/fixtures/load_error.node \ - include \ - test \ - docs \ - img \ - samples \ - android-configure \ - CONTRIBUTING.md \ - LICENSE \ - README.md \ - checksparse.sh \ - vcbuild.bat \ - Makefile.mingw \ - common.gypi \ - gyp_uv.py \ - uv.gyp - - - -TESTS = test/run-tests -check_PROGRAMS = test/run-tests -test_run_tests_CFLAGS = -test_run_tests_SOURCES = test/blackhole-server.c \ - test/dns-server.c \ - test/echo-server.c \ - test/run-tests.c \ - test/runner.c \ - test/runner.h \ - test/task.h \ - test/test-active.c \ - test/test-async.c \ - test/test-async-null-cb.c \ - test/test-barrier.c \ - test/test-callback-order.c \ - test/test-callback-stack.c \ - test/test-close-fd.c \ - test/test-close-order.c \ - test/test-condvar.c \ - test/test-connection-fail.c \ - test/test-cwd-and-chdir.c \ - test/test-default-loop-close.c \ - test/test-delayed-accept.c \ - test/test-dlerror.c \ - test/test-embed.c \ - test/test-emfile.c \ - test/test-error.c \ - test/test-fail-always.c \ - test/test-fs-event.c \ - test/test-fs-poll.c \ - test/test-fs.c \ - test/test-get-currentexe.c \ - test/test-get-loadavg.c \ - test/test-get-memory.c \ - test/test-getaddrinfo.c \ - test/test-getnameinfo.c \ - test/test-getsockname.c \ - test/test-handle-fileno.c \ - test/test-homedir.c \ - test/test-hrtime.c \ - test/test-idle.c \ - test/test-ip4-addr.c \ - test/test-ip6-addr.c \ - test/test-ipc-send-recv.c \ - test/test-ipc.c \ - test/test-list.h \ - test/test-loop-handles.c \ - test/test-loop-alive.c \ - test/test-loop-close.c \ - test/test-loop-stop.c \ - test/test-loop-time.c \ - test/test-loop-configure.c \ - test/test-multiple-listen.c \ - test/test-mutexes.c \ - test/test-osx-select.c \ - test/test-pass-always.c \ - test/test-ping-pong.c \ - test/test-pipe-bind-error.c \ - test/test-pipe-connect-error.c \ - test/test-pipe-connect-multiple.c \ - test/test-pipe-connect-prepare.c \ - test/test-pipe-getsockname.c \ - test/test-pipe-pending-instances.c \ - test/test-pipe-sendmsg.c \ - test/test-pipe-server-close.c \ - test/test-pipe-close-stdout-read-stdin.c \ - test/test-pipe-set-non-blocking.c \ - test/test-platform-output.c \ - test/test-poll-close.c \ - test/test-poll-close-doesnt-corrupt-stack.c \ - test/test-poll-closesocket.c \ - test/test-poll.c \ - test/test-process-title.c \ - test/test-ref.c \ - test/test-run-nowait.c \ - test/test-run-once.c \ - test/test-semaphore.c \ - test/test-shutdown-close.c \ - test/test-shutdown-eof.c \ - test/test-shutdown-twice.c \ - test/test-signal-multiple-loops.c \ - test/test-signal.c \ - test/test-socket-buffer-size.c \ - test/test-spawn.c \ - test/test-stdio-over-pipes.c \ - test/test-tcp-bind-error.c \ - test/test-tcp-bind6-error.c \ - test/test-tcp-close-accept.c \ - test/test-tcp-close-while-connecting.c \ - test/test-tcp-close.c \ - test/test-tcp-create-socket-early.c \ - test/test-tcp-connect-error-after-write.c \ - test/test-tcp-connect-error.c \ - test/test-tcp-connect-timeout.c \ - test/test-tcp-connect6-error.c \ - test/test-tcp-flags.c \ - test/test-tcp-open.c \ - test/test-tcp-read-stop.c \ - test/test-tcp-shutdown-after-write.c \ - test/test-tcp-unexpected-read.c \ - test/test-tcp-oob.c \ - test/test-tcp-write-to-half-open-connection.c \ - test/test-tcp-write-after-connect.c \ - test/test-tcp-writealot.c \ - test/test-tcp-write-fail.c \ - test/test-tcp-try-write.c \ - test/test-tcp-write-queue-order.c \ - test/test-thread-equal.c \ - test/test-thread.c \ - test/test-threadpool-cancel.c \ - test/test-threadpool.c \ - test/test-timer-again.c \ - test/test-timer-from-check.c \ - test/test-timer.c \ - test/test-tty.c \ - test/test-udp-bind.c \ - test/test-udp-create-socket-early.c \ - test/test-udp-dgram-too-big.c \ - test/test-udp-ipv6.c \ - test/test-udp-multicast-interface.c \ - test/test-udp-multicast-interface6.c \ - test/test-udp-multicast-join.c \ - test/test-udp-multicast-join6.c \ - test/test-udp-multicast-ttl.c \ - test/test-udp-open.c \ - test/test-udp-options.c \ - test/test-udp-send-and-recv.c \ - test/test-udp-send-immediate.c \ - test/test-udp-send-unreachable.c \ - test/test-udp-try-send.c \ - test/test-walk-handles.c \ - test/test-watcher-cross-stop.c -test_run_tests_LDADD = libuv.la - -if WINNT -test_run_tests_SOURCES += test/runner-win.c \ - test/runner-win.h -else -test_run_tests_SOURCES += test/runner-unix.c \ - test/runner-unix.h -endif - -if AIX -test_run_tests_CFLAGS += -D_ALL_SOURCE -D_XOPEN_SOURCE=500 -D_LINUX_SOURCE_COMPAT -endif - -if SUNOS -test_run_tests_CFLAGS += -D__EXTENSIONS__ -D_XOPEN_SOURCE=500 -endif - - -if AIX -libuv_la_CFLAGS += -D_ALL_SOURCE -D_XOPEN_SOURCE=500 -D_LINUX_SOURCE_COMPAT -include_HEADERS += include/uv-aix.h -libuv_la_SOURCES += src/unix/aix.c -endif - -if ANDROID -include_HEADERS += include/android-ifaddrs.h \ - include/pthread-fixes.h -libuv_la_SOURCES += src/unix/android-ifaddrs.c \ - src/unix/pthread-fixes.c -endif - -if DARWIN -include_HEADERS += include/uv-darwin.h -libuv_la_CFLAGS += -D_DARWIN_USE_64_BIT_INODE=1 -libuv_la_CFLAGS += -D_DARWIN_UNLIMITED_SELECT=1 -libuv_la_SOURCES += src/unix/darwin.c \ - src/unix/darwin-proctitle.c \ - src/unix/fsevents.c \ - src/unix/kqueue.c \ - src/unix/proctitle.c -endif - -if DRAGONFLY -include_HEADERS += include/uv-bsd.h -endif - -if FREEBSD -include_HEADERS += include/uv-bsd.h -libuv_la_SOURCES += src/unix/freebsd.c src/unix/kqueue.c -endif - -if LINUX -include_HEADERS += include/uv-linux.h -libuv_la_CFLAGS += -D_GNU_SOURCE -libuv_la_SOURCES += src/unix/linux-core.c \ - src/unix/linux-inotify.c \ - src/unix/linux-syscalls.c \ - src/unix/linux-syscalls.h \ - src/unix/proctitle.c -endif - -if NETBSD -include_HEADERS += include/uv-bsd.h -libuv_la_SOURCES += src/unix/kqueue.c src/unix/netbsd.c -endif - -if OPENBSD -include_HEADERS += include/uv-bsd.h -libuv_la_SOURCES += src/unix/kqueue.c src/unix/openbsd.c -endif - -if SUNOS -include_HEADERS += include/uv-sunos.h -libuv_la_CFLAGS += -D__EXTENSIONS__ -D_XOPEN_SOURCE=500 -libuv_la_SOURCES += src/unix/sunos.c -endif - -if HAVE_PKG_CONFIG -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = @PACKAGE_NAME@.pc -endif diff --git a/outside/libuv-v1.7.5/Makefile.mingw b/outside/libuv-v1.7.5/Makefile.mingw deleted file mode 100644 index 156f15dab..000000000 --- a/outside/libuv-v1.7.5/Makefile.mingw +++ /dev/null @@ -1,84 +0,0 @@ -# Copyright (c) 2013, Ben Noordhuis -# -# Permission to use, copy, modify, and/or distribute this software for any -# purpose with or without fee is hereby granted, provided that the above -# copyright notice and this permission notice appear in all copies. -# -# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -CC ?= gcc - -CFLAGS += -Wall \ - -Wextra \ - -Wno-unused-parameter \ - -Iinclude \ - -Isrc \ - -Isrc/win \ - -DWIN32_LEAN_AND_MEAN \ - -D_WIN32_WINNT=0x0600 - -INCLUDES = include/stdint-msvc2008.h \ - include/tree.h \ - include/uv-errno.h \ - include/uv-threadpool.h \ - include/uv-version.h \ - include/uv-win.h \ - include/uv.h \ - src/heap-inl.h \ - src/queue.h \ - src/uv-common.h \ - src/win/atomicops-inl.h \ - src/win/handle-inl.h \ - src/win/internal.h \ - src/win/req-inl.h \ - src/win/stream-inl.h \ - src/win/winapi.h \ - src/win/winsock.h - -OBJS = src/fs-poll.o \ - src/inet.o \ - src/threadpool.o \ - src/uv-common.o \ - src/version.o \ - src/win/async.o \ - src/win/core.o \ - src/win/dl.o \ - src/win/error.o \ - src/win/fs-event.o \ - src/win/fs.o \ - src/win/getaddrinfo.o \ - src/win/getnameinfo.o \ - src/win/handle.o \ - src/win/loop-watcher.o \ - src/win/pipe.o \ - src/win/poll.o \ - src/win/process-stdio.o \ - src/win/process.o \ - src/win/req.o \ - src/win/signal.o \ - src/win/stream.o \ - src/win/tcp.o \ - src/win/thread.o \ - src/win/timer.o \ - src/win/tty.o \ - src/win/udp.o \ - src/win/util.o \ - src/win/winapi.o \ - src/win/winsock.o - -all: libuv.a - -clean: - -$(RM) $(OBJS) libuv.a - -libuv.a: $(OBJS) - $(AR) crs $@ $^ - -$(OBJS): %.o : %.c $(INCLUDES) - $(CC) $(CFLAGS) -c -o $@ $< diff --git a/outside/libuv-v1.7.5/README.md b/outside/libuv-v1.7.5/README.md deleted file mode 100644 index 0ce266997..000000000 --- a/outside/libuv-v1.7.5/README.md +++ /dev/null @@ -1,245 +0,0 @@ -![libuv][libuv_banner] - -## Overview - -libuv is a multi-platform support library with a focus on asynchronous I/O. It -was primarily developed for use by [Node.js](http://nodejs.org), but it's also -used by [Luvit](http://luvit.io/), [Julia](http://julialang.org/), -[pyuv](https://github.com/saghul/pyuv), and [others](https://github.com/libuv/libuv/wiki/Projects-that-use-libuv). - -## Feature highlights - - * Full-featured event loop backed by epoll, kqueue, IOCP, event ports. - - * Asynchronous TCP and UDP sockets - - * Asynchronous DNS resolution - - * Asynchronous file and file system operations - - * File system events - - * ANSI escape code controlled TTY - - * IPC with socket sharing, using Unix domain sockets or named pipes (Windows) - - * Child processes - - * Thread pool - - * Signal handling - - * High resolution clock - - * Threading and synchronization primitives - -## Versioning - -Starting with version 1.0.0 libuv follows the [semantic versioning](http://semver.org/) -scheme. The API change and backwards compatibility rules are those indicated by -SemVer. libuv will keep a stable ABI across major releases. - -## Community - - * [Mailing list](http://groups.google.com/group/libuv) - * [IRC chatroom (#libuv@irc.freenode.org)](http://webchat.freenode.net?channels=libuv&uio=d4) - -## Documentation - -### Official API documentation - -Located in the docs/ subdirectory. It uses the [Sphinx](http://sphinx-doc.org/) -framework, which makes it possible to build the documentation in multiple -formats. - -Show different supported building options: - - $ make help - -Build documentation as HTML: - - $ make html - -Build documentation as man pages: - - $ make man - -Build documentation as ePub: - - $ make epub - -NOTE: Windows users need to use make.bat instead of plain 'make'. - -Documentation can be browsed online [here](http://docs.libuv.org). - -The [tests and benchmarks](https://github.com/libuv/libuv/tree/master/test) -also serve as API specification and usage examples. - -### Other resources - - * [An Introduction to libuv](http://nikhilm.github.com/uvbook/) - — An overview of libuv with tutorials. - * [LXJS 2012 talk](http://www.youtube.com/watch?v=nGn60vDSxQ4) - — High-level introductory talk about libuv. - * [libuv-dox](https://github.com/thlorenz/libuv-dox) - — Documenting types and methods of libuv, mostly by reading uv.h. - * [learnuv](https://github.com/thlorenz/learnuv) - — Learn uv for fun and profit, a self guided workshop to libuv. - -These resources are not handled by libuv maintainers and might be out of -date. Please verify it before opening new issues. - -## Downloading - -libuv can be downloaded either from the -[GitHub repository](https://github.com/libuv/libuv) -or from the [downloads site](http://dist.libuv.org/dist/). - -Starting with libuv 1.7.0, binaries for Windows are also provided. This is to -be considered EXPERIMENTAL. - -Before verifying the git tags or signature files, importing the relevant keys -is necessary. Key IDs are listed in the -[MAINTAINERS](https://github.com/libuv/libuv/blob/master/MAINTAINERS.md) -file, but are also available as git blob objects for easier use. - -Importing a key the usual way: - - $ gpg --keyserver pool.sks-keyservers.net \ - --recv-keys AE9BC059 - -Importing a key from a git blob object: - - $ git show pubkey-saghul | gpg --import - -### Verifying releases - -Git tags are signed with the developer's key, they can be verified as follows: - - $ git verify-tag v1.6.1 - -Starting with libuv 1.7.0, the tarballs stored in the -[downloads site](http://dist.libuv.org/dist/) are signed and an accomanying -signature file sit alongside each. Once both the release tarball and the -signature file are downloaded, the file can be verified as follows: - - $ gpg --verify libuv-1.7.0.tar.gz.sign - -## Build Instructions - -For GCC there are two build methods: via autotools or via [GYP][]. -GYP is a meta-build system which can generate MSVS, Makefile, and XCode -backends. It is best used for integration into other projects. - -To build with autotools: - - $ sh autogen.sh - $ ./configure - $ make - $ make check - $ make install - -### Windows - -First, [Python][] 2.6 or 2.7 must be installed as it is required by [GYP][]. -If python is not in your path, set the environment variable `PYTHON` to its -location. For example: `set PYTHON=C:\Python27\python.exe` - -To build with Visual Studio, launch a git shell (e.g. Cmd or PowerShell) -and run vcbuild.bat which will checkout the GYP code into build/gyp and -generate uv.sln as well as related project files. - -To have GYP generate build script for another system, checkout GYP into the -project tree manually: - - $ git clone https://chromium.googlesource.com/external/gyp.git build/gyp - -### Unix - -Run: - - $ ./gyp_uv.py -f make - $ make -C out - -Run `./gyp_uv.py -f make -Dtarget_arch=x32` to build [x32][] binaries. - -### OS X - -Run: - - $ ./gyp_uv.py -f xcode - $ xcodebuild -ARCHS="x86_64" -project uv.xcodeproj \ - -configuration Release -target All - -Using Homebrew: - - $ brew install --HEAD libuv - -Note to OS X users: - -Make sure that you specify the architecture you wish to build for in the -"ARCHS" flag. You can specify more than one by delimiting with a space -(e.g. "x86_64 i386"). - -### Android - -Run: - - $ source ./android-configure NDK_PATH gyp - $ make -C out - -Note for UNIX users: compile your project with `-D_LARGEFILE_SOURCE` and -`-D_FILE_OFFSET_BITS=64`. GYP builds take care of that automatically. - -### Using Ninja - -To use ninja for build on ninja supported platforms, run: - - $ ./gyp_uv.py -f ninja - $ ninja -C out/Debug #for debug build OR - $ ninja -C out/Release - - -### Running tests - -Run: - - $ ./gyp_uv.py -f make - $ make -C out - $ ./out/Debug/run-tests - -## Supported Platforms - -Microsoft Windows operating systems since Windows XP SP2. It can be built -with either Visual Studio or MinGW. Consider using -[Visual Studio Express 2010][] or later if you do not have a full Visual -Studio license. - -Linux using the GCC toolchain. - -OS X using the GCC or XCode toolchain. - -Solaris 121 and later using GCC toolchain. - -AIX 6 and later using GCC toolchain (see notes). - -### AIX Notes - -AIX support for filesystem events requires the non-default IBM `bos.ahafs` -package to be installed. This package provides the AIX Event Infrastructure -that is detected by `autoconf`. -[IBM documentation](http://www.ibm.com/developerworks/aix/library/au-aix_event_infrastructure/) -describes the package in more detail. - -AIX support for filesystem events is not compiled when building with `gyp`. - -## Patches - -See the [guidelines for contributing][]. - -[node.js]: http://nodejs.org/ -[GYP]: http://code.google.com/p/gyp/ -[Python]: https://www.python.org/downloads/ -[Visual Studio Express 2010]: http://www.microsoft.com/visualstudio/eng/products/visual-studio-2010-express -[guidelines for contributing]: https://github.com/libuv/libuv/blob/master/CONTRIBUTING.md -[libuv_banner]: https://raw.githubusercontent.com/libuv/libuv/master/img/banner.png diff --git a/outside/libuv-v1.7.5/android-configure b/outside/libuv-v1.7.5/android-configure deleted file mode 100755 index e0b250fb6..000000000 --- a/outside/libuv-v1.7.5/android-configure +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -export TOOLCHAIN=$PWD/android-toolchain -mkdir -p $TOOLCHAIN -$1/build/tools/make-standalone-toolchain.sh \ - --toolchain=arm-linux-androideabi-4.8 \ - --arch=arm \ - --install-dir=$TOOLCHAIN \ - --platform=android-21 -export PATH=$TOOLCHAIN/bin:$PATH -export AR=arm-linux-androideabi-ar -export CC=arm-linux-androideabi-gcc -export CXX=arm-linux-androideabi-g++ -export LINK=arm-linux-androideabi-g++ -export PLATFORM=android - -if [ $2 -a $2 == 'gyp' ] - then - ./gyp_uv.py -Dtarget_arch=arm -DOS=android -f make-android -fi diff --git a/outside/libuv-v1.7.5/appveyor.yml b/outside/libuv-v1.7.5/appveyor.yml deleted file mode 100644 index c9f55134e..000000000 --- a/outside/libuv-v1.7.5/appveyor.yml +++ /dev/null @@ -1,36 +0,0 @@ -version: v1.7.5.build{build} - -install: - - cinst -y nsis - -matrix: - fast_finish: true - allow_failures: - - platform: x86 - configuration: Release - - platform: x64 - configuration: Release - -platform: - - x86 - - x64 - -configuration: - - Release - -build_script: - # Fixed tag version number if using a tag. - - cmd: if "%APPVEYOR_REPO_TAG%" == "true" set APPVEYOR_BUILD_VERSION=%APPVEYOR_REPO_TAG_NAME% - # vcbuild overwrites the platform variable. - - cmd: set ARCH=%platform% - - cmd: vcbuild.bat release %ARCH% shared - -after_build: - - '"%PROGRAMFILES(x86)%\NSIS\makensis" /DVERSION=%APPVEYOR_BUILD_VERSION% /DARCH=%ARCH% libuv.nsi' - -artifacts: - - name: Installer - path: 'libuv-*.exe' - -cache: - - C:\projects\libuv\build\gyp diff --git a/outside/libuv-v1.7.5/autogen.sh b/outside/libuv-v1.7.5/autogen.sh deleted file mode 100755 index 0574778a4..000000000 --- a/outside/libuv-v1.7.5/autogen.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh - -# Copyright (c) 2013, Ben Noordhuis -# -# Permission to use, copy, modify, and/or distribute this software for any -# purpose with or without fee is hereby granted, provided that the above -# copyright notice and this permission notice appear in all copies. -# -# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -cd `dirname "$0"` - -if [ "$LIBTOOLIZE" = "" ] && [ "`uname`" = "Darwin" ]; then - LIBTOOLIZE=glibtoolize -fi - -ACLOCAL=${ACLOCAL:-aclocal} -AUTOCONF=${AUTOCONF:-autoconf} -AUTOMAKE=${AUTOMAKE:-automake} -LIBTOOLIZE=${LIBTOOLIZE:-libtoolize} - -automake_version=`"$AUTOMAKE" --version | head -n 1 | sed 's/[^.0-9]//g'` -automake_version_major=`echo "$automake_version" | cut -d. -f1` -automake_version_minor=`echo "$automake_version" | cut -d. -f2` - -UV_EXTRA_AUTOMAKE_FLAGS= -if test "$automake_version_major" -gt 1 || \ - test "$automake_version_major" -eq 1 && \ - test "$automake_version_minor" -gt 11; then - # serial-tests is available in v1.12 and newer. - UV_EXTRA_AUTOMAKE_FLAGS="$UV_EXTRA_AUTOMAKE_FLAGS serial-tests" -fi -echo "m4_define([UV_EXTRA_AUTOMAKE_FLAGS], [$UV_EXTRA_AUTOMAKE_FLAGS])" \ - > m4/libuv-extra-automake-flags.m4 - -set -ex -"$LIBTOOLIZE" -"$ACLOCAL" -I m4 -"$AUTOCONF" -"$AUTOMAKE" --add-missing --copy diff --git a/outside/libuv-v1.7.5/checksparse.sh b/outside/libuv-v1.7.5/checksparse.sh deleted file mode 100755 index 619cf6f8b..000000000 --- a/outside/libuv-v1.7.5/checksparse.sh +++ /dev/null @@ -1,234 +0,0 @@ -#!/bin/sh - -# Copyright (c) 2013, Ben Noordhuis -# -# Permission to use, copy, modify, and/or distribute this software for any -# purpose with or without fee is hereby granted, provided that the above -# copyright notice and this permission notice appear in all copies. -# -# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -SPARSE=${SPARSE:-sparse} - -SPARSE_FLAGS=${SPARSE_FLAGS:-" --D__POSIX__ --Wsparse-all --Wno-do-while --Wno-transparent-union --Iinclude --Isrc -"} - -SOURCES=" -include/tree.h -include/uv-unix.h -include/uv.h -src/fs-poll.c -src/inet.c -src/queue.h -src/unix/async.c -src/unix/core.c -src/unix/dl.c -src/unix/fs.c -src/unix/getaddrinfo.c -src/unix/internal.h -src/unix/loop-watcher.c -src/unix/loop.c -src/unix/pipe.c -src/unix/poll.c -src/unix/process.c -src/unix/signal.c -src/unix/stream.c -src/unix/tcp.c -src/unix/thread.c -src/unix/threadpool.c -src/unix/timer.c -src/unix/tty.c -src/unix/udp.c -src/uv-common.c -src/uv-common.h -" - -TESTS=" -test/benchmark-async-pummel.c -test/benchmark-async.c -test/benchmark-fs-stat.c -test/benchmark-getaddrinfo.c -test/benchmark-loop-count.c -test/benchmark-million-async.c -test/benchmark-million-timers.c -test/benchmark-multi-accept.c -test/benchmark-ping-pongs.c -test/benchmark-pound.c -test/benchmark-pump.c -test/benchmark-sizes.c -test/benchmark-spawn.c -test/benchmark-tcp-write-batch.c -test/benchmark-thread.c -test/benchmark-udp-pummel.c -test/blackhole-server.c -test/dns-server.c -test/echo-server.c -test/run-benchmarks.c -test/run-tests.c -test/runner-unix.c -test/runner-unix.h -test/runner.c -test/runner.h -test/task.h -test/test-active.c -test/test-async.c -test/test-barrier.c -test/test-callback-order.c -test/test-callback-stack.c -test/test-condvar.c -test/test-connection-fail.c -test/test-cwd-and-chdir.c -test/test-delayed-accept.c -test/test-dlerror.c -test/test-embed.c -test/test-error.c -test/test-fail-always.c -test/test-fs-event.c -test/test-fs-poll.c -test/test-fs.c -test/test-get-currentexe.c -test/test-get-loadavg.c -test/test-get-memory.c -test/test-getaddrinfo.c -test/test-getsockname.c -test/test-homedir.c -test/test-hrtime.c -test/test-idle.c -test/test-ip6-addr.c -test/test-ipc-send-recv.c -test/test-ipc.c -test/test-loop-handles.c -test/test-multiple-listen.c -test/test-mutexes.c -test/test-pass-always.c -test/test-ping-pong.c -test/test-pipe-bind-error.c -test/test-pipe-connect-error.c -test/test-pipe-sendmsg.c -test/test-pipe-server-close.c -test/test-platform-output.c -test/test-poll-close.c -test/test-poll.c -test/test-process-title.c -test/test-ref.c -test/test-run-nowait.c -test/test-run-once.c -test/test-semaphore.c -test/test-shutdown-close.c -test/test-shutdown-eof.c -test/test-signal-multiple-loops.c -test/test-signal.c -test/test-spawn.c -test/test-stdio-over-pipes.c -test/test-tcp-bind-error.c -test/test-tcp-bind6-error.c -test/test-tcp-close-while-connecting.c -test/test-tcp-close-accept.c -test/test-tcp-close.c -test/test-tcp-connect-error-after-write.c -test/test-tcp-connect-error.c -test/test-tcp-connect-timeout.c -test/test-tcp-connect6-error.c -test/test-tcp-flags.c -test/test-tcp-open.c -test/test-tcp-read-stop.c -test/test-tcp-shutdown-after-write.c -test/test-tcp-unexpected-read.c -test/test-tcp-oob.c -test/test-tcp-write-error.c -test/test-tcp-write-to-half-open-connection.c -test/test-tcp-writealot.c -test/test-thread.c -test/test-threadpool-cancel.c -test/test-threadpool.c -test/test-timer-again.c -test/test-timer.c -test/test-tty.c -test/test-udp-dgram-too-big.c -test/test-udp-ipv6.c -test/test-udp-multicast-join.c -test/test-udp-multicast-ttl.c -test/test-udp-open.c -test/test-udp-options.c -test/test-udp-send-and-recv.c -test/test-walk-handles.c -test/test-watcher-cross-stop.c -" - -case `uname -s` in -AIX) - SPARSE_FLAGS="$SPARSE_FLAGS -D_AIX=1" - SOURCES="$SOURCES - src/unix/aix.c" - ;; -Darwin) - SPARSE_FLAGS="$SPARSE_FLAGS -D__APPLE__=1" - SOURCES="$SOURCES - include/uv-bsd.h - src/unix/darwin.c - src/unix/kqueue.c - src/unix/fsevents.c" - ;; -DragonFly) - SPARSE_FLAGS="$SPARSE_FLAGS -D__DragonFly__=1" - SOURCES="$SOURCES - include/uv-bsd.h - src/unix/kqueue.c - src/unix/freebsd.c" - ;; -FreeBSD) - SPARSE_FLAGS="$SPARSE_FLAGS -D__FreeBSD__=1" - SOURCES="$SOURCES - include/uv-bsd.h - src/unix/kqueue.c - src/unix/freebsd.c" - ;; -Linux) - SPARSE_FLAGS="$SPARSE_FLAGS -D__linux__=1" - SOURCES="$SOURCES - include/uv-linux.h - src/unix/linux-inotify.c - src/unix/linux-core.c - src/unix/linux-syscalls.c - src/unix/linux-syscalls.h" - ;; -NetBSD) - SPARSE_FLAGS="$SPARSE_FLAGS -D__NetBSD__=1" - SOURCES="$SOURCES - include/uv-bsd.h - src/unix/kqueue.c - src/unix/netbsd.c" - ;; -OpenBSD) - SPARSE_FLAGS="$SPARSE_FLAGS -D__OpenBSD__=1" - SOURCES="$SOURCES - include/uv-bsd.h - src/unix/kqueue.c - src/unix/openbsd.c" - ;; -SunOS) - SPARSE_FLAGS="$SPARSE_FLAGS -D__sun=1" - SOURCES="$SOURCES - include/uv-sunos.h - src/unix/sunos.c" - ;; -esac - -for ARCH in __i386__ __x86_64__ __arm__ __mips__; do - $SPARSE $SPARSE_FLAGS -D$ARCH=1 $SOURCES -done - -# Tests are architecture independent. -$SPARSE $SPARSE_FLAGS -Itest $TESTS diff --git a/outside/libuv-v1.7.5/common.gypi b/outside/libuv-v1.7.5/common.gypi deleted file mode 100644 index 392c85951..000000000 --- a/outside/libuv-v1.7.5/common.gypi +++ /dev/null @@ -1,211 +0,0 @@ -{ - 'variables': { - 'visibility%': 'hidden', # V8's visibility setting - 'target_arch%': 'ia32', # set v8's target architecture - 'host_arch%': 'ia32', # set v8's host architecture - 'uv_library%': 'static_library', # allow override to 'shared_library' for DLL/.so builds - 'component%': 'static_library', # NB. these names match with what V8 expects - 'msvs_multi_core_compile': '0', # we do enable multicore compiles, but not using the V8 way - }, - - 'target_defaults': { - 'default_configuration': 'Debug', - 'configurations': { - 'Debug': { - 'defines': [ 'DEBUG', '_DEBUG' ], - 'cflags': [ '-g', '-O0', '-fwrapv' ], - 'msvs_settings': { - 'VCCLCompilerTool': { - 'target_conditions': [ - ['uv_library=="static_library"', { - 'RuntimeLibrary': 1, # static debug - }, { - 'RuntimeLibrary': 3, # DLL debug - }], - ], - 'Optimization': 0, # /Od, no optimization - 'MinimalRebuild': 'false', - 'OmitFramePointers': 'false', - 'BasicRuntimeChecks': 3, # /RTC1 - }, - 'VCLinkerTool': { - 'LinkIncremental': 2, # enable incremental linking - }, - }, - 'xcode_settings': { - 'GCC_OPTIMIZATION_LEVEL': '0', - 'OTHER_CFLAGS': [ '-Wno-strict-aliasing' ], - }, - 'conditions': [ - ['OS == "android"', { - 'cflags': [ '-fPIE' ], - 'ldflags': [ '-fPIE', '-pie' ] - }] - ] - }, - 'Release': { - 'defines': [ 'NDEBUG' ], - 'cflags': [ - '-O3', - '-fstrict-aliasing', - '-fomit-frame-pointer', - '-fdata-sections', - '-ffunction-sections', - ], - 'msvs_settings': { - 'VCCLCompilerTool': { - 'target_conditions': [ - ['uv_library=="static_library"', { - 'RuntimeLibrary': 0, # static release - }, { - 'RuntimeLibrary': 2, # debug release - }], - ], - 'Optimization': 3, # /Ox, full optimization - 'FavorSizeOrSpeed': 1, # /Ot, favour speed over size - 'InlineFunctionExpansion': 2, # /Ob2, inline anything eligible - 'WholeProgramOptimization': 'true', # /GL, whole program optimization, needed for LTCG - 'OmitFramePointers': 'true', - 'EnableFunctionLevelLinking': 'true', - 'EnableIntrinsicFunctions': 'true', - }, - 'VCLibrarianTool': { - 'AdditionalOptions': [ - '/LTCG', # link time code generation - ], - }, - 'VCLinkerTool': { - 'LinkTimeCodeGeneration': 1, # link-time code generation - 'OptimizeReferences': 2, # /OPT:REF - 'EnableCOMDATFolding': 2, # /OPT:ICF - 'LinkIncremental': 1, # disable incremental linking - }, - }, - } - }, - 'msvs_settings': { - 'VCCLCompilerTool': { - 'StringPooling': 'true', # pool string literals - 'DebugInformationFormat': 3, # Generate a PDB - 'WarningLevel': 3, - 'BufferSecurityCheck': 'true', - 'ExceptionHandling': 1, # /EHsc - 'SuppressStartupBanner': 'true', - 'WarnAsError': 'false', - 'AdditionalOptions': [ - '/MP', # compile across multiple CPUs - ], - }, - 'VCLibrarianTool': { - }, - 'VCLinkerTool': { - 'GenerateDebugInformation': 'true', - 'RandomizedBaseAddress': 2, # enable ASLR - 'DataExecutionPrevention': 2, # enable DEP - 'AllowIsolation': 'true', - 'SuppressStartupBanner': 'true', - 'target_conditions': [ - ['_type=="executable"', { - 'SubSystem': 1, # console executable - }], - ], - }, - }, - 'conditions': [ - ['OS == "win"', { - 'msvs_cygwin_shell': 0, # prevent actions from trying to use cygwin - 'defines': [ - 'WIN32', - # we don't really want VC++ warning us about - # how dangerous C functions are... - '_CRT_SECURE_NO_DEPRECATE', - # ... or that C implementations shouldn't use - # POSIX names - '_CRT_NONSTDC_NO_DEPRECATE', - ], - 'target_conditions': [ - ['target_arch=="x64"', { - 'msvs_configuration_platform': 'x64' - }] - ] - }], - ['OS in "freebsd dragonflybsd linux openbsd solaris android"', { - 'cflags': [ '-Wall' ], - 'cflags_cc': [ '-fno-rtti', '-fno-exceptions' ], - 'target_conditions': [ - ['_type=="static_library"', { - 'standalone_static_library': 1, # disable thin archive which needs binutils >= 2.19 - }], - ], - 'conditions': [ - [ 'host_arch != target_arch and target_arch=="ia32"', { - 'cflags': [ '-m32' ], - 'ldflags': [ '-m32' ], - }], - [ 'target_arch=="x32"', { - 'cflags': [ '-mx32' ], - 'ldflags': [ '-mx32' ], - }], - [ 'OS=="linux"', { - 'cflags': [ '-ansi' ], - }], - [ 'OS=="solaris"', { - 'cflags': [ '-pthreads' ], - 'ldflags': [ '-pthreads' ], - }], - [ 'OS not in "solaris android"', { - 'cflags': [ '-pthread' ], - 'ldflags': [ '-pthread' ], - }], - [ 'visibility=="hidden"', { - 'cflags': [ '-fvisibility=hidden' ], - }], - ], - }], - ['OS=="mac"', { - 'xcode_settings': { - 'ALWAYS_SEARCH_USER_PATHS': 'NO', - 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks - 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic - # (Equivalent to -fPIC) - 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions - 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti - 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings - # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden - 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES', - 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden - 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics - 'PREBINDING': 'NO', # No -Wl,-prebind - 'USE_HEADERMAP': 'NO', - 'OTHER_CFLAGS': [ - '-fstrict-aliasing', - ], - 'WARNING_CFLAGS': [ - '-Wall', - '-Wendif-labels', - '-W', - '-Wno-unused-parameter', - ], - }, - 'conditions': [ - ['target_arch=="ia32"', { - 'xcode_settings': {'ARCHS': ['i386']}, - }], - ['target_arch=="x64"', { - 'xcode_settings': {'ARCHS': ['x86_64']}, - }], - ], - 'target_conditions': [ - ['_type!="static_library"', { - 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']}, - }], - ], - }], - ['OS=="solaris"', { - 'cflags': [ '-fno-omit-frame-pointer' ], - # pull in V8's postmortem metadata - 'ldflags': [ '-Wl,-z,allextract' ] - }], - ], - }, -} diff --git a/outside/libuv-v1.7.5/configure.ac b/outside/libuv-v1.7.5/configure.ac deleted file mode 100644 index c55a11847..000000000 --- a/outside/libuv-v1.7.5/configure.ac +++ /dev/null @@ -1,68 +0,0 @@ -# Copyright (c) 2013, Ben Noordhuis -# -# Permission to use, copy, modify, and/or distribute this software for any -# purpose with or without fee is hereby granted, provided that the above -# copyright notice and this permission notice appear in all copies. -# -# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -AC_PREREQ(2.57) -AC_INIT([libuv], [1.7.5], [https://github.com/libuv/libuv/issues]) -AC_CONFIG_MACRO_DIR([m4]) -m4_include([m4/libuv-extra-automake-flags.m4]) -m4_include([m4/as_case.m4]) -m4_include([m4/libuv-check-flags.m4]) -AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects] UV_EXTRA_AUTOMAKE_FLAGS) -AC_CANONICAL_HOST -AC_ENABLE_SHARED -AC_ENABLE_STATIC -AC_PROG_CC -AM_PROG_CC_C_O -CC_CHECK_CFLAGS_APPEND([-fvisibility=hidden]) -CC_CHECK_CFLAGS_APPEND([-g]) -CC_CHECK_CFLAGS_APPEND([-std=gnu89]) -CC_CHECK_CFLAGS_APPEND([-pedantic]) -CC_CHECK_CFLAGS_APPEND([-Wall]) -CC_CHECK_CFLAGS_APPEND([-Wextra]) -CC_CHECK_CFLAGS_APPEND([-Wno-unused-parameter]) -# AM_PROG_AR is not available in automake v0.11 but it's essential in v0.12. -m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) -# autoconf complains if AC_PROG_LIBTOOL precedes AM_PROG_AR. -AC_PROG_LIBTOOL -m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) -LT_INIT -# TODO(bnoordhuis) Check for -pthread vs. -pthreads -AC_CHECK_LIB([dl], [dlopen]) -AC_CHECK_LIB([kstat], [kstat_lookup]) -AC_CHECK_LIB([kvm], [kvm_open]) -AC_CHECK_LIB([nsl], [gethostbyname]) -AC_CHECK_LIB([perfstat], [perfstat_cpu]) -AC_CHECK_LIB([pthread], [pthread_mutex_init]) -AC_CHECK_LIB([rt], [clock_gettime]) -AC_CHECK_LIB([sendfile], [sendfile]) -AC_CHECK_LIB([socket], [socket]) -AC_SYS_LARGEFILE -AM_CONDITIONAL([AIX], [AS_CASE([$host_os],[aix*], [true], [false])]) -AM_CONDITIONAL([ANDROID], [AS_CASE([$host_os],[linux-android*],[true], [false])]) -AM_CONDITIONAL([DARWIN], [AS_CASE([$host_os],[darwin*], [true], [false])]) -AM_CONDITIONAL([DRAGONFLY],[AS_CASE([$host_os],[dragonfly*], [true], [false])]) -AM_CONDITIONAL([FREEBSD], [AS_CASE([$host_os],[freebsd*], [true], [false])]) -AM_CONDITIONAL([LINUX], [AS_CASE([$host_os],[linux*], [true], [false])]) -AM_CONDITIONAL([NETBSD], [AS_CASE([$host_os],[netbsd*], [true], [false])]) -AM_CONDITIONAL([OPENBSD], [AS_CASE([$host_os],[openbsd*], [true], [false])]) -AM_CONDITIONAL([SUNOS], [AS_CASE([$host_os],[solaris*], [true], [false])]) -AM_CONDITIONAL([WINNT], [AS_CASE([$host_os],[mingw*], [true], [false])]) -AC_CHECK_HEADERS([sys/ahafs_evProds.h]) -AC_CHECK_PROG(PKG_CONFIG, pkg-config, yes) -AM_CONDITIONAL([HAVE_PKG_CONFIG], [test "x$PKG_CONFIG" != "x"]) -AS_IF([test "x$PKG_CONFIG" != "x"], [ - AC_CONFIG_FILES([libuv.pc]) -]) -AC_CONFIG_FILES([Makefile]) -AC_OUTPUT diff --git a/outside/libuv-v1.7.5/docs/Makefile b/outside/libuv-v1.7.5/docs/Makefile deleted file mode 100644 index 1e0fc8f02..000000000 --- a/outside/libuv-v1.7.5/docs/Makefile +++ /dev/null @@ -1,178 +0,0 @@ -# Makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -PAPER = -BUILDDIR = build -SRCDIR = src - -# User-friendly check for sphinx-build -ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) -$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) -endif - -# Internal variables. -PAPEROPT_a4 = -D latex_paper_size=a4 -PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SRCDIR) -# the i18n builder cannot share the environment and doctrees with the others -I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SRCDIR) - -.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext - -help: - @echo "Please use \`make ' where is one of" - @echo " html to make standalone HTML files" - @echo " dirhtml to make HTML files named index.html in directories" - @echo " singlehtml to make a single large HTML file" - @echo " pickle to make pickle files" - @echo " json to make JSON files" - @echo " htmlhelp to make HTML files and a HTML help project" - @echo " qthelp to make HTML files and a qthelp project" - @echo " devhelp to make HTML files and a Devhelp project" - @echo " epub to make an epub" - @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " latexpdf to make LaTeX files and run them through pdflatex" - @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" - @echo " text to make text files" - @echo " man to make manual pages" - @echo " texinfo to make Texinfo files" - @echo " info to make Texinfo files and run them through makeinfo" - @echo " gettext to make PO message catalogs" - @echo " changes to make an overview of all changed/added/deprecated items" - @echo " xml to make Docutils-native XML files" - @echo " pseudoxml to make pseudoxml-XML files for display purposes" - @echo " linkcheck to check all external links for integrity" - @echo " doctest to run all doctests embedded in the documentation (if enabled)" - -clean: - rm -rf $(BUILDDIR)/* - -html: - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." - -dirhtml: - $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." - -singlehtml: - $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml - @echo - @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." - -pickle: - $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle - @echo - @echo "Build finished; now you can process the pickle files." - -json: - $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json - @echo - @echo "Build finished; now you can process the JSON files." - -htmlhelp: - $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp - @echo - @echo "Build finished; now you can run HTML Help Workshop with the" \ - ".hhp project file in $(BUILDDIR)/htmlhelp." - -qthelp: - $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp - @echo - @echo "Build finished; now you can run "qcollectiongenerator" with the" \ - ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/libuv.qhcp" - @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/libuv.qhc" - -devhelp: - $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp - @echo - @echo "Build finished." - @echo "To view the help file:" - @echo "# mkdir -p $$HOME/.local/share/devhelp/libuv" - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/libuv" - @echo "# devhelp" - -epub: - $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub - @echo - @echo "Build finished. The epub file is in $(BUILDDIR)/epub." - -latex: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo - @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." - @echo "Run \`make' in that directory to run these through (pdf)latex" \ - "(use \`make latexpdf' here to do that automatically)." - -latexpdf: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through pdflatex..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -latexpdfja: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through platex and dvipdfmx..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -text: - $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text - @echo - @echo "Build finished. The text files are in $(BUILDDIR)/text." - -man: - $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man - @echo - @echo "Build finished. The manual pages are in $(BUILDDIR)/man." - -texinfo: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo - @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." - @echo "Run \`make' in that directory to run these through makeinfo" \ - "(use \`make info' here to do that automatically)." - -info: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo "Running Texinfo files through makeinfo..." - make -C $(BUILDDIR)/texinfo info - @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." - -gettext: - $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale - @echo - @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." - -changes: - $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes - @echo - @echo "The overview file is in $(BUILDDIR)/changes." - -linkcheck: - $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck - @echo - @echo "Link check complete; look for any errors in the above output " \ - "or in $(BUILDDIR)/linkcheck/output.txt." - -doctest: - $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest - @echo "Testing of doctests in the sources finished, look at the " \ - "results in $(BUILDDIR)/doctest/output.txt." - -xml: - $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml - @echo - @echo "Build finished. The XML files are in $(BUILDDIR)/xml." - -pseudoxml: - $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml - @echo - @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." diff --git a/outside/libuv-v1.7.5/docs/make.bat b/outside/libuv-v1.7.5/docs/make.bat deleted file mode 100644 index aa7089ab5..000000000 --- a/outside/libuv-v1.7.5/docs/make.bat +++ /dev/null @@ -1,243 +0,0 @@ -@ECHO OFF - -REM Command file for Sphinx documentation - -if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=sphinx-build -) -set BUILDDIR=build -set SRCDIR=src -set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% %SRCDIR% -set I18NSPHINXOPTS=%SPHINXOPTS% %SRCDIR% -if NOT "%PAPER%" == "" ( - set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% - set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% -) - -if "%1" == "" goto help - -if "%1" == "help" ( - :help - echo.Please use `make ^` where ^ is one of - echo. html to make standalone HTML files - echo. dirhtml to make HTML files named index.html in directories - echo. singlehtml to make a single large HTML file - echo. pickle to make pickle files - echo. json to make JSON files - echo. htmlhelp to make HTML files and a HTML help project - echo. qthelp to make HTML files and a qthelp project - echo. devhelp to make HTML files and a Devhelp project - echo. epub to make an epub - echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter - echo. text to make text files - echo. man to make manual pages - echo. texinfo to make Texinfo files - echo. gettext to make PO message catalogs - echo. changes to make an overview over all changed/added/deprecated items - echo. xml to make Docutils-native XML files - echo. pseudoxml to make pseudoxml-XML files for display purposes - echo. linkcheck to check all external links for integrity - echo. doctest to run all doctests embedded in the documentation if enabled - goto end -) - -if "%1" == "clean" ( - for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i - del /q /s %BUILDDIR%\* - goto end -) - - -%SPHINXBUILD% 2> nul -if errorlevel 9009 ( - echo. - echo.The 'sphinx-build' command was not found. Make sure you have Sphinx - echo.installed, then set the SPHINXBUILD environment variable to point - echo.to the full path of the 'sphinx-build' executable. Alternatively you - echo.may add the Sphinx directory to PATH. - echo. - echo.If you don't have Sphinx installed, grab it from - echo.http://sphinx-doc.org/ - exit /b 1 -) - -if "%1" == "html" ( - %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The HTML pages are in %BUILDDIR%/html. - goto end -) - -if "%1" == "dirhtml" ( - %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. - goto end -) - -if "%1" == "singlehtml" ( - %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. - goto end -) - -if "%1" == "pickle" ( - %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can process the pickle files. - goto end -) - -if "%1" == "json" ( - %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can process the JSON files. - goto end -) - -if "%1" == "htmlhelp" ( - %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can run HTML Help Workshop with the ^ -.hhp project file in %BUILDDIR%/htmlhelp. - goto end -) - -if "%1" == "qthelp" ( - %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can run "qcollectiongenerator" with the ^ -.qhcp project file in %BUILDDIR%/qthelp, like this: - echo.^> qcollectiongenerator %BUILDDIR%\qthelp\libuv.qhcp - echo.To view the help file: - echo.^> assistant -collectionFile %BUILDDIR%\qthelp\libuv.ghc - goto end -) - -if "%1" == "devhelp" ( - %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. - goto end -) - -if "%1" == "epub" ( - %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The epub file is in %BUILDDIR%/epub. - goto end -) - -if "%1" == "latex" ( - %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. - goto end -) - -if "%1" == "latexpdf" ( - %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex - cd %BUILDDIR%/latex - make all-pdf - cd %BUILDDIR%/.. - echo. - echo.Build finished; the PDF files are in %BUILDDIR%/latex. - goto end -) - -if "%1" == "latexpdfja" ( - %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex - cd %BUILDDIR%/latex - make all-pdf-ja - cd %BUILDDIR%/.. - echo. - echo.Build finished; the PDF files are in %BUILDDIR%/latex. - goto end -) - -if "%1" == "text" ( - %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The text files are in %BUILDDIR%/text. - goto end -) - -if "%1" == "man" ( - %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The manual pages are in %BUILDDIR%/man. - goto end -) - -if "%1" == "texinfo" ( - %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. - goto end -) - -if "%1" == "gettext" ( - %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The message catalogs are in %BUILDDIR%/locale. - goto end -) - -if "%1" == "changes" ( - %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes - if errorlevel 1 exit /b 1 - echo. - echo.The overview file is in %BUILDDIR%/changes. - goto end -) - -if "%1" == "linkcheck" ( - %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck - if errorlevel 1 exit /b 1 - echo. - echo.Link check complete; look for any errors in the above output ^ -or in %BUILDDIR%/linkcheck/output.txt. - goto end -) - -if "%1" == "doctest" ( - %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest - if errorlevel 1 exit /b 1 - echo. - echo.Testing of doctests in the sources finished, look at the ^ -results in %BUILDDIR%/doctest/output.txt. - goto end -) - -if "%1" == "xml" ( - %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The XML files are in %BUILDDIR%/xml. - goto end -) - -if "%1" == "pseudoxml" ( - %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml. - goto end -) - -:end diff --git a/outside/libuv-v1.7.5/docs/src/async.rst b/outside/libuv-v1.7.5/docs/src/async.rst deleted file mode 100644 index 5c4004582..000000000 --- a/outside/libuv-v1.7.5/docs/src/async.rst +++ /dev/null @@ -1,57 +0,0 @@ - -.. _async: - -:c:type:`uv_async_t` --- Async handle -===================================== - -Async handles allow the user to "wakeup" the event loop and get a callback -called from another thread. - - -Data types ----------- - -.. c:type:: uv_async_t - - Async handle type. - -.. c:type:: void (*uv_async_cb)(uv_async_t* handle) - - Type definition for callback passed to :c:func:`uv_async_init`. - - -Public members -^^^^^^^^^^^^^^ - -N/A - -.. seealso:: The :c:type:`uv_handle_t` members also apply. - - -API ---- - -.. c:function:: int uv_async_init(uv_loop_t* loop, uv_async_t* async, uv_async_cb async_cb) - - Initialize the handle. A NULL callback is allowed. - - .. note:: - Unlike other handle initialization functions, it immediately starts the handle. - -.. c:function:: int uv_async_send(uv_async_t* async) - - Wakeup the event loop and call the async handle's callback. - - .. note:: - It's safe to call this function from any thread. The callback will be called on the - loop thread. - - .. warning:: - libuv will coalesce calls to :c:func:`uv_async_send`, that is, not every call to it will - yield an execution of the callback. For example: if :c:func:`uv_async_send` is called 5 - times in a row before the callback is called, the callback will only be called once. If - :c:func:`uv_async_send` is called again after the callback was called, it will be called - again. - -.. seealso:: - The :c:type:`uv_handle_t` API functions also apply. diff --git a/outside/libuv-v1.7.5/docs/src/check.rst b/outside/libuv-v1.7.5/docs/src/check.rst deleted file mode 100644 index 36c93cf03..000000000 --- a/outside/libuv-v1.7.5/docs/src/check.rst +++ /dev/null @@ -1,46 +0,0 @@ - -.. _check: - -:c:type:`uv_check_t` --- Check handle -===================================== - -Check handles will run the given callback once per loop iteration, right -after polling for i/o. - - -Data types ----------- - -.. c:type:: uv_check_t - - Check handle type. - -.. c:type:: void (*uv_check_cb)(uv_check_t* handle) - - Type definition for callback passed to :c:func:`uv_check_start`. - - -Public members -^^^^^^^^^^^^^^ - -N/A - -.. seealso:: The :c:type:`uv_handle_t` members also apply. - - -API ---- - -.. c:function:: int uv_check_init(uv_loop_t* loop, uv_check_t* check) - - Initialize the handle. - -.. c:function:: int uv_check_start(uv_check_t* check, uv_check_cb cb) - - Start the handle with the given callback. - -.. c:function:: int uv_check_stop(uv_check_t* check) - - Stop the handle, the callback will no longer be called. - -.. seealso:: The :c:type:`uv_handle_t` API functions also apply. diff --git a/outside/libuv-v1.7.5/docs/src/conf.py b/outside/libuv-v1.7.5/docs/src/conf.py deleted file mode 100644 index b9eaa1374..000000000 --- a/outside/libuv-v1.7.5/docs/src/conf.py +++ /dev/null @@ -1,348 +0,0 @@ -# -*- coding: utf-8 -*- -# -# libuv API documentation documentation build configuration file, created by -# sphinx-quickstart on Sun Jul 27 11:47:51 2014. -# -# This file is execfile()d with the current directory set to its -# containing dir. -# -# Note that not all possible configuration values are present in this -# autogenerated file. -# -# All configuration values have a default; values that are commented out -# serve to show the default. - -import os -import re -import sys - - -def get_libuv_version(): - with open('../../include/uv-version.h') as f: - data = f.read() - try: - m = re.search(r"""^#define UV_VERSION_MAJOR (\d)$""", data, re.MULTILINE) - major = int(m.group(1)) - m = re.search(r"""^#define UV_VERSION_MINOR (\d)$""", data, re.MULTILINE) - minor = int(m.group(1)) - m = re.search(r"""^#define UV_VERSION_PATCH (\d)$""", data, re.MULTILINE) - patch = int(m.group(1)) - m = re.search(r"""^#define UV_VERSION_IS_RELEASE (\d)$""", data, re.MULTILINE) - is_release = int(m.group(1)) - m = re.search(r"""^#define UV_VERSION_SUFFIX \"(\w*)\"$""", data, re.MULTILINE) - suffix = m.group(1) - return '%d.%d.%d%s' % (major, minor, patch, '-%s' % suffix if not is_release else '') - except Exception: - return 'unknown' - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -sys.path.insert(0, os.path.abspath('sphinx-plugins')) - -# -- General configuration ------------------------------------------------ - -# If your documentation needs a minimal Sphinx version, state it here. -#needs_sphinx = '1.0' - -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. -extensions = ['manpage'] - -# Add any paths that contain templates here, relative to this directory. -templates_path = ['templates'] - -# The suffix of source filenames. -source_suffix = '.rst' - -# The encoding of source files. -#source_encoding = 'utf-8-sig' - -# The master toctree document. -master_doc = 'index' - -# General information about the project. -project = u'libuv API documentation' -copyright = u'libuv contributors' - -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# -# The short X.Y version. -version = get_libuv_version() -# The full version, including alpha/beta/rc tags. -release = version - -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -#language = None - -# There are two options for replacing |today|: either, you set today to some -# non-false value, then it is used: -#today = '' -# Else, today_fmt is used as the format for a strftime call. -#today_fmt = '%B %d, %Y' - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -exclude_patterns = [] - -# The reST default role (used for this markup: `text`) to use for all -# documents. -#default_role = None - -# If true, '()' will be appended to :func: etc. cross-reference text. -#add_function_parentheses = True - -# If true, the current module name will be prepended to all description -# unit titles (such as .. function::). -#add_module_names = True - -# If true, sectionauthor and moduleauthor directives will be shown in the -# output. They are ignored by default. -#show_authors = False - -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' - -# A list of ignored prefixes for module index sorting. -#modindex_common_prefix = [] - -# If true, keep warnings as "system message" paragraphs in the built documents. -#keep_warnings = False - - -# -- Options for HTML output ---------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -html_theme = 'nature' - -# Theme options are theme-specific and customize the look and feel of a theme -# further. For a list of options available for each theme, see the -# documentation. -#html_theme_options = {} - -# Add any paths that contain custom themes here, relative to this directory. -#html_theme_path = [] - -# The name for this set of Sphinx documents. If None, it defaults to -# " v documentation". -html_title = 'libuv API documentation' - -# A shorter title for the navigation bar. Default is the same as html_title. -html_short_title = 'libuv %s API documentation' % version - -# The name of an image file (relative to this directory) to place at the top -# of the sidebar. -html_logo = 'static/logo.png' - -# The name of an image file (within the static path) to use as favicon of the -# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 -# pixels large. -html_favicon = 'static/favicon.ico' - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['static'] - -# Add any extra paths that contain custom files (such as robots.txt or -# .htaccess) here, relative to this directory. These files are copied -# directly to the root of the documentation. -#html_extra_path = [] - -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, -# using the given strftime format. -#html_last_updated_fmt = '%b %d, %Y' - -# If true, SmartyPants will be used to convert quotes and dashes to -# typographically correct entities. -#html_use_smartypants = True - -# Custom sidebar templates, maps document names to template names. -#html_sidebars = {} - -# Additional templates that should be rendered to pages, maps page names to -# template names. -#html_additional_pages = {} - -# If false, no module index is generated. -#html_domain_indices = True - -# If false, no index is generated. -#html_use_index = True - -# If true, the index is split into individual pages for each letter. -#html_split_index = False - -# If true, links to the reST sources are added to the pages. -#html_show_sourcelink = True - -# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. -#html_show_sphinx = True - -# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. -#html_show_copyright = True - -# If true, an OpenSearch description file will be output, and all pages will -# contain a tag referring to it. The value of this option must be the -# base URL from which the finished HTML is served. -#html_use_opensearch = '' - -# This is the file name suffix for HTML files (e.g. ".xhtml"). -#html_file_suffix = None - -# Output file base name for HTML help builder. -htmlhelp_basename = 'libuv' - - -# -- Options for LaTeX output --------------------------------------------- - -latex_elements = { -# The paper size ('letterpaper' or 'a4paper'). -#'papersize': 'letterpaper', - -# The font size ('10pt', '11pt' or '12pt'). -#'pointsize': '10pt', - -# Additional stuff for the LaTeX preamble. -#'preamble': '', -} - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, -# author, documentclass [howto, manual, or own class]). -latex_documents = [ - ('index', 'libuv.tex', u'libuv API documentation', - u'libuv contributors', 'manual'), -] - -# The name of an image file (relative to this directory) to place at the top of -# the title page. -#latex_logo = None - -# For "manual" documents, if this is true, then toplevel headings are parts, -# not chapters. -#latex_use_parts = False - -# If true, show page references after internal links. -#latex_show_pagerefs = False - -# If true, show URL addresses after external links. -#latex_show_urls = False - -# Documents to append as an appendix to all manuals. -#latex_appendices = [] - -# If false, no module index is generated. -#latex_domain_indices = True - - -# -- Options for manual page output --------------------------------------- - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [ - ('index', 'libuv', u'libuv API documentation', - [u'libuv contributors'], 1) -] - -# If true, show URL addresses after external links. -#man_show_urls = False - - -# -- Options for Texinfo output ------------------------------------------- - -# Grouping the document tree into Texinfo files. List of tuples -# (source start file, target name, title, author, -# dir menu entry, description, category) -texinfo_documents = [ - ('index', 'libuv', u'libuv API documentation', - u'libuv contributors', 'libuv', 'Cross-platform asynchronous I/O', - 'Miscellaneous'), -] - -# Documents to append as an appendix to all manuals. -#texinfo_appendices = [] - -# If false, no module index is generated. -#texinfo_domain_indices = True - -# How to display URL addresses: 'footnote', 'no', or 'inline'. -#texinfo_show_urls = 'footnote' - -# If true, do not generate a @detailmenu in the "Top" node's menu. -#texinfo_no_detailmenu = False - - -# -- Options for Epub output ---------------------------------------------- - -# Bibliographic Dublin Core info. -epub_title = u'libuv API documentation' -epub_author = u'libuv contributors' -epub_publisher = u'libuv contributors' -epub_copyright = u'2014, libuv contributors' - -# The basename for the epub file. It defaults to the project name. -epub_basename = u'libuv' - -# The HTML theme for the epub output. Since the default themes are not optimized -# for small screen space, using the same theme for HTML and epub output is -# usually not wise. This defaults to 'epub', a theme designed to save visual -# space. -#epub_theme = 'epub' - -# The language of the text. It defaults to the language option -# or en if the language is not set. -#epub_language = '' - -# The scheme of the identifier. Typical schemes are ISBN or URL. -#epub_scheme = '' - -# The unique identifier of the text. This can be a ISBN number -# or the project homepage. -#epub_identifier = '' - -# A unique identification for the text. -#epub_uid = '' - -# A tuple containing the cover image and cover page html template filenames. -#epub_cover = () - -# A sequence of (type, uri, title) tuples for the guide element of content.opf. -#epub_guide = () - -# HTML files that should be inserted before the pages created by sphinx. -# The format is a list of tuples containing the path and title. -#epub_pre_files = [] - -# HTML files shat should be inserted after the pages created by sphinx. -# The format is a list of tuples containing the path and title. -#epub_post_files = [] - -# A list of files that should not be packed into the epub file. -epub_exclude_files = ['search.html'] - -# The depth of the table of contents in toc.ncx. -#epub_tocdepth = 3 - -# Allow duplicate toc entries. -#epub_tocdup = True - -# Choose between 'default' and 'includehidden'. -#epub_tocscope = 'default' - -# Fix unsupported image types using the PIL. -#epub_fix_images = False - -# Scale large images. -#epub_max_image_width = 0 - -# How to display URL addresses: 'footnote', 'no', or 'inline'. -#epub_show_urls = 'inline' - -# If false, no index is generated. -#epub_use_index = True diff --git a/outside/libuv-v1.7.5/docs/src/design.rst b/outside/libuv-v1.7.5/docs/src/design.rst deleted file mode 100644 index 34c3cff68..000000000 --- a/outside/libuv-v1.7.5/docs/src/design.rst +++ /dev/null @@ -1,137 +0,0 @@ - -.. _design: - -Design overview -=============== - -libuv is cross-platform support library which was originally written for NodeJS. It's designed -around the event-driven asynchronous I/O model. - -The library provides much more than simply abstraction over different I/O polling mechanisms: -'handles' and 'streams' provide a high level abstraction for sockets and other entities; -cross-platform file I/O and threading functionality is also provided, amongst other things. - -Here is a diagram illustrating the different parts that compose libuv and what subsystem they -relate to: - -.. image:: static/architecture.png - :scale: 75% - :align: center - - -Handles and requests -^^^^^^^^^^^^^^^^^^^^ - -libuv provides users with 2 abstractions to work with, in combination with the event loop: -handles and requests. - -Handles represent long-lived objects capable of performing certain operations while active. Some -examples: a prepare handle gets its callback called once every loop iteration when active, and -a TCP server handle get its connection callback called every time there is a new connection. - -Requests represent (typically) short-lived operations. These operations can be performed over a -handle: write requests are used to write data on a handle; or standalone: getaddrinfo requests -don't need a handle they run directly on the loop. - - -The I/O loop -^^^^^^^^^^^^ - -The I/O (or event) loop is the central part of libuv. It establishes the content for all I/O -operations, and it's meant to be tied to a single thread. One can run multiple event loops -as long as each runs in a different thread. The libuv event loop (or any other API involving -the loop or handles, for that matter) **is not thread-safe** except where stated otherwise. - -The event loop follows the rather usual single threaded asynchronous I/O approach: all (network) -I/O is performed on non-blocking sockets which are polled using the best mechanism available -on the given platform: epoll on Linux, kqueue on OSX and other BSDs, event ports on SunOS and IOCP -on Windows. As part of a loop iteration the loop will block waiting for I/O activity on sockets -which have been added to the poller and callbacks will be fired indicating socket conditions -(readable, writable hangup) so handles can read, write or perform the desired I/O operation. - -In order to better understand how the event loop operates, the following diagram illustrates all -stages of a loop iteration: - -.. image:: static/loop_iteration.png - :scale: 75% - :align: center - - -#. The loop concept of 'now' is updated. The event loop caches the current time at the start of - the event loop tick in order to reduce the number of time-related system calls. - -#. If the loop is *alive* an iteration is started, otherwise the loop will exit immediately. So, - when is a loop considered to be *alive*? If a loop has active and ref'd handles, active - requests or closing handles it's considered to be *alive*. - -#. Due timers are run. All active timers scheduled for a time before the loop's concept of *now* - get their callbacks called. - -#. Pending callbacks are called. All I/O callbacks are called right after polling for I/O, for the - most part. There are cases, however, in which calling such a callback is deferred for the next - loop iteration. If the previous iteration deferred any I/O callback it will be run at this point. - -#. Idle handle callbacks are called. Despite the unfortunate name, idle handles are run on every - loop iteration, if they are active. - -#. Prepare handle callbacks are called. Prepare handles get their callbacks called right before - the loop will block for I/O. - -#. Poll timeout is calculated. Before blocking for I/O the loop calculates for how long it should - block. These are the rules when calculating the timeout: - - * If the loop was run with the ``UV_RUN_NOWAIT`` flag, the timeout is 0. - * If the loop is going to be stopped (:c:func:`uv_stop` was called), the timeout is 0. - * If there are no active handles or requests, the timeout is 0. - * If there are any idle handles active, the timeout is 0. - * If there are any handles pending to be closed, the timeout is 0. - * If none of the above cases was matched, the timeout of the closest timer is taken, or - if there are no active timers, infinity. - -#. The loop blocks for I/O. At this point the loop will block for I/O for the timeout calculated - on the previous step. All I/O related handles that were monitoring a given file descriptor - for a read or write operation get their callbacks called at this point. - -#. Check handle callbacks are called. Check handles get their callbacks called right after the - loop has blocked for I/O. Check handles are essentially the counterpart of prepare handles. - -#. Close callbacks are called. If a handle was closed by calling :c:func:`uv_close` it will - get the close callback called. - -#. Special case in case the loop was run with ``UV_RUN_ONCE``, as it implies forward progress. - It's possible that no I/O callbacks were fired after blocking for I/O, but some time has passed - so there might be timers which are due, those timers get their callbacks called. - -#. Iteration ends. If the loop was run with ``UV_RUN_NOWAIT`` or ``UV_RUN_ONCE`` modes the - iteration is ended and :c:func:`uv_run` will return. If the loop was run with ``UV_RUN_DEFAULT`` - it will continue from the start if it's still *alive*, otherwise it will also end. - - -.. important:: - libuv uses a thread pool to make asynchronous file I/O operations possible, but - network I/O is **always** performed in a single thread, each loop's thread. - -.. note:: - While the polling mechanism is different, libuv makes the execution model consistent - across Unix systems and Windows. - - -File I/O -^^^^^^^^ - -Unlike network I/O, there are no platform-specific file I/O primitives libuv could rely on, -so the current approach is to run blocking file I/O operations in a thread pool. - -For a thorough explanation of the cross-platform file I/O landscape, checkout -`this post `_. - -libuv currently uses a global thread pool on which all loops can queue work on. 3 types of -operations are currently run on this pool: - - * Filesystem operations - * DNS functions (getaddrinfo and getnameinfo) - * User specified code via :c:func:`uv_queue_work` - -.. warning:: - See the :c:ref:`threadpool` section for more details, but keep in mind the thread pool size - is quite limited. diff --git a/outside/libuv-v1.7.5/docs/src/dll.rst b/outside/libuv-v1.7.5/docs/src/dll.rst deleted file mode 100644 index fb13f9081..000000000 --- a/outside/libuv-v1.7.5/docs/src/dll.rst +++ /dev/null @@ -1,44 +0,0 @@ - -.. _dll: - -Shared library handling -======================= - -libuv provides cross platform utilities for loading shared libraries and -retrieving symbols from them, using the following API. - - -Data types ----------- - -.. c:type:: uv_lib_t - - Shared library data type. - - -Public members -^^^^^^^^^^^^^^ - -N/A - - -API ---- - -.. c:function:: int uv_dlopen(const char* filename, uv_lib_t* lib) - - Opens a shared library. The filename is in utf-8. Returns 0 on success and - -1 on error. Call :c:func:`uv_dlerror` to get the error message. - -.. c:function:: void uv_dlclose(uv_lib_t* lib) - - Close the shared library. - -.. c:function:: int uv_dlsym(uv_lib_t* lib, const char* name, void** ptr) - - Retrieves a data pointer from a dynamic library. It is legal for a symbol - to map to NULL. Returns 0 on success and -1 if the symbol was not found. - -.. c:function:: const char* uv_dlerror(const uv_lib_t* lib) - - Returns the last uv_dlopen() or uv_dlsym() error message. diff --git a/outside/libuv-v1.7.5/docs/src/dns.rst b/outside/libuv-v1.7.5/docs/src/dns.rst deleted file mode 100644 index 1d8815809..000000000 --- a/outside/libuv-v1.7.5/docs/src/dns.rst +++ /dev/null @@ -1,108 +0,0 @@ - -.. _dns: - -DNS utility functions -===================== - -libuv provides asynchronous variants of `getaddrinfo` and `getnameinfo`. - - -Data types ----------- - -.. c:type:: uv_getaddrinfo_t - - `getaddrinfo` request type. - -.. c:type:: void (*uv_getaddrinfo_cb)(uv_getaddrinfo_t* req, int status, struct addrinfo* res) - - Callback which will be called with the getaddrinfo request result once - complete. In case it was cancelled, `status` will have a value of - ``UV_ECANCELED``. - -.. c:type:: uv_getnameinfo_t - - `getnameinfo` request type. - -.. c:type:: void (*uv_getnameinfo_cb)(uv_getnameinfo_t* req, int status, const char* hostname, const char* service) - - Callback which will be called with the getnameinfo request result once - complete. In case it was cancelled, `status` will have a value of - ``UV_ECANCELED``. - - -Public members -^^^^^^^^^^^^^^ - -.. c:member:: uv_loop_t* uv_getaddrinfo_t.loop - - Loop that started this getaddrinfo request and where completion will be - reported. Readonly. - -.. c:member:: struct addrinfo* uv_getaddrinfo_t.addrinfo - - Pointer to a `struct addrinfo` containing the result. Must be freed by the user - with :c:func:`uv_freeaddrinfo`. - - .. versionchanged:: 1.3.0 the field is declared as public. - -.. c:member:: uv_loop_t* uv_getnameinfo_t.loop - - Loop that started this getnameinfo request and where completion will be - reported. Readonly. - -.. c:member:: char[NI_MAXHOST] uv_getnameinfo_t.host - - Char array containing the resulting host. It's null terminated. - - .. versionchanged:: 1.3.0 the field is declared as public. - -.. c:member:: char[NI_MAXSERV] uv_getnameinfo_t.service - - Char array containing the resulting service. It's null terminated. - - .. versionchanged:: 1.3.0 the field is declared as public. - -.. seealso:: The :c:type:`uv_req_t` members also apply. - - -API ---- - -.. c:function:: int uv_getaddrinfo(uv_loop_t* loop, uv_getaddrinfo_t* req, uv_getaddrinfo_cb getaddrinfo_cb, const char* node, const char* service, const struct addrinfo* hints) - - Asynchronous :man:`getaddrinfo(3)`. - - Either node or service may be NULL but not both. - - `hints` is a pointer to a struct addrinfo with additional address type - constraints, or NULL. Consult `man -s 3 getaddrinfo` for more details. - - Returns 0 on success or an error code < 0 on failure. If successful, the - callback will get called sometime in the future with the lookup result, - which is either: - - * status == 0, the res argument points to a valid `struct addrinfo`, or - * status < 0, the res argument is NULL. See the UV_EAI_* constants. - - Call :c:func:`uv_freeaddrinfo` to free the addrinfo structure. - - .. versionchanged:: 1.3.0 the callback parameter is now allowed to be NULL, - in which case the request will run **synchronously**. - -.. c:function:: void uv_freeaddrinfo(struct addrinfo* ai) - - Free the struct addrinfo. Passing NULL is allowed and is a no-op. - -.. c:function:: int uv_getnameinfo(uv_loop_t* loop, uv_getnameinfo_t* req, uv_getnameinfo_cb getnameinfo_cb, const struct sockaddr* addr, int flags) - - Asynchronous :man:`getnameinfo(3)`. - - Returns 0 on success or an error code < 0 on failure. If successful, the - callback will get called sometime in the future with the lookup result. - Consult `man -s 3 getnameinfo` for more details. - - .. versionchanged:: 1.3.0 the callback parameter is now allowed to be NULL, - in which case the request will run **synchronously**. - -.. seealso:: The :c:type:`uv_req_t` API functions also apply. diff --git a/outside/libuv-v1.7.5/docs/src/errors.rst b/outside/libuv-v1.7.5/docs/src/errors.rst deleted file mode 100644 index cec25f518..000000000 --- a/outside/libuv-v1.7.5/docs/src/errors.rst +++ /dev/null @@ -1,331 +0,0 @@ - -.. _errors: - -Error handling -============== - -In libuv errors are negative numbered constants. As a rule of thumb, whenever -there is a status parameter, or an API functions returns an integer, a negative -number will imply an error. - -.. note:: - Implementation detail: on Unix error codes are the negated `errno` (or `-errno`), while on - Windows they are defined by libuv to arbitrary negative numbers. - - -Error constants ---------------- - -.. c:macro:: UV_E2BIG - - argument list too long - -.. c:macro:: UV_EACCES - - permission denied - -.. c:macro:: UV_EADDRINUSE - - address already in use - -.. c:macro:: UV_EADDRNOTAVAIL - - address not available - -.. c:macro:: UV_EAFNOSUPPORT - - address family not supported - -.. c:macro:: UV_EAGAIN - - resource temporarily unavailable - -.. c:macro:: UV_EAI_ADDRFAMILY - - address family not supported - -.. c:macro:: UV_EAI_AGAIN - - temporary failure - -.. c:macro:: UV_EAI_BADFLAGS - - bad ai_flags value - -.. c:macro:: UV_EAI_BADHINTS - - invalid value for hints - -.. c:macro:: UV_EAI_CANCELED - - request canceled - -.. c:macro:: UV_EAI_FAIL - - permanent failure - -.. c:macro:: UV_EAI_FAMILY - - ai_family not supported - -.. c:macro:: UV_EAI_MEMORY - - out of memory - -.. c:macro:: UV_EAI_NODATA - - no address - -.. c:macro:: UV_EAI_NONAME - - unknown node or service - -.. c:macro:: UV_EAI_OVERFLOW - - argument buffer overflow - -.. c:macro:: UV_EAI_PROTOCOL - - resolved protocol is unknown - -.. c:macro:: UV_EAI_SERVICE - - service not available for socket type - -.. c:macro:: UV_EAI_SOCKTYPE - - socket type not supported - -.. c:macro:: UV_EALREADY - - connection already in progress - -.. c:macro:: UV_EBADF - - bad file descriptor - -.. c:macro:: UV_EBUSY - - resource busy or locked - -.. c:macro:: UV_ECANCELED - - operation canceled - -.. c:macro:: UV_ECHARSET - - invalid Unicode character - -.. c:macro:: UV_ECONNABORTED - - software caused connection abort - -.. c:macro:: UV_ECONNREFUSED - - connection refused - -.. c:macro:: UV_ECONNRESET - - connection reset by peer - -.. c:macro:: UV_EDESTADDRREQ - - destination address required - -.. c:macro:: UV_EEXIST - - file already exists - -.. c:macro:: UV_EFAULT - - bad address in system call argument - -.. c:macro:: UV_EFBIG - - file too large - -.. c:macro:: UV_EHOSTUNREACH - - host is unreachable - -.. c:macro:: UV_EINTR - - interrupted system call - -.. c:macro:: UV_EINVAL - - invalid argument - -.. c:macro:: UV_EIO - - i/o error - -.. c:macro:: UV_EISCONN - - socket is already connected - -.. c:macro:: UV_EISDIR - - illegal operation on a directory - -.. c:macro:: UV_ELOOP - - too many symbolic links encountered - -.. c:macro:: UV_EMFILE - - too many open files - -.. c:macro:: UV_EMSGSIZE - - message too long - -.. c:macro:: UV_ENAMETOOLONG - - name too long - -.. c:macro:: UV_ENETDOWN - - network is down - -.. c:macro:: UV_ENETUNREACH - - network is unreachable - -.. c:macro:: UV_ENFILE - - file table overflow - -.. c:macro:: UV_ENOBUFS - - no buffer space available - -.. c:macro:: UV_ENODEV - - no such device - -.. c:macro:: UV_ENOENT - - no such file or directory - -.. c:macro:: UV_ENOMEM - - not enough memory - -.. c:macro:: UV_ENONET - - machine is not on the network - -.. c:macro:: UV_ENOPROTOOPT - - protocol not available - -.. c:macro:: UV_ENOSPC - - no space left on device - -.. c:macro:: UV_ENOSYS - - function not implemented - -.. c:macro:: UV_ENOTCONN - - socket is not connected - -.. c:macro:: UV_ENOTDIR - - not a directory - -.. c:macro:: UV_ENOTEMPTY - - directory not empty - -.. c:macro:: UV_ENOTSOCK - - socket operation on non-socket - -.. c:macro:: UV_ENOTSUP - - operation not supported on socket - -.. c:macro:: UV_EPERM - - operation not permitted - -.. c:macro:: UV_EPIPE - - broken pipe - -.. c:macro:: UV_EPROTO - - protocol error - -.. c:macro:: UV_EPROTONOSUPPORT - - protocol not supported - -.. c:macro:: UV_EPROTOTYPE - - protocol wrong type for socket - -.. c:macro:: UV_ERANGE - - result too large - -.. c:macro:: UV_EROFS - - read-only file system - -.. c:macro:: UV_ESHUTDOWN - - cannot send after transport endpoint shutdown - -.. c:macro:: UV_ESPIPE - - invalid seek - -.. c:macro:: UV_ESRCH - - no such process - -.. c:macro:: UV_ETIMEDOUT - - connection timed out - -.. c:macro:: UV_ETXTBSY - - text file is busy - -.. c:macro:: UV_EXDEV - - cross-device link not permitted - -.. c:macro:: UV_UNKNOWN - - unknown error - -.. c:macro:: UV_EOF - - end of file - -.. c:macro:: UV_ENXIO - - no such device or address - -.. c:macro:: UV_EMLINK - - too many links - - -API ---- - -.. c:function:: const char* uv_strerror(int err) - - Returns the error message for the given error code. Leaks a few bytes - of memory when you call it with an unknown error code. - -.. c:function:: const char* uv_err_name(int err) - - Returns the error name for the given error code. Leaks a few bytes - of memory when you call it with an unknown error code. diff --git a/outside/libuv-v1.7.5/docs/src/fs.rst b/outside/libuv-v1.7.5/docs/src/fs.rst deleted file mode 100644 index 33c04406f..000000000 --- a/outside/libuv-v1.7.5/docs/src/fs.rst +++ /dev/null @@ -1,290 +0,0 @@ - -.. _fs: - -Filesystem operations -===================== - -libuv provides a wide variety of cross-platform sync and async filesystem -operations. All functions defined in this document take a callback, which is -allowed to be NULL. If the callback is NULL the request is completed synchronously, -otherwise it will be performed asynchronously. - -All file operations are run on the threadpool, see :ref:`threadpool` for information -on the threadpool size. - - -Data types ----------- - -.. c:type:: uv_fs_t - - Filesystem request type. - -.. c:type:: uv_timespec_t - - Portable equivalent of ``struct timespec``. - - :: - - typedef struct { - long tv_sec; - long tv_nsec; - } uv_timespec_t; - -.. c:type:: uv_stat_t - - Portable equivalent of ``struct stat``. - - :: - - typedef struct { - uint64_t st_dev; - uint64_t st_mode; - uint64_t st_nlink; - uint64_t st_uid; - uint64_t st_gid; - uint64_t st_rdev; - uint64_t st_ino; - uint64_t st_size; - uint64_t st_blksize; - uint64_t st_blocks; - uint64_t st_flags; - uint64_t st_gen; - uv_timespec_t st_atim; - uv_timespec_t st_mtim; - uv_timespec_t st_ctim; - uv_timespec_t st_birthtim; - } uv_stat_t; - -.. c:type:: uv_fs_type - - Filesystem request type. - - :: - - typedef enum { - UV_FS_UNKNOWN = -1, - UV_FS_CUSTOM, - UV_FS_OPEN, - UV_FS_CLOSE, - UV_FS_READ, - UV_FS_WRITE, - UV_FS_SENDFILE, - UV_FS_STAT, - UV_FS_LSTAT, - UV_FS_FSTAT, - UV_FS_FTRUNCATE, - UV_FS_UTIME, - UV_FS_FUTIME, - UV_FS_ACCESS, - UV_FS_CHMOD, - UV_FS_FCHMOD, - UV_FS_FSYNC, - UV_FS_FDATASYNC, - UV_FS_UNLINK, - UV_FS_RMDIR, - UV_FS_MKDIR, - UV_FS_MKDTEMP, - UV_FS_RENAME, - UV_FS_SCANDIR, - UV_FS_LINK, - UV_FS_SYMLINK, - UV_FS_READLINK, - UV_FS_CHOWN, - UV_FS_FCHOWN - } uv_fs_type; - -.. c:type:: uv_dirent_t - - Cross platform (reduced) equivalent of ``struct dirent``. - Used in :c:func:`uv_fs_scandir_next`. - - :: - - typedef enum { - UV_DIRENT_UNKNOWN, - UV_DIRENT_FILE, - UV_DIRENT_DIR, - UV_DIRENT_LINK, - UV_DIRENT_FIFO, - UV_DIRENT_SOCKET, - UV_DIRENT_CHAR, - UV_DIRENT_BLOCK - } uv_dirent_type_t; - - typedef struct uv_dirent_s { - const char* name; - uv_dirent_type_t type; - } uv_dirent_t; - - -Public members -^^^^^^^^^^^^^^ - -.. c:member:: uv_loop_t* uv_fs_t.loop - - Loop that started this request and where completion will be reported. - Readonly. - -.. c:member:: uv_fs_type uv_fs_t.fs_type - - FS request type. - -.. c:member:: const char* uv_fs_t.path - - Path affecting the request. - -.. c:member:: ssize_t uv_fs_t.result - - Result of the request. < 0 means error, success otherwise. On requests such - as :c:func:`uv_fs_read` or :c:func:`uv_fs_write` it indicates the amount of - data that was read or written, respectively. - -.. c:member:: uv_stat_t uv_fs_t.statbuf - - Stores the result of :c:func:`uv_fs_stat` and other stat requests. - -.. c:member:: void* uv_fs_t.ptr - - Stores the result of :c:func:`uv_fs_readlink` and serves as an alias to - `statbuf`. - -.. seealso:: The :c:type:`uv_req_t` members also apply. - - -API ---- - -.. c:function:: void uv_fs_req_cleanup(uv_fs_t* req) - - Cleanup request. Must be called after a request is finished to deallocate - any memory libuv might have allocated. - -.. c:function:: int uv_fs_close(uv_loop_t* loop, uv_fs_t* req, uv_file file, uv_fs_cb cb) - - Equivalent to :man:`close(2)`. - -.. c:function:: int uv_fs_open(uv_loop_t* loop, uv_fs_t* req, const char* path, int flags, int mode, uv_fs_cb cb) - - Equivalent to :man:`open(2)`. - - .. note:: - On Windows libuv uses `CreateFileW` and thus the file is always opened - in binary mode. Because of this the O_BINARY and O_TEXT flags are not - supported. - -.. c:function:: int uv_fs_read(uv_loop_t* loop, uv_fs_t* req, uv_file file, const uv_buf_t bufs[], unsigned int nbufs, int64_t offset, uv_fs_cb cb) - - Equivalent to :man:`preadv(2)`. - -.. c:function:: int uv_fs_unlink(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb) - - Equivalent to :man:`unlink(2)`. - -.. c:function:: int uv_fs_write(uv_loop_t* loop, uv_fs_t* req, uv_file file, const uv_buf_t bufs[], unsigned int nbufs, int64_t offset, uv_fs_cb cb) - - Equivalent to :man:`pwritev(2)`. - -.. c:function:: int uv_fs_mkdir(uv_loop_t* loop, uv_fs_t* req, const char* path, int mode, uv_fs_cb cb) - - Equivalent to :man:`mkdir(2)`. - - .. note:: - `mode` is currently not implemented on Windows. - -.. c:function:: int uv_fs_mkdtemp(uv_loop_t* loop, uv_fs_t* req, const char* tpl, uv_fs_cb cb) - - Equivalent to :man:`mkdtemp(3)`. - - .. note:: - The result can be found as a null terminated string at `req->path`. - -.. c:function:: int uv_fs_rmdir(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb) - - Equivalent to :man:`rmdir(2)`. - -.. c:function:: int uv_fs_scandir(uv_loop_t* loop, uv_fs_t* req, const char* path, int flags, uv_fs_cb cb) -.. c:function:: int uv_fs_scandir_next(uv_fs_t* req, uv_dirent_t* ent) - - Equivalent to :man:`scandir(3)`, with a slightly different API. Once the callback - for the request is called, the user can use :c:func:`uv_fs_scandir_next` to - get `ent` populated with the next directory entry data. When there are no - more entries ``UV_EOF`` will be returned. - - .. note:: - Unlike `scandir(3)`, this function does not return the "." and ".." entries. - - .. note:: - On Linux, getting the type of an entry is only supported by some filesystems (btrfs, ext2, - ext3 and ext4 at the time of this writing), check the :man:`getdents(2)` man page. - -.. c:function:: int uv_fs_stat(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb) -.. c:function:: int uv_fs_fstat(uv_loop_t* loop, uv_fs_t* req, uv_file file, uv_fs_cb cb) -.. c:function:: int uv_fs_lstat(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb) - - Equivalent to :man:`stat(2)`, :man:`fstat(2)` and :man:`fstat(2)` respectively. - -.. c:function:: int uv_fs_rename(uv_loop_t* loop, uv_fs_t* req, const char* path, const char* new_path, uv_fs_cb cb) - - Equivalent to :man:`rename(2)`. - -.. c:function:: int uv_fs_fsync(uv_loop_t* loop, uv_fs_t* req, uv_file file, uv_fs_cb cb) - - Equivalent to :man:`fsync(2)`. - -.. c:function:: int uv_fs_fdatasync(uv_loop_t* loop, uv_fs_t* req, uv_file file, uv_fs_cb cb) - - Equivalent to :man:`fdatasync(2)`. - -.. c:function:: int uv_fs_ftruncate(uv_loop_t* loop, uv_fs_t* req, uv_file file, int64_t offset, uv_fs_cb cb) - - Equivalent to :man:`ftruncate(2)`. - -.. c:function:: int uv_fs_sendfile(uv_loop_t* loop, uv_fs_t* req, uv_file out_fd, uv_file in_fd, int64_t in_offset, size_t length, uv_fs_cb cb) - - Limited equivalent to :man:`sendfile(2)`. - -.. c:function:: int uv_fs_access(uv_loop_t* loop, uv_fs_t* req, const char* path, int mode, uv_fs_cb cb) - - Equivalent to :man:`access(2)` on Unix. Windows uses ``GetFileAttributesW()``. - -.. c:function:: int uv_fs_chmod(uv_loop_t* loop, uv_fs_t* req, const char* path, int mode, uv_fs_cb cb) -.. c:function:: int uv_fs_fchmod(uv_loop_t* loop, uv_fs_t* req, uv_file file, int mode, uv_fs_cb cb) - - Equivalent to :man:`chmod(2)` and :man:`fchmod(2)` respectively. - -.. c:function:: int uv_fs_utime(uv_loop_t* loop, uv_fs_t* req, const char* path, double atime, double mtime, uv_fs_cb cb) -.. c:function:: int uv_fs_futime(uv_loop_t* loop, uv_fs_t* req, uv_file file, double atime, double mtime, uv_fs_cb cb) - - Equivalent to :man:`utime(2)` and :man:`futime(2)` respectively. - -.. c:function:: int uv_fs_link(uv_loop_t* loop, uv_fs_t* req, const char* path, const char* new_path, uv_fs_cb cb) - - Equivalent to :man:`link(2)`. - -.. c:function:: int uv_fs_symlink(uv_loop_t* loop, uv_fs_t* req, const char* path, const char* new_path, int flags, uv_fs_cb cb) - - Equivalent to :man:`symlink(2)`. - - .. note:: - On Windows the `flags` parameter can be specified to control how the symlink will - be created: - - * ``UV_FS_SYMLINK_DIR``: indicates that `path` points to a directory. - - * ``UV_FS_SYMLINK_JUNCTION``: request that the symlink is created - using junction points. - -.. c:function:: int uv_fs_readlink(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb) - - Equivalent to :man:`readlink(2)`. - -.. c:function:: int uv_fs_chown(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_uid_t uid, uv_gid_t gid, uv_fs_cb cb) -.. c:function:: int uv_fs_fchown(uv_loop_t* loop, uv_fs_t* req, uv_file file, uv_uid_t uid, uv_gid_t gid, uv_fs_cb cb) - - Equivalent to :man:`chown(2)` and :man:`fchown(2)` respectively. - - .. note:: - These functions are not implemented on Windows. - -.. seealso:: The :c:type:`uv_req_t` API functions also apply. diff --git a/outside/libuv-v1.7.5/docs/src/fs_event.rst b/outside/libuv-v1.7.5/docs/src/fs_event.rst deleted file mode 100644 index c2d7f5202..000000000 --- a/outside/libuv-v1.7.5/docs/src/fs_event.rst +++ /dev/null @@ -1,108 +0,0 @@ - -.. _fs_event: - -:c:type:`uv_fs_event_t` --- FS Event handle -=========================================== - -FS Event handles allow the user to monitor a given path for changes, for example, -if the file was renamed or there was a generic change in it. This handle uses -the best backend for the job on each platform. - - -Data types ----------- - -.. c:type:: uv_fs_event_t - - FS Event handle type. - -.. c:type:: void (*uv_fs_event_cb)(uv_fs_event_t* handle, const char* filename, int events, int status) - - Callback passed to :c:func:`uv_fs_event_start` which will be called repeatedly - after the handle is started. If the handle was started with a directory the - `filename` parameter will be a relative path to a file contained in the directory. - The `events` parameter is an ORed mask of :c:type:`uv_fs_event` elements. - -.. c:type:: uv_fs_event - - Event types that :c:type:`uv_fs_event_t` handles monitor. - - :: - - enum uv_fs_event { - UV_RENAME = 1, - UV_CHANGE = 2 - }; - -.. c:type:: uv_fs_event_flags - - Flags that can be passed to :c:func:`uv_fs_event_start` to control its - behavior. - - :: - - enum uv_fs_event_flags { - /* - * By default, if the fs event watcher is given a directory name, we will - * watch for all events in that directory. This flags overrides this behavior - * and makes fs_event report only changes to the directory entry itself. This - * flag does not affect individual files watched. - * This flag is currently not implemented yet on any backend. - */ - UV_FS_EVENT_WATCH_ENTRY = 1, - /* - * By default uv_fs_event will try to use a kernel interface such as inotify - * or kqueue to detect events. This may not work on remote filesystems such - * as NFS mounts. This flag makes fs_event fall back to calling stat() on a - * regular interval. - * This flag is currently not implemented yet on any backend. - */ - UV_FS_EVENT_STAT = 2, - /* - * By default, event watcher, when watching directory, is not registering - * (is ignoring) changes in it's subdirectories. - * This flag will override this behaviour on platforms that support it. - */ - UV_FS_EVENT_RECURSIVE = 4 - }; - - -Public members -^^^^^^^^^^^^^^ - -N/A - -.. seealso:: The :c:type:`uv_handle_t` members also apply. - - -API ---- - -.. c:function:: int uv_fs_event_init(uv_loop_t* loop, uv_fs_event_t* handle) - - Initialize the handle. - -.. c:function:: int uv_fs_event_start(uv_fs_event_t* handle, uv_fs_event_cb cb, const char* path, unsigned int flags) - - Start the handle with the given callback, which will watch the specified - `path` for changes. `flags` can be an ORed mask of :c:type:`uv_fs_event_flags`. - - .. note:: Currently the only supported flag is ``UV_FS_EVENT_RECURSIVE`` and - only on OSX and Windows. - -.. c:function:: int uv_fs_event_stop(uv_fs_event_t* handle) - - Stop the handle, the callback will no longer be called. - -.. c:function:: int uv_fs_event_getpath(uv_fs_event_t* handle, char* buffer, size_t* size) - - Get the path being monitored by the handle. The buffer must be preallocated - by the user. Returns 0 on success or an error code < 0 in case of failure. - On success, `buffer` will contain the path and `size` its length. If the buffer - is not big enough UV_ENOBUFS will be returned and len will be set to the - required size. - - .. versionchanged:: 1.3.0 the returned length no longer includes the terminating null byte, - and the buffer is not null terminated. - -.. seealso:: The :c:type:`uv_handle_t` API functions also apply. diff --git a/outside/libuv-v1.7.5/docs/src/fs_poll.rst b/outside/libuv-v1.7.5/docs/src/fs_poll.rst deleted file mode 100644 index 4efb2440e..000000000 --- a/outside/libuv-v1.7.5/docs/src/fs_poll.rst +++ /dev/null @@ -1,72 +0,0 @@ - -.. _fs_poll: - -:c:type:`uv_fs_poll_t` --- FS Poll handle -========================================= - -FS Poll handles allow the user to monitor a given path for changes. Unlike -:c:type:`uv_fs_event_t`, fs poll handles use `stat` to detect when a file has -changed so they can work on file systems where fs event handles can't. - - -Data types ----------- - -.. c:type:: uv_fs_poll_t - - FS Poll handle type. - -.. c:type:: void (*uv_fs_poll_cb)(uv_fs_poll_t* handle, int status, const uv_stat_t* prev, const uv_stat_t* curr) - - Callback passed to :c:func:`uv_fs_poll_start` which will be called repeatedly - after the handle is started, when any change happens to the monitored path. - - The callback is invoked with `status < 0` if `path` does not exist - or is inaccessible. The watcher is *not* stopped but your callback is - not called again until something changes (e.g. when the file is created - or the error reason changes). - - When `status == 0`, the callback receives pointers to the old and new - :c:type:`uv_stat_t` structs. They are valid for the duration of the - callback only. - - -Public members -^^^^^^^^^^^^^^ - -N/A - -.. seealso:: The :c:type:`uv_handle_t` members also apply. - - -API ---- - -.. c:function:: int uv_fs_poll_init(uv_loop_t* loop, uv_fs_poll_t* handle) - - Initialize the handle. - -.. c:function:: int uv_fs_poll_start(uv_fs_poll_t* handle, uv_fs_poll_cb poll_cb, const char* path, unsigned int interval) - - Check the file at `path` for changes every `interval` milliseconds. - - .. note:: - For maximum portability, use multi-second intervals. Sub-second intervals will not detect - all changes on many file systems. - -.. c:function:: int uv_fs_poll_stop(uv_fs_poll_t* handle) - - Stop the handle, the callback will no longer be called. - -.. c:function:: int uv_fs_poll_getpath(uv_fs_poll_t* handle, char* buffer, size_t* size) - - Get the path being monitored by the handle. The buffer must be preallocated - by the user. Returns 0 on success or an error code < 0 in case of failure. - On success, `buffer` will contain the path and `size` its length. If the buffer - is not big enough UV_ENOBUFS will be returned and len will be set to the - required size. - - .. versionchanged:: 1.3.0 the returned length no longer includes the terminating null byte, - and the buffer is not null terminated. - -.. seealso:: The :c:type:`uv_handle_t` API functions also apply. diff --git a/outside/libuv-v1.7.5/docs/src/handle.rst b/outside/libuv-v1.7.5/docs/src/handle.rst deleted file mode 100644 index 6ba597a21..000000000 --- a/outside/libuv-v1.7.5/docs/src/handle.rst +++ /dev/null @@ -1,181 +0,0 @@ - -.. _handle: - -:c:type:`uv_handle_t` --- Base handle -===================================== - -`uv_handle_t` is the base type for all libuv handle types. - -Structures are aligned so that any libuv handle can be cast to `uv_handle_t`. -All API functions defined here work with any handle type. - - -Data types ----------- - -.. c:type:: uv_handle_t - - The base libuv handle type. - -.. c:type:: uv_any_handle - - Union of all handle types. - -.. c:type:: void (*uv_alloc_cb)(uv_handle_t* handle, size_t suggested_size, uv_buf_t* buf) - - Type definition for callback passed to :c:func:`uv_read_start` and - :c:func:`uv_udp_recv_start`. The user must fill the supplied :c:type:`uv_buf_t` - structure with whatever size, as long as it's > 0. A suggested size (65536 at the moment) - is provided, but it doesn't need to be honored. Setting the buffer's length to 0 - will trigger a ``UV_ENOBUFS`` error in the :c:type:`uv_udp_recv_cb` or - :c:type:`uv_read_cb` callback. - -.. c:type:: void (*uv_close_cb)(uv_handle_t* handle) - - Type definition for callback passed to :c:func:`uv_close`. - - -Public members -^^^^^^^^^^^^^^ - -.. c:member:: uv_loop_t* uv_handle_t.loop - - Pointer to the :c:type:`uv_loop_t` where the handle is running on. Readonly. - -.. c:member:: void* uv_handle_t.data - - Space for user-defined arbitrary data. libuv does not use this field. - - -API ---- - -.. c:function:: int uv_is_active(const uv_handle_t* handle) - - Returns non-zero if the handle is active, zero if it's inactive. What - "active" means depends on the type of handle: - - - A uv_async_t handle is always active and cannot be deactivated, except - by closing it with uv_close(). - - - A uv_pipe_t, uv_tcp_t, uv_udp_t, etc. handle - basically any handle that - deals with i/o - is active when it is doing something that involves i/o, - like reading, writing, connecting, accepting new connections, etc. - - - A uv_check_t, uv_idle_t, uv_timer_t, etc. handle is active when it has - been started with a call to uv_check_start(), uv_idle_start(), etc. - - Rule of thumb: if a handle of type `uv_foo_t` has a `uv_foo_start()` - function, then it's active from the moment that function is called. - Likewise, `uv_foo_stop()` deactivates the handle again. - -.. c:function:: int uv_is_closing(const uv_handle_t* handle) - - Returns non-zero if the handle is closing or closed, zero otherwise. - - .. note:: - This function should only be used between the initialization of the handle and the - arrival of the close callback. - -.. c:function:: void uv_close(uv_handle_t* handle, uv_close_cb close_cb) - - Request handle to be closed. `close_cb` will be called asynchronously after - this call. This MUST be called on each handle before memory is released. - - Handles that wrap file descriptors are closed immediately but - `close_cb` will still be deferred to the next iteration of the event loop. - It gives you a chance to free up any resources associated with the handle. - - In-progress requests, like uv_connect_t or uv_write_t, are cancelled and - have their callbacks called asynchronously with status=UV_ECANCELED. - -.. c:function:: void uv_ref(uv_handle_t* handle) - - Reference the given handle. References are idempotent, that is, if a handle - is already referenced calling this function again will have no effect. - - See :ref:`refcount`. - -.. c:function:: void uv_unref(uv_handle_t* handle) - - Un-reference the given handle. References are idempotent, that is, if a handle - is not referenced calling this function again will have no effect. - - See :ref:`refcount`. - -.. c:function:: int uv_has_ref(const uv_handle_t* handle) - - Returns non-zero if the handle referenced, zero otherwise. - - See :ref:`refcount`. - -.. c:function:: size_t uv_handle_size(uv_handle_type type) - - Returns the size of the given handle type. Useful for FFI binding writers - who don't want to know the structure layout. - - -Miscellaneous API functions ---------------------------- - -The following API functions take a :c:type:`uv_handle_t` argument but they work -just for some handle types. - -.. c:function:: int uv_send_buffer_size(uv_handle_t* handle, int* value) - - Gets or sets the size of the send buffer that the operating - system uses for the socket. - - If `*value` == 0, it will return the current send buffer size, - otherwise it will use `*value` to set the new send buffer size. - - This function works for TCP, pipe and UDP handles on Unix and for TCP and - UDP handles on Windows. - - .. note:: - Linux will set double the size and return double the size of the original set value. - -.. c:function:: int uv_recv_buffer_size(uv_handle_t* handle, int* value) - - Gets or sets the size of the receive buffer that the operating - system uses for the socket. - - If `*value` == 0, it will return the current receive buffer size, - otherwise it will use `*value` to set the new receive buffer size. - - This function works for TCP, pipe and UDP handles on Unix and for TCP and - UDP handles on Windows. - - .. note:: - Linux will set double the size and return double the size of the original set value. - -.. c:function:: int uv_fileno(const uv_handle_t* handle, uv_os_fd_t* fd) - - Gets the platform dependent file descriptor equivalent. - - The following handles are supported: TCP, pipes, TTY, UDP and poll. Passing - any other handle type will fail with `UV_EINVAL`. - - If a handle doesn't have an attached file descriptor yet or the handle - itself has been closed, this function will return `UV_EBADF`. - - .. warning:: - Be very careful when using this function. libuv assumes it's in control of the file - descriptor so any change to it may lead to malfunction. - - -.. _refcount: - -Reference counting ------------------- - -The libuv event loop (if run in the default mode) will run until there are no -active `and` referenced handles left. The user can force the loop to exit early -by unreferencing handles which are active, for example by calling :c:func:`uv_unref` -after calling :c:func:`uv_timer_start`. - -A handle can be referenced or unreferenced, the refcounting scheme doesn't use -a counter, so both operations are idempotent. - -All handles are referenced when active by default, see :c:func:`uv_is_active` -for a more detailed explanation on what being `active` involves. diff --git a/outside/libuv-v1.7.5/docs/src/idle.rst b/outside/libuv-v1.7.5/docs/src/idle.rst deleted file mode 100644 index 1f51c4a19..000000000 --- a/outside/libuv-v1.7.5/docs/src/idle.rst +++ /dev/null @@ -1,54 +0,0 @@ - -.. _idle: - -:c:type:`uv_idle_t` --- Idle handle -=================================== - -Idle handles will run the given callback once per loop iteration, right -before the :c:type:`uv_prepare_t` handles. - -.. note:: - The notable difference with prepare handles is that when there are active idle handles, - the loop will perform a zero timeout poll instead of blocking for i/o. - -.. warning:: - Despite the name, idle handles will get their callbacks called on every loop iteration, - not when the loop is actually "idle". - - -Data types ----------- - -.. c:type:: uv_idle_t - - Idle handle type. - -.. c:type:: void (*uv_idle_cb)(uv_idle_t* handle) - - Type definition for callback passed to :c:func:`uv_idle_start`. - - -Public members -^^^^^^^^^^^^^^ - -N/A - -.. seealso:: The :c:type:`uv_handle_t` members also apply. - - -API ---- - -.. c:function:: int uv_idle_init(uv_loop_t* loop, uv_idle_t* idle) - - Initialize the handle. - -.. c:function:: int uv_idle_start(uv_idle_t* idle, uv_idle_cb cb) - - Start the handle with the given callback. - -.. c:function:: int uv_idle_stop(uv_idle_t* idle) - - Stop the handle, the callback will no longer be called. - -.. seealso:: The :c:type:`uv_handle_t` API functions also apply. diff --git a/outside/libuv-v1.7.5/docs/src/index.rst b/outside/libuv-v1.7.5/docs/src/index.rst deleted file mode 100644 index fa89c4bff..000000000 --- a/outside/libuv-v1.7.5/docs/src/index.rst +++ /dev/null @@ -1,95 +0,0 @@ - -Welcome to the libuv API documentation -====================================== - -Overview --------- - -libuv is a multi-platform support library with a focus on asynchronous I/O. It -was primarily developed for use by `Node.js`_, but it's also used by `Luvit`_, -`Julia`_, `pyuv`_, and `others`_. - -.. note:: - In case you find errors in this documentation you can help by sending - `pull requests `_! - -.. _Node.js: http://nodejs.org -.. _Luvit: http://luvit.io -.. _Julia: http://julialang.org -.. _pyuv: https://github.com/saghul/pyuv -.. _others: https://github.com/libuv/libuv/wiki/Projects-that-use-libuv - - -Features --------- - -* Full-featured event loop backed by epoll, kqueue, IOCP, event ports. -* Asynchronous TCP and UDP sockets -* Asynchronous DNS resolution -* Asynchronous file and file system operations -* File system events -* ANSI escape code controlled TTY -* IPC with socket sharing, using Unix domain sockets or named pipes (Windows) -* Child processes -* Thread pool -* Signal handling -* High resolution clock -* Threading and synchronization primitives - - -Downloads ---------- - -libuv can be downloaded from `here `_. - - -Installation ------------- - -Installation instructions can be found on `the README `_. - - -Upgrading ---------- - -Migration guides for different libuv versions, starting with 1.0. - -.. toctree:: - :maxdepth: 1 - - migration_010_100 - - -Documentation -------------- - -.. toctree:: - :maxdepth: 1 - - design - errors - version - loop - handle - request - timer - prepare - check - idle - async - poll - signal - process - stream - tcp - pipe - tty - udp - fs_event - fs_poll - fs - threadpool - dns - dll - threading - misc diff --git a/outside/libuv-v1.7.5/docs/src/loop.rst b/outside/libuv-v1.7.5/docs/src/loop.rst deleted file mode 100644 index 2a01d7963..000000000 --- a/outside/libuv-v1.7.5/docs/src/loop.rst +++ /dev/null @@ -1,166 +0,0 @@ - -.. _loop: - -:c:type:`uv_loop_t` --- Event loop -================================== - -The event loop is the central part of libuv's functionality. It takes care -of polling for i/o and scheduling callbacks to be run based on different sources -of events. - - -Data types ----------- - -.. c:type:: uv_loop_t - - Loop data type. - -.. c:type:: uv_run_mode - - Mode used to run the loop with :c:func:`uv_run`. - - :: - - typedef enum { - UV_RUN_DEFAULT = 0, - UV_RUN_ONCE, - UV_RUN_NOWAIT - } uv_run_mode; - -.. c:type:: void (*uv_walk_cb)(uv_handle_t* handle, void* arg) - - Type definition for callback passed to :c:func:`uv_walk`. - - -Public members -^^^^^^^^^^^^^^ - -.. c:member:: void* uv_loop_t.data - - Space for user-defined arbitrary data. libuv does not use this field. libuv does, however, - initialize it to NULL in :c:func:`uv_loop_init`, and it poisons the value (on debug builds) - on :c:func:`uv_loop_close`. - - -API ---- - -.. c:function:: int uv_loop_init(uv_loop_t* loop) - - Initializes the given `uv_loop_t` structure. - -.. c:function:: int uv_loop_configure(uv_loop_t* loop, uv_loop_option option, ...) - - .. versionadded:: 1.0.2 - - Set additional loop options. You should normally call this before the - first call to :c:func:`uv_run` unless mentioned otherwise. - - Returns 0 on success or a UV_E* error code on failure. Be prepared to - handle UV_ENOSYS; it means the loop option is not supported by the platform. - - Supported options: - - - UV_LOOP_BLOCK_SIGNAL: Block a signal when polling for new events. The - second argument to :c:func:`uv_loop_configure` is the signal number. - - This operation is currently only implemented for SIGPROF signals, - to suppress unnecessary wakeups when using a sampling profiler. - Requesting other signals will fail with UV_EINVAL. - -.. c:function:: int uv_loop_close(uv_loop_t* loop) - - Closes all internal loop resources. This function must only be called once - the loop has finished its execution or it will return UV_EBUSY. After this - function returns the user shall free the memory allocated for the loop. - -.. c:function:: uv_loop_t* uv_default_loop(void) - - Returns the initialized default loop. It may return NULL in case of - allocation failure. - - This function is just a convenient way for having a global loop throughout - an application, the default loop is in no way different than the ones - initialized with :c:func:`uv_loop_init`. As such, the default loop can (and - should) be closed with :c:func:`uv_loop_close` so the resources associated - with it are freed. - -.. c:function:: int uv_run(uv_loop_t* loop, uv_run_mode mode) - - This function runs the event loop. It will act differently depending on the - specified mode: - - - UV_RUN_DEFAULT: Runs the event loop until there are no more active and - referenced handles or requests. Returns non-zero if :c:func:`uv_stop` - was called and there are still active handles or requests. Returns - zero in all other cases. - - UV_RUN_ONCE: Poll for i/o once. Note that this function blocks if - there are no pending callbacks. Returns zero when done (no active handles - or requests left), or non-zero if more callbacks are expected (meaning - you should run the event loop again sometime in the future). - - UV_RUN_NOWAIT: Poll for i/o once but don't block if there are no - pending callbacks. Returns zero if done (no active handles - or requests left), or non-zero if more callbacks are expected (meaning - you should run the event loop again sometime in the future). - -.. c:function:: int uv_loop_alive(const uv_loop_t* loop) - - Returns non-zero if there are active handles or request in the loop. - -.. c:function:: void uv_stop(uv_loop_t* loop) - - Stop the event loop, causing :c:func:`uv_run` to end as soon as - possible. This will happen not sooner than the next loop iteration. - If this function was called before blocking for i/o, the loop won't block - for i/o on this iteration. - -.. c:function:: size_t uv_loop_size(void) - - Returns the size of the `uv_loop_t` structure. Useful for FFI binding - writers who don't want to know the structure layout. - -.. c:function:: int uv_backend_fd(const uv_loop_t* loop) - - Get backend file descriptor. Only kqueue, epoll and event ports are - supported. - - This can be used in conjunction with `uv_run(loop, UV_RUN_NOWAIT)` to - poll in one thread and run the event loop's callbacks in another see - test/test-embed.c for an example. - - .. note:: - Embedding a kqueue fd in another kqueue pollset doesn't work on all platforms. It's not - an error to add the fd but it never generates events. - -.. c:function:: int uv_backend_timeout(const uv_loop_t* loop) - - Get the poll timeout. The return value is in milliseconds, or -1 for no - timeout. - -.. c:function:: uint64_t uv_now(const uv_loop_t* loop) - - Return the current timestamp in milliseconds. The timestamp is cached at - the start of the event loop tick, see :c:func:`uv_update_time` for details - and rationale. - - The timestamp increases monotonically from some arbitrary point in time. - Don't make assumptions about the starting point, you will only get - disappointed. - - .. note:: - Use :c:func:`uv_hrtime` if you need sub-millisecond granularity. - -.. c:function:: void uv_update_time(uv_loop_t* loop) - - Update the event loop's concept of "now". Libuv caches the current time - at the start of the event loop tick in order to reduce the number of - time-related system calls. - - You won't normally need to call this function unless you have callbacks - that block the event loop for longer periods of time, where "longer" is - somewhat subjective but probably on the order of a millisecond or more. - -.. c:function:: void uv_walk(uv_loop_t* loop, uv_walk_cb walk_cb, void* arg) - - Walk the list of handles: `walk_cb` will be executed with the given `arg`. diff --git a/outside/libuv-v1.7.5/docs/src/migration_010_100.rst b/outside/libuv-v1.7.5/docs/src/migration_010_100.rst deleted file mode 100644 index bb6ac1a80..000000000 --- a/outside/libuv-v1.7.5/docs/src/migration_010_100.rst +++ /dev/null @@ -1,244 +0,0 @@ - -.. _migration_010_100: - -libuv 0.10 -> 1.0.0 migration guide -=================================== - -Some APIs changed quite a bit throughout the 1.0.0 development process. Here -is a migration guide for the most significant changes that happened after 0.10 -was released. - - -Loop initialization and closing -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -In libuv 0.10 (and previous versions), loops were created with `uv_loop_new`, which -allocated memory for a new loop and initialized it; and destroyed with `uv_loop_delete`, -which destroyed the loop and freed the memory. Starting with 1.0, those are deprecated -and the user is responsible for allocating the memory and then initializing the loop. - -libuv 0.10 - -:: - - uv_loop_t* loop = uv_loop_new(); - ... - uv_loop_delete(loop); - -libuv 1.0 - -:: - - uv_loop_t* loop = malloc(sizeof *loop); - uv_loop_init(loop); - ... - uv_loop_close(loop); - free(loop); - -.. note:: - Error handling was omitted for brevity. Check the documentation for :c:func:`uv_loop_init` - and :c:func:`uv_loop_close`. - - -Error handling -~~~~~~~~~~~~~~ - -Error handling had a major overhaul in libuv 1.0. In general, functions and status parameters -would get 0 for success and -1 for failure on libuv 0.10, and the user had to use `uv_last_error` -to fetch the error code, which was a positive number. - -In 1.0, functions and status parameters contain the actual error code, which is 0 for success, or -a negative number in case of error. - -libuv 0.10 - -:: - - ... assume 'server' is a TCP server which is already listening - r = uv_listen((uv_stream_t*) server, 511, NULL); - if (r == -1) { - uv_err_t err = uv_last_error(uv_default_loop()); - /* err.code contains UV_EADDRINUSE */ - } - -libuv 1.0 - -:: - - ... assume 'server' is a TCP server which is already listening - r = uv_listen((uv_stream_t*) server, 511, NULL); - if (r < 0) { - /* r contains UV_EADDRINUSE */ - } - - -Threadpool changes -~~~~~~~~~~~~~~~~~~ - -In libuv 0.10 Unix used a threadpool which defaulted to 4 threads, while Windows used the -`QueueUserWorkItem` API, which uses a Windows internal threadpool, which defaults to 512 -threads per process. - -In 1.0, we unified both implementations, so Windows now uses the same implementation Unix -does. The threadpool size can be set by exporting the ``UV_THREADPOOL_SIZE`` environment -variable. See :c:ref:`threadpool`. - - -Allocation callback API change -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -In libuv 0.10 the callback had to return a filled :c:type:`uv_buf_t` by value: - -:: - - uv_buf_t alloc_cb(uv_handle_t* handle, size_t size) { - return uv_buf_init(malloc(size), size); - } - -In libuv 1.0 a pointer to a buffer is passed to the callback, which the user -needs to fill: - -:: - - void alloc_cb(uv_handle_t* handle, size_t size, uv_buf_t* buf) { - buf->base = malloc(size); - buf->len = size; - } - - -Unification of IPv4 / IPv6 APIs -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -libuv 1.0 unified the IPv4 and IPv6 APIS. There is no longer a `uv_tcp_bind` and `uv_tcp_bind6` -duality, there is only :c:func:`uv_tcp_bind` now. - -IPv4 functions took ``struct sockaddr_in`` structures by value, and IPv6 functions took -``struct sockaddr_in6``. Now functions take a ``struct sockaddr*`` (note it's a pointer). -It can be stack allocated. - -libuv 0.10 - -:: - - struct sockaddr_in addr = uv_ip4_addr("0.0.0.0", 1234); - ... - uv_tcp_bind(&server, addr) - -libuv 1.0 - -:: - - struct sockaddr_in addr; - uv_ip4_addr("0.0.0.0", 1234, &addr) - ... - uv_tcp_bind(&server, (const struct sockaddr*) &addr, 0); - -The IPv4 and IPv6 struct creating functions (:c:func:`uv_ip4_addr` and :c:func:`uv_ip6_addr`) -have also changed, make sure you check the documentation. - -..note:: - This change applies to all functions that made a distinction between IPv4 and IPv6 - addresses. - - -Streams / UDP data receive callback API change -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The streams and UDP data receive callbacks now get a pointer to a :c:type:`uv_buf_t` buffer, -not a structure by value. - -libuv 0.10 - -:: - - void on_read(uv_stream_t* handle, - ssize_t nread, - uv_buf_t buf) { - ... - } - - void recv_cb(uv_udp_t* handle, - ssize_t nread, - uv_buf_t buf, - struct sockaddr* addr, - unsigned flags) { - ... - } - -libuv 1.0 - -:: - - void on_read(uv_stream_t* handle, - ssize_t nread, - const uv_buf_t* buf) { - ... - } - - void recv_cb(uv_udp_t* handle, - ssize_t nread, - const uv_buf_t* buf, - const struct sockaddr* addr, - unsigned flags) { - ... - } - - -Receiving handles over pipes API change -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -In libuv 0.10 (and earlier versions) the `uv_read2_start` function was used to start reading -data on a pipe, which could also result in the reception of handles over it. The callback -for such function looked like this: - -:: - - void on_read(uv_pipe_t* pipe, - ssize_t nread, - uv_buf_t buf, - uv_handle_type pending) { - ... - } - -In libuv 1.0, `uv_read2_start` was removed, and the user needs to check if there are pending -handles using :c:func:`uv_pipe_pending_count` and :c:func:`uv_pipe_pending_type` while in -the read callback: - -:: - - void on_read(uv_stream_t* handle, - ssize_t nread, - const uv_buf_t* buf) { - ... - while (uv_pipe_pending_count((uv_pipe_t*) handle) != 0) { - pending = uv_pipe_pending_type((uv_pipe_t*) handle); - ... - } - ... - } - - -Extracting the file descriptor out of a handle -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -While it wasn't supported by the API, users often accessed the libuv internals in -order to get access to the file descriptor of a TCP handle, for example. - -:: - - fd = handle->io_watcher.fd; - -This is now properly exposed through the :c:func:`uv_fileno` function. - - -uv_fs_readdir rename and API change -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -`uv_fs_readdir` returned a list of strings in the `req->ptr` field upon completion in -libuv 0.10. In 1.0, this function got renamed to :c:func:`uv_fs_scandir`, since it's -actually implemented using ``scandir(3)``. - -In addition, instead of allocating a full list strings, the user is able to get one -result at a time by using the :c:func:`uv_fs_scandir_next` function. This function -does not need to make a roundtrip to the threadpool, because libuv will keep the -list of *dents* returned by ``scandir(3)`` around. diff --git a/outside/libuv-v1.7.5/docs/src/misc.rst b/outside/libuv-v1.7.5/docs/src/misc.rst deleted file mode 100644 index e9ddba3db..000000000 --- a/outside/libuv-v1.7.5/docs/src/misc.rst +++ /dev/null @@ -1,290 +0,0 @@ - -.. _misc: - -Miscellaneous utilities -======================= - -This section contains miscellaneous functions that don't really belong in any -other section. - - -Data types ----------- - -.. c:type:: uv_buf_t - - Buffer data type. - - .. c:member:: char* uv_buf_t.base - - Pointer to the base of the buffer. Readonly. - - .. c:member:: size_t uv_buf_t.len - - Total bytes in the buffer. Readonly. - - .. note:: - On Windows this field is ULONG. - -.. c:type:: void* (*uv_malloc_func)(size_t size) - - Replacement function for :man:`malloc(3)`. - See :c:func:`uv_replace_allocator`. - -.. c:type:: void* (*uv_realloc_func)(void* ptr, size_t size) - - Replacement function for :man:`realloc(3)`. - See :c:func:`uv_replace_allocator`. - -.. c:type:: void* (*uv_calloc_func)(size_t count, size_t size) - - Replacement function for :man:`calloc(3)`. - See :c:func:`uv_replace_allocator`. - -.. c:type:: void (*uv_free_func)(void* ptr) - - Replacement function for :man:`free(3)`. - See :c:func:`uv_replace_allocator`. - -.. c:type:: uv_file - - Cross platform representation of a file handle. - -.. c:type:: uv_os_sock_t - - Cross platform representation of a socket handle. - -.. c:type:: uv_os_fd_t - - Abstract representation of a file descriptor. On Unix systems this is a - `typedef` of `int` and on Windows a `HANDLE`. - -.. c:type:: uv_rusage_t - - Data type for resource usage results. - - :: - - typedef struct { - uv_timeval_t ru_utime; /* user CPU time used */ - uv_timeval_t ru_stime; /* system CPU time used */ - uint64_t ru_maxrss; /* maximum resident set size */ - uint64_t ru_ixrss; /* integral shared memory size */ - uint64_t ru_idrss; /* integral unshared data size */ - uint64_t ru_isrss; /* integral unshared stack size */ - uint64_t ru_minflt; /* page reclaims (soft page faults) */ - uint64_t ru_majflt; /* page faults (hard page faults) */ - uint64_t ru_nswap; /* swaps */ - uint64_t ru_inblock; /* block input operations */ - uint64_t ru_oublock; /* block output operations */ - uint64_t ru_msgsnd; /* IPC messages sent */ - uint64_t ru_msgrcv; /* IPC messages received */ - uint64_t ru_nsignals; /* signals received */ - uint64_t ru_nvcsw; /* voluntary context switches */ - uint64_t ru_nivcsw; /* involuntary context switches */ - } uv_rusage_t; - -.. c:type:: uv_cpu_info_t - - Data type for CPU information. - - :: - - typedef struct uv_cpu_info_s { - char* model; - int speed; - struct uv_cpu_times_s { - uint64_t user; - uint64_t nice; - uint64_t sys; - uint64_t idle; - uint64_t irq; - } cpu_times; - } uv_cpu_info_t; - -.. c:type:: uv_interface_address_t - - Data type for interface addresses. - - :: - - typedef struct uv_interface_address_s { - char* name; - char phys_addr[6]; - int is_internal; - union { - struct sockaddr_in address4; - struct sockaddr_in6 address6; - } address; - union { - struct sockaddr_in netmask4; - struct sockaddr_in6 netmask6; - } netmask; - } uv_interface_address_t; - - -API ---- - -.. c:function:: uv_handle_type uv_guess_handle(uv_file file) - - Used to detect what type of stream should be used with a given file - descriptor. Usually this will be used during initialization to guess the - type of the stdio streams. - - For :man:`isatty(3)` equivalent functionality use this function and test - for ``UV_TTY``. - -.. c:function:: int uv_replace_allocator(uv_malloc_func malloc_func, uv_realloc_func realloc_func, uv_calloc_func calloc_func, uv_free_func free_func) - - .. versionadded:: 1.6.0 - - Override the use of the standard library's :man:`malloc(3)`, - :man:`calloc(3)`, :man:`realloc(3)`, :man:`free(3)`, memory allocation - functions. - - This function must be called before any other libuv function is called or - after all resources have been freed and thus libuv doesn't reference - any allocated memory chunk. - - On success, it returns 0, if any of the function pointers is NULL it - returns UV_EINVAL. - - .. warning:: There is no protection against changing the allocator multiple - times. If the user changes it they are responsible for making - sure the allocator is changed while no memory was allocated with - the previous allocator, or that they are compatible. - -.. c:function:: uv_buf_t uv_buf_init(char* base, unsigned int len) - - Constructor for :c:type:`uv_buf_t`. - - Due to platform differences the user cannot rely on the ordering of the - `base` and `len` members of the uv_buf_t struct. The user is responsible for - freeing `base` after the uv_buf_t is done. Return struct passed by value. - -.. c:function:: char** uv_setup_args(int argc, char** argv) - - Store the program arguments. Required for getting / setting the process title. - -.. c:function:: int uv_get_process_title(char* buffer, size_t size) - - Gets the title of the current process. - -.. c:function:: int uv_set_process_title(const char* title) - - Sets the current process title. - -.. c:function:: int uv_resident_set_memory(size_t* rss) - - Gets the resident set size (RSS) for the current process. - -.. c:function:: int uv_uptime(double* uptime) - - Gets the current system uptime. - -.. c:function:: int uv_getrusage(uv_rusage_t* rusage) - - Gets the resource usage measures for the current process. - - .. note:: - On Windows not all fields are set, the unsupported fields are filled with zeroes. - -.. c:function:: int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count) - - Gets information about the CPUs on the system. The `cpu_infos` array will - have `count` elements and needs to be freed with :c:func:`uv_free_cpu_info`. - -.. c:function:: void uv_free_cpu_info(uv_cpu_info_t* cpu_infos, int count) - - Frees the `cpu_infos` array previously allocated with :c:func:`uv_cpu_info`. - -.. c:function:: int uv_interface_addresses(uv_interface_address_t** addresses, int* count) - - Gets address information about the network interfaces on the system. An - array of `count` elements is allocated and returned in `addresses`. It must - be freed by the user, calling :c:func:`uv_free_interface_addresses`. - -.. c:function:: void uv_free_interface_addresses(uv_interface_address_t* addresses, int count) - - Free an array of :c:type:`uv_interface_address_t` which was returned by - :c:func:`uv_interface_addresses`. - -.. c:function:: void uv_loadavg(double avg[3]) - - Gets the load average. See: ``_ - - .. note:: - Returns [0,0,0] on Windows (i.e., it's not implemented). - -.. c:function:: int uv_ip4_addr(const char* ip, int port, struct sockaddr_in* addr) - - Convert a string containing an IPv4 addresses to a binary structure. - -.. c:function:: int uv_ip6_addr(const char* ip, int port, struct sockaddr_in6* addr) - - Convert a string containing an IPv6 addresses to a binary structure. - -.. c:function:: int uv_ip4_name(const struct sockaddr_in* src, char* dst, size_t size) - - Convert a binary structure containing an IPv4 address to a string. - -.. c:function:: int uv_ip6_name(const struct sockaddr_in6* src, char* dst, size_t size) - - Convert a binary structure containing an IPv6 address to a string. - -.. c:function:: int uv_inet_ntop(int af, const void* src, char* dst, size_t size) -.. c:function:: int uv_inet_pton(int af, const char* src, void* dst) - - Cross-platform IPv6-capable implementation of :man:`inet_ntop(3)` - and :man:`inet_pton(3)`. On success they return 0. In case of error - the target `dst` pointer is unmodified. - -.. c:function:: int uv_exepath(char* buffer, size_t* size) - - Gets the executable path. - -.. c:function:: int uv_cwd(char* buffer, size_t* size) - - Gets the current working directory. - - .. versionchanged:: 1.1.0 - - On Unix the path no longer ends in a slash. - -.. c:function:: int uv_chdir(const char* dir) - - Changes the current working directory. - -.. c:function:: int uv_os_homedir(char* buffer, size_t* size) - - Gets the current user's home directory. On Windows, `uv_os_homedir()` first - checks the `USERPROFILE` environment variable using - `GetEnvironmentVariableW()`. If `USERPROFILE` is not set, - `GetUserProfileDirectoryW()` is called. On all other operating systems, - `uv_os_homedir()` first checks the `HOME` environment variable using - :man:`getenv(3)`. If `HOME` is not set, :man:`getpwuid_r(3)` is called. The - user's home directory is stored in `buffer`. When `uv_os_homedir()` is - called, `size` indicates the maximum size of `buffer`. On success or - `UV_ENOBUFS` failure, `size` is set to the string length of `buffer`. - - .. warning:: - `uv_os_homedir()` is not thread safe. - - .. versionadded:: 1.6.0 - -.. uint64_t uv_get_free_memory(void) -.. c:function:: uint64_t uv_get_total_memory(void) - - Gets memory information (in bytes). - -.. c:function:: uint64_t uv_hrtime(void) - - Returns the current high-resolution real time. This is expressed in - nanoseconds. It is relative to an arbitrary time in the past. It is not - related to the time of day and therefore not subject to clock drift. The - primary use is for measuring performance between intervals. - - .. note:: - Not every platform can support nanosecond resolution; however, this value will always - be in nanoseconds. diff --git a/outside/libuv-v1.7.5/docs/src/pipe.rst b/outside/libuv-v1.7.5/docs/src/pipe.rst deleted file mode 100644 index d33b0f2b9..000000000 --- a/outside/libuv-v1.7.5/docs/src/pipe.rst +++ /dev/null @@ -1,104 +0,0 @@ - -.. _pipe: - -:c:type:`uv_pipe_t` --- Pipe handle -=================================== - -Pipe handles provide an abstraction over local domain sockets on Unix and named -pipes on Windows. - -:c:type:`uv_pipe_t` is a 'subclass' of :c:type:`uv_stream_t`. - - -Data types ----------- - -.. c:type:: uv_pipe_t - - Pipe handle type. - - -Public members -^^^^^^^^^^^^^^ - -N/A - -.. seealso:: The :c:type:`uv_stream_t` members also apply. - - -API ---- - -.. c:function:: int uv_pipe_init(uv_loop_t* loop, uv_pipe_t* handle, int ipc) - - Initialize a pipe handle. The `ipc` argument is a boolean to indicate if - this pipe will be used for handle passing between processes. - -.. c:function:: int uv_pipe_open(uv_pipe_t* handle, uv_file file) - - Open an existing file descriptor or HANDLE as a pipe. - - .. versionchanged:: 1.2.1 the file descriptor is set to non-blocking mode. - - .. note:: - The passed file descriptor or HANDLE is not checked for its type, but - it's required that it represents a valid pipe. - -.. c:function:: int uv_pipe_bind(uv_pipe_t* handle, const char* name) - - Bind the pipe to a file path (Unix) or a name (Windows). - - .. note:: - Paths on Unix get truncated to ``sizeof(sockaddr_un.sun_path)`` bytes, typically between - 92 and 108 bytes. - -.. c:function:: void uv_pipe_connect(uv_connect_t* req, uv_pipe_t* handle, const char* name, uv_connect_cb cb) - - Connect to the Unix domain socket or the named pipe. - - .. note:: - Paths on Unix get truncated to ``sizeof(sockaddr_un.sun_path)`` bytes, typically between - 92 and 108 bytes. - -.. c:function:: int uv_pipe_getsockname(const uv_pipe_t* handle, char* buffer, size_t* size) - - Get the name of the Unix domain socket or the named pipe. - - A preallocated buffer must be provided. The size parameter holds the length - of the buffer and it's set to the number of bytes written to the buffer on - output. If the buffer is not big enough ``UV_ENOBUFS`` will be returned and - len will contain the required size. - - .. versionchanged:: 1.3.0 the returned length no longer includes the terminating null byte, - and the buffer is not null terminated. - -.. c:function:: int uv_pipe_getpeername(const uv_pipe_t* handle, char* buffer, size_t* size) - - Get the name of the Unix domain socket or the named pipe to which the handle - is connected. - - A preallocated buffer must be provided. The size parameter holds the length - of the buffer and it's set to the number of bytes written to the buffer on - output. If the buffer is not big enough ``UV_ENOBUFS`` will be returned and - len will contain the required size. - - .. versionadded:: 1.3.0 - -.. c:function:: void uv_pipe_pending_instances(uv_pipe_t* handle, int count) - - Set the number of pending pipe instance handles when the pipe server is - waiting for connections. - - .. note:: - This setting applies to Windows only. - -.. c:function:: int uv_pipe_pending_count(uv_pipe_t* handle) -.. c:function:: uv_handle_type uv_pipe_pending_type(uv_pipe_t* handle) - - Used to receive handles over IPC pipes. - - First - call :c:func:`uv_pipe_pending_count`, if it's > 0 then initialize - a handle of the given `type`, returned by :c:func:`uv_pipe_pending_type` - and call ``uv_accept(pipe, handle)``. - -.. seealso:: The :c:type:`uv_stream_t` API functions also apply. diff --git a/outside/libuv-v1.7.5/docs/src/poll.rst b/outside/libuv-v1.7.5/docs/src/poll.rst deleted file mode 100644 index 6dc41839a..000000000 --- a/outside/libuv-v1.7.5/docs/src/poll.rst +++ /dev/null @@ -1,103 +0,0 @@ - -.. _poll: - -:c:type:`uv_poll_t` --- Poll handle -=================================== - -Poll handles are used to watch file descriptors for readability and -writability, similar to the purpose of :man:`poll(2)`. - -The purpose of poll handles is to enable integrating external libraries that -rely on the event loop to signal it about the socket status changes, like -c-ares or libssh2. Using uv_poll_t for any other purpose is not recommended; -:c:type:`uv_tcp_t`, :c:type:`uv_udp_t`, etc. provide an implementation that is faster and -more scalable than what can be achieved with :c:type:`uv_poll_t`, especially on -Windows. - -It is possible that poll handles occasionally signal that a file descriptor is -readable or writable even when it isn't. The user should therefore always -be prepared to handle EAGAIN or equivalent when it attempts to read from or -write to the fd. - -It is not okay to have multiple active poll handles for the same socket, this -can cause libuv to busyloop or otherwise malfunction. - -The user should not close a file descriptor while it is being polled by an -active poll handle. This can cause the handle to report an error, -but it might also start polling another socket. However the fd can be safely -closed immediately after a call to :c:func:`uv_poll_stop` or :c:func:`uv_close`. - -.. note:: - On windows only sockets can be polled with poll handles. On Unix any file - descriptor that would be accepted by :man:`poll(2)` can be used. - - -Data types ----------- - -.. c:type:: uv_poll_t - - Poll handle type. - -.. c:type:: void (*uv_poll_cb)(uv_poll_t* handle, int status, int events) - - Type definition for callback passed to :c:func:`uv_poll_start`. - -.. c:type:: uv_poll_event - - Poll event types - - :: - - enum uv_poll_event { - UV_READABLE = 1, - UV_WRITABLE = 2 - }; - - -Public members -^^^^^^^^^^^^^^ - -N/A - -.. seealso:: The :c:type:`uv_handle_t` members also apply. - - -API ---- - -.. c:function:: int uv_poll_init(uv_loop_t* loop, uv_poll_t* handle, int fd) - - Initialize the handle using a file descriptor. - - .. versionchanged:: 1.2.2 the file descriptor is set to non-blocking mode. - -.. c:function:: int uv_poll_init_socket(uv_loop_t* loop, uv_poll_t* handle, uv_os_sock_t socket) - - Initialize the handle using a socket descriptor. On Unix this is identical - to :c:func:`uv_poll_init`. On windows it takes a SOCKET handle. - - .. versionchanged:: 1.2.2 the socket is set to non-blocking mode. - -.. c:function:: int uv_poll_start(uv_poll_t* handle, int events, uv_poll_cb cb) - - Starts polling the file descriptor. `events` is a bitmask consisting made up - of UV_READABLE and UV_WRITABLE. As soon as an event is detected the callback - will be called with `status` set to 0, and the detected events set on the - `events` field. - - If an error happens while polling, `status` will be < 0 and corresponds - with one of the UV_E* error codes (see :ref:`errors`). The user should - not close the socket while the handle is active. If the user does that - anyway, the callback *may* be called reporting an error status, but this - is **not** guaranteed. - - .. note:: - Calling :c:func:`uv_poll_start` on a handle that is already active is fine. Doing so - will update the events mask that is being watched for. - -.. c:function:: int uv_poll_stop(uv_poll_t* poll) - - Stop polling the file descriptor, the callback will no longer be called. - -.. seealso:: The :c:type:`uv_handle_t` API functions also apply. diff --git a/outside/libuv-v1.7.5/docs/src/prepare.rst b/outside/libuv-v1.7.5/docs/src/prepare.rst deleted file mode 100644 index aca581558..000000000 --- a/outside/libuv-v1.7.5/docs/src/prepare.rst +++ /dev/null @@ -1,46 +0,0 @@ - -.. _prepare: - -:c:type:`uv_prepare_t` --- Prepare handle -========================================= - -Prepare handles will run the given callback once per loop iteration, right -before polling for i/o. - - -Data types ----------- - -.. c:type:: uv_prepare_t - - Prepare handle type. - -.. c:type:: void (*uv_prepare_cb)(uv_prepare_t* handle) - - Type definition for callback passed to :c:func:`uv_prepare_start`. - - -Public members -^^^^^^^^^^^^^^ - -N/A - -.. seealso:: The :c:type:`uv_handle_t` members also apply. - - -API ---- - -.. c:function:: int uv_prepare_init(uv_loop_t* loop, uv_prepare_t* prepare) - - Initialize the handle. - -.. c:function:: int uv_prepare_start(uv_prepare_t* prepare, uv_prepare_cb cb) - - Start the handle with the given callback. - -.. c:function:: int uv_prepare_stop(uv_prepare_t* prepare) - - Stop the handle, the callback will no longer be called. - -.. seealso:: The :c:type:`uv_handle_t` API functions also apply. diff --git a/outside/libuv-v1.7.5/docs/src/process.rst b/outside/libuv-v1.7.5/docs/src/process.rst deleted file mode 100644 index b0380ddfb..000000000 --- a/outside/libuv-v1.7.5/docs/src/process.rst +++ /dev/null @@ -1,225 +0,0 @@ - -.. _process: - -:c:type:`uv_process_t` --- Process handle -========================================= - -Process handles will spawn a new process and allow the user to control it and -establish communication channels with it using streams. - - -Data types ----------- - -.. c:type:: uv_process_t - - Process handle type. - -.. c:type:: uv_process_options_t - - Options for spawning the process (passed to :c:func:`uv_spawn`. - - :: - - typedef struct uv_process_options_s { - uv_exit_cb exit_cb; - const char* file; - char** args; - char** env; - const char* cwd; - unsigned int flags; - int stdio_count; - uv_stdio_container_t* stdio; - uv_uid_t uid; - uv_gid_t gid; - } uv_process_options_t; - -.. c:type:: void (*uv_exit_cb)(uv_process_t*, int64_t exit_status, int term_signal) - - Type definition for callback passed in :c:type:`uv_process_options_t` which - will indicate the exit status and the signal that caused the process to - terminate, if any. - -.. c:type:: uv_process_flags - - Flags to be set on the flags field of :c:type:`uv_process_options_t`. - - :: - - enum uv_process_flags { - /* - * Set the child process' user id. - */ - UV_PROCESS_SETUID = (1 << 0), - /* - * Set the child process' group id. - */ - UV_PROCESS_SETGID = (1 << 1), - /* - * Do not wrap any arguments in quotes, or perform any other escaping, when - * converting the argument list into a command line string. This option is - * only meaningful on Windows systems. On Unix it is silently ignored. - */ - UV_PROCESS_WINDOWS_VERBATIM_ARGUMENTS = (1 << 2), - /* - * Spawn the child process in a detached state - this will make it a process - * group leader, and will effectively enable the child to keep running after - * the parent exits. Note that the child process will still keep the - * parent's event loop alive unless the parent process calls uv_unref() on - * the child's process handle. - */ - UV_PROCESS_DETACHED = (1 << 3), - /* - * Hide the subprocess console window that would normally be created. This - * option is only meaningful on Windows systems. On Unix it is silently - * ignored. - */ - UV_PROCESS_WINDOWS_HIDE = (1 << 4) - }; - -.. c:type:: uv_stdio_container_t - - Container for each stdio handle or fd passed to a child process. - - :: - - typedef struct uv_stdio_container_s { - uv_stdio_flags flags; - union { - uv_stream_t* stream; - int fd; - } data; - } uv_stdio_container_t; - -.. c:type:: uv_stdio_flags - - Flags specifying how a stdio should be transmitted to the child process. - - :: - - typedef enum { - UV_IGNORE = 0x00, - UV_CREATE_PIPE = 0x01, - UV_INHERIT_FD = 0x02, - UV_INHERIT_STREAM = 0x04, - /* - * When UV_CREATE_PIPE is specified, UV_READABLE_PIPE and UV_WRITABLE_PIPE - * determine the direction of flow, from the child process' perspective. Both - * flags may be specified to create a duplex data stream. - */ - UV_READABLE_PIPE = 0x10, - UV_WRITABLE_PIPE = 0x20 - } uv_stdio_flags; - - -Public members -^^^^^^^^^^^^^^ - -.. c:member:: uv_process_t.pid - - The PID of the spawned process. It's set after calling :c:func:`uv_spawn`. - -.. note:: - The :c:type:`uv_handle_t` members also apply. - -.. c:member:: uv_process_options_t.exit_cb - - Callback called after the process exits. - -.. c:member:: uv_process_options_t.file - - Path pointing to the program to be executed. - -.. c:member:: uv_process_options_t.args - - Command line arguments. args[0] should be the path to the program. On - Windows this uses `CreateProcess` which concatenates the arguments into a - string this can cause some strange errors. See the - ``UV_PROCESS_WINDOWS_VERBATIM_ARGUMENTS`` flag on :c:type:`uv_process_flags`. - -.. c:member:: uv_process_options_t.env - - Environment for the new process. If NULL the parents environment is used. - -.. c:member:: uv_process_options_t.cwd - - Current working directory for the subprocess. - -.. c:member:: uv_process_options_t.flags - - Various flags that control how :c:func:`uv_spawn` behaves. See - :c:type:`uv_process_flags`. - -.. c:member:: uv_process_options_t.stdio_count -.. c:member:: uv_process_options_t.stdio - - The `stdio` field points to an array of :c:type:`uv_stdio_container_t` - structs that describe the file descriptors that will be made available to - the child process. The convention is that stdio[0] points to stdin, - fd 1 is used for stdout, and fd 2 is stderr. - - .. note:: - On Windows file descriptors greater than 2 are available to the child process only if - the child processes uses the MSVCRT runtime. - -.. c:member:: uv_process_options_t.uid -.. c:member:: uv_process_options_t.gid - - Libuv can change the child process' user/group id. This happens only when - the appropriate bits are set in the flags fields. - - .. note:: - This is not supported on Windows, :c:func:`uv_spawn` will fail and set the error - to ``UV_ENOTSUP``. - -.. c:member:: uv_stdio_container_t.flags - - Flags specifying how the stdio container should be passed to the child. See - :c:type:`uv_stdio_flags`. - -.. c:member:: uv_stdio_container_t.data - - Union containing either the stream or fd to be passed on to the child - process. - - -API ---- - -.. c:function:: void uv_disable_stdio_inheritance(void) - - Disables inheritance for file descriptors / handles that this process - inherited from its parent. The effect is that child processes spawned by - this process don't accidentally inherit these handles. - - It is recommended to call this function as early in your program as possible, - before the inherited file descriptors can be closed or duplicated. - - .. note:: - This function works on a best-effort basis: there is no guarantee that libuv can discover - all file descriptors that were inherited. In general it does a better job on Windows than - it does on Unix. - -.. c:function:: int uv_spawn(uv_loop_t* loop, uv_process_t* handle, const uv_process_options_t* options) - - Initializes the process handle and starts the process. If the process is - successfully spawned, this function will return 0. Otherwise, the - negative error code corresponding to the reason it couldn't spawn is - returned. - - Possible reasons for failing to spawn would include (but not be limited to) - the file to execute not existing, not having permissions to use the setuid or - setgid specified, or not having enough memory to allocate for the new - process. - -.. c:function:: int uv_process_kill(uv_process_t* handle, int signum) - - Sends the specified signal to the given process handle. Check the documentation - on :c:ref:`signal` for signal support, specially on Windows. - -.. c:function:: int uv_kill(int pid, int signum) - - Sends the specified signal to the given PID. Check the documentation - on :c:ref:`signal` for signal support, specially on Windows. - -.. seealso:: The :c:type:`uv_handle_t` API functions also apply. diff --git a/outside/libuv-v1.7.5/docs/src/request.rst b/outside/libuv-v1.7.5/docs/src/request.rst deleted file mode 100644 index 660b80ae9..000000000 --- a/outside/libuv-v1.7.5/docs/src/request.rst +++ /dev/null @@ -1,82 +0,0 @@ - -.. _request: - -:c:type:`uv_req_t` --- Base request -=================================== - -`uv_req_t` is the base type for all libuv request types. - -Structures are aligned so that any libuv request can be cast to `uv_req_t`. -All API functions defined here work with any request type. - - -Data types ----------- - -.. c:type:: uv_req_t - - The base libuv request structure. - -.. c:type:: uv_any_req - - Union of all request types. - - -Public members -^^^^^^^^^^^^^^ - -.. c:member:: void* uv_req_t.data - - Space for user-defined arbitrary data. libuv does not use this field. - -.. c:member:: uv_req_type uv_req_t.type - - Indicated the type of request. Readonly. - - :: - - typedef enum { - UV_UNKNOWN_REQ = 0, - UV_REQ, - UV_CONNECT, - UV_WRITE, - UV_SHUTDOWN, - UV_UDP_SEND, - UV_FS, - UV_WORK, - UV_GETADDRINFO, - UV_GETNAMEINFO, - UV_REQ_TYPE_PRIVATE, - UV_REQ_TYPE_MAX, - } uv_req_type; - - -API ---- - -.. c:function:: int uv_cancel(uv_req_t* req) - - Cancel a pending request. Fails if the request is executing or has finished - executing. - - Returns 0 on success, or an error code < 0 on failure. - - Only cancellation of :c:type:`uv_fs_t`, :c:type:`uv_getaddrinfo_t`, - :c:type:`uv_getnameinfo_t` and :c:type:`uv_work_t` requests is - currently supported. - - Cancelled requests have their callbacks invoked some time in the future. - It's **not** safe to free the memory associated with the request until the - callback is called. - - Here is how cancellation is reported to the callback: - - * A :c:type:`uv_fs_t` request has its req->result field set to `UV_ECANCELED`. - - * A :c:type:`uv_work_t`, :c:type:`uv_getaddrinfo_t` or c:type:`uv_getnameinfo_t` - request has its callback invoked with status == `UV_ECANCELED`. - -.. c:function:: size_t uv_req_size(uv_req_type type) - - Returns the size of the given request type. Useful for FFI binding writers - who don't want to know the structure layout. diff --git a/outside/libuv-v1.7.5/docs/src/signal.rst b/outside/libuv-v1.7.5/docs/src/signal.rst deleted file mode 100644 index dc1223b90..000000000 --- a/outside/libuv-v1.7.5/docs/src/signal.rst +++ /dev/null @@ -1,77 +0,0 @@ - -.. _signal: - -:c:type:`uv_signal_t` --- Signal handle -======================================= - -Signal handles implement Unix style signal handling on a per-event loop bases. - -Reception of some signals is emulated on Windows: - -* SIGINT is normally delivered when the user presses CTRL+C. However, like - on Unix, it is not generated when terminal raw mode is enabled. - -* SIGBREAK is delivered when the user pressed CTRL + BREAK. - -* SIGHUP is generated when the user closes the console window. On SIGHUP the - program is given approximately 10 seconds to perform cleanup. After that - Windows will unconditionally terminate it. - -* SIGWINCH is raised whenever libuv detects that the console has been - resized. SIGWINCH is emulated by libuv when the program uses a :c:type:`uv_tty_t` - handle to write to the console. SIGWINCH may not always be delivered in a - timely manner; libuv will only detect size changes when the cursor is - being moved. When a readable :c:type:`uv_tty_t` handle is used in raw mode, - resizing the console buffer will also trigger a SIGWINCH signal. - -Watchers for other signals can be successfully created, but these signals -are never received. These signals are: `SIGILL`, `SIGABRT`, `SIGFPE`, `SIGSEGV`, -`SIGTERM` and `SIGKILL.` - -Calls to raise() or abort() to programmatically raise a signal are -not detected by libuv; these will not trigger a signal watcher. - -.. note:: - On Linux SIGRT0 and SIGRT1 (signals 32 and 33) are used by the NPTL pthreads library to - manage threads. Installing watchers for those signals will lead to unpredictable behavior - and is strongly discouraged. Future versions of libuv may simply reject them. - - -Data types ----------- - -.. c:type:: uv_signal_t - - Signal handle type. - -.. c:type:: void (*uv_signal_cb)(uv_signal_t* handle, int signum) - - Type definition for callback passed to :c:func:`uv_signal_start`. - - -Public members -^^^^^^^^^^^^^^ - -.. c:member:: int uv_signal_t.signum - - Signal being monitored by this handle. Readonly. - -.. seealso:: The :c:type:`uv_handle_t` members also apply. - - -API ---- - -.. c:function:: int uv_signal_init(uv_loop_t* loop, uv_signal_t* signal) - - Initialize the handle. - -.. c:function:: int uv_signal_start(uv_signal_t* signal, uv_signal_cb cb, int signum) - - Start the handle with the given callback, watching for the given signal. - -.. c:function:: int uv_signal_stop(uv_signal_t* signal) - - Stop the handle, the callback will no longer be called. - -.. seealso:: The :c:type:`uv_handle_t` API functions also apply. diff --git a/outside/libuv-v1.7.5/docs/src/sphinx-plugins/manpage.py b/outside/libuv-v1.7.5/docs/src/sphinx-plugins/manpage.py deleted file mode 100644 index 1d1dc379f..000000000 --- a/outside/libuv-v1.7.5/docs/src/sphinx-plugins/manpage.py +++ /dev/null @@ -1,46 +0,0 @@ -# encoding: utf-8 - -# -# Copyright (c) 2013 Dariusz Dwornikowski. All rights reserved. -# -# Adapted from https://github.com/tdi/sphinxcontrib-manpage -# License: Apache 2 -# - - -import re - -from docutils import nodes, utils -from docutils.parsers.rst.roles import set_classes -from string import Template - - -def make_link_node(rawtext, app, name, manpage_num, options): - ref = app.config.man_url_regex - if not ref: - ref = "http://linux.die.net/man/%s/%s" % (manpage_num, name) - else: - s = Template(ref) - ref = s.substitute(num=manpage_num, topic=name) - set_classes(options) - node = nodes.reference(rawtext, "%s(%s)" % (name, manpage_num), refuri=ref, **options) - return node - - -def man_role(name, rawtext, text, lineno, inliner, options={}, content=[]): - app = inliner.document.settings.env.app - p = re.compile("([a-zA-Z0-9_\.-_]+)\((\d)\)") - m = p.match(text) - - manpage_num = m.group(2) - name = m.group(1) - node = make_link_node(rawtext, app, name, manpage_num, options) - return [node], [] - - -def setup(app): - app.info('Initializing manpage plugin') - app.add_role('man', man_role) - app.add_config_value('man_url_regex', None, 'env') - return - diff --git a/outside/libuv-v1.7.5/docs/src/static/architecture.png b/outside/libuv-v1.7.5/docs/src/static/architecture.png deleted file mode 100644 index 81e8749f2495741d4b4c2c5dd8a6bca8803d8818..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 206767 zcmeFZcQl;e_dlvdi6A0cv@|4$7SS1zBBDp4L>VPY!l=>Bj4q-jQKJhXqW2a?pCC$f z2BX)}8Dp9|@6Yevb-(w=`@8NxzqNjA-D^G8dYn1WdGnB&~ zgM+Nb>Gm({cD3p~ezH6h=gR> zrp%+;)MOW*j7lp)1lX4;;`J*#IVDf2dJYrrN`^^DvSrhKE4sPZQR;}!UlDHXPEHb7 z%D!gY&-qI#BdSq%HidsaCyFZDG?{`!2mNM49OLFu>dIcF?0gjQ>GBtqlR<$W974fAvmfay9o~9>t%24o7@I{icwLH` zKn@OJPNo>PWSAhU379NX;HFh;>z#Y-&6-BT-h!BaUdN`)Slh-v&$UY?5(;dKqgDA$ zOZoSy5iQr=W7SVax5=4rIDEdDOHuG7b`5`f1~*#lpD&6jOFWs z34Wq`P2~{8bR+TlZO7X$FJGfwr6q(gw@K**{?K`UGwiZYhpE-w@|cN-ztp(}wBxR- zhuvm>ar^Gqs=$}(?{1n2C| zwdJ1ItN5t+Jo^5E;fK?R(a+?D^w&B~kHOEuVrp^slMa#=yNlxrKRYCBCi(H}#E&O= zB>_b<1%Wr9&xv{XItsm3l~(=0oHB##r}I^9N}=jcQobcveXvTgim(b^c+jcG|LaTO zm)a{j1uE-hL;T-wTvHwX?lV+ZrBx+AWiuttqb8G!8;)D=JmgzzI;6AVw=r41v&_AG zZMm}N1$CRa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=etF@8vMM$XRbBfTP)rkhVWIX<`pHHvde9Jtiknl_SZc%Tq!B|3JtVT;*y4`(`{71 zg3+$`{Bi<6n8>_()G*KMBY4Deu7o5pKMbY*HOu5kCN6^AQpXG$u^-3|{3xyAeSk-eZ`(8FCD#oaG zb53d@2|7zD;A%8*#7Q02-X<|$B)*<7+ff^=@#sUFW%WDyF1#70QL5&F?y@}6Igtk& zItOjH21T#(^O4x={d|p#Jym4CS{Z}MZobHru3DQ*wYn0NY(Qyw&KDugltcs2tkAok z!WeNsQ?h1Vc zY$m}f`FD}T9^;qaiL?%~#Mv#0Cc+JCwiAMF#jl)G=^aHx zhO*a_hAaIecC@FNh5-h^hASljJH>vR9?XbPGh7LJwrnjh$7b?HzeQL?;@}duH*9~{ znH!%K824%>g_4^@75?7)oaEmM&fZDEd^&cbZsf|<#U|)6wRPpg?+ef+>oef6{nSaE z3LZCWA_8jrj$W`vuf`ae;09Pa!RUia1Qzf@na0Md`Mo@5VKz%k}LW`6NQ^w5$VMxsq~7EbI!{5{tIP z-gt%+AGHS;Sg(hjb&J4+dB*zHjvz*ySNGYzfM%&J%=VPBLO(mh=X+qP`wY{{hMO!u z$msii>;ByU`AtWLOe@JkyUF|;SiF>mC0x~eH!+|N$AC^%NNILNmW=cO6bi)9{^NUk z&v5z*jGb52PAkl0)`ojk*il5!RiE;jb$rLkDaM1or%hj9#5v~tc3{RD1_-O6SPsqH zU}MSc>Q42Vmk!OAnHX-!*d63982C#X?s&M=v$TMLQQDdupWc|jNLM~*2L58}Y~rL2 zMY{g?vpgEv+>0EQZsO(o{P#+NubOXc8ti)*-SywlBfXagJ0kWTA)5yb{u?y(f8I;> aM1obxbA2B^pWMfP?%y@PQ+oUP>;DChUmDi{ diff --git a/outside/libuv-v1.7.5/docs/src/static/diagrams.key/Data/st0-311.jpg b/outside/libuv-v1.7.5/docs/src/static/diagrams.key/Data/st0-311.jpg deleted file mode 100644 index 439f58109369c37760ce8f9b4710711c17993d8e..0000000000000000000000000000000000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Rf3_qbHNk`;}}k{&5``ml=%RWEyKTP)8TewO4bia6P zjB6fnA~_-{)>g`QZ&|+YjbmTWJ$zBe`=M^`gZms6;fKUp*S#%SYj)eWD_kNoNMf47 c5x$nzv!z=CZbSh020L?UENY+x+yB1_0L|990{{R3 diff --git a/outside/libuv-v1.7.5/docs/src/static/diagrams.key/Data/st1-475.jpg b/outside/libuv-v1.7.5/docs/src/static/diagrams.key/Data/st1-475.jpg deleted file mode 100644 index ffb21ff22457dac44441fb7e83272c72fbc4d59e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12655 zcmb_>2UwF!*8iJ82vvG7LArG5AX24^2qGXTNRt{m(us9+Ip9@erurAz3k%Q38eu5q=%o6iH-)h#SKetcpm@-$N&=HJOJ3* z`+6B((>4XbqNk94O+)go+_!Rqq0)m+36g&NnMStV@9jl#U2c(As$a5;Qmjlw_6nB95 z(OrK>5EESnanxNG#{dwIfSAwSAL#;OEQlG9j<&u4Kumc`_j9y&2C*cFDSb>$G(oHk z0Hl;of5CQt!G4Z`pqv1p>FE{Z+dTP`X7>UBY9axEW#Ug7Up4?xKLmj4{=ewMbh=)g{rtR?BqRa? z0>oV$?Zrly^~Z}0$vjW|Hl&j1i@^a8~66adl9Ot1y=w|TovW(J(@JafeI@9Q4KVEb?1fA0&~C; zum+%kec%`ZfxsbD5PAqJ1OefPh(M$u3J?{D7UVL-1abp%8{!1J^mpqx+vs0362stz@PnnG_uouJ;(VCX|= z0`xgF2U-lRhJJ+hK)*rfpli@QB7lg3h>7Sdkr`1i{z%{uH^U0pOcr8cal$$ z?@&-s@K7jH7*n`V+@p9-@t)!{#XQ9!B^{+Or6%P~N`J}($^yz(%5lmaDk>@gDm5xg zDnF_OszR!Esu?Qm8TvEgXY|fEoI#z*I8%LQ=*%WH88tt(I<+-*Fm)<*1$965It>|( z0F5S%EloI022CB!7|k9nJ?(i~BU&VF9PK;WZrT+(IGq5U7M%m#L%LkLcDhA+B6?nW zO?rF!2>L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CQ&Xhm$J>1c22-jdVA2pC%YH}^$9woEIf zBa;OKk6vhCqMI2vbgp#(F_;28 zeQ+WHV9ELD`vdilI!&Wn*2~JkcSUG?gD>XH&?be*ckv1S;peOmJxXd+oLE0e_el?o z4WrPRE2y2tMI)TR9s++JJjCh|I4pJ;jMSQRz)alucHM;WO`CrrgYBEq1VBXvJha+8 zjS0XagN3*Y_V3+XsZ*QOi(Px~AJ&tiHEHEJH?11!+}&Q>(9;7PKXY%xiOmgl|6@=1 N?>yyS+aZMU{|8A0VY&bS diff --git a/outside/libuv-v1.7.5/docs/src/static/diagrams.key/Index.zip b/outside/libuv-v1.7.5/docs/src/static/diagrams.key/Index.zip deleted file mode 100644 index 17aedace14faf8f2990df3232565328901209d5a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 71160 zcmcG%30xD``agV57Mz3tAu|&Lf=!TE%rzK7h(KjY2>j8j)+$}3#WpBbS_CW5+TPj= z?)z4EMMcG3>%La2R;$*nYPE|?)w-|Ly3`Hd@0ozr{`CHO|L^4`o>y2Bo&S-SGzlh4?A7@V zII61;l2f8Icr2QGx*FXB-FN!?x`#TQoU74=CaIN)a_*ikRF+p5A?NPvEOPEUygv&>AiuM>B)_Pz+3Vf%OY)j^DDf6{@%HSZM-#eWPKFzJ!`v3XGQOOD zMBn_hj1N_+<=i7(ggStbGLJ||ss}BX^Qk10yh4KIR{AT`ZemcL4 z|B4^akL4HfOZlOEKYl9Tm!HM2<`?pV`GNcregr>*pUIEnC-D>bZ~2}4V!l5=hF{Ci z=2!7s`7Qi%ehNR4AI?|tbNLPYXnsAvgI~w5;K%Xv_zHdjznkCAPv$H6HT)2M7;l$p zgVig7@q&Hvp0At2TDRA8G`zvRf2Wx7wkcNn$G=nJs9I^TrRC(Ln7`iFDaCsC>O0{E z+b;hXQ_Mq-SW>K~EKR}ctdm^VdHKf5)aa#J4bq%=tFi`mg(`XtGhyl}YA)nbVT3hZp%_ze(6yyLsDP zZL;+Z&Ft_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CM?`jaQz+veT+)nbZw*VIwF_cn}ebbi=4S4OlY zt)b8zrqRFEzPIfA=auLA^Te!vlT-LXeCs-QC`;?#6*{TZi@)F$8a?RF8`tB@21fh# zmn2vE8b4aIpVzOb$=!xYJ-yU$@0EmR7&?{eU?Q-yW`@*BDIE`(K*(CpuWYGMj{p-AcN!&}8I51Z__Z~QX5Z@0GJN%;cY>#WEcSMs+t@c1_ zfZO-qZG9=pN?!fVnU|8-a#GG?H2UHCjy2XB)O{jzEsUGRiWGiy-W|%=i8gN8IaiDI zjzcXzj^i}CFXNHL{vUrmG2JO+YAi{M-OjtFr44ITH}2lLab^F?f0WO~{a>H~nqDN- zGrs-9&$Y)})APlna%J?bOU3{3V*ZBZ^Q6X{;8zzRb!z{YYqUwc(q{5&yX>KFFtM%Z zcevKxAWfbIScM{qL{@$J_ZGbMemkASS^Y8m5m>vO6+?(5IMMOZA54_qm7N)#=W2gm84H)_z{e-zfF%h89tk_Z+@;Un}zq2 z^l557-}XNA$1<${oCv8AfA9PfvV){gnaJ<{9Fxzc#=gMsJt80hNdlYMAN}0}{O{X% zyr1sP!6W}z;m)7?NoPJpgQQQTIJWmagO8)4`?;v}AECO+0RxggW#Y2`b4+wT$3)C; zusIphf}~HG)E)jDlZ~Haa!R{aCje4`Bv20W(O=QG@0q-vSkIwH=cd-5O_#izo%NQI z2$2LDE~}hrW@VNBWV6|1L - - - - Template: White (2014-02-28 09:41) - M6.2.2-1878-1 - - diff --git a/outside/libuv-v1.7.5/docs/src/static/diagrams.key/Metadata/DocumentIdentifier b/outside/libuv-v1.7.5/docs/src/static/diagrams.key/Metadata/DocumentIdentifier deleted file mode 100644 index ddb18f01f..000000000 --- a/outside/libuv-v1.7.5/docs/src/static/diagrams.key/Metadata/DocumentIdentifier +++ /dev/null @@ -1 +0,0 @@ -F69E9CD9-EEF1-4223-9DA4-A1EA7FE112BA \ No newline at end of file diff --git a/outside/libuv-v1.7.5/docs/src/static/diagrams.key/Metadata/Properties.plist b/outside/libuv-v1.7.5/docs/src/static/diagrams.key/Metadata/Properties.plist deleted file mode 100644 index 74bc69317de4fc4ae87da8c71d1615385d70d1f2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 340 zcmYc)$jK}&F)+B!$i&RT%Er#Y$;HjX%NJ3UT9#RynV%Pylb@WJlNytfpIn-onpYAU z>gf_)mRbao1G6)WeM@snG6NFRQ{x2$(=u~X-SUfa6HCG%Y9fm>5{ptnD&qyz4Xmup z3`|U&4UCL+jhsv!bxoX{O?55Y%*}M23@scDT}@4m%q)yTQ}g2eeBuRE+{`RpEuCE~ zbzNQE40TP6fZ8lw98GkADjm(;Tn!D4oE(A5h%u8h)KJez&wxln88{fk859`Q8B7=) l75HPbcg8&-~3o|P_8#_BY8yg!t2RA1> z2Nwq$8z(O(7dJN#4-Y#hFCQ-tACSonG6bZT8LXF;n}dymn`H3+0D~Y0gA#)-Goum% zlOQ9rAmjfd4Dvvqurh)H$hjcE$i&RT3Um?B9Y6(J1%S?HW@Z99mX!tQamHGpJOhg$ ztB|6hBb#twBD+$dh*9Ijg&fLG8xM*GUHqV8oK)1r$t5N(At|M*rmmr>WnyY(ZeeNV z?BeR??&0Yb91<+v*#~fzWVs- z^OvvRzW@073*;|G24;x2fFxFb2?G7a1dIa~c96dqnaV*P7i3{oG-MNU3}jC%6jm~7 z}foB?(N#1IuXW?>BshW)QfJ}f2%s+@*m9)i(RkPC|nOXcI(Q*T-V-RCl0FKRTS?3`dm>!lU;LCRZvac z-zGcNKQ2EWK3bda{GMlE)z6B4=FAO4AEOG`!0*0awzqd37Y zOeMz8aF@b5zj&63vF!)W-%@_u-}Rp%bK8Y~N`LG&Ui!oP?Cu(=CE={^R6@cGCe1#t z-#Bqg@~s{7nd%SP{;7V*-zVj_Hub~nhg0YEFUu~xbG%Swds~I>q?-1abDjkaf>Z6y z1LNX9nE&H6{y6d`o*`Dyvt%DDI5TenV%vOOxNbo^Y&%RT!}1#K>$zH4^ew~f)Ue{auE%eZ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.ico b/outside/libuv-v1.7.5/docs/src/static/favicon.ico deleted file mode 100644 index 2c40694cd282ff3d0db2c495c23f3beca40c17fa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15086 zcmeI3J!oE47{^bE(6L>dlR?3;f?AMDoTP|gC(+GON^N!X18j$O66~NjsaQd=(xSMC zL)z#dI2x#nOSZwR!m3x7+NM_xVsKV)SFb<|EpaeeASlj(+q}%U2&yoPD*;Lm&Ey_UhK~ z_4og5Xr+DRP_sk!#l?%;Y8ZWV*^pfGuZHnl8XJu9Yiq#y(Ek|pp24Oo_K^744vEX% z&VG-&+OikQSk~Z?A1-gL|EIsK{O26#L%+nJ84qMmd3jchtG#hWC&Nw%vpc1cK(nJjju2B;@Lx= zdb$)`edHiu4|NQ8|RdXF;=Y~_aQds zM-KRv4+sy(@ZfC92gKI6;H2E;6K(qX-UX~%j0>mIj{8FYL$I_j$2@PzKi(Uqj$`zO z#4L5N(?>*Nx>uvT*8k+fg{fl8rQ8qrD`mB~$cC=BvHB2S^BB zo_6@a7e4Xb##oy-YQyg-4(0Y@Zd<>ncpwkI?I z#(nm2&Rk}dLs#8nOwJ%bGaw_^Z@yn{`_@$KJMZd%`rc^{L%16&qPZZ8yy&yXqHe8E zp4v^DL$+J0`R4$#?Y4)|~%PII2w6MbC!=E%c&^QfI|YuvXc=!{*1Y4?qsL2`h* z$o-C7&RrON*x$_I{LppiJ7@Zwgz&bZi%;^2d%G)#^1eckdtnIwS=8R#;7=cfx8p9} zQLZlb%I^mM$iuvbtO1gd?cjn{}^(OGIzMtu55|%vU*fmf#WDj|cBmZ3E&ULE z^DEBxoq?V3_c`Snao@w)J2O5Htv$MtTiLJ8Ps<-ZzF*?kddj;CIdjfw6M5D+I$xWc zhQGY!fnWQebuQ(MwWVLXOObWGTVP`@;#mIJ;fE&YSX18%)QRXmF?Jtf*EjFnSpH>g zJddJ&XMw)QMPI~mOn)r@Xj{7voZk&B*MxEA-}y5>b8-Dk``zH!=QGwGJ^1uJznGg9 z|1$TION}?{8}*_O`a|A9*KPP*J_HMHIpwG&wQL$C-RQE%*QsQ_U2XFL*_t?GB)|p zoTFdrz*D)r%G#KV^AR(r&U;7R5&a!b^kMysGZx8@XQ0nP@+p19c=pHC-WnK_JFI=lYsh%FxQ85$b^U(; zyvsXi2xoM5o45Q$;<>lsOiqr6az+ok?5p#43dY+lgu~eV!XCTR_3p~Qe5cL4mf+UW zmb(1x$@eO7H!864g(1E`#3$lv{^Anj&Bm9F=&$E59)YX*%ShmI{=yP?CV$TeB#Hb_ z`=8LKQ_5!f8%mqFnE#H7@%+D--L>Nu^WRyOxXOI~8?33Y;%}S(z@z1r`L%pA%3o~Y ik^kAsb9poGOsuT~U&vzKIyJc*jGI?B>sZ!zWBd=1T7Db= diff --git a/outside/libuv-v1.7.5/docs/src/static/logo.png b/outside/libuv-v1.7.5/docs/src/static/logo.png deleted file mode 100644 index eaf1eee577b6774c345d5e21be51130a23b16627..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 33545 zcmc$F1yfvY6Xif~cM0yU!QI{6-Q~qXa0~A4NeFHU8rXI7lB+uA~qN&nU;|P z5kn!0B7X%}y$4fT8ir{2Yt);Bgy1+_b!LCXp6C(}LV~60_ zDE9M1mRTU|^13#1keVh)_ap{#9RvXd!mb__&H#b&gP09dQF%kcvLQG!m%2h1OjQ{B zjKEUabwVxF{L&$Y2rO>!y1J~S^po=VOgKE|(B?T}ti3+jgq$H<=)bOj$-gG!f~UQD z@}5Minw;cGXhbt*IqHIYp|r5re%_s`bQOa@e!mZ#d1hv-e;X_a7wr68KywOXXM+6I z^ETF|4qdDP^7U|4_saFvHq!Y?Eh{U#J3Gq?{St=eqq+glw!Nm^x=&8`fkKbBH@`Z! zs6#l7Lu6s@e)W!DD-{z@r67h`{M<{FeQZL0c_f*m?3cG_(PPBfR>yKnkjja>;w+|& zmPlb3pqYKK+S+7(cq6jO4XJSuf$~dcDKoZw^H-4$L+^d})-42b+2+zS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Af_rOA(p|yWM#h6l>jU>j zv4}65v)RA$1mD{`qYFQw+H`>stwAqK5yWEA+lTgY3dydgEP@BD=QlFXF9NQ|9OAX? z#)?6dQQRanuLIyEiYgVW;L-{3?gd41G1wOR>NJINtn{$T(-gC4cUEFcdH#Fq%Ad#{-6HSM!GK z^>7E&qRl*?m%DvXcQ%6{Tj*^DZ~ggq4jN5cUxUjmcMAv-M`+@p0<$(Qx|qGoDTGD@ z>p?-{YA;XRAkEMrA+Z!pThy6CG+jg{RTYMwV9N0~G)O#73|WE#S5lUyQxp9YWiod_ z>Hs+``b>`mxD#f%T(K-g@&dv$+mE~!0pyxL_rwm2jPxS`;05*n_%T3qNB?~DF2DPy z634_;?uaTkCt*TJqPi-09TYRhZzZPBJ7bEAhY?{rF|oj5sOq%{;+XLN_dov6Na0)f W3*P8um*8Y!7&$3rXpMwP!2bZAf*ghb diff --git a/outside/libuv-v1.7.5/docs/src/static/loop_iteration.png b/outside/libuv-v1.7.5/docs/src/static/loop_iteration.png deleted file mode 100644 index e769cf338b4456ea688b0abf888b646a4253e0eb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 80528 zcmc$^^;;WJ*EWh3*V5uvoECSd6o(e6;qLA(fl{mlD-t|7rFbcY;_eWvxCeKFCImR) z`Ofpc-*x_h^TT8&bM4uC&ziN@TKm557;Q}zB77QrG&D3KHC4s;XlNLyYm7}?Y}6f> z1o~1mG<WDWV{)Vy)v(nVHxwXaewaLD?L#>(@x!bkbJ!c*ONz7sjtk`JyO8-QqL)a;|Fj79$^->Ey zU=3ZQatTHX2vX$Z6;v=od#atTO1ED%52l0IH}h%q$EaI`bAip;E17KTg+Q!)qja`4 z+rl6m>(-BInP^+roKsUb*>BPKpJkYi?6BuM#Rw`rqdty-VW8or^hmUL5XZtL>~hik zN^Cd3Va2Ffl#tD)+i&d-*dWg8KEN#mUZr%uTaWg83%U4B7|%}`TJ4&qgwCe#oMD%A zR7rPqq(8H52XCKWWeE9jCo>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logos.svg deleted file mode 100644 index d6185f8b1..000000000 --- a/outside/libuv-v1.7.5/img/logos.svg +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/outside/libuv-v1.7.5/include/android-ifaddrs.h b/outside/libuv-v1.7.5/include/android-ifaddrs.h deleted file mode 100644 index 9cd19fec1..000000000 --- a/outside/libuv-v1.7.5/include/android-ifaddrs.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 1995, 1999 - * Berkeley Software Design, Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * THIS SOFTWARE IS PROVIDED BY Berkeley Software Design, Inc. ``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 Berkeley Software Design, Inc. 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. - * - * BSDI ifaddrs.h,v 2.5 2000/02/23 14:51:59 dab Exp - */ - -#ifndef _IFADDRS_H_ -#define _IFADDRS_H_ - -struct ifaddrs { - struct ifaddrs *ifa_next; - char *ifa_name; - unsigned int ifa_flags; - struct sockaddr *ifa_addr; - struct sockaddr *ifa_netmask; - struct sockaddr *ifa_dstaddr; - void *ifa_data; -}; - -/* - * This may have been defined in . Note that if is - * to be included it must be included before this header file. - */ -#ifndef ifa_broadaddr -#define ifa_broadaddr ifa_dstaddr /* broadcast address interface */ -#endif - -#include - -__BEGIN_DECLS -extern int getifaddrs(struct ifaddrs **ifap); -extern void freeifaddrs(struct ifaddrs *ifa); -__END_DECLS - -#endif diff --git a/outside/libuv-v1.7.5/include/pthread-fixes.h b/outside/libuv-v1.7.5/include/pthread-fixes.h deleted file mode 100644 index 88c6b6698..000000000 --- a/outside/libuv-v1.7.5/include/pthread-fixes.h +++ /dev/null @@ -1,72 +0,0 @@ -/* Copyright (c) 2013, Sony Mobile Communications AB - * Copyright (c) 2012, Google Inc. - 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. -*/ - -#ifndef GOOGLE_BREAKPAD_COMMON_ANDROID_TESTING_PTHREAD_FIXES_H -#define GOOGLE_BREAKPAD_COMMON_ANDROID_TESTING_PTHREAD_FIXES_H - -#include - - -/*Android doesn't provide pthread_barrier_t for now.*/ -#ifndef PTHREAD_BARRIER_SERIAL_THREAD - -/* Anything except 0 will do here.*/ -#define PTHREAD_BARRIER_SERIAL_THREAD 0x12345 - -typedef struct { - pthread_mutex_t mutex; - pthread_cond_t cond; - unsigned count; -} pthread_barrier_t; - -int pthread_barrier_init(pthread_barrier_t* barrier, - const void* barrier_attr, - unsigned count); - -int pthread_barrier_wait(pthread_barrier_t* barrier); -int pthread_barrier_destroy(pthread_barrier_t *barrier); -#endif /* defined(PTHREAD_BARRIER_SERIAL_THREAD) */ - -int pthread_yield(void); - -/* Workaround pthread_sigmask() returning EINVAL on versions < 4.1 by - * replacing all calls to pthread_sigmask with sigprocmask. See: - * https://android.googlesource.com/platform/bionic/+/9bf330b5 - * https://code.google.com/p/android/issues/detail?id=15337 - */ -int uv__pthread_sigmask(int how, const sigset_t* set, sigset_t* oset); - -#ifdef pthread_sigmask -#undef pthread_sigmask -#endif -#define pthread_sigmask(how, set, oldset) uv__pthread_sigmask(how, set, oldset) - -#endif /* GOOGLE_BREAKPAD_COMMON_ANDROID_TESTING_PTHREAD_FIXES_H */ diff --git a/outside/libuv-v1.7.5/include/stdint-msvc2008.h b/outside/libuv-v1.7.5/include/stdint-msvc2008.h deleted file mode 100644 index d02608a59..000000000 --- a/outside/libuv-v1.7.5/include/stdint-msvc2008.h +++ /dev/null @@ -1,247 +0,0 @@ -// ISO C9x compliant stdint.h for Microsoft Visual Studio -// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124 -// -// Copyright (c) 2006-2008 Alexander Chemeris -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// 3. The name of the author may be used to endorse or promote products -// derived from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef _MSC_VER // [ -#error "Use this header only with Microsoft Visual C++ compilers!" -#endif // _MSC_VER ] - -#ifndef _MSC_STDINT_H_ // [ -#define _MSC_STDINT_H_ - -#if _MSC_VER > 1000 -#pragma once -#endif - -#include - -// For Visual Studio 6 in C++ mode and for many Visual Studio versions when -// compiling for ARM we should wrap include with 'extern "C++" {}' -// or compiler give many errors like this: -// error C2733: second C linkage of overloaded function 'wmemchr' not allowed -#ifdef __cplusplus -extern "C" { -#endif -# include -#ifdef __cplusplus -} -#endif - -// Define _W64 macros to mark types changing their size, like intptr_t. -#ifndef _W64 -# if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300 -# define _W64 __w64 -# else -# define _W64 -# endif -#endif - - -// 7.18.1 Integer types - -// 7.18.1.1 Exact-width integer types - -// Visual Studio 6 and Embedded Visual C++ 4 doesn't -// realize that, e.g. char has the same size as __int8 -// so we give up on __intX for them. -#if (_MSC_VER < 1300) - typedef signed char int8_t; - typedef signed short int16_t; - typedef signed int int32_t; - typedef unsigned char uint8_t; - typedef unsigned short uint16_t; - typedef unsigned int uint32_t; -#else - typedef signed __int8 int8_t; - typedef signed __int16 int16_t; - typedef signed __int32 int32_t; - typedef unsigned __int8 uint8_t; - typedef unsigned __int16 uint16_t; - typedef unsigned __int32 uint32_t; -#endif -typedef signed __int64 int64_t; -typedef unsigned __int64 uint64_t; - - -// 7.18.1.2 Minimum-width integer types -typedef int8_t int_least8_t; -typedef int16_t int_least16_t; -typedef int32_t int_least32_t; -typedef int64_t int_least64_t; -typedef uint8_t uint_least8_t; -typedef uint16_t uint_least16_t; -typedef uint32_t uint_least32_t; -typedef uint64_t uint_least64_t; - -// 7.18.1.3 Fastest minimum-width integer types -typedef int8_t int_fast8_t; -typedef int16_t int_fast16_t; -typedef int32_t int_fast32_t; -typedef int64_t int_fast64_t; -typedef uint8_t uint_fast8_t; -typedef uint16_t uint_fast16_t; -typedef uint32_t uint_fast32_t; -typedef uint64_t uint_fast64_t; - -// 7.18.1.4 Integer types capable of holding object pointers -#ifdef _WIN64 // [ - typedef signed __int64 intptr_t; - typedef unsigned __int64 uintptr_t; -#else // _WIN64 ][ - typedef _W64 signed int intptr_t; - typedef _W64 unsigned int uintptr_t; -#endif // _WIN64 ] - -// 7.18.1.5 Greatest-width integer types -typedef int64_t intmax_t; -typedef uint64_t uintmax_t; - - -// 7.18.2 Limits of specified-width integer types - -#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [ See footnote 220 at page 257 and footnote 221 at page 259 - -// 7.18.2.1 Limits of exact-width integer types -#define INT8_MIN ((int8_t)_I8_MIN) -#define INT8_MAX _I8_MAX -#define INT16_MIN ((int16_t)_I16_MIN) -#define INT16_MAX _I16_MAX -#define INT32_MIN ((int32_t)_I32_MIN) -#define INT32_MAX _I32_MAX -#define INT64_MIN ((int64_t)_I64_MIN) -#define INT64_MAX _I64_MAX -#define UINT8_MAX _UI8_MAX -#define UINT16_MAX _UI16_MAX -#define UINT32_MAX _UI32_MAX -#define UINT64_MAX _UI64_MAX - -// 7.18.2.2 Limits of minimum-width integer types -#define INT_LEAST8_MIN INT8_MIN -#define INT_LEAST8_MAX INT8_MAX -#define INT_LEAST16_MIN INT16_MIN -#define INT_LEAST16_MAX INT16_MAX -#define INT_LEAST32_MIN INT32_MIN -#define INT_LEAST32_MAX INT32_MAX -#define INT_LEAST64_MIN INT64_MIN -#define INT_LEAST64_MAX INT64_MAX -#define UINT_LEAST8_MAX UINT8_MAX -#define UINT_LEAST16_MAX UINT16_MAX -#define UINT_LEAST32_MAX UINT32_MAX -#define UINT_LEAST64_MAX UINT64_MAX - -// 7.18.2.3 Limits of fastest minimum-width integer types -#define INT_FAST8_MIN INT8_MIN -#define INT_FAST8_MAX INT8_MAX -#define INT_FAST16_MIN INT16_MIN -#define INT_FAST16_MAX INT16_MAX -#define INT_FAST32_MIN INT32_MIN -#define INT_FAST32_MAX INT32_MAX -#define INT_FAST64_MIN INT64_MIN -#define INT_FAST64_MAX INT64_MAX -#define UINT_FAST8_MAX UINT8_MAX -#define UINT_FAST16_MAX UINT16_MAX -#define UINT_FAST32_MAX UINT32_MAX -#define UINT_FAST64_MAX UINT64_MAX - -// 7.18.2.4 Limits of integer types capable of holding object pointers -#ifdef _WIN64 // [ -# define INTPTR_MIN INT64_MIN -# define INTPTR_MAX INT64_MAX -# define UINTPTR_MAX UINT64_MAX -#else // _WIN64 ][ -# define INTPTR_MIN INT32_MIN -# define INTPTR_MAX INT32_MAX -# define UINTPTR_MAX UINT32_MAX -#endif // _WIN64 ] - -// 7.18.2.5 Limits of greatest-width integer types -#define INTMAX_MIN INT64_MIN -#define INTMAX_MAX INT64_MAX -#define UINTMAX_MAX UINT64_MAX - -// 7.18.3 Limits of other integer types - -#ifdef _WIN64 // [ -# define PTRDIFF_MIN _I64_MIN -# define PTRDIFF_MAX _I64_MAX -#else // _WIN64 ][ -# define PTRDIFF_MIN _I32_MIN -# define PTRDIFF_MAX _I32_MAX -#endif // _WIN64 ] - -#define SIG_ATOMIC_MIN INT_MIN -#define SIG_ATOMIC_MAX INT_MAX - -#ifndef SIZE_MAX // [ -# ifdef _WIN64 // [ -# define SIZE_MAX _UI64_MAX -# else // _WIN64 ][ -# define SIZE_MAX _UI32_MAX -# endif // _WIN64 ] -#endif // SIZE_MAX ] - -// WCHAR_MIN and WCHAR_MAX are also defined in -#ifndef WCHAR_MIN // [ -# define WCHAR_MIN 0 -#endif // WCHAR_MIN ] -#ifndef WCHAR_MAX // [ -# define WCHAR_MAX _UI16_MAX -#endif // WCHAR_MAX ] - -#define WINT_MIN 0 -#define WINT_MAX _UI16_MAX - -#endif // __STDC_LIMIT_MACROS ] - - -// 7.18.4 Limits of other integer types - -#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) // [ See footnote 224 at page 260 - -// 7.18.4.1 Macros for minimum-width integer constants - -#define INT8_C(val) val##i8 -#define INT16_C(val) val##i16 -#define INT32_C(val) val##i32 -#define INT64_C(val) val##i64 - -#define UINT8_C(val) val##ui8 -#define UINT16_C(val) val##ui16 -#define UINT32_C(val) val##ui32 -#define UINT64_C(val) val##ui64 - -// 7.18.4.2 Macros for greatest-width integer constants -#define INTMAX_C INT64_C -#define UINTMAX_C UINT64_C - -#endif // __STDC_CONSTANT_MACROS ] - - -#endif // _MSC_STDINT_H_ ] diff --git a/outside/libuv-v1.7.5/include/tree.h b/outside/libuv-v1.7.5/include/tree.h deleted file mode 100644 index f936416e3..000000000 --- a/outside/libuv-v1.7.5/include/tree.h +++ /dev/null @@ -1,768 +0,0 @@ -/*- - * Copyright 2002 Niels Provos - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. - */ - -#ifndef UV_TREE_H_ -#define UV_TREE_H_ - -#ifndef UV__UNUSED -# if __GNUC__ -# define UV__UNUSED __attribute__((unused)) -# else -# define UV__UNUSED -# endif -#endif - -/* - * This file defines data structures for different types of trees: - * splay trees and red-black trees. - * - * A splay tree is a self-organizing data structure. Every operation - * on the tree causes a splay to happen. The splay moves the requested - * node to the root of the tree and partly rebalances it. - * - * This has the benefit that request locality causes faster lookups as - * the requested nodes move to the top of the tree. On the other hand, - * every lookup causes memory writes. - * - * The Balance Theorem bounds the total access time for m operations - * and n inserts on an initially empty tree as O((m + n)lg n). The - * amortized cost for a sequence of m accesses to a splay tree is O(lg n); - * - * A red-black tree is a binary search tree with the node color as an - * extra attribute. It fulfills a set of conditions: - * - every search path from the root to a leaf consists of the - * same number of black nodes, - * - each red node (except for the root) has a black parent, - * - each leaf node is black. - * - * Every operation on a red-black tree is bounded as O(lg n). - * The maximum height of a red-black tree is 2lg (n+1). - */ - -#define SPLAY_HEAD(name, type) \ -struct name { \ - struct type *sph_root; /* root of the tree */ \ -} - -#define SPLAY_INITIALIZER(root) \ - { NULL } - -#define SPLAY_INIT(root) do { \ - (root)->sph_root = NULL; \ -} while (/*CONSTCOND*/ 0) - -#define SPLAY_ENTRY(type) \ -struct { \ - struct type *spe_left; /* left element */ \ - struct type *spe_right; /* right element */ \ -} - -#define SPLAY_LEFT(elm, field) (elm)->field.spe_left -#define SPLAY_RIGHT(elm, field) (elm)->field.spe_right -#define SPLAY_ROOT(head) (head)->sph_root -#define SPLAY_EMPTY(head) (SPLAY_ROOT(head) == NULL) - -/* SPLAY_ROTATE_{LEFT,RIGHT} expect that tmp hold SPLAY_{RIGHT,LEFT} */ -#define SPLAY_ROTATE_RIGHT(head, tmp, field) do { \ - SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(tmp, field); \ - SPLAY_RIGHT(tmp, field) = (head)->sph_root; \ - (head)->sph_root = tmp; \ -} while (/*CONSTCOND*/ 0) - -#define SPLAY_ROTATE_LEFT(head, tmp, field) do { \ - SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(tmp, field); \ - SPLAY_LEFT(tmp, field) = (head)->sph_root; \ - (head)->sph_root = tmp; \ -} while (/*CONSTCOND*/ 0) - -#define SPLAY_LINKLEFT(head, tmp, field) do { \ - SPLAY_LEFT(tmp, field) = (head)->sph_root; \ - tmp = (head)->sph_root; \ - (head)->sph_root = SPLAY_LEFT((head)->sph_root, field); \ -} while (/*CONSTCOND*/ 0) - -#define SPLAY_LINKRIGHT(head, tmp, field) do { \ - SPLAY_RIGHT(tmp, field) = (head)->sph_root; \ - tmp = (head)->sph_root; \ - (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field); \ -} while (/*CONSTCOND*/ 0) - -#define SPLAY_ASSEMBLE(head, node, left, right, field) do { \ - SPLAY_RIGHT(left, field) = SPLAY_LEFT((head)->sph_root, field); \ - SPLAY_LEFT(right, field) = SPLAY_RIGHT((head)->sph_root, field); \ - SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(node, field); \ - SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(node, field); \ -} while (/*CONSTCOND*/ 0) - -/* Generates prototypes and inline functions */ - -#define SPLAY_PROTOTYPE(name, type, field, cmp) \ -void name##_SPLAY(struct name *, struct type *); \ -void name##_SPLAY_MINMAX(struct name *, int); \ -struct type *name##_SPLAY_INSERT(struct name *, struct type *); \ -struct type *name##_SPLAY_REMOVE(struct name *, struct type *); \ - \ -/* Finds the node with the same key as elm */ \ -static __inline struct type * \ -name##_SPLAY_FIND(struct name *head, struct type *elm) \ -{ \ - if (SPLAY_EMPTY(head)) \ - return(NULL); \ - name##_SPLAY(head, elm); \ - if ((cmp)(elm, (head)->sph_root) == 0) \ - return (head->sph_root); \ - return (NULL); \ -} \ - \ -static __inline struct type * \ -name##_SPLAY_NEXT(struct name *head, struct type *elm) \ -{ \ - name##_SPLAY(head, elm); \ - if (SPLAY_RIGHT(elm, field) != NULL) { \ - elm = SPLAY_RIGHT(elm, field); \ - while (SPLAY_LEFT(elm, field) != NULL) { \ - elm = SPLAY_LEFT(elm, field); \ - } \ - } else \ - elm = NULL; \ - return (elm); \ -} \ - \ -static __inline struct type * \ -name##_SPLAY_MIN_MAX(struct name *head, int val) \ -{ \ - name##_SPLAY_MINMAX(head, val); \ - return (SPLAY_ROOT(head)); \ -} - -/* Main splay operation. - * Moves node close to the key of elm to top - */ -#define SPLAY_GENERATE(name, type, field, cmp) \ -struct type * \ -name##_SPLAY_INSERT(struct name *head, struct type *elm) \ -{ \ - if (SPLAY_EMPTY(head)) { \ - SPLAY_LEFT(elm, field) = SPLAY_RIGHT(elm, field) = NULL; \ - } else { \ - int __comp; \ - name##_SPLAY(head, elm); \ - __comp = (cmp)(elm, (head)->sph_root); \ - if(__comp < 0) { \ - SPLAY_LEFT(elm, field) = SPLAY_LEFT((head)->sph_root, field); \ - SPLAY_RIGHT(elm, field) = (head)->sph_root; \ - SPLAY_LEFT((head)->sph_root, field) = NULL; \ - } else if (__comp > 0) { \ - SPLAY_RIGHT(elm, field) = SPLAY_RIGHT((head)->sph_root, field); \ - SPLAY_LEFT(elm, field) = (head)->sph_root; \ - SPLAY_RIGHT((head)->sph_root, field) = NULL; \ - } else \ - return ((head)->sph_root); \ - } \ - (head)->sph_root = (elm); \ - return (NULL); \ -} \ - \ -struct type * \ -name##_SPLAY_REMOVE(struct name *head, struct type *elm) \ -{ \ - struct type *__tmp; \ - if (SPLAY_EMPTY(head)) \ - return (NULL); \ - name##_SPLAY(head, elm); \ - if ((cmp)(elm, (head)->sph_root) == 0) { \ - if (SPLAY_LEFT((head)->sph_root, field) == NULL) { \ - (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field); \ - } else { \ - __tmp = SPLAY_RIGHT((head)->sph_root, field); \ - (head)->sph_root = SPLAY_LEFT((head)->sph_root, field); \ - name##_SPLAY(head, elm); \ - SPLAY_RIGHT((head)->sph_root, field) = __tmp; \ - } \ - return (elm); \ - } \ - return (NULL); \ -} \ - \ -void \ -name##_SPLAY(struct name *head, struct type *elm) \ -{ \ - struct type __node, *__left, *__right, *__tmp; \ - int __comp; \ - \ - SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL; \ - __left = __right = &__node; \ - \ - while ((__comp = (cmp)(elm, (head)->sph_root)) != 0) { \ - if (__comp < 0) { \ - __tmp = SPLAY_LEFT((head)->sph_root, field); \ - if (__tmp == NULL) \ - break; \ - if ((cmp)(elm, __tmp) < 0){ \ - SPLAY_ROTATE_RIGHT(head, __tmp, field); \ - if (SPLAY_LEFT((head)->sph_root, field) == NULL) \ - break; \ - } \ - SPLAY_LINKLEFT(head, __right, field); \ - } else if (__comp > 0) { \ - __tmp = SPLAY_RIGHT((head)->sph_root, field); \ - if (__tmp == NULL) \ - break; \ - if ((cmp)(elm, __tmp) > 0){ \ - SPLAY_ROTATE_LEFT(head, __tmp, field); \ - if (SPLAY_RIGHT((head)->sph_root, field) == NULL) \ - break; \ - } \ - SPLAY_LINKRIGHT(head, __left, field); \ - } \ - } \ - SPLAY_ASSEMBLE(head, &__node, __left, __right, field); \ -} \ - \ -/* Splay with either the minimum or the maximum element \ - * Used to find minimum or maximum element in tree. \ - */ \ -void name##_SPLAY_MINMAX(struct name *head, int __comp) \ -{ \ - struct type __node, *__left, *__right, *__tmp; \ - \ - SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL; \ - __left = __right = &__node; \ - \ - while (1) { \ - if (__comp < 0) { \ - __tmp = SPLAY_LEFT((head)->sph_root, field); \ - if (__tmp == NULL) \ - break; \ - if (__comp < 0){ \ - SPLAY_ROTATE_RIGHT(head, __tmp, field); \ - if (SPLAY_LEFT((head)->sph_root, field) == NULL) \ - break; \ - } \ - SPLAY_LINKLEFT(head, __right, field); \ - } else if (__comp > 0) { \ - __tmp = SPLAY_RIGHT((head)->sph_root, field); \ - if (__tmp == NULL) \ - break; \ - if (__comp > 0) { \ - SPLAY_ROTATE_LEFT(head, __tmp, field); \ - if (SPLAY_RIGHT((head)->sph_root, field) == NULL) \ - break; \ - } \ - SPLAY_LINKRIGHT(head, __left, field); \ - } \ - } \ - SPLAY_ASSEMBLE(head, &__node, __left, __right, field); \ -} - -#define SPLAY_NEGINF -1 -#define SPLAY_INF 1 - -#define SPLAY_INSERT(name, x, y) name##_SPLAY_INSERT(x, y) -#define SPLAY_REMOVE(name, x, y) name##_SPLAY_REMOVE(x, y) -#define SPLAY_FIND(name, x, y) name##_SPLAY_FIND(x, y) -#define SPLAY_NEXT(name, x, y) name##_SPLAY_NEXT(x, y) -#define SPLAY_MIN(name, x) (SPLAY_EMPTY(x) ? NULL \ - : name##_SPLAY_MIN_MAX(x, SPLAY_NEGINF)) -#define SPLAY_MAX(name, x) (SPLAY_EMPTY(x) ? NULL \ - : name##_SPLAY_MIN_MAX(x, SPLAY_INF)) - -#define SPLAY_FOREACH(x, name, head) \ - for ((x) = SPLAY_MIN(name, head); \ - (x) != NULL; \ - (x) = SPLAY_NEXT(name, head, x)) - -/* Macros that define a red-black tree */ -#define RB_HEAD(name, type) \ -struct name { \ - struct type *rbh_root; /* root of the tree */ \ -} - -#define RB_INITIALIZER(root) \ - { NULL } - -#define RB_INIT(root) do { \ - (root)->rbh_root = NULL; \ -} while (/*CONSTCOND*/ 0) - -#define RB_BLACK 0 -#define RB_RED 1 -#define RB_ENTRY(type) \ -struct { \ - struct type *rbe_left; /* left element */ \ - struct type *rbe_right; /* right element */ \ - struct type *rbe_parent; /* parent element */ \ - int rbe_color; /* node color */ \ -} - -#define RB_LEFT(elm, field) (elm)->field.rbe_left -#define RB_RIGHT(elm, field) (elm)->field.rbe_right -#define RB_PARENT(elm, field) (elm)->field.rbe_parent -#define RB_COLOR(elm, field) (elm)->field.rbe_color -#define RB_ROOT(head) (head)->rbh_root -#define RB_EMPTY(head) (RB_ROOT(head) == NULL) - -#define RB_SET(elm, parent, field) do { \ - RB_PARENT(elm, field) = parent; \ - RB_LEFT(elm, field) = RB_RIGHT(elm, field) = NULL; \ - RB_COLOR(elm, field) = RB_RED; \ -} while (/*CONSTCOND*/ 0) - -#define RB_SET_BLACKRED(black, red, field) do { \ - RB_COLOR(black, field) = RB_BLACK; \ - RB_COLOR(red, field) = RB_RED; \ -} while (/*CONSTCOND*/ 0) - -#ifndef RB_AUGMENT -#define RB_AUGMENT(x) do {} while (0) -#endif - -#define RB_ROTATE_LEFT(head, elm, tmp, field) do { \ - (tmp) = RB_RIGHT(elm, field); \ - if ((RB_RIGHT(elm, field) = RB_LEFT(tmp, field)) != NULL) { \ - RB_PARENT(RB_LEFT(tmp, field), field) = (elm); \ - } \ - RB_AUGMENT(elm); \ - if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field)) != NULL) { \ - if ((elm) == RB_LEFT(RB_PARENT(elm, field), field)) \ - RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \ - else \ - RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \ - } else \ - (head)->rbh_root = (tmp); \ - RB_LEFT(tmp, field) = (elm); \ - RB_PARENT(elm, field) = (tmp); \ - RB_AUGMENT(tmp); \ - if ((RB_PARENT(tmp, field))) \ - RB_AUGMENT(RB_PARENT(tmp, field)); \ -} while (/*CONSTCOND*/ 0) - -#define RB_ROTATE_RIGHT(head, elm, tmp, field) do { \ - (tmp) = RB_LEFT(elm, field); \ - if ((RB_LEFT(elm, field) = RB_RIGHT(tmp, field)) != NULL) { \ - RB_PARENT(RB_RIGHT(tmp, field), field) = (elm); \ - } \ - RB_AUGMENT(elm); \ - if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field)) != NULL) { \ - if ((elm) == RB_LEFT(RB_PARENT(elm, field), field)) \ - RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \ - else \ - RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \ - } else \ - (head)->rbh_root = (tmp); \ - RB_RIGHT(tmp, field) = (elm); \ - RB_PARENT(elm, field) = (tmp); \ - RB_AUGMENT(tmp); \ - if ((RB_PARENT(tmp, field))) \ - RB_AUGMENT(RB_PARENT(tmp, field)); \ -} while (/*CONSTCOND*/ 0) - -/* Generates prototypes and inline functions */ -#define RB_PROTOTYPE(name, type, field, cmp) \ - RB_PROTOTYPE_INTERNAL(name, type, field, cmp,) -#define RB_PROTOTYPE_STATIC(name, type, field, cmp) \ - RB_PROTOTYPE_INTERNAL(name, type, field, cmp, UV__UNUSED static) -#define RB_PROTOTYPE_INTERNAL(name, type, field, cmp, attr) \ -attr void name##_RB_INSERT_COLOR(struct name *, struct type *); \ -attr void name##_RB_REMOVE_COLOR(struct name *, struct type *, struct type *);\ -attr struct type *name##_RB_REMOVE(struct name *, struct type *); \ -attr struct type *name##_RB_INSERT(struct name *, struct type *); \ -attr struct type *name##_RB_FIND(struct name *, struct type *); \ -attr struct type *name##_RB_NFIND(struct name *, struct type *); \ -attr struct type *name##_RB_NEXT(struct type *); \ -attr struct type *name##_RB_PREV(struct type *); \ -attr struct type *name##_RB_MINMAX(struct name *, int); \ - \ - -/* Main rb operation. - * Moves node close to the key of elm to top - */ -#define RB_GENERATE(name, type, field, cmp) \ - RB_GENERATE_INTERNAL(name, type, field, cmp,) -#define RB_GENERATE_STATIC(name, type, field, cmp) \ - RB_GENERATE_INTERNAL(name, type, field, cmp, UV__UNUSED static) -#define RB_GENERATE_INTERNAL(name, type, field, cmp, attr) \ -attr void \ -name##_RB_INSERT_COLOR(struct name *head, struct type *elm) \ -{ \ - struct type *parent, *gparent, *tmp; \ - while ((parent = RB_PARENT(elm, field)) != NULL && \ - RB_COLOR(parent, field) == RB_RED) { \ - gparent = RB_PARENT(parent, field); \ - if (parent == RB_LEFT(gparent, field)) { \ - tmp = RB_RIGHT(gparent, field); \ - if (tmp && RB_COLOR(tmp, field) == RB_RED) { \ - RB_COLOR(tmp, field) = RB_BLACK; \ - RB_SET_BLACKRED(parent, gparent, field); \ - elm = gparent; \ - continue; \ - } \ - if (RB_RIGHT(parent, field) == elm) { \ - RB_ROTATE_LEFT(head, parent, tmp, field); \ - tmp = parent; \ - parent = elm; \ - elm = tmp; \ - } \ - RB_SET_BLACKRED(parent, gparent, field); \ - RB_ROTATE_RIGHT(head, gparent, tmp, field); \ - } else { \ - tmp = RB_LEFT(gparent, field); \ - if (tmp && RB_COLOR(tmp, field) == RB_RED) { \ - RB_COLOR(tmp, field) = RB_BLACK; \ - RB_SET_BLACKRED(parent, gparent, field); \ - elm = gparent; \ - continue; \ - } \ - if (RB_LEFT(parent, field) == elm) { \ - RB_ROTATE_RIGHT(head, parent, tmp, field); \ - tmp = parent; \ - parent = elm; \ - elm = tmp; \ - } \ - RB_SET_BLACKRED(parent, gparent, field); \ - RB_ROTATE_LEFT(head, gparent, tmp, field); \ - } \ - } \ - RB_COLOR(head->rbh_root, field) = RB_BLACK; \ -} \ - \ -attr void \ -name##_RB_REMOVE_COLOR(struct name *head, struct type *parent, \ - struct type *elm) \ -{ \ - struct type *tmp; \ - while ((elm == NULL || RB_COLOR(elm, field) == RB_BLACK) && \ - elm != RB_ROOT(head)) { \ - if (RB_LEFT(parent, field) == elm) { \ - tmp = RB_RIGHT(parent, field); \ - if (RB_COLOR(tmp, field) == RB_RED) { \ - RB_SET_BLACKRED(tmp, parent, field); \ - RB_ROTATE_LEFT(head, parent, tmp, field); \ - tmp = RB_RIGHT(parent, field); \ - } \ - if ((RB_LEFT(tmp, field) == NULL || \ - RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) && \ - (RB_RIGHT(tmp, field) == NULL || \ - RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) { \ - RB_COLOR(tmp, field) = RB_RED; \ - elm = parent; \ - parent = RB_PARENT(elm, field); \ - } else { \ - if (RB_RIGHT(tmp, field) == NULL || \ - RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK) { \ - struct type *oleft; \ - if ((oleft = RB_LEFT(tmp, field)) \ - != NULL) \ - RB_COLOR(oleft, field) = RB_BLACK; \ - RB_COLOR(tmp, field) = RB_RED; \ - RB_ROTATE_RIGHT(head, tmp, oleft, field); \ - tmp = RB_RIGHT(parent, field); \ - } \ - RB_COLOR(tmp, field) = RB_COLOR(parent, field); \ - RB_COLOR(parent, field) = RB_BLACK; \ - if (RB_RIGHT(tmp, field)) \ - RB_COLOR(RB_RIGHT(tmp, field), field) = RB_BLACK; \ - RB_ROTATE_LEFT(head, parent, tmp, field); \ - elm = RB_ROOT(head); \ - break; \ - } \ - } else { \ - tmp = RB_LEFT(parent, field); \ - if (RB_COLOR(tmp, field) == RB_RED) { \ - RB_SET_BLACKRED(tmp, parent, field); \ - RB_ROTATE_RIGHT(head, parent, tmp, field); \ - tmp = RB_LEFT(parent, field); \ - } \ - if ((RB_LEFT(tmp, field) == NULL || \ - RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) && \ - (RB_RIGHT(tmp, field) == NULL || \ - RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) { \ - RB_COLOR(tmp, field) = RB_RED; \ - elm = parent; \ - parent = RB_PARENT(elm, field); \ - } else { \ - if (RB_LEFT(tmp, field) == NULL || \ - RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) { \ - struct type *oright; \ - if ((oright = RB_RIGHT(tmp, field)) \ - != NULL) \ - RB_COLOR(oright, field) = RB_BLACK; \ - RB_COLOR(tmp, field) = RB_RED; \ - RB_ROTATE_LEFT(head, tmp, oright, field); \ - tmp = RB_LEFT(parent, field); \ - } \ - RB_COLOR(tmp, field) = RB_COLOR(parent, field); \ - RB_COLOR(parent, field) = RB_BLACK; \ - if (RB_LEFT(tmp, field)) \ - RB_COLOR(RB_LEFT(tmp, field), field) = RB_BLACK; \ - RB_ROTATE_RIGHT(head, parent, tmp, field); \ - elm = RB_ROOT(head); \ - break; \ - } \ - } \ - } \ - if (elm) \ - RB_COLOR(elm, field) = RB_BLACK; \ -} \ - \ -attr struct type * \ -name##_RB_REMOVE(struct name *head, struct type *elm) \ -{ \ - struct type *child, *parent, *old = elm; \ - int color; \ - if (RB_LEFT(elm, field) == NULL) \ - child = RB_RIGHT(elm, field); \ - else if (RB_RIGHT(elm, field) == NULL) \ - child = RB_LEFT(elm, field); \ - else { \ - struct type *left; \ - elm = RB_RIGHT(elm, field); \ - while ((left = RB_LEFT(elm, field)) != NULL) \ - elm = left; \ - child = RB_RIGHT(elm, field); \ - parent = RB_PARENT(elm, field); \ - color = RB_COLOR(elm, field); \ - if (child) \ - RB_PARENT(child, field) = parent; \ - if (parent) { \ - if (RB_LEFT(parent, field) == elm) \ - RB_LEFT(parent, field) = child; \ - else \ - RB_RIGHT(parent, field) = child; \ - RB_AUGMENT(parent); \ - } else \ - RB_ROOT(head) = child; \ - if (RB_PARENT(elm, field) == old) \ - parent = elm; \ - (elm)->field = (old)->field; \ - if (RB_PARENT(old, field)) { \ - if (RB_LEFT(RB_PARENT(old, field), field) == old) \ - RB_LEFT(RB_PARENT(old, field), field) = elm; \ - else \ - RB_RIGHT(RB_PARENT(old, field), field) = elm; \ - RB_AUGMENT(RB_PARENT(old, field)); \ - } else \ - RB_ROOT(head) = elm; \ - RB_PARENT(RB_LEFT(old, field), field) = elm; \ - if (RB_RIGHT(old, field)) \ - RB_PARENT(RB_RIGHT(old, field), field) = elm; \ - if (parent) { \ - left = parent; \ - do { \ - RB_AUGMENT(left); \ - } while ((left = RB_PARENT(left, field)) != NULL); \ - } \ - goto color; \ - } \ - parent = RB_PARENT(elm, field); \ - color = RB_COLOR(elm, field); \ - if (child) \ - RB_PARENT(child, field) = parent; \ - if (parent) { \ - if (RB_LEFT(parent, field) == elm) \ - RB_LEFT(parent, field) = child; \ - else \ - RB_RIGHT(parent, field) = child; \ - RB_AUGMENT(parent); \ - } else \ - RB_ROOT(head) = child; \ -color: \ - if (color == RB_BLACK) \ - name##_RB_REMOVE_COLOR(head, parent, child); \ - return (old); \ -} \ - \ -/* Inserts a node into the RB tree */ \ -attr struct type * \ -name##_RB_INSERT(struct name *head, struct type *elm) \ -{ \ - struct type *tmp; \ - struct type *parent = NULL; \ - int comp = 0; \ - tmp = RB_ROOT(head); \ - while (tmp) { \ - parent = tmp; \ - comp = (cmp)(elm, parent); \ - if (comp < 0) \ - tmp = RB_LEFT(tmp, field); \ - else if (comp > 0) \ - tmp = RB_RIGHT(tmp, field); \ - else \ - return (tmp); \ - } \ - RB_SET(elm, parent, field); \ - if (parent != NULL) { \ - if (comp < 0) \ - RB_LEFT(parent, field) = elm; \ - else \ - RB_RIGHT(parent, field) = elm; \ - RB_AUGMENT(parent); \ - } else \ - RB_ROOT(head) = elm; \ - name##_RB_INSERT_COLOR(head, elm); \ - return (NULL); \ -} \ - \ -/* Finds the node with the same key as elm */ \ -attr struct type * \ -name##_RB_FIND(struct name *head, struct type *elm) \ -{ \ - struct type *tmp = RB_ROOT(head); \ - int comp; \ - while (tmp) { \ - comp = cmp(elm, tmp); \ - if (comp < 0) \ - tmp = RB_LEFT(tmp, field); \ - else if (comp > 0) \ - tmp = RB_RIGHT(tmp, field); \ - else \ - return (tmp); \ - } \ - return (NULL); \ -} \ - \ -/* Finds the first node greater than or equal to the search key */ \ -attr struct type * \ -name##_RB_NFIND(struct name *head, struct type *elm) \ -{ \ - struct type *tmp = RB_ROOT(head); \ - struct type *res = NULL; \ - int comp; \ - while (tmp) { \ - comp = cmp(elm, tmp); \ - if (comp < 0) { \ - res = tmp; \ - tmp = RB_LEFT(tmp, field); \ - } \ - else if (comp > 0) \ - tmp = RB_RIGHT(tmp, field); \ - else \ - return (tmp); \ - } \ - return (res); \ -} \ - \ -/* ARGSUSED */ \ -attr struct type * \ -name##_RB_NEXT(struct type *elm) \ -{ \ - if (RB_RIGHT(elm, field)) { \ - elm = RB_RIGHT(elm, field); \ - while (RB_LEFT(elm, field)) \ - elm = RB_LEFT(elm, field); \ - } else { \ - if (RB_PARENT(elm, field) && \ - (elm == RB_LEFT(RB_PARENT(elm, field), field))) \ - elm = RB_PARENT(elm, field); \ - else { \ - while (RB_PARENT(elm, field) && \ - (elm == RB_RIGHT(RB_PARENT(elm, field), field))) \ - elm = RB_PARENT(elm, field); \ - elm = RB_PARENT(elm, field); \ - } \ - } \ - return (elm); \ -} \ - \ -/* ARGSUSED */ \ -attr struct type * \ -name##_RB_PREV(struct type *elm) \ -{ \ - if (RB_LEFT(elm, field)) { \ - elm = RB_LEFT(elm, field); \ - while (RB_RIGHT(elm, field)) \ - elm = RB_RIGHT(elm, field); \ - } else { \ - if (RB_PARENT(elm, field) && \ - (elm == RB_RIGHT(RB_PARENT(elm, field), field))) \ - elm = RB_PARENT(elm, field); \ - else { \ - while (RB_PARENT(elm, field) && \ - (elm == RB_LEFT(RB_PARENT(elm, field), field))) \ - elm = RB_PARENT(elm, field); \ - elm = RB_PARENT(elm, field); \ - } \ - } \ - return (elm); \ -} \ - \ -attr struct type * \ -name##_RB_MINMAX(struct name *head, int val) \ -{ \ - struct type *tmp = RB_ROOT(head); \ - struct type *parent = NULL; \ - while (tmp) { \ - parent = tmp; \ - if (val < 0) \ - tmp = RB_LEFT(tmp, field); \ - else \ - tmp = RB_RIGHT(tmp, field); \ - } \ - return (parent); \ -} - -#define RB_NEGINF -1 -#define RB_INF 1 - -#define RB_INSERT(name, x, y) name##_RB_INSERT(x, y) -#define RB_REMOVE(name, x, y) name##_RB_REMOVE(x, y) -#define RB_FIND(name, x, y) name##_RB_FIND(x, y) -#define RB_NFIND(name, x, y) name##_RB_NFIND(x, y) -#define RB_NEXT(name, x, y) name##_RB_NEXT(y) -#define RB_PREV(name, x, y) name##_RB_PREV(y) -#define RB_MIN(name, x) name##_RB_MINMAX(x, RB_NEGINF) -#define RB_MAX(name, x) name##_RB_MINMAX(x, RB_INF) - -#define RB_FOREACH(x, name, head) \ - for ((x) = RB_MIN(name, head); \ - (x) != NULL; \ - (x) = name##_RB_NEXT(x)) - -#define RB_FOREACH_FROM(x, name, y) \ - for ((x) = (y); \ - ((x) != NULL) && ((y) = name##_RB_NEXT(x), (x) != NULL); \ - (x) = (y)) - -#define RB_FOREACH_SAFE(x, name, head, y) \ - for ((x) = RB_MIN(name, head); \ - ((x) != NULL) && ((y) = name##_RB_NEXT(x), (x) != NULL); \ - (x) = (y)) - -#define RB_FOREACH_REVERSE(x, name, head) \ - for ((x) = RB_MAX(name, head); \ - (x) != NULL; \ - (x) = name##_RB_PREV(x)) - -#define RB_FOREACH_REVERSE_FROM(x, name, y) \ - for ((x) = (y); \ - ((x) != NULL) && ((y) = name##_RB_PREV(x), (x) != NULL); \ - (x) = (y)) - -#define RB_FOREACH_REVERSE_SAFE(x, name, head, y) \ - for ((x) = RB_MAX(name, head); \ - ((x) != NULL) && ((y) = name##_RB_PREV(x), (x) != NULL); \ - (x) = (y)) - -#endif /* UV_TREE_H_ */ diff --git a/outside/libuv-v1.7.5/include/uv-aix.h b/outside/libuv-v1.7.5/include/uv-aix.h deleted file mode 100644 index 7dc992fa6..000000000 --- a/outside/libuv-v1.7.5/include/uv-aix.h +++ /dev/null @@ -1,32 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#ifndef UV_AIX_H -#define UV_AIX_H - -#define UV_PLATFORM_LOOP_FIELDS \ - int fs_fd; \ - -#define UV_PLATFORM_FS_EVENT_FIELDS \ - uv__io_t event_watcher; \ - char *dir_filename; \ - -#endif /* UV_AIX_H */ diff --git a/outside/libuv-v1.7.5/include/uv-bsd.h b/outside/libuv-v1.7.5/include/uv-bsd.h deleted file mode 100644 index 2d72b3d77..000000000 --- a/outside/libuv-v1.7.5/include/uv-bsd.h +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#ifndef UV_BSD_H -#define UV_BSD_H - -#define UV_PLATFORM_FS_EVENT_FIELDS \ - uv__io_t event_watcher; \ - -#define UV_IO_PRIVATE_PLATFORM_FIELDS \ - int rcount; \ - int wcount; \ - -#define UV_HAVE_KQUEUE 1 - -#endif /* UV_BSD_H */ diff --git a/outside/libuv-v1.7.5/include/uv-darwin.h b/outside/libuv-v1.7.5/include/uv-darwin.h deleted file mode 100644 index d22641582..000000000 --- a/outside/libuv-v1.7.5/include/uv-darwin.h +++ /dev/null @@ -1,61 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#ifndef UV_DARWIN_H -#define UV_DARWIN_H - -#if defined(__APPLE__) && defined(__MACH__) -# include -# include -# include -# include -# define UV_PLATFORM_SEM_T semaphore_t -#endif - -#define UV_IO_PRIVATE_PLATFORM_FIELDS \ - int rcount; \ - int wcount; \ - -#define UV_PLATFORM_LOOP_FIELDS \ - uv_thread_t cf_thread; \ - void* _cf_reserved; \ - void* cf_state; \ - uv_mutex_t cf_mutex; \ - uv_sem_t cf_sem; \ - void* cf_signals[2]; \ - -#define UV_PLATFORM_FS_EVENT_FIELDS \ - uv__io_t event_watcher; \ - char* realpath; \ - int realpath_len; \ - int cf_flags; \ - uv_async_t* cf_cb; \ - void* cf_events[2]; \ - void* cf_member[2]; \ - int cf_error; \ - uv_mutex_t cf_mutex; \ - -#define UV_STREAM_PRIVATE_PLATFORM_FIELDS \ - void* select; \ - -#define UV_HAVE_KQUEUE 1 - -#endif /* UV_DARWIN_H */ diff --git a/outside/libuv-v1.7.5/include/uv-errno.h b/outside/libuv-v1.7.5/include/uv-errno.h deleted file mode 100644 index 53f30296c..000000000 --- a/outside/libuv-v1.7.5/include/uv-errno.h +++ /dev/null @@ -1,418 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#ifndef UV_ERRNO_H_ -#define UV_ERRNO_H_ - -#include - -#define UV__EOF (-4095) -#define UV__UNKNOWN (-4094) - -#define UV__EAI_ADDRFAMILY (-3000) -#define UV__EAI_AGAIN (-3001) -#define UV__EAI_BADFLAGS (-3002) -#define UV__EAI_CANCELED (-3003) -#define UV__EAI_FAIL (-3004) -#define UV__EAI_FAMILY (-3005) -#define UV__EAI_MEMORY (-3006) -#define UV__EAI_NODATA (-3007) -#define UV__EAI_NONAME (-3008) -#define UV__EAI_OVERFLOW (-3009) -#define UV__EAI_SERVICE (-3010) -#define UV__EAI_SOCKTYPE (-3011) -#define UV__EAI_BADHINTS (-3013) -#define UV__EAI_PROTOCOL (-3014) - -/* Only map to the system errno on non-Windows platforms. It's apparently - * a fairly common practice for Windows programmers to redefine errno codes. - */ -#if defined(E2BIG) && !defined(_WIN32) -# define UV__E2BIG (-E2BIG) -#else -# define UV__E2BIG (-4093) -#endif - -#if defined(EACCES) && !defined(_WIN32) -# define UV__EACCES (-EACCES) -#else -# define UV__EACCES (-4092) -#endif - -#if defined(EADDRINUSE) && !defined(_WIN32) -# define UV__EADDRINUSE (-EADDRINUSE) -#else -# define UV__EADDRINUSE (-4091) -#endif - -#if defined(EADDRNOTAVAIL) && !defined(_WIN32) -# define UV__EADDRNOTAVAIL (-EADDRNOTAVAIL) -#else -# define UV__EADDRNOTAVAIL (-4090) -#endif - -#if defined(EAFNOSUPPORT) && !defined(_WIN32) -# define UV__EAFNOSUPPORT (-EAFNOSUPPORT) -#else -# define UV__EAFNOSUPPORT (-4089) -#endif - -#if defined(EAGAIN) && !defined(_WIN32) -# define UV__EAGAIN (-EAGAIN) -#else -# define UV__EAGAIN (-4088) -#endif - -#if defined(EALREADY) && !defined(_WIN32) -# define UV__EALREADY (-EALREADY) -#else -# define UV__EALREADY (-4084) -#endif - -#if defined(EBADF) && !defined(_WIN32) -# define UV__EBADF (-EBADF) -#else -# define UV__EBADF (-4083) -#endif - -#if defined(EBUSY) && !defined(_WIN32) -# define UV__EBUSY (-EBUSY) -#else -# define UV__EBUSY (-4082) -#endif - -#if defined(ECANCELED) && !defined(_WIN32) -# define UV__ECANCELED (-ECANCELED) -#else -# define UV__ECANCELED (-4081) -#endif - -#if defined(ECHARSET) && !defined(_WIN32) -# define UV__ECHARSET (-ECHARSET) -#else -# define UV__ECHARSET (-4080) -#endif - -#if defined(ECONNABORTED) && !defined(_WIN32) -# define UV__ECONNABORTED (-ECONNABORTED) -#else -# define UV__ECONNABORTED (-4079) -#endif - -#if defined(ECONNREFUSED) && !defined(_WIN32) -# define UV__ECONNREFUSED (-ECONNREFUSED) -#else -# define UV__ECONNREFUSED (-4078) -#endif - -#if defined(ECONNRESET) && !defined(_WIN32) -# define UV__ECONNRESET (-ECONNRESET) -#else -# define UV__ECONNRESET (-4077) -#endif - -#if defined(EDESTADDRREQ) && !defined(_WIN32) -# define UV__EDESTADDRREQ (-EDESTADDRREQ) -#else -# define UV__EDESTADDRREQ (-4076) -#endif - -#if defined(EEXIST) && !defined(_WIN32) -# define UV__EEXIST (-EEXIST) -#else -# define UV__EEXIST (-4075) -#endif - -#if defined(EFAULT) && !defined(_WIN32) -# define UV__EFAULT (-EFAULT) -#else -# define UV__EFAULT (-4074) -#endif - -#if defined(EHOSTUNREACH) && !defined(_WIN32) -# define UV__EHOSTUNREACH (-EHOSTUNREACH) -#else -# define UV__EHOSTUNREACH (-4073) -#endif - -#if defined(EINTR) && !defined(_WIN32) -# define UV__EINTR (-EINTR) -#else -# define UV__EINTR (-4072) -#endif - -#if defined(EINVAL) && !defined(_WIN32) -# define UV__EINVAL (-EINVAL) -#else -# define UV__EINVAL (-4071) -#endif - -#if defined(EIO) && !defined(_WIN32) -# define UV__EIO (-EIO) -#else -# define UV__EIO (-4070) -#endif - -#if defined(EISCONN) && !defined(_WIN32) -# define UV__EISCONN (-EISCONN) -#else -# define UV__EISCONN (-4069) -#endif - -#if defined(EISDIR) && !defined(_WIN32) -# define UV__EISDIR (-EISDIR) -#else -# define UV__EISDIR (-4068) -#endif - -#if defined(ELOOP) && !defined(_WIN32) -# define UV__ELOOP (-ELOOP) -#else -# define UV__ELOOP (-4067) -#endif - -#if defined(EMFILE) && !defined(_WIN32) -# define UV__EMFILE (-EMFILE) -#else -# define UV__EMFILE (-4066) -#endif - -#if defined(EMSGSIZE) && !defined(_WIN32) -# define UV__EMSGSIZE (-EMSGSIZE) -#else -# define UV__EMSGSIZE (-4065) -#endif - -#if defined(ENAMETOOLONG) && !defined(_WIN32) -# define UV__ENAMETOOLONG (-ENAMETOOLONG) -#else -# define UV__ENAMETOOLONG (-4064) -#endif - -#if defined(ENETDOWN) && !defined(_WIN32) -# define UV__ENETDOWN (-ENETDOWN) -#else -# define UV__ENETDOWN (-4063) -#endif - -#if defined(ENETUNREACH) && !defined(_WIN32) -# define UV__ENETUNREACH (-ENETUNREACH) -#else -# define UV__ENETUNREACH (-4062) -#endif - -#if defined(ENFILE) && !defined(_WIN32) -# define UV__ENFILE (-ENFILE) -#else -# define UV__ENFILE (-4061) -#endif - -#if defined(ENOBUFS) && !defined(_WIN32) -# define UV__ENOBUFS (-ENOBUFS) -#else -# define UV__ENOBUFS (-4060) -#endif - -#if defined(ENODEV) && !defined(_WIN32) -# define UV__ENODEV (-ENODEV) -#else -# define UV__ENODEV (-4059) -#endif - -#if defined(ENOENT) && !defined(_WIN32) -# define UV__ENOENT (-ENOENT) -#else -# define UV__ENOENT (-4058) -#endif - -#if defined(ENOMEM) && !defined(_WIN32) -# define UV__ENOMEM (-ENOMEM) -#else -# define UV__ENOMEM (-4057) -#endif - -#if defined(ENONET) && !defined(_WIN32) -# define UV__ENONET (-ENONET) -#else -# define UV__ENONET (-4056) -#endif - -#if defined(ENOSPC) && !defined(_WIN32) -# define UV__ENOSPC (-ENOSPC) -#else -# define UV__ENOSPC (-4055) -#endif - -#if defined(ENOSYS) && !defined(_WIN32) -# define UV__ENOSYS (-ENOSYS) -#else -# define UV__ENOSYS (-4054) -#endif - -#if defined(ENOTCONN) && !defined(_WIN32) -# define UV__ENOTCONN (-ENOTCONN) -#else -# define UV__ENOTCONN (-4053) -#endif - -#if defined(ENOTDIR) && !defined(_WIN32) -# define UV__ENOTDIR (-ENOTDIR) -#else -# define UV__ENOTDIR (-4052) -#endif - -#if defined(ENOTEMPTY) && !defined(_WIN32) -# define UV__ENOTEMPTY (-ENOTEMPTY) -#else -# define UV__ENOTEMPTY (-4051) -#endif - -#if defined(ENOTSOCK) && !defined(_WIN32) -# define UV__ENOTSOCK (-ENOTSOCK) -#else -# define UV__ENOTSOCK (-4050) -#endif - -#if defined(ENOTSUP) && !defined(_WIN32) -# define UV__ENOTSUP (-ENOTSUP) -#else -# define UV__ENOTSUP (-4049) -#endif - -#if defined(EPERM) && !defined(_WIN32) -# define UV__EPERM (-EPERM) -#else -# define UV__EPERM (-4048) -#endif - -#if defined(EPIPE) && !defined(_WIN32) -# define UV__EPIPE (-EPIPE) -#else -# define UV__EPIPE (-4047) -#endif - -#if defined(EPROTO) && !defined(_WIN32) -# define UV__EPROTO (-EPROTO) -#else -# define UV__EPROTO (-4046) -#endif - -#if defined(EPROTONOSUPPORT) && !defined(_WIN32) -# define UV__EPROTONOSUPPORT (-EPROTONOSUPPORT) -#else -# define UV__EPROTONOSUPPORT (-4045) -#endif - -#if defined(EPROTOTYPE) && !defined(_WIN32) -# define UV__EPROTOTYPE (-EPROTOTYPE) -#else -# define UV__EPROTOTYPE (-4044) -#endif - -#if defined(EROFS) && !defined(_WIN32) -# define UV__EROFS (-EROFS) -#else -# define UV__EROFS (-4043) -#endif - -#if defined(ESHUTDOWN) && !defined(_WIN32) -# define UV__ESHUTDOWN (-ESHUTDOWN) -#else -# define UV__ESHUTDOWN (-4042) -#endif - -#if defined(ESPIPE) && !defined(_WIN32) -# define UV__ESPIPE (-ESPIPE) -#else -# define UV__ESPIPE (-4041) -#endif - -#if defined(ESRCH) && !defined(_WIN32) -# define UV__ESRCH (-ESRCH) -#else -# define UV__ESRCH (-4040) -#endif - -#if defined(ETIMEDOUT) && !defined(_WIN32) -# define UV__ETIMEDOUT (-ETIMEDOUT) -#else -# define UV__ETIMEDOUT (-4039) -#endif - -#if defined(ETXTBSY) && !defined(_WIN32) -# define UV__ETXTBSY (-ETXTBSY) -#else -# define UV__ETXTBSY (-4038) -#endif - -#if defined(EXDEV) && !defined(_WIN32) -# define UV__EXDEV (-EXDEV) -#else -# define UV__EXDEV (-4037) -#endif - -#if defined(EFBIG) && !defined(_WIN32) -# define UV__EFBIG (-EFBIG) -#else -# define UV__EFBIG (-4036) -#endif - -#if defined(ENOPROTOOPT) && !defined(_WIN32) -# define UV__ENOPROTOOPT (-ENOPROTOOPT) -#else -# define UV__ENOPROTOOPT (-4035) -#endif - -#if defined(ERANGE) && !defined(_WIN32) -# define UV__ERANGE (-ERANGE) -#else -# define UV__ERANGE (-4034) -#endif - -#if defined(ENXIO) && !defined(_WIN32) -# define UV__ENXIO (-ENXIO) -#else -# define UV__ENXIO (-4033) -#endif - -#if defined(EMLINK) && !defined(_WIN32) -# define UV__EMLINK (-EMLINK) -#else -# define UV__EMLINK (-4032) -#endif - -/* EHOSTDOWN is not visible on BSD-like systems when _POSIX_C_SOURCE is - * defined. Fortunately, its value is always 64 so it's possible albeit - * icky to hard-code it. - */ -#if defined(EHOSTDOWN) && !defined(_WIN32) -# define UV__EHOSTDOWN (-EHOSTDOWN) -#elif defined(__APPLE__) || \ - defined(__DragonFly__) || \ - defined(__FreeBSD__) || \ - defined(__NetBSD__) || \ - defined(__OpenBSD__) -# define UV__EHOSTDOWN (-64) -#else -# define UV__EHOSTDOWN (-4031) -#endif - -#endif /* UV_ERRNO_H_ */ diff --git a/outside/libuv-v1.7.5/include/uv-linux.h b/outside/libuv-v1.7.5/include/uv-linux.h deleted file mode 100644 index 9b38405a1..000000000 --- a/outside/libuv-v1.7.5/include/uv-linux.h +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#ifndef UV_LINUX_H -#define UV_LINUX_H - -#define UV_PLATFORM_LOOP_FIELDS \ - uv__io_t inotify_read_watcher; \ - void* inotify_watchers; \ - int inotify_fd; \ - -#define UV_PLATFORM_FS_EVENT_FIELDS \ - void* watchers[2]; \ - int wd; \ - -#endif /* UV_LINUX_H */ diff --git a/outside/libuv-v1.7.5/include/uv-sunos.h b/outside/libuv-v1.7.5/include/uv-sunos.h deleted file mode 100644 index 042166424..000000000 --- a/outside/libuv-v1.7.5/include/uv-sunos.h +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#ifndef UV_SUNOS_H -#define UV_SUNOS_H - -#include -#include - -/* For the sake of convenience and reduced #ifdef-ery in src/unix/sunos.c, - * add the fs_event fields even when this version of SunOS doesn't support - * file watching. - */ -#define UV_PLATFORM_LOOP_FIELDS \ - uv__io_t fs_event_watcher; \ - int fs_fd; \ - -#if defined(PORT_SOURCE_FILE) - -# define UV_PLATFORM_FS_EVENT_FIELDS \ - file_obj_t fo; \ - int fd; \ - -#endif /* defined(PORT_SOURCE_FILE) */ - -#endif /* UV_SUNOS_H */ diff --git a/outside/libuv-v1.7.5/include/uv-threadpool.h b/outside/libuv-v1.7.5/include/uv-threadpool.h deleted file mode 100644 index 9708ebdd5..000000000 --- a/outside/libuv-v1.7.5/include/uv-threadpool.h +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -/* - * This file is private to libuv. It provides common functionality to both - * Windows and Unix backends. - */ - -#ifndef UV_THREADPOOL_H_ -#define UV_THREADPOOL_H_ - -struct uv__work { - void (*work)(struct uv__work *w); - void (*done)(struct uv__work *w, int status); - struct uv_loop_s* loop; - void* wq[2]; -}; - -#endif /* UV_THREADPOOL_H_ */ diff --git a/outside/libuv-v1.7.5/include/uv-unix.h b/outside/libuv-v1.7.5/include/uv-unix.h deleted file mode 100644 index 82d193bdc..000000000 --- a/outside/libuv-v1.7.5/include/uv-unix.h +++ /dev/null @@ -1,383 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#ifndef UV_UNIX_H -#define UV_UNIX_H - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#ifdef __ANDROID__ -#include "pthread-fixes.h" -#endif -#include - -#include "uv-threadpool.h" - -#if defined(__linux__) -# include "uv-linux.h" -#elif defined(_AIX) -# include "uv-aix.h" -#elif defined(__sun) -# include "uv-sunos.h" -#elif defined(__APPLE__) -# include "uv-darwin.h" -#elif defined(__DragonFly__) || \ - defined(__FreeBSD__) || \ - defined(__OpenBSD__) || \ - defined(__NetBSD__) -# include "uv-bsd.h" -#endif - -#ifndef NI_MAXHOST -# define NI_MAXHOST 1025 -#endif - -#ifndef NI_MAXSERV -# define NI_MAXSERV 32 -#endif - -#ifndef UV_IO_PRIVATE_PLATFORM_FIELDS -# define UV_IO_PRIVATE_PLATFORM_FIELDS /* empty */ -#endif - -struct uv__io_s; -struct uv__async; -struct uv_loop_s; - -typedef void (*uv__io_cb)(struct uv_loop_s* loop, - struct uv__io_s* w, - unsigned int events); -typedef struct uv__io_s uv__io_t; - -struct uv__io_s { - uv__io_cb cb; - void* pending_queue[2]; - void* watcher_queue[2]; - unsigned int pevents; /* Pending event mask i.e. mask at next tick. */ - unsigned int events; /* Current event mask. */ - int fd; - UV_IO_PRIVATE_PLATFORM_FIELDS -}; - -typedef void (*uv__async_cb)(struct uv_loop_s* loop, - struct uv__async* w, - unsigned int nevents); - -struct uv__async { - uv__async_cb cb; - uv__io_t io_watcher; - int wfd; -}; - -#ifndef UV_PLATFORM_SEM_T -# define UV_PLATFORM_SEM_T sem_t -#endif - -#ifndef UV_PLATFORM_LOOP_FIELDS -# define UV_PLATFORM_LOOP_FIELDS /* empty */ -#endif - -#ifndef UV_PLATFORM_FS_EVENT_FIELDS -# define UV_PLATFORM_FS_EVENT_FIELDS /* empty */ -#endif - -#ifndef UV_STREAM_PRIVATE_PLATFORM_FIELDS -# define UV_STREAM_PRIVATE_PLATFORM_FIELDS /* empty */ -#endif - -/* Note: May be cast to struct iovec. See writev(2). */ -typedef struct uv_buf_t { - char* base; - size_t len; -} uv_buf_t; - -typedef int uv_file; -typedef int uv_os_sock_t; -typedef int uv_os_fd_t; - -#define UV_ONCE_INIT PTHREAD_ONCE_INIT - -typedef pthread_once_t uv_once_t; -typedef pthread_t uv_thread_t; -typedef pthread_mutex_t uv_mutex_t; -typedef pthread_rwlock_t uv_rwlock_t; -typedef UV_PLATFORM_SEM_T uv_sem_t; -typedef pthread_cond_t uv_cond_t; -typedef pthread_key_t uv_key_t; - -#if defined(__APPLE__) && defined(__MACH__) - -typedef struct { - unsigned int n; - unsigned int count; - uv_mutex_t mutex; - uv_sem_t turnstile1; - uv_sem_t turnstile2; -} uv_barrier_t; - -#else /* defined(__APPLE__) && defined(__MACH__) */ - -typedef pthread_barrier_t uv_barrier_t; - -#endif /* defined(__APPLE__) && defined(__MACH__) */ - -/* Platform-specific definitions for uv_spawn support. */ -typedef gid_t uv_gid_t; -typedef uid_t uv_uid_t; - -typedef struct dirent uv__dirent_t; - -#if defined(DT_UNKNOWN) -# define HAVE_DIRENT_TYPES -# if defined(DT_REG) -# define UV__DT_FILE DT_REG -# else -# define UV__DT_FILE -1 -# endif -# if defined(DT_DIR) -# define UV__DT_DIR DT_DIR -# else -# define UV__DT_DIR -2 -# endif -# if defined(DT_LNK) -# define UV__DT_LINK DT_LNK -# else -# define UV__DT_LINK -3 -# endif -# if defined(DT_FIFO) -# define UV__DT_FIFO DT_FIFO -# else -# define UV__DT_FIFO -4 -# endif -# if defined(DT_SOCK) -# define UV__DT_SOCKET DT_SOCK -# else -# define UV__DT_SOCKET -5 -# endif -# if defined(DT_CHR) -# define UV__DT_CHAR DT_CHR -# else -# define UV__DT_CHAR -6 -# endif -# if defined(DT_BLK) -# define UV__DT_BLOCK DT_BLK -# else -# define UV__DT_BLOCK -7 -# endif -#endif - -/* Platform-specific definitions for uv_dlopen support. */ -#define UV_DYNAMIC /* empty */ - -typedef struct { - void* handle; - char* errmsg; -} uv_lib_t; - -#define UV_LOOP_PRIVATE_FIELDS \ - unsigned long flags; \ - int backend_fd; \ - void* pending_queue[2]; \ - void* watcher_queue[2]; \ - uv__io_t** watchers; \ - unsigned int nwatchers; \ - unsigned int nfds; \ - void* wq[2]; \ - uv_mutex_t wq_mutex; \ - uv_async_t wq_async; \ - uv_rwlock_t cloexec_lock; \ - uv_handle_t* closing_handles; \ - void* process_handles[2]; \ - void* prepare_handles[2]; \ - void* check_handles[2]; \ - void* idle_handles[2]; \ - void* async_handles[2]; \ - struct uv__async async_watcher; \ - struct { \ - void* min; \ - unsigned int nelts; \ - } timer_heap; \ - uint64_t timer_counter; \ - uint64_t time; \ - int signal_pipefd[2]; \ - uv__io_t signal_io_watcher; \ - uv_signal_t child_watcher; \ - int emfile_fd; \ - UV_PLATFORM_LOOP_FIELDS \ - -#define UV_REQ_TYPE_PRIVATE /* empty */ - -#define UV_REQ_PRIVATE_FIELDS /* empty */ - -#define UV_PRIVATE_REQ_TYPES /* empty */ - -#define UV_WRITE_PRIVATE_FIELDS \ - void* queue[2]; \ - unsigned int write_index; \ - uv_buf_t* bufs; \ - unsigned int nbufs; \ - int error; \ - uv_buf_t bufsml[4]; \ - -#define UV_CONNECT_PRIVATE_FIELDS \ - void* queue[2]; \ - -#define UV_SHUTDOWN_PRIVATE_FIELDS /* empty */ - -#define UV_UDP_SEND_PRIVATE_FIELDS \ - void* queue[2]; \ - struct sockaddr_storage addr; \ - unsigned int nbufs; \ - uv_buf_t* bufs; \ - ssize_t status; \ - uv_udp_send_cb send_cb; \ - uv_buf_t bufsml[4]; \ - -#define UV_HANDLE_PRIVATE_FIELDS \ - uv_handle_t* next_closing; \ - unsigned int flags; \ - -#define UV_STREAM_PRIVATE_FIELDS \ - uv_connect_t *connect_req; \ - uv_shutdown_t *shutdown_req; \ - uv__io_t io_watcher; \ - void* write_queue[2]; \ - void* write_completed_queue[2]; \ - uv_connection_cb connection_cb; \ - int delayed_error; \ - int accepted_fd; \ - void* queued_fds; \ - UV_STREAM_PRIVATE_PLATFORM_FIELDS \ - -#define UV_TCP_PRIVATE_FIELDS /* empty */ - -#define UV_UDP_PRIVATE_FIELDS \ - uv_alloc_cb alloc_cb; \ - uv_udp_recv_cb recv_cb; \ - uv__io_t io_watcher; \ - void* write_queue[2]; \ - void* write_completed_queue[2]; \ - -#define UV_PIPE_PRIVATE_FIELDS \ - const char* pipe_fname; /* strdup'ed */ - -#define UV_POLL_PRIVATE_FIELDS \ - uv__io_t io_watcher; - -#define UV_PREPARE_PRIVATE_FIELDS \ - uv_prepare_cb prepare_cb; \ - void* queue[2]; \ - -#define UV_CHECK_PRIVATE_FIELDS \ - uv_check_cb check_cb; \ - void* queue[2]; \ - -#define UV_IDLE_PRIVATE_FIELDS \ - uv_idle_cb idle_cb; \ - void* queue[2]; \ - -#define UV_ASYNC_PRIVATE_FIELDS \ - uv_async_cb async_cb; \ - void* queue[2]; \ - int pending; \ - -#define UV_TIMER_PRIVATE_FIELDS \ - uv_timer_cb timer_cb; \ - void* heap_node[3]; \ - uint64_t timeout; \ - uint64_t repeat; \ - uint64_t start_id; - -#define UV_GETADDRINFO_PRIVATE_FIELDS \ - struct uv__work work_req; \ - uv_getaddrinfo_cb cb; \ - struct addrinfo* hints; \ - char* hostname; \ - char* service; \ - struct addrinfo* addrinfo; \ - int retcode; - -#define UV_GETNAMEINFO_PRIVATE_FIELDS \ - struct uv__work work_req; \ - uv_getnameinfo_cb getnameinfo_cb; \ - struct sockaddr_storage storage; \ - int flags; \ - char host[NI_MAXHOST]; \ - char service[NI_MAXSERV]; \ - int retcode; - -#define UV_PROCESS_PRIVATE_FIELDS \ - void* queue[2]; \ - int status; \ - -#define UV_FS_PRIVATE_FIELDS \ - const char *new_path; \ - uv_file file; \ - int flags; \ - mode_t mode; \ - unsigned int nbufs; \ - uv_buf_t* bufs; \ - off_t off; \ - uv_uid_t uid; \ - uv_gid_t gid; \ - double atime; \ - double mtime; \ - struct uv__work work_req; \ - uv_buf_t bufsml[4]; \ - -#define UV_WORK_PRIVATE_FIELDS \ - struct uv__work work_req; - -#define UV_TTY_PRIVATE_FIELDS \ - struct termios orig_termios; \ - int mode; - -#define UV_SIGNAL_PRIVATE_FIELDS \ - /* RB_ENTRY(uv_signal_s) tree_entry; */ \ - struct { \ - struct uv_signal_s* rbe_left; \ - struct uv_signal_s* rbe_right; \ - struct uv_signal_s* rbe_parent; \ - int rbe_color; \ - } tree_entry; \ - /* Use two counters here so we don have to fiddle with atomics. */ \ - unsigned int caught_signals; \ - unsigned int dispatched_signals; - -#define UV_FS_EVENT_PRIVATE_FIELDS \ - uv_fs_event_cb cb; \ - UV_PLATFORM_FS_EVENT_FIELDS \ - -#endif /* UV_UNIX_H */ diff --git a/outside/libuv-v1.7.5/include/uv-version.h b/outside/libuv-v1.7.5/include/uv-version.h deleted file mode 100644 index e1f26601a..000000000 --- a/outside/libuv-v1.7.5/include/uv-version.h +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#ifndef UV_VERSION_H -#define UV_VERSION_H - - /* - * Versions with the same major number are ABI stable. API is allowed to - * evolve between minor releases, but only in a backwards compatible way. - * Make sure you update the -soname directives in configure.ac - * and uv.gyp whenever you bump UV_VERSION_MAJOR or UV_VERSION_MINOR (but - * not UV_VERSION_PATCH.) - */ - -#define UV_VERSION_MAJOR 1 -#define UV_VERSION_MINOR 7 -#define UV_VERSION_PATCH 5 -#define UV_VERSION_IS_RELEASE 1 -#define UV_VERSION_SUFFIX "" - -#define UV_VERSION_HEX ((UV_VERSION_MAJOR << 16) | \ - (UV_VERSION_MINOR << 8) | \ - (UV_VERSION_PATCH)) - -#endif /* UV_VERSION_H */ diff --git a/outside/libuv-v1.7.5/include/uv-win.h b/outside/libuv-v1.7.5/include/uv-win.h deleted file mode 100644 index 300be4762..000000000 --- a/outside/libuv-v1.7.5/include/uv-win.h +++ /dev/null @@ -1,653 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#ifndef _WIN32_WINNT -# define _WIN32_WINNT 0x0502 -#endif - -#if !defined(_SSIZE_T_) && !defined(_SSIZE_T_DEFINED) -typedef intptr_t ssize_t; -# define _SSIZE_T_ -# define _SSIZE_T_DEFINED -#endif - -#include - -#if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR) -typedef struct pollfd { - SOCKET fd; - short events; - short revents; -} WSAPOLLFD, *PWSAPOLLFD, *LPWSAPOLLFD; -#endif - -#ifndef LOCALE_INVARIANT -# define LOCALE_INVARIANT 0x007f -#endif - -#include -#include -#include - -#include -#include -#include - -#if defined(_MSC_VER) && _MSC_VER < 1600 -# include "stdint-msvc2008.h" -#else -# include -#endif - -#include "tree.h" -#include "uv-threadpool.h" - -#define MAX_PIPENAME_LEN 256 - -#ifndef S_IFLNK -# define S_IFLNK 0xA000 -#endif - -/* Additional signals supported by uv_signal and or uv_kill. The CRT defines - * the following signals already: - * - * #define SIGINT 2 - * #define SIGILL 4 - * #define SIGABRT_COMPAT 6 - * #define SIGFPE 8 - * #define SIGSEGV 11 - * #define SIGTERM 15 - * #define SIGBREAK 21 - * #define SIGABRT 22 - * - * The additional signals have values that are common on other Unix - * variants (Linux and Darwin) - */ -#define SIGHUP 1 -#define SIGKILL 9 -#define SIGWINCH 28 - -/* The CRT defines SIGABRT_COMPAT as 6, which equals SIGABRT on many */ -/* unix-like platforms. However MinGW doesn't define it, so we do. */ -#ifndef SIGABRT_COMPAT -# define SIGABRT_COMPAT 6 -#endif - -/* - * Guids and typedefs for winsock extension functions - * Mingw32 doesn't have these :-( - */ -#ifndef WSAID_ACCEPTEX -# define WSAID_ACCEPTEX \ - {0xb5367df1, 0xcbac, 0x11cf, \ - {0x95, 0xca, 0x00, 0x80, 0x5f, 0x48, 0xa1, 0x92}} - -# define WSAID_CONNECTEX \ - {0x25a207b9, 0xddf3, 0x4660, \ - {0x8e, 0xe9, 0x76, 0xe5, 0x8c, 0x74, 0x06, 0x3e}} - -# define WSAID_GETACCEPTEXSOCKADDRS \ - {0xb5367df2, 0xcbac, 0x11cf, \ - {0x95, 0xca, 0x00, 0x80, 0x5f, 0x48, 0xa1, 0x92}} - -# define WSAID_DISCONNECTEX \ - {0x7fda2e11, 0x8630, 0x436f, \ - {0xa0, 0x31, 0xf5, 0x36, 0xa6, 0xee, 0xc1, 0x57}} - -# define WSAID_TRANSMITFILE \ - {0xb5367df0, 0xcbac, 0x11cf, \ - {0x95, 0xca, 0x00, 0x80, 0x5f, 0x48, 0xa1, 0x92}} - - typedef BOOL PASCAL (*LPFN_ACCEPTEX) - (SOCKET sListenSocket, - SOCKET sAcceptSocket, - PVOID lpOutputBuffer, - DWORD dwReceiveDataLength, - DWORD dwLocalAddressLength, - DWORD dwRemoteAddressLength, - LPDWORD lpdwBytesReceived, - LPOVERLAPPED lpOverlapped); - - typedef BOOL PASCAL (*LPFN_CONNECTEX) - (SOCKET s, - const struct sockaddr* name, - int namelen, - PVOID lpSendBuffer, - DWORD dwSendDataLength, - LPDWORD lpdwBytesSent, - LPOVERLAPPED lpOverlapped); - - typedef void PASCAL (*LPFN_GETACCEPTEXSOCKADDRS) - (PVOID lpOutputBuffer, - DWORD dwReceiveDataLength, - DWORD dwLocalAddressLength, - DWORD dwRemoteAddressLength, - LPSOCKADDR* LocalSockaddr, - LPINT LocalSockaddrLength, - LPSOCKADDR* RemoteSockaddr, - LPINT RemoteSockaddrLength); - - typedef BOOL PASCAL (*LPFN_DISCONNECTEX) - (SOCKET hSocket, - LPOVERLAPPED lpOverlapped, - DWORD dwFlags, - DWORD reserved); - - typedef BOOL PASCAL (*LPFN_TRANSMITFILE) - (SOCKET hSocket, - HANDLE hFile, - DWORD nNumberOfBytesToWrite, - DWORD nNumberOfBytesPerSend, - LPOVERLAPPED lpOverlapped, - LPTRANSMIT_FILE_BUFFERS lpTransmitBuffers, - DWORD dwFlags); - - typedef PVOID RTL_SRWLOCK; - typedef RTL_SRWLOCK SRWLOCK, *PSRWLOCK; -#endif - -typedef int (WSAAPI* LPFN_WSARECV) - (SOCKET socket, - LPWSABUF buffers, - DWORD buffer_count, - LPDWORD bytes, - LPDWORD flags, - LPWSAOVERLAPPED overlapped, - LPWSAOVERLAPPED_COMPLETION_ROUTINE completion_routine); - -typedef int (WSAAPI* LPFN_WSARECVFROM) - (SOCKET socket, - LPWSABUF buffers, - DWORD buffer_count, - LPDWORD bytes, - LPDWORD flags, - struct sockaddr* addr, - LPINT addr_len, - LPWSAOVERLAPPED overlapped, - LPWSAOVERLAPPED_COMPLETION_ROUTINE completion_routine); - -#ifndef _NTDEF_ - typedef LONG NTSTATUS; - typedef NTSTATUS *PNTSTATUS; -#endif - -#ifndef RTL_CONDITION_VARIABLE_INIT - typedef PVOID CONDITION_VARIABLE, *PCONDITION_VARIABLE; -#endif - -typedef struct _AFD_POLL_HANDLE_INFO { - HANDLE Handle; - ULONG Events; - NTSTATUS Status; -} AFD_POLL_HANDLE_INFO, *PAFD_POLL_HANDLE_INFO; - -typedef struct _AFD_POLL_INFO { - LARGE_INTEGER Timeout; - ULONG NumberOfHandles; - ULONG Exclusive; - AFD_POLL_HANDLE_INFO Handles[1]; -} AFD_POLL_INFO, *PAFD_POLL_INFO; - -#define UV_MSAFD_PROVIDER_COUNT 3 - - -/** - * It should be possible to cast uv_buf_t[] to WSABUF[] - * see http://msdn.microsoft.com/en-us/library/ms741542(v=vs.85).aspx - */ -typedef struct uv_buf_t { - ULONG len; - char* base; -} uv_buf_t; - -typedef int uv_file; -typedef SOCKET uv_os_sock_t; -typedef HANDLE uv_os_fd_t; - -typedef HANDLE uv_thread_t; - -typedef HANDLE uv_sem_t; - -typedef CRITICAL_SECTION uv_mutex_t; - -/* This condition variable implementation is based on the SetEvent solution - * (section 3.2) at http://www.cs.wustl.edu/~schmidt/win32-cv-1.html - * We could not use the SignalObjectAndWait solution (section 3.4) because - * it want the 2nd argument (type uv_mutex_t) of uv_cond_wait() and - * uv_cond_timedwait() to be HANDLEs, but we use CRITICAL_SECTIONs. - */ - -typedef union { - CONDITION_VARIABLE cond_var; - struct { - unsigned int waiters_count; - CRITICAL_SECTION waiters_count_lock; - HANDLE signal_event; - HANDLE broadcast_event; - } fallback; -} uv_cond_t; - -typedef union { - struct { - unsigned int num_readers_; - CRITICAL_SECTION num_readers_lock_; - HANDLE write_semaphore_; - } state_; - /* TODO: remove me in v2.x. */ - struct { - SRWLOCK unused_; - } unused1_; - /* TODO: remove me in v2.x. */ - struct { - uv_mutex_t unused1_; - uv_mutex_t unused2_; - } unused2_; -} uv_rwlock_t; - -typedef struct { - unsigned int n; - unsigned int count; - uv_mutex_t mutex; - uv_sem_t turnstile1; - uv_sem_t turnstile2; -} uv_barrier_t; - -typedef struct { - DWORD tls_index; -} uv_key_t; - -#define UV_ONCE_INIT { 0, NULL } - -typedef struct uv_once_s { - unsigned char ran; - HANDLE event; -} uv_once_t; - -/* Platform-specific definitions for uv_spawn support. */ -typedef unsigned char uv_uid_t; -typedef unsigned char uv_gid_t; - -typedef struct uv__dirent_s { - int d_type; - char d_name[1]; -} uv__dirent_t; - -#define HAVE_DIRENT_TYPES -#define UV__DT_DIR UV_DIRENT_DIR -#define UV__DT_FILE UV_DIRENT_FILE -#define UV__DT_LINK UV_DIRENT_LINK -#define UV__DT_FIFO UV_DIRENT_FIFO -#define UV__DT_SOCKET UV_DIRENT_SOCKET -#define UV__DT_CHAR UV_DIRENT_CHAR -#define UV__DT_BLOCK UV_DIRENT_BLOCK - -/* Platform-specific definitions for uv_dlopen support. */ -#define UV_DYNAMIC FAR WINAPI -typedef struct { - HMODULE handle; - char* errmsg; -} uv_lib_t; - -RB_HEAD(uv_timer_tree_s, uv_timer_s); - -#define UV_LOOP_PRIVATE_FIELDS \ - /* The loop's I/O completion port */ \ - HANDLE iocp; \ - /* The current time according to the event loop. in msecs. */ \ - uint64_t time; \ - /* Tail of a single-linked circular queue of pending reqs. If the queue */ \ - /* is empty, tail_ is NULL. If there is only one item, */ \ - /* tail_->next_req == tail_ */ \ - uv_req_t* pending_reqs_tail; \ - /* Head of a single-linked list of closed handles */ \ - uv_handle_t* endgame_handles; \ - /* The head of the timers tree */ \ - struct uv_timer_tree_s timers; \ - /* Lists of active loop (prepare / check / idle) watchers */ \ - uv_prepare_t* prepare_handles; \ - uv_check_t* check_handles; \ - uv_idle_t* idle_handles; \ - /* This pointer will refer to the prepare/check/idle handle whose */ \ - /* callback is scheduled to be called next. This is needed to allow */ \ - /* safe removal from one of the lists above while that list being */ \ - /* iterated over. */ \ - uv_prepare_t* next_prepare_handle; \ - uv_check_t* next_check_handle; \ - uv_idle_t* next_idle_handle; \ - /* This handle holds the peer sockets for the fast variant of uv_poll_t */ \ - SOCKET poll_peer_sockets[UV_MSAFD_PROVIDER_COUNT]; \ - /* Counter to keep track of active tcp streams */ \ - unsigned int active_tcp_streams; \ - /* Counter to keep track of active udp streams */ \ - unsigned int active_udp_streams; \ - /* Counter to started timer */ \ - uint64_t timer_counter; \ - /* Threadpool */ \ - void* wq[2]; \ - uv_mutex_t wq_mutex; \ - uv_async_t wq_async; - -#define UV_REQ_TYPE_PRIVATE \ - /* TODO: remove the req suffix */ \ - UV_ACCEPT, \ - UV_FS_EVENT_REQ, \ - UV_POLL_REQ, \ - UV_PROCESS_EXIT, \ - UV_READ, \ - UV_UDP_RECV, \ - UV_WAKEUP, \ - UV_SIGNAL_REQ, - -#define UV_REQ_PRIVATE_FIELDS \ - union { \ - /* Used by I/O operations */ \ - struct { \ - OVERLAPPED overlapped; \ - size_t queued_bytes; \ - } io; \ - } u; \ - struct uv_req_s* next_req; - -#define UV_WRITE_PRIVATE_FIELDS \ - int ipc_header; \ - uv_buf_t write_buffer; \ - HANDLE event_handle; \ - HANDLE wait_handle; - -#define UV_CONNECT_PRIVATE_FIELDS \ - /* empty */ - -#define UV_SHUTDOWN_PRIVATE_FIELDS \ - /* empty */ - -#define UV_UDP_SEND_PRIVATE_FIELDS \ - /* empty */ - -#define UV_PRIVATE_REQ_TYPES \ - typedef struct uv_pipe_accept_s { \ - UV_REQ_FIELDS \ - HANDLE pipeHandle; \ - struct uv_pipe_accept_s* next_pending; \ - } uv_pipe_accept_t; \ - \ - typedef struct uv_tcp_accept_s { \ - UV_REQ_FIELDS \ - SOCKET accept_socket; \ - char accept_buffer[sizeof(struct sockaddr_storage) * 2 + 32]; \ - HANDLE event_handle; \ - HANDLE wait_handle; \ - struct uv_tcp_accept_s* next_pending; \ - } uv_tcp_accept_t; \ - \ - typedef struct uv_read_s { \ - UV_REQ_FIELDS \ - HANDLE event_handle; \ - HANDLE wait_handle; \ - } uv_read_t; - -#define uv_stream_connection_fields \ - unsigned int write_reqs_pending; \ - uv_shutdown_t* shutdown_req; - -#define uv_stream_server_fields \ - uv_connection_cb connection_cb; - -#define UV_STREAM_PRIVATE_FIELDS \ - unsigned int reqs_pending; \ - int activecnt; \ - uv_read_t read_req; \ - union { \ - struct { uv_stream_connection_fields } conn; \ - struct { uv_stream_server_fields } serv; \ - } stream; - -#define uv_tcp_server_fields \ - uv_tcp_accept_t* accept_reqs; \ - unsigned int processed_accepts; \ - uv_tcp_accept_t* pending_accepts; \ - LPFN_ACCEPTEX func_acceptex; - -#define uv_tcp_connection_fields \ - uv_buf_t read_buffer; \ - LPFN_CONNECTEX func_connectex; - -#define UV_TCP_PRIVATE_FIELDS \ - SOCKET socket; \ - int delayed_error; \ - union { \ - struct { uv_tcp_server_fields } serv; \ - struct { uv_tcp_connection_fields } conn; \ - } tcp; - -#define UV_UDP_PRIVATE_FIELDS \ - SOCKET socket; \ - unsigned int reqs_pending; \ - int activecnt; \ - uv_req_t recv_req; \ - uv_buf_t recv_buffer; \ - struct sockaddr_storage recv_from; \ - int recv_from_len; \ - uv_udp_recv_cb recv_cb; \ - uv_alloc_cb alloc_cb; \ - LPFN_WSARECV func_wsarecv; \ - LPFN_WSARECVFROM func_wsarecvfrom; - -#define uv_pipe_server_fields \ - int pending_instances; \ - uv_pipe_accept_t* accept_reqs; \ - uv_pipe_accept_t* pending_accepts; - -#define uv_pipe_connection_fields \ - uv_timer_t* eof_timer; \ - uv_write_t ipc_header_write_req; \ - int ipc_pid; \ - uint64_t remaining_ipc_rawdata_bytes; \ - struct { \ - void* queue[2]; \ - int queue_len; \ - } pending_ipc_info; \ - uv_write_t* non_overlapped_writes_tail; \ - uv_mutex_t readfile_mutex; \ - volatile HANDLE readfile_thread; - -#define UV_PIPE_PRIVATE_FIELDS \ - HANDLE handle; \ - WCHAR* name; \ - union { \ - struct { uv_pipe_server_fields } serv; \ - struct { uv_pipe_connection_fields } conn; \ - } pipe; - -/* TODO: put the parser states in an union - TTY handles are always */ -/* half-duplex so read-state can safely overlap write-state. */ -#define UV_TTY_PRIVATE_FIELDS \ - HANDLE handle; \ - union { \ - struct { \ - /* Used for readable TTY handles */ \ - HANDLE read_line_handle; \ - uv_buf_t read_line_buffer; \ - HANDLE read_raw_wait; \ - /* Fields used for translating win keystrokes into vt100 characters */ \ - char last_key[8]; \ - unsigned char last_key_offset; \ - unsigned char last_key_len; \ - WCHAR last_utf16_high_surrogate; \ - INPUT_RECORD last_input_record; \ - } rd; \ - struct { \ - /* Used for writable TTY handles */ \ - /* utf8-to-utf16 conversion state */ \ - unsigned int utf8_codepoint; \ - unsigned char utf8_bytes_left; \ - /* eol conversion state */ \ - unsigned char previous_eol; \ - /* ansi parser state */ \ - unsigned char ansi_parser_state; \ - unsigned char ansi_csi_argc; \ - unsigned short ansi_csi_argv[4]; \ - COORD saved_position; \ - WORD saved_attributes; \ - } wr; \ - } tty; - -#define UV_POLL_PRIVATE_FIELDS \ - SOCKET socket; \ - /* Used in fast mode */ \ - SOCKET peer_socket; \ - AFD_POLL_INFO afd_poll_info_1; \ - AFD_POLL_INFO afd_poll_info_2; \ - /* Used in fast and slow mode. */ \ - uv_req_t poll_req_1; \ - uv_req_t poll_req_2; \ - unsigned char submitted_events_1; \ - unsigned char submitted_events_2; \ - unsigned char mask_events_1; \ - unsigned char mask_events_2; \ - unsigned char events; - -#define UV_TIMER_PRIVATE_FIELDS \ - RB_ENTRY(uv_timer_s) tree_entry; \ - uint64_t due; \ - uint64_t repeat; \ - uint64_t start_id; \ - uv_timer_cb timer_cb; - -#define UV_ASYNC_PRIVATE_FIELDS \ - struct uv_req_s async_req; \ - uv_async_cb async_cb; \ - /* char to avoid alignment issues */ \ - char volatile async_sent; - -#define UV_PREPARE_PRIVATE_FIELDS \ - uv_prepare_t* prepare_prev; \ - uv_prepare_t* prepare_next; \ - uv_prepare_cb prepare_cb; - -#define UV_CHECK_PRIVATE_FIELDS \ - uv_check_t* check_prev; \ - uv_check_t* check_next; \ - uv_check_cb check_cb; - -#define UV_IDLE_PRIVATE_FIELDS \ - uv_idle_t* idle_prev; \ - uv_idle_t* idle_next; \ - uv_idle_cb idle_cb; - -#define UV_HANDLE_PRIVATE_FIELDS \ - uv_handle_t* endgame_next; \ - unsigned int flags; - -#define UV_GETADDRINFO_PRIVATE_FIELDS \ - struct uv__work work_req; \ - uv_getaddrinfo_cb getaddrinfo_cb; \ - void* alloc; \ - WCHAR* node; \ - WCHAR* service; \ - /* The addrinfoW field is used to store a pointer to the hints, and */ \ - /* later on to store the result of GetAddrInfoW. The final result will */ \ - /* be converted to struct addrinfo* and stored in the addrinfo field. */ \ - struct addrinfoW* addrinfow; \ - struct addrinfo* addrinfo; \ - int retcode; - -#define UV_GETNAMEINFO_PRIVATE_FIELDS \ - struct uv__work work_req; \ - uv_getnameinfo_cb getnameinfo_cb; \ - struct sockaddr_storage storage; \ - int flags; \ - char host[NI_MAXHOST]; \ - char service[NI_MAXSERV]; \ - int retcode; - -#define UV_PROCESS_PRIVATE_FIELDS \ - struct uv_process_exit_s { \ - UV_REQ_FIELDS \ - } exit_req; \ - BYTE* child_stdio_buffer; \ - int exit_signal; \ - HANDLE wait_handle; \ - HANDLE process_handle; \ - volatile char exit_cb_pending; - -#define UV_FS_PRIVATE_FIELDS \ - struct uv__work work_req; \ - int flags; \ - DWORD sys_errno_; \ - union { \ - /* TODO: remove me in 0.9. */ \ - WCHAR* pathw; \ - int fd; \ - } file; \ - union { \ - struct { \ - int mode; \ - WCHAR* new_pathw; \ - int file_flags; \ - int fd_out; \ - unsigned int nbufs; \ - uv_buf_t* bufs; \ - int64_t offset; \ - uv_buf_t bufsml[4]; \ - } info; \ - struct { \ - double atime; \ - double mtime; \ - } time; \ - } fs; - -#define UV_WORK_PRIVATE_FIELDS \ - struct uv__work work_req; - -#define UV_FS_EVENT_PRIVATE_FIELDS \ - struct uv_fs_event_req_s { \ - UV_REQ_FIELDS \ - } req; \ - HANDLE dir_handle; \ - int req_pending; \ - uv_fs_event_cb cb; \ - WCHAR* filew; \ - WCHAR* short_filew; \ - WCHAR* dirw; \ - char* buffer; - -#define UV_SIGNAL_PRIVATE_FIELDS \ - RB_ENTRY(uv_signal_s) tree_entry; \ - struct uv_req_s signal_req; \ - unsigned long pending_signum; - -int uv_utf16_to_utf8(const WCHAR* utf16Buffer, size_t utf16Size, - char* utf8Buffer, size_t utf8Size); -int uv_utf8_to_utf16(const char* utf8Buffer, WCHAR* utf16Buffer, - size_t utf16Size); - -#ifndef F_OK -#define F_OK 0 -#endif -#ifndef R_OK -#define R_OK 4 -#endif -#ifndef W_OK -#define W_OK 2 -#endif -#ifndef X_OK -#define X_OK 1 -#endif diff --git a/outside/libuv-v1.7.5/include/uv.h b/outside/libuv-v1.7.5/include/uv.h deleted file mode 100644 index f96026b60..000000000 --- a/outside/libuv-v1.7.5/include/uv.h +++ /dev/null @@ -1,1472 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -/* See https://github.com/libuv/libuv#documentation for documentation. */ - -#ifndef UV_H -#define UV_H -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef _WIN32 - /* Windows - set up dll import/export decorators. */ -# if defined(BUILDING_UV_SHARED) - /* Building shared library. */ -# define UV_EXTERN __declspec(dllexport) -# elif defined(USING_UV_SHARED) - /* Using shared library. */ -# define UV_EXTERN __declspec(dllimport) -# else - /* Building static library. */ -# define UV_EXTERN /* nothing */ -# endif -#elif __GNUC__ >= 4 -# define UV_EXTERN __attribute__((visibility("default"))) -#else -# define UV_EXTERN /* nothing */ -#endif - -#include "uv-errno.h" -#include "uv-version.h" -#include - -#if defined(_MSC_VER) && _MSC_VER < 1600 -# include "stdint-msvc2008.h" -#else -# include -#endif - -#if defined(_WIN32) -# include "uv-win.h" -#else -# include "uv-unix.h" -#endif - -/* Expand this list if necessary. */ -#define UV_ERRNO_MAP(XX) \ - XX(E2BIG, "argument list too long") \ - XX(EACCES, "permission denied") \ - XX(EADDRINUSE, "address already in use") \ - XX(EADDRNOTAVAIL, "address not available") \ - XX(EAFNOSUPPORT, "address family not supported") \ - XX(EAGAIN, "resource temporarily unavailable") \ - XX(EAI_ADDRFAMILY, "address family not supported") \ - XX(EAI_AGAIN, "temporary failure") \ - XX(EAI_BADFLAGS, "bad ai_flags value") \ - XX(EAI_BADHINTS, "invalid value for hints") \ - XX(EAI_CANCELED, "request canceled") \ - XX(EAI_FAIL, "permanent failure") \ - XX(EAI_FAMILY, "ai_family not supported") \ - XX(EAI_MEMORY, "out of memory") \ - XX(EAI_NODATA, "no address") \ - XX(EAI_NONAME, "unknown node or service") \ - XX(EAI_OVERFLOW, "argument buffer overflow") \ - XX(EAI_PROTOCOL, "resolved protocol is unknown") \ - XX(EAI_SERVICE, "service not available for socket type") \ - XX(EAI_SOCKTYPE, "socket type not supported") \ - XX(EALREADY, "connection already in progress") \ - XX(EBADF, "bad file descriptor") \ - XX(EBUSY, "resource busy or locked") \ - XX(ECANCELED, "operation canceled") \ - XX(ECHARSET, "invalid Unicode character") \ - XX(ECONNABORTED, "software caused connection abort") \ - XX(ECONNREFUSED, "connection refused") \ - XX(ECONNRESET, "connection reset by peer") \ - XX(EDESTADDRREQ, "destination address required") \ - XX(EEXIST, "file already exists") \ - XX(EFAULT, "bad address in system call argument") \ - XX(EFBIG, "file too large") \ - XX(EHOSTUNREACH, "host is unreachable") \ - XX(EINTR, "interrupted system call") \ - XX(EINVAL, "invalid argument") \ - XX(EIO, "i/o error") \ - XX(EISCONN, "socket is already connected") \ - XX(EISDIR, "illegal operation on a directory") \ - XX(ELOOP, "too many symbolic links encountered") \ - XX(EMFILE, "too many open files") \ - XX(EMSGSIZE, "message too long") \ - XX(ENAMETOOLONG, "name too long") \ - XX(ENETDOWN, "network is down") \ - XX(ENETUNREACH, "network is unreachable") \ - XX(ENFILE, "file table overflow") \ - XX(ENOBUFS, "no buffer space available") \ - XX(ENODEV, "no such device") \ - XX(ENOENT, "no such file or directory") \ - XX(ENOMEM, "not enough memory") \ - XX(ENONET, "machine is not on the network") \ - XX(ENOPROTOOPT, "protocol not available") \ - XX(ENOSPC, "no space left on device") \ - XX(ENOSYS, "function not implemented") \ - XX(ENOTCONN, "socket is not connected") \ - XX(ENOTDIR, "not a directory") \ - XX(ENOTEMPTY, "directory not empty") \ - XX(ENOTSOCK, "socket operation on non-socket") \ - XX(ENOTSUP, "operation not supported on socket") \ - XX(EPERM, "operation not permitted") \ - XX(EPIPE, "broken pipe") \ - XX(EPROTO, "protocol error") \ - XX(EPROTONOSUPPORT, "protocol not supported") \ - XX(EPROTOTYPE, "protocol wrong type for socket") \ - XX(ERANGE, "result too large") \ - XX(EROFS, "read-only file system") \ - XX(ESHUTDOWN, "cannot send after transport endpoint shutdown") \ - XX(ESPIPE, "invalid seek") \ - XX(ESRCH, "no such process") \ - XX(ETIMEDOUT, "connection timed out") \ - XX(ETXTBSY, "text file is busy") \ - XX(EXDEV, "cross-device link not permitted") \ - XX(UNKNOWN, "unknown error") \ - XX(EOF, "end of file") \ - XX(ENXIO, "no such device or address") \ - XX(EMLINK, "too many links") \ - XX(EHOSTDOWN, "host is down") \ - -#define UV_HANDLE_TYPE_MAP(XX) \ - XX(ASYNC, async) \ - XX(CHECK, check) \ - XX(FS_EVENT, fs_event) \ - XX(FS_POLL, fs_poll) \ - XX(HANDLE, handle) \ - XX(IDLE, idle) \ - XX(NAMED_PIPE, pipe) \ - XX(POLL, poll) \ - XX(PREPARE, prepare) \ - XX(PROCESS, process) \ - XX(STREAM, stream) \ - XX(TCP, tcp) \ - XX(TIMER, timer) \ - XX(TTY, tty) \ - XX(UDP, udp) \ - XX(SIGNAL, signal) \ - -#define UV_REQ_TYPE_MAP(XX) \ - XX(REQ, req) \ - XX(CONNECT, connect) \ - XX(WRITE, write) \ - XX(SHUTDOWN, shutdown) \ - XX(UDP_SEND, udp_send) \ - XX(FS, fs) \ - XX(WORK, work) \ - XX(GETADDRINFO, getaddrinfo) \ - XX(GETNAMEINFO, getnameinfo) \ - -typedef enum { -#define XX(code, _) UV_ ## code = UV__ ## code, - UV_ERRNO_MAP(XX) -#undef XX - UV_ERRNO_MAX = UV__EOF - 1 -} uv_errno_t; - -typedef enum { - UV_UNKNOWN_HANDLE = 0, -#define XX(uc, lc) UV_##uc, - UV_HANDLE_TYPE_MAP(XX) -#undef XX - UV_FILE, - UV_HANDLE_TYPE_MAX -} uv_handle_type; - -typedef enum { - UV_UNKNOWN_REQ = 0, -#define XX(uc, lc) UV_##uc, - UV_REQ_TYPE_MAP(XX) -#undef XX - UV_REQ_TYPE_PRIVATE - UV_REQ_TYPE_MAX -} uv_req_type; - - -/* Handle types. */ -typedef struct uv_loop_s uv_loop_t; -typedef struct uv_handle_s uv_handle_t; -typedef struct uv_stream_s uv_stream_t; -typedef struct uv_tcp_s uv_tcp_t; -typedef struct uv_udp_s uv_udp_t; -typedef struct uv_pipe_s uv_pipe_t; -typedef struct uv_tty_s uv_tty_t; -typedef struct uv_poll_s uv_poll_t; -typedef struct uv_timer_s uv_timer_t; -typedef struct uv_prepare_s uv_prepare_t; -typedef struct uv_check_s uv_check_t; -typedef struct uv_idle_s uv_idle_t; -typedef struct uv_async_s uv_async_t; -typedef struct uv_process_s uv_process_t; -typedef struct uv_fs_event_s uv_fs_event_t; -typedef struct uv_fs_poll_s uv_fs_poll_t; -typedef struct uv_signal_s uv_signal_t; - -/* Request types. */ -typedef struct uv_req_s uv_req_t; -typedef struct uv_getaddrinfo_s uv_getaddrinfo_t; -typedef struct uv_getnameinfo_s uv_getnameinfo_t; -typedef struct uv_shutdown_s uv_shutdown_t; -typedef struct uv_write_s uv_write_t; -typedef struct uv_connect_s uv_connect_t; -typedef struct uv_udp_send_s uv_udp_send_t; -typedef struct uv_fs_s uv_fs_t; -typedef struct uv_work_s uv_work_t; - -/* None of the above. */ -typedef struct uv_cpu_info_s uv_cpu_info_t; -typedef struct uv_interface_address_s uv_interface_address_t; -typedef struct uv_dirent_s uv_dirent_t; - -typedef enum { - UV_LOOP_BLOCK_SIGNAL -} uv_loop_option; - -typedef enum { - UV_RUN_DEFAULT = 0, - UV_RUN_ONCE, - UV_RUN_NOWAIT -} uv_run_mode; - - -UV_EXTERN unsigned int uv_version(void); -UV_EXTERN const char* uv_version_string(void); - -typedef void* (*uv_malloc_func)(size_t size); -typedef void* (*uv_realloc_func)(void* ptr, size_t size); -typedef void* (*uv_calloc_func)(size_t count, size_t size); -typedef void (*uv_free_func)(void* ptr); - -UV_EXTERN int uv_replace_allocator(uv_malloc_func malloc_func, - uv_realloc_func realloc_func, - uv_calloc_func calloc_func, - uv_free_func free_func); - -UV_EXTERN uv_loop_t* uv_default_loop(void); -UV_EXTERN int uv_loop_init(uv_loop_t* loop); -UV_EXTERN int uv_loop_close(uv_loop_t* loop); -/* - * NOTE: - * This function is DEPRECATED (to be removed after 0.12), users should - * allocate the loop manually and use uv_loop_init instead. - */ -UV_EXTERN uv_loop_t* uv_loop_new(void); -/* - * NOTE: - * This function is DEPRECATED (to be removed after 0.12). Users should use - * uv_loop_close and free the memory manually instead. - */ -UV_EXTERN void uv_loop_delete(uv_loop_t*); -UV_EXTERN size_t uv_loop_size(void); -UV_EXTERN int uv_loop_alive(const uv_loop_t* loop); -UV_EXTERN int uv_loop_configure(uv_loop_t* loop, uv_loop_option option, ...); - -UV_EXTERN int uv_run(uv_loop_t*, uv_run_mode mode); -UV_EXTERN void uv_stop(uv_loop_t*); - -UV_EXTERN void uv_ref(uv_handle_t*); -UV_EXTERN void uv_unref(uv_handle_t*); -UV_EXTERN int uv_has_ref(const uv_handle_t*); - -UV_EXTERN void uv_update_time(uv_loop_t*); -UV_EXTERN uint64_t uv_now(const uv_loop_t*); - -UV_EXTERN int uv_backend_fd(const uv_loop_t*); -UV_EXTERN int uv_backend_timeout(const uv_loop_t*); - -typedef void (*uv_alloc_cb)(uv_handle_t* handle, - size_t suggested_size, - uv_buf_t* buf); -typedef void (*uv_read_cb)(uv_stream_t* stream, - ssize_t nread, - const uv_buf_t* buf); -typedef void (*uv_write_cb)(uv_write_t* req, int status); -typedef void (*uv_connect_cb)(uv_connect_t* req, int status); -typedef void (*uv_shutdown_cb)(uv_shutdown_t* req, int status); -typedef void (*uv_connection_cb)(uv_stream_t* server, int status); -typedef void (*uv_close_cb)(uv_handle_t* handle); -typedef void (*uv_poll_cb)(uv_poll_t* handle, int status, int events); -typedef void (*uv_timer_cb)(uv_timer_t* handle); -typedef void (*uv_async_cb)(uv_async_t* handle); -typedef void (*uv_prepare_cb)(uv_prepare_t* handle); -typedef void (*uv_check_cb)(uv_check_t* handle); -typedef void (*uv_idle_cb)(uv_idle_t* handle); -typedef void (*uv_exit_cb)(uv_process_t*, int64_t exit_status, int term_signal); -typedef void (*uv_walk_cb)(uv_handle_t* handle, void* arg); -typedef void (*uv_fs_cb)(uv_fs_t* req); -typedef void (*uv_work_cb)(uv_work_t* req); -typedef void (*uv_after_work_cb)(uv_work_t* req, int status); -typedef void (*uv_getaddrinfo_cb)(uv_getaddrinfo_t* req, - int status, - struct addrinfo* res); -typedef void (*uv_getnameinfo_cb)(uv_getnameinfo_t* req, - int status, - const char* hostname, - const char* service); - -typedef struct { - long tv_sec; - long tv_nsec; -} uv_timespec_t; - - -typedef struct { - uint64_t st_dev; - uint64_t st_mode; - uint64_t st_nlink; - uint64_t st_uid; - uint64_t st_gid; - uint64_t st_rdev; - uint64_t st_ino; - uint64_t st_size; - uint64_t st_blksize; - uint64_t st_blocks; - uint64_t st_flags; - uint64_t st_gen; - uv_timespec_t st_atim; - uv_timespec_t st_mtim; - uv_timespec_t st_ctim; - uv_timespec_t st_birthtim; -} uv_stat_t; - - -typedef void (*uv_fs_event_cb)(uv_fs_event_t* handle, - const char* filename, - int events, - int status); - -typedef void (*uv_fs_poll_cb)(uv_fs_poll_t* handle, - int status, - const uv_stat_t* prev, - const uv_stat_t* curr); - -typedef void (*uv_signal_cb)(uv_signal_t* handle, int signum); - - -typedef enum { - UV_LEAVE_GROUP = 0, - UV_JOIN_GROUP -} uv_membership; - - -UV_EXTERN const char* uv_strerror(int err); -UV_EXTERN const char* uv_err_name(int err); - - -#define UV_REQ_FIELDS \ - /* public */ \ - void* data; \ - /* read-only */ \ - uv_req_type type; \ - /* private */ \ - void* active_queue[2]; \ - void* reserved[4]; \ - UV_REQ_PRIVATE_FIELDS \ - -/* Abstract base class of all requests. */ -struct uv_req_s { - UV_REQ_FIELDS -}; - - -/* Platform-specific request types. */ -UV_PRIVATE_REQ_TYPES - - -UV_EXTERN int uv_shutdown(uv_shutdown_t* req, - uv_stream_t* handle, - uv_shutdown_cb cb); - -struct uv_shutdown_s { - UV_REQ_FIELDS - uv_stream_t* handle; - uv_shutdown_cb cb; - UV_SHUTDOWN_PRIVATE_FIELDS -}; - - -#define UV_HANDLE_FIELDS \ - /* public */ \ - void* data; \ - /* read-only */ \ - uv_loop_t* loop; \ - uv_handle_type type; \ - /* private */ \ - uv_close_cb close_cb; \ - void* handle_queue[2]; \ - union { \ - int fd; \ - void* reserved[4]; \ - } u; \ - UV_HANDLE_PRIVATE_FIELDS \ - -/* The abstract base class of all handles. */ -struct uv_handle_s { - UV_HANDLE_FIELDS -}; - -UV_EXTERN size_t uv_handle_size(uv_handle_type type); -UV_EXTERN size_t uv_req_size(uv_req_type type); - -UV_EXTERN int uv_is_active(const uv_handle_t* handle); - -UV_EXTERN void uv_walk(uv_loop_t* loop, uv_walk_cb walk_cb, void* arg); - -UV_EXTERN void uv_close(uv_handle_t* handle, uv_close_cb close_cb); - -UV_EXTERN int uv_send_buffer_size(uv_handle_t* handle, int* value); -UV_EXTERN int uv_recv_buffer_size(uv_handle_t* handle, int* value); - -UV_EXTERN int uv_fileno(const uv_handle_t* handle, uv_os_fd_t* fd); - -UV_EXTERN uv_buf_t uv_buf_init(char* base, unsigned int len); - - -#define UV_STREAM_FIELDS \ - /* number of bytes queued for writing */ \ - size_t write_queue_size; \ - uv_alloc_cb alloc_cb; \ - uv_read_cb read_cb; \ - /* private */ \ - UV_STREAM_PRIVATE_FIELDS - -/* - * uv_stream_t is a subclass of uv_handle_t. - * - * uv_stream is an abstract class. - * - * uv_stream_t is the parent class of uv_tcp_t, uv_pipe_t and uv_tty_t. - */ -struct uv_stream_s { - UV_HANDLE_FIELDS - UV_STREAM_FIELDS -}; - -UV_EXTERN int uv_listen(uv_stream_t* stream, int backlog, uv_connection_cb cb); -UV_EXTERN int uv_accept(uv_stream_t* server, uv_stream_t* client); - -UV_EXTERN int uv_read_start(uv_stream_t*, - uv_alloc_cb alloc_cb, - uv_read_cb read_cb); -UV_EXTERN int uv_read_stop(uv_stream_t*); - -UV_EXTERN int uv_write(uv_write_t* req, - uv_stream_t* handle, - const uv_buf_t bufs[], - unsigned int nbufs, - uv_write_cb cb); -UV_EXTERN int uv_write2(uv_write_t* req, - uv_stream_t* handle, - const uv_buf_t bufs[], - unsigned int nbufs, - uv_stream_t* send_handle, - uv_write_cb cb); -UV_EXTERN int uv_try_write(uv_stream_t* handle, - const uv_buf_t bufs[], - unsigned int nbufs); - -/* uv_write_t is a subclass of uv_req_t. */ -struct uv_write_s { - UV_REQ_FIELDS - uv_write_cb cb; - uv_stream_t* send_handle; - uv_stream_t* handle; - UV_WRITE_PRIVATE_FIELDS -}; - - -UV_EXTERN int uv_is_readable(const uv_stream_t* handle); -UV_EXTERN int uv_is_writable(const uv_stream_t* handle); - -UV_EXTERN int uv_stream_set_blocking(uv_stream_t* handle, int blocking); - -UV_EXTERN int uv_is_closing(const uv_handle_t* handle); - - -/* - * uv_tcp_t is a subclass of uv_stream_t. - * - * Represents a TCP stream or TCP server. - */ -struct uv_tcp_s { - UV_HANDLE_FIELDS - UV_STREAM_FIELDS - UV_TCP_PRIVATE_FIELDS -}; - -UV_EXTERN int uv_tcp_init(uv_loop_t*, uv_tcp_t* handle); -UV_EXTERN int uv_tcp_init_ex(uv_loop_t*, uv_tcp_t* handle, unsigned int flags); -UV_EXTERN int uv_tcp_open(uv_tcp_t* handle, uv_os_sock_t sock); -UV_EXTERN int uv_tcp_nodelay(uv_tcp_t* handle, int enable); -UV_EXTERN int uv_tcp_keepalive(uv_tcp_t* handle, - int enable, - unsigned int delay); -UV_EXTERN int uv_tcp_simultaneous_accepts(uv_tcp_t* handle, int enable); - -enum uv_tcp_flags { - /* Used with uv_tcp_bind, when an IPv6 address is used. */ - UV_TCP_IPV6ONLY = 1 -}; - -UV_EXTERN int uv_tcp_bind(uv_tcp_t* handle, - const struct sockaddr* addr, - unsigned int flags); -UV_EXTERN int uv_tcp_getsockname(const uv_tcp_t* handle, - struct sockaddr* name, - int* namelen); -UV_EXTERN int uv_tcp_getpeername(const uv_tcp_t* handle, - struct sockaddr* name, - int* namelen); -UV_EXTERN int uv_tcp_connect(uv_connect_t* req, - uv_tcp_t* handle, - const struct sockaddr* addr, - uv_connect_cb cb); - -/* uv_connect_t is a subclass of uv_req_t. */ -struct uv_connect_s { - UV_REQ_FIELDS - uv_connect_cb cb; - uv_stream_t* handle; - UV_CONNECT_PRIVATE_FIELDS -}; - - -/* - * UDP support. - */ - -enum uv_udp_flags { - /* Disables dual stack mode. */ - UV_UDP_IPV6ONLY = 1, - /* - * Indicates message was truncated because read buffer was too small. The - * remainder was discarded by the OS. Used in uv_udp_recv_cb. - */ - UV_UDP_PARTIAL = 2, - /* - * Indicates if SO_REUSEADDR will be set when binding the handle. - * This sets the SO_REUSEPORT socket flag on the BSDs and OS X. On other - * Unix platforms, it sets the SO_REUSEADDR flag. What that means is that - * multiple threads or processes can bind to the same address without error - * (provided they all set the flag) but only the last one to bind will receive - * any traffic, in effect "stealing" the port from the previous listener. - */ - UV_UDP_REUSEADDR = 4 -}; - -typedef void (*uv_udp_send_cb)(uv_udp_send_t* req, int status); -typedef void (*uv_udp_recv_cb)(uv_udp_t* handle, - ssize_t nread, - const uv_buf_t* buf, - const struct sockaddr* addr, - unsigned flags); - -/* uv_udp_t is a subclass of uv_handle_t. */ -struct uv_udp_s { - UV_HANDLE_FIELDS - /* read-only */ - /* - * Number of bytes queued for sending. This field strictly shows how much - * information is currently queued. - */ - size_t send_queue_size; - /* - * Number of send requests currently in the queue awaiting to be processed. - */ - size_t send_queue_count; - UV_UDP_PRIVATE_FIELDS -}; - -/* uv_udp_send_t is a subclass of uv_req_t. */ -struct uv_udp_send_s { - UV_REQ_FIELDS - uv_udp_t* handle; - uv_udp_send_cb cb; - UV_UDP_SEND_PRIVATE_FIELDS -}; - -UV_EXTERN int uv_udp_init(uv_loop_t*, uv_udp_t* handle); -UV_EXTERN int uv_udp_init_ex(uv_loop_t*, uv_udp_t* handle, unsigned int flags); -UV_EXTERN int uv_udp_open(uv_udp_t* handle, uv_os_sock_t sock); -UV_EXTERN int uv_udp_bind(uv_udp_t* handle, - const struct sockaddr* addr, - unsigned int flags); - -UV_EXTERN int uv_udp_getsockname(const uv_udp_t* handle, - struct sockaddr* name, - int* namelen); -UV_EXTERN int uv_udp_set_membership(uv_udp_t* handle, - const char* multicast_addr, - const char* interface_addr, - uv_membership membership); -UV_EXTERN int uv_udp_set_multicast_loop(uv_udp_t* handle, int on); -UV_EXTERN int uv_udp_set_multicast_ttl(uv_udp_t* handle, int ttl); -UV_EXTERN int uv_udp_set_multicast_interface(uv_udp_t* handle, - const char* interface_addr); -UV_EXTERN int uv_udp_set_broadcast(uv_udp_t* handle, int on); -UV_EXTERN int uv_udp_set_ttl(uv_udp_t* handle, int ttl); -UV_EXTERN int uv_udp_send(uv_udp_send_t* req, - uv_udp_t* handle, - const uv_buf_t bufs[], - unsigned int nbufs, - const struct sockaddr* addr, - uv_udp_send_cb send_cb); -UV_EXTERN int uv_udp_try_send(uv_udp_t* handle, - const uv_buf_t bufs[], - unsigned int nbufs, - const struct sockaddr* addr); -UV_EXTERN int uv_udp_recv_start(uv_udp_t* handle, - uv_alloc_cb alloc_cb, - uv_udp_recv_cb recv_cb); -UV_EXTERN int uv_udp_recv_stop(uv_udp_t* handle); - - -/* - * uv_tty_t is a subclass of uv_stream_t. - * - * Representing a stream for the console. - */ -struct uv_tty_s { - UV_HANDLE_FIELDS - UV_STREAM_FIELDS - UV_TTY_PRIVATE_FIELDS -}; - -typedef enum { - /* Initial/normal terminal mode */ - UV_TTY_MODE_NORMAL, - /* Raw input mode (On Windows, ENABLE_WINDOW_INPUT is also enabled) */ - UV_TTY_MODE_RAW, - /* Binary-safe I/O mode for IPC (Unix-only) */ - UV_TTY_MODE_IO -} uv_tty_mode_t; - -UV_EXTERN int uv_tty_init(uv_loop_t*, uv_tty_t*, uv_file fd, int readable); -UV_EXTERN int uv_tty_set_mode(uv_tty_t*, uv_tty_mode_t mode); -UV_EXTERN int uv_tty_reset_mode(void); -UV_EXTERN int uv_tty_get_winsize(uv_tty_t*, int* width, int* height); - -#ifdef __cplusplus -extern "C++" { - -inline int uv_tty_set_mode(uv_tty_t* handle, int mode) { - return uv_tty_set_mode(handle, static_cast(mode)); -} - -} -#endif - -UV_EXTERN uv_handle_type uv_guess_handle(uv_file file); - -/* - * uv_pipe_t is a subclass of uv_stream_t. - * - * Representing a pipe stream or pipe server. On Windows this is a Named - * Pipe. On Unix this is a Unix domain socket. - */ -struct uv_pipe_s { - UV_HANDLE_FIELDS - UV_STREAM_FIELDS - int ipc; /* non-zero if this pipe is used for passing handles */ - UV_PIPE_PRIVATE_FIELDS -}; - -UV_EXTERN int uv_pipe_init(uv_loop_t*, uv_pipe_t* handle, int ipc); -UV_EXTERN int uv_pipe_open(uv_pipe_t*, uv_file file); -UV_EXTERN int uv_pipe_bind(uv_pipe_t* handle, const char* name); -UV_EXTERN void uv_pipe_connect(uv_connect_t* req, - uv_pipe_t* handle, - const char* name, - uv_connect_cb cb); -UV_EXTERN int uv_pipe_getsockname(const uv_pipe_t* handle, - char* buffer, - size_t* size); -UV_EXTERN int uv_pipe_getpeername(const uv_pipe_t* handle, - char* buffer, - size_t* size); -UV_EXTERN void uv_pipe_pending_instances(uv_pipe_t* handle, int count); -UV_EXTERN int uv_pipe_pending_count(uv_pipe_t* handle); -UV_EXTERN uv_handle_type uv_pipe_pending_type(uv_pipe_t* handle); - - -struct uv_poll_s { - UV_HANDLE_FIELDS - uv_poll_cb poll_cb; - UV_POLL_PRIVATE_FIELDS -}; - -enum uv_poll_event { - UV_READABLE = 1, - UV_WRITABLE = 2 -}; - -UV_EXTERN int uv_poll_init(uv_loop_t* loop, uv_poll_t* handle, int fd); -UV_EXTERN int uv_poll_init_socket(uv_loop_t* loop, - uv_poll_t* handle, - uv_os_sock_t socket); -UV_EXTERN int uv_poll_start(uv_poll_t* handle, int events, uv_poll_cb cb); -UV_EXTERN int uv_poll_stop(uv_poll_t* handle); - - -struct uv_prepare_s { - UV_HANDLE_FIELDS - UV_PREPARE_PRIVATE_FIELDS -}; - -UV_EXTERN int uv_prepare_init(uv_loop_t*, uv_prepare_t* prepare); -UV_EXTERN int uv_prepare_start(uv_prepare_t* prepare, uv_prepare_cb cb); -UV_EXTERN int uv_prepare_stop(uv_prepare_t* prepare); - - -struct uv_check_s { - UV_HANDLE_FIELDS - UV_CHECK_PRIVATE_FIELDS -}; - -UV_EXTERN int uv_check_init(uv_loop_t*, uv_check_t* check); -UV_EXTERN int uv_check_start(uv_check_t* check, uv_check_cb cb); -UV_EXTERN int uv_check_stop(uv_check_t* check); - - -struct uv_idle_s { - UV_HANDLE_FIELDS - UV_IDLE_PRIVATE_FIELDS -}; - -UV_EXTERN int uv_idle_init(uv_loop_t*, uv_idle_t* idle); -UV_EXTERN int uv_idle_start(uv_idle_t* idle, uv_idle_cb cb); -UV_EXTERN int uv_idle_stop(uv_idle_t* idle); - - -struct uv_async_s { - UV_HANDLE_FIELDS - UV_ASYNC_PRIVATE_FIELDS -}; - -UV_EXTERN int uv_async_init(uv_loop_t*, - uv_async_t* async, - uv_async_cb async_cb); -UV_EXTERN int uv_async_send(uv_async_t* async); - - -/* - * uv_timer_t is a subclass of uv_handle_t. - * - * Used to get woken up at a specified time in the future. - */ -struct uv_timer_s { - UV_HANDLE_FIELDS - UV_TIMER_PRIVATE_FIELDS -}; - -UV_EXTERN int uv_timer_init(uv_loop_t*, uv_timer_t* handle); -UV_EXTERN int uv_timer_start(uv_timer_t* handle, - uv_timer_cb cb, - uint64_t timeout, - uint64_t repeat); -UV_EXTERN int uv_timer_stop(uv_timer_t* handle); -UV_EXTERN int uv_timer_again(uv_timer_t* handle); -UV_EXTERN void uv_timer_set_repeat(uv_timer_t* handle, uint64_t repeat); -UV_EXTERN uint64_t uv_timer_get_repeat(const uv_timer_t* handle); - - -/* - * uv_getaddrinfo_t is a subclass of uv_req_t. - * - * Request object for uv_getaddrinfo. - */ -struct uv_getaddrinfo_s { - UV_REQ_FIELDS - /* read-only */ - uv_loop_t* loop; - /* struct addrinfo* addrinfo is marked as private, but it really isn't. */ - UV_GETADDRINFO_PRIVATE_FIELDS -}; - - -UV_EXTERN int uv_getaddrinfo(uv_loop_t* loop, - uv_getaddrinfo_t* req, - uv_getaddrinfo_cb getaddrinfo_cb, - const char* node, - const char* service, - const struct addrinfo* hints); -UV_EXTERN void uv_freeaddrinfo(struct addrinfo* ai); - - -/* -* uv_getnameinfo_t is a subclass of uv_req_t. -* -* Request object for uv_getnameinfo. -*/ -struct uv_getnameinfo_s { - UV_REQ_FIELDS - /* read-only */ - uv_loop_t* loop; - /* host and service are marked as private, but they really aren't. */ - UV_GETNAMEINFO_PRIVATE_FIELDS -}; - -UV_EXTERN int uv_getnameinfo(uv_loop_t* loop, - uv_getnameinfo_t* req, - uv_getnameinfo_cb getnameinfo_cb, - const struct sockaddr* addr, - int flags); - - -/* uv_spawn() options. */ -typedef enum { - UV_IGNORE = 0x00, - UV_CREATE_PIPE = 0x01, - UV_INHERIT_FD = 0x02, - UV_INHERIT_STREAM = 0x04, - - /* - * When UV_CREATE_PIPE is specified, UV_READABLE_PIPE and UV_WRITABLE_PIPE - * determine the direction of flow, from the child process' perspective. Both - * flags may be specified to create a duplex data stream. - */ - UV_READABLE_PIPE = 0x10, - UV_WRITABLE_PIPE = 0x20 -} uv_stdio_flags; - -typedef struct uv_stdio_container_s { - uv_stdio_flags flags; - - union { - uv_stream_t* stream; - int fd; - } data; -} uv_stdio_container_t; - -typedef struct uv_process_options_s { - uv_exit_cb exit_cb; /* Called after the process exits. */ - const char* file; /* Path to program to execute. */ - /* - * Command line arguments. args[0] should be the path to the program. On - * Windows this uses CreateProcess which concatenates the arguments into a - * string this can cause some strange errors. See the note at - * windows_verbatim_arguments. - */ - char** args; - /* - * This will be set as the environ variable in the subprocess. If this is - * NULL then the parents environ will be used. - */ - char** env; - /* - * If non-null this represents a directory the subprocess should execute - * in. Stands for current working directory. - */ - const char* cwd; - /* - * Various flags that control how uv_spawn() behaves. See the definition of - * `enum uv_process_flags` below. - */ - unsigned int flags; - /* - * The `stdio` field points to an array of uv_stdio_container_t structs that - * describe the file descriptors that will be made available to the child - * process. The convention is that stdio[0] points to stdin, fd 1 is used for - * stdout, and fd 2 is stderr. - * - * Note that on windows file descriptors greater than 2 are available to the - * child process only if the child processes uses the MSVCRT runtime. - */ - int stdio_count; - uv_stdio_container_t* stdio; - /* - * Libuv can change the child process' user/group id. This happens only when - * the appropriate bits are set in the flags fields. This is not supported on - * windows; uv_spawn() will fail and set the error to UV_ENOTSUP. - */ - uv_uid_t uid; - uv_gid_t gid; -} uv_process_options_t; - -/* - * These are the flags that can be used for the uv_process_options.flags field. - */ -enum uv_process_flags { - /* - * Set the child process' user id. The user id is supplied in the `uid` field - * of the options struct. This does not work on windows; setting this flag - * will cause uv_spawn() to fail. - */ - UV_PROCESS_SETUID = (1 << 0), - /* - * Set the child process' group id. The user id is supplied in the `gid` - * field of the options struct. This does not work on windows; setting this - * flag will cause uv_spawn() to fail. - */ - UV_PROCESS_SETGID = (1 << 1), - /* - * Do not wrap any arguments in quotes, or perform any other escaping, when - * converting the argument list into a command line string. This option is - * only meaningful on Windows systems. On Unix it is silently ignored. - */ - UV_PROCESS_WINDOWS_VERBATIM_ARGUMENTS = (1 << 2), - /* - * Spawn the child process in a detached state - this will make it a process - * group leader, and will effectively enable the child to keep running after - * the parent exits. Note that the child process will still keep the - * parent's event loop alive unless the parent process calls uv_unref() on - * the child's process handle. - */ - UV_PROCESS_DETACHED = (1 << 3), - /* - * Hide the subprocess console window that would normally be created. This - * option is only meaningful on Windows systems. On Unix it is silently - * ignored. - */ - UV_PROCESS_WINDOWS_HIDE = (1 << 4) -}; - -/* - * uv_process_t is a subclass of uv_handle_t. - */ -struct uv_process_s { - UV_HANDLE_FIELDS - uv_exit_cb exit_cb; - int pid; - UV_PROCESS_PRIVATE_FIELDS -}; - -UV_EXTERN int uv_spawn(uv_loop_t* loop, - uv_process_t* handle, - const uv_process_options_t* options); -UV_EXTERN int uv_process_kill(uv_process_t*, int signum); -UV_EXTERN int uv_kill(int pid, int signum); - - -/* - * uv_work_t is a subclass of uv_req_t. - */ -struct uv_work_s { - UV_REQ_FIELDS - uv_loop_t* loop; - uv_work_cb work_cb; - uv_after_work_cb after_work_cb; - UV_WORK_PRIVATE_FIELDS -}; - -UV_EXTERN int uv_queue_work(uv_loop_t* loop, - uv_work_t* req, - uv_work_cb work_cb, - uv_after_work_cb after_work_cb); - -UV_EXTERN int uv_cancel(uv_req_t* req); - - -struct uv_cpu_info_s { - char* model; - int speed; - struct uv_cpu_times_s { - uint64_t user; - uint64_t nice; - uint64_t sys; - uint64_t idle; - uint64_t irq; - } cpu_times; -}; - -struct uv_interface_address_s { - char* name; - char phys_addr[6]; - int is_internal; - union { - struct sockaddr_in address4; - struct sockaddr_in6 address6; - } address; - union { - struct sockaddr_in netmask4; - struct sockaddr_in6 netmask6; - } netmask; -}; - -typedef enum { - UV_DIRENT_UNKNOWN, - UV_DIRENT_FILE, - UV_DIRENT_DIR, - UV_DIRENT_LINK, - UV_DIRENT_FIFO, - UV_DIRENT_SOCKET, - UV_DIRENT_CHAR, - UV_DIRENT_BLOCK -} uv_dirent_type_t; - -struct uv_dirent_s { - const char* name; - uv_dirent_type_t type; -}; - -UV_EXTERN char** uv_setup_args(int argc, char** argv); -UV_EXTERN int uv_get_process_title(char* buffer, size_t size); -UV_EXTERN int uv_set_process_title(const char* title); -UV_EXTERN int uv_resident_set_memory(size_t* rss); -UV_EXTERN int uv_uptime(double* uptime); - -typedef struct { - long tv_sec; - long tv_usec; -} uv_timeval_t; - -typedef struct { - uv_timeval_t ru_utime; /* user CPU time used */ - uv_timeval_t ru_stime; /* system CPU time used */ - uint64_t ru_maxrss; /* maximum resident set size */ - uint64_t ru_ixrss; /* integral shared memory size */ - uint64_t ru_idrss; /* integral unshared data size */ - uint64_t ru_isrss; /* integral unshared stack size */ - uint64_t ru_minflt; /* page reclaims (soft page faults) */ - uint64_t ru_majflt; /* page faults (hard page faults) */ - uint64_t ru_nswap; /* swaps */ - uint64_t ru_inblock; /* block input operations */ - uint64_t ru_oublock; /* block output operations */ - uint64_t ru_msgsnd; /* IPC messages sent */ - uint64_t ru_msgrcv; /* IPC messages received */ - uint64_t ru_nsignals; /* signals received */ - uint64_t ru_nvcsw; /* voluntary context switches */ - uint64_t ru_nivcsw; /* involuntary context switches */ -} uv_rusage_t; - -UV_EXTERN int uv_getrusage(uv_rusage_t* rusage); - -UV_EXTERN int uv_os_homedir(char* buffer, size_t* size); - -UV_EXTERN int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count); -UV_EXTERN void uv_free_cpu_info(uv_cpu_info_t* cpu_infos, int count); - -UV_EXTERN int uv_interface_addresses(uv_interface_address_t** addresses, - int* count); -UV_EXTERN void uv_free_interface_addresses(uv_interface_address_t* addresses, - int count); - - -typedef enum { - UV_FS_UNKNOWN = -1, - UV_FS_CUSTOM, - UV_FS_OPEN, - UV_FS_CLOSE, - UV_FS_READ, - UV_FS_WRITE, - UV_FS_SENDFILE, - UV_FS_STAT, - UV_FS_LSTAT, - UV_FS_FSTAT, - UV_FS_FTRUNCATE, - UV_FS_UTIME, - UV_FS_FUTIME, - UV_FS_ACCESS, - UV_FS_CHMOD, - UV_FS_FCHMOD, - UV_FS_FSYNC, - UV_FS_FDATASYNC, - UV_FS_UNLINK, - UV_FS_RMDIR, - UV_FS_MKDIR, - UV_FS_MKDTEMP, - UV_FS_RENAME, - UV_FS_SCANDIR, - UV_FS_LINK, - UV_FS_SYMLINK, - UV_FS_READLINK, - UV_FS_CHOWN, - UV_FS_FCHOWN -} uv_fs_type; - -/* uv_fs_t is a subclass of uv_req_t. */ -struct uv_fs_s { - UV_REQ_FIELDS - uv_fs_type fs_type; - uv_loop_t* loop; - uv_fs_cb cb; - ssize_t result; - void* ptr; - const char* path; - uv_stat_t statbuf; /* Stores the result of uv_fs_stat() and uv_fs_fstat(). */ - UV_FS_PRIVATE_FIELDS -}; - -UV_EXTERN void uv_fs_req_cleanup(uv_fs_t* req); -UV_EXTERN int uv_fs_close(uv_loop_t* loop, - uv_fs_t* req, - uv_file file, - uv_fs_cb cb); -UV_EXTERN int uv_fs_open(uv_loop_t* loop, - uv_fs_t* req, - const char* path, - int flags, - int mode, - uv_fs_cb cb); -UV_EXTERN int uv_fs_read(uv_loop_t* loop, - uv_fs_t* req, - uv_file file, - const uv_buf_t bufs[], - unsigned int nbufs, - int64_t offset, - uv_fs_cb cb); -UV_EXTERN int uv_fs_unlink(uv_loop_t* loop, - uv_fs_t* req, - const char* path, - uv_fs_cb cb); -UV_EXTERN int uv_fs_write(uv_loop_t* loop, - uv_fs_t* req, - uv_file file, - const uv_buf_t bufs[], - unsigned int nbufs, - int64_t offset, - uv_fs_cb cb); -UV_EXTERN int uv_fs_mkdir(uv_loop_t* loop, - uv_fs_t* req, - const char* path, - int mode, - uv_fs_cb cb); -UV_EXTERN int uv_fs_mkdtemp(uv_loop_t* loop, - uv_fs_t* req, - const char* tpl, - uv_fs_cb cb); -UV_EXTERN int uv_fs_rmdir(uv_loop_t* loop, - uv_fs_t* req, - const char* path, - uv_fs_cb cb); -UV_EXTERN int uv_fs_scandir(uv_loop_t* loop, - uv_fs_t* req, - const char* path, - int flags, - uv_fs_cb cb); -UV_EXTERN int uv_fs_scandir_next(uv_fs_t* req, - uv_dirent_t* ent); -UV_EXTERN int uv_fs_stat(uv_loop_t* loop, - uv_fs_t* req, - const char* path, - uv_fs_cb cb); -UV_EXTERN int uv_fs_fstat(uv_loop_t* loop, - uv_fs_t* req, - uv_file file, - uv_fs_cb cb); -UV_EXTERN int uv_fs_rename(uv_loop_t* loop, - uv_fs_t* req, - const char* path, - const char* new_path, - uv_fs_cb cb); -UV_EXTERN int uv_fs_fsync(uv_loop_t* loop, - uv_fs_t* req, - uv_file file, - uv_fs_cb cb); -UV_EXTERN int uv_fs_fdatasync(uv_loop_t* loop, - uv_fs_t* req, - uv_file file, - uv_fs_cb cb); -UV_EXTERN int uv_fs_ftruncate(uv_loop_t* loop, - uv_fs_t* req, - uv_file file, - int64_t offset, - uv_fs_cb cb); -UV_EXTERN int uv_fs_sendfile(uv_loop_t* loop, - uv_fs_t* req, - uv_file out_fd, - uv_file in_fd, - int64_t in_offset, - size_t length, - uv_fs_cb cb); -UV_EXTERN int uv_fs_access(uv_loop_t* loop, - uv_fs_t* req, - const char* path, - int mode, - uv_fs_cb cb); -UV_EXTERN int uv_fs_chmod(uv_loop_t* loop, - uv_fs_t* req, - const char* path, - int mode, - uv_fs_cb cb); -UV_EXTERN int uv_fs_utime(uv_loop_t* loop, - uv_fs_t* req, - const char* path, - double atime, - double mtime, - uv_fs_cb cb); -UV_EXTERN int uv_fs_futime(uv_loop_t* loop, - uv_fs_t* req, - uv_file file, - double atime, - double mtime, - uv_fs_cb cb); -UV_EXTERN int uv_fs_lstat(uv_loop_t* loop, - uv_fs_t* req, - const char* path, - uv_fs_cb cb); -UV_EXTERN int uv_fs_link(uv_loop_t* loop, - uv_fs_t* req, - const char* path, - const char* new_path, - uv_fs_cb cb); - -/* - * This flag can be used with uv_fs_symlink() on Windows to specify whether - * path argument points to a directory. - */ -#define UV_FS_SYMLINK_DIR 0x0001 - -/* - * This flag can be used with uv_fs_symlink() on Windows to specify whether - * the symlink is to be created using junction points. - */ -#define UV_FS_SYMLINK_JUNCTION 0x0002 - -UV_EXTERN int uv_fs_symlink(uv_loop_t* loop, - uv_fs_t* req, - const char* path, - const char* new_path, - int flags, - uv_fs_cb cb); -UV_EXTERN int uv_fs_readlink(uv_loop_t* loop, - uv_fs_t* req, - const char* path, - uv_fs_cb cb); -UV_EXTERN int uv_fs_fchmod(uv_loop_t* loop, - uv_fs_t* req, - uv_file file, - int mode, - uv_fs_cb cb); -UV_EXTERN int uv_fs_chown(uv_loop_t* loop, - uv_fs_t* req, - const char* path, - uv_uid_t uid, - uv_gid_t gid, - uv_fs_cb cb); -UV_EXTERN int uv_fs_fchown(uv_loop_t* loop, - uv_fs_t* req, - uv_file file, - uv_uid_t uid, - uv_gid_t gid, - uv_fs_cb cb); - - -enum uv_fs_event { - UV_RENAME = 1, - UV_CHANGE = 2 -}; - - -struct uv_fs_event_s { - UV_HANDLE_FIELDS - /* private */ - char* path; - UV_FS_EVENT_PRIVATE_FIELDS -}; - - -/* - * uv_fs_stat() based polling file watcher. - */ -struct uv_fs_poll_s { - UV_HANDLE_FIELDS - /* Private, don't touch. */ - void* poll_ctx; -}; - -UV_EXTERN int uv_fs_poll_init(uv_loop_t* loop, uv_fs_poll_t* handle); -UV_EXTERN int uv_fs_poll_start(uv_fs_poll_t* handle, - uv_fs_poll_cb poll_cb, - const char* path, - unsigned int interval); -UV_EXTERN int uv_fs_poll_stop(uv_fs_poll_t* handle); -UV_EXTERN int uv_fs_poll_getpath(uv_fs_poll_t* handle, - char* buffer, - size_t* size); - - -struct uv_signal_s { - UV_HANDLE_FIELDS - uv_signal_cb signal_cb; - int signum; - UV_SIGNAL_PRIVATE_FIELDS -}; - -UV_EXTERN int uv_signal_init(uv_loop_t* loop, uv_signal_t* handle); -UV_EXTERN int uv_signal_start(uv_signal_t* handle, - uv_signal_cb signal_cb, - int signum); -UV_EXTERN int uv_signal_stop(uv_signal_t* handle); - -UV_EXTERN void uv_loadavg(double avg[3]); - - -/* - * Flags to be passed to uv_fs_event_start(). - */ -enum uv_fs_event_flags { - /* - * By default, if the fs event watcher is given a directory name, we will - * watch for all events in that directory. This flags overrides this behavior - * and makes fs_event report only changes to the directory entry itself. This - * flag does not affect individual files watched. - * This flag is currently not implemented yet on any backend. - */ - UV_FS_EVENT_WATCH_ENTRY = 1, - - /* - * By default uv_fs_event will try to use a kernel interface such as inotify - * or kqueue to detect events. This may not work on remote filesystems such - * as NFS mounts. This flag makes fs_event fall back to calling stat() on a - * regular interval. - * This flag is currently not implemented yet on any backend. - */ - UV_FS_EVENT_STAT = 2, - - /* - * By default, event watcher, when watching directory, is not registering - * (is ignoring) changes in it's subdirectories. - * This flag will override this behaviour on platforms that support it. - */ - UV_FS_EVENT_RECURSIVE = 4 -}; - - -UV_EXTERN int uv_fs_event_init(uv_loop_t* loop, uv_fs_event_t* handle); -UV_EXTERN int uv_fs_event_start(uv_fs_event_t* handle, - uv_fs_event_cb cb, - const char* path, - unsigned int flags); -UV_EXTERN int uv_fs_event_stop(uv_fs_event_t* handle); -UV_EXTERN int uv_fs_event_getpath(uv_fs_event_t* handle, - char* buffer, - size_t* size); - -UV_EXTERN int uv_ip4_addr(const char* ip, int port, struct sockaddr_in* addr); -UV_EXTERN int uv_ip6_addr(const char* ip, int port, struct sockaddr_in6* addr); - -UV_EXTERN int uv_ip4_name(const struct sockaddr_in* src, char* dst, size_t size); -UV_EXTERN int uv_ip6_name(const struct sockaddr_in6* src, char* dst, size_t size); - -UV_EXTERN int uv_inet_ntop(int af, const void* src, char* dst, size_t size); -UV_EXTERN int uv_inet_pton(int af, const char* src, void* dst); - -UV_EXTERN int uv_exepath(char* buffer, size_t* size); - -UV_EXTERN int uv_cwd(char* buffer, size_t* size); - -UV_EXTERN int uv_chdir(const char* dir); - -UV_EXTERN uint64_t uv_get_free_memory(void); -UV_EXTERN uint64_t uv_get_total_memory(void); - -UV_EXTERN extern uint64_t uv_hrtime(void); - -UV_EXTERN void uv_disable_stdio_inheritance(void); - -UV_EXTERN int uv_dlopen(const char* filename, uv_lib_t* lib); -UV_EXTERN void uv_dlclose(uv_lib_t* lib); -UV_EXTERN int uv_dlsym(uv_lib_t* lib, const char* name, void** ptr); -UV_EXTERN const char* uv_dlerror(const uv_lib_t* lib); - -UV_EXTERN int uv_mutex_init(uv_mutex_t* handle); -UV_EXTERN void uv_mutex_destroy(uv_mutex_t* handle); -UV_EXTERN void uv_mutex_lock(uv_mutex_t* handle); -UV_EXTERN int uv_mutex_trylock(uv_mutex_t* handle); -UV_EXTERN void uv_mutex_unlock(uv_mutex_t* handle); - -UV_EXTERN int uv_rwlock_init(uv_rwlock_t* rwlock); -UV_EXTERN void uv_rwlock_destroy(uv_rwlock_t* rwlock); -UV_EXTERN void uv_rwlock_rdlock(uv_rwlock_t* rwlock); -UV_EXTERN int uv_rwlock_tryrdlock(uv_rwlock_t* rwlock); -UV_EXTERN void uv_rwlock_rdunlock(uv_rwlock_t* rwlock); -UV_EXTERN void uv_rwlock_wrlock(uv_rwlock_t* rwlock); -UV_EXTERN int uv_rwlock_trywrlock(uv_rwlock_t* rwlock); -UV_EXTERN void uv_rwlock_wrunlock(uv_rwlock_t* rwlock); - -UV_EXTERN int uv_sem_init(uv_sem_t* sem, unsigned int value); -UV_EXTERN void uv_sem_destroy(uv_sem_t* sem); -UV_EXTERN void uv_sem_post(uv_sem_t* sem); -UV_EXTERN void uv_sem_wait(uv_sem_t* sem); -UV_EXTERN int uv_sem_trywait(uv_sem_t* sem); - -UV_EXTERN int uv_cond_init(uv_cond_t* cond); -UV_EXTERN void uv_cond_destroy(uv_cond_t* cond); -UV_EXTERN void uv_cond_signal(uv_cond_t* cond); -UV_EXTERN void uv_cond_broadcast(uv_cond_t* cond); - -UV_EXTERN int uv_barrier_init(uv_barrier_t* barrier, unsigned int count); -UV_EXTERN void uv_barrier_destroy(uv_barrier_t* barrier); -UV_EXTERN int uv_barrier_wait(uv_barrier_t* barrier); - -UV_EXTERN void uv_cond_wait(uv_cond_t* cond, uv_mutex_t* mutex); -UV_EXTERN int uv_cond_timedwait(uv_cond_t* cond, - uv_mutex_t* mutex, - uint64_t timeout); - -UV_EXTERN void uv_once(uv_once_t* guard, void (*callback)(void)); - -UV_EXTERN int uv_key_create(uv_key_t* key); -UV_EXTERN void uv_key_delete(uv_key_t* key); -UV_EXTERN void* uv_key_get(uv_key_t* key); -UV_EXTERN void uv_key_set(uv_key_t* key, void* value); - -typedef void (*uv_thread_cb)(void* arg); - -UV_EXTERN int uv_thread_create(uv_thread_t* tid, uv_thread_cb entry, void* arg); -UV_EXTERN uv_thread_t uv_thread_self(void); -UV_EXTERN int uv_thread_join(uv_thread_t *tid); -UV_EXTERN int uv_thread_equal(const uv_thread_t* t1, const uv_thread_t* t2); - -/* The presence of these unions force similar struct layout. */ -#define XX(_, name) uv_ ## name ## _t name; -union uv_any_handle { - UV_HANDLE_TYPE_MAP(XX) -}; - -union uv_any_req { - UV_REQ_TYPE_MAP(XX) -}; -#undef XX - - -struct uv_loop_s { - /* User data - use this for whatever. */ - void* data; - /* Loop reference counting. */ - unsigned int active_handles; - void* handle_queue[2]; - void* active_reqs[2]; - /* Internal flag to signal loop stop. */ - unsigned int stop_flag; - UV_LOOP_PRIVATE_FIELDS -}; - - -/* Don't export the private CPP symbols. */ -#undef UV_HANDLE_TYPE_PRIVATE -#undef UV_REQ_TYPE_PRIVATE -#undef UV_REQ_PRIVATE_FIELDS -#undef UV_STREAM_PRIVATE_FIELDS -#undef UV_TCP_PRIVATE_FIELDS -#undef UV_PREPARE_PRIVATE_FIELDS -#undef UV_CHECK_PRIVATE_FIELDS -#undef UV_IDLE_PRIVATE_FIELDS -#undef UV_ASYNC_PRIVATE_FIELDS -#undef UV_TIMER_PRIVATE_FIELDS -#undef UV_GETADDRINFO_PRIVATE_FIELDS -#undef UV_GETNAMEINFO_PRIVATE_FIELDS -#undef UV_FS_REQ_PRIVATE_FIELDS -#undef UV_WORK_PRIVATE_FIELDS -#undef UV_FS_EVENT_PRIVATE_FIELDS -#undef UV_SIGNAL_PRIVATE_FIELDS -#undef UV_LOOP_PRIVATE_FIELDS -#undef UV_LOOP_PRIVATE_PLATFORM_FIELDS - -#ifdef __cplusplus -} -#endif -#endif /* UV_H */ diff --git a/outside/libuv-v1.7.5/libuv.nsi b/outside/libuv-v1.7.5/libuv.nsi deleted file mode 100644 index 159756e19..000000000 --- a/outside/libuv-v1.7.5/libuv.nsi +++ /dev/null @@ -1,86 +0,0 @@ -; NSIS installer script for libuv - -!include "MUI2.nsh" - -Name "libuv" -OutFile "libuv-${ARCH}-${VERSION}.exe" - -!include "x64.nsh" -# Default install location, for 32-bit files -InstallDir "$PROGRAMFILES\libuv" - -# Override install and registry locations if this is a 64-bit install. -function .onInit - ${If} ${ARCH} == "x64" - SetRegView 64 - StrCpy $INSTDIR "$PROGRAMFILES64\libuv" - ${EndIf} -functionEnd - -;-------------------------------- -; Installer pages -!insertmacro MUI_PAGE_WELCOME -!insertmacro MUI_PAGE_DIRECTORY -!insertmacro MUI_PAGE_INSTFILES -!insertmacro MUI_PAGE_FINISH - - -;-------------------------------- -; Uninstaller pages -!insertmacro MUI_UNPAGE_WELCOME -!insertmacro MUI_UNPAGE_CONFIRM -!insertmacro MUI_UNPAGE_INSTFILES -!insertmacro MUI_UNPAGE_FINISH - -;-------------------------------- -; Languages -!insertmacro MUI_LANGUAGE "English" - -;-------------------------------- -; Installer sections - -Section "Files" SecInstall - SectionIn RO - SetOutPath "$INSTDIR" - File "Release\*.dll" - File "Release\*.lib" - File "LICENSE" - File "README.md" - - SetOutPath "$INSTDIR\include" - File "include\uv.h" - File "include\uv-errno.h" - File "include\uv-threadpool.h" - File "include\uv-version.h" - File "include\uv-win.h" - File "include\tree.h" - - WriteUninstaller "$INSTDIR\Uninstall.exe" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\libuv-${ARCH}-${VERSION}" "DisplayName" "libuv-${ARCH}-${VERSION}" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\libuv-${ARCH}-${VERSION}" "UninstallString" "$\"$INSTDIR\Uninstall.exe$\"" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\libuv-${ARCH}-${VERSION}" "QuietUninstallString" "$\"$INSTDIR\Uninstall.exe$\" /S" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\libuv-${ARCH}-${VERSION}" "HelpLink" "http://libuv.org/" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\libuv-${ARCH}-${VERSION}" "URLInfoAbout" "http://libuv.org/" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\libuv-${ARCH}-${VERSION}" "DisplayVersion" "${VERSION}" - WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\libuv-${ARCH}-${VERSION}" "NoModify" "1" - WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\libuv-${ARCH}-${VERSION}" "NoRepair" "1" -SectionEnd - -Section "Uninstall" - Delete "$INSTDIR\libuv.dll" - Delete "$INSTDIR\libuv.lib" - Delete "$INSTDIR\LICENSE" - Delete "$INSTDIR\README.md" - - Delete "$INSTDIR\include\uv.h" - Delete "$INSTDIR\include\uv-errno.h" - Delete "$INSTDIR\include\uv-threadpool.h" - Delete "$INSTDIR\include\uv-version.h" - Delete "$INSTDIR\include\uv-win.h" - Delete "$INSTDIR\include\tree.h" - - Delete "$INSTDIR\Uninstall.exe" - RMDir "$INSTDIR" - DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\libuv-${ARCH}-${VERSION}" -SectionEnd - diff --git a/outside/libuv-v1.7.5/libuv.pc.in b/outside/libuv-v1.7.5/libuv.pc.in deleted file mode 100644 index 2933ec225..000000000 --- a/outside/libuv-v1.7.5/libuv.pc.in +++ /dev/null @@ -1,11 +0,0 @@ -prefix=@prefix@ -exec_prefix=@prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: @PACKAGE_NAME@ -Version: @PACKAGE_VERSION@ -Description: multi-platform support library with a focus on asynchronous I/O. - -Libs: -L${libdir} -luv @LIBS@ -Cflags: -I${includedir} diff --git a/outside/libuv-v1.7.5/m4/.gitignore b/outside/libuv-v1.7.5/m4/.gitignore deleted file mode 100644 index c44e4c292..000000000 --- a/outside/libuv-v1.7.5/m4/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Ignore libtoolize-generated files. -*.m4 -!as_case.m4 -!libuv-check-flags.m4 diff --git a/outside/libuv-v1.7.5/m4/as_case.m4 b/outside/libuv-v1.7.5/m4/as_case.m4 deleted file mode 100644 index c7ae0f0f5..000000000 --- a/outside/libuv-v1.7.5/m4/as_case.m4 +++ /dev/null @@ -1,21 +0,0 @@ -# AS_CASE(WORD, [PATTERN1], [IF-MATCHED1]...[DEFAULT]) -# ---------------------------------------------------- -# Expand into -# | case WORD in -# | PATTERN1) IF-MATCHED1 ;; -# | ... -# | *) DEFAULT ;; -# | esac -m4_define([_AS_CASE], -[m4_if([$#], 0, [m4_fatal([$0: too few arguments: $#])], - [$#], 1, [ *) $1 ;;], - [$#], 2, [ $1) m4_default([$2], [:]) ;;], - [ $1) m4_default([$2], [:]) ;; -$0(m4_shiftn(2, $@))])dnl -]) -m4_defun([AS_CASE], -[m4_ifval([$2$3], -[case $1 in -_AS_CASE(m4_shift($@)) -esac])]) - diff --git a/outside/libuv-v1.7.5/m4/libuv-check-flags.m4 b/outside/libuv-v1.7.5/m4/libuv-check-flags.m4 deleted file mode 100644 index 59c306355..000000000 --- a/outside/libuv-v1.7.5/m4/libuv-check-flags.m4 +++ /dev/null @@ -1,319 +0,0 @@ -dnl Macros to check the presence of generic (non-typed) symbols. -dnl Copyright (c) 2006-2008 Diego Pettenà -dnl Copyright (c) 2006-2008 xine project -dnl -dnl This program is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU General Public License as published by -dnl the Free Software Foundation; either version 3, or (at your option) -dnl any later version. -dnl -dnl This program is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -dnl GNU General Public License for more details. -dnl -dnl You should have received a copy of the GNU General Public License -dnl along with this program; if not, write to the Free Software -dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -dnl 02110-1301, USA. -dnl -dnl As a special exception, the copyright owners of the -dnl macro gives unlimited permission to copy, distribute and modify the -dnl configure scripts that are the output of Autoconf when processing the -dnl Macro. You need not follow the terms of the GNU General Public -dnl License when using or distributing such scripts, even though portions -dnl of the text of the Macro appear in them. The GNU General Public -dnl License (GPL) does govern all other use of the material that -dnl constitutes the Autoconf Macro. -dnl -dnl This special exception to the GPL applies to versions of the -dnl Autoconf Macro released by this project. When you make and -dnl distribute a modified version of the Autoconf Macro, you may extend -dnl this special exception to the GPL to apply to your modified version as -dnl well. - -dnl Check if the flag is supported by compiler -dnl CC_CHECK_CFLAGS_SILENT([FLAG], [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND]) - -AC_DEFUN([CC_CHECK_CFLAGS_SILENT], [ - AC_CACHE_VAL(AS_TR_SH([cc_cv_cflags_$1]), - [ac_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $1" - AC_COMPILE_IFELSE([AC_LANG_SOURCE([int a;])], - [eval "AS_TR_SH([cc_cv_cflags_$1])='yes'"], - [eval "AS_TR_SH([cc_cv_cflags_$1])='no'"]) - CFLAGS="$ac_save_CFLAGS" - ]) - - AS_IF([eval test x$]AS_TR_SH([cc_cv_cflags_$1])[ = xyes], - [$2], [$3]) -]) - -dnl Check if the flag is supported by compiler (cacheable) -dnl CC_CHECK_CFLAGS([FLAG], [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND]) - -AC_DEFUN([CC_CHECK_CFLAGS], [ - AC_CACHE_CHECK([if $CC supports $1 flag], - AS_TR_SH([cc_cv_cflags_$1]), - CC_CHECK_CFLAGS_SILENT([$1]) dnl Don't execute actions here! - ) - - AS_IF([eval test x$]AS_TR_SH([cc_cv_cflags_$1])[ = xyes], - [$2], [$3]) -]) - -dnl CC_CHECK_CFLAG_APPEND(FLAG, [action-if-found], [action-if-not-found]) -dnl Check for CFLAG and appends them to CFLAGS if supported -AC_DEFUN([CC_CHECK_CFLAG_APPEND], [ - AC_CACHE_CHECK([if $CC supports $1 flag], - AS_TR_SH([cc_cv_cflags_$1]), - CC_CHECK_CFLAGS_SILENT([$1]) dnl Don't execute actions here! - ) - - AS_IF([eval test x$]AS_TR_SH([cc_cv_cflags_$1])[ = xyes], - [CFLAGS="$CFLAGS $1"; DEBUG_CFLAGS="$DEBUG_CFLAGS $1"; $2], [$3]) -]) - -dnl CC_CHECK_CFLAGS_APPEND([FLAG1 FLAG2], [action-if-found], [action-if-not]) -AC_DEFUN([CC_CHECK_CFLAGS_APPEND], [ - for flag in $1; do - CC_CHECK_CFLAG_APPEND($flag, [$2], [$3]) - done -]) - -dnl Check if the flag is supported by linker (cacheable) -dnl CC_CHECK_LDFLAGS([FLAG], [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND]) - -AC_DEFUN([CC_CHECK_LDFLAGS], [ - AC_CACHE_CHECK([if $CC supports $1 flag], - AS_TR_SH([cc_cv_ldflags_$1]), - [ac_save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $1" - AC_LANG_PUSH([C]) - AC_LINK_IFELSE([AC_LANG_SOURCE([int main() { return 1; }])], - [eval "AS_TR_SH([cc_cv_ldflags_$1])='yes'"], - [eval "AS_TR_SH([cc_cv_ldflags_$1])="]) - AC_LANG_POP([C]) - LDFLAGS="$ac_save_LDFLAGS" - ]) - - AS_IF([eval test x$]AS_TR_SH([cc_cv_ldflags_$1])[ = xyes], - [$2], [$3]) -]) - -dnl define the LDFLAGS_NOUNDEFINED variable with the correct value for -dnl the current linker to avoid undefined references in a shared object. -AC_DEFUN([CC_NOUNDEFINED], [ - dnl We check $host for which systems to enable this for. - AC_REQUIRE([AC_CANONICAL_HOST]) - - case $host in - dnl FreeBSD (et al.) does not complete linking for shared objects when pthreads - dnl are requested, as different implementations are present; to avoid problems - dnl use -Wl,-z,defs only for those platform not behaving this way. - *-freebsd* | *-openbsd*) ;; - *) - dnl First of all check for the --no-undefined variant of GNU ld. This allows - dnl for a much more readable commandline, so that people can understand what - dnl it does without going to look for what the heck -z defs does. - for possible_flags in "-Wl,--no-undefined" "-Wl,-z,defs"; do - CC_CHECK_LDFLAGS([$possible_flags], [LDFLAGS_NOUNDEFINED="$possible_flags"]) - break - done - ;; - esac - - AC_SUBST([LDFLAGS_NOUNDEFINED]) -]) - -dnl Check for a -Werror flag or equivalent. -Werror is the GCC -dnl and ICC flag that tells the compiler to treat all the warnings -dnl as fatal. We usually need this option to make sure that some -dnl constructs (like attributes) are not simply ignored. -dnl -dnl Other compilers don't support -Werror per se, but they support -dnl an equivalent flag: -dnl - Sun Studio compiler supports -errwarn=%all -AC_DEFUN([CC_CHECK_WERROR], [ - AC_CACHE_CHECK( - [for $CC way to treat warnings as errors], - [cc_cv_werror], - [CC_CHECK_CFLAGS_SILENT([-Werror], [cc_cv_werror=-Werror], - [CC_CHECK_CFLAGS_SILENT([-errwarn=%all], [cc_cv_werror=-errwarn=%all])]) - ]) -]) - -AC_DEFUN([CC_CHECK_ATTRIBUTE], [ - AC_REQUIRE([CC_CHECK_WERROR]) - AC_CACHE_CHECK([if $CC supports __attribute__(( ifelse([$2], , [$1], [$2]) ))], - AS_TR_SH([cc_cv_attribute_$1]), - [ac_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $cc_cv_werror" - AC_LANG_PUSH([C]) - AC_COMPILE_IFELSE([AC_LANG_SOURCE([$3])], - [eval "AS_TR_SH([cc_cv_attribute_$1])='yes'"], - [eval "AS_TR_SH([cc_cv_attribute_$1])='no'"]) - AC_LANG_POP([C]) - CFLAGS="$ac_save_CFLAGS" - ]) - - AS_IF([eval test x$]AS_TR_SH([cc_cv_attribute_$1])[ = xyes], - [AC_DEFINE( - AS_TR_CPP([SUPPORT_ATTRIBUTE_$1]), 1, - [Define this if the compiler supports __attribute__(( ifelse([$2], , [$1], [$2]) ))] - ) - $4], - [$5]) -]) - -AC_DEFUN([CC_ATTRIBUTE_CONSTRUCTOR], [ - CC_CHECK_ATTRIBUTE( - [constructor],, - [void __attribute__((constructor)) ctor() { int a; }], - [$1], [$2]) -]) - -AC_DEFUN([CC_ATTRIBUTE_FORMAT], [ - CC_CHECK_ATTRIBUTE( - [format], [format(printf, n, n)], - [void __attribute__((format(printf, 1, 2))) printflike(const char *fmt, ...) { fmt = (void *)0; }], - [$1], [$2]) -]) - -AC_DEFUN([CC_ATTRIBUTE_FORMAT_ARG], [ - CC_CHECK_ATTRIBUTE( - [format_arg], [format_arg(printf)], - [char *__attribute__((format_arg(1))) gettextlike(const char *fmt) { fmt = (void *)0; }], - [$1], [$2]) -]) - -AC_DEFUN([CC_ATTRIBUTE_VISIBILITY], [ - CC_CHECK_ATTRIBUTE( - [visibility_$1], [visibility("$1")], - [void __attribute__((visibility("$1"))) $1_function() { }], - [$2], [$3]) -]) - -AC_DEFUN([CC_ATTRIBUTE_NONNULL], [ - CC_CHECK_ATTRIBUTE( - [nonnull], [nonnull()], - [void __attribute__((nonnull())) some_function(void *foo, void *bar) { foo = (void*)0; bar = (void*)0; }], - [$1], [$2]) -]) - -AC_DEFUN([CC_ATTRIBUTE_UNUSED], [ - CC_CHECK_ATTRIBUTE( - [unused], , - [void some_function(void *foo, __attribute__((unused)) void *bar);], - [$1], [$2]) -]) - -AC_DEFUN([CC_ATTRIBUTE_SENTINEL], [ - CC_CHECK_ATTRIBUTE( - [sentinel], , - [void some_function(void *foo, ...) __attribute__((sentinel));], - [$1], [$2]) -]) - -AC_DEFUN([CC_ATTRIBUTE_DEPRECATED], [ - CC_CHECK_ATTRIBUTE( - [deprecated], , - [void some_function(void *foo, ...) __attribute__((deprecated));], - [$1], [$2]) -]) - -AC_DEFUN([CC_ATTRIBUTE_ALIAS], [ - CC_CHECK_ATTRIBUTE( - [alias], [weak, alias], - [void other_function(void *foo) { } - void some_function(void *foo) __attribute__((weak, alias("other_function")));], - [$1], [$2]) -]) - -AC_DEFUN([CC_ATTRIBUTE_MALLOC], [ - CC_CHECK_ATTRIBUTE( - [malloc], , - [void * __attribute__((malloc)) my_alloc(int n);], - [$1], [$2]) -]) - -AC_DEFUN([CC_ATTRIBUTE_PACKED], [ - CC_CHECK_ATTRIBUTE( - [packed], , - [struct astructure { char a; int b; long c; void *d; } __attribute__((packed));], - [$1], [$2]) -]) - -AC_DEFUN([CC_ATTRIBUTE_CONST], [ - CC_CHECK_ATTRIBUTE( - [const], , - [int __attribute__((const)) twopow(int n) { return 1 << n; } ], - [$1], [$2]) -]) - -AC_DEFUN([CC_FLAG_VISIBILITY], [ - AC_REQUIRE([CC_CHECK_WERROR]) - AC_CACHE_CHECK([if $CC supports -fvisibility=hidden], - [cc_cv_flag_visibility], - [cc_flag_visibility_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $cc_cv_werror" - CC_CHECK_CFLAGS_SILENT([-fvisibility=hidden], - cc_cv_flag_visibility='yes', - cc_cv_flag_visibility='no') - CFLAGS="$cc_flag_visibility_save_CFLAGS"]) - - AS_IF([test "x$cc_cv_flag_visibility" = "xyes"], - [AC_DEFINE([SUPPORT_FLAG_VISIBILITY], 1, - [Define this if the compiler supports the -fvisibility flag]) - $1], - [$2]) -]) - -AC_DEFUN([CC_FUNC_EXPECT], [ - AC_REQUIRE([CC_CHECK_WERROR]) - AC_CACHE_CHECK([if compiler has __builtin_expect function], - [cc_cv_func_expect], - [ac_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $cc_cv_werror" - AC_LANG_PUSH([C]) - AC_COMPILE_IFELSE([AC_LANG_SOURCE( - [int some_function() { - int a = 3; - return (int)__builtin_expect(a, 3); - }])], - [cc_cv_func_expect=yes], - [cc_cv_func_expect=no]) - AC_LANG_POP([C]) - CFLAGS="$ac_save_CFLAGS" - ]) - - AS_IF([test "x$cc_cv_func_expect" = "xyes"], - [AC_DEFINE([SUPPORT__BUILTIN_EXPECT], 1, - [Define this if the compiler supports __builtin_expect() function]) - $1], - [$2]) -]) - -AC_DEFUN([CC_ATTRIBUTE_ALIGNED], [ - AC_REQUIRE([CC_CHECK_WERROR]) - AC_CACHE_CHECK([highest __attribute__ ((aligned ())) supported], - [cc_cv_attribute_aligned], - [ac_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $cc_cv_werror" - AC_LANG_PUSH([C]) - for cc_attribute_align_try in 64 32 16 8 4 2; do - AC_COMPILE_IFELSE([AC_LANG_SOURCE([ - int main() { - static char c __attribute__ ((aligned($cc_attribute_align_try))) = 0; - return c; - }])], [cc_cv_attribute_aligned=$cc_attribute_align_try; break]) - done - AC_LANG_POP([C]) - CFLAGS="$ac_save_CFLAGS" - ]) - - if test "x$cc_cv_attribute_aligned" != "x"; then - AC_DEFINE_UNQUOTED([ATTRIBUTE_ALIGNED_MAX], [$cc_cv_attribute_aligned], - [Define the highest alignment supported]) - fi -]) \ No newline at end of file diff --git a/outside/libuv-v1.7.5/samples/.gitignore b/outside/libuv-v1.7.5/samples/.gitignore deleted file mode 100644 index f868091ba..000000000 --- a/outside/libuv-v1.7.5/samples/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright StrongLoop, Inc. All rights reserved. -# -# 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. - -*.mk -*.Makefile diff --git a/outside/libuv-v1.7.5/samples/socks5-proxy/.gitignore b/outside/libuv-v1.7.5/samples/socks5-proxy/.gitignore deleted file mode 100644 index c177f3745..000000000 --- a/outside/libuv-v1.7.5/samples/socks5-proxy/.gitignore +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright StrongLoop, Inc. All rights reserved. -# -# 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. - -/build/ diff --git a/outside/libuv-v1.7.5/samples/socks5-proxy/LICENSE b/outside/libuv-v1.7.5/samples/socks5-proxy/LICENSE deleted file mode 100644 index 63c1447fc..000000000 --- a/outside/libuv-v1.7.5/samples/socks5-proxy/LICENSE +++ /dev/null @@ -1,53 +0,0 @@ -Files: * -======== - -Copyright StrongLoop, Inc. All rights reserved. - -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. - - -Files: getopt.c -=============== - -Copyright (c) 1987, 1993, 1994 -The Regents of the University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University 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 REGENTS 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 REGENTS 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/outside/libuv-v1.7.5/samples/socks5-proxy/Makefile b/outside/libuv-v1.7.5/samples/socks5-proxy/Makefile deleted file mode 100644 index ca43985ec..000000000 --- a/outside/libuv-v1.7.5/samples/socks5-proxy/Makefile +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright StrongLoop, Inc. All rights reserved. -# -# 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. - -BUILDTYPE ?= Debug -BUILDDIR ?= build -GYP ?= gyp -V ?= - -SOURCES := client.c defs.h getopt.c main.c s5.c s5.h server.c util.c - -.PHONY: all clean - -all: $(BUILDDIR)/$(BUILDTYPE)/s5-proxy - -clean: - $(RM) $(BUILDDIR) - -$(BUILDDIR)/$(BUILDTYPE)/s5-proxy: $(BUILDDIR)/Makefile $(SOURCES) - $(MAKE) -C $(BUILDDIR) V=$(V) - -$(BUILDDIR)/Makefile: ../../common.gypi build.gyp - $(GYP) \ - -Duv_library=static_library \ - -Goutput_dir=. \ - -I../../common.gypi \ - -f make \ - --depth=. \ - --generator-output=$(BUILDDIR) \ - build.gyp diff --git a/outside/libuv-v1.7.5/samples/socks5-proxy/build.gyp b/outside/libuv-v1.7.5/samples/socks5-proxy/build.gyp deleted file mode 100644 index 771a1e146..000000000 --- a/outside/libuv-v1.7.5/samples/socks5-proxy/build.gyp +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright StrongLoop, Inc. All rights reserved. -# -# 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. - -{ - 'targets': [ - { - 'dependencies': ['../../uv.gyp:libuv'], - 'target_name': 's5-proxy', - 'type': 'executable', - 'sources': [ - 'client.c', - 'defs.h', - 'main.c', - 's5.c', - 's5.h', - 'server.c', - 'util.c', - ], - 'conditions': [ - ['OS=="win"', { - 'defines': ['HAVE_UNISTD_H=0'], - 'sources': ['getopt.c'] - }, { - 'defines': ['HAVE_UNISTD_H=1'] - }] - ] - } - ] -} diff --git a/outside/libuv-v1.7.5/samples/socks5-proxy/client.c b/outside/libuv-v1.7.5/samples/socks5-proxy/client.c deleted file mode 100644 index ae9913a1c..000000000 --- a/outside/libuv-v1.7.5/samples/socks5-proxy/client.c +++ /dev/null @@ -1,737 +0,0 @@ -/* Copyright StrongLoop, Inc. All rights reserved. - * - * 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. - */ - -#include "defs.h" -#include -#include -#include - -/* A connection is modeled as an abstraction on top of two simple state - * machines, one for reading and one for writing. Either state machine - * is, when active, in one of three states: busy, done or stop; the fourth - * and final state, dead, is an end state and only relevant when shutting - * down the connection. A short overview: - * - * busy done stop - * ----------|---------------------------|--------------------|------| - * readable | waiting for incoming data | have incoming data | idle | - * writable | busy writing out data | completed write | idle | - * - * We could remove the done state from the writable state machine. For our - * purposes, it's functionally equivalent to the stop state. - * - * When the connection with upstream has been established, the client_ctx - * moves into a state where incoming data from the client is sent upstream - * and vice versa, incoming data from upstream is sent to the client. In - * other words, we're just piping data back and forth. See conn_cycle() - * for details. - * - * An interesting deviation from libuv's I/O model is that reads are discrete - * rather than continuous events. In layman's terms, when a read operation - * completes, the connection stops reading until further notice. - * - * The rationale for this approach is that we have to wait until the data - * has been sent out again before we can reuse the read buffer. - * - * It also pleasingly unifies with the request model that libuv uses for - * writes and everything else; libuv may switch to a request model for - * reads in the future. - */ -enum conn_state { - c_busy, /* Busy; waiting for incoming data or for a write to complete. */ - c_done, /* Done; read incoming data or write finished. */ - c_stop, /* Stopped. */ - c_dead -}; - -/* Session states. */ -enum sess_state { - s_handshake, /* Wait for client handshake. */ - s_handshake_auth, /* Wait for client authentication data. */ - s_req_start, /* Start waiting for request data. */ - s_req_parse, /* Wait for request data. */ - s_req_lookup, /* Wait for upstream hostname DNS lookup to complete. */ - s_req_connect, /* Wait for uv_tcp_connect() to complete. */ - s_proxy_start, /* Connected. Start piping data. */ - s_proxy, /* Connected. Pipe data back and forth. */ - s_kill, /* Tear down session. */ - s_almost_dead_0, /* Waiting for finalizers to complete. */ - s_almost_dead_1, /* Waiting for finalizers to complete. */ - s_almost_dead_2, /* Waiting for finalizers to complete. */ - s_almost_dead_3, /* Waiting for finalizers to complete. */ - s_almost_dead_4, /* Waiting for finalizers to complete. */ - s_dead /* Dead. Safe to free now. */ -}; - -static void do_next(client_ctx *cx); -static int do_handshake(client_ctx *cx); -static int do_handshake_auth(client_ctx *cx); -static int do_req_start(client_ctx *cx); -static int do_req_parse(client_ctx *cx); -static int do_req_lookup(client_ctx *cx); -static int do_req_connect_start(client_ctx *cx); -static int do_req_connect(client_ctx *cx); -static int do_proxy_start(client_ctx *cx); -static int do_proxy(client_ctx *cx); -static int do_kill(client_ctx *cx); -static int do_almost_dead(client_ctx *cx); -static int conn_cycle(const char *who, conn *a, conn *b); -static void conn_timer_reset(conn *c); -static void conn_timer_expire(uv_timer_t *handle, int status); -static void conn_getaddrinfo(conn *c, const char *hostname); -static void conn_getaddrinfo_done(uv_getaddrinfo_t *req, - int status, - struct addrinfo *ai); -static int conn_connect(conn *c); -static void conn_connect_done(uv_connect_t *req, int status); -static void conn_read(conn *c); -static void conn_read_done(uv_stream_t *handle, - ssize_t nread, - const uv_buf_t *buf); -static void conn_alloc(uv_handle_t *handle, size_t size, uv_buf_t *buf); -static void conn_write(conn *c, const void *data, unsigned int len); -static void conn_write_done(uv_write_t *req, int status); -static void conn_close(conn *c); -static void conn_close_done(uv_handle_t *handle); - -/* |incoming| has been initialized by server.c when this is called. */ -void client_finish_init(server_ctx *sx, client_ctx *cx) { - conn *incoming; - conn *outgoing; - - cx->sx = sx; - cx->state = s_handshake; - s5_init(&cx->parser); - - incoming = &cx->incoming; - incoming->client = cx; - incoming->result = 0; - incoming->rdstate = c_stop; - incoming->wrstate = c_stop; - incoming->idle_timeout = sx->idle_timeout; - CHECK(0 == uv_timer_init(sx->loop, &incoming->timer_handle)); - - outgoing = &cx->outgoing; - outgoing->client = cx; - outgoing->result = 0; - outgoing->rdstate = c_stop; - outgoing->wrstate = c_stop; - outgoing->idle_timeout = sx->idle_timeout; - CHECK(0 == uv_tcp_init(cx->sx->loop, &outgoing->handle.tcp)); - CHECK(0 == uv_timer_init(cx->sx->loop, &outgoing->timer_handle)); - - /* Wait for the initial packet. */ - conn_read(incoming); -} - -/* This is the core state machine that drives the client <-> upstream proxy. - * We move through the initial handshake and authentication steps first and - * end up (if all goes well) in the proxy state where we're just proxying - * data between the client and upstream. - */ -static void do_next(client_ctx *cx) { - int new_state; - - ASSERT(cx->state != s_dead); - switch (cx->state) { - case s_handshake: - new_state = do_handshake(cx); - break; - case s_handshake_auth: - new_state = do_handshake_auth(cx); - break; - case s_req_start: - new_state = do_req_start(cx); - break; - case s_req_parse: - new_state = do_req_parse(cx); - break; - case s_req_lookup: - new_state = do_req_lookup(cx); - break; - case s_req_connect: - new_state = do_req_connect(cx); - break; - case s_proxy_start: - new_state = do_proxy_start(cx); - break; - case s_proxy: - new_state = do_proxy(cx); - break; - case s_kill: - new_state = do_kill(cx); - break; - case s_almost_dead_0: - case s_almost_dead_1: - case s_almost_dead_2: - case s_almost_dead_3: - case s_almost_dead_4: - new_state = do_almost_dead(cx); - break; - default: - UNREACHABLE(); - } - cx->state = new_state; - - if (cx->state == s_dead) { - if (DEBUG_CHECKS) { - memset(cx, -1, sizeof(*cx)); - } - free(cx); - } -} - -static int do_handshake(client_ctx *cx) { - unsigned int methods; - conn *incoming; - s5_ctx *parser; - uint8_t *data; - size_t size; - int err; - - parser = &cx->parser; - incoming = &cx->incoming; - ASSERT(incoming->rdstate == c_done); - ASSERT(incoming->wrstate == c_stop); - incoming->rdstate = c_stop; - - if (incoming->result < 0) { - pr_err("read error: %s", uv_strerror(incoming->result)); - return do_kill(cx); - } - - data = (uint8_t *) incoming->t.buf; - size = (size_t) incoming->result; - err = s5_parse(parser, &data, &size); - if (err == s5_ok) { - conn_read(incoming); - return s_handshake; /* Need more data. */ - } - - if (size != 0) { - /* Could allow a round-trip saving shortcut here if the requested auth - * method is S5_AUTH_NONE (provided unauthenticated traffic is allowed.) - * Requires client support however. - */ - pr_err("junk in handshake"); - return do_kill(cx); - } - - if (err != s5_auth_select) { - pr_err("handshake error: %s", s5_strerror(err)); - return do_kill(cx); - } - - methods = s5_auth_methods(parser); - if ((methods & S5_AUTH_NONE) && can_auth_none(cx->sx, cx)) { - s5_select_auth(parser, S5_AUTH_NONE); - conn_write(incoming, "\5\0", 2); /* No auth required. */ - return s_req_start; - } - - if ((methods & S5_AUTH_PASSWD) && can_auth_passwd(cx->sx, cx)) { - /* TODO(bnoordhuis) Implement username/password auth. */ - } - - conn_write(incoming, "\5\377", 2); /* No acceptable auth. */ - return s_kill; -} - -/* TODO(bnoordhuis) Implement username/password auth. */ -static int do_handshake_auth(client_ctx *cx) { - UNREACHABLE(); - return do_kill(cx); -} - -static int do_req_start(client_ctx *cx) { - conn *incoming; - - incoming = &cx->incoming; - ASSERT(incoming->rdstate == c_stop); - ASSERT(incoming->wrstate == c_done); - incoming->wrstate = c_stop; - - if (incoming->result < 0) { - pr_err("write error: %s", uv_strerror(incoming->result)); - return do_kill(cx); - } - - conn_read(incoming); - return s_req_parse; -} - -static int do_req_parse(client_ctx *cx) { - conn *incoming; - conn *outgoing; - s5_ctx *parser; - uint8_t *data; - size_t size; - int err; - - parser = &cx->parser; - incoming = &cx->incoming; - outgoing = &cx->outgoing; - ASSERT(incoming->rdstate == c_done); - ASSERT(incoming->wrstate == c_stop); - ASSERT(outgoing->rdstate == c_stop); - ASSERT(outgoing->wrstate == c_stop); - incoming->rdstate = c_stop; - - if (incoming->result < 0) { - pr_err("read error: %s", uv_strerror(incoming->result)); - return do_kill(cx); - } - - data = (uint8_t *) incoming->t.buf; - size = (size_t) incoming->result; - err = s5_parse(parser, &data, &size); - if (err == s5_ok) { - conn_read(incoming); - return s_req_parse; /* Need more data. */ - } - - if (size != 0) { - pr_err("junk in request %u", (unsigned) size); - return do_kill(cx); - } - - if (err != s5_exec_cmd) { - pr_err("request error: %s", s5_strerror(err)); - return do_kill(cx); - } - - if (parser->cmd == s5_cmd_tcp_bind) { - /* Not supported but relatively straightforward to implement. */ - pr_warn("BIND requests are not supported."); - return do_kill(cx); - } - - if (parser->cmd == s5_cmd_udp_assoc) { - /* Not supported. Might be hard to implement because libuv has no - * functionality for detecting the MTU size which the RFC mandates. - */ - pr_warn("UDP ASSOC requests are not supported."); - return do_kill(cx); - } - ASSERT(parser->cmd == s5_cmd_tcp_connect); - - if (parser->atyp == s5_atyp_host) { - conn_getaddrinfo(outgoing, (const char *) parser->daddr); - return s_req_lookup; - } - - if (parser->atyp == s5_atyp_ipv4) { - memset(&outgoing->t.addr4, 0, sizeof(outgoing->t.addr4)); - outgoing->t.addr4.sin_family = AF_INET; - outgoing->t.addr4.sin_port = htons(parser->dport); - memcpy(&outgoing->t.addr4.sin_addr, - parser->daddr, - sizeof(outgoing->t.addr4.sin_addr)); - } else if (parser->atyp == s5_atyp_ipv6) { - memset(&outgoing->t.addr6, 0, sizeof(outgoing->t.addr6)); - outgoing->t.addr6.sin6_family = AF_INET6; - outgoing->t.addr6.sin6_port = htons(parser->dport); - memcpy(&outgoing->t.addr6.sin6_addr, - parser->daddr, - sizeof(outgoing->t.addr6.sin6_addr)); - } else { - UNREACHABLE(); - } - - return do_req_connect_start(cx); -} - -static int do_req_lookup(client_ctx *cx) { - s5_ctx *parser; - conn *incoming; - conn *outgoing; - - parser = &cx->parser; - incoming = &cx->incoming; - outgoing = &cx->outgoing; - ASSERT(incoming->rdstate == c_stop); - ASSERT(incoming->wrstate == c_stop); - ASSERT(outgoing->rdstate == c_stop); - ASSERT(outgoing->wrstate == c_stop); - - if (outgoing->result < 0) { - /* TODO(bnoordhuis) Escape control characters in parser->daddr. */ - pr_err("lookup error for \"%s\": %s", - parser->daddr, - uv_strerror(outgoing->result)); - /* Send back a 'Host unreachable' reply. */ - conn_write(incoming, "\5\4\0\1\0\0\0\0\0\0", 10); - return s_kill; - } - - /* Don't make assumptions about the offset of sin_port/sin6_port. */ - switch (outgoing->t.addr.sa_family) { - case AF_INET: - outgoing->t.addr4.sin_port = htons(parser->dport); - break; - case AF_INET6: - outgoing->t.addr6.sin6_port = htons(parser->dport); - break; - default: - UNREACHABLE(); - } - - return do_req_connect_start(cx); -} - -/* Assumes that cx->outgoing.t.sa contains a valid AF_INET/AF_INET6 address. */ -static int do_req_connect_start(client_ctx *cx) { - conn *incoming; - conn *outgoing; - int err; - - incoming = &cx->incoming; - outgoing = &cx->outgoing; - ASSERT(incoming->rdstate == c_stop); - ASSERT(incoming->wrstate == c_stop); - ASSERT(outgoing->rdstate == c_stop); - ASSERT(outgoing->wrstate == c_stop); - - if (!can_access(cx->sx, cx, &outgoing->t.addr)) { - pr_warn("connection not allowed by ruleset"); - /* Send a 'Connection not allowed by ruleset' reply. */ - conn_write(incoming, "\5\2\0\1\0\0\0\0\0\0", 10); - return s_kill; - } - - err = conn_connect(outgoing); - if (err != 0) { - pr_err("connect error: %s\n", uv_strerror(err)); - return do_kill(cx); - } - - return s_req_connect; -} - -static int do_req_connect(client_ctx *cx) { - const struct sockaddr_in6 *in6; - const struct sockaddr_in *in; - char addr_storage[sizeof(*in6)]; - conn *incoming; - conn *outgoing; - uint8_t *buf; - int addrlen; - - incoming = &cx->incoming; - outgoing = &cx->outgoing; - ASSERT(incoming->rdstate == c_stop); - ASSERT(incoming->wrstate == c_stop); - ASSERT(outgoing->rdstate == c_stop); - ASSERT(outgoing->wrstate == c_stop); - - /* Build and send the reply. Not very pretty but gets the job done. */ - buf = (uint8_t *) incoming->t.buf; - if (outgoing->result == 0) { - /* The RFC mandates that the SOCKS server must include the local port - * and address in the reply. So that's what we do. - */ - addrlen = sizeof(addr_storage); - CHECK(0 == uv_tcp_getsockname(&outgoing->handle.tcp, - (struct sockaddr *) addr_storage, - &addrlen)); - buf[0] = 5; /* Version. */ - buf[1] = 0; /* Success. */ - buf[2] = 0; /* Reserved. */ - if (addrlen == sizeof(*in)) { - buf[3] = 1; /* IPv4. */ - in = (const struct sockaddr_in *) &addr_storage; - memcpy(buf + 4, &in->sin_addr, 4); - memcpy(buf + 8, &in->sin_port, 2); - conn_write(incoming, buf, 10); - } else if (addrlen == sizeof(*in6)) { - buf[3] = 4; /* IPv6. */ - in6 = (const struct sockaddr_in6 *) &addr_storage; - memcpy(buf + 4, &in6->sin6_addr, 16); - memcpy(buf + 20, &in6->sin6_port, 2); - conn_write(incoming, buf, 22); - } else { - UNREACHABLE(); - } - return s_proxy_start; - } else { - pr_err("upstream connection error: %s\n", uv_strerror(outgoing->result)); - /* Send a 'Connection refused' reply. */ - conn_write(incoming, "\5\5\0\1\0\0\0\0\0\0", 10); - return s_kill; - } - - UNREACHABLE(); - return s_kill; -} - -static int do_proxy_start(client_ctx *cx) { - conn *incoming; - conn *outgoing; - - incoming = &cx->incoming; - outgoing = &cx->outgoing; - ASSERT(incoming->rdstate == c_stop); - ASSERT(incoming->wrstate == c_done); - ASSERT(outgoing->rdstate == c_stop); - ASSERT(outgoing->wrstate == c_stop); - incoming->wrstate = c_stop; - - if (incoming->result < 0) { - pr_err("write error: %s", uv_strerror(incoming->result)); - return do_kill(cx); - } - - conn_read(incoming); - conn_read(outgoing); - return s_proxy; -} - -/* Proxy incoming data back and forth. */ -static int do_proxy(client_ctx *cx) { - if (conn_cycle("client", &cx->incoming, &cx->outgoing)) { - return do_kill(cx); - } - - if (conn_cycle("upstream", &cx->outgoing, &cx->incoming)) { - return do_kill(cx); - } - - return s_proxy; -} - -static int do_kill(client_ctx *cx) { - int new_state; - - if (cx->state >= s_almost_dead_0) { - return cx->state; - } - - /* Try to cancel the request. The callback still runs but if the - * cancellation succeeded, it gets called with status=UV_ECANCELED. - */ - new_state = s_almost_dead_1; - if (cx->state == s_req_lookup) { - new_state = s_almost_dead_0; - uv_cancel(&cx->outgoing.t.req); - } - - conn_close(&cx->incoming); - conn_close(&cx->outgoing); - return new_state; -} - -static int do_almost_dead(client_ctx *cx) { - ASSERT(cx->state >= s_almost_dead_0); - return cx->state + 1; /* Another finalizer completed. */ -} - -static int conn_cycle(const char *who, conn *a, conn *b) { - if (a->result < 0) { - if (a->result != UV_EOF) { - pr_err("%s error: %s", who, uv_strerror(a->result)); - } - return -1; - } - - if (b->result < 0) { - return -1; - } - - if (a->wrstate == c_done) { - a->wrstate = c_stop; - } - - /* The logic is as follows: read when we don't write and write when we don't - * read. That gives us back-pressure handling for free because if the peer - * sends data faster than we consume it, TCP congestion control kicks in. - */ - if (a->wrstate == c_stop) { - if (b->rdstate == c_stop) { - conn_read(b); - } else if (b->rdstate == c_done) { - conn_write(a, b->t.buf, b->result); - b->rdstate = c_stop; /* Triggers the call to conn_read() above. */ - } - } - - return 0; -} - -static void conn_timer_reset(conn *c) { - CHECK(0 == uv_timer_start(&c->timer_handle, - conn_timer_expire, - c->idle_timeout, - 0)); -} - -static void conn_timer_expire(uv_timer_t *handle, int status) { - conn *c; - - CHECK(0 == status); - c = CONTAINER_OF(handle, conn, timer_handle); - c->result = UV_ETIMEDOUT; - do_next(c->client); -} - -static void conn_getaddrinfo(conn *c, const char *hostname) { - struct addrinfo hints; - - memset(&hints, 0, sizeof(hints)); - hints.ai_family = AF_UNSPEC; - hints.ai_socktype = SOCK_STREAM; - hints.ai_protocol = IPPROTO_TCP; - CHECK(0 == uv_getaddrinfo(c->client->sx->loop, - &c->t.addrinfo_req, - conn_getaddrinfo_done, - hostname, - NULL, - &hints)); - conn_timer_reset(c); -} - -static void conn_getaddrinfo_done(uv_getaddrinfo_t *req, - int status, - struct addrinfo *ai) { - conn *c; - - c = CONTAINER_OF(req, conn, t.addrinfo_req); - c->result = status; - - if (status == 0) { - /* FIXME(bnoordhuis) Should try all addresses. */ - if (ai->ai_family == AF_INET) { - c->t.addr4 = *(const struct sockaddr_in *) ai->ai_addr; - } else if (ai->ai_family == AF_INET6) { - c->t.addr6 = *(const struct sockaddr_in6 *) ai->ai_addr; - } else { - UNREACHABLE(); - } - } - - uv_freeaddrinfo(ai); - do_next(c->client); -} - -/* Assumes that c->t.sa contains a valid AF_INET or AF_INET6 address. */ -static int conn_connect(conn *c) { - ASSERT(c->t.addr.sa_family == AF_INET || - c->t.addr.sa_family == AF_INET6); - conn_timer_reset(c); - return uv_tcp_connect(&c->t.connect_req, - &c->handle.tcp, - &c->t.addr, - conn_connect_done); -} - -static void conn_connect_done(uv_connect_t *req, int status) { - conn *c; - - if (status == UV_ECANCELED) { - return; /* Handle has been closed. */ - } - - c = CONTAINER_OF(req, conn, t.connect_req); - c->result = status; - do_next(c->client); -} - -static void conn_read(conn *c) { - ASSERT(c->rdstate == c_stop); - CHECK(0 == uv_read_start(&c->handle.stream, conn_alloc, conn_read_done)); - c->rdstate = c_busy; - conn_timer_reset(c); -} - -static void conn_read_done(uv_stream_t *handle, - ssize_t nread, - const uv_buf_t *buf) { - conn *c; - - c = CONTAINER_OF(handle, conn, handle); - ASSERT(c->t.buf == buf->base); - ASSERT(c->rdstate == c_busy); - c->rdstate = c_done; - c->result = nread; - - uv_read_stop(&c->handle.stream); - do_next(c->client); -} - -static void conn_alloc(uv_handle_t *handle, size_t size, uv_buf_t *buf) { - conn *c; - - c = CONTAINER_OF(handle, conn, handle); - ASSERT(c->rdstate == c_busy); - buf->base = c->t.buf; - buf->len = sizeof(c->t.buf); -} - -static void conn_write(conn *c, const void *data, unsigned int len) { - uv_buf_t buf; - - ASSERT(c->wrstate == c_stop || c->wrstate == c_done); - c->wrstate = c_busy; - - /* It's okay to cast away constness here, uv_write() won't modify the - * memory. - */ - buf.base = (char *) data; - buf.len = len; - - CHECK(0 == uv_write(&c->write_req, - &c->handle.stream, - &buf, - 1, - conn_write_done)); - conn_timer_reset(c); -} - -static void conn_write_done(uv_write_t *req, int status) { - conn *c; - - if (status == UV_ECANCELED) { - return; /* Handle has been closed. */ - } - - c = CONTAINER_OF(req, conn, write_req); - ASSERT(c->wrstate == c_busy); - c->wrstate = c_done; - c->result = status; - do_next(c->client); -} - -static void conn_close(conn *c) { - ASSERT(c->rdstate != c_dead); - ASSERT(c->wrstate != c_dead); - c->rdstate = c_dead; - c->wrstate = c_dead; - c->timer_handle.data = c; - c->handle.handle.data = c; - uv_close(&c->handle.handle, conn_close_done); - uv_close((uv_handle_t *) &c->timer_handle, conn_close_done); -} - -static void conn_close_done(uv_handle_t *handle) { - conn *c; - - c = handle->data; - do_next(c->client); -} diff --git a/outside/libuv-v1.7.5/samples/socks5-proxy/defs.h b/outside/libuv-v1.7.5/samples/socks5-proxy/defs.h deleted file mode 100644 index 99ee8160c..000000000 --- a/outside/libuv-v1.7.5/samples/socks5-proxy/defs.h +++ /dev/null @@ -1,139 +0,0 @@ -/* Copyright StrongLoop, Inc. All rights reserved. - * - * 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. - */ - -#ifndef DEFS_H_ -#define DEFS_H_ - -#include "s5.h" -#include "uv.h" - -#include -#include /* sockaddr_in, sockaddr_in6 */ -#include /* size_t, ssize_t */ -#include -#include /* sockaddr */ - -struct client_ctx; - -typedef struct { - const char *bind_host; - unsigned short bind_port; - unsigned int idle_timeout; -} server_config; - -typedef struct { - unsigned int idle_timeout; /* Connection idle timeout in ms. */ - uv_tcp_t tcp_handle; - uv_loop_t *loop; -} server_ctx; - -typedef struct { - unsigned char rdstate; - unsigned char wrstate; - unsigned int idle_timeout; - struct client_ctx *client; /* Backlink to owning client context. */ - ssize_t result; - union { - uv_handle_t handle; - uv_stream_t stream; - uv_tcp_t tcp; - uv_udp_t udp; - } handle; - uv_timer_t timer_handle; /* For detecting timeouts. */ - uv_write_t write_req; - /* We only need one of these at a time so make them share memory. */ - union { - uv_getaddrinfo_t addrinfo_req; - uv_connect_t connect_req; - uv_req_t req; - struct sockaddr_in6 addr6; - struct sockaddr_in addr4; - struct sockaddr addr; - char buf[2048]; /* Scratch space. Used to read data into. */ - } t; -} conn; - -typedef struct client_ctx { - unsigned int state; - server_ctx *sx; /* Backlink to owning server context. */ - s5_ctx parser; /* The SOCKS protocol parser. */ - conn incoming; /* Connection with the SOCKS client. */ - conn outgoing; /* Connection with upstream. */ -} client_ctx; - -/* server.c */ -int server_run(const server_config *cf, uv_loop_t *loop); -int can_auth_none(const server_ctx *sx, const client_ctx *cx); -int can_auth_passwd(const server_ctx *sx, const client_ctx *cx); -int can_access(const server_ctx *sx, - const client_ctx *cx, - const struct sockaddr *addr); - -/* client.c */ -void client_finish_init(server_ctx *sx, client_ctx *cx); - -/* util.c */ -#if defined(__GNUC__) -# define ATTRIBUTE_FORMAT_PRINTF(a, b) __attribute__((format(printf, a, b))) -#else -# define ATTRIBUTE_FORMAT_PRINTF(a, b) -#endif -void pr_info(const char *fmt, ...) ATTRIBUTE_FORMAT_PRINTF(1, 2); -void pr_warn(const char *fmt, ...) ATTRIBUTE_FORMAT_PRINTF(1, 2); -void pr_err(const char *fmt, ...) ATTRIBUTE_FORMAT_PRINTF(1, 2); -void *xmalloc(size_t size); - -/* main.c */ -const char *_getprogname(void); - -/* getopt.c */ -#if !HAVE_UNISTD_H -extern char *optarg; -int getopt(int argc, char **argv, const char *options); -#endif - -/* ASSERT() is for debug checks, CHECK() for run-time sanity checks. - * DEBUG_CHECKS is for expensive debug checks that we only want to - * enable in debug builds but still want type-checked by the compiler - * in release builds. - */ -#if defined(NDEBUG) -# define ASSERT(exp) -# define CHECK(exp) do { if (!(exp)) abort(); } while (0) -# define DEBUG_CHECKS (0) -#else -# define ASSERT(exp) assert(exp) -# define CHECK(exp) assert(exp) -# define DEBUG_CHECKS (1) -#endif - -#define UNREACHABLE() CHECK(!"Unreachable code reached.") - -/* This macro looks complicated but it's not: it calculates the address - * of the embedding struct through the address of the embedded struct. - * In other words, if struct A embeds struct B, then we can obtain - * the address of A by taking the address of B and subtracting the - * field offset of B in A. - */ -#define CONTAINER_OF(ptr, type, field) \ - ((type *) ((char *) (ptr) - ((char *) &((type *) 0)->field))) - -#endif /* DEFS_H_ */ diff --git a/outside/libuv-v1.7.5/samples/socks5-proxy/getopt.c b/outside/libuv-v1.7.5/samples/socks5-proxy/getopt.c deleted file mode 100644 index 8481b2264..000000000 --- a/outside/libuv-v1.7.5/samples/socks5-proxy/getopt.c +++ /dev/null @@ -1,131 +0,0 @@ -/* $NetBSD: getopt.c,v 1.26 2003/08/07 16:43:40 agc Exp $ */ - -/* - * Copyright (c) 1987, 1993, 1994 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - */ - -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "@(#)getopt.c 8.3 (Berkeley) 4/27/95"; -#endif /* LIBC_SCCS and not lint */ - -#include -#include -#include -#include - -extern const char *_getprogname(void); - -int opterr = 1, /* if error message should be printed */ - optind = 1, /* index into parent argv vector */ - optopt, /* character checked for validity */ - optreset; /* reset getopt */ -char *optarg; /* argument associated with option */ - -#define BADCH (int)'?' -#define BADARG (int)':' -#define EMSG "" - -/* - * getopt -- - * Parse argc/argv argument vector. - */ -int -getopt(nargc, nargv, ostr) - int nargc; - char * const nargv[]; - const char *ostr; -{ - static char *place = EMSG; /* option letter processing */ - char *oli; /* option letter list index */ - - if (optreset || *place == 0) { /* update scanning pointer */ - optreset = 0; - place = nargv[optind]; - if (optind >= nargc || *place++ != '-') { - /* Argument is absent or is not an option */ - place = EMSG; - return (-1); - } - optopt = *place++; - if (optopt == '-' && *place == 0) { - /* "--" => end of options */ - ++optind; - place = EMSG; - return (-1); - } - if (optopt == 0) { - /* Solitary '-', treat as a '-' option - if the program (eg su) is looking for it. */ - place = EMSG; - if (strchr(ostr, '-') == NULL) - return (-1); - optopt = '-'; - } - } else - optopt = *place++; - - /* See if option letter is one the caller wanted... */ - if (optopt == ':' || (oli = strchr(ostr, optopt)) == NULL) { - if (*place == 0) - ++optind; - if (opterr && *ostr != ':') - (void)fprintf(stderr, - "%s: illegal option -- %c\n", _getprogname(), - optopt); - return (BADCH); - } - - /* Does this option need an argument? */ - if (oli[1] != ':') { - /* don't need argument */ - optarg = NULL; - if (*place == 0) - ++optind; - } else { - /* Option-argument is either the rest of this argument or the - entire next argument. */ - if (*place) - optarg = place; - else if (nargc > ++optind) - optarg = nargv[optind]; - else { - /* option-argument absent */ - place = EMSG; - if (*ostr == ':') - return (BADARG); - if (opterr) - (void)fprintf(stderr, - "%s: option requires an argument -- %c\n", - _getprogname(), optopt); - return (BADCH); - } - place = EMSG; - ++optind; - } - return (optopt); /* return option letter */ -} diff --git a/outside/libuv-v1.7.5/samples/socks5-proxy/main.c b/outside/libuv-v1.7.5/samples/socks5-proxy/main.c deleted file mode 100644 index 04020cbd3..000000000 --- a/outside/libuv-v1.7.5/samples/socks5-proxy/main.c +++ /dev/null @@ -1,99 +0,0 @@ -/* Copyright StrongLoop, Inc. All rights reserved. - * - * 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. - */ - -#include "defs.h" -#include -#include -#include - -#if HAVE_UNISTD_H -#include /* getopt */ -#endif - -#define DEFAULT_BIND_HOST "127.0.0.1" -#define DEFAULT_BIND_PORT 1080 -#define DEFAULT_IDLE_TIMEOUT (60 * 1000) - -static void parse_opts(server_config *cf, int argc, char **argv); -static void usage(void); - -static const char *progname = __FILE__; /* Reset in main(). */ - -int main(int argc, char **argv) { - server_config config; - int err; - - progname = argv[0]; - memset(&config, 0, sizeof(config)); - config.bind_host = DEFAULT_BIND_HOST; - config.bind_port = DEFAULT_BIND_PORT; - config.idle_timeout = DEFAULT_IDLE_TIMEOUT; - parse_opts(&config, argc, argv); - - err = server_run(&config, uv_default_loop()); - if (err) { - exit(1); - } - - return 0; -} - -const char *_getprogname(void) { - return progname; -} - -static void parse_opts(server_config *cf, int argc, char **argv) { - int opt; - - while (-1 != (opt = getopt(argc, argv, "H:hp:"))) { - switch (opt) { - case 'H': - cf->bind_host = optarg; - break; - - case 'p': - if (1 != sscanf(optarg, "%hu", &cf->bind_port)) { - pr_err("bad port number: %s", optarg); - usage(); - } - break; - - default: - usage(); - } - } -} - -static void usage(void) { - printf("Usage:\n" - "\n" - " %s [-b

    [-h] [-p ]\n" - "\n" - "Options:\n" - "\n" - " -b Bind to this address or hostname.\n" - " Default: \"127.0.0.1\"\n" - " -h Show this help message.\n" - " -p Bind to this port number. Default: 1080\n" - "", - progname); - exit(1); -} diff --git a/outside/libuv-v1.7.5/samples/socks5-proxy/s5.c b/outside/libuv-v1.7.5/samples/socks5-proxy/s5.c deleted file mode 100644 index 4f08e3452..000000000 --- a/outside/libuv-v1.7.5/samples/socks5-proxy/s5.c +++ /dev/null @@ -1,271 +0,0 @@ -/* Copyright StrongLoop, Inc. All rights reserved. - * - * 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. - */ - -#include "s5.h" -#include -#include -#include /* abort() */ -#include /* memset() */ - -enum { - s5_version, - s5_nmethods, - s5_methods, - s5_auth_pw_version, - s5_auth_pw_userlen, - s5_auth_pw_username, - s5_auth_pw_passlen, - s5_auth_pw_password, - s5_req_version, - s5_req_cmd, - s5_req_reserved, - s5_req_atyp, - s5_req_atyp_host, - s5_req_daddr, - s5_req_dport0, - s5_req_dport1, - s5_dead -}; - -void s5_init(s5_ctx *cx) { - memset(cx, 0, sizeof(*cx)); - cx->state = s5_version; -} - -s5_err s5_parse(s5_ctx *cx, uint8_t **data, size_t *size) { - s5_err err; - uint8_t *p; - uint8_t c; - size_t i; - size_t n; - - p = *data; - n = *size; - i = 0; - - while (i < n) { - c = p[i]; - i += 1; - switch (cx->state) { - case s5_version: - if (c != 5) { - err = s5_bad_version; - goto out; - } - cx->state = s5_nmethods; - break; - - case s5_nmethods: - cx->arg0 = 0; - cx->arg1 = c; /* Number of bytes to read. */ - cx->state = s5_methods; - break; - - case s5_methods: - if (cx->arg0 < cx->arg1) { - switch (c) { - case 0: - cx->methods |= S5_AUTH_NONE; - break; - case 1: - cx->methods |= S5_AUTH_GSSAPI; - break; - case 2: - cx->methods |= S5_AUTH_PASSWD; - break; - /* Ignore everything we don't understand. */ - } - cx->arg0 += 1; - } - if (cx->arg0 == cx->arg1) { - err = s5_auth_select; - goto out; - } - break; - - case s5_auth_pw_version: - if (c != 1) { - err = s5_bad_version; - goto out; - } - cx->state = s5_auth_pw_userlen; - break; - - case s5_auth_pw_userlen: - cx->arg0 = 0; - cx->userlen = c; - cx->state = s5_auth_pw_username; - break; - - case s5_auth_pw_username: - if (cx->arg0 < cx->userlen) { - cx->username[cx->arg0] = c; - cx->arg0 += 1; - } - if (cx->arg0 == cx->userlen) { - cx->username[cx->userlen] = '\0'; - cx->state = s5_auth_pw_passlen; - } - break; - - case s5_auth_pw_passlen: - cx->arg0 = 0; - cx->passlen = c; - cx->state = s5_auth_pw_password; - break; - - case s5_auth_pw_password: - if (cx->arg0 < cx->passlen) { - cx->password[cx->arg0] = c; - cx->arg0 += 1; - } - if (cx->arg0 == cx->passlen) { - cx->password[cx->passlen] = '\0'; - cx->state = s5_req_version; - err = s5_auth_verify; - goto out; - } - break; - - case s5_req_version: - if (c != 5) { - err = s5_bad_version; - goto out; - } - cx->state = s5_req_cmd; - break; - - case s5_req_cmd: - switch (c) { - case 1: /* TCP connect */ - cx->cmd = s5_cmd_tcp_connect; - break; - case 3: /* UDP associate */ - cx->cmd = s5_cmd_udp_assoc; - break; - default: - err = s5_bad_cmd; - goto out; - } - cx->state = s5_req_reserved; - break; - - case s5_req_reserved: - cx->state = s5_req_atyp; - break; - - case s5_req_atyp: - cx->arg0 = 0; - switch (c) { - case 1: /* IPv4, four octets. */ - cx->state = s5_req_daddr; - cx->atyp = s5_atyp_ipv4; - cx->arg1 = 4; - break; - case 3: /* Hostname. First byte is length. */ - cx->state = s5_req_atyp_host; - cx->atyp = s5_atyp_host; - cx->arg1 = 0; - break; - case 4: /* IPv6, sixteen octets. */ - cx->state = s5_req_daddr; - cx->atyp = s5_atyp_ipv6; - cx->arg1 = 16; - break; - default: - err = s5_bad_atyp; - goto out; - } - break; - - case s5_req_atyp_host: - cx->arg1 = c; - cx->state = s5_req_daddr; - break; - - case s5_req_daddr: - if (cx->arg0 < cx->arg1) { - cx->daddr[cx->arg0] = c; - cx->arg0 += 1; - } - if (cx->arg0 == cx->arg1) { - cx->daddr[cx->arg1] = '\0'; - cx->state = s5_req_dport0; - } - break; - - case s5_req_dport0: - cx->dport = c << 8; - cx->state = s5_req_dport1; - break; - - case s5_req_dport1: - cx->dport |= c; - cx->state = s5_dead; - err = s5_exec_cmd; - goto out; - - case s5_dead: - break; - - default: - abort(); - } - } - err = s5_ok; - -out: - *data = p + i; - *size = n - i; - return err; -} - -unsigned int s5_auth_methods(const s5_ctx *cx) { - return cx->methods; -} - -int s5_select_auth(s5_ctx *cx, s5_auth_method method) { - int err; - - err = 0; - switch (method) { - case S5_AUTH_NONE: - cx->state = s5_req_version; - break; - case S5_AUTH_PASSWD: - cx->state = s5_auth_pw_version; - break; - default: - err = -EINVAL; - } - - return err; -} - -const char *s5_strerror(s5_err err) { -#define S5_ERR_GEN(_, name, errmsg) case s5_ ## name: return errmsg; - switch (err) { - S5_ERR_MAP(S5_ERR_GEN) - default: ; /* Silence s5_max_errors -Wswitch warning. */ - } -#undef S5_ERR_GEN - return "Unknown error."; -} diff --git a/outside/libuv-v1.7.5/samples/socks5-proxy/s5.h b/outside/libuv-v1.7.5/samples/socks5-proxy/s5.h deleted file mode 100644 index 715f32228..000000000 --- a/outside/libuv-v1.7.5/samples/socks5-proxy/s5.h +++ /dev/null @@ -1,94 +0,0 @@ -/* Copyright StrongLoop, Inc. All rights reserved. - * - * 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. - */ - -#ifndef S5_H_ -#define S5_H_ - -#include -#include - -#define S5_ERR_MAP(V) \ - V(-1, bad_version, "Bad protocol version.") \ - V(-2, bad_cmd, "Bad protocol command.") \ - V(-3, bad_atyp, "Bad address type.") \ - V(0, ok, "No error.") \ - V(1, auth_select, "Select authentication method.") \ - V(2, auth_verify, "Verify authentication.") \ - V(3, exec_cmd, "Execute command.") \ - -typedef enum { -#define S5_ERR_GEN(code, name, _) s5_ ## name = code, - S5_ERR_MAP(S5_ERR_GEN) -#undef S5_ERR_GEN - s5_max_errors -} s5_err; - -typedef enum { - S5_AUTH_NONE = 1 << 0, - S5_AUTH_GSSAPI = 1 << 1, - S5_AUTH_PASSWD = 1 << 2 -} s5_auth_method; - -typedef enum { - s5_auth_allow, - s5_auth_deny -} s5_auth_result; - -typedef enum { - s5_atyp_ipv4, - s5_atyp_ipv6, - s5_atyp_host -} s5_atyp; - -typedef enum { - s5_cmd_tcp_connect, - s5_cmd_tcp_bind, - s5_cmd_udp_assoc -} s5_cmd; - -typedef struct { - uint32_t arg0; /* Scratch space for the state machine. */ - uint32_t arg1; /* Scratch space for the state machine. */ - uint8_t state; - uint8_t methods; - uint8_t cmd; - uint8_t atyp; - uint8_t userlen; - uint8_t passlen; - uint16_t dport; - uint8_t username[257]; - uint8_t password[257]; - uint8_t daddr[257]; /* TODO(bnoordhuis) Merge with username/password. */ -} s5_ctx; - -void s5_init(s5_ctx *ctx); - -s5_err s5_parse(s5_ctx *cx, uint8_t **data, size_t *size); - -/* Only call after s5_parse() has returned s5_want_auth_method. */ -unsigned int s5_auth_methods(const s5_ctx *cx); - -/* Call after s5_parse() has returned s5_want_auth_method. */ -int s5_select_auth(s5_ctx *cx, s5_auth_method method); - -const char *s5_strerror(s5_err err); - -#endif /* S5_H_ */ diff --git a/outside/libuv-v1.7.5/samples/socks5-proxy/server.c b/outside/libuv-v1.7.5/samples/socks5-proxy/server.c deleted file mode 100644 index 3f1ba42c9..000000000 --- a/outside/libuv-v1.7.5/samples/socks5-proxy/server.c +++ /dev/null @@ -1,241 +0,0 @@ -/* Copyright StrongLoop, Inc. All rights reserved. - * - * 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. - */ - -#include "defs.h" -#include /* INET6_ADDRSTRLEN */ -#include -#include - -#ifndef INET6_ADDRSTRLEN -# define INET6_ADDRSTRLEN 63 -#endif - -typedef struct { - uv_getaddrinfo_t getaddrinfo_req; - server_config config; - server_ctx *servers; - uv_loop_t *loop; -} server_state; - -static void do_bind(uv_getaddrinfo_t *req, int status, struct addrinfo *ai); -static void on_connection(uv_stream_t *server, int status); - -int server_run(const server_config *cf, uv_loop_t *loop) { - struct addrinfo hints; - server_state state; - int err; - - memset(&state, 0, sizeof(state)); - state.servers = NULL; - state.config = *cf; - state.loop = loop; - - /* Resolve the address of the interface that we should bind to. - * The getaddrinfo callback starts the server and everything else. - */ - memset(&hints, 0, sizeof(hints)); - hints.ai_family = AF_UNSPEC; - hints.ai_socktype = SOCK_STREAM; - hints.ai_protocol = IPPROTO_TCP; - - err = uv_getaddrinfo(loop, - &state.getaddrinfo_req, - do_bind, - cf->bind_host, - NULL, - &hints); - if (err != 0) { - pr_err("getaddrinfo: %s", uv_strerror(err)); - return err; - } - - /* Start the event loop. Control continues in do_bind(). */ - if (uv_run(loop, UV_RUN_DEFAULT)) { - abort(); - } - - /* Please Valgrind. */ - uv_loop_delete(loop); - free(state.servers); - return 0; -} - -/* Bind a server to each address that getaddrinfo() reported. */ -static void do_bind(uv_getaddrinfo_t *req, int status, struct addrinfo *addrs) { - char addrbuf[INET6_ADDRSTRLEN + 1]; - unsigned int ipv4_naddrs; - unsigned int ipv6_naddrs; - server_state *state; - server_config *cf; - struct addrinfo *ai; - const void *addrv; - const char *what; - uv_loop_t *loop; - server_ctx *sx; - unsigned int n; - int err; - union { - struct sockaddr addr; - struct sockaddr_in addr4; - struct sockaddr_in6 addr6; - } s; - - state = CONTAINER_OF(req, server_state, getaddrinfo_req); - loop = state->loop; - cf = &state->config; - - if (status < 0) { - pr_err("getaddrinfo(\"%s\"): %s", cf->bind_host, uv_strerror(status)); - uv_freeaddrinfo(addrs); - return; - } - - ipv4_naddrs = 0; - ipv6_naddrs = 0; - for (ai = addrs; ai != NULL; ai = ai->ai_next) { - if (ai->ai_family == AF_INET) { - ipv4_naddrs += 1; - } else if (ai->ai_family == AF_INET6) { - ipv6_naddrs += 1; - } - } - - if (ipv4_naddrs == 0 && ipv6_naddrs == 0) { - pr_err("%s has no IPv4/6 addresses", cf->bind_host); - uv_freeaddrinfo(addrs); - return; - } - - state->servers = - xmalloc((ipv4_naddrs + ipv6_naddrs) * sizeof(state->servers[0])); - - n = 0; - for (ai = addrs; ai != NULL; ai = ai->ai_next) { - if (ai->ai_family != AF_INET && ai->ai_family != AF_INET6) { - continue; - } - - if (ai->ai_family == AF_INET) { - s.addr4 = *(const struct sockaddr_in *) ai->ai_addr; - s.addr4.sin_port = htons(cf->bind_port); - addrv = &s.addr4.sin_addr; - } else if (ai->ai_family == AF_INET6) { - s.addr6 = *(const struct sockaddr_in6 *) ai->ai_addr; - s.addr6.sin6_port = htons(cf->bind_port); - addrv = &s.addr6.sin6_addr; - } else { - UNREACHABLE(); - } - - if (uv_inet_ntop(s.addr.sa_family, addrv, addrbuf, sizeof(addrbuf))) { - UNREACHABLE(); - } - - sx = state->servers + n; - sx->loop = loop; - sx->idle_timeout = state->config.idle_timeout; - CHECK(0 == uv_tcp_init(loop, &sx->tcp_handle)); - - what = "uv_tcp_bind"; - err = uv_tcp_bind(&sx->tcp_handle, &s.addr, 0); - if (err == 0) { - what = "uv_listen"; - err = uv_listen((uv_stream_t *) &sx->tcp_handle, 128, on_connection); - } - - if (err != 0) { - pr_err("%s(\"%s:%hu\"): %s", - what, - addrbuf, - cf->bind_port, - uv_strerror(err)); - while (n > 0) { - n -= 1; - uv_close((uv_handle_t *) (state->servers + n), NULL); - } - break; - } - - pr_info("listening on %s:%hu", addrbuf, cf->bind_port); - n += 1; - } - - uv_freeaddrinfo(addrs); -} - -static void on_connection(uv_stream_t *server, int status) { - server_ctx *sx; - client_ctx *cx; - - CHECK(status == 0); - sx = CONTAINER_OF(server, server_ctx, tcp_handle); - cx = xmalloc(sizeof(*cx)); - CHECK(0 == uv_tcp_init(sx->loop, &cx->incoming.handle.tcp)); - CHECK(0 == uv_accept(server, &cx->incoming.handle.stream)); - client_finish_init(sx, cx); -} - -int can_auth_none(const server_ctx *sx, const client_ctx *cx) { - return 1; -} - -int can_auth_passwd(const server_ctx *sx, const client_ctx *cx) { - return 0; -} - -int can_access(const server_ctx *sx, - const client_ctx *cx, - const struct sockaddr *addr) { - const struct sockaddr_in6 *addr6; - const struct sockaddr_in *addr4; - const uint32_t *p; - uint32_t a; - uint32_t b; - uint32_t c; - uint32_t d; - - /* TODO(bnoordhuis) Implement proper access checks. For now, just reject - * traffic to localhost. - */ - if (addr->sa_family == AF_INET) { - addr4 = (const struct sockaddr_in *) addr; - d = ntohl(addr4->sin_addr.s_addr); - return (d >> 24) != 0x7F; - } - - if (addr->sa_family == AF_INET6) { - addr6 = (const struct sockaddr_in6 *) addr; - p = (const uint32_t *) &addr6->sin6_addr.s6_addr; - a = ntohl(p[0]); - b = ntohl(p[1]); - c = ntohl(p[2]); - d = ntohl(p[3]); - if (a == 0 && b == 0 && c == 0 && d == 1) { - return 0; /* "::1" style address. */ - } - if (a == 0 && b == 0 && c == 0xFFFF && (d >> 24) == 0x7F) { - return 0; /* "::ffff:127.x.x.x" style address. */ - } - return 1; - } - - return 0; -} diff --git a/outside/libuv-v1.7.5/samples/socks5-proxy/util.c b/outside/libuv-v1.7.5/samples/socks5-proxy/util.c deleted file mode 100644 index af34f0559..000000000 --- a/outside/libuv-v1.7.5/samples/socks5-proxy/util.c +++ /dev/null @@ -1,72 +0,0 @@ -/* Copyright StrongLoop, Inc. All rights reserved. - * - * 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. - */ - -#include "defs.h" -#include -#include -#include - -static void pr_do(FILE *stream, - const char *label, - const char *fmt, - va_list ap); - -void *xmalloc(size_t size) { - void *ptr; - - ptr = malloc(size); - if (ptr == NULL) { - pr_err("out of memory, need %lu bytes", (unsigned long) size); - exit(1); - } - - return ptr; -} - -void pr_info(const char *fmt, ...) { - va_list ap; - va_start(ap, fmt); - pr_do(stdout, "info", fmt, ap); - va_end(ap); -} - -void pr_warn(const char *fmt, ...) { - va_list ap; - va_start(ap, fmt); - pr_do(stderr, "warn", fmt, ap); - va_end(ap); -} - -void pr_err(const char *fmt, ...) { - va_list ap; - va_start(ap, fmt); - pr_do(stderr, "error", fmt, ap); - va_end(ap); -} - -static void pr_do(FILE *stream, - const char *label, - const char *fmt, - va_list ap) { - char fmtbuf[1024]; - vsnprintf(fmtbuf, sizeof(fmtbuf), fmt, ap); - fprintf(stream, "%s:%s: %s\n", _getprogname(), label, fmtbuf); -} diff --git a/outside/libuv-v1.7.5/src/fs-poll.c b/outside/libuv-v1.7.5/src/fs-poll.c deleted file mode 100644 index 44d47b88e..000000000 --- a/outside/libuv-v1.7.5/src/fs-poll.c +++ /dev/null @@ -1,255 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "uv-common.h" - -#include -#include -#include - -struct poll_ctx { - uv_fs_poll_t* parent_handle; /* NULL if parent has been stopped or closed */ - int busy_polling; - unsigned int interval; - uint64_t start_time; - uv_loop_t* loop; - uv_fs_poll_cb poll_cb; - uv_timer_t timer_handle; - uv_fs_t fs_req; /* TODO(bnoordhuis) mark fs_req internal */ - uv_stat_t statbuf; - char path[1]; /* variable length */ -}; - -static int statbuf_eq(const uv_stat_t* a, const uv_stat_t* b); -static void poll_cb(uv_fs_t* req); -static void timer_cb(uv_timer_t* timer); -static void timer_close_cb(uv_handle_t* handle); - -static uv_stat_t zero_statbuf; - - -int uv_fs_poll_init(uv_loop_t* loop, uv_fs_poll_t* handle) { - uv__handle_init(loop, (uv_handle_t*)handle, UV_FS_POLL); - return 0; -} - - -int uv_fs_poll_start(uv_fs_poll_t* handle, - uv_fs_poll_cb cb, - const char* path, - unsigned int interval) { - struct poll_ctx* ctx; - uv_loop_t* loop; - size_t len; - int err; - - if (uv__is_active(handle)) - return 0; - - loop = handle->loop; - len = strlen(path); - ctx = uv__calloc(1, sizeof(*ctx) + len); - - if (ctx == NULL) - return UV_ENOMEM; - - ctx->loop = loop; - ctx->poll_cb = cb; - ctx->interval = interval ? interval : 1; - ctx->start_time = uv_now(loop); - ctx->parent_handle = handle; - memcpy(ctx->path, path, len + 1); - - err = uv_timer_init(loop, &ctx->timer_handle); - if (err < 0) - goto error; - - ctx->timer_handle.flags |= UV__HANDLE_INTERNAL; - uv__handle_unref(&ctx->timer_handle); - - err = uv_fs_stat(loop, &ctx->fs_req, ctx->path, poll_cb); - if (err < 0) - goto error; - - handle->poll_ctx = ctx; - uv__handle_start(handle); - - return 0; - -error: - uv__free(ctx); - return err; -} - - -int uv_fs_poll_stop(uv_fs_poll_t* handle) { - struct poll_ctx* ctx; - - if (!uv__is_active(handle)) - return 0; - - ctx = handle->poll_ctx; - assert(ctx != NULL); - assert(ctx->parent_handle != NULL); - ctx->parent_handle = NULL; - handle->poll_ctx = NULL; - - /* Close the timer if it's active. If it's inactive, there's a stat request - * in progress and poll_cb will take care of the cleanup. - */ - if (uv__is_active(&ctx->timer_handle)) - uv_close((uv_handle_t*)&ctx->timer_handle, timer_close_cb); - - uv__handle_stop(handle); - - return 0; -} - - -int uv_fs_poll_getpath(uv_fs_poll_t* handle, char* buffer, size_t* size) { - struct poll_ctx* ctx; - size_t required_len; - - if (!uv__is_active(handle)) { - *size = 0; - return UV_EINVAL; - } - - ctx = handle->poll_ctx; - assert(ctx != NULL); - - required_len = strlen(ctx->path); - if (required_len > *size) { - *size = required_len; - return UV_ENOBUFS; - } - - memcpy(buffer, ctx->path, required_len); - *size = required_len; - - return 0; -} - - -void uv__fs_poll_close(uv_fs_poll_t* handle) { - uv_fs_poll_stop(handle); -} - - -static void timer_cb(uv_timer_t* timer) { - struct poll_ctx* ctx; - - ctx = container_of(timer, struct poll_ctx, timer_handle); - assert(ctx->parent_handle != NULL); - assert(ctx->parent_handle->poll_ctx == ctx); - ctx->start_time = uv_now(ctx->loop); - - if (uv_fs_stat(ctx->loop, &ctx->fs_req, ctx->path, poll_cb)) - abort(); -} - - -static void poll_cb(uv_fs_t* req) { - uv_stat_t* statbuf; - struct poll_ctx* ctx; - uint64_t interval; - - ctx = container_of(req, struct poll_ctx, fs_req); - - if (ctx->parent_handle == NULL) { /* handle has been stopped or closed */ - uv_close((uv_handle_t*)&ctx->timer_handle, timer_close_cb); - uv_fs_req_cleanup(req); - return; - } - - if (req->result != 0) { - if (ctx->busy_polling != req->result) { - ctx->poll_cb(ctx->parent_handle, - req->result, - &ctx->statbuf, - &zero_statbuf); - ctx->busy_polling = req->result; - } - goto out; - } - - statbuf = &req->statbuf; - - if (ctx->busy_polling != 0) - if (ctx->busy_polling < 0 || !statbuf_eq(&ctx->statbuf, statbuf)) - ctx->poll_cb(ctx->parent_handle, 0, &ctx->statbuf, statbuf); - - ctx->statbuf = *statbuf; - ctx->busy_polling = 1; - -out: - uv_fs_req_cleanup(req); - - if (ctx->parent_handle == NULL) { /* handle has been stopped by callback */ - uv_close((uv_handle_t*)&ctx->timer_handle, timer_close_cb); - return; - } - - /* Reschedule timer, subtract the delay from doing the stat(). */ - interval = ctx->interval; - interval -= (uv_now(ctx->loop) - ctx->start_time) % interval; - - if (uv_timer_start(&ctx->timer_handle, timer_cb, interval, 0)) - abort(); -} - - -static void timer_close_cb(uv_handle_t* handle) { - uv__free(container_of(handle, struct poll_ctx, timer_handle)); -} - - -static int statbuf_eq(const uv_stat_t* a, const uv_stat_t* b) { - return a->st_ctim.tv_nsec == b->st_ctim.tv_nsec - && a->st_mtim.tv_nsec == b->st_mtim.tv_nsec - && a->st_birthtim.tv_nsec == b->st_birthtim.tv_nsec - && a->st_ctim.tv_sec == b->st_ctim.tv_sec - && a->st_mtim.tv_sec == b->st_mtim.tv_sec - && a->st_birthtim.tv_sec == b->st_birthtim.tv_sec - && a->st_size == b->st_size - && a->st_mode == b->st_mode - && a->st_uid == b->st_uid - && a->st_gid == b->st_gid - && a->st_ino == b->st_ino - && a->st_dev == b->st_dev - && a->st_flags == b->st_flags - && a->st_gen == b->st_gen; -} - - -#if defined(_WIN32) - -#include "win/internal.h" -#include "win/handle-inl.h" - -void uv__fs_poll_endgame(uv_loop_t* loop, uv_fs_poll_t* handle) { - assert(handle->flags & UV__HANDLE_CLOSING); - assert(!(handle->flags & UV_HANDLE_CLOSED)); - uv__handle_close(handle); -} - -#endif /* _WIN32 */ diff --git a/outside/libuv-v1.7.5/src/heap-inl.h b/outside/libuv-v1.7.5/src/heap-inl.h deleted file mode 100644 index 1e2ed60e0..000000000 --- a/outside/libuv-v1.7.5/src/heap-inl.h +++ /dev/null @@ -1,245 +0,0 @@ -/* Copyright (c) 2013, Ben Noordhuis - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef UV_SRC_HEAP_H_ -#define UV_SRC_HEAP_H_ - -#include /* NULL */ - -#if defined(__GNUC__) -# define HEAP_EXPORT(declaration) __attribute__((unused)) static declaration -#else -# define HEAP_EXPORT(declaration) static declaration -#endif - -struct heap_node { - struct heap_node* left; - struct heap_node* right; - struct heap_node* parent; -}; - -/* A binary min heap. The usual properties hold: the root is the lowest - * element in the set, the height of the tree is at most log2(nodes) and - * it's always a complete binary tree. - * - * The heap function try hard to detect corrupted tree nodes at the cost - * of a minor reduction in performance. Compile with -DNDEBUG to disable. - */ -struct heap { - struct heap_node* min; - unsigned int nelts; -}; - -/* Return non-zero if a < b. */ -typedef int (*heap_compare_fn)(const struct heap_node* a, - const struct heap_node* b); - -/* Public functions. */ -HEAP_EXPORT(void heap_init(struct heap* heap)); -HEAP_EXPORT(struct heap_node* heap_min(const struct heap* heap)); -HEAP_EXPORT(void heap_insert(struct heap* heap, - struct heap_node* newnode, - heap_compare_fn less_than)); -HEAP_EXPORT(void heap_remove(struct heap* heap, - struct heap_node* node, - heap_compare_fn less_than)); -HEAP_EXPORT(void heap_dequeue(struct heap* heap, heap_compare_fn less_than)); - -/* Implementation follows. */ - -HEAP_EXPORT(void heap_init(struct heap* heap)) { - heap->min = NULL; - heap->nelts = 0; -} - -HEAP_EXPORT(struct heap_node* heap_min(const struct heap* heap)) { - return heap->min; -} - -/* Swap parent with child. Child moves closer to the root, parent moves away. */ -static void heap_node_swap(struct heap* heap, - struct heap_node* parent, - struct heap_node* child) { - struct heap_node* sibling; - struct heap_node t; - - t = *parent; - *parent = *child; - *child = t; - - parent->parent = child; - if (child->left == child) { - child->left = parent; - sibling = child->right; - } else { - child->right = parent; - sibling = child->left; - } - if (sibling != NULL) - sibling->parent = child; - - if (parent->left != NULL) - parent->left->parent = parent; - if (parent->right != NULL) - parent->right->parent = parent; - - if (child->parent == NULL) - heap->min = child; - else if (child->parent->left == parent) - child->parent->left = child; - else - child->parent->right = child; -} - -HEAP_EXPORT(void heap_insert(struct heap* heap, - struct heap_node* newnode, - heap_compare_fn less_than)) { - struct heap_node** parent; - struct heap_node** child; - unsigned int path; - unsigned int n; - unsigned int k; - - newnode->left = NULL; - newnode->right = NULL; - newnode->parent = NULL; - - /* Calculate the path from the root to the insertion point. This is a min - * heap so we always insert at the left-most free node of the bottom row. - */ - path = 0; - for (k = 0, n = 1 + heap->nelts; n >= 2; k += 1, n /= 2) - path = (path << 1) | (n & 1); - - /* Now traverse the heap using the path we calculated in the previous step. */ - parent = child = &heap->min; - while (k > 0) { - parent = child; - if (path & 1) - child = &(*child)->right; - else - child = &(*child)->left; - path >>= 1; - k -= 1; - } - - /* Insert the new node. */ - newnode->parent = *parent; - *child = newnode; - heap->nelts += 1; - - /* Walk up the tree and check at each node if the heap property holds. - * It's a min heap so parent < child must be true. - */ - while (newnode->parent != NULL && less_than(newnode, newnode->parent)) - heap_node_swap(heap, newnode->parent, newnode); -} - -HEAP_EXPORT(void heap_remove(struct heap* heap, - struct heap_node* node, - heap_compare_fn less_than)) { - struct heap_node* smallest; - struct heap_node** max; - struct heap_node* child; - unsigned int path; - unsigned int k; - unsigned int n; - - if (heap->nelts == 0) - return; - - /* Calculate the path from the min (the root) to the max, the left-most node - * of the bottom row. - */ - path = 0; - for (k = 0, n = heap->nelts; n >= 2; k += 1, n /= 2) - path = (path << 1) | (n & 1); - - /* Now traverse the heap using the path we calculated in the previous step. */ - max = &heap->min; - while (k > 0) { - if (path & 1) - max = &(*max)->right; - else - max = &(*max)->left; - path >>= 1; - k -= 1; - } - - heap->nelts -= 1; - - /* Unlink the max node. */ - child = *max; - *max = NULL; - - if (child == node) { - /* We're removing either the max or the last node in the tree. */ - if (child == heap->min) { - heap->min = NULL; - } - return; - } - - /* Replace the to be deleted node with the max node. */ - child->left = node->left; - child->right = node->right; - child->parent = node->parent; - - if (child->left != NULL) { - child->left->parent = child; - } - - if (child->right != NULL) { - child->right->parent = child; - } - - if (node->parent == NULL) { - heap->min = child; - } else if (node->parent->left == node) { - node->parent->left = child; - } else { - node->parent->right = child; - } - - /* Walk down the subtree and check at each node if the heap property holds. - * It's a min heap so parent < child must be true. If the parent is bigger, - * swap it with the smallest child. - */ - for (;;) { - smallest = child; - if (child->left != NULL && less_than(child->left, smallest)) - smallest = child->left; - if (child->right != NULL && less_than(child->right, smallest)) - smallest = child->right; - if (smallest == child) - break; - heap_node_swap(heap, child, smallest); - } - - /* Walk up the subtree and check that each parent is less than the node - * this is required, because `max` node is not guaranteed to be the - * actual maximum in tree - */ - while (child->parent != NULL && less_than(child, child->parent)) - heap_node_swap(heap, child->parent, child); -} - -HEAP_EXPORT(void heap_dequeue(struct heap* heap, heap_compare_fn less_than)) { - heap_remove(heap, heap->min, less_than); -} - -#undef HEAP_EXPORT - -#endif /* UV_SRC_HEAP_H_ */ diff --git a/outside/libuv-v1.7.5/src/inet.c b/outside/libuv-v1.7.5/src/inet.c deleted file mode 100644 index c948b2e7c..000000000 --- a/outside/libuv-v1.7.5/src/inet.c +++ /dev/null @@ -1,313 +0,0 @@ -/* - * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") - * Copyright (c) 1996-1999 by Internet Software Consortium. - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT - * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include -#include - -#if defined(_MSC_VER) && _MSC_VER < 1600 -# include "stdint-msvc2008.h" -#else -# include -#endif - -#include "uv.h" -#include "uv-common.h" - -#define UV__INET_ADDRSTRLEN 16 -#define UV__INET6_ADDRSTRLEN 46 - - -static int inet_ntop4(const unsigned char *src, char *dst, size_t size); -static int inet_ntop6(const unsigned char *src, char *dst, size_t size); -static int inet_pton4(const char *src, unsigned char *dst); -static int inet_pton6(const char *src, unsigned char *dst); - - -int uv_inet_ntop(int af, const void* src, char* dst, size_t size) { - switch (af) { - case AF_INET: - return (inet_ntop4(src, dst, size)); - case AF_INET6: - return (inet_ntop6(src, dst, size)); - default: - return UV_EAFNOSUPPORT; - } - /* NOTREACHED */ -} - - -static int inet_ntop4(const unsigned char *src, char *dst, size_t size) { - static const char fmt[] = "%u.%u.%u.%u"; - char tmp[UV__INET_ADDRSTRLEN]; - int l; - -#ifndef _WIN32 - l = snprintf(tmp, sizeof(tmp), fmt, src[0], src[1], src[2], src[3]); -#else - l = _snprintf(tmp, sizeof(tmp), fmt, src[0], src[1], src[2], src[3]); -#endif - if (l <= 0 || (size_t) l >= size) { - return UV_ENOSPC; - } - strncpy(dst, tmp, size); - dst[size - 1] = '\0'; - return 0; -} - - -static int inet_ntop6(const unsigned char *src, char *dst, size_t size) { - /* - * Note that int32_t and int16_t need only be "at least" large enough - * to contain a value of the specified size. On some systems, like - * Crays, there is no such thing as an integer variable with 16 bits. - * Keep this in mind if you think this function should have been coded - * to use pointer overlays. All the world's not a VAX. - */ - char tmp[UV__INET6_ADDRSTRLEN], *tp; - struct { int base, len; } best, cur; - unsigned int words[sizeof(struct in6_addr) / sizeof(uint16_t)]; - int i; - - /* - * Preprocess: - * Copy the input (bytewise) array into a wordwise array. - * Find the longest run of 0x00's in src[] for :: shorthanding. - */ - memset(words, '\0', sizeof words); - for (i = 0; i < (int) sizeof(struct in6_addr); i++) - words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3)); - best.base = -1; - best.len = 0; - cur.base = -1; - cur.len = 0; - for (i = 0; i < (int) ARRAY_SIZE(words); i++) { - if (words[i] == 0) { - if (cur.base == -1) - cur.base = i, cur.len = 1; - else - cur.len++; - } else { - if (cur.base != -1) { - if (best.base == -1 || cur.len > best.len) - best = cur; - cur.base = -1; - } - } - } - if (cur.base != -1) { - if (best.base == -1 || cur.len > best.len) - best = cur; - } - if (best.base != -1 && best.len < 2) - best.base = -1; - - /* - * Format the result. - */ - tp = tmp; - for (i = 0; i < (int) ARRAY_SIZE(words); i++) { - /* Are we inside the best run of 0x00's? */ - if (best.base != -1 && i >= best.base && - i < (best.base + best.len)) { - if (i == best.base) - *tp++ = ':'; - continue; - } - /* Are we following an initial run of 0x00s or any real hex? */ - if (i != 0) - *tp++ = ':'; - /* Is this address an encapsulated IPv4? */ - if (i == 6 && best.base == 0 && (best.len == 6 || - (best.len == 7 && words[7] != 0x0001) || - (best.len == 5 && words[5] == 0xffff))) { - int err = inet_ntop4(src+12, tp, sizeof tmp - (tp - tmp)); - if (err) - return err; - tp += strlen(tp); - break; - } - tp += sprintf(tp, "%x", words[i]); - } - /* Was it a trailing run of 0x00's? */ - if (best.base != -1 && (best.base + best.len) == ARRAY_SIZE(words)) - *tp++ = ':'; - *tp++ = '\0'; - - /* - * Check for overflow, copy, and we're done. - */ - if ((size_t)(tp - tmp) > size) { - return UV_ENOSPC; - } - strcpy(dst, tmp); - return 0; -} - - -int uv_inet_pton(int af, const char* src, void* dst) { - if (src == NULL || dst == NULL) - return UV_EINVAL; - - switch (af) { - case AF_INET: - return (inet_pton4(src, dst)); - case AF_INET6: { - int len; - char tmp[UV__INET6_ADDRSTRLEN], *s, *p; - s = (char*) src; - p = strchr(src, '%'); - if (p != NULL) { - s = tmp; - len = p - src; - if (len > UV__INET6_ADDRSTRLEN-1) - return UV_EINVAL; - memcpy(s, src, len); - s[len] = '\0'; - } - return inet_pton6(s, dst); - } - default: - return UV_EAFNOSUPPORT; - } - /* NOTREACHED */ -} - - -static int inet_pton4(const char *src, unsigned char *dst) { - static const char digits[] = "0123456789"; - int saw_digit, octets, ch; - unsigned char tmp[sizeof(struct in_addr)], *tp; - - saw_digit = 0; - octets = 0; - *(tp = tmp) = 0; - while ((ch = *src++) != '\0') { - const char *pch; - - if ((pch = strchr(digits, ch)) != NULL) { - unsigned int nw = *tp * 10 + (pch - digits); - - if (saw_digit && *tp == 0) - return UV_EINVAL; - if (nw > 255) - return UV_EINVAL; - *tp = nw; - if (!saw_digit) { - if (++octets > 4) - return UV_EINVAL; - saw_digit = 1; - } - } else if (ch == '.' && saw_digit) { - if (octets == 4) - return UV_EINVAL; - *++tp = 0; - saw_digit = 0; - } else - return UV_EINVAL; - } - if (octets < 4) - return UV_EINVAL; - memcpy(dst, tmp, sizeof(struct in_addr)); - return 0; -} - - -static int inet_pton6(const char *src, unsigned char *dst) { - static const char xdigits_l[] = "0123456789abcdef", - xdigits_u[] = "0123456789ABCDEF"; - unsigned char tmp[sizeof(struct in6_addr)], *tp, *endp, *colonp; - const char *xdigits, *curtok; - int ch, seen_xdigits; - unsigned int val; - - memset((tp = tmp), '\0', sizeof tmp); - endp = tp + sizeof tmp; - colonp = NULL; - /* Leading :: requires some special handling. */ - if (*src == ':') - if (*++src != ':') - return UV_EINVAL; - curtok = src; - seen_xdigits = 0; - val = 0; - while ((ch = *src++) != '\0') { - const char *pch; - - if ((pch = strchr((xdigits = xdigits_l), ch)) == NULL) - pch = strchr((xdigits = xdigits_u), ch); - if (pch != NULL) { - val <<= 4; - val |= (pch - xdigits); - if (++seen_xdigits > 4) - return UV_EINVAL; - continue; - } - if (ch == ':') { - curtok = src; - if (!seen_xdigits) { - if (colonp) - return UV_EINVAL; - colonp = tp; - continue; - } else if (*src == '\0') { - return UV_EINVAL; - } - if (tp + sizeof(uint16_t) > endp) - return UV_EINVAL; - *tp++ = (unsigned char) (val >> 8) & 0xff; - *tp++ = (unsigned char) val & 0xff; - seen_xdigits = 0; - val = 0; - continue; - } - if (ch == '.' && ((tp + sizeof(struct in_addr)) <= endp)) { - int err = inet_pton4(curtok, tp); - if (err == 0) { - tp += sizeof(struct in_addr); - seen_xdigits = 0; - break; /*%< '\\0' was seen by inet_pton4(). */ - } - } - return UV_EINVAL; - } - if (seen_xdigits) { - if (tp + sizeof(uint16_t) > endp) - return UV_EINVAL; - *tp++ = (unsigned char) (val >> 8) & 0xff; - *tp++ = (unsigned char) val & 0xff; - } - if (colonp != NULL) { - /* - * Since some memmove()'s erroneously fail to handle - * overlapping regions, we'll do the shift by hand. - */ - const int n = tp - colonp; - int i; - - if (tp == endp) - return UV_EINVAL; - for (i = 1; i <= n; i++) { - endp[- i] = colonp[n - i]; - colonp[n - i] = 0; - } - tp = endp; - } - if (tp != endp) - return UV_EINVAL; - memcpy(dst, tmp, sizeof tmp); - return 0; -} diff --git a/outside/libuv-v1.7.5/src/queue.h b/outside/libuv-v1.7.5/src/queue.h deleted file mode 100644 index 60c800003..000000000 --- a/outside/libuv-v1.7.5/src/queue.h +++ /dev/null @@ -1,94 +0,0 @@ -/* Copyright (c) 2013, Ben Noordhuis - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef QUEUE_H_ -#define QUEUE_H_ - -#include - -typedef void *QUEUE[2]; - -/* Private macros. */ -#define QUEUE_NEXT(q) (*(QUEUE **) &((*(q))[0])) -#define QUEUE_PREV(q) (*(QUEUE **) &((*(q))[1])) -#define QUEUE_PREV_NEXT(q) (QUEUE_NEXT(QUEUE_PREV(q))) -#define QUEUE_NEXT_PREV(q) (QUEUE_PREV(QUEUE_NEXT(q))) - -/* Public macros. */ -#define QUEUE_DATA(ptr, type, field) \ - ((type *) ((char *) (ptr) - offsetof(type, field))) - -#define QUEUE_FOREACH(q, h) \ - for ((q) = QUEUE_NEXT(h); (q) != (h); (q) = QUEUE_NEXT(q)) - -#define QUEUE_EMPTY(q) \ - ((const QUEUE *) (q) == (const QUEUE *) QUEUE_NEXT(q)) - -#define QUEUE_HEAD(q) \ - (QUEUE_NEXT(q)) - -#define QUEUE_INIT(q) \ - do { \ - QUEUE_NEXT(q) = (q); \ - QUEUE_PREV(q) = (q); \ - } \ - while (0) - -#define QUEUE_ADD(h, n) \ - do { \ - QUEUE_PREV_NEXT(h) = QUEUE_NEXT(n); \ - QUEUE_NEXT_PREV(n) = QUEUE_PREV(h); \ - QUEUE_PREV(h) = QUEUE_PREV(n); \ - QUEUE_PREV_NEXT(h) = (h); \ - } \ - while (0) - -#define QUEUE_SPLIT(h, q, n) \ - do { \ - QUEUE_PREV(n) = QUEUE_PREV(h); \ - QUEUE_PREV_NEXT(n) = (n); \ - QUEUE_NEXT(n) = (q); \ - QUEUE_PREV(h) = QUEUE_PREV(q); \ - QUEUE_PREV_NEXT(h) = (h); \ - QUEUE_PREV(q) = (n); \ - } \ - while (0) - -#define QUEUE_INSERT_HEAD(h, q) \ - do { \ - QUEUE_NEXT(q) = QUEUE_NEXT(h); \ - QUEUE_PREV(q) = (h); \ - QUEUE_NEXT_PREV(q) = (q); \ - QUEUE_NEXT(h) = (q); \ - } \ - while (0) - -#define QUEUE_INSERT_TAIL(h, q) \ - do { \ - QUEUE_NEXT(q) = (h); \ - QUEUE_PREV(q) = QUEUE_PREV(h); \ - QUEUE_PREV_NEXT(q) = (q); \ - QUEUE_PREV(h) = (q); \ - } \ - while (0) - -#define QUEUE_REMOVE(q) \ - do { \ - QUEUE_PREV_NEXT(q) = QUEUE_NEXT(q); \ - QUEUE_NEXT_PREV(q) = QUEUE_PREV(q); \ - } \ - while (0) - -#endif /* QUEUE_H_ */ diff --git a/outside/libuv-v1.7.5/src/threadpool.c b/outside/libuv-v1.7.5/src/threadpool.c deleted file mode 100644 index 15d719944..000000000 --- a/outside/libuv-v1.7.5/src/threadpool.c +++ /dev/null @@ -1,308 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv-common.h" - -#if !defined(_WIN32) -# include "unix/internal.h" -#else -# include "win/req-inl.h" -/* TODO(saghul): unify internal req functions */ -static void uv__req_init(uv_loop_t* loop, - uv_req_t* req, - uv_req_type type) { - uv_req_init(loop, req); - req->type = type; - uv__req_register(loop, req); -} -# define uv__req_init(loop, req, type) \ - uv__req_init((loop), (uv_req_t*)(req), (type)) -#endif - -#include - -#define MAX_THREADPOOL_SIZE 128 - -static uv_once_t once = UV_ONCE_INIT; -static uv_cond_t cond; -static uv_mutex_t mutex; -static unsigned int idle_threads; -static unsigned int nthreads; -static uv_thread_t* threads; -static uv_thread_t default_threads[4]; -static QUEUE exit_message; -static QUEUE wq; -static volatile int initialized; - - -static void uv__cancelled(struct uv__work* w) { - abort(); -} - - -/* To avoid deadlock with uv_cancel() it's crucial that the worker - * never holds the global mutex and the loop-local mutex at the same time. - */ -static void worker(void* arg) { - struct uv__work* w; - QUEUE* q; - - (void) arg; - - for (;;) { - uv_mutex_lock(&mutex); - - while (QUEUE_EMPTY(&wq)) { - idle_threads += 1; - uv_cond_wait(&cond, &mutex); - idle_threads -= 1; - } - - q = QUEUE_HEAD(&wq); - - if (q == &exit_message) - uv_cond_signal(&cond); - else { - QUEUE_REMOVE(q); - QUEUE_INIT(q); /* Signal uv_cancel() that the work req is - executing. */ - } - - uv_mutex_unlock(&mutex); - - if (q == &exit_message) - break; - - w = QUEUE_DATA(q, struct uv__work, wq); - w->work(w); - - uv_mutex_lock(&w->loop->wq_mutex); - w->work = NULL; /* Signal uv_cancel() that the work req is done - executing. */ - QUEUE_INSERT_TAIL(&w->loop->wq, &w->wq); - uv_async_send(&w->loop->wq_async); - uv_mutex_unlock(&w->loop->wq_mutex); - } -} - - -static void post(QUEUE* q) { - uv_mutex_lock(&mutex); - QUEUE_INSERT_TAIL(&wq, q); - if (idle_threads > 0) - uv_cond_signal(&cond); - uv_mutex_unlock(&mutex); -} - - -#ifndef _WIN32 -UV_DESTRUCTOR(static void cleanup(void)) { - unsigned int i; - - if (initialized == 0) - return; - - post(&exit_message); - - for (i = 0; i < nthreads; i++) - if (uv_thread_join(threads + i)) - abort(); - - if (threads != default_threads) - uv__free(threads); - - uv_mutex_destroy(&mutex); - uv_cond_destroy(&cond); - - threads = NULL; - nthreads = 0; - initialized = 0; -} -#endif - - -static void init_once(void) { - unsigned int i; - const char* val; - - nthreads = ARRAY_SIZE(default_threads); - val = getenv("UV_THREADPOOL_SIZE"); - if (val != NULL) - nthreads = atoi(val); - if (nthreads == 0) - nthreads = 1; - if (nthreads > MAX_THREADPOOL_SIZE) - nthreads = MAX_THREADPOOL_SIZE; - - threads = default_threads; - if (nthreads > ARRAY_SIZE(default_threads)) { - threads = uv__malloc(nthreads * sizeof(threads[0])); - if (threads == NULL) { - nthreads = ARRAY_SIZE(default_threads); - threads = default_threads; - } - } - - if (uv_cond_init(&cond)) - abort(); - - if (uv_mutex_init(&mutex)) - abort(); - - QUEUE_INIT(&wq); - - for (i = 0; i < nthreads; i++) - if (uv_thread_create(threads + i, worker, NULL)) - abort(); - - initialized = 1; -} - - -void uv__work_submit(uv_loop_t* loop, - struct uv__work* w, - void (*work)(struct uv__work* w), - void (*done)(struct uv__work* w, int status)) { - uv_once(&once, init_once); - w->loop = loop; - w->work = work; - w->done = done; - post(&w->wq); -} - - -static int uv__work_cancel(uv_loop_t* loop, uv_req_t* req, struct uv__work* w) { - int cancelled; - - uv_mutex_lock(&mutex); - uv_mutex_lock(&w->loop->wq_mutex); - - cancelled = !QUEUE_EMPTY(&w->wq) && w->work != NULL; - if (cancelled) - QUEUE_REMOVE(&w->wq); - - uv_mutex_unlock(&w->loop->wq_mutex); - uv_mutex_unlock(&mutex); - - if (!cancelled) - return UV_EBUSY; - - w->work = uv__cancelled; - uv_mutex_lock(&loop->wq_mutex); - QUEUE_INSERT_TAIL(&loop->wq, &w->wq); - uv_async_send(&loop->wq_async); - uv_mutex_unlock(&loop->wq_mutex); - - return 0; -} - - -void uv__work_done(uv_async_t* handle) { - struct uv__work* w; - uv_loop_t* loop; - QUEUE* q; - QUEUE wq; - int err; - - loop = container_of(handle, uv_loop_t, wq_async); - QUEUE_INIT(&wq); - - uv_mutex_lock(&loop->wq_mutex); - if (!QUEUE_EMPTY(&loop->wq)) { - q = QUEUE_HEAD(&loop->wq); - QUEUE_SPLIT(&loop->wq, q, &wq); - } - uv_mutex_unlock(&loop->wq_mutex); - - while (!QUEUE_EMPTY(&wq)) { - q = QUEUE_HEAD(&wq); - QUEUE_REMOVE(q); - - w = container_of(q, struct uv__work, wq); - err = (w->work == uv__cancelled) ? UV_ECANCELED : 0; - w->done(w, err); - } -} - - -static void uv__queue_work(struct uv__work* w) { - uv_work_t* req = container_of(w, uv_work_t, work_req); - - req->work_cb(req); -} - - -static void uv__queue_done(struct uv__work* w, int err) { - uv_work_t* req; - - req = container_of(w, uv_work_t, work_req); - uv__req_unregister(req->loop, req); - - if (req->after_work_cb == NULL) - return; - - req->after_work_cb(req, err); -} - - -int uv_queue_work(uv_loop_t* loop, - uv_work_t* req, - uv_work_cb work_cb, - uv_after_work_cb after_work_cb) { - if (work_cb == NULL) - return UV_EINVAL; - - uv__req_init(loop, req, UV_WORK); - req->loop = loop; - req->work_cb = work_cb; - req->after_work_cb = after_work_cb; - uv__work_submit(loop, &req->work_req, uv__queue_work, uv__queue_done); - return 0; -} - - -int uv_cancel(uv_req_t* req) { - struct uv__work* wreq; - uv_loop_t* loop; - - switch (req->type) { - case UV_FS: - loop = ((uv_fs_t*) req)->loop; - wreq = &((uv_fs_t*) req)->work_req; - break; - case UV_GETADDRINFO: - loop = ((uv_getaddrinfo_t*) req)->loop; - wreq = &((uv_getaddrinfo_t*) req)->work_req; - break; - case UV_GETNAMEINFO: - loop = ((uv_getnameinfo_t*) req)->loop; - wreq = &((uv_getnameinfo_t*) req)->work_req; - break; - case UV_WORK: - loop = ((uv_work_t*) req)->loop; - wreq = &((uv_work_t*) req)->work_req; - break; - default: - return UV_EINVAL; - } - - return uv__work_cancel(loop, req, wreq); -} diff --git a/outside/libuv-v1.7.5/src/unix/aix.c b/outside/libuv-v1.7.5/src/unix/aix.c deleted file mode 100644 index c90b7e5cb..000000000 --- a/outside/libuv-v1.7.5/src/unix/aix.c +++ /dev/null @@ -1,1158 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * 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. - */ - -#include "uv.h" -#include "internal.h" - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include - -#include -#include -#ifdef HAVE_SYS_AHAFS_EVPRODS_H -#include -#endif - -#include -#include -#include -#include -#include - -#define RDWR_BUF_SIZE 4096 -#define EQ(a,b) (strcmp(a,b) == 0) - -int uv__platform_loop_init(uv_loop_t* loop) { - loop->fs_fd = -1; - - /* Passing maxfd of -1 should mean the limit is determined - * by the user's ulimit or the global limit as per the doc */ - loop->backend_fd = pollset_create(-1); - - if (loop->backend_fd == -1) - return -1; - - return 0; -} - - -void uv__platform_loop_delete(uv_loop_t* loop) { - if (loop->fs_fd != -1) { - uv__close(loop->fs_fd); - loop->fs_fd = -1; - } - - if (loop->backend_fd != -1) { - pollset_destroy(loop->backend_fd); - loop->backend_fd = -1; - } -} - - -void uv__io_poll(uv_loop_t* loop, int timeout) { - struct pollfd events[1024]; - struct pollfd pqry; - struct pollfd* pe; - struct poll_ctl pc; - QUEUE* q; - uv__io_t* w; - uint64_t base; - uint64_t diff; - int nevents; - int count; - int nfds; - int i; - int rc; - int add_failed; - - if (loop->nfds == 0) { - assert(QUEUE_EMPTY(&loop->watcher_queue)); - return; - } - - while (!QUEUE_EMPTY(&loop->watcher_queue)) { - q = QUEUE_HEAD(&loop->watcher_queue); - QUEUE_REMOVE(q); - QUEUE_INIT(q); - - w = QUEUE_DATA(q, uv__io_t, watcher_queue); - assert(w->pevents != 0); - assert(w->fd >= 0); - assert(w->fd < (int) loop->nwatchers); - - pc.events = w->pevents; - pc.fd = w->fd; - - add_failed = 0; - if (w->events == 0) { - pc.cmd = PS_ADD; - if (pollset_ctl(loop->backend_fd, &pc, 1)) { - if (errno != EINVAL) { - assert(0 && "Failed to add file descriptor (pc.fd) to pollset"); - abort(); - } - /* Check if the fd is already in the pollset */ - pqry.fd = pc.fd; - rc = pollset_query(loop->backend_fd, &pqry); - switch (rc) { - case -1: - assert(0 && "Failed to query pollset for file descriptor"); - abort(); - case 0: - assert(0 && "Pollset does not contain file descriptor"); - abort(); - } - /* If we got here then the pollset already contained the file descriptor even though - * we didn't think it should. This probably shouldn't happen, but we can continue. */ - add_failed = 1; - } - } - if (w->events != 0 || add_failed) { - /* Modify, potentially removing events -- need to delete then add. - * Could maybe mod if we knew for sure no events are removed, but - * content of w->events is handled above as not reliable (falls back) - * so may require a pollset_query() which would have to be pretty cheap - * compared to a PS_DELETE to be worth optimizing. Alternatively, could - * lazily remove events, squelching them in the mean time. */ - pc.cmd = PS_DELETE; - if (pollset_ctl(loop->backend_fd, &pc, 1)) { - assert(0 && "Failed to delete file descriptor (pc.fd) from pollset"); - abort(); - } - pc.cmd = PS_ADD; - if (pollset_ctl(loop->backend_fd, &pc, 1)) { - assert(0 && "Failed to add file descriptor (pc.fd) to pollset"); - abort(); - } - } - - w->events = w->pevents; - } - - assert(timeout >= -1); - base = loop->time; - count = 48; /* Benchmarks suggest this gives the best throughput. */ - - for (;;) { - nfds = pollset_poll(loop->backend_fd, - events, - ARRAY_SIZE(events), - timeout); - - /* Update loop->time unconditionally. It's tempting to skip the update when - * timeout == 0 (i.e. non-blocking poll) but there is no guarantee that the - * operating system didn't reschedule our process while in the syscall. - */ - SAVE_ERRNO(uv__update_time(loop)); - - if (nfds == 0) { - assert(timeout != -1); - return; - } - - if (nfds == -1) { - if (errno != EINTR) { - abort(); - } - - if (timeout == -1) - continue; - - if (timeout == 0) - return; - - /* Interrupted by a signal. Update timeout and poll again. */ - goto update_timeout; - } - - nevents = 0; - - assert(loop->watchers != NULL); - loop->watchers[loop->nwatchers] = (void*) events; - loop->watchers[loop->nwatchers + 1] = (void*) (uintptr_t) nfds; - - for (i = 0; i < nfds; i++) { - pe = events + i; - pc.cmd = PS_DELETE; - pc.fd = pe->fd; - - /* Skip invalidated events, see uv__platform_invalidate_fd */ - if (pc.fd == -1) - continue; - - assert(pc.fd >= 0); - assert((unsigned) pc.fd < loop->nwatchers); - - w = loop->watchers[pc.fd]; - - if (w == NULL) { - /* File descriptor that we've stopped watching, disarm it. - * - * Ignore all errors because we may be racing with another thread - * when the file descriptor is closed. - */ - pollset_ctl(loop->backend_fd, &pc, 1); - continue; - } - - w->cb(loop, w, pe->revents); - nevents++; - } - - loop->watchers[loop->nwatchers] = NULL; - loop->watchers[loop->nwatchers + 1] = NULL; - - if (nevents != 0) { - if (nfds == ARRAY_SIZE(events) && --count != 0) { - /* Poll for more events but don't block this time. */ - timeout = 0; - continue; - } - return; - } - - if (timeout == 0) - return; - - if (timeout == -1) - continue; - -update_timeout: - assert(timeout > 0); - - diff = loop->time - base; - if (diff >= (uint64_t) timeout) - return; - - timeout -= diff; - } -} - - -uint64_t uv__hrtime(uv_clocktype_t type) { - uint64_t G = 1000000000; - timebasestruct_t t; - read_wall_time(&t, TIMEBASE_SZ); - time_base_to_time(&t, TIMEBASE_SZ); - return (uint64_t) t.tb_high * G + t.tb_low; -} - - -/* - * We could use a static buffer for the path manipulations that we need outside - * of the function, but this function could be called by multiple consumers and - * we don't want to potentially create a race condition in the use of snprintf. - * There is no direct way of getting the exe path in AIX - either through /procfs - * or through some libc APIs. The below approach is to parse the argv[0]'s pattern - * and use it in conjunction with PATH environment variable to craft one. - */ -int uv_exepath(char* buffer, size_t* size) { - int res; - char args[PATH_MAX]; - char abspath[PATH_MAX]; - size_t abspath_size; - struct procsinfo pi; - - if (buffer == NULL || size == NULL || *size == 0) - return -EINVAL; - - pi.pi_pid = getpid(); - res = getargs(&pi, sizeof(pi), args, sizeof(args)); - if (res < 0) - return -EINVAL; - - /* - * Possibilities for args: - * i) an absolute path such as: /home/user/myprojects/nodejs/node - * ii) a relative path such as: ./node or ../myprojects/nodejs/node - * iii) a bare filename such as "node", after exporting PATH variable - * to its location. - */ - - /* Case i) and ii) absolute or relative paths */ - if (strchr(args, '/') != NULL) { - if (realpath(args, abspath) != abspath) - return -errno; - - abspath_size = strlen(abspath); - - *size -= 1; - if (*size > abspath_size) - *size = abspath_size; - - memcpy(buffer, abspath, *size); - buffer[*size] = '\0'; - - return 0; - } else { - /* Case iii). Search PATH environment variable */ - char trypath[PATH_MAX]; - char *clonedpath = NULL; - char *token = NULL; - char *path = getenv("PATH"); - - if (path == NULL) - return -EINVAL; - - clonedpath = uv__strdup(path); - if (clonedpath == NULL) - return -ENOMEM; - - token = strtok(clonedpath, ":"); - while (token != NULL) { - snprintf(trypath, sizeof(trypath) - 1, "%s/%s", token, args); - if (realpath(trypath, abspath) == abspath) { - /* Check the match is executable */ - if (access(abspath, X_OK) == 0) { - abspath_size = strlen(abspath); - - *size -= 1; - if (*size > abspath_size) - *size = abspath_size; - - memcpy(buffer, abspath, *size); - buffer[*size] = '\0'; - - uv__free(clonedpath); - return 0; - } - } - token = strtok(NULL, ":"); - } - uv__free(clonedpath); - - /* Out of tokens (path entries), and no match found */ - return -EINVAL; - } -} - - -uint64_t uv_get_free_memory(void) { - perfstat_memory_total_t mem_total; - int result = perfstat_memory_total(NULL, &mem_total, sizeof(mem_total), 1); - if (result == -1) { - return 0; - } - return mem_total.real_free * 4096; -} - - -uint64_t uv_get_total_memory(void) { - perfstat_memory_total_t mem_total; - int result = perfstat_memory_total(NULL, &mem_total, sizeof(mem_total), 1); - if (result == -1) { - return 0; - } - return mem_total.real_total * 4096; -} - - -void uv_loadavg(double avg[3]) { - perfstat_cpu_total_t ps_total; - int result = perfstat_cpu_total(NULL, &ps_total, sizeof(ps_total), 1); - if (result == -1) { - avg[0] = 0.; avg[1] = 0.; avg[2] = 0.; - return; - } - avg[0] = ps_total.loadavg[0] / (double)(1 << SBITS); - avg[1] = ps_total.loadavg[1] / (double)(1 << SBITS); - avg[2] = ps_total.loadavg[2] / (double)(1 << SBITS); -} - - -#ifdef HAVE_SYS_AHAFS_EVPRODS_H -static char *uv__rawname(char *cp) { - static char rawbuf[FILENAME_MAX+1]; - char *dp = rindex(cp, '/'); - - if (dp == 0) - return 0; - - *dp = 0; - strcpy(rawbuf, cp); - *dp = '/'; - strcat(rawbuf, "/r"); - strcat(rawbuf, dp+1); - return rawbuf; -} - - -/* - * Determine whether given pathname is a directory - * Returns 0 if the path is a directory, -1 if not - * - * Note: Opportunity here for more detailed error information but - * that requires changing callers of this function as well - */ -static int uv__path_is_a_directory(char* filename) { - struct stat statbuf; - - if (stat(filename, &statbuf) < 0) - return -1; /* failed: not a directory, assume it is a file */ - - if (statbuf.st_type == VDIR) - return 0; - - return -1; -} - - -/* - * Check whether AHAFS is mounted. - * Returns 0 if AHAFS is mounted, or an error code < 0 on failure - */ -static int uv__is_ahafs_mounted(void){ - int rv, i = 2; - struct vmount *p; - int size_multiplier = 10; - size_t siz = sizeof(struct vmount)*size_multiplier; - struct vmount *vmt; - const char *dev = "/aha"; - char *obj, *stub; - - p = uv__malloc(siz); - if (p == NULL) - return -errno; - - /* Retrieve all mounted filesystems */ - rv = mntctl(MCTL_QUERY, siz, (char*)p); - if (rv < 0) - return -errno; - if (rv == 0) { - /* buffer was not large enough, reallocate to correct size */ - siz = *(int*)p; - uv__free(p); - p = uv__malloc(siz); - if (p == NULL) - return -errno; - rv = mntctl(MCTL_QUERY, siz, (char*)p); - if (rv < 0) - return -errno; - } - - /* Look for dev in filesystems mount info */ - for(vmt = p, i = 0; i < rv; i++) { - obj = vmt2dataptr(vmt, VMT_OBJECT); /* device */ - stub = vmt2dataptr(vmt, VMT_STUB); /* mount point */ - - if (EQ(obj, dev) || EQ(uv__rawname(obj), dev) || EQ(stub, dev)) { - uv__free(p); /* Found a match */ - return 0; - } - vmt = (struct vmount *) ((char *) vmt + vmt->vmt_length); - } - - /* /aha is required for monitoring filesystem changes */ - return -1; -} - -/* - * Recursive call to mkdir() to create intermediate folders, if any - * Returns code from mkdir call - */ -static int uv__makedir_p(const char *dir) { - char tmp[256]; - char *p = NULL; - size_t len; - int err; - - snprintf(tmp, sizeof(tmp),"%s",dir); - len = strlen(tmp); - if (tmp[len - 1] == '/') - tmp[len - 1] = 0; - for (p = tmp + 1; *p; p++) { - if (*p == '/') { - *p = 0; - err = mkdir(tmp, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH); - if(err != 0) - return err; - *p = '/'; - } - } - return mkdir(tmp, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH); -} - -/* - * Creates necessary subdirectories in the AIX Event Infrastructure - * file system for monitoring the object specified. - * Returns code from mkdir call - */ -static int uv__make_subdirs_p(const char *filename) { - char cmd[2048]; - char *p; - int rc = 0; - - /* Strip off the monitor file name */ - p = strrchr(filename, '/'); - - if (p == NULL) - return 0; - - if (uv__path_is_a_directory((char*)filename) == 0) { - sprintf(cmd, "/aha/fs/modDir.monFactory"); - } else { - sprintf(cmd, "/aha/fs/modFile.monFactory"); - } - - strncat(cmd, filename, (p - filename)); - rc = uv__makedir_p(cmd); - - if (rc == -1 && errno != EEXIST){ - return -errno; - } - - return rc; -} - - -/* - * Checks if /aha is mounted, then proceeds to set up the monitoring - * objects for the specified file. - * Returns 0 on success, or an error code < 0 on failure - */ -static int uv__setup_ahafs(const char* filename, int *fd) { - int rc = 0; - char mon_file_write_string[RDWR_BUF_SIZE]; - char mon_file[PATH_MAX]; - int file_is_directory = 0; /* -1 == NO, 0 == YES */ - - /* Create monitor file name for object */ - file_is_directory = uv__path_is_a_directory((char*)filename); - - if (file_is_directory == 0) - sprintf(mon_file, "/aha/fs/modDir.monFactory"); - else - sprintf(mon_file, "/aha/fs/modFile.monFactory"); - - if ((strlen(mon_file) + strlen(filename) + 5) > PATH_MAX) - return -ENAMETOOLONG; - - /* Make the necessary subdirectories for the monitor file */ - rc = uv__make_subdirs_p(filename); - if (rc == -1 && errno != EEXIST) - return rc; - - strcat(mon_file, filename); - strcat(mon_file, ".mon"); - - *fd = 0; errno = 0; - - /* Open the monitor file, creating it if necessary */ - *fd = open(mon_file, O_CREAT|O_RDWR); - if (*fd < 0) - return -errno; - - /* Write out the monitoring specifications. - * In this case, we are monitoring for a state change event type - * CHANGED=YES - * We will be waiting in select call, rather than a read: - * WAIT_TYPE=WAIT_IN_SELECT - * We only want minimal information for files: - * INFO_LVL=1 - * For directories, we want more information to track what file - * caused the change - * INFO_LVL=2 - */ - - if (file_is_directory == 0) - sprintf(mon_file_write_string, "CHANGED=YES;WAIT_TYPE=WAIT_IN_SELECT;INFO_LVL=2"); - else - sprintf(mon_file_write_string, "CHANGED=YES;WAIT_TYPE=WAIT_IN_SELECT;INFO_LVL=1"); - - rc = write(*fd, mon_file_write_string, strlen(mon_file_write_string)+1); - if (rc < 0) - return -errno; - - return 0; -} - -/* - * Skips a specified number of lines in the buffer passed in. - * Walks the buffer pointed to by p and attempts to skip n lines. - * Returns the total number of lines skipped - */ -static int uv__skip_lines(char **p, int n) { - int lines = 0; - - while(n > 0) { - *p = strchr(*p, '\n'); - if (!p) - return lines; - - (*p)++; - n--; - lines++; - } - return lines; -} - - -/* - * Parse the event occurrence data to figure out what event just occurred - * and take proper action. - * - * The buf is a pointer to the buffer containing the event occurrence data - * Returns 0 on success, -1 if unrecoverable error in parsing - * - */ -static int uv__parse_data(char *buf, int *events, uv_fs_event_t* handle) { - int evp_rc, i; - char *p; - char filename[PATH_MAX]; /* To be used when handling directories */ - - p = buf; - *events = 0; - - /* Clean the filename buffer*/ - for(i = 0; i < PATH_MAX; i++) { - filename[i] = 0; - } - i = 0; - - /* Check for BUF_WRAP */ - if (strncmp(buf, "BUF_WRAP", strlen("BUF_WRAP")) == 0) { - assert(0 && "Buffer wrap detected, Some event occurrences lost!"); - return 0; - } - - /* Since we are using the default buffer size (4K), and have specified - * INFO_LVL=1, we won't see any EVENT_OVERFLOW conditions. Applications - * should check for this keyword if they are using an INFO_LVL of 2 or - * higher, and have a buffer size of <= 4K - */ - - /* Skip to RC_FROM_EVPROD */ - if (uv__skip_lines(&p, 9) != 9) - return -1; - - if (sscanf(p, "RC_FROM_EVPROD=%d\nEND_EVENT_DATA", &evp_rc) == 1) { - if (uv__path_is_a_directory(handle->path) == 0) { /* Directory */ - if (evp_rc == AHAFS_MODDIR_UNMOUNT || evp_rc == AHAFS_MODDIR_REMOVE_SELF) { - /* The directory is no longer available for monitoring */ - *events = UV_RENAME; - handle->dir_filename = NULL; - } else { - /* A file was added/removed inside the directory */ - *events = UV_CHANGE; - - /* Get the EVPROD_INFO */ - if (uv__skip_lines(&p, 1) != 1) - return -1; - - /* Scan out the name of the file that triggered the event*/ - if (sscanf(p, "BEGIN_EVPROD_INFO\n%sEND_EVPROD_INFO", filename) == 1) { - handle->dir_filename = uv__strdup((const char*)&filename); - } else - return -1; - } - } else { /* Regular File */ - if (evp_rc == AHAFS_MODFILE_RENAME) - *events = UV_RENAME; - else - *events = UV_CHANGE; - } - } - else - return -1; - - return 0; -} - - -/* This is the internal callback */ -static void uv__ahafs_event(uv_loop_t* loop, uv__io_t* event_watch, unsigned int fflags) { - char result_data[RDWR_BUF_SIZE]; - int bytes, rc = 0; - uv_fs_event_t* handle; - int events = 0; - int i = 0; - char fname[PATH_MAX]; - char *p; - - handle = container_of(event_watch, uv_fs_event_t, event_watcher); - - /* Clean all the buffers*/ - for(i = 0; i < PATH_MAX; i++) { - fname[i] = 0; - } - i = 0; - - /* At this point, we assume that polling has been done on the - * file descriptor, so we can just read the AHAFS event occurrence - * data and parse its results without having to block anything - */ - bytes = pread(event_watch->fd, result_data, RDWR_BUF_SIZE, 0); - - assert((bytes <= 0) && "uv__ahafs_event - Error reading monitor file"); - - /* Parse the data */ - if(bytes > 0) - rc = uv__parse_data(result_data, &events, handle); - - /* For directory changes, the name of the files that triggered the change - * are never absolute pathnames - */ - if (uv__path_is_a_directory(handle->path) == 0) { - p = handle->dir_filename; - while(*p != NULL){ - fname[i]= *p; - i++; - p++; - } - } else { - /* For file changes, figure out whether filename is absolute or not */ - if (handle->path[0] == '/') { - p = strrchr(handle->path, '/'); - p++; - - while(*p != NULL) { - fname[i]= *p; - i++; - p++; - } - } - } - - /* Unrecoverable error */ - if (rc == -1) - return; - else /* Call the actual JavaScript callback function */ - handle->cb(handle, (const char*)&fname, events, 0); -} -#endif - - -int uv_fs_event_init(uv_loop_t* loop, uv_fs_event_t* handle) { -#ifdef HAVE_SYS_AHAFS_EVPRODS_H - uv__handle_init(loop, (uv_handle_t*)handle, UV_FS_EVENT); - return 0; -#else - return -ENOSYS; -#endif -} - - -int uv_fs_event_start(uv_fs_event_t* handle, - uv_fs_event_cb cb, - const char* filename, - unsigned int flags) { -#ifdef HAVE_SYS_AHAFS_EVPRODS_H - int fd, rc, i = 0, res = 0; - char cwd[PATH_MAX]; - char absolute_path[PATH_MAX]; - char fname[PATH_MAX]; - char *p; - - /* Clean all the buffers*/ - for(i = 0; i < PATH_MAX; i++) { - cwd[i] = 0; - absolute_path[i] = 0; - fname[i] = 0; - } - i = 0; - - /* Figure out whether filename is absolute or not */ - if (filename[0] == '/') { - /* We have absolute pathname, create the relative pathname*/ - sprintf(absolute_path, filename); - p = strrchr(filename, '/'); - p++; - } else { - if (filename[0] == '.' && filename[1] == '/') { - /* We have a relative pathname, compose the absolute pathname */ - sprintf(fname, filename); - snprintf(cwd, PATH_MAX-1, "/proc/%lu/cwd", (unsigned long) getpid()); - res = readlink(cwd, absolute_path, sizeof(absolute_path) - 1); - if (res < 0) - return res; - p = strrchr(absolute_path, '/'); - p++; - p++; - } else { - /* We have a relative pathname, compose the absolute pathname */ - sprintf(fname, filename); - snprintf(cwd, PATH_MAX-1, "/proc/%lu/cwd", (unsigned long) getpid()); - res = readlink(cwd, absolute_path, sizeof(absolute_path) - 1); - if (res < 0) - return res; - p = strrchr(absolute_path, '/'); - p++; - } - /* Copy to filename buffer */ - while(filename[i] != NULL) { - *p = filename[i]; - i++; - p++; - } - } - - if (uv__is_ahafs_mounted() < 0) /* /aha checks failed */ - return UV_ENOSYS; - - /* Setup ahafs */ - rc = uv__setup_ahafs((const char *)absolute_path, &fd); - if (rc != 0) - return rc; - - /* Setup/Initialize all the libuv routines */ - uv__handle_start(handle); - uv__io_init(&handle->event_watcher, uv__ahafs_event, fd); - handle->path = uv__strdup((const char*)&absolute_path); - handle->cb = cb; - - uv__io_start(handle->loop, &handle->event_watcher, UV__POLLIN); - - return 0; -#else - return -ENOSYS; -#endif -} - - -int uv_fs_event_stop(uv_fs_event_t* handle) { -#ifdef HAVE_SYS_AHAFS_EVPRODS_H - if (!uv__is_active(handle)) - return 0; - - uv__io_close(handle->loop, &handle->event_watcher); - uv__handle_stop(handle); - - if (uv__path_is_a_directory(handle->path) == 0) { - uv__free(handle->dir_filename); - handle->dir_filename = NULL; - } - - uv__free(handle->path); - handle->path = NULL; - uv__close(handle->event_watcher.fd); - handle->event_watcher.fd = -1; - - return 0; -#else - return -ENOSYS; -#endif -} - - -void uv__fs_event_close(uv_fs_event_t* handle) { -#ifdef HAVE_SYS_AHAFS_EVPRODS_H - uv_fs_event_stop(handle); -#else - UNREACHABLE(); -#endif -} - - -char** uv_setup_args(int argc, char** argv) { - return argv; -} - - -int uv_set_process_title(const char* title) { - return 0; -} - - -int uv_get_process_title(char* buffer, size_t size) { - if (size > 0) { - buffer[0] = '\0'; - } - return 0; -} - - -int uv_resident_set_memory(size_t* rss) { - char pp[64]; - psinfo_t psinfo; - int err; - int fd; - - snprintf(pp, sizeof(pp), "/proc/%lu/psinfo", (unsigned long) getpid()); - - fd = open(pp, O_RDONLY); - if (fd == -1) - return -errno; - - /* FIXME(bnoordhuis) Handle EINTR. */ - err = -EINVAL; - if (read(fd, &psinfo, sizeof(psinfo)) == sizeof(psinfo)) { - *rss = (size_t)psinfo.pr_rssize * 1024; - err = 0; - } - uv__close(fd); - - return err; -} - - -int uv_uptime(double* uptime) { - struct utmp *utmp_buf; - size_t entries = 0; - time_t boot_time; - - utmpname(UTMP_FILE); - - setutent(); - - while ((utmp_buf = getutent()) != NULL) { - if (utmp_buf->ut_user[0] && utmp_buf->ut_type == USER_PROCESS) - ++entries; - if (utmp_buf->ut_type == BOOT_TIME) - boot_time = utmp_buf->ut_time; - } - - endutent(); - - if (boot_time == 0) - return -ENOSYS; - - *uptime = time(NULL) - boot_time; - return 0; -} - - -int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count) { - uv_cpu_info_t* cpu_info; - perfstat_cpu_total_t ps_total; - perfstat_cpu_t* ps_cpus; - perfstat_id_t cpu_id; - int result, ncpus, idx = 0; - - result = perfstat_cpu_total(NULL, &ps_total, sizeof(ps_total), 1); - if (result == -1) { - return -ENOSYS; - } - - ncpus = result = perfstat_cpu(NULL, NULL, sizeof(perfstat_cpu_t), 0); - if (result == -1) { - return -ENOSYS; - } - - ps_cpus = (perfstat_cpu_t*) uv__malloc(ncpus * sizeof(perfstat_cpu_t)); - if (!ps_cpus) { - return -ENOMEM; - } - - strcpy(cpu_id.name, FIRST_CPU); - result = perfstat_cpu(&cpu_id, ps_cpus, sizeof(perfstat_cpu_t), ncpus); - if (result == -1) { - uv__free(ps_cpus); - return -ENOSYS; - } - - *cpu_infos = (uv_cpu_info_t*) uv__malloc(ncpus * sizeof(uv_cpu_info_t)); - if (!*cpu_infos) { - uv__free(ps_cpus); - return -ENOMEM; - } - - *count = ncpus; - - cpu_info = *cpu_infos; - while (idx < ncpus) { - cpu_info->speed = (int)(ps_total.processorHZ / 1000000); - cpu_info->model = uv__strdup(ps_total.description); - cpu_info->cpu_times.user = ps_cpus[idx].user; - cpu_info->cpu_times.sys = ps_cpus[idx].sys; - cpu_info->cpu_times.idle = ps_cpus[idx].idle; - cpu_info->cpu_times.irq = ps_cpus[idx].wait; - cpu_info->cpu_times.nice = 0; - cpu_info++; - idx++; - } - - uv__free(ps_cpus); - return 0; -} - - -void uv_free_cpu_info(uv_cpu_info_t* cpu_infos, int count) { - int i; - - for (i = 0; i < count; ++i) { - uv__free(cpu_infos[i].model); - } - - uv__free(cpu_infos); -} - - -int uv_interface_addresses(uv_interface_address_t** addresses, - int* count) { - uv_interface_address_t* address; - int sockfd, size = 1; - struct ifconf ifc; - struct ifreq *ifr, *p, flg; - - *count = 0; - - if (0 > (sockfd = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP))) { - return -errno; - } - - if (ioctl(sockfd, SIOCGSIZIFCONF, &size) == -1) { - SAVE_ERRNO(uv__close(sockfd)); - return -errno; - } - - ifc.ifc_req = (struct ifreq*)uv__malloc(size); - ifc.ifc_len = size; - if (ioctl(sockfd, SIOCGIFCONF, &ifc) == -1) { - SAVE_ERRNO(uv__close(sockfd)); - return -errno; - } - -#define ADDR_SIZE(p) MAX((p).sa_len, sizeof(p)) - - /* Count all up and running ipv4/ipv6 addresses */ - ifr = ifc.ifc_req; - while ((char*)ifr < (char*)ifc.ifc_req + ifc.ifc_len) { - p = ifr; - ifr = (struct ifreq*) - ((char*)ifr + sizeof(ifr->ifr_name) + ADDR_SIZE(ifr->ifr_addr)); - - if (!(p->ifr_addr.sa_family == AF_INET6 || - p->ifr_addr.sa_family == AF_INET)) - continue; - - memcpy(flg.ifr_name, p->ifr_name, sizeof(flg.ifr_name)); - if (ioctl(sockfd, SIOCGIFFLAGS, &flg) == -1) { - SAVE_ERRNO(uv__close(sockfd)); - return -errno; - } - - if (!(flg.ifr_flags & IFF_UP && flg.ifr_flags & IFF_RUNNING)) - continue; - - (*count)++; - } - - /* Alloc the return interface structs */ - *addresses = (uv_interface_address_t*) - uv__malloc(*count * sizeof(uv_interface_address_t)); - if (!(*addresses)) { - uv__close(sockfd); - return -ENOMEM; - } - address = *addresses; - - ifr = ifc.ifc_req; - while ((char*)ifr < (char*)ifc.ifc_req + ifc.ifc_len) { - p = ifr; - ifr = (struct ifreq*) - ((char*)ifr + sizeof(ifr->ifr_name) + ADDR_SIZE(ifr->ifr_addr)); - - if (!(p->ifr_addr.sa_family == AF_INET6 || - p->ifr_addr.sa_family == AF_INET)) - continue; - - memcpy(flg.ifr_name, p->ifr_name, sizeof(flg.ifr_name)); - if (ioctl(sockfd, SIOCGIFFLAGS, &flg) == -1) { - uv__close(sockfd); - return -ENOSYS; - } - - if (!(flg.ifr_flags & IFF_UP && flg.ifr_flags & IFF_RUNNING)) - continue; - - /* All conditions above must match count loop */ - - address->name = uv__strdup(p->ifr_name); - - if (p->ifr_addr.sa_family == AF_INET6) { - address->address.address6 = *((struct sockaddr_in6*) &p->ifr_addr); - } else { - address->address.address4 = *((struct sockaddr_in*) &p->ifr_addr); - } - - /* TODO: Retrieve netmask using SIOCGIFNETMASK ioctl */ - - address->is_internal = flg.ifr_flags & IFF_LOOPBACK ? 1 : 0; - - address++; - } - -#undef ADDR_SIZE - - uv__close(sockfd); - return 0; -} - - -void uv_free_interface_addresses(uv_interface_address_t* addresses, - int count) { - int i; - - for (i = 0; i < count; ++i) { - uv__free(addresses[i].name); - } - - uv__free(addresses); -} - -void uv__platform_invalidate_fd(uv_loop_t* loop, int fd) { - struct pollfd* events; - uintptr_t i; - uintptr_t nfds; - struct poll_ctl pc; - - assert(loop->watchers != NULL); - - events = (struct pollfd*) loop->watchers[loop->nwatchers]; - nfds = (uintptr_t) loop->watchers[loop->nwatchers + 1]; - - if (events != NULL) - /* Invalidate events with same file descriptor */ - for (i = 0; i < nfds; i++) - if ((int) events[i].fd == fd) - events[i].fd = -1; - - /* Remove the file descriptor from the poll set */ - pc.events = 0; - pc.cmd = PS_DELETE; - pc.fd = fd; - if(loop->backend_fd >= 0) - pollset_ctl(loop->backend_fd, &pc, 1); -} diff --git a/outside/libuv-v1.7.5/src/unix/android-ifaddrs.c b/outside/libuv-v1.7.5/src/unix/android-ifaddrs.c deleted file mode 100644 index 71f7290b3..000000000 --- a/outside/libuv-v1.7.5/src/unix/android-ifaddrs.c +++ /dev/null @@ -1,703 +0,0 @@ -/* -Copyright (c) 2013, Kenneth MacKay -Copyright (c) 2014, Emergya (Cloud4all, FP7/2007-2013 grant agreement n° 289016) -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 HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "android-ifaddrs.h" -#include "uv-common.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -typedef struct NetlinkList -{ - struct NetlinkList *m_next; - struct nlmsghdr *m_data; - unsigned int m_size; -} NetlinkList; - -static int netlink_socket(void) -{ - struct sockaddr_nl l_addr; - - int l_socket = socket(PF_NETLINK, SOCK_RAW, NETLINK_ROUTE); - if(l_socket < 0) - { - return -1; - } - - memset(&l_addr, 0, sizeof(l_addr)); - l_addr.nl_family = AF_NETLINK; - if(bind(l_socket, (struct sockaddr *)&l_addr, sizeof(l_addr)) < 0) - { - close(l_socket); - return -1; - } - - return l_socket; -} - -static int netlink_send(int p_socket, int p_request) -{ - char l_buffer[NLMSG_ALIGN(sizeof(struct nlmsghdr)) + NLMSG_ALIGN(sizeof(struct rtgenmsg))]; - - struct nlmsghdr *l_hdr; - struct rtgenmsg *l_msg; - struct sockaddr_nl l_addr; - - memset(l_buffer, 0, sizeof(l_buffer)); - - l_hdr = (struct nlmsghdr *)l_buffer; - l_msg = (struct rtgenmsg *)NLMSG_DATA(l_hdr); - - l_hdr->nlmsg_len = NLMSG_LENGTH(sizeof(*l_msg)); - l_hdr->nlmsg_type = p_request; - l_hdr->nlmsg_flags = NLM_F_ROOT | NLM_F_MATCH | NLM_F_REQUEST; - l_hdr->nlmsg_pid = 0; - l_hdr->nlmsg_seq = p_socket; - l_msg->rtgen_family = AF_UNSPEC; - - memset(&l_addr, 0, sizeof(l_addr)); - l_addr.nl_family = AF_NETLINK; - return (sendto(p_socket, l_hdr, l_hdr->nlmsg_len, 0, (struct sockaddr *)&l_addr, sizeof(l_addr))); -} - -static int netlink_recv(int p_socket, void *p_buffer, size_t p_len) -{ - struct sockaddr_nl l_addr; - struct msghdr l_msg; - - struct iovec l_iov; - l_iov.iov_base = p_buffer; - l_iov.iov_len = p_len; - - for(;;) - { - int l_result; - l_msg.msg_name = (void *)&l_addr; - l_msg.msg_namelen = sizeof(l_addr); - l_msg.msg_iov = &l_iov; - l_msg.msg_iovlen = 1; - l_msg.msg_control = NULL; - l_msg.msg_controllen = 0; - l_msg.msg_flags = 0; - l_result = recvmsg(p_socket, &l_msg, 0); - - if(l_result < 0) - { - if(errno == EINTR) - { - continue; - } - return -2; - } - - /* Buffer was too small */ - if(l_msg.msg_flags & MSG_TRUNC) - { - return -1; - } - return l_result; - } -} - -static struct nlmsghdr *getNetlinkResponse(int p_socket, int *p_size, int *p_done) -{ - size_t l_size = 4096; - void *l_buffer = NULL; - - for(;;) - { - int l_read; - - uv__free(l_buffer); - l_buffer = uv__malloc(l_size); - if (l_buffer == NULL) - { - return NULL; - } - - l_read = netlink_recv(p_socket, l_buffer, l_size); - *p_size = l_read; - if(l_read == -2) - { - uv__free(l_buffer); - return NULL; - } - if(l_read >= 0) - { - pid_t l_pid = getpid(); - struct nlmsghdr *l_hdr; - for(l_hdr = (struct nlmsghdr *)l_buffer; NLMSG_OK(l_hdr, (unsigned int)l_read); l_hdr = (struct nlmsghdr *)NLMSG_NEXT(l_hdr, l_read)) - { - if((pid_t)l_hdr->nlmsg_pid != l_pid || (int)l_hdr->nlmsg_seq != p_socket) - { - continue; - } - - if(l_hdr->nlmsg_type == NLMSG_DONE) - { - *p_done = 1; - break; - } - - if(l_hdr->nlmsg_type == NLMSG_ERROR) - { - uv__free(l_buffer); - return NULL; - } - } - return l_buffer; - } - - l_size *= 2; - } -} - -static NetlinkList *newListItem(struct nlmsghdr *p_data, unsigned int p_size) -{ - NetlinkList *l_item = uv__malloc(sizeof(NetlinkList)); - if (l_item == NULL) - { - return NULL; - } - - l_item->m_next = NULL; - l_item->m_data = p_data; - l_item->m_size = p_size; - return l_item; -} - -static void freeResultList(NetlinkList *p_list) -{ - NetlinkList *l_cur; - while(p_list) - { - l_cur = p_list; - p_list = p_list->m_next; - uv__free(l_cur->m_data); - uv__free(l_cur); - } -} - -static NetlinkList *getResultList(int p_socket, int p_request) -{ - int l_size; - int l_done; - NetlinkList *l_list; - NetlinkList *l_end; - - if(netlink_send(p_socket, p_request) < 0) - { - return NULL; - } - - l_list = NULL; - l_end = NULL; - - l_done = 0; - while(!l_done) - { - NetlinkList *l_item; - - struct nlmsghdr *l_hdr = getNetlinkResponse(p_socket, &l_size, &l_done); - /* Error */ - if(!l_hdr) - { - freeResultList(l_list); - return NULL; - } - - l_item = newListItem(l_hdr, l_size); - if (!l_item) - { - freeResultList(l_list); - return NULL; - } - if(!l_list) - { - l_list = l_item; - } - else - { - l_end->m_next = l_item; - } - l_end = l_item; - } - return l_list; -} - -static size_t maxSize(size_t a, size_t b) -{ - return (a > b ? a : b); -} - -static size_t calcAddrLen(sa_family_t p_family, int p_dataSize) -{ - switch(p_family) - { - case AF_INET: - return sizeof(struct sockaddr_in); - case AF_INET6: - return sizeof(struct sockaddr_in6); - case AF_PACKET: - return maxSize(sizeof(struct sockaddr_ll), offsetof(struct sockaddr_ll, sll_addr) + p_dataSize); - default: - return maxSize(sizeof(struct sockaddr), offsetof(struct sockaddr, sa_data) + p_dataSize); - } -} - -static void makeSockaddr(sa_family_t p_family, struct sockaddr *p_dest, void *p_data, size_t p_size) -{ - switch(p_family) - { - case AF_INET: - memcpy(&((struct sockaddr_in*)p_dest)->sin_addr, p_data, p_size); - break; - case AF_INET6: - memcpy(&((struct sockaddr_in6*)p_dest)->sin6_addr, p_data, p_size); - break; - case AF_PACKET: - memcpy(((struct sockaddr_ll*)p_dest)->sll_addr, p_data, p_size); - ((struct sockaddr_ll*)p_dest)->sll_halen = p_size; - break; - default: - memcpy(p_dest->sa_data, p_data, p_size); - break; - } - p_dest->sa_family = p_family; -} - -static void addToEnd(struct ifaddrs **p_resultList, struct ifaddrs *p_entry) -{ - if(!*p_resultList) - { - *p_resultList = p_entry; - } - else - { - struct ifaddrs *l_cur = *p_resultList; - while(l_cur->ifa_next) - { - l_cur = l_cur->ifa_next; - } - l_cur->ifa_next = p_entry; - } -} - -static int interpretLink(struct nlmsghdr *p_hdr, struct ifaddrs **p_resultList) -{ - struct ifaddrs *l_entry; - - char *l_index; - char *l_name; - char *l_addr; - char *l_data; - - struct ifinfomsg *l_info = (struct ifinfomsg *)NLMSG_DATA(p_hdr); - - size_t l_nameSize = 0; - size_t l_addrSize = 0; - size_t l_dataSize = 0; - - size_t l_rtaSize = NLMSG_PAYLOAD(p_hdr, sizeof(struct ifinfomsg)); - struct rtattr *l_rta; - for(l_rta = IFLA_RTA(l_info); RTA_OK(l_rta, l_rtaSize); l_rta = RTA_NEXT(l_rta, l_rtaSize)) - { - size_t l_rtaDataSize = RTA_PAYLOAD(l_rta); - switch(l_rta->rta_type) - { - case IFLA_ADDRESS: - case IFLA_BROADCAST: - l_addrSize += NLMSG_ALIGN(calcAddrLen(AF_PACKET, l_rtaDataSize)); - break; - case IFLA_IFNAME: - l_nameSize += NLMSG_ALIGN(l_rtaSize + 1); - break; - case IFLA_STATS: - l_dataSize += NLMSG_ALIGN(l_rtaSize); - break; - default: - break; - } - } - - l_entry = uv__malloc(sizeof(struct ifaddrs) + sizeof(int) + l_nameSize + l_addrSize + l_dataSize); - if (l_entry == NULL) - { - return -1; - } - memset(l_entry, 0, sizeof(struct ifaddrs)); - l_entry->ifa_name = ""; - - l_index = ((char *)l_entry) + sizeof(struct ifaddrs); - l_name = l_index + sizeof(int); - l_addr = l_name + l_nameSize; - l_data = l_addr + l_addrSize; - - /* Save the interface index so we can look it up when handling the - * addresses. - */ - memcpy(l_index, &l_info->ifi_index, sizeof(int)); - - l_entry->ifa_flags = l_info->ifi_flags; - - l_rtaSize = NLMSG_PAYLOAD(p_hdr, sizeof(struct ifinfomsg)); - for(l_rta = IFLA_RTA(l_info); RTA_OK(l_rta, l_rtaSize); l_rta = RTA_NEXT(l_rta, l_rtaSize)) - { - void *l_rtaData = RTA_DATA(l_rta); - size_t l_rtaDataSize = RTA_PAYLOAD(l_rta); - switch(l_rta->rta_type) - { - case IFLA_ADDRESS: - case IFLA_BROADCAST: - { - size_t l_addrLen = calcAddrLen(AF_PACKET, l_rtaDataSize); - makeSockaddr(AF_PACKET, (struct sockaddr *)l_addr, l_rtaData, l_rtaDataSize); - ((struct sockaddr_ll *)l_addr)->sll_ifindex = l_info->ifi_index; - ((struct sockaddr_ll *)l_addr)->sll_hatype = l_info->ifi_type; - if(l_rta->rta_type == IFLA_ADDRESS) - { - l_entry->ifa_addr = (struct sockaddr *)l_addr; - } - else - { - l_entry->ifa_broadaddr = (struct sockaddr *)l_addr; - } - l_addr += NLMSG_ALIGN(l_addrLen); - break; - } - case IFLA_IFNAME: - strncpy(l_name, l_rtaData, l_rtaDataSize); - l_name[l_rtaDataSize] = '\0'; - l_entry->ifa_name = l_name; - break; - case IFLA_STATS: - memcpy(l_data, l_rtaData, l_rtaDataSize); - l_entry->ifa_data = l_data; - break; - default: - break; - } - } - - addToEnd(p_resultList, l_entry); - return 0; -} - -static struct ifaddrs *findInterface(int p_index, struct ifaddrs **p_links, int p_numLinks) -{ - int l_num = 0; - struct ifaddrs *l_cur = *p_links; - while(l_cur && l_num < p_numLinks) - { - char *l_indexPtr = ((char *)l_cur) + sizeof(struct ifaddrs); - int l_index; - memcpy(&l_index, l_indexPtr, sizeof(int)); - if(l_index == p_index) - { - return l_cur; - } - - l_cur = l_cur->ifa_next; - ++l_num; - } - return NULL; -} - -static int interpretAddr(struct nlmsghdr *p_hdr, struct ifaddrs **p_resultList, int p_numLinks) -{ - struct ifaddrmsg *l_info = (struct ifaddrmsg *)NLMSG_DATA(p_hdr); - struct ifaddrs *l_interface = findInterface(l_info->ifa_index, p_resultList, p_numLinks); - - size_t l_nameSize = 0; - size_t l_addrSize = 0; - - int l_addedNetmask = 0; - - size_t l_rtaSize = NLMSG_PAYLOAD(p_hdr, sizeof(struct ifaddrmsg)); - struct rtattr *l_rta; - struct ifaddrs *l_entry; - - char *l_name; - char *l_addr; - - for(l_rta = IFLA_RTA(l_info); RTA_OK(l_rta, l_rtaSize); l_rta = RTA_NEXT(l_rta, l_rtaSize)) - { - size_t l_rtaDataSize = RTA_PAYLOAD(l_rta); - if(l_info->ifa_family == AF_PACKET) - { - continue; - } - - switch(l_rta->rta_type) - { - case IFA_ADDRESS: - case IFA_LOCAL: - if((l_info->ifa_family == AF_INET || l_info->ifa_family == AF_INET6) && !l_addedNetmask) - { - /* Make room for netmask */ - l_addrSize += NLMSG_ALIGN(calcAddrLen(l_info->ifa_family, l_rtaDataSize)); - l_addedNetmask = 1; - } - case IFA_BROADCAST: - l_addrSize += NLMSG_ALIGN(calcAddrLen(l_info->ifa_family, l_rtaDataSize)); - break; - case IFA_LABEL: - l_nameSize += NLMSG_ALIGN(l_rtaSize + 1); - break; - default: - break; - } - } - - l_entry = uv__malloc(sizeof(struct ifaddrs) + l_nameSize + l_addrSize); - if (l_entry == NULL) - { - return -1; - } - memset(l_entry, 0, sizeof(struct ifaddrs)); - l_entry->ifa_name = (l_interface ? l_interface->ifa_name : ""); - - l_name = ((char *)l_entry) + sizeof(struct ifaddrs); - l_addr = l_name + l_nameSize; - - l_entry->ifa_flags = l_info->ifa_flags; - if(l_interface) - { - l_entry->ifa_flags |= l_interface->ifa_flags; - } - - l_rtaSize = NLMSG_PAYLOAD(p_hdr, sizeof(struct ifaddrmsg)); - for(l_rta = IFLA_RTA(l_info); RTA_OK(l_rta, l_rtaSize); l_rta = RTA_NEXT(l_rta, l_rtaSize)) - { - void *l_rtaData = RTA_DATA(l_rta); - size_t l_rtaDataSize = RTA_PAYLOAD(l_rta); - switch(l_rta->rta_type) - { - case IFA_ADDRESS: - case IFA_BROADCAST: - case IFA_LOCAL: - { - size_t l_addrLen = calcAddrLen(l_info->ifa_family, l_rtaDataSize); - makeSockaddr(l_info->ifa_family, (struct sockaddr *)l_addr, l_rtaData, l_rtaDataSize); - if(l_info->ifa_family == AF_INET6) - { - if(IN6_IS_ADDR_LINKLOCAL((struct in6_addr *)l_rtaData) || IN6_IS_ADDR_MC_LINKLOCAL((struct in6_addr *)l_rtaData)) - { - ((struct sockaddr_in6 *)l_addr)->sin6_scope_id = l_info->ifa_index; - } - } - - /* Apparently in a point-to-point network IFA_ADDRESS contains - * the dest address and IFA_LOCAL contains the local address - */ - if(l_rta->rta_type == IFA_ADDRESS) - { - if(l_entry->ifa_addr) - { - l_entry->ifa_dstaddr = (struct sockaddr *)l_addr; - } - else - { - l_entry->ifa_addr = (struct sockaddr *)l_addr; - } - } - else if(l_rta->rta_type == IFA_LOCAL) - { - if(l_entry->ifa_addr) - { - l_entry->ifa_dstaddr = l_entry->ifa_addr; - } - l_entry->ifa_addr = (struct sockaddr *)l_addr; - } - else - { - l_entry->ifa_broadaddr = (struct sockaddr *)l_addr; - } - l_addr += NLMSG_ALIGN(l_addrLen); - break; - } - case IFA_LABEL: - strncpy(l_name, l_rtaData, l_rtaDataSize); - l_name[l_rtaDataSize] = '\0'; - l_entry->ifa_name = l_name; - break; - default: - break; - } - } - - if(l_entry->ifa_addr && (l_entry->ifa_addr->sa_family == AF_INET || l_entry->ifa_addr->sa_family == AF_INET6)) - { - unsigned l_maxPrefix = (l_entry->ifa_addr->sa_family == AF_INET ? 32 : 128); - unsigned l_prefix = (l_info->ifa_prefixlen > l_maxPrefix ? l_maxPrefix : l_info->ifa_prefixlen); - char l_mask[16] = {0}; - unsigned i; - for(i=0; i<(l_prefix/8); ++i) - { - l_mask[i] = 0xff; - } - if(l_prefix % 8) - { - l_mask[i] = 0xff << (8 - (l_prefix % 8)); - } - - makeSockaddr(l_entry->ifa_addr->sa_family, (struct sockaddr *)l_addr, l_mask, l_maxPrefix / 8); - l_entry->ifa_netmask = (struct sockaddr *)l_addr; - } - - addToEnd(p_resultList, l_entry); - return 0; -} - -static int interpretLinks(int p_socket, NetlinkList *p_netlinkList, struct ifaddrs **p_resultList) -{ - - int l_numLinks = 0; - pid_t l_pid = getpid(); - for(; p_netlinkList; p_netlinkList = p_netlinkList->m_next) - { - unsigned int l_nlsize = p_netlinkList->m_size; - struct nlmsghdr *l_hdr; - for(l_hdr = p_netlinkList->m_data; NLMSG_OK(l_hdr, l_nlsize); l_hdr = NLMSG_NEXT(l_hdr, l_nlsize)) - { - if((pid_t)l_hdr->nlmsg_pid != l_pid || (int)l_hdr->nlmsg_seq != p_socket) - { - continue; - } - - if(l_hdr->nlmsg_type == NLMSG_DONE) - { - break; - } - - if(l_hdr->nlmsg_type == RTM_NEWLINK) - { - if(interpretLink(l_hdr, p_resultList) == -1) - { - return -1; - } - ++l_numLinks; - } - } - } - return l_numLinks; -} - -static int interpretAddrs(int p_socket, NetlinkList *p_netlinkList, struct ifaddrs **p_resultList, int p_numLinks) -{ - pid_t l_pid = getpid(); - for(; p_netlinkList; p_netlinkList = p_netlinkList->m_next) - { - unsigned int l_nlsize = p_netlinkList->m_size; - struct nlmsghdr *l_hdr; - for(l_hdr = p_netlinkList->m_data; NLMSG_OK(l_hdr, l_nlsize); l_hdr = NLMSG_NEXT(l_hdr, l_nlsize)) - { - if((pid_t)l_hdr->nlmsg_pid != l_pid || (int)l_hdr->nlmsg_seq != p_socket) - { - continue; - } - - if(l_hdr->nlmsg_type == NLMSG_DONE) - { - break; - } - - if(l_hdr->nlmsg_type == RTM_NEWADDR) - { - if (interpretAddr(l_hdr, p_resultList, p_numLinks) == -1) - { - return -1; - } - } - } - } - return 0; -} - -int getifaddrs(struct ifaddrs **ifap) -{ - int l_socket; - int l_result; - int l_numLinks; - NetlinkList *l_linkResults; - NetlinkList *l_addrResults; - - if(!ifap) - { - return -1; - } - *ifap = NULL; - - l_socket = netlink_socket(); - if(l_socket < 0) - { - return -1; - } - - l_linkResults = getResultList(l_socket, RTM_GETLINK); - if(!l_linkResults) - { - close(l_socket); - return -1; - } - - l_addrResults = getResultList(l_socket, RTM_GETADDR); - if(!l_addrResults) - { - close(l_socket); - freeResultList(l_linkResults); - return -1; - } - - l_result = 0; - l_numLinks = interpretLinks(l_socket, l_linkResults, ifap); - if(l_numLinks == -1 || interpretAddrs(l_socket, l_addrResults, ifap, l_numLinks) == -1) - { - l_result = -1; - } - - freeResultList(l_linkResults); - freeResultList(l_addrResults); - close(l_socket); - return l_result; -} - -void freeifaddrs(struct ifaddrs *ifa) -{ - struct ifaddrs *l_cur; - while(ifa) - { - l_cur = ifa; - ifa = ifa->ifa_next; - uv__free(l_cur); - } -} diff --git a/outside/libuv-v1.7.5/src/unix/async.c b/outside/libuv-v1.7.5/src/unix/async.c deleted file mode 100644 index 9ff24aeb3..000000000 --- a/outside/libuv-v1.7.5/src/unix/async.c +++ /dev/null @@ -1,284 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * 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. - */ - -/* This file contains both the uv__async internal infrastructure and the - * user-facing uv_async_t functions. - */ - -#include "uv.h" -#include "internal.h" -#include "atomic-ops.h" - -#include -#include /* snprintf() */ -#include -#include -#include -#include - -static void uv__async_event(uv_loop_t* loop, - struct uv__async* w, - unsigned int nevents); -static int uv__async_eventfd(void); - - -int uv_async_init(uv_loop_t* loop, uv_async_t* handle, uv_async_cb async_cb) { - int err; - - err = uv__async_start(loop, &loop->async_watcher, uv__async_event); - if (err) - return err; - - uv__handle_init(loop, (uv_handle_t*)handle, UV_ASYNC); - handle->async_cb = async_cb; - handle->pending = 0; - - QUEUE_INSERT_TAIL(&loop->async_handles, &handle->queue); - uv__handle_start(handle); - - return 0; -} - - -int uv_async_send(uv_async_t* handle) { - /* Do a cheap read first. */ - if (ACCESS_ONCE(int, handle->pending) != 0) - return 0; - - if (cmpxchgi(&handle->pending, 0, 1) == 0) - uv__async_send(&handle->loop->async_watcher); - - return 0; -} - - -void uv__async_close(uv_async_t* handle) { - QUEUE_REMOVE(&handle->queue); - uv__handle_stop(handle); -} - - -static void uv__async_event(uv_loop_t* loop, - struct uv__async* w, - unsigned int nevents) { - QUEUE* q; - uv_async_t* h; - - QUEUE_FOREACH(q, &loop->async_handles) { - h = QUEUE_DATA(q, uv_async_t, queue); - - if (cmpxchgi(&h->pending, 1, 0) == 0) - continue; - - if (h->async_cb == NULL) - continue; - h->async_cb(h); - } -} - - -static void uv__async_io(uv_loop_t* loop, uv__io_t* w, unsigned int events) { - struct uv__async* wa; - char buf[1024]; - unsigned n; - ssize_t r; - - n = 0; - for (;;) { - r = read(w->fd, buf, sizeof(buf)); - - if (r > 0) - n += r; - - if (r == sizeof(buf)) - continue; - - if (r != -1) - break; - - if (errno == EAGAIN || errno == EWOULDBLOCK) - break; - - if (errno == EINTR) - continue; - - abort(); - } - - wa = container_of(w, struct uv__async, io_watcher); - -#if defined(__linux__) - if (wa->wfd == -1) { - uint64_t val; - assert(n == sizeof(val)); - memcpy(&val, buf, sizeof(val)); /* Avoid alignment issues. */ - wa->cb(loop, wa, val); - return; - } -#endif - - wa->cb(loop, wa, n); -} - - -void uv__async_send(struct uv__async* wa) { - const void* buf; - ssize_t len; - int fd; - int r; - - buf = ""; - len = 1; - fd = wa->wfd; - -#if defined(__linux__) - if (fd == -1) { - static const uint64_t val = 1; - buf = &val; - len = sizeof(val); - fd = wa->io_watcher.fd; /* eventfd */ - } -#endif - - do - r = write(fd, buf, len); - while (r == -1 && errno == EINTR); - - if (r == len) - return; - - if (r == -1) - if (errno == EAGAIN || errno == EWOULDBLOCK) - return; - - abort(); -} - - -void uv__async_init(struct uv__async* wa) { - wa->io_watcher.fd = -1; - wa->wfd = -1; -} - - -int uv__async_start(uv_loop_t* loop, struct uv__async* wa, uv__async_cb cb) { - int pipefd[2]; - int err; - - if (wa->io_watcher.fd != -1) - return 0; - - err = uv__async_eventfd(); - if (err >= 0) { - pipefd[0] = err; - pipefd[1] = -1; - } - else if (err == -ENOSYS) { - err = uv__make_pipe(pipefd, UV__F_NONBLOCK); -#if defined(__linux__) - /* Save a file descriptor by opening one of the pipe descriptors as - * read/write through the procfs. That file descriptor can then - * function as both ends of the pipe. - */ - if (err == 0) { - char buf[32]; - int fd; - - snprintf(buf, sizeof(buf), "/proc/self/fd/%d", pipefd[0]); - fd = uv__open_cloexec(buf, O_RDWR); - if (fd >= 0) { - uv__close(pipefd[0]); - uv__close(pipefd[1]); - pipefd[0] = fd; - pipefd[1] = fd; - } - } -#endif - } - - if (err < 0) - return err; - - uv__io_init(&wa->io_watcher, uv__async_io, pipefd[0]); - uv__io_start(loop, &wa->io_watcher, UV__POLLIN); - wa->wfd = pipefd[1]; - wa->cb = cb; - - return 0; -} - - -void uv__async_stop(uv_loop_t* loop, struct uv__async* wa) { - if (wa->io_watcher.fd == -1) - return; - - if (wa->wfd != -1) { - if (wa->wfd != wa->io_watcher.fd) - uv__close(wa->wfd); - wa->wfd = -1; - } - - uv__io_stop(loop, &wa->io_watcher, UV__POLLIN); - uv__close(wa->io_watcher.fd); - wa->io_watcher.fd = -1; -} - - -static int uv__async_eventfd() { -#if defined(__linux__) - static int no_eventfd2; - static int no_eventfd; - int fd; - - if (no_eventfd2) - goto skip_eventfd2; - - fd = uv__eventfd2(0, UV__EFD_CLOEXEC | UV__EFD_NONBLOCK); - if (fd != -1) - return fd; - - if (errno != ENOSYS) - return -errno; - - no_eventfd2 = 1; - -skip_eventfd2: - - if (no_eventfd) - goto skip_eventfd; - - fd = uv__eventfd(0); - if (fd != -1) { - uv__cloexec(fd, 1); - uv__nonblock(fd, 1); - return fd; - } - - if (errno != ENOSYS) - return -errno; - - no_eventfd = 1; - -skip_eventfd: - -#endif - - return -ENOSYS; -} diff --git a/outside/libuv-v1.7.5/src/unix/atomic-ops.h b/outside/libuv-v1.7.5/src/unix/atomic-ops.h deleted file mode 100644 index 8fb157dcc..000000000 --- a/outside/libuv-v1.7.5/src/unix/atomic-ops.h +++ /dev/null @@ -1,72 +0,0 @@ -/* Copyright (c) 2013, Ben Noordhuis - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef UV_ATOMIC_OPS_H_ -#define UV_ATOMIC_OPS_H_ - -#include "internal.h" /* UV_UNUSED */ - -UV_UNUSED(static int cmpxchgi(int* ptr, int oldval, int newval)); -UV_UNUSED(static long cmpxchgl(long* ptr, long oldval, long newval)); -UV_UNUSED(static void cpu_relax(void)); - -/* Prefer hand-rolled assembly over the gcc builtins because the latter also - * issue full memory barriers. - */ -UV_UNUSED(static int cmpxchgi(int* ptr, int oldval, int newval)) { -#if defined(__i386__) || defined(__x86_64__) - int out; - __asm__ __volatile__ ("lock; cmpxchg %2, %1;" - : "=a" (out), "+m" (*(volatile int*) ptr) - : "r" (newval), "0" (oldval) - : "memory"); - return out; -#elif defined(_AIX) && defined(__xlC__) - const int out = (*(volatile int*) ptr); - __compare_and_swap(ptr, &oldval, newval); - return out; -#else - return __sync_val_compare_and_swap(ptr, oldval, newval); -#endif -} - -UV_UNUSED(static long cmpxchgl(long* ptr, long oldval, long newval)) { -#if defined(__i386__) || defined(__x86_64__) - long out; - __asm__ __volatile__ ("lock; cmpxchg %2, %1;" - : "=a" (out), "+m" (*(volatile long*) ptr) - : "r" (newval), "0" (oldval) - : "memory"); - return out; -#elif defined(_AIX) && defined(__xlC__) - const long out = (*(volatile int*) ptr); -# if defined(__64BIT__) - __compare_and_swaplp(ptr, &oldval, newval); -# else - __compare_and_swap(ptr, &oldval, newval); -# endif /* if defined(__64BIT__) */ - return out; -#else - return __sync_val_compare_and_swap(ptr, oldval, newval); -#endif -} - -UV_UNUSED(static void cpu_relax(void)) { -#if defined(__i386__) || defined(__x86_64__) - __asm__ __volatile__ ("rep; nop"); /* a.k.a. PAUSE */ -#endif -} - -#endif /* UV_ATOMIC_OPS_H_ */ diff --git a/outside/libuv-v1.7.5/src/unix/core.c b/outside/libuv-v1.7.5/src/unix/core.c deleted file mode 100644 index e149357e0..000000000 --- a/outside/libuv-v1.7.5/src/unix/core.c +++ /dev/null @@ -1,1091 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * 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. - */ - -#include "uv.h" -#include "internal.h" - -#include /* NULL */ -#include /* printf */ -#include -#include /* strerror */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include /* INT_MAX, PATH_MAX, IOV_MAX */ -#include /* writev */ -#include /* getrusage */ -#include - -#ifdef __linux__ -# include -#endif - -#ifdef __sun -# include -# include -#endif - -#ifdef __APPLE__ -# include /* _NSGetExecutablePath */ -# include -# include -#endif - -#if defined(__FreeBSD__) || defined(__DragonFly__) -# include -# include -# include -# include -# define UV__O_CLOEXEC O_CLOEXEC -# if defined(__FreeBSD__) && __FreeBSD__ >= 10 -# define uv__accept4 accept4 -# define UV__SOCK_NONBLOCK SOCK_NONBLOCK -# define UV__SOCK_CLOEXEC SOCK_CLOEXEC -# endif -# if !defined(F_DUP2FD_CLOEXEC) && defined(_F_DUP2FD_CLOEXEC) -# define F_DUP2FD_CLOEXEC _F_DUP2FD_CLOEXEC -# endif -#endif - -#ifdef _AIX -#include -#endif - -static int uv__run_pending(uv_loop_t* loop); - -/* Verify that uv_buf_t is ABI-compatible with struct iovec. */ -STATIC_ASSERT(sizeof(uv_buf_t) == sizeof(struct iovec)); -STATIC_ASSERT(sizeof(&((uv_buf_t*) 0)->base) == - sizeof(((struct iovec*) 0)->iov_base)); -STATIC_ASSERT(sizeof(&((uv_buf_t*) 0)->len) == - sizeof(((struct iovec*) 0)->iov_len)); -STATIC_ASSERT(offsetof(uv_buf_t, base) == offsetof(struct iovec, iov_base)); -STATIC_ASSERT(offsetof(uv_buf_t, len) == offsetof(struct iovec, iov_len)); - - -uint64_t uv_hrtime(void) { - return uv__hrtime(UV_CLOCK_PRECISE); -} - - -void uv_close(uv_handle_t* handle, uv_close_cb close_cb) { - assert(!(handle->flags & (UV_CLOSING | UV_CLOSED))); - - handle->flags |= UV_CLOSING; - handle->close_cb = close_cb; - - switch (handle->type) { - case UV_NAMED_PIPE: - uv__pipe_close((uv_pipe_t*)handle); - break; - - case UV_TTY: - uv__stream_close((uv_stream_t*)handle); - break; - - case UV_TCP: - uv__tcp_close((uv_tcp_t*)handle); - break; - - case UV_UDP: - uv__udp_close((uv_udp_t*)handle); - break; - - case UV_PREPARE: - uv__prepare_close((uv_prepare_t*)handle); - break; - - case UV_CHECK: - uv__check_close((uv_check_t*)handle); - break; - - case UV_IDLE: - uv__idle_close((uv_idle_t*)handle); - break; - - case UV_ASYNC: - uv__async_close((uv_async_t*)handle); - break; - - case UV_TIMER: - uv__timer_close((uv_timer_t*)handle); - break; - - case UV_PROCESS: - uv__process_close((uv_process_t*)handle); - break; - - case UV_FS_EVENT: - uv__fs_event_close((uv_fs_event_t*)handle); - break; - - case UV_POLL: - uv__poll_close((uv_poll_t*)handle); - break; - - case UV_FS_POLL: - uv__fs_poll_close((uv_fs_poll_t*)handle); - break; - - case UV_SIGNAL: - uv__signal_close((uv_signal_t*) handle); - /* Signal handles may not be closed immediately. The signal code will */ - /* itself close uv__make_close_pending whenever appropriate. */ - return; - - default: - assert(0); - } - - uv__make_close_pending(handle); -} - -int uv__socket_sockopt(uv_handle_t* handle, int optname, int* value) { - int r; - int fd; - socklen_t len; - - if (handle == NULL || value == NULL) - return -EINVAL; - - if (handle->type == UV_TCP || handle->type == UV_NAMED_PIPE) - fd = uv__stream_fd((uv_stream_t*) handle); - else if (handle->type == UV_UDP) - fd = ((uv_udp_t *) handle)->io_watcher.fd; - else - return -ENOTSUP; - - len = sizeof(*value); - - if (*value == 0) - r = getsockopt(fd, SOL_SOCKET, optname, value, &len); - else - r = setsockopt(fd, SOL_SOCKET, optname, (const void*) value, len); - - if (r < 0) - return -errno; - - return 0; -} - -void uv__make_close_pending(uv_handle_t* handle) { - assert(handle->flags & UV_CLOSING); - assert(!(handle->flags & UV_CLOSED)); - handle->next_closing = handle->loop->closing_handles; - handle->loop->closing_handles = handle; -} - -int uv__getiovmax(void) { -#if defined(IOV_MAX) - return IOV_MAX; -#elif defined(_SC_IOV_MAX) - static int iovmax = -1; - if (iovmax == -1) - iovmax = sysconf(_SC_IOV_MAX); - return iovmax; -#else - return 1024; -#endif -} - - -static void uv__finish_close(uv_handle_t* handle) { - /* Note: while the handle is in the UV_CLOSING state now, it's still possible - * for it to be active in the sense that uv__is_active() returns true. - * A good example is when the user calls uv_shutdown(), immediately followed - * by uv_close(). The handle is considered active at this point because the - * completion of the shutdown req is still pending. - */ - assert(handle->flags & UV_CLOSING); - assert(!(handle->flags & UV_CLOSED)); - handle->flags |= UV_CLOSED; - - switch (handle->type) { - case UV_PREPARE: - case UV_CHECK: - case UV_IDLE: - case UV_ASYNC: - case UV_TIMER: - case UV_PROCESS: - case UV_FS_EVENT: - case UV_FS_POLL: - case UV_POLL: - case UV_SIGNAL: - break; - - case UV_NAMED_PIPE: - case UV_TCP: - case UV_TTY: - uv__stream_destroy((uv_stream_t*)handle); - break; - - case UV_UDP: - uv__udp_finish_close((uv_udp_t*)handle); - break; - - default: - assert(0); - break; - } - - uv__handle_unref(handle); - QUEUE_REMOVE(&handle->handle_queue); - - if (handle->close_cb) { - handle->close_cb(handle); - } -} - - -static void uv__run_closing_handles(uv_loop_t* loop) { - uv_handle_t* p; - uv_handle_t* q; - - p = loop->closing_handles; - loop->closing_handles = NULL; - - while (p) { - q = p->next_closing; - uv__finish_close(p); - p = q; - } -} - - -int uv_is_closing(const uv_handle_t* handle) { - return uv__is_closing(handle); -} - - -int uv_backend_fd(const uv_loop_t* loop) { - return loop->backend_fd; -} - - -int uv_backend_timeout(const uv_loop_t* loop) { - if (loop->stop_flag != 0) - return 0; - - if (!uv__has_active_handles(loop) && !uv__has_active_reqs(loop)) - return 0; - - if (!QUEUE_EMPTY(&loop->idle_handles)) - return 0; - - if (!QUEUE_EMPTY(&loop->pending_queue)) - return 0; - - if (loop->closing_handles) - return 0; - - return uv__next_timeout(loop); -} - - -static int uv__loop_alive(const uv_loop_t* loop) { - return uv__has_active_handles(loop) || - uv__has_active_reqs(loop) || - loop->closing_handles != NULL; -} - - -int uv_loop_alive(const uv_loop_t* loop) { - return uv__loop_alive(loop); -} - - -int uv_run(uv_loop_t* loop, uv_run_mode mode) { - int timeout; - int r; - int ran_pending; - - r = uv__loop_alive(loop); - if (!r) - uv__update_time(loop); - - while (r != 0 && loop->stop_flag == 0) { - uv__update_time(loop); - uv__run_timers(loop); - ran_pending = uv__run_pending(loop); - uv__run_idle(loop); - uv__run_prepare(loop); - - timeout = 0; - if ((mode == UV_RUN_ONCE && !ran_pending) || mode == UV_RUN_DEFAULT) - timeout = uv_backend_timeout(loop); - - uv__io_poll(loop, timeout); - uv__run_check(loop); - uv__run_closing_handles(loop); - - if (mode == UV_RUN_ONCE) { - /* UV_RUN_ONCE implies forward progress: at least one callback must have - * been invoked when it returns. uv__io_poll() can return without doing - * I/O (meaning: no callbacks) when its timeout expires - which means we - * have pending timers that satisfy the forward progress constraint. - * - * UV_RUN_NOWAIT makes no guarantees about progress so it's omitted from - * the check. - */ - uv__update_time(loop); - uv__run_timers(loop); - } - - r = uv__loop_alive(loop); - if (mode == UV_RUN_ONCE || mode == UV_RUN_NOWAIT) - break; - } - - /* The if statement lets gcc compile it to a conditional store. Avoids - * dirtying a cache line. - */ - if (loop->stop_flag != 0) - loop->stop_flag = 0; - - return r; -} - - -void uv_update_time(uv_loop_t* loop) { - uv__update_time(loop); -} - - -int uv_is_active(const uv_handle_t* handle) { - return uv__is_active(handle); -} - - -/* Open a socket in non-blocking close-on-exec mode, atomically if possible. */ -int uv__socket(int domain, int type, int protocol) { - int sockfd; - int err; - -#if defined(SOCK_NONBLOCK) && defined(SOCK_CLOEXEC) - sockfd = socket(domain, type | SOCK_NONBLOCK | SOCK_CLOEXEC, protocol); - if (sockfd != -1) - return sockfd; - - if (errno != EINVAL) - return -errno; -#endif - - sockfd = socket(domain, type, protocol); - if (sockfd == -1) - return -errno; - - err = uv__nonblock(sockfd, 1); - if (err == 0) - err = uv__cloexec(sockfd, 1); - - if (err) { - uv__close(sockfd); - return err; - } - -#if defined(SO_NOSIGPIPE) - { - int on = 1; - setsockopt(sockfd, SOL_SOCKET, SO_NOSIGPIPE, &on, sizeof(on)); - } -#endif - - return sockfd; -} - - -int uv__accept(int sockfd) { - int peerfd; - int err; - - assert(sockfd >= 0); - - while (1) { -#if defined(__linux__) || __FreeBSD__ >= 10 - static int no_accept4; - - if (no_accept4) - goto skip; - - peerfd = uv__accept4(sockfd, - NULL, - NULL, - UV__SOCK_NONBLOCK|UV__SOCK_CLOEXEC); - if (peerfd != -1) - return peerfd; - - if (errno == EINTR) - continue; - - if (errno != ENOSYS) - return -errno; - - no_accept4 = 1; -skip: -#endif - - peerfd = accept(sockfd, NULL, NULL); - if (peerfd == -1) { - if (errno == EINTR) - continue; - return -errno; - } - - err = uv__cloexec(peerfd, 1); - if (err == 0) - err = uv__nonblock(peerfd, 1); - - if (err) { - uv__close(peerfd); - return err; - } - - return peerfd; - } -} - - -int uv__close(int fd) { - int saved_errno; - int rc; - - assert(fd > -1); /* Catch uninitialized io_watcher.fd bugs. */ - assert(fd > STDERR_FILENO); /* Catch stdio close bugs. */ - - saved_errno = errno; - rc = close(fd); - if (rc == -1) { - rc = -errno; - if (rc == -EINTR) - rc = -EINPROGRESS; /* For platform/libc consistency. */ - errno = saved_errno; - } - - return rc; -} - - -#if defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__) || \ - defined(_AIX) || defined(__DragonFly__) - -int uv__nonblock(int fd, int set) { - int r; - - do - r = ioctl(fd, FIONBIO, &set); - while (r == -1 && errno == EINTR); - - if (r) - return -errno; - - return 0; -} - - -int uv__cloexec(int fd, int set) { - int r; - - do - r = ioctl(fd, set ? FIOCLEX : FIONCLEX); - while (r == -1 && errno == EINTR); - - if (r) - return -errno; - - return 0; -} - -#else /* !(defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__) || \ - defined(_AIX) || defined(__DragonFly__)) */ - -int uv__nonblock(int fd, int set) { - int flags; - int r; - - do - r = fcntl(fd, F_GETFL); - while (r == -1 && errno == EINTR); - - if (r == -1) - return -errno; - - /* Bail out now if already set/clear. */ - if (!!(r & O_NONBLOCK) == !!set) - return 0; - - if (set) - flags = r | O_NONBLOCK; - else - flags = r & ~O_NONBLOCK; - - do - r = fcntl(fd, F_SETFL, flags); - while (r == -1 && errno == EINTR); - - if (r) - return -errno; - - return 0; -} - - -int uv__cloexec(int fd, int set) { - int flags; - int r; - - do - r = fcntl(fd, F_GETFD); - while (r == -1 && errno == EINTR); - - if (r == -1) - return -errno; - - /* Bail out now if already set/clear. */ - if (!!(r & FD_CLOEXEC) == !!set) - return 0; - - if (set) - flags = r | FD_CLOEXEC; - else - flags = r & ~FD_CLOEXEC; - - do - r = fcntl(fd, F_SETFD, flags); - while (r == -1 && errno == EINTR); - - if (r) - return -errno; - - return 0; -} - -#endif /* defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__) || \ - defined(_AIX) || defined(__DragonFly__) */ - - -/* This function is not execve-safe, there is a race window - * between the call to dup() and fcntl(FD_CLOEXEC). - */ -int uv__dup(int fd) { - int err; - - fd = dup(fd); - - if (fd == -1) - return -errno; - - err = uv__cloexec(fd, 1); - if (err) { - uv__close(fd); - return err; - } - - return fd; -} - - -ssize_t uv__recvmsg(int fd, struct msghdr* msg, int flags) { - struct cmsghdr* cmsg; - ssize_t rc; - int* pfd; - int* end; -#if defined(__linux__) - static int no_msg_cmsg_cloexec; - if (no_msg_cmsg_cloexec == 0) { - rc = recvmsg(fd, msg, flags | 0x40000000); /* MSG_CMSG_CLOEXEC */ - if (rc != -1) - return rc; - if (errno != EINVAL) - return -errno; - rc = recvmsg(fd, msg, flags); - if (rc == -1) - return -errno; - no_msg_cmsg_cloexec = 1; - } else { - rc = recvmsg(fd, msg, flags); - } -#else - rc = recvmsg(fd, msg, flags); -#endif - if (rc == -1) - return -errno; - if (msg->msg_controllen == 0) - return rc; - for (cmsg = CMSG_FIRSTHDR(msg); cmsg != NULL; cmsg = CMSG_NXTHDR(msg, cmsg)) - if (cmsg->cmsg_type == SCM_RIGHTS) - for (pfd = (int*) CMSG_DATA(cmsg), - end = (int*) ((char*) cmsg + cmsg->cmsg_len); - pfd < end; - pfd += 1) - uv__cloexec(*pfd, 1); - return rc; -} - - -int uv_cwd(char* buffer, size_t* size) { - if (buffer == NULL || size == NULL) - return -EINVAL; - - if (getcwd(buffer, *size) == NULL) - return -errno; - - *size = strlen(buffer); - if (*size > 1 && buffer[*size - 1] == '/') { - buffer[*size-1] = '\0'; - (*size)--; - } - - return 0; -} - - -int uv_chdir(const char* dir) { - if (chdir(dir)) - return -errno; - - return 0; -} - - -void uv_disable_stdio_inheritance(void) { - int fd; - - /* Set the CLOEXEC flag on all open descriptors. Unconditionally try the - * first 16 file descriptors. After that, bail out after the first error. - */ - for (fd = 0; ; fd++) - if (uv__cloexec(fd, 1) && fd > 15) - break; -} - - -int uv_fileno(const uv_handle_t* handle, uv_os_fd_t* fd) { - int fd_out; - - switch (handle->type) { - case UV_TCP: - case UV_NAMED_PIPE: - case UV_TTY: - fd_out = uv__stream_fd((uv_stream_t*) handle); - break; - - case UV_UDP: - fd_out = ((uv_udp_t *) handle)->io_watcher.fd; - break; - - case UV_POLL: - fd_out = ((uv_poll_t *) handle)->io_watcher.fd; - break; - - default: - return -EINVAL; - } - - if (uv__is_closing(handle) || fd_out == -1) - return -EBADF; - - *fd = fd_out; - return 0; -} - - -static int uv__run_pending(uv_loop_t* loop) { - QUEUE* q; - QUEUE pq; - uv__io_t* w; - - if (QUEUE_EMPTY(&loop->pending_queue)) - return 0; - - QUEUE_INIT(&pq); - q = QUEUE_HEAD(&loop->pending_queue); - QUEUE_SPLIT(&loop->pending_queue, q, &pq); - - while (!QUEUE_EMPTY(&pq)) { - q = QUEUE_HEAD(&pq); - QUEUE_REMOVE(q); - QUEUE_INIT(q); - w = QUEUE_DATA(q, uv__io_t, pending_queue); - w->cb(loop, w, UV__POLLOUT); - } - - return 1; -} - - -static unsigned int next_power_of_two(unsigned int val) { - val -= 1; - val |= val >> 1; - val |= val >> 2; - val |= val >> 4; - val |= val >> 8; - val |= val >> 16; - val += 1; - return val; -} - -static void maybe_resize(uv_loop_t* loop, unsigned int len) { - uv__io_t** watchers; - void* fake_watcher_list; - void* fake_watcher_count; - unsigned int nwatchers; - unsigned int i; - - if (len <= loop->nwatchers) - return; - - /* Preserve fake watcher list and count at the end of the watchers */ - if (loop->watchers != NULL) { - fake_watcher_list = loop->watchers[loop->nwatchers]; - fake_watcher_count = loop->watchers[loop->nwatchers + 1]; - } else { - fake_watcher_list = NULL; - fake_watcher_count = NULL; - } - - nwatchers = next_power_of_two(len + 2) - 2; - watchers = uv__realloc(loop->watchers, - (nwatchers + 2) * sizeof(loop->watchers[0])); - - if (watchers == NULL) - abort(); - for (i = loop->nwatchers; i < nwatchers; i++) - watchers[i] = NULL; - watchers[nwatchers] = fake_watcher_list; - watchers[nwatchers + 1] = fake_watcher_count; - - loop->watchers = watchers; - loop->nwatchers = nwatchers; -} - - -void uv__io_init(uv__io_t* w, uv__io_cb cb, int fd) { - assert(cb != NULL); - assert(fd >= -1); - QUEUE_INIT(&w->pending_queue); - QUEUE_INIT(&w->watcher_queue); - w->cb = cb; - w->fd = fd; - w->events = 0; - w->pevents = 0; - -#if defined(UV_HAVE_KQUEUE) - w->rcount = 0; - w->wcount = 0; -#endif /* defined(UV_HAVE_KQUEUE) */ -} - - -void uv__io_start(uv_loop_t* loop, uv__io_t* w, unsigned int events) { - assert(0 == (events & ~(UV__POLLIN | UV__POLLOUT))); - assert(0 != events); - assert(w->fd >= 0); - assert(w->fd < INT_MAX); - - w->pevents |= events; - maybe_resize(loop, w->fd + 1); - -#if !defined(__sun) - /* The event ports backend needs to rearm all file descriptors on each and - * every tick of the event loop but the other backends allow us to - * short-circuit here if the event mask is unchanged. - */ - if (w->events == w->pevents) { - if (w->events == 0 && !QUEUE_EMPTY(&w->watcher_queue)) { - QUEUE_REMOVE(&w->watcher_queue); - QUEUE_INIT(&w->watcher_queue); - } - return; - } -#endif - - if (QUEUE_EMPTY(&w->watcher_queue)) - QUEUE_INSERT_TAIL(&loop->watcher_queue, &w->watcher_queue); - - if (loop->watchers[w->fd] == NULL) { - loop->watchers[w->fd] = w; - loop->nfds++; - } -} - - -void uv__io_stop(uv_loop_t* loop, uv__io_t* w, unsigned int events) { - assert(0 == (events & ~(UV__POLLIN | UV__POLLOUT))); - assert(0 != events); - - if (w->fd == -1) - return; - - assert(w->fd >= 0); - - /* Happens when uv__io_stop() is called on a handle that was never started. */ - if ((unsigned) w->fd >= loop->nwatchers) - return; - - w->pevents &= ~events; - - if (w->pevents == 0) { - QUEUE_REMOVE(&w->watcher_queue); - QUEUE_INIT(&w->watcher_queue); - - if (loop->watchers[w->fd] != NULL) { - assert(loop->watchers[w->fd] == w); - assert(loop->nfds > 0); - loop->watchers[w->fd] = NULL; - loop->nfds--; - w->events = 0; - } - } - else if (QUEUE_EMPTY(&w->watcher_queue)) - QUEUE_INSERT_TAIL(&loop->watcher_queue, &w->watcher_queue); -} - - -void uv__io_close(uv_loop_t* loop, uv__io_t* w) { - uv__io_stop(loop, w, UV__POLLIN | UV__POLLOUT); - QUEUE_REMOVE(&w->pending_queue); - - /* Remove stale events for this file descriptor */ - uv__platform_invalidate_fd(loop, w->fd); -} - - -void uv__io_feed(uv_loop_t* loop, uv__io_t* w) { - if (QUEUE_EMPTY(&w->pending_queue)) - QUEUE_INSERT_TAIL(&loop->pending_queue, &w->pending_queue); -} - - -int uv__io_active(const uv__io_t* w, unsigned int events) { - assert(0 == (events & ~(UV__POLLIN | UV__POLLOUT))); - assert(0 != events); - return 0 != (w->pevents & events); -} - - -int uv_getrusage(uv_rusage_t* rusage) { - struct rusage usage; - - if (getrusage(RUSAGE_SELF, &usage)) - return -errno; - - rusage->ru_utime.tv_sec = usage.ru_utime.tv_sec; - rusage->ru_utime.tv_usec = usage.ru_utime.tv_usec; - - rusage->ru_stime.tv_sec = usage.ru_stime.tv_sec; - rusage->ru_stime.tv_usec = usage.ru_stime.tv_usec; - - rusage->ru_maxrss = usage.ru_maxrss; - rusage->ru_ixrss = usage.ru_ixrss; - rusage->ru_idrss = usage.ru_idrss; - rusage->ru_isrss = usage.ru_isrss; - rusage->ru_minflt = usage.ru_minflt; - rusage->ru_majflt = usage.ru_majflt; - rusage->ru_nswap = usage.ru_nswap; - rusage->ru_inblock = usage.ru_inblock; - rusage->ru_oublock = usage.ru_oublock; - rusage->ru_msgsnd = usage.ru_msgsnd; - rusage->ru_msgrcv = usage.ru_msgrcv; - rusage->ru_nsignals = usage.ru_nsignals; - rusage->ru_nvcsw = usage.ru_nvcsw; - rusage->ru_nivcsw = usage.ru_nivcsw; - - return 0; -} - - -int uv__open_cloexec(const char* path, int flags) { - int err; - int fd; - -#if defined(__linux__) || (defined(__FreeBSD__) && __FreeBSD__ >= 9) || \ - defined(__DragonFly__) - static int no_cloexec; - - if (!no_cloexec) { - fd = open(path, flags | UV__O_CLOEXEC); - if (fd != -1) - return fd; - - if (errno != EINVAL) - return -errno; - - /* O_CLOEXEC not supported. */ - no_cloexec = 1; - } -#endif - - fd = open(path, flags); - if (fd == -1) - return -errno; - - err = uv__cloexec(fd, 1); - if (err) { - uv__close(fd); - return err; - } - - return fd; -} - - -int uv__dup2_cloexec(int oldfd, int newfd) { - int r; -#if defined(__FreeBSD__) && __FreeBSD__ >= 10 - do - r = dup3(oldfd, newfd, O_CLOEXEC); - while (r == -1 && errno == EINTR); - if (r == -1) - return -errno; - return r; -#elif defined(__FreeBSD__) && defined(F_DUP2FD_CLOEXEC) - do - r = fcntl(oldfd, F_DUP2FD_CLOEXEC, newfd); - while (r == -1 && errno == EINTR); - if (r != -1) - return r; - if (errno != EINVAL) - return -errno; - /* Fall through. */ -#elif defined(__linux__) - static int no_dup3; - if (!no_dup3) { - do - r = uv__dup3(oldfd, newfd, UV__O_CLOEXEC); - while (r == -1 && (errno == EINTR || errno == EBUSY)); - if (r != -1) - return r; - if (errno != ENOSYS) - return -errno; - /* Fall through. */ - no_dup3 = 1; - } -#endif - { - int err; - do - r = dup2(oldfd, newfd); -#if defined(__linux__) - while (r == -1 && (errno == EINTR || errno == EBUSY)); -#else - while (r == -1 && errno == EINTR); -#endif - - if (r == -1) - return -errno; - - err = uv__cloexec(newfd, 1); - if (err) { - uv__close(newfd); - return err; - } - - return r; - } -} - - -int uv_os_homedir(char* buffer, size_t* size) { - struct passwd pw; - struct passwd* result; - char* buf; - uid_t uid; - size_t bufsize; - size_t len; - long initsize; - int r; - - if (buffer == NULL || size == NULL || *size == 0) - return -EINVAL; - - /* Check if the HOME environment variable is set first */ - buf = getenv("HOME"); - - if (buf != NULL) { - len = strlen(buf); - - if (len >= *size) { - *size = len; - return -ENOBUFS; - } - - memcpy(buffer, buf, len + 1); - *size = len; - - return 0; - } - - /* HOME is not set, so call getpwuid() */ - initsize = sysconf(_SC_GETPW_R_SIZE_MAX); - - if (initsize <= 0) - bufsize = 4096; - else - bufsize = (size_t) initsize; - - uid = getuid(); - buf = NULL; - - for (;;) { - uv__free(buf); - buf = uv__malloc(bufsize); - - if (buf == NULL) - return -ENOMEM; - - r = getpwuid_r(uid, &pw, buf, bufsize, &result); - - if (r != ERANGE) - break; - - bufsize *= 2; - } - - if (r != 0) { - uv__free(buf); - return -r; - } - - if (result == NULL) { - uv__free(buf); - return -ENOENT; - } - - len = strlen(pw.pw_dir); - - if (len >= *size) { - *size = len; - uv__free(buf); - return -ENOBUFS; - } - - memcpy(buffer, pw.pw_dir, len + 1); - *size = len; - uv__free(buf); - - return 0; -} diff --git a/outside/libuv-v1.7.5/src/unix/darwin-proctitle.c b/outside/libuv-v1.7.5/src/unix/darwin-proctitle.c deleted file mode 100644 index 114231160..000000000 --- a/outside/libuv-v1.7.5/src/unix/darwin-proctitle.c +++ /dev/null @@ -1,206 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * 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. - */ - -#include -#include -#include -#include - -#include - -#if !TARGET_OS_IPHONE -# include -# include -#endif - - -static int uv__pthread_setname_np(const char* name) { - int (*dynamic_pthread_setname_np)(const char* name); - char namebuf[64]; /* MAXTHREADNAMESIZE */ - int err; - - /* pthread_setname_np() first appeared in OS X 10.6 and iOS 3.2. */ - *(void **)(&dynamic_pthread_setname_np) = - dlsym(RTLD_DEFAULT, "pthread_setname_np"); - - if (dynamic_pthread_setname_np == NULL) - return -ENOSYS; - - strncpy(namebuf, name, sizeof(namebuf) - 1); - namebuf[sizeof(namebuf) - 1] = '\0'; - - err = dynamic_pthread_setname_np(namebuf); - if (err) - return -err; - - return 0; -} - - -int uv__set_process_title(const char* title) { -#if TARGET_OS_IPHONE - return uv__pthread_setname_np(title); -#else - CFStringRef (*pCFStringCreateWithCString)(CFAllocatorRef, - const char*, - CFStringEncoding); - CFBundleRef (*pCFBundleGetBundleWithIdentifier)(CFStringRef); - void *(*pCFBundleGetDataPointerForName)(CFBundleRef, CFStringRef); - void *(*pCFBundleGetFunctionPointerForName)(CFBundleRef, CFStringRef); - CFTypeRef (*pLSGetCurrentApplicationASN)(void); - OSStatus (*pLSSetApplicationInformationItem)(int, - CFTypeRef, - CFStringRef, - CFStringRef, - CFDictionaryRef*); - void* application_services_handle; - void* core_foundation_handle; - CFBundleRef launch_services_bundle; - CFStringRef* display_name_key; - CFDictionaryRef (*pCFBundleGetInfoDictionary)(CFBundleRef); - CFBundleRef (*pCFBundleGetMainBundle)(void); - CFBundleRef hi_services_bundle; - OSStatus (*pSetApplicationIsDaemon)(int); - CFDictionaryRef (*pLSApplicationCheckIn)(int, CFDictionaryRef); - void (*pLSSetApplicationLaunchServicesServerConnectionStatus)(uint64_t, - void*); - CFTypeRef asn; - int err; - - err = -ENOENT; - application_services_handle = dlopen("/System/Library/Frameworks/" - "ApplicationServices.framework/" - "Versions/A/ApplicationServices", - RTLD_LAZY | RTLD_LOCAL); - core_foundation_handle = dlopen("/System/Library/Frameworks/" - "CoreFoundation.framework/" - "Versions/A/CoreFoundation", - RTLD_LAZY | RTLD_LOCAL); - - if (application_services_handle == NULL || core_foundation_handle == NULL) - goto out; - - *(void **)(&pCFStringCreateWithCString) = - dlsym(core_foundation_handle, "CFStringCreateWithCString"); - *(void **)(&pCFBundleGetBundleWithIdentifier) = - dlsym(core_foundation_handle, "CFBundleGetBundleWithIdentifier"); - *(void **)(&pCFBundleGetDataPointerForName) = - dlsym(core_foundation_handle, "CFBundleGetDataPointerForName"); - *(void **)(&pCFBundleGetFunctionPointerForName) = - dlsym(core_foundation_handle, "CFBundleGetFunctionPointerForName"); - - if (pCFStringCreateWithCString == NULL || - pCFBundleGetBundleWithIdentifier == NULL || - pCFBundleGetDataPointerForName == NULL || - pCFBundleGetFunctionPointerForName == NULL) { - goto out; - } - -#define S(s) pCFStringCreateWithCString(NULL, (s), kCFStringEncodingUTF8) - - launch_services_bundle = - pCFBundleGetBundleWithIdentifier(S("com.apple.LaunchServices")); - - if (launch_services_bundle == NULL) - goto out; - - *(void **)(&pLSGetCurrentApplicationASN) = - pCFBundleGetFunctionPointerForName(launch_services_bundle, - S("_LSGetCurrentApplicationASN")); - - if (pLSGetCurrentApplicationASN == NULL) - goto out; - - *(void **)(&pLSSetApplicationInformationItem) = - pCFBundleGetFunctionPointerForName(launch_services_bundle, - S("_LSSetApplicationInformationItem")); - - if (pLSSetApplicationInformationItem == NULL) - goto out; - - display_name_key = pCFBundleGetDataPointerForName(launch_services_bundle, - S("_kLSDisplayNameKey")); - - if (display_name_key == NULL || *display_name_key == NULL) - goto out; - - *(void **)(&pCFBundleGetInfoDictionary) = dlsym(core_foundation_handle, - "CFBundleGetInfoDictionary"); - *(void **)(&pCFBundleGetMainBundle) = dlsym(core_foundation_handle, - "CFBundleGetMainBundle"); - if (pCFBundleGetInfoDictionary == NULL || pCFBundleGetMainBundle == NULL) - goto out; - - /* Black 10.9 magic, to remove (Not responding) mark in Activity Monitor */ - hi_services_bundle = - pCFBundleGetBundleWithIdentifier(S("com.apple.HIServices")); - err = -ENOENT; - if (hi_services_bundle == NULL) - goto out; - - *(void **)(&pSetApplicationIsDaemon) = pCFBundleGetFunctionPointerForName( - hi_services_bundle, - S("SetApplicationIsDaemon")); - *(void **)(&pLSApplicationCheckIn) = pCFBundleGetFunctionPointerForName( - launch_services_bundle, - S("_LSApplicationCheckIn")); - *(void **)(&pLSSetApplicationLaunchServicesServerConnectionStatus) = - pCFBundleGetFunctionPointerForName( - launch_services_bundle, - S("_LSSetApplicationLaunchServicesServerConnectionStatus")); - if (pSetApplicationIsDaemon == NULL || - pLSApplicationCheckIn == NULL || - pLSSetApplicationLaunchServicesServerConnectionStatus == NULL) { - goto out; - } - - if (pSetApplicationIsDaemon(1) != noErr) - goto out; - - pLSSetApplicationLaunchServicesServerConnectionStatus(0, NULL); - - /* Check into process manager?! */ - pLSApplicationCheckIn(-2, - pCFBundleGetInfoDictionary(pCFBundleGetMainBundle())); - - asn = pLSGetCurrentApplicationASN(); - - err = -EINVAL; - if (pLSSetApplicationInformationItem(-2, /* Magic value. */ - asn, - *display_name_key, - S(title), - NULL) != noErr) { - goto out; - } - - uv__pthread_setname_np(title); /* Don't care if it fails. */ - err = 0; - -out: - if (core_foundation_handle != NULL) - dlclose(core_foundation_handle); - - if (application_services_handle != NULL) - dlclose(application_services_handle); - - return err; -#endif /* !TARGET_OS_IPHONE */ -} diff --git a/outside/libuv-v1.7.5/src/unix/darwin.c b/outside/libuv-v1.7.5/src/unix/darwin.c deleted file mode 100644 index dab6ca999..000000000 --- a/outside/libuv-v1.7.5/src/unix/darwin.c +++ /dev/null @@ -1,333 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * 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. - */ - -#include "uv.h" -#include "internal.h" - -#include -#include -#include - -#include -#include -#include - -#include -#include -#include /* _NSGetExecutablePath */ -#include -#include -#include /* sysconf */ - - -int uv__platform_loop_init(uv_loop_t* loop) { - loop->cf_state = NULL; - - if (uv__kqueue_init(loop)) - return -errno; - - return 0; -} - - -void uv__platform_loop_delete(uv_loop_t* loop) { - uv__fsevents_loop_delete(loop); -} - - -uint64_t uv__hrtime(uv_clocktype_t type) { - static mach_timebase_info_data_t info; - - if ((ACCESS_ONCE(uint32_t, info.numer) == 0 || - ACCESS_ONCE(uint32_t, info.denom) == 0) && - mach_timebase_info(&info) != KERN_SUCCESS) - abort(); - - return mach_absolute_time() * info.numer / info.denom; -} - - -int uv_exepath(char* buffer, size_t* size) { - /* realpath(exepath) may be > PATH_MAX so double it to be on the safe side. */ - char abspath[PATH_MAX * 2 + 1]; - char exepath[PATH_MAX + 1]; - uint32_t exepath_size; - size_t abspath_size; - - if (buffer == NULL || size == NULL || *size == 0) - return -EINVAL; - - exepath_size = sizeof(exepath); - if (_NSGetExecutablePath(exepath, &exepath_size)) - return -EIO; - - if (realpath(exepath, abspath) != abspath) - return -errno; - - abspath_size = strlen(abspath); - if (abspath_size == 0) - return -EIO; - - *size -= 1; - if (*size > abspath_size) - *size = abspath_size; - - memcpy(buffer, abspath, *size); - buffer[*size] = '\0'; - - return 0; -} - - -uint64_t uv_get_free_memory(void) { - vm_statistics_data_t info; - mach_msg_type_number_t count = sizeof(info) / sizeof(integer_t); - - if (host_statistics(mach_host_self(), HOST_VM_INFO, - (host_info_t)&info, &count) != KERN_SUCCESS) { - return -EINVAL; /* FIXME(bnoordhuis) Translate error. */ - } - - return (uint64_t) info.free_count * sysconf(_SC_PAGESIZE); -} - - -uint64_t uv_get_total_memory(void) { - uint64_t info; - int which[] = {CTL_HW, HW_MEMSIZE}; - size_t size = sizeof(info); - - if (sysctl(which, 2, &info, &size, NULL, 0)) - return -errno; - - return (uint64_t) info; -} - - -void uv_loadavg(double avg[3]) { - struct loadavg info; - size_t size = sizeof(info); - int which[] = {CTL_VM, VM_LOADAVG}; - - if (sysctl(which, 2, &info, &size, NULL, 0) < 0) return; - - avg[0] = (double) info.ldavg[0] / info.fscale; - avg[1] = (double) info.ldavg[1] / info.fscale; - avg[2] = (double) info.ldavg[2] / info.fscale; -} - - -int uv_resident_set_memory(size_t* rss) { - mach_msg_type_number_t count; - task_basic_info_data_t info; - kern_return_t err; - - count = TASK_BASIC_INFO_COUNT; - err = task_info(mach_task_self(), - TASK_BASIC_INFO, - (task_info_t) &info, - &count); - (void) &err; - /* task_info(TASK_BASIC_INFO) cannot really fail. Anything other than - * KERN_SUCCESS implies a libuv bug. - */ - assert(err == KERN_SUCCESS); - *rss = info.resident_size; - - return 0; -} - - -int uv_uptime(double* uptime) { - time_t now; - struct timeval info; - size_t size = sizeof(info); - static int which[] = {CTL_KERN, KERN_BOOTTIME}; - - if (sysctl(which, 2, &info, &size, NULL, 0)) - return -errno; - - now = time(NULL); - *uptime = now - info.tv_sec; - - return 0; -} - -int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count) { - unsigned int ticks = (unsigned int)sysconf(_SC_CLK_TCK), - multiplier = ((uint64_t)1000L / ticks); - char model[512]; - uint64_t cpuspeed; - size_t size; - unsigned int i; - natural_t numcpus; - mach_msg_type_number_t msg_type; - processor_cpu_load_info_data_t *info; - uv_cpu_info_t* cpu_info; - - size = sizeof(model); - if (sysctlbyname("machdep.cpu.brand_string", &model, &size, NULL, 0) && - sysctlbyname("hw.model", &model, &size, NULL, 0)) { - return -errno; - } - - size = sizeof(cpuspeed); - if (sysctlbyname("hw.cpufrequency", &cpuspeed, &size, NULL, 0)) - return -errno; - - if (host_processor_info(mach_host_self(), PROCESSOR_CPU_LOAD_INFO, &numcpus, - (processor_info_array_t*)&info, - &msg_type) != KERN_SUCCESS) { - return -EINVAL; /* FIXME(bnoordhuis) Translate error. */ - } - - *cpu_infos = uv__malloc(numcpus * sizeof(**cpu_infos)); - if (!(*cpu_infos)) { - vm_deallocate(mach_task_self(), (vm_address_t)info, msg_type); - return -ENOMEM; - } - - *count = numcpus; - - for (i = 0; i < numcpus; i++) { - cpu_info = &(*cpu_infos)[i]; - - cpu_info->cpu_times.user = (uint64_t)(info[i].cpu_ticks[0]) * multiplier; - cpu_info->cpu_times.nice = (uint64_t)(info[i].cpu_ticks[3]) * multiplier; - cpu_info->cpu_times.sys = (uint64_t)(info[i].cpu_ticks[1]) * multiplier; - cpu_info->cpu_times.idle = (uint64_t)(info[i].cpu_ticks[2]) * multiplier; - cpu_info->cpu_times.irq = 0; - - cpu_info->model = uv__strdup(model); - cpu_info->speed = cpuspeed/1000000; - } - vm_deallocate(mach_task_self(), (vm_address_t)info, msg_type); - - return 0; -} - - -void uv_free_cpu_info(uv_cpu_info_t* cpu_infos, int count) { - int i; - - for (i = 0; i < count; i++) { - uv__free(cpu_infos[i].model); - } - - uv__free(cpu_infos); -} - - -int uv_interface_addresses(uv_interface_address_t** addresses, int* count) { - struct ifaddrs *addrs, *ent; - uv_interface_address_t* address; - int i; - struct sockaddr_dl *sa_addr; - - if (getifaddrs(&addrs)) - return -errno; - - *count = 0; - - /* Count the number of interfaces */ - for (ent = addrs; ent != NULL; ent = ent->ifa_next) { - if (!((ent->ifa_flags & IFF_UP) && (ent->ifa_flags & IFF_RUNNING)) || - (ent->ifa_addr == NULL) || - (ent->ifa_addr->sa_family == AF_LINK)) { - continue; - } - - (*count)++; - } - - *addresses = uv__malloc(*count * sizeof(**addresses)); - if (!(*addresses)) - return -ENOMEM; - - address = *addresses; - - for (ent = addrs; ent != NULL; ent = ent->ifa_next) { - if (!((ent->ifa_flags & IFF_UP) && (ent->ifa_flags & IFF_RUNNING))) - continue; - - if (ent->ifa_addr == NULL) - continue; - - /* - * On Mac OS X getifaddrs returns information related to Mac Addresses for - * various devices, such as firewire, etc. These are not relevant here. - */ - if (ent->ifa_addr->sa_family == AF_LINK) - continue; - - address->name = uv__strdup(ent->ifa_name); - - if (ent->ifa_addr->sa_family == AF_INET6) { - address->address.address6 = *((struct sockaddr_in6*) ent->ifa_addr); - } else { - address->address.address4 = *((struct sockaddr_in*) ent->ifa_addr); - } - - if (ent->ifa_netmask->sa_family == AF_INET6) { - address->netmask.netmask6 = *((struct sockaddr_in6*) ent->ifa_netmask); - } else { - address->netmask.netmask4 = *((struct sockaddr_in*) ent->ifa_netmask); - } - - address->is_internal = !!(ent->ifa_flags & IFF_LOOPBACK); - - address++; - } - - /* Fill in physical addresses for each interface */ - for (ent = addrs; ent != NULL; ent = ent->ifa_next) { - if (!((ent->ifa_flags & IFF_UP) && (ent->ifa_flags & IFF_RUNNING)) || - (ent->ifa_addr == NULL) || - (ent->ifa_addr->sa_family != AF_LINK)) { - continue; - } - - address = *addresses; - - for (i = 0; i < (*count); i++) { - if (strcmp(address->name, ent->ifa_name) == 0) { - sa_addr = (struct sockaddr_dl*)(ent->ifa_addr); - memcpy(address->phys_addr, LLADDR(sa_addr), sizeof(address->phys_addr)); - } - address++; - } - } - - freeifaddrs(addrs); - - return 0; -} - - -void uv_free_interface_addresses(uv_interface_address_t* addresses, - int count) { - int i; - - for (i = 0; i < count; i++) { - uv__free(addresses[i].name); - } - - uv__free(addresses); -} diff --git a/outside/libuv-v1.7.5/src/unix/dl.c b/outside/libuv-v1.7.5/src/unix/dl.c deleted file mode 100644 index 7c6d41c96..000000000 --- a/outside/libuv-v1.7.5/src/unix/dl.c +++ /dev/null @@ -1,83 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "internal.h" - -#include -#include -#include -#include - -static int uv__dlerror(uv_lib_t* lib); - - -int uv_dlopen(const char* filename, uv_lib_t* lib) { - dlerror(); /* Reset error status. */ - lib->errmsg = NULL; - lib->handle = dlopen(filename, RTLD_LAZY); - return lib->handle ? 0 : uv__dlerror(lib); -} - - -void uv_dlclose(uv_lib_t* lib) { - if (lib->errmsg) { - uv__free(lib->errmsg); - lib->errmsg = NULL; - } - - if (lib->handle) { - /* Ignore errors. No good way to signal them without leaking memory. */ - dlclose(lib->handle); - lib->handle = NULL; - } -} - - -int uv_dlsym(uv_lib_t* lib, const char* name, void** ptr) { - dlerror(); /* Reset error status. */ - *ptr = dlsym(lib->handle, name); - return uv__dlerror(lib); -} - - -const char* uv_dlerror(const uv_lib_t* lib) { - return lib->errmsg ? lib->errmsg : "no error"; -} - - -static int uv__dlerror(uv_lib_t* lib) { - const char* errmsg; - - if (lib->errmsg) - uv__free(lib->errmsg); - - errmsg = dlerror(); - - if (errmsg) { - lib->errmsg = uv__strdup(errmsg); - return -1; - } - else { - lib->errmsg = NULL; - return 0; - } -} diff --git a/outside/libuv-v1.7.5/src/unix/freebsd.c b/outside/libuv-v1.7.5/src/unix/freebsd.c deleted file mode 100644 index c69608b13..000000000 --- a/outside/libuv-v1.7.5/src/unix/freebsd.c +++ /dev/null @@ -1,448 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * 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. - */ - -#include "uv.h" -#include "internal.h" - -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include /* VM_LOADAVG */ -#include -#include -#include /* sysconf */ -#include - -#undef NANOSEC -#define NANOSEC ((uint64_t) 1e9) - -#ifndef CPUSTATES -# define CPUSTATES 5U -#endif -#ifndef CP_USER -# define CP_USER 0 -# define CP_NICE 1 -# define CP_SYS 2 -# define CP_IDLE 3 -# define CP_INTR 4 -#endif - -static char *process_title; - - -int uv__platform_loop_init(uv_loop_t* loop) { - return uv__kqueue_init(loop); -} - - -void uv__platform_loop_delete(uv_loop_t* loop) { -} - - -uint64_t uv__hrtime(uv_clocktype_t type) { - struct timespec ts; - clock_gettime(CLOCK_MONOTONIC, &ts); - return (((uint64_t) ts.tv_sec) * NANOSEC + ts.tv_nsec); -} - - -#ifdef __DragonFly__ -int uv_exepath(char* buffer, size_t* size) { - char abspath[PATH_MAX * 2 + 1]; - ssize_t abspath_size; - - if (buffer == NULL || size == NULL || *size == 0) - return -EINVAL; - - abspath_size = readlink("/proc/curproc/file", abspath, sizeof(abspath)); - if (abspath_size < 0) - return -errno; - - assert(abspath_size > 0); - *size -= 1; - - if (*size > abspath_size) - *size = abspath_size; - - memcpy(buffer, abspath, *size); - buffer[*size] = '\0'; - - return 0; -} -#else -int uv_exepath(char* buffer, size_t* size) { - char abspath[PATH_MAX * 2 + 1]; - int mib[4]; - size_t abspath_size; - - if (buffer == NULL || size == NULL || *size == 0) - return -EINVAL; - - mib[0] = CTL_KERN; - mib[1] = KERN_PROC; - mib[2] = KERN_PROC_PATHNAME; - mib[3] = -1; - - abspath_size = sizeof abspath; - if (sysctl(mib, 4, abspath, &abspath_size, NULL, 0)) - return -errno; - - assert(abspath_size > 0); - abspath_size -= 1; - *size -= 1; - - if (*size > abspath_size) - *size = abspath_size; - - memcpy(buffer, abspath, *size); - buffer[*size] = '\0'; - - return 0; -} -#endif - -uint64_t uv_get_free_memory(void) { - int freecount; - size_t size = sizeof(freecount); - - if (sysctlbyname("vm.stats.vm.v_free_count", &freecount, &size, NULL, 0)) - return -errno; - - return (uint64_t) freecount * sysconf(_SC_PAGESIZE); - -} - - -uint64_t uv_get_total_memory(void) { - unsigned long info; - int which[] = {CTL_HW, HW_PHYSMEM}; - - size_t size = sizeof(info); - - if (sysctl(which, 2, &info, &size, NULL, 0)) - return -errno; - - return (uint64_t) info; -} - - -void uv_loadavg(double avg[3]) { - struct loadavg info; - size_t size = sizeof(info); - int which[] = {CTL_VM, VM_LOADAVG}; - - if (sysctl(which, 2, &info, &size, NULL, 0) < 0) return; - - avg[0] = (double) info.ldavg[0] / info.fscale; - avg[1] = (double) info.ldavg[1] / info.fscale; - avg[2] = (double) info.ldavg[2] / info.fscale; -} - - -char** uv_setup_args(int argc, char** argv) { - process_title = argc ? uv__strdup(argv[0]) : NULL; - return argv; -} - - -int uv_set_process_title(const char* title) { - int oid[4]; - - if (process_title) uv__free(process_title); - process_title = uv__strdup(title); - - oid[0] = CTL_KERN; - oid[1] = KERN_PROC; - oid[2] = KERN_PROC_ARGS; - oid[3] = getpid(); - - sysctl(oid, - ARRAY_SIZE(oid), - NULL, - NULL, - process_title, - strlen(process_title) + 1); - - return 0; -} - - -int uv_get_process_title(char* buffer, size_t size) { - if (process_title) { - strncpy(buffer, process_title, size); - } else { - if (size > 0) { - buffer[0] = '\0'; - } - } - - return 0; -} - - -int uv_resident_set_memory(size_t* rss) { - kvm_t *kd = NULL; - struct kinfo_proc *kinfo = NULL; - pid_t pid; - int nprocs; - size_t page_size = getpagesize(); - - pid = getpid(); - - kd = kvm_open(NULL, _PATH_DEVNULL, NULL, O_RDONLY, "kvm_open"); - if (kd == NULL) goto error; - - kinfo = kvm_getprocs(kd, KERN_PROC_PID, pid, &nprocs); - if (kinfo == NULL) goto error; - -#ifdef __DragonFly__ - *rss = kinfo->kp_vm_rssize * page_size; -#else - *rss = kinfo->ki_rssize * page_size; -#endif - - kvm_close(kd); - - return 0; - -error: - if (kd) kvm_close(kd); - return -EPERM; -} - - -int uv_uptime(double* uptime) { - int r; - struct timespec sp; - r = clock_gettime(CLOCK_MONOTONIC, &sp); - if (r) - return -errno; - - *uptime = sp.tv_sec; - return 0; -} - - -int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count) { - unsigned int ticks = (unsigned int)sysconf(_SC_CLK_TCK), - multiplier = ((uint64_t)1000L / ticks), cpuspeed, maxcpus, - cur = 0; - uv_cpu_info_t* cpu_info; - const char* maxcpus_key; - const char* cptimes_key; - char model[512]; - long* cp_times; - int numcpus; - size_t size; - int i; - -#if defined(__DragonFly__) - /* This is not quite correct but DragonFlyBSD doesn't seem to have anything - * comparable to kern.smp.maxcpus or kern.cp_times (kern.cp_time is a total, - * not per CPU). At least this stops uv_cpu_info() from failing completely. - */ - maxcpus_key = "hw.ncpu"; - cptimes_key = "kern.cp_time"; -#else - maxcpus_key = "kern.smp.maxcpus"; - cptimes_key = "kern.cp_times"; -#endif - - size = sizeof(model); - if (sysctlbyname("hw.model", &model, &size, NULL, 0)) - return -errno; - - size = sizeof(numcpus); - if (sysctlbyname("hw.ncpu", &numcpus, &size, NULL, 0)) - return -errno; - - *cpu_infos = uv__malloc(numcpus * sizeof(**cpu_infos)); - if (!(*cpu_infos)) - return -ENOMEM; - - *count = numcpus; - - size = sizeof(cpuspeed); - if (sysctlbyname("hw.clockrate", &cpuspeed, &size, NULL, 0)) { - SAVE_ERRNO(uv__free(*cpu_infos)); - return -errno; - } - - /* kern.cp_times on FreeBSD i386 gives an array up to maxcpus instead of - * ncpu. - */ - size = sizeof(maxcpus); - if (sysctlbyname(maxcpus_key, &maxcpus, &size, NULL, 0)) { - SAVE_ERRNO(uv__free(*cpu_infos)); - return -errno; - } - - size = maxcpus * CPUSTATES * sizeof(long); - - cp_times = uv__malloc(size); - if (cp_times == NULL) { - uv__free(*cpu_infos); - return -ENOMEM; - } - - if (sysctlbyname(cptimes_key, cp_times, &size, NULL, 0)) { - SAVE_ERRNO(uv__free(cp_times)); - SAVE_ERRNO(uv__free(*cpu_infos)); - return -errno; - } - - for (i = 0; i < numcpus; i++) { - cpu_info = &(*cpu_infos)[i]; - - cpu_info->cpu_times.user = (uint64_t)(cp_times[CP_USER+cur]) * multiplier; - cpu_info->cpu_times.nice = (uint64_t)(cp_times[CP_NICE+cur]) * multiplier; - cpu_info->cpu_times.sys = (uint64_t)(cp_times[CP_SYS+cur]) * multiplier; - cpu_info->cpu_times.idle = (uint64_t)(cp_times[CP_IDLE+cur]) * multiplier; - cpu_info->cpu_times.irq = (uint64_t)(cp_times[CP_INTR+cur]) * multiplier; - - cpu_info->model = uv__strdup(model); - cpu_info->speed = cpuspeed; - - cur+=CPUSTATES; - } - - uv__free(cp_times); - return 0; -} - - -void uv_free_cpu_info(uv_cpu_info_t* cpu_infos, int count) { - int i; - - for (i = 0; i < count; i++) { - uv__free(cpu_infos[i].model); - } - - uv__free(cpu_infos); -} - - -int uv_interface_addresses(uv_interface_address_t** addresses, int* count) { - struct ifaddrs *addrs, *ent; - uv_interface_address_t* address; - int i; - struct sockaddr_dl *sa_addr; - - if (getifaddrs(&addrs)) - return -errno; - - *count = 0; - - /* Count the number of interfaces */ - for (ent = addrs; ent != NULL; ent = ent->ifa_next) { - if (!((ent->ifa_flags & IFF_UP) && (ent->ifa_flags & IFF_RUNNING)) || - (ent->ifa_addr == NULL) || - (ent->ifa_addr->sa_family == AF_LINK)) { - continue; - } - - (*count)++; - } - - *addresses = uv__malloc(*count * sizeof(**addresses)); - if (!(*addresses)) - return -ENOMEM; - - address = *addresses; - - for (ent = addrs; ent != NULL; ent = ent->ifa_next) { - if (!((ent->ifa_flags & IFF_UP) && (ent->ifa_flags & IFF_RUNNING))) - continue; - - if (ent->ifa_addr == NULL) - continue; - - /* - * On FreeBSD getifaddrs returns information related to the raw underlying - * devices. We're not interested in this information yet. - */ - if (ent->ifa_addr->sa_family == AF_LINK) - continue; - - address->name = uv__strdup(ent->ifa_name); - - if (ent->ifa_addr->sa_family == AF_INET6) { - address->address.address6 = *((struct sockaddr_in6*) ent->ifa_addr); - } else { - address->address.address4 = *((struct sockaddr_in*) ent->ifa_addr); - } - - if (ent->ifa_netmask->sa_family == AF_INET6) { - address->netmask.netmask6 = *((struct sockaddr_in6*) ent->ifa_netmask); - } else { - address->netmask.netmask4 = *((struct sockaddr_in*) ent->ifa_netmask); - } - - address->is_internal = !!(ent->ifa_flags & IFF_LOOPBACK); - - address++; - } - - /* Fill in physical addresses for each interface */ - for (ent = addrs; ent != NULL; ent = ent->ifa_next) { - if (!((ent->ifa_flags & IFF_UP) && (ent->ifa_flags & IFF_RUNNING)) || - (ent->ifa_addr == NULL) || - (ent->ifa_addr->sa_family != AF_LINK)) { - continue; - } - - address = *addresses; - - for (i = 0; i < (*count); i++) { - if (strcmp(address->name, ent->ifa_name) == 0) { - sa_addr = (struct sockaddr_dl*)(ent->ifa_addr); - memcpy(address->phys_addr, LLADDR(sa_addr), sizeof(address->phys_addr)); - } - address++; - } - } - - freeifaddrs(addrs); - - return 0; -} - - -void uv_free_interface_addresses(uv_interface_address_t* addresses, - int count) { - int i; - - for (i = 0; i < count; i++) { - uv__free(addresses[i].name); - } - - uv__free(addresses); -} diff --git a/outside/libuv-v1.7.5/src/unix/fs.c b/outside/libuv-v1.7.5/src/unix/fs.c deleted file mode 100644 index d739c2825..000000000 --- a/outside/libuv-v1.7.5/src/unix/fs.c +++ /dev/null @@ -1,1255 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -/* Caveat emptor: this file deviates from the libuv convention of returning - * negated errno codes. Most uv_fs_*() functions map directly to the system - * call of the same name. For more complex wrappers, it's easier to just - * return -1 with errno set. The dispatcher in uv__fs_work() takes care of - * getting the errno to the right place (req->result or as the return value.) - */ - -#include "uv.h" -#include "internal.h" - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if defined(__DragonFly__) || \ - defined(__FreeBSD__) || \ - defined(__OpenBSD__) || \ - defined(__NetBSD__) -# define HAVE_PREADV 1 -#else -# define HAVE_PREADV 0 -#endif - -#if defined(__linux__) || defined(__sun) -# include -#endif - -#define INIT(subtype) \ - do { \ - req->type = UV_FS; \ - if (cb != NULL) \ - uv__req_init(loop, req, UV_FS); \ - req->fs_type = UV_FS_ ## subtype; \ - req->result = 0; \ - req->ptr = NULL; \ - req->loop = loop; \ - req->path = NULL; \ - req->new_path = NULL; \ - req->cb = cb; \ - } \ - while (0) - -#define PATH \ - do { \ - assert(path != NULL); \ - if (cb == NULL) { \ - req->path = path; \ - } else { \ - req->path = uv__strdup(path); \ - if (req->path == NULL) \ - return -ENOMEM; \ - } \ - } \ - while (0) - -#define PATH2 \ - do { \ - if (cb == NULL) { \ - req->path = path; \ - req->new_path = new_path; \ - } else { \ - size_t path_len; \ - size_t new_path_len; \ - path_len = strlen(path) + 1; \ - new_path_len = strlen(new_path) + 1; \ - req->path = uv__malloc(path_len + new_path_len); \ - if (req->path == NULL) \ - return -ENOMEM; \ - req->new_path = req->path + path_len; \ - memcpy((void*) req->path, path, path_len); \ - memcpy((void*) req->new_path, new_path, new_path_len); \ - } \ - } \ - while (0) - -#define POST \ - do { \ - if (cb != NULL) { \ - uv__work_submit(loop, &req->work_req, uv__fs_work, uv__fs_done); \ - return 0; \ - } \ - else { \ - uv__fs_work(&req->work_req); \ - return req->result; \ - } \ - } \ - while (0) - - -static ssize_t uv__fs_fdatasync(uv_fs_t* req) { -#if defined(__linux__) || defined(__sun) || defined(__NetBSD__) - return fdatasync(req->file); -#elif defined(__APPLE__) && defined(F_FULLFSYNC) - return fcntl(req->file, F_FULLFSYNC); -#else - return fsync(req->file); -#endif -} - - -static ssize_t uv__fs_futime(uv_fs_t* req) { -#if defined(__linux__) - /* utimesat() has nanosecond resolution but we stick to microseconds - * for the sake of consistency with other platforms. - */ - static int no_utimesat; - struct timespec ts[2]; - struct timeval tv[2]; - char path[sizeof("/proc/self/fd/") + 3 * sizeof(int)]; - int r; - - if (no_utimesat) - goto skip; - - ts[0].tv_sec = req->atime; - ts[0].tv_nsec = (unsigned long)(req->atime * 1000000) % 1000000 * 1000; - ts[1].tv_sec = req->mtime; - ts[1].tv_nsec = (unsigned long)(req->mtime * 1000000) % 1000000 * 1000; - - r = uv__utimesat(req->file, NULL, ts, 0); - if (r == 0) - return r; - - if (errno != ENOSYS) - return r; - - no_utimesat = 1; - -skip: - - tv[0].tv_sec = req->atime; - tv[0].tv_usec = (unsigned long)(req->atime * 1000000) % 1000000; - tv[1].tv_sec = req->mtime; - tv[1].tv_usec = (unsigned long)(req->mtime * 1000000) % 1000000; - snprintf(path, sizeof(path), "/proc/self/fd/%d", (int) req->file); - - r = utimes(path, tv); - if (r == 0) - return r; - - switch (errno) { - case ENOENT: - if (fcntl(req->file, F_GETFL) == -1 && errno == EBADF) - break; - /* Fall through. */ - - case EACCES: - case ENOTDIR: - errno = ENOSYS; - break; - } - - return r; - -#elif defined(__APPLE__) \ - || defined(__DragonFly__) \ - || defined(__FreeBSD__) \ - || defined(__NetBSD__) \ - || defined(__OpenBSD__) \ - || defined(__sun) - struct timeval tv[2]; - tv[0].tv_sec = req->atime; - tv[0].tv_usec = (unsigned long)(req->atime * 1000000) % 1000000; - tv[1].tv_sec = req->mtime; - tv[1].tv_usec = (unsigned long)(req->mtime * 1000000) % 1000000; -# if defined(__sun) - return futimesat(req->file, NULL, tv); -# else - return futimes(req->file, tv); -# endif -#else - errno = ENOSYS; - return -1; -#endif -} - - -static ssize_t uv__fs_mkdtemp(uv_fs_t* req) { - return mkdtemp((char*) req->path) ? 0 : -1; -} - - -static ssize_t uv__fs_open(uv_fs_t* req) { - static int no_cloexec_support; - int r; - - /* Try O_CLOEXEC before entering locks */ - if (no_cloexec_support == 0) { -#ifdef O_CLOEXEC - r = open(req->path, req->flags | O_CLOEXEC, req->mode); - if (r >= 0) - return r; - if (errno != EINVAL) - return r; - no_cloexec_support = 1; -#endif /* O_CLOEXEC */ - } - - if (req->cb != NULL) - uv_rwlock_rdlock(&req->loop->cloexec_lock); - - r = open(req->path, req->flags, req->mode); - - /* In case of failure `uv__cloexec` will leave error in `errno`, - * so it is enough to just set `r` to `-1`. - */ - if (r >= 0 && uv__cloexec(r, 1) != 0) { - r = uv__close(r); - if (r != 0 && r != -EINPROGRESS) - abort(); - r = -1; - } - - if (req->cb != NULL) - uv_rwlock_rdunlock(&req->loop->cloexec_lock); - - return r; -} - - -static ssize_t uv__fs_read(uv_fs_t* req) { -#if defined(__linux__) - static int no_preadv; -#endif - ssize_t result; - -#if defined(_AIX) - struct stat buf; - if(fstat(req->file, &buf)) - return -1; - if(S_ISDIR(buf.st_mode)) { - errno = EISDIR; - return -1; - } -#endif /* defined(_AIX) */ - if (req->off < 0) { - if (req->nbufs == 1) - result = read(req->file, req->bufs[0].base, req->bufs[0].len); - else - result = readv(req->file, (struct iovec*) req->bufs, req->nbufs); - } else { - if (req->nbufs == 1) { - result = pread(req->file, req->bufs[0].base, req->bufs[0].len, req->off); - goto done; - } - -#if HAVE_PREADV - result = preadv(req->file, (struct iovec*) req->bufs, req->nbufs, req->off); -#else -# if defined(__linux__) - if (no_preadv) retry: -# endif - { - off_t nread; - size_t index; - - nread = 0; - index = 0; - result = 1; - do { - if (req->bufs[index].len > 0) { - result = pread(req->file, - req->bufs[index].base, - req->bufs[index].len, - req->off + nread); - if (result > 0) - nread += result; - } - index++; - } while (index < req->nbufs && result > 0); - if (nread > 0) - result = nread; - } -# if defined(__linux__) - else { - result = uv__preadv(req->file, - (struct iovec*)req->bufs, - req->nbufs, - req->off); - if (result == -1 && errno == ENOSYS) { - no_preadv = 1; - goto retry; - } - } -# endif -#endif - } - -done: - return result; -} - - -#if defined(__OpenBSD__) || (defined(__APPLE__) && !defined(MAC_OS_X_VERSION_10_8)) -static int uv__fs_scandir_filter(uv__dirent_t* dent) { -#else -static int uv__fs_scandir_filter(const uv__dirent_t* dent) { -#endif - return strcmp(dent->d_name, ".") != 0 && strcmp(dent->d_name, "..") != 0; -} - - -static ssize_t uv__fs_scandir(uv_fs_t* req) { - uv__dirent_t **dents; - int saved_errno; - int n; - - dents = NULL; - n = scandir(req->path, &dents, uv__fs_scandir_filter, alphasort); - - /* NOTE: We will use nbufs as an index field */ - req->nbufs = 0; - - if (n == 0) - goto out; /* osx still needs to deallocate some memory */ - else if (n == -1) - return n; - - req->ptr = dents; - - return n; - -out: - saved_errno = errno; - if (dents != NULL) { - int i; - - for (i = 0; i < n; i++) - uv__free(dents[i]); - uv__free(dents); - } - errno = saved_errno; - - req->ptr = NULL; - - return n; -} - - -static ssize_t uv__fs_readlink(uv_fs_t* req) { - ssize_t len; - char* buf; - - len = pathconf(req->path, _PC_PATH_MAX); - - if (len == -1) { -#if defined(PATH_MAX) - len = PATH_MAX; -#else - len = 4096; -#endif - } - - buf = uv__malloc(len + 1); - - if (buf == NULL) { - errno = ENOMEM; - return -1; - } - - len = readlink(req->path, buf, len); - - if (len == -1) { - uv__free(buf); - return -1; - } - - buf[len] = '\0'; - req->ptr = buf; - - return 0; -} - - -static ssize_t uv__fs_sendfile_emul(uv_fs_t* req) { - struct pollfd pfd; - int use_pread; - off_t offset; - ssize_t nsent; - ssize_t nread; - ssize_t nwritten; - size_t buflen; - size_t len; - ssize_t n; - int in_fd; - int out_fd; - char buf[8192]; - - len = req->bufsml[0].len; - in_fd = req->flags; - out_fd = req->file; - offset = req->off; - use_pread = 1; - - /* Here are the rules regarding errors: - * - * 1. Read errors are reported only if nsent==0, otherwise we return nsent. - * The user needs to know that some data has already been sent, to stop - * them from sending it twice. - * - * 2. Write errors are always reported. Write errors are bad because they - * mean data loss: we've read data but now we can't write it out. - * - * We try to use pread() and fall back to regular read() if the source fd - * doesn't support positional reads, for example when it's a pipe fd. - * - * If we get EAGAIN when writing to the target fd, we poll() on it until - * it becomes writable again. - * - * FIXME: If we get a write error when use_pread==1, it should be safe to - * return the number of sent bytes instead of an error because pread() - * is, in theory, idempotent. However, special files in /dev or /proc - * may support pread() but not necessarily return the same data on - * successive reads. - * - * FIXME: There is no way now to signal that we managed to send *some* data - * before a write error. - */ - for (nsent = 0; (size_t) nsent < len; ) { - buflen = len - nsent; - - if (buflen > sizeof(buf)) - buflen = sizeof(buf); - - do - if (use_pread) - nread = pread(in_fd, buf, buflen, offset); - else - nread = read(in_fd, buf, buflen); - while (nread == -1 && errno == EINTR); - - if (nread == 0) - goto out; - - if (nread == -1) { - if (use_pread && nsent == 0 && (errno == EIO || errno == ESPIPE)) { - use_pread = 0; - continue; - } - - if (nsent == 0) - nsent = -1; - - goto out; - } - - for (nwritten = 0; nwritten < nread; ) { - do - n = write(out_fd, buf + nwritten, nread - nwritten); - while (n == -1 && errno == EINTR); - - if (n != -1) { - nwritten += n; - continue; - } - - if (errno != EAGAIN && errno != EWOULDBLOCK) { - nsent = -1; - goto out; - } - - pfd.fd = out_fd; - pfd.events = POLLOUT; - pfd.revents = 0; - - do - n = poll(&pfd, 1, -1); - while (n == -1 && errno == EINTR); - - if (n == -1 || (pfd.revents & ~POLLOUT) != 0) { - errno = EIO; - nsent = -1; - goto out; - } - } - - offset += nread; - nsent += nread; - } - -out: - if (nsent != -1) - req->off = offset; - - return nsent; -} - - -static ssize_t uv__fs_sendfile(uv_fs_t* req) { - int in_fd; - int out_fd; - - in_fd = req->flags; - out_fd = req->file; - -#if defined(__linux__) || defined(__sun) - { - off_t off; - ssize_t r; - - off = req->off; - r = sendfile(out_fd, in_fd, &off, req->bufsml[0].len); - - /* sendfile() on SunOS returns EINVAL if the target fd is not a socket but - * it still writes out data. Fortunately, we can detect it by checking if - * the offset has been updated. - */ - if (r != -1 || off > req->off) { - r = off - req->off; - req->off = off; - return r; - } - - if (errno == EINVAL || - errno == EIO || - errno == ENOTSOCK || - errno == EXDEV) { - errno = 0; - return uv__fs_sendfile_emul(req); - } - - return -1; - } -#elif defined(__FreeBSD__) || defined(__APPLE__) || defined(__DragonFly__) - { - off_t len; - ssize_t r; - - /* sendfile() on FreeBSD and Darwin returns EAGAIN if the target fd is in - * non-blocking mode and not all data could be written. If a non-zero - * number of bytes have been sent, we don't consider it an error. - */ - -#if defined(__FreeBSD__) || defined(__DragonFly__) - len = 0; - r = sendfile(in_fd, out_fd, req->off, req->bufsml[0].len, NULL, &len, 0); -#else - /* The darwin sendfile takes len as an input for the length to send, - * so make sure to initialize it with the caller's value. */ - len = req->bufsml[0].len; - r = sendfile(in_fd, out_fd, req->off, &len, NULL, 0); -#endif - - /* - * The man page for sendfile(2) on DragonFly states that `len` contains - * a meaningful value ONLY in case of EAGAIN and EINTR. - * Nothing is said about it's value in case of other errors, so better - * not depend on the potential wrong assumption that is was not modified - * by the syscall. - */ - if (r == 0 || ((errno == EAGAIN || errno == EINTR) && len != 0)) { - req->off += len; - return (ssize_t) len; - } - - if (errno == EINVAL || - errno == EIO || - errno == ENOTSOCK || - errno == EXDEV) { - errno = 0; - return uv__fs_sendfile_emul(req); - } - - return -1; - } -#else - /* Squelch compiler warnings. */ - (void) &in_fd; - (void) &out_fd; - - return uv__fs_sendfile_emul(req); -#endif -} - - -static ssize_t uv__fs_utime(uv_fs_t* req) { - struct utimbuf buf; - buf.actime = req->atime; - buf.modtime = req->mtime; - return utime(req->path, &buf); /* TODO use utimes() where available */ -} - - -static ssize_t uv__fs_write(uv_fs_t* req) { -#if defined(__linux__) - static int no_pwritev; -#endif - ssize_t r; - - /* Serialize writes on OS X, concurrent write() and pwrite() calls result in - * data loss. We can't use a per-file descriptor lock, the descriptor may be - * a dup(). - */ -#if defined(__APPLE__) - static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; - pthread_mutex_lock(&lock); -#endif - - if (req->off < 0) { - if (req->nbufs == 1) - r = write(req->file, req->bufs[0].base, req->bufs[0].len); - else - r = writev(req->file, (struct iovec*) req->bufs, req->nbufs); - } else { - if (req->nbufs == 1) { - r = pwrite(req->file, req->bufs[0].base, req->bufs[0].len, req->off); - goto done; - } -#if HAVE_PREADV - r = pwritev(req->file, (struct iovec*) req->bufs, req->nbufs, req->off); -#else -# if defined(__linux__) - if (no_pwritev) retry: -# endif - { - off_t written; - size_t index; - - written = 0; - index = 0; - r = 0; - do { - if (req->bufs[index].len > 0) { - r = pwrite(req->file, - req->bufs[index].base, - req->bufs[index].len, - req->off + written); - if (r > 0) - written += r; - } - index++; - } while (index < req->nbufs && r >= 0); - if (written > 0) - r = written; - } -# if defined(__linux__) - else { - r = uv__pwritev(req->file, - (struct iovec*) req->bufs, - req->nbufs, - req->off); - if (r == -1 && errno == ENOSYS) { - no_pwritev = 1; - goto retry; - } - } -# endif -#endif - } - -done: -#if defined(__APPLE__) - pthread_mutex_unlock(&lock); -#endif - - return r; -} - -static void uv__to_stat(struct stat* src, uv_stat_t* dst) { - dst->st_dev = src->st_dev; - dst->st_mode = src->st_mode; - dst->st_nlink = src->st_nlink; - dst->st_uid = src->st_uid; - dst->st_gid = src->st_gid; - dst->st_rdev = src->st_rdev; - dst->st_ino = src->st_ino; - dst->st_size = src->st_size; - dst->st_blksize = src->st_blksize; - dst->st_blocks = src->st_blocks; - -#if defined(__APPLE__) - dst->st_atim.tv_sec = src->st_atimespec.tv_sec; - dst->st_atim.tv_nsec = src->st_atimespec.tv_nsec; - dst->st_mtim.tv_sec = src->st_mtimespec.tv_sec; - dst->st_mtim.tv_nsec = src->st_mtimespec.tv_nsec; - dst->st_ctim.tv_sec = src->st_ctimespec.tv_sec; - dst->st_ctim.tv_nsec = src->st_ctimespec.tv_nsec; - dst->st_birthtim.tv_sec = src->st_birthtimespec.tv_sec; - dst->st_birthtim.tv_nsec = src->st_birthtimespec.tv_nsec; - dst->st_flags = src->st_flags; - dst->st_gen = src->st_gen; -#elif defined(__ANDROID__) - dst->st_atim.tv_sec = src->st_atime; - dst->st_atim.tv_nsec = src->st_atime_nsec; - dst->st_mtim.tv_sec = src->st_mtime; - dst->st_mtim.tv_nsec = src->st_mtime_nsec; - dst->st_ctim.tv_sec = src->st_ctime; - dst->st_ctim.tv_nsec = src->st_ctime_nsec; - dst->st_birthtim.tv_sec = src->st_ctime; - dst->st_birthtim.tv_nsec = src->st_ctime_nsec; - dst->st_flags = 0; - dst->st_gen = 0; -#elif !defined(_AIX) && ( \ - defined(_BSD_SOURCE) || \ - defined(_SVID_SOURCE) || \ - defined(_XOPEN_SOURCE) || \ - defined(_DEFAULT_SOURCE)) - dst->st_atim.tv_sec = src->st_atim.tv_sec; - dst->st_atim.tv_nsec = src->st_atim.tv_nsec; - dst->st_mtim.tv_sec = src->st_mtim.tv_sec; - dst->st_mtim.tv_nsec = src->st_mtim.tv_nsec; - dst->st_ctim.tv_sec = src->st_ctim.tv_sec; - dst->st_ctim.tv_nsec = src->st_ctim.tv_nsec; -# if defined(__DragonFly__) || \ - defined(__FreeBSD__) || \ - defined(__OpenBSD__) || \ - defined(__NetBSD__) - dst->st_birthtim.tv_sec = src->st_birthtim.tv_sec; - dst->st_birthtim.tv_nsec = src->st_birthtim.tv_nsec; - dst->st_flags = src->st_flags; - dst->st_gen = src->st_gen; -# else - dst->st_birthtim.tv_sec = src->st_ctim.tv_sec; - dst->st_birthtim.tv_nsec = src->st_ctim.tv_nsec; - dst->st_flags = 0; - dst->st_gen = 0; -# endif -#else - dst->st_atim.tv_sec = src->st_atime; - dst->st_atim.tv_nsec = 0; - dst->st_mtim.tv_sec = src->st_mtime; - dst->st_mtim.tv_nsec = 0; - dst->st_ctim.tv_sec = src->st_ctime; - dst->st_ctim.tv_nsec = 0; - dst->st_birthtim.tv_sec = src->st_ctime; - dst->st_birthtim.tv_nsec = 0; - dst->st_flags = 0; - dst->st_gen = 0; -#endif -} - - -static int uv__fs_stat(const char *path, uv_stat_t *buf) { - struct stat pbuf; - int ret; - ret = stat(path, &pbuf); - uv__to_stat(&pbuf, buf); - return ret; -} - - -static int uv__fs_lstat(const char *path, uv_stat_t *buf) { - struct stat pbuf; - int ret; - ret = lstat(path, &pbuf); - uv__to_stat(&pbuf, buf); - return ret; -} - - -static int uv__fs_fstat(int fd, uv_stat_t *buf) { - struct stat pbuf; - int ret; - ret = fstat(fd, &pbuf); - uv__to_stat(&pbuf, buf); - return ret; -} - - -typedef ssize_t (*uv__fs_buf_iter_processor)(uv_fs_t* req); -static ssize_t uv__fs_buf_iter(uv_fs_t* req, uv__fs_buf_iter_processor process) { - unsigned int iovmax; - unsigned int nbufs; - uv_buf_t* bufs; - ssize_t total; - ssize_t result; - - iovmax = uv__getiovmax(); - nbufs = req->nbufs; - bufs = req->bufs; - total = 0; - - while (nbufs > 0) { - req->nbufs = nbufs; - if (req->nbufs > iovmax) - req->nbufs = iovmax; - - result = process(req); - if (result <= 0) { - if (total == 0) - total = result; - break; - } - - if (req->off >= 0) - req->off += result; - - req->bufs += req->nbufs; - nbufs -= req->nbufs; - total += result; - } - - if (bufs != req->bufsml) - uv__free(bufs); - req->bufs = NULL; - - return total; -} - - -static void uv__fs_work(struct uv__work* w) { - int retry_on_eintr; - uv_fs_t* req; - ssize_t r; - - req = container_of(w, uv_fs_t, work_req); - retry_on_eintr = !(req->fs_type == UV_FS_CLOSE); - - do { - errno = 0; - -#define X(type, action) \ - case UV_FS_ ## type: \ - r = action; \ - break; - - switch (req->fs_type) { - X(ACCESS, access(req->path, req->flags)); - X(CHMOD, chmod(req->path, req->mode)); - X(CHOWN, chown(req->path, req->uid, req->gid)); - X(CLOSE, close(req->file)); - X(FCHMOD, fchmod(req->file, req->mode)); - X(FCHOWN, fchown(req->file, req->uid, req->gid)); - X(FDATASYNC, uv__fs_fdatasync(req)); - X(FSTAT, uv__fs_fstat(req->file, &req->statbuf)); - X(FSYNC, fsync(req->file)); - X(FTRUNCATE, ftruncate(req->file, req->off)); - X(FUTIME, uv__fs_futime(req)); - X(LSTAT, uv__fs_lstat(req->path, &req->statbuf)); - X(LINK, link(req->path, req->new_path)); - X(MKDIR, mkdir(req->path, req->mode)); - X(MKDTEMP, uv__fs_mkdtemp(req)); - X(OPEN, uv__fs_open(req)); - X(READ, uv__fs_buf_iter(req, uv__fs_read)); - X(SCANDIR, uv__fs_scandir(req)); - X(READLINK, uv__fs_readlink(req)); - X(RENAME, rename(req->path, req->new_path)); - X(RMDIR, rmdir(req->path)); - X(SENDFILE, uv__fs_sendfile(req)); - X(STAT, uv__fs_stat(req->path, &req->statbuf)); - X(SYMLINK, symlink(req->path, req->new_path)); - X(UNLINK, unlink(req->path)); - X(UTIME, uv__fs_utime(req)); - X(WRITE, uv__fs_buf_iter(req, uv__fs_write)); - default: abort(); - } -#undef X - } while (r == -1 && errno == EINTR && retry_on_eintr); - - if (r == -1) - req->result = -errno; - else - req->result = r; - - if (r == 0 && (req->fs_type == UV_FS_STAT || - req->fs_type == UV_FS_FSTAT || - req->fs_type == UV_FS_LSTAT)) { - req->ptr = &req->statbuf; - } -} - - -static void uv__fs_done(struct uv__work* w, int status) { - uv_fs_t* req; - - req = container_of(w, uv_fs_t, work_req); - uv__req_unregister(req->loop, req); - - if (status == -ECANCELED) { - assert(req->result == 0); - req->result = -ECANCELED; - } - - req->cb(req); -} - - -int uv_fs_access(uv_loop_t* loop, - uv_fs_t* req, - const char* path, - int flags, - uv_fs_cb cb) { - INIT(ACCESS); - PATH; - req->flags = flags; - POST; -} - - -int uv_fs_chmod(uv_loop_t* loop, - uv_fs_t* req, - const char* path, - int mode, - uv_fs_cb cb) { - INIT(CHMOD); - PATH; - req->mode = mode; - POST; -} - - -int uv_fs_chown(uv_loop_t* loop, - uv_fs_t* req, - const char* path, - uv_uid_t uid, - uv_gid_t gid, - uv_fs_cb cb) { - INIT(CHOWN); - PATH; - req->uid = uid; - req->gid = gid; - POST; -} - - -int uv_fs_close(uv_loop_t* loop, uv_fs_t* req, uv_file file, uv_fs_cb cb) { - INIT(CLOSE); - req->file = file; - POST; -} - - -int uv_fs_fchmod(uv_loop_t* loop, - uv_fs_t* req, - uv_file file, - int mode, - uv_fs_cb cb) { - INIT(FCHMOD); - req->file = file; - req->mode = mode; - POST; -} - - -int uv_fs_fchown(uv_loop_t* loop, - uv_fs_t* req, - uv_file file, - uv_uid_t uid, - uv_gid_t gid, - uv_fs_cb cb) { - INIT(FCHOWN); - req->file = file; - req->uid = uid; - req->gid = gid; - POST; -} - - -int uv_fs_fdatasync(uv_loop_t* loop, uv_fs_t* req, uv_file file, uv_fs_cb cb) { - INIT(FDATASYNC); - req->file = file; - POST; -} - - -int uv_fs_fstat(uv_loop_t* loop, uv_fs_t* req, uv_file file, uv_fs_cb cb) { - INIT(FSTAT); - req->file = file; - POST; -} - - -int uv_fs_fsync(uv_loop_t* loop, uv_fs_t* req, uv_file file, uv_fs_cb cb) { - INIT(FSYNC); - req->file = file; - POST; -} - - -int uv_fs_ftruncate(uv_loop_t* loop, - uv_fs_t* req, - uv_file file, - int64_t off, - uv_fs_cb cb) { - INIT(FTRUNCATE); - req->file = file; - req->off = off; - POST; -} - - -int uv_fs_futime(uv_loop_t* loop, - uv_fs_t* req, - uv_file file, - double atime, - double mtime, - uv_fs_cb cb) { - INIT(FUTIME); - req->file = file; - req->atime = atime; - req->mtime = mtime; - POST; -} - - -int uv_fs_lstat(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb) { - INIT(LSTAT); - PATH; - POST; -} - - -int uv_fs_link(uv_loop_t* loop, - uv_fs_t* req, - const char* path, - const char* new_path, - uv_fs_cb cb) { - INIT(LINK); - PATH2; - POST; -} - - -int uv_fs_mkdir(uv_loop_t* loop, - uv_fs_t* req, - const char* path, - int mode, - uv_fs_cb cb) { - INIT(MKDIR); - PATH; - req->mode = mode; - POST; -} - - -int uv_fs_mkdtemp(uv_loop_t* loop, - uv_fs_t* req, - const char* tpl, - uv_fs_cb cb) { - INIT(MKDTEMP); - req->path = uv__strdup(tpl); - if (req->path == NULL) - return -ENOMEM; - POST; -} - - -int uv_fs_open(uv_loop_t* loop, - uv_fs_t* req, - const char* path, - int flags, - int mode, - uv_fs_cb cb) { - INIT(OPEN); - PATH; - req->flags = flags; - req->mode = mode; - POST; -} - - -int uv_fs_read(uv_loop_t* loop, uv_fs_t* req, - uv_file file, - const uv_buf_t bufs[], - unsigned int nbufs, - int64_t off, - uv_fs_cb cb) { - if (bufs == NULL || nbufs == 0) - return -EINVAL; - - INIT(READ); - req->file = file; - - req->nbufs = nbufs; - req->bufs = req->bufsml; - if (nbufs > ARRAY_SIZE(req->bufsml)) - req->bufs = uv__malloc(nbufs * sizeof(*bufs)); - - if (req->bufs == NULL) - return -ENOMEM; - - memcpy(req->bufs, bufs, nbufs * sizeof(*bufs)); - - req->off = off; - POST; -} - - -int uv_fs_scandir(uv_loop_t* loop, - uv_fs_t* req, - const char* path, - int flags, - uv_fs_cb cb) { - INIT(SCANDIR); - PATH; - req->flags = flags; - POST; -} - - -int uv_fs_readlink(uv_loop_t* loop, - uv_fs_t* req, - const char* path, - uv_fs_cb cb) { - INIT(READLINK); - PATH; - POST; -} - - -int uv_fs_rename(uv_loop_t* loop, - uv_fs_t* req, - const char* path, - const char* new_path, - uv_fs_cb cb) { - INIT(RENAME); - PATH2; - POST; -} - - -int uv_fs_rmdir(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb) { - INIT(RMDIR); - PATH; - POST; -} - - -int uv_fs_sendfile(uv_loop_t* loop, - uv_fs_t* req, - uv_file out_fd, - uv_file in_fd, - int64_t off, - size_t len, - uv_fs_cb cb) { - INIT(SENDFILE); - req->flags = in_fd; /* hack */ - req->file = out_fd; - req->off = off; - req->bufsml[0].len = len; - POST; -} - - -int uv_fs_stat(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb) { - INIT(STAT); - PATH; - POST; -} - - -int uv_fs_symlink(uv_loop_t* loop, - uv_fs_t* req, - const char* path, - const char* new_path, - int flags, - uv_fs_cb cb) { - INIT(SYMLINK); - PATH2; - req->flags = flags; - POST; -} - - -int uv_fs_unlink(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb) { - INIT(UNLINK); - PATH; - POST; -} - - -int uv_fs_utime(uv_loop_t* loop, - uv_fs_t* req, - const char* path, - double atime, - double mtime, - uv_fs_cb cb) { - INIT(UTIME); - PATH; - req->atime = atime; - req->mtime = mtime; - POST; -} - - -int uv_fs_write(uv_loop_t* loop, - uv_fs_t* req, - uv_file file, - const uv_buf_t bufs[], - unsigned int nbufs, - int64_t off, - uv_fs_cb cb) { - if (bufs == NULL || nbufs == 0) - return -EINVAL; - - INIT(WRITE); - req->file = file; - - req->nbufs = nbufs; - req->bufs = req->bufsml; - if (nbufs > ARRAY_SIZE(req->bufsml)) - req->bufs = uv__malloc(nbufs * sizeof(*bufs)); - - if (req->bufs == NULL) - return -ENOMEM; - - memcpy(req->bufs, bufs, nbufs * sizeof(*bufs)); - - req->off = off; - POST; -} - - -void uv_fs_req_cleanup(uv_fs_t* req) { - /* Only necessary for asychronous requests, i.e., requests with a callback. - * Synchronous ones don't copy their arguments and have req->path and - * req->new_path pointing to user-owned memory. UV_FS_MKDTEMP is the - * exception to the rule, it always allocates memory. - */ - if (req->path != NULL && (req->cb != NULL || req->fs_type == UV_FS_MKDTEMP)) - uv__free((void*) req->path); /* Memory is shared with req->new_path. */ - - req->path = NULL; - req->new_path = NULL; - - if (req->fs_type == UV_FS_SCANDIR && req->ptr != NULL) - uv__fs_scandir_cleanup(req); - - if (req->ptr != &req->statbuf) - uv__free(req->ptr); - req->ptr = NULL; -} diff --git a/outside/libuv-v1.7.5/src/unix/fsevents.c b/outside/libuv-v1.7.5/src/unix/fsevents.c deleted file mode 100644 index 8143f7c1f..000000000 --- a/outside/libuv-v1.7.5/src/unix/fsevents.c +++ /dev/null @@ -1,899 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * 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. - */ - -#include "uv.h" -#include "internal.h" - -#if TARGET_OS_IPHONE - -/* iOS (currently) doesn't provide the FSEvents-API (nor CoreServices) */ - -int uv__fsevents_init(uv_fs_event_t* handle) { - return 0; -} - - -int uv__fsevents_close(uv_fs_event_t* handle) { - return 0; -} - - -void uv__fsevents_loop_delete(uv_loop_t* loop) { -} - -#else /* TARGET_OS_IPHONE */ - -#include -#include -#include -#include - -#include -#include - -/* These are macros to avoid "initializer element is not constant" errors - * with old versions of gcc. - */ -#define kFSEventsModified (kFSEventStreamEventFlagItemFinderInfoMod | \ - kFSEventStreamEventFlagItemModified | \ - kFSEventStreamEventFlagItemInodeMetaMod | \ - kFSEventStreamEventFlagItemChangeOwner | \ - kFSEventStreamEventFlagItemXattrMod) - -#define kFSEventsRenamed (kFSEventStreamEventFlagItemCreated | \ - kFSEventStreamEventFlagItemRemoved | \ - kFSEventStreamEventFlagItemRenamed) - -#define kFSEventsSystem (kFSEventStreamEventFlagUserDropped | \ - kFSEventStreamEventFlagKernelDropped | \ - kFSEventStreamEventFlagEventIdsWrapped | \ - kFSEventStreamEventFlagHistoryDone | \ - kFSEventStreamEventFlagMount | \ - kFSEventStreamEventFlagUnmount | \ - kFSEventStreamEventFlagRootChanged) - -typedef struct uv__fsevents_event_s uv__fsevents_event_t; -typedef struct uv__cf_loop_signal_s uv__cf_loop_signal_t; -typedef struct uv__cf_loop_state_s uv__cf_loop_state_t; - -struct uv__cf_loop_signal_s { - QUEUE member; - uv_fs_event_t* handle; -}; - -struct uv__fsevents_event_s { - QUEUE member; - int events; - char path[1]; -}; - -struct uv__cf_loop_state_s { - CFRunLoopRef loop; - CFRunLoopSourceRef signal_source; - int fsevent_need_reschedule; - FSEventStreamRef fsevent_stream; - uv_sem_t fsevent_sem; - uv_mutex_t fsevent_mutex; - void* fsevent_handles[2]; - unsigned int fsevent_handle_count; -}; - -/* Forward declarations */ -static void uv__cf_loop_cb(void* arg); -static void* uv__cf_loop_runner(void* arg); -static int uv__cf_loop_signal(uv_loop_t* loop, uv_fs_event_t* handle); - -/* Lazy-loaded by uv__fsevents_global_init(). */ -static CFArrayRef (*pCFArrayCreate)(CFAllocatorRef, - const void**, - CFIndex, - const CFArrayCallBacks*); -static void (*pCFRelease)(CFTypeRef); -static void (*pCFRunLoopAddSource)(CFRunLoopRef, - CFRunLoopSourceRef, - CFStringRef); -static CFRunLoopRef (*pCFRunLoopGetCurrent)(void); -static void (*pCFRunLoopRemoveSource)(CFRunLoopRef, - CFRunLoopSourceRef, - CFStringRef); -static void (*pCFRunLoopRun)(void); -static CFRunLoopSourceRef (*pCFRunLoopSourceCreate)(CFAllocatorRef, - CFIndex, - CFRunLoopSourceContext*); -static void (*pCFRunLoopSourceSignal)(CFRunLoopSourceRef); -static void (*pCFRunLoopStop)(CFRunLoopRef); -static void (*pCFRunLoopWakeUp)(CFRunLoopRef); -static CFStringRef (*pCFStringCreateWithFileSystemRepresentation)( - CFAllocatorRef, - const char*); -static CFStringEncoding (*pCFStringGetSystemEncoding)(void); -static CFStringRef (*pkCFRunLoopDefaultMode); -static FSEventStreamRef (*pFSEventStreamCreate)(CFAllocatorRef, - FSEventStreamCallback, - FSEventStreamContext*, - CFArrayRef, - FSEventStreamEventId, - CFTimeInterval, - FSEventStreamCreateFlags); -static void (*pFSEventStreamFlushSync)(FSEventStreamRef); -static void (*pFSEventStreamInvalidate)(FSEventStreamRef); -static void (*pFSEventStreamRelease)(FSEventStreamRef); -static void (*pFSEventStreamScheduleWithRunLoop)(FSEventStreamRef, - CFRunLoopRef, - CFStringRef); -static Boolean (*pFSEventStreamStart)(FSEventStreamRef); -static void (*pFSEventStreamStop)(FSEventStreamRef); - -#define UV__FSEVENTS_PROCESS(handle, block) \ - do { \ - QUEUE events; \ - QUEUE* q; \ - uv__fsevents_event_t* event; \ - int err; \ - uv_mutex_lock(&(handle)->cf_mutex); \ - /* Split-off all events and empty original queue */ \ - QUEUE_INIT(&events); \ - if (!QUEUE_EMPTY(&(handle)->cf_events)) { \ - q = QUEUE_HEAD(&(handle)->cf_events); \ - QUEUE_SPLIT(&(handle)->cf_events, q, &events); \ - } \ - /* Get error (if any) and zero original one */ \ - err = (handle)->cf_error; \ - (handle)->cf_error = 0; \ - uv_mutex_unlock(&(handle)->cf_mutex); \ - /* Loop through events, deallocating each after processing */ \ - while (!QUEUE_EMPTY(&events)) { \ - q = QUEUE_HEAD(&events); \ - event = QUEUE_DATA(q, uv__fsevents_event_t, member); \ - QUEUE_REMOVE(q); \ - /* NOTE: Checking uv__is_active() is required here, because handle \ - * callback may close handle and invoking it after it will lead to \ - * incorrect behaviour */ \ - if (!uv__is_closing((handle)) && uv__is_active((handle))) \ - block \ - /* Free allocated data */ \ - uv__free(event); \ - } \ - if (err != 0 && !uv__is_closing((handle)) && uv__is_active((handle))) \ - (handle)->cb((handle), NULL, 0, err); \ - } while (0) - - -/* Runs in UV loop's thread, when there're events to report to handle */ -static void uv__fsevents_cb(uv_async_t* cb) { - uv_fs_event_t* handle; - - handle = cb->data; - - UV__FSEVENTS_PROCESS(handle, { - handle->cb(handle, event->path[0] ? event->path : NULL, event->events, 0); - }); -} - - -/* Runs in CF thread, pushed event into handle's event list */ -static void uv__fsevents_push_event(uv_fs_event_t* handle, - QUEUE* events, - int err) { - assert(events != NULL || err != 0); - uv_mutex_lock(&handle->cf_mutex); - - /* Concatenate two queues */ - if (events != NULL) - QUEUE_ADD(&handle->cf_events, events); - - /* Propagate error */ - if (err != 0) - handle->cf_error = err; - uv_mutex_unlock(&handle->cf_mutex); - - uv_async_send(handle->cf_cb); -} - - -/* Runs in CF thread, when there're events in FSEventStream */ -static void uv__fsevents_event_cb(ConstFSEventStreamRef streamRef, - void* info, - size_t numEvents, - void* eventPaths, - const FSEventStreamEventFlags eventFlags[], - const FSEventStreamEventId eventIds[]) { - size_t i; - int len; - char** paths; - char* path; - char* pos; - uv_fs_event_t* handle; - QUEUE* q; - uv_loop_t* loop; - uv__cf_loop_state_t* state; - uv__fsevents_event_t* event; - QUEUE head; - - loop = info; - state = loop->cf_state; - assert(state != NULL); - paths = eventPaths; - - /* For each handle */ - uv_mutex_lock(&state->fsevent_mutex); - QUEUE_FOREACH(q, &state->fsevent_handles) { - handle = QUEUE_DATA(q, uv_fs_event_t, cf_member); - QUEUE_INIT(&head); - - /* Process and filter out events */ - for (i = 0; i < numEvents; i++) { - /* Ignore system events */ - if (eventFlags[i] & kFSEventsSystem) - continue; - - path = paths[i]; - len = strlen(path); - - /* Filter out paths that are outside handle's request */ - if (strncmp(path, handle->realpath, handle->realpath_len) != 0) - continue; - - if (handle->realpath_len > 1 || *handle->realpath != '/') { - path += handle->realpath_len; - len -= handle->realpath_len; - - /* Skip forward slash */ - if (*path != '\0') { - path++; - len--; - } - } - -#ifdef MAC_OS_X_VERSION_10_7 - /* Ignore events with path equal to directory itself */ - if (len == 0) - continue; -#endif /* MAC_OS_X_VERSION_10_7 */ - - /* Do not emit events from subdirectories (without option set) */ - if ((handle->cf_flags & UV_FS_EVENT_RECURSIVE) == 0 && *path != 0) { - pos = strchr(path + 1, '/'); - if (pos != NULL) - continue; - } - -#ifndef MAC_OS_X_VERSION_10_7 - path = ""; - len = 0; -#endif /* MAC_OS_X_VERSION_10_7 */ - - event = uv__malloc(sizeof(*event) + len); - if (event == NULL) - break; - - memset(event, 0, sizeof(*event)); - memcpy(event->path, path, len + 1); - - if ((eventFlags[i] & kFSEventsModified) != 0 && - (eventFlags[i] & kFSEventsRenamed) == 0) - event->events = UV_CHANGE; - else - event->events = UV_RENAME; - - QUEUE_INSERT_TAIL(&head, &event->member); - } - - if (!QUEUE_EMPTY(&head)) - uv__fsevents_push_event(handle, &head, 0); - } - uv_mutex_unlock(&state->fsevent_mutex); -} - - -/* Runs in CF thread */ -static int uv__fsevents_create_stream(uv_loop_t* loop, CFArrayRef paths) { - uv__cf_loop_state_t* state; - FSEventStreamContext ctx; - FSEventStreamRef ref; - CFAbsoluteTime latency; - FSEventStreamCreateFlags flags; - - /* Initialize context */ - ctx.version = 0; - ctx.info = loop; - ctx.retain = NULL; - ctx.release = NULL; - ctx.copyDescription = NULL; - - latency = 0.05; - - /* Explanation of selected flags: - * 1. NoDefer - without this flag, events that are happening continuously - * (i.e. each event is happening after time interval less than `latency`, - * counted from previous event), will be deferred and passed to callback - * once they'll either fill whole OS buffer, or when this continuous stream - * will stop (i.e. there'll be delay between events, bigger than - * `latency`). - * Specifying this flag will invoke callback after `latency` time passed - * since event. - * 2. FileEvents - fire callback for file changes too (by default it is firing - * it only for directory changes). - */ - flags = kFSEventStreamCreateFlagNoDefer | kFSEventStreamCreateFlagFileEvents; - - /* - * NOTE: It might sound like a good idea to remember last seen StreamEventId, - * but in reality one dir might have last StreamEventId less than, the other, - * that is being watched now. Which will cause FSEventStream API to report - * changes to files from the past. - */ - ref = pFSEventStreamCreate(NULL, - &uv__fsevents_event_cb, - &ctx, - paths, - kFSEventStreamEventIdSinceNow, - latency, - flags); - assert(ref != NULL); - - state = loop->cf_state; - pFSEventStreamScheduleWithRunLoop(ref, - state->loop, - *pkCFRunLoopDefaultMode); - if (!pFSEventStreamStart(ref)) { - pFSEventStreamInvalidate(ref); - pFSEventStreamRelease(ref); - return -EMFILE; - } - - state->fsevent_stream = ref; - return 0; -} - - -/* Runs in CF thread */ -static void uv__fsevents_destroy_stream(uv_loop_t* loop) { - uv__cf_loop_state_t* state; - - state = loop->cf_state; - - if (state->fsevent_stream == NULL) - return; - - /* Flush all accumulated events */ - pFSEventStreamFlushSync(state->fsevent_stream); - - /* Stop emitting events */ - pFSEventStreamStop(state->fsevent_stream); - - /* Release stream */ - pFSEventStreamInvalidate(state->fsevent_stream); - pFSEventStreamRelease(state->fsevent_stream); - state->fsevent_stream = NULL; -} - - -/* Runs in CF thread, when there're new fsevent handles to add to stream */ -static void uv__fsevents_reschedule(uv_fs_event_t* handle) { - uv__cf_loop_state_t* state; - QUEUE* q; - uv_fs_event_t* curr; - CFArrayRef cf_paths; - CFStringRef* paths; - unsigned int i; - int err; - unsigned int path_count; - - state = handle->loop->cf_state; - paths = NULL; - cf_paths = NULL; - err = 0; - /* NOTE: `i` is used in deallocation loop below */ - i = 0; - - /* Optimization to prevent O(n^2) time spent when starting to watch - * many files simultaneously - */ - uv_mutex_lock(&state->fsevent_mutex); - if (state->fsevent_need_reschedule == 0) { - uv_mutex_unlock(&state->fsevent_mutex); - goto final; - } - state->fsevent_need_reschedule = 0; - uv_mutex_unlock(&state->fsevent_mutex); - - /* Destroy previous FSEventStream */ - uv__fsevents_destroy_stream(handle->loop); - - /* Any failure below will be a memory failure */ - err = -ENOMEM; - - /* Create list of all watched paths */ - uv_mutex_lock(&state->fsevent_mutex); - path_count = state->fsevent_handle_count; - if (path_count != 0) { - paths = uv__malloc(sizeof(*paths) * path_count); - if (paths == NULL) { - uv_mutex_unlock(&state->fsevent_mutex); - goto final; - } - - q = &state->fsevent_handles; - for (; i < path_count; i++) { - q = QUEUE_NEXT(q); - assert(q != &state->fsevent_handles); - curr = QUEUE_DATA(q, uv_fs_event_t, cf_member); - - assert(curr->realpath != NULL); - paths[i] = - pCFStringCreateWithFileSystemRepresentation(NULL, curr->realpath); - if (paths[i] == NULL) { - uv_mutex_unlock(&state->fsevent_mutex); - goto final; - } - } - } - uv_mutex_unlock(&state->fsevent_mutex); - err = 0; - - if (path_count != 0) { - /* Create new FSEventStream */ - cf_paths = pCFArrayCreate(NULL, (const void**) paths, path_count, NULL); - if (cf_paths == NULL) { - err = -ENOMEM; - goto final; - } - err = uv__fsevents_create_stream(handle->loop, cf_paths); - } - -final: - /* Deallocate all paths in case of failure */ - if (err != 0) { - if (cf_paths == NULL) { - while (i != 0) - pCFRelease(paths[--i]); - uv__free(paths); - } else { - /* CFArray takes ownership of both strings and original C-array */ - pCFRelease(cf_paths); - } - - /* Broadcast error to all handles */ - uv_mutex_lock(&state->fsevent_mutex); - QUEUE_FOREACH(q, &state->fsevent_handles) { - curr = QUEUE_DATA(q, uv_fs_event_t, cf_member); - uv__fsevents_push_event(curr, NULL, err); - } - uv_mutex_unlock(&state->fsevent_mutex); - } - - /* - * Main thread will block until the removal of handle from the list, - * we must tell it when we're ready. - * - * NOTE: This is coupled with `uv_sem_wait()` in `uv__fsevents_close` - */ - if (!uv__is_active(handle)) - uv_sem_post(&state->fsevent_sem); -} - - -static int uv__fsevents_global_init(void) { - static pthread_mutex_t global_init_mutex = PTHREAD_MUTEX_INITIALIZER; - static void* core_foundation_handle; - static void* core_services_handle; - int err; - - err = 0; - pthread_mutex_lock(&global_init_mutex); - if (core_foundation_handle != NULL) - goto out; - - /* The libraries are never unloaded because we currently don't have a good - * mechanism for keeping a reference count. It's unlikely to be an issue - * but if it ever becomes one, we can turn the dynamic library handles into - * per-event loop properties and have the dynamic linker keep track for us. - */ - err = -ENOSYS; - core_foundation_handle = dlopen("/System/Library/Frameworks/" - "CoreFoundation.framework/" - "Versions/A/CoreFoundation", - RTLD_LAZY | RTLD_LOCAL); - if (core_foundation_handle == NULL) - goto out; - - core_services_handle = dlopen("/System/Library/Frameworks/" - "CoreServices.framework/" - "Versions/A/CoreServices", - RTLD_LAZY | RTLD_LOCAL); - if (core_services_handle == NULL) - goto out; - - err = -ENOENT; -#define V(handle, symbol) \ - do { \ - *(void **)(&p ## symbol) = dlsym((handle), #symbol); \ - if (p ## symbol == NULL) \ - goto out; \ - } \ - while (0) - V(core_foundation_handle, CFArrayCreate); - V(core_foundation_handle, CFRelease); - V(core_foundation_handle, CFRunLoopAddSource); - V(core_foundation_handle, CFRunLoopGetCurrent); - V(core_foundation_handle, CFRunLoopRemoveSource); - V(core_foundation_handle, CFRunLoopRun); - V(core_foundation_handle, CFRunLoopSourceCreate); - V(core_foundation_handle, CFRunLoopSourceSignal); - V(core_foundation_handle, CFRunLoopStop); - V(core_foundation_handle, CFRunLoopWakeUp); - V(core_foundation_handle, CFStringCreateWithFileSystemRepresentation); - V(core_foundation_handle, CFStringGetSystemEncoding); - V(core_foundation_handle, kCFRunLoopDefaultMode); - V(core_services_handle, FSEventStreamCreate); - V(core_services_handle, FSEventStreamFlushSync); - V(core_services_handle, FSEventStreamInvalidate); - V(core_services_handle, FSEventStreamRelease); - V(core_services_handle, FSEventStreamScheduleWithRunLoop); - V(core_services_handle, FSEventStreamStart); - V(core_services_handle, FSEventStreamStop); -#undef V - err = 0; - -out: - if (err && core_services_handle != NULL) { - dlclose(core_services_handle); - core_services_handle = NULL; - } - - if (err && core_foundation_handle != NULL) { - dlclose(core_foundation_handle); - core_foundation_handle = NULL; - } - - pthread_mutex_unlock(&global_init_mutex); - return err; -} - - -/* Runs in UV loop */ -static int uv__fsevents_loop_init(uv_loop_t* loop) { - CFRunLoopSourceContext ctx; - uv__cf_loop_state_t* state; - pthread_attr_t attr_storage; - pthread_attr_t* attr; - int err; - - if (loop->cf_state != NULL) - return 0; - - err = uv__fsevents_global_init(); - if (err) - return err; - - state = uv__calloc(1, sizeof(*state)); - if (state == NULL) - return -ENOMEM; - - err = uv_mutex_init(&loop->cf_mutex); - if (err) - goto fail_mutex_init; - - err = uv_sem_init(&loop->cf_sem, 0); - if (err) - goto fail_sem_init; - - QUEUE_INIT(&loop->cf_signals); - - err = uv_sem_init(&state->fsevent_sem, 0); - if (err) - goto fail_fsevent_sem_init; - - err = uv_mutex_init(&state->fsevent_mutex); - if (err) - goto fail_fsevent_mutex_init; - - QUEUE_INIT(&state->fsevent_handles); - state->fsevent_need_reschedule = 0; - state->fsevent_handle_count = 0; - - memset(&ctx, 0, sizeof(ctx)); - ctx.info = loop; - ctx.perform = uv__cf_loop_cb; - state->signal_source = pCFRunLoopSourceCreate(NULL, 0, &ctx); - if (state->signal_source == NULL) { - err = -ENOMEM; - goto fail_signal_source_create; - } - - /* In the unlikely event that pthread_attr_init() fails, create the thread - * with the default stack size. We'll use a little more address space but - * that in itself is not a fatal error. - */ - attr = &attr_storage; - if (pthread_attr_init(attr)) - attr = NULL; - - if (attr != NULL) - if (pthread_attr_setstacksize(attr, 4 * PTHREAD_STACK_MIN)) - abort(); - - loop->cf_state = state; - - /* uv_thread_t is an alias for pthread_t. */ - err = -pthread_create(&loop->cf_thread, attr, uv__cf_loop_runner, loop); - - if (attr != NULL) - pthread_attr_destroy(attr); - - if (err) - goto fail_thread_create; - - /* Synchronize threads */ - uv_sem_wait(&loop->cf_sem); - return 0; - -fail_thread_create: - loop->cf_state = NULL; - -fail_signal_source_create: - uv_mutex_destroy(&state->fsevent_mutex); - -fail_fsevent_mutex_init: - uv_sem_destroy(&state->fsevent_sem); - -fail_fsevent_sem_init: - uv_sem_destroy(&loop->cf_sem); - -fail_sem_init: - uv_mutex_destroy(&loop->cf_mutex); - -fail_mutex_init: - uv__free(state); - return err; -} - - -/* Runs in UV loop */ -void uv__fsevents_loop_delete(uv_loop_t* loop) { - uv__cf_loop_signal_t* s; - uv__cf_loop_state_t* state; - QUEUE* q; - - if (loop->cf_state == NULL) - return; - - if (uv__cf_loop_signal(loop, NULL) != 0) - abort(); - - uv_thread_join(&loop->cf_thread); - uv_sem_destroy(&loop->cf_sem); - uv_mutex_destroy(&loop->cf_mutex); - - /* Free any remaining data */ - while (!QUEUE_EMPTY(&loop->cf_signals)) { - q = QUEUE_HEAD(&loop->cf_signals); - s = QUEUE_DATA(q, uv__cf_loop_signal_t, member); - QUEUE_REMOVE(q); - uv__free(s); - } - - /* Destroy state */ - state = loop->cf_state; - uv_sem_destroy(&state->fsevent_sem); - uv_mutex_destroy(&state->fsevent_mutex); - pCFRelease(state->signal_source); - uv__free(state); - loop->cf_state = NULL; -} - - -/* Runs in CF thread. This is the CF loop's body */ -static void* uv__cf_loop_runner(void* arg) { - uv_loop_t* loop; - uv__cf_loop_state_t* state; - - loop = arg; - state = loop->cf_state; - state->loop = pCFRunLoopGetCurrent(); - - pCFRunLoopAddSource(state->loop, - state->signal_source, - *pkCFRunLoopDefaultMode); - - uv_sem_post(&loop->cf_sem); - - pCFRunLoopRun(); - pCFRunLoopRemoveSource(state->loop, - state->signal_source, - *pkCFRunLoopDefaultMode); - - return NULL; -} - - -/* Runs in CF thread, executed after `uv__cf_loop_signal()` */ -static void uv__cf_loop_cb(void* arg) { - uv_loop_t* loop; - uv__cf_loop_state_t* state; - QUEUE* item; - QUEUE split_head; - uv__cf_loop_signal_t* s; - - loop = arg; - state = loop->cf_state; - QUEUE_INIT(&split_head); - - uv_mutex_lock(&loop->cf_mutex); - if (!QUEUE_EMPTY(&loop->cf_signals)) { - QUEUE* split_pos = QUEUE_HEAD(&loop->cf_signals); - QUEUE_SPLIT(&loop->cf_signals, split_pos, &split_head); - } - uv_mutex_unlock(&loop->cf_mutex); - - while (!QUEUE_EMPTY(&split_head)) { - item = QUEUE_HEAD(&split_head); - - s = QUEUE_DATA(item, uv__cf_loop_signal_t, member); - - /* This was a termination signal */ - if (s->handle == NULL) - pCFRunLoopStop(state->loop); - else - uv__fsevents_reschedule(s->handle); - - QUEUE_REMOVE(item); - uv__free(s); - } -} - - -/* Runs in UV loop to notify CF thread */ -int uv__cf_loop_signal(uv_loop_t* loop, uv_fs_event_t* handle) { - uv__cf_loop_signal_t* item; - uv__cf_loop_state_t* state; - - item = uv__malloc(sizeof(*item)); - if (item == NULL) - return -ENOMEM; - - item->handle = handle; - - uv_mutex_lock(&loop->cf_mutex); - QUEUE_INSERT_TAIL(&loop->cf_signals, &item->member); - uv_mutex_unlock(&loop->cf_mutex); - - state = loop->cf_state; - assert(state != NULL); - pCFRunLoopSourceSignal(state->signal_source); - pCFRunLoopWakeUp(state->loop); - - return 0; -} - - -/* Runs in UV loop to initialize handle */ -int uv__fsevents_init(uv_fs_event_t* handle) { - int err; - uv__cf_loop_state_t* state; - - err = uv__fsevents_loop_init(handle->loop); - if (err) - return err; - - /* Get absolute path to file */ - handle->realpath = realpath(handle->path, NULL); - if (handle->realpath == NULL) - return -errno; - handle->realpath_len = strlen(handle->realpath); - - /* Initialize event queue */ - QUEUE_INIT(&handle->cf_events); - handle->cf_error = 0; - - /* - * Events will occur in other thread. - * Initialize callback for getting them back into event loop's thread - */ - handle->cf_cb = uv__malloc(sizeof(*handle->cf_cb)); - if (handle->cf_cb == NULL) { - err = -ENOMEM; - goto fail_cf_cb_malloc; - } - - handle->cf_cb->data = handle; - uv_async_init(handle->loop, handle->cf_cb, uv__fsevents_cb); - handle->cf_cb->flags |= UV__HANDLE_INTERNAL; - uv_unref((uv_handle_t*) handle->cf_cb); - - err = uv_mutex_init(&handle->cf_mutex); - if (err) - goto fail_cf_mutex_init; - - /* Insert handle into the list */ - state = handle->loop->cf_state; - uv_mutex_lock(&state->fsevent_mutex); - QUEUE_INSERT_TAIL(&state->fsevent_handles, &handle->cf_member); - state->fsevent_handle_count++; - state->fsevent_need_reschedule = 1; - uv_mutex_unlock(&state->fsevent_mutex); - - /* Reschedule FSEventStream */ - assert(handle != NULL); - err = uv__cf_loop_signal(handle->loop, handle); - if (err) - goto fail_loop_signal; - - return 0; - -fail_loop_signal: - uv_mutex_destroy(&handle->cf_mutex); - -fail_cf_mutex_init: - uv__free(handle->cf_cb); - handle->cf_cb = NULL; - -fail_cf_cb_malloc: - uv__free(handle->realpath); - handle->realpath = NULL; - handle->realpath_len = 0; - - return err; -} - - -/* Runs in UV loop to de-initialize handle */ -int uv__fsevents_close(uv_fs_event_t* handle) { - int err; - uv__cf_loop_state_t* state; - - if (handle->cf_cb == NULL) - return -EINVAL; - - /* Remove handle from the list */ - state = handle->loop->cf_state; - uv_mutex_lock(&state->fsevent_mutex); - QUEUE_REMOVE(&handle->cf_member); - state->fsevent_handle_count--; - state->fsevent_need_reschedule = 1; - uv_mutex_unlock(&state->fsevent_mutex); - - /* Reschedule FSEventStream */ - assert(handle != NULL); - err = uv__cf_loop_signal(handle->loop, handle); - if (err) - return -err; - - /* Wait for deinitialization */ - uv_sem_wait(&state->fsevent_sem); - - uv_close((uv_handle_t*) handle->cf_cb, (uv_close_cb) uv__free); - handle->cf_cb = NULL; - - /* Free data in queue */ - UV__FSEVENTS_PROCESS(handle, { - /* NOP */ - }); - - uv_mutex_destroy(&handle->cf_mutex); - uv__free(handle->realpath); - handle->realpath = NULL; - handle->realpath_len = 0; - - return 0; -} - -#endif /* TARGET_OS_IPHONE */ diff --git a/outside/libuv-v1.7.5/src/unix/getaddrinfo.c b/outside/libuv-v1.7.5/src/unix/getaddrinfo.c deleted file mode 100644 index 2049aea2f..000000000 --- a/outside/libuv-v1.7.5/src/unix/getaddrinfo.c +++ /dev/null @@ -1,202 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * 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. - */ - -/* Expose glibc-specific EAI_* error codes. Needs to be defined before we - * include any headers. - */ -#ifndef _GNU_SOURCE -# define _GNU_SOURCE -#endif - -#include "uv.h" -#include "internal.h" - -#include -#include /* NULL */ -#include -#include - -/* EAI_* constants. */ -#include - - -int uv__getaddrinfo_translate_error(int sys_err) { - switch (sys_err) { - case 0: return 0; -#if defined(EAI_ADDRFAMILY) - case EAI_ADDRFAMILY: return UV_EAI_ADDRFAMILY; -#endif -#if defined(EAI_AGAIN) - case EAI_AGAIN: return UV_EAI_AGAIN; -#endif -#if defined(EAI_BADFLAGS) - case EAI_BADFLAGS: return UV_EAI_BADFLAGS; -#endif -#if defined(EAI_BADHINTS) - case EAI_BADHINTS: return UV_EAI_BADHINTS; -#endif -#if defined(EAI_CANCELED) - case EAI_CANCELED: return UV_EAI_CANCELED; -#endif -#if defined(EAI_FAIL) - case EAI_FAIL: return UV_EAI_FAIL; -#endif -#if defined(EAI_FAMILY) - case EAI_FAMILY: return UV_EAI_FAMILY; -#endif -#if defined(EAI_MEMORY) - case EAI_MEMORY: return UV_EAI_MEMORY; -#endif -#if defined(EAI_NODATA) - case EAI_NODATA: return UV_EAI_NODATA; -#endif -#if defined(EAI_NONAME) -# if !defined(EAI_NODATA) || EAI_NODATA != EAI_NONAME - case EAI_NONAME: return UV_EAI_NONAME; -# endif -#endif -#if defined(EAI_OVERFLOW) - case EAI_OVERFLOW: return UV_EAI_OVERFLOW; -#endif -#if defined(EAI_PROTOCOL) - case EAI_PROTOCOL: return UV_EAI_PROTOCOL; -#endif -#if defined(EAI_SERVICE) - case EAI_SERVICE: return UV_EAI_SERVICE; -#endif -#if defined(EAI_SOCKTYPE) - case EAI_SOCKTYPE: return UV_EAI_SOCKTYPE; -#endif -#if defined(EAI_SYSTEM) - case EAI_SYSTEM: return -errno; -#endif - } - assert(!"unknown EAI_* error code"); - abort(); - return 0; /* Pacify compiler. */ -} - - -static void uv__getaddrinfo_work(struct uv__work* w) { - uv_getaddrinfo_t* req; - int err; - - req = container_of(w, uv_getaddrinfo_t, work_req); - err = getaddrinfo(req->hostname, req->service, req->hints, &req->addrinfo); - req->retcode = uv__getaddrinfo_translate_error(err); -} - - -static void uv__getaddrinfo_done(struct uv__work* w, int status) { - uv_getaddrinfo_t* req; - - req = container_of(w, uv_getaddrinfo_t, work_req); - uv__req_unregister(req->loop, req); - - /* See initialization in uv_getaddrinfo(). */ - if (req->hints) - uv__free(req->hints); - else if (req->service) - uv__free(req->service); - else if (req->hostname) - uv__free(req->hostname); - else - assert(0); - - req->hints = NULL; - req->service = NULL; - req->hostname = NULL; - - if (status == -ECANCELED) { - assert(req->retcode == 0); - req->retcode = UV_EAI_CANCELED; - } - - if (req->cb) - req->cb(req, req->retcode, req->addrinfo); -} - - -int uv_getaddrinfo(uv_loop_t* loop, - uv_getaddrinfo_t* req, - uv_getaddrinfo_cb cb, - const char* hostname, - const char* service, - const struct addrinfo* hints) { - size_t hostname_len; - size_t service_len; - size_t hints_len; - size_t len; - char* buf; - - if (req == NULL || (hostname == NULL && service == NULL)) - return -EINVAL; - - hostname_len = hostname ? strlen(hostname) + 1 : 0; - service_len = service ? strlen(service) + 1 : 0; - hints_len = hints ? sizeof(*hints) : 0; - buf = uv__malloc(hostname_len + service_len + hints_len); - - if (buf == NULL) - return -ENOMEM; - - uv__req_init(loop, req, UV_GETADDRINFO); - req->loop = loop; - req->cb = cb; - req->addrinfo = NULL; - req->hints = NULL; - req->service = NULL; - req->hostname = NULL; - req->retcode = 0; - - /* order matters, see uv_getaddrinfo_done() */ - len = 0; - - if (hints) { - req->hints = memcpy(buf + len, hints, sizeof(*hints)); - len += sizeof(*hints); - } - - if (service) { - req->service = memcpy(buf + len, service, service_len); - len += service_len; - } - - if (hostname) - req->hostname = memcpy(buf + len, hostname, hostname_len); - - if (cb) { - uv__work_submit(loop, - &req->work_req, - uv__getaddrinfo_work, - uv__getaddrinfo_done); - return 0; - } else { - uv__getaddrinfo_work(&req->work_req); - uv__getaddrinfo_done(&req->work_req, 0); - return req->retcode; - } -} - - -void uv_freeaddrinfo(struct addrinfo* ai) { - if (ai) - freeaddrinfo(ai); -} diff --git a/outside/libuv-v1.7.5/src/unix/getnameinfo.c b/outside/libuv-v1.7.5/src/unix/getnameinfo.c deleted file mode 100644 index daa798a45..000000000 --- a/outside/libuv-v1.7.5/src/unix/getnameinfo.c +++ /dev/null @@ -1,120 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. -* -* 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. -*/ - -#include -#include -#include -#include - -#include "uv.h" -#include "internal.h" - - -static void uv__getnameinfo_work(struct uv__work* w) { - uv_getnameinfo_t* req; - int err; - socklen_t salen; - - req = container_of(w, uv_getnameinfo_t, work_req); - - if (req->storage.ss_family == AF_INET) - salen = sizeof(struct sockaddr_in); - else if (req->storage.ss_family == AF_INET6) - salen = sizeof(struct sockaddr_in6); - else - abort(); - - err = getnameinfo((struct sockaddr*) &req->storage, - salen, - req->host, - sizeof(req->host), - req->service, - sizeof(req->service), - req->flags); - req->retcode = uv__getaddrinfo_translate_error(err); -} - -static void uv__getnameinfo_done(struct uv__work* w, int status) { - uv_getnameinfo_t* req; - char* host; - char* service; - - req = container_of(w, uv_getnameinfo_t, work_req); - uv__req_unregister(req->loop, req); - host = service = NULL; - - if (status == -ECANCELED) { - assert(req->retcode == 0); - req->retcode = UV_EAI_CANCELED; - } else if (req->retcode == 0) { - host = req->host; - service = req->service; - } - - if (req->getnameinfo_cb) - req->getnameinfo_cb(req, req->retcode, host, service); -} - -/* -* Entry point for getnameinfo -* return 0 if a callback will be made -* return error code if validation fails -*/ -int uv_getnameinfo(uv_loop_t* loop, - uv_getnameinfo_t* req, - uv_getnameinfo_cb getnameinfo_cb, - const struct sockaddr* addr, - int flags) { - if (req == NULL || addr == NULL) - return UV_EINVAL; - - if (addr->sa_family == AF_INET) { - memcpy(&req->storage, - addr, - sizeof(struct sockaddr_in)); - } else if (addr->sa_family == AF_INET6) { - memcpy(&req->storage, - addr, - sizeof(struct sockaddr_in6)); - } else { - return UV_EINVAL; - } - - uv__req_init(loop, (uv_req_t*)req, UV_GETNAMEINFO); - - req->getnameinfo_cb = getnameinfo_cb; - req->flags = flags; - req->type = UV_GETNAMEINFO; - req->loop = loop; - req->retcode = 0; - - if (getnameinfo_cb) { - uv__work_submit(loop, - &req->work_req, - uv__getnameinfo_work, - uv__getnameinfo_done); - return 0; - } else { - uv__getnameinfo_work(&req->work_req); - uv__getnameinfo_done(&req->work_req, 0); - return req->retcode; - } -} diff --git a/outside/libuv-v1.7.5/src/unix/internal.h b/outside/libuv-v1.7.5/src/unix/internal.h deleted file mode 100644 index 741fa57d6..000000000 --- a/outside/libuv-v1.7.5/src/unix/internal.h +++ /dev/null @@ -1,316 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#ifndef UV_UNIX_INTERNAL_H_ -#define UV_UNIX_INTERNAL_H_ - -#include "uv-common.h" - -#include -#include /* abort */ -#include /* strrchr */ -#include /* O_CLOEXEC, may be */ - -#if defined(__STRICT_ANSI__) -# define inline __inline -#endif - -#if defined(__linux__) -# include "linux-syscalls.h" -#endif /* __linux__ */ - -#if defined(__sun) -# include -# include -#endif /* __sun */ - -#if defined(_AIX) -#define reqevents events -#define rtnevents revents -#include -#endif /* _AIX */ - -#if defined(__APPLE__) && !TARGET_OS_IPHONE -# include -#endif - -#define ACCESS_ONCE(type, var) \ - (*(volatile type*) &(var)) - -#define ROUND_UP(a, b) \ - ((a) % (b) ? ((a) + (b)) - ((a) % (b)) : (a)) - -#define UNREACHABLE() \ - do { \ - assert(0 && "unreachable code"); \ - abort(); \ - } \ - while (0) - -#define SAVE_ERRNO(block) \ - do { \ - int _saved_errno = errno; \ - do { block; } while (0); \ - errno = _saved_errno; \ - } \ - while (0) - -/* The __clang__ and __INTEL_COMPILER checks are superfluous because they - * define __GNUC__. They are here to convey to you, dear reader, that these - * macros are enabled when compiling with clang or icc. - */ -#if defined(__clang__) || \ - defined(__GNUC__) || \ - defined(__INTEL_COMPILER) || \ - defined(__SUNPRO_C) -# define UV_DESTRUCTOR(declaration) __attribute__((destructor)) declaration -# define UV_UNUSED(declaration) __attribute__((unused)) declaration -#else -# define UV_DESTRUCTOR(declaration) declaration -# define UV_UNUSED(declaration) declaration -#endif - -#if defined(__linux__) -# define UV__POLLIN UV__EPOLLIN -# define UV__POLLOUT UV__EPOLLOUT -# define UV__POLLERR UV__EPOLLERR -# define UV__POLLHUP UV__EPOLLHUP -#endif - -#if defined(__sun) || defined(_AIX) -# define UV__POLLIN POLLIN -# define UV__POLLOUT POLLOUT -# define UV__POLLERR POLLERR -# define UV__POLLHUP POLLHUP -#endif - -#ifndef UV__POLLIN -# define UV__POLLIN 1 -#endif - -#ifndef UV__POLLOUT -# define UV__POLLOUT 2 -#endif - -#ifndef UV__POLLERR -# define UV__POLLERR 4 -#endif - -#ifndef UV__POLLHUP -# define UV__POLLHUP 8 -#endif - -#if !defined(O_CLOEXEC) && defined(__FreeBSD__) -/* - * It may be that we are just missing `__POSIX_VISIBLE >= 200809`. - * Try using fixed value const and give up, if it doesn't work - */ -# define O_CLOEXEC 0x00100000 -#endif - -typedef struct uv__stream_queued_fds_s uv__stream_queued_fds_t; - -/* handle flags */ -enum { - UV_CLOSING = 0x01, /* uv_close() called but not finished. */ - UV_CLOSED = 0x02, /* close(2) finished. */ - UV_STREAM_READING = 0x04, /* uv_read_start() called. */ - UV_STREAM_SHUTTING = 0x08, /* uv_shutdown() called but not complete. */ - UV_STREAM_SHUT = 0x10, /* Write side closed. */ - UV_STREAM_READABLE = 0x20, /* The stream is readable */ - UV_STREAM_WRITABLE = 0x40, /* The stream is writable */ - UV_STREAM_BLOCKING = 0x80, /* Synchronous writes. */ - UV_STREAM_READ_PARTIAL = 0x100, /* read(2) read less than requested. */ - UV_STREAM_READ_EOF = 0x200, /* read(2) read EOF. */ - UV_TCP_NODELAY = 0x400, /* Disable Nagle. */ - UV_TCP_KEEPALIVE = 0x800, /* Turn on keep-alive. */ - UV_TCP_SINGLE_ACCEPT = 0x1000, /* Only accept() when idle. */ - UV_HANDLE_IPV6 = 0x10000, /* Handle is bound to a IPv6 socket. */ - UV_UDP_PROCESSING = 0x20000 /* Handle is running the send callback queue. */ -}; - -/* loop flags */ -enum { - UV_LOOP_BLOCK_SIGPROF = 1 -}; - -typedef enum { - UV_CLOCK_PRECISE = 0, /* Use the highest resolution clock available. */ - UV_CLOCK_FAST = 1 /* Use the fastest clock with <= 1ms granularity. */ -} uv_clocktype_t; - -struct uv__stream_queued_fds_s { - unsigned int size; - unsigned int offset; - int fds[1]; -}; - - -/* core */ -int uv__nonblock(int fd, int set); -int uv__close(int fd); -int uv__cloexec(int fd, int set); -int uv__socket(int domain, int type, int protocol); -int uv__dup(int fd); -ssize_t uv__recvmsg(int fd, struct msghdr *msg, int flags); -void uv__make_close_pending(uv_handle_t* handle); -int uv__getiovmax(void); - -void uv__io_init(uv__io_t* w, uv__io_cb cb, int fd); -void uv__io_start(uv_loop_t* loop, uv__io_t* w, unsigned int events); -void uv__io_stop(uv_loop_t* loop, uv__io_t* w, unsigned int events); -void uv__io_close(uv_loop_t* loop, uv__io_t* w); -void uv__io_feed(uv_loop_t* loop, uv__io_t* w); -int uv__io_active(const uv__io_t* w, unsigned int events); -void uv__io_poll(uv_loop_t* loop, int timeout); /* in milliseconds or -1 */ - -/* async */ -void uv__async_send(struct uv__async* wa); -void uv__async_init(struct uv__async* wa); -int uv__async_start(uv_loop_t* loop, struct uv__async* wa, uv__async_cb cb); -void uv__async_stop(uv_loop_t* loop, struct uv__async* wa); - -/* loop */ -void uv__run_idle(uv_loop_t* loop); -void uv__run_check(uv_loop_t* loop); -void uv__run_prepare(uv_loop_t* loop); - -/* stream */ -void uv__stream_init(uv_loop_t* loop, uv_stream_t* stream, - uv_handle_type type); -int uv__stream_open(uv_stream_t*, int fd, int flags); -void uv__stream_destroy(uv_stream_t* stream); -#if defined(__APPLE__) -int uv__stream_try_select(uv_stream_t* stream, int* fd); -#endif /* defined(__APPLE__) */ -void uv__server_io(uv_loop_t* loop, uv__io_t* w, unsigned int events); -int uv__accept(int sockfd); -int uv__dup2_cloexec(int oldfd, int newfd); -int uv__open_cloexec(const char* path, int flags); - -/* tcp */ -int uv_tcp_listen(uv_tcp_t* tcp, int backlog, uv_connection_cb cb); -int uv__tcp_nodelay(int fd, int on); -int uv__tcp_keepalive(int fd, int on, unsigned int delay); - -/* pipe */ -int uv_pipe_listen(uv_pipe_t* handle, int backlog, uv_connection_cb cb); - -/* timer */ -void uv__run_timers(uv_loop_t* loop); -int uv__next_timeout(const uv_loop_t* loop); - -/* signal */ -void uv__signal_close(uv_signal_t* handle); -void uv__signal_global_once_init(void); -void uv__signal_loop_cleanup(uv_loop_t* loop); - -/* platform specific */ -uint64_t uv__hrtime(uv_clocktype_t type); -int uv__kqueue_init(uv_loop_t* loop); -int uv__platform_loop_init(uv_loop_t* loop); -void uv__platform_loop_delete(uv_loop_t* loop); -void uv__platform_invalidate_fd(uv_loop_t* loop, int fd); - -/* various */ -void uv__async_close(uv_async_t* handle); -void uv__check_close(uv_check_t* handle); -void uv__fs_event_close(uv_fs_event_t* handle); -void uv__idle_close(uv_idle_t* handle); -void uv__pipe_close(uv_pipe_t* handle); -void uv__poll_close(uv_poll_t* handle); -void uv__prepare_close(uv_prepare_t* handle); -void uv__process_close(uv_process_t* handle); -void uv__stream_close(uv_stream_t* handle); -void uv__tcp_close(uv_tcp_t* handle); -void uv__timer_close(uv_timer_t* handle); -void uv__udp_close(uv_udp_t* handle); -void uv__udp_finish_close(uv_udp_t* handle); -uv_handle_type uv__handle_type(int fd); - -#if defined(__APPLE__) -int uv___stream_fd(const uv_stream_t* handle); -#define uv__stream_fd(handle) (uv___stream_fd((const uv_stream_t*) (handle))) -#else -#define uv__stream_fd(handle) ((handle)->io_watcher.fd) -#endif /* defined(__APPLE__) */ - -#ifdef UV__O_NONBLOCK -# define UV__F_NONBLOCK UV__O_NONBLOCK -#else -# define UV__F_NONBLOCK 1 -#endif - -int uv__make_socketpair(int fds[2], int flags); -int uv__make_pipe(int fds[2], int flags); - -#if defined(__APPLE__) - -int uv__fsevents_init(uv_fs_event_t* handle); -int uv__fsevents_close(uv_fs_event_t* handle); -void uv__fsevents_loop_delete(uv_loop_t* loop); - -/* OSX < 10.7 has no file events, polyfill them */ -#ifndef MAC_OS_X_VERSION_10_7 - -static const int kFSEventStreamCreateFlagFileEvents = 0x00000010; -static const int kFSEventStreamEventFlagItemCreated = 0x00000100; -static const int kFSEventStreamEventFlagItemRemoved = 0x00000200; -static const int kFSEventStreamEventFlagItemInodeMetaMod = 0x00000400; -static const int kFSEventStreamEventFlagItemRenamed = 0x00000800; -static const int kFSEventStreamEventFlagItemModified = 0x00001000; -static const int kFSEventStreamEventFlagItemFinderInfoMod = 0x00002000; -static const int kFSEventStreamEventFlagItemChangeOwner = 0x00004000; -static const int kFSEventStreamEventFlagItemXattrMod = 0x00008000; -static const int kFSEventStreamEventFlagItemIsFile = 0x00010000; -static const int kFSEventStreamEventFlagItemIsDir = 0x00020000; -static const int kFSEventStreamEventFlagItemIsSymlink = 0x00040000; - -#endif /* __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070 */ - -#endif /* defined(__APPLE__) */ - -UV_UNUSED(static void uv__req_init(uv_loop_t* loop, - uv_req_t* req, - uv_req_type type)) { - req->type = type; - uv__req_register(loop, req); -} -#define uv__req_init(loop, req, type) \ - uv__req_init((loop), (uv_req_t*)(req), (type)) - -UV_UNUSED(static void uv__update_time(uv_loop_t* loop)) { - /* Use a fast time source if available. We only need millisecond precision. - */ - loop->time = uv__hrtime(UV_CLOCK_FAST) / 1000000; -} - -UV_UNUSED(static char* uv__basename_r(const char* path)) { - char* s; - - s = strrchr(path, '/'); - if (s == NULL) - return (char*) path; - - return s + 1; -} - -#endif /* UV_UNIX_INTERNAL_H_ */ diff --git a/outside/libuv-v1.7.5/src/unix/kqueue.c b/outside/libuv-v1.7.5/src/unix/kqueue.c deleted file mode 100644 index 495f20d28..000000000 --- a/outside/libuv-v1.7.5/src/unix/kqueue.c +++ /dev/null @@ -1,426 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * 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. - */ - -#include "uv.h" -#include "internal.h" - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -static void uv__fs_event(uv_loop_t* loop, uv__io_t* w, unsigned int fflags); - - -int uv__kqueue_init(uv_loop_t* loop) { - loop->backend_fd = kqueue(); - if (loop->backend_fd == -1) - return -errno; - - uv__cloexec(loop->backend_fd, 1); - - return 0; -} - - -void uv__io_poll(uv_loop_t* loop, int timeout) { - struct kevent events[1024]; - struct kevent* ev; - struct timespec spec; - unsigned int nevents; - unsigned int revents; - QUEUE* q; - uv__io_t* w; - sigset_t* pset; - sigset_t set; - uint64_t base; - uint64_t diff; - int filter; - int fflags; - int count; - int nfds; - int fd; - int op; - int i; - - if (loop->nfds == 0) { - assert(QUEUE_EMPTY(&loop->watcher_queue)); - return; - } - - nevents = 0; - - while (!QUEUE_EMPTY(&loop->watcher_queue)) { - q = QUEUE_HEAD(&loop->watcher_queue); - QUEUE_REMOVE(q); - QUEUE_INIT(q); - - w = QUEUE_DATA(q, uv__io_t, watcher_queue); - assert(w->pevents != 0); - assert(w->fd >= 0); - assert(w->fd < (int) loop->nwatchers); - - if ((w->events & UV__POLLIN) == 0 && (w->pevents & UV__POLLIN) != 0) { - filter = EVFILT_READ; - fflags = 0; - op = EV_ADD; - - if (w->cb == uv__fs_event) { - filter = EVFILT_VNODE; - fflags = NOTE_ATTRIB | NOTE_WRITE | NOTE_RENAME - | NOTE_DELETE | NOTE_EXTEND | NOTE_REVOKE; - op = EV_ADD | EV_ONESHOT; /* Stop the event from firing repeatedly. */ - } - - EV_SET(events + nevents, w->fd, filter, op, fflags, 0, 0); - - if (++nevents == ARRAY_SIZE(events)) { - if (kevent(loop->backend_fd, events, nevents, NULL, 0, NULL)) - abort(); - nevents = 0; - } - } - - if ((w->events & UV__POLLOUT) == 0 && (w->pevents & UV__POLLOUT) != 0) { - EV_SET(events + nevents, w->fd, EVFILT_WRITE, EV_ADD, 0, 0, 0); - - if (++nevents == ARRAY_SIZE(events)) { - if (kevent(loop->backend_fd, events, nevents, NULL, 0, NULL)) - abort(); - nevents = 0; - } - } - - w->events = w->pevents; - } - - pset = NULL; - if (loop->flags & UV_LOOP_BLOCK_SIGPROF) { - pset = &set; - sigemptyset(pset); - sigaddset(pset, SIGPROF); - } - - assert(timeout >= -1); - base = loop->time; - count = 48; /* Benchmarks suggest this gives the best throughput. */ - - for (;; nevents = 0) { - if (timeout != -1) { - spec.tv_sec = timeout / 1000; - spec.tv_nsec = (timeout % 1000) * 1000000; - } - - if (pset != NULL) - pthread_sigmask(SIG_BLOCK, pset, NULL); - - nfds = kevent(loop->backend_fd, - events, - nevents, - events, - ARRAY_SIZE(events), - timeout == -1 ? NULL : &spec); - - if (pset != NULL) - pthread_sigmask(SIG_UNBLOCK, pset, NULL); - - /* Update loop->time unconditionally. It's tempting to skip the update when - * timeout == 0 (i.e. non-blocking poll) but there is no guarantee that the - * operating system didn't reschedule our process while in the syscall. - */ - SAVE_ERRNO(uv__update_time(loop)); - - if (nfds == 0) { - assert(timeout != -1); - return; - } - - if (nfds == -1) { - if (errno != EINTR) - abort(); - - if (timeout == 0) - return; - - if (timeout == -1) - continue; - - /* Interrupted by a signal. Update timeout and poll again. */ - goto update_timeout; - } - - nevents = 0; - - assert(loop->watchers != NULL); - loop->watchers[loop->nwatchers] = (void*) events; - loop->watchers[loop->nwatchers + 1] = (void*) (uintptr_t) nfds; - for (i = 0; i < nfds; i++) { - ev = events + i; - fd = ev->ident; - /* Skip invalidated events, see uv__platform_invalidate_fd */ - if (fd == -1) - continue; - w = loop->watchers[fd]; - - if (w == NULL) { - /* File descriptor that we've stopped watching, disarm it. */ - /* TODO batch up */ - struct kevent events[1]; - - EV_SET(events + 0, fd, ev->filter, EV_DELETE, 0, 0, 0); - if (kevent(loop->backend_fd, events, 1, NULL, 0, NULL)) - if (errno != EBADF && errno != ENOENT) - abort(); - - continue; - } - - if (ev->filter == EVFILT_VNODE) { - assert(w->events == UV__POLLIN); - assert(w->pevents == UV__POLLIN); - w->cb(loop, w, ev->fflags); /* XXX always uv__fs_event() */ - nevents++; - continue; - } - - revents = 0; - - if (ev->filter == EVFILT_READ) { - if (w->pevents & UV__POLLIN) { - revents |= UV__POLLIN; - w->rcount = ev->data; - } else { - /* TODO batch up */ - struct kevent events[1]; - EV_SET(events + 0, fd, ev->filter, EV_DELETE, 0, 0, 0); - if (kevent(loop->backend_fd, events, 1, NULL, 0, NULL)) - if (errno != ENOENT) - abort(); - } - } - - if (ev->filter == EVFILT_WRITE) { - if (w->pevents & UV__POLLOUT) { - revents |= UV__POLLOUT; - w->wcount = ev->data; - } else { - /* TODO batch up */ - struct kevent events[1]; - EV_SET(events + 0, fd, ev->filter, EV_DELETE, 0, 0, 0); - if (kevent(loop->backend_fd, events, 1, NULL, 0, NULL)) - if (errno != ENOENT) - abort(); - } - } - - if (ev->flags & EV_ERROR) - revents |= UV__POLLERR; - - if (revents == 0) - continue; - - w->cb(loop, w, revents); - nevents++; - } - loop->watchers[loop->nwatchers] = NULL; - loop->watchers[loop->nwatchers + 1] = NULL; - - if (nevents != 0) { - if (nfds == ARRAY_SIZE(events) && --count != 0) { - /* Poll for more events but don't block this time. */ - timeout = 0; - continue; - } - return; - } - - if (timeout == 0) - return; - - if (timeout == -1) - continue; - -update_timeout: - assert(timeout > 0); - - diff = loop->time - base; - if (diff >= (uint64_t) timeout) - return; - - timeout -= diff; - } -} - - -void uv__platform_invalidate_fd(uv_loop_t* loop, int fd) { - struct kevent* events; - uintptr_t i; - uintptr_t nfds; - - assert(loop->watchers != NULL); - - events = (struct kevent*) loop->watchers[loop->nwatchers]; - nfds = (uintptr_t) loop->watchers[loop->nwatchers + 1]; - if (events == NULL) - return; - - /* Invalidate events with same file descriptor */ - for (i = 0; i < nfds; i++) - if ((int) events[i].ident == fd) - events[i].ident = -1; -} - - -static void uv__fs_event(uv_loop_t* loop, uv__io_t* w, unsigned int fflags) { - uv_fs_event_t* handle; - struct kevent ev; - int events; - const char* path; -#if defined(F_GETPATH) - /* MAXPATHLEN == PATH_MAX but the former is what XNU calls it internally. */ - char pathbuf[MAXPATHLEN]; -#endif - - handle = container_of(w, uv_fs_event_t, event_watcher); - - if (fflags & (NOTE_ATTRIB | NOTE_EXTEND)) - events = UV_CHANGE; - else - events = UV_RENAME; - - path = NULL; -#if defined(F_GETPATH) - /* Also works when the file has been unlinked from the file system. Passing - * in the path when the file has been deleted is arguably a little strange - * but it's consistent with what the inotify backend does. - */ - if (fcntl(handle->event_watcher.fd, F_GETPATH, pathbuf) == 0) - path = uv__basename_r(pathbuf); -#endif - handle->cb(handle, path, events, 0); - - if (handle->event_watcher.fd == -1) - return; - - /* Watcher operates in one-shot mode, re-arm it. */ - fflags = NOTE_ATTRIB | NOTE_WRITE | NOTE_RENAME - | NOTE_DELETE | NOTE_EXTEND | NOTE_REVOKE; - - EV_SET(&ev, w->fd, EVFILT_VNODE, EV_ADD | EV_ONESHOT, fflags, 0, 0); - - if (kevent(loop->backend_fd, &ev, 1, NULL, 0, NULL)) - abort(); -} - - -int uv_fs_event_init(uv_loop_t* loop, uv_fs_event_t* handle) { - uv__handle_init(loop, (uv_handle_t*)handle, UV_FS_EVENT); - return 0; -} - - -int uv_fs_event_start(uv_fs_event_t* handle, - uv_fs_event_cb cb, - const char* path, - unsigned int flags) { -#if defined(__APPLE__) - struct stat statbuf; -#endif /* defined(__APPLE__) */ - int fd; - - if (uv__is_active(handle)) - return -EINVAL; - - /* TODO open asynchronously - but how do we report back errors? */ - fd = open(path, O_RDONLY); - if (fd == -1) - return -errno; - - uv__handle_start(handle); - uv__io_init(&handle->event_watcher, uv__fs_event, fd); - handle->path = uv__strdup(path); - handle->cb = cb; - -#if defined(__APPLE__) - /* Nullify field to perform checks later */ - handle->cf_cb = NULL; - handle->realpath = NULL; - handle->realpath_len = 0; - handle->cf_flags = flags; - - if (fstat(fd, &statbuf)) - goto fallback; - /* FSEvents works only with directories */ - if (!(statbuf.st_mode & S_IFDIR)) - goto fallback; - - /* The fallback fd is no longer needed */ - uv__close(fd); - handle->event_watcher.fd = -1; - - return uv__fsevents_init(handle); - -fallback: -#endif /* defined(__APPLE__) */ - - uv__io_start(handle->loop, &handle->event_watcher, UV__POLLIN); - - return 0; -} - - -int uv_fs_event_stop(uv_fs_event_t* handle) { - if (!uv__is_active(handle)) - return 0; - - uv__handle_stop(handle); - -#if defined(__APPLE__) - if (uv__fsevents_close(handle)) -#endif /* defined(__APPLE__) */ - { - uv__io_close(handle->loop, &handle->event_watcher); - } - - uv__free(handle->path); - handle->path = NULL; - - if (handle->event_watcher.fd != -1) { - /* When FSEvents is used, we don't use the event_watcher's fd under certain - * confitions. (see uv_fs_event_start) */ - uv__close(handle->event_watcher.fd); - handle->event_watcher.fd = -1; - } - - return 0; -} - - -void uv__fs_event_close(uv_fs_event_t* handle) { - uv_fs_event_stop(handle); -} diff --git a/outside/libuv-v1.7.5/src/unix/linux-core.c b/outside/libuv-v1.7.5/src/unix/linux-core.c deleted file mode 100644 index e6e68283d..000000000 --- a/outside/libuv-v1.7.5/src/unix/linux-core.c +++ /dev/null @@ -1,897 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * 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. - */ - -#include "uv.h" -#include "internal.h" - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#define HAVE_IFADDRS_H 1 - -#ifdef __UCLIBC__ -# if __UCLIBC_MAJOR__ < 0 || __UCLIBC_MINOR__ < 9 || __UCLIBC_SUBLEVEL__ < 32 -# undef HAVE_IFADDRS_H -# endif -#endif - -#ifdef HAVE_IFADDRS_H -# if defined(__ANDROID__) -# include "android-ifaddrs.h" -# else -# include -# endif -# include -# include -# include -#endif /* HAVE_IFADDRS_H */ - -/* Available from 2.6.32 onwards. */ -#ifndef CLOCK_MONOTONIC_COARSE -# define CLOCK_MONOTONIC_COARSE 6 -#endif - -/* This is rather annoying: CLOCK_BOOTTIME lives in but we can't - * include that file because it conflicts with . We'll just have to - * define it ourselves. - */ -#ifndef CLOCK_BOOTTIME -# define CLOCK_BOOTTIME 7 -#endif - -static int read_models(unsigned int numcpus, uv_cpu_info_t* ci); -static int read_times(unsigned int numcpus, uv_cpu_info_t* ci); -static void read_speeds(unsigned int numcpus, uv_cpu_info_t* ci); -static unsigned long read_cpufreq(unsigned int cpunum); - - -int uv__platform_loop_init(uv_loop_t* loop) { - int fd; - - fd = uv__epoll_create1(UV__EPOLL_CLOEXEC); - - /* epoll_create1() can fail either because it's not implemented (old kernel) - * or because it doesn't understand the EPOLL_CLOEXEC flag. - */ - if (fd == -1 && (errno == ENOSYS || errno == EINVAL)) { - fd = uv__epoll_create(256); - - if (fd != -1) - uv__cloexec(fd, 1); - } - - loop->backend_fd = fd; - loop->inotify_fd = -1; - loop->inotify_watchers = NULL; - - if (fd == -1) - return -errno; - - return 0; -} - - -void uv__platform_loop_delete(uv_loop_t* loop) { - if (loop->inotify_fd == -1) return; - uv__io_stop(loop, &loop->inotify_read_watcher, UV__POLLIN); - uv__close(loop->inotify_fd); - loop->inotify_fd = -1; -} - - -void uv__platform_invalidate_fd(uv_loop_t* loop, int fd) { - struct uv__epoll_event* events; - struct uv__epoll_event dummy; - uintptr_t i; - uintptr_t nfds; - - assert(loop->watchers != NULL); - - events = (struct uv__epoll_event*) loop->watchers[loop->nwatchers]; - nfds = (uintptr_t) loop->watchers[loop->nwatchers + 1]; - if (events != NULL) - /* Invalidate events with same file descriptor */ - for (i = 0; i < nfds; i++) - if ((int) events[i].data == fd) - events[i].data = -1; - - /* Remove the file descriptor from the epoll. - * This avoids a problem where the same file description remains open - * in another process, causing repeated junk epoll events. - * - * We pass in a dummy epoll_event, to work around a bug in old kernels. - */ - if (loop->backend_fd >= 0) { - /* Work around a bug in kernels 3.10 to 3.19 where passing a struct that - * has the EPOLLWAKEUP flag set generates spurious audit syslog warnings. - */ - memset(&dummy, 0, sizeof(dummy)); - uv__epoll_ctl(loop->backend_fd, UV__EPOLL_CTL_DEL, fd, &dummy); - } -} - - -void uv__io_poll(uv_loop_t* loop, int timeout) { - /* A bug in kernels < 2.6.37 makes timeouts larger than ~30 minutes - * effectively infinite on 32 bits architectures. To avoid blocking - * indefinitely, we cap the timeout and poll again if necessary. - * - * Note that "30 minutes" is a simplification because it depends on - * the value of CONFIG_HZ. The magic constant assumes CONFIG_HZ=1200, - * that being the largest value I have seen in the wild (and only once.) - */ - static const int max_safe_timeout = 1789569; - static int no_epoll_pwait; - static int no_epoll_wait; - struct uv__epoll_event events[1024]; - struct uv__epoll_event* pe; - struct uv__epoll_event e; - int real_timeout; - QUEUE* q; - uv__io_t* w; - sigset_t sigset; - uint64_t sigmask; - uint64_t base; - int nevents; - int count; - int nfds; - int fd; - int op; - int i; - - if (loop->nfds == 0) { - assert(QUEUE_EMPTY(&loop->watcher_queue)); - return; - } - - while (!QUEUE_EMPTY(&loop->watcher_queue)) { - q = QUEUE_HEAD(&loop->watcher_queue); - QUEUE_REMOVE(q); - QUEUE_INIT(q); - - w = QUEUE_DATA(q, uv__io_t, watcher_queue); - assert(w->pevents != 0); - assert(w->fd >= 0); - assert(w->fd < (int) loop->nwatchers); - - e.events = w->pevents; - e.data = w->fd; - - if (w->events == 0) - op = UV__EPOLL_CTL_ADD; - else - op = UV__EPOLL_CTL_MOD; - - /* XXX Future optimization: do EPOLL_CTL_MOD lazily if we stop watching - * events, skip the syscall and squelch the events after epoll_wait(). - */ - if (uv__epoll_ctl(loop->backend_fd, op, w->fd, &e)) { - if (errno != EEXIST) - abort(); - - assert(op == UV__EPOLL_CTL_ADD); - - /* We've reactivated a file descriptor that's been watched before. */ - if (uv__epoll_ctl(loop->backend_fd, UV__EPOLL_CTL_MOD, w->fd, &e)) - abort(); - } - - w->events = w->pevents; - } - - sigmask = 0; - if (loop->flags & UV_LOOP_BLOCK_SIGPROF) { - sigemptyset(&sigset); - sigaddset(&sigset, SIGPROF); - sigmask |= 1 << (SIGPROF - 1); - } - - assert(timeout >= -1); - base = loop->time; - count = 48; /* Benchmarks suggest this gives the best throughput. */ - real_timeout = timeout; - - for (;;) { - /* See the comment for max_safe_timeout for an explanation of why - * this is necessary. Executive summary: kernel bug workaround. - */ - if (sizeof(int32_t) == sizeof(long) && timeout >= max_safe_timeout) - timeout = max_safe_timeout; - - if (sigmask != 0 && no_epoll_pwait != 0) - if (pthread_sigmask(SIG_BLOCK, &sigset, NULL)) - abort(); - - if (no_epoll_wait != 0 || (sigmask != 0 && no_epoll_pwait == 0)) { - nfds = uv__epoll_pwait(loop->backend_fd, - events, - ARRAY_SIZE(events), - timeout, - sigmask); - if (nfds == -1 && errno == ENOSYS) - no_epoll_pwait = 1; - } else { - nfds = uv__epoll_wait(loop->backend_fd, - events, - ARRAY_SIZE(events), - timeout); - if (nfds == -1 && errno == ENOSYS) - no_epoll_wait = 1; - } - - if (sigmask != 0 && no_epoll_pwait != 0) - if (pthread_sigmask(SIG_UNBLOCK, &sigset, NULL)) - abort(); - - /* Update loop->time unconditionally. It's tempting to skip the update when - * timeout == 0 (i.e. non-blocking poll) but there is no guarantee that the - * operating system didn't reschedule our process while in the syscall. - */ - SAVE_ERRNO(uv__update_time(loop)); - - if (nfds == 0) { - assert(timeout != -1); - - timeout = real_timeout - timeout; - if (timeout > 0) - continue; - - return; - } - - if (nfds == -1) { - if (errno == ENOSYS) { - /* epoll_wait() or epoll_pwait() failed, try the other system call. */ - assert(no_epoll_wait == 0 || no_epoll_pwait == 0); - continue; - } - - if (errno != EINTR) - abort(); - - if (timeout == -1) - continue; - - if (timeout == 0) - return; - - /* Interrupted by a signal. Update timeout and poll again. */ - goto update_timeout; - } - - nevents = 0; - - assert(loop->watchers != NULL); - loop->watchers[loop->nwatchers] = (void*) events; - loop->watchers[loop->nwatchers + 1] = (void*) (uintptr_t) nfds; - for (i = 0; i < nfds; i++) { - pe = events + i; - fd = pe->data; - - /* Skip invalidated events, see uv__platform_invalidate_fd */ - if (fd == -1) - continue; - - assert(fd >= 0); - assert((unsigned) fd < loop->nwatchers); - - w = loop->watchers[fd]; - - if (w == NULL) { - /* File descriptor that we've stopped watching, disarm it. - * - * Ignore all errors because we may be racing with another thread - * when the file descriptor is closed. - */ - uv__epoll_ctl(loop->backend_fd, UV__EPOLL_CTL_DEL, fd, pe); - continue; - } - - /* Give users only events they're interested in. Prevents spurious - * callbacks when previous callback invocation in this loop has stopped - * the current watcher. Also, filters out events that users has not - * requested us to watch. - */ - pe->events &= w->pevents | UV__POLLERR | UV__POLLHUP; - - /* Work around an epoll quirk where it sometimes reports just the - * EPOLLERR or EPOLLHUP event. In order to force the event loop to - * move forward, we merge in the read/write events that the watcher - * is interested in; uv__read() and uv__write() will then deal with - * the error or hangup in the usual fashion. - * - * Note to self: happens when epoll reports EPOLLIN|EPOLLHUP, the user - * reads the available data, calls uv_read_stop(), then sometime later - * calls uv_read_start() again. By then, libuv has forgotten about the - * hangup and the kernel won't report EPOLLIN again because there's - * nothing left to read. If anything, libuv is to blame here. The - * current hack is just a quick bandaid; to properly fix it, libuv - * needs to remember the error/hangup event. We should get that for - * free when we switch over to edge-triggered I/O. - */ - if (pe->events == UV__EPOLLERR || pe->events == UV__EPOLLHUP) - pe->events |= w->pevents & (UV__EPOLLIN | UV__EPOLLOUT); - - if (pe->events != 0) { - w->cb(loop, w, pe->events); - nevents++; - } - } - loop->watchers[loop->nwatchers] = NULL; - loop->watchers[loop->nwatchers + 1] = NULL; - - if (nevents != 0) { - if (nfds == ARRAY_SIZE(events) && --count != 0) { - /* Poll for more events but don't block this time. */ - timeout = 0; - continue; - } - return; - } - - if (timeout == 0) - return; - - if (timeout == -1) - continue; - -update_timeout: - assert(timeout > 0); - - real_timeout -= (loop->time - base); - if (real_timeout <= 0) - return; - - timeout = real_timeout; - } -} - - -uint64_t uv__hrtime(uv_clocktype_t type) { - static clock_t fast_clock_id = -1; - struct timespec t; - clock_t clock_id; - - /* Prefer CLOCK_MONOTONIC_COARSE if available but only when it has - * millisecond granularity or better. CLOCK_MONOTONIC_COARSE is - * serviced entirely from the vDSO, whereas CLOCK_MONOTONIC may - * decide to make a costly system call. - */ - /* TODO(bnoordhuis) Use CLOCK_MONOTONIC_COARSE for UV_CLOCK_PRECISE - * when it has microsecond granularity or better (unlikely). - */ - if (type == UV_CLOCK_FAST && fast_clock_id == -1) { - if (clock_getres(CLOCK_MONOTONIC_COARSE, &t) == 0 && - t.tv_nsec <= 1 * 1000 * 1000) { - fast_clock_id = CLOCK_MONOTONIC_COARSE; - } else { - fast_clock_id = CLOCK_MONOTONIC; - } - } - - clock_id = CLOCK_MONOTONIC; - if (type == UV_CLOCK_FAST) - clock_id = fast_clock_id; - - if (clock_gettime(clock_id, &t)) - return 0; /* Not really possible. */ - - return t.tv_sec * (uint64_t) 1e9 + t.tv_nsec; -} - - -void uv_loadavg(double avg[3]) { - struct sysinfo info; - - if (sysinfo(&info) < 0) return; - - avg[0] = (double) info.loads[0] / 65536.0; - avg[1] = (double) info.loads[1] / 65536.0; - avg[2] = (double) info.loads[2] / 65536.0; -} - - -int uv_exepath(char* buffer, size_t* size) { - ssize_t n; - - if (buffer == NULL || size == NULL || *size == 0) - return -EINVAL; - - n = *size - 1; - if (n > 0) - n = readlink("/proc/self/exe", buffer, n); - - if (n == -1) - return -errno; - - buffer[n] = '\0'; - *size = n; - - return 0; -} - - -uint64_t uv_get_free_memory(void) { - return (uint64_t) sysconf(_SC_PAGESIZE) * sysconf(_SC_AVPHYS_PAGES); -} - - -uint64_t uv_get_total_memory(void) { - return (uint64_t) sysconf(_SC_PAGESIZE) * sysconf(_SC_PHYS_PAGES); -} - - -int uv_resident_set_memory(size_t* rss) { - char buf[1024]; - const char* s; - ssize_t n; - long val; - int fd; - int i; - - do - fd = open("/proc/self/stat", O_RDONLY); - while (fd == -1 && errno == EINTR); - - if (fd == -1) - return -errno; - - do - n = read(fd, buf, sizeof(buf) - 1); - while (n == -1 && errno == EINTR); - - uv__close(fd); - if (n == -1) - return -errno; - buf[n] = '\0'; - - s = strchr(buf, ' '); - if (s == NULL) - goto err; - - s += 1; - if (*s != '(') - goto err; - - s = strchr(s, ')'); - if (s == NULL) - goto err; - - for (i = 1; i <= 22; i++) { - s = strchr(s + 1, ' '); - if (s == NULL) - goto err; - } - - errno = 0; - val = strtol(s, NULL, 10); - if (errno != 0) - goto err; - if (val < 0) - goto err; - - *rss = val * getpagesize(); - return 0; - -err: - return -EINVAL; -} - - -int uv_uptime(double* uptime) { - static volatile int no_clock_boottime; - struct timespec now; - int r; - - /* Try CLOCK_BOOTTIME first, fall back to CLOCK_MONOTONIC if not available - * (pre-2.6.39 kernels). CLOCK_MONOTONIC doesn't increase when the system - * is suspended. - */ - if (no_clock_boottime) { - retry: r = clock_gettime(CLOCK_MONOTONIC, &now); - } - else if ((r = clock_gettime(CLOCK_BOOTTIME, &now)) && errno == EINVAL) { - no_clock_boottime = 1; - goto retry; - } - - if (r) - return -errno; - - *uptime = now.tv_sec; - return 0; -} - - -int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count) { - unsigned int numcpus; - uv_cpu_info_t* ci; - int err; - - *cpu_infos = NULL; - *count = 0; - - numcpus = sysconf(_SC_NPROCESSORS_ONLN); - assert(numcpus != (unsigned int) -1); - assert(numcpus != 0); - - ci = uv__calloc(numcpus, sizeof(*ci)); - if (ci == NULL) - return -ENOMEM; - - err = read_models(numcpus, ci); - if (err == 0) - err = read_times(numcpus, ci); - - if (err) { - uv_free_cpu_info(ci, numcpus); - return err; - } - - /* read_models() on x86 also reads the CPU speed from /proc/cpuinfo. - * We don't check for errors here. Worst case, the field is left zero. - */ - if (ci[0].speed == 0) - read_speeds(numcpus, ci); - - *cpu_infos = ci; - *count = numcpus; - - return 0; -} - - -static void read_speeds(unsigned int numcpus, uv_cpu_info_t* ci) { - unsigned int num; - - for (num = 0; num < numcpus; num++) - ci[num].speed = read_cpufreq(num) / 1000; -} - - -/* Also reads the CPU frequency on x86. The other architectures only have - * a BogoMIPS field, which may not be very accurate. - * - * Note: Simply returns on error, uv_cpu_info() takes care of the cleanup. - */ -static int read_models(unsigned int numcpus, uv_cpu_info_t* ci) { - static const char model_marker[] = "model name\t: "; - static const char speed_marker[] = "cpu MHz\t\t: "; - const char* inferred_model; - unsigned int model_idx; - unsigned int speed_idx; - char buf[1024]; - char* model; - FILE* fp; - - /* Most are unused on non-ARM, non-MIPS and non-x86 architectures. */ - (void) &model_marker; - (void) &speed_marker; - (void) &speed_idx; - (void) &model; - (void) &buf; - (void) &fp; - - model_idx = 0; - speed_idx = 0; - -#if defined(__arm__) || \ - defined(__i386__) || \ - defined(__mips__) || \ - defined(__x86_64__) - fp = fopen("/proc/cpuinfo", "r"); - if (fp == NULL) - return -errno; - - while (fgets(buf, sizeof(buf), fp)) { - if (model_idx < numcpus) { - if (strncmp(buf, model_marker, sizeof(model_marker) - 1) == 0) { - model = buf + sizeof(model_marker) - 1; - model = uv__strndup(model, strlen(model) - 1); /* Strip newline. */ - if (model == NULL) { - fclose(fp); - return -ENOMEM; - } - ci[model_idx++].model = model; - continue; - } - } -#if defined(__arm__) || defined(__mips__) - if (model_idx < numcpus) { -#if defined(__arm__) - /* Fallback for pre-3.8 kernels. */ - static const char model_marker[] = "Processor\t: "; -#else /* defined(__mips__) */ - static const char model_marker[] = "cpu model\t\t: "; -#endif - if (strncmp(buf, model_marker, sizeof(model_marker) - 1) == 0) { - model = buf + sizeof(model_marker) - 1; - model = uv__strndup(model, strlen(model) - 1); /* Strip newline. */ - if (model == NULL) { - fclose(fp); - return -ENOMEM; - } - ci[model_idx++].model = model; - continue; - } - } -#else /* !__arm__ && !__mips__ */ - if (speed_idx < numcpus) { - if (strncmp(buf, speed_marker, sizeof(speed_marker) - 1) == 0) { - ci[speed_idx++].speed = atoi(buf + sizeof(speed_marker) - 1); - continue; - } - } -#endif /* __arm__ || __mips__ */ - } - - fclose(fp); -#endif /* __arm__ || __i386__ || __mips__ || __x86_64__ */ - - /* Now we want to make sure that all the models contain *something* because - * it's not safe to leave them as null. Copy the last entry unless there - * isn't one, in that case we simply put "unknown" into everything. - */ - inferred_model = "unknown"; - if (model_idx > 0) - inferred_model = ci[model_idx - 1].model; - - while (model_idx < numcpus) { - model = uv__strndup(inferred_model, strlen(inferred_model)); - if (model == NULL) - return -ENOMEM; - ci[model_idx++].model = model; - } - - return 0; -} - - -static int read_times(unsigned int numcpus, uv_cpu_info_t* ci) { - unsigned long clock_ticks; - struct uv_cpu_times_s ts; - unsigned long user; - unsigned long nice; - unsigned long sys; - unsigned long idle; - unsigned long dummy; - unsigned long irq; - unsigned int num; - unsigned int len; - char buf[1024]; - FILE* fp; - - clock_ticks = sysconf(_SC_CLK_TCK); - assert(clock_ticks != (unsigned long) -1); - assert(clock_ticks != 0); - - fp = fopen("/proc/stat", "r"); - if (fp == NULL) - return -errno; - - if (!fgets(buf, sizeof(buf), fp)) - abort(); - - num = 0; - - while (fgets(buf, sizeof(buf), fp)) { - if (num >= numcpus) - break; - - if (strncmp(buf, "cpu", 3)) - break; - - /* skip "cpu " marker */ - { - unsigned int n; - int r = sscanf(buf, "cpu%u ", &n); - assert(r == 1); - (void) r; /* silence build warning */ - for (len = sizeof("cpu0"); n /= 10; len++); - } - - /* Line contains user, nice, system, idle, iowait, irq, softirq, steal, - * guest, guest_nice but we're only interested in the first four + irq. - * - * Don't use %*s to skip fields or %ll to read straight into the uint64_t - * fields, they're not allowed in C89 mode. - */ - if (6 != sscanf(buf + len, - "%lu %lu %lu %lu %lu %lu", - &user, - &nice, - &sys, - &idle, - &dummy, - &irq)) - abort(); - - ts.user = clock_ticks * user; - ts.nice = clock_ticks * nice; - ts.sys = clock_ticks * sys; - ts.idle = clock_ticks * idle; - ts.irq = clock_ticks * irq; - ci[num++].cpu_times = ts; - } - fclose(fp); - assert(num == numcpus); - - return 0; -} - - -static unsigned long read_cpufreq(unsigned int cpunum) { - unsigned long val; - char buf[1024]; - FILE* fp; - - snprintf(buf, - sizeof(buf), - "/sys/devices/system/cpu/cpu%u/cpufreq/scaling_cur_freq", - cpunum); - - fp = fopen(buf, "r"); - if (fp == NULL) - return 0; - - if (fscanf(fp, "%lu", &val) != 1) - val = 0; - - fclose(fp); - - return val; -} - - -void uv_free_cpu_info(uv_cpu_info_t* cpu_infos, int count) { - int i; - - for (i = 0; i < count; i++) { - uv__free(cpu_infos[i].model); - } - - uv__free(cpu_infos); -} - - -int uv_interface_addresses(uv_interface_address_t** addresses, - int* count) { -#ifndef HAVE_IFADDRS_H - return -ENOSYS; -#else - struct ifaddrs *addrs, *ent; - uv_interface_address_t* address; - int i; - struct sockaddr_ll *sll; - - if (getifaddrs(&addrs)) - return -errno; - - *count = 0; - *addresses = NULL; - - /* Count the number of interfaces */ - for (ent = addrs; ent != NULL; ent = ent->ifa_next) { - if (!((ent->ifa_flags & IFF_UP) && (ent->ifa_flags & IFF_RUNNING)) || - (ent->ifa_addr == NULL) || - (ent->ifa_addr->sa_family == PF_PACKET)) { - continue; - } - - (*count)++; - } - - if (*count == 0) - return 0; - - *addresses = uv__malloc(*count * sizeof(**addresses)); - if (!(*addresses)) - return -ENOMEM; - - address = *addresses; - - for (ent = addrs; ent != NULL; ent = ent->ifa_next) { - if (!((ent->ifa_flags & IFF_UP) && (ent->ifa_flags & IFF_RUNNING))) - continue; - - if (ent->ifa_addr == NULL) - continue; - - /* - * On Linux getifaddrs returns information related to the raw underlying - * devices. We're not interested in this information yet. - */ - if (ent->ifa_addr->sa_family == PF_PACKET) - continue; - - address->name = uv__strdup(ent->ifa_name); - - if (ent->ifa_addr->sa_family == AF_INET6) { - address->address.address6 = *((struct sockaddr_in6*) ent->ifa_addr); - } else { - address->address.address4 = *((struct sockaddr_in*) ent->ifa_addr); - } - - if (ent->ifa_netmask->sa_family == AF_INET6) { - address->netmask.netmask6 = *((struct sockaddr_in6*) ent->ifa_netmask); - } else { - address->netmask.netmask4 = *((struct sockaddr_in*) ent->ifa_netmask); - } - - address->is_internal = !!(ent->ifa_flags & IFF_LOOPBACK); - - address++; - } - - /* Fill in physical addresses for each interface */ - for (ent = addrs; ent != NULL; ent = ent->ifa_next) { - if (!((ent->ifa_flags & IFF_UP) && (ent->ifa_flags & IFF_RUNNING)) || - (ent->ifa_addr == NULL) || - (ent->ifa_addr->sa_family != PF_PACKET)) { - continue; - } - - address = *addresses; - - for (i = 0; i < (*count); i++) { - if (strcmp(address->name, ent->ifa_name) == 0) { - sll = (struct sockaddr_ll*)ent->ifa_addr; - memcpy(address->phys_addr, sll->sll_addr, sizeof(address->phys_addr)); - } - address++; - } - } - - freeifaddrs(addrs); - - return 0; -#endif -} - - -void uv_free_interface_addresses(uv_interface_address_t* addresses, - int count) { - int i; - - for (i = 0; i < count; i++) { - uv__free(addresses[i].name); - } - - uv__free(addresses); -} - - -void uv__set_process_title(const char* title) { -#if defined(PR_SET_NAME) - prctl(PR_SET_NAME, title); /* Only copies first 16 characters. */ -#endif -} diff --git a/outside/libuv-v1.7.5/src/unix/linux-inotify.c b/outside/libuv-v1.7.5/src/unix/linux-inotify.c deleted file mode 100644 index d9ed9f4b2..000000000 --- a/outside/libuv-v1.7.5/src/unix/linux-inotify.c +++ /dev/null @@ -1,257 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * 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. - */ - -#include "uv.h" -#include "tree.h" -#include "internal.h" - -#include -#include -#include -#include -#include -#include - -#include -#include - -struct watcher_list { - RB_ENTRY(watcher_list) entry; - QUEUE watchers; - char* path; - int wd; -}; - -struct watcher_root { - struct watcher_list* rbh_root; -}; -#define CAST(p) ((struct watcher_root*)(p)) - - -static int compare_watchers(const struct watcher_list* a, - const struct watcher_list* b) { - if (a->wd < b->wd) return -1; - if (a->wd > b->wd) return 1; - return 0; -} - - -RB_GENERATE_STATIC(watcher_root, watcher_list, entry, compare_watchers) - - -static void uv__inotify_read(uv_loop_t* loop, - uv__io_t* w, - unsigned int revents); - - -static int new_inotify_fd(void) { - int err; - int fd; - - fd = uv__inotify_init1(UV__IN_NONBLOCK | UV__IN_CLOEXEC); - if (fd != -1) - return fd; - - if (errno != ENOSYS) - return -errno; - - fd = uv__inotify_init(); - if (fd == -1) - return -errno; - - err = uv__cloexec(fd, 1); - if (err == 0) - err = uv__nonblock(fd, 1); - - if (err) { - uv__close(fd); - return err; - } - - return fd; -} - - -static int init_inotify(uv_loop_t* loop) { - int err; - - if (loop->inotify_fd != -1) - return 0; - - err = new_inotify_fd(); - if (err < 0) - return err; - - loop->inotify_fd = err; - uv__io_init(&loop->inotify_read_watcher, uv__inotify_read, loop->inotify_fd); - uv__io_start(loop, &loop->inotify_read_watcher, UV__POLLIN); - - return 0; -} - - -static struct watcher_list* find_watcher(uv_loop_t* loop, int wd) { - struct watcher_list w; - w.wd = wd; - return RB_FIND(watcher_root, CAST(&loop->inotify_watchers), &w); -} - - -static void uv__inotify_read(uv_loop_t* loop, - uv__io_t* dummy, - unsigned int events) { - const struct uv__inotify_event* e; - struct watcher_list* w; - uv_fs_event_t* h; - QUEUE* q; - const char* path; - ssize_t size; - const char *p; - /* needs to be large enough for sizeof(inotify_event) + strlen(path) */ - char buf[4096]; - - while (1) { - do - size = read(loop->inotify_fd, buf, sizeof(buf)); - while (size == -1 && errno == EINTR); - - if (size == -1) { - assert(errno == EAGAIN || errno == EWOULDBLOCK); - break; - } - - assert(size > 0); /* pre-2.6.21 thing, size=0 == read buffer too small */ - - /* Now we have one or more inotify_event structs. */ - for (p = buf; p < buf + size; p += sizeof(*e) + e->len) { - e = (const struct uv__inotify_event*)p; - - events = 0; - if (e->mask & (UV__IN_ATTRIB|UV__IN_MODIFY)) - events |= UV_CHANGE; - if (e->mask & ~(UV__IN_ATTRIB|UV__IN_MODIFY)) - events |= UV_RENAME; - - w = find_watcher(loop, e->wd); - if (w == NULL) - continue; /* Stale event, no watchers left. */ - - /* inotify does not return the filename when monitoring a single file - * for modifications. Repurpose the filename for API compatibility. - * I'm not convinced this is a good thing, maybe it should go. - */ - path = e->len ? (const char*) (e + 1) : uv__basename_r(w->path); - - QUEUE_FOREACH(q, &w->watchers) { - h = QUEUE_DATA(q, uv_fs_event_t, watchers); - h->cb(h, path, events, 0); - } - } - } -} - - -int uv_fs_event_init(uv_loop_t* loop, uv_fs_event_t* handle) { - uv__handle_init(loop, (uv_handle_t*)handle, UV_FS_EVENT); - return 0; -} - - -int uv_fs_event_start(uv_fs_event_t* handle, - uv_fs_event_cb cb, - const char* path, - unsigned int flags) { - struct watcher_list* w; - int events; - int err; - int wd; - - if (uv__is_active(handle)) - return -EINVAL; - - err = init_inotify(handle->loop); - if (err) - return err; - - events = UV__IN_ATTRIB - | UV__IN_CREATE - | UV__IN_MODIFY - | UV__IN_DELETE - | UV__IN_DELETE_SELF - | UV__IN_MOVE_SELF - | UV__IN_MOVED_FROM - | UV__IN_MOVED_TO; - - wd = uv__inotify_add_watch(handle->loop->inotify_fd, path, events); - if (wd == -1) - return -errno; - - w = find_watcher(handle->loop, wd); - if (w) - goto no_insert; - - w = uv__malloc(sizeof(*w) + strlen(path) + 1); - if (w == NULL) - return -ENOMEM; - - w->wd = wd; - w->path = strcpy((char*)(w + 1), path); - QUEUE_INIT(&w->watchers); - RB_INSERT(watcher_root, CAST(&handle->loop->inotify_watchers), w); - -no_insert: - uv__handle_start(handle); - QUEUE_INSERT_TAIL(&w->watchers, &handle->watchers); - handle->path = w->path; - handle->cb = cb; - handle->wd = wd; - - return 0; -} - - -int uv_fs_event_stop(uv_fs_event_t* handle) { - struct watcher_list* w; - - if (!uv__is_active(handle)) - return 0; - - w = find_watcher(handle->loop, handle->wd); - assert(w != NULL); - - handle->wd = -1; - handle->path = NULL; - uv__handle_stop(handle); - QUEUE_REMOVE(&handle->watchers); - - if (QUEUE_EMPTY(&w->watchers)) { - /* No watchers left for this path. Clean up. */ - RB_REMOVE(watcher_root, CAST(&handle->loop->inotify_watchers), w); - uv__inotify_rm_watch(handle->loop->inotify_fd, w->wd); - uv__free(w); - } - - return 0; -} - - -void uv__fs_event_close(uv_fs_event_t* handle) { - uv_fs_event_stop(handle); -} diff --git a/outside/libuv-v1.7.5/src/unix/linux-syscalls.c b/outside/libuv-v1.7.5/src/unix/linux-syscalls.c deleted file mode 100644 index 566e1f37c..000000000 --- a/outside/libuv-v1.7.5/src/unix/linux-syscalls.c +++ /dev/null @@ -1,471 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "linux-syscalls.h" -#include -#include -#include -#include -#include - -#if defined(__has_feature) -# if __has_feature(memory_sanitizer) -# define MSAN_ACTIVE 1 -# include -# endif -#endif - -#if defined(__i386__) -# ifndef __NR_socketcall -# define __NR_socketcall 102 -# endif -#endif - -#if defined(__arm__) -# if defined(__thumb__) || defined(__ARM_EABI__) -# define UV_SYSCALL_BASE 0 -# else -# define UV_SYSCALL_BASE 0x900000 -# endif -#endif /* __arm__ */ - -#ifndef __NR_accept4 -# if defined(__x86_64__) -# define __NR_accept4 288 -# elif defined(__i386__) - /* Nothing. Handled through socketcall(). */ -# elif defined(__arm__) -# define __NR_accept4 (UV_SYSCALL_BASE + 366) -# endif -#endif /* __NR_accept4 */ - -#ifndef __NR_eventfd -# if defined(__x86_64__) -# define __NR_eventfd 284 -# elif defined(__i386__) -# define __NR_eventfd 323 -# elif defined(__arm__) -# define __NR_eventfd (UV_SYSCALL_BASE + 351) -# endif -#endif /* __NR_eventfd */ - -#ifndef __NR_eventfd2 -# if defined(__x86_64__) -# define __NR_eventfd2 290 -# elif defined(__i386__) -# define __NR_eventfd2 328 -# elif defined(__arm__) -# define __NR_eventfd2 (UV_SYSCALL_BASE + 356) -# endif -#endif /* __NR_eventfd2 */ - -#ifndef __NR_epoll_create -# if defined(__x86_64__) -# define __NR_epoll_create 213 -# elif defined(__i386__) -# define __NR_epoll_create 254 -# elif defined(__arm__) -# define __NR_epoll_create (UV_SYSCALL_BASE + 250) -# endif -#endif /* __NR_epoll_create */ - -#ifndef __NR_epoll_create1 -# if defined(__x86_64__) -# define __NR_epoll_create1 291 -# elif defined(__i386__) -# define __NR_epoll_create1 329 -# elif defined(__arm__) -# define __NR_epoll_create1 (UV_SYSCALL_BASE + 357) -# endif -#endif /* __NR_epoll_create1 */ - -#ifndef __NR_epoll_ctl -# if defined(__x86_64__) -# define __NR_epoll_ctl 233 /* used to be 214 */ -# elif defined(__i386__) -# define __NR_epoll_ctl 255 -# elif defined(__arm__) -# define __NR_epoll_ctl (UV_SYSCALL_BASE + 251) -# endif -#endif /* __NR_epoll_ctl */ - -#ifndef __NR_epoll_wait -# if defined(__x86_64__) -# define __NR_epoll_wait 232 /* used to be 215 */ -# elif defined(__i386__) -# define __NR_epoll_wait 256 -# elif defined(__arm__) -# define __NR_epoll_wait (UV_SYSCALL_BASE + 252) -# endif -#endif /* __NR_epoll_wait */ - -#ifndef __NR_epoll_pwait -# if defined(__x86_64__) -# define __NR_epoll_pwait 281 -# elif defined(__i386__) -# define __NR_epoll_pwait 319 -# elif defined(__arm__) -# define __NR_epoll_pwait (UV_SYSCALL_BASE + 346) -# endif -#endif /* __NR_epoll_pwait */ - -#ifndef __NR_inotify_init -# if defined(__x86_64__) -# define __NR_inotify_init 253 -# elif defined(__i386__) -# define __NR_inotify_init 291 -# elif defined(__arm__) -# define __NR_inotify_init (UV_SYSCALL_BASE + 316) -# endif -#endif /* __NR_inotify_init */ - -#ifndef __NR_inotify_init1 -# if defined(__x86_64__) -# define __NR_inotify_init1 294 -# elif defined(__i386__) -# define __NR_inotify_init1 332 -# elif defined(__arm__) -# define __NR_inotify_init1 (UV_SYSCALL_BASE + 360) -# endif -#endif /* __NR_inotify_init1 */ - -#ifndef __NR_inotify_add_watch -# if defined(__x86_64__) -# define __NR_inotify_add_watch 254 -# elif defined(__i386__) -# define __NR_inotify_add_watch 292 -# elif defined(__arm__) -# define __NR_inotify_add_watch (UV_SYSCALL_BASE + 317) -# endif -#endif /* __NR_inotify_add_watch */ - -#ifndef __NR_inotify_rm_watch -# if defined(__x86_64__) -# define __NR_inotify_rm_watch 255 -# elif defined(__i386__) -# define __NR_inotify_rm_watch 293 -# elif defined(__arm__) -# define __NR_inotify_rm_watch (UV_SYSCALL_BASE + 318) -# endif -#endif /* __NR_inotify_rm_watch */ - -#ifndef __NR_pipe2 -# if defined(__x86_64__) -# define __NR_pipe2 293 -# elif defined(__i386__) -# define __NR_pipe2 331 -# elif defined(__arm__) -# define __NR_pipe2 (UV_SYSCALL_BASE + 359) -# endif -#endif /* __NR_pipe2 */ - -#ifndef __NR_recvmmsg -# if defined(__x86_64__) -# define __NR_recvmmsg 299 -# elif defined(__i386__) -# define __NR_recvmmsg 337 -# elif defined(__arm__) -# define __NR_recvmmsg (UV_SYSCALL_BASE + 365) -# endif -#endif /* __NR_recvmsg */ - -#ifndef __NR_sendmmsg -# if defined(__x86_64__) -# define __NR_sendmmsg 307 -# elif defined(__i386__) -# define __NR_sendmmsg 345 -# elif defined(__arm__) -# define __NR_sendmmsg (UV_SYSCALL_BASE + 374) -# endif -#endif /* __NR_sendmmsg */ - -#ifndef __NR_utimensat -# if defined(__x86_64__) -# define __NR_utimensat 280 -# elif defined(__i386__) -# define __NR_utimensat 320 -# elif defined(__arm__) -# define __NR_utimensat (UV_SYSCALL_BASE + 348) -# endif -#endif /* __NR_utimensat */ - -#ifndef __NR_preadv -# if defined(__x86_64__) -# define __NR_preadv 295 -# elif defined(__i386__) -# define __NR_preadv 333 -# elif defined(__arm__) -# define __NR_preadv (UV_SYSCALL_BASE + 361) -# endif -#endif /* __NR_preadv */ - -#ifndef __NR_pwritev -# if defined(__x86_64__) -# define __NR_pwritev 296 -# elif defined(__i386__) -# define __NR_pwritev 334 -# elif defined(__arm__) -# define __NR_pwritev (UV_SYSCALL_BASE + 362) -# endif -#endif /* __NR_pwritev */ - -#ifndef __NR_dup3 -# if defined(__x86_64__) -# define __NR_dup3 292 -# elif defined(__i386__) -# define __NR_dup3 330 -# elif defined(__arm__) -# define __NR_dup3 (UV_SYSCALL_BASE + 358) -# endif -#endif /* __NR_pwritev */ - - -int uv__accept4(int fd, struct sockaddr* addr, socklen_t* addrlen, int flags) { -#if defined(__i386__) - unsigned long args[4]; - int r; - - args[0] = (unsigned long) fd; - args[1] = (unsigned long) addr; - args[2] = (unsigned long) addrlen; - args[3] = (unsigned long) flags; - - r = syscall(__NR_socketcall, 18 /* SYS_ACCEPT4 */, args); - - /* socketcall() raises EINVAL when SYS_ACCEPT4 is not supported but so does - * a bad flags argument. Try to distinguish between the two cases. - */ - if (r == -1) - if (errno == EINVAL) - if ((flags & ~(UV__SOCK_CLOEXEC|UV__SOCK_NONBLOCK)) == 0) - errno = ENOSYS; - - return r; -#elif defined(__NR_accept4) - return syscall(__NR_accept4, fd, addr, addrlen, flags); -#else - return errno = ENOSYS, -1; -#endif -} - - -int uv__eventfd(unsigned int count) { -#if defined(__NR_eventfd) - return syscall(__NR_eventfd, count); -#else - return errno = ENOSYS, -1; -#endif -} - - -int uv__eventfd2(unsigned int count, int flags) { -#if defined(__NR_eventfd2) - return syscall(__NR_eventfd2, count, flags); -#else - return errno = ENOSYS, -1; -#endif -} - - -int uv__epoll_create(int size) { -#if defined(__NR_epoll_create) - return syscall(__NR_epoll_create, size); -#else - return errno = ENOSYS, -1; -#endif -} - - -int uv__epoll_create1(int flags) { -#if defined(__NR_epoll_create1) - return syscall(__NR_epoll_create1, flags); -#else - return errno = ENOSYS, -1; -#endif -} - - -int uv__epoll_ctl(int epfd, int op, int fd, struct uv__epoll_event* events) { -#if defined(__NR_epoll_ctl) - return syscall(__NR_epoll_ctl, epfd, op, fd, events); -#else - return errno = ENOSYS, -1; -#endif -} - - -int uv__epoll_wait(int epfd, - struct uv__epoll_event* events, - int nevents, - int timeout) { -#if defined(__NR_epoll_wait) - int result; - result = syscall(__NR_epoll_wait, epfd, events, nevents, timeout); -#if MSAN_ACTIVE - if (result > 0) - __msan_unpoison(events, sizeof(events[0]) * result); -#endif - return result; -#else - return errno = ENOSYS, -1; -#endif -} - - -int uv__epoll_pwait(int epfd, - struct uv__epoll_event* events, - int nevents, - int timeout, - uint64_t sigmask) { -#if defined(__NR_epoll_pwait) - int result; - result = syscall(__NR_epoll_pwait, - epfd, - events, - nevents, - timeout, - &sigmask, - sizeof(sigmask)); -#if MSAN_ACTIVE - if (result > 0) - __msan_unpoison(events, sizeof(events[0]) * result); -#endif - return result; -#else - return errno = ENOSYS, -1; -#endif -} - - -int uv__inotify_init(void) { -#if defined(__NR_inotify_init) - return syscall(__NR_inotify_init); -#else - return errno = ENOSYS, -1; -#endif -} - - -int uv__inotify_init1(int flags) { -#if defined(__NR_inotify_init1) - return syscall(__NR_inotify_init1, flags); -#else - return errno = ENOSYS, -1; -#endif -} - - -int uv__inotify_add_watch(int fd, const char* path, uint32_t mask) { -#if defined(__NR_inotify_add_watch) - return syscall(__NR_inotify_add_watch, fd, path, mask); -#else - return errno = ENOSYS, -1; -#endif -} - - -int uv__inotify_rm_watch(int fd, int32_t wd) { -#if defined(__NR_inotify_rm_watch) - return syscall(__NR_inotify_rm_watch, fd, wd); -#else - return errno = ENOSYS, -1; -#endif -} - - -int uv__pipe2(int pipefd[2], int flags) { -#if defined(__NR_pipe2) - int result; - result = syscall(__NR_pipe2, pipefd, flags); -#if MSAN_ACTIVE - if (!result) - __msan_unpoison(pipefd, sizeof(int[2])); -#endif - return result; -#else - return errno = ENOSYS, -1; -#endif -} - - -int uv__sendmmsg(int fd, - struct uv__mmsghdr* mmsg, - unsigned int vlen, - unsigned int flags) { -#if defined(__NR_sendmmsg) - return syscall(__NR_sendmmsg, fd, mmsg, vlen, flags); -#else - return errno = ENOSYS, -1; -#endif -} - - -int uv__recvmmsg(int fd, - struct uv__mmsghdr* mmsg, - unsigned int vlen, - unsigned int flags, - struct timespec* timeout) { -#if defined(__NR_recvmmsg) - return syscall(__NR_recvmmsg, fd, mmsg, vlen, flags, timeout); -#else - return errno = ENOSYS, -1; -#endif -} - - -int uv__utimesat(int dirfd, - const char* path, - const struct timespec times[2], - int flags) -{ -#if defined(__NR_utimensat) - return syscall(__NR_utimensat, dirfd, path, times, flags); -#else - return errno = ENOSYS, -1; -#endif -} - - -ssize_t uv__preadv(int fd, const struct iovec *iov, int iovcnt, off_t offset) { -#if defined(__NR_preadv) - return syscall(__NR_preadv, fd, iov, iovcnt, offset); -#else - return errno = ENOSYS, -1; -#endif -} - - -ssize_t uv__pwritev(int fd, const struct iovec *iov, int iovcnt, off_t offset) { -#if defined(__NR_pwritev) - return syscall(__NR_pwritev, fd, iov, iovcnt, offset); -#else - return errno = ENOSYS, -1; -#endif -} - - -int uv__dup3(int oldfd, int newfd, int flags) { -#if defined(__NR_dup3) - return syscall(__NR_dup3, oldfd, newfd, flags); -#else - return errno = ENOSYS, -1; -#endif -} diff --git a/outside/libuv-v1.7.5/src/unix/linux-syscalls.h b/outside/libuv-v1.7.5/src/unix/linux-syscalls.h deleted file mode 100644 index 6f249b724..000000000 --- a/outside/libuv-v1.7.5/src/unix/linux-syscalls.h +++ /dev/null @@ -1,158 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#ifndef UV_LINUX_SYSCALL_H_ -#define UV_LINUX_SYSCALL_H_ - -#undef _GNU_SOURCE -#define _GNU_SOURCE - -#include -#include -#include -#include -#include - -#if defined(__alpha__) -# define UV__O_CLOEXEC 0x200000 -#elif defined(__hppa__) -# define UV__O_CLOEXEC 0x200000 -#elif defined(__sparc__) -# define UV__O_CLOEXEC 0x400000 -#else -# define UV__O_CLOEXEC 0x80000 -#endif - -#if defined(__alpha__) -# define UV__O_NONBLOCK 0x4 -#elif defined(__hppa__) -# define UV__O_NONBLOCK O_NONBLOCK -#elif defined(__mips__) -# define UV__O_NONBLOCK 0x80 -#elif defined(__sparc__) -# define UV__O_NONBLOCK 0x4000 -#else -# define UV__O_NONBLOCK 0x800 -#endif - -#define UV__EFD_CLOEXEC UV__O_CLOEXEC -#define UV__EFD_NONBLOCK UV__O_NONBLOCK - -#define UV__IN_CLOEXEC UV__O_CLOEXEC -#define UV__IN_NONBLOCK UV__O_NONBLOCK - -#define UV__SOCK_CLOEXEC UV__O_CLOEXEC -#if defined(SOCK_NONBLOCK) -# define UV__SOCK_NONBLOCK SOCK_NONBLOCK -#else -# define UV__SOCK_NONBLOCK UV__O_NONBLOCK -#endif - -/* epoll flags */ -#define UV__EPOLL_CLOEXEC UV__O_CLOEXEC -#define UV__EPOLL_CTL_ADD 1 -#define UV__EPOLL_CTL_DEL 2 -#define UV__EPOLL_CTL_MOD 3 - -#define UV__EPOLLIN 1 -#define UV__EPOLLOUT 4 -#define UV__EPOLLERR 8 -#define UV__EPOLLHUP 16 -#define UV__EPOLLONESHOT 0x40000000 -#define UV__EPOLLET 0x80000000 - -/* inotify flags */ -#define UV__IN_ACCESS 0x001 -#define UV__IN_MODIFY 0x002 -#define UV__IN_ATTRIB 0x004 -#define UV__IN_CLOSE_WRITE 0x008 -#define UV__IN_CLOSE_NOWRITE 0x010 -#define UV__IN_OPEN 0x020 -#define UV__IN_MOVED_FROM 0x040 -#define UV__IN_MOVED_TO 0x080 -#define UV__IN_CREATE 0x100 -#define UV__IN_DELETE 0x200 -#define UV__IN_DELETE_SELF 0x400 -#define UV__IN_MOVE_SELF 0x800 - -#if defined(__x86_64__) -struct uv__epoll_event { - uint32_t events; - uint64_t data; -} __attribute__((packed)); -#else -struct uv__epoll_event { - uint32_t events; - uint64_t data; -}; -#endif - -struct uv__inotify_event { - int32_t wd; - uint32_t mask; - uint32_t cookie; - uint32_t len; - /* char name[0]; */ -}; - -struct uv__mmsghdr { - struct msghdr msg_hdr; - unsigned int msg_len; -}; - -int uv__accept4(int fd, struct sockaddr* addr, socklen_t* addrlen, int flags); -int uv__eventfd(unsigned int count); -int uv__epoll_create(int size); -int uv__epoll_create1(int flags); -int uv__epoll_ctl(int epfd, int op, int fd, struct uv__epoll_event *ev); -int uv__epoll_wait(int epfd, - struct uv__epoll_event* events, - int nevents, - int timeout); -int uv__epoll_pwait(int epfd, - struct uv__epoll_event* events, - int nevents, - int timeout, - uint64_t sigmask); -int uv__eventfd2(unsigned int count, int flags); -int uv__inotify_init(void); -int uv__inotify_init1(int flags); -int uv__inotify_add_watch(int fd, const char* path, uint32_t mask); -int uv__inotify_rm_watch(int fd, int32_t wd); -int uv__pipe2(int pipefd[2], int flags); -int uv__recvmmsg(int fd, - struct uv__mmsghdr* mmsg, - unsigned int vlen, - unsigned int flags, - struct timespec* timeout); -int uv__sendmmsg(int fd, - struct uv__mmsghdr* mmsg, - unsigned int vlen, - unsigned int flags); -int uv__utimesat(int dirfd, - const char* path, - const struct timespec times[2], - int flags); -ssize_t uv__preadv(int fd, const struct iovec *iov, int iovcnt, off_t offset); -ssize_t uv__pwritev(int fd, const struct iovec *iov, int iovcnt, off_t offset); -int uv__dup3(int oldfd, int newfd, int flags); - -#endif /* UV_LINUX_SYSCALL_H_ */ diff --git a/outside/libuv-v1.7.5/src/unix/loop-watcher.c b/outside/libuv-v1.7.5/src/unix/loop-watcher.c deleted file mode 100644 index dc25760bd..000000000 --- a/outside/libuv-v1.7.5/src/unix/loop-watcher.c +++ /dev/null @@ -1,63 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "internal.h" - -#define UV_LOOP_WATCHER_DEFINE(name, type) \ - int uv_##name##_init(uv_loop_t* loop, uv_##name##_t* handle) { \ - uv__handle_init(loop, (uv_handle_t*)handle, UV_##type); \ - handle->name##_cb = NULL; \ - return 0; \ - } \ - \ - int uv_##name##_start(uv_##name##_t* handle, uv_##name##_cb cb) { \ - if (uv__is_active(handle)) return 0; \ - if (cb == NULL) return -EINVAL; \ - QUEUE_INSERT_HEAD(&handle->loop->name##_handles, &handle->queue); \ - handle->name##_cb = cb; \ - uv__handle_start(handle); \ - return 0; \ - } \ - \ - int uv_##name##_stop(uv_##name##_t* handle) { \ - if (!uv__is_active(handle)) return 0; \ - QUEUE_REMOVE(&handle->queue); \ - uv__handle_stop(handle); \ - return 0; \ - } \ - \ - void uv__run_##name(uv_loop_t* loop) { \ - uv_##name##_t* h; \ - QUEUE* q; \ - QUEUE_FOREACH(q, &loop->name##_handles) { \ - h = QUEUE_DATA(q, uv_##name##_t, queue); \ - h->name##_cb(h); \ - } \ - } \ - \ - void uv__##name##_close(uv_##name##_t* handle) { \ - uv_##name##_stop(handle); \ - } - -UV_LOOP_WATCHER_DEFINE(prepare, PREPARE) -UV_LOOP_WATCHER_DEFINE(check, CHECK) -UV_LOOP_WATCHER_DEFINE(idle, IDLE) diff --git a/outside/libuv-v1.7.5/src/unix/loop.c b/outside/libuv-v1.7.5/src/unix/loop.c deleted file mode 100644 index 92e96f09e..000000000 --- a/outside/libuv-v1.7.5/src/unix/loop.c +++ /dev/null @@ -1,155 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "tree.h" -#include "internal.h" -#include "heap-inl.h" -#include -#include -#include - -int uv_loop_init(uv_loop_t* loop) { - int err; - - uv__signal_global_once_init(); - - memset(loop, 0, sizeof(*loop)); - heap_init((struct heap*) &loop->timer_heap); - QUEUE_INIT(&loop->wq); - QUEUE_INIT(&loop->active_reqs); - QUEUE_INIT(&loop->idle_handles); - QUEUE_INIT(&loop->async_handles); - QUEUE_INIT(&loop->check_handles); - QUEUE_INIT(&loop->prepare_handles); - QUEUE_INIT(&loop->handle_queue); - - loop->nfds = 0; - loop->watchers = NULL; - loop->nwatchers = 0; - QUEUE_INIT(&loop->pending_queue); - QUEUE_INIT(&loop->watcher_queue); - - loop->closing_handles = NULL; - uv__update_time(loop); - uv__async_init(&loop->async_watcher); - loop->signal_pipefd[0] = -1; - loop->signal_pipefd[1] = -1; - loop->backend_fd = -1; - loop->emfile_fd = -1; - - loop->timer_counter = 0; - loop->stop_flag = 0; - - err = uv__platform_loop_init(loop); - if (err) - return err; - - err = uv_signal_init(loop, &loop->child_watcher); - if (err) - goto fail_signal_init; - - uv__handle_unref(&loop->child_watcher); - loop->child_watcher.flags |= UV__HANDLE_INTERNAL; - QUEUE_INIT(&loop->process_handles); - - err = uv_rwlock_init(&loop->cloexec_lock); - if (err) - goto fail_rwlock_init; - - err = uv_mutex_init(&loop->wq_mutex); - if (err) - goto fail_mutex_init; - - err = uv_async_init(loop, &loop->wq_async, uv__work_done); - if (err) - goto fail_async_init; - - uv__handle_unref(&loop->wq_async); - loop->wq_async.flags |= UV__HANDLE_INTERNAL; - - return 0; - -fail_async_init: - uv_mutex_destroy(&loop->wq_mutex); - -fail_mutex_init: - uv_rwlock_destroy(&loop->cloexec_lock); - -fail_rwlock_init: - uv__signal_loop_cleanup(loop); - -fail_signal_init: - uv__platform_loop_delete(loop); - - return err; -} - - -void uv__loop_close(uv_loop_t* loop) { - uv__signal_loop_cleanup(loop); - uv__platform_loop_delete(loop); - uv__async_stop(loop, &loop->async_watcher); - - if (loop->emfile_fd != -1) { - uv__close(loop->emfile_fd); - loop->emfile_fd = -1; - } - - if (loop->backend_fd != -1) { - uv__close(loop->backend_fd); - loop->backend_fd = -1; - } - - uv_mutex_lock(&loop->wq_mutex); - assert(QUEUE_EMPTY(&loop->wq) && "thread pool work queue not empty!"); - assert(!uv__has_active_reqs(loop)); - uv_mutex_unlock(&loop->wq_mutex); - uv_mutex_destroy(&loop->wq_mutex); - - /* - * Note that all thread pool stuff is finished at this point and - * it is safe to just destroy rw lock - */ - uv_rwlock_destroy(&loop->cloexec_lock); - -#if 0 - assert(QUEUE_EMPTY(&loop->pending_queue)); - assert(QUEUE_EMPTY(&loop->watcher_queue)); - assert(loop->nfds == 0); -#endif - - uv__free(loop->watchers); - loop->watchers = NULL; - loop->nwatchers = 0; -} - - -int uv__loop_configure(uv_loop_t* loop, uv_loop_option option, va_list ap) { - if (option != UV_LOOP_BLOCK_SIGNAL) - return UV_ENOSYS; - - if (va_arg(ap, int) != SIGPROF) - return UV_EINVAL; - - loop->flags |= UV_LOOP_BLOCK_SIGPROF; - return 0; -} diff --git a/outside/libuv-v1.7.5/src/unix/netbsd.c b/outside/libuv-v1.7.5/src/unix/netbsd.c deleted file mode 100644 index 29f2a4dec..000000000 --- a/outside/libuv-v1.7.5/src/unix/netbsd.c +++ /dev/null @@ -1,368 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * 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. - */ - -#include "uv.h" -#include "internal.h" - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include - -#undef NANOSEC -#define NANOSEC ((uint64_t) 1e9) - -static char *process_title; - - -int uv__platform_loop_init(uv_loop_t* loop) { - return uv__kqueue_init(loop); -} - - -void uv__platform_loop_delete(uv_loop_t* loop) { -} - - -uint64_t uv__hrtime(uv_clocktype_t type) { - struct timespec ts; - clock_gettime(CLOCK_MONOTONIC, &ts); - return (((uint64_t) ts.tv_sec) * NANOSEC + ts.tv_nsec); -} - - -void uv_loadavg(double avg[3]) { - struct loadavg info; - size_t size = sizeof(info); - int which[] = {CTL_VM, VM_LOADAVG}; - - if (sysctl(which, 2, &info, &size, NULL, 0) == -1) return; - - avg[0] = (double) info.ldavg[0] / info.fscale; - avg[1] = (double) info.ldavg[1] / info.fscale; - avg[2] = (double) info.ldavg[2] / info.fscale; -} - - -int uv_exepath(char* buffer, size_t* size) { - int mib[4]; - size_t cb; - pid_t mypid; - - if (buffer == NULL || size == NULL || *size == 0) - return -EINVAL; - - mypid = getpid(); - mib[0] = CTL_KERN; - mib[1] = KERN_PROC_ARGS; - mib[2] = mypid; - mib[3] = KERN_PROC_ARGV; - - cb = *size; - if (sysctl(mib, 4, buffer, &cb, NULL, 0)) - return -errno; - *size = strlen(buffer); - - return 0; -} - - -uint64_t uv_get_free_memory(void) { - struct uvmexp info; - size_t size = sizeof(info); - int which[] = {CTL_VM, VM_UVMEXP}; - - if (sysctl(which, 2, &info, &size, NULL, 0)) - return -errno; - - return (uint64_t) info.free * sysconf(_SC_PAGESIZE); -} - - -uint64_t uv_get_total_memory(void) { -#if defined(HW_PHYSMEM64) - uint64_t info; - int which[] = {CTL_HW, HW_PHYSMEM64}; -#else - unsigned int info; - int which[] = {CTL_HW, HW_PHYSMEM}; -#endif - size_t size = sizeof(info); - - if (sysctl(which, 2, &info, &size, NULL, 0)) - return -errno; - - return (uint64_t) info; -} - - -char** uv_setup_args(int argc, char** argv) { - process_title = argc ? uv__strdup(argv[0]) : NULL; - return argv; -} - - -int uv_set_process_title(const char* title) { - if (process_title) uv__free(process_title); - - process_title = uv__strdup(title); - setproctitle("%s", title); - - return 0; -} - - -int uv_get_process_title(char* buffer, size_t size) { - if (process_title) { - strncpy(buffer, process_title, size); - } else { - if (size > 0) { - buffer[0] = '\0'; - } - } - - return 0; -} - - -int uv_resident_set_memory(size_t* rss) { - kvm_t *kd = NULL; - struct kinfo_proc2 *kinfo = NULL; - pid_t pid; - int nprocs; - int max_size = sizeof(struct kinfo_proc2); - int page_size; - - page_size = getpagesize(); - pid = getpid(); - - kd = kvm_open(NULL, NULL, NULL, KVM_NO_FILES, "kvm_open"); - - if (kd == NULL) goto error; - - kinfo = kvm_getproc2(kd, KERN_PROC_PID, pid, max_size, &nprocs); - if (kinfo == NULL) goto error; - - *rss = kinfo->p_vm_rssize * page_size; - - kvm_close(kd); - - return 0; - -error: - if (kd) kvm_close(kd); - return -EPERM; -} - - -int uv_uptime(double* uptime) { - time_t now; - struct timeval info; - size_t size = sizeof(info); - static int which[] = {CTL_KERN, KERN_BOOTTIME}; - - if (sysctl(which, 2, &info, &size, NULL, 0)) - return -errno; - - now = time(NULL); - - *uptime = (double)(now - info.tv_sec); - return 0; -} - - -int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count) { - unsigned int ticks = (unsigned int)sysconf(_SC_CLK_TCK); - unsigned int multiplier = ((uint64_t)1000L / ticks); - unsigned int cur = 0; - uv_cpu_info_t* cpu_info; - u_int64_t* cp_times; - char model[512]; - u_int64_t cpuspeed; - int numcpus; - size_t size; - int i; - - size = sizeof(model); - if (sysctlbyname("machdep.cpu_brand", &model, &size, NULL, 0) && - sysctlbyname("hw.model", &model, &size, NULL, 0)) { - return -errno; - } - - size = sizeof(numcpus); - if (sysctlbyname("hw.ncpu", &numcpus, &size, NULL, 0)) - return -errno; - *count = numcpus; - - /* Only i386 and amd64 have machdep.tsc_freq */ - size = sizeof(cpuspeed); - if (sysctlbyname("machdep.tsc_freq", &cpuspeed, &size, NULL, 0)) - cpuspeed = 0; - - size = numcpus * CPUSTATES * sizeof(*cp_times); - cp_times = uv__malloc(size); - if (cp_times == NULL) - return -ENOMEM; - - if (sysctlbyname("kern.cp_time", cp_times, &size, NULL, 0)) - return -errno; - - *cpu_infos = uv__malloc(numcpus * sizeof(**cpu_infos)); - if (!(*cpu_infos)) { - uv__free(cp_times); - uv__free(*cpu_infos); - return -ENOMEM; - } - - for (i = 0; i < numcpus; i++) { - cpu_info = &(*cpu_infos)[i]; - cpu_info->cpu_times.user = (uint64_t)(cp_times[CP_USER+cur]) * multiplier; - cpu_info->cpu_times.nice = (uint64_t)(cp_times[CP_NICE+cur]) * multiplier; - cpu_info->cpu_times.sys = (uint64_t)(cp_times[CP_SYS+cur]) * multiplier; - cpu_info->cpu_times.idle = (uint64_t)(cp_times[CP_IDLE+cur]) * multiplier; - cpu_info->cpu_times.irq = (uint64_t)(cp_times[CP_INTR+cur]) * multiplier; - cpu_info->model = uv__strdup(model); - cpu_info->speed = (int)(cpuspeed/(uint64_t) 1e6); - cur += CPUSTATES; - } - uv__free(cp_times); - return 0; -} - - -void uv_free_cpu_info(uv_cpu_info_t* cpu_infos, int count) { - int i; - - for (i = 0; i < count; i++) { - uv__free(cpu_infos[i].model); - } - - uv__free(cpu_infos); -} - - -int uv_interface_addresses(uv_interface_address_t** addresses, int* count) { - struct ifaddrs *addrs, *ent; - uv_interface_address_t* address; - int i; - struct sockaddr_dl *sa_addr; - - if (getifaddrs(&addrs)) - return -errno; - - *count = 0; - - /* Count the number of interfaces */ - for (ent = addrs; ent != NULL; ent = ent->ifa_next) { - if (!((ent->ifa_flags & IFF_UP) && (ent->ifa_flags & IFF_RUNNING)) || - (ent->ifa_addr == NULL) || - (ent->ifa_addr->sa_family != PF_INET)) { - continue; - } - (*count)++; - } - - *addresses = uv__malloc(*count * sizeof(**addresses)); - - if (!(*addresses)) - return -ENOMEM; - - address = *addresses; - - for (ent = addrs; ent != NULL; ent = ent->ifa_next) { - if (!((ent->ifa_flags & IFF_UP) && (ent->ifa_flags & IFF_RUNNING))) - continue; - - if (ent->ifa_addr == NULL) - continue; - - if (ent->ifa_addr->sa_family != PF_INET) - continue; - - address->name = uv__strdup(ent->ifa_name); - - if (ent->ifa_addr->sa_family == AF_INET6) { - address->address.address6 = *((struct sockaddr_in6*) ent->ifa_addr); - } else { - address->address.address4 = *((struct sockaddr_in*) ent->ifa_addr); - } - - if (ent->ifa_netmask->sa_family == AF_INET6) { - address->netmask.netmask6 = *((struct sockaddr_in6*) ent->ifa_netmask); - } else { - address->netmask.netmask4 = *((struct sockaddr_in*) ent->ifa_netmask); - } - - address->is_internal = !!(ent->ifa_flags & IFF_LOOPBACK); - - address++; - } - - /* Fill in physical addresses for each interface */ - for (ent = addrs; ent != NULL; ent = ent->ifa_next) { - if (!((ent->ifa_flags & IFF_UP) && (ent->ifa_flags & IFF_RUNNING)) || - (ent->ifa_addr == NULL) || - (ent->ifa_addr->sa_family != AF_LINK)) { - continue; - } - - address = *addresses; - - for (i = 0; i < (*count); i++) { - if (strcmp(address->name, ent->ifa_name) == 0) { - sa_addr = (struct sockaddr_dl*)(ent->ifa_addr); - memcpy(address->phys_addr, LLADDR(sa_addr), sizeof(address->phys_addr)); - } - address++; - } - } - - freeifaddrs(addrs); - - return 0; -} - - -void uv_free_interface_addresses(uv_interface_address_t* addresses, int count) { - int i; - - for (i = 0; i < count; i++) { - uv__free(addresses[i].name); - } - - uv__free(addresses); -} diff --git a/outside/libuv-v1.7.5/src/unix/openbsd.c b/outside/libuv-v1.7.5/src/unix/openbsd.c deleted file mode 100644 index c8d545993..000000000 --- a/outside/libuv-v1.7.5/src/unix/openbsd.c +++ /dev/null @@ -1,384 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * 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. - */ - -#include "uv.h" -#include "internal.h" - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#undef NANOSEC -#define NANOSEC ((uint64_t) 1e9) - - -static char *process_title; - - -int uv__platform_loop_init(uv_loop_t* loop) { - return uv__kqueue_init(loop); -} - - -void uv__platform_loop_delete(uv_loop_t* loop) { -} - - -uint64_t uv__hrtime(uv_clocktype_t type) { - struct timespec ts; - clock_gettime(CLOCK_MONOTONIC, &ts); - return (((uint64_t) ts.tv_sec) * NANOSEC + ts.tv_nsec); -} - - -void uv_loadavg(double avg[3]) { - struct loadavg info; - size_t size = sizeof(info); - int which[] = {CTL_VM, VM_LOADAVG}; - - if (sysctl(which, 2, &info, &size, NULL, 0) < 0) return; - - avg[0] = (double) info.ldavg[0] / info.fscale; - avg[1] = (double) info.ldavg[1] / info.fscale; - avg[2] = (double) info.ldavg[2] / info.fscale; -} - - -int uv_exepath(char* buffer, size_t* size) { - int mib[4]; - char **argsbuf = NULL; - char **argsbuf_tmp; - size_t argsbuf_size = 100U; - size_t exepath_size; - pid_t mypid; - int err; - - if (buffer == NULL || size == NULL || *size == 0) - return -EINVAL; - - mypid = getpid(); - for (;;) { - err = -ENOMEM; - argsbuf_tmp = uv__realloc(argsbuf, argsbuf_size); - if (argsbuf_tmp == NULL) - goto out; - argsbuf = argsbuf_tmp; - mib[0] = CTL_KERN; - mib[1] = KERN_PROC_ARGS; - mib[2] = mypid; - mib[3] = KERN_PROC_ARGV; - if (sysctl(mib, 4, argsbuf, &argsbuf_size, NULL, 0) == 0) { - break; - } - if (errno != ENOMEM) { - err = -errno; - goto out; - } - argsbuf_size *= 2U; - } - - if (argsbuf[0] == NULL) { - err = -EINVAL; /* FIXME(bnoordhuis) More appropriate error. */ - goto out; - } - - *size -= 1; - exepath_size = strlen(argsbuf[0]); - if (*size > exepath_size) - *size = exepath_size; - - memcpy(buffer, argsbuf[0], *size); - buffer[*size] = '\0'; - err = 0; - -out: - uv__free(argsbuf); - - return err; -} - - -uint64_t uv_get_free_memory(void) { - struct uvmexp info; - size_t size = sizeof(info); - int which[] = {CTL_VM, VM_UVMEXP}; - - if (sysctl(which, 2, &info, &size, NULL, 0)) - return -errno; - - return (uint64_t) info.free * sysconf(_SC_PAGESIZE); -} - - -uint64_t uv_get_total_memory(void) { - uint64_t info; - int which[] = {CTL_HW, HW_PHYSMEM64}; - size_t size = sizeof(info); - - if (sysctl(which, 2, &info, &size, NULL, 0)) - return -errno; - - return (uint64_t) info; -} - - -char** uv_setup_args(int argc, char** argv) { - process_title = argc ? uv__strdup(argv[0]) : NULL; - return argv; -} - - -int uv_set_process_title(const char* title) { - if (process_title) uv__free(process_title); - process_title = uv__strdup(title); - setproctitle(title); - return 0; -} - - -int uv_get_process_title(char* buffer, size_t size) { - if (process_title) { - strncpy(buffer, process_title, size); - } else { - if (size > 0) { - buffer[0] = '\0'; - } - } - - return 0; -} - - -int uv_resident_set_memory(size_t* rss) { - struct kinfo_proc kinfo; - size_t page_size = getpagesize(); - size_t size = sizeof(struct kinfo_proc); - int mib[6]; - - mib[0] = CTL_KERN; - mib[1] = KERN_PROC; - mib[2] = KERN_PROC_PID; - mib[3] = getpid(); - mib[4] = sizeof(struct kinfo_proc); - mib[5] = 1; - - if (sysctl(mib, 6, &kinfo, &size, NULL, 0) < 0) - return -errno; - - *rss = kinfo.p_vm_rssize * page_size; - return 0; -} - - -int uv_uptime(double* uptime) { - time_t now; - struct timeval info; - size_t size = sizeof(info); - static int which[] = {CTL_KERN, KERN_BOOTTIME}; - - if (sysctl(which, 2, &info, &size, NULL, 0)) - return -errno; - - now = time(NULL); - - *uptime = (double)(now - info.tv_sec); - return 0; -} - - -int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count) { - unsigned int ticks = (unsigned int)sysconf(_SC_CLK_TCK), - multiplier = ((uint64_t)1000L / ticks), cpuspeed; - uint64_t info[CPUSTATES]; - char model[512]; - int numcpus = 1; - int which[] = {CTL_HW,HW_MODEL,0}; - size_t size; - int i; - uv_cpu_info_t* cpu_info; - - size = sizeof(model); - if (sysctl(which, 2, &model, &size, NULL, 0)) - return -errno; - - which[1] = HW_NCPU; - size = sizeof(numcpus); - if (sysctl(which, 2, &numcpus, &size, NULL, 0)) - return -errno; - - *cpu_infos = uv__malloc(numcpus * sizeof(**cpu_infos)); - if (!(*cpu_infos)) - return -ENOMEM; - - *count = numcpus; - - which[1] = HW_CPUSPEED; - size = sizeof(cpuspeed); - if (sysctl(which, 2, &cpuspeed, &size, NULL, 0)) { - SAVE_ERRNO(uv__free(*cpu_infos)); - return -errno; - } - - size = sizeof(info); - which[0] = CTL_KERN; - which[1] = KERN_CPTIME2; - for (i = 0; i < numcpus; i++) { - which[2] = i; - size = sizeof(info); - if (sysctl(which, 3, &info, &size, NULL, 0)) { - SAVE_ERRNO(uv__free(*cpu_infos)); - return -errno; - } - - cpu_info = &(*cpu_infos)[i]; - - cpu_info->cpu_times.user = (uint64_t)(info[CP_USER]) * multiplier; - cpu_info->cpu_times.nice = (uint64_t)(info[CP_NICE]) * multiplier; - cpu_info->cpu_times.sys = (uint64_t)(info[CP_SYS]) * multiplier; - cpu_info->cpu_times.idle = (uint64_t)(info[CP_IDLE]) * multiplier; - cpu_info->cpu_times.irq = (uint64_t)(info[CP_INTR]) * multiplier; - - cpu_info->model = uv__strdup(model); - cpu_info->speed = cpuspeed; - } - - return 0; -} - - -void uv_free_cpu_info(uv_cpu_info_t* cpu_infos, int count) { - int i; - - for (i = 0; i < count; i++) { - uv__free(cpu_infos[i].model); - } - - uv__free(cpu_infos); -} - - -int uv_interface_addresses(uv_interface_address_t** addresses, - int* count) { - struct ifaddrs *addrs, *ent; - uv_interface_address_t* address; - int i; - struct sockaddr_dl *sa_addr; - - if (getifaddrs(&addrs) != 0) - return -errno; - - *count = 0; - - /* Count the number of interfaces */ - for (ent = addrs; ent != NULL; ent = ent->ifa_next) { - if (!((ent->ifa_flags & IFF_UP) && (ent->ifa_flags & IFF_RUNNING)) || - (ent->ifa_addr == NULL) || - (ent->ifa_addr->sa_family != PF_INET)) { - continue; - } - (*count)++; - } - - *addresses = uv__malloc(*count * sizeof(**addresses)); - - if (!(*addresses)) - return -ENOMEM; - - address = *addresses; - - for (ent = addrs; ent != NULL; ent = ent->ifa_next) { - if (!((ent->ifa_flags & IFF_UP) && (ent->ifa_flags & IFF_RUNNING))) - continue; - - if (ent->ifa_addr == NULL) - continue; - - if (ent->ifa_addr->sa_family != PF_INET) - continue; - - address->name = uv__strdup(ent->ifa_name); - - if (ent->ifa_addr->sa_family == AF_INET6) { - address->address.address6 = *((struct sockaddr_in6*) ent->ifa_addr); - } else { - address->address.address4 = *((struct sockaddr_in*) ent->ifa_addr); - } - - if (ent->ifa_netmask->sa_family == AF_INET6) { - address->netmask.netmask6 = *((struct sockaddr_in6*) ent->ifa_netmask); - } else { - address->netmask.netmask4 = *((struct sockaddr_in*) ent->ifa_netmask); - } - - address->is_internal = !!(ent->ifa_flags & IFF_LOOPBACK); - - address++; - } - - /* Fill in physical addresses for each interface */ - for (ent = addrs; ent != NULL; ent = ent->ifa_next) { - if (!((ent->ifa_flags & IFF_UP) && (ent->ifa_flags & IFF_RUNNING)) || - (ent->ifa_addr == NULL) || - (ent->ifa_addr->sa_family != AF_LINK)) { - continue; - } - - address = *addresses; - - for (i = 0; i < (*count); i++) { - if (strcmp(address->name, ent->ifa_name) == 0) { - sa_addr = (struct sockaddr_dl*)(ent->ifa_addr); - memcpy(address->phys_addr, LLADDR(sa_addr), sizeof(address->phys_addr)); - } - address++; - } - } - - freeifaddrs(addrs); - - return 0; -} - - -void uv_free_interface_addresses(uv_interface_address_t* addresses, - int count) { - int i; - - for (i = 0; i < count; i++) { - uv__free(addresses[i].name); - } - - uv__free(addresses); -} diff --git a/outside/libuv-v1.7.5/src/unix/pipe.c b/outside/libuv-v1.7.5/src/unix/pipe.c deleted file mode 100644 index 7f87a713b..000000000 --- a/outside/libuv-v1.7.5/src/unix/pipe.c +++ /dev/null @@ -1,288 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "internal.h" - -#include -#include -#include -#include -#include -#include - - -int uv_pipe_init(uv_loop_t* loop, uv_pipe_t* handle, int ipc) { - uv__stream_init(loop, (uv_stream_t*)handle, UV_NAMED_PIPE); - handle->shutdown_req = NULL; - handle->connect_req = NULL; - handle->pipe_fname = NULL; - handle->ipc = ipc; - return 0; -} - - -int uv_pipe_bind(uv_pipe_t* handle, const char* name) { - struct sockaddr_un saddr; - const char* pipe_fname; - int sockfd; - int err; - - pipe_fname = NULL; - sockfd = -1; - - /* Already bound? */ - if (uv__stream_fd(handle) >= 0) - return -EINVAL; - - /* Make a copy of the file name, it outlives this function's scope. */ - pipe_fname = uv__strdup(name); - if (pipe_fname == NULL) - return -ENOMEM; - - /* We've got a copy, don't touch the original any more. */ - name = NULL; - - err = uv__socket(AF_UNIX, SOCK_STREAM, 0); - if (err < 0) - goto err_socket; - sockfd = err; - - memset(&saddr, 0, sizeof saddr); - strncpy(saddr.sun_path, pipe_fname, sizeof(saddr.sun_path) - 1); - saddr.sun_path[sizeof(saddr.sun_path) - 1] = '\0'; - saddr.sun_family = AF_UNIX; - - if (bind(sockfd, (struct sockaddr*)&saddr, sizeof saddr)) { - err = -errno; - /* Convert ENOENT to EACCES for compatibility with Windows. */ - if (err == -ENOENT) - err = -EACCES; - goto err_bind; - } - - /* Success. */ - handle->pipe_fname = pipe_fname; /* Is a strdup'ed copy. */ - handle->io_watcher.fd = sockfd; - return 0; - -err_bind: - uv__close(sockfd); - -err_socket: - uv__free((void*)pipe_fname); - return err; -} - - -int uv_pipe_listen(uv_pipe_t* handle, int backlog, uv_connection_cb cb) { - if (uv__stream_fd(handle) == -1) - return -EINVAL; - - if (listen(uv__stream_fd(handle), backlog)) - return -errno; - - handle->connection_cb = cb; - handle->io_watcher.cb = uv__server_io; - uv__io_start(handle->loop, &handle->io_watcher, UV__POLLIN); - return 0; -} - - -void uv__pipe_close(uv_pipe_t* handle) { - if (handle->pipe_fname) { - /* - * Unlink the file system entity before closing the file descriptor. - * Doing it the other way around introduces a race where our process - * unlinks a socket with the same name that's just been created by - * another thread or process. - */ - unlink(handle->pipe_fname); - uv__free((void*)handle->pipe_fname); - handle->pipe_fname = NULL; - } - - uv__stream_close((uv_stream_t*)handle); -} - - -int uv_pipe_open(uv_pipe_t* handle, uv_file fd) { - int err; - - err = uv__nonblock(fd, 1); - if (err) - return err; - -#if defined(__APPLE__) - err = uv__stream_try_select((uv_stream_t*) handle, &fd); - if (err) - return err; -#endif /* defined(__APPLE__) */ - - return uv__stream_open((uv_stream_t*)handle, - fd, - UV_STREAM_READABLE | UV_STREAM_WRITABLE); -} - - -void uv_pipe_connect(uv_connect_t* req, - uv_pipe_t* handle, - const char* name, - uv_connect_cb cb) { - struct sockaddr_un saddr; - int new_sock; - int err; - int r; - - new_sock = (uv__stream_fd(handle) == -1); - - if (new_sock) { - err = uv__socket(AF_UNIX, SOCK_STREAM, 0); - if (err < 0) - goto out; - handle->io_watcher.fd = err; - } - - memset(&saddr, 0, sizeof saddr); - strncpy(saddr.sun_path, name, sizeof(saddr.sun_path) - 1); - saddr.sun_path[sizeof(saddr.sun_path) - 1] = '\0'; - saddr.sun_family = AF_UNIX; - - do { - r = connect(uv__stream_fd(handle), - (struct sockaddr*)&saddr, sizeof saddr); - } - while (r == -1 && errno == EINTR); - - if (r == -1 && errno != EINPROGRESS) { - err = -errno; - goto out; - } - - err = 0; - if (new_sock) { - err = uv__stream_open((uv_stream_t*)handle, - uv__stream_fd(handle), - UV_STREAM_READABLE | UV_STREAM_WRITABLE); - } - - if (err == 0) - uv__io_start(handle->loop, &handle->io_watcher, UV__POLLIN | UV__POLLOUT); - -out: - handle->delayed_error = err; - handle->connect_req = req; - - uv__req_init(handle->loop, req, UV_CONNECT); - req->handle = (uv_stream_t*)handle; - req->cb = cb; - QUEUE_INIT(&req->queue); - - /* Force callback to run on next tick in case of error. */ - if (err) - uv__io_feed(handle->loop, &handle->io_watcher); - - /* Mimic the Windows pipe implementation, always - * return 0 and let the callback handle errors. - */ -} - - -typedef int (*uv__peersockfunc)(int, struct sockaddr*, socklen_t*); - - -static int uv__pipe_getsockpeername(const uv_pipe_t* handle, - uv__peersockfunc func, - char* buffer, - size_t* size) { - struct sockaddr_un sa; - socklen_t addrlen; - int err; - - addrlen = sizeof(sa); - memset(&sa, 0, addrlen); - err = func(uv__stream_fd(handle), (struct sockaddr*) &sa, &addrlen); - if (err < 0) { - *size = 0; - return -errno; - } - -#if defined(__linux__) - if (sa.sun_path[0] == 0) - /* Linux abstract namespace */ - addrlen -= offsetof(struct sockaddr_un, sun_path); - else -#endif - addrlen = strlen(sa.sun_path); - - - if (addrlen > *size) { - *size = addrlen; - return UV_ENOBUFS; - } - - memcpy(buffer, sa.sun_path, addrlen); - *size = addrlen; - - return 0; -} - - -int uv_pipe_getsockname(const uv_pipe_t* handle, char* buffer, size_t* size) { - return uv__pipe_getsockpeername(handle, getsockname, buffer, size); -} - - -int uv_pipe_getpeername(const uv_pipe_t* handle, char* buffer, size_t* size) { - return uv__pipe_getsockpeername(handle, getpeername, buffer, size); -} - - -void uv_pipe_pending_instances(uv_pipe_t* handle, int count) { -} - - -int uv_pipe_pending_count(uv_pipe_t* handle) { - uv__stream_queued_fds_t* queued_fds; - - if (!handle->ipc) - return 0; - - if (handle->accepted_fd == -1) - return 0; - - if (handle->queued_fds == NULL) - return 1; - - queued_fds = handle->queued_fds; - return queued_fds->offset + 1; -} - - -uv_handle_type uv_pipe_pending_type(uv_pipe_t* handle) { - if (!handle->ipc) - return UV_UNKNOWN_HANDLE; - - if (handle->accepted_fd == -1) - return UV_UNKNOWN_HANDLE; - else - return uv__handle_type(handle->accepted_fd); -} diff --git a/outside/libuv-v1.7.5/src/unix/poll.c b/outside/libuv-v1.7.5/src/unix/poll.c deleted file mode 100644 index 37da3b958..000000000 --- a/outside/libuv-v1.7.5/src/unix/poll.c +++ /dev/null @@ -1,113 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "internal.h" - -#include -#include -#include - - -static void uv__poll_io(uv_loop_t* loop, uv__io_t* w, unsigned int events) { - uv_poll_t* handle; - int pevents; - - handle = container_of(w, uv_poll_t, io_watcher); - - if (events & UV__POLLERR) { - uv__io_stop(loop, w, UV__POLLIN | UV__POLLOUT); - uv__handle_stop(handle); - handle->poll_cb(handle, -EBADF, 0); - return; - } - - pevents = 0; - if (events & UV__POLLIN) - pevents |= UV_READABLE; - if (events & UV__POLLOUT) - pevents |= UV_WRITABLE; - - handle->poll_cb(handle, 0, pevents); -} - - -int uv_poll_init(uv_loop_t* loop, uv_poll_t* handle, int fd) { - int err; - - err = uv__nonblock(fd, 1); - if (err) - return err; - - uv__handle_init(loop, (uv_handle_t*) handle, UV_POLL); - uv__io_init(&handle->io_watcher, uv__poll_io, fd); - handle->poll_cb = NULL; - return 0; -} - - -int uv_poll_init_socket(uv_loop_t* loop, uv_poll_t* handle, - uv_os_sock_t socket) { - return uv_poll_init(loop, handle, socket); -} - - -static void uv__poll_stop(uv_poll_t* handle) { - uv__io_stop(handle->loop, &handle->io_watcher, UV__POLLIN | UV__POLLOUT); - uv__handle_stop(handle); -} - - -int uv_poll_stop(uv_poll_t* handle) { - assert(!(handle->flags & (UV_CLOSING | UV_CLOSED))); - uv__poll_stop(handle); - return 0; -} - - -int uv_poll_start(uv_poll_t* handle, int pevents, uv_poll_cb poll_cb) { - int events; - - assert((pevents & ~(UV_READABLE | UV_WRITABLE)) == 0); - assert(!(handle->flags & (UV_CLOSING | UV_CLOSED))); - - uv__poll_stop(handle); - - if (pevents == 0) - return 0; - - events = 0; - if (pevents & UV_READABLE) - events |= UV__POLLIN; - if (pevents & UV_WRITABLE) - events |= UV__POLLOUT; - - uv__io_start(handle->loop, &handle->io_watcher, events); - uv__handle_start(handle); - handle->poll_cb = poll_cb; - - return 0; -} - - -void uv__poll_close(uv_poll_t* handle) { - uv__poll_stop(handle); -} diff --git a/outside/libuv-v1.7.5/src/unix/process.c b/outside/libuv-v1.7.5/src/unix/process.c deleted file mode 100644 index 9fa061e6b..000000000 --- a/outside/libuv-v1.7.5/src/unix/process.c +++ /dev/null @@ -1,552 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "internal.h" - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#if defined(__APPLE__) && !TARGET_OS_IPHONE -# include -# define environ (*_NSGetEnviron()) -#else -extern char **environ; -#endif - -#ifdef __linux__ -# include -#endif - - -static void uv__chld(uv_signal_t* handle, int signum) { - uv_process_t* process; - uv_loop_t* loop; - int exit_status; - int term_signal; - int status; - pid_t pid; - QUEUE pending; - QUEUE* q; - QUEUE* h; - - assert(signum == SIGCHLD); - - QUEUE_INIT(&pending); - loop = handle->loop; - - h = &loop->process_handles; - q = QUEUE_HEAD(h); - while (q != h) { - process = QUEUE_DATA(q, uv_process_t, queue); - q = QUEUE_NEXT(q); - - do - pid = waitpid(process->pid, &status, WNOHANG); - while (pid == -1 && errno == EINTR); - - if (pid == 0) - continue; - - if (pid == -1) { - if (errno != ECHILD) - abort(); - continue; - } - - process->status = status; - QUEUE_REMOVE(&process->queue); - QUEUE_INSERT_TAIL(&pending, &process->queue); - } - - h = &pending; - q = QUEUE_HEAD(h); - while (q != h) { - process = QUEUE_DATA(q, uv_process_t, queue); - q = QUEUE_NEXT(q); - - QUEUE_REMOVE(&process->queue); - QUEUE_INIT(&process->queue); - uv__handle_stop(process); - - if (process->exit_cb == NULL) - continue; - - exit_status = 0; - if (WIFEXITED(process->status)) - exit_status = WEXITSTATUS(process->status); - - term_signal = 0; - if (WIFSIGNALED(process->status)) - term_signal = WTERMSIG(process->status); - - process->exit_cb(process, exit_status, term_signal); - } - assert(QUEUE_EMPTY(&pending)); -} - - -int uv__make_socketpair(int fds[2], int flags) { -#if defined(__linux__) - static int no_cloexec; - - if (no_cloexec) - goto skip; - - if (socketpair(AF_UNIX, SOCK_STREAM | UV__SOCK_CLOEXEC | flags, 0, fds) == 0) - return 0; - - /* Retry on EINVAL, it means SOCK_CLOEXEC is not supported. - * Anything else is a genuine error. - */ - if (errno != EINVAL) - return -errno; - - no_cloexec = 1; - -skip: -#endif - - if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds)) - return -errno; - - uv__cloexec(fds[0], 1); - uv__cloexec(fds[1], 1); - - if (flags & UV__F_NONBLOCK) { - uv__nonblock(fds[0], 1); - uv__nonblock(fds[1], 1); - } - - return 0; -} - - -int uv__make_pipe(int fds[2], int flags) { -#if defined(__linux__) - static int no_pipe2; - - if (no_pipe2) - goto skip; - - if (uv__pipe2(fds, flags | UV__O_CLOEXEC) == 0) - return 0; - - if (errno != ENOSYS) - return -errno; - - no_pipe2 = 1; - -skip: -#endif - - if (pipe(fds)) - return -errno; - - uv__cloexec(fds[0], 1); - uv__cloexec(fds[1], 1); - - if (flags & UV__F_NONBLOCK) { - uv__nonblock(fds[0], 1); - uv__nonblock(fds[1], 1); - } - - return 0; -} - - -/* - * Used for initializing stdio streams like options.stdin_stream. Returns - * zero on success. See also the cleanup section in uv_spawn(). - */ -static int uv__process_init_stdio(uv_stdio_container_t* container, int fds[2]) { - int mask; - int fd; - - mask = UV_IGNORE | UV_CREATE_PIPE | UV_INHERIT_FD | UV_INHERIT_STREAM; - - switch (container->flags & mask) { - case UV_IGNORE: - return 0; - - case UV_CREATE_PIPE: - assert(container->data.stream != NULL); - if (container->data.stream->type != UV_NAMED_PIPE) - return -EINVAL; - else - return uv__make_socketpair(fds, 0); - - case UV_INHERIT_FD: - case UV_INHERIT_STREAM: - if (container->flags & UV_INHERIT_FD) - fd = container->data.fd; - else - fd = uv__stream_fd(container->data.stream); - - if (fd == -1) - return -EINVAL; - - fds[1] = fd; - return 0; - - default: - assert(0 && "Unexpected flags"); - return -EINVAL; - } -} - - -static int uv__process_open_stream(uv_stdio_container_t* container, - int pipefds[2], - int writable) { - int flags; - int err; - - if (!(container->flags & UV_CREATE_PIPE) || pipefds[0] < 0) - return 0; - - err = uv__close(pipefds[1]); - if (err != 0 && err != -EINPROGRESS) - abort(); - - pipefds[1] = -1; - uv__nonblock(pipefds[0], 1); - - if (container->data.stream->type == UV_NAMED_PIPE && - ((uv_pipe_t*)container->data.stream)->ipc) - flags = UV_STREAM_READABLE | UV_STREAM_WRITABLE; - else if (writable) - flags = UV_STREAM_WRITABLE; - else - flags = UV_STREAM_READABLE; - - return uv__stream_open(container->data.stream, pipefds[0], flags); -} - - -static void uv__process_close_stream(uv_stdio_container_t* container) { - if (!(container->flags & UV_CREATE_PIPE)) return; - uv__stream_close((uv_stream_t*)container->data.stream); -} - - -static void uv__write_int(int fd, int val) { - ssize_t n; - - do - n = write(fd, &val, sizeof(val)); - while (n == -1 && errno == EINTR); - - if (n == -1 && errno == EPIPE) - return; /* parent process has quit */ - - assert(n == sizeof(val)); -} - - -static void uv__process_child_init(const uv_process_options_t* options, - int stdio_count, - int (*pipes)[2], - int error_fd) { - int close_fd; - int use_fd; - int fd; - - if (options->flags & UV_PROCESS_DETACHED) - setsid(); - - /* First duplicate low numbered fds, since it's not safe to duplicate them, - * they could get replaced. Example: swapping stdout and stderr; without - * this fd 2 (stderr) would be duplicated into fd 1, thus making both - * stdout and stderr go to the same fd, which was not the intention. */ - for (fd = 0; fd < stdio_count; fd++) { - use_fd = pipes[fd][1]; - if (use_fd < 0 || use_fd >= fd) - continue; - pipes[fd][1] = fcntl(use_fd, F_DUPFD, stdio_count); - if (pipes[fd][1] == -1) { - uv__write_int(error_fd, -errno); - _exit(127); - } - } - - for (fd = 0; fd < stdio_count; fd++) { - close_fd = pipes[fd][0]; - use_fd = pipes[fd][1]; - - if (use_fd < 0) { - if (fd >= 3) - continue; - else { - /* redirect stdin, stdout and stderr to /dev/null even if UV_IGNORE is - * set - */ - use_fd = open("/dev/null", fd == 0 ? O_RDONLY : O_RDWR); - close_fd = use_fd; - - if (use_fd == -1) { - uv__write_int(error_fd, -errno); - _exit(127); - } - } - } - - if (fd == use_fd) - uv__cloexec(use_fd, 0); - else - fd = dup2(use_fd, fd); - - if (fd == -1) { - uv__write_int(error_fd, -errno); - _exit(127); - } - - if (fd <= 2) - uv__nonblock(fd, 0); - - if (close_fd >= stdio_count) - uv__close(close_fd); - } - - for (fd = 0; fd < stdio_count; fd++) { - use_fd = pipes[fd][1]; - - if (use_fd >= stdio_count) - uv__close(use_fd); - } - - if (options->cwd != NULL && chdir(options->cwd)) { - uv__write_int(error_fd, -errno); - _exit(127); - } - - if (options->flags & (UV_PROCESS_SETUID | UV_PROCESS_SETGID)) { - /* When dropping privileges from root, the `setgroups` call will - * remove any extraneous groups. If we don't call this, then - * even though our uid has dropped, we may still have groups - * that enable us to do super-user things. This will fail if we - * aren't root, so don't bother checking the return value, this - * is just done as an optimistic privilege dropping function. - */ - SAVE_ERRNO(setgroups(0, NULL)); - } - - if ((options->flags & UV_PROCESS_SETGID) && setgid(options->gid)) { - uv__write_int(error_fd, -errno); - _exit(127); - } - - if ((options->flags & UV_PROCESS_SETUID) && setuid(options->uid)) { - uv__write_int(error_fd, -errno); - _exit(127); - } - - if (options->env != NULL) { - environ = options->env; - } - - execvp(options->file, options->args); - uv__write_int(error_fd, -errno); - _exit(127); -} - - -int uv_spawn(uv_loop_t* loop, - uv_process_t* process, - const uv_process_options_t* options) { - int signal_pipe[2] = { -1, -1 }; - int (*pipes)[2]; - int stdio_count; - ssize_t r; - pid_t pid; - int err; - int exec_errorno; - int i; - int status; - - assert(options->file != NULL); - assert(!(options->flags & ~(UV_PROCESS_DETACHED | - UV_PROCESS_SETGID | - UV_PROCESS_SETUID | - UV_PROCESS_WINDOWS_HIDE | - UV_PROCESS_WINDOWS_VERBATIM_ARGUMENTS))); - - uv__handle_init(loop, (uv_handle_t*)process, UV_PROCESS); - QUEUE_INIT(&process->queue); - - stdio_count = options->stdio_count; - if (stdio_count < 3) - stdio_count = 3; - - err = -ENOMEM; - pipes = uv__malloc(stdio_count * sizeof(*pipes)); - if (pipes == NULL) - goto error; - - for (i = 0; i < stdio_count; i++) { - pipes[i][0] = -1; - pipes[i][1] = -1; - } - - for (i = 0; i < options->stdio_count; i++) { - err = uv__process_init_stdio(options->stdio + i, pipes[i]); - if (err) - goto error; - } - - /* This pipe is used by the parent to wait until - * the child has called `execve()`. We need this - * to avoid the following race condition: - * - * if ((pid = fork()) > 0) { - * kill(pid, SIGTERM); - * } - * else if (pid == 0) { - * execve("/bin/cat", argp, envp); - * } - * - * The parent sends a signal immediately after forking. - * Since the child may not have called `execve()` yet, - * there is no telling what process receives the signal, - * our fork or /bin/cat. - * - * To avoid ambiguity, we create a pipe with both ends - * marked close-on-exec. Then, after the call to `fork()`, - * the parent polls the read end until it EOFs or errors with EPIPE. - */ - err = uv__make_pipe(signal_pipe, 0); - if (err) - goto error; - - uv_signal_start(&loop->child_watcher, uv__chld, SIGCHLD); - - /* Acquire write lock to prevent opening new fds in worker threads */ - uv_rwlock_wrlock(&loop->cloexec_lock); - pid = fork(); - - if (pid == -1) { - err = -errno; - uv_rwlock_wrunlock(&loop->cloexec_lock); - uv__close(signal_pipe[0]); - uv__close(signal_pipe[1]); - goto error; - } - - if (pid == 0) { - uv__process_child_init(options, stdio_count, pipes, signal_pipe[1]); - abort(); - } - - /* Release lock in parent process */ - uv_rwlock_wrunlock(&loop->cloexec_lock); - uv__close(signal_pipe[1]); - - process->status = 0; - exec_errorno = 0; - do - r = read(signal_pipe[0], &exec_errorno, sizeof(exec_errorno)); - while (r == -1 && errno == EINTR); - - if (r == 0) - ; /* okay, EOF */ - else if (r == sizeof(exec_errorno)) { - do - err = waitpid(pid, &status, 0); /* okay, read errorno */ - while (err == -1 && errno == EINTR); - assert(err == pid); - } else if (r == -1 && errno == EPIPE) { - do - err = waitpid(pid, &status, 0); /* okay, got EPIPE */ - while (err == -1 && errno == EINTR); - assert(err == pid); - } else - abort(); - - uv__close(signal_pipe[0]); - - for (i = 0; i < options->stdio_count; i++) { - err = uv__process_open_stream(options->stdio + i, pipes[i], i == 0); - if (err == 0) - continue; - - while (i--) - uv__process_close_stream(options->stdio + i); - - goto error; - } - - /* Only activate this handle if exec() happened successfully */ - if (exec_errorno == 0) { - QUEUE_INSERT_TAIL(&loop->process_handles, &process->queue); - uv__handle_start(process); - } - - process->pid = pid; - process->exit_cb = options->exit_cb; - - uv__free(pipes); - return exec_errorno; - -error: - if (pipes != NULL) { - for (i = 0; i < stdio_count; i++) { - if (i < options->stdio_count) - if (options->stdio[i].flags & (UV_INHERIT_FD | UV_INHERIT_STREAM)) - continue; - if (pipes[i][0] != -1) - close(pipes[i][0]); - if (pipes[i][1] != -1) - close(pipes[i][1]); - } - uv__free(pipes); - } - - return err; -} - - -int uv_process_kill(uv_process_t* process, int signum) { - return uv_kill(process->pid, signum); -} - - -int uv_kill(int pid, int signum) { - if (kill(pid, signum)) - return -errno; - else - return 0; -} - - -void uv__process_close(uv_process_t* handle) { - QUEUE_REMOVE(&handle->queue); - uv__handle_stop(handle); - if (QUEUE_EMPTY(&handle->loop->process_handles)) - uv_signal_stop(&handle->loop->child_watcher); -} diff --git a/outside/libuv-v1.7.5/src/unix/proctitle.c b/outside/libuv-v1.7.5/src/unix/proctitle.c deleted file mode 100644 index 19214e5ec..000000000 --- a/outside/libuv-v1.7.5/src/unix/proctitle.c +++ /dev/null @@ -1,102 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * 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. - */ - -#include "uv.h" -#include "internal.h" - -#include -#include - -extern void uv__set_process_title(const char* title); - -static void* args_mem; - -static struct { - char* str; - size_t len; -} process_title; - - -char** uv_setup_args(int argc, char** argv) { - char** new_argv; - size_t size; - char* s; - int i; - - if (argc <= 0) - return argv; - - /* Calculate how much memory we need for the argv strings. */ - size = 0; - for (i = 0; i < argc; i++) - size += strlen(argv[i]) + 1; - - process_title.str = argv[0]; - process_title.len = argv[argc - 1] + strlen(argv[argc - 1]) - argv[0]; - assert(process_title.len + 1 == size); /* argv memory should be adjacent. */ - - /* Add space for the argv pointers. */ - size += (argc + 1) * sizeof(char*); - - new_argv = uv__malloc(size); - if (new_argv == NULL) - return argv; - args_mem = new_argv; - - /* Copy over the strings and set up the pointer table. */ - s = (char*) &new_argv[argc + 1]; - for (i = 0; i < argc; i++) { - size = strlen(argv[i]) + 1; - memcpy(s, argv[i], size); - new_argv[i] = s; - s += size; - } - new_argv[i] = NULL; - - return new_argv; -} - - -int uv_set_process_title(const char* title) { - if (process_title.len == 0) - return 0; - - /* No need to terminate, byte after is always '\0'. */ - strncpy(process_title.str, title, process_title.len); - uv__set_process_title(title); - - return 0; -} - - -int uv_get_process_title(char* buffer, size_t size) { - if (process_title.len > 0) - strncpy(buffer, process_title.str, size); - else if (size > 0) - buffer[0] = '\0'; - - return 0; -} - - -UV_DESTRUCTOR(static void free_args_mem(void)) { - uv__free(args_mem); /* Keep valgrind happy. */ - args_mem = NULL; -} diff --git a/outside/libuv-v1.7.5/src/unix/pthread-fixes.c b/outside/libuv-v1.7.5/src/unix/pthread-fixes.c deleted file mode 100644 index 3a71eb5aa..000000000 --- a/outside/libuv-v1.7.5/src/unix/pthread-fixes.c +++ /dev/null @@ -1,104 +0,0 @@ -/* Copyright (c) 2013, Sony Mobile Communications AB - * Copyright (c) 2012, Google Inc. - 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. -*/ - -/* Android versions < 4.1 have a broken pthread_sigmask. - * Note that this block of code must come before any inclusion of - * pthread-fixes.h so that the real pthread_sigmask can be referenced. - * */ -#include -#include -#include - -int uv__pthread_sigmask(int how, const sigset_t* set, sigset_t* oset) { - static int workaround; - - if (workaround) { - return sigprocmask(how, set, oset); - } else if (pthread_sigmask(how, set, oset)) { - if (errno == EINVAL && sigprocmask(how, set, oset) == 0) { - workaround = 1; - return 0; - } else { - return -1; - } - } else { - return 0; - } -} - -/*Android doesn't provide pthread_barrier_t for now.*/ -#ifndef PTHREAD_BARRIER_SERIAL_THREAD - -#include "pthread-fixes.h" - -int pthread_barrier_init(pthread_barrier_t* barrier, - const void* barrier_attr, - unsigned count) { - barrier->count = count; - pthread_mutex_init(&barrier->mutex, NULL); - pthread_cond_init(&barrier->cond, NULL); - return 0; -} - -int pthread_barrier_wait(pthread_barrier_t* barrier) { - /* Lock the mutex*/ - pthread_mutex_lock(&barrier->mutex); - /* Decrement the count. If this is the first thread to reach 0, wake up - waiters, unlock the mutex, then return PTHREAD_BARRIER_SERIAL_THREAD.*/ - if (--barrier->count == 0) { - /* First thread to reach the barrier */ - pthread_cond_broadcast(&barrier->cond); - pthread_mutex_unlock(&barrier->mutex); - return PTHREAD_BARRIER_SERIAL_THREAD; - } - /* Otherwise, wait for other threads until the count reaches 0, then - return 0 to indicate this is not the first thread.*/ - do { - pthread_cond_wait(&barrier->cond, &barrier->mutex); - } while (barrier->count > 0); - - pthread_mutex_unlock(&barrier->mutex); - return 0; -} - -int pthread_barrier_destroy(pthread_barrier_t *barrier) { - barrier->count = 0; - pthread_cond_destroy(&barrier->cond); - pthread_mutex_destroy(&barrier->mutex); - return 0; -} - -#endif /* defined(PTHREAD_BARRIER_SERIAL_THREAD) */ - -int pthread_yield(void) { - sched_yield(); - return 0; -} diff --git a/outside/libuv-v1.7.5/src/unix/signal.c b/outside/libuv-v1.7.5/src/unix/signal.c deleted file mode 100644 index 0b7a405c1..000000000 --- a/outside/libuv-v1.7.5/src/unix/signal.c +++ /dev/null @@ -1,465 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * 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. - */ - -#include "uv.h" -#include "internal.h" - -#include -#include -#include -#include -#include -#include - - -typedef struct { - uv_signal_t* handle; - int signum; -} uv__signal_msg_t; - -RB_HEAD(uv__signal_tree_s, uv_signal_s); - - -static int uv__signal_unlock(void); -static void uv__signal_event(uv_loop_t* loop, uv__io_t* w, unsigned int events); -static int uv__signal_compare(uv_signal_t* w1, uv_signal_t* w2); -static void uv__signal_stop(uv_signal_t* handle); - - -static pthread_once_t uv__signal_global_init_guard = PTHREAD_ONCE_INIT; -static struct uv__signal_tree_s uv__signal_tree = - RB_INITIALIZER(uv__signal_tree); -static int uv__signal_lock_pipefd[2]; - - -RB_GENERATE_STATIC(uv__signal_tree_s, - uv_signal_s, tree_entry, - uv__signal_compare) - - -static void uv__signal_global_init(void) { - if (uv__make_pipe(uv__signal_lock_pipefd, 0)) - abort(); - - if (uv__signal_unlock()) - abort(); -} - - -void uv__signal_global_once_init(void) { - pthread_once(&uv__signal_global_init_guard, uv__signal_global_init); -} - - - -static int uv__signal_lock(void) { - int r; - char data; - - do { - r = read(uv__signal_lock_pipefd[0], &data, sizeof data); - } while (r < 0 && errno == EINTR); - - return (r < 0) ? -1 : 0; -} - - -static int uv__signal_unlock(void) { - int r; - char data = 42; - - do { - r = write(uv__signal_lock_pipefd[1], &data, sizeof data); - } while (r < 0 && errno == EINTR); - - return (r < 0) ? -1 : 0; -} - - -static void uv__signal_block_and_lock(sigset_t* saved_sigmask) { - sigset_t new_mask; - - if (sigfillset(&new_mask)) - abort(); - - if (pthread_sigmask(SIG_SETMASK, &new_mask, saved_sigmask)) - abort(); - - if (uv__signal_lock()) - abort(); -} - - -static void uv__signal_unlock_and_unblock(sigset_t* saved_sigmask) { - if (uv__signal_unlock()) - abort(); - - if (pthread_sigmask(SIG_SETMASK, saved_sigmask, NULL)) - abort(); -} - - -static uv_signal_t* uv__signal_first_handle(int signum) { - /* This function must be called with the signal lock held. */ - uv_signal_t lookup; - uv_signal_t* handle; - - lookup.signum = signum; - lookup.loop = NULL; - - handle = RB_NFIND(uv__signal_tree_s, &uv__signal_tree, &lookup); - - if (handle != NULL && handle->signum == signum) - return handle; - - return NULL; -} - - -static void uv__signal_handler(int signum) { - uv__signal_msg_t msg; - uv_signal_t* handle; - int saved_errno; - - saved_errno = errno; - memset(&msg, 0, sizeof msg); - - if (uv__signal_lock()) { - errno = saved_errno; - return; - } - - for (handle = uv__signal_first_handle(signum); - handle != NULL && handle->signum == signum; - handle = RB_NEXT(uv__signal_tree_s, &uv__signal_tree, handle)) { - int r; - - msg.signum = signum; - msg.handle = handle; - - /* write() should be atomic for small data chunks, so the entire message - * should be written at once. In theory the pipe could become full, in - * which case the user is out of luck. - */ - do { - r = write(handle->loop->signal_pipefd[1], &msg, sizeof msg); - } while (r == -1 && errno == EINTR); - - assert(r == sizeof msg || - (r == -1 && (errno == EAGAIN || errno == EWOULDBLOCK))); - - if (r != -1) - handle->caught_signals++; - } - - uv__signal_unlock(); - errno = saved_errno; -} - - -static int uv__signal_register_handler(int signum) { - /* When this function is called, the signal lock must be held. */ - struct sigaction sa; - - /* XXX use a separate signal stack? */ - memset(&sa, 0, sizeof(sa)); - if (sigfillset(&sa.sa_mask)) - abort(); - sa.sa_handler = uv__signal_handler; - - /* XXX save old action so we can restore it later on? */ - if (sigaction(signum, &sa, NULL)) - return -errno; - - return 0; -} - - -static void uv__signal_unregister_handler(int signum) { - /* When this function is called, the signal lock must be held. */ - struct sigaction sa; - - memset(&sa, 0, sizeof(sa)); - sa.sa_handler = SIG_DFL; - - /* sigaction can only fail with EINVAL or EFAULT; an attempt to deregister a - * signal implies that it was successfully registered earlier, so EINVAL - * should never happen. - */ - if (sigaction(signum, &sa, NULL)) - abort(); -} - - -static int uv__signal_loop_once_init(uv_loop_t* loop) { - int err; - - /* Return if already initialized. */ - if (loop->signal_pipefd[0] != -1) - return 0; - - err = uv__make_pipe(loop->signal_pipefd, UV__F_NONBLOCK); - if (err) - return err; - - uv__io_init(&loop->signal_io_watcher, - uv__signal_event, - loop->signal_pipefd[0]); - uv__io_start(loop, &loop->signal_io_watcher, UV__POLLIN); - - return 0; -} - - -void uv__signal_loop_cleanup(uv_loop_t* loop) { - QUEUE* q; - - /* Stop all the signal watchers that are still attached to this loop. This - * ensures that the (shared) signal tree doesn't contain any invalid entries - * entries, and that signal handlers are removed when appropriate. - */ - QUEUE_FOREACH(q, &loop->handle_queue) { - uv_handle_t* handle = QUEUE_DATA(q, uv_handle_t, handle_queue); - - if (handle->type == UV_SIGNAL) - uv__signal_stop((uv_signal_t*) handle); - } - - if (loop->signal_pipefd[0] != -1) { - uv__close(loop->signal_pipefd[0]); - loop->signal_pipefd[0] = -1; - } - - if (loop->signal_pipefd[1] != -1) { - uv__close(loop->signal_pipefd[1]); - loop->signal_pipefd[1] = -1; - } -} - - -int uv_signal_init(uv_loop_t* loop, uv_signal_t* handle) { - int err; - - err = uv__signal_loop_once_init(loop); - if (err) - return err; - - uv__handle_init(loop, (uv_handle_t*) handle, UV_SIGNAL); - handle->signum = 0; - handle->caught_signals = 0; - handle->dispatched_signals = 0; - - return 0; -} - - -void uv__signal_close(uv_signal_t* handle) { - - uv__signal_stop(handle); - - /* If there are any caught signals "trapped" in the signal pipe, we can't - * call the close callback yet. Otherwise, add the handle to the finish_close - * queue. - */ - if (handle->caught_signals == handle->dispatched_signals) { - uv__make_close_pending((uv_handle_t*) handle); - } -} - - -int uv_signal_start(uv_signal_t* handle, uv_signal_cb signal_cb, int signum) { - sigset_t saved_sigmask; - int err; - - assert(!(handle->flags & (UV_CLOSING | UV_CLOSED))); - - /* If the user supplies signum == 0, then return an error already. If the - * signum is otherwise invalid then uv__signal_register will find out - * eventually. - */ - if (signum == 0) - return -EINVAL; - - /* Short circuit: if the signal watcher is already watching {signum} don't - * go through the process of deregistering and registering the handler. - * Additionally, this avoids pending signals getting lost in the small time - * time frame that handle->signum == 0. - */ - if (signum == handle->signum) { - handle->signal_cb = signal_cb; - return 0; - } - - /* If the signal handler was already active, stop it first. */ - if (handle->signum != 0) { - uv__signal_stop(handle); - } - - uv__signal_block_and_lock(&saved_sigmask); - - /* If at this point there are no active signal watchers for this signum (in - * any of the loops), it's time to try and register a handler for it here. - */ - if (uv__signal_first_handle(signum) == NULL) { - err = uv__signal_register_handler(signum); - if (err) { - /* Registering the signal handler failed. Must be an invalid signal. */ - uv__signal_unlock_and_unblock(&saved_sigmask); - return err; - } - } - - handle->signum = signum; - RB_INSERT(uv__signal_tree_s, &uv__signal_tree, handle); - - uv__signal_unlock_and_unblock(&saved_sigmask); - - handle->signal_cb = signal_cb; - uv__handle_start(handle); - - return 0; -} - - -static void uv__signal_event(uv_loop_t* loop, - uv__io_t* w, - unsigned int events) { - uv__signal_msg_t* msg; - uv_signal_t* handle; - char buf[sizeof(uv__signal_msg_t) * 32]; - size_t bytes, end, i; - int r; - - bytes = 0; - end = 0; - - do { - r = read(loop->signal_pipefd[0], buf + bytes, sizeof(buf) - bytes); - - if (r == -1 && errno == EINTR) - continue; - - if (r == -1 && (errno == EAGAIN || errno == EWOULDBLOCK)) { - /* If there are bytes in the buffer already (which really is extremely - * unlikely if possible at all) we can't exit the function here. We'll - * spin until more bytes are read instead. - */ - if (bytes > 0) - continue; - - /* Otherwise, there was nothing there. */ - return; - } - - /* Other errors really should never happen. */ - if (r == -1) - abort(); - - bytes += r; - - /* `end` is rounded down to a multiple of sizeof(uv__signal_msg_t). */ - end = (bytes / sizeof(uv__signal_msg_t)) * sizeof(uv__signal_msg_t); - - for (i = 0; i < end; i += sizeof(uv__signal_msg_t)) { - msg = (uv__signal_msg_t*) (buf + i); - handle = msg->handle; - - if (msg->signum == handle->signum) { - assert(!(handle->flags & UV_CLOSING)); - handle->signal_cb(handle, handle->signum); - } - - handle->dispatched_signals++; - - /* If uv_close was called while there were caught signals that were not - * yet dispatched, the uv__finish_close was deferred. Make close pending - * now if this has happened. - */ - if ((handle->flags & UV_CLOSING) && - (handle->caught_signals == handle->dispatched_signals)) { - uv__make_close_pending((uv_handle_t*) handle); - } - } - - bytes -= end; - - /* If there are any "partial" messages left, move them to the start of the - * the buffer, and spin. This should not happen. - */ - if (bytes) { - memmove(buf, buf + end, bytes); - continue; - } - } while (end == sizeof buf); -} - - -static int uv__signal_compare(uv_signal_t* w1, uv_signal_t* w2) { - /* Compare signums first so all watchers with the same signnum end up - * adjacent. - */ - if (w1->signum < w2->signum) return -1; - if (w1->signum > w2->signum) return 1; - - /* Sort by loop pointer, so we can easily look up the first item after - * { .signum = x, .loop = NULL }. - */ - if (w1->loop < w2->loop) return -1; - if (w1->loop > w2->loop) return 1; - - if (w1 < w2) return -1; - if (w1 > w2) return 1; - - return 0; -} - - -int uv_signal_stop(uv_signal_t* handle) { - assert(!(handle->flags & (UV_CLOSING | UV_CLOSED))); - uv__signal_stop(handle); - return 0; -} - - -static void uv__signal_stop(uv_signal_t* handle) { - uv_signal_t* removed_handle; - sigset_t saved_sigmask; - - /* If the watcher wasn't started, this is a no-op. */ - if (handle->signum == 0) - return; - - uv__signal_block_and_lock(&saved_sigmask); - - removed_handle = RB_REMOVE(uv__signal_tree_s, &uv__signal_tree, handle); - assert(removed_handle == handle); - (void) removed_handle; - - /* Check if there are other active signal watchers observing this signal. If - * not, unregister the signal handler. - */ - if (uv__signal_first_handle(handle->signum) == NULL) - uv__signal_unregister_handler(handle->signum); - - uv__signal_unlock_and_unblock(&saved_sigmask); - - handle->signum = 0; - uv__handle_stop(handle); -} diff --git a/outside/libuv-v1.7.5/src/unix/spinlock.h b/outside/libuv-v1.7.5/src/unix/spinlock.h deleted file mode 100644 index a20c83cc6..000000000 --- a/outside/libuv-v1.7.5/src/unix/spinlock.h +++ /dev/null @@ -1,53 +0,0 @@ -/* Copyright (c) 2013, Ben Noordhuis - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef UV_SPINLOCK_H_ -#define UV_SPINLOCK_H_ - -#include "internal.h" /* ACCESS_ONCE, UV_UNUSED */ -#include "atomic-ops.h" - -#define UV_SPINLOCK_INITIALIZER { 0 } - -typedef struct { - int lock; -} uv_spinlock_t; - -UV_UNUSED(static void uv_spinlock_init(uv_spinlock_t* spinlock)); -UV_UNUSED(static void uv_spinlock_lock(uv_spinlock_t* spinlock)); -UV_UNUSED(static void uv_spinlock_unlock(uv_spinlock_t* spinlock)); -UV_UNUSED(static int uv_spinlock_trylock(uv_spinlock_t* spinlock)); - -UV_UNUSED(static void uv_spinlock_init(uv_spinlock_t* spinlock)) { - ACCESS_ONCE(int, spinlock->lock) = 0; -} - -UV_UNUSED(static void uv_spinlock_lock(uv_spinlock_t* spinlock)) { - while (!uv_spinlock_trylock(spinlock)) cpu_relax(); -} - -UV_UNUSED(static void uv_spinlock_unlock(uv_spinlock_t* spinlock)) { - ACCESS_ONCE(int, spinlock->lock) = 0; -} - -UV_UNUSED(static int uv_spinlock_trylock(uv_spinlock_t* spinlock)) { - /* TODO(bnoordhuis) Maybe change to a ticket lock to guarantee fair queueing. - * Not really critical until we have locks that are (frequently) contended - * for by several threads. - */ - return 0 == cmpxchgi(&spinlock->lock, 0, 1); -} - -#endif /* UV_SPINLOCK_H_ */ diff --git a/outside/libuv-v1.7.5/src/unix/stream.c b/outside/libuv-v1.7.5/src/unix/stream.c deleted file mode 100644 index 183b68cf7..000000000 --- a/outside/libuv-v1.7.5/src/unix/stream.c +++ /dev/null @@ -1,1615 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "internal.h" - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include /* IOV_MAX */ - -#if defined(__APPLE__) -# include -# include -# include - -/* Forward declaration */ -typedef struct uv__stream_select_s uv__stream_select_t; - -struct uv__stream_select_s { - uv_stream_t* stream; - uv_thread_t thread; - uv_sem_t close_sem; - uv_sem_t async_sem; - uv_async_t async; - int events; - int fake_fd; - int int_fd; - int fd; - fd_set* sread; - size_t sread_sz; - fd_set* swrite; - size_t swrite_sz; -}; -#endif /* defined(__APPLE__) */ - -static void uv__stream_connect(uv_stream_t*); -static void uv__write(uv_stream_t* stream); -static void uv__read(uv_stream_t* stream); -static void uv__stream_io(uv_loop_t* loop, uv__io_t* w, unsigned int events); -static void uv__write_callbacks(uv_stream_t* stream); -static size_t uv__write_req_size(uv_write_t* req); - - -void uv__stream_init(uv_loop_t* loop, - uv_stream_t* stream, - uv_handle_type type) { - int err; - - uv__handle_init(loop, (uv_handle_t*)stream, type); - stream->read_cb = NULL; - stream->alloc_cb = NULL; - stream->close_cb = NULL; - stream->connection_cb = NULL; - stream->connect_req = NULL; - stream->shutdown_req = NULL; - stream->accepted_fd = -1; - stream->queued_fds = NULL; - stream->delayed_error = 0; - QUEUE_INIT(&stream->write_queue); - QUEUE_INIT(&stream->write_completed_queue); - stream->write_queue_size = 0; - - if (loop->emfile_fd == -1) { - err = uv__open_cloexec("/dev/null", O_RDONLY); - if (err < 0) - /* In the rare case that "/dev/null" isn't mounted open "/" - * instead. - */ - err = uv__open_cloexec("/", O_RDONLY); - if (err >= 0) - loop->emfile_fd = err; - } - -#if defined(__APPLE__) - stream->select = NULL; -#endif /* defined(__APPLE_) */ - - uv__io_init(&stream->io_watcher, uv__stream_io, -1); -} - - -static void uv__stream_osx_interrupt_select(uv_stream_t* stream) { -#if defined(__APPLE__) - /* Notify select() thread about state change */ - uv__stream_select_t* s; - int r; - - s = stream->select; - if (s == NULL) - return; - - /* Interrupt select() loop - * NOTE: fake_fd and int_fd are socketpair(), thus writing to one will - * emit read event on other side - */ - do - r = write(s->fake_fd, "x", 1); - while (r == -1 && errno == EINTR); - - assert(r == 1); -#else /* !defined(__APPLE__) */ - /* No-op on any other platform */ -#endif /* !defined(__APPLE__) */ -} - - -#if defined(__APPLE__) -static void uv__stream_osx_select(void* arg) { - uv_stream_t* stream; - uv__stream_select_t* s; - char buf[1024]; - int events; - int fd; - int r; - int max_fd; - - stream = arg; - s = stream->select; - fd = s->fd; - - if (fd > s->int_fd) - max_fd = fd; - else - max_fd = s->int_fd; - - while (1) { - /* Terminate on semaphore */ - if (uv_sem_trywait(&s->close_sem) == 0) - break; - - /* Watch fd using select(2) */ - memset(s->sread, 0, s->sread_sz); - memset(s->swrite, 0, s->swrite_sz); - - if (uv__io_active(&stream->io_watcher, UV__POLLIN)) - FD_SET(fd, s->sread); - if (uv__io_active(&stream->io_watcher, UV__POLLOUT)) - FD_SET(fd, s->swrite); - FD_SET(s->int_fd, s->sread); - - /* Wait indefinitely for fd events */ - r = select(max_fd + 1, s->sread, s->swrite, NULL, NULL); - if (r == -1) { - if (errno == EINTR) - continue; - - /* XXX: Possible?! */ - abort(); - } - - /* Ignore timeouts */ - if (r == 0) - continue; - - /* Empty socketpair's buffer in case of interruption */ - if (FD_ISSET(s->int_fd, s->sread)) - while (1) { - r = read(s->int_fd, buf, sizeof(buf)); - - if (r == sizeof(buf)) - continue; - - if (r != -1) - break; - - if (errno == EAGAIN || errno == EWOULDBLOCK) - break; - - if (errno == EINTR) - continue; - - abort(); - } - - /* Handle events */ - events = 0; - if (FD_ISSET(fd, s->sread)) - events |= UV__POLLIN; - if (FD_ISSET(fd, s->swrite)) - events |= UV__POLLOUT; - - assert(events != 0 || FD_ISSET(s->int_fd, s->sread)); - if (events != 0) { - ACCESS_ONCE(int, s->events) = events; - - uv_async_send(&s->async); - uv_sem_wait(&s->async_sem); - - /* Should be processed at this stage */ - assert((s->events == 0) || (stream->flags & UV_CLOSING)); - } - } -} - - -static void uv__stream_osx_select_cb(uv_async_t* handle) { - uv__stream_select_t* s; - uv_stream_t* stream; - int events; - - s = container_of(handle, uv__stream_select_t, async); - stream = s->stream; - - /* Get and reset stream's events */ - events = s->events; - ACCESS_ONCE(int, s->events) = 0; - - assert(events != 0); - assert(events == (events & (UV__POLLIN | UV__POLLOUT))); - - /* Invoke callback on event-loop */ - if ((events & UV__POLLIN) && uv__io_active(&stream->io_watcher, UV__POLLIN)) - uv__stream_io(stream->loop, &stream->io_watcher, UV__POLLIN); - - if ((events & UV__POLLOUT) && uv__io_active(&stream->io_watcher, UV__POLLOUT)) - uv__stream_io(stream->loop, &stream->io_watcher, UV__POLLOUT); - - if (stream->flags & UV_CLOSING) - return; - - /* NOTE: It is important to do it here, otherwise `select()` might be called - * before the actual `uv__read()`, leading to the blocking syscall - */ - uv_sem_post(&s->async_sem); -} - - -static void uv__stream_osx_cb_close(uv_handle_t* async) { - uv__stream_select_t* s; - - s = container_of(async, uv__stream_select_t, async); - uv__free(s); -} - - -int uv__stream_try_select(uv_stream_t* stream, int* fd) { - /* - * kqueue doesn't work with some files from /dev mount on osx. - * select(2) in separate thread for those fds - */ - - struct kevent filter[1]; - struct kevent events[1]; - struct timespec timeout; - uv__stream_select_t* s; - int fds[2]; - int err; - int ret; - int kq; - int old_fd; - int max_fd; - size_t sread_sz; - size_t swrite_sz; - - kq = kqueue(); - if (kq == -1) { - perror("(libuv) kqueue()"); - return -errno; - } - - EV_SET(&filter[0], *fd, EVFILT_READ, EV_ADD | EV_ENABLE, 0, 0, 0); - - /* Use small timeout, because we only want to capture EINVALs */ - timeout.tv_sec = 0; - timeout.tv_nsec = 1; - - ret = kevent(kq, filter, 1, events, 1, &timeout); - uv__close(kq); - - if (ret == -1) - return -errno; - - if (ret == 0 || (events[0].flags & EV_ERROR) == 0 || events[0].data != EINVAL) - return 0; - - /* At this point we definitely know that this fd won't work with kqueue */ - - /* - * Create fds for io watcher and to interrupt the select() loop. - * NOTE: do it ahead of malloc below to allocate enough space for fd_sets - */ - if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds)) - return -errno; - - max_fd = *fd; - if (fds[1] > max_fd) - max_fd = fds[1]; - - sread_sz = ROUND_UP(max_fd + 1, sizeof(uint32_t) * NBBY) / NBBY; - swrite_sz = sread_sz; - - s = uv__malloc(sizeof(*s) + sread_sz + swrite_sz); - if (s == NULL) { - err = -ENOMEM; - goto failed_malloc; - } - - s->events = 0; - s->fd = *fd; - s->sread = (fd_set*) ((char*) s + sizeof(*s)); - s->sread_sz = sread_sz; - s->swrite = (fd_set*) ((char*) s->sread + sread_sz); - s->swrite_sz = swrite_sz; - - err = uv_async_init(stream->loop, &s->async, uv__stream_osx_select_cb); - if (err) - goto failed_async_init; - - s->async.flags |= UV__HANDLE_INTERNAL; - uv__handle_unref(&s->async); - - err = uv_sem_init(&s->close_sem, 0); - if (err != 0) - goto failed_close_sem_init; - - err = uv_sem_init(&s->async_sem, 0); - if (err != 0) - goto failed_async_sem_init; - - s->fake_fd = fds[0]; - s->int_fd = fds[1]; - - old_fd = *fd; - s->stream = stream; - stream->select = s; - *fd = s->fake_fd; - - err = uv_thread_create(&s->thread, uv__stream_osx_select, stream); - if (err != 0) - goto failed_thread_create; - - return 0; - -failed_thread_create: - s->stream = NULL; - stream->select = NULL; - *fd = old_fd; - - uv_sem_destroy(&s->async_sem); - -failed_async_sem_init: - uv_sem_destroy(&s->close_sem); - -failed_close_sem_init: - uv__close(fds[0]); - uv__close(fds[1]); - uv_close((uv_handle_t*) &s->async, uv__stream_osx_cb_close); - return err; - -failed_async_init: - uv__free(s); - -failed_malloc: - uv__close(fds[0]); - uv__close(fds[1]); - - return err; -} -#endif /* defined(__APPLE__) */ - - -int uv__stream_open(uv_stream_t* stream, int fd, int flags) { -#if defined(__APPLE__) - int enable; -#endif - - if (!(stream->io_watcher.fd == -1 || stream->io_watcher.fd == fd)) - return -EBUSY; - - assert(fd >= 0); - stream->flags |= flags; - - if (stream->type == UV_TCP) { - if ((stream->flags & UV_TCP_NODELAY) && uv__tcp_nodelay(fd, 1)) - return -errno; - - /* TODO Use delay the user passed in. */ - if ((stream->flags & UV_TCP_KEEPALIVE) && uv__tcp_keepalive(fd, 1, 60)) - return -errno; - } - -#if defined(__APPLE__) - enable = 1; - if (setsockopt(fd, SOL_SOCKET, SO_OOBINLINE, &enable, sizeof(enable)) && - errno != ENOTSOCK && - errno != EINVAL) { - return -errno; - } -#endif - - stream->io_watcher.fd = fd; - - return 0; -} - - -void uv__stream_flush_write_queue(uv_stream_t* stream, int error) { - uv_write_t* req; - QUEUE* q; - while (!QUEUE_EMPTY(&stream->write_queue)) { - q = QUEUE_HEAD(&stream->write_queue); - QUEUE_REMOVE(q); - - req = QUEUE_DATA(q, uv_write_t, queue); - req->error = error; - - QUEUE_INSERT_TAIL(&stream->write_completed_queue, &req->queue); - } -} - - -void uv__stream_destroy(uv_stream_t* stream) { - assert(!uv__io_active(&stream->io_watcher, UV__POLLIN | UV__POLLOUT)); - assert(stream->flags & UV_CLOSED); - - if (stream->connect_req) { - uv__req_unregister(stream->loop, stream->connect_req); - stream->connect_req->cb(stream->connect_req, -ECANCELED); - stream->connect_req = NULL; - } - - uv__stream_flush_write_queue(stream, -ECANCELED); - uv__write_callbacks(stream); - - if (stream->shutdown_req) { - /* The ECANCELED error code is a lie, the shutdown(2) syscall is a - * fait accompli at this point. Maybe we should revisit this in v0.11. - * A possible reason for leaving it unchanged is that it informs the - * callee that the handle has been destroyed. - */ - uv__req_unregister(stream->loop, stream->shutdown_req); - stream->shutdown_req->cb(stream->shutdown_req, -ECANCELED); - stream->shutdown_req = NULL; - } - - assert(stream->write_queue_size == 0); -} - - -/* Implements a best effort approach to mitigating accept() EMFILE errors. - * We have a spare file descriptor stashed away that we close to get below - * the EMFILE limit. Next, we accept all pending connections and close them - * immediately to signal the clients that we're overloaded - and we are, but - * we still keep on trucking. - * - * There is one caveat: it's not reliable in a multi-threaded environment. - * The file descriptor limit is per process. Our party trick fails if another - * thread opens a file or creates a socket in the time window between us - * calling close() and accept(). - */ -static int uv__emfile_trick(uv_loop_t* loop, int accept_fd) { - int err; - int emfile_fd; - - if (loop->emfile_fd == -1) - return -EMFILE; - - uv__close(loop->emfile_fd); - loop->emfile_fd = -1; - - do { - err = uv__accept(accept_fd); - if (err >= 0) - uv__close(err); - } while (err >= 0 || err == -EINTR); - - emfile_fd = uv__open_cloexec("/", O_RDONLY); - if (emfile_fd >= 0) - loop->emfile_fd = emfile_fd; - - return err; -} - - -#if defined(UV_HAVE_KQUEUE) -# define UV_DEC_BACKLOG(w) w->rcount--; -#else -# define UV_DEC_BACKLOG(w) /* no-op */ -#endif /* defined(UV_HAVE_KQUEUE) */ - - -void uv__server_io(uv_loop_t* loop, uv__io_t* w, unsigned int events) { - uv_stream_t* stream; - int err; - - stream = container_of(w, uv_stream_t, io_watcher); - assert(events == UV__POLLIN); - assert(stream->accepted_fd == -1); - assert(!(stream->flags & UV_CLOSING)); - - uv__io_start(stream->loop, &stream->io_watcher, UV__POLLIN); - - /* connection_cb can close the server socket while we're - * in the loop so check it on each iteration. - */ - while (uv__stream_fd(stream) != -1) { - assert(stream->accepted_fd == -1); - -#if defined(UV_HAVE_KQUEUE) - if (w->rcount <= 0) - return; -#endif /* defined(UV_HAVE_KQUEUE) */ - - err = uv__accept(uv__stream_fd(stream)); - if (err < 0) { - if (err == -EAGAIN || err == -EWOULDBLOCK) - return; /* Not an error. */ - - if (err == -ECONNABORTED) - continue; /* Ignore. Nothing we can do about that. */ - - if (err == -EMFILE || err == -ENFILE) { - err = uv__emfile_trick(loop, uv__stream_fd(stream)); - if (err == -EAGAIN || err == -EWOULDBLOCK) - break; - } - - stream->connection_cb(stream, err); - continue; - } - - UV_DEC_BACKLOG(w) - stream->accepted_fd = err; - stream->connection_cb(stream, 0); - - if (stream->accepted_fd != -1) { - /* The user hasn't yet accepted called uv_accept() */ - uv__io_stop(loop, &stream->io_watcher, UV__POLLIN); - return; - } - - if (stream->type == UV_TCP && (stream->flags & UV_TCP_SINGLE_ACCEPT)) { - /* Give other processes a chance to accept connections. */ - struct timespec timeout = { 0, 1 }; - nanosleep(&timeout, NULL); - } - } -} - - -#undef UV_DEC_BACKLOG - - -int uv_accept(uv_stream_t* server, uv_stream_t* client) { - int err; - - /* TODO document this */ - assert(server->loop == client->loop); - - if (server->accepted_fd == -1) - return -EAGAIN; - - switch (client->type) { - case UV_NAMED_PIPE: - case UV_TCP: - err = uv__stream_open(client, - server->accepted_fd, - UV_STREAM_READABLE | UV_STREAM_WRITABLE); - if (err) { - /* TODO handle error */ - uv__close(server->accepted_fd); - goto done; - } - break; - - case UV_UDP: - err = uv_udp_open((uv_udp_t*) client, server->accepted_fd); - if (err) { - uv__close(server->accepted_fd); - goto done; - } - break; - - default: - return -EINVAL; - } - -done: - /* Process queued fds */ - if (server->queued_fds != NULL) { - uv__stream_queued_fds_t* queued_fds; - - queued_fds = server->queued_fds; - - /* Read first */ - server->accepted_fd = queued_fds->fds[0]; - - /* All read, free */ - assert(queued_fds->offset > 0); - if (--queued_fds->offset == 0) { - uv__free(queued_fds); - server->queued_fds = NULL; - } else { - /* Shift rest */ - memmove(queued_fds->fds, - queued_fds->fds + 1, - queued_fds->offset * sizeof(*queued_fds->fds)); - } - } else { - server->accepted_fd = -1; - if (err == 0) - uv__io_start(server->loop, &server->io_watcher, UV__POLLIN); - } - return err; -} - - -int uv_listen(uv_stream_t* stream, int backlog, uv_connection_cb cb) { - int err; - - switch (stream->type) { - case UV_TCP: - err = uv_tcp_listen((uv_tcp_t*)stream, backlog, cb); - break; - - case UV_NAMED_PIPE: - err = uv_pipe_listen((uv_pipe_t*)stream, backlog, cb); - break; - - default: - err = -EINVAL; - } - - if (err == 0) - uv__handle_start(stream); - - return err; -} - - -static void uv__drain(uv_stream_t* stream) { - uv_shutdown_t* req; - int err; - - assert(QUEUE_EMPTY(&stream->write_queue)); - uv__io_stop(stream->loop, &stream->io_watcher, UV__POLLOUT); - uv__stream_osx_interrupt_select(stream); - - /* Shutdown? */ - if ((stream->flags & UV_STREAM_SHUTTING) && - !(stream->flags & UV_CLOSING) && - !(stream->flags & UV_STREAM_SHUT)) { - assert(stream->shutdown_req); - - req = stream->shutdown_req; - stream->shutdown_req = NULL; - stream->flags &= ~UV_STREAM_SHUTTING; - uv__req_unregister(stream->loop, req); - - err = 0; - if (shutdown(uv__stream_fd(stream), SHUT_WR)) - err = -errno; - - if (err == 0) - stream->flags |= UV_STREAM_SHUT; - - if (req->cb != NULL) - req->cb(req, err); - } -} - - -static size_t uv__write_req_size(uv_write_t* req) { - size_t size; - - assert(req->bufs != NULL); - size = uv__count_bufs(req->bufs + req->write_index, - req->nbufs - req->write_index); - assert(req->handle->write_queue_size >= size); - - return size; -} - - -static void uv__write_req_finish(uv_write_t* req) { - uv_stream_t* stream = req->handle; - - /* Pop the req off tcp->write_queue. */ - QUEUE_REMOVE(&req->queue); - - /* Only free when there was no error. On error, we touch up write_queue_size - * right before making the callback. The reason we don't do that right away - * is that a write_queue_size > 0 is our only way to signal to the user that - * they should stop writing - which they should if we got an error. Something - * to revisit in future revisions of the libuv API. - */ - if (req->error == 0) { - if (req->bufs != req->bufsml) - uv__free(req->bufs); - req->bufs = NULL; - } - - /* Add it to the write_completed_queue where it will have its - * callback called in the near future. - */ - QUEUE_INSERT_TAIL(&stream->write_completed_queue, &req->queue); - uv__io_feed(stream->loop, &stream->io_watcher); -} - - -static int uv__handle_fd(uv_handle_t* handle) { - switch (handle->type) { - case UV_NAMED_PIPE: - case UV_TCP: - return ((uv_stream_t*) handle)->io_watcher.fd; - - case UV_UDP: - return ((uv_udp_t*) handle)->io_watcher.fd; - - default: - return -1; - } -} - -static void uv__write(uv_stream_t* stream) { - struct iovec* iov; - QUEUE* q; - uv_write_t* req; - int iovmax; - int iovcnt; - ssize_t n; - -start: - - assert(uv__stream_fd(stream) >= 0); - - if (QUEUE_EMPTY(&stream->write_queue)) - return; - - q = QUEUE_HEAD(&stream->write_queue); - req = QUEUE_DATA(q, uv_write_t, queue); - assert(req->handle == stream); - - /* - * Cast to iovec. We had to have our own uv_buf_t instead of iovec - * because Windows's WSABUF is not an iovec. - */ - assert(sizeof(uv_buf_t) == sizeof(struct iovec)); - iov = (struct iovec*) &(req->bufs[req->write_index]); - iovcnt = req->nbufs - req->write_index; - - iovmax = uv__getiovmax(); - - /* Limit iov count to avoid EINVALs from writev() */ - if (iovcnt > iovmax) - iovcnt = iovmax; - - /* - * Now do the actual writev. Note that we've been updating the pointers - * inside the iov each time we write. So there is no need to offset it. - */ - - if (req->send_handle) { - struct msghdr msg; - char scratch[64]; - struct cmsghdr *cmsg; - int fd_to_send = uv__handle_fd((uv_handle_t*) req->send_handle); - - assert(fd_to_send >= 0); - - msg.msg_name = NULL; - msg.msg_namelen = 0; - msg.msg_iov = iov; - msg.msg_iovlen = iovcnt; - msg.msg_flags = 0; - - msg.msg_control = (void*) scratch; - msg.msg_controllen = CMSG_SPACE(sizeof(fd_to_send)); - - cmsg = CMSG_FIRSTHDR(&msg); - cmsg->cmsg_level = SOL_SOCKET; - cmsg->cmsg_type = SCM_RIGHTS; - cmsg->cmsg_len = CMSG_LEN(sizeof(fd_to_send)); - - /* silence aliasing warning */ - { - void* pv = CMSG_DATA(cmsg); - int* pi = pv; - *pi = fd_to_send; - } - - do { - n = sendmsg(uv__stream_fd(stream), &msg, 0); - } -#if defined(__APPLE__) - /* - * Due to a possible kernel bug at least in OS X 10.10 "Yosemite", - * EPROTOTYPE can be returned while trying to write to a socket that is - * shutting down. If we retry the write, we should get the expected EPIPE - * instead. - */ - while (n == -1 && (errno == EINTR || errno == EPROTOTYPE)); -#else - while (n == -1 && errno == EINTR); -#endif - } else { - do { - if (iovcnt == 1) { - n = write(uv__stream_fd(stream), iov[0].iov_base, iov[0].iov_len); - } else { - n = writev(uv__stream_fd(stream), iov, iovcnt); - } - } -#if defined(__APPLE__) - /* - * Due to a possible kernel bug at least in OS X 10.10 "Yosemite", - * EPROTOTYPE can be returned while trying to write to a socket that is - * shutting down. If we retry the write, we should get the expected EPIPE - * instead. - */ - while (n == -1 && (errno == EINTR || errno == EPROTOTYPE)); -#else - while (n == -1 && errno == EINTR); -#endif - } - - if (n < 0) { - if (errno != EAGAIN && errno != EWOULDBLOCK) { - /* Error */ - req->error = -errno; - uv__write_req_finish(req); - uv__io_stop(stream->loop, &stream->io_watcher, UV__POLLOUT); - if (!uv__io_active(&stream->io_watcher, UV__POLLIN)) - uv__handle_stop(stream); - uv__stream_osx_interrupt_select(stream); - return; - } else if (stream->flags & UV_STREAM_BLOCKING) { - /* If this is a blocking stream, try again. */ - goto start; - } - } else { - /* Successful write */ - - while (n >= 0) { - uv_buf_t* buf = &(req->bufs[req->write_index]); - size_t len = buf->len; - - assert(req->write_index < req->nbufs); - - if ((size_t)n < len) { - buf->base += n; - buf->len -= n; - stream->write_queue_size -= n; - n = 0; - - /* There is more to write. */ - if (stream->flags & UV_STREAM_BLOCKING) { - /* - * If we're blocking then we should not be enabling the write - * watcher - instead we need to try again. - */ - goto start; - } else { - /* Break loop and ensure the watcher is pending. */ - break; - } - - } else { - /* Finished writing the buf at index req->write_index. */ - req->write_index++; - - assert((size_t)n >= len); - n -= len; - - assert(stream->write_queue_size >= len); - stream->write_queue_size -= len; - - if (req->write_index == req->nbufs) { - /* Then we're done! */ - assert(n == 0); - uv__write_req_finish(req); - /* TODO: start trying to write the next request. */ - return; - } - } - } - } - - /* Either we've counted n down to zero or we've got EAGAIN. */ - assert(n == 0 || n == -1); - - /* Only non-blocking streams should use the write_watcher. */ - assert(!(stream->flags & UV_STREAM_BLOCKING)); - - /* We're not done. */ - uv__io_start(stream->loop, &stream->io_watcher, UV__POLLOUT); - - /* Notify select() thread about state change */ - uv__stream_osx_interrupt_select(stream); -} - - -static void uv__write_callbacks(uv_stream_t* stream) { - uv_write_t* req; - QUEUE* q; - - while (!QUEUE_EMPTY(&stream->write_completed_queue)) { - /* Pop a req off write_completed_queue. */ - q = QUEUE_HEAD(&stream->write_completed_queue); - req = QUEUE_DATA(q, uv_write_t, queue); - QUEUE_REMOVE(q); - uv__req_unregister(stream->loop, req); - - if (req->bufs != NULL) { - stream->write_queue_size -= uv__write_req_size(req); - if (req->bufs != req->bufsml) - uv__free(req->bufs); - req->bufs = NULL; - } - - /* NOTE: call callback AFTER freeing the request data. */ - if (req->cb) - req->cb(req, req->error); - } - - assert(QUEUE_EMPTY(&stream->write_completed_queue)); -} - - -uv_handle_type uv__handle_type(int fd) { - struct sockaddr_storage ss; - socklen_t len; - int type; - - memset(&ss, 0, sizeof(ss)); - len = sizeof(ss); - - if (getsockname(fd, (struct sockaddr*)&ss, &len)) - return UV_UNKNOWN_HANDLE; - - len = sizeof type; - - if (getsockopt(fd, SOL_SOCKET, SO_TYPE, &type, &len)) - return UV_UNKNOWN_HANDLE; - - if (type == SOCK_STREAM) { - switch (ss.ss_family) { - case AF_UNIX: - return UV_NAMED_PIPE; - case AF_INET: - case AF_INET6: - return UV_TCP; - } - } - - if (type == SOCK_DGRAM && - (ss.ss_family == AF_INET || ss.ss_family == AF_INET6)) - return UV_UDP; - - return UV_UNKNOWN_HANDLE; -} - - -static void uv__stream_eof(uv_stream_t* stream, const uv_buf_t* buf) { - stream->flags |= UV_STREAM_READ_EOF; - uv__io_stop(stream->loop, &stream->io_watcher, UV__POLLIN); - if (!uv__io_active(&stream->io_watcher, UV__POLLOUT)) - uv__handle_stop(stream); - uv__stream_osx_interrupt_select(stream); - stream->read_cb(stream, UV_EOF, buf); - stream->flags &= ~UV_STREAM_READING; -} - - -static int uv__stream_queue_fd(uv_stream_t* stream, int fd) { - uv__stream_queued_fds_t* queued_fds; - unsigned int queue_size; - - queued_fds = stream->queued_fds; - if (queued_fds == NULL) { - queue_size = 8; - queued_fds = uv__malloc((queue_size - 1) * sizeof(*queued_fds->fds) + - sizeof(*queued_fds)); - if (queued_fds == NULL) - return -ENOMEM; - queued_fds->size = queue_size; - queued_fds->offset = 0; - stream->queued_fds = queued_fds; - - /* Grow */ - } else if (queued_fds->size == queued_fds->offset) { - queue_size = queued_fds->size + 8; - queued_fds = uv__realloc(queued_fds, - (queue_size - 1) * sizeof(*queued_fds->fds) + - sizeof(*queued_fds)); - - /* - * Allocation failure, report back. - * NOTE: if it is fatal - sockets will be closed in uv__stream_close - */ - if (queued_fds == NULL) - return -ENOMEM; - queued_fds->size = queue_size; - stream->queued_fds = queued_fds; - } - - /* Put fd in a queue */ - queued_fds->fds[queued_fds->offset++] = fd; - - return 0; -} - - -#define UV__CMSG_FD_COUNT 64 -#define UV__CMSG_FD_SIZE (UV__CMSG_FD_COUNT * sizeof(int)) - - -static int uv__stream_recv_cmsg(uv_stream_t* stream, struct msghdr* msg) { - struct cmsghdr* cmsg; - - for (cmsg = CMSG_FIRSTHDR(msg); cmsg != NULL; cmsg = CMSG_NXTHDR(msg, cmsg)) { - char* start; - char* end; - int err; - void* pv; - int* pi; - unsigned int i; - unsigned int count; - - if (cmsg->cmsg_type != SCM_RIGHTS) { - fprintf(stderr, "ignoring non-SCM_RIGHTS ancillary data: %d\n", - cmsg->cmsg_type); - continue; - } - - /* silence aliasing warning */ - pv = CMSG_DATA(cmsg); - pi = pv; - - /* Count available fds */ - start = (char*) cmsg; - end = (char*) cmsg + cmsg->cmsg_len; - count = 0; - while (start + CMSG_LEN(count * sizeof(*pi)) < end) - count++; - assert(start + CMSG_LEN(count * sizeof(*pi)) == end); - - for (i = 0; i < count; i++) { - /* Already has accepted fd, queue now */ - if (stream->accepted_fd != -1) { - err = uv__stream_queue_fd(stream, pi[i]); - if (err != 0) { - /* Close rest */ - for (; i < count; i++) - uv__close(pi[i]); - return err; - } - } else { - stream->accepted_fd = pi[i]; - } - } - } - - return 0; -} - - -static void uv__read(uv_stream_t* stream) { - uv_buf_t buf; - ssize_t nread; - struct msghdr msg; - char cmsg_space[CMSG_SPACE(UV__CMSG_FD_SIZE)]; - int count; - int err; - int is_ipc; - - stream->flags &= ~UV_STREAM_READ_PARTIAL; - - /* Prevent loop starvation when the data comes in as fast as (or faster than) - * we can read it. XXX Need to rearm fd if we switch to edge-triggered I/O. - */ - count = 32; - - is_ipc = stream->type == UV_NAMED_PIPE && ((uv_pipe_t*) stream)->ipc; - - /* XXX: Maybe instead of having UV_STREAM_READING we just test if - * tcp->read_cb is NULL or not? - */ - while (stream->read_cb - && (stream->flags & UV_STREAM_READING) - && (count-- > 0)) { - assert(stream->alloc_cb != NULL); - - stream->alloc_cb((uv_handle_t*)stream, 64 * 1024, &buf); - if (buf.len == 0) { - /* User indicates it can't or won't handle the read. */ - stream->read_cb(stream, UV_ENOBUFS, &buf); - return; - } - - assert(buf.base != NULL); - assert(uv__stream_fd(stream) >= 0); - - if (!is_ipc) { - do { - nread = read(uv__stream_fd(stream), buf.base, buf.len); - } - while (nread < 0 && errno == EINTR); - } else { - /* ipc uses recvmsg */ - msg.msg_flags = 0; - msg.msg_iov = (struct iovec*) &buf; - msg.msg_iovlen = 1; - msg.msg_name = NULL; - msg.msg_namelen = 0; - /* Set up to receive a descriptor even if one isn't in the message */ - msg.msg_controllen = sizeof(cmsg_space); - msg.msg_control = cmsg_space; - - do { - nread = uv__recvmsg(uv__stream_fd(stream), &msg, 0); - } - while (nread < 0 && errno == EINTR); - } - - if (nread < 0) { - /* Error */ - if (errno == EAGAIN || errno == EWOULDBLOCK) { - /* Wait for the next one. */ - if (stream->flags & UV_STREAM_READING) { - uv__io_start(stream->loop, &stream->io_watcher, UV__POLLIN); - uv__stream_osx_interrupt_select(stream); - } - stream->read_cb(stream, 0, &buf); - } else { - /* Error. User should call uv_close(). */ - stream->read_cb(stream, -errno, &buf); - if (stream->flags & UV_STREAM_READING) { - stream->flags &= ~UV_STREAM_READING; - uv__io_stop(stream->loop, &stream->io_watcher, UV__POLLIN); - if (!uv__io_active(&stream->io_watcher, UV__POLLOUT)) - uv__handle_stop(stream); - uv__stream_osx_interrupt_select(stream); - } - } - return; - } else if (nread == 0) { - uv__stream_eof(stream, &buf); - return; - } else { - /* Successful read */ - ssize_t buflen = buf.len; - - if (is_ipc) { - err = uv__stream_recv_cmsg(stream, &msg); - if (err != 0) { - stream->read_cb(stream, err, &buf); - return; - } - } - stream->read_cb(stream, nread, &buf); - - /* Return if we didn't fill the buffer, there is no more data to read. */ - if (nread < buflen) { - stream->flags |= UV_STREAM_READ_PARTIAL; - return; - } - } - } -} - - -#undef UV__CMSG_FD_COUNT -#undef UV__CMSG_FD_SIZE - - -int uv_shutdown(uv_shutdown_t* req, uv_stream_t* stream, uv_shutdown_cb cb) { - assert((stream->type == UV_TCP || stream->type == UV_NAMED_PIPE) && - "uv_shutdown (unix) only supports uv_handle_t right now"); - - if (!(stream->flags & UV_STREAM_WRITABLE) || - stream->flags & UV_STREAM_SHUT || - stream->flags & UV_STREAM_SHUTTING || - stream->flags & UV_CLOSED || - stream->flags & UV_CLOSING) { - return -ENOTCONN; - } - - assert(uv__stream_fd(stream) >= 0); - - /* Initialize request */ - uv__req_init(stream->loop, req, UV_SHUTDOWN); - req->handle = stream; - req->cb = cb; - stream->shutdown_req = req; - stream->flags |= UV_STREAM_SHUTTING; - - uv__io_start(stream->loop, &stream->io_watcher, UV__POLLOUT); - uv__stream_osx_interrupt_select(stream); - - return 0; -} - - -static void uv__stream_io(uv_loop_t* loop, uv__io_t* w, unsigned int events) { - uv_stream_t* stream; - - stream = container_of(w, uv_stream_t, io_watcher); - - assert(stream->type == UV_TCP || - stream->type == UV_NAMED_PIPE || - stream->type == UV_TTY); - assert(!(stream->flags & UV_CLOSING)); - - if (stream->connect_req) { - uv__stream_connect(stream); - return; - } - - assert(uv__stream_fd(stream) >= 0); - - /* Ignore POLLHUP here. Even it it's set, there may still be data to read. */ - if (events & (UV__POLLIN | UV__POLLERR | UV__POLLHUP)) - uv__read(stream); - - if (uv__stream_fd(stream) == -1) - return; /* read_cb closed stream. */ - - /* Short-circuit iff POLLHUP is set, the user is still interested in read - * events and uv__read() reported a partial read but not EOF. If the EOF - * flag is set, uv__read() called read_cb with err=UV_EOF and we don't - * have to do anything. If the partial read flag is not set, we can't - * report the EOF yet because there is still data to read. - */ - if ((events & UV__POLLHUP) && - (stream->flags & UV_STREAM_READING) && - (stream->flags & UV_STREAM_READ_PARTIAL) && - !(stream->flags & UV_STREAM_READ_EOF)) { - uv_buf_t buf = { NULL, 0 }; - uv__stream_eof(stream, &buf); - } - - if (uv__stream_fd(stream) == -1) - return; /* read_cb closed stream. */ - - if (events & (UV__POLLOUT | UV__POLLERR | UV__POLLHUP)) { - uv__write(stream); - uv__write_callbacks(stream); - - /* Write queue drained. */ - if (QUEUE_EMPTY(&stream->write_queue)) - uv__drain(stream); - } -} - - -/** - * We get called here from directly following a call to connect(2). - * In order to determine if we've errored out or succeeded must call - * getsockopt. - */ -static void uv__stream_connect(uv_stream_t* stream) { - int error; - uv_connect_t* req = stream->connect_req; - socklen_t errorsize = sizeof(int); - - assert(stream->type == UV_TCP || stream->type == UV_NAMED_PIPE); - assert(req); - - if (stream->delayed_error) { - /* To smooth over the differences between unixes errors that - * were reported synchronously on the first connect can be delayed - * until the next tick--which is now. - */ - error = stream->delayed_error; - stream->delayed_error = 0; - } else { - /* Normal situation: we need to get the socket error from the kernel. */ - assert(uv__stream_fd(stream) >= 0); - getsockopt(uv__stream_fd(stream), - SOL_SOCKET, - SO_ERROR, - &error, - &errorsize); - error = -error; - } - - if (error == -EINPROGRESS) - return; - - stream->connect_req = NULL; - uv__req_unregister(stream->loop, req); - - if (error < 0 || QUEUE_EMPTY(&stream->write_queue)) { - uv__io_stop(stream->loop, &stream->io_watcher, UV__POLLOUT); - } - - if (req->cb) - req->cb(req, error); - - if (uv__stream_fd(stream) == -1) - return; - - if (error < 0) { - uv__stream_flush_write_queue(stream, -ECANCELED); - uv__write_callbacks(stream); - } -} - - -int uv_write2(uv_write_t* req, - uv_stream_t* stream, - const uv_buf_t bufs[], - unsigned int nbufs, - uv_stream_t* send_handle, - uv_write_cb cb) { - int empty_queue; - - assert(nbufs > 0); - assert((stream->type == UV_TCP || - stream->type == UV_NAMED_PIPE || - stream->type == UV_TTY) && - "uv_write (unix) does not yet support other types of streams"); - - if (uv__stream_fd(stream) < 0) - return -EBADF; - - if (send_handle) { - if (stream->type != UV_NAMED_PIPE || !((uv_pipe_t*)stream)->ipc) - return -EINVAL; - - /* XXX We abuse uv_write2() to send over UDP handles to child processes. - * Don't call uv__stream_fd() on those handles, it's a macro that on OS X - * evaluates to a function that operates on a uv_stream_t with a couple of - * OS X specific fields. On other Unices it does (handle)->io_watcher.fd, - * which works but only by accident. - */ - if (uv__handle_fd((uv_handle_t*) send_handle) < 0) - return -EBADF; - } - - /* It's legal for write_queue_size > 0 even when the write_queue is empty; - * it means there are error-state requests in the write_completed_queue that - * will touch up write_queue_size later, see also uv__write_req_finish(). - * We could check that write_queue is empty instead but that implies making - * a write() syscall when we know that the handle is in error mode. - */ - empty_queue = (stream->write_queue_size == 0); - - /* Initialize the req */ - uv__req_init(stream->loop, req, UV_WRITE); - req->cb = cb; - req->handle = stream; - req->error = 0; - req->send_handle = send_handle; - QUEUE_INIT(&req->queue); - - req->bufs = req->bufsml; - if (nbufs > ARRAY_SIZE(req->bufsml)) - req->bufs = uv__malloc(nbufs * sizeof(bufs[0])); - - if (req->bufs == NULL) - return -ENOMEM; - - memcpy(req->bufs, bufs, nbufs * sizeof(bufs[0])); - req->nbufs = nbufs; - req->write_index = 0; - stream->write_queue_size += uv__count_bufs(bufs, nbufs); - - /* Append the request to write_queue. */ - QUEUE_INSERT_TAIL(&stream->write_queue, &req->queue); - - /* If the queue was empty when this function began, we should attempt to - * do the write immediately. Otherwise start the write_watcher and wait - * for the fd to become writable. - */ - if (stream->connect_req) { - /* Still connecting, do nothing. */ - } - else if (empty_queue) { - uv__write(stream); - } - else { - /* - * blocking streams should never have anything in the queue. - * if this assert fires then somehow the blocking stream isn't being - * sufficiently flushed in uv__write. - */ - assert(!(stream->flags & UV_STREAM_BLOCKING)); - uv__io_start(stream->loop, &stream->io_watcher, UV__POLLOUT); - uv__stream_osx_interrupt_select(stream); - } - - return 0; -} - - -/* The buffers to be written must remain valid until the callback is called. - * This is not required for the uv_buf_t array. - */ -int uv_write(uv_write_t* req, - uv_stream_t* handle, - const uv_buf_t bufs[], - unsigned int nbufs, - uv_write_cb cb) { - return uv_write2(req, handle, bufs, nbufs, NULL, cb); -} - - -void uv_try_write_cb(uv_write_t* req, int status) { - /* Should not be called */ - abort(); -} - - -int uv_try_write(uv_stream_t* stream, - const uv_buf_t bufs[], - unsigned int nbufs) { - int r; - int has_pollout; - size_t written; - size_t req_size; - uv_write_t req; - - /* Connecting or already writing some data */ - if (stream->connect_req != NULL || stream->write_queue_size != 0) - return -EAGAIN; - - has_pollout = uv__io_active(&stream->io_watcher, UV__POLLOUT); - - r = uv_write(&req, stream, bufs, nbufs, uv_try_write_cb); - if (r != 0) - return r; - - /* Remove not written bytes from write queue size */ - written = uv__count_bufs(bufs, nbufs); - if (req.bufs != NULL) - req_size = uv__write_req_size(&req); - else - req_size = 0; - written -= req_size; - stream->write_queue_size -= req_size; - - /* Unqueue request, regardless of immediateness */ - QUEUE_REMOVE(&req.queue); - uv__req_unregister(stream->loop, &req); - if (req.bufs != req.bufsml) - uv__free(req.bufs); - req.bufs = NULL; - - /* Do not poll for writable, if we wasn't before calling this */ - if (!has_pollout) { - uv__io_stop(stream->loop, &stream->io_watcher, UV__POLLOUT); - uv__stream_osx_interrupt_select(stream); - } - - if (written == 0) - return -EAGAIN; - else - return written; -} - - -int uv_read_start(uv_stream_t* stream, - uv_alloc_cb alloc_cb, - uv_read_cb read_cb) { - assert(stream->type == UV_TCP || stream->type == UV_NAMED_PIPE || - stream->type == UV_TTY); - - if (stream->flags & UV_CLOSING) - return -EINVAL; - - /* The UV_STREAM_READING flag is irrelevant of the state of the tcp - it just - * expresses the desired state of the user. - */ - stream->flags |= UV_STREAM_READING; - - /* TODO: try to do the read inline? */ - /* TODO: keep track of tcp state. If we've gotten a EOF then we should - * not start the IO watcher. - */ - assert(uv__stream_fd(stream) >= 0); - assert(alloc_cb); - - stream->read_cb = read_cb; - stream->alloc_cb = alloc_cb; - - uv__io_start(stream->loop, &stream->io_watcher, UV__POLLIN); - uv__handle_start(stream); - uv__stream_osx_interrupt_select(stream); - - return 0; -} - - -int uv_read_stop(uv_stream_t* stream) { - if (!(stream->flags & UV_STREAM_READING)) - return 0; - - stream->flags &= ~UV_STREAM_READING; - uv__io_stop(stream->loop, &stream->io_watcher, UV__POLLIN); - if (!uv__io_active(&stream->io_watcher, UV__POLLOUT)) - uv__handle_stop(stream); - uv__stream_osx_interrupt_select(stream); - - stream->read_cb = NULL; - stream->alloc_cb = NULL; - return 0; -} - - -int uv_is_readable(const uv_stream_t* stream) { - return !!(stream->flags & UV_STREAM_READABLE); -} - - -int uv_is_writable(const uv_stream_t* stream) { - return !!(stream->flags & UV_STREAM_WRITABLE); -} - - -#if defined(__APPLE__) -int uv___stream_fd(const uv_stream_t* handle) { - const uv__stream_select_t* s; - - assert(handle->type == UV_TCP || - handle->type == UV_TTY || - handle->type == UV_NAMED_PIPE); - - s = handle->select; - if (s != NULL) - return s->fd; - - return handle->io_watcher.fd; -} -#endif /* defined(__APPLE__) */ - - -void uv__stream_close(uv_stream_t* handle) { - unsigned int i; - uv__stream_queued_fds_t* queued_fds; - -#if defined(__APPLE__) - /* Terminate select loop first */ - if (handle->select != NULL) { - uv__stream_select_t* s; - - s = handle->select; - - uv_sem_post(&s->close_sem); - uv_sem_post(&s->async_sem); - uv__stream_osx_interrupt_select(handle); - uv_thread_join(&s->thread); - uv_sem_destroy(&s->close_sem); - uv_sem_destroy(&s->async_sem); - uv__close(s->fake_fd); - uv__close(s->int_fd); - uv_close((uv_handle_t*) &s->async, uv__stream_osx_cb_close); - - handle->select = NULL; - } -#endif /* defined(__APPLE__) */ - - uv__io_close(handle->loop, &handle->io_watcher); - uv_read_stop(handle); - uv__handle_stop(handle); - - if (handle->io_watcher.fd != -1) { - /* Don't close stdio file descriptors. Nothing good comes from it. */ - if (handle->io_watcher.fd > STDERR_FILENO) - uv__close(handle->io_watcher.fd); - handle->io_watcher.fd = -1; - } - - if (handle->accepted_fd != -1) { - uv__close(handle->accepted_fd); - handle->accepted_fd = -1; - } - - /* Close all queued fds */ - if (handle->queued_fds != NULL) { - queued_fds = handle->queued_fds; - for (i = 0; i < queued_fds->offset; i++) - uv__close(queued_fds->fds[i]); - uv__free(handle->queued_fds); - handle->queued_fds = NULL; - } - - assert(!uv__io_active(&handle->io_watcher, UV__POLLIN | UV__POLLOUT)); -} - - -int uv_stream_set_blocking(uv_stream_t* handle, int blocking) { - /* Don't need to check the file descriptor, uv__nonblock() - * will fail with EBADF if it's not valid. - */ - return uv__nonblock(uv__stream_fd(handle), !blocking); -} diff --git a/outside/libuv-v1.7.5/src/unix/sunos.c b/outside/libuv-v1.7.5/src/unix/sunos.c deleted file mode 100644 index 05b7a1140..000000000 --- a/outside/libuv-v1.7.5/src/unix/sunos.c +++ /dev/null @@ -1,763 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * 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. - */ - -#include "uv.h" -#include "internal.h" - -#include -#include -#include -#include -#include -#include - -#ifndef SUNOS_NO_IFADDRS -# include -#endif -#include -#include - -#include -#include -#include -#include -#include - -#include -#include - -#define PORT_FIRED 0x69 -#define PORT_UNUSED 0x0 -#define PORT_LOADED 0x99 -#define PORT_DELETED -1 - -#if (!defined(_LP64)) && (_FILE_OFFSET_BITS - 0 == 64) -#define PROCFS_FILE_OFFSET_BITS_HACK 1 -#undef _FILE_OFFSET_BITS -#else -#define PROCFS_FILE_OFFSET_BITS_HACK 0 -#endif - -#include - -#if (PROCFS_FILE_OFFSET_BITS_HACK - 0 == 1) -#define _FILE_OFFSET_BITS 64 -#endif - - -int uv__platform_loop_init(uv_loop_t* loop) { - int err; - int fd; - - loop->fs_fd = -1; - loop->backend_fd = -1; - - fd = port_create(); - if (fd == -1) - return -errno; - - err = uv__cloexec(fd, 1); - if (err) { - uv__close(fd); - return err; - } - loop->backend_fd = fd; - - return 0; -} - - -void uv__platform_loop_delete(uv_loop_t* loop) { - if (loop->fs_fd != -1) { - uv__close(loop->fs_fd); - loop->fs_fd = -1; - } - - if (loop->backend_fd != -1) { - uv__close(loop->backend_fd); - loop->backend_fd = -1; - } -} - - -void uv__platform_invalidate_fd(uv_loop_t* loop, int fd) { - struct port_event* events; - uintptr_t i; - uintptr_t nfds; - - assert(loop->watchers != NULL); - - events = (struct port_event*) loop->watchers[loop->nwatchers]; - nfds = (uintptr_t) loop->watchers[loop->nwatchers + 1]; - if (events == NULL) - return; - - /* Invalidate events with same file descriptor */ - for (i = 0; i < nfds; i++) - if ((int) events[i].portev_object == fd) - events[i].portev_object = -1; -} - - -void uv__io_poll(uv_loop_t* loop, int timeout) { - struct port_event events[1024]; - struct port_event* pe; - struct timespec spec; - QUEUE* q; - uv__io_t* w; - sigset_t* pset; - sigset_t set; - uint64_t base; - uint64_t diff; - unsigned int nfds; - unsigned int i; - int saved_errno; - int nevents; - int count; - int err; - int fd; - - if (loop->nfds == 0) { - assert(QUEUE_EMPTY(&loop->watcher_queue)); - return; - } - - while (!QUEUE_EMPTY(&loop->watcher_queue)) { - q = QUEUE_HEAD(&loop->watcher_queue); - QUEUE_REMOVE(q); - QUEUE_INIT(q); - - w = QUEUE_DATA(q, uv__io_t, watcher_queue); - assert(w->pevents != 0); - - if (port_associate(loop->backend_fd, PORT_SOURCE_FD, w->fd, w->pevents, 0)) - abort(); - - w->events = w->pevents; - } - - pset = NULL; - if (loop->flags & UV_LOOP_BLOCK_SIGPROF) { - pset = &set; - sigemptyset(pset); - sigaddset(pset, SIGPROF); - } - - assert(timeout >= -1); - base = loop->time; - count = 48; /* Benchmarks suggest this gives the best throughput. */ - - for (;;) { - if (timeout != -1) { - spec.tv_sec = timeout / 1000; - spec.tv_nsec = (timeout % 1000) * 1000000; - } - - /* Work around a kernel bug where nfds is not updated. */ - events[0].portev_source = 0; - - nfds = 1; - saved_errno = 0; - - if (pset != NULL) - pthread_sigmask(SIG_BLOCK, pset, NULL); - - err = port_getn(loop->backend_fd, - events, - ARRAY_SIZE(events), - &nfds, - timeout == -1 ? NULL : &spec); - - if (pset != NULL) - pthread_sigmask(SIG_UNBLOCK, pset, NULL); - - if (err) { - /* Work around another kernel bug: port_getn() may return events even - * on error. - */ - if (errno == EINTR || errno == ETIME) - saved_errno = errno; - else - abort(); - } - - /* Update loop->time unconditionally. It's tempting to skip the update when - * timeout == 0 (i.e. non-blocking poll) but there is no guarantee that the - * operating system didn't reschedule our process while in the syscall. - */ - SAVE_ERRNO(uv__update_time(loop)); - - if (events[0].portev_source == 0) { - if (timeout == 0) - return; - - if (timeout == -1) - continue; - - goto update_timeout; - } - - if (nfds == 0) { - assert(timeout != -1); - return; - } - - nevents = 0; - - assert(loop->watchers != NULL); - loop->watchers[loop->nwatchers] = (void*) events; - loop->watchers[loop->nwatchers + 1] = (void*) (uintptr_t) nfds; - for (i = 0; i < nfds; i++) { - pe = events + i; - fd = pe->portev_object; - - /* Skip invalidated events, see uv__platform_invalidate_fd */ - if (fd == -1) - continue; - - assert(fd >= 0); - assert((unsigned) fd < loop->nwatchers); - - w = loop->watchers[fd]; - - /* File descriptor that we've stopped watching, ignore. */ - if (w == NULL) - continue; - - w->cb(loop, w, pe->portev_events); - nevents++; - - if (w != loop->watchers[fd]) - continue; /* Disabled by callback. */ - - /* Events Ports operates in oneshot mode, rearm timer on next run. */ - if (w->pevents != 0 && QUEUE_EMPTY(&w->watcher_queue)) - QUEUE_INSERT_TAIL(&loop->watcher_queue, &w->watcher_queue); - } - loop->watchers[loop->nwatchers] = NULL; - loop->watchers[loop->nwatchers + 1] = NULL; - - if (nevents != 0) { - if (nfds == ARRAY_SIZE(events) && --count != 0) { - /* Poll for more events but don't block this time. */ - timeout = 0; - continue; - } - return; - } - - if (saved_errno == ETIME) { - assert(timeout != -1); - return; - } - - if (timeout == 0) - return; - - if (timeout == -1) - continue; - -update_timeout: - assert(timeout > 0); - - diff = loop->time - base; - if (diff >= (uint64_t) timeout) - return; - - timeout -= diff; - } -} - - -uint64_t uv__hrtime(uv_clocktype_t type) { - return gethrtime(); -} - - -/* - * We could use a static buffer for the path manipulations that we need outside - * of the function, but this function could be called by multiple consumers and - * we don't want to potentially create a race condition in the use of snprintf. - */ -int uv_exepath(char* buffer, size_t* size) { - ssize_t res; - char buf[128]; - - if (buffer == NULL || size == NULL || *size == 0) - return -EINVAL; - - snprintf(buf, sizeof(buf), "/proc/%lu/path/a.out", (unsigned long) getpid()); - - res = *size - 1; - if (res > 0) - res = readlink(buf, buffer, res); - - if (res == -1) - return -errno; - - buffer[res] = '\0'; - *size = res; - return 0; -} - - -uint64_t uv_get_free_memory(void) { - return (uint64_t) sysconf(_SC_PAGESIZE) * sysconf(_SC_AVPHYS_PAGES); -} - - -uint64_t uv_get_total_memory(void) { - return (uint64_t) sysconf(_SC_PAGESIZE) * sysconf(_SC_PHYS_PAGES); -} - - -void uv_loadavg(double avg[3]) { - (void) getloadavg(avg, 3); -} - - -#if defined(PORT_SOURCE_FILE) - -static int uv__fs_event_rearm(uv_fs_event_t *handle) { - if (handle->fd == -1) - return -EBADF; - - if (port_associate(handle->loop->fs_fd, - PORT_SOURCE_FILE, - (uintptr_t) &handle->fo, - FILE_ATTRIB | FILE_MODIFIED, - handle) == -1) { - return -errno; - } - handle->fd = PORT_LOADED; - - return 0; -} - - -static void uv__fs_event_read(uv_loop_t* loop, - uv__io_t* w, - unsigned int revents) { - uv_fs_event_t *handle = NULL; - timespec_t timeout; - port_event_t pe; - int events; - int r; - - (void) w; - (void) revents; - - do { - uint_t n = 1; - - /* - * Note that our use of port_getn() here (and not port_get()) is deliberate: - * there is a bug in event ports (Sun bug 6456558) whereby a zeroed timeout - * causes port_get() to return success instead of ETIME when there aren't - * actually any events (!); by using port_getn() in lieu of port_get(), - * we can at least workaround the bug by checking for zero returned events - * and treating it as we would ETIME. - */ - do { - memset(&timeout, 0, sizeof timeout); - r = port_getn(loop->fs_fd, &pe, 1, &n, &timeout); - } - while (r == -1 && errno == EINTR); - - if ((r == -1 && errno == ETIME) || n == 0) - break; - - handle = (uv_fs_event_t*) pe.portev_user; - assert((r == 0) && "unexpected port_get() error"); - - events = 0; - if (pe.portev_events & (FILE_ATTRIB | FILE_MODIFIED)) - events |= UV_CHANGE; - if (pe.portev_events & ~(FILE_ATTRIB | FILE_MODIFIED)) - events |= UV_RENAME; - assert(events != 0); - handle->fd = PORT_FIRED; - handle->cb(handle, NULL, events, 0); - - if (handle->fd != PORT_DELETED) { - r = uv__fs_event_rearm(handle); - if (r != 0) - handle->cb(handle, NULL, 0, r); - } - } - while (handle->fd != PORT_DELETED); -} - - -int uv_fs_event_init(uv_loop_t* loop, uv_fs_event_t* handle) { - uv__handle_init(loop, (uv_handle_t*)handle, UV_FS_EVENT); - return 0; -} - - -int uv_fs_event_start(uv_fs_event_t* handle, - uv_fs_event_cb cb, - const char* path, - unsigned int flags) { - int portfd; - int first_run; - int err; - - if (uv__is_active(handle)) - return -EINVAL; - - first_run = 0; - if (handle->loop->fs_fd == -1) { - portfd = port_create(); - if (portfd == -1) - return -errno; - handle->loop->fs_fd = portfd; - first_run = 1; - } - - uv__handle_start(handle); - handle->path = uv__strdup(path); - handle->fd = PORT_UNUSED; - handle->cb = cb; - - memset(&handle->fo, 0, sizeof handle->fo); - handle->fo.fo_name = handle->path; - err = uv__fs_event_rearm(handle); - if (err != 0) - return err; - - if (first_run) { - uv__io_init(&handle->loop->fs_event_watcher, uv__fs_event_read, portfd); - uv__io_start(handle->loop, &handle->loop->fs_event_watcher, UV__POLLIN); - } - - return 0; -} - - -int uv_fs_event_stop(uv_fs_event_t* handle) { - if (!uv__is_active(handle)) - return 0; - - if (handle->fd == PORT_FIRED || handle->fd == PORT_LOADED) { - port_dissociate(handle->loop->fs_fd, - PORT_SOURCE_FILE, - (uintptr_t) &handle->fo); - } - - handle->fd = PORT_DELETED; - uv__free(handle->path); - handle->path = NULL; - handle->fo.fo_name = NULL; - uv__handle_stop(handle); - - return 0; -} - -void uv__fs_event_close(uv_fs_event_t* handle) { - uv_fs_event_stop(handle); -} - -#else /* !defined(PORT_SOURCE_FILE) */ - -int uv_fs_event_init(uv_loop_t* loop, uv_fs_event_t* handle) { - return -ENOSYS; -} - - -int uv_fs_event_start(uv_fs_event_t* handle, - uv_fs_event_cb cb, - const char* filename, - unsigned int flags) { - return -ENOSYS; -} - - -int uv_fs_event_stop(uv_fs_event_t* handle) { - return -ENOSYS; -} - - -void uv__fs_event_close(uv_fs_event_t* handle) { - UNREACHABLE(); -} - -#endif /* defined(PORT_SOURCE_FILE) */ - - -char** uv_setup_args(int argc, char** argv) { - return argv; -} - - -int uv_set_process_title(const char* title) { - return 0; -} - - -int uv_get_process_title(char* buffer, size_t size) { - if (size > 0) { - buffer[0] = '\0'; - } - return 0; -} - - -int uv_resident_set_memory(size_t* rss) { - psinfo_t psinfo; - int err; - int fd; - - fd = open("/proc/self/psinfo", O_RDONLY); - if (fd == -1) - return -errno; - - /* FIXME(bnoordhuis) Handle EINTR. */ - err = -EINVAL; - if (read(fd, &psinfo, sizeof(psinfo)) == sizeof(psinfo)) { - *rss = (size_t)psinfo.pr_rssize * 1024; - err = 0; - } - uv__close(fd); - - return err; -} - - -int uv_uptime(double* uptime) { - kstat_ctl_t *kc; - kstat_t *ksp; - kstat_named_t *knp; - - long hz = sysconf(_SC_CLK_TCK); - - kc = kstat_open(); - if (kc == NULL) - return -EPERM; - - ksp = kstat_lookup(kc, (char*) "unix", 0, (char*) "system_misc"); - if (kstat_read(kc, ksp, NULL) == -1) { - *uptime = -1; - } else { - knp = (kstat_named_t*) kstat_data_lookup(ksp, (char*) "clk_intr"); - *uptime = knp->value.ul / hz; - } - kstat_close(kc); - - return 0; -} - - -int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count) { - int lookup_instance; - kstat_ctl_t *kc; - kstat_t *ksp; - kstat_named_t *knp; - uv_cpu_info_t* cpu_info; - - kc = kstat_open(); - if (kc == NULL) - return -EPERM; - - /* Get count of cpus */ - lookup_instance = 0; - while ((ksp = kstat_lookup(kc, (char*) "cpu_info", lookup_instance, NULL))) { - lookup_instance++; - } - - *cpu_infos = uv__malloc(lookup_instance * sizeof(**cpu_infos)); - if (!(*cpu_infos)) { - kstat_close(kc); - return -ENOMEM; - } - - *count = lookup_instance; - - cpu_info = *cpu_infos; - lookup_instance = 0; - while ((ksp = kstat_lookup(kc, (char*) "cpu_info", lookup_instance, NULL))) { - if (kstat_read(kc, ksp, NULL) == -1) { - cpu_info->speed = 0; - cpu_info->model = NULL; - } else { - knp = kstat_data_lookup(ksp, (char*) "clock_MHz"); - assert(knp->data_type == KSTAT_DATA_INT32 || - knp->data_type == KSTAT_DATA_INT64); - cpu_info->speed = (knp->data_type == KSTAT_DATA_INT32) ? knp->value.i32 - : knp->value.i64; - - knp = kstat_data_lookup(ksp, (char*) "brand"); - assert(knp->data_type == KSTAT_DATA_STRING); - cpu_info->model = uv__strdup(KSTAT_NAMED_STR_PTR(knp)); - } - - lookup_instance++; - cpu_info++; - } - - cpu_info = *cpu_infos; - lookup_instance = 0; - for (;;) { - ksp = kstat_lookup(kc, (char*) "cpu", lookup_instance, (char*) "sys"); - - if (ksp == NULL) - break; - - if (kstat_read(kc, ksp, NULL) == -1) { - cpu_info->cpu_times.user = 0; - cpu_info->cpu_times.nice = 0; - cpu_info->cpu_times.sys = 0; - cpu_info->cpu_times.idle = 0; - cpu_info->cpu_times.irq = 0; - } else { - knp = kstat_data_lookup(ksp, (char*) "cpu_ticks_user"); - assert(knp->data_type == KSTAT_DATA_UINT64); - cpu_info->cpu_times.user = knp->value.ui64; - - knp = kstat_data_lookup(ksp, (char*) "cpu_ticks_kernel"); - assert(knp->data_type == KSTAT_DATA_UINT64); - cpu_info->cpu_times.sys = knp->value.ui64; - - knp = kstat_data_lookup(ksp, (char*) "cpu_ticks_idle"); - assert(knp->data_type == KSTAT_DATA_UINT64); - cpu_info->cpu_times.idle = knp->value.ui64; - - knp = kstat_data_lookup(ksp, (char*) "intr"); - assert(knp->data_type == KSTAT_DATA_UINT64); - cpu_info->cpu_times.irq = knp->value.ui64; - cpu_info->cpu_times.nice = 0; - } - - lookup_instance++; - cpu_info++; - } - - kstat_close(kc); - - return 0; -} - - -void uv_free_cpu_info(uv_cpu_info_t* cpu_infos, int count) { - int i; - - for (i = 0; i < count; i++) { - uv__free(cpu_infos[i].model); - } - - uv__free(cpu_infos); -} - - -int uv_interface_addresses(uv_interface_address_t** addresses, int* count) { -#ifdef SUNOS_NO_IFADDRS - return -ENOSYS; -#else - uv_interface_address_t* address; - struct sockaddr_dl* sa_addr; - struct ifaddrs* addrs; - struct ifaddrs* ent; - int i; - - if (getifaddrs(&addrs)) - return -errno; - - *count = 0; - - /* Count the number of interfaces */ - for (ent = addrs; ent != NULL; ent = ent->ifa_next) { - if (!((ent->ifa_flags & IFF_UP) && (ent->ifa_flags & IFF_RUNNING)) || - (ent->ifa_addr == NULL) || - (ent->ifa_addr->sa_family == PF_PACKET)) { - continue; - } - - (*count)++; - } - - *addresses = uv__malloc(*count * sizeof(**addresses)); - if (!(*addresses)) - return -ENOMEM; - - address = *addresses; - - for (ent = addrs; ent != NULL; ent = ent->ifa_next) { - if (!((ent->ifa_flags & IFF_UP) && (ent->ifa_flags & IFF_RUNNING))) - continue; - - if (ent->ifa_addr == NULL) - continue; - - address->name = uv__strdup(ent->ifa_name); - - if (ent->ifa_addr->sa_family == AF_INET6) { - address->address.address6 = *((struct sockaddr_in6*) ent->ifa_addr); - } else { - address->address.address4 = *((struct sockaddr_in*) ent->ifa_addr); - } - - if (ent->ifa_netmask->sa_family == AF_INET6) { - address->netmask.netmask6 = *((struct sockaddr_in6*) ent->ifa_netmask); - } else { - address->netmask.netmask4 = *((struct sockaddr_in*) ent->ifa_netmask); - } - - address->is_internal = !!((ent->ifa_flags & IFF_PRIVATE) || - (ent->ifa_flags & IFF_LOOPBACK)); - - address++; - } - - /* Fill in physical addresses for each interface */ - for (ent = addrs; ent != NULL; ent = ent->ifa_next) { - if (!((ent->ifa_flags & IFF_UP) && (ent->ifa_flags & IFF_RUNNING)) || - (ent->ifa_addr == NULL) || - (ent->ifa_addr->sa_family != AF_LINK)) { - continue; - } - - address = *addresses; - - for (i = 0; i < (*count); i++) { - if (strcmp(address->name, ent->ifa_name) == 0) { - sa_addr = (struct sockaddr_dl*)(ent->ifa_addr); - memcpy(address->phys_addr, LLADDR(sa_addr), sizeof(address->phys_addr)); - } - address++; - } - } - - freeifaddrs(addrs); - - return 0; -#endif /* SUNOS_NO_IFADDRS */ -} - - -void uv_free_interface_addresses(uv_interface_address_t* addresses, - int count) { - int i; - - for (i = 0; i < count; i++) { - uv__free(addresses[i].name); - } - - uv__free(addresses); -} diff --git a/outside/libuv-v1.7.5/src/unix/tcp.c b/outside/libuv-v1.7.5/src/unix/tcp.c deleted file mode 100644 index 6d213a497..000000000 --- a/outside/libuv-v1.7.5/src/unix/tcp.c +++ /dev/null @@ -1,362 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "internal.h" - -#include -#include -#include -#include - - -static int maybe_new_socket(uv_tcp_t* handle, int domain, int flags) { - int sockfd; - int err; - - if (domain == AF_UNSPEC || uv__stream_fd(handle) != -1) { - handle->flags |= flags; - return 0; - } - - err = uv__socket(domain, SOCK_STREAM, 0); - if (err < 0) - return err; - sockfd = err; - - err = uv__stream_open((uv_stream_t*) handle, sockfd, flags); - if (err) { - uv__close(sockfd); - return err; - } - - return 0; -} - - -int uv_tcp_init_ex(uv_loop_t* loop, uv_tcp_t* tcp, unsigned int flags) { - int domain; - - /* Use the lower 8 bits for the domain */ - domain = flags & 0xFF; - if (domain != AF_INET && domain != AF_INET6 && domain != AF_UNSPEC) - return -EINVAL; - - if (flags & ~0xFF) - return -EINVAL; - - uv__stream_init(loop, (uv_stream_t*)tcp, UV_TCP); - - /* If anything fails beyond this point we need to remove the handle from - * the handle queue, since it was added by uv__handle_init in uv_stream_init. - */ - - if (domain != AF_UNSPEC) { - int err = maybe_new_socket(tcp, domain, 0); - if (err) { - QUEUE_REMOVE(&tcp->handle_queue); - return err; - } - } - - return 0; -} - - -int uv_tcp_init(uv_loop_t* loop, uv_tcp_t* tcp) { - return uv_tcp_init_ex(loop, tcp, AF_UNSPEC); -} - - -int uv__tcp_bind(uv_tcp_t* tcp, - const struct sockaddr* addr, - unsigned int addrlen, - unsigned int flags) { - int err; - int on; - - /* Cannot set IPv6-only mode on non-IPv6 socket. */ - if ((flags & UV_TCP_IPV6ONLY) && addr->sa_family != AF_INET6) - return -EINVAL; - - err = maybe_new_socket(tcp, - addr->sa_family, - UV_STREAM_READABLE | UV_STREAM_WRITABLE); - if (err) - return err; - - on = 1; - if (setsockopt(tcp->io_watcher.fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on))) - return -errno; - -#ifdef IPV6_V6ONLY - if (addr->sa_family == AF_INET6) { - on = (flags & UV_TCP_IPV6ONLY) != 0; - if (setsockopt(tcp->io_watcher.fd, - IPPROTO_IPV6, - IPV6_V6ONLY, - &on, - sizeof on) == -1) { - return -errno; - } - } -#endif - - errno = 0; - if (bind(tcp->io_watcher.fd, addr, addrlen) && errno != EADDRINUSE) { - if (errno == EAFNOSUPPORT) - /* OSX, other BSDs and SunoS fail with EAFNOSUPPORT when binding a - * socket created with AF_INET to an AF_INET6 address or vice versa. */ - return -EINVAL; - return -errno; - } - tcp->delayed_error = -errno; - - if (addr->sa_family == AF_INET6) - tcp->flags |= UV_HANDLE_IPV6; - - return 0; -} - - -int uv__tcp_connect(uv_connect_t* req, - uv_tcp_t* handle, - const struct sockaddr* addr, - unsigned int addrlen, - uv_connect_cb cb) { - int err; - int r; - - assert(handle->type == UV_TCP); - - if (handle->connect_req != NULL) - return -EALREADY; /* FIXME(bnoordhuis) -EINVAL or maybe -EBUSY. */ - - err = maybe_new_socket(handle, - addr->sa_family, - UV_STREAM_READABLE | UV_STREAM_WRITABLE); - if (err) - return err; - - handle->delayed_error = 0; - - do - r = connect(uv__stream_fd(handle), addr, addrlen); - while (r == -1 && errno == EINTR); - - if (r == -1) { - if (errno == EINPROGRESS) - ; /* not an error */ - else if (errno == ECONNREFUSED) - /* If we get a ECONNREFUSED wait until the next tick to report the - * error. Solaris wants to report immediately--other unixes want to - * wait. - */ - handle->delayed_error = -errno; - else - return -errno; - } - - uv__req_init(handle->loop, req, UV_CONNECT); - req->cb = cb; - req->handle = (uv_stream_t*) handle; - QUEUE_INIT(&req->queue); - handle->connect_req = req; - - uv__io_start(handle->loop, &handle->io_watcher, UV__POLLOUT); - - if (handle->delayed_error) - uv__io_feed(handle->loop, &handle->io_watcher); - - return 0; -} - - -int uv_tcp_open(uv_tcp_t* handle, uv_os_sock_t sock) { - int err; - - err = uv__nonblock(sock, 1); - if (err) - return err; - - return uv__stream_open((uv_stream_t*)handle, - sock, - UV_STREAM_READABLE | UV_STREAM_WRITABLE); -} - - -int uv_tcp_getsockname(const uv_tcp_t* handle, - struct sockaddr* name, - int* namelen) { - socklen_t socklen; - - if (handle->delayed_error) - return handle->delayed_error; - - if (uv__stream_fd(handle) < 0) - return -EINVAL; /* FIXME(bnoordhuis) -EBADF */ - - /* sizeof(socklen_t) != sizeof(int) on some systems. */ - socklen = (socklen_t) *namelen; - - if (getsockname(uv__stream_fd(handle), name, &socklen)) - return -errno; - - *namelen = (int) socklen; - return 0; -} - - -int uv_tcp_getpeername(const uv_tcp_t* handle, - struct sockaddr* name, - int* namelen) { - socklen_t socklen; - - if (handle->delayed_error) - return handle->delayed_error; - - if (uv__stream_fd(handle) < 0) - return -EINVAL; /* FIXME(bnoordhuis) -EBADF */ - - /* sizeof(socklen_t) != sizeof(int) on some systems. */ - socklen = (socklen_t) *namelen; - - if (getpeername(uv__stream_fd(handle), name, &socklen)) - return -errno; - - *namelen = (int) socklen; - return 0; -} - - -int uv_tcp_listen(uv_tcp_t* tcp, int backlog, uv_connection_cb cb) { - static int single_accept = -1; - int err; - - if (tcp->delayed_error) - return tcp->delayed_error; - - if (single_accept == -1) { - const char* val = getenv("UV_TCP_SINGLE_ACCEPT"); - single_accept = (val != NULL && atoi(val) != 0); /* Off by default. */ - } - - if (single_accept) - tcp->flags |= UV_TCP_SINGLE_ACCEPT; - - err = maybe_new_socket(tcp, AF_INET, UV_STREAM_READABLE); - if (err) - return err; - - if (listen(tcp->io_watcher.fd, backlog)) - return -errno; - - tcp->connection_cb = cb; - - /* Start listening for connections. */ - tcp->io_watcher.cb = uv__server_io; - uv__io_start(tcp->loop, &tcp->io_watcher, UV__POLLIN); - - return 0; -} - - -int uv__tcp_nodelay(int fd, int on) { - if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &on, sizeof(on))) - return -errno; - return 0; -} - - -int uv__tcp_keepalive(int fd, int on, unsigned int delay) { - if (setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &on, sizeof(on))) - return -errno; - -#ifdef TCP_KEEPIDLE - if (on && setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, &delay, sizeof(delay))) - return -errno; -#endif - - /* Solaris/SmartOS, if you don't support keep-alive, - * then don't advertise it in your system headers... - */ - /* FIXME(bnoordhuis) That's possibly because sizeof(delay) should be 1. */ -#if defined(TCP_KEEPALIVE) && !defined(__sun) - if (on && setsockopt(fd, IPPROTO_TCP, TCP_KEEPALIVE, &delay, sizeof(delay))) - return -errno; -#endif - - return 0; -} - - -int uv_tcp_nodelay(uv_tcp_t* handle, int on) { - int err; - - if (uv__stream_fd(handle) != -1) { - err = uv__tcp_nodelay(uv__stream_fd(handle), on); - if (err) - return err; - } - - if (on) - handle->flags |= UV_TCP_NODELAY; - else - handle->flags &= ~UV_TCP_NODELAY; - - return 0; -} - - -int uv_tcp_keepalive(uv_tcp_t* handle, int on, unsigned int delay) { - int err; - - if (uv__stream_fd(handle) != -1) { - err =uv__tcp_keepalive(uv__stream_fd(handle), on, delay); - if (err) - return err; - } - - if (on) - handle->flags |= UV_TCP_KEEPALIVE; - else - handle->flags &= ~UV_TCP_KEEPALIVE; - - /* TODO Store delay if uv__stream_fd(handle) == -1 but don't want to enlarge - * uv_tcp_t with an int that's almost never used... - */ - - return 0; -} - - -int uv_tcp_simultaneous_accepts(uv_tcp_t* handle, int enable) { - if (enable) - handle->flags &= ~UV_TCP_SINGLE_ACCEPT; - else - handle->flags |= UV_TCP_SINGLE_ACCEPT; - return 0; -} - - -void uv__tcp_close(uv_tcp_t* handle) { - uv__stream_close((uv_stream_t*)handle); -} diff --git a/outside/libuv-v1.7.5/src/unix/thread.c b/outside/libuv-v1.7.5/src/unix/thread.c deleted file mode 100644 index c56a31702..000000000 --- a/outside/libuv-v1.7.5/src/unix/thread.c +++ /dev/null @@ -1,525 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "internal.h" - -#include -#include -#include - -#include - -#undef NANOSEC -#define NANOSEC ((uint64_t) 1e9) - - -struct thread_ctx { - void (*entry)(void* arg); - void* arg; -}; - - -static void* uv__thread_start(void *arg) -{ - struct thread_ctx *ctx_p; - struct thread_ctx ctx; - - ctx_p = arg; - ctx = *ctx_p; - uv__free(ctx_p); - ctx.entry(ctx.arg); - - return 0; -} - - -int uv_thread_create(uv_thread_t *tid, void (*entry)(void *arg), void *arg) { - struct thread_ctx* ctx; - int err; - - ctx = uv__malloc(sizeof(*ctx)); - if (ctx == NULL) - return UV_ENOMEM; - - ctx->entry = entry; - ctx->arg = arg; - - err = pthread_create(tid, NULL, uv__thread_start, ctx); - - if (err) - uv__free(ctx); - - return -err; -} - - -uv_thread_t uv_thread_self(void) { - return pthread_self(); -} - -int uv_thread_join(uv_thread_t *tid) { - return -pthread_join(*tid, NULL); -} - - -int uv_thread_equal(const uv_thread_t* t1, const uv_thread_t* t2) { - return pthread_equal(*t1, *t2); -} - - -int uv_mutex_init(uv_mutex_t* mutex) { -#if defined(NDEBUG) || !defined(PTHREAD_MUTEX_ERRORCHECK) - return -pthread_mutex_init(mutex, NULL); -#else - pthread_mutexattr_t attr; - int err; - - if (pthread_mutexattr_init(&attr)) - abort(); - - if (pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK)) - abort(); - - err = pthread_mutex_init(mutex, &attr); - - if (pthread_mutexattr_destroy(&attr)) - abort(); - - return -err; -#endif -} - - -void uv_mutex_destroy(uv_mutex_t* mutex) { - if (pthread_mutex_destroy(mutex)) - abort(); -} - - -void uv_mutex_lock(uv_mutex_t* mutex) { - if (pthread_mutex_lock(mutex)) - abort(); -} - - -int uv_mutex_trylock(uv_mutex_t* mutex) { - int err; - - err = pthread_mutex_trylock(mutex); - if (err) { - if (err != EBUSY && err != EAGAIN) - abort(); - return -EBUSY; - } - - return 0; -} - - -void uv_mutex_unlock(uv_mutex_t* mutex) { - if (pthread_mutex_unlock(mutex)) - abort(); -} - - -int uv_rwlock_init(uv_rwlock_t* rwlock) { - return -pthread_rwlock_init(rwlock, NULL); -} - - -void uv_rwlock_destroy(uv_rwlock_t* rwlock) { - if (pthread_rwlock_destroy(rwlock)) - abort(); -} - - -void uv_rwlock_rdlock(uv_rwlock_t* rwlock) { - if (pthread_rwlock_rdlock(rwlock)) - abort(); -} - - -int uv_rwlock_tryrdlock(uv_rwlock_t* rwlock) { - int err; - - err = pthread_rwlock_tryrdlock(rwlock); - if (err) { - if (err != EBUSY && err != EAGAIN) - abort(); - return -EBUSY; - } - - return 0; -} - - -void uv_rwlock_rdunlock(uv_rwlock_t* rwlock) { - if (pthread_rwlock_unlock(rwlock)) - abort(); -} - - -void uv_rwlock_wrlock(uv_rwlock_t* rwlock) { - if (pthread_rwlock_wrlock(rwlock)) - abort(); -} - - -int uv_rwlock_trywrlock(uv_rwlock_t* rwlock) { - int err; - - err = pthread_rwlock_trywrlock(rwlock); - if (err) { - if (err != EBUSY && err != EAGAIN) - abort(); - return -EBUSY; - } - - return 0; -} - - -void uv_rwlock_wrunlock(uv_rwlock_t* rwlock) { - if (pthread_rwlock_unlock(rwlock)) - abort(); -} - - -void uv_once(uv_once_t* guard, void (*callback)(void)) { - if (pthread_once(guard, callback)) - abort(); -} - -#if defined(__APPLE__) && defined(__MACH__) - -int uv_sem_init(uv_sem_t* sem, unsigned int value) { - kern_return_t err; - - err = semaphore_create(mach_task_self(), sem, SYNC_POLICY_FIFO, value); - if (err == KERN_SUCCESS) - return 0; - if (err == KERN_INVALID_ARGUMENT) - return -EINVAL; - if (err == KERN_RESOURCE_SHORTAGE) - return -ENOMEM; - - abort(); - return -EINVAL; /* Satisfy the compiler. */ -} - - -void uv_sem_destroy(uv_sem_t* sem) { - if (semaphore_destroy(mach_task_self(), *sem)) - abort(); -} - - -void uv_sem_post(uv_sem_t* sem) { - if (semaphore_signal(*sem)) - abort(); -} - - -void uv_sem_wait(uv_sem_t* sem) { - int r; - - do - r = semaphore_wait(*sem); - while (r == KERN_ABORTED); - - if (r != KERN_SUCCESS) - abort(); -} - - -int uv_sem_trywait(uv_sem_t* sem) { - mach_timespec_t interval; - kern_return_t err; - - interval.tv_sec = 0; - interval.tv_nsec = 0; - - err = semaphore_timedwait(*sem, interval); - if (err == KERN_SUCCESS) - return 0; - if (err == KERN_OPERATION_TIMED_OUT) - return -EAGAIN; - - abort(); - return -EINVAL; /* Satisfy the compiler. */ -} - -#else /* !(defined(__APPLE__) && defined(__MACH__)) */ - -int uv_sem_init(uv_sem_t* sem, unsigned int value) { - if (sem_init(sem, 0, value)) - return -errno; - return 0; -} - - -void uv_sem_destroy(uv_sem_t* sem) { - if (sem_destroy(sem)) - abort(); -} - - -void uv_sem_post(uv_sem_t* sem) { - if (sem_post(sem)) - abort(); -} - - -void uv_sem_wait(uv_sem_t* sem) { - int r; - - do - r = sem_wait(sem); - while (r == -1 && errno == EINTR); - - if (r) - abort(); -} - - -int uv_sem_trywait(uv_sem_t* sem) { - int r; - - do - r = sem_trywait(sem); - while (r == -1 && errno == EINTR); - - if (r) { - if (errno == EAGAIN) - return -EAGAIN; - abort(); - } - - return 0; -} - -#endif /* defined(__APPLE__) && defined(__MACH__) */ - - -#if defined(__APPLE__) && defined(__MACH__) - -int uv_cond_init(uv_cond_t* cond) { - return -pthread_cond_init(cond, NULL); -} - -#else /* !(defined(__APPLE__) && defined(__MACH__)) */ - -int uv_cond_init(uv_cond_t* cond) { - pthread_condattr_t attr; - int err; - - err = pthread_condattr_init(&attr); - if (err) - return -err; - -#if !(defined(__ANDROID__) && defined(HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC)) - err = pthread_condattr_setclock(&attr, CLOCK_MONOTONIC); - if (err) - goto error2; -#endif - - err = pthread_cond_init(cond, &attr); - if (err) - goto error2; - - err = pthread_condattr_destroy(&attr); - if (err) - goto error; - - return 0; - -error: - pthread_cond_destroy(cond); -error2: - pthread_condattr_destroy(&attr); - return -err; -} - -#endif /* defined(__APPLE__) && defined(__MACH__) */ - -void uv_cond_destroy(uv_cond_t* cond) { - if (pthread_cond_destroy(cond)) - abort(); -} - -void uv_cond_signal(uv_cond_t* cond) { - if (pthread_cond_signal(cond)) - abort(); -} - -void uv_cond_broadcast(uv_cond_t* cond) { - if (pthread_cond_broadcast(cond)) - abort(); -} - -void uv_cond_wait(uv_cond_t* cond, uv_mutex_t* mutex) { - if (pthread_cond_wait(cond, mutex)) - abort(); -} - - -int uv_cond_timedwait(uv_cond_t* cond, uv_mutex_t* mutex, uint64_t timeout) { - int r; - struct timespec ts; - -#if defined(__APPLE__) && defined(__MACH__) - ts.tv_sec = timeout / NANOSEC; - ts.tv_nsec = timeout % NANOSEC; - r = pthread_cond_timedwait_relative_np(cond, mutex, &ts); -#else - timeout += uv__hrtime(UV_CLOCK_PRECISE); - ts.tv_sec = timeout / NANOSEC; - ts.tv_nsec = timeout % NANOSEC; -#if defined(__ANDROID__) && defined(HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC) - /* - * The bionic pthread implementation doesn't support CLOCK_MONOTONIC, - * but has this alternative function instead. - */ - r = pthread_cond_timedwait_monotonic_np(cond, mutex, &ts); -#else - r = pthread_cond_timedwait(cond, mutex, &ts); -#endif /* __ANDROID__ */ -#endif - - - if (r == 0) - return 0; - - if (r == ETIMEDOUT) - return -ETIMEDOUT; - - abort(); - return -EINVAL; /* Satisfy the compiler. */ -} - - -#if defined(__APPLE__) && defined(__MACH__) - -int uv_barrier_init(uv_barrier_t* barrier, unsigned int count) { - int err; - - barrier->n = count; - barrier->count = 0; - - err = uv_mutex_init(&barrier->mutex); - if (err) - return -err; - - err = uv_sem_init(&barrier->turnstile1, 0); - if (err) - goto error2; - - err = uv_sem_init(&barrier->turnstile2, 1); - if (err) - goto error; - - return 0; - -error: - uv_sem_destroy(&barrier->turnstile1); -error2: - uv_mutex_destroy(&barrier->mutex); - return -err; - -} - - -void uv_barrier_destroy(uv_barrier_t* barrier) { - uv_sem_destroy(&barrier->turnstile2); - uv_sem_destroy(&barrier->turnstile1); - uv_mutex_destroy(&barrier->mutex); -} - - -int uv_barrier_wait(uv_barrier_t* barrier) { - int serial_thread; - - uv_mutex_lock(&barrier->mutex); - if (++barrier->count == barrier->n) { - uv_sem_wait(&barrier->turnstile2); - uv_sem_post(&barrier->turnstile1); - } - uv_mutex_unlock(&barrier->mutex); - - uv_sem_wait(&barrier->turnstile1); - uv_sem_post(&barrier->turnstile1); - - uv_mutex_lock(&barrier->mutex); - serial_thread = (--barrier->count == 0); - if (serial_thread) { - uv_sem_wait(&barrier->turnstile1); - uv_sem_post(&barrier->turnstile2); - } - uv_mutex_unlock(&barrier->mutex); - - uv_sem_wait(&barrier->turnstile2); - uv_sem_post(&barrier->turnstile2); - return serial_thread; -} - -#else /* !(defined(__APPLE__) && defined(__MACH__)) */ - -int uv_barrier_init(uv_barrier_t* barrier, unsigned int count) { - return -pthread_barrier_init(barrier, NULL, count); -} - - -void uv_barrier_destroy(uv_barrier_t* barrier) { - if (pthread_barrier_destroy(barrier)) - abort(); -} - - -int uv_barrier_wait(uv_barrier_t* barrier) { - int r = pthread_barrier_wait(barrier); - if (r && r != PTHREAD_BARRIER_SERIAL_THREAD) - abort(); - return r == PTHREAD_BARRIER_SERIAL_THREAD; -} - -#endif /* defined(__APPLE__) && defined(__MACH__) */ - -int uv_key_create(uv_key_t* key) { - return -pthread_key_create(key, NULL); -} - - -void uv_key_delete(uv_key_t* key) { - if (pthread_key_delete(*key)) - abort(); -} - - -void* uv_key_get(uv_key_t* key) { - return pthread_getspecific(*key); -} - - -void uv_key_set(uv_key_t* key, void* value) { - if (pthread_setspecific(*key, value)) - abort(); -} diff --git a/outside/libuv-v1.7.5/src/unix/timer.c b/outside/libuv-v1.7.5/src/unix/timer.c deleted file mode 100644 index ca3ec3db9..000000000 --- a/outside/libuv-v1.7.5/src/unix/timer.c +++ /dev/null @@ -1,172 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * 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. - */ - -#include "uv.h" -#include "internal.h" -#include "heap-inl.h" - -#include -#include - - -static int timer_less_than(const struct heap_node* ha, - const struct heap_node* hb) { - const uv_timer_t* a; - const uv_timer_t* b; - - a = container_of(ha, const uv_timer_t, heap_node); - b = container_of(hb, const uv_timer_t, heap_node); - - if (a->timeout < b->timeout) - return 1; - if (b->timeout < a->timeout) - return 0; - - /* Compare start_id when both have the same timeout. start_id is - * allocated with loop->timer_counter in uv_timer_start(). - */ - if (a->start_id < b->start_id) - return 1; - if (b->start_id < a->start_id) - return 0; - - return 0; -} - - -int uv_timer_init(uv_loop_t* loop, uv_timer_t* handle) { - uv__handle_init(loop, (uv_handle_t*)handle, UV_TIMER); - handle->timer_cb = NULL; - handle->repeat = 0; - return 0; -} - - -int uv_timer_start(uv_timer_t* handle, - uv_timer_cb cb, - uint64_t timeout, - uint64_t repeat) { - uint64_t clamped_timeout; - - if (cb == NULL) - return -EINVAL; - - if (uv__is_active(handle)) - uv_timer_stop(handle); - - clamped_timeout = handle->loop->time + timeout; - if (clamped_timeout < timeout) - clamped_timeout = (uint64_t) -1; - - handle->timer_cb = cb; - handle->timeout = clamped_timeout; - handle->repeat = repeat; - /* start_id is the second index to be compared in uv__timer_cmp() */ - handle->start_id = handle->loop->timer_counter++; - - heap_insert((struct heap*) &handle->loop->timer_heap, - (struct heap_node*) &handle->heap_node, - timer_less_than); - uv__handle_start(handle); - - return 0; -} - - -int uv_timer_stop(uv_timer_t* handle) { - if (!uv__is_active(handle)) - return 0; - - heap_remove((struct heap*) &handle->loop->timer_heap, - (struct heap_node*) &handle->heap_node, - timer_less_than); - uv__handle_stop(handle); - - return 0; -} - - -int uv_timer_again(uv_timer_t* handle) { - if (handle->timer_cb == NULL) - return -EINVAL; - - if (handle->repeat) { - uv_timer_stop(handle); - uv_timer_start(handle, handle->timer_cb, handle->repeat, handle->repeat); - } - - return 0; -} - - -void uv_timer_set_repeat(uv_timer_t* handle, uint64_t repeat) { - handle->repeat = repeat; -} - - -uint64_t uv_timer_get_repeat(const uv_timer_t* handle) { - return handle->repeat; -} - - -int uv__next_timeout(const uv_loop_t* loop) { - const struct heap_node* heap_node; - const uv_timer_t* handle; - uint64_t diff; - - heap_node = heap_min((const struct heap*) &loop->timer_heap); - if (heap_node == NULL) - return -1; /* block indefinitely */ - - handle = container_of(heap_node, const uv_timer_t, heap_node); - if (handle->timeout <= loop->time) - return 0; - - diff = handle->timeout - loop->time; - if (diff > INT_MAX) - diff = INT_MAX; - - return diff; -} - - -void uv__run_timers(uv_loop_t* loop) { - struct heap_node* heap_node; - uv_timer_t* handle; - - for (;;) { - heap_node = heap_min((struct heap*) &loop->timer_heap); - if (heap_node == NULL) - break; - - handle = container_of(heap_node, uv_timer_t, heap_node); - if (handle->timeout > loop->time) - break; - - uv_timer_stop(handle); - uv_timer_again(handle); - handle->timer_cb(handle); - } -} - - -void uv__timer_close(uv_timer_t* handle) { - uv_timer_stop(handle); -} diff --git a/outside/libuv-v1.7.5/src/unix/tty.c b/outside/libuv-v1.7.5/src/unix/tty.c deleted file mode 100644 index 54c9055a0..000000000 --- a/outside/libuv-v1.7.5/src/unix/tty.c +++ /dev/null @@ -1,270 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "internal.h" -#include "spinlock.h" - -#include -#include -#include -#include -#include - -static int orig_termios_fd = -1; -static struct termios orig_termios; -static uv_spinlock_t termios_spinlock = UV_SPINLOCK_INITIALIZER; - - -int uv_tty_init(uv_loop_t* loop, uv_tty_t* tty, int fd, int readable) { - uv_handle_type type; - int flags; - int newfd; - int r; - - /* File descriptors that refer to files cannot be monitored with epoll. - * That restriction also applies to character devices like /dev/random - * (but obviously not /dev/tty.) - */ - type = uv_guess_handle(fd); - if (type == UV_FILE || type == UV_UNKNOWN_HANDLE) - return -EINVAL; - - flags = 0; - newfd = -1; - - /* Reopen the file descriptor when it refers to a tty. This lets us put the - * tty in non-blocking mode without affecting other processes that share it - * with us. - * - * Example: `node | cat` - if we put our fd 0 in non-blocking mode, it also - * affects fd 1 of `cat` because both file descriptors refer to the same - * struct file in the kernel. When we reopen our fd 0, it points to a - * different struct file, hence changing its properties doesn't affect - * other processes. - */ - if (type == UV_TTY) { - r = uv__open_cloexec("/dev/tty", O_RDWR); - - if (r < 0) { - /* fallback to using blocking writes */ - if (!readable) - flags |= UV_STREAM_BLOCKING; - goto skip; - } - - newfd = r; - - r = uv__dup2_cloexec(newfd, fd); - if (r < 0 && r != -EINVAL) { - /* EINVAL means newfd == fd which could conceivably happen if another - * thread called close(fd) between our calls to isatty() and open(). - * That's a rather unlikely event but let's handle it anyway. - */ - uv__close(newfd); - return r; - } - - fd = newfd; - } - -skip: - uv__stream_init(loop, (uv_stream_t*) tty, UV_TTY); - - /* If anything fails beyond this point we need to remove the handle from - * the handle queue, since it was added by uv__handle_init in uv_stream_init. - */ - -#if defined(__APPLE__) - r = uv__stream_try_select((uv_stream_t*) tty, &fd); - if (r) { - if (newfd != -1) - uv__close(newfd); - QUEUE_REMOVE(&tty->handle_queue); - return r; - } -#endif - - if (readable) - flags |= UV_STREAM_READABLE; - else - flags |= UV_STREAM_WRITABLE; - - if (!(flags & UV_STREAM_BLOCKING)) - uv__nonblock(fd, 1); - - uv__stream_open((uv_stream_t*) tty, fd, flags); - tty->mode = UV_TTY_MODE_NORMAL; - - return 0; -} - -static void uv__tty_make_raw(struct termios* tio) { - assert(tio != NULL); - -#ifdef __sun - /* - * This implementation of cfmakeraw for Solaris and derivatives is taken from - * http://www.perkin.org.uk/posts/solaris-portability-cfmakeraw.html. - */ - tio->c_iflag &= ~(IMAXBEL | IGNBRK | BRKINT | PARMRK | ISTRIP | INLCR | - IGNCR | ICRNL | IXON); - tio->c_oflag &= ~OPOST; - tio->c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN); - tio->c_cflag &= ~(CSIZE | PARENB); - tio->c_cflag |= CS8; -#else - cfmakeraw(tio); -#endif /* #ifdef __sun */ -} - -int uv_tty_set_mode(uv_tty_t* tty, uv_tty_mode_t mode) { - struct termios tmp; - int fd; - - if (tty->mode == (int) mode) - return 0; - - fd = uv__stream_fd(tty); - if (tty->mode == UV_TTY_MODE_NORMAL && mode != UV_TTY_MODE_NORMAL) { - if (tcgetattr(fd, &tty->orig_termios)) - return -errno; - - /* This is used for uv_tty_reset_mode() */ - uv_spinlock_lock(&termios_spinlock); - if (orig_termios_fd == -1) { - orig_termios = tty->orig_termios; - orig_termios_fd = fd; - } - uv_spinlock_unlock(&termios_spinlock); - } - - tmp = tty->orig_termios; - switch (mode) { - case UV_TTY_MODE_NORMAL: - break; - case UV_TTY_MODE_RAW: - tmp.c_iflag &= ~(BRKINT | ICRNL | INPCK | ISTRIP | IXON); - tmp.c_oflag |= (ONLCR); - tmp.c_cflag |= (CS8); - tmp.c_lflag &= ~(ECHO | ICANON | IEXTEN | ISIG); - tmp.c_cc[VMIN] = 1; - tmp.c_cc[VTIME] = 0; - break; - case UV_TTY_MODE_IO: - uv__tty_make_raw(&tmp); - break; - } - - /* Apply changes after draining */ - if (tcsetattr(fd, TCSADRAIN, &tmp)) - return -errno; - - tty->mode = mode; - return 0; -} - - -int uv_tty_get_winsize(uv_tty_t* tty, int* width, int* height) { - struct winsize ws; - - if (ioctl(uv__stream_fd(tty), TIOCGWINSZ, &ws)) - return -errno; - - *width = ws.ws_col; - *height = ws.ws_row; - - return 0; -} - - -uv_handle_type uv_guess_handle(uv_file file) { - struct sockaddr sa; - struct stat s; - socklen_t len; - int type; - - if (file < 0) - return UV_UNKNOWN_HANDLE; - - if (isatty(file)) - return UV_TTY; - - if (fstat(file, &s)) - return UV_UNKNOWN_HANDLE; - - if (S_ISREG(s.st_mode)) - return UV_FILE; - - if (S_ISCHR(s.st_mode)) - return UV_FILE; /* XXX UV_NAMED_PIPE? */ - - if (S_ISFIFO(s.st_mode)) - return UV_NAMED_PIPE; - - if (!S_ISSOCK(s.st_mode)) - return UV_UNKNOWN_HANDLE; - - len = sizeof(type); - if (getsockopt(file, SOL_SOCKET, SO_TYPE, &type, &len)) - return UV_UNKNOWN_HANDLE; - - len = sizeof(sa); - if (getsockname(file, &sa, &len)) - return UV_UNKNOWN_HANDLE; - - if (type == SOCK_DGRAM) - if (sa.sa_family == AF_INET || sa.sa_family == AF_INET6) - return UV_UDP; - - if (type == SOCK_STREAM) { - if (sa.sa_family == AF_INET || sa.sa_family == AF_INET6) - return UV_TCP; - if (sa.sa_family == AF_UNIX) - return UV_NAMED_PIPE; - } - - return UV_UNKNOWN_HANDLE; -} - - -/* This function is async signal-safe, meaning that it's safe to call from - * inside a signal handler _unless_ execution was inside uv_tty_set_mode()'s - * critical section when the signal was raised. - */ -int uv_tty_reset_mode(void) { - int saved_errno; - int err; - - saved_errno = errno; - if (!uv_spinlock_trylock(&termios_spinlock)) - return -EBUSY; /* In uv_tty_set_mode(). */ - - err = 0; - if (orig_termios_fd != -1) - if (tcsetattr(orig_termios_fd, TCSANOW, &orig_termios)) - err = -errno; - - uv_spinlock_unlock(&termios_spinlock); - errno = saved_errno; - - return err; -} diff --git a/outside/libuv-v1.7.5/src/unix/udp.c b/outside/libuv-v1.7.5/src/unix/udp.c deleted file mode 100644 index 66ecc4e34..000000000 --- a/outside/libuv-v1.7.5/src/unix/udp.c +++ /dev/null @@ -1,871 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "internal.h" - -#include -#include -#include -#include -#include - -#if defined(IPV6_JOIN_GROUP) && !defined(IPV6_ADD_MEMBERSHIP) -# define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP -#endif - -#if defined(IPV6_LEAVE_GROUP) && !defined(IPV6_DROP_MEMBERSHIP) -# define IPV6_DROP_MEMBERSHIP IPV6_LEAVE_GROUP -#endif - - -static void uv__udp_run_completed(uv_udp_t* handle); -static void uv__udp_io(uv_loop_t* loop, uv__io_t* w, unsigned int revents); -static void uv__udp_recvmsg(uv_udp_t* handle); -static void uv__udp_sendmsg(uv_udp_t* handle); -static int uv__udp_maybe_deferred_bind(uv_udp_t* handle, - int domain, - unsigned int flags); - - -void uv__udp_close(uv_udp_t* handle) { - uv__io_close(handle->loop, &handle->io_watcher); - uv__handle_stop(handle); - - if (handle->io_watcher.fd != -1) { - uv__close(handle->io_watcher.fd); - handle->io_watcher.fd = -1; - } -} - - -void uv__udp_finish_close(uv_udp_t* handle) { - uv_udp_send_t* req; - QUEUE* q; - - assert(!uv__io_active(&handle->io_watcher, UV__POLLIN | UV__POLLOUT)); - assert(handle->io_watcher.fd == -1); - - while (!QUEUE_EMPTY(&handle->write_queue)) { - q = QUEUE_HEAD(&handle->write_queue); - QUEUE_REMOVE(q); - - req = QUEUE_DATA(q, uv_udp_send_t, queue); - req->status = -ECANCELED; - QUEUE_INSERT_TAIL(&handle->write_completed_queue, &req->queue); - } - - uv__udp_run_completed(handle); - - assert(handle->send_queue_size == 0); - assert(handle->send_queue_count == 0); - - /* Now tear down the handle. */ - handle->recv_cb = NULL; - handle->alloc_cb = NULL; - /* but _do not_ touch close_cb */ -} - - -static void uv__udp_run_completed(uv_udp_t* handle) { - uv_udp_send_t* req; - QUEUE* q; - - assert(!(handle->flags & UV_UDP_PROCESSING)); - handle->flags |= UV_UDP_PROCESSING; - - while (!QUEUE_EMPTY(&handle->write_completed_queue)) { - q = QUEUE_HEAD(&handle->write_completed_queue); - QUEUE_REMOVE(q); - - req = QUEUE_DATA(q, uv_udp_send_t, queue); - uv__req_unregister(handle->loop, req); - - handle->send_queue_size -= uv__count_bufs(req->bufs, req->nbufs); - handle->send_queue_count--; - - if (req->bufs != req->bufsml) - uv__free(req->bufs); - req->bufs = NULL; - - if (req->send_cb == NULL) - continue; - - /* req->status >= 0 == bytes written - * req->status < 0 == errno - */ - if (req->status >= 0) - req->send_cb(req, 0); - else - req->send_cb(req, req->status); - } - - if (QUEUE_EMPTY(&handle->write_queue)) { - /* Pending queue and completion queue empty, stop watcher. */ - uv__io_stop(handle->loop, &handle->io_watcher, UV__POLLOUT); - if (!uv__io_active(&handle->io_watcher, UV__POLLIN)) - uv__handle_stop(handle); - } - - handle->flags &= ~UV_UDP_PROCESSING; -} - - -static void uv__udp_io(uv_loop_t* loop, uv__io_t* w, unsigned int revents) { - uv_udp_t* handle; - - handle = container_of(w, uv_udp_t, io_watcher); - assert(handle->type == UV_UDP); - - if (revents & UV__POLLIN) - uv__udp_recvmsg(handle); - - if (revents & UV__POLLOUT) { - uv__udp_sendmsg(handle); - uv__udp_run_completed(handle); - } -} - - -static void uv__udp_recvmsg(uv_udp_t* handle) { - struct sockaddr_storage peer; - struct msghdr h; - ssize_t nread; - uv_buf_t buf; - int flags; - int count; - - assert(handle->recv_cb != NULL); - assert(handle->alloc_cb != NULL); - - /* Prevent loop starvation when the data comes in as fast as (or faster than) - * we can read it. XXX Need to rearm fd if we switch to edge-triggered I/O. - */ - count = 32; - - memset(&h, 0, sizeof(h)); - h.msg_name = &peer; - - do { - handle->alloc_cb((uv_handle_t*) handle, 64 * 1024, &buf); - if (buf.len == 0) { - handle->recv_cb(handle, UV_ENOBUFS, &buf, NULL, 0); - return; - } - assert(buf.base != NULL); - - h.msg_namelen = sizeof(peer); - h.msg_iov = (void*) &buf; - h.msg_iovlen = 1; - - do { - nread = recvmsg(handle->io_watcher.fd, &h, 0); - } - while (nread == -1 && errno == EINTR); - - if (nread == -1) { - if (errno == EAGAIN || errno == EWOULDBLOCK) - handle->recv_cb(handle, 0, &buf, NULL, 0); - else - handle->recv_cb(handle, -errno, &buf, NULL, 0); - } - else { - const struct sockaddr *addr; - if (h.msg_namelen == 0) - addr = NULL; - else - addr = (const struct sockaddr*) &peer; - - flags = 0; - if (h.msg_flags & MSG_TRUNC) - flags |= UV_UDP_PARTIAL; - - handle->recv_cb(handle, nread, &buf, addr, flags); - } - } - /* recv_cb callback may decide to pause or close the handle */ - while (nread != -1 - && count-- > 0 - && handle->io_watcher.fd != -1 - && handle->recv_cb != NULL); -} - - -static void uv__udp_sendmsg(uv_udp_t* handle) { - uv_udp_send_t* req; - QUEUE* q; - struct msghdr h; - ssize_t size; - - while (!QUEUE_EMPTY(&handle->write_queue)) { - q = QUEUE_HEAD(&handle->write_queue); - assert(q != NULL); - - req = QUEUE_DATA(q, uv_udp_send_t, queue); - assert(req != NULL); - - memset(&h, 0, sizeof h); - h.msg_name = &req->addr; - h.msg_namelen = (req->addr.ss_family == AF_INET6 ? - sizeof(struct sockaddr_in6) : sizeof(struct sockaddr_in)); - h.msg_iov = (struct iovec*) req->bufs; - h.msg_iovlen = req->nbufs; - - do { - size = sendmsg(handle->io_watcher.fd, &h, 0); - } while (size == -1 && errno == EINTR); - - if (size == -1 && (errno == EAGAIN || errno == EWOULDBLOCK)) - break; - - req->status = (size == -1 ? -errno : size); - - /* Sending a datagram is an atomic operation: either all data - * is written or nothing is (and EMSGSIZE is raised). That is - * why we don't handle partial writes. Just pop the request - * off the write queue and onto the completed queue, done. - */ - QUEUE_REMOVE(&req->queue); - QUEUE_INSERT_TAIL(&handle->write_completed_queue, &req->queue); - uv__io_feed(handle->loop, &handle->io_watcher); - } -} - - -/* On the BSDs, SO_REUSEPORT implies SO_REUSEADDR but with some additional - * refinements for programs that use multicast. - * - * Linux as of 3.9 has a SO_REUSEPORT socket option but with semantics that - * are different from the BSDs: it _shares_ the port rather than steal it - * from the current listener. While useful, it's not something we can emulate - * on other platforms so we don't enable it. - */ -static int uv__set_reuse(int fd) { - int yes; - -#if defined(SO_REUSEPORT) && !defined(__linux__) - yes = 1; - if (setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &yes, sizeof(yes))) - return -errno; -#else - yes = 1; - if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(yes))) - return -errno; -#endif - - return 0; -} - - -int uv__udp_bind(uv_udp_t* handle, - const struct sockaddr* addr, - unsigned int addrlen, - unsigned int flags) { - int err; - int yes; - int fd; - - /* Check for bad flags. */ - if (flags & ~(UV_UDP_IPV6ONLY | UV_UDP_REUSEADDR)) - return -EINVAL; - - /* Cannot set IPv6-only mode on non-IPv6 socket. */ - if ((flags & UV_UDP_IPV6ONLY) && addr->sa_family != AF_INET6) - return -EINVAL; - - fd = handle->io_watcher.fd; - if (fd == -1) { - err = uv__socket(addr->sa_family, SOCK_DGRAM, 0); - if (err < 0) - return err; - fd = err; - handle->io_watcher.fd = fd; - } - - if (flags & UV_UDP_REUSEADDR) { - err = uv__set_reuse(fd); - if (err) - goto out; - } - - if (flags & UV_UDP_IPV6ONLY) { -#ifdef IPV6_V6ONLY - yes = 1; - if (setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, &yes, sizeof yes) == -1) { - err = -errno; - goto out; - } -#else - err = -ENOTSUP; - goto out; -#endif - } - - if (bind(fd, addr, addrlen)) { - err = -errno; - if (errno == EAFNOSUPPORT) - /* OSX, other BSDs and SunoS fail with EAFNOSUPPORT when binding a - * socket created with AF_INET to an AF_INET6 address or vice versa. */ - err = -EINVAL; - goto out; - } - - if (addr->sa_family == AF_INET6) - handle->flags |= UV_HANDLE_IPV6; - - return 0; - -out: - uv__close(handle->io_watcher.fd); - handle->io_watcher.fd = -1; - return err; -} - - -static int uv__udp_maybe_deferred_bind(uv_udp_t* handle, - int domain, - unsigned int flags) { - unsigned char taddr[sizeof(struct sockaddr_in6)]; - socklen_t addrlen; - - if (handle->io_watcher.fd != -1) - return 0; - - switch (domain) { - case AF_INET: - { - struct sockaddr_in* addr = (void*)&taddr; - memset(addr, 0, sizeof *addr); - addr->sin_family = AF_INET; - addr->sin_addr.s_addr = INADDR_ANY; - addrlen = sizeof *addr; - break; - } - case AF_INET6: - { - struct sockaddr_in6* addr = (void*)&taddr; - memset(addr, 0, sizeof *addr); - addr->sin6_family = AF_INET6; - addr->sin6_addr = in6addr_any; - addrlen = sizeof *addr; - break; - } - default: - assert(0 && "unsupported address family"); - abort(); - } - - return uv__udp_bind(handle, (const struct sockaddr*) &taddr, addrlen, flags); -} - - -int uv__udp_send(uv_udp_send_t* req, - uv_udp_t* handle, - const uv_buf_t bufs[], - unsigned int nbufs, - const struct sockaddr* addr, - unsigned int addrlen, - uv_udp_send_cb send_cb) { - int err; - int empty_queue; - - assert(nbufs > 0); - - err = uv__udp_maybe_deferred_bind(handle, addr->sa_family, 0); - if (err) - return err; - - /* It's legal for send_queue_count > 0 even when the write_queue is empty; - * it means there are error-state requests in the write_completed_queue that - * will touch up send_queue_size/count later. - */ - empty_queue = (handle->send_queue_count == 0); - - uv__req_init(handle->loop, req, UV_UDP_SEND); - assert(addrlen <= sizeof(req->addr)); - memcpy(&req->addr, addr, addrlen); - req->send_cb = send_cb; - req->handle = handle; - req->nbufs = nbufs; - - req->bufs = req->bufsml; - if (nbufs > ARRAY_SIZE(req->bufsml)) - req->bufs = uv__malloc(nbufs * sizeof(bufs[0])); - - if (req->bufs == NULL) - return -ENOMEM; - - memcpy(req->bufs, bufs, nbufs * sizeof(bufs[0])); - handle->send_queue_size += uv__count_bufs(req->bufs, req->nbufs); - handle->send_queue_count++; - QUEUE_INSERT_TAIL(&handle->write_queue, &req->queue); - uv__handle_start(handle); - - if (empty_queue && !(handle->flags & UV_UDP_PROCESSING)) { - uv__udp_sendmsg(handle); - } else { - uv__io_start(handle->loop, &handle->io_watcher, UV__POLLOUT); - } - - return 0; -} - - -int uv__udp_try_send(uv_udp_t* handle, - const uv_buf_t bufs[], - unsigned int nbufs, - const struct sockaddr* addr, - unsigned int addrlen) { - int err; - struct msghdr h; - ssize_t size; - - assert(nbufs > 0); - - /* already sending a message */ - if (handle->send_queue_count != 0) - return -EAGAIN; - - err = uv__udp_maybe_deferred_bind(handle, addr->sa_family, 0); - if (err) - return err; - - memset(&h, 0, sizeof h); - h.msg_name = (struct sockaddr*) addr; - h.msg_namelen = addrlen; - h.msg_iov = (struct iovec*) bufs; - h.msg_iovlen = nbufs; - - do { - size = sendmsg(handle->io_watcher.fd, &h, 0); - } while (size == -1 && errno == EINTR); - - if (size == -1) { - if (errno == EAGAIN || errno == EWOULDBLOCK) - return -EAGAIN; - else - return -errno; - } - - return size; -} - - -static int uv__udp_set_membership4(uv_udp_t* handle, - const struct sockaddr_in* multicast_addr, - const char* interface_addr, - uv_membership membership) { - struct ip_mreq mreq; - int optname; - int err; - - memset(&mreq, 0, sizeof mreq); - - if (interface_addr) { - err = uv_inet_pton(AF_INET, interface_addr, &mreq.imr_interface.s_addr); - if (err) - return err; - } else { - mreq.imr_interface.s_addr = htonl(INADDR_ANY); - } - - mreq.imr_multiaddr.s_addr = multicast_addr->sin_addr.s_addr; - - switch (membership) { - case UV_JOIN_GROUP: - optname = IP_ADD_MEMBERSHIP; - break; - case UV_LEAVE_GROUP: - optname = IP_DROP_MEMBERSHIP; - break; - default: - return -EINVAL; - } - - if (setsockopt(handle->io_watcher.fd, - IPPROTO_IP, - optname, - &mreq, - sizeof(mreq))) { - return -errno; - } - - return 0; -} - - -static int uv__udp_set_membership6(uv_udp_t* handle, - const struct sockaddr_in6* multicast_addr, - const char* interface_addr, - uv_membership membership) { - int optname; - struct ipv6_mreq mreq; - struct sockaddr_in6 addr6; - - memset(&mreq, 0, sizeof mreq); - - if (interface_addr) { - if (uv_ip6_addr(interface_addr, 0, &addr6)) - return -EINVAL; - mreq.ipv6mr_interface = addr6.sin6_scope_id; - } else { - mreq.ipv6mr_interface = 0; - } - - mreq.ipv6mr_multiaddr = multicast_addr->sin6_addr; - - switch (membership) { - case UV_JOIN_GROUP: - optname = IPV6_ADD_MEMBERSHIP; - break; - case UV_LEAVE_GROUP: - optname = IPV6_DROP_MEMBERSHIP; - break; - default: - return -EINVAL; - } - - if (setsockopt(handle->io_watcher.fd, - IPPROTO_IPV6, - optname, - &mreq, - sizeof(mreq))) { - return -errno; - } - - return 0; -} - - -int uv_udp_init_ex(uv_loop_t* loop, uv_udp_t* handle, unsigned int flags) { - int domain; - int err; - int fd; - - /* Use the lower 8 bits for the domain */ - domain = flags & 0xFF; - if (domain != AF_INET && domain != AF_INET6 && domain != AF_UNSPEC) - return -EINVAL; - - if (flags & ~0xFF) - return -EINVAL; - - if (domain != AF_UNSPEC) { - err = uv__socket(domain, SOCK_DGRAM, 0); - if (err < 0) - return err; - fd = err; - } else { - fd = -1; - } - - uv__handle_init(loop, (uv_handle_t*)handle, UV_UDP); - handle->alloc_cb = NULL; - handle->recv_cb = NULL; - handle->send_queue_size = 0; - handle->send_queue_count = 0; - uv__io_init(&handle->io_watcher, uv__udp_io, fd); - QUEUE_INIT(&handle->write_queue); - QUEUE_INIT(&handle->write_completed_queue); - return 0; -} - - -int uv_udp_init(uv_loop_t* loop, uv_udp_t* handle) { - return uv_udp_init_ex(loop, handle, AF_UNSPEC); -} - - -int uv_udp_open(uv_udp_t* handle, uv_os_sock_t sock) { - int err; - - /* Check for already active socket. */ - if (handle->io_watcher.fd != -1) - return -EBUSY; - - err = uv__nonblock(sock, 1); - if (err) - return err; - - err = uv__set_reuse(sock); - if (err) - return err; - - handle->io_watcher.fd = sock; - return 0; -} - - -int uv_udp_set_membership(uv_udp_t* handle, - const char* multicast_addr, - const char* interface_addr, - uv_membership membership) { - int err; - struct sockaddr_in addr4; - struct sockaddr_in6 addr6; - - if (uv_ip4_addr(multicast_addr, 0, &addr4) == 0) { - err = uv__udp_maybe_deferred_bind(handle, AF_INET, UV_UDP_REUSEADDR); - if (err) - return err; - return uv__udp_set_membership4(handle, &addr4, interface_addr, membership); - } else if (uv_ip6_addr(multicast_addr, 0, &addr6) == 0) { - err = uv__udp_maybe_deferred_bind(handle, AF_INET6, UV_UDP_REUSEADDR); - if (err) - return err; - return uv__udp_set_membership6(handle, &addr6, interface_addr, membership); - } else { - return -EINVAL; - } -} - -static int uv__setsockopt(uv_udp_t* handle, - int option4, - int option6, - const void* val, - size_t size) { - int r; - - if (handle->flags & UV_HANDLE_IPV6) - r = setsockopt(handle->io_watcher.fd, - IPPROTO_IPV6, - option6, - val, - size); - else - r = setsockopt(handle->io_watcher.fd, - IPPROTO_IP, - option4, - val, - size); - if (r) - return -errno; - - return 0; -} - -static int uv__setsockopt_maybe_char(uv_udp_t* handle, - int option4, - int option6, - int val) { -#if defined(__sun) || defined(_AIX) - char arg = val; -#elif defined(__OpenBSD__) - unsigned char arg = val; -#else - int arg = val; -#endif - - if (val < 0 || val > 255) - return -EINVAL; - - return uv__setsockopt(handle, option4, option6, &arg, sizeof(arg)); -} - - -int uv_udp_set_broadcast(uv_udp_t* handle, int on) { - if (setsockopt(handle->io_watcher.fd, - SOL_SOCKET, - SO_BROADCAST, - &on, - sizeof(on))) { - return -errno; - } - - return 0; -} - - -int uv_udp_set_ttl(uv_udp_t* handle, int ttl) { - if (ttl < 1 || ttl > 255) - return -EINVAL; - -/* - * On Solaris and derivatives such as SmartOS, the length of socket options - * is sizeof(int) for IP_TTL and IPV6_UNICAST_HOPS, - * so hardcode the size of these options on this platform, - * and use the general uv__setsockopt_maybe_char call on other platforms. - */ -#if defined(__sun) || defined(_AIX) || defined(__OpenBSD__) - return uv__setsockopt(handle, - IP_TTL, - IPV6_UNICAST_HOPS, - &ttl, - sizeof(ttl)); -#endif /* defined(__sun) || defined(_AIX) || defined (__OpenBSD__) */ - - return uv__setsockopt_maybe_char(handle, - IP_TTL, - IPV6_UNICAST_HOPS, - ttl); -} - - -int uv_udp_set_multicast_ttl(uv_udp_t* handle, int ttl) { -/* - * On Solaris and derivatives such as SmartOS, the length of socket options - * is sizeof(int) for IPV6_MULTICAST_HOPS and sizeof(char) for - * IP_MULTICAST_TTL, so hardcode the size of the option in the IPv6 case, - * and use the general uv__setsockopt_maybe_char call otherwise. - */ -#if defined(__sun) || defined(_AIX) - if (handle->flags & UV_HANDLE_IPV6) - return uv__setsockopt(handle, - IP_MULTICAST_TTL, - IPV6_MULTICAST_HOPS, - &ttl, - sizeof(ttl)); -#endif /* defined(__sun) || defined(_AIX) */ - - return uv__setsockopt_maybe_char(handle, - IP_MULTICAST_TTL, - IPV6_MULTICAST_HOPS, - ttl); -} - - -int uv_udp_set_multicast_loop(uv_udp_t* handle, int on) { -/* - * On Solaris and derivatives such as SmartOS, the length of socket options - * is sizeof(int) for IPV6_MULTICAST_LOOP and sizeof(char) for - * IP_MULTICAST_LOOP, so hardcode the size of the option in the IPv6 case, - * and use the general uv__setsockopt_maybe_char call otherwise. - */ -#if defined(__sun) || defined(_AIX) - if (handle->flags & UV_HANDLE_IPV6) - return uv__setsockopt(handle, - IP_MULTICAST_LOOP, - IPV6_MULTICAST_LOOP, - &on, - sizeof(on)); -#endif /* defined(__sun) || defined(_AIX) */ - - return uv__setsockopt_maybe_char(handle, - IP_MULTICAST_LOOP, - IPV6_MULTICAST_LOOP, - on); -} - -int uv_udp_set_multicast_interface(uv_udp_t* handle, const char* interface_addr) { - struct sockaddr_storage addr_st; - struct sockaddr_in* addr4; - struct sockaddr_in6* addr6; - - addr4 = (struct sockaddr_in*) &addr_st; - addr6 = (struct sockaddr_in6*) &addr_st; - - if (!interface_addr) { - memset(&addr_st, 0, sizeof addr_st); - if (handle->flags & UV_HANDLE_IPV6) { - addr_st.ss_family = AF_INET6; - addr6->sin6_scope_id = 0; - } else { - addr_st.ss_family = AF_INET; - addr4->sin_addr.s_addr = htonl(INADDR_ANY); - } - } else if (uv_ip4_addr(interface_addr, 0, addr4) == 0) { - /* nothing, address was parsed */ - } else if (uv_ip6_addr(interface_addr, 0, addr6) == 0) { - /* nothing, address was parsed */ - } else { - return -EINVAL; - } - - if (addr_st.ss_family == AF_INET) { - if (setsockopt(handle->io_watcher.fd, - IPPROTO_IP, - IP_MULTICAST_IF, - (void*) &addr4->sin_addr, - sizeof(addr4->sin_addr)) == -1) { - return -errno; - } - } else if (addr_st.ss_family == AF_INET6) { - if (setsockopt(handle->io_watcher.fd, - IPPROTO_IPV6, - IPV6_MULTICAST_IF, - &addr6->sin6_scope_id, - sizeof(addr6->sin6_scope_id)) == -1) { - return -errno; - } - } else { - assert(0 && "unexpected address family"); - abort(); - } - - return 0; -} - - -int uv_udp_getsockname(const uv_udp_t* handle, - struct sockaddr* name, - int* namelen) { - socklen_t socklen; - - if (handle->io_watcher.fd == -1) - return -EINVAL; /* FIXME(bnoordhuis) -EBADF */ - - /* sizeof(socklen_t) != sizeof(int) on some systems. */ - socklen = (socklen_t) *namelen; - - if (getsockname(handle->io_watcher.fd, name, &socklen)) - return -errno; - - *namelen = (int) socklen; - return 0; -} - - -int uv__udp_recv_start(uv_udp_t* handle, - uv_alloc_cb alloc_cb, - uv_udp_recv_cb recv_cb) { - int err; - - if (alloc_cb == NULL || recv_cb == NULL) - return -EINVAL; - - if (uv__io_active(&handle->io_watcher, UV__POLLIN)) - return -EALREADY; /* FIXME(bnoordhuis) Should be -EBUSY. */ - - err = uv__udp_maybe_deferred_bind(handle, AF_INET, 0); - if (err) - return err; - - handle->alloc_cb = alloc_cb; - handle->recv_cb = recv_cb; - - uv__io_start(handle->loop, &handle->io_watcher, UV__POLLIN); - uv__handle_start(handle); - - return 0; -} - - -int uv__udp_recv_stop(uv_udp_t* handle) { - uv__io_stop(handle->loop, &handle->io_watcher, UV__POLLIN); - - if (!uv__io_active(&handle->io_watcher, UV__POLLOUT)) - uv__handle_stop(handle); - - handle->alloc_cb = NULL; - handle->recv_cb = NULL; - - return 0; -} diff --git a/outside/libuv-v1.7.5/src/uv-common.c b/outside/libuv-v1.7.5/src/uv-common.c deleted file mode 100644 index 675a776bf..000000000 --- a/outside/libuv-v1.7.5/src/uv-common.c +++ /dev/null @@ -1,626 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "uv-common.h" - -#include -#include -#include -#include /* NULL */ -#include /* malloc */ -#include /* memset */ - -#if defined(_WIN32) -# include /* malloc */ -#else -# include /* if_nametoindex */ -#endif - - -typedef struct { - uv_malloc_func local_malloc; - uv_realloc_func local_realloc; - uv_calloc_func local_calloc; - uv_free_func local_free; -} uv__allocator_t; - -static uv__allocator_t uv__allocator = { - malloc, - realloc, - calloc, - free, -}; - -char* uv__strdup(const char* s) { - size_t len = strlen(s) + 1; - char* m = uv__malloc(len); - if (m == NULL) - return NULL; - return memcpy(m, s, len); -} - -char* uv__strndup(const char* s, size_t n) { - char* m; - size_t len = strlen(s); - if (n < len) - len = n; - m = uv__malloc(len + 1); - if (m == NULL) - return NULL; - m[len] = '\0'; - return memcpy(m, s, len); -} - -void* uv__malloc(size_t size) { - return uv__allocator.local_malloc(size); -} - -void uv__free(void* ptr) { - uv__allocator.local_free(ptr); -} - -void* uv__calloc(size_t count, size_t size) { - return uv__allocator.local_calloc(count, size); -} - -void* uv__realloc(void* ptr, size_t size) { - return uv__allocator.local_realloc(ptr, size); -} - -int uv_replace_allocator(uv_malloc_func malloc_func, - uv_realloc_func realloc_func, - uv_calloc_func calloc_func, - uv_free_func free_func) { - if (malloc_func == NULL || realloc_func == NULL || - calloc_func == NULL || free_func == NULL) { - return UV_EINVAL; - } - - uv__allocator.local_malloc = malloc_func; - uv__allocator.local_realloc = realloc_func; - uv__allocator.local_calloc = calloc_func; - uv__allocator.local_free = free_func; - - return 0; -} - -#define XX(uc, lc) case UV_##uc: return sizeof(uv_##lc##_t); - -size_t uv_handle_size(uv_handle_type type) { - switch (type) { - UV_HANDLE_TYPE_MAP(XX) - default: - return -1; - } -} - -size_t uv_req_size(uv_req_type type) { - switch(type) { - UV_REQ_TYPE_MAP(XX) - default: - return -1; - } -} - -#undef XX - - -size_t uv_loop_size(void) { - return sizeof(uv_loop_t); -} - - -uv_buf_t uv_buf_init(char* base, unsigned int len) { - uv_buf_t buf; - buf.base = base; - buf.len = len; - return buf; -} - - -static const char* uv__unknown_err_code(int err) { - char buf[32]; - char* copy; - -#ifndef _WIN32 - snprintf(buf, sizeof(buf), "Unknown system error %d", err); -#else - _snprintf(buf, sizeof(buf), "Unknown system error %d", err); -#endif - copy = uv__strdup(buf); - - return copy != NULL ? copy : "Unknown system error"; -} - - -#define UV_ERR_NAME_GEN(name, _) case UV_ ## name: return #name; -const char* uv_err_name(int err) { - switch (err) { - UV_ERRNO_MAP(UV_ERR_NAME_GEN) - } - return uv__unknown_err_code(err); -} -#undef UV_ERR_NAME_GEN - - -#define UV_STRERROR_GEN(name, msg) case UV_ ## name: return msg; -const char* uv_strerror(int err) { - switch (err) { - UV_ERRNO_MAP(UV_STRERROR_GEN) - } - return uv__unknown_err_code(err); -} -#undef UV_STRERROR_GEN - - -int uv_ip4_addr(const char* ip, int port, struct sockaddr_in* addr) { - memset(addr, 0, sizeof(*addr)); - addr->sin_family = AF_INET; - addr->sin_port = htons(port); - return uv_inet_pton(AF_INET, ip, &(addr->sin_addr.s_addr)); -} - - -int uv_ip6_addr(const char* ip, int port, struct sockaddr_in6* addr) { - char address_part[40]; - size_t address_part_size; - const char* zone_index; - - memset(addr, 0, sizeof(*addr)); - addr->sin6_family = AF_INET6; - addr->sin6_port = htons(port); - - zone_index = strchr(ip, '%'); - if (zone_index != NULL) { - address_part_size = zone_index - ip; - if (address_part_size >= sizeof(address_part)) - address_part_size = sizeof(address_part) - 1; - - memcpy(address_part, ip, address_part_size); - address_part[address_part_size] = '\0'; - ip = address_part; - - zone_index++; /* skip '%' */ - /* NOTE: unknown interface (id=0) is silently ignored */ -#ifdef _WIN32 - addr->sin6_scope_id = atoi(zone_index); -#else - addr->sin6_scope_id = if_nametoindex(zone_index); -#endif - } - - return uv_inet_pton(AF_INET6, ip, &addr->sin6_addr); -} - - -int uv_ip4_name(const struct sockaddr_in* src, char* dst, size_t size) { - return uv_inet_ntop(AF_INET, &src->sin_addr, dst, size); -} - - -int uv_ip6_name(const struct sockaddr_in6* src, char* dst, size_t size) { - return uv_inet_ntop(AF_INET6, &src->sin6_addr, dst, size); -} - - -int uv_tcp_bind(uv_tcp_t* handle, - const struct sockaddr* addr, - unsigned int flags) { - unsigned int addrlen; - - if (handle->type != UV_TCP) - return UV_EINVAL; - - if (addr->sa_family == AF_INET) - addrlen = sizeof(struct sockaddr_in); - else if (addr->sa_family == AF_INET6) - addrlen = sizeof(struct sockaddr_in6); - else - return UV_EINVAL; - - return uv__tcp_bind(handle, addr, addrlen, flags); -} - - -int uv_udp_bind(uv_udp_t* handle, - const struct sockaddr* addr, - unsigned int flags) { - unsigned int addrlen; - - if (handle->type != UV_UDP) - return UV_EINVAL; - - if (addr->sa_family == AF_INET) - addrlen = sizeof(struct sockaddr_in); - else if (addr->sa_family == AF_INET6) - addrlen = sizeof(struct sockaddr_in6); - else - return UV_EINVAL; - - return uv__udp_bind(handle, addr, addrlen, flags); -} - - -int uv_tcp_connect(uv_connect_t* req, - uv_tcp_t* handle, - const struct sockaddr* addr, - uv_connect_cb cb) { - unsigned int addrlen; - - if (handle->type != UV_TCP) - return UV_EINVAL; - - if (addr->sa_family == AF_INET) - addrlen = sizeof(struct sockaddr_in); - else if (addr->sa_family == AF_INET6) - addrlen = sizeof(struct sockaddr_in6); - else - return UV_EINVAL; - - return uv__tcp_connect(req, handle, addr, addrlen, cb); -} - - -int uv_udp_send(uv_udp_send_t* req, - uv_udp_t* handle, - const uv_buf_t bufs[], - unsigned int nbufs, - const struct sockaddr* addr, - uv_udp_send_cb send_cb) { - unsigned int addrlen; - - if (handle->type != UV_UDP) - return UV_EINVAL; - - if (addr->sa_family == AF_INET) - addrlen = sizeof(struct sockaddr_in); - else if (addr->sa_family == AF_INET6) - addrlen = sizeof(struct sockaddr_in6); - else - return UV_EINVAL; - - return uv__udp_send(req, handle, bufs, nbufs, addr, addrlen, send_cb); -} - - -int uv_udp_try_send(uv_udp_t* handle, - const uv_buf_t bufs[], - unsigned int nbufs, - const struct sockaddr* addr) { - unsigned int addrlen; - - if (handle->type != UV_UDP) - return UV_EINVAL; - - if (addr->sa_family == AF_INET) - addrlen = sizeof(struct sockaddr_in); - else if (addr->sa_family == AF_INET6) - addrlen = sizeof(struct sockaddr_in6); - else - return UV_EINVAL; - - return uv__udp_try_send(handle, bufs, nbufs, addr, addrlen); -} - - -int uv_udp_recv_start(uv_udp_t* handle, - uv_alloc_cb alloc_cb, - uv_udp_recv_cb recv_cb) { - if (handle->type != UV_UDP || alloc_cb == NULL || recv_cb == NULL) - return UV_EINVAL; - else - return uv__udp_recv_start(handle, alloc_cb, recv_cb); -} - - -int uv_udp_recv_stop(uv_udp_t* handle) { - if (handle->type != UV_UDP) - return UV_EINVAL; - else - return uv__udp_recv_stop(handle); -} - - -void uv_walk(uv_loop_t* loop, uv_walk_cb walk_cb, void* arg) { - QUEUE* q; - uv_handle_t* h; - - QUEUE_FOREACH(q, &loop->handle_queue) { - h = QUEUE_DATA(q, uv_handle_t, handle_queue); - if (h->flags & UV__HANDLE_INTERNAL) continue; - walk_cb(h, arg); - } -} - - -#ifndef NDEBUG -static void uv__print_handles(uv_loop_t* loop, int only_active) { - const char* type; - QUEUE* q; - uv_handle_t* h; - - if (loop == NULL) - loop = uv_default_loop(); - - QUEUE_FOREACH(q, &loop->handle_queue) { - h = QUEUE_DATA(q, uv_handle_t, handle_queue); - - if (only_active && !uv__is_active(h)) - continue; - - switch (h->type) { -#define X(uc, lc) case UV_##uc: type = #lc; break; - UV_HANDLE_TYPE_MAP(X) -#undef X - default: type = ""; - } - - fprintf(stderr, - "[%c%c%c] %-8s %p\n", - "R-"[!(h->flags & UV__HANDLE_REF)], - "A-"[!(h->flags & UV__HANDLE_ACTIVE)], - "I-"[!(h->flags & UV__HANDLE_INTERNAL)], - type, - (void*)h); - } -} - - -void uv_print_all_handles(uv_loop_t* loop) { - uv__print_handles(loop, 0); -} - - -void uv_print_active_handles(uv_loop_t* loop) { - uv__print_handles(loop, 1); -} -#endif - - -void uv_ref(uv_handle_t* handle) { - uv__handle_ref(handle); -} - - -void uv_unref(uv_handle_t* handle) { - uv__handle_unref(handle); -} - - -int uv_has_ref(const uv_handle_t* handle) { - return uv__has_ref(handle); -} - - -void uv_stop(uv_loop_t* loop) { - loop->stop_flag = 1; -} - - -uint64_t uv_now(const uv_loop_t* loop) { - return loop->time; -} - - - -size_t uv__count_bufs(const uv_buf_t bufs[], unsigned int nbufs) { - unsigned int i; - size_t bytes; - - bytes = 0; - for (i = 0; i < nbufs; i++) - bytes += (size_t) bufs[i].len; - - return bytes; -} - -int uv_recv_buffer_size(uv_handle_t* handle, int* value) { - return uv__socket_sockopt(handle, SO_RCVBUF, value); -} - -int uv_send_buffer_size(uv_handle_t* handle, int *value) { - return uv__socket_sockopt(handle, SO_SNDBUF, value); -} - -int uv_fs_event_getpath(uv_fs_event_t* handle, char* buffer, size_t* size) { - size_t required_len; - - if (!uv__is_active(handle)) { - *size = 0; - return UV_EINVAL; - } - - required_len = strlen(handle->path); - if (required_len > *size) { - *size = required_len; - return UV_ENOBUFS; - } - - memcpy(buffer, handle->path, required_len); - *size = required_len; - - return 0; -} - -/* The windows implementation does not have the same structure layout as - * the unix implementation (nbufs is not directly inside req but is - * contained in a nested union/struct) so this function locates it. -*/ -static unsigned int* uv__get_nbufs(uv_fs_t* req) { -#ifdef _WIN32 - return &req->fs.info.nbufs; -#else - return &req->nbufs; -#endif -} - -void uv__fs_scandir_cleanup(uv_fs_t* req) { - uv__dirent_t** dents; - - unsigned int* nbufs = uv__get_nbufs(req); - - dents = req->ptr; - if (*nbufs > 0 && *nbufs != (unsigned int) req->result) - (*nbufs)--; - for (; *nbufs < (unsigned int) req->result; (*nbufs)++) - uv__free(dents[*nbufs]); -} - - -int uv_fs_scandir_next(uv_fs_t* req, uv_dirent_t* ent) { - uv__dirent_t** dents; - uv__dirent_t* dent; - - unsigned int* nbufs = uv__get_nbufs(req); - - dents = req->ptr; - - /* Free previous entity */ - if (*nbufs > 0) - uv__free(dents[*nbufs - 1]); - - /* End was already reached */ - if (*nbufs == (unsigned int) req->result) { - uv__free(dents); - req->ptr = NULL; - return UV_EOF; - } - - dent = dents[(*nbufs)++]; - - ent->name = dent->d_name; -#ifdef HAVE_DIRENT_TYPES - switch (dent->d_type) { - case UV__DT_DIR: - ent->type = UV_DIRENT_DIR; - break; - case UV__DT_FILE: - ent->type = UV_DIRENT_FILE; - break; - case UV__DT_LINK: - ent->type = UV_DIRENT_LINK; - break; - case UV__DT_FIFO: - ent->type = UV_DIRENT_FIFO; - break; - case UV__DT_SOCKET: - ent->type = UV_DIRENT_SOCKET; - break; - case UV__DT_CHAR: - ent->type = UV_DIRENT_CHAR; - break; - case UV__DT_BLOCK: - ent->type = UV_DIRENT_BLOCK; - break; - default: - ent->type = UV_DIRENT_UNKNOWN; - } -#else - ent->type = UV_DIRENT_UNKNOWN; -#endif - - return 0; -} - - -int uv_loop_configure(uv_loop_t* loop, uv_loop_option option, ...) { - va_list ap; - int err; - - va_start(ap, option); - /* Any platform-agnostic options should be handled here. */ - err = uv__loop_configure(loop, option, ap); - va_end(ap); - - return err; -} - - -static uv_loop_t default_loop_struct; -static uv_loop_t* default_loop_ptr; - - -uv_loop_t* uv_default_loop(void) { - if (default_loop_ptr != NULL) - return default_loop_ptr; - - if (uv_loop_init(&default_loop_struct)) - return NULL; - - default_loop_ptr = &default_loop_struct; - return default_loop_ptr; -} - - -uv_loop_t* uv_loop_new(void) { - uv_loop_t* loop; - - loop = uv__malloc(sizeof(*loop)); - if (loop == NULL) - return NULL; - - if (uv_loop_init(loop)) { - uv__free(loop); - return NULL; - } - - return loop; -} - - -int uv_loop_close(uv_loop_t* loop) { - QUEUE* q; - uv_handle_t* h; - - if (!QUEUE_EMPTY(&(loop)->active_reqs)) - return UV_EBUSY; - - QUEUE_FOREACH(q, &loop->handle_queue) { - h = QUEUE_DATA(q, uv_handle_t, handle_queue); - if (!(h->flags & UV__HANDLE_INTERNAL)) - return UV_EBUSY; - } - - uv__loop_close(loop); - -#ifndef NDEBUG - memset(loop, -1, sizeof(*loop)); -#endif - if (loop == default_loop_ptr) - default_loop_ptr = NULL; - - return 0; -} - - -void uv_loop_delete(uv_loop_t* loop) { - uv_loop_t* default_loop; - int err; - - default_loop = default_loop_ptr; - - err = uv_loop_close(loop); - (void) err; /* Squelch compiler warnings. */ - assert(err == 0); - if (loop != default_loop) - uv__free(loop); -} diff --git a/outside/libuv-v1.7.5/src/uv-common.h b/outside/libuv-v1.7.5/src/uv-common.h deleted file mode 100644 index b348ec76b..000000000 --- a/outside/libuv-v1.7.5/src/uv-common.h +++ /dev/null @@ -1,223 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -/* - * This file is private to libuv. It provides common functionality to both - * Windows and Unix backends. - */ - -#ifndef UV_COMMON_H_ -#define UV_COMMON_H_ - -#include -#include -#include - -#if defined(_MSC_VER) && _MSC_VER < 1600 -# include "stdint-msvc2008.h" -#else -# include -#endif - -#include "uv.h" -#include "tree.h" -#include "queue.h" - -#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) - -#define container_of(ptr, type, member) \ - ((type *) ((char *) (ptr) - offsetof(type, member))) - -#define STATIC_ASSERT(expr) \ - void uv__static_assert(int static_assert_failed[1 - 2 * !(expr)]) - -#ifndef _WIN32 -enum { - UV__HANDLE_INTERNAL = 0x8000, - UV__HANDLE_ACTIVE = 0x4000, - UV__HANDLE_REF = 0x2000, - UV__HANDLE_CLOSING = 0 /* no-op on unix */ -}; -#else -# define UV__HANDLE_INTERNAL 0x80 -# define UV__HANDLE_ACTIVE 0x40 -# define UV__HANDLE_REF 0x20 -# define UV__HANDLE_CLOSING 0x01 -#endif - -int uv__loop_configure(uv_loop_t* loop, uv_loop_option option, va_list ap); - -void uv__loop_close(uv_loop_t* loop); - -int uv__tcp_bind(uv_tcp_t* tcp, - const struct sockaddr* addr, - unsigned int addrlen, - unsigned int flags); - -int uv__tcp_connect(uv_connect_t* req, - uv_tcp_t* handle, - const struct sockaddr* addr, - unsigned int addrlen, - uv_connect_cb cb); - -int uv__udp_bind(uv_udp_t* handle, - const struct sockaddr* addr, - unsigned int addrlen, - unsigned int flags); - -int uv__udp_send(uv_udp_send_t* req, - uv_udp_t* handle, - const uv_buf_t bufs[], - unsigned int nbufs, - const struct sockaddr* addr, - unsigned int addrlen, - uv_udp_send_cb send_cb); - -int uv__udp_try_send(uv_udp_t* handle, - const uv_buf_t bufs[], - unsigned int nbufs, - const struct sockaddr* addr, - unsigned int addrlen); - -int uv__udp_recv_start(uv_udp_t* handle, uv_alloc_cb alloccb, - uv_udp_recv_cb recv_cb); - -int uv__udp_recv_stop(uv_udp_t* handle); - -void uv__fs_poll_close(uv_fs_poll_t* handle); - -int uv__getaddrinfo_translate_error(int sys_err); /* EAI_* error. */ - -void uv__work_submit(uv_loop_t* loop, - struct uv__work *w, - void (*work)(struct uv__work *w), - void (*done)(struct uv__work *w, int status)); - -void uv__work_done(uv_async_t* handle); - -size_t uv__count_bufs(const uv_buf_t bufs[], unsigned int nbufs); - -int uv__socket_sockopt(uv_handle_t* handle, int optname, int* value); - -void uv__fs_scandir_cleanup(uv_fs_t* req); - -#define uv__has_active_reqs(loop) \ - (QUEUE_EMPTY(&(loop)->active_reqs) == 0) - -#define uv__req_register(loop, req) \ - do { \ - QUEUE_INSERT_TAIL(&(loop)->active_reqs, &(req)->active_queue); \ - } \ - while (0) - -#define uv__req_unregister(loop, req) \ - do { \ - assert(uv__has_active_reqs(loop)); \ - QUEUE_REMOVE(&(req)->active_queue); \ - } \ - while (0) - -#define uv__has_active_handles(loop) \ - ((loop)->active_handles > 0) - -#define uv__active_handle_add(h) \ - do { \ - (h)->loop->active_handles++; \ - } \ - while (0) - -#define uv__active_handle_rm(h) \ - do { \ - (h)->loop->active_handles--; \ - } \ - while (0) - -#define uv__is_active(h) \ - (((h)->flags & UV__HANDLE_ACTIVE) != 0) - -#define uv__is_closing(h) \ - (((h)->flags & (UV_CLOSING | UV_CLOSED)) != 0) - -#define uv__handle_start(h) \ - do { \ - assert(((h)->flags & UV__HANDLE_CLOSING) == 0); \ - if (((h)->flags & UV__HANDLE_ACTIVE) != 0) break; \ - (h)->flags |= UV__HANDLE_ACTIVE; \ - if (((h)->flags & UV__HANDLE_REF) != 0) uv__active_handle_add(h); \ - } \ - while (0) - -#define uv__handle_stop(h) \ - do { \ - assert(((h)->flags & UV__HANDLE_CLOSING) == 0); \ - if (((h)->flags & UV__HANDLE_ACTIVE) == 0) break; \ - (h)->flags &= ~UV__HANDLE_ACTIVE; \ - if (((h)->flags & UV__HANDLE_REF) != 0) uv__active_handle_rm(h); \ - } \ - while (0) - -#define uv__handle_ref(h) \ - do { \ - if (((h)->flags & UV__HANDLE_REF) != 0) break; \ - (h)->flags |= UV__HANDLE_REF; \ - if (((h)->flags & UV__HANDLE_CLOSING) != 0) break; \ - if (((h)->flags & UV__HANDLE_ACTIVE) != 0) uv__active_handle_add(h); \ - } \ - while (0) - -#define uv__handle_unref(h) \ - do { \ - if (((h)->flags & UV__HANDLE_REF) == 0) break; \ - (h)->flags &= ~UV__HANDLE_REF; \ - if (((h)->flags & UV__HANDLE_CLOSING) != 0) break; \ - if (((h)->flags & UV__HANDLE_ACTIVE) != 0) uv__active_handle_rm(h); \ - } \ - while (0) - -#define uv__has_ref(h) \ - (((h)->flags & UV__HANDLE_REF) != 0) - -#if defined(_WIN32) -# define uv__handle_platform_init(h) ((h)->u.fd = -1) -#else -# define uv__handle_platform_init(h) ((h)->next_closing = NULL) -#endif - -#define uv__handle_init(loop_, h, type_) \ - do { \ - (h)->loop = (loop_); \ - (h)->type = (type_); \ - (h)->flags = UV__HANDLE_REF; /* Ref the loop when active. */ \ - QUEUE_INSERT_TAIL(&(loop_)->handle_queue, &(h)->handle_queue); \ - uv__handle_platform_init(h); \ - } \ - while (0) - - -/* Allocator prototypes */ -void *uv__calloc(size_t count, size_t size); -char *uv__strdup(const char* s); -char *uv__strndup(const char* s, size_t n); -void* uv__malloc(size_t size); -void uv__free(void* ptr); -void* uv__realloc(void* ptr, size_t size); - -#endif /* UV_COMMON_H_ */ diff --git a/outside/libuv-v1.7.5/src/version.c b/outside/libuv-v1.7.5/src/version.c deleted file mode 100644 index 686dedd98..000000000 --- a/outside/libuv-v1.7.5/src/version.c +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" - -#define UV_STRINGIFY(v) UV_STRINGIFY_HELPER(v) -#define UV_STRINGIFY_HELPER(v) #v - -#define UV_VERSION_STRING_BASE UV_STRINGIFY(UV_VERSION_MAJOR) "." \ - UV_STRINGIFY(UV_VERSION_MINOR) "." \ - UV_STRINGIFY(UV_VERSION_PATCH) - -#if UV_VERSION_IS_RELEASE -# define UV_VERSION_STRING UV_VERSION_STRING_BASE -#else -# define UV_VERSION_STRING UV_VERSION_STRING_BASE "-" UV_VERSION_SUFFIX -#endif - - -unsigned int uv_version(void) { - return UV_VERSION_HEX; -} - - -const char* uv_version_string(void) { - return UV_VERSION_STRING; -} diff --git a/outside/libuv-v1.7.5/src/win/async.c b/outside/libuv-v1.7.5/src/win/async.c deleted file mode 100644 index ad240ab89..000000000 --- a/outside/libuv-v1.7.5/src/win/async.c +++ /dev/null @@ -1,99 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include - -#include "uv.h" -#include "internal.h" -#include "atomicops-inl.h" -#include "handle-inl.h" -#include "req-inl.h" - - -void uv_async_endgame(uv_loop_t* loop, uv_async_t* handle) { - if (handle->flags & UV__HANDLE_CLOSING && - !handle->async_sent) { - assert(!(handle->flags & UV_HANDLE_CLOSED)); - uv__handle_close(handle); - } -} - - -int uv_async_init(uv_loop_t* loop, uv_async_t* handle, uv_async_cb async_cb) { - uv_req_t* req; - - uv__handle_init(loop, (uv_handle_t*) handle, UV_ASYNC); - handle->async_sent = 0; - handle->async_cb = async_cb; - - req = &handle->async_req; - uv_req_init(loop, req); - req->type = UV_WAKEUP; - req->data = handle; - - uv__handle_start(handle); - - return 0; -} - - -void uv_async_close(uv_loop_t* loop, uv_async_t* handle) { - if (!((uv_async_t*)handle)->async_sent) { - uv_want_endgame(loop, (uv_handle_t*) handle); - } - - uv__handle_closing(handle); -} - - -int uv_async_send(uv_async_t* handle) { - uv_loop_t* loop = handle->loop; - - if (handle->type != UV_ASYNC) { - /* Can't set errno because that's not thread-safe. */ - return -1; - } - - /* The user should make sure never to call uv_async_send to a closing */ - /* or closed handle. */ - assert(!(handle->flags & UV__HANDLE_CLOSING)); - - if (!uv__atomic_exchange_set(&handle->async_sent)) { - POST_COMPLETION_FOR_REQ(loop, &handle->async_req); - } - - return 0; -} - - -void uv_process_async_wakeup_req(uv_loop_t* loop, uv_async_t* handle, - uv_req_t* req) { - assert(handle->type == UV_ASYNC); - assert(req->type == UV_WAKEUP); - - handle->async_sent = 0; - - if (handle->flags & UV__HANDLE_CLOSING) { - uv_want_endgame(loop, (uv_handle_t*)handle); - } else if (handle->async_cb != NULL) { - handle->async_cb(handle); - } -} diff --git a/outside/libuv-v1.7.5/src/win/atomicops-inl.h b/outside/libuv-v1.7.5/src/win/atomicops-inl.h deleted file mode 100644 index 61e006026..000000000 --- a/outside/libuv-v1.7.5/src/win/atomicops-inl.h +++ /dev/null @@ -1,56 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#ifndef UV_WIN_ATOMICOPS_INL_H_ -#define UV_WIN_ATOMICOPS_INL_H_ - -#include "uv.h" - - -/* Atomic set operation on char */ -#ifdef _MSC_VER /* MSVC */ - -/* _InterlockedOr8 is supported by MSVC on x32 and x64. It is slightly less */ -/* efficient than InterlockedExchange, but InterlockedExchange8 does not */ -/* exist, and interlocked operations on larger targets might require the */ -/* target to be aligned. */ -#pragma intrinsic(_InterlockedOr8) - -static char __declspec(inline) uv__atomic_exchange_set(char volatile* target) { - return _InterlockedOr8(target, 1); -} - -#else /* GCC */ - -/* Mingw-32 version, hopefully this works for 64-bit gcc as well. */ -static inline char uv__atomic_exchange_set(char volatile* target) { - const char one = 1; - char old_value; - __asm__ __volatile__ ("lock xchgb %0, %1\n\t" - : "=r"(old_value), "=m"(*target) - : "0"(one), "m"(*target) - : "memory"); - return old_value; -} - -#endif - -#endif /* UV_WIN_ATOMICOPS_INL_H_ */ diff --git a/outside/libuv-v1.7.5/src/win/core.c b/outside/libuv-v1.7.5/src/win/core.c deleted file mode 100644 index de0483e10..000000000 --- a/outside/libuv-v1.7.5/src/win/core.c +++ /dev/null @@ -1,457 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include -#include -#include -#include -#include -#include -#if defined(_MSC_VER) || defined(__MINGW64_VERSION_MAJOR) -#include -#endif - -#include "uv.h" -#include "internal.h" -#include "handle-inl.h" -#include "req-inl.h" - - -static uv_loop_t default_loop_struct; -static uv_loop_t* default_loop_ptr; - -/* uv_once initialization guards */ -static uv_once_t uv_init_guard_ = UV_ONCE_INIT; - - -#if defined(_DEBUG) && (defined(_MSC_VER) || defined(__MINGW64_VERSION_MAJOR)) -/* Our crt debug report handler allows us to temporarily disable asserts - * just for the current thread. - */ - -UV_THREAD_LOCAL int uv__crt_assert_enabled = TRUE; - -static int uv__crt_dbg_report_handler(int report_type, char *message, int *ret_val) { - if (uv__crt_assert_enabled || report_type != _CRT_ASSERT) - return FALSE; - - if (ret_val) { - /* Set ret_val to 0 to continue with normal execution. - * Set ret_val to 1 to trigger a breakpoint. - */ - - if(IsDebuggerPresent()) - *ret_val = 1; - else - *ret_val = 0; - } - - /* Don't call _CrtDbgReport. */ - return TRUE; -} -#else -UV_THREAD_LOCAL int uv__crt_assert_enabled = FALSE; -#endif - - -#if !defined(__MINGW32__) || __MSVCRT_VERSION__ >= 0x800 -static void uv__crt_invalid_parameter_handler(const wchar_t* expression, - const wchar_t* function, const wchar_t * file, unsigned int line, - uintptr_t reserved) { - /* No-op. */ -} -#endif - - -static void uv_init(void) { - /* Tell Windows that we will handle critical errors. */ - SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX | - SEM_NOOPENFILEERRORBOX); - - /* Tell the CRT to not exit the application when an invalid parameter is - * passed. The main issue is that invalid FDs will trigger this behavior. - */ -#if !defined(__MINGW32__) || __MSVCRT_VERSION__ >= 0x800 - _set_invalid_parameter_handler(uv__crt_invalid_parameter_handler); -#endif - - /* We also need to setup our debug report handler because some CRT - * functions (eg _get_osfhandle) raise an assert when called with invalid - * FDs even though they return the proper error code in the release build. - */ -#if defined(_DEBUG) && (defined(_MSC_VER) || defined(__MINGW64_VERSION_MAJOR)) - _CrtSetReportHook(uv__crt_dbg_report_handler); -#endif - - /* Fetch winapi function pointers. This must be done first because other - * initialization code might need these function pointers to be loaded. - */ - uv_winapi_init(); - - /* Initialize winsock */ - uv_winsock_init(); - - /* Initialize FS */ - uv_fs_init(); - - /* Initialize signal stuff */ - uv_signals_init(); - - /* Initialize console */ - uv_console_init(); - - /* Initialize utilities */ - uv__util_init(); -} - - -int uv_loop_init(uv_loop_t* loop) { - int err; - - /* Initialize libuv itself first */ - uv__once_init(); - - /* Create an I/O completion port */ - loop->iocp = CreateIoCompletionPort(INVALID_HANDLE_VALUE, NULL, 0, 1); - if (loop->iocp == NULL) - return uv_translate_sys_error(GetLastError()); - - /* To prevent uninitialized memory access, loop->time must be initialized - * to zero before calling uv_update_time for the first time. - */ - loop->time = 0; - uv_update_time(loop); - - QUEUE_INIT(&loop->wq); - QUEUE_INIT(&loop->handle_queue); - QUEUE_INIT(&loop->active_reqs); - loop->active_handles = 0; - - loop->pending_reqs_tail = NULL; - - loop->endgame_handles = NULL; - - RB_INIT(&loop->timers); - - loop->check_handles = NULL; - loop->prepare_handles = NULL; - loop->idle_handles = NULL; - - loop->next_prepare_handle = NULL; - loop->next_check_handle = NULL; - loop->next_idle_handle = NULL; - - memset(&loop->poll_peer_sockets, 0, sizeof loop->poll_peer_sockets); - - loop->active_tcp_streams = 0; - loop->active_udp_streams = 0; - - loop->timer_counter = 0; - loop->stop_flag = 0; - - err = uv_mutex_init(&loop->wq_mutex); - if (err) - goto fail_mutex_init; - - err = uv_async_init(loop, &loop->wq_async, uv__work_done); - if (err) - goto fail_async_init; - - uv__handle_unref(&loop->wq_async); - loop->wq_async.flags |= UV__HANDLE_INTERNAL; - - return 0; - -fail_async_init: - uv_mutex_destroy(&loop->wq_mutex); - -fail_mutex_init: - CloseHandle(loop->iocp); - loop->iocp = INVALID_HANDLE_VALUE; - - return err; -} - - -void uv__once_init(void) { - uv_once(&uv_init_guard_, uv_init); -} - - -void uv__loop_close(uv_loop_t* loop) { - size_t i; - - /* close the async handle without needing an extra loop iteration */ - assert(!loop->wq_async.async_sent); - loop->wq_async.close_cb = NULL; - uv__handle_closing(&loop->wq_async); - uv__handle_close(&loop->wq_async); - - for (i = 0; i < ARRAY_SIZE(loop->poll_peer_sockets); i++) { - SOCKET sock = loop->poll_peer_sockets[i]; - if (sock != 0 && sock != INVALID_SOCKET) - closesocket(sock); - } - - uv_mutex_lock(&loop->wq_mutex); - assert(QUEUE_EMPTY(&loop->wq) && "thread pool work queue not empty!"); - assert(!uv__has_active_reqs(loop)); - uv_mutex_unlock(&loop->wq_mutex); - uv_mutex_destroy(&loop->wq_mutex); - - CloseHandle(loop->iocp); -} - - -int uv__loop_configure(uv_loop_t* loop, uv_loop_option option, va_list ap) { - return UV_ENOSYS; -} - - -int uv_backend_fd(const uv_loop_t* loop) { - return -1; -} - - -int uv_backend_timeout(const uv_loop_t* loop) { - if (loop->stop_flag != 0) - return 0; - - if (!uv__has_active_handles(loop) && !uv__has_active_reqs(loop)) - return 0; - - if (loop->pending_reqs_tail) - return 0; - - if (loop->endgame_handles) - return 0; - - if (loop->idle_handles) - return 0; - - return uv__next_timeout(loop); -} - - -static void uv_poll(uv_loop_t* loop, DWORD timeout) { - DWORD bytes; - ULONG_PTR key; - OVERLAPPED* overlapped; - uv_req_t* req; - - GetQueuedCompletionStatus(loop->iocp, - &bytes, - &key, - &overlapped, - timeout); - - if (overlapped) { - /* Package was dequeued */ - req = uv_overlapped_to_req(overlapped); - uv_insert_pending_req(loop, req); - - /* Some time might have passed waiting for I/O, - * so update the loop time here. - */ - uv_update_time(loop); - } else if (GetLastError() != WAIT_TIMEOUT) { - /* Serious error */ - uv_fatal_error(GetLastError(), "GetQueuedCompletionStatus"); - } else if (timeout > 0) { - /* GetQueuedCompletionStatus can occasionally return a little early. - * Make sure that the desired timeout is reflected in the loop time. - */ - uv__time_forward(loop, timeout); - } -} - - -static void uv_poll_ex(uv_loop_t* loop, DWORD timeout) { - BOOL success; - uv_req_t* req; - OVERLAPPED_ENTRY overlappeds[128]; - ULONG count; - ULONG i; - - success = pGetQueuedCompletionStatusEx(loop->iocp, - overlappeds, - ARRAY_SIZE(overlappeds), - &count, - timeout, - FALSE); - - if (success) { - for (i = 0; i < count; i++) { - /* Package was dequeued */ - req = uv_overlapped_to_req(overlappeds[i].lpOverlapped); - uv_insert_pending_req(loop, req); - } - - /* Some time might have passed waiting for I/O, - * so update the loop time here. - */ - uv_update_time(loop); - } else if (GetLastError() != WAIT_TIMEOUT) { - /* Serious error */ - uv_fatal_error(GetLastError(), "GetQueuedCompletionStatusEx"); - } else if (timeout > 0) { - /* GetQueuedCompletionStatus can occasionally return a little early. - * Make sure that the desired timeout is reflected in the loop time. - */ - uv__time_forward(loop, timeout); - } -} - - -static int uv__loop_alive(const uv_loop_t* loop) { - return loop->active_handles > 0 || - !QUEUE_EMPTY(&loop->active_reqs) || - loop->endgame_handles != NULL; -} - - -int uv_loop_alive(const uv_loop_t* loop) { - return uv__loop_alive(loop); -} - - -int uv_run(uv_loop_t *loop, uv_run_mode mode) { - DWORD timeout; - int r; - int ran_pending; - void (*poll)(uv_loop_t* loop, DWORD timeout); - - if (pGetQueuedCompletionStatusEx) - poll = &uv_poll_ex; - else - poll = &uv_poll; - - r = uv__loop_alive(loop); - if (!r) - uv_update_time(loop); - - while (r != 0 && loop->stop_flag == 0) { - uv_update_time(loop); - uv_process_timers(loop); - - ran_pending = uv_process_reqs(loop); - uv_idle_invoke(loop); - uv_prepare_invoke(loop); - - timeout = 0; - if ((mode == UV_RUN_ONCE && !ran_pending) || mode == UV_RUN_DEFAULT) - timeout = uv_backend_timeout(loop); - - (*poll)(loop, timeout); - - uv_check_invoke(loop); - uv_process_endgames(loop); - - if (mode == UV_RUN_ONCE) { - /* UV_RUN_ONCE implies forward progress: at least one callback must have - * been invoked when it returns. uv__io_poll() can return without doing - * I/O (meaning: no callbacks) when its timeout expires - which means we - * have pending timers that satisfy the forward progress constraint. - * - * UV_RUN_NOWAIT makes no guarantees about progress so it's omitted from - * the check. - */ - uv_process_timers(loop); - } - - r = uv__loop_alive(loop); - if (mode == UV_RUN_ONCE || mode == UV_RUN_NOWAIT) - break; - } - - /* The if statement lets the compiler compile it to a conditional store. - * Avoids dirtying a cache line. - */ - if (loop->stop_flag != 0) - loop->stop_flag = 0; - - return r; -} - - -int uv_fileno(const uv_handle_t* handle, uv_os_fd_t* fd) { - uv_os_fd_t fd_out; - - switch (handle->type) { - case UV_TCP: - fd_out = (uv_os_fd_t)((uv_tcp_t*) handle)->socket; - break; - - case UV_NAMED_PIPE: - fd_out = ((uv_pipe_t*) handle)->handle; - break; - - case UV_TTY: - fd_out = ((uv_tty_t*) handle)->handle; - break; - - case UV_UDP: - fd_out = (uv_os_fd_t)((uv_udp_t*) handle)->socket; - break; - - case UV_POLL: - fd_out = (uv_os_fd_t)((uv_poll_t*) handle)->socket; - break; - - default: - return UV_EINVAL; - } - - if (uv_is_closing(handle) || fd_out == INVALID_HANDLE_VALUE) - return UV_EBADF; - - *fd = fd_out; - return 0; -} - - -int uv__socket_sockopt(uv_handle_t* handle, int optname, int* value) { - int r; - int len; - SOCKET socket; - - if (handle == NULL || value == NULL) - return UV_EINVAL; - - if (handle->type == UV_TCP) - socket = ((uv_tcp_t*) handle)->socket; - else if (handle->type == UV_UDP) - socket = ((uv_udp_t*) handle)->socket; - else - return UV_ENOTSUP; - - len = sizeof(*value); - - if (*value == 0) - r = getsockopt(socket, SOL_SOCKET, optname, (char*) value, &len); - else - r = setsockopt(socket, SOL_SOCKET, optname, (const char*) value, len); - - if (r == SOCKET_ERROR) - return uv_translate_sys_error(WSAGetLastError()); - - return 0; -} diff --git a/outside/libuv-v1.7.5/src/win/dl.c b/outside/libuv-v1.7.5/src/win/dl.c deleted file mode 100644 index e5f3407f8..000000000 --- a/outside/libuv-v1.7.5/src/win/dl.c +++ /dev/null @@ -1,113 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "internal.h" - -static int uv__dlerror(uv_lib_t* lib, int errorno); - - -int uv_dlopen(const char* filename, uv_lib_t* lib) { - WCHAR filename_w[32768]; - - lib->handle = NULL; - lib->errmsg = NULL; - - if (!uv_utf8_to_utf16(filename, filename_w, ARRAY_SIZE(filename_w))) { - return uv__dlerror(lib, GetLastError()); - } - - lib->handle = LoadLibraryExW(filename_w, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); - if (lib->handle == NULL) { - return uv__dlerror(lib, GetLastError()); - } - - return 0; -} - - -void uv_dlclose(uv_lib_t* lib) { - if (lib->errmsg) { - LocalFree((void*)lib->errmsg); - lib->errmsg = NULL; - } - - if (lib->handle) { - /* Ignore errors. No good way to signal them without leaking memory. */ - FreeLibrary(lib->handle); - lib->handle = NULL; - } -} - - -int uv_dlsym(uv_lib_t* lib, const char* name, void** ptr) { - *ptr = (void*) GetProcAddress(lib->handle, name); - return uv__dlerror(lib, *ptr ? 0 : GetLastError()); -} - - -const char* uv_dlerror(const uv_lib_t* lib) { - return lib->errmsg ? lib->errmsg : "no error"; -} - - -static void uv__format_fallback_error(uv_lib_t* lib, int errorno){ - DWORD_PTR args[1] = { (DWORD_PTR) errorno }; - LPSTR fallback_error = "error: %1!d!"; - - FormatMessageA(FORMAT_MESSAGE_FROM_STRING | - FORMAT_MESSAGE_ARGUMENT_ARRAY | - FORMAT_MESSAGE_ALLOCATE_BUFFER, - fallback_error, 0, 0, - (LPSTR) &lib->errmsg, - 0, (va_list*) args); -} - - - -static int uv__dlerror(uv_lib_t* lib, int errorno) { - DWORD res; - - if (lib->errmsg) { - LocalFree((void*)lib->errmsg); - lib->errmsg = NULL; - } - - if (errorno) { - res = FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | - FORMAT_MESSAGE_FROM_SYSTEM | - FORMAT_MESSAGE_IGNORE_INSERTS, NULL, errorno, - MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), - (LPSTR) &lib->errmsg, 0, NULL); - if (!res && GetLastError() == ERROR_MUI_FILE_NOT_FOUND) { - res = FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | - FORMAT_MESSAGE_FROM_SYSTEM | - FORMAT_MESSAGE_IGNORE_INSERTS, NULL, errorno, - 0, (LPSTR) &lib->errmsg, 0, NULL); - } - - if (!res) { - uv__format_fallback_error(lib, errorno); - } - } - - return errorno ? -1 : 0; -} diff --git a/outside/libuv-v1.7.5/src/win/error.c b/outside/libuv-v1.7.5/src/win/error.c deleted file mode 100644 index a265a272d..000000000 --- a/outside/libuv-v1.7.5/src/win/error.c +++ /dev/null @@ -1,169 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include -#include -#include -#include -#include - -#include "uv.h" -#include "internal.h" - - -/* - * Display an error message and abort the event loop. - */ -void uv_fatal_error(const int errorno, const char* syscall) { - char* buf = NULL; - const char* errmsg; - - FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | - FORMAT_MESSAGE_IGNORE_INSERTS, NULL, errorno, - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPSTR)&buf, 0, NULL); - - if (buf) { - errmsg = buf; - } else { - errmsg = "Unknown error"; - } - - /* FormatMessage messages include a newline character already, */ - /* so don't add another. */ - if (syscall) { - fprintf(stderr, "%s: (%d) %s", syscall, errorno, errmsg); - } else { - fprintf(stderr, "(%d) %s", errorno, errmsg); - } - - if (buf) { - LocalFree(buf); - } - - *((char*)NULL) = 0xff; /* Force debug break */ - abort(); -} - - -int uv_translate_sys_error(int sys_errno) { - if (sys_errno <= 0) { - return sys_errno; /* If < 0 then it's already a libuv error. */ - } - - switch (sys_errno) { - case ERROR_NOACCESS: return UV_EACCES; - case WSAEACCES: return UV_EACCES; - case ERROR_ADDRESS_ALREADY_ASSOCIATED: return UV_EADDRINUSE; - case WSAEADDRINUSE: return UV_EADDRINUSE; - case WSAEADDRNOTAVAIL: return UV_EADDRNOTAVAIL; - case WSAEAFNOSUPPORT: return UV_EAFNOSUPPORT; - case WSAEWOULDBLOCK: return UV_EAGAIN; - case WSAEALREADY: return UV_EALREADY; - case ERROR_INVALID_FLAGS: return UV_EBADF; - case ERROR_INVALID_HANDLE: return UV_EBADF; - case ERROR_LOCK_VIOLATION: return UV_EBUSY; - case ERROR_PIPE_BUSY: return UV_EBUSY; - case ERROR_SHARING_VIOLATION: return UV_EBUSY; - case ERROR_OPERATION_ABORTED: return UV_ECANCELED; - case WSAEINTR: return UV_ECANCELED; - case ERROR_NO_UNICODE_TRANSLATION: return UV_ECHARSET; - case ERROR_CONNECTION_ABORTED: return UV_ECONNABORTED; - case WSAECONNABORTED: return UV_ECONNABORTED; - case ERROR_CONNECTION_REFUSED: return UV_ECONNREFUSED; - case WSAECONNREFUSED: return UV_ECONNREFUSED; - case ERROR_NETNAME_DELETED: return UV_ECONNRESET; - case WSAECONNRESET: return UV_ECONNRESET; - case ERROR_ALREADY_EXISTS: return UV_EEXIST; - case ERROR_FILE_EXISTS: return UV_EEXIST; - case ERROR_BUFFER_OVERFLOW: return UV_EFAULT; - case WSAEFAULT: return UV_EFAULT; - case ERROR_HOST_UNREACHABLE: return UV_EHOSTUNREACH; - case WSAEHOSTUNREACH: return UV_EHOSTUNREACH; - case ERROR_INSUFFICIENT_BUFFER: return UV_EINVAL; - case ERROR_INVALID_DATA: return UV_EINVAL; - case ERROR_INVALID_PARAMETER: return UV_EINVAL; - case ERROR_SYMLINK_NOT_SUPPORTED: return UV_EINVAL; - case WSAEINVAL: return UV_EINVAL; - case WSAEPFNOSUPPORT: return UV_EINVAL; - case WSAESOCKTNOSUPPORT: return UV_EINVAL; - case ERROR_BEGINNING_OF_MEDIA: return UV_EIO; - case ERROR_BUS_RESET: return UV_EIO; - case ERROR_CRC: return UV_EIO; - case ERROR_DEVICE_DOOR_OPEN: return UV_EIO; - case ERROR_DEVICE_REQUIRES_CLEANING: return UV_EIO; - case ERROR_DISK_CORRUPT: return UV_EIO; - case ERROR_EOM_OVERFLOW: return UV_EIO; - case ERROR_FILEMARK_DETECTED: return UV_EIO; - case ERROR_GEN_FAILURE: return UV_EIO; - case ERROR_INVALID_BLOCK_LENGTH: return UV_EIO; - case ERROR_IO_DEVICE: return UV_EIO; - case ERROR_NO_DATA_DETECTED: return UV_EIO; - case ERROR_NO_SIGNAL_SENT: return UV_EIO; - case ERROR_OPEN_FAILED: return UV_EIO; - case ERROR_SETMARK_DETECTED: return UV_EIO; - case ERROR_SIGNAL_REFUSED: return UV_EIO; - case WSAEISCONN: return UV_EISCONN; - case ERROR_CANT_RESOLVE_FILENAME: return UV_ELOOP; - case ERROR_TOO_MANY_OPEN_FILES: return UV_EMFILE; - case WSAEMFILE: return UV_EMFILE; - case WSAEMSGSIZE: return UV_EMSGSIZE; - case ERROR_FILENAME_EXCED_RANGE: return UV_ENAMETOOLONG; - case ERROR_NETWORK_UNREACHABLE: return UV_ENETUNREACH; - case WSAENETUNREACH: return UV_ENETUNREACH; - case WSAENOBUFS: return UV_ENOBUFS; - case ERROR_DIRECTORY: return UV_ENOENT; - case ERROR_FILE_NOT_FOUND: return UV_ENOENT; - case ERROR_INVALID_NAME: return UV_ENOENT; - case ERROR_INVALID_DRIVE: return UV_ENOENT; - case ERROR_INVALID_REPARSE_DATA: return UV_ENOENT; - case ERROR_MOD_NOT_FOUND: return UV_ENOENT; - case ERROR_PATH_NOT_FOUND: return UV_ENOENT; - case WSAHOST_NOT_FOUND: return UV_ENOENT; - case WSANO_DATA: return UV_ENOENT; - case ERROR_NOT_ENOUGH_MEMORY: return UV_ENOMEM; - case ERROR_OUTOFMEMORY: return UV_ENOMEM; - case ERROR_CANNOT_MAKE: return UV_ENOSPC; - case ERROR_DISK_FULL: return UV_ENOSPC; - case ERROR_EA_TABLE_FULL: return UV_ENOSPC; - case ERROR_END_OF_MEDIA: return UV_ENOSPC; - case ERROR_HANDLE_DISK_FULL: return UV_ENOSPC; - case ERROR_NOT_CONNECTED: return UV_ENOTCONN; - case WSAENOTCONN: return UV_ENOTCONN; - case ERROR_DIR_NOT_EMPTY: return UV_ENOTEMPTY; - case WSAENOTSOCK: return UV_ENOTSOCK; - case ERROR_NOT_SUPPORTED: return UV_ENOTSUP; - case ERROR_BROKEN_PIPE: return UV_EOF; - case ERROR_ACCESS_DENIED: return UV_EPERM; - case ERROR_PRIVILEGE_NOT_HELD: return UV_EPERM; - case ERROR_BAD_PIPE: return UV_EPIPE; - case ERROR_NO_DATA: return UV_EPIPE; - case ERROR_PIPE_NOT_CONNECTED: return UV_EPIPE; - case WSAESHUTDOWN: return UV_EPIPE; - case WSAEPROTONOSUPPORT: return UV_EPROTONOSUPPORT; - case ERROR_WRITE_PROTECT: return UV_EROFS; - case ERROR_SEM_TIMEOUT: return UV_ETIMEDOUT; - case WSAETIMEDOUT: return UV_ETIMEDOUT; - case ERROR_NOT_SAME_DEVICE: return UV_EXDEV; - case ERROR_INVALID_FUNCTION: return UV_EISDIR; - case ERROR_META_EXPANSION_TOO_LONG: return UV_E2BIG; - default: return UV_UNKNOWN; - } -} diff --git a/outside/libuv-v1.7.5/src/win/fs-event.c b/outside/libuv-v1.7.5/src/win/fs-event.c deleted file mode 100644 index ba68f78c8..000000000 --- a/outside/libuv-v1.7.5/src/win/fs-event.c +++ /dev/null @@ -1,543 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include -#include -#include -#include - -#include "uv.h" -#include "internal.h" -#include "handle-inl.h" -#include "req-inl.h" - - -const unsigned int uv_directory_watcher_buffer_size = 4096; - - -static void uv_fs_event_queue_readdirchanges(uv_loop_t* loop, - uv_fs_event_t* handle) { - assert(handle->dir_handle != INVALID_HANDLE_VALUE); - assert(!handle->req_pending); - - memset(&(handle->req.u.io.overlapped), 0, - sizeof(handle->req.u.io.overlapped)); - if (!ReadDirectoryChangesW(handle->dir_handle, - handle->buffer, - uv_directory_watcher_buffer_size, - (handle->flags & UV_FS_EVENT_RECURSIVE) ? TRUE : FALSE, - FILE_NOTIFY_CHANGE_FILE_NAME | - FILE_NOTIFY_CHANGE_DIR_NAME | - FILE_NOTIFY_CHANGE_ATTRIBUTES | - FILE_NOTIFY_CHANGE_SIZE | - FILE_NOTIFY_CHANGE_LAST_WRITE | - FILE_NOTIFY_CHANGE_LAST_ACCESS | - FILE_NOTIFY_CHANGE_CREATION | - FILE_NOTIFY_CHANGE_SECURITY, - NULL, - &handle->req.u.io.overlapped, - NULL)) { - /* Make this req pending reporting an error. */ - SET_REQ_ERROR(&handle->req, GetLastError()); - uv_insert_pending_req(loop, (uv_req_t*)&handle->req); - } - - handle->req_pending = 1; -} - -static int uv_relative_path(const WCHAR* filename, - const WCHAR* dir, - WCHAR** relpath) { - int dirlen = wcslen(dir); - int filelen = wcslen(filename); - if (dir[dirlen - 1] == '\\') - dirlen--; - *relpath = uv__malloc((MAX_PATH + 1) * sizeof(WCHAR)); - if (!*relpath) - uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc"); - wcsncpy(*relpath, filename + dirlen + 1, filelen - dirlen - 1); - (*relpath)[filelen - dirlen - 1] = L'\0'; - return 0; -} - -static int uv_split_path(const WCHAR* filename, WCHAR** dir, - WCHAR** file) { - int len = wcslen(filename); - int i = len; - while (i > 0 && filename[--i] != '\\' && filename[i] != '/'); - - if (i == 0) { - if (dir) { - *dir = (WCHAR*)uv__malloc((MAX_PATH + 1) * sizeof(WCHAR)); - if (!*dir) { - uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc"); - } - - if (!GetCurrentDirectoryW(MAX_PATH, *dir)) { - uv__free(*dir); - *dir = NULL; - return -1; - } - } - - *file = wcsdup(filename); - } else { - if (dir) { - *dir = (WCHAR*)uv__malloc((i + 1) * sizeof(WCHAR)); - if (!*dir) { - uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc"); - } - wcsncpy(*dir, filename, i); - (*dir)[i] = L'\0'; - } - - *file = (WCHAR*)uv__malloc((len - i) * sizeof(WCHAR)); - if (!*file) { - uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc"); - } - wcsncpy(*file, filename + i + 1, len - i - 1); - (*file)[len - i - 1] = L'\0'; - } - - return 0; -} - - -int uv_fs_event_init(uv_loop_t* loop, uv_fs_event_t* handle) { - uv__handle_init(loop, (uv_handle_t*) handle, UV_FS_EVENT); - handle->dir_handle = INVALID_HANDLE_VALUE; - handle->buffer = NULL; - handle->req_pending = 0; - handle->filew = NULL; - handle->short_filew = NULL; - handle->dirw = NULL; - - uv_req_init(loop, (uv_req_t*)&handle->req); - handle->req.type = UV_FS_EVENT_REQ; - handle->req.data = handle; - - return 0; -} - - -int uv_fs_event_start(uv_fs_event_t* handle, - uv_fs_event_cb cb, - const char* path, - unsigned int flags) { - int name_size, is_path_dir; - DWORD attr, last_error; - WCHAR* dir = NULL, *dir_to_watch, *pathw = NULL; - WCHAR short_path[MAX_PATH]; - - if (uv__is_active(handle)) - return UV_EINVAL; - - handle->cb = cb; - handle->path = uv__strdup(path); - if (!handle->path) { - uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc"); - } - - uv__handle_start(handle); - - /* Convert name to UTF16. */ - name_size = uv_utf8_to_utf16(path, NULL, 0) * sizeof(WCHAR); - pathw = (WCHAR*)uv__malloc(name_size); - if (!pathw) { - uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc"); - } - - if (!uv_utf8_to_utf16(path, pathw, - name_size / sizeof(WCHAR))) { - return uv_translate_sys_error(GetLastError()); - } - - /* Determine whether path is a file or a directory. */ - attr = GetFileAttributesW(pathw); - if (attr == INVALID_FILE_ATTRIBUTES) { - last_error = GetLastError(); - goto error; - } - - is_path_dir = (attr & FILE_ATTRIBUTE_DIRECTORY) ? 1 : 0; - - if (is_path_dir) { - /* path is a directory, so that's the directory that we will watch. */ - handle->dirw = pathw; - dir_to_watch = pathw; - } else { - /* - * path is a file. So we split path into dir & file parts, and - * watch the dir directory. - */ - - /* Convert to short path. */ - if (!GetShortPathNameW(pathw, short_path, ARRAY_SIZE(short_path))) { - last_error = GetLastError(); - goto error; - } - - if (uv_split_path(pathw, &dir, &handle->filew) != 0) { - last_error = GetLastError(); - goto error; - } - - if (uv_split_path(short_path, NULL, &handle->short_filew) != 0) { - last_error = GetLastError(); - goto error; - } - - dir_to_watch = dir; - uv__free(pathw); - pathw = NULL; - } - - handle->dir_handle = CreateFileW(dir_to_watch, - FILE_LIST_DIRECTORY, - FILE_SHARE_READ | FILE_SHARE_DELETE | - FILE_SHARE_WRITE, - NULL, - OPEN_EXISTING, - FILE_FLAG_BACKUP_SEMANTICS | - FILE_FLAG_OVERLAPPED, - NULL); - - if (dir) { - uv__free(dir); - dir = NULL; - } - - if (handle->dir_handle == INVALID_HANDLE_VALUE) { - last_error = GetLastError(); - goto error; - } - - if (CreateIoCompletionPort(handle->dir_handle, - handle->loop->iocp, - (ULONG_PTR)handle, - 0) == NULL) { - last_error = GetLastError(); - goto error; - } - - if (!handle->buffer) { - handle->buffer = (char*)uv__malloc(uv_directory_watcher_buffer_size); - } - if (!handle->buffer) { - uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc"); - } - - memset(&(handle->req.u.io.overlapped), 0, - sizeof(handle->req.u.io.overlapped)); - - if (!ReadDirectoryChangesW(handle->dir_handle, - handle->buffer, - uv_directory_watcher_buffer_size, - (flags & UV_FS_EVENT_RECURSIVE) ? TRUE : FALSE, - FILE_NOTIFY_CHANGE_FILE_NAME | - FILE_NOTIFY_CHANGE_DIR_NAME | - FILE_NOTIFY_CHANGE_ATTRIBUTES | - FILE_NOTIFY_CHANGE_SIZE | - FILE_NOTIFY_CHANGE_LAST_WRITE | - FILE_NOTIFY_CHANGE_LAST_ACCESS | - FILE_NOTIFY_CHANGE_CREATION | - FILE_NOTIFY_CHANGE_SECURITY, - NULL, - &handle->req.u.io.overlapped, - NULL)) { - last_error = GetLastError(); - goto error; - } - - handle->req_pending = 1; - return 0; - -error: - if (handle->path) { - uv__free(handle->path); - handle->path = NULL; - } - - if (handle->filew) { - uv__free(handle->filew); - handle->filew = NULL; - } - - if (handle->short_filew) { - uv__free(handle->short_filew); - handle->short_filew = NULL; - } - - uv__free(pathw); - - if (handle->dir_handle != INVALID_HANDLE_VALUE) { - CloseHandle(handle->dir_handle); - handle->dir_handle = INVALID_HANDLE_VALUE; - } - - if (handle->buffer) { - uv__free(handle->buffer); - handle->buffer = NULL; - } - - return uv_translate_sys_error(last_error); -} - - -int uv_fs_event_stop(uv_fs_event_t* handle) { - if (!uv__is_active(handle)) - return 0; - - if (handle->dir_handle != INVALID_HANDLE_VALUE) { - CloseHandle(handle->dir_handle); - handle->dir_handle = INVALID_HANDLE_VALUE; - } - - uv__handle_stop(handle); - - if (handle->filew) { - uv__free(handle->filew); - handle->filew = NULL; - } - - if (handle->short_filew) { - uv__free(handle->short_filew); - handle->short_filew = NULL; - } - - if (handle->path) { - uv__free(handle->path); - handle->path = NULL; - } - - if (handle->dirw) { - uv__free(handle->dirw); - handle->dirw = NULL; - } - - return 0; -} - - -void uv_process_fs_event_req(uv_loop_t* loop, uv_req_t* req, - uv_fs_event_t* handle) { - FILE_NOTIFY_INFORMATION* file_info; - int err, sizew, size, result; - char* filename = NULL; - WCHAR* filenamew, *long_filenamew = NULL; - DWORD offset = 0; - - assert(req->type == UV_FS_EVENT_REQ); - assert(handle->req_pending); - handle->req_pending = 0; - - /* Don't report any callbacks if: - * - We're closing, just push the handle onto the endgame queue - * - We are not active, just ignore the callback - */ - if (!uv__is_active(handle)) { - if (handle->flags & UV__HANDLE_CLOSING) { - uv_want_endgame(loop, (uv_handle_t*) handle); - } - return; - } - - file_info = (FILE_NOTIFY_INFORMATION*)(handle->buffer + offset); - - if (REQ_SUCCESS(req)) { - if (req->u.io.overlapped.InternalHigh > 0) { - do { - file_info = (FILE_NOTIFY_INFORMATION*)((char*)file_info + offset); - assert(!filename); - assert(!long_filenamew); - - /* - * Fire the event only if we were asked to watch a directory, - * or if the filename filter matches. - */ - if (handle->dirw || - _wcsnicmp(handle->filew, file_info->FileName, - file_info->FileNameLength / sizeof(WCHAR)) == 0 || - _wcsnicmp(handle->short_filew, file_info->FileName, - file_info->FileNameLength / sizeof(WCHAR)) == 0) { - - if (handle->dirw) { - /* - * We attempt to convert the file name to its long form for - * events that still point to valid files on disk. - * For removed and renamed events, we do not provide the file name. - */ - if (file_info->Action != FILE_ACTION_REMOVED && - file_info->Action != FILE_ACTION_RENAMED_OLD_NAME) { - /* Construct a full path to the file. */ - size = wcslen(handle->dirw) + - file_info->FileNameLength / sizeof(WCHAR) + 2; - - filenamew = (WCHAR*)uv__malloc(size * sizeof(WCHAR)); - if (!filenamew) { - uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc"); - } - - _snwprintf(filenamew, size, L"%s\\%.*s", handle->dirw, - file_info->FileNameLength / sizeof(WCHAR), - file_info->FileName); - - filenamew[size - 1] = L'\0'; - - /* Convert to long name. */ - size = GetLongPathNameW(filenamew, NULL, 0); - - if (size) { - long_filenamew = (WCHAR*)uv__malloc(size * sizeof(WCHAR)); - if (!long_filenamew) { - uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc"); - } - - size = GetLongPathNameW(filenamew, long_filenamew, size); - if (size) { - long_filenamew[size] = '\0'; - } else { - uv__free(long_filenamew); - long_filenamew = NULL; - } - } - - uv__free(filenamew); - - if (long_filenamew) { - /* Get the file name out of the long path. */ - result = uv_relative_path(long_filenamew, - handle->dirw, - &filenamew); - uv__free(long_filenamew); - - if (result == 0) { - long_filenamew = filenamew; - sizew = -1; - } else { - long_filenamew = NULL; - } - } - - /* - * If we couldn't get the long name - just use the name - * provided by ReadDirectoryChangesW. - */ - if (!long_filenamew) { - filenamew = file_info->FileName; - sizew = file_info->FileNameLength / sizeof(WCHAR); - } - } else { - /* Removed or renamed callbacks don't provide filename. */ - filenamew = NULL; - } - } else { - /* We already have the long name of the file, so just use it. */ - filenamew = handle->filew; - sizew = -1; - } - - if (filenamew) { - /* Convert the filename to utf8. */ - size = uv_utf16_to_utf8(filenamew, - sizew, - NULL, - 0); - if (size) { - filename = (char*)uv__malloc(size + 1); - if (!filename) { - uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc"); - } - - size = uv_utf16_to_utf8(filenamew, - sizew, - filename, - size); - if (size) { - filename[size] = '\0'; - } else { - uv__free(filename); - filename = NULL; - } - } - } - - switch (file_info->Action) { - case FILE_ACTION_ADDED: - case FILE_ACTION_REMOVED: - case FILE_ACTION_RENAMED_OLD_NAME: - case FILE_ACTION_RENAMED_NEW_NAME: - handle->cb(handle, filename, UV_RENAME, 0); - break; - - case FILE_ACTION_MODIFIED: - handle->cb(handle, filename, UV_CHANGE, 0); - break; - } - - uv__free(filename); - filename = NULL; - uv__free(long_filenamew); - long_filenamew = NULL; - } - - offset = file_info->NextEntryOffset; - } while (offset && !(handle->flags & UV__HANDLE_CLOSING)); - } else { - handle->cb(handle, NULL, UV_CHANGE, 0); - } - } else { - err = GET_REQ_ERROR(req); - handle->cb(handle, NULL, 0, uv_translate_sys_error(err)); - } - - if (!(handle->flags & UV__HANDLE_CLOSING)) { - uv_fs_event_queue_readdirchanges(loop, handle); - } else { - uv_want_endgame(loop, (uv_handle_t*)handle); - } -} - - -void uv_fs_event_close(uv_loop_t* loop, uv_fs_event_t* handle) { - uv_fs_event_stop(handle); - - uv__handle_closing(handle); - - if (!handle->req_pending) { - uv_want_endgame(loop, (uv_handle_t*)handle); - } - -} - - -void uv_fs_event_endgame(uv_loop_t* loop, uv_fs_event_t* handle) { - if ((handle->flags & UV__HANDLE_CLOSING) && !handle->req_pending) { - assert(!(handle->flags & UV_HANDLE_CLOSED)); - - if (handle->buffer) { - uv__free(handle->buffer); - handle->buffer = NULL; - } - - uv__handle_close(handle); - } -} diff --git a/outside/libuv-v1.7.5/src/win/fs.c b/outside/libuv-v1.7.5/src/win/fs.c deleted file mode 100644 index 4a1757311..000000000 --- a/outside/libuv-v1.7.5/src/win/fs.c +++ /dev/null @@ -1,2349 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "uv.h" -#include "internal.h" -#include "req-inl.h" -#include "handle-inl.h" - -#include - - -#define UV_FS_FREE_PATHS 0x0002 -#define UV_FS_FREE_PTR 0x0008 -#define UV_FS_CLEANEDUP 0x0010 - - -#define QUEUE_FS_TP_JOB(loop, req) \ - do { \ - uv__req_register(loop, req); \ - uv__work_submit((loop), &(req)->work_req, uv__fs_work, uv__fs_done); \ - } while (0) - -#define SET_REQ_RESULT(req, result_value) \ - do { \ - req->result = (result_value); \ - if (req->result == -1) { \ - req->sys_errno_ = _doserrno; \ - req->result = uv_translate_sys_error(req->sys_errno_); \ - } \ - } while (0) - -#define SET_REQ_WIN32_ERROR(req, sys_errno) \ - do { \ - req->sys_errno_ = (sys_errno); \ - req->result = uv_translate_sys_error(req->sys_errno_); \ - } while (0) - -#define SET_REQ_UV_ERROR(req, uv_errno, sys_errno) \ - do { \ - req->result = (uv_errno); \ - req->sys_errno_ = (sys_errno); \ - } while (0) - -#define VERIFY_FD(fd, req) \ - if (fd == -1) { \ - req->result = UV_EBADF; \ - req->sys_errno_ = ERROR_INVALID_HANDLE; \ - return; \ - } - -#define FILETIME_TO_UINT(filetime) \ - (*((uint64_t*) &(filetime)) - 116444736000000000ULL) - -#define FILETIME_TO_TIME_T(filetime) \ - (FILETIME_TO_UINT(filetime) / 10000000ULL) - -#define FILETIME_TO_TIME_NS(filetime, secs) \ - ((FILETIME_TO_UINT(filetime) - (secs * 10000000ULL)) * 100) - -#define FILETIME_TO_TIMESPEC(ts, filetime) \ - do { \ - (ts).tv_sec = (long) FILETIME_TO_TIME_T(filetime); \ - (ts).tv_nsec = (long) FILETIME_TO_TIME_NS(filetime, (ts).tv_sec); \ - } while(0) - -#define TIME_T_TO_FILETIME(time, filetime_ptr) \ - do { \ - uint64_t bigtime = ((int64_t) (time) * 10000000LL) + \ - 116444736000000000ULL; \ - (filetime_ptr)->dwLowDateTime = bigtime & 0xFFFFFFFF; \ - (filetime_ptr)->dwHighDateTime = bigtime >> 32; \ - } while(0) - -#define IS_SLASH(c) ((c) == L'\\' || (c) == L'/') -#define IS_LETTER(c) (((c) >= L'a' && (c) <= L'z') || \ - ((c) >= L'A' && (c) <= L'Z')) - -const WCHAR JUNCTION_PREFIX[] = L"\\??\\"; -const WCHAR JUNCTION_PREFIX_LEN = 4; - -const WCHAR LONG_PATH_PREFIX[] = L"\\\\?\\"; -const WCHAR LONG_PATH_PREFIX_LEN = 4; - - -void uv_fs_init() { - _fmode = _O_BINARY; -} - - -INLINE static int fs__capture_path(uv_fs_t* req, const char* path, - const char* new_path, const int copy_path) { - char* buf; - char* pos; - ssize_t buf_sz = 0, path_len, pathw_len = 0, new_pathw_len = 0; - - /* new_path can only be set if path is also set. */ - assert(new_path == NULL || path != NULL); - - if (path != NULL) { - pathw_len = MultiByteToWideChar(CP_UTF8, - 0, - path, - -1, - NULL, - 0); - if (pathw_len == 0) { - return GetLastError(); - } - - buf_sz += pathw_len * sizeof(WCHAR); - } - - if (path != NULL && copy_path) { - path_len = 1 + strlen(path); - buf_sz += path_len; - } - - if (new_path != NULL) { - new_pathw_len = MultiByteToWideChar(CP_UTF8, - 0, - new_path, - -1, - NULL, - 0); - if (new_pathw_len == 0) { - return GetLastError(); - } - - buf_sz += new_pathw_len * sizeof(WCHAR); - } - - - if (buf_sz == 0) { - req->file.pathw = NULL; - req->fs.info.new_pathw = NULL; - req->path = NULL; - return 0; - } - - buf = (char*) uv__malloc(buf_sz); - if (buf == NULL) { - return ERROR_OUTOFMEMORY; - } - - pos = buf; - - if (path != NULL) { - DWORD r = MultiByteToWideChar(CP_UTF8, - 0, - path, - -1, - (WCHAR*) pos, - pathw_len); - assert(r == (DWORD) pathw_len); - req->file.pathw = (WCHAR*) pos; - pos += r * sizeof(WCHAR); - } else { - req->file.pathw = NULL; - } - - if (new_path != NULL) { - DWORD r = MultiByteToWideChar(CP_UTF8, - 0, - new_path, - -1, - (WCHAR*) pos, - new_pathw_len); - assert(r == (DWORD) new_pathw_len); - req->fs.info.new_pathw = (WCHAR*) pos; - pos += r * sizeof(WCHAR); - } else { - req->fs.info.new_pathw = NULL; - } - - if (!copy_path) { - req->path = path; - } else if (path) { - memcpy(pos, path, path_len); - assert(path_len == buf_sz - (pos - buf)); - req->path = pos; - } else { - req->path = NULL; - } - - req->flags |= UV_FS_FREE_PATHS; - - return 0; -} - - - -INLINE static void uv_fs_req_init(uv_loop_t* loop, uv_fs_t* req, - uv_fs_type fs_type, const uv_fs_cb cb) { - uv_req_init(loop, (uv_req_t*) req); - - req->type = UV_FS; - req->loop = loop; - req->flags = 0; - req->fs_type = fs_type; - req->result = 0; - req->ptr = NULL; - req->path = NULL; - req->cb = cb; -} - - -INLINE static int fs__readlink_handle(HANDLE handle, char** target_ptr, - uint64_t* target_len_ptr) { - char buffer[MAXIMUM_REPARSE_DATA_BUFFER_SIZE]; - REPARSE_DATA_BUFFER* reparse_data = (REPARSE_DATA_BUFFER*) buffer; - WCHAR *w_target; - DWORD w_target_len; - char* target; - int target_len; - DWORD bytes; - - if (!DeviceIoControl(handle, - FSCTL_GET_REPARSE_POINT, - NULL, - 0, - buffer, - sizeof buffer, - &bytes, - NULL)) { - return -1; - } - - if (reparse_data->ReparseTag == IO_REPARSE_TAG_SYMLINK) { - /* Real symlink */ - w_target = reparse_data->SymbolicLinkReparseBuffer.PathBuffer + - (reparse_data->SymbolicLinkReparseBuffer.SubstituteNameOffset / - sizeof(WCHAR)); - w_target_len = - reparse_data->SymbolicLinkReparseBuffer.SubstituteNameLength / - sizeof(WCHAR); - - /* Real symlinks can contain pretty much everything, but the only thing */ - /* we really care about is undoing the implicit conversion to an NT */ - /* namespaced path that CreateSymbolicLink will perform on absolute */ - /* paths. If the path is win32-namespaced then the user must have */ - /* explicitly made it so, and we better just return the unmodified */ - /* reparse data. */ - if (w_target_len >= 4 && - w_target[0] == L'\\' && - w_target[1] == L'?' && - w_target[2] == L'?' && - w_target[3] == L'\\') { - /* Starts with \??\ */ - if (w_target_len >= 6 && - ((w_target[4] >= L'A' && w_target[4] <= L'Z') || - (w_target[4] >= L'a' && w_target[4] <= L'z')) && - w_target[5] == L':' && - (w_target_len == 6 || w_target[6] == L'\\')) { - /* \??\:\ */ - w_target += 4; - w_target_len -= 4; - - } else if (w_target_len >= 8 && - (w_target[4] == L'U' || w_target[4] == L'u') && - (w_target[5] == L'N' || w_target[5] == L'n') && - (w_target[6] == L'C' || w_target[6] == L'c') && - w_target[7] == L'\\') { - /* \??\UNC\\\ - make sure the final path looks like */ - /* \\\\ */ - w_target += 6; - w_target[0] = L'\\'; - w_target_len -= 6; - } - } - - } else if (reparse_data->ReparseTag == IO_REPARSE_TAG_MOUNT_POINT) { - /* Junction. */ - w_target = reparse_data->MountPointReparseBuffer.PathBuffer + - (reparse_data->MountPointReparseBuffer.SubstituteNameOffset / - sizeof(WCHAR)); - w_target_len = reparse_data->MountPointReparseBuffer.SubstituteNameLength / - sizeof(WCHAR); - - /* Only treat junctions that look like \??\:\ as symlink. */ - /* Junctions can also be used as mount points, like \??\Volume{}, */ - /* but that's confusing for programs since they wouldn't be able to */ - /* actually understand such a path when returned by uv_readlink(). */ - /* UNC paths are never valid for junctions so we don't care about them. */ - if (!(w_target_len >= 6 && - w_target[0] == L'\\' && - w_target[1] == L'?' && - w_target[2] == L'?' && - w_target[3] == L'\\' && - ((w_target[4] >= L'A' && w_target[4] <= L'Z') || - (w_target[4] >= L'a' && w_target[4] <= L'z')) && - w_target[5] == L':' && - (w_target_len == 6 || w_target[6] == L'\\'))) { - SetLastError(ERROR_SYMLINK_NOT_SUPPORTED); - return -1; - } - - /* Remove leading \??\ */ - w_target += 4; - w_target_len -= 4; - - } else { - /* Reparse tag does not indicate a symlink. */ - SetLastError(ERROR_SYMLINK_NOT_SUPPORTED); - return -1; - } - - /* If needed, compute the length of the target. */ - if (target_ptr != NULL || target_len_ptr != NULL) { - /* Compute the length of the target. */ - target_len = WideCharToMultiByte(CP_UTF8, - 0, - w_target, - w_target_len, - NULL, - 0, - NULL, - NULL); - if (target_len == 0) { - return -1; - } - } - - /* If requested, allocate memory and convert to UTF8. */ - if (target_ptr != NULL) { - int r; - target = (char*) uv__malloc(target_len + 1); - if (target == NULL) { - SetLastError(ERROR_OUTOFMEMORY); - return -1; - } - - r = WideCharToMultiByte(CP_UTF8, - 0, - w_target, - w_target_len, - target, - target_len, - NULL, - NULL); - assert(r == target_len); - target[target_len] = '\0'; - - *target_ptr = target; - } - - if (target_len_ptr != NULL) { - *target_len_ptr = target_len; - } - - return 0; -} - - -void fs__open(uv_fs_t* req) { - DWORD access; - DWORD share; - DWORD disposition; - DWORD attributes = 0; - HANDLE file; - int fd, current_umask; - int flags = req->fs.info.file_flags; - - /* Obtain the active umask. umask() never fails and returns the previous */ - /* umask. */ - current_umask = umask(0); - umask(current_umask); - - /* convert flags and mode to CreateFile parameters */ - switch (flags & (_O_RDONLY | _O_WRONLY | _O_RDWR)) { - case _O_RDONLY: - access = FILE_GENERIC_READ; - attributes |= FILE_FLAG_BACKUP_SEMANTICS; - break; - case _O_WRONLY: - access = FILE_GENERIC_WRITE; - break; - case _O_RDWR: - access = FILE_GENERIC_READ | FILE_GENERIC_WRITE; - break; - default: - goto einval; - } - - if (flags & _O_APPEND) { - access &= ~FILE_WRITE_DATA; - access |= FILE_APPEND_DATA; - attributes &= ~FILE_FLAG_BACKUP_SEMANTICS; - } - - /* - * Here is where we deviate significantly from what CRT's _open() - * does. We indiscriminately use all the sharing modes, to match - * UNIX semantics. In particular, this ensures that the file can - * be deleted even whilst it's open, fixing issue #1449. - */ - share = FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE; - - switch (flags & (_O_CREAT | _O_EXCL | _O_TRUNC)) { - case 0: - case _O_EXCL: - disposition = OPEN_EXISTING; - break; - case _O_CREAT: - disposition = OPEN_ALWAYS; - break; - case _O_CREAT | _O_EXCL: - case _O_CREAT | _O_TRUNC | _O_EXCL: - disposition = CREATE_NEW; - break; - case _O_TRUNC: - case _O_TRUNC | _O_EXCL: - disposition = TRUNCATE_EXISTING; - break; - case _O_CREAT | _O_TRUNC: - disposition = CREATE_ALWAYS; - break; - default: - goto einval; - } - - attributes |= FILE_ATTRIBUTE_NORMAL; - if (flags & _O_CREAT) { - if (!((req->fs.info.mode & ~current_umask) & _S_IWRITE)) { - attributes |= FILE_ATTRIBUTE_READONLY; - } - } - - if (flags & _O_TEMPORARY ) { - attributes |= FILE_FLAG_DELETE_ON_CLOSE | FILE_ATTRIBUTE_TEMPORARY; - access |= DELETE; - } - - if (flags & _O_SHORT_LIVED) { - attributes |= FILE_ATTRIBUTE_TEMPORARY; - } - - switch (flags & (_O_SEQUENTIAL | _O_RANDOM)) { - case 0: - break; - case _O_SEQUENTIAL: - attributes |= FILE_FLAG_SEQUENTIAL_SCAN; - break; - case _O_RANDOM: - attributes |= FILE_FLAG_RANDOM_ACCESS; - break; - default: - goto einval; - } - - /* Setting this flag makes it possible to open a directory. */ - attributes |= FILE_FLAG_BACKUP_SEMANTICS; - - file = CreateFileW(req->file.pathw, - access, - share, - NULL, - disposition, - attributes, - NULL); - if (file == INVALID_HANDLE_VALUE) { - DWORD error = GetLastError(); - if (error == ERROR_FILE_EXISTS && (flags & _O_CREAT) && - !(flags & _O_EXCL)) { - /* Special case: when ERROR_FILE_EXISTS happens and O_CREAT was */ - /* specified, it means the path referred to a directory. */ - SET_REQ_UV_ERROR(req, UV_EISDIR, error); - } else { - SET_REQ_WIN32_ERROR(req, GetLastError()); - } - return; - } - - fd = _open_osfhandle((intptr_t) file, flags); - if (fd < 0) { - /* The only known failure mode for _open_osfhandle() is EMFILE, in which - * case GetLastError() will return zero. However we'll try to handle other - * errors as well, should they ever occur. - */ - if (errno == EMFILE) - SET_REQ_UV_ERROR(req, UV_EMFILE, ERROR_TOO_MANY_OPEN_FILES); - else if (GetLastError() != ERROR_SUCCESS) - SET_REQ_WIN32_ERROR(req, GetLastError()); - else - SET_REQ_WIN32_ERROR(req, UV_UNKNOWN); - CloseHandle(file); - return; - } - - SET_REQ_RESULT(req, fd); - return; - - einval: - SET_REQ_UV_ERROR(req, UV_EINVAL, ERROR_INVALID_PARAMETER); -} - -void fs__close(uv_fs_t* req) { - int fd = req->file.fd; - int result; - - VERIFY_FD(fd, req); - - if (fd > 2) - result = _close(fd); - else - result = 0; - - SET_REQ_RESULT(req, result); -} - - -void fs__read(uv_fs_t* req) { - int fd = req->file.fd; - int64_t offset = req->fs.info.offset; - HANDLE handle; - OVERLAPPED overlapped, *overlapped_ptr; - LARGE_INTEGER offset_; - DWORD bytes; - DWORD error; - int result; - unsigned int index; - - VERIFY_FD(fd, req); - - handle = uv__get_osfhandle(fd); - - if (handle == INVALID_HANDLE_VALUE) { - SET_REQ_WIN32_ERROR(req, ERROR_INVALID_HANDLE); - return; - } - - if (offset != -1) { - memset(&overlapped, 0, sizeof overlapped); - overlapped_ptr = &overlapped; - } else { - overlapped_ptr = NULL; - } - - index = 0; - bytes = 0; - do { - DWORD incremental_bytes; - - if (offset != -1) { - offset_.QuadPart = offset + bytes; - overlapped.Offset = offset_.LowPart; - overlapped.OffsetHigh = offset_.HighPart; - } - - result = ReadFile(handle, - req->fs.info.bufs[index].base, - req->fs.info.bufs[index].len, - &incremental_bytes, - overlapped_ptr); - bytes += incremental_bytes; - ++index; - } while (result && index < req->fs.info.nbufs); - - if (result || bytes > 0) { - SET_REQ_RESULT(req, bytes); - } else { - error = GetLastError(); - if (error == ERROR_HANDLE_EOF) { - SET_REQ_RESULT(req, bytes); - } else { - SET_REQ_WIN32_ERROR(req, error); - } - } -} - - -void fs__write(uv_fs_t* req) { - int fd = req->file.fd; - int64_t offset = req->fs.info.offset; - HANDLE handle; - OVERLAPPED overlapped, *overlapped_ptr; - LARGE_INTEGER offset_; - DWORD bytes; - int result; - unsigned int index; - - VERIFY_FD(fd, req); - - handle = uv__get_osfhandle(fd); - if (handle == INVALID_HANDLE_VALUE) { - SET_REQ_WIN32_ERROR(req, ERROR_INVALID_HANDLE); - return; - } - - if (offset != -1) { - memset(&overlapped, 0, sizeof overlapped); - overlapped_ptr = &overlapped; - } else { - overlapped_ptr = NULL; - } - - index = 0; - bytes = 0; - do { - DWORD incremental_bytes; - - if (offset != -1) { - offset_.QuadPart = offset + bytes; - overlapped.Offset = offset_.LowPart; - overlapped.OffsetHigh = offset_.HighPart; - } - - result = WriteFile(handle, - req->fs.info.bufs[index].base, - req->fs.info.bufs[index].len, - &incremental_bytes, - overlapped_ptr); - bytes += incremental_bytes; - ++index; - } while (result && index < req->fs.info.nbufs); - - if (result || bytes > 0) { - SET_REQ_RESULT(req, bytes); - } else { - SET_REQ_WIN32_ERROR(req, GetLastError()); - } -} - - -void fs__rmdir(uv_fs_t* req) { - int result = _wrmdir(req->file.pathw); - SET_REQ_RESULT(req, result); -} - - -void fs__unlink(uv_fs_t* req) { - const WCHAR* pathw = req->file.pathw; - HANDLE handle; - BY_HANDLE_FILE_INFORMATION info; - FILE_DISPOSITION_INFORMATION disposition; - IO_STATUS_BLOCK iosb; - NTSTATUS status; - - handle = CreateFileW(pathw, - FILE_READ_ATTRIBUTES | FILE_WRITE_ATTRIBUTES | DELETE, - FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, - NULL, - OPEN_EXISTING, - FILE_FLAG_OPEN_REPARSE_POINT | FILE_FLAG_BACKUP_SEMANTICS, - NULL); - - if (handle == INVALID_HANDLE_VALUE) { - SET_REQ_WIN32_ERROR(req, GetLastError()); - return; - } - - if (!GetFileInformationByHandle(handle, &info)) { - SET_REQ_WIN32_ERROR(req, GetLastError()); - CloseHandle(handle); - return; - } - - if (info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { - /* Do not allow deletion of directories, unless it is a symlink. When */ - /* the path refers to a non-symlink directory, report EPERM as mandated */ - /* by POSIX.1. */ - - /* Check if it is a reparse point. If it's not, it's a normal directory. */ - if (!(info.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)) { - SET_REQ_WIN32_ERROR(req, ERROR_ACCESS_DENIED); - CloseHandle(handle); - return; - } - - /* Read the reparse point and check if it is a valid symlink. */ - /* If not, don't unlink. */ - if (fs__readlink_handle(handle, NULL, NULL) < 0) { - DWORD error = GetLastError(); - if (error == ERROR_SYMLINK_NOT_SUPPORTED) - error = ERROR_ACCESS_DENIED; - SET_REQ_WIN32_ERROR(req, error); - CloseHandle(handle); - return; - } - } - - if (info.dwFileAttributes & FILE_ATTRIBUTE_READONLY) { - /* Remove read-only attribute */ - FILE_BASIC_INFORMATION basic = { 0 }; - - basic.FileAttributes = info.dwFileAttributes & ~(FILE_ATTRIBUTE_READONLY); - - status = pNtSetInformationFile(handle, - &iosb, - &basic, - sizeof basic, - FileBasicInformation); - if (!NT_SUCCESS(status)) { - SET_REQ_WIN32_ERROR(req, pRtlNtStatusToDosError(status)); - CloseHandle(handle); - return; - } - } - - /* Try to set the delete flag. */ - disposition.DeleteFile = TRUE; - status = pNtSetInformationFile(handle, - &iosb, - &disposition, - sizeof disposition, - FileDispositionInformation); - if (NT_SUCCESS(status)) { - SET_REQ_SUCCESS(req); - } else { - SET_REQ_WIN32_ERROR(req, pRtlNtStatusToDosError(status)); - } - - CloseHandle(handle); -} - - -void fs__mkdir(uv_fs_t* req) { - /* TODO: use req->mode. */ - int result = _wmkdir(req->file.pathw); - SET_REQ_RESULT(req, result); -} - - -/* OpenBSD original: lib/libc/stdio/mktemp.c */ -void fs__mkdtemp(uv_fs_t* req) { - static const WCHAR *tempchars = - L"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; - static const size_t num_chars = 62; - static const size_t num_x = 6; - WCHAR *cp, *ep; - unsigned int tries, i; - size_t len; - HCRYPTPROV h_crypt_prov; - uint64_t v; - BOOL released; - - len = wcslen(req->file.pathw); - ep = req->file.pathw + len; - if (len < num_x || wcsncmp(ep - num_x, L"XXXXXX", num_x)) { - SET_REQ_UV_ERROR(req, UV_EINVAL, ERROR_INVALID_PARAMETER); - return; - } - - if (!CryptAcquireContext(&h_crypt_prov, NULL, NULL, PROV_RSA_FULL, - CRYPT_VERIFYCONTEXT)) { - SET_REQ_WIN32_ERROR(req, GetLastError()); - return; - } - - tries = TMP_MAX; - do { - if (!CryptGenRandom(h_crypt_prov, sizeof(v), (BYTE*) &v)) { - SET_REQ_WIN32_ERROR(req, GetLastError()); - break; - } - - cp = ep - num_x; - for (i = 0; i < num_x; i++) { - *cp++ = tempchars[v % num_chars]; - v /= num_chars; - } - - if (_wmkdir(req->file.pathw) == 0) { - len = strlen(req->path); - wcstombs((char*) req->path + len - num_x, ep - num_x, num_x); - SET_REQ_RESULT(req, 0); - break; - } else if (errno != EEXIST) { - SET_REQ_RESULT(req, -1); - break; - } - } while (--tries); - - released = CryptReleaseContext(h_crypt_prov, 0); - assert(released); - if (tries == 0) { - SET_REQ_RESULT(req, -1); - } -} - - -void fs__scandir(uv_fs_t* req) { - static const size_t dirents_initial_size = 32; - - HANDLE dir_handle = INVALID_HANDLE_VALUE; - - uv__dirent_t** dirents = NULL; - size_t dirents_size = 0; - size_t dirents_used = 0; - - IO_STATUS_BLOCK iosb; - NTSTATUS status; - - /* Buffer to hold directory entries returned by NtQueryDirectoryFile. - * It's important that this buffer can hold at least one entry, regardless - * of the length of the file names present in the enumerated directory. - * A file name is at most 256 WCHARs long. - * According to MSDN, the buffer must be aligned at an 8-byte boundary. - */ -#if _MSC_VER - __declspec(align(8)) char buffer[8192]; -#else - __attribute__ ((aligned (8))) char buffer[8192]; -#endif - - STATIC_ASSERT(sizeof buffer >= - sizeof(FILE_DIRECTORY_INFORMATION) + 256 * sizeof(WCHAR)); - - /* Open the directory. */ - dir_handle = - CreateFileW(req->file.pathw, - FILE_LIST_DIRECTORY | SYNCHRONIZE, - FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, - NULL, - OPEN_EXISTING, - FILE_FLAG_BACKUP_SEMANTICS, - NULL); - if (dir_handle == INVALID_HANDLE_VALUE) - goto win32_error; - - /* Read the first chunk. */ - status = pNtQueryDirectoryFile(dir_handle, - NULL, - NULL, - NULL, - &iosb, - &buffer, - sizeof buffer, - FileDirectoryInformation, - FALSE, - NULL, - TRUE); - - /* If the handle is not a directory, we'll get STATUS_INVALID_PARAMETER. - * This should be reported back as UV_ENOTDIR. - */ - if (status == STATUS_INVALID_PARAMETER) - goto not_a_directory_error; - - while (NT_SUCCESS(status)) { - char* position = buffer; - size_t next_entry_offset = 0; - - do { - FILE_DIRECTORY_INFORMATION* info; - uv__dirent_t* dirent; - - size_t wchar_len; - size_t utf8_len; - - /* Obtain a pointer to the current directory entry. */ - position += next_entry_offset; - info = (FILE_DIRECTORY_INFORMATION*) position; - - /* Fetch the offset to the next directory entry. */ - next_entry_offset = info->NextEntryOffset; - - /* Compute the length of the filename in WCHARs. */ - wchar_len = info->FileNameLength / sizeof info->FileName[0]; - - /* Skip over '.' and '..' entries. */ - if (wchar_len == 1 && info->FileName[0] == L'.') - continue; - if (wchar_len == 2 && info->FileName[0] == L'.' && - info->FileName[1] == L'.') - continue; - - /* Compute the space required to store the filename as UTF-8. */ - utf8_len = WideCharToMultiByte( - CP_UTF8, 0, &info->FileName[0], wchar_len, NULL, 0, NULL, NULL); - if (utf8_len == 0) - goto win32_error; - - /* Resize the dirent array if needed. */ - if (dirents_used >= dirents_size) { - size_t new_dirents_size = - dirents_size == 0 ? dirents_initial_size : dirents_size << 1; - uv__dirent_t** new_dirents = - uv__realloc(dirents, new_dirents_size * sizeof *dirents); - - if (new_dirents == NULL) - goto out_of_memory_error; - - dirents_size = new_dirents_size; - dirents = new_dirents; - } - - /* Allocate space for the uv dirent structure. The dirent structure - * includes room for the first character of the filename, but `utf8_len` - * doesn't count the NULL terminator at this point. - */ - dirent = uv__malloc(sizeof *dirent + utf8_len); - if (dirent == NULL) - goto out_of_memory_error; - - dirents[dirents_used++] = dirent; - - /* Convert file name to UTF-8. */ - if (WideCharToMultiByte(CP_UTF8, - 0, - &info->FileName[0], - wchar_len, - &dirent->d_name[0], - utf8_len, - NULL, - NULL) == 0) - goto win32_error; - - /* Add a null terminator to the filename. */ - dirent->d_name[utf8_len] = '\0'; - - /* Fill out the type field. */ - if (info->FileAttributes & FILE_ATTRIBUTE_DEVICE) - dirent->d_type = UV__DT_CHAR; - else if (info->FileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) - dirent->d_type = UV__DT_LINK; - else if (info->FileAttributes & FILE_ATTRIBUTE_DIRECTORY) - dirent->d_type = UV__DT_DIR; - else - dirent->d_type = UV__DT_FILE; - } while (next_entry_offset != 0); - - /* Read the next chunk. */ - status = pNtQueryDirectoryFile(dir_handle, - NULL, - NULL, - NULL, - &iosb, - &buffer, - sizeof buffer, - FileDirectoryInformation, - FALSE, - NULL, - FALSE); - - /* After the first pNtQueryDirectoryFile call, the function may return - * STATUS_SUCCESS even if the buffer was too small to hold at least one - * directory entry. - */ - if (status == STATUS_SUCCESS && iosb.Information == 0) - status = STATUS_BUFFER_OVERFLOW; - } - - if (status != STATUS_NO_MORE_FILES) - goto nt_error; - - CloseHandle(dir_handle); - - /* Store the result in the request object. */ - req->ptr = dirents; - if (dirents != NULL) - req->flags |= UV_FS_FREE_PTR; - - SET_REQ_RESULT(req, dirents_used); - - /* `nbufs` will be used as index by uv_fs_scandir_next. */ - req->fs.info.nbufs = 0; - - return; - -nt_error: - SET_REQ_WIN32_ERROR(req, pRtlNtStatusToDosError(status)); - goto cleanup; - -win32_error: - SET_REQ_WIN32_ERROR(req, GetLastError()); - goto cleanup; - -not_a_directory_error: - SET_REQ_UV_ERROR(req, UV_ENOTDIR, ERROR_DIRECTORY); - goto cleanup; - -out_of_memory_error: - SET_REQ_UV_ERROR(req, UV_ENOMEM, ERROR_OUTOFMEMORY); - goto cleanup; - -cleanup: - if (dir_handle != INVALID_HANDLE_VALUE) - CloseHandle(dir_handle); - while (dirents_used > 0) - uv__free(dirents[--dirents_used]); - if (dirents != NULL) - uv__free(dirents); -} - - -INLINE static int fs__stat_handle(HANDLE handle, uv_stat_t* statbuf) { - FILE_ALL_INFORMATION file_info; - FILE_FS_VOLUME_INFORMATION volume_info; - NTSTATUS nt_status; - IO_STATUS_BLOCK io_status; - - nt_status = pNtQueryInformationFile(handle, - &io_status, - &file_info, - sizeof file_info, - FileAllInformation); - - /* Buffer overflow (a warning status code) is expected here. */ - if (NT_ERROR(nt_status)) { - SetLastError(pRtlNtStatusToDosError(nt_status)); - return -1; - } - - nt_status = pNtQueryVolumeInformationFile(handle, - &io_status, - &volume_info, - sizeof volume_info, - FileFsVolumeInformation); - - /* Buffer overflow (a warning status code) is expected here. */ - if (io_status.Status == STATUS_NOT_IMPLEMENTED) { - statbuf->st_dev = 0; - } else if (NT_ERROR(nt_status)) { - SetLastError(pRtlNtStatusToDosError(nt_status)); - return -1; - } else { - statbuf->st_dev = volume_info.VolumeSerialNumber; - } - - /* Todo: st_mode should probably always be 0666 for everyone. We might also - * want to report 0777 if the file is a .exe or a directory. - * - * Currently it's based on whether the 'readonly' attribute is set, which - * makes little sense because the semantics are so different: the 'read-only' - * flag is just a way for a user to protect against accidental deletion, and - * serves no security purpose. Windows uses ACLs for that. - * - * Also people now use uv_fs_chmod() to take away the writable bit for good - * reasons. Windows however just makes the file read-only, which makes it - * impossible to delete the file afterwards, since read-only files can't be - * deleted. - * - * IOW it's all just a clusterfuck and we should think of something that - * makes slightly more sense. - * - * And uv_fs_chmod should probably just fail on windows or be a total no-op. - * There's nothing sensible it can do anyway. - */ - statbuf->st_mode = 0; - - if (file_info.BasicInformation.FileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) { - statbuf->st_mode |= S_IFLNK; - if (fs__readlink_handle(handle, NULL, &statbuf->st_size) != 0) - return -1; - - } else if (file_info.BasicInformation.FileAttributes & FILE_ATTRIBUTE_DIRECTORY) { - statbuf->st_mode |= _S_IFDIR; - statbuf->st_size = 0; - - } else { - statbuf->st_mode |= _S_IFREG; - statbuf->st_size = file_info.StandardInformation.EndOfFile.QuadPart; - } - - if (file_info.BasicInformation.FileAttributes & FILE_ATTRIBUTE_READONLY) - statbuf->st_mode |= _S_IREAD | (_S_IREAD >> 3) | (_S_IREAD >> 6); - else - statbuf->st_mode |= (_S_IREAD | _S_IWRITE) | ((_S_IREAD | _S_IWRITE) >> 3) | - ((_S_IREAD | _S_IWRITE) >> 6); - - FILETIME_TO_TIMESPEC(statbuf->st_atim, file_info.BasicInformation.LastAccessTime); - FILETIME_TO_TIMESPEC(statbuf->st_ctim, file_info.BasicInformation.ChangeTime); - FILETIME_TO_TIMESPEC(statbuf->st_mtim, file_info.BasicInformation.LastWriteTime); - FILETIME_TO_TIMESPEC(statbuf->st_birthtim, file_info.BasicInformation.CreationTime); - - statbuf->st_ino = file_info.InternalInformation.IndexNumber.QuadPart; - - /* st_blocks contains the on-disk allocation size in 512-byte units. */ - statbuf->st_blocks = - file_info.StandardInformation.AllocationSize.QuadPart >> 9ULL; - - statbuf->st_nlink = file_info.StandardInformation.NumberOfLinks; - - /* The st_blksize is supposed to be the 'optimal' number of bytes for reading - * and writing to the disk. That is, for any definition of 'optimal' - it's - * supposed to at least avoid read-update-write behavior when writing to the - * disk. - * - * However nobody knows this and even fewer people actually use this value, - * and in order to fill it out we'd have to make another syscall to query the - * volume for FILE_FS_SECTOR_SIZE_INFORMATION. - * - * Therefore we'll just report a sensible value that's quite commonly okay - * on modern hardware. - */ - statbuf->st_blksize = 2048; - - /* Todo: set st_flags to something meaningful. Also provide a wrapper for - * chattr(2). - */ - statbuf->st_flags = 0; - - /* Windows has nothing sensible to say about these values, so they'll just - * remain empty. - */ - statbuf->st_gid = 0; - statbuf->st_uid = 0; - statbuf->st_rdev = 0; - statbuf->st_gen = 0; - - return 0; -} - - -INLINE static void fs__stat_prepare_path(WCHAR* pathw) { - size_t len = wcslen(pathw); - - /* TODO: ignore namespaced paths. */ - if (len > 1 && pathw[len - 2] != L':' && - (pathw[len - 1] == L'\\' || pathw[len - 1] == L'/')) { - pathw[len - 1] = '\0'; - } -} - - -INLINE static void fs__stat_impl(uv_fs_t* req, int do_lstat) { - HANDLE handle; - DWORD flags; - - flags = FILE_FLAG_BACKUP_SEMANTICS; - if (do_lstat) { - flags |= FILE_FLAG_OPEN_REPARSE_POINT; - } - - handle = CreateFileW(req->file.pathw, - FILE_READ_ATTRIBUTES, - FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, - NULL, - OPEN_EXISTING, - flags, - NULL); - if (handle == INVALID_HANDLE_VALUE) { - SET_REQ_WIN32_ERROR(req, GetLastError()); - return; - } - - if (fs__stat_handle(handle, &req->statbuf) != 0) { - DWORD error = GetLastError(); - if (do_lstat && error == ERROR_SYMLINK_NOT_SUPPORTED) { - /* We opened a reparse point but it was not a symlink. Try again. */ - fs__stat_impl(req, 0); - - } else { - /* Stat failed. */ - SET_REQ_WIN32_ERROR(req, GetLastError()); - } - - CloseHandle(handle); - return; - } - - req->ptr = &req->statbuf; - req->result = 0; - CloseHandle(handle); -} - - -static void fs__stat(uv_fs_t* req) { - fs__stat_prepare_path(req->file.pathw); - fs__stat_impl(req, 0); -} - - -static void fs__lstat(uv_fs_t* req) { - fs__stat_prepare_path(req->file.pathw); - fs__stat_impl(req, 1); -} - - -static void fs__fstat(uv_fs_t* req) { - int fd = req->file.fd; - HANDLE handle; - - VERIFY_FD(fd, req); - - handle = uv__get_osfhandle(fd); - - if (handle == INVALID_HANDLE_VALUE) { - SET_REQ_WIN32_ERROR(req, ERROR_INVALID_HANDLE); - return; - } - - if (fs__stat_handle(handle, &req->statbuf) != 0) { - SET_REQ_WIN32_ERROR(req, GetLastError()); - return; - } - - req->ptr = &req->statbuf; - req->result = 0; -} - - -static void fs__rename(uv_fs_t* req) { - if (!MoveFileExW(req->file.pathw, req->fs.info.new_pathw, MOVEFILE_REPLACE_EXISTING)) { - SET_REQ_WIN32_ERROR(req, GetLastError()); - return; - } - - SET_REQ_RESULT(req, 0); -} - - -INLINE static void fs__sync_impl(uv_fs_t* req) { - int fd = req->file.fd; - int result; - - VERIFY_FD(fd, req); - - result = FlushFileBuffers(uv__get_osfhandle(fd)) ? 0 : -1; - if (result == -1) { - SET_REQ_WIN32_ERROR(req, GetLastError()); - } else { - SET_REQ_RESULT(req, result); - } -} - - -static void fs__fsync(uv_fs_t* req) { - fs__sync_impl(req); -} - - -static void fs__fdatasync(uv_fs_t* req) { - fs__sync_impl(req); -} - - -static void fs__ftruncate(uv_fs_t* req) { - int fd = req->file.fd; - HANDLE handle; - NTSTATUS status; - IO_STATUS_BLOCK io_status; - FILE_END_OF_FILE_INFORMATION eof_info; - - VERIFY_FD(fd, req); - - handle = uv__get_osfhandle(fd); - - eof_info.EndOfFile.QuadPart = req->fs.info.offset; - - status = pNtSetInformationFile(handle, - &io_status, - &eof_info, - sizeof eof_info, - FileEndOfFileInformation); - - if (NT_SUCCESS(status)) { - SET_REQ_RESULT(req, 0); - } else { - SET_REQ_WIN32_ERROR(req, pRtlNtStatusToDosError(status)); - } -} - - -static void fs__sendfile(uv_fs_t* req) { - int fd_in = req->file.fd, fd_out = req->fs.info.fd_out; - size_t length = req->fs.info.bufsml[0].len; - int64_t offset = req->fs.info.offset; - const size_t max_buf_size = 65536; - size_t buf_size = length < max_buf_size ? length : max_buf_size; - int n, result = 0; - int64_t result_offset = 0; - char* buf = (char*) uv__malloc(buf_size); - if (!buf) { - uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc"); - } - - if (offset != -1) { - result_offset = _lseeki64(fd_in, offset, SEEK_SET); - } - - if (result_offset == -1) { - result = -1; - } else { - while (length > 0) { - n = _read(fd_in, buf, length < buf_size ? length : buf_size); - if (n == 0) { - break; - } else if (n == -1) { - result = -1; - break; - } - - length -= n; - - n = _write(fd_out, buf, n); - if (n == -1) { - result = -1; - break; - } - - result += n; - } - } - - uv__free(buf); - - SET_REQ_RESULT(req, result); -} - - -static void fs__access(uv_fs_t* req) { - DWORD attr = GetFileAttributesW(req->file.pathw); - - if (attr == INVALID_FILE_ATTRIBUTES) { - SET_REQ_WIN32_ERROR(req, GetLastError()); - return; - } - - /* - * Access is possible if - * - write access wasn't requested, - * - or the file isn't read-only, - * - or it's a directory. - * (Directories cannot be read-only on Windows.) - */ - if (!(req->flags & W_OK) || - !(attr & FILE_ATTRIBUTE_READONLY) || - (attr & FILE_ATTRIBUTE_DIRECTORY)) { - SET_REQ_RESULT(req, 0); - } else { - SET_REQ_WIN32_ERROR(req, UV_EPERM); - } - -} - - -static void fs__chmod(uv_fs_t* req) { - int result = _wchmod(req->file.pathw, req->fs.info.mode); - SET_REQ_RESULT(req, result); -} - - -static void fs__fchmod(uv_fs_t* req) { - int fd = req->file.fd; - HANDLE handle; - NTSTATUS nt_status; - IO_STATUS_BLOCK io_status; - FILE_BASIC_INFORMATION file_info; - - VERIFY_FD(fd, req); - - handle = uv__get_osfhandle(fd); - - nt_status = pNtQueryInformationFile(handle, - &io_status, - &file_info, - sizeof file_info, - FileBasicInformation); - - if (!NT_SUCCESS(nt_status)) { - SET_REQ_WIN32_ERROR(req, pRtlNtStatusToDosError(nt_status)); - return; - } - - if (req->fs.info.mode & _S_IWRITE) { - file_info.FileAttributes &= ~FILE_ATTRIBUTE_READONLY; - } else { - file_info.FileAttributes |= FILE_ATTRIBUTE_READONLY; - } - - nt_status = pNtSetInformationFile(handle, - &io_status, - &file_info, - sizeof file_info, - FileBasicInformation); - - if (!NT_SUCCESS(nt_status)) { - SET_REQ_WIN32_ERROR(req, pRtlNtStatusToDosError(nt_status)); - return; - } - - SET_REQ_SUCCESS(req); -} - - -INLINE static int fs__utime_handle(HANDLE handle, double atime, double mtime) { - FILETIME filetime_a, filetime_m; - - TIME_T_TO_FILETIME((time_t) atime, &filetime_a); - TIME_T_TO_FILETIME((time_t) mtime, &filetime_m); - - if (!SetFileTime(handle, NULL, &filetime_a, &filetime_m)) { - return -1; - } - - return 0; -} - - -static void fs__utime(uv_fs_t* req) { - HANDLE handle; - - handle = CreateFileW(req->file.pathw, - FILE_WRITE_ATTRIBUTES, - FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, - NULL, - OPEN_EXISTING, - FILE_FLAG_BACKUP_SEMANTICS, - NULL); - - if (handle == INVALID_HANDLE_VALUE) { - SET_REQ_WIN32_ERROR(req, GetLastError()); - return; - } - - if (fs__utime_handle(handle, req->fs.time.atime, req->fs.time.mtime) != 0) { - SET_REQ_WIN32_ERROR(req, GetLastError()); - CloseHandle(handle); - return; - } - - CloseHandle(handle); - - req->result = 0; -} - - -static void fs__futime(uv_fs_t* req) { - int fd = req->file.fd; - HANDLE handle; - VERIFY_FD(fd, req); - - handle = uv__get_osfhandle(fd); - - if (handle == INVALID_HANDLE_VALUE) { - SET_REQ_WIN32_ERROR(req, ERROR_INVALID_HANDLE); - return; - } - - if (fs__utime_handle(handle, req->fs.time.atime, req->fs.time.mtime) != 0) { - SET_REQ_WIN32_ERROR(req, GetLastError()); - return; - } - - req->result = 0; -} - - -static void fs__link(uv_fs_t* req) { - DWORD r = CreateHardLinkW(req->fs.info.new_pathw, req->file.pathw, NULL); - if (r == 0) { - SET_REQ_WIN32_ERROR(req, GetLastError()); - } else { - req->result = 0; - } -} - - -static void fs__create_junction(uv_fs_t* req, const WCHAR* path, - const WCHAR* new_path) { - HANDLE handle = INVALID_HANDLE_VALUE; - REPARSE_DATA_BUFFER *buffer = NULL; - int created = 0; - int target_len; - int is_absolute, is_long_path; - int needed_buf_size, used_buf_size, used_data_size, path_buf_len; - int start, len, i; - int add_slash; - DWORD bytes; - WCHAR* path_buf; - - target_len = wcslen(path); - is_long_path = wcsncmp(path, LONG_PATH_PREFIX, LONG_PATH_PREFIX_LEN) == 0; - - if (is_long_path) { - is_absolute = 1; - } else { - is_absolute = target_len >= 3 && IS_LETTER(path[0]) && - path[1] == L':' && IS_SLASH(path[2]); - } - - if (!is_absolute) { - /* Not supporting relative paths */ - SET_REQ_UV_ERROR(req, UV_EINVAL, ERROR_NOT_SUPPORTED); - return; - } - - /* Do a pessimistic calculation of the required buffer size */ - needed_buf_size = - FIELD_OFFSET(REPARSE_DATA_BUFFER, MountPointReparseBuffer.PathBuffer) + - JUNCTION_PREFIX_LEN * sizeof(WCHAR) + - 2 * (target_len + 2) * sizeof(WCHAR); - - /* Allocate the buffer */ - buffer = (REPARSE_DATA_BUFFER*)uv__malloc(needed_buf_size); - if (!buffer) { - uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc"); - } - - /* Grab a pointer to the part of the buffer where filenames go */ - path_buf = (WCHAR*)&(buffer->MountPointReparseBuffer.PathBuffer); - path_buf_len = 0; - - /* Copy the substitute (internal) target path */ - start = path_buf_len; - - wcsncpy((WCHAR*)&path_buf[path_buf_len], JUNCTION_PREFIX, - JUNCTION_PREFIX_LEN); - path_buf_len += JUNCTION_PREFIX_LEN; - - add_slash = 0; - for (i = is_long_path ? LONG_PATH_PREFIX_LEN : 0; path[i] != L'\0'; i++) { - if (IS_SLASH(path[i])) { - add_slash = 1; - continue; - } - - if (add_slash) { - path_buf[path_buf_len++] = L'\\'; - add_slash = 0; - } - - path_buf[path_buf_len++] = path[i]; - } - path_buf[path_buf_len++] = L'\\'; - len = path_buf_len - start; - - /* Set the info about the substitute name */ - buffer->MountPointReparseBuffer.SubstituteNameOffset = start * sizeof(WCHAR); - buffer->MountPointReparseBuffer.SubstituteNameLength = len * sizeof(WCHAR); - - /* Insert null terminator */ - path_buf[path_buf_len++] = L'\0'; - - /* Copy the print name of the target path */ - start = path_buf_len; - add_slash = 0; - for (i = is_long_path ? LONG_PATH_PREFIX_LEN : 0; path[i] != L'\0'; i++) { - if (IS_SLASH(path[i])) { - add_slash = 1; - continue; - } - - if (add_slash) { - path_buf[path_buf_len++] = L'\\'; - add_slash = 0; - } - - path_buf[path_buf_len++] = path[i]; - } - len = path_buf_len - start; - if (len == 2) { - path_buf[path_buf_len++] = L'\\'; - len++; - } - - /* Set the info about the print name */ - buffer->MountPointReparseBuffer.PrintNameOffset = start * sizeof(WCHAR); - buffer->MountPointReparseBuffer.PrintNameLength = len * sizeof(WCHAR); - - /* Insert another null terminator */ - path_buf[path_buf_len++] = L'\0'; - - /* Calculate how much buffer space was actually used */ - used_buf_size = FIELD_OFFSET(REPARSE_DATA_BUFFER, MountPointReparseBuffer.PathBuffer) + - path_buf_len * sizeof(WCHAR); - used_data_size = used_buf_size - - FIELD_OFFSET(REPARSE_DATA_BUFFER, MountPointReparseBuffer); - - /* Put general info in the data buffer */ - buffer->ReparseTag = IO_REPARSE_TAG_MOUNT_POINT; - buffer->ReparseDataLength = used_data_size; - buffer->Reserved = 0; - - /* Create a new directory */ - if (!CreateDirectoryW(new_path, NULL)) { - SET_REQ_WIN32_ERROR(req, GetLastError()); - goto error; - } - created = 1; - - /* Open the directory */ - handle = CreateFileW(new_path, - GENERIC_WRITE, - 0, - NULL, - OPEN_EXISTING, - FILE_FLAG_BACKUP_SEMANTICS | - FILE_FLAG_OPEN_REPARSE_POINT, - NULL); - if (handle == INVALID_HANDLE_VALUE) { - SET_REQ_WIN32_ERROR(req, GetLastError()); - goto error; - } - - /* Create the actual reparse point */ - if (!DeviceIoControl(handle, - FSCTL_SET_REPARSE_POINT, - buffer, - used_buf_size, - NULL, - 0, - &bytes, - NULL)) { - SET_REQ_WIN32_ERROR(req, GetLastError()); - goto error; - } - - /* Clean up */ - CloseHandle(handle); - uv__free(buffer); - - SET_REQ_RESULT(req, 0); - return; - -error: - uv__free(buffer); - - if (handle != INVALID_HANDLE_VALUE) { - CloseHandle(handle); - } - - if (created) { - RemoveDirectoryW(new_path); - } -} - - -static void fs__symlink(uv_fs_t* req) { - WCHAR* pathw = req->file.pathw; - WCHAR* new_pathw = req->fs.info.new_pathw; - int flags = req->fs.info.file_flags; - int result; - - - if (flags & UV_FS_SYMLINK_JUNCTION) { - fs__create_junction(req, pathw, new_pathw); - } else if (pCreateSymbolicLinkW) { - result = pCreateSymbolicLinkW(new_pathw, - pathw, - flags & UV_FS_SYMLINK_DIR ? SYMBOLIC_LINK_FLAG_DIRECTORY : 0) ? 0 : -1; - if (result == -1) { - SET_REQ_WIN32_ERROR(req, GetLastError()); - } else { - SET_REQ_RESULT(req, result); - } - } else { - SET_REQ_UV_ERROR(req, UV_ENOSYS, ERROR_NOT_SUPPORTED); - } -} - - -static void fs__readlink(uv_fs_t* req) { - HANDLE handle; - - handle = CreateFileW(req->file.pathw, - 0, - 0, - NULL, - OPEN_EXISTING, - FILE_FLAG_OPEN_REPARSE_POINT | FILE_FLAG_BACKUP_SEMANTICS, - NULL); - - if (handle == INVALID_HANDLE_VALUE) { - SET_REQ_WIN32_ERROR(req, GetLastError()); - return; - } - - if (fs__readlink_handle(handle, (char**) &req->ptr, NULL) != 0) { - SET_REQ_WIN32_ERROR(req, GetLastError()); - CloseHandle(handle); - return; - } - - req->flags |= UV_FS_FREE_PTR; - SET_REQ_RESULT(req, 0); - - CloseHandle(handle); -} - - - -static void fs__chown(uv_fs_t* req) { - req->result = 0; -} - - -static void fs__fchown(uv_fs_t* req) { - req->result = 0; -} - - -static void uv__fs_work(struct uv__work* w) { - uv_fs_t* req; - - req = container_of(w, uv_fs_t, work_req); - assert(req->type == UV_FS); - -#define XX(uc, lc) case UV_FS_##uc: fs__##lc(req); break; - switch (req->fs_type) { - XX(OPEN, open) - XX(CLOSE, close) - XX(READ, read) - XX(WRITE, write) - XX(SENDFILE, sendfile) - XX(STAT, stat) - XX(LSTAT, lstat) - XX(FSTAT, fstat) - XX(FTRUNCATE, ftruncate) - XX(UTIME, utime) - XX(FUTIME, futime) - XX(ACCESS, access) - XX(CHMOD, chmod) - XX(FCHMOD, fchmod) - XX(FSYNC, fsync) - XX(FDATASYNC, fdatasync) - XX(UNLINK, unlink) - XX(RMDIR, rmdir) - XX(MKDIR, mkdir) - XX(MKDTEMP, mkdtemp) - XX(RENAME, rename) - XX(SCANDIR, scandir) - XX(LINK, link) - XX(SYMLINK, symlink) - XX(READLINK, readlink) - XX(CHOWN, chown) - XX(FCHOWN, fchown); - default: - assert(!"bad uv_fs_type"); - } -} - - -static void uv__fs_done(struct uv__work* w, int status) { - uv_fs_t* req; - - req = container_of(w, uv_fs_t, work_req); - uv__req_unregister(req->loop, req); - - if (status == UV_ECANCELED) { - assert(req->result == 0); - req->result = UV_ECANCELED; - } - - req->cb(req); -} - - -void uv_fs_req_cleanup(uv_fs_t* req) { - if (req->flags & UV_FS_CLEANEDUP) - return; - - if (req->flags & UV_FS_FREE_PATHS) - uv__free(req->file.pathw); - - if (req->flags & UV_FS_FREE_PTR) - uv__free(req->ptr); - - req->path = NULL; - req->file.pathw = NULL; - req->fs.info.new_pathw = NULL; - req->ptr = NULL; - - req->flags |= UV_FS_CLEANEDUP; -} - - -int uv_fs_open(uv_loop_t* loop, uv_fs_t* req, const char* path, int flags, - int mode, uv_fs_cb cb) { - int err; - - uv_fs_req_init(loop, req, UV_FS_OPEN, cb); - - err = fs__capture_path(req, path, NULL, cb != NULL); - if (err) { - return uv_translate_sys_error(err); - } - - req->fs.info.file_flags = flags; - req->fs.info.mode = mode; - - if (cb) { - QUEUE_FS_TP_JOB(loop, req); - return 0; - } else { - fs__open(req); - return req->result; - } -} - - -int uv_fs_close(uv_loop_t* loop, uv_fs_t* req, uv_file fd, uv_fs_cb cb) { - uv_fs_req_init(loop, req, UV_FS_CLOSE, cb); - req->file.fd = fd; - - if (cb) { - QUEUE_FS_TP_JOB(loop, req); - return 0; - } else { - fs__close(req); - return req->result; - } -} - - -int uv_fs_read(uv_loop_t* loop, - uv_fs_t* req, - uv_file fd, - const uv_buf_t bufs[], - unsigned int nbufs, - int64_t offset, - uv_fs_cb cb) { - if (bufs == NULL || nbufs == 0) - return UV_EINVAL; - - uv_fs_req_init(loop, req, UV_FS_READ, cb); - - req->file.fd = fd; - - req->fs.info.nbufs = nbufs; - req->fs.info.bufs = req->fs.info.bufsml; - if (nbufs > ARRAY_SIZE(req->fs.info.bufsml)) - req->fs.info.bufs = uv__malloc(nbufs * sizeof(*bufs)); - - if (req->fs.info.bufs == NULL) - return UV_ENOMEM; - - memcpy(req->fs.info.bufs, bufs, nbufs * sizeof(*bufs)); - - req->fs.info.offset = offset; - - if (cb) { - QUEUE_FS_TP_JOB(loop, req); - return 0; - } else { - fs__read(req); - return req->result; - } -} - - -int uv_fs_write(uv_loop_t* loop, - uv_fs_t* req, - uv_file fd, - const uv_buf_t bufs[], - unsigned int nbufs, - int64_t offset, - uv_fs_cb cb) { - if (bufs == NULL || nbufs == 0) - return UV_EINVAL; - - uv_fs_req_init(loop, req, UV_FS_WRITE, cb); - - req->file.fd = fd; - - req->fs.info.nbufs = nbufs; - req->fs.info.bufs = req->fs.info.bufsml; - if (nbufs > ARRAY_SIZE(req->fs.info.bufsml)) - req->fs.info.bufs = uv__malloc(nbufs * sizeof(*bufs)); - - if (req->fs.info.bufs == NULL) - return UV_ENOMEM; - - memcpy(req->fs.info.bufs, bufs, nbufs * sizeof(*bufs)); - - req->fs.info.offset = offset; - - if (cb) { - QUEUE_FS_TP_JOB(loop, req); - return 0; - } else { - fs__write(req); - return req->result; - } -} - - -int uv_fs_unlink(uv_loop_t* loop, uv_fs_t* req, const char* path, - uv_fs_cb cb) { - int err; - - uv_fs_req_init(loop, req, UV_FS_UNLINK, cb); - - err = fs__capture_path(req, path, NULL, cb != NULL); - if (err) { - return uv_translate_sys_error(err); - } - - if (cb) { - QUEUE_FS_TP_JOB(loop, req); - return 0; - } else { - fs__unlink(req); - return req->result; - } -} - - -int uv_fs_mkdir(uv_loop_t* loop, uv_fs_t* req, const char* path, int mode, - uv_fs_cb cb) { - int err; - - uv_fs_req_init(loop, req, UV_FS_MKDIR, cb); - - err = fs__capture_path(req, path, NULL, cb != NULL); - if (err) { - return uv_translate_sys_error(err); - } - - req->fs.info.mode = mode; - - if (cb) { - QUEUE_FS_TP_JOB(loop, req); - return 0; - } else { - fs__mkdir(req); - return req->result; - } -} - - -int uv_fs_mkdtemp(uv_loop_t* loop, uv_fs_t* req, const char* tpl, - uv_fs_cb cb) { - int err; - - uv_fs_req_init(loop, req, UV_FS_MKDTEMP, cb); - - err = fs__capture_path(req, tpl, NULL, TRUE); - if (err) - return uv_translate_sys_error(err); - - if (cb) { - QUEUE_FS_TP_JOB(loop, req); - return 0; - } else { - fs__mkdtemp(req); - return req->result; - } -} - - -int uv_fs_rmdir(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb) { - int err; - - uv_fs_req_init(loop, req, UV_FS_RMDIR, cb); - - err = fs__capture_path(req, path, NULL, cb != NULL); - if (err) { - return uv_translate_sys_error(err); - } - - if (cb) { - QUEUE_FS_TP_JOB(loop, req); - return 0; - } else { - fs__rmdir(req); - return req->result; - } -} - - -int uv_fs_scandir(uv_loop_t* loop, uv_fs_t* req, const char* path, int flags, - uv_fs_cb cb) { - int err; - - uv_fs_req_init(loop, req, UV_FS_SCANDIR, cb); - - err = fs__capture_path(req, path, NULL, cb != NULL); - if (err) { - return uv_translate_sys_error(err); - } - - req->fs.info.file_flags = flags; - - if (cb) { - QUEUE_FS_TP_JOB(loop, req); - return 0; - } else { - fs__scandir(req); - return req->result; - } -} - - -int uv_fs_link(uv_loop_t* loop, uv_fs_t* req, const char* path, - const char* new_path, uv_fs_cb cb) { - int err; - - uv_fs_req_init(loop, req, UV_FS_LINK, cb); - - err = fs__capture_path(req, path, new_path, cb != NULL); - if (err) { - return uv_translate_sys_error(err); - } - - if (cb) { - QUEUE_FS_TP_JOB(loop, req); - return 0; - } else { - fs__link(req); - return req->result; - } -} - - -int uv_fs_symlink(uv_loop_t* loop, uv_fs_t* req, const char* path, - const char* new_path, int flags, uv_fs_cb cb) { - int err; - - uv_fs_req_init(loop, req, UV_FS_SYMLINK, cb); - - err = fs__capture_path(req, path, new_path, cb != NULL); - if (err) { - return uv_translate_sys_error(err); - } - - req->fs.info.file_flags = flags; - - if (cb) { - QUEUE_FS_TP_JOB(loop, req); - return 0; - } else { - fs__symlink(req); - return req->result; - } -} - - -int uv_fs_readlink(uv_loop_t* loop, uv_fs_t* req, const char* path, - uv_fs_cb cb) { - int err; - - uv_fs_req_init(loop, req, UV_FS_READLINK, cb); - - err = fs__capture_path(req, path, NULL, cb != NULL); - if (err) { - return uv_translate_sys_error(err); - } - - if (cb) { - QUEUE_FS_TP_JOB(loop, req); - return 0; - } else { - fs__readlink(req); - return req->result; - } -} - - -int uv_fs_chown(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_uid_t uid, - uv_gid_t gid, uv_fs_cb cb) { - int err; - - uv_fs_req_init(loop, req, UV_FS_CHOWN, cb); - - err = fs__capture_path(req, path, NULL, cb != NULL); - if (err) { - return uv_translate_sys_error(err); - } - - if (cb) { - QUEUE_FS_TP_JOB(loop, req); - return 0; - } else { - fs__chown(req); - return req->result; - } -} - - -int uv_fs_fchown(uv_loop_t* loop, uv_fs_t* req, uv_file fd, uv_uid_t uid, - uv_gid_t gid, uv_fs_cb cb) { - uv_fs_req_init(loop, req, UV_FS_FCHOWN, cb); - - if (cb) { - QUEUE_FS_TP_JOB(loop, req); - return 0; - } else { - fs__fchown(req); - return req->result; - } -} - - -int uv_fs_stat(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb) { - int err; - - uv_fs_req_init(loop, req, UV_FS_STAT, cb); - - err = fs__capture_path(req, path, NULL, cb != NULL); - if (err) { - return uv_translate_sys_error(err); - } - - if (cb) { - QUEUE_FS_TP_JOB(loop, req); - return 0; - } else { - fs__stat(req); - return req->result; - } -} - - -int uv_fs_lstat(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb) { - int err; - - uv_fs_req_init(loop, req, UV_FS_LSTAT, cb); - - err = fs__capture_path(req, path, NULL, cb != NULL); - if (err) { - return uv_translate_sys_error(err); - } - - if (cb) { - QUEUE_FS_TP_JOB(loop, req); - return 0; - } else { - fs__lstat(req); - return req->result; - } -} - - -int uv_fs_fstat(uv_loop_t* loop, uv_fs_t* req, uv_file fd, uv_fs_cb cb) { - uv_fs_req_init(loop, req, UV_FS_FSTAT, cb); - req->file.fd = fd; - - if (cb) { - QUEUE_FS_TP_JOB(loop, req); - return 0; - } else { - fs__fstat(req); - return req->result; - } -} - - -int uv_fs_rename(uv_loop_t* loop, uv_fs_t* req, const char* path, - const char* new_path, uv_fs_cb cb) { - int err; - - uv_fs_req_init(loop, req, UV_FS_RENAME, cb); - - err = fs__capture_path(req, path, new_path, cb != NULL); - if (err) { - return uv_translate_sys_error(err); - } - - if (cb) { - QUEUE_FS_TP_JOB(loop, req); - return 0; - } else { - fs__rename(req); - return req->result; - } -} - - -int uv_fs_fsync(uv_loop_t* loop, uv_fs_t* req, uv_file fd, uv_fs_cb cb) { - uv_fs_req_init(loop, req, UV_FS_FSYNC, cb); - req->file.fd = fd; - - if (cb) { - QUEUE_FS_TP_JOB(loop, req); - return 0; - } else { - fs__fsync(req); - return req->result; - } -} - - -int uv_fs_fdatasync(uv_loop_t* loop, uv_fs_t* req, uv_file fd, uv_fs_cb cb) { - uv_fs_req_init(loop, req, UV_FS_FDATASYNC, cb); - req->file.fd = fd; - - if (cb) { - QUEUE_FS_TP_JOB(loop, req); - return 0; - } else { - fs__fdatasync(req); - return req->result; - } -} - - -int uv_fs_ftruncate(uv_loop_t* loop, uv_fs_t* req, uv_file fd, - int64_t offset, uv_fs_cb cb) { - uv_fs_req_init(loop, req, UV_FS_FTRUNCATE, cb); - - req->file.fd = fd; - req->fs.info.offset = offset; - - if (cb) { - QUEUE_FS_TP_JOB(loop, req); - return 0; - } else { - fs__ftruncate(req); - return req->result; - } -} - - - -int uv_fs_sendfile(uv_loop_t* loop, uv_fs_t* req, uv_file fd_out, - uv_file fd_in, int64_t in_offset, size_t length, uv_fs_cb cb) { - uv_fs_req_init(loop, req, UV_FS_SENDFILE, cb); - - req->file.fd = fd_in; - req->fs.info.fd_out = fd_out; - req->fs.info.offset = in_offset; - req->fs.info.bufsml[0].len = length; - - if (cb) { - QUEUE_FS_TP_JOB(loop, req); - return 0; - } else { - fs__sendfile(req); - return req->result; - } -} - - -int uv_fs_access(uv_loop_t* loop, - uv_fs_t* req, - const char* path, - int flags, - uv_fs_cb cb) { - int err; - - uv_fs_req_init(loop, req, UV_FS_ACCESS, cb); - - err = fs__capture_path(req, path, NULL, cb != NULL); - if (err) - return uv_translate_sys_error(err); - - req->flags = flags; - - if (cb) { - QUEUE_FS_TP_JOB(loop, req); - return 0; - } - - fs__access(req); - return req->result; -} - - -int uv_fs_chmod(uv_loop_t* loop, uv_fs_t* req, const char* path, int mode, - uv_fs_cb cb) { - int err; - - uv_fs_req_init(loop, req, UV_FS_CHMOD, cb); - - err = fs__capture_path(req, path, NULL, cb != NULL); - if (err) { - return uv_translate_sys_error(err); - } - - req->fs.info.mode = mode; - - if (cb) { - QUEUE_FS_TP_JOB(loop, req); - return 0; - } else { - fs__chmod(req); - return req->result; - } -} - - -int uv_fs_fchmod(uv_loop_t* loop, uv_fs_t* req, uv_file fd, int mode, - uv_fs_cb cb) { - uv_fs_req_init(loop, req, UV_FS_FCHMOD, cb); - - req->file.fd = fd; - req->fs.info.mode = mode; - - if (cb) { - QUEUE_FS_TP_JOB(loop, req); - return 0; - } else { - fs__fchmod(req); - return req->result; - } -} - - -int uv_fs_utime(uv_loop_t* loop, uv_fs_t* req, const char* path, double atime, - double mtime, uv_fs_cb cb) { - int err; - - uv_fs_req_init(loop, req, UV_FS_UTIME, cb); - - err = fs__capture_path(req, path, NULL, cb != NULL); - if (err) { - return uv_translate_sys_error(err); - } - - req->fs.time.atime = atime; - req->fs.time.mtime = mtime; - - if (cb) { - QUEUE_FS_TP_JOB(loop, req); - return 0; - } else { - fs__utime(req); - return req->result; - } -} - - -int uv_fs_futime(uv_loop_t* loop, uv_fs_t* req, uv_file fd, double atime, - double mtime, uv_fs_cb cb) { - uv_fs_req_init(loop, req, UV_FS_FUTIME, cb); - - req->file.fd = fd; - req->fs.time.atime = atime; - req->fs.time.mtime = mtime; - - if (cb) { - QUEUE_FS_TP_JOB(loop, req); - return 0; - } else { - fs__futime(req); - return req->result; - } -} diff --git a/outside/libuv-v1.7.5/src/win/getaddrinfo.c b/outside/libuv-v1.7.5/src/win/getaddrinfo.c deleted file mode 100644 index 3d23660e8..000000000 --- a/outside/libuv-v1.7.5/src/win/getaddrinfo.c +++ /dev/null @@ -1,361 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include - -#include "uv.h" -#include "internal.h" -#include "req-inl.h" - -/* EAI_* constants. */ -#include - - -int uv__getaddrinfo_translate_error(int sys_err) { - switch (sys_err) { - case 0: return 0; - case WSATRY_AGAIN: return UV_EAI_AGAIN; - case WSAEINVAL: return UV_EAI_BADFLAGS; - case WSANO_RECOVERY: return UV_EAI_FAIL; - case WSAEAFNOSUPPORT: return UV_EAI_FAMILY; - case WSA_NOT_ENOUGH_MEMORY: return UV_EAI_MEMORY; - case WSAHOST_NOT_FOUND: return UV_EAI_NONAME; - case WSATYPE_NOT_FOUND: return UV_EAI_SERVICE; - case WSAESOCKTNOSUPPORT: return UV_EAI_SOCKTYPE; - default: return uv_translate_sys_error(sys_err); - } -} - - -/* - * MinGW is missing this - */ -#if !defined(_MSC_VER) && !defined(__MINGW64_VERSION_MAJOR) - typedef struct addrinfoW { - int ai_flags; - int ai_family; - int ai_socktype; - int ai_protocol; - size_t ai_addrlen; - WCHAR* ai_canonname; - struct sockaddr* ai_addr; - struct addrinfoW* ai_next; - } ADDRINFOW, *PADDRINFOW; - - DECLSPEC_IMPORT int WSAAPI GetAddrInfoW(const WCHAR* node, - const WCHAR* service, - const ADDRINFOW* hints, - PADDRINFOW* result); - - DECLSPEC_IMPORT void WSAAPI FreeAddrInfoW(PADDRINFOW pAddrInfo); -#endif - - -/* adjust size value to be multiple of 4. Use to keep pointer aligned */ -/* Do we need different versions of this for different architectures? */ -#define ALIGNED_SIZE(X) ((((X) + 3) >> 2) << 2) - - -static void uv__getaddrinfo_work(struct uv__work* w) { - uv_getaddrinfo_t* req; - struct addrinfoW* hints; - int err; - - req = container_of(w, uv_getaddrinfo_t, work_req); - hints = req->addrinfow; - req->addrinfow = NULL; - err = GetAddrInfoW(req->node, req->service, hints, &req->addrinfow); - req->retcode = uv__getaddrinfo_translate_error(err); -} - - -/* - * Called from uv_run when complete. Call user specified callback - * then free returned addrinfo - * Returned addrinfo strings are converted from UTF-16 to UTF-8. - * - * To minimize allocation we calculate total size required, - * and copy all structs and referenced strings into the one block. - * Each size calculation is adjusted to avoid unaligned pointers. - */ -static void uv__getaddrinfo_done(struct uv__work* w, int status) { - uv_getaddrinfo_t* req; - int addrinfo_len = 0; - int name_len = 0; - size_t addrinfo_struct_len = ALIGNED_SIZE(sizeof(struct addrinfo)); - struct addrinfoW* addrinfow_ptr; - struct addrinfo* addrinfo_ptr; - char* alloc_ptr = NULL; - char* cur_ptr = NULL; - - req = container_of(w, uv_getaddrinfo_t, work_req); - - /* release input parameter memory */ - if (req->alloc != NULL) { - uv__free(req->alloc); - req->alloc = NULL; - } - - if (status == UV_ECANCELED) { - assert(req->retcode == 0); - req->retcode = UV_EAI_CANCELED; - goto complete; - } - - if (req->retcode == 0) { - /* convert addrinfoW to addrinfo */ - /* first calculate required length */ - addrinfow_ptr = req->addrinfow; - while (addrinfow_ptr != NULL) { - addrinfo_len += addrinfo_struct_len + - ALIGNED_SIZE(addrinfow_ptr->ai_addrlen); - if (addrinfow_ptr->ai_canonname != NULL) { - name_len = uv_utf16_to_utf8(addrinfow_ptr->ai_canonname, -1, NULL, 0); - if (name_len == 0) { - req->retcode = uv_translate_sys_error(GetLastError()); - goto complete; - } - addrinfo_len += ALIGNED_SIZE(name_len); - } - addrinfow_ptr = addrinfow_ptr->ai_next; - } - - /* allocate memory for addrinfo results */ - alloc_ptr = (char*)uv__malloc(addrinfo_len); - - /* do conversions */ - if (alloc_ptr != NULL) { - cur_ptr = alloc_ptr; - addrinfow_ptr = req->addrinfow; - - while (addrinfow_ptr != NULL) { - /* copy addrinfo struct data */ - assert(cur_ptr + addrinfo_struct_len <= alloc_ptr + addrinfo_len); - addrinfo_ptr = (struct addrinfo*)cur_ptr; - addrinfo_ptr->ai_family = addrinfow_ptr->ai_family; - addrinfo_ptr->ai_socktype = addrinfow_ptr->ai_socktype; - addrinfo_ptr->ai_protocol = addrinfow_ptr->ai_protocol; - addrinfo_ptr->ai_flags = addrinfow_ptr->ai_flags; - addrinfo_ptr->ai_addrlen = addrinfow_ptr->ai_addrlen; - addrinfo_ptr->ai_canonname = NULL; - addrinfo_ptr->ai_addr = NULL; - addrinfo_ptr->ai_next = NULL; - - cur_ptr += addrinfo_struct_len; - - /* copy sockaddr */ - if (addrinfo_ptr->ai_addrlen > 0) { - assert(cur_ptr + addrinfo_ptr->ai_addrlen <= - alloc_ptr + addrinfo_len); - memcpy(cur_ptr, addrinfow_ptr->ai_addr, addrinfo_ptr->ai_addrlen); - addrinfo_ptr->ai_addr = (struct sockaddr*)cur_ptr; - cur_ptr += ALIGNED_SIZE(addrinfo_ptr->ai_addrlen); - } - - /* convert canonical name to UTF-8 */ - if (addrinfow_ptr->ai_canonname != NULL) { - name_len = uv_utf16_to_utf8(addrinfow_ptr->ai_canonname, - -1, - NULL, - 0); - assert(name_len > 0); - assert(cur_ptr + name_len <= alloc_ptr + addrinfo_len); - name_len = uv_utf16_to_utf8(addrinfow_ptr->ai_canonname, - -1, - cur_ptr, - name_len); - assert(name_len > 0); - addrinfo_ptr->ai_canonname = cur_ptr; - cur_ptr += ALIGNED_SIZE(name_len); - } - assert(cur_ptr <= alloc_ptr + addrinfo_len); - - /* set next ptr */ - addrinfow_ptr = addrinfow_ptr->ai_next; - if (addrinfow_ptr != NULL) { - addrinfo_ptr->ai_next = (struct addrinfo*)cur_ptr; - } - } - req->addrinfo = (struct addrinfo*)alloc_ptr; - } else { - req->retcode = UV_EAI_MEMORY; - } - } - - /* return memory to system */ - if (req->addrinfow != NULL) { - FreeAddrInfoW(req->addrinfow); - req->addrinfow = NULL; - } - -complete: - uv__req_unregister(req->loop, req); - - /* finally do callback with converted result */ - if (req->getaddrinfo_cb) - req->getaddrinfo_cb(req, req->retcode, req->addrinfo); -} - - -void uv_freeaddrinfo(struct addrinfo* ai) { - char* alloc_ptr = (char*)ai; - - /* release copied result memory */ - if (alloc_ptr != NULL) { - uv__free(alloc_ptr); - } -} - - -/* - * Entry point for getaddrinfo - * we convert the UTF-8 strings to UNICODE - * and save the UNICODE string pointers in the req - * We also copy hints so that caller does not need to keep memory until the - * callback. - * return 0 if a callback will be made - * return error code if validation fails - * - * To minimize allocation we calculate total size required, - * and copy all structs and referenced strings into the one block. - * Each size calculation is adjusted to avoid unaligned pointers. - */ -int uv_getaddrinfo(uv_loop_t* loop, - uv_getaddrinfo_t* req, - uv_getaddrinfo_cb getaddrinfo_cb, - const char* node, - const char* service, - const struct addrinfo* hints) { - int nodesize = 0; - int servicesize = 0; - int hintssize = 0; - char* alloc_ptr = NULL; - int err; - - if (req == NULL || (node == NULL && service == NULL)) { - err = WSAEINVAL; - goto error; - } - - uv_req_init(loop, (uv_req_t*)req); - - req->getaddrinfo_cb = getaddrinfo_cb; - req->addrinfo = NULL; - req->type = UV_GETADDRINFO; - req->loop = loop; - req->retcode = 0; - - /* calculate required memory size for all input values */ - if (node != NULL) { - nodesize = ALIGNED_SIZE(uv_utf8_to_utf16(node, NULL, 0) * sizeof(WCHAR)); - if (nodesize == 0) { - err = GetLastError(); - goto error; - } - } - - if (service != NULL) { - servicesize = ALIGNED_SIZE(uv_utf8_to_utf16(service, NULL, 0) * - sizeof(WCHAR)); - if (servicesize == 0) { - err = GetLastError(); - goto error; - } - } - if (hints != NULL) { - hintssize = ALIGNED_SIZE(sizeof(struct addrinfoW)); - } - - /* allocate memory for inputs, and partition it as needed */ - alloc_ptr = (char*)uv__malloc(nodesize + servicesize + hintssize); - if (!alloc_ptr) { - err = WSAENOBUFS; - goto error; - } - - /* save alloc_ptr now so we can free if error */ - req->alloc = (void*)alloc_ptr; - - /* convert node string to UTF16 into allocated memory and save pointer in */ - /* the request. */ - if (node != NULL) { - req->node = (WCHAR*)alloc_ptr; - if (uv_utf8_to_utf16(node, - (WCHAR*) alloc_ptr, - nodesize / sizeof(WCHAR)) == 0) { - err = GetLastError(); - goto error; - } - alloc_ptr += nodesize; - } else { - req->node = NULL; - } - - /* convert service string to UTF16 into allocated memory and save pointer */ - /* in the req. */ - if (service != NULL) { - req->service = (WCHAR*)alloc_ptr; - if (uv_utf8_to_utf16(service, - (WCHAR*) alloc_ptr, - servicesize / sizeof(WCHAR)) == 0) { - err = GetLastError(); - goto error; - } - alloc_ptr += servicesize; - } else { - req->service = NULL; - } - - /* copy hints to allocated memory and save pointer in req */ - if (hints != NULL) { - req->addrinfow = (struct addrinfoW*)alloc_ptr; - req->addrinfow->ai_family = hints->ai_family; - req->addrinfow->ai_socktype = hints->ai_socktype; - req->addrinfow->ai_protocol = hints->ai_protocol; - req->addrinfow->ai_flags = hints->ai_flags; - req->addrinfow->ai_addrlen = 0; - req->addrinfow->ai_canonname = NULL; - req->addrinfow->ai_addr = NULL; - req->addrinfow->ai_next = NULL; - } else { - req->addrinfow = NULL; - } - - uv__req_register(loop, req); - - if (getaddrinfo_cb) { - uv__work_submit(loop, - &req->work_req, - uv__getaddrinfo_work, - uv__getaddrinfo_done); - return 0; - } else { - uv__getaddrinfo_work(&req->work_req); - uv__getaddrinfo_done(&req->work_req, 0); - return req->retcode; - } - -error: - if (req != NULL && req->alloc != NULL) { - uv__free(req->alloc); - } - return uv_translate_sys_error(err); -} diff --git a/outside/libuv-v1.7.5/src/win/getnameinfo.c b/outside/libuv-v1.7.5/src/win/getnameinfo.c deleted file mode 100644 index 66b64b883..000000000 --- a/outside/libuv-v1.7.5/src/win/getnameinfo.c +++ /dev/null @@ -1,150 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. -* -* 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. -*/ - -#include -#include - -#include "uv.h" -#include "internal.h" -#include "req-inl.h" - -#ifndef GetNameInfo -int WSAAPI GetNameInfoW( - const SOCKADDR *pSockaddr, - socklen_t SockaddrLength, - PWCHAR pNodeBuffer, - DWORD NodeBufferSize, - PWCHAR pServiceBuffer, - DWORD ServiceBufferSize, - INT Flags -); -#endif - -static void uv__getnameinfo_work(struct uv__work* w) { - uv_getnameinfo_t* req; - WCHAR host[NI_MAXHOST]; - WCHAR service[NI_MAXSERV]; - int ret = 0; - - req = container_of(w, uv_getnameinfo_t, work_req); - if (GetNameInfoW((struct sockaddr*)&req->storage, - sizeof(req->storage), - host, - ARRAY_SIZE(host), - service, - ARRAY_SIZE(service), - req->flags)) { - ret = WSAGetLastError(); - } - req->retcode = uv__getaddrinfo_translate_error(ret); - - /* convert results to UTF-8 */ - WideCharToMultiByte(CP_UTF8, - 0, - host, - -1, - req->host, - sizeof(req->host), - NULL, - NULL); - - WideCharToMultiByte(CP_UTF8, - 0, - service, - -1, - req->service, - sizeof(req->service), - NULL, - NULL); -} - - -/* -* Called from uv_run when complete. -*/ -static void uv__getnameinfo_done(struct uv__work* w, int status) { - uv_getnameinfo_t* req; - char* host; - char* service; - - req = container_of(w, uv_getnameinfo_t, work_req); - uv__req_unregister(req->loop, req); - host = service = NULL; - - if (status == UV_ECANCELED) { - assert(req->retcode == 0); - req->retcode = UV_EAI_CANCELED; - } else if (req->retcode == 0) { - host = req->host; - service = req->service; - } - - if (req->getnameinfo_cb) - req->getnameinfo_cb(req, req->retcode, host, service); -} - - -/* -* Entry point for getnameinfo -* return 0 if a callback will be made -* return error code if validation fails -*/ -int uv_getnameinfo(uv_loop_t* loop, - uv_getnameinfo_t* req, - uv_getnameinfo_cb getnameinfo_cb, - const struct sockaddr* addr, - int flags) { - if (req == NULL || addr == NULL) - return UV_EINVAL; - - if (addr->sa_family == AF_INET) { - memcpy(&req->storage, - addr, - sizeof(struct sockaddr_in)); - } else if (addr->sa_family == AF_INET6) { - memcpy(&req->storage, - addr, - sizeof(struct sockaddr_in6)); - } else { - return UV_EINVAL; - } - - uv_req_init(loop, (uv_req_t*)req); - uv__req_register(loop, req); - - req->getnameinfo_cb = getnameinfo_cb; - req->flags = flags; - req->type = UV_GETNAMEINFO; - req->loop = loop; - req->retcode = 0; - - if (getnameinfo_cb) { - uv__work_submit(loop, - &req->work_req, - uv__getnameinfo_work, - uv__getnameinfo_done); - return 0; - } else { - uv__getnameinfo_work(&req->work_req); - uv__getnameinfo_done(&req->work_req, 0); - return req->retcode; - } -} diff --git a/outside/libuv-v1.7.5/src/win/handle-inl.h b/outside/libuv-v1.7.5/src/win/handle-inl.h deleted file mode 100644 index 8d0334cc5..000000000 --- a/outside/libuv-v1.7.5/src/win/handle-inl.h +++ /dev/null @@ -1,179 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#ifndef UV_WIN_HANDLE_INL_H_ -#define UV_WIN_HANDLE_INL_H_ - -#include -#include - -#include "uv.h" -#include "internal.h" - - -#define DECREASE_ACTIVE_COUNT(loop, handle) \ - do { \ - if (--(handle)->activecnt == 0 && \ - !((handle)->flags & UV__HANDLE_CLOSING)) { \ - uv__handle_stop((handle)); \ - } \ - assert((handle)->activecnt >= 0); \ - } while (0) - - -#define INCREASE_ACTIVE_COUNT(loop, handle) \ - do { \ - if ((handle)->activecnt++ == 0) { \ - uv__handle_start((handle)); \ - } \ - assert((handle)->activecnt > 0); \ - } while (0) - - -#define DECREASE_PENDING_REQ_COUNT(handle) \ - do { \ - assert(handle->reqs_pending > 0); \ - handle->reqs_pending--; \ - \ - if (handle->flags & UV__HANDLE_CLOSING && \ - handle->reqs_pending == 0) { \ - uv_want_endgame(loop, (uv_handle_t*)handle); \ - } \ - } while (0) - - -#define uv__handle_closing(handle) \ - do { \ - assert(!((handle)->flags & UV__HANDLE_CLOSING)); \ - \ - if (!(((handle)->flags & UV__HANDLE_ACTIVE) && \ - ((handle)->flags & UV__HANDLE_REF))) \ - uv__active_handle_add((uv_handle_t*) (handle)); \ - \ - (handle)->flags |= UV__HANDLE_CLOSING; \ - (handle)->flags &= ~UV__HANDLE_ACTIVE; \ - } while (0) - - -#define uv__handle_close(handle) \ - do { \ - QUEUE_REMOVE(&(handle)->handle_queue); \ - uv__active_handle_rm((uv_handle_t*) (handle)); \ - \ - (handle)->flags |= UV_HANDLE_CLOSED; \ - \ - if ((handle)->close_cb) \ - (handle)->close_cb((uv_handle_t*) (handle)); \ - } while (0) - - -INLINE static void uv_want_endgame(uv_loop_t* loop, uv_handle_t* handle) { - if (!(handle->flags & UV_HANDLE_ENDGAME_QUEUED)) { - handle->flags |= UV_HANDLE_ENDGAME_QUEUED; - - handle->endgame_next = loop->endgame_handles; - loop->endgame_handles = handle; - } -} - - -INLINE static void uv_process_endgames(uv_loop_t* loop) { - uv_handle_t* handle; - - while (loop->endgame_handles) { - handle = loop->endgame_handles; - loop->endgame_handles = handle->endgame_next; - - handle->flags &= ~UV_HANDLE_ENDGAME_QUEUED; - - switch (handle->type) { - case UV_TCP: - uv_tcp_endgame(loop, (uv_tcp_t*) handle); - break; - - case UV_NAMED_PIPE: - uv_pipe_endgame(loop, (uv_pipe_t*) handle); - break; - - case UV_TTY: - uv_tty_endgame(loop, (uv_tty_t*) handle); - break; - - case UV_UDP: - uv_udp_endgame(loop, (uv_udp_t*) handle); - break; - - case UV_POLL: - uv_poll_endgame(loop, (uv_poll_t*) handle); - break; - - case UV_TIMER: - uv_timer_endgame(loop, (uv_timer_t*) handle); - break; - - case UV_PREPARE: - case UV_CHECK: - case UV_IDLE: - uv_loop_watcher_endgame(loop, handle); - break; - - case UV_ASYNC: - uv_async_endgame(loop, (uv_async_t*) handle); - break; - - case UV_SIGNAL: - uv_signal_endgame(loop, (uv_signal_t*) handle); - break; - - case UV_PROCESS: - uv_process_endgame(loop, (uv_process_t*) handle); - break; - - case UV_FS_EVENT: - uv_fs_event_endgame(loop, (uv_fs_event_t*) handle); - break; - - case UV_FS_POLL: - uv__fs_poll_endgame(loop, (uv_fs_poll_t*) handle); - break; - - default: - assert(0); - break; - } - } -} - -INLINE static HANDLE uv__get_osfhandle(int fd) -{ - /* _get_osfhandle() raises an assert in debug builds if the FD is invalid. */ - /* But it also correctly checks the FD and returns INVALID_HANDLE_VALUE */ - /* for invalid FDs in release builds (or if you let the assert continue). */ - /* So this wrapper function disables asserts when calling _get_osfhandle. */ - - HANDLE handle; - UV_BEGIN_DISABLE_CRT_ASSERT(); - handle = (HANDLE) _get_osfhandle(fd); - UV_END_DISABLE_CRT_ASSERT(); - return handle; -} - -#endif /* UV_WIN_HANDLE_INL_H_ */ diff --git a/outside/libuv-v1.7.5/src/win/handle.c b/outside/libuv-v1.7.5/src/win/handle.c deleted file mode 100644 index 72b49d979..000000000 --- a/outside/libuv-v1.7.5/src/win/handle.c +++ /dev/null @@ -1,154 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include -#include -#include - -#include "uv.h" -#include "internal.h" -#include "handle-inl.h" - - -uv_handle_type uv_guess_handle(uv_file file) { - HANDLE handle; - DWORD mode; - - if (file < 0) { - return UV_UNKNOWN_HANDLE; - } - - handle = uv__get_osfhandle(file); - - switch (GetFileType(handle)) { - case FILE_TYPE_CHAR: - if (GetConsoleMode(handle, &mode)) { - return UV_TTY; - } else { - return UV_FILE; - } - - case FILE_TYPE_PIPE: - return UV_NAMED_PIPE; - - case FILE_TYPE_DISK: - return UV_FILE; - - default: - return UV_UNKNOWN_HANDLE; - } -} - - -int uv_is_active(const uv_handle_t* handle) { - return (handle->flags & UV__HANDLE_ACTIVE) && - !(handle->flags & UV__HANDLE_CLOSING); -} - - -void uv_close(uv_handle_t* handle, uv_close_cb cb) { - uv_loop_t* loop = handle->loop; - - if (handle->flags & UV__HANDLE_CLOSING) { - assert(0); - return; - } - - handle->close_cb = cb; - - /* Handle-specific close actions */ - switch (handle->type) { - case UV_TCP: - uv_tcp_close(loop, (uv_tcp_t*)handle); - return; - - case UV_NAMED_PIPE: - uv_pipe_close(loop, (uv_pipe_t*) handle); - return; - - case UV_TTY: - uv_tty_close((uv_tty_t*) handle); - return; - - case UV_UDP: - uv_udp_close(loop, (uv_udp_t*) handle); - return; - - case UV_POLL: - uv_poll_close(loop, (uv_poll_t*) handle); - return; - - case UV_TIMER: - uv_timer_stop((uv_timer_t*)handle); - uv__handle_closing(handle); - uv_want_endgame(loop, handle); - return; - - case UV_PREPARE: - uv_prepare_stop((uv_prepare_t*)handle); - uv__handle_closing(handle); - uv_want_endgame(loop, handle); - return; - - case UV_CHECK: - uv_check_stop((uv_check_t*)handle); - uv__handle_closing(handle); - uv_want_endgame(loop, handle); - return; - - case UV_IDLE: - uv_idle_stop((uv_idle_t*)handle); - uv__handle_closing(handle); - uv_want_endgame(loop, handle); - return; - - case UV_ASYNC: - uv_async_close(loop, (uv_async_t*) handle); - return; - - case UV_SIGNAL: - uv_signal_close(loop, (uv_signal_t*) handle); - return; - - case UV_PROCESS: - uv_process_close(loop, (uv_process_t*) handle); - return; - - case UV_FS_EVENT: - uv_fs_event_close(loop, (uv_fs_event_t*) handle); - return; - - case UV_FS_POLL: - uv__fs_poll_close((uv_fs_poll_t*) handle); - uv__handle_closing(handle); - uv_want_endgame(loop, handle); - return; - - default: - /* Not supported */ - abort(); - } -} - - -int uv_is_closing(const uv_handle_t* handle) { - return !!(handle->flags & (UV__HANDLE_CLOSING | UV_HANDLE_CLOSED)); -} diff --git a/outside/libuv-v1.7.5/src/win/internal.h b/outside/libuv-v1.7.5/src/win/internal.h deleted file mode 100644 index 8d4081bdb..000000000 --- a/outside/libuv-v1.7.5/src/win/internal.h +++ /dev/null @@ -1,381 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#ifndef UV_WIN_INTERNAL_H_ -#define UV_WIN_INTERNAL_H_ - -#include "uv.h" -#include "../uv-common.h" - -#include "tree.h" -#include "winapi.h" -#include "winsock.h" - -#ifdef _MSC_VER -# define INLINE __inline -# define UV_THREAD_LOCAL __declspec( thread ) -#else -# define INLINE inline -# define UV_THREAD_LOCAL __thread -#endif - - -#ifdef _DEBUG - -extern UV_THREAD_LOCAL int uv__crt_assert_enabled; - -#define UV_BEGIN_DISABLE_CRT_ASSERT() \ - { \ - int uv__saved_crt_assert_enabled = uv__crt_assert_enabled; \ - uv__crt_assert_enabled = FALSE; - - -#define UV_END_DISABLE_CRT_ASSERT() \ - uv__crt_assert_enabled = uv__saved_crt_assert_enabled; \ - } - -#else -#define UV_BEGIN_DISABLE_CRT_ASSERT() -#define UV_END_DISABLE_CRT_ASSERT() -#endif - -/* - * Handles - * (also see handle-inl.h) - */ - -/* Used by all handles. */ -#define UV_HANDLE_CLOSED 0x00000002 -#define UV_HANDLE_ENDGAME_QUEUED 0x00000008 - -/* uv-common.h: #define UV__HANDLE_CLOSING 0x00000001 */ -/* uv-common.h: #define UV__HANDLE_ACTIVE 0x00000040 */ -/* uv-common.h: #define UV__HANDLE_REF 0x00000020 */ -/* uv-common.h: #define UV_HANDLE_INTERNAL 0x00000080 */ - -/* Used by streams and UDP handles. */ -#define UV_HANDLE_READING 0x00000100 -#define UV_HANDLE_BOUND 0x00000200 -#define UV_HANDLE_LISTENING 0x00000800 -#define UV_HANDLE_CONNECTION 0x00001000 -#define UV_HANDLE_READABLE 0x00008000 -#define UV_HANDLE_WRITABLE 0x00010000 -#define UV_HANDLE_READ_PENDING 0x00020000 -#define UV_HANDLE_SYNC_BYPASS_IOCP 0x00040000 -#define UV_HANDLE_ZERO_READ 0x00080000 -#define UV_HANDLE_EMULATE_IOCP 0x00100000 -#define UV_HANDLE_BLOCKING_WRITES 0x00200000 - -/* Used by uv_tcp_t and uv_udp_t handles */ -#define UV_HANDLE_IPV6 0x01000000 - -/* Only used by uv_tcp_t handles. */ -#define UV_HANDLE_TCP_NODELAY 0x02000000 -#define UV_HANDLE_TCP_KEEPALIVE 0x04000000 -#define UV_HANDLE_TCP_SINGLE_ACCEPT 0x08000000 -#define UV_HANDLE_TCP_ACCEPT_STATE_CHANGING 0x10000000 -#define UV_HANDLE_TCP_SOCKET_CLOSED 0x20000000 -#define UV_HANDLE_SHARED_TCP_SOCKET 0x40000000 - -/* Only used by uv_pipe_t handles. */ -#define UV_HANDLE_NON_OVERLAPPED_PIPE 0x01000000 -#define UV_HANDLE_PIPESERVER 0x02000000 -#define UV_HANDLE_PIPE_READ_CANCELABLE 0x04000000 - -/* Only used by uv_tty_t handles. */ -#define UV_HANDLE_TTY_READABLE 0x01000000 -#define UV_HANDLE_TTY_RAW 0x02000000 -#define UV_HANDLE_TTY_SAVED_POSITION 0x04000000 -#define UV_HANDLE_TTY_SAVED_ATTRIBUTES 0x08000000 - -/* Only used by uv_poll_t handles. */ -#define UV_HANDLE_POLL_SLOW 0x02000000 - - -/* - * Requests: see req-inl.h - */ - - -/* - * Streams: see stream-inl.h - */ - - -/* - * TCP - */ - -typedef struct { - WSAPROTOCOL_INFOW socket_info; - int delayed_error; -} uv__ipc_socket_info_ex; - -int uv_tcp_listen(uv_tcp_t* handle, int backlog, uv_connection_cb cb); -int uv_tcp_accept(uv_tcp_t* server, uv_tcp_t* client); -int uv_tcp_read_start(uv_tcp_t* handle, uv_alloc_cb alloc_cb, - uv_read_cb read_cb); -int uv_tcp_write(uv_loop_t* loop, uv_write_t* req, uv_tcp_t* handle, - const uv_buf_t bufs[], unsigned int nbufs, uv_write_cb cb); -int uv__tcp_try_write(uv_tcp_t* handle, const uv_buf_t bufs[], - unsigned int nbufs); - -void uv_process_tcp_read_req(uv_loop_t* loop, uv_tcp_t* handle, uv_req_t* req); -void uv_process_tcp_write_req(uv_loop_t* loop, uv_tcp_t* handle, - uv_write_t* req); -void uv_process_tcp_accept_req(uv_loop_t* loop, uv_tcp_t* handle, - uv_req_t* req); -void uv_process_tcp_connect_req(uv_loop_t* loop, uv_tcp_t* handle, - uv_connect_t* req); - -void uv_tcp_close(uv_loop_t* loop, uv_tcp_t* tcp); -void uv_tcp_endgame(uv_loop_t* loop, uv_tcp_t* handle); - -int uv_tcp_import(uv_tcp_t* tcp, uv__ipc_socket_info_ex* socket_info_ex, - int tcp_connection); - -int uv_tcp_duplicate_socket(uv_tcp_t* handle, int pid, - LPWSAPROTOCOL_INFOW protocol_info); - - -/* - * UDP - */ -void uv_process_udp_recv_req(uv_loop_t* loop, uv_udp_t* handle, uv_req_t* req); -void uv_process_udp_send_req(uv_loop_t* loop, uv_udp_t* handle, - uv_udp_send_t* req); - -void uv_udp_close(uv_loop_t* loop, uv_udp_t* handle); -void uv_udp_endgame(uv_loop_t* loop, uv_udp_t* handle); - - -/* - * Pipes - */ -int uv_stdio_pipe_server(uv_loop_t* loop, uv_pipe_t* handle, DWORD access, - char* name, size_t nameSize); - -int uv_pipe_listen(uv_pipe_t* handle, int backlog, uv_connection_cb cb); -int uv_pipe_accept(uv_pipe_t* server, uv_stream_t* client); -int uv_pipe_read_start(uv_pipe_t* handle, uv_alloc_cb alloc_cb, - uv_read_cb read_cb); -int uv_pipe_write(uv_loop_t* loop, uv_write_t* req, uv_pipe_t* handle, - const uv_buf_t bufs[], unsigned int nbufs, uv_write_cb cb); -int uv_pipe_write2(uv_loop_t* loop, uv_write_t* req, uv_pipe_t* handle, - const uv_buf_t bufs[], unsigned int nbufs, uv_stream_t* send_handle, - uv_write_cb cb); -void uv__pipe_pause_read(uv_pipe_t* handle); -void uv__pipe_unpause_read(uv_pipe_t* handle); -void uv__pipe_stop_read(uv_pipe_t* handle); - -void uv_process_pipe_read_req(uv_loop_t* loop, uv_pipe_t* handle, - uv_req_t* req); -void uv_process_pipe_write_req(uv_loop_t* loop, uv_pipe_t* handle, - uv_write_t* req); -void uv_process_pipe_accept_req(uv_loop_t* loop, uv_pipe_t* handle, - uv_req_t* raw_req); -void uv_process_pipe_connect_req(uv_loop_t* loop, uv_pipe_t* handle, - uv_connect_t* req); -void uv_process_pipe_shutdown_req(uv_loop_t* loop, uv_pipe_t* handle, - uv_shutdown_t* req); - -void uv_pipe_close(uv_loop_t* loop, uv_pipe_t* handle); -void uv_pipe_cleanup(uv_loop_t* loop, uv_pipe_t* handle); -void uv_pipe_endgame(uv_loop_t* loop, uv_pipe_t* handle); - - -/* - * TTY - */ -void uv_console_init(); - -int uv_tty_read_start(uv_tty_t* handle, uv_alloc_cb alloc_cb, - uv_read_cb read_cb); -int uv_tty_read_stop(uv_tty_t* handle); -int uv_tty_write(uv_loop_t* loop, uv_write_t* req, uv_tty_t* handle, - const uv_buf_t bufs[], unsigned int nbufs, uv_write_cb cb); -int uv__tty_try_write(uv_tty_t* handle, const uv_buf_t bufs[], - unsigned int nbufs); -void uv_tty_close(uv_tty_t* handle); - -void uv_process_tty_read_req(uv_loop_t* loop, uv_tty_t* handle, - uv_req_t* req); -void uv_process_tty_write_req(uv_loop_t* loop, uv_tty_t* handle, - uv_write_t* req); -/* TODO: remove me */ -void uv_process_tty_accept_req(uv_loop_t* loop, uv_tty_t* handle, - uv_req_t* raw_req); -/* TODO: remove me */ -void uv_process_tty_connect_req(uv_loop_t* loop, uv_tty_t* handle, - uv_connect_t* req); - -void uv_tty_endgame(uv_loop_t* loop, uv_tty_t* handle); - - -/* - * Poll watchers - */ -void uv_process_poll_req(uv_loop_t* loop, uv_poll_t* handle, - uv_req_t* req); - -int uv_poll_close(uv_loop_t* loop, uv_poll_t* handle); -void uv_poll_endgame(uv_loop_t* loop, uv_poll_t* handle); - - -/* - * Timers - */ -void uv_timer_endgame(uv_loop_t* loop, uv_timer_t* handle); - -DWORD uv__next_timeout(const uv_loop_t* loop); -void uv__time_forward(uv_loop_t* loop, uint64_t msecs); -void uv_process_timers(uv_loop_t* loop); - - -/* - * Loop watchers - */ -void uv_loop_watcher_endgame(uv_loop_t* loop, uv_handle_t* handle); - -void uv_prepare_invoke(uv_loop_t* loop); -void uv_check_invoke(uv_loop_t* loop); -void uv_idle_invoke(uv_loop_t* loop); - -void uv__once_init(); - - -/* - * Async watcher - */ -void uv_async_close(uv_loop_t* loop, uv_async_t* handle); -void uv_async_endgame(uv_loop_t* loop, uv_async_t* handle); - -void uv_process_async_wakeup_req(uv_loop_t* loop, uv_async_t* handle, - uv_req_t* req); - - -/* - * Signal watcher - */ -void uv_signals_init(); -int uv__signal_dispatch(int signum); - -void uv_signal_close(uv_loop_t* loop, uv_signal_t* handle); -void uv_signal_endgame(uv_loop_t* loop, uv_signal_t* handle); - -void uv_process_signal_req(uv_loop_t* loop, uv_signal_t* handle, - uv_req_t* req); - - -/* - * Spawn - */ -void uv_process_proc_exit(uv_loop_t* loop, uv_process_t* handle); -void uv_process_close(uv_loop_t* loop, uv_process_t* handle); -void uv_process_endgame(uv_loop_t* loop, uv_process_t* handle); - - -/* - * Error - */ -int uv_translate_sys_error(int sys_errno); - - -/* - * FS - */ -void uv_fs_init(); - - -/* - * FS Event - */ -void uv_process_fs_event_req(uv_loop_t* loop, uv_req_t* req, - uv_fs_event_t* handle); -void uv_fs_event_close(uv_loop_t* loop, uv_fs_event_t* handle); -void uv_fs_event_endgame(uv_loop_t* loop, uv_fs_event_t* handle); - - -/* - * Stat poller. - */ -void uv__fs_poll_endgame(uv_loop_t* loop, uv_fs_poll_t* handle); - - -/* - * Utilities. - */ -void uv__util_init(); - -uint64_t uv__hrtime(double scale); -int uv_parent_pid(); -__declspec(noreturn) void uv_fatal_error(const int errorno, const char* syscall); - - -/* - * Process stdio handles. - */ -int uv__stdio_create(uv_loop_t* loop, - const uv_process_options_t* options, - BYTE** buffer_ptr); -void uv__stdio_destroy(BYTE* buffer); -void uv__stdio_noinherit(BYTE* buffer); -int uv__stdio_verify(BYTE* buffer, WORD size); -WORD uv__stdio_size(BYTE* buffer); -HANDLE uv__stdio_handle(BYTE* buffer, int fd); - - -/* - * Winapi and ntapi utility functions - */ -void uv_winapi_init(); - - -/* - * Winsock utility functions - */ -void uv_winsock_init(); - -int uv_ntstatus_to_winsock_error(NTSTATUS status); - -BOOL uv_get_acceptex_function(SOCKET socket, LPFN_ACCEPTEX* target); -BOOL uv_get_connectex_function(SOCKET socket, LPFN_CONNECTEX* target); - -int WSAAPI uv_wsarecv_workaround(SOCKET socket, WSABUF* buffers, - DWORD buffer_count, DWORD* bytes, DWORD* flags, WSAOVERLAPPED *overlapped, - LPWSAOVERLAPPED_COMPLETION_ROUTINE completion_routine); -int WSAAPI uv_wsarecvfrom_workaround(SOCKET socket, WSABUF* buffers, - DWORD buffer_count, DWORD* bytes, DWORD* flags, struct sockaddr* addr, - int* addr_len, WSAOVERLAPPED *overlapped, - LPWSAOVERLAPPED_COMPLETION_ROUTINE completion_routine); - -int WSAAPI uv_msafd_poll(SOCKET socket, AFD_POLL_INFO* info_in, - AFD_POLL_INFO* info_out, OVERLAPPED* overlapped); - -/* Whether there are any non-IFS LSPs stacked on TCP */ -extern int uv_tcp_non_ifs_lsp_ipv4; -extern int uv_tcp_non_ifs_lsp_ipv6; - -/* Ip address used to bind to any port at any interface */ -extern struct sockaddr_in uv_addr_ip4_any_; -extern struct sockaddr_in6 uv_addr_ip6_any_; - -#endif /* UV_WIN_INTERNAL_H_ */ diff --git a/outside/libuv-v1.7.5/src/win/loop-watcher.c b/outside/libuv-v1.7.5/src/win/loop-watcher.c deleted file mode 100644 index 20e4509f8..000000000 --- a/outside/libuv-v1.7.5/src/win/loop-watcher.c +++ /dev/null @@ -1,122 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include - -#include "uv.h" -#include "internal.h" -#include "handle-inl.h" - - -void uv_loop_watcher_endgame(uv_loop_t* loop, uv_handle_t* handle) { - if (handle->flags & UV__HANDLE_CLOSING) { - assert(!(handle->flags & UV_HANDLE_CLOSED)); - handle->flags |= UV_HANDLE_CLOSED; - uv__handle_close(handle); - } -} - - -#define UV_LOOP_WATCHER_DEFINE(name, NAME) \ - int uv_##name##_init(uv_loop_t* loop, uv_##name##_t* handle) { \ - uv__handle_init(loop, (uv_handle_t*) handle, UV_##NAME); \ - \ - return 0; \ - } \ - \ - \ - int uv_##name##_start(uv_##name##_t* handle, uv_##name##_cb cb) { \ - uv_loop_t* loop = handle->loop; \ - uv_##name##_t* old_head; \ - \ - assert(handle->type == UV_##NAME); \ - \ - if (uv__is_active(handle)) \ - return 0; \ - \ - if (cb == NULL) \ - return UV_EINVAL; \ - \ - old_head = loop->name##_handles; \ - \ - handle->name##_next = old_head; \ - handle->name##_prev = NULL; \ - \ - if (old_head) { \ - old_head->name##_prev = handle; \ - } \ - \ - loop->name##_handles = handle; \ - \ - handle->name##_cb = cb; \ - uv__handle_start(handle); \ - \ - return 0; \ - } \ - \ - \ - int uv_##name##_stop(uv_##name##_t* handle) { \ - uv_loop_t* loop = handle->loop; \ - \ - assert(handle->type == UV_##NAME); \ - \ - if (!uv__is_active(handle)) \ - return 0; \ - \ - /* Update loop head if needed */ \ - if (loop->name##_handles == handle) { \ - loop->name##_handles = handle->name##_next; \ - } \ - \ - /* Update the iterator-next pointer of needed */ \ - if (loop->next_##name##_handle == handle) { \ - loop->next_##name##_handle = handle->name##_next; \ - } \ - \ - if (handle->name##_prev) { \ - handle->name##_prev->name##_next = handle->name##_next; \ - } \ - if (handle->name##_next) { \ - handle->name##_next->name##_prev = handle->name##_prev; \ - } \ - \ - uv__handle_stop(handle); \ - \ - return 0; \ - } \ - \ - \ - void uv_##name##_invoke(uv_loop_t* loop) { \ - uv_##name##_t* handle; \ - \ - (loop)->next_##name##_handle = (loop)->name##_handles; \ - \ - while ((loop)->next_##name##_handle != NULL) { \ - handle = (loop)->next_##name##_handle; \ - (loop)->next_##name##_handle = handle->name##_next; \ - \ - handle->name##_cb(handle); \ - } \ - } - -UV_LOOP_WATCHER_DEFINE(prepare, PREPARE) -UV_LOOP_WATCHER_DEFINE(check, CHECK) -UV_LOOP_WATCHER_DEFINE(idle, IDLE) diff --git a/outside/libuv-v1.7.5/src/win/pipe.c b/outside/libuv-v1.7.5/src/win/pipe.c deleted file mode 100644 index 8312b1ceb..000000000 --- a/outside/libuv-v1.7.5/src/win/pipe.c +++ /dev/null @@ -1,2114 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include -#include -#include -#include -#include - -#include "uv.h" -#include "internal.h" -#include "handle-inl.h" -#include "stream-inl.h" -#include "req-inl.h" - -typedef struct uv__ipc_queue_item_s uv__ipc_queue_item_t; - -struct uv__ipc_queue_item_s { - /* - * NOTE: It is important for socket_info_ex to be the first field, - * because we will we assigning it to the pending_ipc_info.socket_info - */ - uv__ipc_socket_info_ex socket_info_ex; - QUEUE member; - int tcp_connection; -}; - -/* A zero-size buffer for use by uv_pipe_read */ -static char uv_zero_[] = ""; - -/* Null uv_buf_t */ -static const uv_buf_t uv_null_buf_ = { 0, NULL }; - -/* The timeout that the pipe will wait for the remote end to write data */ -/* when the local ends wants to shut it down. */ -static const int64_t eof_timeout = 50; /* ms */ - -static const int default_pending_pipe_instances = 4; - -/* Pipe prefix */ -static char pipe_prefix[] = "\\\\?\\pipe"; -static const int pipe_prefix_len = sizeof(pipe_prefix) - 1; - -/* IPC protocol flags. */ -#define UV_IPC_RAW_DATA 0x0001 -#define UV_IPC_TCP_SERVER 0x0002 -#define UV_IPC_TCP_CONNECTION 0x0004 - -/* IPC frame header. */ -typedef struct { - int flags; - uint64_t raw_data_length; -} uv_ipc_frame_header_t; - -/* IPC frame, which contains an imported TCP socket stream. */ -typedef struct { - uv_ipc_frame_header_t header; - uv__ipc_socket_info_ex socket_info_ex; -} uv_ipc_frame_uv_stream; - -static void eof_timer_init(uv_pipe_t* pipe); -static void eof_timer_start(uv_pipe_t* pipe); -static void eof_timer_stop(uv_pipe_t* pipe); -static void eof_timer_cb(uv_timer_t* timer); -static void eof_timer_destroy(uv_pipe_t* pipe); -static void eof_timer_close_cb(uv_handle_t* handle); - - -static void uv_unique_pipe_name(char* ptr, char* name, size_t size) { - _snprintf(name, size, "\\\\?\\pipe\\uv\\%p-%u", ptr, GetCurrentProcessId()); -} - - -int uv_pipe_init(uv_loop_t* loop, uv_pipe_t* handle, int ipc) { - uv_stream_init(loop, (uv_stream_t*)handle, UV_NAMED_PIPE); - - handle->reqs_pending = 0; - handle->handle = INVALID_HANDLE_VALUE; - handle->name = NULL; - handle->pipe.conn.ipc_pid = 0; - handle->pipe.conn.remaining_ipc_rawdata_bytes = 0; - QUEUE_INIT(&handle->pipe.conn.pending_ipc_info.queue); - handle->pipe.conn.pending_ipc_info.queue_len = 0; - handle->ipc = ipc; - handle->pipe.conn.non_overlapped_writes_tail = NULL; - handle->pipe.conn.readfile_thread = NULL; - - uv_req_init(loop, (uv_req_t*) &handle->pipe.conn.ipc_header_write_req); - - return 0; -} - - -static void uv_pipe_connection_init(uv_pipe_t* handle) { - uv_connection_init((uv_stream_t*) handle); - handle->read_req.data = handle; - handle->pipe.conn.eof_timer = NULL; - assert(!(handle->flags & UV_HANDLE_PIPESERVER)); - if (pCancelSynchronousIo && - handle->flags & UV_HANDLE_NON_OVERLAPPED_PIPE) { - uv_mutex_init(&handle->pipe.conn.readfile_mutex); - handle->flags |= UV_HANDLE_PIPE_READ_CANCELABLE; - } -} - - -static HANDLE open_named_pipe(const WCHAR* name, DWORD* duplex_flags) { - HANDLE pipeHandle; - - /* - * Assume that we have a duplex pipe first, so attempt to - * connect with GENERIC_READ | GENERIC_WRITE. - */ - pipeHandle = CreateFileW(name, - GENERIC_READ | GENERIC_WRITE, - 0, - NULL, - OPEN_EXISTING, - FILE_FLAG_OVERLAPPED, - NULL); - if (pipeHandle != INVALID_HANDLE_VALUE) { - *duplex_flags = UV_HANDLE_READABLE | UV_HANDLE_WRITABLE; - return pipeHandle; - } - - /* - * If the pipe is not duplex CreateFileW fails with - * ERROR_ACCESS_DENIED. In that case try to connect - * as a read-only or write-only. - */ - if (GetLastError() == ERROR_ACCESS_DENIED) { - pipeHandle = CreateFileW(name, - GENERIC_READ | FILE_WRITE_ATTRIBUTES, - 0, - NULL, - OPEN_EXISTING, - FILE_FLAG_OVERLAPPED, - NULL); - - if (pipeHandle != INVALID_HANDLE_VALUE) { - *duplex_flags = UV_HANDLE_READABLE; - return pipeHandle; - } - } - - if (GetLastError() == ERROR_ACCESS_DENIED) { - pipeHandle = CreateFileW(name, - GENERIC_WRITE | FILE_READ_ATTRIBUTES, - 0, - NULL, - OPEN_EXISTING, - FILE_FLAG_OVERLAPPED, - NULL); - - if (pipeHandle != INVALID_HANDLE_VALUE) { - *duplex_flags = UV_HANDLE_WRITABLE; - return pipeHandle; - } - } - - return INVALID_HANDLE_VALUE; -} - - -static void close_pipe(uv_pipe_t* pipe) { - assert(pipe->u.fd == -1 || pipe->u.fd > 2); - if (pipe->u.fd == -1) - CloseHandle(pipe->handle); - else - close(pipe->u.fd); - - pipe->u.fd = -1; - pipe->handle = INVALID_HANDLE_VALUE; -} - - -int uv_stdio_pipe_server(uv_loop_t* loop, uv_pipe_t* handle, DWORD access, - char* name, size_t nameSize) { - HANDLE pipeHandle; - int err; - char* ptr = (char*)handle; - - for (;;) { - uv_unique_pipe_name(ptr, name, nameSize); - - pipeHandle = CreateNamedPipeA(name, - access | FILE_FLAG_OVERLAPPED | FILE_FLAG_FIRST_PIPE_INSTANCE, - PIPE_TYPE_BYTE | PIPE_READMODE_BYTE | PIPE_WAIT, 1, 65536, 65536, 0, - NULL); - - if (pipeHandle != INVALID_HANDLE_VALUE) { - /* No name collisions. We're done. */ - break; - } - - err = GetLastError(); - if (err != ERROR_PIPE_BUSY && err != ERROR_ACCESS_DENIED) { - goto error; - } - - /* Pipe name collision. Increment the pointer and try again. */ - ptr++; - } - - if (CreateIoCompletionPort(pipeHandle, - loop->iocp, - (ULONG_PTR)handle, - 0) == NULL) { - err = GetLastError(); - goto error; - } - - uv_pipe_connection_init(handle); - handle->handle = pipeHandle; - - return 0; - - error: - if (pipeHandle != INVALID_HANDLE_VALUE) { - CloseHandle(pipeHandle); - } - - return err; -} - - -static int uv_set_pipe_handle(uv_loop_t* loop, - uv_pipe_t* handle, - HANDLE pipeHandle, - int fd, - DWORD duplex_flags) { - NTSTATUS nt_status; - IO_STATUS_BLOCK io_status; - FILE_MODE_INFORMATION mode_info; - DWORD mode = PIPE_READMODE_BYTE | PIPE_WAIT; - DWORD current_mode = 0; - DWORD err = 0; - - if (!(handle->flags & UV_HANDLE_PIPESERVER) && - handle->handle != INVALID_HANDLE_VALUE) - return UV_EBUSY; - - if (!SetNamedPipeHandleState(pipeHandle, &mode, NULL, NULL)) { - err = GetLastError(); - if (err == ERROR_ACCESS_DENIED) { - /* - * SetNamedPipeHandleState can fail if the handle doesn't have either - * GENERIC_WRITE or FILE_WRITE_ATTRIBUTES. - * But if the handle already has the desired wait and blocking modes - * we can continue. - */ - if (!GetNamedPipeHandleState(pipeHandle, ¤t_mode, NULL, NULL, - NULL, NULL, 0)) { - return -1; - } else if (current_mode & PIPE_NOWAIT) { - SetLastError(ERROR_ACCESS_DENIED); - return -1; - } - } else { - /* If this returns ERROR_INVALID_PARAMETER we probably opened - * something that is not a pipe. */ - if (err == ERROR_INVALID_PARAMETER) { - SetLastError(WSAENOTSOCK); - } - return -1; - } - } - - /* Check if the pipe was created with FILE_FLAG_OVERLAPPED. */ - nt_status = pNtQueryInformationFile(pipeHandle, - &io_status, - &mode_info, - sizeof(mode_info), - FileModeInformation); - if (nt_status != STATUS_SUCCESS) { - return -1; - } - - if (mode_info.Mode & FILE_SYNCHRONOUS_IO_ALERT || - mode_info.Mode & FILE_SYNCHRONOUS_IO_NONALERT) { - /* Non-overlapped pipe. */ - handle->flags |= UV_HANDLE_NON_OVERLAPPED_PIPE; - } else { - /* Overlapped pipe. Try to associate with IOCP. */ - if (CreateIoCompletionPort(pipeHandle, - loop->iocp, - (ULONG_PTR)handle, - 0) == NULL) { - handle->flags |= UV_HANDLE_EMULATE_IOCP; - } - } - - handle->handle = pipeHandle; - handle->u.fd = fd; - handle->flags |= duplex_flags; - - return 0; -} - - -static DWORD WINAPI pipe_shutdown_thread_proc(void* parameter) { - uv_loop_t* loop; - uv_pipe_t* handle; - uv_shutdown_t* req; - - req = (uv_shutdown_t*) parameter; - assert(req); - handle = (uv_pipe_t*) req->handle; - assert(handle); - loop = handle->loop; - assert(loop); - - FlushFileBuffers(handle->handle); - - /* Post completed */ - POST_COMPLETION_FOR_REQ(loop, req); - - return 0; -} - - -void uv_pipe_endgame(uv_loop_t* loop, uv_pipe_t* handle) { - int err; - DWORD result; - uv_shutdown_t* req; - NTSTATUS nt_status; - IO_STATUS_BLOCK io_status; - FILE_PIPE_LOCAL_INFORMATION pipe_info; - uv__ipc_queue_item_t* item; - - if (handle->flags & UV_HANDLE_PIPE_READ_CANCELABLE) { - handle->flags &= ~UV_HANDLE_PIPE_READ_CANCELABLE; - uv_mutex_destroy(&handle->pipe.conn.readfile_mutex); - } - - if ((handle->flags & UV_HANDLE_CONNECTION) && - handle->stream.conn.shutdown_req != NULL && - handle->stream.conn.write_reqs_pending == 0) { - req = handle->stream.conn.shutdown_req; - - /* Clear the shutdown_req field so we don't go here again. */ - handle->stream.conn.shutdown_req = NULL; - - if (handle->flags & UV__HANDLE_CLOSING) { - UNREGISTER_HANDLE_REQ(loop, handle, req); - - /* Already closing. Cancel the shutdown. */ - if (req->cb) { - req->cb(req, UV_ECANCELED); - } - - DECREASE_PENDING_REQ_COUNT(handle); - return; - } - - /* Try to avoid flushing the pipe buffer in the thread pool. */ - nt_status = pNtQueryInformationFile(handle->handle, - &io_status, - &pipe_info, - sizeof pipe_info, - FilePipeLocalInformation); - - if (nt_status != STATUS_SUCCESS) { - /* Failure */ - UNREGISTER_HANDLE_REQ(loop, handle, req); - - handle->flags |= UV_HANDLE_WRITABLE; /* Questionable */ - if (req->cb) { - err = pRtlNtStatusToDosError(nt_status); - req->cb(req, uv_translate_sys_error(err)); - } - - DECREASE_PENDING_REQ_COUNT(handle); - return; - } - - if (pipe_info.OutboundQuota == pipe_info.WriteQuotaAvailable) { - /* Short-circuit, no need to call FlushFileBuffers. */ - uv_insert_pending_req(loop, (uv_req_t*) req); - return; - } - - /* Run FlushFileBuffers in the thread pool. */ - result = QueueUserWorkItem(pipe_shutdown_thread_proc, - req, - WT_EXECUTELONGFUNCTION); - if (result) { - return; - - } else { - /* Failure. */ - UNREGISTER_HANDLE_REQ(loop, handle, req); - - handle->flags |= UV_HANDLE_WRITABLE; /* Questionable */ - if (req->cb) { - err = GetLastError(); - req->cb(req, uv_translate_sys_error(err)); - } - - DECREASE_PENDING_REQ_COUNT(handle); - return; - } - } - - if (handle->flags & UV__HANDLE_CLOSING && - handle->reqs_pending == 0) { - assert(!(handle->flags & UV_HANDLE_CLOSED)); - - if (handle->flags & UV_HANDLE_CONNECTION) { - /* Free pending sockets */ - while (!QUEUE_EMPTY(&handle->pipe.conn.pending_ipc_info.queue)) { - QUEUE* q; - SOCKET socket; - - q = QUEUE_HEAD(&handle->pipe.conn.pending_ipc_info.queue); - QUEUE_REMOVE(q); - item = QUEUE_DATA(q, uv__ipc_queue_item_t, member); - - /* Materialize socket and close it */ - socket = WSASocketW(FROM_PROTOCOL_INFO, - FROM_PROTOCOL_INFO, - FROM_PROTOCOL_INFO, - &item->socket_info_ex.socket_info, - 0, - WSA_FLAG_OVERLAPPED); - uv__free(item); - - if (socket != INVALID_SOCKET) - closesocket(socket); - } - handle->pipe.conn.pending_ipc_info.queue_len = 0; - - if (handle->flags & UV_HANDLE_EMULATE_IOCP) { - if (handle->read_req.wait_handle != INVALID_HANDLE_VALUE) { - UnregisterWait(handle->read_req.wait_handle); - handle->read_req.wait_handle = INVALID_HANDLE_VALUE; - } - if (handle->read_req.event_handle) { - CloseHandle(handle->read_req.event_handle); - handle->read_req.event_handle = NULL; - } - } - } - - if (handle->flags & UV_HANDLE_PIPESERVER) { - assert(handle->pipe.serv.accept_reqs); - uv__free(handle->pipe.serv.accept_reqs); - handle->pipe.serv.accept_reqs = NULL; - } - - uv__handle_close(handle); - } -} - - -void uv_pipe_pending_instances(uv_pipe_t* handle, int count) { - if (handle->flags & UV_HANDLE_BOUND) - return; - handle->pipe.serv.pending_instances = count; - handle->flags |= UV_HANDLE_PIPESERVER; -} - - -/* Creates a pipe server. */ -int uv_pipe_bind(uv_pipe_t* handle, const char* name) { - uv_loop_t* loop = handle->loop; - int i, err, nameSize; - uv_pipe_accept_t* req; - - if (handle->flags & UV_HANDLE_BOUND) { - return UV_EINVAL; - } - - if (!name) { - return UV_EINVAL; - } - - if (!(handle->flags & UV_HANDLE_PIPESERVER)) { - handle->pipe.serv.pending_instances = default_pending_pipe_instances; - } - - handle->pipe.serv.accept_reqs = (uv_pipe_accept_t*) - uv__malloc(sizeof(uv_pipe_accept_t) * handle->pipe.serv.pending_instances); - if (!handle->pipe.serv.accept_reqs) { - uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc"); - } - - for (i = 0; i < handle->pipe.serv.pending_instances; i++) { - req = &handle->pipe.serv.accept_reqs[i]; - uv_req_init(loop, (uv_req_t*) req); - req->type = UV_ACCEPT; - req->data = handle; - req->pipeHandle = INVALID_HANDLE_VALUE; - req->next_pending = NULL; - } - - /* Convert name to UTF16. */ - nameSize = uv_utf8_to_utf16(name, NULL, 0) * sizeof(WCHAR); - handle->name = (WCHAR*)uv__malloc(nameSize); - if (!handle->name) { - uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc"); - } - - if (!uv_utf8_to_utf16(name, handle->name, nameSize / sizeof(WCHAR))) { - err = GetLastError(); - goto error; - } - - /* - * Attempt to create the first pipe with FILE_FLAG_FIRST_PIPE_INSTANCE. - * If this fails then there's already a pipe server for the given pipe name. - */ - handle->pipe.serv.accept_reqs[0].pipeHandle = CreateNamedPipeW(handle->name, - PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED | - FILE_FLAG_FIRST_PIPE_INSTANCE, - PIPE_TYPE_BYTE | PIPE_READMODE_BYTE | PIPE_WAIT, - PIPE_UNLIMITED_INSTANCES, 65536, 65536, 0, NULL); - - if (handle->pipe.serv.accept_reqs[0].pipeHandle == INVALID_HANDLE_VALUE) { - err = GetLastError(); - if (err == ERROR_ACCESS_DENIED) { - err = WSAEADDRINUSE; /* Translates to UV_EADDRINUSE. */ - } else if (err == ERROR_PATH_NOT_FOUND || err == ERROR_INVALID_NAME) { - err = WSAEACCES; /* Translates to UV_EACCES. */ - } - goto error; - } - - if (uv_set_pipe_handle(loop, - handle, - handle->pipe.serv.accept_reqs[0].pipeHandle, - -1, - 0)) { - err = GetLastError(); - goto error; - } - - handle->pipe.serv.pending_accepts = NULL; - handle->flags |= UV_HANDLE_PIPESERVER; - handle->flags |= UV_HANDLE_BOUND; - - return 0; - -error: - if (handle->name) { - uv__free(handle->name); - handle->name = NULL; - } - - if (handle->pipe.serv.accept_reqs[0].pipeHandle != INVALID_HANDLE_VALUE) { - CloseHandle(handle->pipe.serv.accept_reqs[0].pipeHandle); - handle->pipe.serv.accept_reqs[0].pipeHandle = INVALID_HANDLE_VALUE; - } - - return uv_translate_sys_error(err); -} - - -static DWORD WINAPI pipe_connect_thread_proc(void* parameter) { - uv_loop_t* loop; - uv_pipe_t* handle; - uv_connect_t* req; - HANDLE pipeHandle = INVALID_HANDLE_VALUE; - DWORD duplex_flags; - - req = (uv_connect_t*) parameter; - assert(req); - handle = (uv_pipe_t*) req->handle; - assert(handle); - loop = handle->loop; - assert(loop); - - /* We're here because CreateFile on a pipe returned ERROR_PIPE_BUSY. */ - /* We wait for the pipe to become available with WaitNamedPipe. */ - while (WaitNamedPipeW(handle->name, 30000)) { - /* The pipe is now available, try to connect. */ - pipeHandle = open_named_pipe(handle->name, &duplex_flags); - if (pipeHandle != INVALID_HANDLE_VALUE) { - break; - } - - SwitchToThread(); - } - - if (pipeHandle != INVALID_HANDLE_VALUE && - !uv_set_pipe_handle(loop, handle, pipeHandle, -1, duplex_flags)) { - SET_REQ_SUCCESS(req); - } else { - SET_REQ_ERROR(req, GetLastError()); - } - - /* Post completed */ - POST_COMPLETION_FOR_REQ(loop, req); - - return 0; -} - - -void uv_pipe_connect(uv_connect_t* req, uv_pipe_t* handle, - const char* name, uv_connect_cb cb) { - uv_loop_t* loop = handle->loop; - int err, nameSize; - HANDLE pipeHandle = INVALID_HANDLE_VALUE; - DWORD duplex_flags; - - uv_req_init(loop, (uv_req_t*) req); - req->type = UV_CONNECT; - req->handle = (uv_stream_t*) handle; - req->cb = cb; - - /* Convert name to UTF16. */ - nameSize = uv_utf8_to_utf16(name, NULL, 0) * sizeof(WCHAR); - handle->name = (WCHAR*)uv__malloc(nameSize); - if (!handle->name) { - uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc"); - } - - if (!uv_utf8_to_utf16(name, handle->name, nameSize / sizeof(WCHAR))) { - err = GetLastError(); - goto error; - } - - pipeHandle = open_named_pipe(handle->name, &duplex_flags); - if (pipeHandle == INVALID_HANDLE_VALUE) { - if (GetLastError() == ERROR_PIPE_BUSY) { - /* Wait for the server to make a pipe instance available. */ - if (!QueueUserWorkItem(&pipe_connect_thread_proc, - req, - WT_EXECUTELONGFUNCTION)) { - err = GetLastError(); - goto error; - } - - REGISTER_HANDLE_REQ(loop, handle, req); - handle->reqs_pending++; - - return; - } - - err = GetLastError(); - goto error; - } - - assert(pipeHandle != INVALID_HANDLE_VALUE); - - if (uv_set_pipe_handle(loop, - (uv_pipe_t*) req->handle, - pipeHandle, - -1, - duplex_flags)) { - err = GetLastError(); - goto error; - } - - SET_REQ_SUCCESS(req); - uv_insert_pending_req(loop, (uv_req_t*) req); - handle->reqs_pending++; - REGISTER_HANDLE_REQ(loop, handle, req); - return; - -error: - if (handle->name) { - uv__free(handle->name); - handle->name = NULL; - } - - if (pipeHandle != INVALID_HANDLE_VALUE) { - CloseHandle(pipeHandle); - } - - /* Make this req pending reporting an error. */ - SET_REQ_ERROR(req, err); - uv_insert_pending_req(loop, (uv_req_t*) req); - handle->reqs_pending++; - REGISTER_HANDLE_REQ(loop, handle, req); - return; -} - - -void uv__pipe_pause_read(uv_pipe_t* handle) { - if (handle->flags & UV_HANDLE_PIPE_READ_CANCELABLE) { - /* Pause the ReadFile task briefly, to work - around the Windows kernel bug that causes - any access to a NamedPipe to deadlock if - any process has called ReadFile */ - HANDLE h; - uv_mutex_lock(&handle->pipe.conn.readfile_mutex); - h = handle->pipe.conn.readfile_thread; - while (h) { - /* spinlock: we expect this to finish quickly, - or we are probably about to deadlock anyways - (in the kernel), so it doesn't matter */ - pCancelSynchronousIo(h); - SwitchToThread(); /* yield thread control briefly */ - h = handle->pipe.conn.readfile_thread; - } - } -} - - -void uv__pipe_unpause_read(uv_pipe_t* handle) { - if (handle->flags & UV_HANDLE_PIPE_READ_CANCELABLE) { - uv_mutex_unlock(&handle->pipe.conn.readfile_mutex); - } -} - - -void uv__pipe_stop_read(uv_pipe_t* handle) { - handle->flags &= ~UV_HANDLE_READING; - uv__pipe_pause_read((uv_pipe_t*)handle); - uv__pipe_unpause_read((uv_pipe_t*)handle); -} - - -/* Cleans up uv_pipe_t (server or connection) and all resources associated */ -/* with it. */ -void uv_pipe_cleanup(uv_loop_t* loop, uv_pipe_t* handle) { - int i; - HANDLE pipeHandle; - - uv__pipe_stop_read(handle); - - if (handle->name) { - uv__free(handle->name); - handle->name = NULL; - } - - if (handle->flags & UV_HANDLE_PIPESERVER) { - for (i = 0; i < handle->pipe.serv.pending_instances; i++) { - pipeHandle = handle->pipe.serv.accept_reqs[i].pipeHandle; - if (pipeHandle != INVALID_HANDLE_VALUE) { - CloseHandle(pipeHandle); - handle->pipe.serv.accept_reqs[i].pipeHandle = INVALID_HANDLE_VALUE; - } - } - handle->handle = INVALID_HANDLE_VALUE; - } - - if (handle->flags & UV_HANDLE_CONNECTION) { - handle->flags &= ~UV_HANDLE_WRITABLE; - eof_timer_destroy(handle); - } - - if ((handle->flags & UV_HANDLE_CONNECTION) - && handle->handle != INVALID_HANDLE_VALUE) - close_pipe(handle); -} - - -void uv_pipe_close(uv_loop_t* loop, uv_pipe_t* handle) { - if (handle->flags & UV_HANDLE_READING) { - handle->flags &= ~UV_HANDLE_READING; - DECREASE_ACTIVE_COUNT(loop, handle); - } - - if (handle->flags & UV_HANDLE_LISTENING) { - handle->flags &= ~UV_HANDLE_LISTENING; - DECREASE_ACTIVE_COUNT(loop, handle); - } - - uv_pipe_cleanup(loop, handle); - - if (handle->reqs_pending == 0) { - uv_want_endgame(loop, (uv_handle_t*) handle); - } - - handle->flags &= ~(UV_HANDLE_READABLE | UV_HANDLE_WRITABLE); - uv__handle_closing(handle); -} - - -static void uv_pipe_queue_accept(uv_loop_t* loop, uv_pipe_t* handle, - uv_pipe_accept_t* req, BOOL firstInstance) { - assert(handle->flags & UV_HANDLE_LISTENING); - - if (!firstInstance) { - assert(req->pipeHandle == INVALID_HANDLE_VALUE); - - req->pipeHandle = CreateNamedPipeW(handle->name, - PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED, - PIPE_TYPE_BYTE | PIPE_READMODE_BYTE | PIPE_WAIT, - PIPE_UNLIMITED_INSTANCES, 65536, 65536, 0, NULL); - - if (req->pipeHandle == INVALID_HANDLE_VALUE) { - SET_REQ_ERROR(req, GetLastError()); - uv_insert_pending_req(loop, (uv_req_t*) req); - handle->reqs_pending++; - return; - } - - if (uv_set_pipe_handle(loop, handle, req->pipeHandle, -1, 0)) { - CloseHandle(req->pipeHandle); - req->pipeHandle = INVALID_HANDLE_VALUE; - SET_REQ_ERROR(req, GetLastError()); - uv_insert_pending_req(loop, (uv_req_t*) req); - handle->reqs_pending++; - return; - } - } - - assert(req->pipeHandle != INVALID_HANDLE_VALUE); - - /* Prepare the overlapped structure. */ - memset(&(req->u.io.overlapped), 0, sizeof(req->u.io.overlapped)); - - if (!ConnectNamedPipe(req->pipeHandle, &req->u.io.overlapped) && - GetLastError() != ERROR_IO_PENDING) { - if (GetLastError() == ERROR_PIPE_CONNECTED) { - SET_REQ_SUCCESS(req); - } else { - CloseHandle(req->pipeHandle); - req->pipeHandle = INVALID_HANDLE_VALUE; - /* Make this req pending reporting an error. */ - SET_REQ_ERROR(req, GetLastError()); - } - uv_insert_pending_req(loop, (uv_req_t*) req); - handle->reqs_pending++; - return; - } - - handle->reqs_pending++; -} - - -int uv_pipe_accept(uv_pipe_t* server, uv_stream_t* client) { - uv_loop_t* loop = server->loop; - uv_pipe_t* pipe_client; - uv_pipe_accept_t* req; - QUEUE* q; - uv__ipc_queue_item_t* item; - int err; - - if (server->ipc) { - if (QUEUE_EMPTY(&server->pipe.conn.pending_ipc_info.queue)) { - /* No valid pending sockets. */ - return WSAEWOULDBLOCK; - } - - q = QUEUE_HEAD(&server->pipe.conn.pending_ipc_info.queue); - QUEUE_REMOVE(q); - server->pipe.conn.pending_ipc_info.queue_len--; - item = QUEUE_DATA(q, uv__ipc_queue_item_t, member); - - err = uv_tcp_import((uv_tcp_t*)client, - &item->socket_info_ex, - item->tcp_connection); - if (err != 0) - return err; - - uv__free(item); - - } else { - pipe_client = (uv_pipe_t*)client; - - /* Find a connection instance that has been connected, but not yet */ - /* accepted. */ - req = server->pipe.serv.pending_accepts; - - if (!req) { - /* No valid connections found, so we error out. */ - return WSAEWOULDBLOCK; - } - - /* Initialize the client handle and copy the pipeHandle to the client */ - uv_pipe_connection_init(pipe_client); - pipe_client->handle = req->pipeHandle; - pipe_client->flags |= UV_HANDLE_READABLE | UV_HANDLE_WRITABLE; - - /* Prepare the req to pick up a new connection */ - server->pipe.serv.pending_accepts = req->next_pending; - req->next_pending = NULL; - req->pipeHandle = INVALID_HANDLE_VALUE; - - if (!(server->flags & UV__HANDLE_CLOSING)) { - uv_pipe_queue_accept(loop, server, req, FALSE); - } - } - - return 0; -} - - -/* Starts listening for connections for the given pipe. */ -int uv_pipe_listen(uv_pipe_t* handle, int backlog, uv_connection_cb cb) { - uv_loop_t* loop = handle->loop; - int i; - - if (handle->flags & UV_HANDLE_LISTENING) { - handle->stream.serv.connection_cb = cb; - } - - if (!(handle->flags & UV_HANDLE_BOUND)) { - return WSAEINVAL; - } - - if (handle->flags & UV_HANDLE_READING) { - return WSAEISCONN; - } - - if (!(handle->flags & UV_HANDLE_PIPESERVER)) { - return ERROR_NOT_SUPPORTED; - } - - handle->flags |= UV_HANDLE_LISTENING; - INCREASE_ACTIVE_COUNT(loop, handle); - handle->stream.serv.connection_cb = cb; - - /* First pipe handle should have already been created in uv_pipe_bind */ - assert(handle->pipe.serv.accept_reqs[0].pipeHandle != INVALID_HANDLE_VALUE); - - for (i = 0; i < handle->pipe.serv.pending_instances; i++) { - uv_pipe_queue_accept(loop, handle, &handle->pipe.serv.accept_reqs[i], i == 0); - } - - return 0; -} - - -static DWORD WINAPI uv_pipe_zero_readfile_thread_proc(void* parameter) { - int result; - DWORD bytes; - uv_read_t* req = (uv_read_t*) parameter; - uv_pipe_t* handle = (uv_pipe_t*) req->data; - uv_loop_t* loop = handle->loop; - HANDLE hThread = NULL; - DWORD err; - uv_mutex_t *m = &handle->pipe.conn.readfile_mutex; - - assert(req != NULL); - assert(req->type == UV_READ); - assert(handle->type == UV_NAMED_PIPE); - - if (handle->flags & UV_HANDLE_PIPE_READ_CANCELABLE) { - uv_mutex_lock(m); /* mutex controls *setting* of readfile_thread */ - if (DuplicateHandle(GetCurrentProcess(), GetCurrentThread(), - GetCurrentProcess(), &hThread, - 0, TRUE, DUPLICATE_SAME_ACCESS)) { - handle->pipe.conn.readfile_thread = hThread; - } else { - hThread = NULL; - } - uv_mutex_unlock(m); - } -restart_readfile: - result = ReadFile(handle->handle, - &uv_zero_, - 0, - &bytes, - NULL); - if (!result) { - err = GetLastError(); - if (err == ERROR_OPERATION_ABORTED && - handle->flags & UV_HANDLE_PIPE_READ_CANCELABLE) { - if (handle->flags & UV_HANDLE_READING) { - /* just a brief break to do something else */ - handle->pipe.conn.readfile_thread = NULL; - /* resume after it is finished */ - uv_mutex_lock(m); - handle->pipe.conn.readfile_thread = hThread; - uv_mutex_unlock(m); - goto restart_readfile; - } else { - result = 1; /* successfully stopped reading */ - } - } - } - if (hThread) { - assert(hThread == handle->pipe.conn.readfile_thread); - /* mutex does not control clearing readfile_thread */ - handle->pipe.conn.readfile_thread = NULL; - uv_mutex_lock(m); - /* only when we hold the mutex lock is it safe to - open or close the handle */ - CloseHandle(hThread); - uv_mutex_unlock(m); - } - - if (!result) { - SET_REQ_ERROR(req, err); - } - - POST_COMPLETION_FOR_REQ(loop, req); - return 0; -} - - -static DWORD WINAPI uv_pipe_writefile_thread_proc(void* parameter) { - int result; - DWORD bytes; - uv_write_t* req = (uv_write_t*) parameter; - uv_pipe_t* handle = (uv_pipe_t*) req->handle; - uv_loop_t* loop = handle->loop; - - assert(req != NULL); - assert(req->type == UV_WRITE); - assert(handle->type == UV_NAMED_PIPE); - assert(req->write_buffer.base); - - result = WriteFile(handle->handle, - req->write_buffer.base, - req->write_buffer.len, - &bytes, - NULL); - - if (!result) { - SET_REQ_ERROR(req, GetLastError()); - } - - POST_COMPLETION_FOR_REQ(loop, req); - return 0; -} - - -static void CALLBACK post_completion_read_wait(void* context, BOOLEAN timed_out) { - uv_read_t* req; - uv_tcp_t* handle; - - req = (uv_read_t*) context; - assert(req != NULL); - handle = (uv_tcp_t*)req->data; - assert(handle != NULL); - assert(!timed_out); - - if (!PostQueuedCompletionStatus(handle->loop->iocp, - req->u.io.overlapped.InternalHigh, - 0, - &req->u.io.overlapped)) { - uv_fatal_error(GetLastError(), "PostQueuedCompletionStatus"); - } -} - - -static void CALLBACK post_completion_write_wait(void* context, BOOLEAN timed_out) { - uv_write_t* req; - uv_tcp_t* handle; - - req = (uv_write_t*) context; - assert(req != NULL); - handle = (uv_tcp_t*)req->handle; - assert(handle != NULL); - assert(!timed_out); - - if (!PostQueuedCompletionStatus(handle->loop->iocp, - req->u.io.overlapped.InternalHigh, - 0, - &req->u.io.overlapped)) { - uv_fatal_error(GetLastError(), "PostQueuedCompletionStatus"); - } -} - - -static void uv_pipe_queue_read(uv_loop_t* loop, uv_pipe_t* handle) { - uv_read_t* req; - int result; - - assert(handle->flags & UV_HANDLE_READING); - assert(!(handle->flags & UV_HANDLE_READ_PENDING)); - - assert(handle->handle != INVALID_HANDLE_VALUE); - - req = &handle->read_req; - - if (handle->flags & UV_HANDLE_NON_OVERLAPPED_PIPE) { - if (!QueueUserWorkItem(&uv_pipe_zero_readfile_thread_proc, - req, - WT_EXECUTELONGFUNCTION)) { - /* Make this req pending reporting an error. */ - SET_REQ_ERROR(req, GetLastError()); - goto error; - } - } else { - memset(&req->u.io.overlapped, 0, sizeof(req->u.io.overlapped)); - if (handle->flags & UV_HANDLE_EMULATE_IOCP) { - req->u.io.overlapped.hEvent = (HANDLE) ((uintptr_t) req->event_handle | 1); - } - - /* Do 0-read */ - result = ReadFile(handle->handle, - &uv_zero_, - 0, - NULL, - &req->u.io.overlapped); - - if (!result && GetLastError() != ERROR_IO_PENDING) { - /* Make this req pending reporting an error. */ - SET_REQ_ERROR(req, GetLastError()); - goto error; - } - - if (handle->flags & UV_HANDLE_EMULATE_IOCP) { - if (!req->event_handle) { - req->event_handle = CreateEvent(NULL, 0, 0, NULL); - if (!req->event_handle) { - uv_fatal_error(GetLastError(), "CreateEvent"); - } - } - if (req->wait_handle == INVALID_HANDLE_VALUE) { - if (!RegisterWaitForSingleObject(&req->wait_handle, - req->u.io.overlapped.hEvent, post_completion_read_wait, (void*) req, - INFINITE, WT_EXECUTEINWAITTHREAD)) { - SET_REQ_ERROR(req, GetLastError()); - goto error; - } - } - } - } - - /* Start the eof timer if there is one */ - eof_timer_start(handle); - handle->flags |= UV_HANDLE_READ_PENDING; - handle->reqs_pending++; - return; - -error: - uv_insert_pending_req(loop, (uv_req_t*)req); - handle->flags |= UV_HANDLE_READ_PENDING; - handle->reqs_pending++; -} - - -int uv_pipe_read_start(uv_pipe_t* handle, - uv_alloc_cb alloc_cb, - uv_read_cb read_cb) { - uv_loop_t* loop = handle->loop; - - handle->flags |= UV_HANDLE_READING; - INCREASE_ACTIVE_COUNT(loop, handle); - handle->read_cb = read_cb; - handle->alloc_cb = alloc_cb; - - /* If reading was stopped and then started again, there could still be a */ - /* read request pending. */ - if (!(handle->flags & UV_HANDLE_READ_PENDING)) - uv_pipe_queue_read(loop, handle); - - return 0; -} - - -static void uv_insert_non_overlapped_write_req(uv_pipe_t* handle, - uv_write_t* req) { - req->next_req = NULL; - if (handle->pipe.conn.non_overlapped_writes_tail) { - req->next_req = - handle->pipe.conn.non_overlapped_writes_tail->next_req; - handle->pipe.conn.non_overlapped_writes_tail->next_req = (uv_req_t*)req; - handle->pipe.conn.non_overlapped_writes_tail = req; - } else { - req->next_req = (uv_req_t*)req; - handle->pipe.conn.non_overlapped_writes_tail = req; - } -} - - -static uv_write_t* uv_remove_non_overlapped_write_req(uv_pipe_t* handle) { - uv_write_t* req; - - if (handle->pipe.conn.non_overlapped_writes_tail) { - req = (uv_write_t*)handle->pipe.conn.non_overlapped_writes_tail->next_req; - - if (req == handle->pipe.conn.non_overlapped_writes_tail) { - handle->pipe.conn.non_overlapped_writes_tail = NULL; - } else { - handle->pipe.conn.non_overlapped_writes_tail->next_req = - req->next_req; - } - - return req; - } else { - /* queue empty */ - return NULL; - } -} - - -static void uv_queue_non_overlapped_write(uv_pipe_t* handle) { - uv_write_t* req = uv_remove_non_overlapped_write_req(handle); - if (req) { - if (!QueueUserWorkItem(&uv_pipe_writefile_thread_proc, - req, - WT_EXECUTELONGFUNCTION)) { - uv_fatal_error(GetLastError(), "QueueUserWorkItem"); - } - } -} - - -static int uv_pipe_write_impl(uv_loop_t* loop, - uv_write_t* req, - uv_pipe_t* handle, - const uv_buf_t bufs[], - unsigned int nbufs, - uv_stream_t* send_handle, - uv_write_cb cb) { - int err; - int result; - uv_tcp_t* tcp_send_handle; - uv_write_t* ipc_header_req = NULL; - uv_ipc_frame_uv_stream ipc_frame; - - if (nbufs != 1 && (nbufs != 0 || !send_handle)) { - return ERROR_NOT_SUPPORTED; - } - - /* Only TCP handles are supported for sharing. */ - if (send_handle && ((send_handle->type != UV_TCP) || - (!(send_handle->flags & UV_HANDLE_BOUND) && - !(send_handle->flags & UV_HANDLE_CONNECTION)))) { - return ERROR_NOT_SUPPORTED; - } - - assert(handle->handle != INVALID_HANDLE_VALUE); - - uv_req_init(loop, (uv_req_t*) req); - req->type = UV_WRITE; - req->handle = (uv_stream_t*) handle; - req->cb = cb; - req->ipc_header = 0; - req->event_handle = NULL; - req->wait_handle = INVALID_HANDLE_VALUE; - memset(&req->u.io.overlapped, 0, sizeof(req->u.io.overlapped)); - - if (handle->ipc) { - assert(!(handle->flags & UV_HANDLE_NON_OVERLAPPED_PIPE)); - ipc_frame.header.flags = 0; - - /* Use the IPC framing protocol. */ - if (send_handle) { - tcp_send_handle = (uv_tcp_t*)send_handle; - - err = uv_tcp_duplicate_socket(tcp_send_handle, handle->pipe.conn.ipc_pid, - &ipc_frame.socket_info_ex.socket_info); - if (err) { - return err; - } - - ipc_frame.socket_info_ex.delayed_error = tcp_send_handle->delayed_error; - - ipc_frame.header.flags |= UV_IPC_TCP_SERVER; - - if (tcp_send_handle->flags & UV_HANDLE_CONNECTION) { - ipc_frame.header.flags |= UV_IPC_TCP_CONNECTION; - } - } - - if (nbufs == 1) { - ipc_frame.header.flags |= UV_IPC_RAW_DATA; - ipc_frame.header.raw_data_length = bufs[0].len; - } - - /* - * Use the provided req if we're only doing a single write. - * If we're doing multiple writes, use ipc_header_write_req to do - * the first write, and then use the provided req for the second write. - */ - if (!(ipc_frame.header.flags & UV_IPC_RAW_DATA)) { - ipc_header_req = req; - } else { - /* - * Try to use the preallocated write req if it's available. - * Otherwise allocate a new one. - */ - if (handle->pipe.conn.ipc_header_write_req.type != UV_WRITE) { - ipc_header_req = (uv_write_t*)&handle->pipe.conn.ipc_header_write_req; - } else { - ipc_header_req = (uv_write_t*)uv__malloc(sizeof(uv_write_t)); - if (!ipc_header_req) { - uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc"); - } - } - - uv_req_init(loop, (uv_req_t*) ipc_header_req); - ipc_header_req->type = UV_WRITE; - ipc_header_req->handle = (uv_stream_t*) handle; - ipc_header_req->cb = NULL; - ipc_header_req->ipc_header = 1; - } - - /* Write the header or the whole frame. */ - memset(&ipc_header_req->u.io.overlapped, 0, - sizeof(ipc_header_req->u.io.overlapped)); - - /* Using overlapped IO, but wait for completion before returning. - This write is blocking because ipc_frame is on stack. */ - ipc_header_req->u.io.overlapped.hEvent = CreateEvent(NULL, 1, 0, NULL); - if (!ipc_header_req->u.io.overlapped.hEvent) { - uv_fatal_error(GetLastError(), "CreateEvent"); - } - - result = WriteFile(handle->handle, - &ipc_frame, - ipc_frame.header.flags & UV_IPC_TCP_SERVER ? - sizeof(ipc_frame) : sizeof(ipc_frame.header), - NULL, - &ipc_header_req->u.io.overlapped); - if (!result && GetLastError() != ERROR_IO_PENDING) { - err = GetLastError(); - CloseHandle(ipc_header_req->u.io.overlapped.hEvent); - return err; - } - - if (!result) { - /* Request not completed immediately. Wait for it.*/ - if (WaitForSingleObject(ipc_header_req->u.io.overlapped.hEvent, INFINITE) != - WAIT_OBJECT_0) { - err = GetLastError(); - CloseHandle(ipc_header_req->u.io.overlapped.hEvent); - return err; - } - } - ipc_header_req->u.io.queued_bytes = 0; - CloseHandle(ipc_header_req->u.io.overlapped.hEvent); - ipc_header_req->u.io.overlapped.hEvent = NULL; - - REGISTER_HANDLE_REQ(loop, handle, ipc_header_req); - handle->reqs_pending++; - handle->stream.conn.write_reqs_pending++; - - /* If we don't have any raw data to write - we're done. */ - if (!(ipc_frame.header.flags & UV_IPC_RAW_DATA)) { - return 0; - } - } - - if ((handle->flags & - (UV_HANDLE_BLOCKING_WRITES | UV_HANDLE_NON_OVERLAPPED_PIPE)) == - (UV_HANDLE_BLOCKING_WRITES | UV_HANDLE_NON_OVERLAPPED_PIPE)) { - DWORD bytes; - result = WriteFile(handle->handle, - bufs[0].base, - bufs[0].len, - &bytes, - NULL); - - if (!result) { - err = GetLastError(); - return err; - } else { - /* Request completed immediately. */ - req->u.io.queued_bytes = 0; - } - - REGISTER_HANDLE_REQ(loop, handle, req); - handle->reqs_pending++; - handle->stream.conn.write_reqs_pending++; - POST_COMPLETION_FOR_REQ(loop, req); - return 0; - } else if (handle->flags & UV_HANDLE_NON_OVERLAPPED_PIPE) { - req->write_buffer = bufs[0]; - uv_insert_non_overlapped_write_req(handle, req); - if (handle->stream.conn.write_reqs_pending == 0) { - uv_queue_non_overlapped_write(handle); - } - - /* Request queued by the kernel. */ - req->u.io.queued_bytes = bufs[0].len; - handle->write_queue_size += req->u.io.queued_bytes; - } else if (handle->flags & UV_HANDLE_BLOCKING_WRITES) { - /* Using overlapped IO, but wait for completion before returning */ - req->u.io.overlapped.hEvent = CreateEvent(NULL, 1, 0, NULL); - if (!req->u.io.overlapped.hEvent) { - uv_fatal_error(GetLastError(), "CreateEvent"); - } - - result = WriteFile(handle->handle, - bufs[0].base, - bufs[0].len, - NULL, - &req->u.io.overlapped); - - if (!result && GetLastError() != ERROR_IO_PENDING) { - err = GetLastError(); - CloseHandle(req->u.io.overlapped.hEvent); - return err; - } - - if (result) { - /* Request completed immediately. */ - req->u.io.queued_bytes = 0; - } else { - /* Request queued by the kernel. */ - req->u.io.queued_bytes = bufs[0].len; - handle->write_queue_size += req->u.io.queued_bytes; - if (WaitForSingleObject(req->u.io.overlapped.hEvent, INFINITE) != - WAIT_OBJECT_0) { - err = GetLastError(); - CloseHandle(req->u.io.overlapped.hEvent); - return uv_translate_sys_error(err); - } - } - CloseHandle(req->u.io.overlapped.hEvent); - - REGISTER_HANDLE_REQ(loop, handle, req); - handle->reqs_pending++; - handle->stream.conn.write_reqs_pending++; - return 0; - } else { - result = WriteFile(handle->handle, - bufs[0].base, - bufs[0].len, - NULL, - &req->u.io.overlapped); - - if (!result && GetLastError() != ERROR_IO_PENDING) { - return GetLastError(); - } - - if (result) { - /* Request completed immediately. */ - req->u.io.queued_bytes = 0; - } else { - /* Request queued by the kernel. */ - req->u.io.queued_bytes = bufs[0].len; - handle->write_queue_size += req->u.io.queued_bytes; - } - - if (handle->flags & UV_HANDLE_EMULATE_IOCP) { - req->event_handle = CreateEvent(NULL, 0, 0, NULL); - if (!req->event_handle) { - uv_fatal_error(GetLastError(), "CreateEvent"); - } - if (!RegisterWaitForSingleObject(&req->wait_handle, - req->u.io.overlapped.hEvent, post_completion_write_wait, (void*) req, - INFINITE, WT_EXECUTEINWAITTHREAD)) { - return GetLastError(); - } - } - } - - REGISTER_HANDLE_REQ(loop, handle, req); - handle->reqs_pending++; - handle->stream.conn.write_reqs_pending++; - - return 0; -} - - -int uv_pipe_write(uv_loop_t* loop, - uv_write_t* req, - uv_pipe_t* handle, - const uv_buf_t bufs[], - unsigned int nbufs, - uv_write_cb cb) { - return uv_pipe_write_impl(loop, req, handle, bufs, nbufs, NULL, cb); -} - - -int uv_pipe_write2(uv_loop_t* loop, - uv_write_t* req, - uv_pipe_t* handle, - const uv_buf_t bufs[], - unsigned int nbufs, - uv_stream_t* send_handle, - uv_write_cb cb) { - if (!handle->ipc) { - return WSAEINVAL; - } - - return uv_pipe_write_impl(loop, req, handle, bufs, nbufs, send_handle, cb); -} - - -static void uv_pipe_read_eof(uv_loop_t* loop, uv_pipe_t* handle, - uv_buf_t buf) { - /* If there is an eof timer running, we don't need it any more, */ - /* so discard it. */ - eof_timer_destroy(handle); - - handle->flags &= ~UV_HANDLE_READABLE; - uv_read_stop((uv_stream_t*) handle); - - handle->read_cb((uv_stream_t*) handle, UV_EOF, &buf); -} - - -static void uv_pipe_read_error(uv_loop_t* loop, uv_pipe_t* handle, int error, - uv_buf_t buf) { - /* If there is an eof timer running, we don't need it any more, */ - /* so discard it. */ - eof_timer_destroy(handle); - - uv_read_stop((uv_stream_t*) handle); - - handle->read_cb((uv_stream_t*)handle, uv_translate_sys_error(error), &buf); -} - - -static void uv_pipe_read_error_or_eof(uv_loop_t* loop, uv_pipe_t* handle, - int error, uv_buf_t buf) { - if (error == ERROR_BROKEN_PIPE) { - uv_pipe_read_eof(loop, handle, buf); - } else { - uv_pipe_read_error(loop, handle, error, buf); - } -} - - -void uv__pipe_insert_pending_socket(uv_pipe_t* handle, - uv__ipc_socket_info_ex* info, - int tcp_connection) { - uv__ipc_queue_item_t* item; - - item = (uv__ipc_queue_item_t*) uv__malloc(sizeof(*item)); - if (item == NULL) - uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc"); - - memcpy(&item->socket_info_ex, info, sizeof(item->socket_info_ex)); - item->tcp_connection = tcp_connection; - QUEUE_INSERT_TAIL(&handle->pipe.conn.pending_ipc_info.queue, &item->member); - handle->pipe.conn.pending_ipc_info.queue_len++; -} - - -void uv_process_pipe_read_req(uv_loop_t* loop, uv_pipe_t* handle, - uv_req_t* req) { - DWORD bytes, avail; - uv_buf_t buf; - uv_ipc_frame_uv_stream ipc_frame; - - assert(handle->type == UV_NAMED_PIPE); - - handle->flags &= ~UV_HANDLE_READ_PENDING; - eof_timer_stop(handle); - - if (!REQ_SUCCESS(req)) { - /* An error occurred doing the 0-read. */ - if (handle->flags & UV_HANDLE_READING) { - uv_pipe_read_error_or_eof(loop, - handle, - GET_REQ_ERROR(req), - uv_null_buf_); - } - } else { - /* Do non-blocking reads until the buffer is empty */ - while (handle->flags & UV_HANDLE_READING) { - if (!PeekNamedPipe(handle->handle, - NULL, - 0, - NULL, - &avail, - NULL)) { - uv_pipe_read_error_or_eof(loop, handle, GetLastError(), uv_null_buf_); - break; - } - - if (avail == 0) { - /* There is nothing to read after all. */ - break; - } - - if (handle->ipc) { - /* Use the IPC framing protocol to read the incoming data. */ - if (handle->pipe.conn.remaining_ipc_rawdata_bytes == 0) { - /* We're reading a new frame. First, read the header. */ - assert(avail >= sizeof(ipc_frame.header)); - - if (!ReadFile(handle->handle, - &ipc_frame.header, - sizeof(ipc_frame.header), - &bytes, - NULL)) { - uv_pipe_read_error_or_eof(loop, handle, GetLastError(), - uv_null_buf_); - break; - } - - assert(bytes == sizeof(ipc_frame.header)); - assert(ipc_frame.header.flags <= (UV_IPC_TCP_SERVER | UV_IPC_RAW_DATA | - UV_IPC_TCP_CONNECTION)); - - if (ipc_frame.header.flags & UV_IPC_TCP_SERVER) { - assert(avail - sizeof(ipc_frame.header) >= - sizeof(ipc_frame.socket_info_ex)); - - /* Read the TCP socket info. */ - if (!ReadFile(handle->handle, - &ipc_frame.socket_info_ex, - sizeof(ipc_frame) - sizeof(ipc_frame.header), - &bytes, - NULL)) { - uv_pipe_read_error_or_eof(loop, handle, GetLastError(), - uv_null_buf_); - break; - } - - assert(bytes == sizeof(ipc_frame) - sizeof(ipc_frame.header)); - - /* Store the pending socket info. */ - uv__pipe_insert_pending_socket( - handle, - &ipc_frame.socket_info_ex, - ipc_frame.header.flags & UV_IPC_TCP_CONNECTION); - } - - if (ipc_frame.header.flags & UV_IPC_RAW_DATA) { - handle->pipe.conn.remaining_ipc_rawdata_bytes = - ipc_frame.header.raw_data_length; - continue; - } - } else { - avail = min(avail, (DWORD)handle->pipe.conn.remaining_ipc_rawdata_bytes); - } - } - - handle->alloc_cb((uv_handle_t*) handle, avail, &buf); - if (buf.len == 0) { - handle->read_cb((uv_stream_t*) handle, UV_ENOBUFS, &buf); - break; - } - assert(buf.base != NULL); - - if (ReadFile(handle->handle, - buf.base, - buf.len, - &bytes, - NULL)) { - /* Successful read */ - if (handle->ipc) { - assert(handle->pipe.conn.remaining_ipc_rawdata_bytes >= bytes); - handle->pipe.conn.remaining_ipc_rawdata_bytes = - handle->pipe.conn.remaining_ipc_rawdata_bytes - bytes; - } - handle->read_cb((uv_stream_t*)handle, bytes, &buf); - - /* Read again only if bytes == buf.len */ - if (bytes <= buf.len) { - break; - } - } else { - uv_pipe_read_error_or_eof(loop, handle, GetLastError(), buf); - break; - } - } - - /* Post another 0-read if still reading and not closing. */ - if ((handle->flags & UV_HANDLE_READING) && - !(handle->flags & UV_HANDLE_READ_PENDING)) { - uv_pipe_queue_read(loop, handle); - } - } - - DECREASE_PENDING_REQ_COUNT(handle); -} - - -void uv_process_pipe_write_req(uv_loop_t* loop, uv_pipe_t* handle, - uv_write_t* req) { - int err; - - assert(handle->type == UV_NAMED_PIPE); - - assert(handle->write_queue_size >= req->u.io.queued_bytes); - handle->write_queue_size -= req->u.io.queued_bytes; - - UNREGISTER_HANDLE_REQ(loop, handle, req); - - if (handle->flags & UV_HANDLE_EMULATE_IOCP) { - if (req->wait_handle != INVALID_HANDLE_VALUE) { - UnregisterWait(req->wait_handle); - req->wait_handle = INVALID_HANDLE_VALUE; - } - if (req->event_handle) { - CloseHandle(req->event_handle); - req->event_handle = NULL; - } - } - - if (req->ipc_header) { - if (req == &handle->pipe.conn.ipc_header_write_req) { - req->type = UV_UNKNOWN_REQ; - } else { - uv__free(req); - } - } else { - if (req->cb) { - err = GET_REQ_ERROR(req); - req->cb(req, uv_translate_sys_error(err)); - } - } - - handle->stream.conn.write_reqs_pending--; - - if (handle->flags & UV_HANDLE_NON_OVERLAPPED_PIPE && - handle->pipe.conn.non_overlapped_writes_tail) { - assert(handle->stream.conn.write_reqs_pending > 0); - uv_queue_non_overlapped_write(handle); - } - - if (handle->stream.conn.shutdown_req != NULL && - handle->stream.conn.write_reqs_pending == 0) { - uv_want_endgame(loop, (uv_handle_t*)handle); - } - - DECREASE_PENDING_REQ_COUNT(handle); -} - - -void uv_process_pipe_accept_req(uv_loop_t* loop, uv_pipe_t* handle, - uv_req_t* raw_req) { - uv_pipe_accept_t* req = (uv_pipe_accept_t*) raw_req; - - assert(handle->type == UV_NAMED_PIPE); - - if (handle->flags & UV__HANDLE_CLOSING) { - /* The req->pipeHandle should be freed already in uv_pipe_cleanup(). */ - assert(req->pipeHandle == INVALID_HANDLE_VALUE); - DECREASE_PENDING_REQ_COUNT(handle); - return; - } - - if (REQ_SUCCESS(req)) { - assert(req->pipeHandle != INVALID_HANDLE_VALUE); - req->next_pending = handle->pipe.serv.pending_accepts; - handle->pipe.serv.pending_accepts = req; - - if (handle->stream.serv.connection_cb) { - handle->stream.serv.connection_cb((uv_stream_t*)handle, 0); - } - } else { - if (req->pipeHandle != INVALID_HANDLE_VALUE) { - CloseHandle(req->pipeHandle); - req->pipeHandle = INVALID_HANDLE_VALUE; - } - if (!(handle->flags & UV__HANDLE_CLOSING)) { - uv_pipe_queue_accept(loop, handle, req, FALSE); - } - } - - DECREASE_PENDING_REQ_COUNT(handle); -} - - -void uv_process_pipe_connect_req(uv_loop_t* loop, uv_pipe_t* handle, - uv_connect_t* req) { - int err; - - assert(handle->type == UV_NAMED_PIPE); - - UNREGISTER_HANDLE_REQ(loop, handle, req); - - if (req->cb) { - err = 0; - if (REQ_SUCCESS(req)) { - uv_pipe_connection_init(handle); - } else { - err = GET_REQ_ERROR(req); - } - req->cb(req, uv_translate_sys_error(err)); - } - - DECREASE_PENDING_REQ_COUNT(handle); -} - - -void uv_process_pipe_shutdown_req(uv_loop_t* loop, uv_pipe_t* handle, - uv_shutdown_t* req) { - assert(handle->type == UV_NAMED_PIPE); - - UNREGISTER_HANDLE_REQ(loop, handle, req); - - if (handle->flags & UV_HANDLE_READABLE) { - /* Initialize and optionally start the eof timer. Only do this if the */ - /* pipe is readable and we haven't seen EOF come in ourselves. */ - eof_timer_init(handle); - - /* If reading start the timer right now. */ - /* Otherwise uv_pipe_queue_read will start it. */ - if (handle->flags & UV_HANDLE_READ_PENDING) { - eof_timer_start(handle); - } - - } else { - /* This pipe is not readable. We can just close it to let the other end */ - /* know that we're done writing. */ - close_pipe(handle); - } - - if (req->cb) { - req->cb(req, 0); - } - - DECREASE_PENDING_REQ_COUNT(handle); -} - - -static void eof_timer_init(uv_pipe_t* pipe) { - int r; - - assert(pipe->pipe.conn.eof_timer == NULL); - assert(pipe->flags & UV_HANDLE_CONNECTION); - - pipe->pipe.conn.eof_timer = (uv_timer_t*) uv__malloc(sizeof *pipe->pipe.conn.eof_timer); - - r = uv_timer_init(pipe->loop, pipe->pipe.conn.eof_timer); - assert(r == 0); /* timers can't fail */ - pipe->pipe.conn.eof_timer->data = pipe; - uv_unref((uv_handle_t*) pipe->pipe.conn.eof_timer); -} - - -static void eof_timer_start(uv_pipe_t* pipe) { - assert(pipe->flags & UV_HANDLE_CONNECTION); - - if (pipe->pipe.conn.eof_timer != NULL) { - uv_timer_start(pipe->pipe.conn.eof_timer, eof_timer_cb, eof_timeout, 0); - } -} - - -static void eof_timer_stop(uv_pipe_t* pipe) { - assert(pipe->flags & UV_HANDLE_CONNECTION); - - if (pipe->pipe.conn.eof_timer != NULL) { - uv_timer_stop(pipe->pipe.conn.eof_timer); - } -} - - -static void eof_timer_cb(uv_timer_t* timer) { - uv_pipe_t* pipe = (uv_pipe_t*) timer->data; - uv_loop_t* loop = timer->loop; - - assert(pipe->type == UV_NAMED_PIPE); - - /* This should always be true, since we start the timer only */ - /* in uv_pipe_queue_read after successfully calling ReadFile, */ - /* or in uv_process_pipe_shutdown_req if a read is pending, */ - /* and we always immediately stop the timer in */ - /* uv_process_pipe_read_req. */ - assert(pipe->flags & UV_HANDLE_READ_PENDING); - - /* If there are many packets coming off the iocp then the timer callback */ - /* may be called before the read request is coming off the queue. */ - /* Therefore we check here if the read request has completed but will */ - /* be processed later. */ - if ((pipe->flags & UV_HANDLE_READ_PENDING) && - HasOverlappedIoCompleted(&pipe->read_req.u.io.overlapped)) { - return; - } - - /* Force both ends off the pipe. */ - close_pipe(pipe); - - /* Stop reading, so the pending read that is going to fail will */ - /* not be reported to the user. */ - uv_read_stop((uv_stream_t*) pipe); - - /* Report the eof and update flags. This will get reported even if the */ - /* user stopped reading in the meantime. TODO: is that okay? */ - uv_pipe_read_eof(loop, pipe, uv_null_buf_); -} - - -static void eof_timer_destroy(uv_pipe_t* pipe) { - assert(pipe->flags & UV_HANDLE_CONNECTION); - - if (pipe->pipe.conn.eof_timer) { - uv_close((uv_handle_t*) pipe->pipe.conn.eof_timer, eof_timer_close_cb); - pipe->pipe.conn.eof_timer = NULL; - } -} - - -static void eof_timer_close_cb(uv_handle_t* handle) { - assert(handle->type == UV_TIMER); - uv__free(handle); -} - - -int uv_pipe_open(uv_pipe_t* pipe, uv_file file) { - HANDLE os_handle = uv__get_osfhandle(file); - NTSTATUS nt_status; - IO_STATUS_BLOCK io_status; - FILE_ACCESS_INFORMATION access; - DWORD duplex_flags = 0; - - if (os_handle == INVALID_HANDLE_VALUE) - return UV_EBADF; - - /* In order to avoid closing a stdio file descriptor 0-2, duplicate the - * underlying OS handle and forget about the original fd. - * We could also opt to use the original OS handle and just never close it, - * but then there would be no reliable way to cancel pending read operations - * upon close. - */ - if (file <= 2) { - if (!DuplicateHandle(INVALID_HANDLE_VALUE, - os_handle, - INVALID_HANDLE_VALUE, - &os_handle, - 0, - FALSE, - DUPLICATE_SAME_ACCESS)) - return uv_translate_sys_error(GetLastError()); - file = -1; - } - - /* Determine what kind of permissions we have on this handle. - * Cygwin opens the pipe in message mode, but we can support it, - * just query the access flags and set the stream flags accordingly. - */ - nt_status = pNtQueryInformationFile(os_handle, - &io_status, - &access, - sizeof(access), - FileAccessInformation); - if (nt_status != STATUS_SUCCESS) - return UV_EINVAL; - - if (pipe->ipc) { - if (!(access.AccessFlags & FILE_WRITE_DATA) || - !(access.AccessFlags & FILE_READ_DATA)) { - return UV_EINVAL; - } - } - - if (access.AccessFlags & FILE_WRITE_DATA) - duplex_flags |= UV_HANDLE_WRITABLE; - if (access.AccessFlags & FILE_READ_DATA) - duplex_flags |= UV_HANDLE_READABLE; - - if (os_handle == INVALID_HANDLE_VALUE || - uv_set_pipe_handle(pipe->loop, - pipe, - os_handle, - file, - duplex_flags) == -1) { - return UV_EINVAL; - } - - uv_pipe_connection_init(pipe); - - if (pipe->ipc) { - assert(!(pipe->flags & UV_HANDLE_NON_OVERLAPPED_PIPE)); - pipe->pipe.conn.ipc_pid = uv_parent_pid(); - assert(pipe->pipe.conn.ipc_pid != -1); - } - return 0; -} - - -static int uv__pipe_getname(const uv_pipe_t* handle, char* buffer, size_t* size) { - NTSTATUS nt_status; - IO_STATUS_BLOCK io_status; - FILE_NAME_INFORMATION tmp_name_info; - FILE_NAME_INFORMATION* name_info; - WCHAR* name_buf; - unsigned int addrlen; - unsigned int name_size; - unsigned int name_len; - int err; - - name_info = NULL; - - if (handle->handle == INVALID_HANDLE_VALUE) { - *size = 0; - return UV_EINVAL; - } - - uv__pipe_pause_read((uv_pipe_t*)handle); /* cast away const warning */ - - nt_status = pNtQueryInformationFile(handle->handle, - &io_status, - &tmp_name_info, - sizeof tmp_name_info, - FileNameInformation); - if (nt_status == STATUS_BUFFER_OVERFLOW) { - name_size = sizeof(*name_info) + tmp_name_info.FileNameLength; - name_info = uv__malloc(name_size); - if (!name_info) { - *size = 0; - err = UV_ENOMEM; - goto cleanup; - } - - nt_status = pNtQueryInformationFile(handle->handle, - &io_status, - name_info, - name_size, - FileNameInformation); - } - - if (nt_status != STATUS_SUCCESS) { - *size = 0; - err = uv_translate_sys_error(pRtlNtStatusToDosError(nt_status)); - goto error; - } - - if (!name_info) { - /* the struct on stack was used */ - name_buf = tmp_name_info.FileName; - name_len = tmp_name_info.FileNameLength; - } else { - name_buf = name_info->FileName; - name_len = name_info->FileNameLength; - } - - if (name_len == 0) { - *size = 0; - err = 0; - goto error; - } - - name_len /= sizeof(WCHAR); - - /* check how much space we need */ - addrlen = WideCharToMultiByte(CP_UTF8, - 0, - name_buf, - name_len, - NULL, - 0, - NULL, - NULL); - if (!addrlen) { - *size = 0; - err = uv_translate_sys_error(GetLastError()); - goto error; - } else if (pipe_prefix_len + addrlen > *size) { - /* "\\\\.\\pipe" + name */ - *size = pipe_prefix_len + addrlen; - err = UV_ENOBUFS; - goto error; - } - - memcpy(buffer, pipe_prefix, pipe_prefix_len); - addrlen = WideCharToMultiByte(CP_UTF8, - 0, - name_buf, - name_len, - buffer+pipe_prefix_len, - *size-pipe_prefix_len, - NULL, - NULL); - if (!addrlen) { - *size = 0; - err = uv_translate_sys_error(GetLastError()); - goto error; - } - - addrlen += pipe_prefix_len; - *size = addrlen; - - err = 0; - goto cleanup; - -error: - uv__free(name_info); - -cleanup: - uv__pipe_unpause_read((uv_pipe_t*)handle); /* cast away const warning */ - return err; -} - - -int uv_pipe_pending_count(uv_pipe_t* handle) { - if (!handle->ipc) - return 0; - return handle->pipe.conn.pending_ipc_info.queue_len; -} - - -int uv_pipe_getsockname(const uv_pipe_t* handle, char* buffer, size_t* size) { - if (handle->flags & UV_HANDLE_BOUND) - return uv__pipe_getname(handle, buffer, size); - - if (handle->flags & UV_HANDLE_CONNECTION || - handle->handle != INVALID_HANDLE_VALUE) { - *size = 0; - return 0; - } - - return UV_EBADF; -} - - -int uv_pipe_getpeername(const uv_pipe_t* handle, char* buffer, size_t* size) { - /* emulate unix behaviour */ - if (handle->flags & UV_HANDLE_BOUND) - return UV_ENOTCONN; - - if (handle->handle != INVALID_HANDLE_VALUE) - return uv__pipe_getname(handle, buffer, size); - - return UV_EBADF; -} - - -uv_handle_type uv_pipe_pending_type(uv_pipe_t* handle) { - if (!handle->ipc) - return UV_UNKNOWN_HANDLE; - if (handle->pipe.conn.pending_ipc_info.queue_len == 0) - return UV_UNKNOWN_HANDLE; - else - return UV_TCP; -} diff --git a/outside/libuv-v1.7.5/src/win/poll.c b/outside/libuv-v1.7.5/src/win/poll.c deleted file mode 100644 index ce861d6ff..000000000 --- a/outside/libuv-v1.7.5/src/win/poll.c +++ /dev/null @@ -1,635 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include -#include - -#include "uv.h" -#include "internal.h" -#include "handle-inl.h" -#include "req-inl.h" - - -static const GUID uv_msafd_provider_ids[UV_MSAFD_PROVIDER_COUNT] = { - {0xe70f1aa0, 0xab8b, 0x11cf, - {0x8c, 0xa3, 0x00, 0x80, 0x5f, 0x48, 0xa1, 0x92}}, - {0xf9eab0c0, 0x26d4, 0x11d0, - {0xbb, 0xbf, 0x00, 0xaa, 0x00, 0x6c, 0x34, 0xe4}}, - {0x9fc48064, 0x7298, 0x43e4, - {0xb7, 0xbd, 0x18, 0x1f, 0x20, 0x89, 0x79, 0x2a}} -}; - -typedef struct uv_single_fd_set_s { - unsigned int fd_count; - SOCKET fd_array[1]; -} uv_single_fd_set_t; - - -static OVERLAPPED overlapped_dummy_; -static uv_once_t overlapped_dummy_init_guard_ = UV_ONCE_INIT; - -static AFD_POLL_INFO afd_poll_info_dummy_; - - -static void uv__init_overlapped_dummy(void) { - HANDLE event; - - event = CreateEvent(NULL, TRUE, TRUE, NULL); - if (event == NULL) - uv_fatal_error(GetLastError(), "CreateEvent"); - - memset(&overlapped_dummy_, 0, sizeof overlapped_dummy_); - overlapped_dummy_.hEvent = (HANDLE) ((uintptr_t) event | 1); -} - - -static OVERLAPPED* uv__get_overlapped_dummy() { - uv_once(&overlapped_dummy_init_guard_, uv__init_overlapped_dummy); - return &overlapped_dummy_; -} - - -static AFD_POLL_INFO* uv__get_afd_poll_info_dummy() { - return &afd_poll_info_dummy_; -} - - -static void uv__fast_poll_submit_poll_req(uv_loop_t* loop, uv_poll_t* handle) { - uv_req_t* req; - AFD_POLL_INFO* afd_poll_info; - DWORD result; - - /* Find a yet unsubmitted req to submit. */ - if (handle->submitted_events_1 == 0) { - req = &handle->poll_req_1; - afd_poll_info = &handle->afd_poll_info_1; - handle->submitted_events_1 = handle->events; - handle->mask_events_1 = 0; - handle->mask_events_2 = handle->events; - } else if (handle->submitted_events_2 == 0) { - req = &handle->poll_req_2; - afd_poll_info = &handle->afd_poll_info_2; - handle->submitted_events_2 = handle->events; - handle->mask_events_1 = handle->events; - handle->mask_events_2 = 0; - } else { - assert(0); - return; - } - - /* Setting Exclusive to TRUE makes the other poll request return if there */ - /* is any. */ - afd_poll_info->Exclusive = TRUE; - afd_poll_info->NumberOfHandles = 1; - afd_poll_info->Timeout.QuadPart = INT64_MAX; - afd_poll_info->Handles[0].Handle = (HANDLE) handle->socket; - afd_poll_info->Handles[0].Status = 0; - afd_poll_info->Handles[0].Events = 0; - - if (handle->events & UV_READABLE) { - afd_poll_info->Handles[0].Events |= AFD_POLL_RECEIVE | - AFD_POLL_DISCONNECT | AFD_POLL_ACCEPT | AFD_POLL_ABORT; - } - if (handle->events & UV_WRITABLE) { - afd_poll_info->Handles[0].Events |= AFD_POLL_SEND | AFD_POLL_CONNECT_FAIL; - } - - memset(&req->u.io.overlapped, 0, sizeof req->u.io.overlapped); - - result = uv_msafd_poll((SOCKET) handle->peer_socket, - afd_poll_info, - afd_poll_info, - &req->u.io.overlapped); - if (result != 0 && WSAGetLastError() != WSA_IO_PENDING) { - /* Queue this req, reporting an error. */ - SET_REQ_ERROR(req, WSAGetLastError()); - uv_insert_pending_req(loop, req); - } -} - - -static int uv__fast_poll_cancel_poll_req(uv_loop_t* loop, uv_poll_t* handle) { - AFD_POLL_INFO afd_poll_info; - DWORD result; - - afd_poll_info.Exclusive = TRUE; - afd_poll_info.NumberOfHandles = 1; - afd_poll_info.Timeout.QuadPart = INT64_MAX; - afd_poll_info.Handles[0].Handle = (HANDLE) handle->socket; - afd_poll_info.Handles[0].Status = 0; - afd_poll_info.Handles[0].Events = AFD_POLL_ALL; - - result = uv_msafd_poll(handle->socket, - &afd_poll_info, - uv__get_afd_poll_info_dummy(), - uv__get_overlapped_dummy()); - - if (result == SOCKET_ERROR) { - DWORD error = WSAGetLastError(); - if (error != WSA_IO_PENDING) - return error; - } - - return 0; -} - - -static void uv__fast_poll_process_poll_req(uv_loop_t* loop, uv_poll_t* handle, - uv_req_t* req) { - unsigned char mask_events; - AFD_POLL_INFO* afd_poll_info; - - if (req == &handle->poll_req_1) { - afd_poll_info = &handle->afd_poll_info_1; - handle->submitted_events_1 = 0; - mask_events = handle->mask_events_1; - } else if (req == &handle->poll_req_2) { - afd_poll_info = &handle->afd_poll_info_2; - handle->submitted_events_2 = 0; - mask_events = handle->mask_events_2; - } else { - assert(0); - return; - } - - /* Report an error unless the select was just interrupted. */ - if (!REQ_SUCCESS(req)) { - DWORD error = GET_REQ_SOCK_ERROR(req); - if (error != WSAEINTR && handle->events != 0) { - handle->events = 0; /* Stop the watcher */ - handle->poll_cb(handle, uv_translate_sys_error(error), 0); - } - - } else if (afd_poll_info->NumberOfHandles >= 1) { - unsigned char events = 0; - - if ((afd_poll_info->Handles[0].Events & (AFD_POLL_RECEIVE | - AFD_POLL_DISCONNECT | AFD_POLL_ACCEPT | AFD_POLL_ABORT)) != 0) { - events |= UV_READABLE; - } - if ((afd_poll_info->Handles[0].Events & (AFD_POLL_SEND | - AFD_POLL_CONNECT_FAIL)) != 0) { - events |= UV_WRITABLE; - } - - events &= handle->events & ~mask_events; - - if (afd_poll_info->Handles[0].Events & AFD_POLL_LOCAL_CLOSE) { - /* Stop polling. */ - handle->events = 0; - if (uv__is_active(handle)) - uv__handle_stop(handle); - } - - if (events != 0) { - handle->poll_cb(handle, 0, events); - } - } - - if ((handle->events & ~(handle->submitted_events_1 | - handle->submitted_events_2)) != 0) { - uv__fast_poll_submit_poll_req(loop, handle); - } else if ((handle->flags & UV__HANDLE_CLOSING) && - handle->submitted_events_1 == 0 && - handle->submitted_events_2 == 0) { - uv_want_endgame(loop, (uv_handle_t*) handle); - } -} - - -static int uv__fast_poll_set(uv_loop_t* loop, uv_poll_t* handle, int events) { - assert(handle->type == UV_POLL); - assert(!(handle->flags & UV__HANDLE_CLOSING)); - assert((events & ~(UV_READABLE | UV_WRITABLE)) == 0); - - handle->events = events; - - if (handle->events != 0) { - uv__handle_start(handle); - } else { - uv__handle_stop(handle); - } - - if ((handle->events & ~(handle->submitted_events_1 | - handle->submitted_events_2)) != 0) { - uv__fast_poll_submit_poll_req(handle->loop, handle); - } - - return 0; -} - - -static int uv__fast_poll_close(uv_loop_t* loop, uv_poll_t* handle) { - handle->events = 0; - uv__handle_closing(handle); - - if (handle->submitted_events_1 == 0 && - handle->submitted_events_2 == 0) { - uv_want_endgame(loop, (uv_handle_t*) handle); - return 0; - } else { - /* Cancel outstanding poll requests by executing another, unique poll */ - /* request that forces the outstanding ones to return. */ - return uv__fast_poll_cancel_poll_req(loop, handle); - } -} - - -static SOCKET uv__fast_poll_create_peer_socket(HANDLE iocp, - WSAPROTOCOL_INFOW* protocol_info) { - SOCKET sock = 0; - - sock = WSASocketW(protocol_info->iAddressFamily, - protocol_info->iSocketType, - protocol_info->iProtocol, - protocol_info, - 0, - WSA_FLAG_OVERLAPPED); - if (sock == INVALID_SOCKET) { - return INVALID_SOCKET; - } - - if (!SetHandleInformation((HANDLE) sock, HANDLE_FLAG_INHERIT, 0)) { - goto error; - }; - - if (CreateIoCompletionPort((HANDLE) sock, - iocp, - (ULONG_PTR) sock, - 0) == NULL) { - goto error; - } - - return sock; - - error: - closesocket(sock); - return INVALID_SOCKET; -} - - -static SOCKET uv__fast_poll_get_peer_socket(uv_loop_t* loop, - WSAPROTOCOL_INFOW* protocol_info) { - int index, i; - SOCKET peer_socket; - - index = -1; - for (i = 0; (size_t) i < ARRAY_SIZE(uv_msafd_provider_ids); i++) { - if (memcmp((void*) &protocol_info->ProviderId, - (void*) &uv_msafd_provider_ids[i], - sizeof protocol_info->ProviderId) == 0) { - index = i; - } - } - - /* Check if the protocol uses an msafd socket. */ - if (index < 0) { - return INVALID_SOCKET; - } - - /* If we didn't (try) to create a peer socket yet, try to make one. Don't */ - /* try again if the peer socket creation failed earlier for the same */ - /* protocol. */ - peer_socket = loop->poll_peer_sockets[index]; - if (peer_socket == 0) { - peer_socket = uv__fast_poll_create_peer_socket(loop->iocp, protocol_info); - loop->poll_peer_sockets[index] = peer_socket; - } - - return peer_socket; -} - - -static DWORD WINAPI uv__slow_poll_thread_proc(void* arg) { - uv_req_t* req = (uv_req_t*) arg; - uv_poll_t* handle = (uv_poll_t*) req->data; - unsigned char reported_events; - int r; - uv_single_fd_set_t rfds, wfds, efds; - struct timeval timeout; - - assert(handle->type == UV_POLL); - assert(req->type == UV_POLL_REQ); - - if (handle->events & UV_READABLE) { - rfds.fd_count = 1; - rfds.fd_array[0] = handle->socket; - } else { - rfds.fd_count = 0; - } - - if (handle->events & UV_WRITABLE) { - wfds.fd_count = 1; - wfds.fd_array[0] = handle->socket; - efds.fd_count = 1; - efds.fd_array[0] = handle->socket; - } else { - wfds.fd_count = 0; - efds.fd_count = 0; - } - - /* Make the select() time out after 3 minutes. If select() hangs because */ - /* the user closed the socket, we will at least not hang indefinitely. */ - timeout.tv_sec = 3 * 60; - timeout.tv_usec = 0; - - r = select(1, (fd_set*) &rfds, (fd_set*) &wfds, (fd_set*) &efds, &timeout); - if (r == SOCKET_ERROR) { - /* Queue this req, reporting an error. */ - SET_REQ_ERROR(&handle->poll_req_1, WSAGetLastError()); - POST_COMPLETION_FOR_REQ(handle->loop, req); - return 0; - } - - reported_events = 0; - - if (r > 0) { - if (rfds.fd_count > 0) { - assert(rfds.fd_count == 1); - assert(rfds.fd_array[0] == handle->socket); - reported_events |= UV_READABLE; - } - - if (wfds.fd_count > 0) { - assert(wfds.fd_count == 1); - assert(wfds.fd_array[0] == handle->socket); - reported_events |= UV_WRITABLE; - } else if (efds.fd_count > 0) { - assert(efds.fd_count == 1); - assert(efds.fd_array[0] == handle->socket); - reported_events |= UV_WRITABLE; - } - } - - SET_REQ_SUCCESS(req); - req->u.io.overlapped.InternalHigh = (DWORD) reported_events; - POST_COMPLETION_FOR_REQ(handle->loop, req); - - return 0; -} - - -static void uv__slow_poll_submit_poll_req(uv_loop_t* loop, uv_poll_t* handle) { - uv_req_t* req; - - /* Find a yet unsubmitted req to submit. */ - if (handle->submitted_events_1 == 0) { - req = &handle->poll_req_1; - handle->submitted_events_1 = handle->events; - handle->mask_events_1 = 0; - handle->mask_events_2 = handle->events; - } else if (handle->submitted_events_2 == 0) { - req = &handle->poll_req_2; - handle->submitted_events_2 = handle->events; - handle->mask_events_1 = handle->events; - handle->mask_events_2 = 0; - } else { - assert(0); - return; - } - - if (!QueueUserWorkItem(uv__slow_poll_thread_proc, - (void*) req, - WT_EXECUTELONGFUNCTION)) { - /* Make this req pending, reporting an error. */ - SET_REQ_ERROR(req, GetLastError()); - uv_insert_pending_req(loop, req); - } -} - - - -static void uv__slow_poll_process_poll_req(uv_loop_t* loop, uv_poll_t* handle, - uv_req_t* req) { - unsigned char mask_events; - int err; - - if (req == &handle->poll_req_1) { - handle->submitted_events_1 = 0; - mask_events = handle->mask_events_1; - } else if (req == &handle->poll_req_2) { - handle->submitted_events_2 = 0; - mask_events = handle->mask_events_2; - } else { - assert(0); - return; - } - - if (!REQ_SUCCESS(req)) { - /* Error. */ - if (handle->events != 0) { - err = GET_REQ_ERROR(req); - handle->events = 0; /* Stop the watcher */ - handle->poll_cb(handle, uv_translate_sys_error(err), 0); - } - } else { - /* Got some events. */ - int events = req->u.io.overlapped.InternalHigh & handle->events & ~mask_events; - if (events != 0) { - handle->poll_cb(handle, 0, events); - } - } - - if ((handle->events & ~(handle->submitted_events_1 | - handle->submitted_events_2)) != 0) { - uv__slow_poll_submit_poll_req(loop, handle); - } else if ((handle->flags & UV__HANDLE_CLOSING) && - handle->submitted_events_1 == 0 && - handle->submitted_events_2 == 0) { - uv_want_endgame(loop, (uv_handle_t*) handle); - } -} - - -static int uv__slow_poll_set(uv_loop_t* loop, uv_poll_t* handle, int events) { - assert(handle->type == UV_POLL); - assert(!(handle->flags & UV__HANDLE_CLOSING)); - assert((events & ~(UV_READABLE | UV_WRITABLE)) == 0); - - handle->events = events; - - if (handle->events != 0) { - uv__handle_start(handle); - } else { - uv__handle_stop(handle); - } - - if ((handle->events & - ~(handle->submitted_events_1 | handle->submitted_events_2)) != 0) { - uv__slow_poll_submit_poll_req(handle->loop, handle); - } - - return 0; -} - - -static int uv__slow_poll_close(uv_loop_t* loop, uv_poll_t* handle) { - handle->events = 0; - uv__handle_closing(handle); - - if (handle->submitted_events_1 == 0 && - handle->submitted_events_2 == 0) { - uv_want_endgame(loop, (uv_handle_t*) handle); - } - - return 0; -} - - -int uv_poll_init(uv_loop_t* loop, uv_poll_t* handle, int fd) { - return uv_poll_init_socket(loop, handle, (SOCKET) uv__get_osfhandle(fd)); -} - - -int uv_poll_init_socket(uv_loop_t* loop, uv_poll_t* handle, - uv_os_sock_t socket) { - WSAPROTOCOL_INFOW protocol_info; - int len; - SOCKET peer_socket, base_socket; - DWORD bytes; - DWORD yes = 1; - - /* Set the socket to nonblocking mode */ - if (ioctlsocket(socket, FIONBIO, &yes) == SOCKET_ERROR) - return uv_translate_sys_error(WSAGetLastError()); - - /* Try to obtain a base handle for the socket. This increases this chances */ - /* that we find an AFD handle and are able to use the fast poll mechanism. */ - /* This will always fail on windows XP/2k3, since they don't support the */ - /* SIO_BASE_HANDLE ioctl. */ -#ifndef NDEBUG - base_socket = INVALID_SOCKET; -#endif - - if (WSAIoctl(socket, - SIO_BASE_HANDLE, - NULL, - 0, - &base_socket, - sizeof base_socket, - &bytes, - NULL, - NULL) == 0) { - assert(base_socket != 0 && base_socket != INVALID_SOCKET); - socket = base_socket; - } - - uv__handle_init(loop, (uv_handle_t*) handle, UV_POLL); - handle->socket = socket; - handle->events = 0; - - /* Obtain protocol information about the socket. */ - len = sizeof protocol_info; - if (getsockopt(socket, - SOL_SOCKET, - SO_PROTOCOL_INFOW, - (char*) &protocol_info, - &len) != 0) { - return uv_translate_sys_error(WSAGetLastError()); - } - - /* Get the peer socket that is needed to enable fast poll. If the returned */ - /* value is NULL, the protocol is not implemented by MSAFD and we'll have */ - /* to use slow mode. */ - peer_socket = uv__fast_poll_get_peer_socket(loop, &protocol_info); - - if (peer_socket != INVALID_SOCKET) { - /* Initialize fast poll specific fields. */ - handle->peer_socket = peer_socket; - } else { - /* Initialize slow poll specific fields. */ - handle->flags |= UV_HANDLE_POLL_SLOW; - } - - /* Initialize 2 poll reqs. */ - handle->submitted_events_1 = 0; - uv_req_init(loop, (uv_req_t*) &(handle->poll_req_1)); - handle->poll_req_1.type = UV_POLL_REQ; - handle->poll_req_1.data = handle; - - handle->submitted_events_2 = 0; - uv_req_init(loop, (uv_req_t*) &(handle->poll_req_2)); - handle->poll_req_2.type = UV_POLL_REQ; - handle->poll_req_2.data = handle; - - return 0; -} - - -int uv_poll_start(uv_poll_t* handle, int events, uv_poll_cb cb) { - int err; - - if (!(handle->flags & UV_HANDLE_POLL_SLOW)) { - err = uv__fast_poll_set(handle->loop, handle, events); - } else { - err = uv__slow_poll_set(handle->loop, handle, events); - } - - if (err) { - return uv_translate_sys_error(err); - } - - handle->poll_cb = cb; - - return 0; -} - - -int uv_poll_stop(uv_poll_t* handle) { - int err; - - if (!(handle->flags & UV_HANDLE_POLL_SLOW)) { - err = uv__fast_poll_set(handle->loop, handle, 0); - } else { - err = uv__slow_poll_set(handle->loop, handle, 0); - } - - return uv_translate_sys_error(err); -} - - -void uv_process_poll_req(uv_loop_t* loop, uv_poll_t* handle, uv_req_t* req) { - if (!(handle->flags & UV_HANDLE_POLL_SLOW)) { - uv__fast_poll_process_poll_req(loop, handle, req); - } else { - uv__slow_poll_process_poll_req(loop, handle, req); - } -} - - -int uv_poll_close(uv_loop_t* loop, uv_poll_t* handle) { - if (!(handle->flags & UV_HANDLE_POLL_SLOW)) { - return uv__fast_poll_close(loop, handle); - } else { - return uv__slow_poll_close(loop, handle); - } -} - - -void uv_poll_endgame(uv_loop_t* loop, uv_poll_t* handle) { - assert(handle->flags & UV__HANDLE_CLOSING); - assert(!(handle->flags & UV_HANDLE_CLOSED)); - - assert(handle->submitted_events_1 == 0); - assert(handle->submitted_events_2 == 0); - - uv__handle_close(handle); -} diff --git a/outside/libuv-v1.7.5/src/win/process-stdio.c b/outside/libuv-v1.7.5/src/win/process-stdio.c deleted file mode 100644 index e3c06f57d..000000000 --- a/outside/libuv-v1.7.5/src/win/process-stdio.c +++ /dev/null @@ -1,510 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include -#include -#include -#include - -#include "uv.h" -#include "internal.h" -#include "handle-inl.h" - - -/* - * The `child_stdio_buffer` buffer has the following layout: - * int number_of_fds - * unsigned char crt_flags[number_of_fds] - * HANDLE os_handle[number_of_fds] - */ -#define CHILD_STDIO_SIZE(count) \ - (sizeof(int) + \ - sizeof(unsigned char) * (count) + \ - sizeof(uintptr_t) * (count)) - -#define CHILD_STDIO_COUNT(buffer) \ - *((unsigned int*) (buffer)) - -#define CHILD_STDIO_CRT_FLAGS(buffer, fd) \ - *((unsigned char*) (buffer) + sizeof(int) + fd) - -#define CHILD_STDIO_HANDLE(buffer, fd) \ - *((HANDLE*) ((unsigned char*) (buffer) + \ - sizeof(int) + \ - sizeof(unsigned char) * \ - CHILD_STDIO_COUNT((buffer)) + \ - sizeof(HANDLE) * (fd))) - - -/* CRT file descriptor mode flags */ -#define FOPEN 0x01 -#define FEOFLAG 0x02 -#define FCRLF 0x04 -#define FPIPE 0x08 -#define FNOINHERIT 0x10 -#define FAPPEND 0x20 -#define FDEV 0x40 -#define FTEXT 0x80 - - -/* - * Clear the HANDLE_FLAG_INHERIT flag from all HANDLEs that were inherited - * the parent process. Don't check for errors - the stdio handles may not be - * valid, or may be closed already. There is no guarantee that this function - * does a perfect job. - */ -void uv_disable_stdio_inheritance(void) { - HANDLE handle; - STARTUPINFOW si; - - /* Make the windows stdio handles non-inheritable. */ - handle = GetStdHandle(STD_INPUT_HANDLE); - if (handle != NULL && handle != INVALID_HANDLE_VALUE) - SetHandleInformation(handle, HANDLE_FLAG_INHERIT, 0); - - handle = GetStdHandle(STD_OUTPUT_HANDLE); - if (handle != NULL && handle != INVALID_HANDLE_VALUE) - SetHandleInformation(handle, HANDLE_FLAG_INHERIT, 0); - - handle = GetStdHandle(STD_ERROR_HANDLE); - if (handle != NULL && handle != INVALID_HANDLE_VALUE) - SetHandleInformation(handle, HANDLE_FLAG_INHERIT, 0); - - /* Make inherited CRT FDs non-inheritable. */ - GetStartupInfoW(&si); - if (uv__stdio_verify(si.lpReserved2, si.cbReserved2)) - uv__stdio_noinherit(si.lpReserved2); -} - - -static int uv__create_stdio_pipe_pair(uv_loop_t* loop, - uv_pipe_t* server_pipe, HANDLE* child_pipe_ptr, unsigned int flags) { - char pipe_name[64]; - SECURITY_ATTRIBUTES sa; - DWORD server_access = 0; - DWORD client_access = 0; - HANDLE child_pipe = INVALID_HANDLE_VALUE; - int err; - - if (flags & UV_READABLE_PIPE) { - /* The server needs inbound access too, otherwise CreateNamedPipe() */ - /* won't give us the FILE_READ_ATTRIBUTES permission. We need that to */ - /* probe the state of the write buffer when we're trying to shutdown */ - /* the pipe. */ - server_access |= PIPE_ACCESS_OUTBOUND | PIPE_ACCESS_INBOUND; - client_access |= GENERIC_READ | FILE_WRITE_ATTRIBUTES; - } - if (flags & UV_WRITABLE_PIPE) { - server_access |= PIPE_ACCESS_INBOUND; - client_access |= GENERIC_WRITE | FILE_READ_ATTRIBUTES; - } - - /* Create server pipe handle. */ - err = uv_stdio_pipe_server(loop, - server_pipe, - server_access, - pipe_name, - sizeof(pipe_name)); - if (err) - goto error; - - /* Create child pipe handle. */ - sa.nLength = sizeof sa; - sa.lpSecurityDescriptor = NULL; - sa.bInheritHandle = TRUE; - - child_pipe = CreateFileA(pipe_name, - client_access, - 0, - &sa, - OPEN_EXISTING, - server_pipe->ipc ? FILE_FLAG_OVERLAPPED : 0, - NULL); - if (child_pipe == INVALID_HANDLE_VALUE) { - err = GetLastError(); - goto error; - } - -#ifndef NDEBUG - /* Validate that the pipe was opened in the right mode. */ - { - DWORD mode; - BOOL r = GetNamedPipeHandleState(child_pipe, - &mode, - NULL, - NULL, - NULL, - NULL, - 0); - assert(r == TRUE); - assert(mode == (PIPE_READMODE_BYTE | PIPE_WAIT)); - } -#endif - - /* Do a blocking ConnectNamedPipe. This should not block because we have */ - /* both ends of the pipe created. */ - if (!ConnectNamedPipe(server_pipe->handle, NULL)) { - if (GetLastError() != ERROR_PIPE_CONNECTED) { - err = GetLastError(); - goto error; - } - } - - /* The server end is now readable and/or writable. */ - if (flags & UV_READABLE_PIPE) - server_pipe->flags |= UV_HANDLE_WRITABLE; - if (flags & UV_WRITABLE_PIPE) - server_pipe->flags |= UV_HANDLE_READABLE; - - *child_pipe_ptr = child_pipe; - return 0; - - error: - if (server_pipe->handle != INVALID_HANDLE_VALUE) { - uv_pipe_cleanup(loop, server_pipe); - } - - if (child_pipe != INVALID_HANDLE_VALUE) { - CloseHandle(child_pipe); - } - - return err; -} - - -static int uv__duplicate_handle(uv_loop_t* loop, HANDLE handle, HANDLE* dup) { - HANDLE current_process; - - - /* _get_osfhandle will sometimes return -2 in case of an error. This seems */ - /* to happen when fd <= 2 and the process' corresponding stdio handle is */ - /* set to NULL. Unfortunately DuplicateHandle will happily duplicate */ - /* (HANDLE) -2, so this situation goes unnoticed until someone tries to */ - /* use the duplicate. Therefore we filter out known-invalid handles here. */ - if (handle == INVALID_HANDLE_VALUE || - handle == NULL || - handle == (HANDLE) -2) { - *dup = INVALID_HANDLE_VALUE; - return ERROR_INVALID_HANDLE; - } - - current_process = GetCurrentProcess(); - - if (!DuplicateHandle(current_process, - handle, - current_process, - dup, - 0, - TRUE, - DUPLICATE_SAME_ACCESS)) { - *dup = INVALID_HANDLE_VALUE; - return GetLastError(); - } - - return 0; -} - - -static int uv__duplicate_fd(uv_loop_t* loop, int fd, HANDLE* dup) { - HANDLE handle; - - if (fd == -1) { - *dup = INVALID_HANDLE_VALUE; - return ERROR_INVALID_HANDLE; - } - - handle = uv__get_osfhandle(fd); - return uv__duplicate_handle(loop, handle, dup); -} - - -int uv__create_nul_handle(HANDLE* handle_ptr, - DWORD access) { - HANDLE handle; - SECURITY_ATTRIBUTES sa; - - sa.nLength = sizeof sa; - sa.lpSecurityDescriptor = NULL; - sa.bInheritHandle = TRUE; - - handle = CreateFileW(L"NUL", - access, - FILE_SHARE_READ | FILE_SHARE_WRITE, - &sa, - OPEN_EXISTING, - 0, - NULL); - if (handle == INVALID_HANDLE_VALUE) { - return GetLastError(); - } - - *handle_ptr = handle; - return 0; -} - - -int uv__stdio_create(uv_loop_t* loop, - const uv_process_options_t* options, - BYTE** buffer_ptr) { - BYTE* buffer; - int count, i; - int err; - - count = options->stdio_count; - - if (count < 0 || count > 255) { - /* Only support FDs 0-255 */ - return ERROR_NOT_SUPPORTED; - } else if (count < 3) { - /* There should always be at least 3 stdio handles. */ - count = 3; - } - - /* Allocate the child stdio buffer */ - buffer = (BYTE*) uv__malloc(CHILD_STDIO_SIZE(count)); - if (buffer == NULL) { - return ERROR_OUTOFMEMORY; - } - - /* Prepopulate the buffer with INVALID_HANDLE_VALUE handles so we can */ - /* clean up on failure. */ - CHILD_STDIO_COUNT(buffer) = count; - for (i = 0; i < count; i++) { - CHILD_STDIO_CRT_FLAGS(buffer, i) = 0; - CHILD_STDIO_HANDLE(buffer, i) = INVALID_HANDLE_VALUE; - } - - for (i = 0; i < count; i++) { - uv_stdio_container_t fdopt; - if (i < options->stdio_count) { - fdopt = options->stdio[i]; - } else { - fdopt.flags = UV_IGNORE; - } - - switch (fdopt.flags & (UV_IGNORE | UV_CREATE_PIPE | UV_INHERIT_FD | - UV_INHERIT_STREAM)) { - case UV_IGNORE: - /* Starting a process with no stdin/stout/stderr can confuse it. */ - /* So no matter what the user specified, we make sure the first */ - /* three FDs are always open in their typical modes, e.g. stdin */ - /* be readable and stdout/err should be writable. For FDs > 2, don't */ - /* do anything - all handles in the stdio buffer are initialized with */ - /* INVALID_HANDLE_VALUE, which should be okay. */ - if (i <= 2) { - DWORD access = (i == 0) ? FILE_GENERIC_READ : - FILE_GENERIC_WRITE | FILE_READ_ATTRIBUTES; - - err = uv__create_nul_handle(&CHILD_STDIO_HANDLE(buffer, i), - access); - if (err) - goto error; - - CHILD_STDIO_CRT_FLAGS(buffer, i) = FOPEN | FDEV; - } - break; - - case UV_CREATE_PIPE: { - /* Create a pair of two connected pipe ends; one end is turned into */ - /* an uv_pipe_t for use by the parent. The other one is given to */ - /* the child. */ - uv_pipe_t* parent_pipe = (uv_pipe_t*) fdopt.data.stream; - HANDLE child_pipe = INVALID_HANDLE_VALUE; - - /* Create a new, connected pipe pair. stdio[i].stream should point */ - /* to an uninitialized, but not connected pipe handle. */ - assert(fdopt.data.stream->type == UV_NAMED_PIPE); - assert(!(fdopt.data.stream->flags & UV_HANDLE_CONNECTION)); - assert(!(fdopt.data.stream->flags & UV_HANDLE_PIPESERVER)); - - err = uv__create_stdio_pipe_pair(loop, - parent_pipe, - &child_pipe, - fdopt.flags); - if (err) - goto error; - - CHILD_STDIO_HANDLE(buffer, i) = child_pipe; - CHILD_STDIO_CRT_FLAGS(buffer, i) = FOPEN | FPIPE; - break; - } - - case UV_INHERIT_FD: { - /* Inherit a raw FD. */ - HANDLE child_handle; - - /* Make an inheritable duplicate of the handle. */ - err = uv__duplicate_fd(loop, fdopt.data.fd, &child_handle); - if (err) { - /* If fdopt.data.fd is not valid and fd fd <= 2, then ignore the */ - /* error. */ - if (fdopt.data.fd <= 2 && err == ERROR_INVALID_HANDLE) { - CHILD_STDIO_CRT_FLAGS(buffer, i) = 0; - CHILD_STDIO_HANDLE(buffer, i) = INVALID_HANDLE_VALUE; - break; - } - goto error; - } - - /* Figure out what the type is. */ - switch (GetFileType(child_handle)) { - case FILE_TYPE_DISK: - CHILD_STDIO_CRT_FLAGS(buffer, i) = FOPEN; - break; - - case FILE_TYPE_PIPE: - CHILD_STDIO_CRT_FLAGS(buffer, i) = FOPEN | FPIPE; - - case FILE_TYPE_CHAR: - case FILE_TYPE_REMOTE: - CHILD_STDIO_CRT_FLAGS(buffer, i) = FOPEN | FDEV; - break; - - case FILE_TYPE_UNKNOWN: - if (GetLastError() != 0) { - err = GetLastError(); - CloseHandle(child_handle); - goto error; - } - CHILD_STDIO_CRT_FLAGS(buffer, i) = FOPEN | FDEV; - break; - - default: - assert(0); - return -1; - } - - CHILD_STDIO_HANDLE(buffer, i) = child_handle; - break; - } - - case UV_INHERIT_STREAM: { - /* Use an existing stream as the stdio handle for the child. */ - HANDLE stream_handle, child_handle; - unsigned char crt_flags; - uv_stream_t* stream = fdopt.data.stream; - - /* Leech the handle out of the stream. */ - if (stream->type == UV_TTY) { - stream_handle = ((uv_tty_t*) stream)->handle; - crt_flags = FOPEN | FDEV; - } else if (stream->type == UV_NAMED_PIPE && - stream->flags & UV_HANDLE_CONNECTION) { - stream_handle = ((uv_pipe_t*) stream)->handle; - crt_flags = FOPEN | FPIPE; - } else { - stream_handle = INVALID_HANDLE_VALUE; - crt_flags = 0; - } - - if (stream_handle == NULL || - stream_handle == INVALID_HANDLE_VALUE) { - /* The handle is already closed, or not yet created, or the */ - /* stream type is not supported. */ - err = ERROR_NOT_SUPPORTED; - goto error; - } - - /* Make an inheritable copy of the handle. */ - err = uv__duplicate_handle(loop, stream_handle, &child_handle); - if (err) - goto error; - - CHILD_STDIO_HANDLE(buffer, i) = child_handle; - CHILD_STDIO_CRT_FLAGS(buffer, i) = crt_flags; - break; - } - - default: - assert(0); - return -1; - } - } - - *buffer_ptr = buffer; - return 0; - - error: - uv__stdio_destroy(buffer); - return err; -} - - -void uv__stdio_destroy(BYTE* buffer) { - int i, count; - - count = CHILD_STDIO_COUNT(buffer); - for (i = 0; i < count; i++) { - HANDLE handle = CHILD_STDIO_HANDLE(buffer, i); - if (handle != INVALID_HANDLE_VALUE) { - CloseHandle(handle); - } - } - - uv__free(buffer); -} - - -void uv__stdio_noinherit(BYTE* buffer) { - int i, count; - - count = CHILD_STDIO_COUNT(buffer); - for (i = 0; i < count; i++) { - HANDLE handle = CHILD_STDIO_HANDLE(buffer, i); - if (handle != INVALID_HANDLE_VALUE) { - SetHandleInformation(handle, HANDLE_FLAG_INHERIT, 0); - } - } -} - - -int uv__stdio_verify(BYTE* buffer, WORD size) { - unsigned int count; - - /* Check the buffer pointer. */ - if (buffer == NULL) - return 0; - - /* Verify that the buffer is at least big enough to hold the count. */ - if (size < CHILD_STDIO_SIZE(0)) - return 0; - - /* Verify if the count is within range. */ - count = CHILD_STDIO_COUNT(buffer); - if (count > 256) - return 0; - - /* Verify that the buffer size is big enough to hold info for N FDs. */ - if (size < CHILD_STDIO_SIZE(count)) - return 0; - - return 1; -} - - -WORD uv__stdio_size(BYTE* buffer) { - return (WORD) CHILD_STDIO_SIZE(CHILD_STDIO_COUNT((buffer))); -} - - -HANDLE uv__stdio_handle(BYTE* buffer, int fd) { - return CHILD_STDIO_HANDLE(buffer, fd); -} diff --git a/outside/libuv-v1.7.5/src/win/process.c b/outside/libuv-v1.7.5/src/win/process.c deleted file mode 100644 index 855c37408..000000000 --- a/outside/libuv-v1.7.5/src/win/process.c +++ /dev/null @@ -1,1247 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include -#include -#include -#include -#include -#include -#include -#include /* alloca */ - -#include "uv.h" -#include "internal.h" -#include "handle-inl.h" -#include "req-inl.h" - - -#define SIGKILL 9 - - -typedef struct env_var { - const WCHAR* const wide; - const WCHAR* const wide_eq; - const size_t len; /* including null or '=' */ -} env_var_t; - -#define E_V(str) { L##str, L##str L"=", sizeof(str) } - -static const env_var_t required_vars[] = { /* keep me sorted */ - E_V("HOMEDRIVE"), - E_V("HOMEPATH"), - E_V("LOGONSERVER"), - E_V("PATH"), - E_V("SYSTEMDRIVE"), - E_V("SYSTEMROOT"), - E_V("TEMP"), - E_V("USERDOMAIN"), - E_V("USERNAME"), - E_V("USERPROFILE"), - E_V("WINDIR"), -}; -static size_t n_required_vars = ARRAY_SIZE(required_vars); - - -static HANDLE uv_global_job_handle_; -static uv_once_t uv_global_job_handle_init_guard_ = UV_ONCE_INIT; - - -static void uv__init_global_job_handle(void) { - /* Create a job object and set it up to kill all contained processes when - * it's closed. Since this handle is made non-inheritable and we're not - * giving it to anyone, we're the only process holding a reference to it. - * That means that if this process exits it is closed and all the processes - * it contains are killed. All processes created with uv_spawn that are not - * spawned with the UV_PROCESS_DETACHED flag are assigned to this job. - * - * We're setting the JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK flag so only the - * processes that we explicitly add are affected, and *their* subprocesses - * are not. This ensures that our child processes are not limited in their - * ability to use job control on Windows versions that don't deal with - * nested jobs (prior to Windows 8 / Server 2012). It also lets our child - * processes created detached processes without explicitly breaking away - * from job control (which uv_spawn doesn't, either). - */ - SECURITY_ATTRIBUTES attr; - JOBOBJECT_EXTENDED_LIMIT_INFORMATION info; - - memset(&attr, 0, sizeof attr); - attr.bInheritHandle = FALSE; - - memset(&info, 0, sizeof info); - info.BasicLimitInformation.LimitFlags = - JOB_OBJECT_LIMIT_BREAKAWAY_OK | - JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK | - JOB_OBJECT_LIMIT_DIE_ON_UNHANDLED_EXCEPTION | - JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE; - - uv_global_job_handle_ = CreateJobObjectW(&attr, NULL); - if (uv_global_job_handle_ == NULL) - uv_fatal_error(GetLastError(), "CreateJobObjectW"); - - if (!SetInformationJobObject(uv_global_job_handle_, - JobObjectExtendedLimitInformation, - &info, - sizeof info)) - uv_fatal_error(GetLastError(), "SetInformationJobObject"); -} - - -static int uv_utf8_to_utf16_alloc(const char* s, WCHAR** ws_ptr) { - int ws_len, r; - WCHAR* ws; - - ws_len = MultiByteToWideChar(CP_UTF8, - 0, - s, - -1, - NULL, - 0); - if (ws_len <= 0) { - return GetLastError(); - } - - ws = (WCHAR*) uv__malloc(ws_len * sizeof(WCHAR)); - if (ws == NULL) { - return ERROR_OUTOFMEMORY; - } - - r = MultiByteToWideChar(CP_UTF8, - 0, - s, - -1, - ws, - ws_len); - assert(r == ws_len); - - *ws_ptr = ws; - return 0; -} - - -static void uv_process_init(uv_loop_t* loop, uv_process_t* handle) { - uv__handle_init(loop, (uv_handle_t*) handle, UV_PROCESS); - handle->exit_cb = NULL; - handle->pid = 0; - handle->exit_signal = 0; - handle->wait_handle = INVALID_HANDLE_VALUE; - handle->process_handle = INVALID_HANDLE_VALUE; - handle->child_stdio_buffer = NULL; - handle->exit_cb_pending = 0; - - uv_req_init(loop, (uv_req_t*)&handle->exit_req); - handle->exit_req.type = UV_PROCESS_EXIT; - handle->exit_req.data = handle; -} - - -/* - * Path search functions - */ - -/* - * Helper function for search_path - */ -static WCHAR* search_path_join_test(const WCHAR* dir, - size_t dir_len, - const WCHAR* name, - size_t name_len, - const WCHAR* ext, - size_t ext_len, - const WCHAR* cwd, - size_t cwd_len) { - WCHAR *result, *result_pos; - DWORD attrs; - if (dir_len > 2 && dir[0] == L'\\' && dir[1] == L'\\') { - /* It's a UNC path so ignore cwd */ - cwd_len = 0; - } else if (dir_len >= 1 && (dir[0] == L'/' || dir[0] == L'\\')) { - /* It's a full path without drive letter, use cwd's drive letter only */ - cwd_len = 2; - } else if (dir_len >= 2 && dir[1] == L':' && - (dir_len < 3 || (dir[2] != L'/' && dir[2] != L'\\'))) { - /* It's a relative path with drive letter (ext.g. D:../some/file) - * Replace drive letter in dir by full cwd if it points to the same drive, - * otherwise use the dir only. - */ - if (cwd_len < 2 || _wcsnicmp(cwd, dir, 2) != 0) { - cwd_len = 0; - } else { - dir += 2; - dir_len -= 2; - } - } else if (dir_len > 2 && dir[1] == L':') { - /* It's an absolute path with drive letter - * Don't use the cwd at all - */ - cwd_len = 0; - } - - /* Allocate buffer for output */ - result = result_pos = (WCHAR*)uv__malloc(sizeof(WCHAR) * - (cwd_len + 1 + dir_len + 1 + name_len + 1 + ext_len + 1)); - - /* Copy cwd */ - wcsncpy(result_pos, cwd, cwd_len); - result_pos += cwd_len; - - /* Add a path separator if cwd didn't end with one */ - if (cwd_len && wcsrchr(L"\\/:", result_pos[-1]) == NULL) { - result_pos[0] = L'\\'; - result_pos++; - } - - /* Copy dir */ - wcsncpy(result_pos, dir, dir_len); - result_pos += dir_len; - - /* Add a separator if the dir didn't end with one */ - if (dir_len && wcsrchr(L"\\/:", result_pos[-1]) == NULL) { - result_pos[0] = L'\\'; - result_pos++; - } - - /* Copy filename */ - wcsncpy(result_pos, name, name_len); - result_pos += name_len; - - if (ext_len) { - /* Add a dot if the filename didn't end with one */ - if (name_len && result_pos[-1] != '.') { - result_pos[0] = L'.'; - result_pos++; - } - - /* Copy extension */ - wcsncpy(result_pos, ext, ext_len); - result_pos += ext_len; - } - - /* Null terminator */ - result_pos[0] = L'\0'; - - attrs = GetFileAttributesW(result); - - if (attrs != INVALID_FILE_ATTRIBUTES && - !(attrs & FILE_ATTRIBUTE_DIRECTORY)) { - return result; - } - - uv__free(result); - return NULL; -} - - -/* - * Helper function for search_path - */ -static WCHAR* path_search_walk_ext(const WCHAR *dir, - size_t dir_len, - const WCHAR *name, - size_t name_len, - WCHAR *cwd, - size_t cwd_len, - int name_has_ext) { - WCHAR* result; - - /* If the name itself has a nonempty extension, try this extension first */ - if (name_has_ext) { - result = search_path_join_test(dir, dir_len, - name, name_len, - L"", 0, - cwd, cwd_len); - if (result != NULL) { - return result; - } - } - - /* Try .com extension */ - result = search_path_join_test(dir, dir_len, - name, name_len, - L"com", 3, - cwd, cwd_len); - if (result != NULL) { - return result; - } - - /* Try .exe extension */ - result = search_path_join_test(dir, dir_len, - name, name_len, - L"exe", 3, - cwd, cwd_len); - if (result != NULL) { - return result; - } - - return NULL; -} - - -/* - * search_path searches the system path for an executable filename - - * the windows API doesn't provide this as a standalone function nor as an - * option to CreateProcess. - * - * It tries to return an absolute filename. - * - * Furthermore, it tries to follow the semantics that cmd.exe, with this - * exception that PATHEXT environment variable isn't used. Since CreateProcess - * can start only .com and .exe files, only those extensions are tried. This - * behavior equals that of msvcrt's spawn functions. - * - * - Do not search the path if the filename already contains a path (either - * relative or absolute). - * - * - If there's really only a filename, check the current directory for file, - * then search all path directories. - * - * - If filename specified has *any* extension, search for the file with the - * specified extension first. - * - * - If the literal filename is not found in a directory, try *appending* - * (not replacing) .com first and then .exe. - * - * - The path variable may contain relative paths; relative paths are relative - * to the cwd. - * - * - Directories in path may or may not end with a trailing backslash. - * - * - CMD does not trim leading/trailing whitespace from path/pathex entries - * nor from the environment variables as a whole. - * - * - When cmd.exe cannot read a directory, it will just skip it and go on - * searching. However, unlike posix-y systems, it will happily try to run a - * file that is not readable/executable; if the spawn fails it will not - * continue searching. - * - * UNC path support: we are dealing with UNC paths in both the path and the - * filename. This is a deviation from what cmd.exe does (it does not let you - * start a program by specifying an UNC path on the command line) but this is - * really a pointless restriction. - * - */ -static WCHAR* search_path(const WCHAR *file, - WCHAR *cwd, - const WCHAR *path) { - int file_has_dir; - WCHAR* result = NULL; - WCHAR *file_name_start; - WCHAR *dot; - const WCHAR *dir_start, *dir_end, *dir_path; - size_t dir_len; - int name_has_ext; - - size_t file_len = wcslen(file); - size_t cwd_len = wcslen(cwd); - - /* If the caller supplies an empty filename, - * we're not gonna return c:\windows\.exe -- GFY! - */ - if (file_len == 0 - || (file_len == 1 && file[0] == L'.')) { - return NULL; - } - - /* Find the start of the filename so we can split the directory from the */ - /* name. */ - for (file_name_start = (WCHAR*)file + file_len; - file_name_start > file - && file_name_start[-1] != L'\\' - && file_name_start[-1] != L'/' - && file_name_start[-1] != L':'; - file_name_start--); - - file_has_dir = file_name_start != file; - - /* Check if the filename includes an extension */ - dot = wcschr(file_name_start, L'.'); - name_has_ext = (dot != NULL && dot[1] != L'\0'); - - if (file_has_dir) { - /* The file has a path inside, don't use path */ - result = path_search_walk_ext( - file, file_name_start - file, - file_name_start, file_len - (file_name_start - file), - cwd, cwd_len, - name_has_ext); - - } else { - dir_end = path; - - /* The file is really only a name; look in cwd first, then scan path */ - result = path_search_walk_ext(L"", 0, - file, file_len, - cwd, cwd_len, - name_has_ext); - - while (result == NULL) { - if (*dir_end == L'\0') { - break; - } - - /* Skip the separator that dir_end now points to */ - if (dir_end != path || *path == L';') { - dir_end++; - } - - /* Next slice starts just after where the previous one ended */ - dir_start = dir_end; - - /* Slice until the next ; or \0 is found */ - dir_end = wcschr(dir_start, L';'); - if (dir_end == NULL) { - dir_end = wcschr(dir_start, L'\0'); - } - - /* If the slice is zero-length, don't bother */ - if (dir_end - dir_start == 0) { - continue; - } - - dir_path = dir_start; - dir_len = dir_end - dir_start; - - /* Adjust if the path is quoted. */ - if (dir_path[0] == '"' || dir_path[0] == '\'') { - ++dir_path; - --dir_len; - } - - if (dir_path[dir_len - 1] == '"' || dir_path[dir_len - 1] == '\'') { - --dir_len; - } - - result = path_search_walk_ext(dir_path, dir_len, - file, file_len, - cwd, cwd_len, - name_has_ext); - } - } - - return result; -} - - -/* - * Quotes command line arguments - * Returns a pointer to the end (next char to be written) of the buffer - */ -WCHAR* quote_cmd_arg(const WCHAR *source, WCHAR *target) { - size_t len = wcslen(source); - size_t i; - int quote_hit; - WCHAR* start; - - if (len == 0) { - /* Need double quotation for empty argument */ - *(target++) = L'"'; - *(target++) = L'"'; - return target; - } - - if (NULL == wcspbrk(source, L" \t\"")) { - /* No quotation needed */ - wcsncpy(target, source, len); - target += len; - return target; - } - - if (NULL == wcspbrk(source, L"\"\\")) { - /* - * No embedded double quotes or backlashes, so I can just wrap - * quote marks around the whole thing. - */ - *(target++) = L'"'; - wcsncpy(target, source, len); - target += len; - *(target++) = L'"'; - return target; - } - - /* - * Expected input/output: - * input : hello"world - * output: "hello\"world" - * input : hello""world - * output: "hello\"\"world" - * input : hello\world - * output: hello\world - * input : hello\\world - * output: hello\\world - * input : hello\"world - * output: "hello\\\"world" - * input : hello\\"world - * output: "hello\\\\\"world" - * input : hello world\ - * output: "hello world\" - */ - - *(target++) = L'"'; - start = target; - quote_hit = 1; - - for (i = len; i > 0; --i) { - *(target++) = source[i - 1]; - - if (quote_hit && source[i - 1] == L'\\') { - *(target++) = L'\\'; - } else if(source[i - 1] == L'"') { - quote_hit = 1; - *(target++) = L'\\'; - } else { - quote_hit = 0; - } - } - target[0] = L'\0'; - wcsrev(start); - *(target++) = L'"'; - return target; -} - - -int make_program_args(char** args, int verbatim_arguments, WCHAR** dst_ptr) { - char** arg; - WCHAR* dst = NULL; - WCHAR* temp_buffer = NULL; - size_t dst_len = 0; - size_t temp_buffer_len = 0; - WCHAR* pos; - int arg_count = 0; - int err = 0; - - /* Count the required size. */ - for (arg = args; *arg; arg++) { - DWORD arg_len; - - arg_len = MultiByteToWideChar(CP_UTF8, - 0, - *arg, - -1, - NULL, - 0); - if (arg_len == 0) { - return GetLastError(); - } - - dst_len += arg_len; - - if (arg_len > temp_buffer_len) - temp_buffer_len = arg_len; - - arg_count++; - } - - /* Adjust for potential quotes. Also assume the worst-case scenario */ - /* that every character needs escaping, so we need twice as much space. */ - dst_len = dst_len * 2 + arg_count * 2; - - /* Allocate buffer for the final command line. */ - dst = (WCHAR*) uv__malloc(dst_len * sizeof(WCHAR)); - if (dst == NULL) { - err = ERROR_OUTOFMEMORY; - goto error; - } - - /* Allocate temporary working buffer. */ - temp_buffer = (WCHAR*) uv__malloc(temp_buffer_len * sizeof(WCHAR)); - if (temp_buffer == NULL) { - err = ERROR_OUTOFMEMORY; - goto error; - } - - pos = dst; - for (arg = args; *arg; arg++) { - DWORD arg_len; - - /* Convert argument to wide char. */ - arg_len = MultiByteToWideChar(CP_UTF8, - 0, - *arg, - -1, - temp_buffer, - (int) (dst + dst_len - pos)); - if (arg_len == 0) { - err = GetLastError(); - goto error; - } - - if (verbatim_arguments) { - /* Copy verbatim. */ - wcscpy(pos, temp_buffer); - pos += arg_len - 1; - } else { - /* Quote/escape, if needed. */ - pos = quote_cmd_arg(temp_buffer, pos); - } - - *pos++ = *(arg + 1) ? L' ' : L'\0'; - } - - uv__free(temp_buffer); - - *dst_ptr = dst; - return 0; - -error: - uv__free(dst); - uv__free(temp_buffer); - return err; -} - - -int env_strncmp(const wchar_t* a, int na, const wchar_t* b) { - wchar_t* a_eq; - wchar_t* b_eq; - wchar_t* A; - wchar_t* B; - int nb; - int r; - - if (na < 0) { - a_eq = wcschr(a, L'='); - assert(a_eq); - na = (int)(long)(a_eq - a); - } else { - na--; - } - b_eq = wcschr(b, L'='); - assert(b_eq); - nb = b_eq - b; - - A = alloca((na+1) * sizeof(wchar_t)); - B = alloca((nb+1) * sizeof(wchar_t)); - - r = LCMapStringW(LOCALE_INVARIANT, LCMAP_UPPERCASE, a, na, A, na); - assert(r==na); - A[na] = L'\0'; - r = LCMapStringW(LOCALE_INVARIANT, LCMAP_UPPERCASE, b, nb, B, nb); - assert(r==nb); - B[nb] = L'\0'; - - while (1) { - wchar_t AA = *A++; - wchar_t BB = *B++; - if (AA < BB) { - return -1; - } else if (AA > BB) { - return 1; - } else if (!AA && !BB) { - return 0; - } - } -} - - -static int qsort_wcscmp(const void *a, const void *b) { - wchar_t* astr = *(wchar_t* const*)a; - wchar_t* bstr = *(wchar_t* const*)b; - return env_strncmp(astr, -1, bstr); -} - - -/* - * The way windows takes environment variables is different than what C does; - * Windows wants a contiguous block of null-terminated strings, terminated - * with an additional null. - * - * Windows has a few "essential" environment variables. winsock will fail - * to initialize if SYSTEMROOT is not defined; some APIs make reference to - * TEMP. SYSTEMDRIVE is probably also important. We therefore ensure that - * these get defined if the input environment block does not contain any - * values for them. - * - * Also add variables known to Cygwin to be required for correct - * subprocess operation in many cases: - * https://github.com/Alexpux/Cygwin/blob/b266b04fbbd3a595f02ea149e4306d3ab9b1fe3d/winsup/cygwin/environ.cc#L955 - * - */ -int make_program_env(char* env_block[], WCHAR** dst_ptr) { - WCHAR* dst; - WCHAR* ptr; - char** env; - size_t env_len = 0; - int len; - size_t i; - DWORD var_size; - size_t env_block_count = 1; /* 1 for null-terminator */ - WCHAR* dst_copy; - WCHAR** ptr_copy; - WCHAR** env_copy; - DWORD* required_vars_value_len = alloca(n_required_vars * sizeof(DWORD*)); - - /* first pass: determine size in UTF-16 */ - for (env = env_block; *env; env++) { - int len; - if (strchr(*env, '=')) { - len = MultiByteToWideChar(CP_UTF8, - 0, - *env, - -1, - NULL, - 0); - if (len <= 0) { - return GetLastError(); - } - env_len += len; - env_block_count++; - } - } - - /* second pass: copy to UTF-16 environment block */ - dst_copy = (WCHAR*)uv__malloc(env_len * sizeof(WCHAR)); - if (!dst_copy) { - return ERROR_OUTOFMEMORY; - } - env_copy = alloca(env_block_count * sizeof(WCHAR*)); - - ptr = dst_copy; - ptr_copy = env_copy; - for (env = env_block; *env; env++) { - if (strchr(*env, '=')) { - len = MultiByteToWideChar(CP_UTF8, - 0, - *env, - -1, - ptr, - (int) (env_len - (ptr - dst_copy))); - if (len <= 0) { - DWORD err = GetLastError(); - uv__free(dst_copy); - return err; - } - *ptr_copy++ = ptr; - ptr += len; - } - } - *ptr_copy = NULL; - assert(env_len == ptr - dst_copy); - - /* sort our (UTF-16) copy */ - qsort(env_copy, env_block_count-1, sizeof(wchar_t*), qsort_wcscmp); - - /* third pass: check for required variables */ - for (ptr_copy = env_copy, i = 0; i < n_required_vars; ) { - int cmp; - if (!*ptr_copy) { - cmp = -1; - } else { - cmp = env_strncmp(required_vars[i].wide_eq, - required_vars[i].len, - *ptr_copy); - } - if (cmp < 0) { - /* missing required var */ - var_size = GetEnvironmentVariableW(required_vars[i].wide, NULL, 0); - required_vars_value_len[i] = var_size; - if (var_size != 0) { - env_len += required_vars[i].len; - env_len += var_size; - } - i++; - } else { - ptr_copy++; - if (cmp == 0) - i++; - } - } - - /* final pass: copy, in sort order, and inserting required variables */ - dst = uv__malloc((1+env_len) * sizeof(WCHAR)); - if (!dst) { - uv__free(dst_copy); - return ERROR_OUTOFMEMORY; - } - - for (ptr = dst, ptr_copy = env_copy, i = 0; - *ptr_copy || i < n_required_vars; - ptr += len) { - int cmp; - if (i >= n_required_vars) { - cmp = 1; - } else if (!*ptr_copy) { - cmp = -1; - } else { - cmp = env_strncmp(required_vars[i].wide_eq, - required_vars[i].len, - *ptr_copy); - } - if (cmp < 0) { - /* missing required var */ - len = required_vars_value_len[i]; - if (len) { - wcscpy(ptr, required_vars[i].wide_eq); - ptr += required_vars[i].len; - var_size = GetEnvironmentVariableW(required_vars[i].wide, - ptr, - (int) (env_len - (ptr - dst))); - if (var_size != len-1) { /* race condition? */ - uv_fatal_error(GetLastError(), "GetEnvironmentVariableW"); - } - } - i++; - } else { - /* copy var from env_block */ - len = wcslen(*ptr_copy) + 1; - wmemcpy(ptr, *ptr_copy, len); - ptr_copy++; - if (cmp == 0) - i++; - } - } - - /* Terminate with an extra NULL. */ - assert(env_len == (ptr - dst)); - *ptr = L'\0'; - - uv__free(dst_copy); - *dst_ptr = dst; - return 0; -} - -/* - * Attempt to find the value of the PATH environment variable in the child's - * preprocessed environment. - * - * If found, a pointer into `env` is returned. If not found, NULL is returned. - */ -static WCHAR* find_path(WCHAR *env) { - for (; env != NULL && *env != 0; env += wcslen(env) + 1) { - if (wcsncmp(env, L"PATH=", 5) == 0) - return &env[5]; - } - - return NULL; -} - -/* - * Called on Windows thread-pool thread to indicate that - * a child process has exited. - */ -static void CALLBACK exit_wait_callback(void* data, BOOLEAN didTimeout) { - uv_process_t* process = (uv_process_t*) data; - uv_loop_t* loop = process->loop; - - assert(didTimeout == FALSE); - assert(process); - assert(!process->exit_cb_pending); - - process->exit_cb_pending = 1; - - /* Post completed */ - POST_COMPLETION_FOR_REQ(loop, &process->exit_req); -} - - -/* Called on main thread after a child process has exited. */ -void uv_process_proc_exit(uv_loop_t* loop, uv_process_t* handle) { - int64_t exit_code; - DWORD status; - - assert(handle->exit_cb_pending); - handle->exit_cb_pending = 0; - - /* If we're closing, don't call the exit callback. Just schedule a close */ - /* callback now. */ - if (handle->flags & UV__HANDLE_CLOSING) { - uv_want_endgame(loop, (uv_handle_t*) handle); - return; - } - - /* Unregister from process notification. */ - if (handle->wait_handle != INVALID_HANDLE_VALUE) { - UnregisterWait(handle->wait_handle); - handle->wait_handle = INVALID_HANDLE_VALUE; - } - - /* Set the handle to inactive: no callbacks will be made after the exit */ - /* callback.*/ - uv__handle_stop(handle); - - if (GetExitCodeProcess(handle->process_handle, &status)) { - exit_code = status; - } else { - /* Unable to to obtain the exit code. This should never happen. */ - exit_code = uv_translate_sys_error(GetLastError()); - } - - /* Fire the exit callback. */ - if (handle->exit_cb) { - handle->exit_cb(handle, exit_code, handle->exit_signal); - } -} - - -void uv_process_close(uv_loop_t* loop, uv_process_t* handle) { - uv__handle_closing(handle); - - if (handle->wait_handle != INVALID_HANDLE_VALUE) { - /* This blocks until either the wait was cancelled, or the callback has */ - /* completed. */ - BOOL r = UnregisterWaitEx(handle->wait_handle, INVALID_HANDLE_VALUE); - if (!r) { - /* This should never happen, and if it happens, we can't recover... */ - uv_fatal_error(GetLastError(), "UnregisterWaitEx"); - } - - handle->wait_handle = INVALID_HANDLE_VALUE; - } - - if (!handle->exit_cb_pending) { - uv_want_endgame(loop, (uv_handle_t*)handle); - } -} - - -void uv_process_endgame(uv_loop_t* loop, uv_process_t* handle) { - assert(!handle->exit_cb_pending); - assert(handle->flags & UV__HANDLE_CLOSING); - assert(!(handle->flags & UV_HANDLE_CLOSED)); - - /* Clean-up the process handle. */ - CloseHandle(handle->process_handle); - - uv__handle_close(handle); -} - - -int uv_spawn(uv_loop_t* loop, - uv_process_t* process, - const uv_process_options_t* options) { - int i; - int err = 0; - WCHAR* path = NULL, *alloc_path = NULL; - BOOL result; - WCHAR* application_path = NULL, *application = NULL, *arguments = NULL, - *env = NULL, *cwd = NULL; - STARTUPINFOW startup; - PROCESS_INFORMATION info; - DWORD process_flags; - - uv_process_init(loop, process); - process->exit_cb = options->exit_cb; - - if (options->flags & (UV_PROCESS_SETGID | UV_PROCESS_SETUID)) { - return UV_ENOTSUP; - } - - if (options->file == NULL || - options->args == NULL) { - return UV_EINVAL; - } - - assert(options->file != NULL); - assert(!(options->flags & ~(UV_PROCESS_DETACHED | - UV_PROCESS_SETGID | - UV_PROCESS_SETUID | - UV_PROCESS_WINDOWS_HIDE | - UV_PROCESS_WINDOWS_VERBATIM_ARGUMENTS))); - - err = uv_utf8_to_utf16_alloc(options->file, &application); - if (err) - goto done; - - err = make_program_args( - options->args, - options->flags & UV_PROCESS_WINDOWS_VERBATIM_ARGUMENTS, - &arguments); - if (err) - goto done; - - if (options->env) { - err = make_program_env(options->env, &env); - if (err) - goto done; - } - - if (options->cwd) { - /* Explicit cwd */ - err = uv_utf8_to_utf16_alloc(options->cwd, &cwd); - if (err) - goto done; - - } else { - /* Inherit cwd */ - DWORD cwd_len, r; - - cwd_len = GetCurrentDirectoryW(0, NULL); - if (!cwd_len) { - err = GetLastError(); - goto done; - } - - cwd = (WCHAR*) uv__malloc(cwd_len * sizeof(WCHAR)); - if (cwd == NULL) { - err = ERROR_OUTOFMEMORY; - goto done; - } - - r = GetCurrentDirectoryW(cwd_len, cwd); - if (r == 0 || r >= cwd_len) { - err = GetLastError(); - goto done; - } - } - - /* Get PATH environment variable. */ - path = find_path(env); - if (path == NULL) { - DWORD path_len, r; - - path_len = GetEnvironmentVariableW(L"PATH", NULL, 0); - if (path_len == 0) { - err = GetLastError(); - goto done; - } - - alloc_path = (WCHAR*) uv__malloc(path_len * sizeof(WCHAR)); - if (alloc_path == NULL) { - err = ERROR_OUTOFMEMORY; - goto done; - } - path = alloc_path; - - r = GetEnvironmentVariableW(L"PATH", path, path_len); - if (r == 0 || r >= path_len) { - err = GetLastError(); - goto done; - } - } - - err = uv__stdio_create(loop, options, &process->child_stdio_buffer); - if (err) - goto done; - - application_path = search_path(application, - cwd, - path); - if (application_path == NULL) { - /* Not found. */ - err = ERROR_FILE_NOT_FOUND; - goto done; - } - - startup.cb = sizeof(startup); - startup.lpReserved = NULL; - startup.lpDesktop = NULL; - startup.lpTitle = NULL; - startup.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW; - - startup.cbReserved2 = uv__stdio_size(process->child_stdio_buffer); - startup.lpReserved2 = (BYTE*) process->child_stdio_buffer; - - startup.hStdInput = uv__stdio_handle(process->child_stdio_buffer, 0); - startup.hStdOutput = uv__stdio_handle(process->child_stdio_buffer, 1); - startup.hStdError = uv__stdio_handle(process->child_stdio_buffer, 2); - - if (options->flags & UV_PROCESS_WINDOWS_HIDE) { - /* Use SW_HIDE to avoid any potential process window. */ - startup.wShowWindow = SW_HIDE; - } else { - startup.wShowWindow = SW_SHOWDEFAULT; - } - - process_flags = CREATE_UNICODE_ENVIRONMENT; - - if (options->flags & UV_PROCESS_DETACHED) { - /* Note that we're not setting the CREATE_BREAKAWAY_FROM_JOB flag. That - * means that libuv might not let you create a fully daemonized process - * when run under job control. However the type of job control that libuv - * itself creates doesn't trickle down to subprocesses so they can still - * daemonize. - * - * A reason to not do this is that CREATE_BREAKAWAY_FROM_JOB makes the - * CreateProcess call fail if we're under job control that doesn't allow - * breakaway. - */ - process_flags |= DETACHED_PROCESS | CREATE_NEW_PROCESS_GROUP; - } - - if (!CreateProcessW(application_path, - arguments, - NULL, - NULL, - 1, - process_flags, - env, - cwd, - &startup, - &info)) { - /* CreateProcessW failed. */ - err = GetLastError(); - goto done; - } - - /* Spawn succeeded */ - /* Beyond this point, failure is reported asynchronously. */ - - process->process_handle = info.hProcess; - process->pid = info.dwProcessId; - - /* If the process isn't spawned as detached, assign to the global job */ - /* object so windows will kill it when the parent process dies. */ - if (!(options->flags & UV_PROCESS_DETACHED)) { - uv_once(&uv_global_job_handle_init_guard_, uv__init_global_job_handle); - - if (!AssignProcessToJobObject(uv_global_job_handle_, info.hProcess)) { - /* AssignProcessToJobObject might fail if this process is under job - * control and the job doesn't have the - * JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK flag set, on a Windows version - * that doesn't support nested jobs. - * - * When that happens we just swallow the error and continue without - * establishing a kill-child-on-parent-exit relationship, otherwise - * there would be no way for libuv applications run under job control - * to spawn processes at all. - */ - DWORD err = GetLastError(); - if (err != ERROR_ACCESS_DENIED) - uv_fatal_error(err, "AssignProcessToJobObject"); - } - } - - /* Set IPC pid to all IPC pipes. */ - for (i = 0; i < options->stdio_count; i++) { - const uv_stdio_container_t* fdopt = &options->stdio[i]; - if (fdopt->flags & UV_CREATE_PIPE && - fdopt->data.stream->type == UV_NAMED_PIPE && - ((uv_pipe_t*) fdopt->data.stream)->ipc) { - ((uv_pipe_t*) fdopt->data.stream)->pipe.conn.ipc_pid = info.dwProcessId; - } - } - - /* Setup notifications for when the child process exits. */ - result = RegisterWaitForSingleObject(&process->wait_handle, - process->process_handle, exit_wait_callback, (void*)process, INFINITE, - WT_EXECUTEINWAITTHREAD | WT_EXECUTEONLYONCE); - if (!result) { - uv_fatal_error(GetLastError(), "RegisterWaitForSingleObject"); - } - - CloseHandle(info.hThread); - - assert(!err); - - /* Make the handle active. It will remain active until the exit callback */ - /* is made or the handle is closed, whichever happens first. */ - uv__handle_start(process); - - /* Cleanup, whether we succeeded or failed. */ - done: - uv__free(application); - uv__free(application_path); - uv__free(arguments); - uv__free(cwd); - uv__free(env); - uv__free(alloc_path); - - if (process->child_stdio_buffer != NULL) { - /* Clean up child stdio handles. */ - uv__stdio_destroy(process->child_stdio_buffer); - process->child_stdio_buffer = NULL; - } - - return uv_translate_sys_error(err); -} - - -static int uv__kill(HANDLE process_handle, int signum) { - switch (signum) { - case SIGTERM: - case SIGKILL: - case SIGINT: { - /* Unconditionally terminate the process. On Windows, killed processes */ - /* normally return 1. */ - DWORD status; - int err; - - if (TerminateProcess(process_handle, 1)) - return 0; - - /* If the process already exited before TerminateProcess was called, */ - /* TerminateProcess will fail with ERROR_ACCESS_DENIED. */ - err = GetLastError(); - if (err == ERROR_ACCESS_DENIED && - GetExitCodeProcess(process_handle, &status) && - status != STILL_ACTIVE) { - return UV_ESRCH; - } - - return uv_translate_sys_error(err); - } - - case 0: { - /* Health check: is the process still alive? */ - DWORD status; - - if (!GetExitCodeProcess(process_handle, &status)) - return uv_translate_sys_error(GetLastError()); - - if (status != STILL_ACTIVE) - return UV_ESRCH; - - return 0; - } - - default: - /* Unsupported signal. */ - return UV_ENOSYS; - } -} - - -int uv_process_kill(uv_process_t* process, int signum) { - int err; - - if (process->process_handle == INVALID_HANDLE_VALUE) { - return UV_EINVAL; - } - - err = uv__kill(process->process_handle, signum); - if (err) { - return err; /* err is already translated. */ - } - - process->exit_signal = signum; - - return 0; -} - - -int uv_kill(int pid, int signum) { - int err; - HANDLE process_handle = OpenProcess(PROCESS_TERMINATE | - PROCESS_QUERY_INFORMATION, FALSE, pid); - - if (process_handle == NULL) { - err = GetLastError(); - if (err == ERROR_INVALID_PARAMETER) { - return UV_ESRCH; - } else { - return uv_translate_sys_error(err); - } - } - - err = uv__kill(process_handle, signum); - CloseHandle(process_handle); - - return err; /* err is already translated. */ -} diff --git a/outside/libuv-v1.7.5/src/win/req-inl.h b/outside/libuv-v1.7.5/src/win/req-inl.h deleted file mode 100644 index b5e502eef..000000000 --- a/outside/libuv-v1.7.5/src/win/req-inl.h +++ /dev/null @@ -1,224 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#ifndef UV_WIN_REQ_INL_H_ -#define UV_WIN_REQ_INL_H_ - -#include - -#include "uv.h" -#include "internal.h" - - -#define SET_REQ_STATUS(req, status) \ - (req)->u.io.overlapped.Internal = (ULONG_PTR) (status) - -#define SET_REQ_ERROR(req, error) \ - SET_REQ_STATUS((req), NTSTATUS_FROM_WIN32((error))) - -#define SET_REQ_SUCCESS(req) \ - SET_REQ_STATUS((req), STATUS_SUCCESS) - -#define GET_REQ_STATUS(req) \ - ((NTSTATUS) (req)->u.io.overlapped.Internal) - -#define REQ_SUCCESS(req) \ - (NT_SUCCESS(GET_REQ_STATUS((req)))) - -#define GET_REQ_ERROR(req) \ - (pRtlNtStatusToDosError(GET_REQ_STATUS((req)))) - -#define GET_REQ_SOCK_ERROR(req) \ - (uv_ntstatus_to_winsock_error(GET_REQ_STATUS((req)))) - - -#define REGISTER_HANDLE_REQ(loop, handle, req) \ - do { \ - INCREASE_ACTIVE_COUNT((loop), (handle)); \ - uv__req_register((loop), (req)); \ - } while (0) - -#define UNREGISTER_HANDLE_REQ(loop, handle, req) \ - do { \ - DECREASE_ACTIVE_COUNT((loop), (handle)); \ - uv__req_unregister((loop), (req)); \ - } while (0) - - -#define UV_SUCCEEDED_WITHOUT_IOCP(result) \ - ((result) && (handle->flags & UV_HANDLE_SYNC_BYPASS_IOCP)) - -#define UV_SUCCEEDED_WITH_IOCP(result) \ - ((result) || (GetLastError() == ERROR_IO_PENDING)) - - -#define POST_COMPLETION_FOR_REQ(loop, req) \ - if (!PostQueuedCompletionStatus((loop)->iocp, \ - 0, \ - 0, \ - &((req)->u.io.overlapped))) { \ - uv_fatal_error(GetLastError(), "PostQueuedCompletionStatus"); \ - } - - -INLINE static void uv_req_init(uv_loop_t* loop, uv_req_t* req) { - req->type = UV_UNKNOWN_REQ; - SET_REQ_SUCCESS(req); -} - - -INLINE static uv_req_t* uv_overlapped_to_req(OVERLAPPED* overlapped) { - return CONTAINING_RECORD(overlapped, uv_req_t, u.io.overlapped); -} - - -INLINE static void uv_insert_pending_req(uv_loop_t* loop, uv_req_t* req) { - req->next_req = NULL; - if (loop->pending_reqs_tail) { -#ifdef _DEBUG - /* Ensure the request is not already in the queue, or the queue - * will get corrupted. - */ - uv_req_t* current = loop->pending_reqs_tail; - do { - assert(req != current); - current = current->next_req; - } while(current != loop->pending_reqs_tail); -#endif - - req->next_req = loop->pending_reqs_tail->next_req; - loop->pending_reqs_tail->next_req = req; - loop->pending_reqs_tail = req; - } else { - req->next_req = req; - loop->pending_reqs_tail = req; - } -} - - -#define DELEGATE_STREAM_REQ(loop, req, method, handle_at) \ - do { \ - switch (((uv_handle_t*) (req)->handle_at)->type) { \ - case UV_TCP: \ - uv_process_tcp_##method##_req(loop, \ - (uv_tcp_t*) ((req)->handle_at), \ - req); \ - break; \ - \ - case UV_NAMED_PIPE: \ - uv_process_pipe_##method##_req(loop, \ - (uv_pipe_t*) ((req)->handle_at), \ - req); \ - break; \ - \ - case UV_TTY: \ - uv_process_tty_##method##_req(loop, \ - (uv_tty_t*) ((req)->handle_at), \ - req); \ - break; \ - \ - default: \ - assert(0); \ - } \ - } while (0) - - -INLINE static int uv_process_reqs(uv_loop_t* loop) { - uv_req_t* req; - uv_req_t* first; - uv_req_t* next; - - if (loop->pending_reqs_tail == NULL) - return 0; - - first = loop->pending_reqs_tail->next_req; - next = first; - loop->pending_reqs_tail = NULL; - - while (next != NULL) { - req = next; - next = req->next_req != first ? req->next_req : NULL; - - switch (req->type) { - case UV_READ: - DELEGATE_STREAM_REQ(loop, req, read, data); - break; - - case UV_WRITE: - DELEGATE_STREAM_REQ(loop, (uv_write_t*) req, write, handle); - break; - - case UV_ACCEPT: - DELEGATE_STREAM_REQ(loop, req, accept, data); - break; - - case UV_CONNECT: - DELEGATE_STREAM_REQ(loop, (uv_connect_t*) req, connect, handle); - break; - - case UV_SHUTDOWN: - /* Tcp shutdown requests don't come here. */ - assert(((uv_shutdown_t*) req)->handle->type == UV_NAMED_PIPE); - uv_process_pipe_shutdown_req( - loop, - (uv_pipe_t*) ((uv_shutdown_t*) req)->handle, - (uv_shutdown_t*) req); - break; - - case UV_UDP_RECV: - uv_process_udp_recv_req(loop, (uv_udp_t*) req->data, req); - break; - - case UV_UDP_SEND: - uv_process_udp_send_req(loop, - ((uv_udp_send_t*) req)->handle, - (uv_udp_send_t*) req); - break; - - case UV_WAKEUP: - uv_process_async_wakeup_req(loop, (uv_async_t*) req->data, req); - break; - - case UV_SIGNAL_REQ: - uv_process_signal_req(loop, (uv_signal_t*) req->data, req); - break; - - case UV_POLL_REQ: - uv_process_poll_req(loop, (uv_poll_t*) req->data, req); - break; - - case UV_PROCESS_EXIT: - uv_process_proc_exit(loop, (uv_process_t*) req->data); - break; - - case UV_FS_EVENT_REQ: - uv_process_fs_event_req(loop, req, (uv_fs_event_t*) req->data); - break; - - default: - assert(0); - } - } - - return 1; -} - -#endif /* UV_WIN_REQ_INL_H_ */ diff --git a/outside/libuv-v1.7.5/src/win/req.c b/outside/libuv-v1.7.5/src/win/req.c deleted file mode 100644 index 111cc5e28..000000000 --- a/outside/libuv-v1.7.5/src/win/req.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include - -#include "uv.h" -#include "internal.h" diff --git a/outside/libuv-v1.7.5/src/win/signal.c b/outside/libuv-v1.7.5/src/win/signal.c deleted file mode 100644 index 2c64a55dc..000000000 --- a/outside/libuv-v1.7.5/src/win/signal.c +++ /dev/null @@ -1,356 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * 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. - */ - -#include -#include - -#include "uv.h" -#include "internal.h" -#include "handle-inl.h" -#include "req-inl.h" - - -RB_HEAD(uv_signal_tree_s, uv_signal_s); - -static struct uv_signal_tree_s uv__signal_tree = RB_INITIALIZER(uv__signal_tree); -static ssize_t volatile uv__signal_control_handler_refs = 0; -static CRITICAL_SECTION uv__signal_lock; - - -void uv_signals_init() { - InitializeCriticalSection(&uv__signal_lock); -} - - -static int uv__signal_compare(uv_signal_t* w1, uv_signal_t* w2) { - /* Compare signums first so all watchers with the same signnum end up */ - /* adjacent. */ - if (w1->signum < w2->signum) return -1; - if (w1->signum > w2->signum) return 1; - - /* Sort by loop pointer, so we can easily look up the first item after */ - /* { .signum = x, .loop = NULL } */ - if ((uintptr_t) w1->loop < (uintptr_t) w2->loop) return -1; - if ((uintptr_t) w1->loop > (uintptr_t) w2->loop) return 1; - - if ((uintptr_t) w1 < (uintptr_t) w2) return -1; - if ((uintptr_t) w1 > (uintptr_t) w2) return 1; - - return 0; -} - - -RB_GENERATE_STATIC(uv_signal_tree_s, uv_signal_s, tree_entry, uv__signal_compare); - - -/* - * Dispatches signal {signum} to all active uv_signal_t watchers in all loops. - * Returns 1 if the signal was dispatched to any watcher, or 0 if there were - * no active signal watchers observing this signal. - */ -int uv__signal_dispatch(int signum) { - uv_signal_t lookup; - uv_signal_t* handle; - int dispatched = 0; - - EnterCriticalSection(&uv__signal_lock); - - lookup.signum = signum; - lookup.loop = NULL; - - for (handle = RB_NFIND(uv_signal_tree_s, &uv__signal_tree, &lookup); - handle != NULL && handle->signum == signum; - handle = RB_NEXT(uv_signal_tree_s, &uv__signal_tree, handle)) { - unsigned long previous = InterlockedExchange( - (volatile LONG*) &handle->pending_signum, signum); - - if (!previous) { - POST_COMPLETION_FOR_REQ(handle->loop, &handle->signal_req); - } - - dispatched = 1; - } - - LeaveCriticalSection(&uv__signal_lock); - - return dispatched; -} - - -static BOOL WINAPI uv__signal_control_handler(DWORD type) { - switch (type) { - case CTRL_C_EVENT: - return uv__signal_dispatch(SIGINT); - - case CTRL_BREAK_EVENT: - return uv__signal_dispatch(SIGBREAK); - - case CTRL_CLOSE_EVENT: - if (uv__signal_dispatch(SIGHUP)) { - /* Windows will terminate the process after the control handler */ - /* returns. After that it will just terminate our process. Therefore */ - /* block the signal handler so the main loop has some time to pick */ - /* up the signal and do something for a few seconds. */ - Sleep(INFINITE); - return TRUE; - } - return FALSE; - - case CTRL_LOGOFF_EVENT: - case CTRL_SHUTDOWN_EVENT: - /* These signals are only sent to services. Services have their own */ - /* notification mechanism, so there's no point in handling these. */ - - default: - /* We don't handle these. */ - return FALSE; - } -} - - -static int uv__signal_register_control_handler() { - /* When this function is called, the uv__signal_lock must be held. */ - - /* If the console control handler has already been hooked, just add a */ - /* reference. */ - if (uv__signal_control_handler_refs > 0) { - uv__signal_control_handler_refs++; - return 0; - } - - if (!SetConsoleCtrlHandler(uv__signal_control_handler, TRUE)) - return GetLastError(); - - uv__signal_control_handler_refs++; - - return 0; -} - - -static void uv__signal_unregister_control_handler() { - /* When this function is called, the uv__signal_lock must be held. */ - BOOL r; - - /* Don't unregister if the number of console control handlers exceeds one. */ - /* Just remove a reference in that case. */ - if (uv__signal_control_handler_refs > 1) { - uv__signal_control_handler_refs--; - return; - } - - assert(uv__signal_control_handler_refs == 1); - - r = SetConsoleCtrlHandler(uv__signal_control_handler, FALSE); - /* This should never fail; if it does it is probably a bug in libuv. */ - assert(r); - - uv__signal_control_handler_refs--; -} - - -static int uv__signal_register(int signum) { - switch (signum) { - case SIGINT: - case SIGBREAK: - case SIGHUP: - return uv__signal_register_control_handler(); - - case SIGWINCH: - /* SIGWINCH is generated in tty.c. No need to register anything. */ - return 0; - - case SIGILL: - case SIGABRT_COMPAT: - case SIGFPE: - case SIGSEGV: - case SIGTERM: - case SIGABRT: - /* Signal is never raised. */ - return 0; - - default: - /* Invalid signal. */ - return ERROR_INVALID_PARAMETER; - } -} - - -static void uv__signal_unregister(int signum) { - switch (signum) { - case SIGINT: - case SIGBREAK: - case SIGHUP: - uv__signal_unregister_control_handler(); - return; - - case SIGWINCH: - /* SIGWINCH is generated in tty.c. No need to unregister anything. */ - return; - - case SIGILL: - case SIGABRT_COMPAT: - case SIGFPE: - case SIGSEGV: - case SIGTERM: - case SIGABRT: - /* Nothing is registered for this signal. */ - return; - - default: - /* Libuv bug. */ - assert(0 && "Invalid signum"); - return; - } -} - - -int uv_signal_init(uv_loop_t* loop, uv_signal_t* handle) { - uv_req_t* req; - - uv__handle_init(loop, (uv_handle_t*) handle, UV_SIGNAL); - handle->pending_signum = 0; - handle->signum = 0; - handle->signal_cb = NULL; - - req = &handle->signal_req; - uv_req_init(loop, req); - req->type = UV_SIGNAL_REQ; - req->data = handle; - - return 0; -} - - -int uv_signal_stop(uv_signal_t* handle) { - uv_signal_t* removed_handle; - - /* If the watcher wasn't started, this is a no-op. */ - if (handle->signum == 0) - return 0; - - EnterCriticalSection(&uv__signal_lock); - - uv__signal_unregister(handle->signum); - - removed_handle = RB_REMOVE(uv_signal_tree_s, &uv__signal_tree, handle); - assert(removed_handle == handle); - - LeaveCriticalSection(&uv__signal_lock); - - handle->signum = 0; - uv__handle_stop(handle); - - return 0; -} - - -int uv_signal_start(uv_signal_t* handle, uv_signal_cb signal_cb, int signum) { - int err; - - /* If the user supplies signum == 0, then return an error already. If the */ - /* signum is otherwise invalid then uv__signal_register will find out */ - /* eventually. */ - if (signum == 0) { - return UV_EINVAL; - } - - /* Short circuit: if the signal watcher is already watching {signum} don't */ - /* go through the process of deregistering and registering the handler. */ - /* Additionally, this avoids pending signals getting lost in the (small) */ - /* time frame that handle->signum == 0. */ - if (signum == handle->signum) { - handle->signal_cb = signal_cb; - return 0; - } - - /* If the signal handler was already active, stop it first. */ - if (handle->signum != 0) { - int r = uv_signal_stop(handle); - /* uv_signal_stop is infallible. */ - assert(r == 0); - } - - EnterCriticalSection(&uv__signal_lock); - - err = uv__signal_register(signum); - if (err) { - /* Uh-oh, didn't work. */ - LeaveCriticalSection(&uv__signal_lock); - return uv_translate_sys_error(err); - } - - handle->signum = signum; - RB_INSERT(uv_signal_tree_s, &uv__signal_tree, handle); - - LeaveCriticalSection(&uv__signal_lock); - - handle->signal_cb = signal_cb; - uv__handle_start(handle); - - return 0; -} - - -void uv_process_signal_req(uv_loop_t* loop, uv_signal_t* handle, - uv_req_t* req) { - long dispatched_signum; - - assert(handle->type == UV_SIGNAL); - assert(req->type == UV_SIGNAL_REQ); - - dispatched_signum = InterlockedExchange( - (volatile LONG*) &handle->pending_signum, 0); - assert(dispatched_signum != 0); - - /* Check if the pending signal equals the signum that we are watching for. */ - /* These can get out of sync when the handler is stopped and restarted */ - /* while the signal_req is pending. */ - if (dispatched_signum == handle->signum) - handle->signal_cb(handle, dispatched_signum); - - if (handle->flags & UV__HANDLE_CLOSING) { - /* When it is closing, it must be stopped at this point. */ - assert(handle->signum == 0); - uv_want_endgame(loop, (uv_handle_t*) handle); - } -} - - -void uv_signal_close(uv_loop_t* loop, uv_signal_t* handle) { - uv_signal_stop(handle); - uv__handle_closing(handle); - - if (handle->pending_signum == 0) { - uv_want_endgame(loop, (uv_handle_t*) handle); - } -} - - -void uv_signal_endgame(uv_loop_t* loop, uv_signal_t* handle) { - assert(handle->flags & UV__HANDLE_CLOSING); - assert(!(handle->flags & UV_HANDLE_CLOSED)); - - assert(handle->signum == 0); - assert(handle->pending_signum == 0); - - handle->flags |= UV_HANDLE_CLOSED; - - uv__handle_close(handle); -} diff --git a/outside/libuv-v1.7.5/src/win/stream-inl.h b/outside/libuv-v1.7.5/src/win/stream-inl.h deleted file mode 100644 index b7a3c1195..000000000 --- a/outside/libuv-v1.7.5/src/win/stream-inl.h +++ /dev/null @@ -1,56 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#ifndef UV_WIN_STREAM_INL_H_ -#define UV_WIN_STREAM_INL_H_ - -#include - -#include "uv.h" -#include "internal.h" -#include "handle-inl.h" -#include "req-inl.h" - - -INLINE static void uv_stream_init(uv_loop_t* loop, - uv_stream_t* handle, - uv_handle_type type) { - uv__handle_init(loop, (uv_handle_t*) handle, type); - handle->write_queue_size = 0; - handle->activecnt = 0; -} - - -INLINE static void uv_connection_init(uv_stream_t* handle) { - handle->flags |= UV_HANDLE_CONNECTION; - handle->stream.conn.write_reqs_pending = 0; - - uv_req_init(handle->loop, (uv_req_t*) &(handle->read_req)); - handle->read_req.event_handle = NULL; - handle->read_req.wait_handle = INVALID_HANDLE_VALUE; - handle->read_req.type = UV_READ; - handle->read_req.data = handle; - - handle->stream.conn.shutdown_req = NULL; -} - - -#endif /* UV_WIN_STREAM_INL_H_ */ diff --git a/outside/libuv-v1.7.5/src/win/stream.c b/outside/libuv-v1.7.5/src/win/stream.c deleted file mode 100644 index a2466e5e9..000000000 --- a/outside/libuv-v1.7.5/src/win/stream.c +++ /dev/null @@ -1,249 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include - -#include "uv.h" -#include "internal.h" -#include "handle-inl.h" -#include "req-inl.h" - - -int uv_listen(uv_stream_t* stream, int backlog, uv_connection_cb cb) { - int err; - - err = ERROR_INVALID_PARAMETER; - switch (stream->type) { - case UV_TCP: - err = uv_tcp_listen((uv_tcp_t*)stream, backlog, cb); - break; - case UV_NAMED_PIPE: - err = uv_pipe_listen((uv_pipe_t*)stream, backlog, cb); - break; - default: - assert(0); - } - - return uv_translate_sys_error(err); -} - - -int uv_accept(uv_stream_t* server, uv_stream_t* client) { - int err; - - err = ERROR_INVALID_PARAMETER; - switch (server->type) { - case UV_TCP: - err = uv_tcp_accept((uv_tcp_t*)server, (uv_tcp_t*)client); - break; - case UV_NAMED_PIPE: - err = uv_pipe_accept((uv_pipe_t*)server, client); - break; - default: - assert(0); - } - - return uv_translate_sys_error(err); -} - - -int uv_read_start(uv_stream_t* handle, uv_alloc_cb alloc_cb, - uv_read_cb read_cb) { - int err; - - if (handle->flags & UV_HANDLE_READING) { - return UV_EALREADY; - } - - if (!(handle->flags & UV_HANDLE_READABLE)) { - return UV_ENOTCONN; - } - - err = ERROR_INVALID_PARAMETER; - switch (handle->type) { - case UV_TCP: - err = uv_tcp_read_start((uv_tcp_t*)handle, alloc_cb, read_cb); - break; - case UV_NAMED_PIPE: - err = uv_pipe_read_start((uv_pipe_t*)handle, alloc_cb, read_cb); - break; - case UV_TTY: - err = uv_tty_read_start((uv_tty_t*) handle, alloc_cb, read_cb); - break; - default: - assert(0); - } - - return uv_translate_sys_error(err); -} - - -int uv_read_stop(uv_stream_t* handle) { - int err; - - if (!(handle->flags & UV_HANDLE_READING)) - return 0; - - err = 0; - if (handle->type == UV_TTY) { - err = uv_tty_read_stop((uv_tty_t*) handle); - } else { - if (handle->type == UV_NAMED_PIPE) { - uv__pipe_stop_read((uv_pipe_t*) handle); - } else { - handle->flags &= ~UV_HANDLE_READING; - } - DECREASE_ACTIVE_COUNT(handle->loop, handle); - } - - return uv_translate_sys_error(err); -} - - -int uv_write(uv_write_t* req, - uv_stream_t* handle, - const uv_buf_t bufs[], - unsigned int nbufs, - uv_write_cb cb) { - uv_loop_t* loop = handle->loop; - int err; - - if (!(handle->flags & UV_HANDLE_WRITABLE)) { - return UV_EPIPE; - } - - err = ERROR_INVALID_PARAMETER; - switch (handle->type) { - case UV_TCP: - err = uv_tcp_write(loop, req, (uv_tcp_t*) handle, bufs, nbufs, cb); - break; - case UV_NAMED_PIPE: - err = uv_pipe_write(loop, req, (uv_pipe_t*) handle, bufs, nbufs, cb); - break; - case UV_TTY: - err = uv_tty_write(loop, req, (uv_tty_t*) handle, bufs, nbufs, cb); - break; - default: - assert(0); - } - - return uv_translate_sys_error(err); -} - - -int uv_write2(uv_write_t* req, - uv_stream_t* handle, - const uv_buf_t bufs[], - unsigned int nbufs, - uv_stream_t* send_handle, - uv_write_cb cb) { - uv_loop_t* loop = handle->loop; - int err; - - if (!(handle->flags & UV_HANDLE_WRITABLE)) { - return UV_EPIPE; - } - - err = ERROR_INVALID_PARAMETER; - switch (handle->type) { - case UV_NAMED_PIPE: - err = uv_pipe_write2(loop, - req, - (uv_pipe_t*) handle, - bufs, - nbufs, - send_handle, - cb); - break; - default: - assert(0); - } - - return uv_translate_sys_error(err); -} - - -int uv_try_write(uv_stream_t* stream, - const uv_buf_t bufs[], - unsigned int nbufs) { - if (stream->flags & UV__HANDLE_CLOSING) - return UV_EBADF; - if (!(stream->flags & UV_HANDLE_WRITABLE)) - return UV_EPIPE; - - switch (stream->type) { - case UV_TCP: - return uv__tcp_try_write((uv_tcp_t*) stream, bufs, nbufs); - case UV_TTY: - return uv__tty_try_write((uv_tty_t*) stream, bufs, nbufs); - case UV_NAMED_PIPE: - return UV_EAGAIN; - default: - assert(0); - return UV_ENOSYS; - } -} - - -int uv_shutdown(uv_shutdown_t* req, uv_stream_t* handle, uv_shutdown_cb cb) { - uv_loop_t* loop = handle->loop; - - if (!(handle->flags & UV_HANDLE_WRITABLE)) { - return UV_EPIPE; - } - - uv_req_init(loop, (uv_req_t*) req); - req->type = UV_SHUTDOWN; - req->handle = handle; - req->cb = cb; - - handle->flags &= ~UV_HANDLE_WRITABLE; - handle->stream.conn.shutdown_req = req; - handle->reqs_pending++; - REGISTER_HANDLE_REQ(loop, handle, req); - - uv_want_endgame(loop, (uv_handle_t*)handle); - - return 0; -} - - -int uv_is_readable(const uv_stream_t* handle) { - return !!(handle->flags & UV_HANDLE_READABLE); -} - - -int uv_is_writable(const uv_stream_t* handle) { - return !!(handle->flags & UV_HANDLE_WRITABLE); -} - - -int uv_stream_set_blocking(uv_stream_t* handle, int blocking) { - if (handle->type != UV_NAMED_PIPE) - return UV_EINVAL; - - if (blocking != 0) - handle->flags |= UV_HANDLE_BLOCKING_WRITES; - else - handle->flags &= ~UV_HANDLE_BLOCKING_WRITES; - - return 0; -} diff --git a/outside/libuv-v1.7.5/src/win/tcp.c b/outside/libuv-v1.7.5/src/win/tcp.c deleted file mode 100644 index 0f5654863..000000000 --- a/outside/libuv-v1.7.5/src/win/tcp.c +++ /dev/null @@ -1,1507 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include -#include - -#include "uv.h" -#include "internal.h" -#include "handle-inl.h" -#include "stream-inl.h" -#include "req-inl.h" - - -/* - * Threshold of active tcp streams for which to preallocate tcp read buffers. - * (Due to node slab allocator performing poorly under this pattern, - * the optimization is temporarily disabled (threshold=0). This will be - * revisited once node allocator is improved.) - */ -const unsigned int uv_active_tcp_streams_threshold = 0; - -/* - * Number of simultaneous pending AcceptEx calls. - */ -const unsigned int uv_simultaneous_server_accepts = 32; - -/* A zero-size buffer for use by uv_tcp_read */ -static char uv_zero_[] = ""; - -static int uv__tcp_nodelay(uv_tcp_t* handle, SOCKET socket, int enable) { - if (setsockopt(socket, - IPPROTO_TCP, - TCP_NODELAY, - (const char*)&enable, - sizeof enable) == -1) { - return WSAGetLastError(); - } - return 0; -} - - -static int uv__tcp_keepalive(uv_tcp_t* handle, SOCKET socket, int enable, unsigned int delay) { - if (setsockopt(socket, - SOL_SOCKET, - SO_KEEPALIVE, - (const char*)&enable, - sizeof enable) == -1) { - return WSAGetLastError(); - } - - if (enable && setsockopt(socket, - IPPROTO_TCP, - TCP_KEEPALIVE, - (const char*)&delay, - sizeof delay) == -1) { - return WSAGetLastError(); - } - - return 0; -} - - -static int uv_tcp_set_socket(uv_loop_t* loop, - uv_tcp_t* handle, - SOCKET socket, - int family, - int imported) { - DWORD yes = 1; - int non_ifs_lsp; - int err; - - if (handle->socket != INVALID_SOCKET) - return UV_EBUSY; - - /* Set the socket to nonblocking mode */ - if (ioctlsocket(socket, FIONBIO, &yes) == SOCKET_ERROR) { - return WSAGetLastError(); - } - - /* Make the socket non-inheritable */ - if (!SetHandleInformation((HANDLE) socket, HANDLE_FLAG_INHERIT, 0)) - return GetLastError(); - - /* Associate it with the I/O completion port. */ - /* Use uv_handle_t pointer as completion key. */ - if (CreateIoCompletionPort((HANDLE)socket, - loop->iocp, - (ULONG_PTR)socket, - 0) == NULL) { - if (imported) { - handle->flags |= UV_HANDLE_EMULATE_IOCP; - } else { - return GetLastError(); - } - } - - if (family == AF_INET6) { - non_ifs_lsp = uv_tcp_non_ifs_lsp_ipv6; - } else { - non_ifs_lsp = uv_tcp_non_ifs_lsp_ipv4; - } - - if (pSetFileCompletionNotificationModes && - !(handle->flags & UV_HANDLE_EMULATE_IOCP) && !non_ifs_lsp) { - if (pSetFileCompletionNotificationModes((HANDLE) socket, - FILE_SKIP_SET_EVENT_ON_HANDLE | - FILE_SKIP_COMPLETION_PORT_ON_SUCCESS)) { - handle->flags |= UV_HANDLE_SYNC_BYPASS_IOCP; - } else if (GetLastError() != ERROR_INVALID_FUNCTION) { - return GetLastError(); - } - } - - if (handle->flags & UV_HANDLE_TCP_NODELAY) { - err = uv__tcp_nodelay(handle, socket, 1); - if (err) - return err; - } - - /* TODO: Use stored delay. */ - if (handle->flags & UV_HANDLE_TCP_KEEPALIVE) { - err = uv__tcp_keepalive(handle, socket, 1, 60); - if (err) - return err; - } - - handle->socket = socket; - - if (family == AF_INET6) { - handle->flags |= UV_HANDLE_IPV6; - } else { - assert(!(handle->flags & UV_HANDLE_IPV6)); - } - - return 0; -} - - -int uv_tcp_init_ex(uv_loop_t* loop, uv_tcp_t* handle, unsigned int flags) { - int domain; - - /* Use the lower 8 bits for the domain */ - domain = flags & 0xFF; - if (domain != AF_INET && domain != AF_INET6 && domain != AF_UNSPEC) - return UV_EINVAL; - - if (flags & ~0xFF) - return UV_EINVAL; - - uv_stream_init(loop, (uv_stream_t*) handle, UV_TCP); - handle->tcp.serv.accept_reqs = NULL; - handle->tcp.serv.pending_accepts = NULL; - handle->socket = INVALID_SOCKET; - handle->reqs_pending = 0; - handle->tcp.serv.func_acceptex = NULL; - handle->tcp.conn.func_connectex = NULL; - handle->tcp.serv.processed_accepts = 0; - handle->delayed_error = 0; - - /* If anything fails beyond this point we need to remove the handle from - * the handle queue, since it was added by uv__handle_init in uv_stream_init. - */ - - if (domain != AF_UNSPEC) { - SOCKET sock; - DWORD err; - - sock = socket(domain, SOCK_STREAM, 0); - if (sock == INVALID_SOCKET) { - err = WSAGetLastError(); - QUEUE_REMOVE(&handle->handle_queue); - return uv_translate_sys_error(err); - } - - err = uv_tcp_set_socket(handle->loop, handle, sock, domain, 0); - if (err) { - closesocket(sock); - QUEUE_REMOVE(&handle->handle_queue); - return uv_translate_sys_error(err); - } - - } - - return 0; -} - - -int uv_tcp_init(uv_loop_t* loop, uv_tcp_t* handle) { - return uv_tcp_init_ex(loop, handle, AF_UNSPEC); -} - - -void uv_tcp_endgame(uv_loop_t* loop, uv_tcp_t* handle) { - int err; - unsigned int i; - uv_tcp_accept_t* req; - - if (handle->flags & UV_HANDLE_CONNECTION && - handle->stream.conn.shutdown_req != NULL && - handle->stream.conn.write_reqs_pending == 0) { - - UNREGISTER_HANDLE_REQ(loop, handle, handle->stream.conn.shutdown_req); - - err = 0; - if (handle->flags & UV__HANDLE_CLOSING) { - err = ERROR_OPERATION_ABORTED; - } else if (shutdown(handle->socket, SD_SEND) == SOCKET_ERROR) { - err = WSAGetLastError(); - } - - if (handle->stream.conn.shutdown_req->cb) { - handle->stream.conn.shutdown_req->cb(handle->stream.conn.shutdown_req, - uv_translate_sys_error(err)); - } - - handle->stream.conn.shutdown_req = NULL; - DECREASE_PENDING_REQ_COUNT(handle); - return; - } - - if (handle->flags & UV__HANDLE_CLOSING && - handle->reqs_pending == 0) { - assert(!(handle->flags & UV_HANDLE_CLOSED)); - - if (!(handle->flags & UV_HANDLE_TCP_SOCKET_CLOSED)) { - closesocket(handle->socket); - handle->socket = INVALID_SOCKET; - handle->flags |= UV_HANDLE_TCP_SOCKET_CLOSED; - } - - if (!(handle->flags & UV_HANDLE_CONNECTION) && handle->tcp.serv.accept_reqs) { - if (handle->flags & UV_HANDLE_EMULATE_IOCP) { - for (i = 0; i < uv_simultaneous_server_accepts; i++) { - req = &handle->tcp.serv.accept_reqs[i]; - if (req->wait_handle != INVALID_HANDLE_VALUE) { - UnregisterWait(req->wait_handle); - req->wait_handle = INVALID_HANDLE_VALUE; - } - if (req->event_handle) { - CloseHandle(req->event_handle); - req->event_handle = NULL; - } - } - } - - uv__free(handle->tcp.serv.accept_reqs); - handle->tcp.serv.accept_reqs = NULL; - } - - if (handle->flags & UV_HANDLE_CONNECTION && - handle->flags & UV_HANDLE_EMULATE_IOCP) { - if (handle->read_req.wait_handle != INVALID_HANDLE_VALUE) { - UnregisterWait(handle->read_req.wait_handle); - handle->read_req.wait_handle = INVALID_HANDLE_VALUE; - } - if (handle->read_req.event_handle) { - CloseHandle(handle->read_req.event_handle); - handle->read_req.event_handle = NULL; - } - } - - uv__handle_close(handle); - loop->active_tcp_streams--; - } -} - - -/* Unlike on Unix, here we don't set SO_REUSEADDR, because it doesn't just - * allow binding to addresses that are in use by sockets in TIME_WAIT, it - * effectively allows 'stealing' a port which is in use by another application. - * - * SO_EXCLUSIVEADDRUSE is also not good here because it does check all sockets, - * regardless of state, so we'd get an error even if the port is in use by a - * socket in TIME_WAIT state. - * - * See issue #1360. - * - */ -static int uv_tcp_try_bind(uv_tcp_t* handle, - const struct sockaddr* addr, - unsigned int addrlen, - unsigned int flags) { - DWORD err; - int r; - - if (handle->socket == INVALID_SOCKET) { - SOCKET sock; - - /* Cannot set IPv6-only mode on non-IPv6 socket. */ - if ((flags & UV_TCP_IPV6ONLY) && addr->sa_family != AF_INET6) - return ERROR_INVALID_PARAMETER; - - sock = socket(addr->sa_family, SOCK_STREAM, 0); - if (sock == INVALID_SOCKET) { - return WSAGetLastError(); - } - - err = uv_tcp_set_socket(handle->loop, handle, sock, addr->sa_family, 0); - if (err) { - closesocket(sock); - return err; - } - } - -#ifdef IPV6_V6ONLY - if (addr->sa_family == AF_INET6) { - int on; - - on = (flags & UV_TCP_IPV6ONLY) != 0; - - /* TODO: how to handle errors? This may fail if there is no ipv4 stack */ - /* available, or when run on XP/2003 which have no support for dualstack */ - /* sockets. For now we're silently ignoring the error. */ - setsockopt(handle->socket, - IPPROTO_IPV6, - IPV6_V6ONLY, - (const char*)&on, - sizeof on); - } -#endif - - r = bind(handle->socket, addr, addrlen); - - if (r == SOCKET_ERROR) { - err = WSAGetLastError(); - if (err == WSAEADDRINUSE) { - /* Some errors are not to be reported until connect() or listen() */ - handle->delayed_error = err; - } else { - return err; - } - } - - handle->flags |= UV_HANDLE_BOUND; - - return 0; -} - - -static void CALLBACK post_completion(void* context, BOOLEAN timed_out) { - uv_req_t* req; - uv_tcp_t* handle; - - req = (uv_req_t*) context; - assert(req != NULL); - handle = (uv_tcp_t*)req->data; - assert(handle != NULL); - assert(!timed_out); - - if (!PostQueuedCompletionStatus(handle->loop->iocp, - req->u.io.overlapped.InternalHigh, - 0, - &req->u.io.overlapped)) { - uv_fatal_error(GetLastError(), "PostQueuedCompletionStatus"); - } -} - - -static void CALLBACK post_write_completion(void* context, BOOLEAN timed_out) { - uv_write_t* req; - uv_tcp_t* handle; - - req = (uv_write_t*) context; - assert(req != NULL); - handle = (uv_tcp_t*)req->handle; - assert(handle != NULL); - assert(!timed_out); - - if (!PostQueuedCompletionStatus(handle->loop->iocp, - req->u.io.overlapped.InternalHigh, - 0, - &req->u.io.overlapped)) { - uv_fatal_error(GetLastError(), "PostQueuedCompletionStatus"); - } -} - - -static void uv_tcp_queue_accept(uv_tcp_t* handle, uv_tcp_accept_t* req) { - uv_loop_t* loop = handle->loop; - BOOL success; - DWORD bytes; - SOCKET accept_socket; - short family; - - assert(handle->flags & UV_HANDLE_LISTENING); - assert(req->accept_socket == INVALID_SOCKET); - - /* choose family and extension function */ - if (handle->flags & UV_HANDLE_IPV6) { - family = AF_INET6; - } else { - family = AF_INET; - } - - /* Open a socket for the accepted connection. */ - accept_socket = socket(family, SOCK_STREAM, 0); - if (accept_socket == INVALID_SOCKET) { - SET_REQ_ERROR(req, WSAGetLastError()); - uv_insert_pending_req(loop, (uv_req_t*)req); - handle->reqs_pending++; - return; - } - - /* Make the socket non-inheritable */ - if (!SetHandleInformation((HANDLE) accept_socket, HANDLE_FLAG_INHERIT, 0)) { - SET_REQ_ERROR(req, GetLastError()); - uv_insert_pending_req(loop, (uv_req_t*)req); - handle->reqs_pending++; - closesocket(accept_socket); - return; - } - - /* Prepare the overlapped structure. */ - memset(&(req->u.io.overlapped), 0, sizeof(req->u.io.overlapped)); - if (handle->flags & UV_HANDLE_EMULATE_IOCP) { - req->u.io.overlapped.hEvent = (HANDLE) ((ULONG_PTR) req->event_handle | 1); - } - - success = handle->tcp.serv.func_acceptex(handle->socket, - accept_socket, - (void*)req->accept_buffer, - 0, - sizeof(struct sockaddr_storage), - sizeof(struct sockaddr_storage), - &bytes, - &req->u.io.overlapped); - - if (UV_SUCCEEDED_WITHOUT_IOCP(success)) { - /* Process the req without IOCP. */ - req->accept_socket = accept_socket; - handle->reqs_pending++; - uv_insert_pending_req(loop, (uv_req_t*)req); - } else if (UV_SUCCEEDED_WITH_IOCP(success)) { - /* The req will be processed with IOCP. */ - req->accept_socket = accept_socket; - handle->reqs_pending++; - if (handle->flags & UV_HANDLE_EMULATE_IOCP && - req->wait_handle == INVALID_HANDLE_VALUE && - !RegisterWaitForSingleObject(&req->wait_handle, - req->event_handle, post_completion, (void*) req, - INFINITE, WT_EXECUTEINWAITTHREAD)) { - SET_REQ_ERROR(req, GetLastError()); - uv_insert_pending_req(loop, (uv_req_t*)req); - handle->reqs_pending++; - return; - } - } else { - /* Make this req pending reporting an error. */ - SET_REQ_ERROR(req, WSAGetLastError()); - uv_insert_pending_req(loop, (uv_req_t*)req); - handle->reqs_pending++; - /* Destroy the preallocated client socket. */ - closesocket(accept_socket); - /* Destroy the event handle */ - if (handle->flags & UV_HANDLE_EMULATE_IOCP) { - CloseHandle(req->u.io.overlapped.hEvent); - req->event_handle = NULL; - } - } -} - - -static void uv_tcp_queue_read(uv_loop_t* loop, uv_tcp_t* handle) { - uv_read_t* req; - uv_buf_t buf; - int result; - DWORD bytes, flags; - - assert(handle->flags & UV_HANDLE_READING); - assert(!(handle->flags & UV_HANDLE_READ_PENDING)); - - req = &handle->read_req; - memset(&req->u.io.overlapped, 0, sizeof(req->u.io.overlapped)); - - /* - * Preallocate a read buffer if the number of active streams is below - * the threshold. - */ - if (loop->active_tcp_streams < uv_active_tcp_streams_threshold) { - handle->flags &= ~UV_HANDLE_ZERO_READ; - handle->alloc_cb((uv_handle_t*) handle, 65536, &handle->tcp.conn.read_buffer); - if (handle->tcp.conn.read_buffer.len == 0) { - handle->read_cb((uv_stream_t*) handle, UV_ENOBUFS, &handle->tcp.conn.read_buffer); - return; - } - assert(handle->tcp.conn.read_buffer.base != NULL); - buf = handle->tcp.conn.read_buffer; - } else { - handle->flags |= UV_HANDLE_ZERO_READ; - buf.base = (char*) &uv_zero_; - buf.len = 0; - } - - /* Prepare the overlapped structure. */ - memset(&(req->u.io.overlapped), 0, sizeof(req->u.io.overlapped)); - if (handle->flags & UV_HANDLE_EMULATE_IOCP) { - assert(req->event_handle); - req->u.io.overlapped.hEvent = (HANDLE) ((ULONG_PTR) req->event_handle | 1); - } - - flags = 0; - result = WSARecv(handle->socket, - (WSABUF*)&buf, - 1, - &bytes, - &flags, - &req->u.io.overlapped, - NULL); - - if (UV_SUCCEEDED_WITHOUT_IOCP(result == 0)) { - /* Process the req without IOCP. */ - handle->flags |= UV_HANDLE_READ_PENDING; - req->u.io.overlapped.InternalHigh = bytes; - handle->reqs_pending++; - uv_insert_pending_req(loop, (uv_req_t*)req); - } else if (UV_SUCCEEDED_WITH_IOCP(result == 0)) { - /* The req will be processed with IOCP. */ - handle->flags |= UV_HANDLE_READ_PENDING; - handle->reqs_pending++; - if (handle->flags & UV_HANDLE_EMULATE_IOCP && - req->wait_handle == INVALID_HANDLE_VALUE && - !RegisterWaitForSingleObject(&req->wait_handle, - req->event_handle, post_completion, (void*) req, - INFINITE, WT_EXECUTEINWAITTHREAD)) { - SET_REQ_ERROR(req, GetLastError()); - uv_insert_pending_req(loop, (uv_req_t*)req); - } - } else { - /* Make this req pending reporting an error. */ - SET_REQ_ERROR(req, WSAGetLastError()); - uv_insert_pending_req(loop, (uv_req_t*)req); - handle->reqs_pending++; - } -} - - -int uv_tcp_listen(uv_tcp_t* handle, int backlog, uv_connection_cb cb) { - uv_loop_t* loop = handle->loop; - unsigned int i, simultaneous_accepts; - uv_tcp_accept_t* req; - int err; - - assert(backlog > 0); - - if (handle->flags & UV_HANDLE_LISTENING) { - handle->stream.serv.connection_cb = cb; - } - - if (handle->flags & UV_HANDLE_READING) { - return WSAEISCONN; - } - - if (handle->delayed_error) { - return handle->delayed_error; - } - - if (!(handle->flags & UV_HANDLE_BOUND)) { - err = uv_tcp_try_bind(handle, - (const struct sockaddr*) &uv_addr_ip4_any_, - sizeof(uv_addr_ip4_any_), - 0); - if (err) - return err; - if (handle->delayed_error) - return handle->delayed_error; - } - - if (!handle->tcp.serv.func_acceptex) { - if (!uv_get_acceptex_function(handle->socket, &handle->tcp.serv.func_acceptex)) { - return WSAEAFNOSUPPORT; - } - } - - if (!(handle->flags & UV_HANDLE_SHARED_TCP_SOCKET) && - listen(handle->socket, backlog) == SOCKET_ERROR) { - return WSAGetLastError(); - } - - handle->flags |= UV_HANDLE_LISTENING; - handle->stream.serv.connection_cb = cb; - INCREASE_ACTIVE_COUNT(loop, handle); - - simultaneous_accepts = handle->flags & UV_HANDLE_TCP_SINGLE_ACCEPT ? 1 - : uv_simultaneous_server_accepts; - - if(!handle->tcp.serv.accept_reqs) { - handle->tcp.serv.accept_reqs = (uv_tcp_accept_t*) - uv__malloc(uv_simultaneous_server_accepts * sizeof(uv_tcp_accept_t)); - if (!handle->tcp.serv.accept_reqs) { - uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc"); - } - - for (i = 0; i < simultaneous_accepts; i++) { - req = &handle->tcp.serv.accept_reqs[i]; - uv_req_init(loop, (uv_req_t*)req); - req->type = UV_ACCEPT; - req->accept_socket = INVALID_SOCKET; - req->data = handle; - - req->wait_handle = INVALID_HANDLE_VALUE; - if (handle->flags & UV_HANDLE_EMULATE_IOCP) { - req->event_handle = CreateEvent(NULL, 0, 0, NULL); - if (!req->event_handle) { - uv_fatal_error(GetLastError(), "CreateEvent"); - } - } else { - req->event_handle = NULL; - } - - uv_tcp_queue_accept(handle, req); - } - - /* Initialize other unused requests too, because uv_tcp_endgame */ - /* doesn't know how how many requests were initialized, so it will */ - /* try to clean up {uv_simultaneous_server_accepts} requests. */ - for (i = simultaneous_accepts; i < uv_simultaneous_server_accepts; i++) { - req = &handle->tcp.serv.accept_reqs[i]; - uv_req_init(loop, (uv_req_t*) req); - req->type = UV_ACCEPT; - req->accept_socket = INVALID_SOCKET; - req->data = handle; - req->wait_handle = INVALID_HANDLE_VALUE; - req->event_handle = NULL; - } - } - - return 0; -} - - -int uv_tcp_accept(uv_tcp_t* server, uv_tcp_t* client) { - uv_loop_t* loop = server->loop; - int err = 0; - int family; - - uv_tcp_accept_t* req = server->tcp.serv.pending_accepts; - - if (!req) { - /* No valid connections found, so we error out. */ - return WSAEWOULDBLOCK; - } - - if (req->accept_socket == INVALID_SOCKET) { - return WSAENOTCONN; - } - - if (server->flags & UV_HANDLE_IPV6) { - family = AF_INET6; - } else { - family = AF_INET; - } - - err = uv_tcp_set_socket(client->loop, - client, - req->accept_socket, - family, - 0); - if (err) { - closesocket(req->accept_socket); - } else { - uv_connection_init((uv_stream_t*) client); - /* AcceptEx() implicitly binds the accepted socket. */ - client->flags |= UV_HANDLE_BOUND | UV_HANDLE_READABLE | UV_HANDLE_WRITABLE; - } - - /* Prepare the req to pick up a new connection */ - server->tcp.serv.pending_accepts = req->next_pending; - req->next_pending = NULL; - req->accept_socket = INVALID_SOCKET; - - if (!(server->flags & UV__HANDLE_CLOSING)) { - /* Check if we're in a middle of changing the number of pending accepts. */ - if (!(server->flags & UV_HANDLE_TCP_ACCEPT_STATE_CHANGING)) { - uv_tcp_queue_accept(server, req); - } else { - /* We better be switching to a single pending accept. */ - assert(server->flags & UV_HANDLE_TCP_SINGLE_ACCEPT); - - server->tcp.serv.processed_accepts++; - - if (server->tcp.serv.processed_accepts >= uv_simultaneous_server_accepts) { - server->tcp.serv.processed_accepts = 0; - /* - * All previously queued accept requests are now processed. - * We now switch to queueing just a single accept. - */ - uv_tcp_queue_accept(server, &server->tcp.serv.accept_reqs[0]); - server->flags &= ~UV_HANDLE_TCP_ACCEPT_STATE_CHANGING; - server->flags |= UV_HANDLE_TCP_SINGLE_ACCEPT; - } - } - } - - loop->active_tcp_streams++; - - return err; -} - - -int uv_tcp_read_start(uv_tcp_t* handle, uv_alloc_cb alloc_cb, - uv_read_cb read_cb) { - uv_loop_t* loop = handle->loop; - - handle->flags |= UV_HANDLE_READING; - handle->read_cb = read_cb; - handle->alloc_cb = alloc_cb; - INCREASE_ACTIVE_COUNT(loop, handle); - - /* If reading was stopped and then started again, there could still be a */ - /* read request pending. */ - if (!(handle->flags & UV_HANDLE_READ_PENDING)) { - if (handle->flags & UV_HANDLE_EMULATE_IOCP && - !handle->read_req.event_handle) { - handle->read_req.event_handle = CreateEvent(NULL, 0, 0, NULL); - if (!handle->read_req.event_handle) { - uv_fatal_error(GetLastError(), "CreateEvent"); - } - } - uv_tcp_queue_read(loop, handle); - } - - return 0; -} - - -static int uv_tcp_try_connect(uv_connect_t* req, - uv_tcp_t* handle, - const struct sockaddr* addr, - unsigned int addrlen, - uv_connect_cb cb) { - uv_loop_t* loop = handle->loop; - const struct sockaddr* bind_addr; - BOOL success; - DWORD bytes; - int err; - - if (handle->delayed_error) { - return handle->delayed_error; - } - - if (!(handle->flags & UV_HANDLE_BOUND)) { - if (addrlen == sizeof(uv_addr_ip4_any_)) { - bind_addr = (const struct sockaddr*) &uv_addr_ip4_any_; - } else if (addrlen == sizeof(uv_addr_ip6_any_)) { - bind_addr = (const struct sockaddr*) &uv_addr_ip6_any_; - } else { - abort(); - } - err = uv_tcp_try_bind(handle, bind_addr, addrlen, 0); - if (err) - return err; - if (handle->delayed_error) - return handle->delayed_error; - } - - if (!handle->tcp.conn.func_connectex) { - if (!uv_get_connectex_function(handle->socket, &handle->tcp.conn.func_connectex)) { - return WSAEAFNOSUPPORT; - } - } - - uv_req_init(loop, (uv_req_t*) req); - req->type = UV_CONNECT; - req->handle = (uv_stream_t*) handle; - req->cb = cb; - memset(&req->u.io.overlapped, 0, sizeof(req->u.io.overlapped)); - - success = handle->tcp.conn.func_connectex(handle->socket, - addr, - addrlen, - NULL, - 0, - &bytes, - &req->u.io.overlapped); - - if (UV_SUCCEEDED_WITHOUT_IOCP(success)) { - /* Process the req without IOCP. */ - handle->reqs_pending++; - REGISTER_HANDLE_REQ(loop, handle, req); - uv_insert_pending_req(loop, (uv_req_t*)req); - } else if (UV_SUCCEEDED_WITH_IOCP(success)) { - /* The req will be processed with IOCP. */ - handle->reqs_pending++; - REGISTER_HANDLE_REQ(loop, handle, req); - } else { - return WSAGetLastError(); - } - - return 0; -} - - -int uv_tcp_getsockname(const uv_tcp_t* handle, - struct sockaddr* name, - int* namelen) { - int result; - - if (handle->socket == INVALID_SOCKET) { - return UV_EINVAL; - } - - if (handle->delayed_error) { - return uv_translate_sys_error(handle->delayed_error); - } - - result = getsockname(handle->socket, name, namelen); - if (result != 0) { - return uv_translate_sys_error(WSAGetLastError()); - } - - return 0; -} - - -int uv_tcp_getpeername(const uv_tcp_t* handle, - struct sockaddr* name, - int* namelen) { - int result; - - if (handle->socket == INVALID_SOCKET) { - return UV_EINVAL; - } - - if (handle->delayed_error) { - return uv_translate_sys_error(handle->delayed_error); - } - - result = getpeername(handle->socket, name, namelen); - if (result != 0) { - return uv_translate_sys_error(WSAGetLastError()); - } - - return 0; -} - - -int uv_tcp_write(uv_loop_t* loop, - uv_write_t* req, - uv_tcp_t* handle, - const uv_buf_t bufs[], - unsigned int nbufs, - uv_write_cb cb) { - int result; - DWORD bytes; - - uv_req_init(loop, (uv_req_t*) req); - req->type = UV_WRITE; - req->handle = (uv_stream_t*) handle; - req->cb = cb; - - /* Prepare the overlapped structure. */ - memset(&(req->u.io.overlapped), 0, sizeof(req->u.io.overlapped)); - if (handle->flags & UV_HANDLE_EMULATE_IOCP) { - req->event_handle = CreateEvent(NULL, 0, 0, NULL); - if (!req->event_handle) { - uv_fatal_error(GetLastError(), "CreateEvent"); - } - req->u.io.overlapped.hEvent = (HANDLE) ((ULONG_PTR) req->event_handle | 1); - req->wait_handle = INVALID_HANDLE_VALUE; - } - - result = WSASend(handle->socket, - (WSABUF*) bufs, - nbufs, - &bytes, - 0, - &req->u.io.overlapped, - NULL); - - if (UV_SUCCEEDED_WITHOUT_IOCP(result == 0)) { - /* Request completed immediately. */ - req->u.io.queued_bytes = 0; - handle->reqs_pending++; - handle->stream.conn.write_reqs_pending++; - REGISTER_HANDLE_REQ(loop, handle, req); - uv_insert_pending_req(loop, (uv_req_t*) req); - } else if (UV_SUCCEEDED_WITH_IOCP(result == 0)) { - /* Request queued by the kernel. */ - req->u.io.queued_bytes = uv__count_bufs(bufs, nbufs); - handle->reqs_pending++; - handle->stream.conn.write_reqs_pending++; - REGISTER_HANDLE_REQ(loop, handle, req); - handle->write_queue_size += req->u.io.queued_bytes; - if (handle->flags & UV_HANDLE_EMULATE_IOCP && - !RegisterWaitForSingleObject(&req->wait_handle, - req->event_handle, post_write_completion, (void*) req, - INFINITE, WT_EXECUTEINWAITTHREAD | WT_EXECUTEONLYONCE)) { - SET_REQ_ERROR(req, GetLastError()); - uv_insert_pending_req(loop, (uv_req_t*)req); - } - } else { - /* Send failed due to an error, report it later */ - req->u.io.queued_bytes = 0; - handle->reqs_pending++; - handle->stream.conn.write_reqs_pending++; - REGISTER_HANDLE_REQ(loop, handle, req); - SET_REQ_ERROR(req, WSAGetLastError()); - uv_insert_pending_req(loop, (uv_req_t*) req); - } - - return 0; -} - - -int uv__tcp_try_write(uv_tcp_t* handle, - const uv_buf_t bufs[], - unsigned int nbufs) { - int result; - DWORD bytes; - - if (handle->stream.conn.write_reqs_pending > 0) - return UV_EAGAIN; - - result = WSASend(handle->socket, - (WSABUF*) bufs, - nbufs, - &bytes, - 0, - NULL, - NULL); - - if (result == SOCKET_ERROR) - return uv_translate_sys_error(WSAGetLastError()); - else - return bytes; -} - - -void uv_process_tcp_read_req(uv_loop_t* loop, uv_tcp_t* handle, - uv_req_t* req) { - DWORD bytes, flags, err; - uv_buf_t buf; - - assert(handle->type == UV_TCP); - - handle->flags &= ~UV_HANDLE_READ_PENDING; - - if (!REQ_SUCCESS(req)) { - /* An error occurred doing the read. */ - if ((handle->flags & UV_HANDLE_READING) || - !(handle->flags & UV_HANDLE_ZERO_READ)) { - handle->flags &= ~UV_HANDLE_READING; - DECREASE_ACTIVE_COUNT(loop, handle); - buf = (handle->flags & UV_HANDLE_ZERO_READ) ? - uv_buf_init(NULL, 0) : handle->tcp.conn.read_buffer; - - err = GET_REQ_SOCK_ERROR(req); - - if (err == WSAECONNABORTED) { - /* - * Turn WSAECONNABORTED into UV_ECONNRESET to be consistent with Unix. - */ - err = WSAECONNRESET; - } - - handle->read_cb((uv_stream_t*)handle, - uv_translate_sys_error(err), - &buf); - } - } else { - if (!(handle->flags & UV_HANDLE_ZERO_READ)) { - /* The read was done with a non-zero buffer length. */ - if (req->u.io.overlapped.InternalHigh > 0) { - /* Successful read */ - handle->read_cb((uv_stream_t*)handle, - req->u.io.overlapped.InternalHigh, - &handle->tcp.conn.read_buffer); - /* Read again only if bytes == buf.len */ - if (req->u.io.overlapped.InternalHigh < handle->tcp.conn.read_buffer.len) { - goto done; - } - } else { - /* Connection closed */ - if (handle->flags & UV_HANDLE_READING) { - handle->flags &= ~UV_HANDLE_READING; - DECREASE_ACTIVE_COUNT(loop, handle); - } - handle->flags &= ~UV_HANDLE_READABLE; - - buf.base = 0; - buf.len = 0; - handle->read_cb((uv_stream_t*)handle, UV_EOF, &handle->tcp.conn.read_buffer); - goto done; - } - } - - /* Do nonblocking reads until the buffer is empty */ - while (handle->flags & UV_HANDLE_READING) { - handle->alloc_cb((uv_handle_t*) handle, 65536, &buf); - if (buf.len == 0) { - handle->read_cb((uv_stream_t*) handle, UV_ENOBUFS, &buf); - break; - } - assert(buf.base != NULL); - - flags = 0; - if (WSARecv(handle->socket, - (WSABUF*)&buf, - 1, - &bytes, - &flags, - NULL, - NULL) != SOCKET_ERROR) { - if (bytes > 0) { - /* Successful read */ - handle->read_cb((uv_stream_t*)handle, bytes, &buf); - /* Read again only if bytes == buf.len */ - if (bytes < buf.len) { - break; - } - } else { - /* Connection closed */ - handle->flags &= ~(UV_HANDLE_READING | UV_HANDLE_READABLE); - DECREASE_ACTIVE_COUNT(loop, handle); - - handle->read_cb((uv_stream_t*)handle, UV_EOF, &buf); - break; - } - } else { - err = WSAGetLastError(); - if (err == WSAEWOULDBLOCK) { - /* Read buffer was completely empty, report a 0-byte read. */ - handle->read_cb((uv_stream_t*)handle, 0, &buf); - } else { - /* Ouch! serious error. */ - handle->flags &= ~UV_HANDLE_READING; - DECREASE_ACTIVE_COUNT(loop, handle); - - if (err == WSAECONNABORTED) { - /* Turn WSAECONNABORTED into UV_ECONNRESET to be consistent with */ - /* Unix. */ - err = WSAECONNRESET; - } - - handle->read_cb((uv_stream_t*)handle, - uv_translate_sys_error(err), - &buf); - } - break; - } - } - -done: - /* Post another read if still reading and not closing. */ - if ((handle->flags & UV_HANDLE_READING) && - !(handle->flags & UV_HANDLE_READ_PENDING)) { - uv_tcp_queue_read(loop, handle); - } - } - - DECREASE_PENDING_REQ_COUNT(handle); -} - - -void uv_process_tcp_write_req(uv_loop_t* loop, uv_tcp_t* handle, - uv_write_t* req) { - int err; - - assert(handle->type == UV_TCP); - - assert(handle->write_queue_size >= req->u.io.queued_bytes); - handle->write_queue_size -= req->u.io.queued_bytes; - - UNREGISTER_HANDLE_REQ(loop, handle, req); - - if (handle->flags & UV_HANDLE_EMULATE_IOCP) { - if (req->wait_handle != INVALID_HANDLE_VALUE) { - UnregisterWait(req->wait_handle); - req->wait_handle = INVALID_HANDLE_VALUE; - } - if (req->event_handle) { - CloseHandle(req->event_handle); - req->event_handle = NULL; - } - } - - if (req->cb) { - err = uv_translate_sys_error(GET_REQ_SOCK_ERROR(req)); - if (err == UV_ECONNABORTED) { - /* use UV_ECANCELED for consistency with Unix */ - err = UV_ECANCELED; - } - req->cb(req, err); - } - - handle->stream.conn.write_reqs_pending--; - if (handle->stream.conn.shutdown_req != NULL && - handle->stream.conn.write_reqs_pending == 0) { - uv_want_endgame(loop, (uv_handle_t*)handle); - } - - DECREASE_PENDING_REQ_COUNT(handle); -} - - -void uv_process_tcp_accept_req(uv_loop_t* loop, uv_tcp_t* handle, - uv_req_t* raw_req) { - uv_tcp_accept_t* req = (uv_tcp_accept_t*) raw_req; - int err; - - assert(handle->type == UV_TCP); - - /* If handle->accepted_socket is not a valid socket, then */ - /* uv_queue_accept must have failed. This is a serious error. We stop */ - /* accepting connections and report this error to the connection */ - /* callback. */ - if (req->accept_socket == INVALID_SOCKET) { - if (handle->flags & UV_HANDLE_LISTENING) { - handle->flags &= ~UV_HANDLE_LISTENING; - DECREASE_ACTIVE_COUNT(loop, handle); - if (handle->stream.serv.connection_cb) { - err = GET_REQ_SOCK_ERROR(req); - handle->stream.serv.connection_cb((uv_stream_t*)handle, - uv_translate_sys_error(err)); - } - } - } else if (REQ_SUCCESS(req) && - setsockopt(req->accept_socket, - SOL_SOCKET, - SO_UPDATE_ACCEPT_CONTEXT, - (char*)&handle->socket, - sizeof(handle->socket)) == 0) { - req->next_pending = handle->tcp.serv.pending_accepts; - handle->tcp.serv.pending_accepts = req; - - /* Accept and SO_UPDATE_ACCEPT_CONTEXT were successful. */ - if (handle->stream.serv.connection_cb) { - handle->stream.serv.connection_cb((uv_stream_t*)handle, 0); - } - } else { - /* Error related to accepted socket is ignored because the server */ - /* socket may still be healthy. If the server socket is broken */ - /* uv_queue_accept will detect it. */ - closesocket(req->accept_socket); - req->accept_socket = INVALID_SOCKET; - if (handle->flags & UV_HANDLE_LISTENING) { - uv_tcp_queue_accept(handle, req); - } - } - - DECREASE_PENDING_REQ_COUNT(handle); -} - - -void uv_process_tcp_connect_req(uv_loop_t* loop, uv_tcp_t* handle, - uv_connect_t* req) { - int err; - - assert(handle->type == UV_TCP); - - UNREGISTER_HANDLE_REQ(loop, handle, req); - - err = 0; - if (REQ_SUCCESS(req)) { - if (setsockopt(handle->socket, - SOL_SOCKET, - SO_UPDATE_CONNECT_CONTEXT, - NULL, - 0) == 0) { - uv_connection_init((uv_stream_t*)handle); - handle->flags |= UV_HANDLE_READABLE | UV_HANDLE_WRITABLE; - loop->active_tcp_streams++; - } else { - err = WSAGetLastError(); - } - } else { - err = GET_REQ_SOCK_ERROR(req); - } - req->cb(req, uv_translate_sys_error(err)); - - DECREASE_PENDING_REQ_COUNT(handle); -} - - -int uv_tcp_import(uv_tcp_t* tcp, uv__ipc_socket_info_ex* socket_info_ex, - int tcp_connection) { - int err; - SOCKET socket = WSASocketW(FROM_PROTOCOL_INFO, - FROM_PROTOCOL_INFO, - FROM_PROTOCOL_INFO, - &socket_info_ex->socket_info, - 0, - WSA_FLAG_OVERLAPPED); - - if (socket == INVALID_SOCKET) { - return WSAGetLastError(); - } - - err = uv_tcp_set_socket(tcp->loop, - tcp, - socket, - socket_info_ex->socket_info.iAddressFamily, - 1); - if (err) { - closesocket(socket); - return err; - } - - if (tcp_connection) { - uv_connection_init((uv_stream_t*)tcp); - tcp->flags |= UV_HANDLE_READABLE | UV_HANDLE_WRITABLE; - } - - tcp->flags |= UV_HANDLE_BOUND; - tcp->flags |= UV_HANDLE_SHARED_TCP_SOCKET; - - tcp->delayed_error = socket_info_ex->delayed_error; - - tcp->loop->active_tcp_streams++; - return 0; -} - - -int uv_tcp_nodelay(uv_tcp_t* handle, int enable) { - int err; - - if (handle->socket != INVALID_SOCKET) { - err = uv__tcp_nodelay(handle, handle->socket, enable); - if (err) - return err; - } - - if (enable) { - handle->flags |= UV_HANDLE_TCP_NODELAY; - } else { - handle->flags &= ~UV_HANDLE_TCP_NODELAY; - } - - return 0; -} - - -int uv_tcp_keepalive(uv_tcp_t* handle, int enable, unsigned int delay) { - int err; - - if (handle->socket != INVALID_SOCKET) { - err = uv__tcp_keepalive(handle, handle->socket, enable, delay); - if (err) - return err; - } - - if (enable) { - handle->flags |= UV_HANDLE_TCP_KEEPALIVE; - } else { - handle->flags &= ~UV_HANDLE_TCP_KEEPALIVE; - } - - /* TODO: Store delay if handle->socket isn't created yet. */ - - return 0; -} - - -int uv_tcp_duplicate_socket(uv_tcp_t* handle, int pid, - LPWSAPROTOCOL_INFOW protocol_info) { - if (!(handle->flags & UV_HANDLE_CONNECTION)) { - /* - * We're about to share the socket with another process. Because - * this is a listening socket, we assume that the other process will - * be accepting connections on it. So, before sharing the socket - * with another process, we call listen here in the parent process. - */ - - if (!(handle->flags & UV_HANDLE_LISTENING)) { - if (!(handle->flags & UV_HANDLE_BOUND)) { - return ERROR_INVALID_PARAMETER; - } - - if (!(handle->delayed_error)) { - if (listen(handle->socket, SOMAXCONN) == SOCKET_ERROR) { - handle->delayed_error = WSAGetLastError(); - } - } - } - } - - if (WSADuplicateSocketW(handle->socket, pid, protocol_info)) { - return WSAGetLastError(); - } - - handle->flags |= UV_HANDLE_SHARED_TCP_SOCKET; - - return 0; -} - - -int uv_tcp_simultaneous_accepts(uv_tcp_t* handle, int enable) { - if (handle->flags & UV_HANDLE_CONNECTION) { - return UV_EINVAL; - } - - /* Check if we're already in the desired mode. */ - if ((enable && !(handle->flags & UV_HANDLE_TCP_SINGLE_ACCEPT)) || - (!enable && handle->flags & UV_HANDLE_TCP_SINGLE_ACCEPT)) { - return 0; - } - - /* Don't allow switching from single pending accept to many. */ - if (enable) { - return UV_ENOTSUP; - } - - /* Check if we're in a middle of changing the number of pending accepts. */ - if (handle->flags & UV_HANDLE_TCP_ACCEPT_STATE_CHANGING) { - return 0; - } - - handle->flags |= UV_HANDLE_TCP_SINGLE_ACCEPT; - - /* Flip the changing flag if we have already queued multiple accepts. */ - if (handle->flags & UV_HANDLE_LISTENING) { - handle->flags |= UV_HANDLE_TCP_ACCEPT_STATE_CHANGING; - } - - return 0; -} - - -static int uv_tcp_try_cancel_io(uv_tcp_t* tcp) { - SOCKET socket = tcp->socket; - int non_ifs_lsp; - - /* Check if we have any non-IFS LSPs stacked on top of TCP */ - non_ifs_lsp = (tcp->flags & UV_HANDLE_IPV6) ? uv_tcp_non_ifs_lsp_ipv6 : - uv_tcp_non_ifs_lsp_ipv4; - - /* If there are non-ifs LSPs then try to obtain a base handle for the */ - /* socket. This will always fail on Windows XP/3k. */ - if (non_ifs_lsp) { - DWORD bytes; - if (WSAIoctl(socket, - SIO_BASE_HANDLE, - NULL, - 0, - &socket, - sizeof socket, - &bytes, - NULL, - NULL) != 0) { - /* Failed. We can't do CancelIo. */ - return -1; - } - } - - assert(socket != 0 && socket != INVALID_SOCKET); - - if (!CancelIo((HANDLE) socket)) { - return GetLastError(); - } - - /* It worked. */ - return 0; -} - - -void uv_tcp_close(uv_loop_t* loop, uv_tcp_t* tcp) { - int close_socket = 1; - - if (tcp->flags & UV_HANDLE_READ_PENDING) { - /* In order for winsock to do a graceful close there must not be any */ - /* any pending reads, or the socket must be shut down for writing */ - if (!(tcp->flags & UV_HANDLE_SHARED_TCP_SOCKET)) { - /* Just do shutdown on non-shared sockets, which ensures graceful close. */ - shutdown(tcp->socket, SD_SEND); - - } else if (uv_tcp_try_cancel_io(tcp) == 0) { - /* In case of a shared socket, we try to cancel all outstanding I/O, */ - /* If that works, don't close the socket yet - wait for the read req to */ - /* return and close the socket in uv_tcp_endgame. */ - close_socket = 0; - - } else { - /* When cancelling isn't possible - which could happen when an LSP is */ - /* present on an old Windows version, we will have to close the socket */ - /* with a read pending. That is not nice because trailing sent bytes */ - /* may not make it to the other side. */ - } - - } else if ((tcp->flags & UV_HANDLE_SHARED_TCP_SOCKET) && - tcp->tcp.serv.accept_reqs != NULL) { - /* Under normal circumstances closesocket() will ensure that all pending */ - /* accept reqs are canceled. However, when the socket is shared the */ - /* presence of another reference to the socket in another process will */ - /* keep the accept reqs going, so we have to ensure that these are */ - /* canceled. */ - if (uv_tcp_try_cancel_io(tcp) != 0) { - /* When cancellation is not possible, there is another option: we can */ - /* close the incoming sockets, which will also cancel the accept */ - /* operations. However this is not cool because we might inadvertently */ - /* close a socket that just accepted a new connection, which will */ - /* cause the connection to be aborted. */ - unsigned int i; - for (i = 0; i < uv_simultaneous_server_accepts; i++) { - uv_tcp_accept_t* req = &tcp->tcp.serv.accept_reqs[i]; - if (req->accept_socket != INVALID_SOCKET && - !HasOverlappedIoCompleted(&req->u.io.overlapped)) { - closesocket(req->accept_socket); - req->accept_socket = INVALID_SOCKET; - } - } - } - } - - if (tcp->flags & UV_HANDLE_READING) { - tcp->flags &= ~UV_HANDLE_READING; - DECREASE_ACTIVE_COUNT(loop, tcp); - } - - if (tcp->flags & UV_HANDLE_LISTENING) { - tcp->flags &= ~UV_HANDLE_LISTENING; - DECREASE_ACTIVE_COUNT(loop, tcp); - } - - if (close_socket) { - closesocket(tcp->socket); - tcp->socket = INVALID_SOCKET; - tcp->flags |= UV_HANDLE_TCP_SOCKET_CLOSED; - } - - tcp->flags &= ~(UV_HANDLE_READABLE | UV_HANDLE_WRITABLE); - uv__handle_closing(tcp); - - if (tcp->reqs_pending == 0) { - uv_want_endgame(tcp->loop, (uv_handle_t*)tcp); - } -} - - -int uv_tcp_open(uv_tcp_t* handle, uv_os_sock_t sock) { - WSAPROTOCOL_INFOW protocol_info; - int opt_len; - int err; - - /* Detect the address family of the socket. */ - opt_len = (int) sizeof protocol_info; - if (getsockopt(sock, - SOL_SOCKET, - SO_PROTOCOL_INFOW, - (char*) &protocol_info, - &opt_len) == SOCKET_ERROR) { - return uv_translate_sys_error(GetLastError()); - } - - err = uv_tcp_set_socket(handle->loop, - handle, - sock, - protocol_info.iAddressFamily, - 1); - if (err) { - return uv_translate_sys_error(err); - } - - return 0; -} - - -/* This function is an egress point, i.e. it returns libuv errors rather than - * system errors. - */ -int uv__tcp_bind(uv_tcp_t* handle, - const struct sockaddr* addr, - unsigned int addrlen, - unsigned int flags) { - int err; - - err = uv_tcp_try_bind(handle, addr, addrlen, flags); - if (err) - return uv_translate_sys_error(err); - - return 0; -} - - -/* This function is an egress point, i.e. it returns libuv errors rather than - * system errors. - */ -int uv__tcp_connect(uv_connect_t* req, - uv_tcp_t* handle, - const struct sockaddr* addr, - unsigned int addrlen, - uv_connect_cb cb) { - int err; - - err = uv_tcp_try_connect(req, handle, addr, addrlen, cb); - if (err) - return uv_translate_sys_error(err); - - return 0; -} diff --git a/outside/libuv-v1.7.5/src/win/thread.c b/outside/libuv-v1.7.5/src/win/thread.c deleted file mode 100644 index 91684e938..000000000 --- a/outside/libuv-v1.7.5/src/win/thread.c +++ /dev/null @@ -1,697 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include -#include -#include - -#include "uv.h" -#include "internal.h" - - -#define HAVE_CONDVAR_API() (pInitializeConditionVariable != NULL) - -static int uv_cond_fallback_init(uv_cond_t* cond); -static void uv_cond_fallback_destroy(uv_cond_t* cond); -static void uv_cond_fallback_signal(uv_cond_t* cond); -static void uv_cond_fallback_broadcast(uv_cond_t* cond); -static void uv_cond_fallback_wait(uv_cond_t* cond, uv_mutex_t* mutex); -static int uv_cond_fallback_timedwait(uv_cond_t* cond, - uv_mutex_t* mutex, uint64_t timeout); - -static int uv_cond_condvar_init(uv_cond_t* cond); -static void uv_cond_condvar_destroy(uv_cond_t* cond); -static void uv_cond_condvar_signal(uv_cond_t* cond); -static void uv_cond_condvar_broadcast(uv_cond_t* cond); -static void uv_cond_condvar_wait(uv_cond_t* cond, uv_mutex_t* mutex); -static int uv_cond_condvar_timedwait(uv_cond_t* cond, - uv_mutex_t* mutex, uint64_t timeout); - - -static void uv__once_inner(uv_once_t* guard, void (*callback)(void)) { - DWORD result; - HANDLE existing_event, created_event; - - created_event = CreateEvent(NULL, 1, 0, NULL); - if (created_event == 0) { - /* Could fail in a low-memory situation? */ - uv_fatal_error(GetLastError(), "CreateEvent"); - } - - existing_event = InterlockedCompareExchangePointer(&guard->event, - created_event, - NULL); - - if (existing_event == NULL) { - /* We won the race */ - callback(); - - result = SetEvent(created_event); - assert(result); - guard->ran = 1; - - } else { - /* We lost the race. Destroy the event we created and wait for the */ - /* existing one to become signaled. */ - CloseHandle(created_event); - result = WaitForSingleObject(existing_event, INFINITE); - assert(result == WAIT_OBJECT_0); - } -} - - -void uv_once(uv_once_t* guard, void (*callback)(void)) { - /* Fast case - avoid WaitForSingleObject. */ - if (guard->ran) { - return; - } - - uv__once_inner(guard, callback); -} - - -/* Verify that uv_thread_t can be stored in a TLS slot. */ -STATIC_ASSERT(sizeof(uv_thread_t) <= sizeof(void*)); - -static uv_key_t uv__current_thread_key; -static uv_once_t uv__current_thread_init_guard = UV_ONCE_INIT; - - -static void uv__init_current_thread_key(void) { - if (uv_key_create(&uv__current_thread_key)) - abort(); -} - - -struct thread_ctx { - void (*entry)(void* arg); - void* arg; - uv_thread_t self; -}; - - -static UINT __stdcall uv__thread_start(void* arg) { - struct thread_ctx *ctx_p; - struct thread_ctx ctx; - - ctx_p = arg; - ctx = *ctx_p; - uv__free(ctx_p); - - uv_once(&uv__current_thread_init_guard, uv__init_current_thread_key); - uv_key_set(&uv__current_thread_key, (void*) ctx.self); - - ctx.entry(ctx.arg); - - return 0; -} - - -int uv_thread_create(uv_thread_t *tid, void (*entry)(void *arg), void *arg) { - struct thread_ctx* ctx; - int err; - HANDLE thread; - - ctx = uv__malloc(sizeof(*ctx)); - if (ctx == NULL) - return UV_ENOMEM; - - ctx->entry = entry; - ctx->arg = arg; - - /* Create the thread in suspended state so we have a chance to pass - * its own creation handle to it */ - thread = (HANDLE) _beginthreadex(NULL, - 0, - uv__thread_start, - ctx, - CREATE_SUSPENDED, - NULL); - if (thread == NULL) { - err = errno; - uv__free(ctx); - } else { - err = 0; - *tid = thread; - ctx->self = thread; - ResumeThread(thread); - } - - switch (err) { - case 0: - return 0; - case EACCES: - return UV_EACCES; - case EAGAIN: - return UV_EAGAIN; - case EINVAL: - return UV_EINVAL; - } - - return UV_EIO; -} - - -uv_thread_t uv_thread_self(void) { - uv_once(&uv__current_thread_init_guard, uv__init_current_thread_key); - return (uv_thread_t) uv_key_get(&uv__current_thread_key); -} - - -int uv_thread_join(uv_thread_t *tid) { - if (WaitForSingleObject(*tid, INFINITE)) - return uv_translate_sys_error(GetLastError()); - else { - CloseHandle(*tid); - *tid = 0; - return 0; - } -} - - -int uv_thread_equal(const uv_thread_t* t1, const uv_thread_t* t2) { - return *t1 == *t2; -} - - -int uv_mutex_init(uv_mutex_t* mutex) { - InitializeCriticalSection(mutex); - return 0; -} - - -void uv_mutex_destroy(uv_mutex_t* mutex) { - DeleteCriticalSection(mutex); -} - - -void uv_mutex_lock(uv_mutex_t* mutex) { - EnterCriticalSection(mutex); -} - - -int uv_mutex_trylock(uv_mutex_t* mutex) { - if (TryEnterCriticalSection(mutex)) - return 0; - else - return UV_EBUSY; -} - - -void uv_mutex_unlock(uv_mutex_t* mutex) { - LeaveCriticalSection(mutex); -} - - -int uv_rwlock_init(uv_rwlock_t* rwlock) { - /* Initialize the semaphore that acts as the write lock. */ - HANDLE handle = CreateSemaphoreW(NULL, 1, 1, NULL); - if (handle == NULL) - return uv_translate_sys_error(GetLastError()); - rwlock->state_.write_semaphore_ = handle; - - /* Initialize the critical section protecting the reader count. */ - InitializeCriticalSection(&rwlock->state_.num_readers_lock_); - - /* Initialize the reader count. */ - rwlock->state_.num_readers_ = 0; - - return 0; -} - - -void uv_rwlock_destroy(uv_rwlock_t* rwlock) { - DeleteCriticalSection(&rwlock->state_.num_readers_lock_); - CloseHandle(rwlock->state_.write_semaphore_); -} - - -void uv_rwlock_rdlock(uv_rwlock_t* rwlock) { - /* Acquire the lock that protects the reader count. */ - EnterCriticalSection(&rwlock->state_.num_readers_lock_); - - /* Increase the reader count, and lock for write if this is the first - * reader. - */ - if (++rwlock->state_.num_readers_ == 1) { - DWORD r = WaitForSingleObject(rwlock->state_.write_semaphore_, INFINITE); - if (r != WAIT_OBJECT_0) - uv_fatal_error(GetLastError(), "WaitForSingleObject"); - } - - /* Release the lock that protects the reader count. */ - LeaveCriticalSection(&rwlock->state_.num_readers_lock_); -} - - -int uv_rwlock_tryrdlock(uv_rwlock_t* rwlock) { - int err; - - if (!TryEnterCriticalSection(&rwlock->state_.num_readers_lock_)) - return UV_EBUSY; - - err = 0; - - if (rwlock->state_.num_readers_ == 0) { - /* Currently there are no other readers, which means that the write lock - * needs to be acquired. - */ - DWORD r = WaitForSingleObject(rwlock->state_.write_semaphore_, 0); - if (r == WAIT_OBJECT_0) - rwlock->state_.num_readers_++; - else if (r == WAIT_TIMEOUT) - err = UV_EBUSY; - else if (r == WAIT_FAILED) - uv_fatal_error(GetLastError(), "WaitForSingleObject"); - - } else { - /* The write lock has already been acquired because there are other - * active readers. - */ - rwlock->state_.num_readers_++; - } - - LeaveCriticalSection(&rwlock->state_.num_readers_lock_); - return err; -} - - -void uv_rwlock_rdunlock(uv_rwlock_t* rwlock) { - EnterCriticalSection(&rwlock->state_.num_readers_lock_); - - if (--rwlock->state_.num_readers_ == 0) { - if (!ReleaseSemaphore(rwlock->state_.write_semaphore_, 1, NULL)) - uv_fatal_error(GetLastError(), "ReleaseSemaphore"); - } - - LeaveCriticalSection(&rwlock->state_.num_readers_lock_); -} - - -void uv_rwlock_wrlock(uv_rwlock_t* rwlock) { - DWORD r = WaitForSingleObject(rwlock->state_.write_semaphore_, INFINITE); - if (r != WAIT_OBJECT_0) - uv_fatal_error(GetLastError(), "WaitForSingleObject"); -} - - -int uv_rwlock_trywrlock(uv_rwlock_t* rwlock) { - DWORD r = WaitForSingleObject(rwlock->state_.write_semaphore_, 0); - if (r == WAIT_OBJECT_0) - return 0; - else if (r == WAIT_TIMEOUT) - return UV_EBUSY; - else - uv_fatal_error(GetLastError(), "WaitForSingleObject"); -} - - -void uv_rwlock_wrunlock(uv_rwlock_t* rwlock) { - if (!ReleaseSemaphore(rwlock->state_.write_semaphore_, 1, NULL)) - uv_fatal_error(GetLastError(), "ReleaseSemaphore"); -} - - -int uv_sem_init(uv_sem_t* sem, unsigned int value) { - *sem = CreateSemaphore(NULL, value, INT_MAX, NULL); - if (*sem == NULL) - return uv_translate_sys_error(GetLastError()); - else - return 0; -} - - -void uv_sem_destroy(uv_sem_t* sem) { - if (!CloseHandle(*sem)) - abort(); -} - - -void uv_sem_post(uv_sem_t* sem) { - if (!ReleaseSemaphore(*sem, 1, NULL)) - abort(); -} - - -void uv_sem_wait(uv_sem_t* sem) { - if (WaitForSingleObject(*sem, INFINITE) != WAIT_OBJECT_0) - abort(); -} - - -int uv_sem_trywait(uv_sem_t* sem) { - DWORD r = WaitForSingleObject(*sem, 0); - - if (r == WAIT_OBJECT_0) - return 0; - - if (r == WAIT_TIMEOUT) - return UV_EAGAIN; - - abort(); - return -1; /* Satisfy the compiler. */ -} - - -/* This condition variable implementation is based on the SetEvent solution - * (section 3.2) at http://www.cs.wustl.edu/~schmidt/win32-cv-1.html - * We could not use the SignalObjectAndWait solution (section 3.4) because - * it want the 2nd argument (type uv_mutex_t) of uv_cond_wait() and - * uv_cond_timedwait() to be HANDLEs, but we use CRITICAL_SECTIONs. - */ - -static int uv_cond_fallback_init(uv_cond_t* cond) { - int err; - - /* Initialize the count to 0. */ - cond->fallback.waiters_count = 0; - - InitializeCriticalSection(&cond->fallback.waiters_count_lock); - - /* Create an auto-reset event. */ - cond->fallback.signal_event = CreateEvent(NULL, /* no security */ - FALSE, /* auto-reset event */ - FALSE, /* non-signaled initially */ - NULL); /* unnamed */ - if (!cond->fallback.signal_event) { - err = GetLastError(); - goto error2; - } - - /* Create a manual-reset event. */ - cond->fallback.broadcast_event = CreateEvent(NULL, /* no security */ - TRUE, /* manual-reset */ - FALSE, /* non-signaled */ - NULL); /* unnamed */ - if (!cond->fallback.broadcast_event) { - err = GetLastError(); - goto error; - } - - return 0; - -error: - CloseHandle(cond->fallback.signal_event); -error2: - DeleteCriticalSection(&cond->fallback.waiters_count_lock); - return uv_translate_sys_error(err); -} - - -static int uv_cond_condvar_init(uv_cond_t* cond) { - pInitializeConditionVariable(&cond->cond_var); - return 0; -} - - -int uv_cond_init(uv_cond_t* cond) { - uv__once_init(); - - if (HAVE_CONDVAR_API()) - return uv_cond_condvar_init(cond); - else - return uv_cond_fallback_init(cond); -} - - -static void uv_cond_fallback_destroy(uv_cond_t* cond) { - if (!CloseHandle(cond->fallback.broadcast_event)) - abort(); - if (!CloseHandle(cond->fallback.signal_event)) - abort(); - DeleteCriticalSection(&cond->fallback.waiters_count_lock); -} - - -static void uv_cond_condvar_destroy(uv_cond_t* cond) { - /* nothing to do */ -} - - -void uv_cond_destroy(uv_cond_t* cond) { - if (HAVE_CONDVAR_API()) - uv_cond_condvar_destroy(cond); - else - uv_cond_fallback_destroy(cond); -} - - -static void uv_cond_fallback_signal(uv_cond_t* cond) { - int have_waiters; - - /* Avoid race conditions. */ - EnterCriticalSection(&cond->fallback.waiters_count_lock); - have_waiters = cond->fallback.waiters_count > 0; - LeaveCriticalSection(&cond->fallback.waiters_count_lock); - - if (have_waiters) - SetEvent(cond->fallback.signal_event); -} - - -static void uv_cond_condvar_signal(uv_cond_t* cond) { - pWakeConditionVariable(&cond->cond_var); -} - - -void uv_cond_signal(uv_cond_t* cond) { - if (HAVE_CONDVAR_API()) - uv_cond_condvar_signal(cond); - else - uv_cond_fallback_signal(cond); -} - - -static void uv_cond_fallback_broadcast(uv_cond_t* cond) { - int have_waiters; - - /* Avoid race conditions. */ - EnterCriticalSection(&cond->fallback.waiters_count_lock); - have_waiters = cond->fallback.waiters_count > 0; - LeaveCriticalSection(&cond->fallback.waiters_count_lock); - - if (have_waiters) - SetEvent(cond->fallback.broadcast_event); -} - - -static void uv_cond_condvar_broadcast(uv_cond_t* cond) { - pWakeAllConditionVariable(&cond->cond_var); -} - - -void uv_cond_broadcast(uv_cond_t* cond) { - if (HAVE_CONDVAR_API()) - uv_cond_condvar_broadcast(cond); - else - uv_cond_fallback_broadcast(cond); -} - - -static int uv_cond_wait_helper(uv_cond_t* cond, uv_mutex_t* mutex, - DWORD dwMilliseconds) { - DWORD result; - int last_waiter; - HANDLE handles[2] = { - cond->fallback.signal_event, - cond->fallback.broadcast_event - }; - - /* Avoid race conditions. */ - EnterCriticalSection(&cond->fallback.waiters_count_lock); - cond->fallback.waiters_count++; - LeaveCriticalSection(&cond->fallback.waiters_count_lock); - - /* It's ok to release the here since Win32 manual-reset events */ - /* maintain state when used with . This avoids the "lost wakeup" */ - /* bug. */ - uv_mutex_unlock(mutex); - - /* Wait for either event to become signaled due to being */ - /* called or being called. */ - result = WaitForMultipleObjects(2, handles, FALSE, dwMilliseconds); - - EnterCriticalSection(&cond->fallback.waiters_count_lock); - cond->fallback.waiters_count--; - last_waiter = result == WAIT_OBJECT_0 + 1 - && cond->fallback.waiters_count == 0; - LeaveCriticalSection(&cond->fallback.waiters_count_lock); - - /* Some thread called . */ - if (last_waiter) { - /* We're the last waiter to be notified or to stop waiting, so reset the */ - /* the manual-reset event. */ - ResetEvent(cond->fallback.broadcast_event); - } - - /* Reacquire the . */ - uv_mutex_lock(mutex); - - if (result == WAIT_OBJECT_0 || result == WAIT_OBJECT_0 + 1) - return 0; - - if (result == WAIT_TIMEOUT) - return UV_ETIMEDOUT; - - abort(); - return -1; /* Satisfy the compiler. */ -} - - -static void uv_cond_fallback_wait(uv_cond_t* cond, uv_mutex_t* mutex) { - if (uv_cond_wait_helper(cond, mutex, INFINITE)) - abort(); -} - - -static void uv_cond_condvar_wait(uv_cond_t* cond, uv_mutex_t* mutex) { - if (!pSleepConditionVariableCS(&cond->cond_var, mutex, INFINITE)) - abort(); -} - - -void uv_cond_wait(uv_cond_t* cond, uv_mutex_t* mutex) { - if (HAVE_CONDVAR_API()) - uv_cond_condvar_wait(cond, mutex); - else - uv_cond_fallback_wait(cond, mutex); -} - - -static int uv_cond_fallback_timedwait(uv_cond_t* cond, - uv_mutex_t* mutex, uint64_t timeout) { - return uv_cond_wait_helper(cond, mutex, (DWORD)(timeout / 1e6)); -} - - -static int uv_cond_condvar_timedwait(uv_cond_t* cond, - uv_mutex_t* mutex, uint64_t timeout) { - if (pSleepConditionVariableCS(&cond->cond_var, mutex, (DWORD)(timeout / 1e6))) - return 0; - if (GetLastError() != ERROR_TIMEOUT) - abort(); - return UV_ETIMEDOUT; -} - - -int uv_cond_timedwait(uv_cond_t* cond, uv_mutex_t* mutex, - uint64_t timeout) { - if (HAVE_CONDVAR_API()) - return uv_cond_condvar_timedwait(cond, mutex, timeout); - else - return uv_cond_fallback_timedwait(cond, mutex, timeout); -} - - -int uv_barrier_init(uv_barrier_t* barrier, unsigned int count) { - int err; - - barrier->n = count; - barrier->count = 0; - - err = uv_mutex_init(&barrier->mutex); - if (err) - return err; - - err = uv_sem_init(&barrier->turnstile1, 0); - if (err) - goto error2; - - err = uv_sem_init(&barrier->turnstile2, 1); - if (err) - goto error; - - return 0; - -error: - uv_sem_destroy(&barrier->turnstile1); -error2: - uv_mutex_destroy(&barrier->mutex); - return err; - -} - - -void uv_barrier_destroy(uv_barrier_t* barrier) { - uv_sem_destroy(&barrier->turnstile2); - uv_sem_destroy(&barrier->turnstile1); - uv_mutex_destroy(&barrier->mutex); -} - - -int uv_barrier_wait(uv_barrier_t* barrier) { - int serial_thread; - - uv_mutex_lock(&barrier->mutex); - if (++barrier->count == barrier->n) { - uv_sem_wait(&barrier->turnstile2); - uv_sem_post(&barrier->turnstile1); - } - uv_mutex_unlock(&barrier->mutex); - - uv_sem_wait(&barrier->turnstile1); - uv_sem_post(&barrier->turnstile1); - - uv_mutex_lock(&barrier->mutex); - serial_thread = (--barrier->count == 0); - if (serial_thread) { - uv_sem_wait(&barrier->turnstile1); - uv_sem_post(&barrier->turnstile2); - } - uv_mutex_unlock(&barrier->mutex); - - uv_sem_wait(&barrier->turnstile2); - uv_sem_post(&barrier->turnstile2); - return serial_thread; -} - - -int uv_key_create(uv_key_t* key) { - key->tls_index = TlsAlloc(); - if (key->tls_index == TLS_OUT_OF_INDEXES) - return UV_ENOMEM; - return 0; -} - - -void uv_key_delete(uv_key_t* key) { - if (TlsFree(key->tls_index) == FALSE) - abort(); - key->tls_index = TLS_OUT_OF_INDEXES; -} - - -void* uv_key_get(uv_key_t* key) { - void* value; - - value = TlsGetValue(key->tls_index); - if (value == NULL) - if (GetLastError() != ERROR_SUCCESS) - abort(); - - return value; -} - - -void uv_key_set(uv_key_t* key, void* value) { - if (TlsSetValue(key->tls_index, value) == FALSE) - abort(); -} diff --git a/outside/libuv-v1.7.5/src/win/timer.c b/outside/libuv-v1.7.5/src/win/timer.c deleted file mode 100644 index 0da541a2c..000000000 --- a/outside/libuv-v1.7.5/src/win/timer.c +++ /dev/null @@ -1,200 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include -#include - -#include "uv.h" -#include "internal.h" -#include "tree.h" -#include "handle-inl.h" - - -/* The number of milliseconds in one second. */ -#define UV__MILLISEC 1000 - - -void uv_update_time(uv_loop_t* loop) { - uint64_t new_time = uv__hrtime(UV__MILLISEC); - if (new_time > loop->time) { - loop->time = new_time; - } -} - -void uv__time_forward(uv_loop_t* loop, uint64_t msecs) { - loop->time += msecs; -} - - -static int uv_timer_compare(uv_timer_t* a, uv_timer_t* b) { - if (a->due < b->due) - return -1; - if (a->due > b->due) - return 1; - /* - * compare start_id when both has the same due. start_id is - * allocated with loop->timer_counter in uv_timer_start(). - */ - if (a->start_id < b->start_id) - return -1; - if (a->start_id > b->start_id) - return 1; - return 0; -} - - -RB_GENERATE_STATIC(uv_timer_tree_s, uv_timer_s, tree_entry, uv_timer_compare); - - -int uv_timer_init(uv_loop_t* loop, uv_timer_t* handle) { - uv__handle_init(loop, (uv_handle_t*) handle, UV_TIMER); - handle->timer_cb = NULL; - handle->repeat = 0; - - return 0; -} - - -void uv_timer_endgame(uv_loop_t* loop, uv_timer_t* handle) { - if (handle->flags & UV__HANDLE_CLOSING) { - assert(!(handle->flags & UV_HANDLE_CLOSED)); - uv__handle_close(handle); - } -} - - -static uint64_t get_clamped_due_time(uint64_t loop_time, uint64_t timeout) { - uint64_t clamped_timeout; - - clamped_timeout = loop_time + timeout; - if (clamped_timeout < timeout) - clamped_timeout = (uint64_t) -1; - - return clamped_timeout; -} - - -int uv_timer_start(uv_timer_t* handle, uv_timer_cb timer_cb, uint64_t timeout, - uint64_t repeat) { - uv_loop_t* loop = handle->loop; - uv_timer_t* old; - - if (timer_cb == NULL) - return UV_EINVAL; - - if (uv__is_active(handle)) - uv_timer_stop(handle); - - handle->timer_cb = timer_cb; - handle->due = get_clamped_due_time(loop->time, timeout); - handle->repeat = repeat; - uv__handle_start(handle); - - /* start_id is the second index to be compared in uv__timer_cmp() */ - handle->start_id = handle->loop->timer_counter++; - - old = RB_INSERT(uv_timer_tree_s, &loop->timers, handle); - assert(old == NULL); - - return 0; -} - - -int uv_timer_stop(uv_timer_t* handle) { - uv_loop_t* loop = handle->loop; - - if (!uv__is_active(handle)) - return 0; - - RB_REMOVE(uv_timer_tree_s, &loop->timers, handle); - uv__handle_stop(handle); - - return 0; -} - - -int uv_timer_again(uv_timer_t* handle) { - /* If timer_cb is NULL that means that the timer was never started. */ - if (!handle->timer_cb) { - return UV_EINVAL; - } - - if (handle->repeat) { - uv_timer_stop(handle); - uv_timer_start(handle, handle->timer_cb, handle->repeat, handle->repeat); - } - - return 0; -} - - -void uv_timer_set_repeat(uv_timer_t* handle, uint64_t repeat) { - assert(handle->type == UV_TIMER); - handle->repeat = repeat; -} - - -uint64_t uv_timer_get_repeat(const uv_timer_t* handle) { - assert(handle->type == UV_TIMER); - return handle->repeat; -} - - -DWORD uv__next_timeout(const uv_loop_t* loop) { - uv_timer_t* timer; - int64_t delta; - - /* Check if there are any running timers - * Need to cast away const first, since RB_MIN doesn't know what we are - * going to do with this return value, it can't be marked const - */ - timer = RB_MIN(uv_timer_tree_s, &((uv_loop_t*)loop)->timers); - if (timer) { - delta = timer->due - loop->time; - if (delta >= UINT_MAX - 1) { - /* A timeout value of UINT_MAX means infinite, so that's no good. */ - return UINT_MAX - 1; - } else if (delta < 0) { - /* Negative timeout values are not allowed */ - return 0; - } else { - return (DWORD)delta; - } - } else { - /* No timers */ - return INFINITE; - } -} - - -void uv_process_timers(uv_loop_t* loop) { - uv_timer_t* timer; - - /* Call timer callbacks */ - for (timer = RB_MIN(uv_timer_tree_s, &loop->timers); - timer != NULL && timer->due <= loop->time; - timer = RB_MIN(uv_timer_tree_s, &loop->timers)) { - - uv_timer_stop(timer); - uv_timer_again(timer); - timer->timer_cb((uv_timer_t*) timer); - } -} diff --git a/outside/libuv-v1.7.5/src/win/tty.c b/outside/libuv-v1.7.5/src/win/tty.c deleted file mode 100644 index b40bb4271..000000000 --- a/outside/libuv-v1.7.5/src/win/tty.c +++ /dev/null @@ -1,2084 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include -#include -#include -#include - -#if defined(_MSC_VER) && _MSC_VER < 1600 -# include "stdint-msvc2008.h" -#else -# include -#endif - -#ifndef COMMON_LVB_REVERSE_VIDEO -# define COMMON_LVB_REVERSE_VIDEO 0x4000 -#endif - -#include "uv.h" -#include "internal.h" -#include "handle-inl.h" -#include "stream-inl.h" -#include "req-inl.h" - - -#define UNICODE_REPLACEMENT_CHARACTER (0xfffd) - -#define ANSI_NORMAL 0x00 -#define ANSI_ESCAPE_SEEN 0x02 -#define ANSI_CSI 0x04 -#define ANSI_ST_CONTROL 0x08 -#define ANSI_IGNORE 0x10 -#define ANSI_IN_ARG 0x20 -#define ANSI_IN_STRING 0x40 -#define ANSI_BACKSLASH_SEEN 0x80 - -#define MAX_INPUT_BUFFER_LENGTH 8192 - - -static void uv_tty_capture_initial_style(CONSOLE_SCREEN_BUFFER_INFO* info); -static void uv_tty_update_virtual_window(CONSOLE_SCREEN_BUFFER_INFO* info); - - -/* Null uv_buf_t */ -static const uv_buf_t uv_null_buf_ = { 0, NULL }; - - -/* - * The console virtual window. - * - * Normally cursor movement in windows is relative to the console screen buffer, - * e.g. the application is allowed to overwrite the 'history'. This is very - * inconvenient, it makes absolute cursor movement pretty useless. There is - * also the concept of 'client rect' which is defined by the actual size of - * the console window and the scroll position of the screen buffer, but it's - * very volatile because it changes when the user scrolls. - * - * To make cursor movement behave sensibly we define a virtual window to which - * cursor movement is confined. The virtual window is always as wide as the - * console screen buffer, but it's height is defined by the size of the - * console window. The top of the virtual window aligns with the position - * of the caret when the first stdout/err handle is created, unless that would - * mean that it would extend beyond the bottom of the screen buffer - in that - * that case it's located as far down as possible. - * - * When the user writes a long text or many newlines, such that the output - * reaches beyond the bottom of the virtual window, the virtual window is - * shifted downwards, but not resized. - * - * Since all tty i/o happens on the same console, this window is shared - * between all stdout/stderr handles. - */ - -static int uv_tty_virtual_offset = -1; -static int uv_tty_virtual_height = -1; -static int uv_tty_virtual_width = -1; - -static CRITICAL_SECTION uv_tty_output_lock; - -static HANDLE uv_tty_output_handle = INVALID_HANDLE_VALUE; - -static WORD uv_tty_default_text_attributes = - FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE; - -static char uv_tty_default_fg_color = 7; -static char uv_tty_default_bg_color = 0; -static char uv_tty_default_fg_bright = 0; -static char uv_tty_default_bg_bright = 0; -static char uv_tty_default_inverse = 0; - - -void uv_console_init() { - InitializeCriticalSection(&uv_tty_output_lock); -} - - -int uv_tty_init(uv_loop_t* loop, uv_tty_t* tty, uv_file fd, int readable) { - HANDLE handle; - CONSOLE_SCREEN_BUFFER_INFO screen_buffer_info; - - handle = (HANDLE) uv__get_osfhandle(fd); - if (handle == INVALID_HANDLE_VALUE) - return UV_EBADF; - - if (fd <= 2) { - /* In order to avoid closing a stdio file descriptor 0-2, duplicate the - * underlying OS handle and forget about the original fd. - * We could also opt to use the original OS handle and just never close it, - * but then there would be no reliable way to cancel pending read operations - * upon close. - */ - if (!DuplicateHandle(INVALID_HANDLE_VALUE, - handle, - INVALID_HANDLE_VALUE, - &handle, - 0, - FALSE, - DUPLICATE_SAME_ACCESS)) - return uv_translate_sys_error(GetLastError()); - fd = -1; - } - - if (!readable) { - /* Obtain the screen buffer info with the output handle. */ - if (!GetConsoleScreenBufferInfo(handle, &screen_buffer_info)) { - return uv_translate_sys_error(GetLastError()); - } - - /* Obtain the the tty_output_lock because the virtual window state is */ - /* shared between all uv_tty_t handles. */ - EnterCriticalSection(&uv_tty_output_lock); - - /* Store the global tty output handle. This handle is used by TTY read */ - /* streams to update the virtual window when a CONSOLE_BUFFER_SIZE_EVENT */ - /* is received. */ - uv_tty_output_handle = handle; - - /* Remember the original console text attributes. */ - uv_tty_capture_initial_style(&screen_buffer_info); - - uv_tty_update_virtual_window(&screen_buffer_info); - - LeaveCriticalSection(&uv_tty_output_lock); - } - - - uv_stream_init(loop, (uv_stream_t*) tty, UV_TTY); - uv_connection_init((uv_stream_t*) tty); - - tty->handle = handle; - tty->u.fd = fd; - tty->reqs_pending = 0; - tty->flags |= UV_HANDLE_BOUND; - - if (readable) { - /* Initialize TTY input specific fields. */ - tty->flags |= UV_HANDLE_TTY_READABLE | UV_HANDLE_READABLE; - tty->tty.rd.read_line_handle = NULL; - tty->tty.rd.read_line_buffer = uv_null_buf_; - tty->tty.rd.read_raw_wait = NULL; - - /* Init keycode-to-vt100 mapper state. */ - tty->tty.rd.last_key_len = 0; - tty->tty.rd.last_key_offset = 0; - tty->tty.rd.last_utf16_high_surrogate = 0; - memset(&tty->tty.rd.last_input_record, 0, sizeof tty->tty.rd.last_input_record); - } else { - /* TTY output specific fields. */ - tty->flags |= UV_HANDLE_WRITABLE; - - /* Init utf8-to-utf16 conversion state. */ - tty->tty.wr.utf8_bytes_left = 0; - tty->tty.wr.utf8_codepoint = 0; - - /* Initialize eol conversion state */ - tty->tty.wr.previous_eol = 0; - - /* Init ANSI parser state. */ - tty->tty.wr.ansi_parser_state = ANSI_NORMAL; - } - - return 0; -} - - -/* Set the default console text attributes based on how the console was - * configured when libuv started. - */ -static void uv_tty_capture_initial_style(CONSOLE_SCREEN_BUFFER_INFO* info) { - static int style_captured = 0; - - /* Only do this once. - /* Assumption: Caller has acquired uv_tty_output_lock. */ - if (style_captured) - return; - - /* Save raw win32 attributes. */ - uv_tty_default_text_attributes = info->wAttributes; - - /* Convert black text on black background to use white text. */ - if (uv_tty_default_text_attributes == 0) - uv_tty_default_text_attributes = 7; - - /* Convert Win32 attributes to ANSI colors. */ - uv_tty_default_fg_color = 0; - uv_tty_default_bg_color = 0; - uv_tty_default_fg_bright = 0; - uv_tty_default_bg_bright = 0; - uv_tty_default_inverse = 0; - - if (uv_tty_default_text_attributes & FOREGROUND_RED) - uv_tty_default_fg_color |= 1; - - if (uv_tty_default_text_attributes & FOREGROUND_GREEN) - uv_tty_default_fg_color |= 2; - - if (uv_tty_default_text_attributes & FOREGROUND_BLUE) - uv_tty_default_fg_color |= 4; - - if (uv_tty_default_text_attributes & BACKGROUND_RED) - uv_tty_default_bg_color |= 1; - - if (uv_tty_default_text_attributes & BACKGROUND_GREEN) - uv_tty_default_bg_color |= 2; - - if (uv_tty_default_text_attributes & BACKGROUND_BLUE) - uv_tty_default_bg_color |= 4; - - if (uv_tty_default_text_attributes & FOREGROUND_INTENSITY) - uv_tty_default_fg_bright = 1; - - if (uv_tty_default_text_attributes & BACKGROUND_INTENSITY) - uv_tty_default_bg_bright = 1; - - if (uv_tty_default_text_attributes & COMMON_LVB_REVERSE_VIDEO) - uv_tty_default_inverse = 1; - - style_captured = 1; -} - - -int uv_tty_set_mode(uv_tty_t* tty, uv_tty_mode_t mode) { - DWORD flags; - unsigned char was_reading; - uv_alloc_cb alloc_cb; - uv_read_cb read_cb; - int err; - - if (!(tty->flags & UV_HANDLE_TTY_READABLE)) { - return UV_EINVAL; - } - - if (!!mode == !!(tty->flags & UV_HANDLE_TTY_RAW)) { - return 0; - } - - switch (mode) { - case UV_TTY_MODE_NORMAL: - flags = ENABLE_ECHO_INPUT | ENABLE_LINE_INPUT | ENABLE_PROCESSED_INPUT; - break; - case UV_TTY_MODE_RAW: - flags = ENABLE_WINDOW_INPUT; - break; - case UV_TTY_MODE_IO: - return UV_ENOTSUP; - } - - if (!SetConsoleMode(tty->handle, flags)) { - return uv_translate_sys_error(GetLastError()); - } - - /* If currently reading, stop, and restart reading. */ - if (tty->flags & UV_HANDLE_READING) { - was_reading = 1; - alloc_cb = tty->alloc_cb; - read_cb = tty->read_cb; - - if (was_reading) { - err = uv_tty_read_stop(tty); - if (err) { - return uv_translate_sys_error(err); - } - } - } else { - was_reading = 0; - } - - /* Update flag. */ - tty->flags &= ~UV_HANDLE_TTY_RAW; - tty->flags |= mode ? UV_HANDLE_TTY_RAW : 0; - - /* If we just stopped reading, restart. */ - if (was_reading) { - err = uv_tty_read_start(tty, alloc_cb, read_cb); - if (err) { - return uv_translate_sys_error(err); - } - } - - return 0; -} - - -int uv_is_tty(uv_file file) { - DWORD result; - return GetConsoleMode((HANDLE) _get_osfhandle(file), &result) != 0; -} - - -int uv_tty_get_winsize(uv_tty_t* tty, int* width, int* height) { - CONSOLE_SCREEN_BUFFER_INFO info; - - if (!GetConsoleScreenBufferInfo(tty->handle, &info)) { - return uv_translate_sys_error(GetLastError()); - } - - EnterCriticalSection(&uv_tty_output_lock); - uv_tty_update_virtual_window(&info); - LeaveCriticalSection(&uv_tty_output_lock); - - *width = uv_tty_virtual_width; - *height = uv_tty_virtual_height; - - return 0; -} - - -static void CALLBACK uv_tty_post_raw_read(void* data, BOOLEAN didTimeout) { - uv_loop_t* loop; - uv_tty_t* handle; - uv_req_t* req; - - assert(data); - assert(!didTimeout); - - req = (uv_req_t*) data; - handle = (uv_tty_t*) req->data; - loop = handle->loop; - - UnregisterWait(handle->tty.rd.read_raw_wait); - handle->tty.rd.read_raw_wait = NULL; - - SET_REQ_SUCCESS(req); - POST_COMPLETION_FOR_REQ(loop, req); -} - - -static void uv_tty_queue_read_raw(uv_loop_t* loop, uv_tty_t* handle) { - uv_read_t* req; - BOOL r; - - assert(handle->flags & UV_HANDLE_READING); - assert(!(handle->flags & UV_HANDLE_READ_PENDING)); - - assert(handle->handle && handle->handle != INVALID_HANDLE_VALUE); - - handle->tty.rd.read_line_buffer = uv_null_buf_; - - req = &handle->read_req; - memset(&req->u.io.overlapped, 0, sizeof(req->u.io.overlapped)); - - r = RegisterWaitForSingleObject(&handle->tty.rd.read_raw_wait, - handle->handle, - uv_tty_post_raw_read, - (void*) req, - INFINITE, - WT_EXECUTEINWAITTHREAD | WT_EXECUTEONLYONCE); - if (!r) { - handle->tty.rd.read_raw_wait = NULL; - SET_REQ_ERROR(req, GetLastError()); - uv_insert_pending_req(loop, (uv_req_t*)req); - } - - handle->flags |= UV_HANDLE_READ_PENDING; - handle->reqs_pending++; -} - - -static DWORD CALLBACK uv_tty_line_read_thread(void* data) { - uv_loop_t* loop; - uv_tty_t* handle; - uv_req_t* req; - DWORD bytes, read_bytes; - WCHAR utf16[MAX_INPUT_BUFFER_LENGTH / 3]; - DWORD chars, read_chars; - - assert(data); - - req = (uv_req_t*) data; - handle = (uv_tty_t*) req->data; - loop = handle->loop; - - assert(handle->tty.rd.read_line_buffer.base != NULL); - assert(handle->tty.rd.read_line_buffer.len > 0); - - /* ReadConsole can't handle big buffers. */ - if (handle->tty.rd.read_line_buffer.len < MAX_INPUT_BUFFER_LENGTH) { - bytes = handle->tty.rd.read_line_buffer.len; - } else { - bytes = MAX_INPUT_BUFFER_LENGTH; - } - - /* At last, unicode! */ - /* One utf-16 codeunit never takes more than 3 utf-8 codeunits to encode */ - chars = bytes / 3; - - if (ReadConsoleW(handle->tty.rd.read_line_handle, - (void*) utf16, - chars, - &read_chars, - NULL)) { - read_bytes = WideCharToMultiByte(CP_UTF8, - 0, - utf16, - read_chars, - handle->tty.rd.read_line_buffer.base, - bytes, - NULL, - NULL); - SET_REQ_SUCCESS(req); - req->u.io.overlapped.InternalHigh = read_bytes; - } else { - SET_REQ_ERROR(req, GetLastError()); - } - - POST_COMPLETION_FOR_REQ(loop, req); - return 0; -} - - -static void uv_tty_queue_read_line(uv_loop_t* loop, uv_tty_t* handle) { - uv_read_t* req; - BOOL r; - - assert(handle->flags & UV_HANDLE_READING); - assert(!(handle->flags & UV_HANDLE_READ_PENDING)); - assert(handle->handle && handle->handle != INVALID_HANDLE_VALUE); - - req = &handle->read_req; - memset(&req->u.io.overlapped, 0, sizeof(req->u.io.overlapped)); - - handle->alloc_cb((uv_handle_t*) handle, 8192, &handle->tty.rd.read_line_buffer); - if (handle->tty.rd.read_line_buffer.len == 0) { - handle->read_cb((uv_stream_t*) handle, - UV_ENOBUFS, - &handle->tty.rd.read_line_buffer); - return; - } - assert(handle->tty.rd.read_line_buffer.base != NULL); - - /* Duplicate the console handle, so if we want to cancel the read, we can */ - /* just close this handle duplicate. */ - if (handle->tty.rd.read_line_handle == NULL) { - HANDLE this_process = GetCurrentProcess(); - r = DuplicateHandle(this_process, - handle->handle, - this_process, - &handle->tty.rd.read_line_handle, - 0, - 0, - DUPLICATE_SAME_ACCESS); - if (!r) { - handle->tty.rd.read_line_handle = NULL; - SET_REQ_ERROR(req, GetLastError()); - uv_insert_pending_req(loop, (uv_req_t*)req); - goto out; - } - } - - r = QueueUserWorkItem(uv_tty_line_read_thread, - (void*) req, - WT_EXECUTELONGFUNCTION); - if (!r) { - SET_REQ_ERROR(req, GetLastError()); - uv_insert_pending_req(loop, (uv_req_t*)req); - } - - out: - handle->flags |= UV_HANDLE_READ_PENDING; - handle->reqs_pending++; -} - - -static void uv_tty_queue_read(uv_loop_t* loop, uv_tty_t* handle) { - if (handle->flags & UV_HANDLE_TTY_RAW) { - uv_tty_queue_read_raw(loop, handle); - } else { - uv_tty_queue_read_line(loop, handle); - } -} - - -static const char* get_vt100_fn_key(DWORD code, char shift, char ctrl, - size_t* len) { -#define VK_CASE(vk, normal_str, shift_str, ctrl_str, shift_ctrl_str) \ - case (vk): \ - if (shift && ctrl) { \ - *len = sizeof shift_ctrl_str; \ - return "\033" shift_ctrl_str; \ - } else if (shift) { \ - *len = sizeof shift_str ; \ - return "\033" shift_str; \ - } else if (ctrl) { \ - *len = sizeof ctrl_str; \ - return "\033" ctrl_str; \ - } else { \ - *len = sizeof normal_str; \ - return "\033" normal_str; \ - } - - switch (code) { - /* These mappings are the same as Cygwin's. Unmodified and alt-modified */ - /* keypad keys comply with linux console, modifiers comply with xterm */ - /* modifier usage. F1..f12 and shift-f1..f10 comply with linux console, */ - /* f6..f12 with and without modifiers comply with rxvt. */ - VK_CASE(VK_INSERT, "[2~", "[2;2~", "[2;5~", "[2;6~") - VK_CASE(VK_END, "[4~", "[4;2~", "[4;5~", "[4;6~") - VK_CASE(VK_DOWN, "[B", "[1;2B", "[1;5B", "[1;6B") - VK_CASE(VK_NEXT, "[6~", "[6;2~", "[6;5~", "[6;6~") - VK_CASE(VK_LEFT, "[D", "[1;2D", "[1;5D", "[1;6D") - VK_CASE(VK_CLEAR, "[G", "[1;2G", "[1;5G", "[1;6G") - VK_CASE(VK_RIGHT, "[C", "[1;2C", "[1;5C", "[1;6C") - VK_CASE(VK_UP, "[A", "[1;2A", "[1;5A", "[1;6A") - VK_CASE(VK_HOME, "[1~", "[1;2~", "[1;5~", "[1;6~") - VK_CASE(VK_PRIOR, "[5~", "[5;2~", "[5;5~", "[5;6~") - VK_CASE(VK_DELETE, "[3~", "[3;2~", "[3;5~", "[3;6~") - VK_CASE(VK_NUMPAD0, "[2~", "[2;2~", "[2;5~", "[2;6~") - VK_CASE(VK_NUMPAD1, "[4~", "[4;2~", "[4;5~", "[4;6~") - VK_CASE(VK_NUMPAD2, "[B", "[1;2B", "[1;5B", "[1;6B") - VK_CASE(VK_NUMPAD3, "[6~", "[6;2~", "[6;5~", "[6;6~") - VK_CASE(VK_NUMPAD4, "[D", "[1;2D", "[1;5D", "[1;6D") - VK_CASE(VK_NUMPAD5, "[G", "[1;2G", "[1;5G", "[1;6G") - VK_CASE(VK_NUMPAD6, "[C", "[1;2C", "[1;5C", "[1;6C") - VK_CASE(VK_NUMPAD7, "[A", "[1;2A", "[1;5A", "[1;6A") - VK_CASE(VK_NUMPAD8, "[1~", "[1;2~", "[1;5~", "[1;6~") - VK_CASE(VK_NUMPAD9, "[5~", "[5;2~", "[5;5~", "[5;6~") - VK_CASE(VK_DECIMAL, "[3~", "[3;2~", "[3;5~", "[3;6~") - VK_CASE(VK_F1, "[[A", "[23~", "[11^", "[23^" ) - VK_CASE(VK_F2, "[[B", "[24~", "[12^", "[24^" ) - VK_CASE(VK_F3, "[[C", "[25~", "[13^", "[25^" ) - VK_CASE(VK_F4, "[[D", "[26~", "[14^", "[26^" ) - VK_CASE(VK_F5, "[[E", "[28~", "[15^", "[28^" ) - VK_CASE(VK_F6, "[17~", "[29~", "[17^", "[29^" ) - VK_CASE(VK_F7, "[18~", "[31~", "[18^", "[31^" ) - VK_CASE(VK_F8, "[19~", "[32~", "[19^", "[32^" ) - VK_CASE(VK_F9, "[20~", "[33~", "[20^", "[33^" ) - VK_CASE(VK_F10, "[21~", "[34~", "[21^", "[34^" ) - VK_CASE(VK_F11, "[23~", "[23$", "[23^", "[23@" ) - VK_CASE(VK_F12, "[24~", "[24$", "[24^", "[24@" ) - - default: - *len = 0; - return NULL; - } -#undef VK_CASE -} - - -void uv_process_tty_read_raw_req(uv_loop_t* loop, uv_tty_t* handle, - uv_req_t* req) { - /* Shortcut for handle->tty.rd.last_input_record.Event.KeyEvent. */ -#define KEV handle->tty.rd.last_input_record.Event.KeyEvent - - DWORD records_left, records_read; - uv_buf_t buf; - off_t buf_used; - - assert(handle->type == UV_TTY); - assert(handle->flags & UV_HANDLE_TTY_READABLE); - handle->flags &= ~UV_HANDLE_READ_PENDING; - - if (!(handle->flags & UV_HANDLE_READING) || - !(handle->flags & UV_HANDLE_TTY_RAW)) { - goto out; - } - - if (!REQ_SUCCESS(req)) { - /* An error occurred while waiting for the event. */ - if ((handle->flags & UV_HANDLE_READING)) { - handle->flags &= ~UV_HANDLE_READING; - handle->read_cb((uv_stream_t*)handle, - uv_translate_sys_error(GET_REQ_ERROR(req)), - &uv_null_buf_); - } - goto out; - } - - /* Fetch the number of events */ - if (!GetNumberOfConsoleInputEvents(handle->handle, &records_left)) { - handle->flags &= ~UV_HANDLE_READING; - DECREASE_ACTIVE_COUNT(loop, handle); - handle->read_cb((uv_stream_t*)handle, - uv_translate_sys_error(GetLastError()), - &uv_null_buf_); - goto out; - } - - /* Windows sends a lot of events that we're not interested in, so buf */ - /* will be allocated on demand, when there's actually something to emit. */ - buf = uv_null_buf_; - buf_used = 0; - - while ((records_left > 0 || handle->tty.rd.last_key_len > 0) && - (handle->flags & UV_HANDLE_READING)) { - if (handle->tty.rd.last_key_len == 0) { - /* Read the next input record */ - if (!ReadConsoleInputW(handle->handle, - &handle->tty.rd.last_input_record, - 1, - &records_read)) { - handle->flags &= ~UV_HANDLE_READING; - DECREASE_ACTIVE_COUNT(loop, handle); - handle->read_cb((uv_stream_t*) handle, - uv_translate_sys_error(GetLastError()), - &buf); - goto out; - } - records_left--; - - /* If the window was resized, recompute the virtual window size. This */ - /* will trigger a SIGWINCH signal if the window size changed in an */ - /* way that matters to libuv. */ - if (handle->tty.rd.last_input_record.EventType == WINDOW_BUFFER_SIZE_EVENT) { - CONSOLE_SCREEN_BUFFER_INFO info; - - EnterCriticalSection(&uv_tty_output_lock); - - if (uv_tty_output_handle != INVALID_HANDLE_VALUE && - GetConsoleScreenBufferInfo(uv_tty_output_handle, &info)) { - uv_tty_update_virtual_window(&info); - } - - LeaveCriticalSection(&uv_tty_output_lock); - - continue; - } - - /* Ignore other events that are not key or resize events. */ - if (handle->tty.rd.last_input_record.EventType != KEY_EVENT) { - continue; - } - - /* Ignore keyup events, unless the left alt key was held and a valid */ - /* unicode character was emitted. */ - if (!KEV.bKeyDown && !(((KEV.dwControlKeyState & LEFT_ALT_PRESSED) || - KEV.wVirtualKeyCode==VK_MENU) && KEV.uChar.UnicodeChar != 0)) { - continue; - } - - /* Ignore keypresses to numpad number keys if the left alt is held */ - /* because the user is composing a character, or windows simulating */ - /* this. */ - if ((KEV.dwControlKeyState & LEFT_ALT_PRESSED) && - !(KEV.dwControlKeyState & ENHANCED_KEY) && - (KEV.wVirtualKeyCode == VK_INSERT || - KEV.wVirtualKeyCode == VK_END || - KEV.wVirtualKeyCode == VK_DOWN || - KEV.wVirtualKeyCode == VK_NEXT || - KEV.wVirtualKeyCode == VK_LEFT || - KEV.wVirtualKeyCode == VK_CLEAR || - KEV.wVirtualKeyCode == VK_RIGHT || - KEV.wVirtualKeyCode == VK_HOME || - KEV.wVirtualKeyCode == VK_UP || - KEV.wVirtualKeyCode == VK_PRIOR || - KEV.wVirtualKeyCode == VK_NUMPAD0 || - KEV.wVirtualKeyCode == VK_NUMPAD1 || - KEV.wVirtualKeyCode == VK_NUMPAD2 || - KEV.wVirtualKeyCode == VK_NUMPAD3 || - KEV.wVirtualKeyCode == VK_NUMPAD4 || - KEV.wVirtualKeyCode == VK_NUMPAD5 || - KEV.wVirtualKeyCode == VK_NUMPAD6 || - KEV.wVirtualKeyCode == VK_NUMPAD7 || - KEV.wVirtualKeyCode == VK_NUMPAD8 || - KEV.wVirtualKeyCode == VK_NUMPAD9)) { - continue; - } - - if (KEV.uChar.UnicodeChar != 0) { - int prefix_len, char_len; - - /* Character key pressed */ - if (KEV.uChar.UnicodeChar >= 0xD800 && - KEV.uChar.UnicodeChar < 0xDC00) { - /* UTF-16 high surrogate */ - handle->tty.rd.last_utf16_high_surrogate = KEV.uChar.UnicodeChar; - continue; - } - - /* Prefix with \u033 if alt was held, but alt was not used as part */ - /* a compose sequence. */ - if ((KEV.dwControlKeyState & (LEFT_ALT_PRESSED | RIGHT_ALT_PRESSED)) - && !(KEV.dwControlKeyState & (LEFT_CTRL_PRESSED | - RIGHT_CTRL_PRESSED)) && KEV.bKeyDown) { - handle->tty.rd.last_key[0] = '\033'; - prefix_len = 1; - } else { - prefix_len = 0; - } - - if (KEV.uChar.UnicodeChar >= 0xDC00 && - KEV.uChar.UnicodeChar < 0xE000) { - /* UTF-16 surrogate pair */ - WCHAR utf16_buffer[2] = { handle->tty.rd.last_utf16_high_surrogate, - KEV.uChar.UnicodeChar}; - char_len = WideCharToMultiByte(CP_UTF8, - 0, - utf16_buffer, - 2, - &handle->tty.rd.last_key[prefix_len], - sizeof handle->tty.rd.last_key, - NULL, - NULL); - } else { - /* Single UTF-16 character */ - char_len = WideCharToMultiByte(CP_UTF8, - 0, - &KEV.uChar.UnicodeChar, - 1, - &handle->tty.rd.last_key[prefix_len], - sizeof handle->tty.rd.last_key, - NULL, - NULL); - } - - /* Whatever happened, the last character wasn't a high surrogate. */ - handle->tty.rd.last_utf16_high_surrogate = 0; - - /* If the utf16 character(s) couldn't be converted something must */ - /* be wrong. */ - if (!char_len) { - handle->flags &= ~UV_HANDLE_READING; - DECREASE_ACTIVE_COUNT(loop, handle); - handle->read_cb((uv_stream_t*) handle, - uv_translate_sys_error(GetLastError()), - &buf); - goto out; - } - - handle->tty.rd.last_key_len = (unsigned char) (prefix_len + char_len); - handle->tty.rd.last_key_offset = 0; - continue; - - } else { - /* Function key pressed */ - const char* vt100; - size_t prefix_len, vt100_len; - - vt100 = get_vt100_fn_key(KEV.wVirtualKeyCode, - !!(KEV.dwControlKeyState & SHIFT_PRESSED), - !!(KEV.dwControlKeyState & ( - LEFT_CTRL_PRESSED | - RIGHT_CTRL_PRESSED)), - &vt100_len); - - /* If we were unable to map to a vt100 sequence, just ignore. */ - if (!vt100) { - continue; - } - - /* Prefix with \x033 when the alt key was held. */ - if (KEV.dwControlKeyState & (LEFT_ALT_PRESSED | RIGHT_ALT_PRESSED)) { - handle->tty.rd.last_key[0] = '\033'; - prefix_len = 1; - } else { - prefix_len = 0; - } - - /* Copy the vt100 sequence to the handle buffer. */ - assert(prefix_len + vt100_len < sizeof handle->tty.rd.last_key); - memcpy(&handle->tty.rd.last_key[prefix_len], vt100, vt100_len); - - handle->tty.rd.last_key_len = (unsigned char) (prefix_len + vt100_len); - handle->tty.rd.last_key_offset = 0; - continue; - } - } else { - /* Copy any bytes left from the last keypress to the user buffer. */ - if (handle->tty.rd.last_key_offset < handle->tty.rd.last_key_len) { - /* Allocate a buffer if needed */ - if (buf_used == 0) { - handle->alloc_cb((uv_handle_t*) handle, 1024, &buf); - if (buf.len == 0) { - handle->read_cb((uv_stream_t*) handle, UV_ENOBUFS, &buf); - goto out; - } - assert(buf.base != NULL); - } - - buf.base[buf_used++] = handle->tty.rd.last_key[handle->tty.rd.last_key_offset++]; - - /* If the buffer is full, emit it */ - if ((size_t) buf_used == buf.len) { - handle->read_cb((uv_stream_t*) handle, buf_used, &buf); - buf = uv_null_buf_; - buf_used = 0; - } - - continue; - } - - /* Apply dwRepeat from the last input record. */ - if (--KEV.wRepeatCount > 0) { - handle->tty.rd.last_key_offset = 0; - continue; - } - - handle->tty.rd.last_key_len = 0; - continue; - } - } - - /* Send the buffer back to the user */ - if (buf_used > 0) { - handle->read_cb((uv_stream_t*) handle, buf_used, &buf); - } - - out: - /* Wait for more input events. */ - if ((handle->flags & UV_HANDLE_READING) && - !(handle->flags & UV_HANDLE_READ_PENDING)) { - uv_tty_queue_read(loop, handle); - } - - DECREASE_PENDING_REQ_COUNT(handle); - -#undef KEV -} - - - -void uv_process_tty_read_line_req(uv_loop_t* loop, uv_tty_t* handle, - uv_req_t* req) { - uv_buf_t buf; - - assert(handle->type == UV_TTY); - assert(handle->flags & UV_HANDLE_TTY_READABLE); - - buf = handle->tty.rd.read_line_buffer; - - handle->flags &= ~UV_HANDLE_READ_PENDING; - handle->tty.rd.read_line_buffer = uv_null_buf_; - - if (!REQ_SUCCESS(req)) { - /* Read was not successful */ - if ((handle->flags & UV_HANDLE_READING) && - handle->tty.rd.read_line_handle != NULL) { - /* Real error */ - handle->flags &= ~UV_HANDLE_READING; - DECREASE_ACTIVE_COUNT(loop, handle); - handle->read_cb((uv_stream_t*) handle, - uv_translate_sys_error(GET_REQ_ERROR(req)), - &buf); - } else { - /* The read was cancelled, or whatever we don't care */ - handle->read_cb((uv_stream_t*) handle, 0, &buf); - } - - } else { - /* Read successful */ - /* TODO: read unicode, convert to utf-8 */ - DWORD bytes = req->u.io.overlapped.InternalHigh; - handle->read_cb((uv_stream_t*) handle, bytes, &buf); - } - - /* Wait for more input events. */ - if ((handle->flags & UV_HANDLE_READING) && - !(handle->flags & UV_HANDLE_READ_PENDING)) { - uv_tty_queue_read(loop, handle); - } - - DECREASE_PENDING_REQ_COUNT(handle); -} - - -void uv_process_tty_read_req(uv_loop_t* loop, uv_tty_t* handle, - uv_req_t* req) { - assert(handle->type == UV_TTY); - assert(handle->flags & UV_HANDLE_TTY_READABLE); - - /* If the read_line_buffer member is zero, it must have been an raw read. */ - /* Otherwise it was a line-buffered read. */ - /* FIXME: This is quite obscure. Use a flag or something. */ - if (handle->tty.rd.read_line_buffer.len == 0) { - uv_process_tty_read_raw_req(loop, handle, req); - } else { - uv_process_tty_read_line_req(loop, handle, req); - } -} - - -int uv_tty_read_start(uv_tty_t* handle, uv_alloc_cb alloc_cb, - uv_read_cb read_cb) { - uv_loop_t* loop = handle->loop; - - if (!(handle->flags & UV_HANDLE_TTY_READABLE)) { - return ERROR_INVALID_PARAMETER; - } - - handle->flags |= UV_HANDLE_READING; - INCREASE_ACTIVE_COUNT(loop, handle); - handle->read_cb = read_cb; - handle->alloc_cb = alloc_cb; - - /* If reading was stopped and then started again, there could still be a */ - /* read request pending. */ - if (handle->flags & UV_HANDLE_READ_PENDING) { - return 0; - } - - /* Maybe the user stopped reading half-way while processing key events. */ - /* Short-circuit if this could be the case. */ - if (handle->tty.rd.last_key_len > 0) { - SET_REQ_SUCCESS(&handle->read_req); - uv_insert_pending_req(handle->loop, (uv_req_t*) &handle->read_req); - return 0; - } - - uv_tty_queue_read(loop, handle); - - return 0; -} - - -int uv_tty_read_stop(uv_tty_t* handle) { - handle->flags &= ~UV_HANDLE_READING; - DECREASE_ACTIVE_COUNT(handle->loop, handle); - - /* Cancel raw read */ - if ((handle->flags & UV_HANDLE_READ_PENDING) && - (handle->flags & UV_HANDLE_TTY_RAW)) { - /* Write some bullshit event to force the console wait to return. */ - INPUT_RECORD record; - DWORD written; - memset(&record, 0, sizeof record); - if (!WriteConsoleInputW(handle->handle, &record, 1, &written)) { - return GetLastError(); - } - } - - /* Cancel line-buffered read */ - if (handle->tty.rd.read_line_handle != NULL) { - /* Closing this handle will cancel the ReadConsole operation */ - CloseHandle(handle->tty.rd.read_line_handle); - handle->tty.rd.read_line_handle = NULL; - } - - - return 0; -} - - -static void uv_tty_update_virtual_window(CONSOLE_SCREEN_BUFFER_INFO* info) { - int old_virtual_width = uv_tty_virtual_width; - int old_virtual_height = uv_tty_virtual_height; - - uv_tty_virtual_width = info->dwSize.X; - uv_tty_virtual_height = info->srWindow.Bottom - info->srWindow.Top + 1; - - /* Recompute virtual window offset row. */ - if (uv_tty_virtual_offset == -1) { - uv_tty_virtual_offset = info->dwCursorPosition.Y; - } else if (uv_tty_virtual_offset < info->dwCursorPosition.Y - - uv_tty_virtual_height + 1) { - /* If suddenly find the cursor outside of the virtual window, it must */ - /* have somehow scrolled. Update the virtual window offset. */ - uv_tty_virtual_offset = info->dwCursorPosition.Y - - uv_tty_virtual_height + 1; - } - if (uv_tty_virtual_offset + uv_tty_virtual_height > info->dwSize.Y) { - uv_tty_virtual_offset = info->dwSize.Y - uv_tty_virtual_height; - } - if (uv_tty_virtual_offset < 0) { - uv_tty_virtual_offset = 0; - } - - /* If the virtual window size changed, emit a SIGWINCH signal. Don't emit */ - /* if this was the first time the virtual window size was computed. */ - if (old_virtual_width != -1 && old_virtual_height != -1 && - (uv_tty_virtual_width != old_virtual_width || - uv_tty_virtual_height != old_virtual_height)) { - uv__signal_dispatch(SIGWINCH); - } -} - - -static COORD uv_tty_make_real_coord(uv_tty_t* handle, - CONSOLE_SCREEN_BUFFER_INFO* info, int x, unsigned char x_relative, int y, - unsigned char y_relative) { - COORD result; - - uv_tty_update_virtual_window(info); - - /* Adjust y position */ - if (y_relative) { - y = info->dwCursorPosition.Y + y; - } else { - y = uv_tty_virtual_offset + y; - } - /* Clip y to virtual client rectangle */ - if (y < uv_tty_virtual_offset) { - y = uv_tty_virtual_offset; - } else if (y >= uv_tty_virtual_offset + uv_tty_virtual_height) { - y = uv_tty_virtual_offset + uv_tty_virtual_height - 1; - } - - /* Adjust x */ - if (x_relative) { - x = info->dwCursorPosition.X + x; - } - /* Clip x */ - if (x < 0) { - x = 0; - } else if (x >= uv_tty_virtual_width) { - x = uv_tty_virtual_width - 1; - } - - result.X = (unsigned short) x; - result.Y = (unsigned short) y; - return result; -} - - -static int uv_tty_emit_text(uv_tty_t* handle, WCHAR buffer[], DWORD length, - DWORD* error) { - DWORD written; - - if (*error != ERROR_SUCCESS) { - return -1; - } - - if (!WriteConsoleW(handle->handle, - (void*) buffer, - length, - &written, - NULL)) { - *error = GetLastError(); - return -1; - } - - return 0; -} - - -static int uv_tty_move_caret(uv_tty_t* handle, int x, unsigned char x_relative, - int y, unsigned char y_relative, DWORD* error) { - CONSOLE_SCREEN_BUFFER_INFO info; - COORD pos; - - if (*error != ERROR_SUCCESS) { - return -1; - } - - retry: - if (!GetConsoleScreenBufferInfo(handle->handle, &info)) { - *error = GetLastError(); - } - - pos = uv_tty_make_real_coord(handle, &info, x, x_relative, y, y_relative); - - if (!SetConsoleCursorPosition(handle->handle, pos)) { - if (GetLastError() == ERROR_INVALID_PARAMETER) { - /* The console may be resized - retry */ - goto retry; - } else { - *error = GetLastError(); - return -1; - } - } - - return 0; -} - - -static int uv_tty_reset(uv_tty_t* handle, DWORD* error) { - const COORD origin = {0, 0}; - const WORD char_attrs = uv_tty_default_text_attributes; - CONSOLE_SCREEN_BUFFER_INFO info; - DWORD count, written; - - if (*error != ERROR_SUCCESS) { - return -1; - } - - /* Reset original text attributes. */ - if (!SetConsoleTextAttribute(handle->handle, char_attrs)) { - *error = GetLastError(); - return -1; - } - - /* Move the cursor position to (0, 0). */ - if (!SetConsoleCursorPosition(handle->handle, origin)) { - *error = GetLastError(); - return -1; - } - - /* Clear the screen buffer. */ - retry: - if (!GetConsoleScreenBufferInfo(handle->handle, &info)) { - *error = GetLastError(); - return -1; - } - - count = info.dwSize.X * info.dwSize.Y; - - if (!(FillConsoleOutputCharacterW(handle->handle, - L'\x20', - count, - origin, - &written) && - FillConsoleOutputAttribute(handle->handle, - char_attrs, - written, - origin, - &written))) { - if (GetLastError() == ERROR_INVALID_PARAMETER) { - /* The console may be resized - retry */ - goto retry; - } else { - *error = GetLastError(); - return -1; - } - } - - /* Move the virtual window up to the top. */ - uv_tty_virtual_offset = 0; - uv_tty_update_virtual_window(&info); - - return 0; -} - - -static int uv_tty_clear(uv_tty_t* handle, int dir, char entire_screen, - DWORD* error) { - CONSOLE_SCREEN_BUFFER_INFO info; - COORD start, end; - DWORD count, written; - - int x1, x2, y1, y2; - int x1r, x2r, y1r, y2r; - - if (*error != ERROR_SUCCESS) { - return -1; - } - - if (dir == 0) { - /* Clear from current position */ - x1 = 0; - x1r = 1; - } else { - /* Clear from column 0 */ - x1 = 0; - x1r = 0; - } - - if (dir == 1) { - /* Clear to current position */ - x2 = 0; - x2r = 1; - } else { - /* Clear to end of row. We pretend the console is 65536 characters wide, */ - /* uv_tty_make_real_coord will clip it to the actual console width. */ - x2 = 0xffff; - x2r = 0; - } - - if (!entire_screen) { - /* Stay on our own row */ - y1 = y2 = 0; - y1r = y2r = 1; - } else { - /* Apply columns direction to row */ - y1 = x1; - y1r = x1r; - y2 = x2; - y2r = x2r; - } - - retry: - if (!GetConsoleScreenBufferInfo(handle->handle, &info)) { - *error = GetLastError(); - return -1; - } - - start = uv_tty_make_real_coord(handle, &info, x1, x1r, y1, y1r); - end = uv_tty_make_real_coord(handle, &info, x2, x2r, y2, y2r); - count = (end.Y * info.dwSize.X + end.X) - - (start.Y * info.dwSize.X + start.X) + 1; - - if (!(FillConsoleOutputCharacterW(handle->handle, - L'\x20', - count, - start, - &written) && - FillConsoleOutputAttribute(handle->handle, - info.wAttributes, - written, - start, - &written))) { - if (GetLastError() == ERROR_INVALID_PARAMETER) { - /* The console may be resized - retry */ - goto retry; - } else { - *error = GetLastError(); - return -1; - } - } - - return 0; -} - -#define FLIP_FGBG \ - do { \ - WORD fg = info.wAttributes & 0xF; \ - WORD bg = info.wAttributes & 0xF0; \ - info.wAttributes &= 0xFF00; \ - info.wAttributes |= fg << 4; \ - info.wAttributes |= bg >> 4; \ - } while (0) - -static int uv_tty_set_style(uv_tty_t* handle, DWORD* error) { - unsigned short argc = handle->tty.wr.ansi_csi_argc; - unsigned short* argv = handle->tty.wr.ansi_csi_argv; - int i; - CONSOLE_SCREEN_BUFFER_INFO info; - - char fg_color = -1, bg_color = -1; - char fg_bright = -1, bg_bright = -1; - char inverse = -1; - - if (argc == 0) { - /* Reset mode */ - fg_color = uv_tty_default_fg_color; - bg_color = uv_tty_default_bg_color; - fg_bright = uv_tty_default_fg_bright; - bg_bright = uv_tty_default_bg_bright; - inverse = uv_tty_default_inverse; - } - - for (i = 0; i < argc; i++) { - short arg = argv[i]; - - if (arg == 0) { - /* Reset mode */ - fg_color = uv_tty_default_fg_color; - bg_color = uv_tty_default_bg_color; - fg_bright = uv_tty_default_fg_bright; - bg_bright = uv_tty_default_bg_bright; - inverse = uv_tty_default_inverse; - - } else if (arg == 1) { - /* Foreground bright on */ - fg_bright = 1; - - } else if (arg == 2) { - /* Both bright off */ - fg_bright = 0; - bg_bright = 0; - - } else if (arg == 5) { - /* Background bright on */ - bg_bright = 1; - - } else if (arg == 7) { - /* Inverse: on */ - inverse = 1; - - } else if (arg == 21 || arg == 22) { - /* Foreground bright off */ - fg_bright = 0; - - } else if (arg == 25) { - /* Background bright off */ - bg_bright = 0; - - } else if (arg == 27) { - /* Inverse: off */ - inverse = 0; - - } else if (arg >= 30 && arg <= 37) { - /* Set foreground color */ - fg_color = arg - 30; - - } else if (arg == 39) { - /* Default text color */ - fg_color = uv_tty_default_fg_color; - fg_bright = uv_tty_default_fg_bright; - - } else if (arg >= 40 && arg <= 47) { - /* Set background color */ - bg_color = arg - 40; - - } else if (arg == 49) { - /* Default background color */ - bg_color = uv_tty_default_bg_color; - bg_bright = uv_tty_default_bg_bright; - - } else if (arg >= 90 && arg <= 97) { - /* Set bold foreground color */ - fg_bright = 1; - fg_color = arg - 90; - - } else if (arg >= 100 && arg <= 107) { - /* Set bold background color */ - bg_bright = 1; - bg_color = arg - 100; - - } - } - - if (fg_color == -1 && bg_color == -1 && fg_bright == -1 && - bg_bright == -1 && inverse == -1) { - /* Nothing changed */ - return 0; - } - - if (!GetConsoleScreenBufferInfo(handle->handle, &info)) { - *error = GetLastError(); - return -1; - } - - if ((info.wAttributes & COMMON_LVB_REVERSE_VIDEO) > 0) { - FLIP_FGBG; - } - - if (fg_color != -1) { - info.wAttributes &= ~(FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE); - if (fg_color & 1) info.wAttributes |= FOREGROUND_RED; - if (fg_color & 2) info.wAttributes |= FOREGROUND_GREEN; - if (fg_color & 4) info.wAttributes |= FOREGROUND_BLUE; - } - - if (fg_bright != -1) { - if (fg_bright) { - info.wAttributes |= FOREGROUND_INTENSITY; - } else { - info.wAttributes &= ~FOREGROUND_INTENSITY; - } - } - - if (bg_color != -1) { - info.wAttributes &= ~(BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE); - if (bg_color & 1) info.wAttributes |= BACKGROUND_RED; - if (bg_color & 2) info.wAttributes |= BACKGROUND_GREEN; - if (bg_color & 4) info.wAttributes |= BACKGROUND_BLUE; - } - - if (bg_bright != -1) { - if (bg_bright) { - info.wAttributes |= BACKGROUND_INTENSITY; - } else { - info.wAttributes &= ~BACKGROUND_INTENSITY; - } - } - - if (inverse != -1) { - if (inverse) { - info.wAttributes |= COMMON_LVB_REVERSE_VIDEO; - } else { - info.wAttributes &= ~COMMON_LVB_REVERSE_VIDEO; - } - } - - if ((info.wAttributes & COMMON_LVB_REVERSE_VIDEO) > 0) { - FLIP_FGBG; - } - - if (!SetConsoleTextAttribute(handle->handle, info.wAttributes)) { - *error = GetLastError(); - return -1; - } - - return 0; -} - - -static int uv_tty_save_state(uv_tty_t* handle, unsigned char save_attributes, - DWORD* error) { - CONSOLE_SCREEN_BUFFER_INFO info; - - if (*error != ERROR_SUCCESS) { - return -1; - } - - if (!GetConsoleScreenBufferInfo(handle->handle, &info)) { - *error = GetLastError(); - return -1; - } - - uv_tty_update_virtual_window(&info); - - handle->tty.wr.saved_position.X = info.dwCursorPosition.X; - handle->tty.wr.saved_position.Y = info.dwCursorPosition.Y - uv_tty_virtual_offset; - handle->flags |= UV_HANDLE_TTY_SAVED_POSITION; - - if (save_attributes) { - handle->tty.wr.saved_attributes = info.wAttributes & - (FOREGROUND_INTENSITY | BACKGROUND_INTENSITY); - handle->flags |= UV_HANDLE_TTY_SAVED_ATTRIBUTES; - } - - return 0; -} - - -static int uv_tty_restore_state(uv_tty_t* handle, - unsigned char restore_attributes, DWORD* error) { - CONSOLE_SCREEN_BUFFER_INFO info; - WORD new_attributes; - - if (*error != ERROR_SUCCESS) { - return -1; - } - - if (handle->flags & UV_HANDLE_TTY_SAVED_POSITION) { - if (uv_tty_move_caret(handle, - handle->tty.wr.saved_position.X, - 0, - handle->tty.wr.saved_position.Y, - 0, - error) != 0) { - return -1; - } - } - - if (restore_attributes && - (handle->flags & UV_HANDLE_TTY_SAVED_ATTRIBUTES)) { - if (!GetConsoleScreenBufferInfo(handle->handle, &info)) { - *error = GetLastError(); - return -1; - } - - new_attributes = info.wAttributes; - new_attributes &= ~(FOREGROUND_INTENSITY | BACKGROUND_INTENSITY); - new_attributes |= handle->tty.wr.saved_attributes; - - if (!SetConsoleTextAttribute(handle->handle, new_attributes)) { - *error = GetLastError(); - return -1; - } - } - - return 0; -} - -static int uv_tty_set_cursor_visibility(uv_tty_t* handle, - BOOL visible, - DWORD* error) { - CONSOLE_CURSOR_INFO cursor_info; - - if (!GetConsoleCursorInfo(handle->handle, &cursor_info)) { - *error = GetLastError(); - return -1; - } - - cursor_info.bVisible = visible; - - if (!SetConsoleCursorInfo(handle->handle, &cursor_info)) { - *error = GetLastError(); - return -1; - } - - return 0; -} - -static int uv_tty_write_bufs(uv_tty_t* handle, - const uv_buf_t bufs[], - unsigned int nbufs, - DWORD* error) { - /* We can only write 8k characters at a time. Windows can't handle */ - /* much more characters in a single console write anyway. */ - WCHAR utf16_buf[8192]; - DWORD utf16_buf_used = 0; - unsigned int i; - -#define FLUSH_TEXT() \ - do { \ - if (utf16_buf_used > 0) { \ - uv_tty_emit_text(handle, utf16_buf, utf16_buf_used, error); \ - utf16_buf_used = 0; \ - } \ - } while (0) - -#define ENSURE_BUFFER_SPACE(wchars_needed) \ - if (wchars_needed > ARRAY_SIZE(utf16_buf) - utf16_buf_used) { \ - FLUSH_TEXT(); \ - } - - /* Cache for fast access */ - unsigned char utf8_bytes_left = handle->tty.wr.utf8_bytes_left; - unsigned int utf8_codepoint = handle->tty.wr.utf8_codepoint; - unsigned char previous_eol = handle->tty.wr.previous_eol; - unsigned char ansi_parser_state = handle->tty.wr.ansi_parser_state; - - /* Store the error here. If we encounter an error, stop trying to do i/o */ - /* but keep parsing the buffer so we leave the parser in a consistent */ - /* state. */ - *error = ERROR_SUCCESS; - - EnterCriticalSection(&uv_tty_output_lock); - - for (i = 0; i < nbufs; i++) { - uv_buf_t buf = bufs[i]; - unsigned int j; - - for (j = 0; j < buf.len; j++) { - unsigned char c = buf.base[j]; - - /* Run the character through the utf8 decoder We happily accept non */ - /* shortest form encodings and invalid code points - there's no real */ - /* harm that can be done. */ - if (utf8_bytes_left == 0) { - /* Read utf-8 start byte */ - DWORD first_zero_bit; - unsigned char not_c = ~c; -#ifdef _MSC_VER /* msvc */ - if (_BitScanReverse(&first_zero_bit, not_c)) { -#else /* assume gcc */ - if (c != 0) { - first_zero_bit = (sizeof(int) * 8) - 1 - __builtin_clz(not_c); -#endif - if (first_zero_bit == 7) { - /* Ascii - pass right through */ - utf8_codepoint = (unsigned int) c; - - } else if (first_zero_bit <= 5) { - /* Multibyte sequence */ - utf8_codepoint = (0xff >> (8 - first_zero_bit)) & c; - utf8_bytes_left = (char) (6 - first_zero_bit); - - } else { - /* Invalid continuation */ - utf8_codepoint = UNICODE_REPLACEMENT_CHARACTER; - } - - } else { - /* 0xff -- invalid */ - utf8_codepoint = UNICODE_REPLACEMENT_CHARACTER; - } - - } else if ((c & 0xc0) == 0x80) { - /* Valid continuation of utf-8 multibyte sequence */ - utf8_bytes_left--; - utf8_codepoint <<= 6; - utf8_codepoint |= ((unsigned int) c & 0x3f); - - } else { - /* Start byte where continuation was expected. */ - utf8_bytes_left = 0; - utf8_codepoint = UNICODE_REPLACEMENT_CHARACTER; - /* Patch buf offset so this character will be parsed again as a */ - /* start byte. */ - j--; - } - - /* Maybe we need to parse more bytes to find a character. */ - if (utf8_bytes_left != 0) { - continue; - } - - /* Parse vt100/ansi escape codes */ - if (ansi_parser_state == ANSI_NORMAL) { - switch (utf8_codepoint) { - case '\033': - ansi_parser_state = ANSI_ESCAPE_SEEN; - continue; - - case 0233: - ansi_parser_state = ANSI_CSI; - handle->tty.wr.ansi_csi_argc = 0; - continue; - } - - } else if (ansi_parser_state == ANSI_ESCAPE_SEEN) { - switch (utf8_codepoint) { - case '[': - ansi_parser_state = ANSI_CSI; - handle->tty.wr.ansi_csi_argc = 0; - continue; - - case '^': - case '_': - case 'P': - case ']': - /* Not supported, but we'll have to parse until we see a stop */ - /* code, e.g. ESC \ or BEL. */ - ansi_parser_state = ANSI_ST_CONTROL; - continue; - - case '\033': - /* Ignore double escape. */ - continue; - - case 'c': - /* Full console reset. */ - FLUSH_TEXT(); - uv_tty_reset(handle, error); - ansi_parser_state = ANSI_NORMAL; - continue; - - case '7': - /* Save the cursor position and text attributes. */ - FLUSH_TEXT(); - uv_tty_save_state(handle, 1, error); - ansi_parser_state = ANSI_NORMAL; - continue; - - case '8': - /* Restore the cursor position and text attributes */ - FLUSH_TEXT(); - uv_tty_restore_state(handle, 1, error); - ansi_parser_state = ANSI_NORMAL; - continue; - - default: - if (utf8_codepoint >= '@' && utf8_codepoint <= '_') { - /* Single-char control. */ - ansi_parser_state = ANSI_NORMAL; - continue; - } else { - /* Invalid - proceed as normal, */ - ansi_parser_state = ANSI_NORMAL; - } - } - - } else if (ansi_parser_state & ANSI_CSI) { - if (!(ansi_parser_state & ANSI_IGNORE)) { - if (utf8_codepoint >= '0' && utf8_codepoint <= '9') { - /* Parsing a numerical argument */ - - if (!(ansi_parser_state & ANSI_IN_ARG)) { - /* We were not currently parsing a number */ - - /* Check for too many arguments */ - if (handle->tty.wr.ansi_csi_argc >= ARRAY_SIZE(handle->tty.wr.ansi_csi_argv)) { - ansi_parser_state |= ANSI_IGNORE; - continue; - } - - ansi_parser_state |= ANSI_IN_ARG; - handle->tty.wr.ansi_csi_argc++; - handle->tty.wr.ansi_csi_argv[handle->tty.wr.ansi_csi_argc - 1] = - (unsigned short) utf8_codepoint - '0'; - continue; - } else { - /* We were already parsing a number. Parse next digit. */ - uint32_t value = 10 * - handle->tty.wr.ansi_csi_argv[handle->tty.wr.ansi_csi_argc - 1]; - - /* Check for overflow. */ - if (value > UINT16_MAX) { - ansi_parser_state |= ANSI_IGNORE; - continue; - } - - handle->tty.wr.ansi_csi_argv[handle->tty.wr.ansi_csi_argc - 1] = - (unsigned short) value + (utf8_codepoint - '0'); - continue; - } - - } else if (utf8_codepoint == ';') { - /* Denotes the end of an argument. */ - if (ansi_parser_state & ANSI_IN_ARG) { - ansi_parser_state &= ~ANSI_IN_ARG; - continue; - - } else { - /* If ANSI_IN_ARG is not set, add another argument and */ - /* default it to 0. */ - /* Check for too many arguments */ - if (handle->tty.wr.ansi_csi_argc >= ARRAY_SIZE(handle->tty.wr.ansi_csi_argv)) { - ansi_parser_state |= ANSI_IGNORE; - continue; - } - - handle->tty.wr.ansi_csi_argc++; - handle->tty.wr.ansi_csi_argv[handle->tty.wr.ansi_csi_argc - 1] = 0; - continue; - } - - } else if (utf8_codepoint == '?' && !(ansi_parser_state & ANSI_IN_ARG) && - handle->tty.wr.ansi_csi_argc == 0) { - /* Ignores '?' if it is the first character after CSI[ */ - /* This is an extension character from the VT100 codeset */ - /* that is supported and used by most ANSI terminals today. */ - continue; - - } else if (utf8_codepoint >= '@' && utf8_codepoint <= '~' && - (handle->tty.wr.ansi_csi_argc > 0 || utf8_codepoint != '[')) { - int x, y, d; - - /* Command byte */ - switch (utf8_codepoint) { - case 'A': - /* cursor up */ - FLUSH_TEXT(); - y = -(handle->tty.wr.ansi_csi_argc ? handle->tty.wr.ansi_csi_argv[0] : 1); - uv_tty_move_caret(handle, 0, 1, y, 1, error); - break; - - case 'B': - /* cursor down */ - FLUSH_TEXT(); - y = handle->tty.wr.ansi_csi_argc ? handle->tty.wr.ansi_csi_argv[0] : 1; - uv_tty_move_caret(handle, 0, 1, y, 1, error); - break; - - case 'C': - /* cursor forward */ - FLUSH_TEXT(); - x = handle->tty.wr.ansi_csi_argc ? handle->tty.wr.ansi_csi_argv[0] : 1; - uv_tty_move_caret(handle, x, 1, 0, 1, error); - break; - - case 'D': - /* cursor back */ - FLUSH_TEXT(); - x = -(handle->tty.wr.ansi_csi_argc ? handle->tty.wr.ansi_csi_argv[0] : 1); - uv_tty_move_caret(handle, x, 1, 0, 1, error); - break; - - case 'E': - /* cursor next line */ - FLUSH_TEXT(); - y = handle->tty.wr.ansi_csi_argc ? handle->tty.wr.ansi_csi_argv[0] : 1; - uv_tty_move_caret(handle, 0, 0, y, 1, error); - break; - - case 'F': - /* cursor previous line */ - FLUSH_TEXT(); - y = -(handle->tty.wr.ansi_csi_argc ? handle->tty.wr.ansi_csi_argv[0] : 1); - uv_tty_move_caret(handle, 0, 0, y, 1, error); - break; - - case 'G': - /* cursor horizontal move absolute */ - FLUSH_TEXT(); - x = (handle->tty.wr.ansi_csi_argc >= 1 && handle->tty.wr.ansi_csi_argv[0]) - ? handle->tty.wr.ansi_csi_argv[0] - 1 : 0; - uv_tty_move_caret(handle, x, 0, 0, 1, error); - break; - - case 'H': - case 'f': - /* cursor move absolute */ - FLUSH_TEXT(); - y = (handle->tty.wr.ansi_csi_argc >= 1 && handle->tty.wr.ansi_csi_argv[0]) - ? handle->tty.wr.ansi_csi_argv[0] - 1 : 0; - x = (handle->tty.wr.ansi_csi_argc >= 2 && handle->tty.wr.ansi_csi_argv[1]) - ? handle->tty.wr.ansi_csi_argv[1] - 1 : 0; - uv_tty_move_caret(handle, x, 0, y, 0, error); - break; - - case 'J': - /* Erase screen */ - FLUSH_TEXT(); - d = handle->tty.wr.ansi_csi_argc ? handle->tty.wr.ansi_csi_argv[0] : 0; - if (d >= 0 && d <= 2) { - uv_tty_clear(handle, d, 1, error); - } - break; - - case 'K': - /* Erase line */ - FLUSH_TEXT(); - d = handle->tty.wr.ansi_csi_argc ? handle->tty.wr.ansi_csi_argv[0] : 0; - if (d >= 0 && d <= 2) { - uv_tty_clear(handle, d, 0, error); - } - break; - - case 'm': - /* Set style */ - FLUSH_TEXT(); - uv_tty_set_style(handle, error); - break; - - case 's': - /* Save the cursor position. */ - FLUSH_TEXT(); - uv_tty_save_state(handle, 0, error); - break; - - case 'u': - /* Restore the cursor position */ - FLUSH_TEXT(); - uv_tty_restore_state(handle, 0, error); - break; - - case 'l': - /* Hide the cursor */ - if (handle->tty.wr.ansi_csi_argc == 1 && - handle->tty.wr.ansi_csi_argv[0] == 25) { - FLUSH_TEXT(); - uv_tty_set_cursor_visibility(handle, 0, error); - } - break; - - case 'h': - /* Show the cursor */ - if (handle->tty.wr.ansi_csi_argc == 1 && - handle->tty.wr.ansi_csi_argv[0] == 25) { - FLUSH_TEXT(); - uv_tty_set_cursor_visibility(handle, 1, error); - } - break; - } - - /* Sequence ended - go back to normal state. */ - ansi_parser_state = ANSI_NORMAL; - continue; - - } else { - /* We don't support commands that use private mode characters or */ - /* intermediaries. Ignore the rest of the sequence. */ - ansi_parser_state |= ANSI_IGNORE; - continue; - } - } else { - /* We're ignoring this command. Stop only on command character. */ - if (utf8_codepoint >= '@' && utf8_codepoint <= '~') { - ansi_parser_state = ANSI_NORMAL; - } - continue; - } - - } else if (ansi_parser_state & ANSI_ST_CONTROL) { - /* Unsupported control code */ - /* Ignore everything until we see BEL or ESC \ */ - if (ansi_parser_state & ANSI_IN_STRING) { - if (!(ansi_parser_state & ANSI_BACKSLASH_SEEN)) { - if (utf8_codepoint == '"') { - ansi_parser_state &= ~ANSI_IN_STRING; - } else if (utf8_codepoint == '\\') { - ansi_parser_state |= ANSI_BACKSLASH_SEEN; - } - } else { - ansi_parser_state &= ~ANSI_BACKSLASH_SEEN; - } - } else { - if (utf8_codepoint == '\007' || (utf8_codepoint == '\\' && - (ansi_parser_state & ANSI_ESCAPE_SEEN))) { - /* End of sequence */ - ansi_parser_state = ANSI_NORMAL; - } else if (utf8_codepoint == '\033') { - /* Escape character */ - ansi_parser_state |= ANSI_ESCAPE_SEEN; - } else if (utf8_codepoint == '"') { - /* String starting */ - ansi_parser_state |= ANSI_IN_STRING; - ansi_parser_state &= ~ANSI_ESCAPE_SEEN; - ansi_parser_state &= ~ANSI_BACKSLASH_SEEN; - } else { - ansi_parser_state &= ~ANSI_ESCAPE_SEEN; - } - } - continue; - } else { - /* Inconsistent state */ - abort(); - } - - /* We wouldn't mind emitting utf-16 surrogate pairs. Too bad, the */ - /* windows console doesn't really support UTF-16, so just emit the */ - /* replacement character. */ - if (utf8_codepoint > 0xffff) { - utf8_codepoint = UNICODE_REPLACEMENT_CHARACTER; - } - - if (utf8_codepoint == 0x0a || utf8_codepoint == 0x0d) { - /* EOL conversion - emit \r\n when we see \n. */ - - if (utf8_codepoint == 0x0a && previous_eol != 0x0d) { - /* \n was not preceded by \r; print \r\n. */ - ENSURE_BUFFER_SPACE(2); - utf16_buf[utf16_buf_used++] = L'\r'; - utf16_buf[utf16_buf_used++] = L'\n'; - } else if (utf8_codepoint == 0x0d && previous_eol == 0x0a) { - /* \n was followed by \r; do not print the \r, since */ - /* the source was either \r\n\r (so the second \r is */ - /* redundant) or was \n\r (so the \n was processed */ - /* by the last case and an \r automatically inserted). */ - } else { - /* \r without \n; print \r as-is. */ - ENSURE_BUFFER_SPACE(1); - utf16_buf[utf16_buf_used++] = (WCHAR) utf8_codepoint; - } - - previous_eol = (char) utf8_codepoint; - - } else if (utf8_codepoint <= 0xffff) { - /* Encode character into utf-16 buffer. */ - ENSURE_BUFFER_SPACE(1); - utf16_buf[utf16_buf_used++] = (WCHAR) utf8_codepoint; - previous_eol = 0; - } - } - } - - /* Flush remaining characters */ - FLUSH_TEXT(); - - /* Copy cached values back to struct. */ - handle->tty.wr.utf8_bytes_left = utf8_bytes_left; - handle->tty.wr.utf8_codepoint = utf8_codepoint; - handle->tty.wr.previous_eol = previous_eol; - handle->tty.wr.ansi_parser_state = ansi_parser_state; - - LeaveCriticalSection(&uv_tty_output_lock); - - if (*error == STATUS_SUCCESS) { - return 0; - } else { - return -1; - } - -#undef FLUSH_TEXT -} - - -int uv_tty_write(uv_loop_t* loop, - uv_write_t* req, - uv_tty_t* handle, - const uv_buf_t bufs[], - unsigned int nbufs, - uv_write_cb cb) { - DWORD error; - - uv_req_init(loop, (uv_req_t*) req); - req->type = UV_WRITE; - req->handle = (uv_stream_t*) handle; - req->cb = cb; - - handle->reqs_pending++; - handle->stream.conn.write_reqs_pending++; - REGISTER_HANDLE_REQ(loop, handle, req); - - req->u.io.queued_bytes = 0; - - if (!uv_tty_write_bufs(handle, bufs, nbufs, &error)) { - SET_REQ_SUCCESS(req); - } else { - SET_REQ_ERROR(req, error); - } - - uv_insert_pending_req(loop, (uv_req_t*) req); - - return 0; -} - - -int uv__tty_try_write(uv_tty_t* handle, - const uv_buf_t bufs[], - unsigned int nbufs) { - DWORD error; - - if (handle->stream.conn.write_reqs_pending > 0) - return UV_EAGAIN; - - if (uv_tty_write_bufs(handle, bufs, nbufs, &error)) - return uv_translate_sys_error(error); - - return uv__count_bufs(bufs, nbufs); -} - - -void uv_process_tty_write_req(uv_loop_t* loop, uv_tty_t* handle, - uv_write_t* req) { - int err; - - handle->write_queue_size -= req->u.io.queued_bytes; - UNREGISTER_HANDLE_REQ(loop, handle, req); - - if (req->cb) { - err = GET_REQ_ERROR(req); - req->cb(req, uv_translate_sys_error(err)); - } - - handle->stream.conn.write_reqs_pending--; - if (handle->stream.conn.shutdown_req != NULL && - handle->stream.conn.write_reqs_pending == 0) { - uv_want_endgame(loop, (uv_handle_t*)handle); - } - - DECREASE_PENDING_REQ_COUNT(handle); -} - - -void uv_tty_close(uv_tty_t* handle) { - assert(handle->u.fd == -1 || handle->u.fd > 2); - if (handle->u.fd == -1) - CloseHandle(handle->handle); - else - close(handle->u.fd); - - if (handle->flags & UV_HANDLE_READING) - uv_tty_read_stop(handle); - - handle->u.fd = -1; - handle->handle = INVALID_HANDLE_VALUE; - handle->flags &= ~(UV_HANDLE_READABLE | UV_HANDLE_WRITABLE); - uv__handle_closing(handle); - - if (handle->reqs_pending == 0) { - uv_want_endgame(handle->loop, (uv_handle_t*) handle); - } -} - - -void uv_tty_endgame(uv_loop_t* loop, uv_tty_t* handle) { - if (!(handle->flags & UV_HANDLE_TTY_READABLE) && - handle->stream.conn.shutdown_req != NULL && - handle->stream.conn.write_reqs_pending == 0) { - UNREGISTER_HANDLE_REQ(loop, handle, handle->stream.conn.shutdown_req); - - /* TTY shutdown is really just a no-op */ - if (handle->stream.conn.shutdown_req->cb) { - if (handle->flags & UV__HANDLE_CLOSING) { - handle->stream.conn.shutdown_req->cb(handle->stream.conn.shutdown_req, UV_ECANCELED); - } else { - handle->stream.conn.shutdown_req->cb(handle->stream.conn.shutdown_req, 0); - } - } - - handle->stream.conn.shutdown_req = NULL; - - DECREASE_PENDING_REQ_COUNT(handle); - return; - } - - if (handle->flags & UV__HANDLE_CLOSING && - handle->reqs_pending == 0) { - /* The console handle duplicate used for line reading should be destroyed */ - /* by uv_tty_read_stop. */ - assert(!(handle->flags & UV_HANDLE_TTY_READABLE) || - handle->tty.rd.read_line_handle == NULL); - - /* The wait handle used for raw reading should be unregistered when the */ - /* wait callback runs. */ - assert(!(handle->flags & UV_HANDLE_TTY_READABLE) || - handle->tty.rd.read_raw_wait == NULL); - - assert(!(handle->flags & UV_HANDLE_CLOSED)); - uv__handle_close(handle); - } -} - - -/* TODO: remove me */ -void uv_process_tty_accept_req(uv_loop_t* loop, uv_tty_t* handle, - uv_req_t* raw_req) { - abort(); -} - - -/* TODO: remove me */ -void uv_process_tty_connect_req(uv_loop_t* loop, uv_tty_t* handle, - uv_connect_t* req) { - abort(); -} - - -int uv_tty_reset_mode(void) { - /* Not necessary to do anything. */ - return 0; -} diff --git a/outside/libuv-v1.7.5/src/win/udp.c b/outside/libuv-v1.7.5/src/win/udp.c deleted file mode 100644 index 24792ec06..000000000 --- a/outside/libuv-v1.7.5/src/win/udp.c +++ /dev/null @@ -1,926 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include -#include - -#include "uv.h" -#include "internal.h" -#include "handle-inl.h" -#include "stream-inl.h" -#include "req-inl.h" - - -/* - * Threshold of active udp streams for which to preallocate udp read buffers. - */ -const unsigned int uv_active_udp_streams_threshold = 0; - -/* A zero-size buffer for use by uv_udp_read */ -static char uv_zero_[] = ""; - -int uv_udp_getsockname(const uv_udp_t* handle, - struct sockaddr* name, - int* namelen) { - int result; - - if (handle->socket == INVALID_SOCKET) { - return UV_EINVAL; - } - - result = getsockname(handle->socket, name, namelen); - if (result != 0) { - return uv_translate_sys_error(WSAGetLastError()); - } - - return 0; -} - - -static int uv_udp_set_socket(uv_loop_t* loop, uv_udp_t* handle, SOCKET socket, - int family) { - DWORD yes = 1; - WSAPROTOCOL_INFOW info; - int opt_len; - - if (handle->socket != INVALID_SOCKET) - return UV_EBUSY; - - /* Set the socket to nonblocking mode */ - if (ioctlsocket(socket, FIONBIO, &yes) == SOCKET_ERROR) { - return WSAGetLastError(); - } - - /* Make the socket non-inheritable */ - if (!SetHandleInformation((HANDLE)socket, HANDLE_FLAG_INHERIT, 0)) { - return GetLastError(); - } - - /* Associate it with the I/O completion port. */ - /* Use uv_handle_t pointer as completion key. */ - if (CreateIoCompletionPort((HANDLE)socket, - loop->iocp, - (ULONG_PTR)socket, - 0) == NULL) { - return GetLastError(); - } - - if (pSetFileCompletionNotificationModes) { - /* All known Windows that support SetFileCompletionNotificationModes */ - /* have a bug that makes it impossible to use this function in */ - /* conjunction with datagram sockets. We can work around that but only */ - /* if the user is using the default UDP driver (AFD) and has no other */ - /* LSPs stacked on top. Here we check whether that is the case. */ - opt_len = (int) sizeof info; - if (getsockopt(socket, - SOL_SOCKET, - SO_PROTOCOL_INFOW, - (char*) &info, - &opt_len) == SOCKET_ERROR) { - return GetLastError(); - } - - if (info.ProtocolChain.ChainLen == 1) { - if (pSetFileCompletionNotificationModes((HANDLE)socket, - FILE_SKIP_SET_EVENT_ON_HANDLE | - FILE_SKIP_COMPLETION_PORT_ON_SUCCESS)) { - handle->flags |= UV_HANDLE_SYNC_BYPASS_IOCP; - handle->func_wsarecv = uv_wsarecv_workaround; - handle->func_wsarecvfrom = uv_wsarecvfrom_workaround; - } else if (GetLastError() != ERROR_INVALID_FUNCTION) { - return GetLastError(); - } - } - } - - handle->socket = socket; - - if (family == AF_INET6) { - handle->flags |= UV_HANDLE_IPV6; - } else { - assert(!(handle->flags & UV_HANDLE_IPV6)); - } - - return 0; -} - - -int uv_udp_init_ex(uv_loop_t* loop, uv_udp_t* handle, unsigned int flags) { - int domain; - - /* Use the lower 8 bits for the domain */ - domain = flags & 0xFF; - if (domain != AF_INET && domain != AF_INET6 && domain != AF_UNSPEC) - return UV_EINVAL; - - if (flags & ~0xFF) - return UV_EINVAL; - - uv__handle_init(loop, (uv_handle_t*) handle, UV_UDP); - handle->socket = INVALID_SOCKET; - handle->reqs_pending = 0; - handle->activecnt = 0; - handle->func_wsarecv = WSARecv; - handle->func_wsarecvfrom = WSARecvFrom; - handle->send_queue_size = 0; - handle->send_queue_count = 0; - uv_req_init(loop, (uv_req_t*) &(handle->recv_req)); - handle->recv_req.type = UV_UDP_RECV; - handle->recv_req.data = handle; - - /* If anything fails beyond this point we need to remove the handle from - * the handle queue, since it was added by uv__handle_init. - */ - - if (domain != AF_UNSPEC) { - SOCKET sock; - DWORD err; - - sock = socket(domain, SOCK_DGRAM, 0); - if (sock == INVALID_SOCKET) { - err = WSAGetLastError(); - QUEUE_REMOVE(&handle->handle_queue); - return uv_translate_sys_error(err); - } - - err = uv_udp_set_socket(handle->loop, handle, sock, domain); - if (err) { - closesocket(sock); - QUEUE_REMOVE(&handle->handle_queue); - return uv_translate_sys_error(err); - } - } - - return 0; -} - - -int uv_udp_init(uv_loop_t* loop, uv_udp_t* handle) { - return uv_udp_init_ex(loop, handle, AF_UNSPEC); -} - - -void uv_udp_close(uv_loop_t* loop, uv_udp_t* handle) { - uv_udp_recv_stop(handle); - closesocket(handle->socket); - handle->socket = INVALID_SOCKET; - - uv__handle_closing(handle); - - if (handle->reqs_pending == 0) { - uv_want_endgame(loop, (uv_handle_t*) handle); - } -} - - -void uv_udp_endgame(uv_loop_t* loop, uv_udp_t* handle) { - if (handle->flags & UV__HANDLE_CLOSING && - handle->reqs_pending == 0) { - assert(!(handle->flags & UV_HANDLE_CLOSED)); - uv__handle_close(handle); - } -} - - -static int uv_udp_maybe_bind(uv_udp_t* handle, - const struct sockaddr* addr, - unsigned int addrlen, - unsigned int flags) { - int r; - int err; - DWORD no = 0; - - if (handle->flags & UV_HANDLE_BOUND) - return 0; - - if ((flags & UV_UDP_IPV6ONLY) && addr->sa_family != AF_INET6) { - /* UV_UDP_IPV6ONLY is supported only for IPV6 sockets */ - return ERROR_INVALID_PARAMETER; - } - - if (handle->socket == INVALID_SOCKET) { - SOCKET sock = socket(addr->sa_family, SOCK_DGRAM, 0); - if (sock == INVALID_SOCKET) { - return WSAGetLastError(); - } - - err = uv_udp_set_socket(handle->loop, handle, sock, addr->sa_family); - if (err) { - closesocket(sock); - return err; - } - } - - if (flags & UV_UDP_REUSEADDR) { - DWORD yes = 1; - /* Set SO_REUSEADDR on the socket. */ - if (setsockopt(handle->socket, - SOL_SOCKET, - SO_REUSEADDR, - (char*) &yes, - sizeof yes) == SOCKET_ERROR) { - err = WSAGetLastError(); - return err; - } - } - - if (addr->sa_family == AF_INET6) - handle->flags |= UV_HANDLE_IPV6; - - if (addr->sa_family == AF_INET6 && !(flags & UV_UDP_IPV6ONLY)) { - /* On windows IPV6ONLY is on by default. */ - /* If the user doesn't specify it libuv turns it off. */ - - /* TODO: how to handle errors? This may fail if there is no ipv4 stack */ - /* available, or when run on XP/2003 which have no support for dualstack */ - /* sockets. For now we're silently ignoring the error. */ - setsockopt(handle->socket, - IPPROTO_IPV6, - IPV6_V6ONLY, - (char*) &no, - sizeof no); - } - - r = bind(handle->socket, addr, addrlen); - if (r == SOCKET_ERROR) { - return WSAGetLastError(); - } - - handle->flags |= UV_HANDLE_BOUND; - - return 0; -} - - -static void uv_udp_queue_recv(uv_loop_t* loop, uv_udp_t* handle) { - uv_req_t* req; - uv_buf_t buf; - DWORD bytes, flags; - int result; - - assert(handle->flags & UV_HANDLE_READING); - assert(!(handle->flags & UV_HANDLE_READ_PENDING)); - - req = &handle->recv_req; - memset(&req->u.io.overlapped, 0, sizeof(req->u.io.overlapped)); - - /* - * Preallocate a read buffer if the number of active streams is below - * the threshold. - */ - if (loop->active_udp_streams < uv_active_udp_streams_threshold) { - handle->flags &= ~UV_HANDLE_ZERO_READ; - - handle->alloc_cb((uv_handle_t*) handle, 65536, &handle->recv_buffer); - if (handle->recv_buffer.len == 0) { - handle->recv_cb(handle, UV_ENOBUFS, &handle->recv_buffer, NULL, 0); - return; - } - assert(handle->recv_buffer.base != NULL); - - buf = handle->recv_buffer; - memset(&handle->recv_from, 0, sizeof handle->recv_from); - handle->recv_from_len = sizeof handle->recv_from; - flags = 0; - - result = handle->func_wsarecvfrom(handle->socket, - (WSABUF*) &buf, - 1, - &bytes, - &flags, - (struct sockaddr*) &handle->recv_from, - &handle->recv_from_len, - &req->u.io.overlapped, - NULL); - - if (UV_SUCCEEDED_WITHOUT_IOCP(result == 0)) { - /* Process the req without IOCP. */ - handle->flags |= UV_HANDLE_READ_PENDING; - req->u.io.overlapped.InternalHigh = bytes; - handle->reqs_pending++; - uv_insert_pending_req(loop, req); - } else if (UV_SUCCEEDED_WITH_IOCP(result == 0)) { - /* The req will be processed with IOCP. */ - handle->flags |= UV_HANDLE_READ_PENDING; - handle->reqs_pending++; - } else { - /* Make this req pending reporting an error. */ - SET_REQ_ERROR(req, WSAGetLastError()); - uv_insert_pending_req(loop, req); - handle->reqs_pending++; - } - - } else { - handle->flags |= UV_HANDLE_ZERO_READ; - - buf.base = (char*) uv_zero_; - buf.len = 0; - flags = MSG_PEEK; - - result = handle->func_wsarecv(handle->socket, - (WSABUF*) &buf, - 1, - &bytes, - &flags, - &req->u.io.overlapped, - NULL); - - if (UV_SUCCEEDED_WITHOUT_IOCP(result == 0)) { - /* Process the req without IOCP. */ - handle->flags |= UV_HANDLE_READ_PENDING; - req->u.io.overlapped.InternalHigh = bytes; - handle->reqs_pending++; - uv_insert_pending_req(loop, req); - } else if (UV_SUCCEEDED_WITH_IOCP(result == 0)) { - /* The req will be processed with IOCP. */ - handle->flags |= UV_HANDLE_READ_PENDING; - handle->reqs_pending++; - } else { - /* Make this req pending reporting an error. */ - SET_REQ_ERROR(req, WSAGetLastError()); - uv_insert_pending_req(loop, req); - handle->reqs_pending++; - } - } -} - - -int uv__udp_recv_start(uv_udp_t* handle, uv_alloc_cb alloc_cb, - uv_udp_recv_cb recv_cb) { - uv_loop_t* loop = handle->loop; - int err; - - if (handle->flags & UV_HANDLE_READING) { - return WSAEALREADY; - } - - err = uv_udp_maybe_bind(handle, - (const struct sockaddr*) &uv_addr_ip4_any_, - sizeof(uv_addr_ip4_any_), - 0); - if (err) - return err; - - handle->flags |= UV_HANDLE_READING; - INCREASE_ACTIVE_COUNT(loop, handle); - loop->active_udp_streams++; - - handle->recv_cb = recv_cb; - handle->alloc_cb = alloc_cb; - - /* If reading was stopped and then started again, there could still be a */ - /* recv request pending. */ - if (!(handle->flags & UV_HANDLE_READ_PENDING)) - uv_udp_queue_recv(loop, handle); - - return 0; -} - - -int uv__udp_recv_stop(uv_udp_t* handle) { - if (handle->flags & UV_HANDLE_READING) { - handle->flags &= ~UV_HANDLE_READING; - handle->loop->active_udp_streams--; - DECREASE_ACTIVE_COUNT(loop, handle); - } - - return 0; -} - - -static int uv__send(uv_udp_send_t* req, - uv_udp_t* handle, - const uv_buf_t bufs[], - unsigned int nbufs, - const struct sockaddr* addr, - unsigned int addrlen, - uv_udp_send_cb cb) { - uv_loop_t* loop = handle->loop; - DWORD result, bytes; - - uv_req_init(loop, (uv_req_t*) req); - req->type = UV_UDP_SEND; - req->handle = handle; - req->cb = cb; - memset(&req->u.io.overlapped, 0, sizeof(req->u.io.overlapped)); - - result = WSASendTo(handle->socket, - (WSABUF*)bufs, - nbufs, - &bytes, - 0, - addr, - addrlen, - &req->u.io.overlapped, - NULL); - - if (UV_SUCCEEDED_WITHOUT_IOCP(result == 0)) { - /* Request completed immediately. */ - req->u.io.queued_bytes = 0; - handle->reqs_pending++; - handle->send_queue_size += req->u.io.queued_bytes; - handle->send_queue_count++; - REGISTER_HANDLE_REQ(loop, handle, req); - uv_insert_pending_req(loop, (uv_req_t*)req); - } else if (UV_SUCCEEDED_WITH_IOCP(result == 0)) { - /* Request queued by the kernel. */ - req->u.io.queued_bytes = uv__count_bufs(bufs, nbufs); - handle->reqs_pending++; - handle->send_queue_size += req->u.io.queued_bytes; - handle->send_queue_count++; - REGISTER_HANDLE_REQ(loop, handle, req); - } else { - /* Send failed due to an error. */ - return WSAGetLastError(); - } - - return 0; -} - - -void uv_process_udp_recv_req(uv_loop_t* loop, uv_udp_t* handle, - uv_req_t* req) { - uv_buf_t buf; - int partial; - - assert(handle->type == UV_UDP); - - handle->flags &= ~UV_HANDLE_READ_PENDING; - - if (!REQ_SUCCESS(req)) { - DWORD err = GET_REQ_SOCK_ERROR(req); - if (err == WSAEMSGSIZE) { - /* Not a real error, it just indicates that the received packet */ - /* was bigger than the receive buffer. */ - } else if (err == WSAECONNRESET || err == WSAENETRESET) { - /* A previous sendto operation failed; ignore this error. If */ - /* zero-reading we need to call WSARecv/WSARecvFrom _without_ the */ - /* MSG_PEEK flag to clear out the error queue. For nonzero reads, */ - /* immediately queue a new receive. */ - if (!(handle->flags & UV_HANDLE_ZERO_READ)) { - goto done; - } - } else { - /* A real error occurred. Report the error to the user only if we're */ - /* currently reading. */ - if (handle->flags & UV_HANDLE_READING) { - uv_udp_recv_stop(handle); - buf = (handle->flags & UV_HANDLE_ZERO_READ) ? - uv_buf_init(NULL, 0) : handle->recv_buffer; - handle->recv_cb(handle, uv_translate_sys_error(err), &buf, NULL, 0); - } - goto done; - } - } - - if (!(handle->flags & UV_HANDLE_ZERO_READ)) { - /* Successful read */ - partial = !REQ_SUCCESS(req); - handle->recv_cb(handle, - req->u.io.overlapped.InternalHigh, - &handle->recv_buffer, - (const struct sockaddr*) &handle->recv_from, - partial ? UV_UDP_PARTIAL : 0); - } else if (handle->flags & UV_HANDLE_READING) { - DWORD bytes, err, flags; - struct sockaddr_storage from; - int from_len; - - /* Do a nonblocking receive */ - /* TODO: try to read multiple datagrams at once. FIONREAD maybe? */ - handle->alloc_cb((uv_handle_t*) handle, 65536, &buf); - if (buf.len == 0) { - handle->recv_cb(handle, UV_ENOBUFS, &buf, NULL, 0); - goto done; - } - assert(buf.base != NULL); - - memset(&from, 0, sizeof from); - from_len = sizeof from; - - flags = 0; - - if (WSARecvFrom(handle->socket, - (WSABUF*)&buf, - 1, - &bytes, - &flags, - (struct sockaddr*) &from, - &from_len, - NULL, - NULL) != SOCKET_ERROR) { - - /* Message received */ - handle->recv_cb(handle, bytes, &buf, (const struct sockaddr*) &from, 0); - } else { - err = WSAGetLastError(); - if (err == WSAEMSGSIZE) { - /* Message truncated */ - handle->recv_cb(handle, - bytes, - &buf, - (const struct sockaddr*) &from, - UV_UDP_PARTIAL); - } else if (err == WSAEWOULDBLOCK) { - /* Kernel buffer empty */ - handle->recv_cb(handle, 0, &buf, NULL, 0); - } else if (err == WSAECONNRESET || err == WSAENETRESET) { - /* WSAECONNRESET/WSANETRESET is ignored because this just indicates - * that a previous sendto operation failed. - */ - handle->recv_cb(handle, 0, &buf, NULL, 0); - } else { - /* Any other error that we want to report back to the user. */ - uv_udp_recv_stop(handle); - handle->recv_cb(handle, uv_translate_sys_error(err), &buf, NULL, 0); - } - } - } - -done: - /* Post another read if still reading and not closing. */ - if ((handle->flags & UV_HANDLE_READING) && - !(handle->flags & UV_HANDLE_READ_PENDING)) { - uv_udp_queue_recv(loop, handle); - } - - DECREASE_PENDING_REQ_COUNT(handle); -} - - -void uv_process_udp_send_req(uv_loop_t* loop, uv_udp_t* handle, - uv_udp_send_t* req) { - int err; - - assert(handle->type == UV_UDP); - - assert(handle->send_queue_size >= req->u.io.queued_bytes); - assert(handle->send_queue_count >= 1); - handle->send_queue_size -= req->u.io.queued_bytes; - handle->send_queue_count--; - - UNREGISTER_HANDLE_REQ(loop, handle, req); - - if (req->cb) { - err = 0; - if (!REQ_SUCCESS(req)) { - err = GET_REQ_SOCK_ERROR(req); - } - req->cb(req, uv_translate_sys_error(err)); - } - - DECREASE_PENDING_REQ_COUNT(handle); -} - - -static int uv__udp_set_membership4(uv_udp_t* handle, - const struct sockaddr_in* multicast_addr, - const char* interface_addr, - uv_membership membership) { - int err; - int optname; - struct ip_mreq mreq; - - if (handle->flags & UV_HANDLE_IPV6) - return UV_EINVAL; - - /* If the socket is unbound, bind to inaddr_any. */ - err = uv_udp_maybe_bind(handle, - (const struct sockaddr*) &uv_addr_ip4_any_, - sizeof(uv_addr_ip4_any_), - UV_UDP_REUSEADDR); - if (err) - return uv_translate_sys_error(err); - - memset(&mreq, 0, sizeof mreq); - - if (interface_addr) { - err = uv_inet_pton(AF_INET, interface_addr, &mreq.imr_interface.s_addr); - if (err) - return err; - } else { - mreq.imr_interface.s_addr = htonl(INADDR_ANY); - } - - mreq.imr_multiaddr.s_addr = multicast_addr->sin_addr.s_addr; - - switch (membership) { - case UV_JOIN_GROUP: - optname = IP_ADD_MEMBERSHIP; - break; - case UV_LEAVE_GROUP: - optname = IP_DROP_MEMBERSHIP; - break; - default: - return UV_EINVAL; - } - - if (setsockopt(handle->socket, - IPPROTO_IP, - optname, - (char*) &mreq, - sizeof mreq) == SOCKET_ERROR) { - return uv_translate_sys_error(WSAGetLastError()); - } - - return 0; -} - - -int uv__udp_set_membership6(uv_udp_t* handle, - const struct sockaddr_in6* multicast_addr, - const char* interface_addr, - uv_membership membership) { - int optname; - int err; - struct ipv6_mreq mreq; - struct sockaddr_in6 addr6; - - if ((handle->flags & UV_HANDLE_BOUND) && !(handle->flags & UV_HANDLE_IPV6)) - return UV_EINVAL; - - err = uv_udp_maybe_bind(handle, - (const struct sockaddr*) &uv_addr_ip6_any_, - sizeof(uv_addr_ip6_any_), - UV_UDP_REUSEADDR); - - if (err) - return uv_translate_sys_error(err); - - memset(&mreq, 0, sizeof(mreq)); - - if (interface_addr) { - if (uv_ip6_addr(interface_addr, 0, &addr6)) - return UV_EINVAL; - mreq.ipv6mr_interface = addr6.sin6_scope_id; - } else { - mreq.ipv6mr_interface = 0; - } - - mreq.ipv6mr_multiaddr = multicast_addr->sin6_addr; - - switch (membership) { - case UV_JOIN_GROUP: - optname = IPV6_ADD_MEMBERSHIP; - break; - case UV_LEAVE_GROUP: - optname = IPV6_DROP_MEMBERSHIP; - break; - default: - return UV_EINVAL; - } - - if (setsockopt(handle->socket, - IPPROTO_IPV6, - optname, - (char*) &mreq, - sizeof mreq) == SOCKET_ERROR) { - return uv_translate_sys_error(WSAGetLastError()); - } - - return 0; -} - - -int uv_udp_set_membership(uv_udp_t* handle, - const char* multicast_addr, - const char* interface_addr, - uv_membership membership) { - struct sockaddr_in addr4; - struct sockaddr_in6 addr6; - - if (uv_ip4_addr(multicast_addr, 0, &addr4) == 0) - return uv__udp_set_membership4(handle, &addr4, interface_addr, membership); - else if (uv_ip6_addr(multicast_addr, 0, &addr6) == 0) - return uv__udp_set_membership6(handle, &addr6, interface_addr, membership); - else - return UV_EINVAL; -} - - -int uv_udp_set_multicast_interface(uv_udp_t* handle, const char* interface_addr) { - struct sockaddr_storage addr_st; - struct sockaddr_in* addr4; - struct sockaddr_in6* addr6; - - addr4 = (struct sockaddr_in*) &addr_st; - addr6 = (struct sockaddr_in6*) &addr_st; - - if (!interface_addr) { - memset(&addr_st, 0, sizeof addr_st); - if (handle->flags & UV_HANDLE_IPV6) { - addr_st.ss_family = AF_INET6; - addr6->sin6_scope_id = 0; - } else { - addr_st.ss_family = AF_INET; - addr4->sin_addr.s_addr = htonl(INADDR_ANY); - } - } else if (uv_ip4_addr(interface_addr, 0, addr4) == 0) { - /* nothing, address was parsed */ - } else if (uv_ip6_addr(interface_addr, 0, addr6) == 0) { - /* nothing, address was parsed */ - } else { - return UV_EINVAL; - } - - if (!(handle->flags & UV_HANDLE_BOUND)) - return UV_EBADF; - - if (addr_st.ss_family == AF_INET) { - if (setsockopt(handle->socket, - IPPROTO_IP, - IP_MULTICAST_IF, - (char*) &addr4->sin_addr, - sizeof(addr4->sin_addr)) == SOCKET_ERROR) { - return uv_translate_sys_error(WSAGetLastError()); - } - } else if (addr_st.ss_family == AF_INET6) { - if (setsockopt(handle->socket, - IPPROTO_IPV6, - IPV6_MULTICAST_IF, - (char*) &addr6->sin6_scope_id, - sizeof(addr6->sin6_scope_id)) == SOCKET_ERROR) { - return uv_translate_sys_error(WSAGetLastError()); - } - } else { - assert(0 && "unexpected address family"); - abort(); - } - - return 0; -} - - -int uv_udp_set_broadcast(uv_udp_t* handle, int value) { - BOOL optval = (BOOL) value; - - if (!(handle->flags & UV_HANDLE_BOUND)) - return UV_EBADF; - - if (setsockopt(handle->socket, - SOL_SOCKET, - SO_BROADCAST, - (char*) &optval, - sizeof optval)) { - return uv_translate_sys_error(WSAGetLastError()); - } - - return 0; -} - - -int uv_udp_open(uv_udp_t* handle, uv_os_sock_t sock) { - WSAPROTOCOL_INFOW protocol_info; - int opt_len; - int err; - - /* Detect the address family of the socket. */ - opt_len = (int) sizeof protocol_info; - if (getsockopt(sock, - SOL_SOCKET, - SO_PROTOCOL_INFOW, - (char*) &protocol_info, - &opt_len) == SOCKET_ERROR) { - return uv_translate_sys_error(GetLastError()); - } - - err = uv_udp_set_socket(handle->loop, - handle, - sock, - protocol_info.iAddressFamily); - return uv_translate_sys_error(err); -} - - -#define SOCKOPT_SETTER(name, option4, option6, validate) \ - int uv_udp_set_##name(uv_udp_t* handle, int value) { \ - DWORD optval = (DWORD) value; \ - \ - if (!(validate(value))) { \ - return UV_EINVAL; \ - } \ - \ - if (!(handle->flags & UV_HANDLE_BOUND)) \ - return UV_EBADF; \ - \ - if (!(handle->flags & UV_HANDLE_IPV6)) { \ - /* Set IPv4 socket option */ \ - if (setsockopt(handle->socket, \ - IPPROTO_IP, \ - option4, \ - (char*) &optval, \ - sizeof optval)) { \ - return uv_translate_sys_error(WSAGetLastError()); \ - } \ - } else { \ - /* Set IPv6 socket option */ \ - if (setsockopt(handle->socket, \ - IPPROTO_IPV6, \ - option6, \ - (char*) &optval, \ - sizeof optval)) { \ - return uv_translate_sys_error(WSAGetLastError()); \ - } \ - } \ - return 0; \ - } - -#define VALIDATE_TTL(value) ((value) >= 1 && (value) <= 255) -#define VALIDATE_MULTICAST_TTL(value) ((value) >= -1 && (value) <= 255) -#define VALIDATE_MULTICAST_LOOP(value) (1) - -SOCKOPT_SETTER(ttl, - IP_TTL, - IPV6_HOPLIMIT, - VALIDATE_TTL) -SOCKOPT_SETTER(multicast_ttl, - IP_MULTICAST_TTL, - IPV6_MULTICAST_HOPS, - VALIDATE_MULTICAST_TTL) -SOCKOPT_SETTER(multicast_loop, - IP_MULTICAST_LOOP, - IPV6_MULTICAST_LOOP, - VALIDATE_MULTICAST_LOOP) - -#undef SOCKOPT_SETTER -#undef VALIDATE_TTL -#undef VALIDATE_MULTICAST_TTL -#undef VALIDATE_MULTICAST_LOOP - - -/* This function is an egress point, i.e. it returns libuv errors rather than - * system errors. - */ -int uv__udp_bind(uv_udp_t* handle, - const struct sockaddr* addr, - unsigned int addrlen, - unsigned int flags) { - int err; - - err = uv_udp_maybe_bind(handle, addr, addrlen, flags); - if (err) - return uv_translate_sys_error(err); - - return 0; -} - - -/* This function is an egress point, i.e. it returns libuv errors rather than - * system errors. - */ -int uv__udp_send(uv_udp_send_t* req, - uv_udp_t* handle, - const uv_buf_t bufs[], - unsigned int nbufs, - const struct sockaddr* addr, - unsigned int addrlen, - uv_udp_send_cb send_cb) { - const struct sockaddr* bind_addr; - int err; - - if (!(handle->flags & UV_HANDLE_BOUND)) { - if (addrlen == sizeof(uv_addr_ip4_any_)) { - bind_addr = (const struct sockaddr*) &uv_addr_ip4_any_; - } else if (addrlen == sizeof(uv_addr_ip6_any_)) { - bind_addr = (const struct sockaddr*) &uv_addr_ip6_any_; - } else { - abort(); - } - err = uv_udp_maybe_bind(handle, bind_addr, addrlen, 0); - if (err) - return uv_translate_sys_error(err); - } - - err = uv__send(req, handle, bufs, nbufs, addr, addrlen, send_cb); - if (err) - return uv_translate_sys_error(err); - - return 0; -} - - -int uv__udp_try_send(uv_udp_t* handle, - const uv_buf_t bufs[], - unsigned int nbufs, - const struct sockaddr* addr, - unsigned int addrlen) { - return UV_ENOSYS; -} diff --git a/outside/libuv-v1.7.5/src/win/util.c b/outside/libuv-v1.7.5/src/win/util.c deleted file mode 100644 index a0d1307f8..000000000 --- a/outside/libuv-v1.7.5/src/win/util.c +++ /dev/null @@ -1,1220 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include -#include -#include -#include -#include -#include -#include - -#include "uv.h" -#include "internal.h" - -#include -#include -#include -#include -#include -#include -#include - - -/* - * Max title length; the only thing MSDN tells us about the maximum length - * of the console title is that it is smaller than 64K. However in practice - * it is much smaller, and there is no way to figure out what the exact length - * of the title is or can be, at least not on XP. To make it even more - * annoying, GetConsoleTitle fails when the buffer to be read into is bigger - * than the actual maximum length. So we make a conservative guess here; - * just don't put the novel you're writing in the title, unless the plot - * survives truncation. - */ -#define MAX_TITLE_LENGTH 8192 - -/* The number of nanoseconds in one second. */ -#define UV__NANOSEC 1000000000 - - -/* Cached copy of the process title, plus a mutex guarding it. */ -static char *process_title; -static CRITICAL_SECTION process_title_lock; - -/* Interval (in seconds) of the high-resolution clock. */ -static double hrtime_interval_ = 0; - - -/* - * One-time initialization code for functionality defined in util.c. - */ -void uv__util_init() { - LARGE_INTEGER perf_frequency; - - /* Initialize process title access mutex. */ - InitializeCriticalSection(&process_title_lock); - - /* Retrieve high-resolution timer frequency - * and precompute its reciprocal. - */ - if (QueryPerformanceFrequency(&perf_frequency)) { - hrtime_interval_ = 1.0 / perf_frequency.QuadPart; - } else { - hrtime_interval_= 0; - } -} - - -int uv_utf16_to_utf8(const WCHAR* utf16Buffer, size_t utf16Size, - char* utf8Buffer, size_t utf8Size) { - return WideCharToMultiByte(CP_UTF8, - 0, - utf16Buffer, - utf16Size, - utf8Buffer, - utf8Size, - NULL, - NULL); -} - - -int uv_utf8_to_utf16(const char* utf8Buffer, WCHAR* utf16Buffer, - size_t utf16Size) { - return MultiByteToWideChar(CP_UTF8, - 0, - utf8Buffer, - -1, - utf16Buffer, - utf16Size); -} - - -int uv_exepath(char* buffer, size_t* size_ptr) { - int utf8_len, utf16_buffer_len, utf16_len; - WCHAR* utf16_buffer; - int err; - - if (buffer == NULL || size_ptr == NULL || *size_ptr == 0) { - return UV_EINVAL; - } - - if (*size_ptr > 32768) { - /* Windows paths can never be longer than this. */ - utf16_buffer_len = 32768; - } else { - utf16_buffer_len = (int) *size_ptr; - } - - utf16_buffer = (WCHAR*) uv__malloc(sizeof(WCHAR) * utf16_buffer_len); - if (!utf16_buffer) { - return UV_ENOMEM; - } - - /* Get the path as UTF-16. */ - utf16_len = GetModuleFileNameW(NULL, utf16_buffer, utf16_buffer_len); - if (utf16_len <= 0) { - err = GetLastError(); - goto error; - } - - /* utf16_len contains the length, *not* including the terminating null. */ - utf16_buffer[utf16_len] = L'\0'; - - /* Convert to UTF-8 */ - utf8_len = WideCharToMultiByte(CP_UTF8, - 0, - utf16_buffer, - -1, - buffer, - *size_ptr > INT_MAX ? INT_MAX : (int) *size_ptr, - NULL, - NULL); - if (utf8_len == 0) { - err = GetLastError(); - goto error; - } - - uv__free(utf16_buffer); - - /* utf8_len *does* include the terminating null at this point, but the */ - /* returned size shouldn't. */ - *size_ptr = utf8_len - 1; - return 0; - - error: - uv__free(utf16_buffer); - return uv_translate_sys_error(err); -} - - -int uv_cwd(char* buffer, size_t* size) { - DWORD utf16_len; - WCHAR utf16_buffer[MAX_PATH]; - int r; - - if (buffer == NULL || size == NULL) { - return UV_EINVAL; - } - - utf16_len = GetCurrentDirectoryW(MAX_PATH, utf16_buffer); - if (utf16_len == 0) { - return uv_translate_sys_error(GetLastError()); - } else if (utf16_len > MAX_PATH) { - /* This should be impossible; however the CRT has a code path to deal */ - /* with this scenario, so I added a check anyway. */ - return UV_EIO; - } - - /* utf16_len contains the length, *not* including the terminating null. */ - utf16_buffer[utf16_len] = L'\0'; - - /* The returned directory should not have a trailing slash, unless it */ - /* points at a drive root, like c:\. Remove it if needed.*/ - if (utf16_buffer[utf16_len - 1] == L'\\' && - !(utf16_len == 3 && utf16_buffer[1] == L':')) { - utf16_len--; - utf16_buffer[utf16_len] = L'\0'; - } - - /* Check how much space we need */ - r = WideCharToMultiByte(CP_UTF8, - 0, - utf16_buffer, - -1, - NULL, - 0, - NULL, - NULL); - if (r == 0) { - return uv_translate_sys_error(GetLastError()); - } else if (r > (int) *size) { - *size = r -1; - return UV_ENOBUFS; - } - - /* Convert to UTF-8 */ - r = WideCharToMultiByte(CP_UTF8, - 0, - utf16_buffer, - -1, - buffer, - *size > INT_MAX ? INT_MAX : (int) *size, - NULL, - NULL); - if (r == 0) { - return uv_translate_sys_error(GetLastError()); - } - - *size = r - 1; - return 0; -} - - -int uv_chdir(const char* dir) { - WCHAR utf16_buffer[MAX_PATH]; - size_t utf16_len; - WCHAR drive_letter, env_var[4]; - - if (dir == NULL) { - return UV_EINVAL; - } - - if (MultiByteToWideChar(CP_UTF8, - 0, - dir, - -1, - utf16_buffer, - MAX_PATH) == 0) { - DWORD error = GetLastError(); - /* The maximum length of the current working directory is 260 chars, */ - /* including terminating null. If it doesn't fit, the path name must be */ - /* too long. */ - if (error == ERROR_INSUFFICIENT_BUFFER) { - return UV_ENAMETOOLONG; - } else { - return uv_translate_sys_error(error); - } - } - - if (!SetCurrentDirectoryW(utf16_buffer)) { - return uv_translate_sys_error(GetLastError()); - } - - /* Windows stores the drive-local path in an "hidden" environment variable, */ - /* which has the form "=C:=C:\Windows". SetCurrentDirectory does not */ - /* update this, so we'll have to do it. */ - utf16_len = GetCurrentDirectoryW(MAX_PATH, utf16_buffer); - if (utf16_len == 0) { - return uv_translate_sys_error(GetLastError()); - } else if (utf16_len > MAX_PATH) { - return UV_EIO; - } - - /* The returned directory should not have a trailing slash, unless it */ - /* points at a drive root, like c:\. Remove it if needed. */ - if (utf16_buffer[utf16_len - 1] == L'\\' && - !(utf16_len == 3 && utf16_buffer[1] == L':')) { - utf16_len--; - utf16_buffer[utf16_len] = L'\0'; - } - - if (utf16_len < 2 || utf16_buffer[1] != L':') { - /* Doesn't look like a drive letter could be there - probably an UNC */ - /* path. TODO: Need to handle win32 namespaces like \\?\C:\ ? */ - drive_letter = 0; - } else if (utf16_buffer[0] >= L'A' && utf16_buffer[0] <= L'Z') { - drive_letter = utf16_buffer[0]; - } else if (utf16_buffer[0] >= L'a' && utf16_buffer[0] <= L'z') { - /* Convert to uppercase. */ - drive_letter = utf16_buffer[0] - L'a' + L'A'; - } else { - /* Not valid. */ - drive_letter = 0; - } - - if (drive_letter != 0) { - /* Construct the environment variable name and set it. */ - env_var[0] = L'='; - env_var[1] = drive_letter; - env_var[2] = L':'; - env_var[3] = L'\0'; - - if (!SetEnvironmentVariableW(env_var, utf16_buffer)) { - return uv_translate_sys_error(GetLastError()); - } - } - - return 0; -} - - -void uv_loadavg(double avg[3]) { - /* Can't be implemented */ - avg[0] = avg[1] = avg[2] = 0; -} - - -uint64_t uv_get_free_memory(void) { - MEMORYSTATUSEX memory_status; - memory_status.dwLength = sizeof(memory_status); - - if (!GlobalMemoryStatusEx(&memory_status)) { - return -1; - } - - return (uint64_t)memory_status.ullAvailPhys; -} - - -uint64_t uv_get_total_memory(void) { - MEMORYSTATUSEX memory_status; - memory_status.dwLength = sizeof(memory_status); - - if (!GlobalMemoryStatusEx(&memory_status)) { - return -1; - } - - return (uint64_t)memory_status.ullTotalPhys; -} - - -int uv_parent_pid() { - int parent_pid = -1; - HANDLE handle; - PROCESSENTRY32 pe; - DWORD current_pid = GetCurrentProcessId(); - - pe.dwSize = sizeof(PROCESSENTRY32); - handle = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); - - if (Process32First(handle, &pe)) { - do { - if (pe.th32ProcessID == current_pid) { - parent_pid = pe.th32ParentProcessID; - break; - } - } while( Process32Next(handle, &pe)); - } - - CloseHandle(handle); - return parent_pid; -} - - -char** uv_setup_args(int argc, char** argv) { - return argv; -} - - -int uv_set_process_title(const char* title) { - int err; - int length; - WCHAR* title_w = NULL; - - uv__once_init(); - - /* Find out how big the buffer for the wide-char title must be */ - length = uv_utf8_to_utf16(title, NULL, 0); - if (!length) { - err = GetLastError(); - goto done; - } - - /* Convert to wide-char string */ - title_w = (WCHAR*)uv__malloc(sizeof(WCHAR) * length); - if (!title_w) { - uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc"); - } - - length = uv_utf8_to_utf16(title, title_w, length); - if (!length) { - err = GetLastError(); - goto done; - } - - /* If the title must be truncated insert a \0 terminator there */ - if (length > MAX_TITLE_LENGTH) { - title_w[MAX_TITLE_LENGTH - 1] = L'\0'; - } - - if (!SetConsoleTitleW(title_w)) { - err = GetLastError(); - goto done; - } - - EnterCriticalSection(&process_title_lock); - uv__free(process_title); - process_title = uv__strdup(title); - LeaveCriticalSection(&process_title_lock); - - err = 0; - -done: - uv__free(title_w); - return uv_translate_sys_error(err); -} - - -static int uv__get_process_title() { - WCHAR title_w[MAX_TITLE_LENGTH]; - int length; - - if (!GetConsoleTitleW(title_w, sizeof(title_w) / sizeof(WCHAR))) { - return -1; - } - - /* Find out what the size of the buffer is that we need */ - length = uv_utf16_to_utf8(title_w, -1, NULL, 0); - if (!length) { - return -1; - } - - assert(!process_title); - process_title = (char*)uv__malloc(length); - if (!process_title) { - uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc"); - } - - /* Do utf16 -> utf8 conversion here */ - if (!uv_utf16_to_utf8(title_w, -1, process_title, length)) { - uv__free(process_title); - return -1; - } - - return 0; -} - - -int uv_get_process_title(char* buffer, size_t size) { - uv__once_init(); - - EnterCriticalSection(&process_title_lock); - /* - * If the process_title was never read before nor explicitly set, - * we must query it with getConsoleTitleW - */ - if (!process_title && uv__get_process_title() == -1) { - LeaveCriticalSection(&process_title_lock); - return uv_translate_sys_error(GetLastError()); - } - - assert(process_title); - strncpy(buffer, process_title, size); - LeaveCriticalSection(&process_title_lock); - - return 0; -} - - -uint64_t uv_hrtime(void) { - uv__once_init(); - return uv__hrtime(UV__NANOSEC); -} - -uint64_t uv__hrtime(double scale) { - LARGE_INTEGER counter; - - /* If the performance interval is zero, there's no support. */ - if (hrtime_interval_ == 0) { - return 0; - } - - if (!QueryPerformanceCounter(&counter)) { - return 0; - } - - /* Because we have no guarantee about the order of magnitude of the - * performance counter interval, integer math could cause this computation - * to overflow. Therefore we resort to floating point math. - */ - return (uint64_t) ((double) counter.QuadPart * hrtime_interval_ * scale); -} - - -int uv_resident_set_memory(size_t* rss) { - HANDLE current_process; - PROCESS_MEMORY_COUNTERS pmc; - - current_process = GetCurrentProcess(); - - if (!GetProcessMemoryInfo(current_process, &pmc, sizeof(pmc))) { - return uv_translate_sys_error(GetLastError()); - } - - *rss = pmc.WorkingSetSize; - - return 0; -} - - -int uv_uptime(double* uptime) { - BYTE stack_buffer[4096]; - BYTE* malloced_buffer = NULL; - BYTE* buffer = (BYTE*) stack_buffer; - size_t buffer_size = sizeof(stack_buffer); - DWORD data_size; - - PERF_DATA_BLOCK* data_block; - PERF_OBJECT_TYPE* object_type; - PERF_COUNTER_DEFINITION* counter_definition; - - DWORD i; - - for (;;) { - LONG result; - - data_size = (DWORD) buffer_size; - result = RegQueryValueExW(HKEY_PERFORMANCE_DATA, - L"2", - NULL, - NULL, - buffer, - &data_size); - if (result == ERROR_SUCCESS) { - break; - } else if (result != ERROR_MORE_DATA) { - *uptime = 0; - return uv_translate_sys_error(result); - } - - buffer_size *= 2; - /* Don't let the buffer grow infinitely. */ - if (buffer_size > 1 << 20) { - goto internalError; - } - - uv__free(malloced_buffer); - - buffer = malloced_buffer = (BYTE*) uv__malloc(buffer_size); - if (malloced_buffer == NULL) { - *uptime = 0; - return UV_ENOMEM; - } - } - - if (data_size < sizeof(*data_block)) - goto internalError; - - data_block = (PERF_DATA_BLOCK*) buffer; - - if (wmemcmp(data_block->Signature, L"PERF", 4) != 0) - goto internalError; - - if (data_size < data_block->HeaderLength + sizeof(*object_type)) - goto internalError; - - object_type = (PERF_OBJECT_TYPE*) (buffer + data_block->HeaderLength); - - if (object_type->NumInstances != PERF_NO_INSTANCES) - goto internalError; - - counter_definition = (PERF_COUNTER_DEFINITION*) (buffer + - data_block->HeaderLength + object_type->HeaderLength); - for (i = 0; i < object_type->NumCounters; i++) { - if ((BYTE*) counter_definition + sizeof(*counter_definition) > - buffer + data_size) { - break; - } - - if (counter_definition->CounterNameTitleIndex == 674 && - counter_definition->CounterSize == sizeof(uint64_t)) { - if (counter_definition->CounterOffset + sizeof(uint64_t) > data_size || - !(counter_definition->CounterType & PERF_OBJECT_TIMER)) { - goto internalError; - } else { - BYTE* address = (BYTE*) object_type + object_type->DefinitionLength + - counter_definition->CounterOffset; - uint64_t value = *((uint64_t*) address); - *uptime = (double) (object_type->PerfTime.QuadPart - value) / - (double) object_type->PerfFreq.QuadPart; - uv__free(malloced_buffer); - return 0; - } - } - - counter_definition = (PERF_COUNTER_DEFINITION*) - ((BYTE*) counter_definition + counter_definition->ByteLength); - } - - /* If we get here, the uptime value was not found. */ - uv__free(malloced_buffer); - *uptime = 0; - return UV_ENOSYS; - - internalError: - uv__free(malloced_buffer); - *uptime = 0; - return UV_EIO; -} - - -int uv_cpu_info(uv_cpu_info_t** cpu_infos_ptr, int* cpu_count_ptr) { - uv_cpu_info_t* cpu_infos; - SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION* sppi; - DWORD sppi_size; - SYSTEM_INFO system_info; - DWORD cpu_count, r, i; - NTSTATUS status; - ULONG result_size; - int err; - uv_cpu_info_t* cpu_info; - - cpu_infos = NULL; - cpu_count = 0; - sppi = NULL; - - uv__once_init(); - - GetSystemInfo(&system_info); - cpu_count = system_info.dwNumberOfProcessors; - - cpu_infos = uv__calloc(cpu_count, sizeof *cpu_infos); - if (cpu_infos == NULL) { - err = ERROR_OUTOFMEMORY; - goto error; - } - - sppi_size = cpu_count * sizeof(*sppi); - sppi = uv__malloc(sppi_size); - if (sppi == NULL) { - err = ERROR_OUTOFMEMORY; - goto error; - } - - status = pNtQuerySystemInformation(SystemProcessorPerformanceInformation, - sppi, - sppi_size, - &result_size); - if (!NT_SUCCESS(status)) { - err = pRtlNtStatusToDosError(status); - goto error; - } - - assert(result_size == sppi_size); - - for (i = 0; i < cpu_count; i++) { - WCHAR key_name[128]; - HKEY processor_key; - DWORD cpu_speed; - DWORD cpu_speed_size = sizeof(cpu_speed); - WCHAR cpu_brand[256]; - DWORD cpu_brand_size = sizeof(cpu_brand); - size_t len; - - len = _snwprintf(key_name, - ARRAY_SIZE(key_name), - L"HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\%d", - i); - - assert(len > 0 && len < ARRAY_SIZE(key_name)); - - r = RegOpenKeyExW(HKEY_LOCAL_MACHINE, - key_name, - 0, - KEY_QUERY_VALUE, - &processor_key); - if (r != ERROR_SUCCESS) { - err = GetLastError(); - goto error; - } - - if (RegQueryValueExW(processor_key, - L"~MHz", - NULL, - NULL, - (BYTE*) &cpu_speed, - &cpu_speed_size) != ERROR_SUCCESS) { - err = GetLastError(); - RegCloseKey(processor_key); - goto error; - } - - if (RegQueryValueExW(processor_key, - L"ProcessorNameString", - NULL, - NULL, - (BYTE*) &cpu_brand, - &cpu_brand_size) != ERROR_SUCCESS) { - err = GetLastError(); - RegCloseKey(processor_key); - goto error; - } - - RegCloseKey(processor_key); - - cpu_info = &cpu_infos[i]; - cpu_info->speed = cpu_speed; - cpu_info->cpu_times.user = sppi[i].UserTime.QuadPart / 10000; - cpu_info->cpu_times.sys = (sppi[i].KernelTime.QuadPart - - sppi[i].IdleTime.QuadPart) / 10000; - cpu_info->cpu_times.idle = sppi[i].IdleTime.QuadPart / 10000; - cpu_info->cpu_times.irq = sppi[i].InterruptTime.QuadPart / 10000; - cpu_info->cpu_times.nice = 0; - - - len = WideCharToMultiByte(CP_UTF8, - 0, - cpu_brand, - cpu_brand_size / sizeof(WCHAR), - NULL, - 0, - NULL, - NULL); - if (len == 0) { - err = GetLastError(); - goto error; - } - - assert(len > 0); - - /* Allocate 1 extra byte for the null terminator. */ - cpu_info->model = uv__malloc(len + 1); - if (cpu_info->model == NULL) { - err = ERROR_OUTOFMEMORY; - goto error; - } - - if (WideCharToMultiByte(CP_UTF8, - 0, - cpu_brand, - cpu_brand_size / sizeof(WCHAR), - cpu_info->model, - len, - NULL, - NULL) == 0) { - err = GetLastError(); - goto error; - } - - /* Ensure that cpu_info->model is null terminated. */ - cpu_info->model[len] = '\0'; - } - - uv__free(sppi); - - *cpu_count_ptr = cpu_count; - *cpu_infos_ptr = cpu_infos; - - return 0; - - error: - /* This is safe because the cpu_infos array is zeroed on allocation. */ - for (i = 0; i < cpu_count; i++) - uv__free(cpu_infos[i].model); - - uv__free(cpu_infos); - uv__free(sppi); - - return uv_translate_sys_error(err); -} - - -void uv_free_cpu_info(uv_cpu_info_t* cpu_infos, int count) { - int i; - - for (i = 0; i < count; i++) { - uv__free(cpu_infos[i].model); - } - - uv__free(cpu_infos); -} - - -static int is_windows_version_or_greater(DWORD os_major, - DWORD os_minor, - WORD service_pack_major, - WORD service_pack_minor) { - OSVERSIONINFOEX osvi; - DWORDLONG condition_mask = 0; - int op = VER_GREATER_EQUAL; - - /* Initialize the OSVERSIONINFOEX structure. */ - ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX)); - osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); - osvi.dwMajorVersion = os_major; - osvi.dwMinorVersion = os_minor; - osvi.wServicePackMajor = service_pack_major; - osvi.wServicePackMinor = service_pack_minor; - - /* Initialize the condition mask. */ - VER_SET_CONDITION(condition_mask, VER_MAJORVERSION, op); - VER_SET_CONDITION(condition_mask, VER_MINORVERSION, op); - VER_SET_CONDITION(condition_mask, VER_SERVICEPACKMAJOR, op); - VER_SET_CONDITION(condition_mask, VER_SERVICEPACKMINOR, op); - - /* Perform the test. */ - return (int) VerifyVersionInfo( - &osvi, - VER_MAJORVERSION | VER_MINORVERSION | - VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, - condition_mask); -} - - -static int address_prefix_match(int family, - struct sockaddr* address, - struct sockaddr* prefix_address, - int prefix_len) { - uint8_t* address_data; - uint8_t* prefix_address_data; - int i; - - assert(address->sa_family == family); - assert(prefix_address->sa_family == family); - - if (family == AF_INET6) { - address_data = (uint8_t*) &(((struct sockaddr_in6 *) address)->sin6_addr); - prefix_address_data = - (uint8_t*) &(((struct sockaddr_in6 *) prefix_address)->sin6_addr); - } else { - address_data = (uint8_t*) &(((struct sockaddr_in *) address)->sin_addr); - prefix_address_data = - (uint8_t*) &(((struct sockaddr_in *) prefix_address)->sin_addr); - } - - for (i = 0; i < prefix_len >> 3; i++) { - if (address_data[i] != prefix_address_data[i]) - return 0; - } - - if (prefix_len % 8) - return prefix_address_data[i] == - (address_data[i] & (0xff << (8 - prefix_len % 8))); - - return 1; -} - - -int uv_interface_addresses(uv_interface_address_t** addresses_ptr, - int* count_ptr) { - IP_ADAPTER_ADDRESSES* win_address_buf; - ULONG win_address_buf_size; - IP_ADAPTER_ADDRESSES* adapter; - - uv_interface_address_t* uv_address_buf; - char* name_buf; - size_t uv_address_buf_size; - uv_interface_address_t* uv_address; - - int count; - - int is_vista_or_greater; - ULONG flags; - - is_vista_or_greater = is_windows_version_or_greater(6, 0, 0, 0); - if (is_vista_or_greater) { - flags = GAA_FLAG_SKIP_ANYCAST | GAA_FLAG_SKIP_MULTICAST | - GAA_FLAG_SKIP_DNS_SERVER; - } else { - /* We need at least XP SP1. */ - if (!is_windows_version_or_greater(5, 1, 1, 0)) - return UV_ENOTSUP; - - flags = GAA_FLAG_SKIP_ANYCAST | GAA_FLAG_SKIP_MULTICAST | - GAA_FLAG_SKIP_DNS_SERVER | GAA_FLAG_INCLUDE_PREFIX; - } - - - /* Fetch the size of the adapters reported by windows, and then get the */ - /* list itself. */ - win_address_buf_size = 0; - win_address_buf = NULL; - - for (;;) { - ULONG r; - - /* If win_address_buf is 0, then GetAdaptersAddresses will fail with */ - /* ERROR_BUFFER_OVERFLOW, and the required buffer size will be stored in */ - /* win_address_buf_size. */ - r = GetAdaptersAddresses(AF_UNSPEC, - flags, - NULL, - win_address_buf, - &win_address_buf_size); - - if (r == ERROR_SUCCESS) - break; - - uv__free(win_address_buf); - - switch (r) { - case ERROR_BUFFER_OVERFLOW: - /* This happens when win_address_buf is NULL or too small to hold */ - /* all adapters. */ - win_address_buf = uv__malloc(win_address_buf_size); - if (win_address_buf == NULL) - return UV_ENOMEM; - - continue; - - case ERROR_NO_DATA: { - /* No adapters were found. */ - uv_address_buf = uv__malloc(1); - if (uv_address_buf == NULL) - return UV_ENOMEM; - - *count_ptr = 0; - *addresses_ptr = uv_address_buf; - - return 0; - } - - case ERROR_ADDRESS_NOT_ASSOCIATED: - return UV_EAGAIN; - - case ERROR_INVALID_PARAMETER: - /* MSDN says: - * "This error is returned for any of the following conditions: the - * SizePointer parameter is NULL, the Address parameter is not - * AF_INET, AF_INET6, or AF_UNSPEC, or the address information for - * the parameters requested is greater than ULONG_MAX." - * Since the first two conditions are not met, it must be that the - * adapter data is too big. - */ - return UV_ENOBUFS; - - default: - /* Other (unspecified) errors can happen, but we don't have any */ - /* special meaning for them. */ - assert(r != ERROR_SUCCESS); - return uv_translate_sys_error(r); - } - } - - /* Count the number of enabled interfaces and compute how much space is */ - /* needed to store their info. */ - count = 0; - uv_address_buf_size = 0; - - for (adapter = win_address_buf; - adapter != NULL; - adapter = adapter->Next) { - IP_ADAPTER_UNICAST_ADDRESS* unicast_address; - int name_size; - - /* Interfaces that are not 'up' should not be reported. Also skip */ - /* interfaces that have no associated unicast address, as to avoid */ - /* allocating space for the name for this interface. */ - if (adapter->OperStatus != IfOperStatusUp || - adapter->FirstUnicastAddress == NULL) - continue; - - /* Compute the size of the interface name. */ - name_size = WideCharToMultiByte(CP_UTF8, - 0, - adapter->FriendlyName, - -1, - NULL, - 0, - NULL, - FALSE); - if (name_size <= 0) { - uv__free(win_address_buf); - return uv_translate_sys_error(GetLastError()); - } - uv_address_buf_size += name_size; - - /* Count the number of addresses associated with this interface, and */ - /* compute the size. */ - for (unicast_address = (IP_ADAPTER_UNICAST_ADDRESS*) - adapter->FirstUnicastAddress; - unicast_address != NULL; - unicast_address = unicast_address->Next) { - count++; - uv_address_buf_size += sizeof(uv_interface_address_t); - } - } - - /* Allocate space to store interface data plus adapter names. */ - uv_address_buf = uv__malloc(uv_address_buf_size); - if (uv_address_buf == NULL) { - uv__free(win_address_buf); - return UV_ENOMEM; - } - - /* Compute the start of the uv_interface_address_t array, and the place in */ - /* the buffer where the interface names will be stored. */ - uv_address = uv_address_buf; - name_buf = (char*) (uv_address_buf + count); - - /* Fill out the output buffer. */ - for (adapter = win_address_buf; - adapter != NULL; - adapter = adapter->Next) { - IP_ADAPTER_UNICAST_ADDRESS* unicast_address; - int name_size; - size_t max_name_size; - - if (adapter->OperStatus != IfOperStatusUp || - adapter->FirstUnicastAddress == NULL) - continue; - - /* Convert the interface name to UTF8. */ - max_name_size = (char*) uv_address_buf + uv_address_buf_size - name_buf; - if (max_name_size > (size_t) INT_MAX) - max_name_size = INT_MAX; - name_size = WideCharToMultiByte(CP_UTF8, - 0, - adapter->FriendlyName, - -1, - name_buf, - (int) max_name_size, - NULL, - FALSE); - if (name_size <= 0) { - uv__free(win_address_buf); - uv__free(uv_address_buf); - return uv_translate_sys_error(GetLastError()); - } - - /* Add an uv_interface_address_t element for every unicast address. */ - for (unicast_address = (IP_ADAPTER_UNICAST_ADDRESS*) - adapter->FirstUnicastAddress; - unicast_address != NULL; - unicast_address = unicast_address->Next) { - struct sockaddr* sa; - ULONG prefix_len; - - sa = unicast_address->Address.lpSockaddr; - - /* XP has no OnLinkPrefixLength field. */ - if (is_vista_or_greater) { - prefix_len = - ((IP_ADAPTER_UNICAST_ADDRESS_LH*) unicast_address)->OnLinkPrefixLength; - } else { - /* Prior to Windows Vista the FirstPrefix pointed to the list with - * single prefix for each IP address assigned to the adapter. - * Order of FirstPrefix does not match order of FirstUnicastAddress, - * so we need to find corresponding prefix. - */ - IP_ADAPTER_PREFIX* prefix; - prefix_len = 0; - - for (prefix = adapter->FirstPrefix; prefix; prefix = prefix->Next) { - /* We want the longest matching prefix. */ - if (prefix->Address.lpSockaddr->sa_family != sa->sa_family || - prefix->PrefixLength <= prefix_len) - continue; - - if (address_prefix_match(sa->sa_family, sa, - prefix->Address.lpSockaddr, prefix->PrefixLength)) { - prefix_len = prefix->PrefixLength; - } - } - - /* If there is no matching prefix information, return a single-host - * subnet mask (e.g. 255.255.255.255 for IPv4). - */ - if (!prefix_len) - prefix_len = (sa->sa_family == AF_INET6) ? 128 : 32; - } - - memset(uv_address, 0, sizeof *uv_address); - - uv_address->name = name_buf; - - if (adapter->PhysicalAddressLength == sizeof(uv_address->phys_addr)) { - memcpy(uv_address->phys_addr, - adapter->PhysicalAddress, - sizeof(uv_address->phys_addr)); - } - - uv_address->is_internal = - (adapter->IfType == IF_TYPE_SOFTWARE_LOOPBACK); - - if (sa->sa_family == AF_INET6) { - uv_address->address.address6 = *((struct sockaddr_in6 *) sa); - - uv_address->netmask.netmask6.sin6_family = AF_INET6; - memset(uv_address->netmask.netmask6.sin6_addr.s6_addr, 0xff, prefix_len >> 3); - /* This check ensures that we don't write past the size of the data. */ - if (prefix_len % 8) { - uv_address->netmask.netmask6.sin6_addr.s6_addr[prefix_len >> 3] = - 0xff << (8 - prefix_len % 8); - } - - } else { - uv_address->address.address4 = *((struct sockaddr_in *) sa); - - uv_address->netmask.netmask4.sin_family = AF_INET; - uv_address->netmask.netmask4.sin_addr.s_addr = (prefix_len > 0) ? - htonl(0xffffffff << (32 - prefix_len)) : 0; - } - - uv_address++; - } - - name_buf += name_size; - } - - uv__free(win_address_buf); - - *addresses_ptr = uv_address_buf; - *count_ptr = count; - - return 0; -} - - -void uv_free_interface_addresses(uv_interface_address_t* addresses, - int count) { - uv__free(addresses); -} - - -int uv_getrusage(uv_rusage_t *uv_rusage) { - FILETIME createTime, exitTime, kernelTime, userTime; - SYSTEMTIME kernelSystemTime, userSystemTime; - int ret; - - ret = GetProcessTimes(GetCurrentProcess(), &createTime, &exitTime, &kernelTime, &userTime); - if (ret == 0) { - return uv_translate_sys_error(GetLastError()); - } - - ret = FileTimeToSystemTime(&kernelTime, &kernelSystemTime); - if (ret == 0) { - return uv_translate_sys_error(GetLastError()); - } - - ret = FileTimeToSystemTime(&userTime, &userSystemTime); - if (ret == 0) { - return uv_translate_sys_error(GetLastError()); - } - - memset(uv_rusage, 0, sizeof(*uv_rusage)); - - uv_rusage->ru_utime.tv_sec = userSystemTime.wHour * 3600 + - userSystemTime.wMinute * 60 + - userSystemTime.wSecond; - uv_rusage->ru_utime.tv_usec = userSystemTime.wMilliseconds * 1000; - - uv_rusage->ru_stime.tv_sec = kernelSystemTime.wHour * 3600 + - kernelSystemTime.wMinute * 60 + - kernelSystemTime.wSecond; - uv_rusage->ru_stime.tv_usec = kernelSystemTime.wMilliseconds * 1000; - - return 0; -} - - -int uv_os_homedir(char* buffer, size_t* size) { - HANDLE token; - wchar_t path[MAX_PATH]; - DWORD bufsize; - size_t len; - int r; - - if (buffer == NULL || size == NULL || *size == 0) - return UV_EINVAL; - - /* Check if the USERPROFILE environment variable is set first */ - len = GetEnvironmentVariableW(L"USERPROFILE", path, MAX_PATH); - - if (len == 0) { - r = GetLastError(); - /* Don't return an error if USERPROFILE was not found */ - if (r != ERROR_ENVVAR_NOT_FOUND) - return uv_translate_sys_error(r); - } else if (len > MAX_PATH) { - /* This should not be possible */ - return UV_EIO; - } else { - goto convert_buffer; - } - - /* USERPROFILE is not set, so call GetUserProfileDirectoryW() */ - if (OpenProcessToken(GetCurrentProcess(), TOKEN_READ, &token) == 0) - return uv_translate_sys_error(GetLastError()); - - bufsize = MAX_PATH; - if (!GetUserProfileDirectoryW(token, path, &bufsize)) { - r = GetLastError(); - CloseHandle(token); - - /* This should not be possible */ - if (r == ERROR_INSUFFICIENT_BUFFER) - return UV_EIO; - - return uv_translate_sys_error(r); - } - - CloseHandle(token); - -convert_buffer: - - /* Check how much space we need */ - bufsize = uv_utf16_to_utf8(path, -1, NULL, 0); - if (bufsize == 0) { - return uv_translate_sys_error(GetLastError()); - } else if (bufsize > *size) { - *size = bufsize - 1; - return UV_ENOBUFS; - } - - /* Convert to UTF-8 */ - bufsize = uv_utf16_to_utf8(path, -1, buffer, *size); - if (bufsize == 0) - return uv_translate_sys_error(GetLastError()); - - *size = bufsize - 1; - return 0; -} diff --git a/outside/libuv-v1.7.5/src/win/winapi.c b/outside/libuv-v1.7.5/src/win/winapi.c deleted file mode 100644 index b0b7fd825..000000000 --- a/outside/libuv-v1.7.5/src/win/winapi.c +++ /dev/null @@ -1,142 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include - -#include "uv.h" -#include "internal.h" - - -/* Ntdll function pointers */ -sRtlNtStatusToDosError pRtlNtStatusToDosError; -sNtDeviceIoControlFile pNtDeviceIoControlFile; -sNtQueryInformationFile pNtQueryInformationFile; -sNtSetInformationFile pNtSetInformationFile; -sNtQueryVolumeInformationFile pNtQueryVolumeInformationFile; -sNtQueryDirectoryFile pNtQueryDirectoryFile; -sNtQuerySystemInformation pNtQuerySystemInformation; - - -/* Kernel32 function pointers */ -sGetQueuedCompletionStatusEx pGetQueuedCompletionStatusEx; -sSetFileCompletionNotificationModes pSetFileCompletionNotificationModes; -sCreateSymbolicLinkW pCreateSymbolicLinkW; -sCancelIoEx pCancelIoEx; -sInitializeConditionVariable pInitializeConditionVariable; -sSleepConditionVariableCS pSleepConditionVariableCS; -sSleepConditionVariableSRW pSleepConditionVariableSRW; -sWakeAllConditionVariable pWakeAllConditionVariable; -sWakeConditionVariable pWakeConditionVariable; -sCancelSynchronousIo pCancelSynchronousIo; - - -void uv_winapi_init() { - HMODULE ntdll_module; - HMODULE kernel32_module; - - ntdll_module = GetModuleHandleA("ntdll.dll"); - if (ntdll_module == NULL) { - uv_fatal_error(GetLastError(), "GetModuleHandleA"); - } - - pRtlNtStatusToDosError = (sRtlNtStatusToDosError) GetProcAddress( - ntdll_module, - "RtlNtStatusToDosError"); - if (pRtlNtStatusToDosError == NULL) { - uv_fatal_error(GetLastError(), "GetProcAddress"); - } - - pNtDeviceIoControlFile = (sNtDeviceIoControlFile) GetProcAddress( - ntdll_module, - "NtDeviceIoControlFile"); - if (pNtDeviceIoControlFile == NULL) { - uv_fatal_error(GetLastError(), "GetProcAddress"); - } - - pNtQueryInformationFile = (sNtQueryInformationFile) GetProcAddress( - ntdll_module, - "NtQueryInformationFile"); - if (pNtQueryInformationFile == NULL) { - uv_fatal_error(GetLastError(), "GetProcAddress"); - } - - pNtSetInformationFile = (sNtSetInformationFile) GetProcAddress( - ntdll_module, - "NtSetInformationFile"); - if (pNtSetInformationFile == NULL) { - uv_fatal_error(GetLastError(), "GetProcAddress"); - } - - pNtQueryVolumeInformationFile = (sNtQueryVolumeInformationFile) - GetProcAddress(ntdll_module, "NtQueryVolumeInformationFile"); - if (pNtQueryVolumeInformationFile == NULL) { - uv_fatal_error(GetLastError(), "GetProcAddress"); - } - - pNtQueryDirectoryFile = (sNtQueryDirectoryFile) - GetProcAddress(ntdll_module, "NtQueryDirectoryFile"); - if (pNtQueryVolumeInformationFile == NULL) { - uv_fatal_error(GetLastError(), "GetProcAddress"); - } - - pNtQuerySystemInformation = (sNtQuerySystemInformation) GetProcAddress( - ntdll_module, - "NtQuerySystemInformation"); - if (pNtQuerySystemInformation == NULL) { - uv_fatal_error(GetLastError(), "GetProcAddress"); - } - - kernel32_module = GetModuleHandleA("kernel32.dll"); - if (kernel32_module == NULL) { - uv_fatal_error(GetLastError(), "GetModuleHandleA"); - } - - pGetQueuedCompletionStatusEx = (sGetQueuedCompletionStatusEx) GetProcAddress( - kernel32_module, - "GetQueuedCompletionStatusEx"); - - pSetFileCompletionNotificationModes = (sSetFileCompletionNotificationModes) - GetProcAddress(kernel32_module, "SetFileCompletionNotificationModes"); - - pCreateSymbolicLinkW = (sCreateSymbolicLinkW) - GetProcAddress(kernel32_module, "CreateSymbolicLinkW"); - - pCancelIoEx = (sCancelIoEx) - GetProcAddress(kernel32_module, "CancelIoEx"); - - pInitializeConditionVariable = (sInitializeConditionVariable) - GetProcAddress(kernel32_module, "InitializeConditionVariable"); - - pSleepConditionVariableCS = (sSleepConditionVariableCS) - GetProcAddress(kernel32_module, "SleepConditionVariableCS"); - - pSleepConditionVariableSRW = (sSleepConditionVariableSRW) - GetProcAddress(kernel32_module, "SleepConditionVariableSRW"); - - pWakeAllConditionVariable = (sWakeAllConditionVariable) - GetProcAddress(kernel32_module, "WakeAllConditionVariable"); - - pWakeConditionVariable = (sWakeConditionVariable) - GetProcAddress(kernel32_module, "WakeConditionVariable"); - - pCancelSynchronousIo = (sCancelSynchronousIo) - GetProcAddress(kernel32_module, "CancelSynchronousIo"); -} diff --git a/outside/libuv-v1.7.5/src/win/winapi.h b/outside/libuv-v1.7.5/src/win/winapi.h deleted file mode 100644 index 5bc79bcab..000000000 --- a/outside/libuv-v1.7.5/src/win/winapi.h +++ /dev/null @@ -1,4703 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#ifndef UV_WIN_WINAPI_H_ -#define UV_WIN_WINAPI_H_ - -#include - - -/* - * Ntdll headers - */ -#ifndef STATUS_SEVERITY_SUCCESS -# define STATUS_SEVERITY_SUCCESS 0x0 -#endif - -#ifndef STATUS_SEVERITY_INFORMATIONAL -# define STATUS_SEVERITY_INFORMATIONAL 0x1 -#endif - -#ifndef STATUS_SEVERITY_WARNING -# define STATUS_SEVERITY_WARNING 0x2 -#endif - -#ifndef STATUS_SEVERITY_ERROR -# define STATUS_SEVERITY_ERROR 0x3 -#endif - -#ifndef FACILITY_NTWIN32 -# define FACILITY_NTWIN32 0x7 -#endif - -#ifndef NT_SUCCESS -# define NT_SUCCESS(status) (((NTSTATUS) (status)) >= 0) -#endif - -#ifndef NT_INFORMATION -# define NT_INFORMATION(status) ((((ULONG) (status)) >> 30) == 1) -#endif - -#ifndef NT_WARNING -# define NT_WARNING(status) ((((ULONG) (status)) >> 30) == 2) -#endif - -#ifndef NT_ERROR -# define NT_ERROR(status) ((((ULONG) (status)) >> 30) == 3) -#endif - -#ifndef STATUS_SUCCESS -# define STATUS_SUCCESS ((NTSTATUS) 0x00000000L) -#endif - -#ifndef STATUS_WAIT_0 -# define STATUS_WAIT_0 ((NTSTATUS) 0x00000000L) -#endif - -#ifndef STATUS_WAIT_1 -# define STATUS_WAIT_1 ((NTSTATUS) 0x00000001L) -#endif - -#ifndef STATUS_WAIT_2 -# define STATUS_WAIT_2 ((NTSTATUS) 0x00000002L) -#endif - -#ifndef STATUS_WAIT_3 -# define STATUS_WAIT_3 ((NTSTATUS) 0x00000003L) -#endif - -#ifndef STATUS_WAIT_63 -# define STATUS_WAIT_63 ((NTSTATUS) 0x0000003FL) -#endif - -#ifndef STATUS_ABANDONED -# define STATUS_ABANDONED ((NTSTATUS) 0x00000080L) -#endif - -#ifndef STATUS_ABANDONED_WAIT_0 -# define STATUS_ABANDONED_WAIT_0 ((NTSTATUS) 0x00000080L) -#endif - -#ifndef STATUS_ABANDONED_WAIT_63 -# define STATUS_ABANDONED_WAIT_63 ((NTSTATUS) 0x000000BFL) -#endif - -#ifndef STATUS_USER_APC -# define STATUS_USER_APC ((NTSTATUS) 0x000000C0L) -#endif - -#ifndef STATUS_KERNEL_APC -# define STATUS_KERNEL_APC ((NTSTATUS) 0x00000100L) -#endif - -#ifndef STATUS_ALERTED -# define STATUS_ALERTED ((NTSTATUS) 0x00000101L) -#endif - -#ifndef STATUS_TIMEOUT -# define STATUS_TIMEOUT ((NTSTATUS) 0x00000102L) -#endif - -#ifndef STATUS_PENDING -# define STATUS_PENDING ((NTSTATUS) 0x00000103L) -#endif - -#ifndef STATUS_REPARSE -# define STATUS_REPARSE ((NTSTATUS) 0x00000104L) -#endif - -#ifndef STATUS_MORE_ENTRIES -# define STATUS_MORE_ENTRIES ((NTSTATUS) 0x00000105L) -#endif - -#ifndef STATUS_NOT_ALL_ASSIGNED -# define STATUS_NOT_ALL_ASSIGNED ((NTSTATUS) 0x00000106L) -#endif - -#ifndef STATUS_SOME_NOT_MAPPED -# define STATUS_SOME_NOT_MAPPED ((NTSTATUS) 0x00000107L) -#endif - -#ifndef STATUS_OPLOCK_BREAK_IN_PROGRESS -# define STATUS_OPLOCK_BREAK_IN_PROGRESS ((NTSTATUS) 0x00000108L) -#endif - -#ifndef STATUS_VOLUME_MOUNTED -# define STATUS_VOLUME_MOUNTED ((NTSTATUS) 0x00000109L) -#endif - -#ifndef STATUS_RXACT_COMMITTED -# define STATUS_RXACT_COMMITTED ((NTSTATUS) 0x0000010AL) -#endif - -#ifndef STATUS_NOTIFY_CLEANUP -# define STATUS_NOTIFY_CLEANUP ((NTSTATUS) 0x0000010BL) -#endif - -#ifndef STATUS_NOTIFY_ENUM_DIR -# define STATUS_NOTIFY_ENUM_DIR ((NTSTATUS) 0x0000010CL) -#endif - -#ifndef STATUS_NO_QUOTAS_FOR_ACCOUNT -# define STATUS_NO_QUOTAS_FOR_ACCOUNT ((NTSTATUS) 0x0000010DL) -#endif - -#ifndef STATUS_PRIMARY_TRANSPORT_CONNECT_FAILED -# define STATUS_PRIMARY_TRANSPORT_CONNECT_FAILED ((NTSTATUS) 0x0000010EL) -#endif - -#ifndef STATUS_PAGE_FAULT_TRANSITION -# define STATUS_PAGE_FAULT_TRANSITION ((NTSTATUS) 0x00000110L) -#endif - -#ifndef STATUS_PAGE_FAULT_DEMAND_ZERO -# define STATUS_PAGE_FAULT_DEMAND_ZERO ((NTSTATUS) 0x00000111L) -#endif - -#ifndef STATUS_PAGE_FAULT_COPY_ON_WRITE -# define STATUS_PAGE_FAULT_COPY_ON_WRITE ((NTSTATUS) 0x00000112L) -#endif - -#ifndef STATUS_PAGE_FAULT_GUARD_PAGE -# define STATUS_PAGE_FAULT_GUARD_PAGE ((NTSTATUS) 0x00000113L) -#endif - -#ifndef STATUS_PAGE_FAULT_PAGING_FILE -# define STATUS_PAGE_FAULT_PAGING_FILE ((NTSTATUS) 0x00000114L) -#endif - -#ifndef STATUS_CACHE_PAGE_LOCKED -# define STATUS_CACHE_PAGE_LOCKED ((NTSTATUS) 0x00000115L) -#endif - -#ifndef STATUS_CRASH_DUMP -# define STATUS_CRASH_DUMP ((NTSTATUS) 0x00000116L) -#endif - -#ifndef STATUS_BUFFER_ALL_ZEROS -# define STATUS_BUFFER_ALL_ZEROS ((NTSTATUS) 0x00000117L) -#endif - -#ifndef STATUS_REPARSE_OBJECT -# define STATUS_REPARSE_OBJECT ((NTSTATUS) 0x00000118L) -#endif - -#ifndef STATUS_RESOURCE_REQUIREMENTS_CHANGED -# define STATUS_RESOURCE_REQUIREMENTS_CHANGED ((NTSTATUS) 0x00000119L) -#endif - -#ifndef STATUS_TRANSLATION_COMPLETE -# define STATUS_TRANSLATION_COMPLETE ((NTSTATUS) 0x00000120L) -#endif - -#ifndef STATUS_DS_MEMBERSHIP_EVALUATED_LOCALLY -# define STATUS_DS_MEMBERSHIP_EVALUATED_LOCALLY ((NTSTATUS) 0x00000121L) -#endif - -#ifndef STATUS_NOTHING_TO_TERMINATE -# define STATUS_NOTHING_TO_TERMINATE ((NTSTATUS) 0x00000122L) -#endif - -#ifndef STATUS_PROCESS_NOT_IN_JOB -# define STATUS_PROCESS_NOT_IN_JOB ((NTSTATUS) 0x00000123L) -#endif - -#ifndef STATUS_PROCESS_IN_JOB -# define STATUS_PROCESS_IN_JOB ((NTSTATUS) 0x00000124L) -#endif - -#ifndef STATUS_VOLSNAP_HIBERNATE_READY -# define STATUS_VOLSNAP_HIBERNATE_READY ((NTSTATUS) 0x00000125L) -#endif - -#ifndef STATUS_FSFILTER_OP_COMPLETED_SUCCESSFULLY -# define STATUS_FSFILTER_OP_COMPLETED_SUCCESSFULLY ((NTSTATUS) 0x00000126L) -#endif - -#ifndef STATUS_INTERRUPT_VECTOR_ALREADY_CONNECTED -# define STATUS_INTERRUPT_VECTOR_ALREADY_CONNECTED ((NTSTATUS) 0x00000127L) -#endif - -#ifndef STATUS_INTERRUPT_STILL_CONNECTED -# define STATUS_INTERRUPT_STILL_CONNECTED ((NTSTATUS) 0x00000128L) -#endif - -#ifndef STATUS_PROCESS_CLONED -# define STATUS_PROCESS_CLONED ((NTSTATUS) 0x00000129L) -#endif - -#ifndef STATUS_FILE_LOCKED_WITH_ONLY_READERS -# define STATUS_FILE_LOCKED_WITH_ONLY_READERS ((NTSTATUS) 0x0000012AL) -#endif - -#ifndef STATUS_FILE_LOCKED_WITH_WRITERS -# define STATUS_FILE_LOCKED_WITH_WRITERS ((NTSTATUS) 0x0000012BL) -#endif - -#ifndef STATUS_RESOURCEMANAGER_READ_ONLY -# define STATUS_RESOURCEMANAGER_READ_ONLY ((NTSTATUS) 0x00000202L) -#endif - -#ifndef STATUS_RING_PREVIOUSLY_EMPTY -# define STATUS_RING_PREVIOUSLY_EMPTY ((NTSTATUS) 0x00000210L) -#endif - -#ifndef STATUS_RING_PREVIOUSLY_FULL -# define STATUS_RING_PREVIOUSLY_FULL ((NTSTATUS) 0x00000211L) -#endif - -#ifndef STATUS_RING_PREVIOUSLY_ABOVE_QUOTA -# define STATUS_RING_PREVIOUSLY_ABOVE_QUOTA ((NTSTATUS) 0x00000212L) -#endif - -#ifndef STATUS_RING_NEWLY_EMPTY -# define STATUS_RING_NEWLY_EMPTY ((NTSTATUS) 0x00000213L) -#endif - -#ifndef STATUS_RING_SIGNAL_OPPOSITE_ENDPOINT -# define STATUS_RING_SIGNAL_OPPOSITE_ENDPOINT ((NTSTATUS) 0x00000214L) -#endif - -#ifndef STATUS_OPLOCK_SWITCHED_TO_NEW_HANDLE -# define STATUS_OPLOCK_SWITCHED_TO_NEW_HANDLE ((NTSTATUS) 0x00000215L) -#endif - -#ifndef STATUS_OPLOCK_HANDLE_CLOSED -# define STATUS_OPLOCK_HANDLE_CLOSED ((NTSTATUS) 0x00000216L) -#endif - -#ifndef STATUS_WAIT_FOR_OPLOCK -# define STATUS_WAIT_FOR_OPLOCK ((NTSTATUS) 0x00000367L) -#endif - -#ifndef STATUS_OBJECT_NAME_EXISTS -# define STATUS_OBJECT_NAME_EXISTS ((NTSTATUS) 0x40000000L) -#endif - -#ifndef STATUS_THREAD_WAS_SUSPENDED -# define STATUS_THREAD_WAS_SUSPENDED ((NTSTATUS) 0x40000001L) -#endif - -#ifndef STATUS_WORKING_SET_LIMIT_RANGE -# define STATUS_WORKING_SET_LIMIT_RANGE ((NTSTATUS) 0x40000002L) -#endif - -#ifndef STATUS_IMAGE_NOT_AT_BASE -# define STATUS_IMAGE_NOT_AT_BASE ((NTSTATUS) 0x40000003L) -#endif - -#ifndef STATUS_RXACT_STATE_CREATED -# define STATUS_RXACT_STATE_CREATED ((NTSTATUS) 0x40000004L) -#endif - -#ifndef STATUS_SEGMENT_NOTIFICATION -# define STATUS_SEGMENT_NOTIFICATION ((NTSTATUS) 0x40000005L) -#endif - -#ifndef STATUS_LOCAL_USER_SESSION_KEY -# define STATUS_LOCAL_USER_SESSION_KEY ((NTSTATUS) 0x40000006L) -#endif - -#ifndef STATUS_BAD_CURRENT_DIRECTORY -# define STATUS_BAD_CURRENT_DIRECTORY ((NTSTATUS) 0x40000007L) -#endif - -#ifndef STATUS_SERIAL_MORE_WRITES -# define STATUS_SERIAL_MORE_WRITES ((NTSTATUS) 0x40000008L) -#endif - -#ifndef STATUS_REGISTRY_RECOVERED -# define STATUS_REGISTRY_RECOVERED ((NTSTATUS) 0x40000009L) -#endif - -#ifndef STATUS_FT_READ_RECOVERY_FROM_BACKUP -# define STATUS_FT_READ_RECOVERY_FROM_BACKUP ((NTSTATUS) 0x4000000AL) -#endif - -#ifndef STATUS_FT_WRITE_RECOVERY -# define STATUS_FT_WRITE_RECOVERY ((NTSTATUS) 0x4000000BL) -#endif - -#ifndef STATUS_SERIAL_COUNTER_TIMEOUT -# define STATUS_SERIAL_COUNTER_TIMEOUT ((NTSTATUS) 0x4000000CL) -#endif - -#ifndef STATUS_NULL_LM_PASSWORD -# define STATUS_NULL_LM_PASSWORD ((NTSTATUS) 0x4000000DL) -#endif - -#ifndef STATUS_IMAGE_MACHINE_TYPE_MISMATCH -# define STATUS_IMAGE_MACHINE_TYPE_MISMATCH ((NTSTATUS) 0x4000000EL) -#endif - -#ifndef STATUS_RECEIVE_PARTIAL -# define STATUS_RECEIVE_PARTIAL ((NTSTATUS) 0x4000000FL) -#endif - -#ifndef STATUS_RECEIVE_EXPEDITED -# define STATUS_RECEIVE_EXPEDITED ((NTSTATUS) 0x40000010L) -#endif - -#ifndef STATUS_RECEIVE_PARTIAL_EXPEDITED -# define STATUS_RECEIVE_PARTIAL_EXPEDITED ((NTSTATUS) 0x40000011L) -#endif - -#ifndef STATUS_EVENT_DONE -# define STATUS_EVENT_DONE ((NTSTATUS) 0x40000012L) -#endif - -#ifndef STATUS_EVENT_PENDING -# define STATUS_EVENT_PENDING ((NTSTATUS) 0x40000013L) -#endif - -#ifndef STATUS_CHECKING_FILE_SYSTEM -# define STATUS_CHECKING_FILE_SYSTEM ((NTSTATUS) 0x40000014L) -#endif - -#ifndef STATUS_FATAL_APP_EXIT -# define STATUS_FATAL_APP_EXIT ((NTSTATUS) 0x40000015L) -#endif - -#ifndef STATUS_PREDEFINED_HANDLE -# define STATUS_PREDEFINED_HANDLE ((NTSTATUS) 0x40000016L) -#endif - -#ifndef STATUS_WAS_UNLOCKED -# define STATUS_WAS_UNLOCKED ((NTSTATUS) 0x40000017L) -#endif - -#ifndef STATUS_SERVICE_NOTIFICATION -# define STATUS_SERVICE_NOTIFICATION ((NTSTATUS) 0x40000018L) -#endif - -#ifndef STATUS_WAS_LOCKED -# define STATUS_WAS_LOCKED ((NTSTATUS) 0x40000019L) -#endif - -#ifndef STATUS_LOG_HARD_ERROR -# define STATUS_LOG_HARD_ERROR ((NTSTATUS) 0x4000001AL) -#endif - -#ifndef STATUS_ALREADY_WIN32 -# define STATUS_ALREADY_WIN32 ((NTSTATUS) 0x4000001BL) -#endif - -#ifndef STATUS_WX86_UNSIMULATE -# define STATUS_WX86_UNSIMULATE ((NTSTATUS) 0x4000001CL) -#endif - -#ifndef STATUS_WX86_CONTINUE -# define STATUS_WX86_CONTINUE ((NTSTATUS) 0x4000001DL) -#endif - -#ifndef STATUS_WX86_SINGLE_STEP -# define STATUS_WX86_SINGLE_STEP ((NTSTATUS) 0x4000001EL) -#endif - -#ifndef STATUS_WX86_BREAKPOINT -# define STATUS_WX86_BREAKPOINT ((NTSTATUS) 0x4000001FL) -#endif - -#ifndef STATUS_WX86_EXCEPTION_CONTINUE -# define STATUS_WX86_EXCEPTION_CONTINUE ((NTSTATUS) 0x40000020L) -#endif - -#ifndef STATUS_WX86_EXCEPTION_LASTCHANCE -# define STATUS_WX86_EXCEPTION_LASTCHANCE ((NTSTATUS) 0x40000021L) -#endif - -#ifndef STATUS_WX86_EXCEPTION_CHAIN -# define STATUS_WX86_EXCEPTION_CHAIN ((NTSTATUS) 0x40000022L) -#endif - -#ifndef STATUS_IMAGE_MACHINE_TYPE_MISMATCH_EXE -# define STATUS_IMAGE_MACHINE_TYPE_MISMATCH_EXE ((NTSTATUS) 0x40000023L) -#endif - -#ifndef STATUS_NO_YIELD_PERFORMED -# define STATUS_NO_YIELD_PERFORMED ((NTSTATUS) 0x40000024L) -#endif - -#ifndef STATUS_TIMER_RESUME_IGNORED -# define STATUS_TIMER_RESUME_IGNORED ((NTSTATUS) 0x40000025L) -#endif - -#ifndef STATUS_ARBITRATION_UNHANDLED -# define STATUS_ARBITRATION_UNHANDLED ((NTSTATUS) 0x40000026L) -#endif - -#ifndef STATUS_CARDBUS_NOT_SUPPORTED -# define STATUS_CARDBUS_NOT_SUPPORTED ((NTSTATUS) 0x40000027L) -#endif - -#ifndef STATUS_WX86_CREATEWX86TIB -# define STATUS_WX86_CREATEWX86TIB ((NTSTATUS) 0x40000028L) -#endif - -#ifndef STATUS_MP_PROCESSOR_MISMATCH -# define STATUS_MP_PROCESSOR_MISMATCH ((NTSTATUS) 0x40000029L) -#endif - -#ifndef STATUS_HIBERNATED -# define STATUS_HIBERNATED ((NTSTATUS) 0x4000002AL) -#endif - -#ifndef STATUS_RESUME_HIBERNATION -# define STATUS_RESUME_HIBERNATION ((NTSTATUS) 0x4000002BL) -#endif - -#ifndef STATUS_FIRMWARE_UPDATED -# define STATUS_FIRMWARE_UPDATED ((NTSTATUS) 0x4000002CL) -#endif - -#ifndef STATUS_DRIVERS_LEAKING_LOCKED_PAGES -# define STATUS_DRIVERS_LEAKING_LOCKED_PAGES ((NTSTATUS) 0x4000002DL) -#endif - -#ifndef STATUS_MESSAGE_RETRIEVED -# define STATUS_MESSAGE_RETRIEVED ((NTSTATUS) 0x4000002EL) -#endif - -#ifndef STATUS_SYSTEM_POWERSTATE_TRANSITION -# define STATUS_SYSTEM_POWERSTATE_TRANSITION ((NTSTATUS) 0x4000002FL) -#endif - -#ifndef STATUS_ALPC_CHECK_COMPLETION_LIST -# define STATUS_ALPC_CHECK_COMPLETION_LIST ((NTSTATUS) 0x40000030L) -#endif - -#ifndef STATUS_SYSTEM_POWERSTATE_COMPLEX_TRANSITION -# define STATUS_SYSTEM_POWERSTATE_COMPLEX_TRANSITION ((NTSTATUS) 0x40000031L) -#endif - -#ifndef STATUS_ACCESS_AUDIT_BY_POLICY -# define STATUS_ACCESS_AUDIT_BY_POLICY ((NTSTATUS) 0x40000032L) -#endif - -#ifndef STATUS_ABANDON_HIBERFILE -# define STATUS_ABANDON_HIBERFILE ((NTSTATUS) 0x40000033L) -#endif - -#ifndef STATUS_BIZRULES_NOT_ENABLED -# define STATUS_BIZRULES_NOT_ENABLED ((NTSTATUS) 0x40000034L) -#endif - -#ifndef STATUS_GUARD_PAGE_VIOLATION -# define STATUS_GUARD_PAGE_VIOLATION ((NTSTATUS) 0x80000001L) -#endif - -#ifndef STATUS_DATATYPE_MISALIGNMENT -# define STATUS_DATATYPE_MISALIGNMENT ((NTSTATUS) 0x80000002L) -#endif - -#ifndef STATUS_BREAKPOINT -# define STATUS_BREAKPOINT ((NTSTATUS) 0x80000003L) -#endif - -#ifndef STATUS_SINGLE_STEP -# define STATUS_SINGLE_STEP ((NTSTATUS) 0x80000004L) -#endif - -#ifndef STATUS_BUFFER_OVERFLOW -# define STATUS_BUFFER_OVERFLOW ((NTSTATUS) 0x80000005L) -#endif - -#ifndef STATUS_NO_MORE_FILES -# define STATUS_NO_MORE_FILES ((NTSTATUS) 0x80000006L) -#endif - -#ifndef STATUS_WAKE_SYSTEM_DEBUGGER -# define STATUS_WAKE_SYSTEM_DEBUGGER ((NTSTATUS) 0x80000007L) -#endif - -#ifndef STATUS_HANDLES_CLOSED -# define STATUS_HANDLES_CLOSED ((NTSTATUS) 0x8000000AL) -#endif - -#ifndef STATUS_NO_INHERITANCE -# define STATUS_NO_INHERITANCE ((NTSTATUS) 0x8000000BL) -#endif - -#ifndef STATUS_GUID_SUBSTITUTION_MADE -# define STATUS_GUID_SUBSTITUTION_MADE ((NTSTATUS) 0x8000000CL) -#endif - -#ifndef STATUS_PARTIAL_COPY -# define STATUS_PARTIAL_COPY ((NTSTATUS) 0x8000000DL) -#endif - -#ifndef STATUS_DEVICE_PAPER_EMPTY -# define STATUS_DEVICE_PAPER_EMPTY ((NTSTATUS) 0x8000000EL) -#endif - -#ifndef STATUS_DEVICE_POWERED_OFF -# define STATUS_DEVICE_POWERED_OFF ((NTSTATUS) 0x8000000FL) -#endif - -#ifndef STATUS_DEVICE_OFF_LINE -# define STATUS_DEVICE_OFF_LINE ((NTSTATUS) 0x80000010L) -#endif - -#ifndef STATUS_DEVICE_BUSY -# define STATUS_DEVICE_BUSY ((NTSTATUS) 0x80000011L) -#endif - -#ifndef STATUS_NO_MORE_EAS -# define STATUS_NO_MORE_EAS ((NTSTATUS) 0x80000012L) -#endif - -#ifndef STATUS_INVALID_EA_NAME -# define STATUS_INVALID_EA_NAME ((NTSTATUS) 0x80000013L) -#endif - -#ifndef STATUS_EA_LIST_INCONSISTENT -# define STATUS_EA_LIST_INCONSISTENT ((NTSTATUS) 0x80000014L) -#endif - -#ifndef STATUS_INVALID_EA_FLAG -# define STATUS_INVALID_EA_FLAG ((NTSTATUS) 0x80000015L) -#endif - -#ifndef STATUS_VERIFY_REQUIRED -# define STATUS_VERIFY_REQUIRED ((NTSTATUS) 0x80000016L) -#endif - -#ifndef STATUS_EXTRANEOUS_INFORMATION -# define STATUS_EXTRANEOUS_INFORMATION ((NTSTATUS) 0x80000017L) -#endif - -#ifndef STATUS_RXACT_COMMIT_NECESSARY -# define STATUS_RXACT_COMMIT_NECESSARY ((NTSTATUS) 0x80000018L) -#endif - -#ifndef STATUS_NO_MORE_ENTRIES -# define STATUS_NO_MORE_ENTRIES ((NTSTATUS) 0x8000001AL) -#endif - -#ifndef STATUS_FILEMARK_DETECTED -# define STATUS_FILEMARK_DETECTED ((NTSTATUS) 0x8000001BL) -#endif - -#ifndef STATUS_MEDIA_CHANGED -# define STATUS_MEDIA_CHANGED ((NTSTATUS) 0x8000001CL) -#endif - -#ifndef STATUS_BUS_RESET -# define STATUS_BUS_RESET ((NTSTATUS) 0x8000001DL) -#endif - -#ifndef STATUS_END_OF_MEDIA -# define STATUS_END_OF_MEDIA ((NTSTATUS) 0x8000001EL) -#endif - -#ifndef STATUS_BEGINNING_OF_MEDIA -# define STATUS_BEGINNING_OF_MEDIA ((NTSTATUS) 0x8000001FL) -#endif - -#ifndef STATUS_MEDIA_CHECK -# define STATUS_MEDIA_CHECK ((NTSTATUS) 0x80000020L) -#endif - -#ifndef STATUS_SETMARK_DETECTED -# define STATUS_SETMARK_DETECTED ((NTSTATUS) 0x80000021L) -#endif - -#ifndef STATUS_NO_DATA_DETECTED -# define STATUS_NO_DATA_DETECTED ((NTSTATUS) 0x80000022L) -#endif - -#ifndef STATUS_REDIRECTOR_HAS_OPEN_HANDLES -# define STATUS_REDIRECTOR_HAS_OPEN_HANDLES ((NTSTATUS) 0x80000023L) -#endif - -#ifndef STATUS_SERVER_HAS_OPEN_HANDLES -# define STATUS_SERVER_HAS_OPEN_HANDLES ((NTSTATUS) 0x80000024L) -#endif - -#ifndef STATUS_ALREADY_DISCONNECTED -# define STATUS_ALREADY_DISCONNECTED ((NTSTATUS) 0x80000025L) -#endif - -#ifndef STATUS_LONGJUMP -# define STATUS_LONGJUMP ((NTSTATUS) 0x80000026L) -#endif - -#ifndef STATUS_CLEANER_CARTRIDGE_INSTALLED -# define STATUS_CLEANER_CARTRIDGE_INSTALLED ((NTSTATUS) 0x80000027L) -#endif - -#ifndef STATUS_PLUGPLAY_QUERY_VETOED -# define STATUS_PLUGPLAY_QUERY_VETOED ((NTSTATUS) 0x80000028L) -#endif - -#ifndef STATUS_UNWIND_CONSOLIDATE -# define STATUS_UNWIND_CONSOLIDATE ((NTSTATUS) 0x80000029L) -#endif - -#ifndef STATUS_REGISTRY_HIVE_RECOVERED -# define STATUS_REGISTRY_HIVE_RECOVERED ((NTSTATUS) 0x8000002AL) -#endif - -#ifndef STATUS_DLL_MIGHT_BE_INSECURE -# define STATUS_DLL_MIGHT_BE_INSECURE ((NTSTATUS) 0x8000002BL) -#endif - -#ifndef STATUS_DLL_MIGHT_BE_INCOMPATIBLE -# define STATUS_DLL_MIGHT_BE_INCOMPATIBLE ((NTSTATUS) 0x8000002CL) -#endif - -#ifndef STATUS_STOPPED_ON_SYMLINK -# define STATUS_STOPPED_ON_SYMLINK ((NTSTATUS) 0x8000002DL) -#endif - -#ifndef STATUS_CANNOT_GRANT_REQUESTED_OPLOCK -# define STATUS_CANNOT_GRANT_REQUESTED_OPLOCK ((NTSTATUS) 0x8000002EL) -#endif - -#ifndef STATUS_NO_ACE_CONDITION -# define STATUS_NO_ACE_CONDITION ((NTSTATUS) 0x8000002FL) -#endif - -#ifndef STATUS_UNSUCCESSFUL -# define STATUS_UNSUCCESSFUL ((NTSTATUS) 0xC0000001L) -#endif - -#ifndef STATUS_NOT_IMPLEMENTED -# define STATUS_NOT_IMPLEMENTED ((NTSTATUS) 0xC0000002L) -#endif - -#ifndef STATUS_INVALID_INFO_CLASS -# define STATUS_INVALID_INFO_CLASS ((NTSTATUS) 0xC0000003L) -#endif - -#ifndef STATUS_INFO_LENGTH_MISMATCH -# define STATUS_INFO_LENGTH_MISMATCH ((NTSTATUS) 0xC0000004L) -#endif - -#ifndef STATUS_ACCESS_VIOLATION -# define STATUS_ACCESS_VIOLATION ((NTSTATUS) 0xC0000005L) -#endif - -#ifndef STATUS_IN_PAGE_ERROR -# define STATUS_IN_PAGE_ERROR ((NTSTATUS) 0xC0000006L) -#endif - -#ifndef STATUS_PAGEFILE_QUOTA -# define STATUS_PAGEFILE_QUOTA ((NTSTATUS) 0xC0000007L) -#endif - -#ifndef STATUS_INVALID_HANDLE -# define STATUS_INVALID_HANDLE ((NTSTATUS) 0xC0000008L) -#endif - -#ifndef STATUS_BAD_INITIAL_STACK -# define STATUS_BAD_INITIAL_STACK ((NTSTATUS) 0xC0000009L) -#endif - -#ifndef STATUS_BAD_INITIAL_PC -# define STATUS_BAD_INITIAL_PC ((NTSTATUS) 0xC000000AL) -#endif - -#ifndef STATUS_INVALID_CID -# define STATUS_INVALID_CID ((NTSTATUS) 0xC000000BL) -#endif - -#ifndef STATUS_TIMER_NOT_CANCELED -# define STATUS_TIMER_NOT_CANCELED ((NTSTATUS) 0xC000000CL) -#endif - -#ifndef STATUS_INVALID_PARAMETER -# define STATUS_INVALID_PARAMETER ((NTSTATUS) 0xC000000DL) -#endif - -#ifndef STATUS_NO_SUCH_DEVICE -# define STATUS_NO_SUCH_DEVICE ((NTSTATUS) 0xC000000EL) -#endif - -#ifndef STATUS_NO_SUCH_FILE -# define STATUS_NO_SUCH_FILE ((NTSTATUS) 0xC000000FL) -#endif - -#ifndef STATUS_INVALID_DEVICE_REQUEST -# define STATUS_INVALID_DEVICE_REQUEST ((NTSTATUS) 0xC0000010L) -#endif - -#ifndef STATUS_END_OF_FILE -# define STATUS_END_OF_FILE ((NTSTATUS) 0xC0000011L) -#endif - -#ifndef STATUS_WRONG_VOLUME -# define STATUS_WRONG_VOLUME ((NTSTATUS) 0xC0000012L) -#endif - -#ifndef STATUS_NO_MEDIA_IN_DEVICE -# define STATUS_NO_MEDIA_IN_DEVICE ((NTSTATUS) 0xC0000013L) -#endif - -#ifndef STATUS_UNRECOGNIZED_MEDIA -# define STATUS_UNRECOGNIZED_MEDIA ((NTSTATUS) 0xC0000014L) -#endif - -#ifndef STATUS_NONEXISTENT_SECTOR -# define STATUS_NONEXISTENT_SECTOR ((NTSTATUS) 0xC0000015L) -#endif - -#ifndef STATUS_MORE_PROCESSING_REQUIRED -# define STATUS_MORE_PROCESSING_REQUIRED ((NTSTATUS) 0xC0000016L) -#endif - -#ifndef STATUS_NO_MEMORY -# define STATUS_NO_MEMORY ((NTSTATUS) 0xC0000017L) -#endif - -#ifndef STATUS_CONFLICTING_ADDRESSES -# define STATUS_CONFLICTING_ADDRESSES ((NTSTATUS) 0xC0000018L) -#endif - -#ifndef STATUS_NOT_MAPPED_VIEW -# define STATUS_NOT_MAPPED_VIEW ((NTSTATUS) 0xC0000019L) -#endif - -#ifndef STATUS_UNABLE_TO_FREE_VM -# define STATUS_UNABLE_TO_FREE_VM ((NTSTATUS) 0xC000001AL) -#endif - -#ifndef STATUS_UNABLE_TO_DELETE_SECTION -# define STATUS_UNABLE_TO_DELETE_SECTION ((NTSTATUS) 0xC000001BL) -#endif - -#ifndef STATUS_INVALID_SYSTEM_SERVICE -# define STATUS_INVALID_SYSTEM_SERVICE ((NTSTATUS) 0xC000001CL) -#endif - -#ifndef STATUS_ILLEGAL_INSTRUCTION -# define STATUS_ILLEGAL_INSTRUCTION ((NTSTATUS) 0xC000001DL) -#endif - -#ifndef STATUS_INVALID_LOCK_SEQUENCE -# define STATUS_INVALID_LOCK_SEQUENCE ((NTSTATUS) 0xC000001EL) -#endif - -#ifndef STATUS_INVALID_VIEW_SIZE -# define STATUS_INVALID_VIEW_SIZE ((NTSTATUS) 0xC000001FL) -#endif - -#ifndef STATUS_INVALID_FILE_FOR_SECTION -# define STATUS_INVALID_FILE_FOR_SECTION ((NTSTATUS) 0xC0000020L) -#endif - -#ifndef STATUS_ALREADY_COMMITTED -# define STATUS_ALREADY_COMMITTED ((NTSTATUS) 0xC0000021L) -#endif - -#ifndef STATUS_ACCESS_DENIED -# define STATUS_ACCESS_DENIED ((NTSTATUS) 0xC0000022L) -#endif - -#ifndef STATUS_BUFFER_TOO_SMALL -# define STATUS_BUFFER_TOO_SMALL ((NTSTATUS) 0xC0000023L) -#endif - -#ifndef STATUS_OBJECT_TYPE_MISMATCH -# define STATUS_OBJECT_TYPE_MISMATCH ((NTSTATUS) 0xC0000024L) -#endif - -#ifndef STATUS_NONCONTINUABLE_EXCEPTION -# define STATUS_NONCONTINUABLE_EXCEPTION ((NTSTATUS) 0xC0000025L) -#endif - -#ifndef STATUS_INVALID_DISPOSITION -# define STATUS_INVALID_DISPOSITION ((NTSTATUS) 0xC0000026L) -#endif - -#ifndef STATUS_UNWIND -# define STATUS_UNWIND ((NTSTATUS) 0xC0000027L) -#endif - -#ifndef STATUS_BAD_STACK -# define STATUS_BAD_STACK ((NTSTATUS) 0xC0000028L) -#endif - -#ifndef STATUS_INVALID_UNWIND_TARGET -# define STATUS_INVALID_UNWIND_TARGET ((NTSTATUS) 0xC0000029L) -#endif - -#ifndef STATUS_NOT_LOCKED -# define STATUS_NOT_LOCKED ((NTSTATUS) 0xC000002AL) -#endif - -#ifndef STATUS_PARITY_ERROR -# define STATUS_PARITY_ERROR ((NTSTATUS) 0xC000002BL) -#endif - -#ifndef STATUS_UNABLE_TO_DECOMMIT_VM -# define STATUS_UNABLE_TO_DECOMMIT_VM ((NTSTATUS) 0xC000002CL) -#endif - -#ifndef STATUS_NOT_COMMITTED -# define STATUS_NOT_COMMITTED ((NTSTATUS) 0xC000002DL) -#endif - -#ifndef STATUS_INVALID_PORT_ATTRIBUTES -# define STATUS_INVALID_PORT_ATTRIBUTES ((NTSTATUS) 0xC000002EL) -#endif - -#ifndef STATUS_PORT_MESSAGE_TOO_LONG -# define STATUS_PORT_MESSAGE_TOO_LONG ((NTSTATUS) 0xC000002FL) -#endif - -#ifndef STATUS_INVALID_PARAMETER_MIX -# define STATUS_INVALID_PARAMETER_MIX ((NTSTATUS) 0xC0000030L) -#endif - -#ifndef STATUS_INVALID_QUOTA_LOWER -# define STATUS_INVALID_QUOTA_LOWER ((NTSTATUS) 0xC0000031L) -#endif - -#ifndef STATUS_DISK_CORRUPT_ERROR -# define STATUS_DISK_CORRUPT_ERROR ((NTSTATUS) 0xC0000032L) -#endif - -#ifndef STATUS_OBJECT_NAME_INVALID -# define STATUS_OBJECT_NAME_INVALID ((NTSTATUS) 0xC0000033L) -#endif - -#ifndef STATUS_OBJECT_NAME_NOT_FOUND -# define STATUS_OBJECT_NAME_NOT_FOUND ((NTSTATUS) 0xC0000034L) -#endif - -#ifndef STATUS_OBJECT_NAME_COLLISION -# define STATUS_OBJECT_NAME_COLLISION ((NTSTATUS) 0xC0000035L) -#endif - -#ifndef STATUS_PORT_DISCONNECTED -# define STATUS_PORT_DISCONNECTED ((NTSTATUS) 0xC0000037L) -#endif - -#ifndef STATUS_DEVICE_ALREADY_ATTACHED -# define STATUS_DEVICE_ALREADY_ATTACHED ((NTSTATUS) 0xC0000038L) -#endif - -#ifndef STATUS_OBJECT_PATH_INVALID -# define STATUS_OBJECT_PATH_INVALID ((NTSTATUS) 0xC0000039L) -#endif - -#ifndef STATUS_OBJECT_PATH_NOT_FOUND -# define STATUS_OBJECT_PATH_NOT_FOUND ((NTSTATUS) 0xC000003AL) -#endif - -#ifndef STATUS_OBJECT_PATH_SYNTAX_BAD -# define STATUS_OBJECT_PATH_SYNTAX_BAD ((NTSTATUS) 0xC000003BL) -#endif - -#ifndef STATUS_DATA_OVERRUN -# define STATUS_DATA_OVERRUN ((NTSTATUS) 0xC000003CL) -#endif - -#ifndef STATUS_DATA_LATE_ERROR -# define STATUS_DATA_LATE_ERROR ((NTSTATUS) 0xC000003DL) -#endif - -#ifndef STATUS_DATA_ERROR -# define STATUS_DATA_ERROR ((NTSTATUS) 0xC000003EL) -#endif - -#ifndef STATUS_CRC_ERROR -# define STATUS_CRC_ERROR ((NTSTATUS) 0xC000003FL) -#endif - -#ifndef STATUS_SECTION_TOO_BIG -# define STATUS_SECTION_TOO_BIG ((NTSTATUS) 0xC0000040L) -#endif - -#ifndef STATUS_PORT_CONNECTION_REFUSED -# define STATUS_PORT_CONNECTION_REFUSED ((NTSTATUS) 0xC0000041L) -#endif - -#ifndef STATUS_INVALID_PORT_HANDLE -# define STATUS_INVALID_PORT_HANDLE ((NTSTATUS) 0xC0000042L) -#endif - -#ifndef STATUS_SHARING_VIOLATION -# define STATUS_SHARING_VIOLATION ((NTSTATUS) 0xC0000043L) -#endif - -#ifndef STATUS_QUOTA_EXCEEDED -# define STATUS_QUOTA_EXCEEDED ((NTSTATUS) 0xC0000044L) -#endif - -#ifndef STATUS_INVALID_PAGE_PROTECTION -# define STATUS_INVALID_PAGE_PROTECTION ((NTSTATUS) 0xC0000045L) -#endif - -#ifndef STATUS_MUTANT_NOT_OWNED -# define STATUS_MUTANT_NOT_OWNED ((NTSTATUS) 0xC0000046L) -#endif - -#ifndef STATUS_SEMAPHORE_LIMIT_EXCEEDED -# define STATUS_SEMAPHORE_LIMIT_EXCEEDED ((NTSTATUS) 0xC0000047L) -#endif - -#ifndef STATUS_PORT_ALREADY_SET -# define STATUS_PORT_ALREADY_SET ((NTSTATUS) 0xC0000048L) -#endif - -#ifndef STATUS_SECTION_NOT_IMAGE -# define STATUS_SECTION_NOT_IMAGE ((NTSTATUS) 0xC0000049L) -#endif - -#ifndef STATUS_SUSPEND_COUNT_EXCEEDED -# define STATUS_SUSPEND_COUNT_EXCEEDED ((NTSTATUS) 0xC000004AL) -#endif - -#ifndef STATUS_THREAD_IS_TERMINATING -# define STATUS_THREAD_IS_TERMINATING ((NTSTATUS) 0xC000004BL) -#endif - -#ifndef STATUS_BAD_WORKING_SET_LIMIT -# define STATUS_BAD_WORKING_SET_LIMIT ((NTSTATUS) 0xC000004CL) -#endif - -#ifndef STATUS_INCOMPATIBLE_FILE_MAP -# define STATUS_INCOMPATIBLE_FILE_MAP ((NTSTATUS) 0xC000004DL) -#endif - -#ifndef STATUS_SECTION_PROTECTION -# define STATUS_SECTION_PROTECTION ((NTSTATUS) 0xC000004EL) -#endif - -#ifndef STATUS_EAS_NOT_SUPPORTED -# define STATUS_EAS_NOT_SUPPORTED ((NTSTATUS) 0xC000004FL) -#endif - -#ifndef STATUS_EA_TOO_LARGE -# define STATUS_EA_TOO_LARGE ((NTSTATUS) 0xC0000050L) -#endif - -#ifndef STATUS_NONEXISTENT_EA_ENTRY -# define STATUS_NONEXISTENT_EA_ENTRY ((NTSTATUS) 0xC0000051L) -#endif - -#ifndef STATUS_NO_EAS_ON_FILE -# define STATUS_NO_EAS_ON_FILE ((NTSTATUS) 0xC0000052L) -#endif - -#ifndef STATUS_EA_CORRUPT_ERROR -# define STATUS_EA_CORRUPT_ERROR ((NTSTATUS) 0xC0000053L) -#endif - -#ifndef STATUS_FILE_LOCK_CONFLICT -# define STATUS_FILE_LOCK_CONFLICT ((NTSTATUS) 0xC0000054L) -#endif - -#ifndef STATUS_LOCK_NOT_GRANTED -# define STATUS_LOCK_NOT_GRANTED ((NTSTATUS) 0xC0000055L) -#endif - -#ifndef STATUS_DELETE_PENDING -# define STATUS_DELETE_PENDING ((NTSTATUS) 0xC0000056L) -#endif - -#ifndef STATUS_CTL_FILE_NOT_SUPPORTED -# define STATUS_CTL_FILE_NOT_SUPPORTED ((NTSTATUS) 0xC0000057L) -#endif - -#ifndef STATUS_UNKNOWN_REVISION -# define STATUS_UNKNOWN_REVISION ((NTSTATUS) 0xC0000058L) -#endif - -#ifndef STATUS_REVISION_MISMATCH -# define STATUS_REVISION_MISMATCH ((NTSTATUS) 0xC0000059L) -#endif - -#ifndef STATUS_INVALID_OWNER -# define STATUS_INVALID_OWNER ((NTSTATUS) 0xC000005AL) -#endif - -#ifndef STATUS_INVALID_PRIMARY_GROUP -# define STATUS_INVALID_PRIMARY_GROUP ((NTSTATUS) 0xC000005BL) -#endif - -#ifndef STATUS_NO_IMPERSONATION_TOKEN -# define STATUS_NO_IMPERSONATION_TOKEN ((NTSTATUS) 0xC000005CL) -#endif - -#ifndef STATUS_CANT_DISABLE_MANDATORY -# define STATUS_CANT_DISABLE_MANDATORY ((NTSTATUS) 0xC000005DL) -#endif - -#ifndef STATUS_NO_LOGON_SERVERS -# define STATUS_NO_LOGON_SERVERS ((NTSTATUS) 0xC000005EL) -#endif - -#ifndef STATUS_NO_SUCH_LOGON_SESSION -# define STATUS_NO_SUCH_LOGON_SESSION ((NTSTATUS) 0xC000005FL) -#endif - -#ifndef STATUS_NO_SUCH_PRIVILEGE -# define STATUS_NO_SUCH_PRIVILEGE ((NTSTATUS) 0xC0000060L) -#endif - -#ifndef STATUS_PRIVILEGE_NOT_HELD -# define STATUS_PRIVILEGE_NOT_HELD ((NTSTATUS) 0xC0000061L) -#endif - -#ifndef STATUS_INVALID_ACCOUNT_NAME -# define STATUS_INVALID_ACCOUNT_NAME ((NTSTATUS) 0xC0000062L) -#endif - -#ifndef STATUS_USER_EXISTS -# define STATUS_USER_EXISTS ((NTSTATUS) 0xC0000063L) -#endif - -#ifndef STATUS_NO_SUCH_USER -# define STATUS_NO_SUCH_USER ((NTSTATUS) 0xC0000064L) -#endif - -#ifndef STATUS_GROUP_EXISTS -# define STATUS_GROUP_EXISTS ((NTSTATUS) 0xC0000065L) -#endif - -#ifndef STATUS_NO_SUCH_GROUP -# define STATUS_NO_SUCH_GROUP ((NTSTATUS) 0xC0000066L) -#endif - -#ifndef STATUS_MEMBER_IN_GROUP -# define STATUS_MEMBER_IN_GROUP ((NTSTATUS) 0xC0000067L) -#endif - -#ifndef STATUS_MEMBER_NOT_IN_GROUP -# define STATUS_MEMBER_NOT_IN_GROUP ((NTSTATUS) 0xC0000068L) -#endif - -#ifndef STATUS_LAST_ADMIN -# define STATUS_LAST_ADMIN ((NTSTATUS) 0xC0000069L) -#endif - -#ifndef STATUS_WRONG_PASSWORD -# define STATUS_WRONG_PASSWORD ((NTSTATUS) 0xC000006AL) -#endif - -#ifndef STATUS_ILL_FORMED_PASSWORD -# define STATUS_ILL_FORMED_PASSWORD ((NTSTATUS) 0xC000006BL) -#endif - -#ifndef STATUS_PASSWORD_RESTRICTION -# define STATUS_PASSWORD_RESTRICTION ((NTSTATUS) 0xC000006CL) -#endif - -#ifndef STATUS_LOGON_FAILURE -# define STATUS_LOGON_FAILURE ((NTSTATUS) 0xC000006DL) -#endif - -#ifndef STATUS_ACCOUNT_RESTRICTION -# define STATUS_ACCOUNT_RESTRICTION ((NTSTATUS) 0xC000006EL) -#endif - -#ifndef STATUS_INVALID_LOGON_HOURS -# define STATUS_INVALID_LOGON_HOURS ((NTSTATUS) 0xC000006FL) -#endif - -#ifndef STATUS_INVALID_WORKSTATION -# define STATUS_INVALID_WORKSTATION ((NTSTATUS) 0xC0000070L) -#endif - -#ifndef STATUS_PASSWORD_EXPIRED -# define STATUS_PASSWORD_EXPIRED ((NTSTATUS) 0xC0000071L) -#endif - -#ifndef STATUS_ACCOUNT_DISABLED -# define STATUS_ACCOUNT_DISABLED ((NTSTATUS) 0xC0000072L) -#endif - -#ifndef STATUS_NONE_MAPPED -# define STATUS_NONE_MAPPED ((NTSTATUS) 0xC0000073L) -#endif - -#ifndef STATUS_TOO_MANY_LUIDS_REQUESTED -# define STATUS_TOO_MANY_LUIDS_REQUESTED ((NTSTATUS) 0xC0000074L) -#endif - -#ifndef STATUS_LUIDS_EXHAUSTED -# define STATUS_LUIDS_EXHAUSTED ((NTSTATUS) 0xC0000075L) -#endif - -#ifndef STATUS_INVALID_SUB_AUTHORITY -# define STATUS_INVALID_SUB_AUTHORITY ((NTSTATUS) 0xC0000076L) -#endif - -#ifndef STATUS_INVALID_ACL -# define STATUS_INVALID_ACL ((NTSTATUS) 0xC0000077L) -#endif - -#ifndef STATUS_INVALID_SID -# define STATUS_INVALID_SID ((NTSTATUS) 0xC0000078L) -#endif - -#ifndef STATUS_INVALID_SECURITY_DESCR -# define STATUS_INVALID_SECURITY_DESCR ((NTSTATUS) 0xC0000079L) -#endif - -#ifndef STATUS_PROCEDURE_NOT_FOUND -# define STATUS_PROCEDURE_NOT_FOUND ((NTSTATUS) 0xC000007AL) -#endif - -#ifndef STATUS_INVALID_IMAGE_FORMAT -# define STATUS_INVALID_IMAGE_FORMAT ((NTSTATUS) 0xC000007BL) -#endif - -#ifndef STATUS_NO_TOKEN -# define STATUS_NO_TOKEN ((NTSTATUS) 0xC000007CL) -#endif - -#ifndef STATUS_BAD_INHERITANCE_ACL -# define STATUS_BAD_INHERITANCE_ACL ((NTSTATUS) 0xC000007DL) -#endif - -#ifndef STATUS_RANGE_NOT_LOCKED -# define STATUS_RANGE_NOT_LOCKED ((NTSTATUS) 0xC000007EL) -#endif - -#ifndef STATUS_DISK_FULL -# define STATUS_DISK_FULL ((NTSTATUS) 0xC000007FL) -#endif - -#ifndef STATUS_SERVER_DISABLED -# define STATUS_SERVER_DISABLED ((NTSTATUS) 0xC0000080L) -#endif - -#ifndef STATUS_SERVER_NOT_DISABLED -# define STATUS_SERVER_NOT_DISABLED ((NTSTATUS) 0xC0000081L) -#endif - -#ifndef STATUS_TOO_MANY_GUIDS_REQUESTED -# define STATUS_TOO_MANY_GUIDS_REQUESTED ((NTSTATUS) 0xC0000082L) -#endif - -#ifndef STATUS_GUIDS_EXHAUSTED -# define STATUS_GUIDS_EXHAUSTED ((NTSTATUS) 0xC0000083L) -#endif - -#ifndef STATUS_INVALID_ID_AUTHORITY -# define STATUS_INVALID_ID_AUTHORITY ((NTSTATUS) 0xC0000084L) -#endif - -#ifndef STATUS_AGENTS_EXHAUSTED -# define STATUS_AGENTS_EXHAUSTED ((NTSTATUS) 0xC0000085L) -#endif - -#ifndef STATUS_INVALID_VOLUME_LABEL -# define STATUS_INVALID_VOLUME_LABEL ((NTSTATUS) 0xC0000086L) -#endif - -#ifndef STATUS_SECTION_NOT_EXTENDED -# define STATUS_SECTION_NOT_EXTENDED ((NTSTATUS) 0xC0000087L) -#endif - -#ifndef STATUS_NOT_MAPPED_DATA -# define STATUS_NOT_MAPPED_DATA ((NTSTATUS) 0xC0000088L) -#endif - -#ifndef STATUS_RESOURCE_DATA_NOT_FOUND -# define STATUS_RESOURCE_DATA_NOT_FOUND ((NTSTATUS) 0xC0000089L) -#endif - -#ifndef STATUS_RESOURCE_TYPE_NOT_FOUND -# define STATUS_RESOURCE_TYPE_NOT_FOUND ((NTSTATUS) 0xC000008AL) -#endif - -#ifndef STATUS_RESOURCE_NAME_NOT_FOUND -# define STATUS_RESOURCE_NAME_NOT_FOUND ((NTSTATUS) 0xC000008BL) -#endif - -#ifndef STATUS_ARRAY_BOUNDS_EXCEEDED -# define STATUS_ARRAY_BOUNDS_EXCEEDED ((NTSTATUS) 0xC000008CL) -#endif - -#ifndef STATUS_FLOAT_DENORMAL_OPERAND -# define STATUS_FLOAT_DENORMAL_OPERAND ((NTSTATUS) 0xC000008DL) -#endif - -#ifndef STATUS_FLOAT_DIVIDE_BY_ZERO -# define STATUS_FLOAT_DIVIDE_BY_ZERO ((NTSTATUS) 0xC000008EL) -#endif - -#ifndef STATUS_FLOAT_INEXACT_RESULT -# define STATUS_FLOAT_INEXACT_RESULT ((NTSTATUS) 0xC000008FL) -#endif - -#ifndef STATUS_FLOAT_INVALID_OPERATION -# define STATUS_FLOAT_INVALID_OPERATION ((NTSTATUS) 0xC0000090L) -#endif - -#ifndef STATUS_FLOAT_OVERFLOW -# define STATUS_FLOAT_OVERFLOW ((NTSTATUS) 0xC0000091L) -#endif - -#ifndef STATUS_FLOAT_STACK_CHECK -# define STATUS_FLOAT_STACK_CHECK ((NTSTATUS) 0xC0000092L) -#endif - -#ifndef STATUS_FLOAT_UNDERFLOW -# define STATUS_FLOAT_UNDERFLOW ((NTSTATUS) 0xC0000093L) -#endif - -#ifndef STATUS_INTEGER_DIVIDE_BY_ZERO -# define STATUS_INTEGER_DIVIDE_BY_ZERO ((NTSTATUS) 0xC0000094L) -#endif - -#ifndef STATUS_INTEGER_OVERFLOW -# define STATUS_INTEGER_OVERFLOW ((NTSTATUS) 0xC0000095L) -#endif - -#ifndef STATUS_PRIVILEGED_INSTRUCTION -# define STATUS_PRIVILEGED_INSTRUCTION ((NTSTATUS) 0xC0000096L) -#endif - -#ifndef STATUS_TOO_MANY_PAGING_FILES -# define STATUS_TOO_MANY_PAGING_FILES ((NTSTATUS) 0xC0000097L) -#endif - -#ifndef STATUS_FILE_INVALID -# define STATUS_FILE_INVALID ((NTSTATUS) 0xC0000098L) -#endif - -#ifndef STATUS_ALLOTTED_SPACE_EXCEEDED -# define STATUS_ALLOTTED_SPACE_EXCEEDED ((NTSTATUS) 0xC0000099L) -#endif - -#ifndef STATUS_INSUFFICIENT_RESOURCES -# define STATUS_INSUFFICIENT_RESOURCES ((NTSTATUS) 0xC000009AL) -#endif - -#ifndef STATUS_DFS_EXIT_PATH_FOUND -# define STATUS_DFS_EXIT_PATH_FOUND ((NTSTATUS) 0xC000009BL) -#endif - -#ifndef STATUS_DEVICE_DATA_ERROR -# define STATUS_DEVICE_DATA_ERROR ((NTSTATUS) 0xC000009CL) -#endif - -#ifndef STATUS_DEVICE_NOT_CONNECTED -# define STATUS_DEVICE_NOT_CONNECTED ((NTSTATUS) 0xC000009DL) -#endif - -#ifndef STATUS_DEVICE_POWER_FAILURE -# define STATUS_DEVICE_POWER_FAILURE ((NTSTATUS) 0xC000009EL) -#endif - -#ifndef STATUS_FREE_VM_NOT_AT_BASE -# define STATUS_FREE_VM_NOT_AT_BASE ((NTSTATUS) 0xC000009FL) -#endif - -#ifndef STATUS_MEMORY_NOT_ALLOCATED -# define STATUS_MEMORY_NOT_ALLOCATED ((NTSTATUS) 0xC00000A0L) -#endif - -#ifndef STATUS_WORKING_SET_QUOTA -# define STATUS_WORKING_SET_QUOTA ((NTSTATUS) 0xC00000A1L) -#endif - -#ifndef STATUS_MEDIA_WRITE_PROTECTED -# define STATUS_MEDIA_WRITE_PROTECTED ((NTSTATUS) 0xC00000A2L) -#endif - -#ifndef STATUS_DEVICE_NOT_READY -# define STATUS_DEVICE_NOT_READY ((NTSTATUS) 0xC00000A3L) -#endif - -#ifndef STATUS_INVALID_GROUP_ATTRIBUTES -# define STATUS_INVALID_GROUP_ATTRIBUTES ((NTSTATUS) 0xC00000A4L) -#endif - -#ifndef STATUS_BAD_IMPERSONATION_LEVEL -# define STATUS_BAD_IMPERSONATION_LEVEL ((NTSTATUS) 0xC00000A5L) -#endif - -#ifndef STATUS_CANT_OPEN_ANONYMOUS -# define STATUS_CANT_OPEN_ANONYMOUS ((NTSTATUS) 0xC00000A6L) -#endif - -#ifndef STATUS_BAD_VALIDATION_CLASS -# define STATUS_BAD_VALIDATION_CLASS ((NTSTATUS) 0xC00000A7L) -#endif - -#ifndef STATUS_BAD_TOKEN_TYPE -# define STATUS_BAD_TOKEN_TYPE ((NTSTATUS) 0xC00000A8L) -#endif - -#ifndef STATUS_BAD_MASTER_BOOT_RECORD -# define STATUS_BAD_MASTER_BOOT_RECORD ((NTSTATUS) 0xC00000A9L) -#endif - -#ifndef STATUS_INSTRUCTION_MISALIGNMENT -# define STATUS_INSTRUCTION_MISALIGNMENT ((NTSTATUS) 0xC00000AAL) -#endif - -#ifndef STATUS_INSTANCE_NOT_AVAILABLE -# define STATUS_INSTANCE_NOT_AVAILABLE ((NTSTATUS) 0xC00000ABL) -#endif - -#ifndef STATUS_PIPE_NOT_AVAILABLE -# define STATUS_PIPE_NOT_AVAILABLE ((NTSTATUS) 0xC00000ACL) -#endif - -#ifndef STATUS_INVALID_PIPE_STATE -# define STATUS_INVALID_PIPE_STATE ((NTSTATUS) 0xC00000ADL) -#endif - -#ifndef STATUS_PIPE_BUSY -# define STATUS_PIPE_BUSY ((NTSTATUS) 0xC00000AEL) -#endif - -#ifndef STATUS_ILLEGAL_FUNCTION -# define STATUS_ILLEGAL_FUNCTION ((NTSTATUS) 0xC00000AFL) -#endif - -#ifndef STATUS_PIPE_DISCONNECTED -# define STATUS_PIPE_DISCONNECTED ((NTSTATUS) 0xC00000B0L) -#endif - -#ifndef STATUS_PIPE_CLOSING -# define STATUS_PIPE_CLOSING ((NTSTATUS) 0xC00000B1L) -#endif - -#ifndef STATUS_PIPE_CONNECTED -# define STATUS_PIPE_CONNECTED ((NTSTATUS) 0xC00000B2L) -#endif - -#ifndef STATUS_PIPE_LISTENING -# define STATUS_PIPE_LISTENING ((NTSTATUS) 0xC00000B3L) -#endif - -#ifndef STATUS_INVALID_READ_MODE -# define STATUS_INVALID_READ_MODE ((NTSTATUS) 0xC00000B4L) -#endif - -#ifndef STATUS_IO_TIMEOUT -# define STATUS_IO_TIMEOUT ((NTSTATUS) 0xC00000B5L) -#endif - -#ifndef STATUS_FILE_FORCED_CLOSED -# define STATUS_FILE_FORCED_CLOSED ((NTSTATUS) 0xC00000B6L) -#endif - -#ifndef STATUS_PROFILING_NOT_STARTED -# define STATUS_PROFILING_NOT_STARTED ((NTSTATUS) 0xC00000B7L) -#endif - -#ifndef STATUS_PROFILING_NOT_STOPPED -# define STATUS_PROFILING_NOT_STOPPED ((NTSTATUS) 0xC00000B8L) -#endif - -#ifndef STATUS_COULD_NOT_INTERPRET -# define STATUS_COULD_NOT_INTERPRET ((NTSTATUS) 0xC00000B9L) -#endif - -#ifndef STATUS_FILE_IS_A_DIRECTORY -# define STATUS_FILE_IS_A_DIRECTORY ((NTSTATUS) 0xC00000BAL) -#endif - -#ifndef STATUS_NOT_SUPPORTED -# define STATUS_NOT_SUPPORTED ((NTSTATUS) 0xC00000BBL) -#endif - -#ifndef STATUS_REMOTE_NOT_LISTENING -# define STATUS_REMOTE_NOT_LISTENING ((NTSTATUS) 0xC00000BCL) -#endif - -#ifndef STATUS_DUPLICATE_NAME -# define STATUS_DUPLICATE_NAME ((NTSTATUS) 0xC00000BDL) -#endif - -#ifndef STATUS_BAD_NETWORK_PATH -# define STATUS_BAD_NETWORK_PATH ((NTSTATUS) 0xC00000BEL) -#endif - -#ifndef STATUS_NETWORK_BUSY -# define STATUS_NETWORK_BUSY ((NTSTATUS) 0xC00000BFL) -#endif - -#ifndef STATUS_DEVICE_DOES_NOT_EXIST -# define STATUS_DEVICE_DOES_NOT_EXIST ((NTSTATUS) 0xC00000C0L) -#endif - -#ifndef STATUS_TOO_MANY_COMMANDS -# define STATUS_TOO_MANY_COMMANDS ((NTSTATUS) 0xC00000C1L) -#endif - -#ifndef STATUS_ADAPTER_HARDWARE_ERROR -# define STATUS_ADAPTER_HARDWARE_ERROR ((NTSTATUS) 0xC00000C2L) -#endif - -#ifndef STATUS_INVALID_NETWORK_RESPONSE -# define STATUS_INVALID_NETWORK_RESPONSE ((NTSTATUS) 0xC00000C3L) -#endif - -#ifndef STATUS_UNEXPECTED_NETWORK_ERROR -# define STATUS_UNEXPECTED_NETWORK_ERROR ((NTSTATUS) 0xC00000C4L) -#endif - -#ifndef STATUS_BAD_REMOTE_ADAPTER -# define STATUS_BAD_REMOTE_ADAPTER ((NTSTATUS) 0xC00000C5L) -#endif - -#ifndef STATUS_PRINT_QUEUE_FULL -# define STATUS_PRINT_QUEUE_FULL ((NTSTATUS) 0xC00000C6L) -#endif - -#ifndef STATUS_NO_SPOOL_SPACE -# define STATUS_NO_SPOOL_SPACE ((NTSTATUS) 0xC00000C7L) -#endif - -#ifndef STATUS_PRINT_CANCELLED -# define STATUS_PRINT_CANCELLED ((NTSTATUS) 0xC00000C8L) -#endif - -#ifndef STATUS_NETWORK_NAME_DELETED -# define STATUS_NETWORK_NAME_DELETED ((NTSTATUS) 0xC00000C9L) -#endif - -#ifndef STATUS_NETWORK_ACCESS_DENIED -# define STATUS_NETWORK_ACCESS_DENIED ((NTSTATUS) 0xC00000CAL) -#endif - -#ifndef STATUS_BAD_DEVICE_TYPE -# define STATUS_BAD_DEVICE_TYPE ((NTSTATUS) 0xC00000CBL) -#endif - -#ifndef STATUS_BAD_NETWORK_NAME -# define STATUS_BAD_NETWORK_NAME ((NTSTATUS) 0xC00000CCL) -#endif - -#ifndef STATUS_TOO_MANY_NAMES -# define STATUS_TOO_MANY_NAMES ((NTSTATUS) 0xC00000CDL) -#endif - -#ifndef STATUS_TOO_MANY_SESSIONS -# define STATUS_TOO_MANY_SESSIONS ((NTSTATUS) 0xC00000CEL) -#endif - -#ifndef STATUS_SHARING_PAUSED -# define STATUS_SHARING_PAUSED ((NTSTATUS) 0xC00000CFL) -#endif - -#ifndef STATUS_REQUEST_NOT_ACCEPTED -# define STATUS_REQUEST_NOT_ACCEPTED ((NTSTATUS) 0xC00000D0L) -#endif - -#ifndef STATUS_REDIRECTOR_PAUSED -# define STATUS_REDIRECTOR_PAUSED ((NTSTATUS) 0xC00000D1L) -#endif - -#ifndef STATUS_NET_WRITE_FAULT -# define STATUS_NET_WRITE_FAULT ((NTSTATUS) 0xC00000D2L) -#endif - -#ifndef STATUS_PROFILING_AT_LIMIT -# define STATUS_PROFILING_AT_LIMIT ((NTSTATUS) 0xC00000D3L) -#endif - -#ifndef STATUS_NOT_SAME_DEVICE -# define STATUS_NOT_SAME_DEVICE ((NTSTATUS) 0xC00000D4L) -#endif - -#ifndef STATUS_FILE_RENAMED -# define STATUS_FILE_RENAMED ((NTSTATUS) 0xC00000D5L) -#endif - -#ifndef STATUS_VIRTUAL_CIRCUIT_CLOSED -# define STATUS_VIRTUAL_CIRCUIT_CLOSED ((NTSTATUS) 0xC00000D6L) -#endif - -#ifndef STATUS_NO_SECURITY_ON_OBJECT -# define STATUS_NO_SECURITY_ON_OBJECT ((NTSTATUS) 0xC00000D7L) -#endif - -#ifndef STATUS_CANT_WAIT -# define STATUS_CANT_WAIT ((NTSTATUS) 0xC00000D8L) -#endif - -#ifndef STATUS_PIPE_EMPTY -# define STATUS_PIPE_EMPTY ((NTSTATUS) 0xC00000D9L) -#endif - -#ifndef STATUS_CANT_ACCESS_DOMAIN_INFO -# define STATUS_CANT_ACCESS_DOMAIN_INFO ((NTSTATUS) 0xC00000DAL) -#endif - -#ifndef STATUS_CANT_TERMINATE_SELF -# define STATUS_CANT_TERMINATE_SELF ((NTSTATUS) 0xC00000DBL) -#endif - -#ifndef STATUS_INVALID_SERVER_STATE -# define STATUS_INVALID_SERVER_STATE ((NTSTATUS) 0xC00000DCL) -#endif - -#ifndef STATUS_INVALID_DOMAIN_STATE -# define STATUS_INVALID_DOMAIN_STATE ((NTSTATUS) 0xC00000DDL) -#endif - -#ifndef STATUS_INVALID_DOMAIN_ROLE -# define STATUS_INVALID_DOMAIN_ROLE ((NTSTATUS) 0xC00000DEL) -#endif - -#ifndef STATUS_NO_SUCH_DOMAIN -# define STATUS_NO_SUCH_DOMAIN ((NTSTATUS) 0xC00000DFL) -#endif - -#ifndef STATUS_DOMAIN_EXISTS -# define STATUS_DOMAIN_EXISTS ((NTSTATUS) 0xC00000E0L) -#endif - -#ifndef STATUS_DOMAIN_LIMIT_EXCEEDED -# define STATUS_DOMAIN_LIMIT_EXCEEDED ((NTSTATUS) 0xC00000E1L) -#endif - -#ifndef STATUS_OPLOCK_NOT_GRANTED -# define STATUS_OPLOCK_NOT_GRANTED ((NTSTATUS) 0xC00000E2L) -#endif - -#ifndef STATUS_INVALID_OPLOCK_PROTOCOL -# define STATUS_INVALID_OPLOCK_PROTOCOL ((NTSTATUS) 0xC00000E3L) -#endif - -#ifndef STATUS_INTERNAL_DB_CORRUPTION -# define STATUS_INTERNAL_DB_CORRUPTION ((NTSTATUS) 0xC00000E4L) -#endif - -#ifndef STATUS_INTERNAL_ERROR -# define STATUS_INTERNAL_ERROR ((NTSTATUS) 0xC00000E5L) -#endif - -#ifndef STATUS_GENERIC_NOT_MAPPED -# define STATUS_GENERIC_NOT_MAPPED ((NTSTATUS) 0xC00000E6L) -#endif - -#ifndef STATUS_BAD_DESCRIPTOR_FORMAT -# define STATUS_BAD_DESCRIPTOR_FORMAT ((NTSTATUS) 0xC00000E7L) -#endif - -#ifndef STATUS_INVALID_USER_BUFFER -# define STATUS_INVALID_USER_BUFFER ((NTSTATUS) 0xC00000E8L) -#endif - -#ifndef STATUS_UNEXPECTED_IO_ERROR -# define STATUS_UNEXPECTED_IO_ERROR ((NTSTATUS) 0xC00000E9L) -#endif - -#ifndef STATUS_UNEXPECTED_MM_CREATE_ERR -# define STATUS_UNEXPECTED_MM_CREATE_ERR ((NTSTATUS) 0xC00000EAL) -#endif - -#ifndef STATUS_UNEXPECTED_MM_MAP_ERROR -# define STATUS_UNEXPECTED_MM_MAP_ERROR ((NTSTATUS) 0xC00000EBL) -#endif - -#ifndef STATUS_UNEXPECTED_MM_EXTEND_ERR -# define STATUS_UNEXPECTED_MM_EXTEND_ERR ((NTSTATUS) 0xC00000ECL) -#endif - -#ifndef STATUS_NOT_LOGON_PROCESS -# define STATUS_NOT_LOGON_PROCESS ((NTSTATUS) 0xC00000EDL) -#endif - -#ifndef STATUS_LOGON_SESSION_EXISTS -# define STATUS_LOGON_SESSION_EXISTS ((NTSTATUS) 0xC00000EEL) -#endif - -#ifndef STATUS_INVALID_PARAMETER_1 -# define STATUS_INVALID_PARAMETER_1 ((NTSTATUS) 0xC00000EFL) -#endif - -#ifndef STATUS_INVALID_PARAMETER_2 -# define STATUS_INVALID_PARAMETER_2 ((NTSTATUS) 0xC00000F0L) -#endif - -#ifndef STATUS_INVALID_PARAMETER_3 -# define STATUS_INVALID_PARAMETER_3 ((NTSTATUS) 0xC00000F1L) -#endif - -#ifndef STATUS_INVALID_PARAMETER_4 -# define STATUS_INVALID_PARAMETER_4 ((NTSTATUS) 0xC00000F2L) -#endif - -#ifndef STATUS_INVALID_PARAMETER_5 -# define STATUS_INVALID_PARAMETER_5 ((NTSTATUS) 0xC00000F3L) -#endif - -#ifndef STATUS_INVALID_PARAMETER_6 -# define STATUS_INVALID_PARAMETER_6 ((NTSTATUS) 0xC00000F4L) -#endif - -#ifndef STATUS_INVALID_PARAMETER_7 -# define STATUS_INVALID_PARAMETER_7 ((NTSTATUS) 0xC00000F5L) -#endif - -#ifndef STATUS_INVALID_PARAMETER_8 -# define STATUS_INVALID_PARAMETER_8 ((NTSTATUS) 0xC00000F6L) -#endif - -#ifndef STATUS_INVALID_PARAMETER_9 -# define STATUS_INVALID_PARAMETER_9 ((NTSTATUS) 0xC00000F7L) -#endif - -#ifndef STATUS_INVALID_PARAMETER_10 -# define STATUS_INVALID_PARAMETER_10 ((NTSTATUS) 0xC00000F8L) -#endif - -#ifndef STATUS_INVALID_PARAMETER_11 -# define STATUS_INVALID_PARAMETER_11 ((NTSTATUS) 0xC00000F9L) -#endif - -#ifndef STATUS_INVALID_PARAMETER_12 -# define STATUS_INVALID_PARAMETER_12 ((NTSTATUS) 0xC00000FAL) -#endif - -#ifndef STATUS_REDIRECTOR_NOT_STARTED -# define STATUS_REDIRECTOR_NOT_STARTED ((NTSTATUS) 0xC00000FBL) -#endif - -#ifndef STATUS_REDIRECTOR_STARTED -# define STATUS_REDIRECTOR_STARTED ((NTSTATUS) 0xC00000FCL) -#endif - -#ifndef STATUS_STACK_OVERFLOW -# define STATUS_STACK_OVERFLOW ((NTSTATUS) 0xC00000FDL) -#endif - -#ifndef STATUS_NO_SUCH_PACKAGE -# define STATUS_NO_SUCH_PACKAGE ((NTSTATUS) 0xC00000FEL) -#endif - -#ifndef STATUS_BAD_FUNCTION_TABLE -# define STATUS_BAD_FUNCTION_TABLE ((NTSTATUS) 0xC00000FFL) -#endif - -#ifndef STATUS_VARIABLE_NOT_FOUND -# define STATUS_VARIABLE_NOT_FOUND ((NTSTATUS) 0xC0000100L) -#endif - -#ifndef STATUS_DIRECTORY_NOT_EMPTY -# define STATUS_DIRECTORY_NOT_EMPTY ((NTSTATUS) 0xC0000101L) -#endif - -#ifndef STATUS_FILE_CORRUPT_ERROR -# define STATUS_FILE_CORRUPT_ERROR ((NTSTATUS) 0xC0000102L) -#endif - -#ifndef STATUS_NOT_A_DIRECTORY -# define STATUS_NOT_A_DIRECTORY ((NTSTATUS) 0xC0000103L) -#endif - -#ifndef STATUS_BAD_LOGON_SESSION_STATE -# define STATUS_BAD_LOGON_SESSION_STATE ((NTSTATUS) 0xC0000104L) -#endif - -#ifndef STATUS_LOGON_SESSION_COLLISION -# define STATUS_LOGON_SESSION_COLLISION ((NTSTATUS) 0xC0000105L) -#endif - -#ifndef STATUS_NAME_TOO_LONG -# define STATUS_NAME_TOO_LONG ((NTSTATUS) 0xC0000106L) -#endif - -#ifndef STATUS_FILES_OPEN -# define STATUS_FILES_OPEN ((NTSTATUS) 0xC0000107L) -#endif - -#ifndef STATUS_CONNECTION_IN_USE -# define STATUS_CONNECTION_IN_USE ((NTSTATUS) 0xC0000108L) -#endif - -#ifndef STATUS_MESSAGE_NOT_FOUND -# define STATUS_MESSAGE_NOT_FOUND ((NTSTATUS) 0xC0000109L) -#endif - -#ifndef STATUS_PROCESS_IS_TERMINATING -# define STATUS_PROCESS_IS_TERMINATING ((NTSTATUS) 0xC000010AL) -#endif - -#ifndef STATUS_INVALID_LOGON_TYPE -# define STATUS_INVALID_LOGON_TYPE ((NTSTATUS) 0xC000010BL) -#endif - -#ifndef STATUS_NO_GUID_TRANSLATION -# define STATUS_NO_GUID_TRANSLATION ((NTSTATUS) 0xC000010CL) -#endif - -#ifndef STATUS_CANNOT_IMPERSONATE -# define STATUS_CANNOT_IMPERSONATE ((NTSTATUS) 0xC000010DL) -#endif - -#ifndef STATUS_IMAGE_ALREADY_LOADED -# define STATUS_IMAGE_ALREADY_LOADED ((NTSTATUS) 0xC000010EL) -#endif - -#ifndef STATUS_ABIOS_NOT_PRESENT -# define STATUS_ABIOS_NOT_PRESENT ((NTSTATUS) 0xC000010FL) -#endif - -#ifndef STATUS_ABIOS_LID_NOT_EXIST -# define STATUS_ABIOS_LID_NOT_EXIST ((NTSTATUS) 0xC0000110L) -#endif - -#ifndef STATUS_ABIOS_LID_ALREADY_OWNED -# define STATUS_ABIOS_LID_ALREADY_OWNED ((NTSTATUS) 0xC0000111L) -#endif - -#ifndef STATUS_ABIOS_NOT_LID_OWNER -# define STATUS_ABIOS_NOT_LID_OWNER ((NTSTATUS) 0xC0000112L) -#endif - -#ifndef STATUS_ABIOS_INVALID_COMMAND -# define STATUS_ABIOS_INVALID_COMMAND ((NTSTATUS) 0xC0000113L) -#endif - -#ifndef STATUS_ABIOS_INVALID_LID -# define STATUS_ABIOS_INVALID_LID ((NTSTATUS) 0xC0000114L) -#endif - -#ifndef STATUS_ABIOS_SELECTOR_NOT_AVAILABLE -# define STATUS_ABIOS_SELECTOR_NOT_AVAILABLE ((NTSTATUS) 0xC0000115L) -#endif - -#ifndef STATUS_ABIOS_INVALID_SELECTOR -# define STATUS_ABIOS_INVALID_SELECTOR ((NTSTATUS) 0xC0000116L) -#endif - -#ifndef STATUS_NO_LDT -# define STATUS_NO_LDT ((NTSTATUS) 0xC0000117L) -#endif - -#ifndef STATUS_INVALID_LDT_SIZE -# define STATUS_INVALID_LDT_SIZE ((NTSTATUS) 0xC0000118L) -#endif - -#ifndef STATUS_INVALID_LDT_OFFSET -# define STATUS_INVALID_LDT_OFFSET ((NTSTATUS) 0xC0000119L) -#endif - -#ifndef STATUS_INVALID_LDT_DESCRIPTOR -# define STATUS_INVALID_LDT_DESCRIPTOR ((NTSTATUS) 0xC000011AL) -#endif - -#ifndef STATUS_INVALID_IMAGE_NE_FORMAT -# define STATUS_INVALID_IMAGE_NE_FORMAT ((NTSTATUS) 0xC000011BL) -#endif - -#ifndef STATUS_RXACT_INVALID_STATE -# define STATUS_RXACT_INVALID_STATE ((NTSTATUS) 0xC000011CL) -#endif - -#ifndef STATUS_RXACT_COMMIT_FAILURE -# define STATUS_RXACT_COMMIT_FAILURE ((NTSTATUS) 0xC000011DL) -#endif - -#ifndef STATUS_MAPPED_FILE_SIZE_ZERO -# define STATUS_MAPPED_FILE_SIZE_ZERO ((NTSTATUS) 0xC000011EL) -#endif - -#ifndef STATUS_TOO_MANY_OPENED_FILES -# define STATUS_TOO_MANY_OPENED_FILES ((NTSTATUS) 0xC000011FL) -#endif - -#ifndef STATUS_CANCELLED -# define STATUS_CANCELLED ((NTSTATUS) 0xC0000120L) -#endif - -#ifndef STATUS_CANNOT_DELETE -# define STATUS_CANNOT_DELETE ((NTSTATUS) 0xC0000121L) -#endif - -#ifndef STATUS_INVALID_COMPUTER_NAME -# define STATUS_INVALID_COMPUTER_NAME ((NTSTATUS) 0xC0000122L) -#endif - -#ifndef STATUS_FILE_DELETED -# define STATUS_FILE_DELETED ((NTSTATUS) 0xC0000123L) -#endif - -#ifndef STATUS_SPECIAL_ACCOUNT -# define STATUS_SPECIAL_ACCOUNT ((NTSTATUS) 0xC0000124L) -#endif - -#ifndef STATUS_SPECIAL_GROUP -# define STATUS_SPECIAL_GROUP ((NTSTATUS) 0xC0000125L) -#endif - -#ifndef STATUS_SPECIAL_USER -# define STATUS_SPECIAL_USER ((NTSTATUS) 0xC0000126L) -#endif - -#ifndef STATUS_MEMBERS_PRIMARY_GROUP -# define STATUS_MEMBERS_PRIMARY_GROUP ((NTSTATUS) 0xC0000127L) -#endif - -#ifndef STATUS_FILE_CLOSED -# define STATUS_FILE_CLOSED ((NTSTATUS) 0xC0000128L) -#endif - -#ifndef STATUS_TOO_MANY_THREADS -# define STATUS_TOO_MANY_THREADS ((NTSTATUS) 0xC0000129L) -#endif - -#ifndef STATUS_THREAD_NOT_IN_PROCESS -# define STATUS_THREAD_NOT_IN_PROCESS ((NTSTATUS) 0xC000012AL) -#endif - -#ifndef STATUS_TOKEN_ALREADY_IN_USE -# define STATUS_TOKEN_ALREADY_IN_USE ((NTSTATUS) 0xC000012BL) -#endif - -#ifndef STATUS_PAGEFILE_QUOTA_EXCEEDED -# define STATUS_PAGEFILE_QUOTA_EXCEEDED ((NTSTATUS) 0xC000012CL) -#endif - -#ifndef STATUS_COMMITMENT_LIMIT -# define STATUS_COMMITMENT_LIMIT ((NTSTATUS) 0xC000012DL) -#endif - -#ifndef STATUS_INVALID_IMAGE_LE_FORMAT -# define STATUS_INVALID_IMAGE_LE_FORMAT ((NTSTATUS) 0xC000012EL) -#endif - -#ifndef STATUS_INVALID_IMAGE_NOT_MZ -# define STATUS_INVALID_IMAGE_NOT_MZ ((NTSTATUS) 0xC000012FL) -#endif - -#ifndef STATUS_INVALID_IMAGE_PROTECT -# define STATUS_INVALID_IMAGE_PROTECT ((NTSTATUS) 0xC0000130L) -#endif - -#ifndef STATUS_INVALID_IMAGE_WIN_16 -# define STATUS_INVALID_IMAGE_WIN_16 ((NTSTATUS) 0xC0000131L) -#endif - -#ifndef STATUS_LOGON_SERVER_CONFLICT -# define STATUS_LOGON_SERVER_CONFLICT ((NTSTATUS) 0xC0000132L) -#endif - -#ifndef STATUS_TIME_DIFFERENCE_AT_DC -# define STATUS_TIME_DIFFERENCE_AT_DC ((NTSTATUS) 0xC0000133L) -#endif - -#ifndef STATUS_SYNCHRONIZATION_REQUIRED -# define STATUS_SYNCHRONIZATION_REQUIRED ((NTSTATUS) 0xC0000134L) -#endif - -#ifndef STATUS_DLL_NOT_FOUND -# define STATUS_DLL_NOT_FOUND ((NTSTATUS) 0xC0000135L) -#endif - -#ifndef STATUS_OPEN_FAILED -# define STATUS_OPEN_FAILED ((NTSTATUS) 0xC0000136L) -#endif - -#ifndef STATUS_IO_PRIVILEGE_FAILED -# define STATUS_IO_PRIVILEGE_FAILED ((NTSTATUS) 0xC0000137L) -#endif - -#ifndef STATUS_ORDINAL_NOT_FOUND -# define STATUS_ORDINAL_NOT_FOUND ((NTSTATUS) 0xC0000138L) -#endif - -#ifndef STATUS_ENTRYPOINT_NOT_FOUND -# define STATUS_ENTRYPOINT_NOT_FOUND ((NTSTATUS) 0xC0000139L) -#endif - -#ifndef STATUS_CONTROL_C_EXIT -# define STATUS_CONTROL_C_EXIT ((NTSTATUS) 0xC000013AL) -#endif - -#ifndef STATUS_LOCAL_DISCONNECT -# define STATUS_LOCAL_DISCONNECT ((NTSTATUS) 0xC000013BL) -#endif - -#ifndef STATUS_REMOTE_DISCONNECT -# define STATUS_REMOTE_DISCONNECT ((NTSTATUS) 0xC000013CL) -#endif - -#ifndef STATUS_REMOTE_RESOURCES -# define STATUS_REMOTE_RESOURCES ((NTSTATUS) 0xC000013DL) -#endif - -#ifndef STATUS_LINK_FAILED -# define STATUS_LINK_FAILED ((NTSTATUS) 0xC000013EL) -#endif - -#ifndef STATUS_LINK_TIMEOUT -# define STATUS_LINK_TIMEOUT ((NTSTATUS) 0xC000013FL) -#endif - -#ifndef STATUS_INVALID_CONNECTION -# define STATUS_INVALID_CONNECTION ((NTSTATUS) 0xC0000140L) -#endif - -#ifndef STATUS_INVALID_ADDRESS -# define STATUS_INVALID_ADDRESS ((NTSTATUS) 0xC0000141L) -#endif - -#ifndef STATUS_DLL_INIT_FAILED -# define STATUS_DLL_INIT_FAILED ((NTSTATUS) 0xC0000142L) -#endif - -#ifndef STATUS_MISSING_SYSTEMFILE -# define STATUS_MISSING_SYSTEMFILE ((NTSTATUS) 0xC0000143L) -#endif - -#ifndef STATUS_UNHANDLED_EXCEPTION -# define STATUS_UNHANDLED_EXCEPTION ((NTSTATUS) 0xC0000144L) -#endif - -#ifndef STATUS_APP_INIT_FAILURE -# define STATUS_APP_INIT_FAILURE ((NTSTATUS) 0xC0000145L) -#endif - -#ifndef STATUS_PAGEFILE_CREATE_FAILED -# define STATUS_PAGEFILE_CREATE_FAILED ((NTSTATUS) 0xC0000146L) -#endif - -#ifndef STATUS_NO_PAGEFILE -# define STATUS_NO_PAGEFILE ((NTSTATUS) 0xC0000147L) -#endif - -#ifndef STATUS_INVALID_LEVEL -# define STATUS_INVALID_LEVEL ((NTSTATUS) 0xC0000148L) -#endif - -#ifndef STATUS_WRONG_PASSWORD_CORE -# define STATUS_WRONG_PASSWORD_CORE ((NTSTATUS) 0xC0000149L) -#endif - -#ifndef STATUS_ILLEGAL_FLOAT_CONTEXT -# define STATUS_ILLEGAL_FLOAT_CONTEXT ((NTSTATUS) 0xC000014AL) -#endif - -#ifndef STATUS_PIPE_BROKEN -# define STATUS_PIPE_BROKEN ((NTSTATUS) 0xC000014BL) -#endif - -#ifndef STATUS_REGISTRY_CORRUPT -# define STATUS_REGISTRY_CORRUPT ((NTSTATUS) 0xC000014CL) -#endif - -#ifndef STATUS_REGISTRY_IO_FAILED -# define STATUS_REGISTRY_IO_FAILED ((NTSTATUS) 0xC000014DL) -#endif - -#ifndef STATUS_NO_EVENT_PAIR -# define STATUS_NO_EVENT_PAIR ((NTSTATUS) 0xC000014EL) -#endif - -#ifndef STATUS_UNRECOGNIZED_VOLUME -# define STATUS_UNRECOGNIZED_VOLUME ((NTSTATUS) 0xC000014FL) -#endif - -#ifndef STATUS_SERIAL_NO_DEVICE_INITED -# define STATUS_SERIAL_NO_DEVICE_INITED ((NTSTATUS) 0xC0000150L) -#endif - -#ifndef STATUS_NO_SUCH_ALIAS -# define STATUS_NO_SUCH_ALIAS ((NTSTATUS) 0xC0000151L) -#endif - -#ifndef STATUS_MEMBER_NOT_IN_ALIAS -# define STATUS_MEMBER_NOT_IN_ALIAS ((NTSTATUS) 0xC0000152L) -#endif - -#ifndef STATUS_MEMBER_IN_ALIAS -# define STATUS_MEMBER_IN_ALIAS ((NTSTATUS) 0xC0000153L) -#endif - -#ifndef STATUS_ALIAS_EXISTS -# define STATUS_ALIAS_EXISTS ((NTSTATUS) 0xC0000154L) -#endif - -#ifndef STATUS_LOGON_NOT_GRANTED -# define STATUS_LOGON_NOT_GRANTED ((NTSTATUS) 0xC0000155L) -#endif - -#ifndef STATUS_TOO_MANY_SECRETS -# define STATUS_TOO_MANY_SECRETS ((NTSTATUS) 0xC0000156L) -#endif - -#ifndef STATUS_SECRET_TOO_LONG -# define STATUS_SECRET_TOO_LONG ((NTSTATUS) 0xC0000157L) -#endif - -#ifndef STATUS_INTERNAL_DB_ERROR -# define STATUS_INTERNAL_DB_ERROR ((NTSTATUS) 0xC0000158L) -#endif - -#ifndef STATUS_FULLSCREEN_MODE -# define STATUS_FULLSCREEN_MODE ((NTSTATUS) 0xC0000159L) -#endif - -#ifndef STATUS_TOO_MANY_CONTEXT_IDS -# define STATUS_TOO_MANY_CONTEXT_IDS ((NTSTATUS) 0xC000015AL) -#endif - -#ifndef STATUS_LOGON_TYPE_NOT_GRANTED -# define STATUS_LOGON_TYPE_NOT_GRANTED ((NTSTATUS) 0xC000015BL) -#endif - -#ifndef STATUS_NOT_REGISTRY_FILE -# define STATUS_NOT_REGISTRY_FILE ((NTSTATUS) 0xC000015CL) -#endif - -#ifndef STATUS_NT_CROSS_ENCRYPTION_REQUIRED -# define STATUS_NT_CROSS_ENCRYPTION_REQUIRED ((NTSTATUS) 0xC000015DL) -#endif - -#ifndef STATUS_DOMAIN_CTRLR_CONFIG_ERROR -# define STATUS_DOMAIN_CTRLR_CONFIG_ERROR ((NTSTATUS) 0xC000015EL) -#endif - -#ifndef STATUS_FT_MISSING_MEMBER -# define STATUS_FT_MISSING_MEMBER ((NTSTATUS) 0xC000015FL) -#endif - -#ifndef STATUS_ILL_FORMED_SERVICE_ENTRY -# define STATUS_ILL_FORMED_SERVICE_ENTRY ((NTSTATUS) 0xC0000160L) -#endif - -#ifndef STATUS_ILLEGAL_CHARACTER -# define STATUS_ILLEGAL_CHARACTER ((NTSTATUS) 0xC0000161L) -#endif - -#ifndef STATUS_UNMAPPABLE_CHARACTER -# define STATUS_UNMAPPABLE_CHARACTER ((NTSTATUS) 0xC0000162L) -#endif - -#ifndef STATUS_UNDEFINED_CHARACTER -# define STATUS_UNDEFINED_CHARACTER ((NTSTATUS) 0xC0000163L) -#endif - -#ifndef STATUS_FLOPPY_VOLUME -# define STATUS_FLOPPY_VOLUME ((NTSTATUS) 0xC0000164L) -#endif - -#ifndef STATUS_FLOPPY_ID_MARK_NOT_FOUND -# define STATUS_FLOPPY_ID_MARK_NOT_FOUND ((NTSTATUS) 0xC0000165L) -#endif - -#ifndef STATUS_FLOPPY_WRONG_CYLINDER -# define STATUS_FLOPPY_WRONG_CYLINDER ((NTSTATUS) 0xC0000166L) -#endif - -#ifndef STATUS_FLOPPY_UNKNOWN_ERROR -# define STATUS_FLOPPY_UNKNOWN_ERROR ((NTSTATUS) 0xC0000167L) -#endif - -#ifndef STATUS_FLOPPY_BAD_REGISTERS -# define STATUS_FLOPPY_BAD_REGISTERS ((NTSTATUS) 0xC0000168L) -#endif - -#ifndef STATUS_DISK_RECALIBRATE_FAILED -# define STATUS_DISK_RECALIBRATE_FAILED ((NTSTATUS) 0xC0000169L) -#endif - -#ifndef STATUS_DISK_OPERATION_FAILED -# define STATUS_DISK_OPERATION_FAILED ((NTSTATUS) 0xC000016AL) -#endif - -#ifndef STATUS_DISK_RESET_FAILED -# define STATUS_DISK_RESET_FAILED ((NTSTATUS) 0xC000016BL) -#endif - -#ifndef STATUS_SHARED_IRQ_BUSY -# define STATUS_SHARED_IRQ_BUSY ((NTSTATUS) 0xC000016CL) -#endif - -#ifndef STATUS_FT_ORPHANING -# define STATUS_FT_ORPHANING ((NTSTATUS) 0xC000016DL) -#endif - -#ifndef STATUS_BIOS_FAILED_TO_CONNECT_INTERRUPT -# define STATUS_BIOS_FAILED_TO_CONNECT_INTERRUPT ((NTSTATUS) 0xC000016EL) -#endif - -#ifndef STATUS_PARTITION_FAILURE -# define STATUS_PARTITION_FAILURE ((NTSTATUS) 0xC0000172L) -#endif - -#ifndef STATUS_INVALID_BLOCK_LENGTH -# define STATUS_INVALID_BLOCK_LENGTH ((NTSTATUS) 0xC0000173L) -#endif - -#ifndef STATUS_DEVICE_NOT_PARTITIONED -# define STATUS_DEVICE_NOT_PARTITIONED ((NTSTATUS) 0xC0000174L) -#endif - -#ifndef STATUS_UNABLE_TO_LOCK_MEDIA -# define STATUS_UNABLE_TO_LOCK_MEDIA ((NTSTATUS) 0xC0000175L) -#endif - -#ifndef STATUS_UNABLE_TO_UNLOAD_MEDIA -# define STATUS_UNABLE_TO_UNLOAD_MEDIA ((NTSTATUS) 0xC0000176L) -#endif - -#ifndef STATUS_EOM_OVERFLOW -# define STATUS_EOM_OVERFLOW ((NTSTATUS) 0xC0000177L) -#endif - -#ifndef STATUS_NO_MEDIA -# define STATUS_NO_MEDIA ((NTSTATUS) 0xC0000178L) -#endif - -#ifndef STATUS_NO_SUCH_MEMBER -# define STATUS_NO_SUCH_MEMBER ((NTSTATUS) 0xC000017AL) -#endif - -#ifndef STATUS_INVALID_MEMBER -# define STATUS_INVALID_MEMBER ((NTSTATUS) 0xC000017BL) -#endif - -#ifndef STATUS_KEY_DELETED -# define STATUS_KEY_DELETED ((NTSTATUS) 0xC000017CL) -#endif - -#ifndef STATUS_NO_LOG_SPACE -# define STATUS_NO_LOG_SPACE ((NTSTATUS) 0xC000017DL) -#endif - -#ifndef STATUS_TOO_MANY_SIDS -# define STATUS_TOO_MANY_SIDS ((NTSTATUS) 0xC000017EL) -#endif - -#ifndef STATUS_LM_CROSS_ENCRYPTION_REQUIRED -# define STATUS_LM_CROSS_ENCRYPTION_REQUIRED ((NTSTATUS) 0xC000017FL) -#endif - -#ifndef STATUS_KEY_HAS_CHILDREN -# define STATUS_KEY_HAS_CHILDREN ((NTSTATUS) 0xC0000180L) -#endif - -#ifndef STATUS_CHILD_MUST_BE_VOLATILE -# define STATUS_CHILD_MUST_BE_VOLATILE ((NTSTATUS) 0xC0000181L) -#endif - -#ifndef STATUS_DEVICE_CONFIGURATION_ERROR -# define STATUS_DEVICE_CONFIGURATION_ERROR ((NTSTATUS) 0xC0000182L) -#endif - -#ifndef STATUS_DRIVER_INTERNAL_ERROR -# define STATUS_DRIVER_INTERNAL_ERROR ((NTSTATUS) 0xC0000183L) -#endif - -#ifndef STATUS_INVALID_DEVICE_STATE -# define STATUS_INVALID_DEVICE_STATE ((NTSTATUS) 0xC0000184L) -#endif - -#ifndef STATUS_IO_DEVICE_ERROR -# define STATUS_IO_DEVICE_ERROR ((NTSTATUS) 0xC0000185L) -#endif - -#ifndef STATUS_DEVICE_PROTOCOL_ERROR -# define STATUS_DEVICE_PROTOCOL_ERROR ((NTSTATUS) 0xC0000186L) -#endif - -#ifndef STATUS_BACKUP_CONTROLLER -# define STATUS_BACKUP_CONTROLLER ((NTSTATUS) 0xC0000187L) -#endif - -#ifndef STATUS_LOG_FILE_FULL -# define STATUS_LOG_FILE_FULL ((NTSTATUS) 0xC0000188L) -#endif - -#ifndef STATUS_TOO_LATE -# define STATUS_TOO_LATE ((NTSTATUS) 0xC0000189L) -#endif - -#ifndef STATUS_NO_TRUST_LSA_SECRET -# define STATUS_NO_TRUST_LSA_SECRET ((NTSTATUS) 0xC000018AL) -#endif - -#ifndef STATUS_NO_TRUST_SAM_ACCOUNT -# define STATUS_NO_TRUST_SAM_ACCOUNT ((NTSTATUS) 0xC000018BL) -#endif - -#ifndef STATUS_TRUSTED_DOMAIN_FAILURE -# define STATUS_TRUSTED_DOMAIN_FAILURE ((NTSTATUS) 0xC000018CL) -#endif - -#ifndef STATUS_TRUSTED_RELATIONSHIP_FAILURE -# define STATUS_TRUSTED_RELATIONSHIP_FAILURE ((NTSTATUS) 0xC000018DL) -#endif - -#ifndef STATUS_EVENTLOG_FILE_CORRUPT -# define STATUS_EVENTLOG_FILE_CORRUPT ((NTSTATUS) 0xC000018EL) -#endif - -#ifndef STATUS_EVENTLOG_CANT_START -# define STATUS_EVENTLOG_CANT_START ((NTSTATUS) 0xC000018FL) -#endif - -#ifndef STATUS_TRUST_FAILURE -# define STATUS_TRUST_FAILURE ((NTSTATUS) 0xC0000190L) -#endif - -#ifndef STATUS_MUTANT_LIMIT_EXCEEDED -# define STATUS_MUTANT_LIMIT_EXCEEDED ((NTSTATUS) 0xC0000191L) -#endif - -#ifndef STATUS_NETLOGON_NOT_STARTED -# define STATUS_NETLOGON_NOT_STARTED ((NTSTATUS) 0xC0000192L) -#endif - -#ifndef STATUS_ACCOUNT_EXPIRED -# define STATUS_ACCOUNT_EXPIRED ((NTSTATUS) 0xC0000193L) -#endif - -#ifndef STATUS_POSSIBLE_DEADLOCK -# define STATUS_POSSIBLE_DEADLOCK ((NTSTATUS) 0xC0000194L) -#endif - -#ifndef STATUS_NETWORK_CREDENTIAL_CONFLICT -# define STATUS_NETWORK_CREDENTIAL_CONFLICT ((NTSTATUS) 0xC0000195L) -#endif - -#ifndef STATUS_REMOTE_SESSION_LIMIT -# define STATUS_REMOTE_SESSION_LIMIT ((NTSTATUS) 0xC0000196L) -#endif - -#ifndef STATUS_EVENTLOG_FILE_CHANGED -# define STATUS_EVENTLOG_FILE_CHANGED ((NTSTATUS) 0xC0000197L) -#endif - -#ifndef STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT -# define STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT ((NTSTATUS) 0xC0000198L) -#endif - -#ifndef STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT -# define STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT ((NTSTATUS) 0xC0000199L) -#endif - -#ifndef STATUS_NOLOGON_SERVER_TRUST_ACCOUNT -# define STATUS_NOLOGON_SERVER_TRUST_ACCOUNT ((NTSTATUS) 0xC000019AL) -#endif - -#ifndef STATUS_DOMAIN_TRUST_INCONSISTENT -# define STATUS_DOMAIN_TRUST_INCONSISTENT ((NTSTATUS) 0xC000019BL) -#endif - -#ifndef STATUS_FS_DRIVER_REQUIRED -# define STATUS_FS_DRIVER_REQUIRED ((NTSTATUS) 0xC000019CL) -#endif - -#ifndef STATUS_IMAGE_ALREADY_LOADED_AS_DLL -# define STATUS_IMAGE_ALREADY_LOADED_AS_DLL ((NTSTATUS) 0xC000019DL) -#endif - -#ifndef STATUS_INCOMPATIBLE_WITH_GLOBAL_SHORT_NAME_REGISTRY_SETTING -# define STATUS_INCOMPATIBLE_WITH_GLOBAL_SHORT_NAME_REGISTRY_SETTING ((NTSTATUS) 0xC000019EL) -#endif - -#ifndef STATUS_SHORT_NAMES_NOT_ENABLED_ON_VOLUME -# define STATUS_SHORT_NAMES_NOT_ENABLED_ON_VOLUME ((NTSTATUS) 0xC000019FL) -#endif - -#ifndef STATUS_SECURITY_STREAM_IS_INCONSISTENT -# define STATUS_SECURITY_STREAM_IS_INCONSISTENT ((NTSTATUS) 0xC00001A0L) -#endif - -#ifndef STATUS_INVALID_LOCK_RANGE -# define STATUS_INVALID_LOCK_RANGE ((NTSTATUS) 0xC00001A1L) -#endif - -#ifndef STATUS_INVALID_ACE_CONDITION -# define STATUS_INVALID_ACE_CONDITION ((NTSTATUS) 0xC00001A2L) -#endif - -#ifndef STATUS_IMAGE_SUBSYSTEM_NOT_PRESENT -# define STATUS_IMAGE_SUBSYSTEM_NOT_PRESENT ((NTSTATUS) 0xC00001A3L) -#endif - -#ifndef STATUS_NOTIFICATION_GUID_ALREADY_DEFINED -# define STATUS_NOTIFICATION_GUID_ALREADY_DEFINED ((NTSTATUS) 0xC00001A4L) -#endif - -#ifndef STATUS_NETWORK_OPEN_RESTRICTION -# define STATUS_NETWORK_OPEN_RESTRICTION ((NTSTATUS) 0xC0000201L) -#endif - -#ifndef STATUS_NO_USER_SESSION_KEY -# define STATUS_NO_USER_SESSION_KEY ((NTSTATUS) 0xC0000202L) -#endif - -#ifndef STATUS_USER_SESSION_DELETED -# define STATUS_USER_SESSION_DELETED ((NTSTATUS) 0xC0000203L) -#endif - -#ifndef STATUS_RESOURCE_LANG_NOT_FOUND -# define STATUS_RESOURCE_LANG_NOT_FOUND ((NTSTATUS) 0xC0000204L) -#endif - -#ifndef STATUS_INSUFF_SERVER_RESOURCES -# define STATUS_INSUFF_SERVER_RESOURCES ((NTSTATUS) 0xC0000205L) -#endif - -#ifndef STATUS_INVALID_BUFFER_SIZE -# define STATUS_INVALID_BUFFER_SIZE ((NTSTATUS) 0xC0000206L) -#endif - -#ifndef STATUS_INVALID_ADDRESS_COMPONENT -# define STATUS_INVALID_ADDRESS_COMPONENT ((NTSTATUS) 0xC0000207L) -#endif - -#ifndef STATUS_INVALID_ADDRESS_WILDCARD -# define STATUS_INVALID_ADDRESS_WILDCARD ((NTSTATUS) 0xC0000208L) -#endif - -#ifndef STATUS_TOO_MANY_ADDRESSES -# define STATUS_TOO_MANY_ADDRESSES ((NTSTATUS) 0xC0000209L) -#endif - -#ifndef STATUS_ADDRESS_ALREADY_EXISTS -# define STATUS_ADDRESS_ALREADY_EXISTS ((NTSTATUS) 0xC000020AL) -#endif - -#ifndef STATUS_ADDRESS_CLOSED -# define STATUS_ADDRESS_CLOSED ((NTSTATUS) 0xC000020BL) -#endif - -#ifndef STATUS_CONNECTION_DISCONNECTED -# define STATUS_CONNECTION_DISCONNECTED ((NTSTATUS) 0xC000020CL) -#endif - -#ifndef STATUS_CONNECTION_RESET -# define STATUS_CONNECTION_RESET ((NTSTATUS) 0xC000020DL) -#endif - -#ifndef STATUS_TOO_MANY_NODES -# define STATUS_TOO_MANY_NODES ((NTSTATUS) 0xC000020EL) -#endif - -#ifndef STATUS_TRANSACTION_ABORTED -# define STATUS_TRANSACTION_ABORTED ((NTSTATUS) 0xC000020FL) -#endif - -#ifndef STATUS_TRANSACTION_TIMED_OUT -# define STATUS_TRANSACTION_TIMED_OUT ((NTSTATUS) 0xC0000210L) -#endif - -#ifndef STATUS_TRANSACTION_NO_RELEASE -# define STATUS_TRANSACTION_NO_RELEASE ((NTSTATUS) 0xC0000211L) -#endif - -#ifndef STATUS_TRANSACTION_NO_MATCH -# define STATUS_TRANSACTION_NO_MATCH ((NTSTATUS) 0xC0000212L) -#endif - -#ifndef STATUS_TRANSACTION_RESPONDED -# define STATUS_TRANSACTION_RESPONDED ((NTSTATUS) 0xC0000213L) -#endif - -#ifndef STATUS_TRANSACTION_INVALID_ID -# define STATUS_TRANSACTION_INVALID_ID ((NTSTATUS) 0xC0000214L) -#endif - -#ifndef STATUS_TRANSACTION_INVALID_TYPE -# define STATUS_TRANSACTION_INVALID_TYPE ((NTSTATUS) 0xC0000215L) -#endif - -#ifndef STATUS_NOT_SERVER_SESSION -# define STATUS_NOT_SERVER_SESSION ((NTSTATUS) 0xC0000216L) -#endif - -#ifndef STATUS_NOT_CLIENT_SESSION -# define STATUS_NOT_CLIENT_SESSION ((NTSTATUS) 0xC0000217L) -#endif - -#ifndef STATUS_CANNOT_LOAD_REGISTRY_FILE -# define STATUS_CANNOT_LOAD_REGISTRY_FILE ((NTSTATUS) 0xC0000218L) -#endif - -#ifndef STATUS_DEBUG_ATTACH_FAILED -# define STATUS_DEBUG_ATTACH_FAILED ((NTSTATUS) 0xC0000219L) -#endif - -#ifndef STATUS_SYSTEM_PROCESS_TERMINATED -# define STATUS_SYSTEM_PROCESS_TERMINATED ((NTSTATUS) 0xC000021AL) -#endif - -#ifndef STATUS_DATA_NOT_ACCEPTED -# define STATUS_DATA_NOT_ACCEPTED ((NTSTATUS) 0xC000021BL) -#endif - -#ifndef STATUS_NO_BROWSER_SERVERS_FOUND -# define STATUS_NO_BROWSER_SERVERS_FOUND ((NTSTATUS) 0xC000021CL) -#endif - -#ifndef STATUS_VDM_HARD_ERROR -# define STATUS_VDM_HARD_ERROR ((NTSTATUS) 0xC000021DL) -#endif - -#ifndef STATUS_DRIVER_CANCEL_TIMEOUT -# define STATUS_DRIVER_CANCEL_TIMEOUT ((NTSTATUS) 0xC000021EL) -#endif - -#ifndef STATUS_REPLY_MESSAGE_MISMATCH -# define STATUS_REPLY_MESSAGE_MISMATCH ((NTSTATUS) 0xC000021FL) -#endif - -#ifndef STATUS_MAPPED_ALIGNMENT -# define STATUS_MAPPED_ALIGNMENT ((NTSTATUS) 0xC0000220L) -#endif - -#ifndef STATUS_IMAGE_CHECKSUM_MISMATCH -# define STATUS_IMAGE_CHECKSUM_MISMATCH ((NTSTATUS) 0xC0000221L) -#endif - -#ifndef STATUS_LOST_WRITEBEHIND_DATA -# define STATUS_LOST_WRITEBEHIND_DATA ((NTSTATUS) 0xC0000222L) -#endif - -#ifndef STATUS_CLIENT_SERVER_PARAMETERS_INVALID -# define STATUS_CLIENT_SERVER_PARAMETERS_INVALID ((NTSTATUS) 0xC0000223L) -#endif - -#ifndef STATUS_PASSWORD_MUST_CHANGE -# define STATUS_PASSWORD_MUST_CHANGE ((NTSTATUS) 0xC0000224L) -#endif - -#ifndef STATUS_NOT_FOUND -# define STATUS_NOT_FOUND ((NTSTATUS) 0xC0000225L) -#endif - -#ifndef STATUS_NOT_TINY_STREAM -# define STATUS_NOT_TINY_STREAM ((NTSTATUS) 0xC0000226L) -#endif - -#ifndef STATUS_RECOVERY_FAILURE -# define STATUS_RECOVERY_FAILURE ((NTSTATUS) 0xC0000227L) -#endif - -#ifndef STATUS_STACK_OVERFLOW_READ -# define STATUS_STACK_OVERFLOW_READ ((NTSTATUS) 0xC0000228L) -#endif - -#ifndef STATUS_FAIL_CHECK -# define STATUS_FAIL_CHECK ((NTSTATUS) 0xC0000229L) -#endif - -#ifndef STATUS_DUPLICATE_OBJECTID -# define STATUS_DUPLICATE_OBJECTID ((NTSTATUS) 0xC000022AL) -#endif - -#ifndef STATUS_OBJECTID_EXISTS -# define STATUS_OBJECTID_EXISTS ((NTSTATUS) 0xC000022BL) -#endif - -#ifndef STATUS_CONVERT_TO_LARGE -# define STATUS_CONVERT_TO_LARGE ((NTSTATUS) 0xC000022CL) -#endif - -#ifndef STATUS_RETRY -# define STATUS_RETRY ((NTSTATUS) 0xC000022DL) -#endif - -#ifndef STATUS_FOUND_OUT_OF_SCOPE -# define STATUS_FOUND_OUT_OF_SCOPE ((NTSTATUS) 0xC000022EL) -#endif - -#ifndef STATUS_ALLOCATE_BUCKET -# define STATUS_ALLOCATE_BUCKET ((NTSTATUS) 0xC000022FL) -#endif - -#ifndef STATUS_PROPSET_NOT_FOUND -# define STATUS_PROPSET_NOT_FOUND ((NTSTATUS) 0xC0000230L) -#endif - -#ifndef STATUS_MARSHALL_OVERFLOW -# define STATUS_MARSHALL_OVERFLOW ((NTSTATUS) 0xC0000231L) -#endif - -#ifndef STATUS_INVALID_VARIANT -# define STATUS_INVALID_VARIANT ((NTSTATUS) 0xC0000232L) -#endif - -#ifndef STATUS_DOMAIN_CONTROLLER_NOT_FOUND -# define STATUS_DOMAIN_CONTROLLER_NOT_FOUND ((NTSTATUS) 0xC0000233L) -#endif - -#ifndef STATUS_ACCOUNT_LOCKED_OUT -# define STATUS_ACCOUNT_LOCKED_OUT ((NTSTATUS) 0xC0000234L) -#endif - -#ifndef STATUS_HANDLE_NOT_CLOSABLE -# define STATUS_HANDLE_NOT_CLOSABLE ((NTSTATUS) 0xC0000235L) -#endif - -#ifndef STATUS_CONNECTION_REFUSED -# define STATUS_CONNECTION_REFUSED ((NTSTATUS) 0xC0000236L) -#endif - -#ifndef STATUS_GRACEFUL_DISCONNECT -# define STATUS_GRACEFUL_DISCONNECT ((NTSTATUS) 0xC0000237L) -#endif - -#ifndef STATUS_ADDRESS_ALREADY_ASSOCIATED -# define STATUS_ADDRESS_ALREADY_ASSOCIATED ((NTSTATUS) 0xC0000238L) -#endif - -#ifndef STATUS_ADDRESS_NOT_ASSOCIATED -# define STATUS_ADDRESS_NOT_ASSOCIATED ((NTSTATUS) 0xC0000239L) -#endif - -#ifndef STATUS_CONNECTION_INVALID -# define STATUS_CONNECTION_INVALID ((NTSTATUS) 0xC000023AL) -#endif - -#ifndef STATUS_CONNECTION_ACTIVE -# define STATUS_CONNECTION_ACTIVE ((NTSTATUS) 0xC000023BL) -#endif - -#ifndef STATUS_NETWORK_UNREACHABLE -# define STATUS_NETWORK_UNREACHABLE ((NTSTATUS) 0xC000023CL) -#endif - -#ifndef STATUS_HOST_UNREACHABLE -# define STATUS_HOST_UNREACHABLE ((NTSTATUS) 0xC000023DL) -#endif - -#ifndef STATUS_PROTOCOL_UNREACHABLE -# define STATUS_PROTOCOL_UNREACHABLE ((NTSTATUS) 0xC000023EL) -#endif - -#ifndef STATUS_PORT_UNREACHABLE -# define STATUS_PORT_UNREACHABLE ((NTSTATUS) 0xC000023FL) -#endif - -#ifndef STATUS_REQUEST_ABORTED -# define STATUS_REQUEST_ABORTED ((NTSTATUS) 0xC0000240L) -#endif - -#ifndef STATUS_CONNECTION_ABORTED -# define STATUS_CONNECTION_ABORTED ((NTSTATUS) 0xC0000241L) -#endif - -#ifndef STATUS_BAD_COMPRESSION_BUFFER -# define STATUS_BAD_COMPRESSION_BUFFER ((NTSTATUS) 0xC0000242L) -#endif - -#ifndef STATUS_USER_MAPPED_FILE -# define STATUS_USER_MAPPED_FILE ((NTSTATUS) 0xC0000243L) -#endif - -#ifndef STATUS_AUDIT_FAILED -# define STATUS_AUDIT_FAILED ((NTSTATUS) 0xC0000244L) -#endif - -#ifndef STATUS_TIMER_RESOLUTION_NOT_SET -# define STATUS_TIMER_RESOLUTION_NOT_SET ((NTSTATUS) 0xC0000245L) -#endif - -#ifndef STATUS_CONNECTION_COUNT_LIMIT -# define STATUS_CONNECTION_COUNT_LIMIT ((NTSTATUS) 0xC0000246L) -#endif - -#ifndef STATUS_LOGIN_TIME_RESTRICTION -# define STATUS_LOGIN_TIME_RESTRICTION ((NTSTATUS) 0xC0000247L) -#endif - -#ifndef STATUS_LOGIN_WKSTA_RESTRICTION -# define STATUS_LOGIN_WKSTA_RESTRICTION ((NTSTATUS) 0xC0000248L) -#endif - -#ifndef STATUS_IMAGE_MP_UP_MISMATCH -# define STATUS_IMAGE_MP_UP_MISMATCH ((NTSTATUS) 0xC0000249L) -#endif - -#ifndef STATUS_INSUFFICIENT_LOGON_INFO -# define STATUS_INSUFFICIENT_LOGON_INFO ((NTSTATUS) 0xC0000250L) -#endif - -#ifndef STATUS_BAD_DLL_ENTRYPOINT -# define STATUS_BAD_DLL_ENTRYPOINT ((NTSTATUS) 0xC0000251L) -#endif - -#ifndef STATUS_BAD_SERVICE_ENTRYPOINT -# define STATUS_BAD_SERVICE_ENTRYPOINT ((NTSTATUS) 0xC0000252L) -#endif - -#ifndef STATUS_LPC_REPLY_LOST -# define STATUS_LPC_REPLY_LOST ((NTSTATUS) 0xC0000253L) -#endif - -#ifndef STATUS_IP_ADDRESS_CONFLICT1 -# define STATUS_IP_ADDRESS_CONFLICT1 ((NTSTATUS) 0xC0000254L) -#endif - -#ifndef STATUS_IP_ADDRESS_CONFLICT2 -# define STATUS_IP_ADDRESS_CONFLICT2 ((NTSTATUS) 0xC0000255L) -#endif - -#ifndef STATUS_REGISTRY_QUOTA_LIMIT -# define STATUS_REGISTRY_QUOTA_LIMIT ((NTSTATUS) 0xC0000256L) -#endif - -#ifndef STATUS_PATH_NOT_COVERED -# define STATUS_PATH_NOT_COVERED ((NTSTATUS) 0xC0000257L) -#endif - -#ifndef STATUS_NO_CALLBACK_ACTIVE -# define STATUS_NO_CALLBACK_ACTIVE ((NTSTATUS) 0xC0000258L) -#endif - -#ifndef STATUS_LICENSE_QUOTA_EXCEEDED -# define STATUS_LICENSE_QUOTA_EXCEEDED ((NTSTATUS) 0xC0000259L) -#endif - -#ifndef STATUS_PWD_TOO_SHORT -# define STATUS_PWD_TOO_SHORT ((NTSTATUS) 0xC000025AL) -#endif - -#ifndef STATUS_PWD_TOO_RECENT -# define STATUS_PWD_TOO_RECENT ((NTSTATUS) 0xC000025BL) -#endif - -#ifndef STATUS_PWD_HISTORY_CONFLICT -# define STATUS_PWD_HISTORY_CONFLICT ((NTSTATUS) 0xC000025CL) -#endif - -#ifndef STATUS_PLUGPLAY_NO_DEVICE -# define STATUS_PLUGPLAY_NO_DEVICE ((NTSTATUS) 0xC000025EL) -#endif - -#ifndef STATUS_UNSUPPORTED_COMPRESSION -# define STATUS_UNSUPPORTED_COMPRESSION ((NTSTATUS) 0xC000025FL) -#endif - -#ifndef STATUS_INVALID_HW_PROFILE -# define STATUS_INVALID_HW_PROFILE ((NTSTATUS) 0xC0000260L) -#endif - -#ifndef STATUS_INVALID_PLUGPLAY_DEVICE_PATH -# define STATUS_INVALID_PLUGPLAY_DEVICE_PATH ((NTSTATUS) 0xC0000261L) -#endif - -#ifndef STATUS_DRIVER_ORDINAL_NOT_FOUND -# define STATUS_DRIVER_ORDINAL_NOT_FOUND ((NTSTATUS) 0xC0000262L) -#endif - -#ifndef STATUS_DRIVER_ENTRYPOINT_NOT_FOUND -# define STATUS_DRIVER_ENTRYPOINT_NOT_FOUND ((NTSTATUS) 0xC0000263L) -#endif - -#ifndef STATUS_RESOURCE_NOT_OWNED -# define STATUS_RESOURCE_NOT_OWNED ((NTSTATUS) 0xC0000264L) -#endif - -#ifndef STATUS_TOO_MANY_LINKS -# define STATUS_TOO_MANY_LINKS ((NTSTATUS) 0xC0000265L) -#endif - -#ifndef STATUS_QUOTA_LIST_INCONSISTENT -# define STATUS_QUOTA_LIST_INCONSISTENT ((NTSTATUS) 0xC0000266L) -#endif - -#ifndef STATUS_FILE_IS_OFFLINE -# define STATUS_FILE_IS_OFFLINE ((NTSTATUS) 0xC0000267L) -#endif - -#ifndef STATUS_EVALUATION_EXPIRATION -# define STATUS_EVALUATION_EXPIRATION ((NTSTATUS) 0xC0000268L) -#endif - -#ifndef STATUS_ILLEGAL_DLL_RELOCATION -# define STATUS_ILLEGAL_DLL_RELOCATION ((NTSTATUS) 0xC0000269L) -#endif - -#ifndef STATUS_LICENSE_VIOLATION -# define STATUS_LICENSE_VIOLATION ((NTSTATUS) 0xC000026AL) -#endif - -#ifndef STATUS_DLL_INIT_FAILED_LOGOFF -# define STATUS_DLL_INIT_FAILED_LOGOFF ((NTSTATUS) 0xC000026BL) -#endif - -#ifndef STATUS_DRIVER_UNABLE_TO_LOAD -# define STATUS_DRIVER_UNABLE_TO_LOAD ((NTSTATUS) 0xC000026CL) -#endif - -#ifndef STATUS_DFS_UNAVAILABLE -# define STATUS_DFS_UNAVAILABLE ((NTSTATUS) 0xC000026DL) -#endif - -#ifndef STATUS_VOLUME_DISMOUNTED -# define STATUS_VOLUME_DISMOUNTED ((NTSTATUS) 0xC000026EL) -#endif - -#ifndef STATUS_WX86_INTERNAL_ERROR -# define STATUS_WX86_INTERNAL_ERROR ((NTSTATUS) 0xC000026FL) -#endif - -#ifndef STATUS_WX86_FLOAT_STACK_CHECK -# define STATUS_WX86_FLOAT_STACK_CHECK ((NTSTATUS) 0xC0000270L) -#endif - -#ifndef STATUS_VALIDATE_CONTINUE -# define STATUS_VALIDATE_CONTINUE ((NTSTATUS) 0xC0000271L) -#endif - -#ifndef STATUS_NO_MATCH -# define STATUS_NO_MATCH ((NTSTATUS) 0xC0000272L) -#endif - -#ifndef STATUS_NO_MORE_MATCHES -# define STATUS_NO_MORE_MATCHES ((NTSTATUS) 0xC0000273L) -#endif - -#ifndef STATUS_NOT_A_REPARSE_POINT -# define STATUS_NOT_A_REPARSE_POINT ((NTSTATUS) 0xC0000275L) -#endif - -#ifndef STATUS_IO_REPARSE_TAG_INVALID -# define STATUS_IO_REPARSE_TAG_INVALID ((NTSTATUS) 0xC0000276L) -#endif - -#ifndef STATUS_IO_REPARSE_TAG_MISMATCH -# define STATUS_IO_REPARSE_TAG_MISMATCH ((NTSTATUS) 0xC0000277L) -#endif - -#ifndef STATUS_IO_REPARSE_DATA_INVALID -# define STATUS_IO_REPARSE_DATA_INVALID ((NTSTATUS) 0xC0000278L) -#endif - -#ifndef STATUS_IO_REPARSE_TAG_NOT_HANDLED -# define STATUS_IO_REPARSE_TAG_NOT_HANDLED ((NTSTATUS) 0xC0000279L) -#endif - -#ifndef STATUS_REPARSE_POINT_NOT_RESOLVED -# define STATUS_REPARSE_POINT_NOT_RESOLVED ((NTSTATUS) 0xC0000280L) -#endif - -#ifndef STATUS_DIRECTORY_IS_A_REPARSE_POINT -# define STATUS_DIRECTORY_IS_A_REPARSE_POINT ((NTSTATUS) 0xC0000281L) -#endif - -#ifndef STATUS_RANGE_LIST_CONFLICT -# define STATUS_RANGE_LIST_CONFLICT ((NTSTATUS) 0xC0000282L) -#endif - -#ifndef STATUS_SOURCE_ELEMENT_EMPTY -# define STATUS_SOURCE_ELEMENT_EMPTY ((NTSTATUS) 0xC0000283L) -#endif - -#ifndef STATUS_DESTINATION_ELEMENT_FULL -# define STATUS_DESTINATION_ELEMENT_FULL ((NTSTATUS) 0xC0000284L) -#endif - -#ifndef STATUS_ILLEGAL_ELEMENT_ADDRESS -# define STATUS_ILLEGAL_ELEMENT_ADDRESS ((NTSTATUS) 0xC0000285L) -#endif - -#ifndef STATUS_MAGAZINE_NOT_PRESENT -# define STATUS_MAGAZINE_NOT_PRESENT ((NTSTATUS) 0xC0000286L) -#endif - -#ifndef STATUS_REINITIALIZATION_NEEDED -# define STATUS_REINITIALIZATION_NEEDED ((NTSTATUS) 0xC0000287L) -#endif - -#ifndef STATUS_DEVICE_REQUIRES_CLEANING -# define STATUS_DEVICE_REQUIRES_CLEANING ((NTSTATUS) 0x80000288L) -#endif - -#ifndef STATUS_DEVICE_DOOR_OPEN -# define STATUS_DEVICE_DOOR_OPEN ((NTSTATUS) 0x80000289L) -#endif - -#ifndef STATUS_ENCRYPTION_FAILED -# define STATUS_ENCRYPTION_FAILED ((NTSTATUS) 0xC000028AL) -#endif - -#ifndef STATUS_DECRYPTION_FAILED -# define STATUS_DECRYPTION_FAILED ((NTSTATUS) 0xC000028BL) -#endif - -#ifndef STATUS_RANGE_NOT_FOUND -# define STATUS_RANGE_NOT_FOUND ((NTSTATUS) 0xC000028CL) -#endif - -#ifndef STATUS_NO_RECOVERY_POLICY -# define STATUS_NO_RECOVERY_POLICY ((NTSTATUS) 0xC000028DL) -#endif - -#ifndef STATUS_NO_EFS -# define STATUS_NO_EFS ((NTSTATUS) 0xC000028EL) -#endif - -#ifndef STATUS_WRONG_EFS -# define STATUS_WRONG_EFS ((NTSTATUS) 0xC000028FL) -#endif - -#ifndef STATUS_NO_USER_KEYS -# define STATUS_NO_USER_KEYS ((NTSTATUS) 0xC0000290L) -#endif - -#ifndef STATUS_FILE_NOT_ENCRYPTED -# define STATUS_FILE_NOT_ENCRYPTED ((NTSTATUS) 0xC0000291L) -#endif - -#ifndef STATUS_NOT_EXPORT_FORMAT -# define STATUS_NOT_EXPORT_FORMAT ((NTSTATUS) 0xC0000292L) -#endif - -#ifndef STATUS_FILE_ENCRYPTED -# define STATUS_FILE_ENCRYPTED ((NTSTATUS) 0xC0000293L) -#endif - -#ifndef STATUS_WAKE_SYSTEM -# define STATUS_WAKE_SYSTEM ((NTSTATUS) 0x40000294L) -#endif - -#ifndef STATUS_WMI_GUID_NOT_FOUND -# define STATUS_WMI_GUID_NOT_FOUND ((NTSTATUS) 0xC0000295L) -#endif - -#ifndef STATUS_WMI_INSTANCE_NOT_FOUND -# define STATUS_WMI_INSTANCE_NOT_FOUND ((NTSTATUS) 0xC0000296L) -#endif - -#ifndef STATUS_WMI_ITEMID_NOT_FOUND -# define STATUS_WMI_ITEMID_NOT_FOUND ((NTSTATUS) 0xC0000297L) -#endif - -#ifndef STATUS_WMI_TRY_AGAIN -# define STATUS_WMI_TRY_AGAIN ((NTSTATUS) 0xC0000298L) -#endif - -#ifndef STATUS_SHARED_POLICY -# define STATUS_SHARED_POLICY ((NTSTATUS) 0xC0000299L) -#endif - -#ifndef STATUS_POLICY_OBJECT_NOT_FOUND -# define STATUS_POLICY_OBJECT_NOT_FOUND ((NTSTATUS) 0xC000029AL) -#endif - -#ifndef STATUS_POLICY_ONLY_IN_DS -# define STATUS_POLICY_ONLY_IN_DS ((NTSTATUS) 0xC000029BL) -#endif - -#ifndef STATUS_VOLUME_NOT_UPGRADED -# define STATUS_VOLUME_NOT_UPGRADED ((NTSTATUS) 0xC000029CL) -#endif - -#ifndef STATUS_REMOTE_STORAGE_NOT_ACTIVE -# define STATUS_REMOTE_STORAGE_NOT_ACTIVE ((NTSTATUS) 0xC000029DL) -#endif - -#ifndef STATUS_REMOTE_STORAGE_MEDIA_ERROR -# define STATUS_REMOTE_STORAGE_MEDIA_ERROR ((NTSTATUS) 0xC000029EL) -#endif - -#ifndef STATUS_NO_TRACKING_SERVICE -# define STATUS_NO_TRACKING_SERVICE ((NTSTATUS) 0xC000029FL) -#endif - -#ifndef STATUS_SERVER_SID_MISMATCH -# define STATUS_SERVER_SID_MISMATCH ((NTSTATUS) 0xC00002A0L) -#endif - -#ifndef STATUS_DS_NO_ATTRIBUTE_OR_VALUE -# define STATUS_DS_NO_ATTRIBUTE_OR_VALUE ((NTSTATUS) 0xC00002A1L) -#endif - -#ifndef STATUS_DS_INVALID_ATTRIBUTE_SYNTAX -# define STATUS_DS_INVALID_ATTRIBUTE_SYNTAX ((NTSTATUS) 0xC00002A2L) -#endif - -#ifndef STATUS_DS_ATTRIBUTE_TYPE_UNDEFINED -# define STATUS_DS_ATTRIBUTE_TYPE_UNDEFINED ((NTSTATUS) 0xC00002A3L) -#endif - -#ifndef STATUS_DS_ATTRIBUTE_OR_VALUE_EXISTS -# define STATUS_DS_ATTRIBUTE_OR_VALUE_EXISTS ((NTSTATUS) 0xC00002A4L) -#endif - -#ifndef STATUS_DS_BUSY -# define STATUS_DS_BUSY ((NTSTATUS) 0xC00002A5L) -#endif - -#ifndef STATUS_DS_UNAVAILABLE -# define STATUS_DS_UNAVAILABLE ((NTSTATUS) 0xC00002A6L) -#endif - -#ifndef STATUS_DS_NO_RIDS_ALLOCATED -# define STATUS_DS_NO_RIDS_ALLOCATED ((NTSTATUS) 0xC00002A7L) -#endif - -#ifndef STATUS_DS_NO_MORE_RIDS -# define STATUS_DS_NO_MORE_RIDS ((NTSTATUS) 0xC00002A8L) -#endif - -#ifndef STATUS_DS_INCORRECT_ROLE_OWNER -# define STATUS_DS_INCORRECT_ROLE_OWNER ((NTSTATUS) 0xC00002A9L) -#endif - -#ifndef STATUS_DS_RIDMGR_INIT_ERROR -# define STATUS_DS_RIDMGR_INIT_ERROR ((NTSTATUS) 0xC00002AAL) -#endif - -#ifndef STATUS_DS_OBJ_CLASS_VIOLATION -# define STATUS_DS_OBJ_CLASS_VIOLATION ((NTSTATUS) 0xC00002ABL) -#endif - -#ifndef STATUS_DS_CANT_ON_NON_LEAF -# define STATUS_DS_CANT_ON_NON_LEAF ((NTSTATUS) 0xC00002ACL) -#endif - -#ifndef STATUS_DS_CANT_ON_RDN -# define STATUS_DS_CANT_ON_RDN ((NTSTATUS) 0xC00002ADL) -#endif - -#ifndef STATUS_DS_CANT_MOD_OBJ_CLASS -# define STATUS_DS_CANT_MOD_OBJ_CLASS ((NTSTATUS) 0xC00002AEL) -#endif - -#ifndef STATUS_DS_CROSS_DOM_MOVE_FAILED -# define STATUS_DS_CROSS_DOM_MOVE_FAILED ((NTSTATUS) 0xC00002AFL) -#endif - -#ifndef STATUS_DS_GC_NOT_AVAILABLE -# define STATUS_DS_GC_NOT_AVAILABLE ((NTSTATUS) 0xC00002B0L) -#endif - -#ifndef STATUS_DIRECTORY_SERVICE_REQUIRED -# define STATUS_DIRECTORY_SERVICE_REQUIRED ((NTSTATUS) 0xC00002B1L) -#endif - -#ifndef STATUS_REPARSE_ATTRIBUTE_CONFLICT -# define STATUS_REPARSE_ATTRIBUTE_CONFLICT ((NTSTATUS) 0xC00002B2L) -#endif - -#ifndef STATUS_CANT_ENABLE_DENY_ONLY -# define STATUS_CANT_ENABLE_DENY_ONLY ((NTSTATUS) 0xC00002B3L) -#endif - -#ifndef STATUS_FLOAT_MULTIPLE_FAULTS -# define STATUS_FLOAT_MULTIPLE_FAULTS ((NTSTATUS) 0xC00002B4L) -#endif - -#ifndef STATUS_FLOAT_MULTIPLE_TRAPS -# define STATUS_FLOAT_MULTIPLE_TRAPS ((NTSTATUS) 0xC00002B5L) -#endif - -#ifndef STATUS_DEVICE_REMOVED -# define STATUS_DEVICE_REMOVED ((NTSTATUS) 0xC00002B6L) -#endif - -#ifndef STATUS_JOURNAL_DELETE_IN_PROGRESS -# define STATUS_JOURNAL_DELETE_IN_PROGRESS ((NTSTATUS) 0xC00002B7L) -#endif - -#ifndef STATUS_JOURNAL_NOT_ACTIVE -# define STATUS_JOURNAL_NOT_ACTIVE ((NTSTATUS) 0xC00002B8L) -#endif - -#ifndef STATUS_NOINTERFACE -# define STATUS_NOINTERFACE ((NTSTATUS) 0xC00002B9L) -#endif - -#ifndef STATUS_DS_ADMIN_LIMIT_EXCEEDED -# define STATUS_DS_ADMIN_LIMIT_EXCEEDED ((NTSTATUS) 0xC00002C1L) -#endif - -#ifndef STATUS_DRIVER_FAILED_SLEEP -# define STATUS_DRIVER_FAILED_SLEEP ((NTSTATUS) 0xC00002C2L) -#endif - -#ifndef STATUS_MUTUAL_AUTHENTICATION_FAILED -# define STATUS_MUTUAL_AUTHENTICATION_FAILED ((NTSTATUS) 0xC00002C3L) -#endif - -#ifndef STATUS_CORRUPT_SYSTEM_FILE -# define STATUS_CORRUPT_SYSTEM_FILE ((NTSTATUS) 0xC00002C4L) -#endif - -#ifndef STATUS_DATATYPE_MISALIGNMENT_ERROR -# define STATUS_DATATYPE_MISALIGNMENT_ERROR ((NTSTATUS) 0xC00002C5L) -#endif - -#ifndef STATUS_WMI_READ_ONLY -# define STATUS_WMI_READ_ONLY ((NTSTATUS) 0xC00002C6L) -#endif - -#ifndef STATUS_WMI_SET_FAILURE -# define STATUS_WMI_SET_FAILURE ((NTSTATUS) 0xC00002C7L) -#endif - -#ifndef STATUS_COMMITMENT_MINIMUM -# define STATUS_COMMITMENT_MINIMUM ((NTSTATUS) 0xC00002C8L) -#endif - -#ifndef STATUS_REG_NAT_CONSUMPTION -# define STATUS_REG_NAT_CONSUMPTION ((NTSTATUS) 0xC00002C9L) -#endif - -#ifndef STATUS_TRANSPORT_FULL -# define STATUS_TRANSPORT_FULL ((NTSTATUS) 0xC00002CAL) -#endif - -#ifndef STATUS_DS_SAM_INIT_FAILURE -# define STATUS_DS_SAM_INIT_FAILURE ((NTSTATUS) 0xC00002CBL) -#endif - -#ifndef STATUS_ONLY_IF_CONNECTED -# define STATUS_ONLY_IF_CONNECTED ((NTSTATUS) 0xC00002CCL) -#endif - -#ifndef STATUS_DS_SENSITIVE_GROUP_VIOLATION -# define STATUS_DS_SENSITIVE_GROUP_VIOLATION ((NTSTATUS) 0xC00002CDL) -#endif - -#ifndef STATUS_PNP_RESTART_ENUMERATION -# define STATUS_PNP_RESTART_ENUMERATION ((NTSTATUS) 0xC00002CEL) -#endif - -#ifndef STATUS_JOURNAL_ENTRY_DELETED -# define STATUS_JOURNAL_ENTRY_DELETED ((NTSTATUS) 0xC00002CFL) -#endif - -#ifndef STATUS_DS_CANT_MOD_PRIMARYGROUPID -# define STATUS_DS_CANT_MOD_PRIMARYGROUPID ((NTSTATUS) 0xC00002D0L) -#endif - -#ifndef STATUS_SYSTEM_IMAGE_BAD_SIGNATURE -# define STATUS_SYSTEM_IMAGE_BAD_SIGNATURE ((NTSTATUS) 0xC00002D1L) -#endif - -#ifndef STATUS_PNP_REBOOT_REQUIRED -# define STATUS_PNP_REBOOT_REQUIRED ((NTSTATUS) 0xC00002D2L) -#endif - -#ifndef STATUS_POWER_STATE_INVALID -# define STATUS_POWER_STATE_INVALID ((NTSTATUS) 0xC00002D3L) -#endif - -#ifndef STATUS_DS_INVALID_GROUP_TYPE -# define STATUS_DS_INVALID_GROUP_TYPE ((NTSTATUS) 0xC00002D4L) -#endif - -#ifndef STATUS_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN -# define STATUS_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN ((NTSTATUS) 0xC00002D5L) -#endif - -#ifndef STATUS_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN -# define STATUS_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN ((NTSTATUS) 0xC00002D6L) -#endif - -#ifndef STATUS_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER -# define STATUS_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER ((NTSTATUS) 0xC00002D7L) -#endif - -#ifndef STATUS_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER -# define STATUS_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER ((NTSTATUS) 0xC00002D8L) -#endif - -#ifndef STATUS_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER -# define STATUS_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER ((NTSTATUS) 0xC00002D9L) -#endif - -#ifndef STATUS_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER -# define STATUS_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER ((NTSTATUS) 0xC00002DAL) -#endif - -#ifndef STATUS_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER -# define STATUS_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER ((NTSTATUS) 0xC00002DBL) -#endif - -#ifndef STATUS_DS_HAVE_PRIMARY_MEMBERS -# define STATUS_DS_HAVE_PRIMARY_MEMBERS ((NTSTATUS) 0xC00002DCL) -#endif - -#ifndef STATUS_WMI_NOT_SUPPORTED -# define STATUS_WMI_NOT_SUPPORTED ((NTSTATUS) 0xC00002DDL) -#endif - -#ifndef STATUS_INSUFFICIENT_POWER -# define STATUS_INSUFFICIENT_POWER ((NTSTATUS) 0xC00002DEL) -#endif - -#ifndef STATUS_SAM_NEED_BOOTKEY_PASSWORD -# define STATUS_SAM_NEED_BOOTKEY_PASSWORD ((NTSTATUS) 0xC00002DFL) -#endif - -#ifndef STATUS_SAM_NEED_BOOTKEY_FLOPPY -# define STATUS_SAM_NEED_BOOTKEY_FLOPPY ((NTSTATUS) 0xC00002E0L) -#endif - -#ifndef STATUS_DS_CANT_START -# define STATUS_DS_CANT_START ((NTSTATUS) 0xC00002E1L) -#endif - -#ifndef STATUS_DS_INIT_FAILURE -# define STATUS_DS_INIT_FAILURE ((NTSTATUS) 0xC00002E2L) -#endif - -#ifndef STATUS_SAM_INIT_FAILURE -# define STATUS_SAM_INIT_FAILURE ((NTSTATUS) 0xC00002E3L) -#endif - -#ifndef STATUS_DS_GC_REQUIRED -# define STATUS_DS_GC_REQUIRED ((NTSTATUS) 0xC00002E4L) -#endif - -#ifndef STATUS_DS_LOCAL_MEMBER_OF_LOCAL_ONLY -# define STATUS_DS_LOCAL_MEMBER_OF_LOCAL_ONLY ((NTSTATUS) 0xC00002E5L) -#endif - -#ifndef STATUS_DS_NO_FPO_IN_UNIVERSAL_GROUPS -# define STATUS_DS_NO_FPO_IN_UNIVERSAL_GROUPS ((NTSTATUS) 0xC00002E6L) -#endif - -#ifndef STATUS_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED -# define STATUS_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED ((NTSTATUS) 0xC00002E7L) -#endif - -#ifndef STATUS_MULTIPLE_FAULT_VIOLATION -# define STATUS_MULTIPLE_FAULT_VIOLATION ((NTSTATUS) 0xC00002E8L) -#endif - -#ifndef STATUS_CURRENT_DOMAIN_NOT_ALLOWED -# define STATUS_CURRENT_DOMAIN_NOT_ALLOWED ((NTSTATUS) 0xC00002E9L) -#endif - -#ifndef STATUS_CANNOT_MAKE -# define STATUS_CANNOT_MAKE ((NTSTATUS) 0xC00002EAL) -#endif - -#ifndef STATUS_SYSTEM_SHUTDOWN -# define STATUS_SYSTEM_SHUTDOWN ((NTSTATUS) 0xC00002EBL) -#endif - -#ifndef STATUS_DS_INIT_FAILURE_CONSOLE -# define STATUS_DS_INIT_FAILURE_CONSOLE ((NTSTATUS) 0xC00002ECL) -#endif - -#ifndef STATUS_DS_SAM_INIT_FAILURE_CONSOLE -# define STATUS_DS_SAM_INIT_FAILURE_CONSOLE ((NTSTATUS) 0xC00002EDL) -#endif - -#ifndef STATUS_UNFINISHED_CONTEXT_DELETED -# define STATUS_UNFINISHED_CONTEXT_DELETED ((NTSTATUS) 0xC00002EEL) -#endif - -#ifndef STATUS_NO_TGT_REPLY -# define STATUS_NO_TGT_REPLY ((NTSTATUS) 0xC00002EFL) -#endif - -#ifndef STATUS_OBJECTID_NOT_FOUND -# define STATUS_OBJECTID_NOT_FOUND ((NTSTATUS) 0xC00002F0L) -#endif - -#ifndef STATUS_NO_IP_ADDRESSES -# define STATUS_NO_IP_ADDRESSES ((NTSTATUS) 0xC00002F1L) -#endif - -#ifndef STATUS_WRONG_CREDENTIAL_HANDLE -# define STATUS_WRONG_CREDENTIAL_HANDLE ((NTSTATUS) 0xC00002F2L) -#endif - -#ifndef STATUS_CRYPTO_SYSTEM_INVALID -# define STATUS_CRYPTO_SYSTEM_INVALID ((NTSTATUS) 0xC00002F3L) -#endif - -#ifndef STATUS_MAX_REFERRALS_EXCEEDED -# define STATUS_MAX_REFERRALS_EXCEEDED ((NTSTATUS) 0xC00002F4L) -#endif - -#ifndef STATUS_MUST_BE_KDC -# define STATUS_MUST_BE_KDC ((NTSTATUS) 0xC00002F5L) -#endif - -#ifndef STATUS_STRONG_CRYPTO_NOT_SUPPORTED -# define STATUS_STRONG_CRYPTO_NOT_SUPPORTED ((NTSTATUS) 0xC00002F6L) -#endif - -#ifndef STATUS_TOO_MANY_PRINCIPALS -# define STATUS_TOO_MANY_PRINCIPALS ((NTSTATUS) 0xC00002F7L) -#endif - -#ifndef STATUS_NO_PA_DATA -# define STATUS_NO_PA_DATA ((NTSTATUS) 0xC00002F8L) -#endif - -#ifndef STATUS_PKINIT_NAME_MISMATCH -# define STATUS_PKINIT_NAME_MISMATCH ((NTSTATUS) 0xC00002F9L) -#endif - -#ifndef STATUS_SMARTCARD_LOGON_REQUIRED -# define STATUS_SMARTCARD_LOGON_REQUIRED ((NTSTATUS) 0xC00002FAL) -#endif - -#ifndef STATUS_KDC_INVALID_REQUEST -# define STATUS_KDC_INVALID_REQUEST ((NTSTATUS) 0xC00002FBL) -#endif - -#ifndef STATUS_KDC_UNABLE_TO_REFER -# define STATUS_KDC_UNABLE_TO_REFER ((NTSTATUS) 0xC00002FCL) -#endif - -#ifndef STATUS_KDC_UNKNOWN_ETYPE -# define STATUS_KDC_UNKNOWN_ETYPE ((NTSTATUS) 0xC00002FDL) -#endif - -#ifndef STATUS_SHUTDOWN_IN_PROGRESS -# define STATUS_SHUTDOWN_IN_PROGRESS ((NTSTATUS) 0xC00002FEL) -#endif - -#ifndef STATUS_SERVER_SHUTDOWN_IN_PROGRESS -# define STATUS_SERVER_SHUTDOWN_IN_PROGRESS ((NTSTATUS) 0xC00002FFL) -#endif - -#ifndef STATUS_NOT_SUPPORTED_ON_SBS -# define STATUS_NOT_SUPPORTED_ON_SBS ((NTSTATUS) 0xC0000300L) -#endif - -#ifndef STATUS_WMI_GUID_DISCONNECTED -# define STATUS_WMI_GUID_DISCONNECTED ((NTSTATUS) 0xC0000301L) -#endif - -#ifndef STATUS_WMI_ALREADY_DISABLED -# define STATUS_WMI_ALREADY_DISABLED ((NTSTATUS) 0xC0000302L) -#endif - -#ifndef STATUS_WMI_ALREADY_ENABLED -# define STATUS_WMI_ALREADY_ENABLED ((NTSTATUS) 0xC0000303L) -#endif - -#ifndef STATUS_MFT_TOO_FRAGMENTED -# define STATUS_MFT_TOO_FRAGMENTED ((NTSTATUS) 0xC0000304L) -#endif - -#ifndef STATUS_COPY_PROTECTION_FAILURE -# define STATUS_COPY_PROTECTION_FAILURE ((NTSTATUS) 0xC0000305L) -#endif - -#ifndef STATUS_CSS_AUTHENTICATION_FAILURE -# define STATUS_CSS_AUTHENTICATION_FAILURE ((NTSTATUS) 0xC0000306L) -#endif - -#ifndef STATUS_CSS_KEY_NOT_PRESENT -# define STATUS_CSS_KEY_NOT_PRESENT ((NTSTATUS) 0xC0000307L) -#endif - -#ifndef STATUS_CSS_KEY_NOT_ESTABLISHED -# define STATUS_CSS_KEY_NOT_ESTABLISHED ((NTSTATUS) 0xC0000308L) -#endif - -#ifndef STATUS_CSS_SCRAMBLED_SECTOR -# define STATUS_CSS_SCRAMBLED_SECTOR ((NTSTATUS) 0xC0000309L) -#endif - -#ifndef STATUS_CSS_REGION_MISMATCH -# define STATUS_CSS_REGION_MISMATCH ((NTSTATUS) 0xC000030AL) -#endif - -#ifndef STATUS_CSS_RESETS_EXHAUSTED -# define STATUS_CSS_RESETS_EXHAUSTED ((NTSTATUS) 0xC000030BL) -#endif - -#ifndef STATUS_PKINIT_FAILURE -# define STATUS_PKINIT_FAILURE ((NTSTATUS) 0xC0000320L) -#endif - -#ifndef STATUS_SMARTCARD_SUBSYSTEM_FAILURE -# define STATUS_SMARTCARD_SUBSYSTEM_FAILURE ((NTSTATUS) 0xC0000321L) -#endif - -#ifndef STATUS_NO_KERB_KEY -# define STATUS_NO_KERB_KEY ((NTSTATUS) 0xC0000322L) -#endif - -#ifndef STATUS_HOST_DOWN -# define STATUS_HOST_DOWN ((NTSTATUS) 0xC0000350L) -#endif - -#ifndef STATUS_UNSUPPORTED_PREAUTH -# define STATUS_UNSUPPORTED_PREAUTH ((NTSTATUS) 0xC0000351L) -#endif - -#ifndef STATUS_EFS_ALG_BLOB_TOO_BIG -# define STATUS_EFS_ALG_BLOB_TOO_BIG ((NTSTATUS) 0xC0000352L) -#endif - -#ifndef STATUS_PORT_NOT_SET -# define STATUS_PORT_NOT_SET ((NTSTATUS) 0xC0000353L) -#endif - -#ifndef STATUS_DEBUGGER_INACTIVE -# define STATUS_DEBUGGER_INACTIVE ((NTSTATUS) 0xC0000354L) -#endif - -#ifndef STATUS_DS_VERSION_CHECK_FAILURE -# define STATUS_DS_VERSION_CHECK_FAILURE ((NTSTATUS) 0xC0000355L) -#endif - -#ifndef STATUS_AUDITING_DISABLED -# define STATUS_AUDITING_DISABLED ((NTSTATUS) 0xC0000356L) -#endif - -#ifndef STATUS_PRENT4_MACHINE_ACCOUNT -# define STATUS_PRENT4_MACHINE_ACCOUNT ((NTSTATUS) 0xC0000357L) -#endif - -#ifndef STATUS_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER -# define STATUS_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER ((NTSTATUS) 0xC0000358L) -#endif - -#ifndef STATUS_INVALID_IMAGE_WIN_32 -# define STATUS_INVALID_IMAGE_WIN_32 ((NTSTATUS) 0xC0000359L) -#endif - -#ifndef STATUS_INVALID_IMAGE_WIN_64 -# define STATUS_INVALID_IMAGE_WIN_64 ((NTSTATUS) 0xC000035AL) -#endif - -#ifndef STATUS_BAD_BINDINGS -# define STATUS_BAD_BINDINGS ((NTSTATUS) 0xC000035BL) -#endif - -#ifndef STATUS_NETWORK_SESSION_EXPIRED -# define STATUS_NETWORK_SESSION_EXPIRED ((NTSTATUS) 0xC000035CL) -#endif - -#ifndef STATUS_APPHELP_BLOCK -# define STATUS_APPHELP_BLOCK ((NTSTATUS) 0xC000035DL) -#endif - -#ifndef STATUS_ALL_SIDS_FILTERED -# define STATUS_ALL_SIDS_FILTERED ((NTSTATUS) 0xC000035EL) -#endif - -#ifndef STATUS_NOT_SAFE_MODE_DRIVER -# define STATUS_NOT_SAFE_MODE_DRIVER ((NTSTATUS) 0xC000035FL) -#endif - -#ifndef STATUS_ACCESS_DISABLED_BY_POLICY_DEFAULT -# define STATUS_ACCESS_DISABLED_BY_POLICY_DEFAULT ((NTSTATUS) 0xC0000361L) -#endif - -#ifndef STATUS_ACCESS_DISABLED_BY_POLICY_PATH -# define STATUS_ACCESS_DISABLED_BY_POLICY_PATH ((NTSTATUS) 0xC0000362L) -#endif - -#ifndef STATUS_ACCESS_DISABLED_BY_POLICY_PUBLISHER -# define STATUS_ACCESS_DISABLED_BY_POLICY_PUBLISHER ((NTSTATUS) 0xC0000363L) -#endif - -#ifndef STATUS_ACCESS_DISABLED_BY_POLICY_OTHER -# define STATUS_ACCESS_DISABLED_BY_POLICY_OTHER ((NTSTATUS) 0xC0000364L) -#endif - -#ifndef STATUS_FAILED_DRIVER_ENTRY -# define STATUS_FAILED_DRIVER_ENTRY ((NTSTATUS) 0xC0000365L) -#endif - -#ifndef STATUS_DEVICE_ENUMERATION_ERROR -# define STATUS_DEVICE_ENUMERATION_ERROR ((NTSTATUS) 0xC0000366L) -#endif - -#ifndef STATUS_MOUNT_POINT_NOT_RESOLVED -# define STATUS_MOUNT_POINT_NOT_RESOLVED ((NTSTATUS) 0xC0000368L) -#endif - -#ifndef STATUS_INVALID_DEVICE_OBJECT_PARAMETER -# define STATUS_INVALID_DEVICE_OBJECT_PARAMETER ((NTSTATUS) 0xC0000369L) -#endif - -#ifndef STATUS_MCA_OCCURED -# define STATUS_MCA_OCCURED ((NTSTATUS) 0xC000036AL) -#endif - -#ifndef STATUS_DRIVER_BLOCKED_CRITICAL -# define STATUS_DRIVER_BLOCKED_CRITICAL ((NTSTATUS) 0xC000036BL) -#endif - -#ifndef STATUS_DRIVER_BLOCKED -# define STATUS_DRIVER_BLOCKED ((NTSTATUS) 0xC000036CL) -#endif - -#ifndef STATUS_DRIVER_DATABASE_ERROR -# define STATUS_DRIVER_DATABASE_ERROR ((NTSTATUS) 0xC000036DL) -#endif - -#ifndef STATUS_SYSTEM_HIVE_TOO_LARGE -# define STATUS_SYSTEM_HIVE_TOO_LARGE ((NTSTATUS) 0xC000036EL) -#endif - -#ifndef STATUS_INVALID_IMPORT_OF_NON_DLL -# define STATUS_INVALID_IMPORT_OF_NON_DLL ((NTSTATUS) 0xC000036FL) -#endif - -#ifndef STATUS_DS_SHUTTING_DOWN -# define STATUS_DS_SHUTTING_DOWN ((NTSTATUS) 0x40000370L) -#endif - -#ifndef STATUS_NO_SECRETS -# define STATUS_NO_SECRETS ((NTSTATUS) 0xC0000371L) -#endif - -#ifndef STATUS_ACCESS_DISABLED_NO_SAFER_UI_BY_POLICY -# define STATUS_ACCESS_DISABLED_NO_SAFER_UI_BY_POLICY ((NTSTATUS) 0xC0000372L) -#endif - -#ifndef STATUS_FAILED_STACK_SWITCH -# define STATUS_FAILED_STACK_SWITCH ((NTSTATUS) 0xC0000373L) -#endif - -#ifndef STATUS_HEAP_CORRUPTION -# define STATUS_HEAP_CORRUPTION ((NTSTATUS) 0xC0000374L) -#endif - -#ifndef STATUS_SMARTCARD_WRONG_PIN -# define STATUS_SMARTCARD_WRONG_PIN ((NTSTATUS) 0xC0000380L) -#endif - -#ifndef STATUS_SMARTCARD_CARD_BLOCKED -# define STATUS_SMARTCARD_CARD_BLOCKED ((NTSTATUS) 0xC0000381L) -#endif - -#ifndef STATUS_SMARTCARD_CARD_NOT_AUTHENTICATED -# define STATUS_SMARTCARD_CARD_NOT_AUTHENTICATED ((NTSTATUS) 0xC0000382L) -#endif - -#ifndef STATUS_SMARTCARD_NO_CARD -# define STATUS_SMARTCARD_NO_CARD ((NTSTATUS) 0xC0000383L) -#endif - -#ifndef STATUS_SMARTCARD_NO_KEY_CONTAINER -# define STATUS_SMARTCARD_NO_KEY_CONTAINER ((NTSTATUS) 0xC0000384L) -#endif - -#ifndef STATUS_SMARTCARD_NO_CERTIFICATE -# define STATUS_SMARTCARD_NO_CERTIFICATE ((NTSTATUS) 0xC0000385L) -#endif - -#ifndef STATUS_SMARTCARD_NO_KEYSET -# define STATUS_SMARTCARD_NO_KEYSET ((NTSTATUS) 0xC0000386L) -#endif - -#ifndef STATUS_SMARTCARD_IO_ERROR -# define STATUS_SMARTCARD_IO_ERROR ((NTSTATUS) 0xC0000387L) -#endif - -#ifndef STATUS_DOWNGRADE_DETECTED -# define STATUS_DOWNGRADE_DETECTED ((NTSTATUS) 0xC0000388L) -#endif - -#ifndef STATUS_SMARTCARD_CERT_REVOKED -# define STATUS_SMARTCARD_CERT_REVOKED ((NTSTATUS) 0xC0000389L) -#endif - -#ifndef STATUS_ISSUING_CA_UNTRUSTED -# define STATUS_ISSUING_CA_UNTRUSTED ((NTSTATUS) 0xC000038AL) -#endif - -#ifndef STATUS_REVOCATION_OFFLINE_C -# define STATUS_REVOCATION_OFFLINE_C ((NTSTATUS) 0xC000038BL) -#endif - -#ifndef STATUS_PKINIT_CLIENT_FAILURE -# define STATUS_PKINIT_CLIENT_FAILURE ((NTSTATUS) 0xC000038CL) -#endif - -#ifndef STATUS_SMARTCARD_CERT_EXPIRED -# define STATUS_SMARTCARD_CERT_EXPIRED ((NTSTATUS) 0xC000038DL) -#endif - -#ifndef STATUS_DRIVER_FAILED_PRIOR_UNLOAD -# define STATUS_DRIVER_FAILED_PRIOR_UNLOAD ((NTSTATUS) 0xC000038EL) -#endif - -#ifndef STATUS_SMARTCARD_SILENT_CONTEXT -# define STATUS_SMARTCARD_SILENT_CONTEXT ((NTSTATUS) 0xC000038FL) -#endif - -#ifndef STATUS_PER_USER_TRUST_QUOTA_EXCEEDED -# define STATUS_PER_USER_TRUST_QUOTA_EXCEEDED ((NTSTATUS) 0xC0000401L) -#endif - -#ifndef STATUS_ALL_USER_TRUST_QUOTA_EXCEEDED -# define STATUS_ALL_USER_TRUST_QUOTA_EXCEEDED ((NTSTATUS) 0xC0000402L) -#endif - -#ifndef STATUS_USER_DELETE_TRUST_QUOTA_EXCEEDED -# define STATUS_USER_DELETE_TRUST_QUOTA_EXCEEDED ((NTSTATUS) 0xC0000403L) -#endif - -#ifndef STATUS_DS_NAME_NOT_UNIQUE -# define STATUS_DS_NAME_NOT_UNIQUE ((NTSTATUS) 0xC0000404L) -#endif - -#ifndef STATUS_DS_DUPLICATE_ID_FOUND -# define STATUS_DS_DUPLICATE_ID_FOUND ((NTSTATUS) 0xC0000405L) -#endif - -#ifndef STATUS_DS_GROUP_CONVERSION_ERROR -# define STATUS_DS_GROUP_CONVERSION_ERROR ((NTSTATUS) 0xC0000406L) -#endif - -#ifndef STATUS_VOLSNAP_PREPARE_HIBERNATE -# define STATUS_VOLSNAP_PREPARE_HIBERNATE ((NTSTATUS) 0xC0000407L) -#endif - -#ifndef STATUS_USER2USER_REQUIRED -# define STATUS_USER2USER_REQUIRED ((NTSTATUS) 0xC0000408L) -#endif - -#ifndef STATUS_STACK_BUFFER_OVERRUN -# define STATUS_STACK_BUFFER_OVERRUN ((NTSTATUS) 0xC0000409L) -#endif - -#ifndef STATUS_NO_S4U_PROT_SUPPORT -# define STATUS_NO_S4U_PROT_SUPPORT ((NTSTATUS) 0xC000040AL) -#endif - -#ifndef STATUS_CROSSREALM_DELEGATION_FAILURE -# define STATUS_CROSSREALM_DELEGATION_FAILURE ((NTSTATUS) 0xC000040BL) -#endif - -#ifndef STATUS_REVOCATION_OFFLINE_KDC -# define STATUS_REVOCATION_OFFLINE_KDC ((NTSTATUS) 0xC000040CL) -#endif - -#ifndef STATUS_ISSUING_CA_UNTRUSTED_KDC -# define STATUS_ISSUING_CA_UNTRUSTED_KDC ((NTSTATUS) 0xC000040DL) -#endif - -#ifndef STATUS_KDC_CERT_EXPIRED -# define STATUS_KDC_CERT_EXPIRED ((NTSTATUS) 0xC000040EL) -#endif - -#ifndef STATUS_KDC_CERT_REVOKED -# define STATUS_KDC_CERT_REVOKED ((NTSTATUS) 0xC000040FL) -#endif - -#ifndef STATUS_PARAMETER_QUOTA_EXCEEDED -# define STATUS_PARAMETER_QUOTA_EXCEEDED ((NTSTATUS) 0xC0000410L) -#endif - -#ifndef STATUS_HIBERNATION_FAILURE -# define STATUS_HIBERNATION_FAILURE ((NTSTATUS) 0xC0000411L) -#endif - -#ifndef STATUS_DELAY_LOAD_FAILED -# define STATUS_DELAY_LOAD_FAILED ((NTSTATUS) 0xC0000412L) -#endif - -#ifndef STATUS_AUTHENTICATION_FIREWALL_FAILED -# define STATUS_AUTHENTICATION_FIREWALL_FAILED ((NTSTATUS) 0xC0000413L) -#endif - -#ifndef STATUS_VDM_DISALLOWED -# define STATUS_VDM_DISALLOWED ((NTSTATUS) 0xC0000414L) -#endif - -#ifndef STATUS_HUNG_DISPLAY_DRIVER_THREAD -# define STATUS_HUNG_DISPLAY_DRIVER_THREAD ((NTSTATUS) 0xC0000415L) -#endif - -#ifndef STATUS_INSUFFICIENT_RESOURCE_FOR_SPECIFIED_SHARED_SECTION_SIZE -# define STATUS_INSUFFICIENT_RESOURCE_FOR_SPECIFIED_SHARED_SECTION_SIZE ((NTSTATUS) 0xC0000416L) -#endif - -#ifndef STATUS_INVALID_CRUNTIME_PARAMETER -# define STATUS_INVALID_CRUNTIME_PARAMETER ((NTSTATUS) 0xC0000417L) -#endif - -#ifndef STATUS_NTLM_BLOCKED -# define STATUS_NTLM_BLOCKED ((NTSTATUS) 0xC0000418L) -#endif - -#ifndef STATUS_DS_SRC_SID_EXISTS_IN_FOREST -# define STATUS_DS_SRC_SID_EXISTS_IN_FOREST ((NTSTATUS) 0xC0000419L) -#endif - -#ifndef STATUS_DS_DOMAIN_NAME_EXISTS_IN_FOREST -# define STATUS_DS_DOMAIN_NAME_EXISTS_IN_FOREST ((NTSTATUS) 0xC000041AL) -#endif - -#ifndef STATUS_DS_FLAT_NAME_EXISTS_IN_FOREST -# define STATUS_DS_FLAT_NAME_EXISTS_IN_FOREST ((NTSTATUS) 0xC000041BL) -#endif - -#ifndef STATUS_INVALID_USER_PRINCIPAL_NAME -# define STATUS_INVALID_USER_PRINCIPAL_NAME ((NTSTATUS) 0xC000041CL) -#endif - -#ifndef STATUS_FATAL_USER_CALLBACK_EXCEPTION -# define STATUS_FATAL_USER_CALLBACK_EXCEPTION ((NTSTATUS) 0xC000041DL) -#endif - -#ifndef STATUS_ASSERTION_FAILURE -# define STATUS_ASSERTION_FAILURE ((NTSTATUS) 0xC0000420L) -#endif - -#ifndef STATUS_VERIFIER_STOP -# define STATUS_VERIFIER_STOP ((NTSTATUS) 0xC0000421L) -#endif - -#ifndef STATUS_CALLBACK_POP_STACK -# define STATUS_CALLBACK_POP_STACK ((NTSTATUS) 0xC0000423L) -#endif - -#ifndef STATUS_INCOMPATIBLE_DRIVER_BLOCKED -# define STATUS_INCOMPATIBLE_DRIVER_BLOCKED ((NTSTATUS) 0xC0000424L) -#endif - -#ifndef STATUS_HIVE_UNLOADED -# define STATUS_HIVE_UNLOADED ((NTSTATUS) 0xC0000425L) -#endif - -#ifndef STATUS_COMPRESSION_DISABLED -# define STATUS_COMPRESSION_DISABLED ((NTSTATUS) 0xC0000426L) -#endif - -#ifndef STATUS_FILE_SYSTEM_LIMITATION -# define STATUS_FILE_SYSTEM_LIMITATION ((NTSTATUS) 0xC0000427L) -#endif - -#ifndef STATUS_INVALID_IMAGE_HASH -# define STATUS_INVALID_IMAGE_HASH ((NTSTATUS) 0xC0000428L) -#endif - -#ifndef STATUS_NOT_CAPABLE -# define STATUS_NOT_CAPABLE ((NTSTATUS) 0xC0000429L) -#endif - -#ifndef STATUS_REQUEST_OUT_OF_SEQUENCE -# define STATUS_REQUEST_OUT_OF_SEQUENCE ((NTSTATUS) 0xC000042AL) -#endif - -#ifndef STATUS_IMPLEMENTATION_LIMIT -# define STATUS_IMPLEMENTATION_LIMIT ((NTSTATUS) 0xC000042BL) -#endif - -#ifndef STATUS_ELEVATION_REQUIRED -# define STATUS_ELEVATION_REQUIRED ((NTSTATUS) 0xC000042CL) -#endif - -#ifndef STATUS_NO_SECURITY_CONTEXT -# define STATUS_NO_SECURITY_CONTEXT ((NTSTATUS) 0xC000042DL) -#endif - -#ifndef STATUS_PKU2U_CERT_FAILURE -# define STATUS_PKU2U_CERT_FAILURE ((NTSTATUS) 0xC000042FL) -#endif - -#ifndef STATUS_BEYOND_VDL -# define STATUS_BEYOND_VDL ((NTSTATUS) 0xC0000432L) -#endif - -#ifndef STATUS_ENCOUNTERED_WRITE_IN_PROGRESS -# define STATUS_ENCOUNTERED_WRITE_IN_PROGRESS ((NTSTATUS) 0xC0000433L) -#endif - -#ifndef STATUS_PTE_CHANGED -# define STATUS_PTE_CHANGED ((NTSTATUS) 0xC0000434L) -#endif - -#ifndef STATUS_PURGE_FAILED -# define STATUS_PURGE_FAILED ((NTSTATUS) 0xC0000435L) -#endif - -#ifndef STATUS_CRED_REQUIRES_CONFIRMATION -# define STATUS_CRED_REQUIRES_CONFIRMATION ((NTSTATUS) 0xC0000440L) -#endif - -#ifndef STATUS_CS_ENCRYPTION_INVALID_SERVER_RESPONSE -# define STATUS_CS_ENCRYPTION_INVALID_SERVER_RESPONSE ((NTSTATUS) 0xC0000441L) -#endif - -#ifndef STATUS_CS_ENCRYPTION_UNSUPPORTED_SERVER -# define STATUS_CS_ENCRYPTION_UNSUPPORTED_SERVER ((NTSTATUS) 0xC0000442L) -#endif - -#ifndef STATUS_CS_ENCRYPTION_EXISTING_ENCRYPTED_FILE -# define STATUS_CS_ENCRYPTION_EXISTING_ENCRYPTED_FILE ((NTSTATUS) 0xC0000443L) -#endif - -#ifndef STATUS_CS_ENCRYPTION_NEW_ENCRYPTED_FILE -# define STATUS_CS_ENCRYPTION_NEW_ENCRYPTED_FILE ((NTSTATUS) 0xC0000444L) -#endif - -#ifndef STATUS_CS_ENCRYPTION_FILE_NOT_CSE -# define STATUS_CS_ENCRYPTION_FILE_NOT_CSE ((NTSTATUS) 0xC0000445L) -#endif - -#ifndef STATUS_INVALID_LABEL -# define STATUS_INVALID_LABEL ((NTSTATUS) 0xC0000446L) -#endif - -#ifndef STATUS_DRIVER_PROCESS_TERMINATED -# define STATUS_DRIVER_PROCESS_TERMINATED ((NTSTATUS) 0xC0000450L) -#endif - -#ifndef STATUS_AMBIGUOUS_SYSTEM_DEVICE -# define STATUS_AMBIGUOUS_SYSTEM_DEVICE ((NTSTATUS) 0xC0000451L) -#endif - -#ifndef STATUS_SYSTEM_DEVICE_NOT_FOUND -# define STATUS_SYSTEM_DEVICE_NOT_FOUND ((NTSTATUS) 0xC0000452L) -#endif - -#ifndef STATUS_RESTART_BOOT_APPLICATION -# define STATUS_RESTART_BOOT_APPLICATION ((NTSTATUS) 0xC0000453L) -#endif - -#ifndef STATUS_INSUFFICIENT_NVRAM_RESOURCES -# define STATUS_INSUFFICIENT_NVRAM_RESOURCES ((NTSTATUS) 0xC0000454L) -#endif - -#ifndef STATUS_INVALID_TASK_NAME -# define STATUS_INVALID_TASK_NAME ((NTSTATUS) 0xC0000500L) -#endif - -#ifndef STATUS_INVALID_TASK_INDEX -# define STATUS_INVALID_TASK_INDEX ((NTSTATUS) 0xC0000501L) -#endif - -#ifndef STATUS_THREAD_ALREADY_IN_TASK -# define STATUS_THREAD_ALREADY_IN_TASK ((NTSTATUS) 0xC0000502L) -#endif - -#ifndef STATUS_CALLBACK_BYPASS -# define STATUS_CALLBACK_BYPASS ((NTSTATUS) 0xC0000503L) -#endif - -#ifndef STATUS_FAIL_FAST_EXCEPTION -# define STATUS_FAIL_FAST_EXCEPTION ((NTSTATUS) 0xC0000602L) -#endif - -#ifndef STATUS_IMAGE_CERT_REVOKED -# define STATUS_IMAGE_CERT_REVOKED ((NTSTATUS) 0xC0000603L) -#endif - -#ifndef STATUS_PORT_CLOSED -# define STATUS_PORT_CLOSED ((NTSTATUS) 0xC0000700L) -#endif - -#ifndef STATUS_MESSAGE_LOST -# define STATUS_MESSAGE_LOST ((NTSTATUS) 0xC0000701L) -#endif - -#ifndef STATUS_INVALID_MESSAGE -# define STATUS_INVALID_MESSAGE ((NTSTATUS) 0xC0000702L) -#endif - -#ifndef STATUS_REQUEST_CANCELED -# define STATUS_REQUEST_CANCELED ((NTSTATUS) 0xC0000703L) -#endif - -#ifndef STATUS_RECURSIVE_DISPATCH -# define STATUS_RECURSIVE_DISPATCH ((NTSTATUS) 0xC0000704L) -#endif - -#ifndef STATUS_LPC_RECEIVE_BUFFER_EXPECTED -# define STATUS_LPC_RECEIVE_BUFFER_EXPECTED ((NTSTATUS) 0xC0000705L) -#endif - -#ifndef STATUS_LPC_INVALID_CONNECTION_USAGE -# define STATUS_LPC_INVALID_CONNECTION_USAGE ((NTSTATUS) 0xC0000706L) -#endif - -#ifndef STATUS_LPC_REQUESTS_NOT_ALLOWED -# define STATUS_LPC_REQUESTS_NOT_ALLOWED ((NTSTATUS) 0xC0000707L) -#endif - -#ifndef STATUS_RESOURCE_IN_USE -# define STATUS_RESOURCE_IN_USE ((NTSTATUS) 0xC0000708L) -#endif - -#ifndef STATUS_HARDWARE_MEMORY_ERROR -# define STATUS_HARDWARE_MEMORY_ERROR ((NTSTATUS) 0xC0000709L) -#endif - -#ifndef STATUS_THREADPOOL_HANDLE_EXCEPTION -# define STATUS_THREADPOOL_HANDLE_EXCEPTION ((NTSTATUS) 0xC000070AL) -#endif - -#ifndef STATUS_THREADPOOL_SET_EVENT_ON_COMPLETION_FAILED -# define STATUS_THREADPOOL_SET_EVENT_ON_COMPLETION_FAILED ((NTSTATUS) 0xC000070BL) -#endif - -#ifndef STATUS_THREADPOOL_RELEASE_SEMAPHORE_ON_COMPLETION_FAILED -# define STATUS_THREADPOOL_RELEASE_SEMAPHORE_ON_COMPLETION_FAILED ((NTSTATUS) 0xC000070CL) -#endif - -#ifndef STATUS_THREADPOOL_RELEASE_MUTEX_ON_COMPLETION_FAILED -# define STATUS_THREADPOOL_RELEASE_MUTEX_ON_COMPLETION_FAILED ((NTSTATUS) 0xC000070DL) -#endif - -#ifndef STATUS_THREADPOOL_FREE_LIBRARY_ON_COMPLETION_FAILED -# define STATUS_THREADPOOL_FREE_LIBRARY_ON_COMPLETION_FAILED ((NTSTATUS) 0xC000070EL) -#endif - -#ifndef STATUS_THREADPOOL_RELEASED_DURING_OPERATION -# define STATUS_THREADPOOL_RELEASED_DURING_OPERATION ((NTSTATUS) 0xC000070FL) -#endif - -#ifndef STATUS_CALLBACK_RETURNED_WHILE_IMPERSONATING -# define STATUS_CALLBACK_RETURNED_WHILE_IMPERSONATING ((NTSTATUS) 0xC0000710L) -#endif - -#ifndef STATUS_APC_RETURNED_WHILE_IMPERSONATING -# define STATUS_APC_RETURNED_WHILE_IMPERSONATING ((NTSTATUS) 0xC0000711L) -#endif - -#ifndef STATUS_PROCESS_IS_PROTECTED -# define STATUS_PROCESS_IS_PROTECTED ((NTSTATUS) 0xC0000712L) -#endif - -#ifndef STATUS_MCA_EXCEPTION -# define STATUS_MCA_EXCEPTION ((NTSTATUS) 0xC0000713L) -#endif - -#ifndef STATUS_CERTIFICATE_MAPPING_NOT_UNIQUE -# define STATUS_CERTIFICATE_MAPPING_NOT_UNIQUE ((NTSTATUS) 0xC0000714L) -#endif - -#ifndef STATUS_SYMLINK_CLASS_DISABLED -# define STATUS_SYMLINK_CLASS_DISABLED ((NTSTATUS) 0xC0000715L) -#endif - -#ifndef STATUS_INVALID_IDN_NORMALIZATION -# define STATUS_INVALID_IDN_NORMALIZATION ((NTSTATUS) 0xC0000716L) -#endif - -#ifndef STATUS_NO_UNICODE_TRANSLATION -# define STATUS_NO_UNICODE_TRANSLATION ((NTSTATUS) 0xC0000717L) -#endif - -#ifndef STATUS_ALREADY_REGISTERED -# define STATUS_ALREADY_REGISTERED ((NTSTATUS) 0xC0000718L) -#endif - -#ifndef STATUS_CONTEXT_MISMATCH -# define STATUS_CONTEXT_MISMATCH ((NTSTATUS) 0xC0000719L) -#endif - -#ifndef STATUS_PORT_ALREADY_HAS_COMPLETION_LIST -# define STATUS_PORT_ALREADY_HAS_COMPLETION_LIST ((NTSTATUS) 0xC000071AL) -#endif - -#ifndef STATUS_CALLBACK_RETURNED_THREAD_PRIORITY -# define STATUS_CALLBACK_RETURNED_THREAD_PRIORITY ((NTSTATUS) 0xC000071BL) -#endif - -#ifndef STATUS_INVALID_THREAD -# define STATUS_INVALID_THREAD ((NTSTATUS) 0xC000071CL) -#endif - -#ifndef STATUS_CALLBACK_RETURNED_TRANSACTION -# define STATUS_CALLBACK_RETURNED_TRANSACTION ((NTSTATUS) 0xC000071DL) -#endif - -#ifndef STATUS_CALLBACK_RETURNED_LDR_LOCK -# define STATUS_CALLBACK_RETURNED_LDR_LOCK ((NTSTATUS) 0xC000071EL) -#endif - -#ifndef STATUS_CALLBACK_RETURNED_LANG -# define STATUS_CALLBACK_RETURNED_LANG ((NTSTATUS) 0xC000071FL) -#endif - -#ifndef STATUS_CALLBACK_RETURNED_PRI_BACK -# define STATUS_CALLBACK_RETURNED_PRI_BACK ((NTSTATUS) 0xC0000720L) -#endif - -#ifndef STATUS_CALLBACK_RETURNED_THREAD_AFFINITY -# define STATUS_CALLBACK_RETURNED_THREAD_AFFINITY ((NTSTATUS) 0xC0000721L) -#endif - -#ifndef STATUS_DISK_REPAIR_DISABLED -# define STATUS_DISK_REPAIR_DISABLED ((NTSTATUS) 0xC0000800L) -#endif - -#ifndef STATUS_DS_DOMAIN_RENAME_IN_PROGRESS -# define STATUS_DS_DOMAIN_RENAME_IN_PROGRESS ((NTSTATUS) 0xC0000801L) -#endif - -#ifndef STATUS_DISK_QUOTA_EXCEEDED -# define STATUS_DISK_QUOTA_EXCEEDED ((NTSTATUS) 0xC0000802L) -#endif - -#ifndef STATUS_DATA_LOST_REPAIR -# define STATUS_DATA_LOST_REPAIR ((NTSTATUS) 0x80000803L) -#endif - -#ifndef STATUS_CONTENT_BLOCKED -# define STATUS_CONTENT_BLOCKED ((NTSTATUS) 0xC0000804L) -#endif - -#ifndef STATUS_BAD_CLUSTERS -# define STATUS_BAD_CLUSTERS ((NTSTATUS) 0xC0000805L) -#endif - -#ifndef STATUS_VOLUME_DIRTY -# define STATUS_VOLUME_DIRTY ((NTSTATUS) 0xC0000806L) -#endif - -#ifndef STATUS_FILE_CHECKED_OUT -# define STATUS_FILE_CHECKED_OUT ((NTSTATUS) 0xC0000901L) -#endif - -#ifndef STATUS_CHECKOUT_REQUIRED -# define STATUS_CHECKOUT_REQUIRED ((NTSTATUS) 0xC0000902L) -#endif - -#ifndef STATUS_BAD_FILE_TYPE -# define STATUS_BAD_FILE_TYPE ((NTSTATUS) 0xC0000903L) -#endif - -#ifndef STATUS_FILE_TOO_LARGE -# define STATUS_FILE_TOO_LARGE ((NTSTATUS) 0xC0000904L) -#endif - -#ifndef STATUS_FORMS_AUTH_REQUIRED -# define STATUS_FORMS_AUTH_REQUIRED ((NTSTATUS) 0xC0000905L) -#endif - -#ifndef STATUS_VIRUS_INFECTED -# define STATUS_VIRUS_INFECTED ((NTSTATUS) 0xC0000906L) -#endif - -#ifndef STATUS_VIRUS_DELETED -# define STATUS_VIRUS_DELETED ((NTSTATUS) 0xC0000907L) -#endif - -#ifndef STATUS_BAD_MCFG_TABLE -# define STATUS_BAD_MCFG_TABLE ((NTSTATUS) 0xC0000908L) -#endif - -#ifndef STATUS_CANNOT_BREAK_OPLOCK -# define STATUS_CANNOT_BREAK_OPLOCK ((NTSTATUS) 0xC0000909L) -#endif - -#ifndef STATUS_WOW_ASSERTION -# define STATUS_WOW_ASSERTION ((NTSTATUS) 0xC0009898L) -#endif - -#ifndef STATUS_INVALID_SIGNATURE -# define STATUS_INVALID_SIGNATURE ((NTSTATUS) 0xC000A000L) -#endif - -#ifndef STATUS_HMAC_NOT_SUPPORTED -# define STATUS_HMAC_NOT_SUPPORTED ((NTSTATUS) 0xC000A001L) -#endif - -#ifndef STATUS_AUTH_TAG_MISMATCH -# define STATUS_AUTH_TAG_MISMATCH ((NTSTATUS) 0xC000A002L) -#endif - -#ifndef STATUS_IPSEC_QUEUE_OVERFLOW -# define STATUS_IPSEC_QUEUE_OVERFLOW ((NTSTATUS) 0xC000A010L) -#endif - -#ifndef STATUS_ND_QUEUE_OVERFLOW -# define STATUS_ND_QUEUE_OVERFLOW ((NTSTATUS) 0xC000A011L) -#endif - -#ifndef STATUS_HOPLIMIT_EXCEEDED -# define STATUS_HOPLIMIT_EXCEEDED ((NTSTATUS) 0xC000A012L) -#endif - -#ifndef STATUS_PROTOCOL_NOT_SUPPORTED -# define STATUS_PROTOCOL_NOT_SUPPORTED ((NTSTATUS) 0xC000A013L) -#endif - -#ifndef STATUS_FASTPATH_REJECTED -# define STATUS_FASTPATH_REJECTED ((NTSTATUS) 0xC000A014L) -#endif - -#ifndef STATUS_LOST_WRITEBEHIND_DATA_NETWORK_DISCONNECTED -# define STATUS_LOST_WRITEBEHIND_DATA_NETWORK_DISCONNECTED ((NTSTATUS) 0xC000A080L) -#endif - -#ifndef STATUS_LOST_WRITEBEHIND_DATA_NETWORK_SERVER_ERROR -# define STATUS_LOST_WRITEBEHIND_DATA_NETWORK_SERVER_ERROR ((NTSTATUS) 0xC000A081L) -#endif - -#ifndef STATUS_LOST_WRITEBEHIND_DATA_LOCAL_DISK_ERROR -# define STATUS_LOST_WRITEBEHIND_DATA_LOCAL_DISK_ERROR ((NTSTATUS) 0xC000A082L) -#endif - -#ifndef STATUS_XML_PARSE_ERROR -# define STATUS_XML_PARSE_ERROR ((NTSTATUS) 0xC000A083L) -#endif - -#ifndef STATUS_XMLDSIG_ERROR -# define STATUS_XMLDSIG_ERROR ((NTSTATUS) 0xC000A084L) -#endif - -#ifndef STATUS_WRONG_COMPARTMENT -# define STATUS_WRONG_COMPARTMENT ((NTSTATUS) 0xC000A085L) -#endif - -#ifndef STATUS_AUTHIP_FAILURE -# define STATUS_AUTHIP_FAILURE ((NTSTATUS) 0xC000A086L) -#endif - -#ifndef STATUS_DS_OID_MAPPED_GROUP_CANT_HAVE_MEMBERS -# define STATUS_DS_OID_MAPPED_GROUP_CANT_HAVE_MEMBERS ((NTSTATUS) 0xC000A087L) -#endif - -#ifndef STATUS_DS_OID_NOT_FOUND -# define STATUS_DS_OID_NOT_FOUND ((NTSTATUS) 0xC000A088L) -#endif - -#ifndef STATUS_HASH_NOT_SUPPORTED -# define STATUS_HASH_NOT_SUPPORTED ((NTSTATUS) 0xC000A100L) -#endif - -#ifndef STATUS_HASH_NOT_PRESENT -# define STATUS_HASH_NOT_PRESENT ((NTSTATUS) 0xC000A101L) -#endif - -/* This is not the NTSTATUS_FROM_WIN32 that the DDK provides, because the */ -/* DDK got it wrong! */ -#ifdef NTSTATUS_FROM_WIN32 -# undef NTSTATUS_FROM_WIN32 -#endif -#define NTSTATUS_FROM_WIN32(error) ((NTSTATUS) (error) <= 0 ? \ - ((NTSTATUS) (error)) : ((NTSTATUS) (((error) & 0x0000FFFF) | \ - (FACILITY_NTWIN32 << 16) | ERROR_SEVERITY_WARNING))) - -#ifndef JOB_OBJECT_LIMIT_PROCESS_MEMORY -# define JOB_OBJECT_LIMIT_PROCESS_MEMORY 0x00000100 -#endif -#ifndef JOB_OBJECT_LIMIT_JOB_MEMORY -# define JOB_OBJECT_LIMIT_JOB_MEMORY 0x00000200 -#endif -#ifndef JOB_OBJECT_LIMIT_DIE_ON_UNHANDLED_EXCEPTION -# define JOB_OBJECT_LIMIT_DIE_ON_UNHANDLED_EXCEPTION 0x00000400 -#endif -#ifndef JOB_OBJECT_LIMIT_BREAKAWAY_OK -# define JOB_OBJECT_LIMIT_BREAKAWAY_OK 0x00000800 -#endif -#ifndef JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK -# define JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK 0x00001000 -#endif -#ifndef JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE -# define JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE 0x00002000 -#endif - -/* from winternl.h */ -typedef struct _UNICODE_STRING { - USHORT Length; - USHORT MaximumLength; - PWSTR Buffer; -} UNICODE_STRING, *PUNICODE_STRING; - -typedef const UNICODE_STRING *PCUNICODE_STRING; - -/* from ntifs.h */ -#ifndef DEVICE_TYPE -# define DEVICE_TYPE DWORD -#endif - -/* MinGW already has a definition for REPARSE_DATA_BUFFER, but mingw-w64 does - * not. - */ -#if defined(_MSC_VER) || defined(__MINGW64_VERSION_MAJOR) - typedef struct _REPARSE_DATA_BUFFER { - ULONG ReparseTag; - USHORT ReparseDataLength; - USHORT Reserved; - union { - struct { - USHORT SubstituteNameOffset; - USHORT SubstituteNameLength; - USHORT PrintNameOffset; - USHORT PrintNameLength; - ULONG Flags; - WCHAR PathBuffer[1]; - } SymbolicLinkReparseBuffer; - struct { - USHORT SubstituteNameOffset; - USHORT SubstituteNameLength; - USHORT PrintNameOffset; - USHORT PrintNameLength; - WCHAR PathBuffer[1]; - } MountPointReparseBuffer; - struct { - UCHAR DataBuffer[1]; - } GenericReparseBuffer; - } DUMMYUNIONNAME; - } REPARSE_DATA_BUFFER, *PREPARSE_DATA_BUFFER; -#endif - -typedef struct _IO_STATUS_BLOCK { - union { - NTSTATUS Status; - PVOID Pointer; - } DUMMYUNIONNAME; - ULONG_PTR Information; -} IO_STATUS_BLOCK, *PIO_STATUS_BLOCK; - -typedef enum _FILE_INFORMATION_CLASS { - FileDirectoryInformation = 1, - FileFullDirectoryInformation, - FileBothDirectoryInformation, - FileBasicInformation, - FileStandardInformation, - FileInternalInformation, - FileEaInformation, - FileAccessInformation, - FileNameInformation, - FileRenameInformation, - FileLinkInformation, - FileNamesInformation, - FileDispositionInformation, - FilePositionInformation, - FileFullEaInformation, - FileModeInformation, - FileAlignmentInformation, - FileAllInformation, - FileAllocationInformation, - FileEndOfFileInformation, - FileAlternateNameInformation, - FileStreamInformation, - FilePipeInformation, - FilePipeLocalInformation, - FilePipeRemoteInformation, - FileMailslotQueryInformation, - FileMailslotSetInformation, - FileCompressionInformation, - FileObjectIdInformation, - FileCompletionInformation, - FileMoveClusterInformation, - FileQuotaInformation, - FileReparsePointInformation, - FileNetworkOpenInformation, - FileAttributeTagInformation, - FileTrackingInformation, - FileIdBothDirectoryInformation, - FileIdFullDirectoryInformation, - FileValidDataLengthInformation, - FileShortNameInformation, - FileIoCompletionNotificationInformation, - FileIoStatusBlockRangeInformation, - FileIoPriorityHintInformation, - FileSfioReserveInformation, - FileSfioVolumeInformation, - FileHardLinkInformation, - FileProcessIdsUsingFileInformation, - FileNormalizedNameInformation, - FileNetworkPhysicalNameInformation, - FileIdGlobalTxDirectoryInformation, - FileIsRemoteDeviceInformation, - FileAttributeCacheInformation, - FileNumaNodeInformation, - FileStandardLinkInformation, - FileRemoteProtocolInformation, - FileMaximumInformation -} FILE_INFORMATION_CLASS, *PFILE_INFORMATION_CLASS; - -typedef struct _FILE_DIRECTORY_INFORMATION { - ULONG NextEntryOffset; - ULONG FileIndex; - LARGE_INTEGER CreationTime; - LARGE_INTEGER LastAccessTime; - LARGE_INTEGER LastWriteTime; - LARGE_INTEGER ChangeTime; - LARGE_INTEGER EndOfFile; - LARGE_INTEGER AllocationSize; - ULONG FileAttributes; - ULONG FileNameLength; - WCHAR FileName[1]; -} FILE_DIRECTORY_INFORMATION, *PFILE_DIRECTORY_INFORMATION; - -typedef struct _FILE_BOTH_DIR_INFORMATION { - ULONG NextEntryOffset; - ULONG FileIndex; - LARGE_INTEGER CreationTime; - LARGE_INTEGER LastAccessTime; - LARGE_INTEGER LastWriteTime; - LARGE_INTEGER ChangeTime; - LARGE_INTEGER EndOfFile; - LARGE_INTEGER AllocationSize; - ULONG FileAttributes; - ULONG FileNameLength; - ULONG EaSize; - CCHAR ShortNameLength; - WCHAR ShortName[12]; - WCHAR FileName[1]; -} FILE_BOTH_DIR_INFORMATION, *PFILE_BOTH_DIR_INFORMATION; - -typedef struct _FILE_BASIC_INFORMATION { - LARGE_INTEGER CreationTime; - LARGE_INTEGER LastAccessTime; - LARGE_INTEGER LastWriteTime; - LARGE_INTEGER ChangeTime; - DWORD FileAttributes; -} FILE_BASIC_INFORMATION, *PFILE_BASIC_INFORMATION; - -typedef struct _FILE_STANDARD_INFORMATION { - LARGE_INTEGER AllocationSize; - LARGE_INTEGER EndOfFile; - ULONG NumberOfLinks; - BOOLEAN DeletePending; - BOOLEAN Directory; -} FILE_STANDARD_INFORMATION, *PFILE_STANDARD_INFORMATION; - -typedef struct _FILE_INTERNAL_INFORMATION { - LARGE_INTEGER IndexNumber; -} FILE_INTERNAL_INFORMATION, *PFILE_INTERNAL_INFORMATION; - -typedef struct _FILE_EA_INFORMATION { - ULONG EaSize; -} FILE_EA_INFORMATION, *PFILE_EA_INFORMATION; - -typedef struct _FILE_ACCESS_INFORMATION { - ACCESS_MASK AccessFlags; -} FILE_ACCESS_INFORMATION, *PFILE_ACCESS_INFORMATION; - -typedef struct _FILE_POSITION_INFORMATION { - LARGE_INTEGER CurrentByteOffset; -} FILE_POSITION_INFORMATION, *PFILE_POSITION_INFORMATION; - -typedef struct _FILE_MODE_INFORMATION { - ULONG Mode; -} FILE_MODE_INFORMATION, *PFILE_MODE_INFORMATION; - -typedef struct _FILE_ALIGNMENT_INFORMATION { - ULONG AlignmentRequirement; -} FILE_ALIGNMENT_INFORMATION, *PFILE_ALIGNMENT_INFORMATION; - -typedef struct _FILE_NAME_INFORMATION { - ULONG FileNameLength; - WCHAR FileName[1]; -} FILE_NAME_INFORMATION, *PFILE_NAME_INFORMATION; - -typedef struct _FILE_END_OF_FILE_INFORMATION { - LARGE_INTEGER EndOfFile; -} FILE_END_OF_FILE_INFORMATION, *PFILE_END_OF_FILE_INFORMATION; - -typedef struct _FILE_ALL_INFORMATION { - FILE_BASIC_INFORMATION BasicInformation; - FILE_STANDARD_INFORMATION StandardInformation; - FILE_INTERNAL_INFORMATION InternalInformation; - FILE_EA_INFORMATION EaInformation; - FILE_ACCESS_INFORMATION AccessInformation; - FILE_POSITION_INFORMATION PositionInformation; - FILE_MODE_INFORMATION ModeInformation; - FILE_ALIGNMENT_INFORMATION AlignmentInformation; - FILE_NAME_INFORMATION NameInformation; -} FILE_ALL_INFORMATION, *PFILE_ALL_INFORMATION; - -typedef struct _FILE_DISPOSITION_INFORMATION { - BOOLEAN DeleteFile; -} FILE_DISPOSITION_INFORMATION, *PFILE_DISPOSITION_INFORMATION; - -typedef struct _FILE_PIPE_LOCAL_INFORMATION { - ULONG NamedPipeType; - ULONG NamedPipeConfiguration; - ULONG MaximumInstances; - ULONG CurrentInstances; - ULONG InboundQuota; - ULONG ReadDataAvailable; - ULONG OutboundQuota; - ULONG WriteQuotaAvailable; - ULONG NamedPipeState; - ULONG NamedPipeEnd; -} FILE_PIPE_LOCAL_INFORMATION, *PFILE_PIPE_LOCAL_INFORMATION; - -#define FILE_SYNCHRONOUS_IO_ALERT 0x00000010 -#define FILE_SYNCHRONOUS_IO_NONALERT 0x00000020 - -typedef enum _FS_INFORMATION_CLASS { - FileFsVolumeInformation = 1, - FileFsLabelInformation = 2, - FileFsSizeInformation = 3, - FileFsDeviceInformation = 4, - FileFsAttributeInformation = 5, - FileFsControlInformation = 6, - FileFsFullSizeInformation = 7, - FileFsObjectIdInformation = 8, - FileFsDriverPathInformation = 9, - FileFsVolumeFlagsInformation = 10, - FileFsSectorSizeInformation = 11 -} FS_INFORMATION_CLASS, *PFS_INFORMATION_CLASS; - -typedef struct _FILE_FS_VOLUME_INFORMATION { - LARGE_INTEGER VolumeCreationTime; - ULONG VolumeSerialNumber; - ULONG VolumeLabelLength; - BOOLEAN SupportsObjects; - WCHAR VolumeLabel[1]; -} FILE_FS_VOLUME_INFORMATION, *PFILE_FS_VOLUME_INFORMATION; - -typedef struct _FILE_FS_LABEL_INFORMATION { - ULONG VolumeLabelLength; - WCHAR VolumeLabel[1]; -} FILE_FS_LABEL_INFORMATION, *PFILE_FS_LABEL_INFORMATION; - -typedef struct _FILE_FS_SIZE_INFORMATION { - LARGE_INTEGER TotalAllocationUnits; - LARGE_INTEGER AvailableAllocationUnits; - ULONG SectorsPerAllocationUnit; - ULONG BytesPerSector; -} FILE_FS_SIZE_INFORMATION, *PFILE_FS_SIZE_INFORMATION; - -typedef struct _FILE_FS_DEVICE_INFORMATION { - DEVICE_TYPE DeviceType; - ULONG Characteristics; -} FILE_FS_DEVICE_INFORMATION, *PFILE_FS_DEVICE_INFORMATION; - -typedef struct _FILE_FS_ATTRIBUTE_INFORMATION { - ULONG FileSystemAttributes; - LONG MaximumComponentNameLength; - ULONG FileSystemNameLength; - WCHAR FileSystemName[1]; -} FILE_FS_ATTRIBUTE_INFORMATION, *PFILE_FS_ATTRIBUTE_INFORMATION; - -typedef struct _FILE_FS_CONTROL_INFORMATION { - LARGE_INTEGER FreeSpaceStartFiltering; - LARGE_INTEGER FreeSpaceThreshold; - LARGE_INTEGER FreeSpaceStopFiltering; - LARGE_INTEGER DefaultQuotaThreshold; - LARGE_INTEGER DefaultQuotaLimit; - ULONG FileSystemControlFlags; -} FILE_FS_CONTROL_INFORMATION, *PFILE_FS_CONTROL_INFORMATION; - -typedef struct _FILE_FS_FULL_SIZE_INFORMATION { - LARGE_INTEGER TotalAllocationUnits; - LARGE_INTEGER CallerAvailableAllocationUnits; - LARGE_INTEGER ActualAvailableAllocationUnits; - ULONG SectorsPerAllocationUnit; - ULONG BytesPerSector; -} FILE_FS_FULL_SIZE_INFORMATION, *PFILE_FS_FULL_SIZE_INFORMATION; - -typedef struct _FILE_FS_OBJECTID_INFORMATION { - UCHAR ObjectId[16]; - UCHAR ExtendedInfo[48]; -} FILE_FS_OBJECTID_INFORMATION, *PFILE_FS_OBJECTID_INFORMATION; - -typedef struct _FILE_FS_DRIVER_PATH_INFORMATION { - BOOLEAN DriverInPath; - ULONG DriverNameLength; - WCHAR DriverName[1]; -} FILE_FS_DRIVER_PATH_INFORMATION, *PFILE_FS_DRIVER_PATH_INFORMATION; - -typedef struct _FILE_FS_VOLUME_FLAGS_INFORMATION { - ULONG Flags; -} FILE_FS_VOLUME_FLAGS_INFORMATION, *PFILE_FS_VOLUME_FLAGS_INFORMATION; - -typedef struct _FILE_FS_SECTOR_SIZE_INFORMATION { - ULONG LogicalBytesPerSector; - ULONG PhysicalBytesPerSectorForAtomicity; - ULONG PhysicalBytesPerSectorForPerformance; - ULONG FileSystemEffectivePhysicalBytesPerSectorForAtomicity; - ULONG Flags; - ULONG ByteOffsetForSectorAlignment; - ULONG ByteOffsetForPartitionAlignment; -} FILE_FS_SECTOR_SIZE_INFORMATION, *PFILE_FS_SECTOR_SIZE_INFORMATION; - -typedef struct _SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION { - LARGE_INTEGER IdleTime; - LARGE_INTEGER KernelTime; - LARGE_INTEGER UserTime; - LARGE_INTEGER DpcTime; - LARGE_INTEGER InterruptTime; - ULONG InterruptCount; -} SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION, *PSYSTEM_PROCESSOR_PERFORMANCE_INFORMATION; - -#ifndef SystemProcessorPerformanceInformation -# define SystemProcessorPerformanceInformation 8 -#endif - -#ifndef FILE_DEVICE_FILE_SYSTEM -# define FILE_DEVICE_FILE_SYSTEM 0x00000009 -#endif - -#ifndef FILE_DEVICE_NETWORK -# define FILE_DEVICE_NETWORK 0x00000012 -#endif - -#ifndef METHOD_BUFFERED -# define METHOD_BUFFERED 0 -#endif - -#ifndef METHOD_IN_DIRECT -# define METHOD_IN_DIRECT 1 -#endif - -#ifndef METHOD_OUT_DIRECT -# define METHOD_OUT_DIRECT 2 -#endif - -#ifndef METHOD_NEITHER -#define METHOD_NEITHER 3 -#endif - -#ifndef METHOD_DIRECT_TO_HARDWARE -# define METHOD_DIRECT_TO_HARDWARE METHOD_IN_DIRECT -#endif - -#ifndef METHOD_DIRECT_FROM_HARDWARE -# define METHOD_DIRECT_FROM_HARDWARE METHOD_OUT_DIRECT -#endif - -#ifndef FILE_ANY_ACCESS -# define FILE_ANY_ACCESS 0 -#endif - -#ifndef FILE_SPECIAL_ACCESS -# define FILE_SPECIAL_ACCESS (FILE_ANY_ACCESS) -#endif - -#ifndef FILE_READ_ACCESS -# define FILE_READ_ACCESS 0x0001 -#endif - -#ifndef FILE_WRITE_ACCESS -# define FILE_WRITE_ACCESS 0x0002 -#endif - -#ifndef CTL_CODE -# define CTL_CODE(device_type, function, method, access) \ - (((device_type) << 16) | ((access) << 14) | ((function) << 2) | (method)) -#endif - -#ifndef FSCTL_SET_REPARSE_POINT -# define FSCTL_SET_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM, \ - 41, \ - METHOD_BUFFERED, \ - FILE_SPECIAL_ACCESS) -#endif - -#ifndef FSCTL_GET_REPARSE_POINT -# define FSCTL_GET_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM, \ - 42, \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) -#endif - -#ifndef FSCTL_DELETE_REPARSE_POINT -# define FSCTL_DELETE_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM, \ - 43, \ - METHOD_BUFFERED, \ - FILE_SPECIAL_ACCESS) -#endif - -#ifndef IO_REPARSE_TAG_SYMLINK -# define IO_REPARSE_TAG_SYMLINK (0xA000000CL) -#endif - -typedef VOID (NTAPI *PIO_APC_ROUTINE) - (PVOID ApcContext, - PIO_STATUS_BLOCK IoStatusBlock, - ULONG Reserved); - -typedef ULONG (NTAPI *sRtlNtStatusToDosError) - (NTSTATUS Status); - -typedef NTSTATUS (NTAPI *sNtDeviceIoControlFile) - (HANDLE FileHandle, - HANDLE Event, - PIO_APC_ROUTINE ApcRoutine, - PVOID ApcContext, - PIO_STATUS_BLOCK IoStatusBlock, - ULONG IoControlCode, - PVOID InputBuffer, - ULONG InputBufferLength, - PVOID OutputBuffer, - ULONG OutputBufferLength); - -typedef NTSTATUS (NTAPI *sNtQueryInformationFile) - (HANDLE FileHandle, - PIO_STATUS_BLOCK IoStatusBlock, - PVOID FileInformation, - ULONG Length, - FILE_INFORMATION_CLASS FileInformationClass); - -typedef NTSTATUS (NTAPI *sNtSetInformationFile) - (HANDLE FileHandle, - PIO_STATUS_BLOCK IoStatusBlock, - PVOID FileInformation, - ULONG Length, - FILE_INFORMATION_CLASS FileInformationClass); - -typedef NTSTATUS (NTAPI *sNtQueryVolumeInformationFile) - (HANDLE FileHandle, - PIO_STATUS_BLOCK IoStatusBlock, - PVOID FsInformation, - ULONG Length, - FS_INFORMATION_CLASS FsInformationClass); - -typedef NTSTATUS (NTAPI *sNtQuerySystemInformation) - (UINT SystemInformationClass, - PVOID SystemInformation, - ULONG SystemInformationLength, - PULONG ReturnLength); - -typedef NTSTATUS (NTAPI *sNtQueryDirectoryFile) - (HANDLE FileHandle, - HANDLE Event, - PIO_APC_ROUTINE ApcRoutine, - PVOID ApcContext, - PIO_STATUS_BLOCK IoStatusBlock, - PVOID FileInformation, - ULONG Length, - FILE_INFORMATION_CLASS FileInformationClass, - BOOLEAN ReturnSingleEntry, - PUNICODE_STRING FileName, - BOOLEAN RestartScan - ); - -/* - * Kernel32 headers - */ -#ifndef FILE_SKIP_COMPLETION_PORT_ON_SUCCESS -# define FILE_SKIP_COMPLETION_PORT_ON_SUCCESS 0x1 -#endif - -#ifndef FILE_SKIP_SET_EVENT_ON_HANDLE -# define FILE_SKIP_SET_EVENT_ON_HANDLE 0x2 -#endif - -#ifndef SYMBOLIC_LINK_FLAG_DIRECTORY -# define SYMBOLIC_LINK_FLAG_DIRECTORY 0x1 -#endif - -#if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR) - typedef struct _OVERLAPPED_ENTRY { - ULONG_PTR lpCompletionKey; - LPOVERLAPPED lpOverlapped; - ULONG_PTR Internal; - DWORD dwNumberOfBytesTransferred; - } OVERLAPPED_ENTRY, *LPOVERLAPPED_ENTRY; -#endif - -/* from wincon.h */ -#ifndef ENABLE_INSERT_MODE -# define ENABLE_INSERT_MODE 0x20 -#endif - -#ifndef ENABLE_QUICK_EDIT_MODE -# define ENABLE_QUICK_EDIT_MODE 0x40 -#endif - -#ifndef ENABLE_EXTENDED_FLAGS -# define ENABLE_EXTENDED_FLAGS 0x80 -#endif - -/* from winerror.h */ -#ifndef ERROR_SYMLINK_NOT_SUPPORTED -# define ERROR_SYMLINK_NOT_SUPPORTED 1464 -#endif - -#ifndef ERROR_MUI_FILE_NOT_FOUND -# define ERROR_MUI_FILE_NOT_FOUND 15100 -#endif - -#ifndef ERROR_MUI_INVALID_FILE -# define ERROR_MUI_INVALID_FILE 15101 -#endif - -#ifndef ERROR_MUI_INVALID_RC_CONFIG -# define ERROR_MUI_INVALID_RC_CONFIG 15102 -#endif - -#ifndef ERROR_MUI_INVALID_LOCALE_NAME -# define ERROR_MUI_INVALID_LOCALE_NAME 15103 -#endif - -#ifndef ERROR_MUI_INVALID_ULTIMATEFALLBACK_NAME -# define ERROR_MUI_INVALID_ULTIMATEFALLBACK_NAME 15104 -#endif - -#ifndef ERROR_MUI_FILE_NOT_LOADED -# define ERROR_MUI_FILE_NOT_LOADED 15105 -#endif - -typedef BOOL (WINAPI *sGetQueuedCompletionStatusEx) - (HANDLE CompletionPort, - LPOVERLAPPED_ENTRY lpCompletionPortEntries, - ULONG ulCount, - PULONG ulNumEntriesRemoved, - DWORD dwMilliseconds, - BOOL fAlertable); - -typedef BOOL (WINAPI* sSetFileCompletionNotificationModes) - (HANDLE FileHandle, - UCHAR Flags); - -typedef BOOLEAN (WINAPI* sCreateSymbolicLinkW) - (LPCWSTR lpSymlinkFileName, - LPCWSTR lpTargetFileName, - DWORD dwFlags); - -typedef BOOL (WINAPI* sCancelIoEx) - (HANDLE hFile, - LPOVERLAPPED lpOverlapped); - -typedef VOID (WINAPI* sInitializeConditionVariable) - (PCONDITION_VARIABLE ConditionVariable); - -typedef BOOL (WINAPI* sSleepConditionVariableCS) - (PCONDITION_VARIABLE ConditionVariable, - PCRITICAL_SECTION CriticalSection, - DWORD dwMilliseconds); - -typedef BOOL (WINAPI* sSleepConditionVariableSRW) - (PCONDITION_VARIABLE ConditionVariable, - PSRWLOCK SRWLock, - DWORD dwMilliseconds, - ULONG Flags); - -typedef VOID (WINAPI* sWakeAllConditionVariable) - (PCONDITION_VARIABLE ConditionVariable); - -typedef VOID (WINAPI* sWakeConditionVariable) - (PCONDITION_VARIABLE ConditionVariable); - -typedef BOOL (WINAPI* sCancelSynchronousIo) - (HANDLE hThread); - -/* Ntdll function pointers */ -extern sRtlNtStatusToDosError pRtlNtStatusToDosError; -extern sNtDeviceIoControlFile pNtDeviceIoControlFile; -extern sNtQueryInformationFile pNtQueryInformationFile; -extern sNtSetInformationFile pNtSetInformationFile; -extern sNtQueryVolumeInformationFile pNtQueryVolumeInformationFile; -extern sNtQueryDirectoryFile pNtQueryDirectoryFile; -extern sNtQuerySystemInformation pNtQuerySystemInformation; - - -/* Kernel32 function pointers */ -extern sGetQueuedCompletionStatusEx pGetQueuedCompletionStatusEx; -extern sSetFileCompletionNotificationModes pSetFileCompletionNotificationModes; -extern sCreateSymbolicLinkW pCreateSymbolicLinkW; -extern sCancelIoEx pCancelIoEx; -extern sInitializeConditionVariable pInitializeConditionVariable; -extern sSleepConditionVariableCS pSleepConditionVariableCS; -extern sSleepConditionVariableSRW pSleepConditionVariableSRW; -extern sWakeAllConditionVariable pWakeAllConditionVariable; -extern sWakeConditionVariable pWakeConditionVariable; -extern sCancelSynchronousIo pCancelSynchronousIo; - -#endif /* UV_WIN_WINAPI_H_ */ diff --git a/outside/libuv-v1.7.5/src/win/winsock.c b/outside/libuv-v1.7.5/src/win/winsock.c deleted file mode 100644 index d2e667e9f..000000000 --- a/outside/libuv-v1.7.5/src/win/winsock.c +++ /dev/null @@ -1,561 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include -#include - -#include "uv.h" -#include "internal.h" - - -/* Whether there are any non-IFS LSPs stacked on TCP */ -int uv_tcp_non_ifs_lsp_ipv4; -int uv_tcp_non_ifs_lsp_ipv6; - -/* Ip address used to bind to any port at any interface */ -struct sockaddr_in uv_addr_ip4_any_; -struct sockaddr_in6 uv_addr_ip6_any_; - - -/* - * Retrieves the pointer to a winsock extension function. - */ -static BOOL uv_get_extension_function(SOCKET socket, GUID guid, - void **target) { - int result; - DWORD bytes; - - result = WSAIoctl(socket, - SIO_GET_EXTENSION_FUNCTION_POINTER, - &guid, - sizeof(guid), - (void*)target, - sizeof(*target), - &bytes, - NULL, - NULL); - - if (result == SOCKET_ERROR) { - *target = NULL; - return FALSE; - } else { - return TRUE; - } -} - - -BOOL uv_get_acceptex_function(SOCKET socket, LPFN_ACCEPTEX* target) { - const GUID wsaid_acceptex = WSAID_ACCEPTEX; - return uv_get_extension_function(socket, wsaid_acceptex, (void**)target); -} - - -BOOL uv_get_connectex_function(SOCKET socket, LPFN_CONNECTEX* target) { - const GUID wsaid_connectex = WSAID_CONNECTEX; - return uv_get_extension_function(socket, wsaid_connectex, (void**)target); -} - - -static int error_means_no_support(DWORD error) { - return error == WSAEPROTONOSUPPORT || error == WSAESOCKTNOSUPPORT || - error == WSAEPFNOSUPPORT || error == WSAEAFNOSUPPORT; -} - - -void uv_winsock_init() { - WSADATA wsa_data; - int errorno; - SOCKET dummy; - WSAPROTOCOL_INFOW protocol_info; - int opt_len; - - /* Initialize winsock */ - errorno = WSAStartup(MAKEWORD(2, 2), &wsa_data); - if (errorno != 0) { - uv_fatal_error(errorno, "WSAStartup"); - } - - /* Set implicit binding address used by connectEx */ - if (uv_ip4_addr("0.0.0.0", 0, &uv_addr_ip4_any_)) { - abort(); - } - - if (uv_ip6_addr("::", 0, &uv_addr_ip6_any_)) { - abort(); - } - - /* Detect non-IFS LSPs */ - dummy = socket(AF_INET, SOCK_STREAM, IPPROTO_IP); - - if (dummy != INVALID_SOCKET) { - opt_len = (int) sizeof protocol_info; - if (getsockopt(dummy, - SOL_SOCKET, - SO_PROTOCOL_INFOW, - (char*) &protocol_info, - &opt_len) == SOCKET_ERROR) - uv_fatal_error(WSAGetLastError(), "getsockopt"); - - if (!(protocol_info.dwServiceFlags1 & XP1_IFS_HANDLES)) - uv_tcp_non_ifs_lsp_ipv4 = 1; - - if (closesocket(dummy) == SOCKET_ERROR) - uv_fatal_error(WSAGetLastError(), "closesocket"); - - } else if (!error_means_no_support(WSAGetLastError())) { - /* Any error other than "socket type not supported" is fatal. */ - uv_fatal_error(WSAGetLastError(), "socket"); - } - - /* Detect IPV6 support and non-IFS LSPs */ - dummy = socket(AF_INET6, SOCK_STREAM, IPPROTO_IP); - - if (dummy != INVALID_SOCKET) { - opt_len = (int) sizeof protocol_info; - if (getsockopt(dummy, - SOL_SOCKET, - SO_PROTOCOL_INFOW, - (char*) &protocol_info, - &opt_len) == SOCKET_ERROR) - uv_fatal_error(WSAGetLastError(), "getsockopt"); - - if (!(protocol_info.dwServiceFlags1 & XP1_IFS_HANDLES)) - uv_tcp_non_ifs_lsp_ipv6 = 1; - - if (closesocket(dummy) == SOCKET_ERROR) - uv_fatal_error(WSAGetLastError(), "closesocket"); - - } else if (!error_means_no_support(WSAGetLastError())) { - /* Any error other than "socket type not supported" is fatal. */ - uv_fatal_error(WSAGetLastError(), "socket"); - } -} - - -int uv_ntstatus_to_winsock_error(NTSTATUS status) { - switch (status) { - case STATUS_SUCCESS: - return ERROR_SUCCESS; - - case STATUS_PENDING: - return ERROR_IO_PENDING; - - case STATUS_INVALID_HANDLE: - case STATUS_OBJECT_TYPE_MISMATCH: - return WSAENOTSOCK; - - case STATUS_INSUFFICIENT_RESOURCES: - case STATUS_PAGEFILE_QUOTA: - case STATUS_COMMITMENT_LIMIT: - case STATUS_WORKING_SET_QUOTA: - case STATUS_NO_MEMORY: - case STATUS_QUOTA_EXCEEDED: - case STATUS_TOO_MANY_PAGING_FILES: - case STATUS_REMOTE_RESOURCES: - return WSAENOBUFS; - - case STATUS_TOO_MANY_ADDRESSES: - case STATUS_SHARING_VIOLATION: - case STATUS_ADDRESS_ALREADY_EXISTS: - return WSAEADDRINUSE; - - case STATUS_LINK_TIMEOUT: - case STATUS_IO_TIMEOUT: - case STATUS_TIMEOUT: - return WSAETIMEDOUT; - - case STATUS_GRACEFUL_DISCONNECT: - return WSAEDISCON; - - case STATUS_REMOTE_DISCONNECT: - case STATUS_CONNECTION_RESET: - case STATUS_LINK_FAILED: - case STATUS_CONNECTION_DISCONNECTED: - case STATUS_PORT_UNREACHABLE: - case STATUS_HOPLIMIT_EXCEEDED: - return WSAECONNRESET; - - case STATUS_LOCAL_DISCONNECT: - case STATUS_TRANSACTION_ABORTED: - case STATUS_CONNECTION_ABORTED: - return WSAECONNABORTED; - - case STATUS_BAD_NETWORK_PATH: - case STATUS_NETWORK_UNREACHABLE: - case STATUS_PROTOCOL_UNREACHABLE: - return WSAENETUNREACH; - - case STATUS_HOST_UNREACHABLE: - return WSAEHOSTUNREACH; - - case STATUS_CANCELLED: - case STATUS_REQUEST_ABORTED: - return WSAEINTR; - - case STATUS_BUFFER_OVERFLOW: - case STATUS_INVALID_BUFFER_SIZE: - return WSAEMSGSIZE; - - case STATUS_BUFFER_TOO_SMALL: - case STATUS_ACCESS_VIOLATION: - return WSAEFAULT; - - case STATUS_DEVICE_NOT_READY: - case STATUS_REQUEST_NOT_ACCEPTED: - return WSAEWOULDBLOCK; - - case STATUS_INVALID_NETWORK_RESPONSE: - case STATUS_NETWORK_BUSY: - case STATUS_NO_SUCH_DEVICE: - case STATUS_NO_SUCH_FILE: - case STATUS_OBJECT_PATH_NOT_FOUND: - case STATUS_OBJECT_NAME_NOT_FOUND: - case STATUS_UNEXPECTED_NETWORK_ERROR: - return WSAENETDOWN; - - case STATUS_INVALID_CONNECTION: - return WSAENOTCONN; - - case STATUS_REMOTE_NOT_LISTENING: - case STATUS_CONNECTION_REFUSED: - return WSAECONNREFUSED; - - case STATUS_PIPE_DISCONNECTED: - return WSAESHUTDOWN; - - case STATUS_CONFLICTING_ADDRESSES: - case STATUS_INVALID_ADDRESS: - case STATUS_INVALID_ADDRESS_COMPONENT: - return WSAEADDRNOTAVAIL; - - case STATUS_NOT_SUPPORTED: - case STATUS_NOT_IMPLEMENTED: - return WSAEOPNOTSUPP; - - case STATUS_ACCESS_DENIED: - return WSAEACCES; - - default: - if ((status & (FACILITY_NTWIN32 << 16)) == (FACILITY_NTWIN32 << 16) && - (status & (ERROR_SEVERITY_ERROR | ERROR_SEVERITY_WARNING))) { - /* It's a windows error that has been previously mapped to an */ - /* ntstatus code. */ - return (DWORD) (status & 0xffff); - } else { - /* The default fallback for unmappable ntstatus codes. */ - return WSAEINVAL; - } - } -} - - -/* - * This function provides a workaround for a bug in the winsock implementation - * of WSARecv. The problem is that when SetFileCompletionNotificationModes is - * used to avoid IOCP notifications of completed reads, WSARecv does not - * reliably indicate whether we can expect a completion package to be posted - * when the receive buffer is smaller than the received datagram. - * - * However it is desirable to use SetFileCompletionNotificationModes because - * it yields a massive performance increase. - * - * This function provides a workaround for that bug, but it only works for the - * specific case that we need it for. E.g. it assumes that the "avoid iocp" - * bit has been set, and supports only overlapped operation. It also requires - * the user to use the default msafd driver, doesn't work when other LSPs are - * stacked on top of it. - */ -int WSAAPI uv_wsarecv_workaround(SOCKET socket, WSABUF* buffers, - DWORD buffer_count, DWORD* bytes, DWORD* flags, WSAOVERLAPPED *overlapped, - LPWSAOVERLAPPED_COMPLETION_ROUTINE completion_routine) { - NTSTATUS status; - void* apc_context; - IO_STATUS_BLOCK* iosb = (IO_STATUS_BLOCK*) &overlapped->Internal; - AFD_RECV_INFO info; - DWORD error; - - if (overlapped == NULL || completion_routine != NULL) { - WSASetLastError(WSAEINVAL); - return SOCKET_ERROR; - } - - info.BufferArray = buffers; - info.BufferCount = buffer_count; - info.AfdFlags = AFD_OVERLAPPED; - info.TdiFlags = TDI_RECEIVE_NORMAL; - - if (*flags & MSG_PEEK) { - info.TdiFlags |= TDI_RECEIVE_PEEK; - } - - if (*flags & MSG_PARTIAL) { - info.TdiFlags |= TDI_RECEIVE_PARTIAL; - } - - if (!((intptr_t) overlapped->hEvent & 1)) { - apc_context = (void*) overlapped; - } else { - apc_context = NULL; - } - - iosb->Status = STATUS_PENDING; - iosb->Pointer = 0; - - status = pNtDeviceIoControlFile((HANDLE) socket, - overlapped->hEvent, - NULL, - apc_context, - iosb, - IOCTL_AFD_RECEIVE, - &info, - sizeof(info), - NULL, - 0); - - *flags = 0; - *bytes = (DWORD) iosb->Information; - - switch (status) { - case STATUS_SUCCESS: - error = ERROR_SUCCESS; - break; - - case STATUS_PENDING: - error = WSA_IO_PENDING; - break; - - case STATUS_BUFFER_OVERFLOW: - error = WSAEMSGSIZE; - break; - - case STATUS_RECEIVE_EXPEDITED: - error = ERROR_SUCCESS; - *flags = MSG_OOB; - break; - - case STATUS_RECEIVE_PARTIAL_EXPEDITED: - error = ERROR_SUCCESS; - *flags = MSG_PARTIAL | MSG_OOB; - break; - - case STATUS_RECEIVE_PARTIAL: - error = ERROR_SUCCESS; - *flags = MSG_PARTIAL; - break; - - default: - error = uv_ntstatus_to_winsock_error(status); - break; - } - - WSASetLastError(error); - - if (error == ERROR_SUCCESS) { - return 0; - } else { - return SOCKET_ERROR; - } -} - - -/* See description of uv_wsarecv_workaround. */ -int WSAAPI uv_wsarecvfrom_workaround(SOCKET socket, WSABUF* buffers, - DWORD buffer_count, DWORD* bytes, DWORD* flags, struct sockaddr* addr, - int* addr_len, WSAOVERLAPPED *overlapped, - LPWSAOVERLAPPED_COMPLETION_ROUTINE completion_routine) { - NTSTATUS status; - void* apc_context; - IO_STATUS_BLOCK* iosb = (IO_STATUS_BLOCK*) &overlapped->Internal; - AFD_RECV_DATAGRAM_INFO info; - DWORD error; - - if (overlapped == NULL || addr == NULL || addr_len == NULL || - completion_routine != NULL) { - WSASetLastError(WSAEINVAL); - return SOCKET_ERROR; - } - - info.BufferArray = buffers; - info.BufferCount = buffer_count; - info.AfdFlags = AFD_OVERLAPPED; - info.TdiFlags = TDI_RECEIVE_NORMAL; - info.Address = addr; - info.AddressLength = addr_len; - - if (*flags & MSG_PEEK) { - info.TdiFlags |= TDI_RECEIVE_PEEK; - } - - if (*flags & MSG_PARTIAL) { - info.TdiFlags |= TDI_RECEIVE_PARTIAL; - } - - if (!((intptr_t) overlapped->hEvent & 1)) { - apc_context = (void*) overlapped; - } else { - apc_context = NULL; - } - - iosb->Status = STATUS_PENDING; - iosb->Pointer = 0; - - status = pNtDeviceIoControlFile((HANDLE) socket, - overlapped->hEvent, - NULL, - apc_context, - iosb, - IOCTL_AFD_RECEIVE_DATAGRAM, - &info, - sizeof(info), - NULL, - 0); - - *flags = 0; - *bytes = (DWORD) iosb->Information; - - switch (status) { - case STATUS_SUCCESS: - error = ERROR_SUCCESS; - break; - - case STATUS_PENDING: - error = WSA_IO_PENDING; - break; - - case STATUS_BUFFER_OVERFLOW: - error = WSAEMSGSIZE; - break; - - case STATUS_RECEIVE_EXPEDITED: - error = ERROR_SUCCESS; - *flags = MSG_OOB; - break; - - case STATUS_RECEIVE_PARTIAL_EXPEDITED: - error = ERROR_SUCCESS; - *flags = MSG_PARTIAL | MSG_OOB; - break; - - case STATUS_RECEIVE_PARTIAL: - error = ERROR_SUCCESS; - *flags = MSG_PARTIAL; - break; - - default: - error = uv_ntstatus_to_winsock_error(status); - break; - } - - WSASetLastError(error); - - if (error == ERROR_SUCCESS) { - return 0; - } else { - return SOCKET_ERROR; - } -} - - -int WSAAPI uv_msafd_poll(SOCKET socket, AFD_POLL_INFO* info_in, - AFD_POLL_INFO* info_out, OVERLAPPED* overlapped) { - IO_STATUS_BLOCK iosb; - IO_STATUS_BLOCK* iosb_ptr; - HANDLE event = NULL; - void* apc_context; - NTSTATUS status; - DWORD error; - - if (overlapped != NULL) { - /* Overlapped operation. */ - iosb_ptr = (IO_STATUS_BLOCK*) &overlapped->Internal; - event = overlapped->hEvent; - - /* Do not report iocp completion if hEvent is tagged. */ - if ((uintptr_t) event & 1) { - event = (HANDLE)((uintptr_t) event & ~(uintptr_t) 1); - apc_context = NULL; - } else { - apc_context = overlapped; - } - - } else { - /* Blocking operation. */ - iosb_ptr = &iosb; - event = CreateEvent(NULL, FALSE, FALSE, NULL); - if (event == NULL) { - return SOCKET_ERROR; - } - apc_context = NULL; - } - - iosb_ptr->Status = STATUS_PENDING; - status = pNtDeviceIoControlFile((HANDLE) socket, - event, - NULL, - apc_context, - iosb_ptr, - IOCTL_AFD_POLL, - info_in, - sizeof *info_in, - info_out, - sizeof *info_out); - - if (overlapped == NULL) { - /* If this is a blocking operation, wait for the event to become */ - /* signaled, and then grab the real status from the io status block. */ - if (status == STATUS_PENDING) { - DWORD r = WaitForSingleObject(event, INFINITE); - - if (r == WAIT_FAILED) { - DWORD saved_error = GetLastError(); - CloseHandle(event); - WSASetLastError(saved_error); - return SOCKET_ERROR; - } - - status = iosb.Status; - } - - CloseHandle(event); - } - - switch (status) { - case STATUS_SUCCESS: - error = ERROR_SUCCESS; - break; - - case STATUS_PENDING: - error = WSA_IO_PENDING; - break; - - default: - error = uv_ntstatus_to_winsock_error(status); - break; - } - - WSASetLastError(error); - - if (error == ERROR_SUCCESS) { - return 0; - } else { - return SOCKET_ERROR; - } -} diff --git a/outside/libuv-v1.7.5/src/win/winsock.h b/outside/libuv-v1.7.5/src/win/winsock.h deleted file mode 100644 index 7c007ab49..000000000 --- a/outside/libuv-v1.7.5/src/win/winsock.h +++ /dev/null @@ -1,190 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#ifndef UV_WIN_WINSOCK_H_ -#define UV_WIN_WINSOCK_H_ - -#include -#include -#include -#include -#include - -#include "winapi.h" - - -/* - * MinGW is missing these too - */ -#ifndef SO_UPDATE_CONNECT_CONTEXT -# define SO_UPDATE_CONNECT_CONTEXT 0x7010 -#endif - -#ifndef TCP_KEEPALIVE -# define TCP_KEEPALIVE 3 -#endif - -#ifndef IPV6_V6ONLY -# define IPV6_V6ONLY 27 -#endif - -#ifndef IPV6_HOPLIMIT -# define IPV6_HOPLIMIT 21 -#endif - -#ifndef SIO_BASE_HANDLE -# define SIO_BASE_HANDLE 0x48000022 -#endif - -/* - * TDI defines that are only in the DDK. - * We only need receive flags so far. - */ -#ifndef TDI_RECEIVE_NORMAL - #define TDI_RECEIVE_BROADCAST 0x00000004 - #define TDI_RECEIVE_MULTICAST 0x00000008 - #define TDI_RECEIVE_PARTIAL 0x00000010 - #define TDI_RECEIVE_NORMAL 0x00000020 - #define TDI_RECEIVE_EXPEDITED 0x00000040 - #define TDI_RECEIVE_PEEK 0x00000080 - #define TDI_RECEIVE_NO_RESPONSE_EXP 0x00000100 - #define TDI_RECEIVE_COPY_LOOKAHEAD 0x00000200 - #define TDI_RECEIVE_ENTIRE_MESSAGE 0x00000400 - #define TDI_RECEIVE_AT_DISPATCH_LEVEL 0x00000800 - #define TDI_RECEIVE_CONTROL_INFO 0x00001000 - #define TDI_RECEIVE_FORCE_INDICATION 0x00002000 - #define TDI_RECEIVE_NO_PUSH 0x00004000 -#endif - -/* - * The "Auxiliary Function Driver" is the windows kernel-mode driver that does - * TCP, UDP etc. Winsock is just a layer that dispatches requests to it. - * Having these definitions allows us to bypass winsock and make an AFD kernel - * call directly, avoiding a bug in winsock's recvfrom implementation. - */ - -#define AFD_NO_FAST_IO 0x00000001 -#define AFD_OVERLAPPED 0x00000002 -#define AFD_IMMEDIATE 0x00000004 - -#define AFD_POLL_RECEIVE_BIT 0 -#define AFD_POLL_RECEIVE (1 << AFD_POLL_RECEIVE_BIT) -#define AFD_POLL_RECEIVE_EXPEDITED_BIT 1 -#define AFD_POLL_RECEIVE_EXPEDITED (1 << AFD_POLL_RECEIVE_EXPEDITED_BIT) -#define AFD_POLL_SEND_BIT 2 -#define AFD_POLL_SEND (1 << AFD_POLL_SEND_BIT) -#define AFD_POLL_DISCONNECT_BIT 3 -#define AFD_POLL_DISCONNECT (1 << AFD_POLL_DISCONNECT_BIT) -#define AFD_POLL_ABORT_BIT 4 -#define AFD_POLL_ABORT (1 << AFD_POLL_ABORT_BIT) -#define AFD_POLL_LOCAL_CLOSE_BIT 5 -#define AFD_POLL_LOCAL_CLOSE (1 << AFD_POLL_LOCAL_CLOSE_BIT) -#define AFD_POLL_CONNECT_BIT 6 -#define AFD_POLL_CONNECT (1 << AFD_POLL_CONNECT_BIT) -#define AFD_POLL_ACCEPT_BIT 7 -#define AFD_POLL_ACCEPT (1 << AFD_POLL_ACCEPT_BIT) -#define AFD_POLL_CONNECT_FAIL_BIT 8 -#define AFD_POLL_CONNECT_FAIL (1 << AFD_POLL_CONNECT_FAIL_BIT) -#define AFD_POLL_QOS_BIT 9 -#define AFD_POLL_QOS (1 << AFD_POLL_QOS_BIT) -#define AFD_POLL_GROUP_QOS_BIT 10 -#define AFD_POLL_GROUP_QOS (1 << AFD_POLL_GROUP_QOS_BIT) - -#define AFD_NUM_POLL_EVENTS 11 -#define AFD_POLL_ALL ((1 << AFD_NUM_POLL_EVENTS) - 1) - -typedef struct _AFD_RECV_DATAGRAM_INFO { - LPWSABUF BufferArray; - ULONG BufferCount; - ULONG AfdFlags; - ULONG TdiFlags; - struct sockaddr* Address; - int* AddressLength; -} AFD_RECV_DATAGRAM_INFO, *PAFD_RECV_DATAGRAM_INFO; - -typedef struct _AFD_RECV_INFO { - LPWSABUF BufferArray; - ULONG BufferCount; - ULONG AfdFlags; - ULONG TdiFlags; -} AFD_RECV_INFO, *PAFD_RECV_INFO; - - -#define _AFD_CONTROL_CODE(operation, method) \ - ((FSCTL_AFD_BASE) << 12 | (operation << 2) | method) - -#define FSCTL_AFD_BASE FILE_DEVICE_NETWORK - -#define AFD_RECEIVE 5 -#define AFD_RECEIVE_DATAGRAM 6 -#define AFD_POLL 9 - -#define IOCTL_AFD_RECEIVE \ - _AFD_CONTROL_CODE(AFD_RECEIVE, METHOD_NEITHER) - -#define IOCTL_AFD_RECEIVE_DATAGRAM \ - _AFD_CONTROL_CODE(AFD_RECEIVE_DATAGRAM, METHOD_NEITHER) - -#define IOCTL_AFD_POLL \ - _AFD_CONTROL_CODE(AFD_POLL, METHOD_BUFFERED) - -#if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR) -typedef struct _IP_ADAPTER_UNICAST_ADDRESS_XP { - /* FIXME: __C89_NAMELESS was removed */ - /* __C89_NAMELESS */ union { - ULONGLONG Alignment; - /* __C89_NAMELESS */ struct { - ULONG Length; - DWORD Flags; - }; - }; - struct _IP_ADAPTER_UNICAST_ADDRESS_XP *Next; - SOCKET_ADDRESS Address; - IP_PREFIX_ORIGIN PrefixOrigin; - IP_SUFFIX_ORIGIN SuffixOrigin; - IP_DAD_STATE DadState; - ULONG ValidLifetime; - ULONG PreferredLifetime; - ULONG LeaseLifetime; -} IP_ADAPTER_UNICAST_ADDRESS_XP,*PIP_ADAPTER_UNICAST_ADDRESS_XP; - -typedef struct _IP_ADAPTER_UNICAST_ADDRESS_LH { - union { - ULONGLONG Alignment; - struct { - ULONG Length; - DWORD Flags; - }; - }; - struct _IP_ADAPTER_UNICAST_ADDRESS_LH *Next; - SOCKET_ADDRESS Address; - IP_PREFIX_ORIGIN PrefixOrigin; - IP_SUFFIX_ORIGIN SuffixOrigin; - IP_DAD_STATE DadState; - ULONG ValidLifetime; - ULONG PreferredLifetime; - ULONG LeaseLifetime; - UINT8 OnLinkPrefixLength; -} IP_ADAPTER_UNICAST_ADDRESS_LH,*PIP_ADAPTER_UNICAST_ADDRESS_LH; - -#endif - -#endif /* UV_WIN_WINSOCK_H_ */ diff --git a/outside/libuv-v1.7.5/test/benchmark-async-pummel.c b/outside/libuv-v1.7.5/test/benchmark-async-pummel.c deleted file mode 100644 index cca3de106..000000000 --- a/outside/libuv-v1.7.5/test/benchmark-async-pummel.c +++ /dev/null @@ -1,119 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "task.h" -#include "uv.h" - -#include -#include - -#define NUM_PINGS (1000 * 1000) -#define ACCESS_ONCE(type, var) (*(volatile type*) &(var)) - -static unsigned int callbacks; -static volatile int done; - -static const char running[] = "running"; -static const char stop[] = "stop"; -static const char stopped[] = "stopped"; - - -static void async_cb(uv_async_t* handle) { - if (++callbacks == NUM_PINGS) { - /* Tell the pummel thread to stop. */ - ACCESS_ONCE(const char*, handle->data) = stop; - - /* Wait for for the pummel thread to acknowledge that it has stoppped. */ - while (ACCESS_ONCE(const char*, handle->data) != stopped) - uv_sleep(0); - - uv_close((uv_handle_t*) handle, NULL); - } -} - - -static void pummel(void* arg) { - uv_async_t* handle = (uv_async_t*) arg; - - while (ACCESS_ONCE(const char*, handle->data) == running) - uv_async_send(handle); - - /* Acknowledge that we've seen handle->data change. */ - ACCESS_ONCE(const char*, handle->data) = stopped; -} - - -static int test_async_pummel(int nthreads) { - uv_thread_t* tids; - uv_async_t handle; - uint64_t time; - int i; - - tids = calloc(nthreads, sizeof(tids[0])); - ASSERT(tids != NULL); - - ASSERT(0 == uv_async_init(uv_default_loop(), &handle, async_cb)); - ACCESS_ONCE(const char*, handle.data) = running; - - for (i = 0; i < nthreads; i++) - ASSERT(0 == uv_thread_create(tids + i, pummel, &handle)); - - time = uv_hrtime(); - - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - - time = uv_hrtime() - time; - done = 1; - - for (i = 0; i < nthreads; i++) - ASSERT(0 == uv_thread_join(tids + i)); - - printf("async_pummel_%d: %s callbacks in %.2f seconds (%s/sec)\n", - nthreads, - fmt(callbacks), - time / 1e9, - fmt(callbacks / (time / 1e9))); - - free(tids); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -BENCHMARK_IMPL(async_pummel_1) { - return test_async_pummel(1); -} - - -BENCHMARK_IMPL(async_pummel_2) { - return test_async_pummel(2); -} - - -BENCHMARK_IMPL(async_pummel_4) { - return test_async_pummel(4); -} - - -BENCHMARK_IMPL(async_pummel_8) { - return test_async_pummel(8); -} diff --git a/outside/libuv-v1.7.5/test/benchmark-async.c b/outside/libuv-v1.7.5/test/benchmark-async.c deleted file mode 100644 index e44165f2b..000000000 --- a/outside/libuv-v1.7.5/test/benchmark-async.c +++ /dev/null @@ -1,141 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "task.h" -#include "uv.h" - -#include -#include - -#define NUM_PINGS (1000 * 1000) - -struct ctx { - uv_loop_t loop; - uv_thread_t thread; - uv_async_t main_async; /* wake up main thread */ - uv_async_t worker_async; /* wake up worker */ - unsigned int nthreads; - unsigned int main_sent; - unsigned int main_seen; - unsigned int worker_sent; - unsigned int worker_seen; -}; - - -static void worker_async_cb(uv_async_t* handle) { - struct ctx* ctx = container_of(handle, struct ctx, worker_async); - - ASSERT(0 == uv_async_send(&ctx->main_async)); - ctx->worker_sent++; - ctx->worker_seen++; - - if (ctx->worker_sent >= NUM_PINGS) - uv_close((uv_handle_t*) &ctx->worker_async, NULL); -} - - -static void main_async_cb(uv_async_t* handle) { - struct ctx* ctx = container_of(handle, struct ctx, main_async); - - ASSERT(0 == uv_async_send(&ctx->worker_async)); - ctx->main_sent++; - ctx->main_seen++; - - if (ctx->main_sent >= NUM_PINGS) - uv_close((uv_handle_t*) &ctx->main_async, NULL); -} - - -static void worker(void* arg) { - struct ctx* ctx = arg; - ASSERT(0 == uv_async_send(&ctx->main_async)); - ASSERT(0 == uv_run(&ctx->loop, UV_RUN_DEFAULT)); - uv_loop_close(&ctx->loop); -} - - -static int test_async(int nthreads) { - struct ctx* threads; - struct ctx* ctx; - uint64_t time; - int i; - - threads = calloc(nthreads, sizeof(threads[0])); - ASSERT(threads != NULL); - - for (i = 0; i < nthreads; i++) { - ctx = threads + i; - ctx->nthreads = nthreads; - ASSERT(0 == uv_loop_init(&ctx->loop)); - ASSERT(0 == uv_async_init(&ctx->loop, &ctx->worker_async, worker_async_cb)); - ASSERT(0 == uv_async_init(uv_default_loop(), - &ctx->main_async, - main_async_cb)); - ASSERT(0 == uv_thread_create(&ctx->thread, worker, ctx)); - } - - time = uv_hrtime(); - - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - - for (i = 0; i < nthreads; i++) - ASSERT(0 == uv_thread_join(&threads[i].thread)); - - time = uv_hrtime() - time; - - for (i = 0; i < nthreads; i++) { - ctx = threads + i; - ASSERT(ctx->worker_sent == NUM_PINGS); - ASSERT(ctx->worker_seen == NUM_PINGS); - ASSERT(ctx->main_sent == (unsigned int) NUM_PINGS); - ASSERT(ctx->main_seen == (unsigned int) NUM_PINGS); - } - - printf("async%d: %.2f sec (%s/sec)\n", - nthreads, - time / 1e9, - fmt(NUM_PINGS / (time / 1e9))); - - free(threads); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -BENCHMARK_IMPL(async1) { - return test_async(1); -} - - -BENCHMARK_IMPL(async2) { - return test_async(2); -} - - -BENCHMARK_IMPL(async4) { - return test_async(4); -} - - -BENCHMARK_IMPL(async8) { - return test_async(8); -} diff --git a/outside/libuv-v1.7.5/test/benchmark-fs-stat.c b/outside/libuv-v1.7.5/test/benchmark-fs-stat.c deleted file mode 100644 index 32d258958..000000000 --- a/outside/libuv-v1.7.5/test/benchmark-fs-stat.c +++ /dev/null @@ -1,136 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "task.h" -#include "uv.h" - -#include -#include - -#define NUM_SYNC_REQS (10 * 1e5) -#define NUM_ASYNC_REQS (1 * (int) 1e5) -#define MAX_CONCURRENT_REQS 32 - -#define sync_stat(req, path) \ - do { \ - uv_fs_stat(NULL, (req), (path), NULL); \ - uv_fs_req_cleanup((req)); \ - } \ - while (0) - -struct async_req { - const char* path; - uv_fs_t fs_req; - int* count; -}; - - -static void warmup(const char* path) { - uv_fs_t reqs[MAX_CONCURRENT_REQS]; - unsigned int i; - - /* warm up the thread pool */ - for (i = 0; i < ARRAY_SIZE(reqs); i++) - uv_fs_stat(uv_default_loop(), reqs + i, path, uv_fs_req_cleanup); - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - /* warm up the OS dirent cache */ - for (i = 0; i < 16; i++) - sync_stat(reqs + 0, path); -} - - -static void sync_bench(const char* path) { - uint64_t before; - uint64_t after; - uv_fs_t req; - int i; - - /* do the sync benchmark */ - before = uv_hrtime(); - - for (i = 0; i < NUM_SYNC_REQS; i++) - sync_stat(&req, path); - - after = uv_hrtime(); - - printf("%s stats (sync): %.2fs (%s/s)\n", - fmt(1.0 * NUM_SYNC_REQS), - (after - before) / 1e9, - fmt((1.0 * NUM_SYNC_REQS) / ((after - before) / 1e9))); - fflush(stdout); -} - - -static void stat_cb(uv_fs_t* fs_req) { - struct async_req* req = container_of(fs_req, struct async_req, fs_req); - uv_fs_req_cleanup(&req->fs_req); - if (*req->count == 0) return; - uv_fs_stat(uv_default_loop(), &req->fs_req, req->path, stat_cb); - (*req->count)--; -} - - -static void async_bench(const char* path) { - struct async_req reqs[MAX_CONCURRENT_REQS]; - struct async_req* req; - uint64_t before; - uint64_t after; - int count; - int i; - - for (i = 1; i <= MAX_CONCURRENT_REQS; i++) { - count = NUM_ASYNC_REQS; - - for (req = reqs; req < reqs + i; req++) { - req->path = path; - req->count = &count; - uv_fs_stat(uv_default_loop(), &req->fs_req, req->path, stat_cb); - } - - before = uv_hrtime(); - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - after = uv_hrtime(); - - printf("%s stats (%d concurrent): %.2fs (%s/s)\n", - fmt(1.0 * NUM_ASYNC_REQS), - i, - (after - before) / 1e9, - fmt((1.0 * NUM_ASYNC_REQS) / ((after - before) / 1e9))); - fflush(stdout); - } -} - - -/* This benchmark aims to measure the overhead of doing I/O syscalls from - * the thread pool. The stat() syscall was chosen because its results are - * easy for the operating system to cache, taking the actual I/O overhead - * out of the equation. - */ -BENCHMARK_IMPL(fs_stat) { - const char path[] = "."; - warmup(path); - sync_bench(path); - async_bench(path); - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/benchmark-getaddrinfo.c b/outside/libuv-v1.7.5/test/benchmark-getaddrinfo.c deleted file mode 100644 index 1dbc23ddb..000000000 --- a/outside/libuv-v1.7.5/test/benchmark-getaddrinfo.c +++ /dev/null @@ -1,92 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" -#include - -#define CONCURRENT_CALLS 10 -#define TOTAL_CALLS 10000 - -static const char* name = "localhost"; - -static uv_loop_t* loop; - -static uv_getaddrinfo_t handles[CONCURRENT_CALLS]; - -static int calls_initiated = 0; -static int calls_completed = 0; -static int64_t start_time; -static int64_t end_time; - - -static void getaddrinfo_initiate(uv_getaddrinfo_t* handle); - - -static void getaddrinfo_cb(uv_getaddrinfo_t* handle, int status, - struct addrinfo* res) { - ASSERT(status == 0); - calls_completed++; - if (calls_initiated < TOTAL_CALLS) { - getaddrinfo_initiate(handle); - } - - uv_freeaddrinfo(res); -} - - -static void getaddrinfo_initiate(uv_getaddrinfo_t* handle) { - int r; - - calls_initiated++; - - r = uv_getaddrinfo(loop, handle, &getaddrinfo_cb, name, NULL, NULL); - ASSERT(r == 0); -} - - -BENCHMARK_IMPL(getaddrinfo) { - int i; - - loop = uv_default_loop(); - - uv_update_time(loop); - start_time = uv_now(loop); - - for (i = 0; i < CONCURRENT_CALLS; i++) { - getaddrinfo_initiate(&handles[i]); - } - - uv_run(loop, UV_RUN_DEFAULT); - - uv_update_time(loop); - end_time = uv_now(loop); - - ASSERT(calls_initiated == TOTAL_CALLS); - ASSERT(calls_completed == TOTAL_CALLS); - - fprintf(stderr, "getaddrinfo: %.0f req/s\n", - (double) calls_completed / (double) (end_time - start_time) * 1000.0); - fflush(stderr); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/benchmark-list.h b/outside/libuv-v1.7.5/test/benchmark-list.h deleted file mode 100644 index 1e843071c..000000000 --- a/outside/libuv-v1.7.5/test/benchmark-list.h +++ /dev/null @@ -1,163 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -BENCHMARK_DECLARE (sizes) -BENCHMARK_DECLARE (loop_count) -BENCHMARK_DECLARE (loop_count_timed) -BENCHMARK_DECLARE (ping_pongs) -BENCHMARK_DECLARE (tcp_write_batch) -BENCHMARK_DECLARE (tcp4_pound_100) -BENCHMARK_DECLARE (tcp4_pound_1000) -BENCHMARK_DECLARE (pipe_pound_100) -BENCHMARK_DECLARE (pipe_pound_1000) -BENCHMARK_DECLARE (tcp_pump100_client) -BENCHMARK_DECLARE (tcp_pump1_client) -BENCHMARK_DECLARE (pipe_pump100_client) -BENCHMARK_DECLARE (pipe_pump1_client) - -BENCHMARK_DECLARE (tcp_multi_accept2) -BENCHMARK_DECLARE (tcp_multi_accept4) -BENCHMARK_DECLARE (tcp_multi_accept8) - -/* Run until X packets have been sent/received. */ -BENCHMARK_DECLARE (udp_pummel_1v1) -BENCHMARK_DECLARE (udp_pummel_1v10) -BENCHMARK_DECLARE (udp_pummel_1v100) -BENCHMARK_DECLARE (udp_pummel_1v1000) -BENCHMARK_DECLARE (udp_pummel_10v10) -BENCHMARK_DECLARE (udp_pummel_10v100) -BENCHMARK_DECLARE (udp_pummel_10v1000) -BENCHMARK_DECLARE (udp_pummel_100v100) -BENCHMARK_DECLARE (udp_pummel_100v1000) -BENCHMARK_DECLARE (udp_pummel_1000v1000) - -/* Run until X seconds have elapsed. */ -BENCHMARK_DECLARE (udp_timed_pummel_1v1) -BENCHMARK_DECLARE (udp_timed_pummel_1v10) -BENCHMARK_DECLARE (udp_timed_pummel_1v100) -BENCHMARK_DECLARE (udp_timed_pummel_1v1000) -BENCHMARK_DECLARE (udp_timed_pummel_10v10) -BENCHMARK_DECLARE (udp_timed_pummel_10v100) -BENCHMARK_DECLARE (udp_timed_pummel_10v1000) -BENCHMARK_DECLARE (udp_timed_pummel_100v100) -BENCHMARK_DECLARE (udp_timed_pummel_100v1000) -BENCHMARK_DECLARE (udp_timed_pummel_1000v1000) - -BENCHMARK_DECLARE (getaddrinfo) -BENCHMARK_DECLARE (fs_stat) -BENCHMARK_DECLARE (async1) -BENCHMARK_DECLARE (async2) -BENCHMARK_DECLARE (async4) -BENCHMARK_DECLARE (async8) -BENCHMARK_DECLARE (async_pummel_1) -BENCHMARK_DECLARE (async_pummel_2) -BENCHMARK_DECLARE (async_pummel_4) -BENCHMARK_DECLARE (async_pummel_8) -BENCHMARK_DECLARE (spawn) -BENCHMARK_DECLARE (thread_create) -BENCHMARK_DECLARE (million_async) -BENCHMARK_DECLARE (million_timers) -HELPER_DECLARE (tcp4_blackhole_server) -HELPER_DECLARE (tcp_pump_server) -HELPER_DECLARE (pipe_pump_server) -HELPER_DECLARE (tcp4_echo_server) -HELPER_DECLARE (pipe_echo_server) -HELPER_DECLARE (dns_server) - -TASK_LIST_START - BENCHMARK_ENTRY (sizes) - BENCHMARK_ENTRY (loop_count) - BENCHMARK_ENTRY (loop_count_timed) - - BENCHMARK_ENTRY (ping_pongs) - BENCHMARK_HELPER (ping_pongs, tcp4_echo_server) - - BENCHMARK_ENTRY (tcp_write_batch) - BENCHMARK_HELPER (tcp_write_batch, tcp4_blackhole_server) - - BENCHMARK_ENTRY (tcp_pump100_client) - BENCHMARK_HELPER (tcp_pump100_client, tcp_pump_server) - - BENCHMARK_ENTRY (tcp_pump1_client) - BENCHMARK_HELPER (tcp_pump1_client, tcp_pump_server) - - BENCHMARK_ENTRY (tcp4_pound_100) - BENCHMARK_HELPER (tcp4_pound_100, tcp4_echo_server) - - BENCHMARK_ENTRY (tcp4_pound_1000) - BENCHMARK_HELPER (tcp4_pound_1000, tcp4_echo_server) - - BENCHMARK_ENTRY (pipe_pump100_client) - BENCHMARK_HELPER (pipe_pump100_client, pipe_pump_server) - - BENCHMARK_ENTRY (pipe_pump1_client) - BENCHMARK_HELPER (pipe_pump1_client, pipe_pump_server) - - BENCHMARK_ENTRY (pipe_pound_100) - BENCHMARK_HELPER (pipe_pound_100, pipe_echo_server) - - BENCHMARK_ENTRY (pipe_pound_1000) - BENCHMARK_HELPER (pipe_pound_1000, pipe_echo_server) - - BENCHMARK_ENTRY (tcp_multi_accept2) - BENCHMARK_ENTRY (tcp_multi_accept4) - BENCHMARK_ENTRY (tcp_multi_accept8) - - BENCHMARK_ENTRY (udp_pummel_1v1) - BENCHMARK_ENTRY (udp_pummel_1v10) - BENCHMARK_ENTRY (udp_pummel_1v100) - BENCHMARK_ENTRY (udp_pummel_1v1000) - BENCHMARK_ENTRY (udp_pummel_10v10) - BENCHMARK_ENTRY (udp_pummel_10v100) - BENCHMARK_ENTRY (udp_pummel_10v1000) - BENCHMARK_ENTRY (udp_pummel_100v100) - BENCHMARK_ENTRY (udp_pummel_100v1000) - BENCHMARK_ENTRY (udp_pummel_1000v1000) - - BENCHMARK_ENTRY (udp_timed_pummel_1v1) - BENCHMARK_ENTRY (udp_timed_pummel_1v10) - BENCHMARK_ENTRY (udp_timed_pummel_1v100) - BENCHMARK_ENTRY (udp_timed_pummel_1v1000) - BENCHMARK_ENTRY (udp_timed_pummel_10v10) - BENCHMARK_ENTRY (udp_timed_pummel_10v100) - BENCHMARK_ENTRY (udp_timed_pummel_10v1000) - BENCHMARK_ENTRY (udp_timed_pummel_100v100) - BENCHMARK_ENTRY (udp_timed_pummel_100v1000) - BENCHMARK_ENTRY (udp_timed_pummel_1000v1000) - - BENCHMARK_ENTRY (getaddrinfo) - - BENCHMARK_ENTRY (fs_stat) - - BENCHMARK_ENTRY (async1) - BENCHMARK_ENTRY (async2) - BENCHMARK_ENTRY (async4) - BENCHMARK_ENTRY (async8) - BENCHMARK_ENTRY (async_pummel_1) - BENCHMARK_ENTRY (async_pummel_2) - BENCHMARK_ENTRY (async_pummel_4) - BENCHMARK_ENTRY (async_pummel_8) - - BENCHMARK_ENTRY (spawn) - BENCHMARK_ENTRY (thread_create) - BENCHMARK_ENTRY (million_async) - BENCHMARK_ENTRY (million_timers) -TASK_LIST_END diff --git a/outside/libuv-v1.7.5/test/benchmark-loop-count.c b/outside/libuv-v1.7.5/test/benchmark-loop-count.c deleted file mode 100644 index 970a94c2f..000000000 --- a/outside/libuv-v1.7.5/test/benchmark-loop-count.c +++ /dev/null @@ -1,92 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "task.h" -#include "uv.h" - -#include -#include - -#define NUM_TICKS (2 * 1000 * 1000) - -static unsigned long ticks; -static uv_idle_t idle_handle; -static uv_timer_t timer_handle; - - -static void idle_cb(uv_idle_t* handle) { - if (++ticks == NUM_TICKS) - uv_idle_stop(handle); -} - - -static void idle2_cb(uv_idle_t* handle) { - ticks++; -} - - -static void timer_cb(uv_timer_t* handle) { - uv_idle_stop(&idle_handle); - uv_timer_stop(&timer_handle); -} - - -BENCHMARK_IMPL(loop_count) { - uv_loop_t* loop = uv_default_loop(); - uint64_t ns; - - uv_idle_init(loop, &idle_handle); - uv_idle_start(&idle_handle, idle_cb); - - ns = uv_hrtime(); - uv_run(loop, UV_RUN_DEFAULT); - ns = uv_hrtime() - ns; - - ASSERT(ticks == NUM_TICKS); - - fprintf(stderr, "loop_count: %d ticks in %.2fs (%.0f/s)\n", - NUM_TICKS, - ns / 1e9, - NUM_TICKS / (ns / 1e9)); - fflush(stderr); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -BENCHMARK_IMPL(loop_count_timed) { - uv_loop_t* loop = uv_default_loop(); - - uv_idle_init(loop, &idle_handle); - uv_idle_start(&idle_handle, idle2_cb); - - uv_timer_init(loop, &timer_handle); - uv_timer_start(&timer_handle, timer_cb, 5000, 0); - - uv_run(loop, UV_RUN_DEFAULT); - - fprintf(stderr, "loop_count: %lu ticks (%.0f ticks/s)\n", ticks, ticks / 5.0); - fflush(stderr); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/benchmark-million-async.c b/outside/libuv-v1.7.5/test/benchmark-million-async.c deleted file mode 100644 index 5395ed54b..000000000 --- a/outside/libuv-v1.7.5/test/benchmark-million-async.c +++ /dev/null @@ -1,112 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "task.h" -#include "uv.h" - -struct async_container { - unsigned async_events; - unsigned handles_seen; - uv_async_t async_handles[1024 * 1024]; -}; - -static volatile int done; -static uv_thread_t thread_id; -static struct async_container* container; - - -static unsigned fastrand(void) { - static unsigned g = 0; - g = g * 214013 + 2531011; - return g; -} - - -static void thread_cb(void* arg) { - unsigned i; - - while (done == 0) { - i = fastrand() % ARRAY_SIZE(container->async_handles); - uv_async_send(container->async_handles + i); - } -} - - -static void async_cb(uv_async_t* handle) { - container->async_events++; - handle->data = handle; -} - - -static void timer_cb(uv_timer_t* handle) { - unsigned i; - - done = 1; - ASSERT(0 == uv_thread_join(&thread_id)); - - for (i = 0; i < ARRAY_SIZE(container->async_handles); i++) { - uv_async_t* handle = container->async_handles + i; - - if (handle->data != NULL) - container->handles_seen++; - - uv_close((uv_handle_t*) handle, NULL); - } - - uv_close((uv_handle_t*) handle, NULL); -} - - -BENCHMARK_IMPL(million_async) { - uv_timer_t timer_handle; - uv_async_t* handle; - uv_loop_t* loop; - int timeout; - unsigned i; - - loop = uv_default_loop(); - timeout = 5000; - - container = malloc(sizeof(*container)); - ASSERT(container != NULL); - container->async_events = 0; - container->handles_seen = 0; - - for (i = 0; i < ARRAY_SIZE(container->async_handles); i++) { - handle = container->async_handles + i; - ASSERT(0 == uv_async_init(loop, handle, async_cb)); - handle->data = NULL; - } - - ASSERT(0 == uv_timer_init(loop, &timer_handle)); - ASSERT(0 == uv_timer_start(&timer_handle, timer_cb, timeout, 0)); - ASSERT(0 == uv_thread_create(&thread_id, thread_cb, NULL)); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - printf("%s async events in %.1f seconds (%s/s, %s unique handles seen)\n", - fmt(container->async_events), - timeout / 1000., - fmt(container->async_events / (timeout / 1000.)), - fmt(container->handles_seen)); - free(container); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/benchmark-million-timers.c b/outside/libuv-v1.7.5/test/benchmark-million-timers.c deleted file mode 100644 index 60a308bef..000000000 --- a/outside/libuv-v1.7.5/test/benchmark-million-timers.c +++ /dev/null @@ -1,86 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "task.h" -#include "uv.h" - -#define NUM_TIMERS (10 * 1000 * 1000) - -static int timer_cb_called; -static int close_cb_called; - - -static void timer_cb(uv_timer_t* handle) { - timer_cb_called++; -} - - -static void close_cb(uv_handle_t* handle) { - close_cb_called++; -} - - -BENCHMARK_IMPL(million_timers) { - uv_timer_t* timers; - uv_loop_t* loop; - uint64_t before_all; - uint64_t before_run; - uint64_t after_run; - uint64_t after_all; - int timeout; - int i; - - timers = malloc(NUM_TIMERS * sizeof(timers[0])); - ASSERT(timers != NULL); - - loop = uv_default_loop(); - timeout = 0; - - before_all = uv_hrtime(); - for (i = 0; i < NUM_TIMERS; i++) { - if (i % 1000 == 0) timeout++; - ASSERT(0 == uv_timer_init(loop, timers + i)); - ASSERT(0 == uv_timer_start(timers + i, timer_cb, timeout, 0)); - } - - before_run = uv_hrtime(); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - after_run = uv_hrtime(); - - for (i = 0; i < NUM_TIMERS; i++) - uv_close((uv_handle_t*) (timers + i), close_cb); - - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - after_all = uv_hrtime(); - - ASSERT(timer_cb_called == NUM_TIMERS); - ASSERT(close_cb_called == NUM_TIMERS); - free(timers); - - fprintf(stderr, "%.2f seconds total\n", (after_all - before_all) / 1e9); - fprintf(stderr, "%.2f seconds init\n", (before_run - before_all) / 1e9); - fprintf(stderr, "%.2f seconds dispatch\n", (after_run - before_run) / 1e9); - fprintf(stderr, "%.2f seconds cleanup\n", (after_all - after_run) / 1e9); - fflush(stderr); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/benchmark-multi-accept.c b/outside/libuv-v1.7.5/test/benchmark-multi-accept.c deleted file mode 100644 index 2f32c0caf..000000000 --- a/outside/libuv-v1.7.5/test/benchmark-multi-accept.c +++ /dev/null @@ -1,447 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "task.h" -#include "uv.h" - -#define IPC_PIPE_NAME TEST_PIPENAME -#define NUM_CONNECTS (250 * 1000) - -union stream_handle { - uv_pipe_t pipe; - uv_tcp_t tcp; -}; - -/* Use as (uv_stream_t *) &handle_storage -- it's kind of clunky but it - * avoids aliasing warnings. - */ -typedef unsigned char handle_storage_t[sizeof(union stream_handle)]; - -/* Used for passing around the listen handle, not part of the benchmark proper. - * We have an overabundance of server types here. It works like this: - * - * 1. The main thread starts an IPC pipe server. - * 2. The worker threads connect to the IPC server and obtain a listen handle. - * 3. The worker threads start accepting requests on the listen handle. - * 4. The main thread starts connecting repeatedly. - * - * Step #4 should perhaps be farmed out over several threads. - */ -struct ipc_server_ctx { - handle_storage_t server_handle; - unsigned int num_connects; - uv_pipe_t ipc_pipe; -}; - -struct ipc_peer_ctx { - handle_storage_t peer_handle; - uv_write_t write_req; -}; - -struct ipc_client_ctx { - uv_connect_t connect_req; - uv_stream_t* server_handle; - uv_pipe_t ipc_pipe; - char scratch[16]; -}; - -/* Used in the actual benchmark. */ -struct server_ctx { - handle_storage_t server_handle; - unsigned int num_connects; - uv_async_t async_handle; - uv_thread_t thread_id; - uv_sem_t semaphore; -}; - -struct client_ctx { - handle_storage_t client_handle; - unsigned int num_connects; - uv_connect_t connect_req; - uv_idle_t idle_handle; -}; - -static void ipc_connection_cb(uv_stream_t* ipc_pipe, int status); -static void ipc_write_cb(uv_write_t* req, int status); -static void ipc_close_cb(uv_handle_t* handle); -static void ipc_connect_cb(uv_connect_t* req, int status); -static void ipc_read_cb(uv_stream_t* handle, - ssize_t nread, - const uv_buf_t* buf); -static void ipc_alloc_cb(uv_handle_t* handle, - size_t suggested_size, - uv_buf_t* buf); - -static void sv_async_cb(uv_async_t* handle); -static void sv_connection_cb(uv_stream_t* server_handle, int status); -static void sv_read_cb(uv_stream_t* handle, ssize_t nread, const uv_buf_t* buf); -static void sv_alloc_cb(uv_handle_t* handle, - size_t suggested_size, - uv_buf_t* buf); - -static void cl_connect_cb(uv_connect_t* req, int status); -static void cl_idle_cb(uv_idle_t* handle); -static void cl_close_cb(uv_handle_t* handle); - -static struct sockaddr_in listen_addr; - - -static void ipc_connection_cb(uv_stream_t* ipc_pipe, int status) { - struct ipc_server_ctx* sc; - struct ipc_peer_ctx* pc; - uv_loop_t* loop; - uv_buf_t buf; - - loop = ipc_pipe->loop; - buf = uv_buf_init("PING", 4); - sc = container_of(ipc_pipe, struct ipc_server_ctx, ipc_pipe); - pc = calloc(1, sizeof(*pc)); - ASSERT(pc != NULL); - - if (ipc_pipe->type == UV_TCP) - ASSERT(0 == uv_tcp_init(loop, (uv_tcp_t*) &pc->peer_handle)); - else if (ipc_pipe->type == UV_NAMED_PIPE) - ASSERT(0 == uv_pipe_init(loop, (uv_pipe_t*) &pc->peer_handle, 1)); - else - ASSERT(0); - - ASSERT(0 == uv_accept(ipc_pipe, (uv_stream_t*) &pc->peer_handle)); - ASSERT(0 == uv_write2(&pc->write_req, - (uv_stream_t*) &pc->peer_handle, - &buf, - 1, - (uv_stream_t*) &sc->server_handle, - ipc_write_cb)); - - if (--sc->num_connects == 0) - uv_close((uv_handle_t*) ipc_pipe, NULL); -} - - -static void ipc_write_cb(uv_write_t* req, int status) { - struct ipc_peer_ctx* ctx; - ctx = container_of(req, struct ipc_peer_ctx, write_req); - uv_close((uv_handle_t*) &ctx->peer_handle, ipc_close_cb); -} - - -static void ipc_close_cb(uv_handle_t* handle) { - struct ipc_peer_ctx* ctx; - ctx = container_of(handle, struct ipc_peer_ctx, peer_handle); - free(ctx); -} - - -static void ipc_connect_cb(uv_connect_t* req, int status) { - struct ipc_client_ctx* ctx; - ctx = container_of(req, struct ipc_client_ctx, connect_req); - ASSERT(0 == status); - ASSERT(0 == uv_read_start((uv_stream_t*) &ctx->ipc_pipe, - ipc_alloc_cb, - ipc_read_cb)); -} - - -static void ipc_alloc_cb(uv_handle_t* handle, - size_t suggested_size, - uv_buf_t* buf) { - struct ipc_client_ctx* ctx; - ctx = container_of(handle, struct ipc_client_ctx, ipc_pipe); - buf->base = ctx->scratch; - buf->len = sizeof(ctx->scratch); -} - - -static void ipc_read_cb(uv_stream_t* handle, - ssize_t nread, - const uv_buf_t* buf) { - struct ipc_client_ctx* ctx; - uv_loop_t* loop; - uv_handle_type type; - uv_pipe_t* ipc_pipe; - - ipc_pipe = (uv_pipe_t*) handle; - ctx = container_of(ipc_pipe, struct ipc_client_ctx, ipc_pipe); - loop = ipc_pipe->loop; - - ASSERT(1 == uv_pipe_pending_count(ipc_pipe)); - type = uv_pipe_pending_type(ipc_pipe); - if (type == UV_TCP) - ASSERT(0 == uv_tcp_init(loop, (uv_tcp_t*) ctx->server_handle)); - else if (type == UV_NAMED_PIPE) - ASSERT(0 == uv_pipe_init(loop, (uv_pipe_t*) ctx->server_handle, 0)); - else - ASSERT(0); - - ASSERT(0 == uv_accept(handle, ctx->server_handle)); - uv_close((uv_handle_t*) &ctx->ipc_pipe, NULL); -} - - -/* Set up an IPC pipe server that hands out listen sockets to the worker - * threads. It's kind of cumbersome for such a simple operation, maybe we - * should revive uv_import() and uv_export(). - */ -static void send_listen_handles(uv_handle_type type, - unsigned int num_servers, - struct server_ctx* servers) { - struct ipc_server_ctx ctx; - uv_loop_t* loop; - unsigned int i; - - loop = uv_default_loop(); - ctx.num_connects = num_servers; - - if (type == UV_TCP) { - ASSERT(0 == uv_tcp_init(loop, (uv_tcp_t*) &ctx.server_handle)); - ASSERT(0 == uv_tcp_bind((uv_tcp_t*) &ctx.server_handle, - (const struct sockaddr*) &listen_addr, - 0)); - } - else - ASSERT(0); - - ASSERT(0 == uv_pipe_init(loop, &ctx.ipc_pipe, 1)); - ASSERT(0 == uv_pipe_bind(&ctx.ipc_pipe, IPC_PIPE_NAME)); - ASSERT(0 == uv_listen((uv_stream_t*) &ctx.ipc_pipe, 128, ipc_connection_cb)); - - for (i = 0; i < num_servers; i++) - uv_sem_post(&servers[i].semaphore); - - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - uv_close((uv_handle_t*) &ctx.server_handle, NULL); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - - for (i = 0; i < num_servers; i++) - uv_sem_wait(&servers[i].semaphore); -} - - -static void get_listen_handle(uv_loop_t* loop, uv_stream_t* server_handle) { - struct ipc_client_ctx ctx; - - ctx.server_handle = server_handle; - ctx.server_handle->data = "server handle"; - - ASSERT(0 == uv_pipe_init(loop, &ctx.ipc_pipe, 1)); - uv_pipe_connect(&ctx.connect_req, - &ctx.ipc_pipe, - IPC_PIPE_NAME, - ipc_connect_cb); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); -} - - -static void server_cb(void *arg) { - struct server_ctx *ctx; - uv_loop_t loop; - - ctx = arg; - ASSERT(0 == uv_loop_init(&loop)); - - ASSERT(0 == uv_async_init(&loop, &ctx->async_handle, sv_async_cb)); - uv_unref((uv_handle_t*) &ctx->async_handle); - - /* Wait until the main thread is ready. */ - uv_sem_wait(&ctx->semaphore); - get_listen_handle(&loop, (uv_stream_t*) &ctx->server_handle); - uv_sem_post(&ctx->semaphore); - - /* Now start the actual benchmark. */ - ASSERT(0 == uv_listen((uv_stream_t*) &ctx->server_handle, - 128, - sv_connection_cb)); - ASSERT(0 == uv_run(&loop, UV_RUN_DEFAULT)); - - uv_loop_close(&loop); -} - - -static void sv_async_cb(uv_async_t* handle) { - struct server_ctx* ctx; - ctx = container_of(handle, struct server_ctx, async_handle); - uv_close((uv_handle_t*) &ctx->server_handle, NULL); - uv_close((uv_handle_t*) &ctx->async_handle, NULL); -} - - -static void sv_connection_cb(uv_stream_t* server_handle, int status) { - handle_storage_t* storage; - struct server_ctx* ctx; - - ctx = container_of(server_handle, struct server_ctx, server_handle); - ASSERT(status == 0); - - storage = malloc(sizeof(*storage)); - ASSERT(storage != NULL); - - if (server_handle->type == UV_TCP) - ASSERT(0 == uv_tcp_init(server_handle->loop, (uv_tcp_t*) storage)); - else if (server_handle->type == UV_NAMED_PIPE) - ASSERT(0 == uv_pipe_init(server_handle->loop, (uv_pipe_t*) storage, 0)); - else - ASSERT(0); - - ASSERT(0 == uv_accept(server_handle, (uv_stream_t*) storage)); - ASSERT(0 == uv_read_start((uv_stream_t*) storage, sv_alloc_cb, sv_read_cb)); - ctx->num_connects++; -} - - -static void sv_alloc_cb(uv_handle_t* handle, - size_t suggested_size, - uv_buf_t* buf) { - static char slab[32]; - buf->base = slab; - buf->len = sizeof(slab); -} - - -static void sv_read_cb(uv_stream_t* handle, - ssize_t nread, - const uv_buf_t* buf) { - ASSERT(nread == UV_EOF); - uv_close((uv_handle_t*) handle, (uv_close_cb) free); -} - - -static void cl_connect_cb(uv_connect_t* req, int status) { - struct client_ctx* ctx = container_of(req, struct client_ctx, connect_req); - uv_idle_start(&ctx->idle_handle, cl_idle_cb); - ASSERT(0 == status); -} - - -static void cl_idle_cb(uv_idle_t* handle) { - struct client_ctx* ctx = container_of(handle, struct client_ctx, idle_handle); - uv_close((uv_handle_t*) &ctx->client_handle, cl_close_cb); - uv_idle_stop(&ctx->idle_handle); -} - - -static void cl_close_cb(uv_handle_t* handle) { - struct client_ctx* ctx; - - ctx = container_of(handle, struct client_ctx, client_handle); - - if (--ctx->num_connects == 0) { - uv_close((uv_handle_t*) &ctx->idle_handle, NULL); - return; - } - - ASSERT(0 == uv_tcp_init(handle->loop, (uv_tcp_t*) &ctx->client_handle)); - ASSERT(0 == uv_tcp_connect(&ctx->connect_req, - (uv_tcp_t*) &ctx->client_handle, - (const struct sockaddr*) &listen_addr, - cl_connect_cb)); -} - - -static int test_tcp(unsigned int num_servers, unsigned int num_clients) { - struct server_ctx* servers; - struct client_ctx* clients; - uv_loop_t* loop; - uv_tcp_t* handle; - unsigned int i; - double time; - - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &listen_addr)); - loop = uv_default_loop(); - - servers = calloc(num_servers, sizeof(servers[0])); - clients = calloc(num_clients, sizeof(clients[0])); - ASSERT(servers != NULL); - ASSERT(clients != NULL); - - /* We're making the assumption here that from the perspective of the - * OS scheduler, threads are functionally equivalent to and interchangeable - * with full-blown processes. - */ - for (i = 0; i < num_servers; i++) { - struct server_ctx* ctx = servers + i; - ASSERT(0 == uv_sem_init(&ctx->semaphore, 0)); - ASSERT(0 == uv_thread_create(&ctx->thread_id, server_cb, ctx)); - } - - send_listen_handles(UV_TCP, num_servers, servers); - - for (i = 0; i < num_clients; i++) { - struct client_ctx* ctx = clients + i; - ctx->num_connects = NUM_CONNECTS / num_clients; - handle = (uv_tcp_t*) &ctx->client_handle; - handle->data = "client handle"; - ASSERT(0 == uv_tcp_init(loop, handle)); - ASSERT(0 == uv_tcp_connect(&ctx->connect_req, - handle, - (const struct sockaddr*) &listen_addr, - cl_connect_cb)); - ASSERT(0 == uv_idle_init(loop, &ctx->idle_handle)); - } - - { - uint64_t t = uv_hrtime(); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - t = uv_hrtime() - t; - time = t / 1e9; - } - - for (i = 0; i < num_servers; i++) { - struct server_ctx* ctx = servers + i; - uv_async_send(&ctx->async_handle); - ASSERT(0 == uv_thread_join(&ctx->thread_id)); - uv_sem_destroy(&ctx->semaphore); - } - - printf("accept%u: %.0f accepts/sec (%u total)\n", - num_servers, - NUM_CONNECTS / time, - NUM_CONNECTS); - - for (i = 0; i < num_servers; i++) { - struct server_ctx* ctx = servers + i; - printf(" thread #%u: %.0f accepts/sec (%u total, %.1f%%)\n", - i, - ctx->num_connects / time, - ctx->num_connects, - ctx->num_connects * 100.0 / NUM_CONNECTS); - } - - free(clients); - free(servers); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -BENCHMARK_IMPL(tcp_multi_accept2) { - return test_tcp(2, 40); -} - - -BENCHMARK_IMPL(tcp_multi_accept4) { - return test_tcp(4, 40); -} - - -BENCHMARK_IMPL(tcp_multi_accept8) { - return test_tcp(8, 40); -} diff --git a/outside/libuv-v1.7.5/test/benchmark-ping-pongs.c b/outside/libuv-v1.7.5/test/benchmark-ping-pongs.c deleted file mode 100644 index 646a7df94..000000000 --- a/outside/libuv-v1.7.5/test/benchmark-ping-pongs.c +++ /dev/null @@ -1,221 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#include -#include - -/* Run the benchmark for this many ms */ -#define TIME 5000 - - -typedef struct { - int pongs; - int state; - uv_tcp_t tcp; - uv_connect_t connect_req; - uv_shutdown_t shutdown_req; -} pinger_t; - -typedef struct buf_s { - uv_buf_t uv_buf_t; - struct buf_s* next; -} buf_t; - - -static char PING[] = "PING\n"; - -static uv_loop_t* loop; - -static buf_t* buf_freelist = NULL; -static int pinger_shutdown_cb_called; -static int completed_pingers = 0; -static int64_t start_time; - - -static void buf_alloc(uv_handle_t* tcp, size_t size, uv_buf_t* buf) { - buf_t* ab; - - ab = buf_freelist; - if (ab != NULL) - buf_freelist = ab->next; - else { - ab = malloc(size + sizeof(*ab)); - ab->uv_buf_t.len = size; - ab->uv_buf_t.base = (char*) (ab + 1); - } - - *buf = ab->uv_buf_t; -} - - -static void buf_free(const uv_buf_t* buf) { - buf_t* ab = (buf_t*) buf->base - 1; - ab->next = buf_freelist; - buf_freelist = ab; -} - - -static void pinger_close_cb(uv_handle_t* handle) { - pinger_t* pinger; - - pinger = (pinger_t*)handle->data; - fprintf(stderr, "ping_pongs: %d roundtrips/s\n", (1000 * pinger->pongs) / TIME); - fflush(stderr); - - free(pinger); - - completed_pingers++; -} - - -static void pinger_write_cb(uv_write_t* req, int status) { - ASSERT(status == 0); - - free(req); -} - - -static void pinger_write_ping(pinger_t* pinger) { - uv_write_t* req; - uv_buf_t buf; - - buf = uv_buf_init(PING, sizeof(PING) - 1); - - req = malloc(sizeof *req); - if (uv_write(req, (uv_stream_t*) &pinger->tcp, &buf, 1, pinger_write_cb)) { - FATAL("uv_write failed"); - } -} - - -static void pinger_shutdown_cb(uv_shutdown_t* req, int status) { - ASSERT(status == 0); - pinger_shutdown_cb_called++; - - /* - * The close callback has not been triggered yet. We must wait for EOF - * until we close the connection. - */ - ASSERT(completed_pingers == 0); -} - - -static void pinger_read_cb(uv_stream_t* tcp, - ssize_t nread, - const uv_buf_t* buf) { - ssize_t i; - pinger_t* pinger; - - pinger = (pinger_t*)tcp->data; - - if (nread < 0) { - ASSERT(nread == UV_EOF); - - if (buf->base) { - buf_free(buf); - } - - ASSERT(pinger_shutdown_cb_called == 1); - uv_close((uv_handle_t*)tcp, pinger_close_cb); - - return; - } - - /* Now we count the pings */ - for (i = 0; i < nread; i++) { - ASSERT(buf->base[i] == PING[pinger->state]); - pinger->state = (pinger->state + 1) % (sizeof(PING) - 1); - if (pinger->state == 0) { - pinger->pongs++; - if (uv_now(loop) - start_time > TIME) { - uv_shutdown(&pinger->shutdown_req, - (uv_stream_t*) tcp, - pinger_shutdown_cb); - break; - } else { - pinger_write_ping(pinger); - } - } - } - - buf_free(buf); -} - - -static void pinger_connect_cb(uv_connect_t* req, int status) { - pinger_t *pinger = (pinger_t*)req->handle->data; - - ASSERT(status == 0); - - pinger_write_ping(pinger); - - if (uv_read_start(req->handle, buf_alloc, pinger_read_cb)) { - FATAL("uv_read_start failed"); - } -} - - -static void pinger_new(void) { - struct sockaddr_in client_addr; - struct sockaddr_in server_addr; - pinger_t *pinger; - int r; - - ASSERT(0 == uv_ip4_addr("0.0.0.0", 0, &client_addr)); - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &server_addr)); - pinger = malloc(sizeof(*pinger)); - pinger->state = 0; - pinger->pongs = 0; - - /* Try to connect to the server and do NUM_PINGS ping-pongs. */ - r = uv_tcp_init(loop, &pinger->tcp); - ASSERT(!r); - - pinger->tcp.data = pinger; - - ASSERT(0 == uv_tcp_bind(&pinger->tcp, - (const struct sockaddr*) &client_addr, - 0)); - - r = uv_tcp_connect(&pinger->connect_req, - &pinger->tcp, - (const struct sockaddr*) &server_addr, - pinger_connect_cb); - ASSERT(!r); -} - - -BENCHMARK_IMPL(ping_pongs) { - loop = uv_default_loop(); - - start_time = uv_now(loop); - - pinger_new(); - uv_run(loop, UV_RUN_DEFAULT); - - ASSERT(completed_pingers == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/benchmark-pound.c b/outside/libuv-v1.7.5/test/benchmark-pound.c deleted file mode 100644 index 79f363450..000000000 --- a/outside/libuv-v1.7.5/test/benchmark-pound.c +++ /dev/null @@ -1,351 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "task.h" -#include "uv.h" - -/* Update this is you're going to run > 1000 concurrent requests. */ -#define MAX_CONNS 1000 - -#undef NANOSEC -#define NANOSEC ((uint64_t) 1e9) - -#undef DEBUG -#define DEBUG 0 - -struct conn_rec_s; - -typedef void (*setup_fn)(int num, void* arg); -typedef void (*make_connect_fn)(struct conn_rec_s* conn); -typedef int (*connect_fn)(int num, make_connect_fn make_connect, void* arg); - -/* Base class for tcp_conn_rec and pipe_conn_rec. - * The ordering of fields matters! - */ -typedef struct conn_rec_s { - int i; - uv_connect_t conn_req; - uv_write_t write_req; - make_connect_fn make_connect; - uv_stream_t stream; -} conn_rec; - -typedef struct { - int i; - uv_connect_t conn_req; - uv_write_t write_req; - make_connect_fn make_connect; - uv_tcp_t stream; -} tcp_conn_rec; - -typedef struct { - int i; - uv_connect_t conn_req; - uv_write_t write_req; - make_connect_fn make_connect; - uv_pipe_t stream; -} pipe_conn_rec; - -static char buffer[] = "QS"; - -static uv_loop_t* loop; - -static tcp_conn_rec tcp_conns[MAX_CONNS]; -static pipe_conn_rec pipe_conns[MAX_CONNS]; - -static uint64_t start; /* in ms */ -static int closed_streams; -static int conns_failed; - -static void alloc_cb(uv_handle_t* handle, size_t suggested_size, uv_buf_t* buf); -static void connect_cb(uv_connect_t* conn_req, int status); -static void read_cb(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf); -static void close_cb(uv_handle_t* handle); - - -static void alloc_cb(uv_handle_t* handle, - size_t suggested_size, - uv_buf_t* buf) { - static char slab[65536]; - buf->base = slab; - buf->len = sizeof(slab); -} - - -static void after_write(uv_write_t* req, int status) { - if (status != 0) { - fprintf(stderr, "write error %s\n", uv_err_name(status)); - uv_close((uv_handle_t*)req->handle, close_cb); - conns_failed++; - return; - } -} - - -static void connect_cb(uv_connect_t* req, int status) { - conn_rec* conn; - uv_buf_t buf; - int r; - - if (status != 0) { -#if DEBUG - fprintf(stderr, "connect error %s\n", uv_err_name(status)); -#endif - uv_close((uv_handle_t*)req->handle, close_cb); - conns_failed++; - return; - } - - ASSERT(req != NULL); - ASSERT(status == 0); - - conn = (conn_rec*)req->data; - ASSERT(conn != NULL); - -#if DEBUG - printf("connect_cb %d\n", conn->i); -#endif - - r = uv_read_start(&conn->stream, alloc_cb, read_cb); - ASSERT(r == 0); - - buf.base = buffer; - buf.len = sizeof(buffer) - 1; - - r = uv_write(&conn->write_req, &conn->stream, &buf, 1, after_write); - ASSERT(r == 0); -} - - -static void read_cb(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf) { - - ASSERT(stream != NULL); - -#if DEBUG - printf("read_cb %d\n", p->i); -#endif - - uv_close((uv_handle_t*)stream, close_cb); - - if (nread < 0) { - if (nread == UV_EOF) { - ; - } else if (nread == UV_ECONNRESET) { - conns_failed++; - } else { - fprintf(stderr, "read error %s\n", uv_err_name(nread)); - ASSERT(0); - } - } -} - - -static void close_cb(uv_handle_t* handle) { - conn_rec* p = (conn_rec*)handle->data; - - ASSERT(handle != NULL); - closed_streams++; - -#if DEBUG - printf("close_cb %d\n", p->i); -#endif - - if (uv_now(loop) - start < 10000) { - p->make_connect(p); - } -} - - -static void tcp_do_setup(int num, void* arg) { - int i; - - for (i = 0; i < num; i++) { - tcp_conns[i].i = i; - } -} - - -static void pipe_do_setup(int num, void* arg) { - int i; - - for (i = 0; i < num; i++) { - pipe_conns[i].i = i; - } -} - - -static void tcp_make_connect(conn_rec* p) { - struct sockaddr_in addr; - tcp_conn_rec* tp; - int r; - - tp = (tcp_conn_rec*) p; - - r = uv_tcp_init(loop, (uv_tcp_t*)&p->stream); - ASSERT(r == 0); - - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - - r = uv_tcp_connect(&tp->conn_req, - (uv_tcp_t*) &p->stream, - (const struct sockaddr*) &addr, - connect_cb); - if (r) { - fprintf(stderr, "uv_tcp_connect error %s\n", uv_err_name(r)); - ASSERT(0); - } - -#if DEBUG - printf("make connect %d\n", p->i); -#endif - - p->conn_req.data = p; - p->write_req.data = p; - p->stream.data = p; -} - - -static void pipe_make_connect(conn_rec* p) { - int r; - - r = uv_pipe_init(loop, (uv_pipe_t*)&p->stream, 0); - ASSERT(r == 0); - - uv_pipe_connect(&((pipe_conn_rec*) p)->conn_req, - (uv_pipe_t*) &p->stream, - TEST_PIPENAME, - connect_cb); - -#if DEBUG - printf("make connect %d\n", p->i); -#endif - - p->conn_req.data = p; - p->write_req.data = p; - p->stream.data = p; -} - - -static int tcp_do_connect(int num, make_connect_fn make_connect, void* arg) { - int i; - - for (i = 0; i < num; i++) { - tcp_make_connect((conn_rec*)&tcp_conns[i]); - tcp_conns[i].make_connect = make_connect; - } - - return 0; -} - - -static int pipe_do_connect(int num, make_connect_fn make_connect, void* arg) { - int i; - - for (i = 0; i < num; i++) { - pipe_make_connect((conn_rec*)&pipe_conns[i]); - pipe_conns[i].make_connect = make_connect; - } - - return 0; -} - - -static int pound_it(int concurrency, - const char* type, - setup_fn do_setup, - connect_fn do_connect, - make_connect_fn make_connect, - void* arg) { - double secs; - int r; - uint64_t start_time; /* in ns */ - uint64_t end_time; - - loop = uv_default_loop(); - - uv_update_time(loop); - start = uv_now(loop); - - /* Run benchmark for at least five seconds. */ - start_time = uv_hrtime(); - - do_setup(concurrency, arg); - - r = do_connect(concurrency, make_connect, arg); - ASSERT(!r); - - uv_run(loop, UV_RUN_DEFAULT); - - end_time = uv_hrtime(); - - /* Number of fractional seconds it took to run the benchmark. */ - secs = (double)(end_time - start_time) / NANOSEC; - - fprintf(stderr, "%s-conn-pound-%d: %.0f accepts/s (%d failed)\n", - type, - concurrency, - closed_streams / secs, - conns_failed); - fflush(stderr); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -BENCHMARK_IMPL(tcp4_pound_100) { - return pound_it(100, - "tcp", - tcp_do_setup, - tcp_do_connect, - tcp_make_connect, - NULL); -} - - -BENCHMARK_IMPL(tcp4_pound_1000) { - return pound_it(1000, - "tcp", - tcp_do_setup, - tcp_do_connect, - tcp_make_connect, - NULL); -} - - -BENCHMARK_IMPL(pipe_pound_100) { - return pound_it(100, - "pipe", - pipe_do_setup, - pipe_do_connect, - pipe_make_connect, - NULL); -} - - -BENCHMARK_IMPL(pipe_pound_1000) { - return pound_it(1000, - "pipe", - pipe_do_setup, - pipe_do_connect, - pipe_make_connect, - NULL); -} diff --git a/outside/libuv-v1.7.5/test/benchmark-pump.c b/outside/libuv-v1.7.5/test/benchmark-pump.c deleted file mode 100644 index 88f2dc5c6..000000000 --- a/outside/libuv-v1.7.5/test/benchmark-pump.c +++ /dev/null @@ -1,476 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "task.h" -#include "uv.h" - -#include -#include - - -static int TARGET_CONNECTIONS; -#define WRITE_BUFFER_SIZE 8192 -#define MAX_SIMULTANEOUS_CONNECTS 100 - -#define PRINT_STATS 0 -#define STATS_INTERVAL 1000 /* msec */ -#define STATS_COUNT 5 - - -static void do_write(uv_stream_t*); -static void maybe_connect_some(); - -static uv_req_t* req_alloc(); -static void req_free(uv_req_t* uv_req); - -static void buf_alloc(uv_handle_t* handle, size_t size, uv_buf_t* buf); -static void buf_free(const uv_buf_t* buf); - -static uv_loop_t* loop; - -static uv_tcp_t tcpServer; -static uv_pipe_t pipeServer; -static uv_stream_t* server; -static struct sockaddr_in listen_addr; -static struct sockaddr_in connect_addr; - -static int64_t start_time; - -static int max_connect_socket = 0; -static int max_read_sockets = 0; -static int read_sockets = 0; -static int write_sockets = 0; - -static int64_t nrecv = 0; -static int64_t nrecv_total = 0; -static int64_t nsent = 0; -static int64_t nsent_total = 0; - -static int stats_left = 0; - -static char write_buffer[WRITE_BUFFER_SIZE]; - -/* Make this as large as you need. */ -#define MAX_WRITE_HANDLES 1000 - -static stream_type type; - -static uv_tcp_t tcp_write_handles[MAX_WRITE_HANDLES]; -static uv_pipe_t pipe_write_handles[MAX_WRITE_HANDLES]; - -static uv_timer_t timer_handle; - - -static double gbit(int64_t bytes, int64_t passed_ms) { - double gbits = ((double)bytes / (1024 * 1024 * 1024)) * 8; - return gbits / ((double)passed_ms / 1000); -} - - -static void show_stats(uv_timer_t* handle) { - int64_t diff; - int i; - -#if PRINT_STATS - fprintf(stderr, "connections: %d, write: %.1f gbit/s\n", - write_sockets, - gbit(nsent, STATS_INTERVAL)); - fflush(stderr); -#endif - - /* Exit if the show is over */ - if (!--stats_left) { - - uv_update_time(loop); - diff = uv_now(loop) - start_time; - - fprintf(stderr, "%s_pump%d_client: %.1f gbit/s\n", - type == TCP ? "tcp" : "pipe", - write_sockets, - gbit(nsent_total, diff)); - fflush(stderr); - - for (i = 0; i < write_sockets; i++) { - if (type == TCP) - uv_close((uv_handle_t*) &tcp_write_handles[i], NULL); - else - uv_close((uv_handle_t*) &pipe_write_handles[i], NULL); - } - - exit(0); - } - - /* Reset read and write counters */ - nrecv = 0; - nsent = 0; -} - - -static void read_show_stats(void) { - int64_t diff; - - uv_update_time(loop); - diff = uv_now(loop) - start_time; - - fprintf(stderr, "%s_pump%d_server: %.1f gbit/s\n", - type == TCP ? "tcp" : "pipe", - max_read_sockets, - gbit(nrecv_total, diff)); - fflush(stderr); -} - - - -static void read_sockets_close_cb(uv_handle_t* handle) { - free(handle); - read_sockets--; - - /* If it's past the first second and everyone has closed their connection - * Then print stats. - */ - if (uv_now(loop) - start_time > 1000 && read_sockets == 0) { - read_show_stats(); - uv_close((uv_handle_t*)server, NULL); - } -} - - -static void start_stats_collection(void) { - int r; - - /* Show-stats timer */ - stats_left = STATS_COUNT; - r = uv_timer_init(loop, &timer_handle); - ASSERT(r == 0); - r = uv_timer_start(&timer_handle, show_stats, STATS_INTERVAL, STATS_INTERVAL); - ASSERT(r == 0); - - uv_update_time(loop); - start_time = uv_now(loop); -} - - -static void read_cb(uv_stream_t* stream, ssize_t bytes, const uv_buf_t* buf) { - if (nrecv_total == 0) { - ASSERT(start_time == 0); - uv_update_time(loop); - start_time = uv_now(loop); - } - - if (bytes < 0) { - uv_close((uv_handle_t*)stream, read_sockets_close_cb); - return; - } - - buf_free(buf); - - nrecv += bytes; - nrecv_total += bytes; -} - - -static void write_cb(uv_write_t* req, int status) { - ASSERT(status == 0); - - req_free((uv_req_t*) req); - - nsent += sizeof write_buffer; - nsent_total += sizeof write_buffer; - - do_write((uv_stream_t*) req->handle); -} - - -static void do_write(uv_stream_t* stream) { - uv_write_t* req; - uv_buf_t buf; - int r; - - buf.base = (char*) &write_buffer; - buf.len = sizeof write_buffer; - - req = (uv_write_t*) req_alloc(); - r = uv_write(req, stream, &buf, 1, write_cb); - ASSERT(r == 0); -} - - -static void connect_cb(uv_connect_t* req, int status) { - int i; - - if (status) { - fprintf(stderr, "%s", uv_strerror(status)); - fflush(stderr); - } - ASSERT(status == 0); - - write_sockets++; - req_free((uv_req_t*) req); - - maybe_connect_some(); - - if (write_sockets == TARGET_CONNECTIONS) { - start_stats_collection(); - - /* Yay! start writing */ - for (i = 0; i < write_sockets; i++) { - if (type == TCP) - do_write((uv_stream_t*) &tcp_write_handles[i]); - else - do_write((uv_stream_t*) &pipe_write_handles[i]); - } - } -} - - -static void maybe_connect_some(void) { - uv_connect_t* req; - uv_tcp_t* tcp; - uv_pipe_t* pipe; - int r; - - while (max_connect_socket < TARGET_CONNECTIONS && - max_connect_socket < write_sockets + MAX_SIMULTANEOUS_CONNECTS) { - if (type == TCP) { - tcp = &tcp_write_handles[max_connect_socket++]; - - r = uv_tcp_init(loop, tcp); - ASSERT(r == 0); - - req = (uv_connect_t*) req_alloc(); - r = uv_tcp_connect(req, - tcp, - (const struct sockaddr*) &connect_addr, - connect_cb); - ASSERT(r == 0); - } else { - pipe = &pipe_write_handles[max_connect_socket++]; - - r = uv_pipe_init(loop, pipe, 0); - ASSERT(r == 0); - - req = (uv_connect_t*) req_alloc(); - uv_pipe_connect(req, pipe, TEST_PIPENAME, connect_cb); - } - } -} - - -static void connection_cb(uv_stream_t* s, int status) { - uv_stream_t* stream; - int r; - - ASSERT(server == s); - ASSERT(status == 0); - - if (type == TCP) { - stream = (uv_stream_t*)malloc(sizeof(uv_tcp_t)); - r = uv_tcp_init(loop, (uv_tcp_t*)stream); - ASSERT(r == 0); - } else { - stream = (uv_stream_t*)malloc(sizeof(uv_pipe_t)); - r = uv_pipe_init(loop, (uv_pipe_t*)stream, 0); - ASSERT(r == 0); - } - - r = uv_accept(s, stream); - ASSERT(r == 0); - - r = uv_read_start(stream, buf_alloc, read_cb); - ASSERT(r == 0); - - read_sockets++; - max_read_sockets++; -} - - -/* - * Request allocator - */ - -typedef struct req_list_s { - union uv_any_req uv_req; - struct req_list_s* next; -} req_list_t; - - -static req_list_t* req_freelist = NULL; - - -static uv_req_t* req_alloc(void) { - req_list_t* req; - - req = req_freelist; - if (req != NULL) { - req_freelist = req->next; - return (uv_req_t*) req; - } - - req = (req_list_t*) malloc(sizeof *req); - return (uv_req_t*) req; -} - - -static void req_free(uv_req_t* uv_req) { - req_list_t* req = (req_list_t*) uv_req; - - req->next = req_freelist; - req_freelist = req; -} - - -/* - * Buffer allocator - */ - -typedef struct buf_list_s { - uv_buf_t uv_buf_t; - struct buf_list_s* next; -} buf_list_t; - - -static buf_list_t* buf_freelist = NULL; - - -static void buf_alloc(uv_handle_t* handle, size_t size, uv_buf_t* buf) { - buf_list_t* ab; - - ab = buf_freelist; - if (ab != NULL) - buf_freelist = ab->next; - else { - ab = malloc(size + sizeof(*ab)); - ab->uv_buf_t.len = size; - ab->uv_buf_t.base = (char*) (ab + 1); - } - - *buf = ab->uv_buf_t; -} - - -static void buf_free(const uv_buf_t* buf) { - buf_list_t* ab = (buf_list_t*) buf->base - 1; - ab->next = buf_freelist; - buf_freelist = ab; -} - - -HELPER_IMPL(tcp_pump_server) { - int r; - - type = TCP; - loop = uv_default_loop(); - - ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &listen_addr)); - - /* Server */ - server = (uv_stream_t*)&tcpServer; - r = uv_tcp_init(loop, &tcpServer); - ASSERT(r == 0); - r = uv_tcp_bind(&tcpServer, (const struct sockaddr*) &listen_addr, 0); - ASSERT(r == 0); - r = uv_listen((uv_stream_t*)&tcpServer, MAX_WRITE_HANDLES, connection_cb); - ASSERT(r == 0); - - uv_run(loop, UV_RUN_DEFAULT); - - return 0; -} - - -HELPER_IMPL(pipe_pump_server) { - int r; - type = PIPE; - - loop = uv_default_loop(); - - /* Server */ - server = (uv_stream_t*)&pipeServer; - r = uv_pipe_init(loop, &pipeServer, 0); - ASSERT(r == 0); - r = uv_pipe_bind(&pipeServer, TEST_PIPENAME); - ASSERT(r == 0); - r = uv_listen((uv_stream_t*)&pipeServer, MAX_WRITE_HANDLES, connection_cb); - ASSERT(r == 0); - - uv_run(loop, UV_RUN_DEFAULT); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -static void tcp_pump(int n) { - ASSERT(n <= MAX_WRITE_HANDLES); - TARGET_CONNECTIONS = n; - type = TCP; - - loop = uv_default_loop(); - - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &connect_addr)); - - /* Start making connections */ - maybe_connect_some(); - - uv_run(loop, UV_RUN_DEFAULT); - - MAKE_VALGRIND_HAPPY(); -} - - -static void pipe_pump(int n) { - ASSERT(n <= MAX_WRITE_HANDLES); - TARGET_CONNECTIONS = n; - type = PIPE; - - loop = uv_default_loop(); - - /* Start making connections */ - maybe_connect_some(); - - uv_run(loop, UV_RUN_DEFAULT); - - MAKE_VALGRIND_HAPPY(); -} - - -BENCHMARK_IMPL(tcp_pump100_client) { - tcp_pump(100); - return 0; -} - - -BENCHMARK_IMPL(tcp_pump1_client) { - tcp_pump(1); - return 0; -} - - -BENCHMARK_IMPL(pipe_pump100_client) { - pipe_pump(100); - return 0; -} - - -BENCHMARK_IMPL(pipe_pump1_client) { - pipe_pump(1); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/benchmark-sizes.c b/outside/libuv-v1.7.5/test/benchmark-sizes.c deleted file mode 100644 index 9bf42f915..000000000 --- a/outside/libuv-v1.7.5/test/benchmark-sizes.c +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "task.h" -#include "uv.h" - - -BENCHMARK_IMPL(sizes) { - fprintf(stderr, "uv_shutdown_t: %u bytes\n", (unsigned int) sizeof(uv_shutdown_t)); - fprintf(stderr, "uv_write_t: %u bytes\n", (unsigned int) sizeof(uv_write_t)); - fprintf(stderr, "uv_connect_t: %u bytes\n", (unsigned int) sizeof(uv_connect_t)); - fprintf(stderr, "uv_udp_send_t: %u bytes\n", (unsigned int) sizeof(uv_udp_send_t)); - fprintf(stderr, "uv_tcp_t: %u bytes\n", (unsigned int) sizeof(uv_tcp_t)); - fprintf(stderr, "uv_pipe_t: %u bytes\n", (unsigned int) sizeof(uv_pipe_t)); - fprintf(stderr, "uv_tty_t: %u bytes\n", (unsigned int) sizeof(uv_tty_t)); - fprintf(stderr, "uv_prepare_t: %u bytes\n", (unsigned int) sizeof(uv_prepare_t)); - fprintf(stderr, "uv_check_t: %u bytes\n", (unsigned int) sizeof(uv_check_t)); - fprintf(stderr, "uv_idle_t: %u bytes\n", (unsigned int) sizeof(uv_idle_t)); - fprintf(stderr, "uv_async_t: %u bytes\n", (unsigned int) sizeof(uv_async_t)); - fprintf(stderr, "uv_timer_t: %u bytes\n", (unsigned int) sizeof(uv_timer_t)); - fprintf(stderr, "uv_fs_poll_t: %u bytes\n", (unsigned int) sizeof(uv_fs_poll_t)); - fprintf(stderr, "uv_fs_event_t: %u bytes\n", (unsigned int) sizeof(uv_fs_event_t)); - fprintf(stderr, "uv_process_t: %u bytes\n", (unsigned int) sizeof(uv_process_t)); - fprintf(stderr, "uv_poll_t: %u bytes\n", (unsigned int) sizeof(uv_poll_t)); - fprintf(stderr, "uv_loop_t: %u bytes\n", (unsigned int) sizeof(uv_loop_t)); - fflush(stderr); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/benchmark-spawn.c b/outside/libuv-v1.7.5/test/benchmark-spawn.c deleted file mode 100644 index ed9ad608f..000000000 --- a/outside/libuv-v1.7.5/test/benchmark-spawn.c +++ /dev/null @@ -1,164 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -/* This benchmark spawns itself 1000 times. */ - -#include "task.h" -#include "uv.h" - -static uv_loop_t* loop; - -static int N = 1000; -static int done; - -static uv_process_t process; -static uv_process_options_t options; -static char exepath[1024]; -static size_t exepath_size = 1024; -static char* args[3]; -static uv_pipe_t out; - -#define OUTPUT_SIZE 1024 -static char output[OUTPUT_SIZE]; -static int output_used; - -static int process_open; -static int pipe_open; - - -static void spawn(void); - - -static void maybe_spawn(void) { - if (process_open == 0 && pipe_open == 0) { - done++; - if (done < N) { - spawn(); - } - } -} - - -static void process_close_cb(uv_handle_t* handle) { - ASSERT(process_open == 1); - process_open = 0; - maybe_spawn(); -} - - -static void exit_cb(uv_process_t* process, - int64_t exit_status, - int term_signal) { - ASSERT(exit_status == 42); - ASSERT(term_signal == 0); - uv_close((uv_handle_t*)process, process_close_cb); -} - - -static void on_alloc(uv_handle_t* handle, - size_t suggested_size, - uv_buf_t* buf) { - buf->base = output + output_used; - buf->len = OUTPUT_SIZE - output_used; -} - - -static void pipe_close_cb(uv_handle_t* pipe) { - ASSERT(pipe_open == 1); - pipe_open = 0; - maybe_spawn(); -} - - -static void on_read(uv_stream_t* pipe, ssize_t nread, const uv_buf_t* buf) { - if (nread > 0) { - ASSERT(pipe_open == 1); - output_used += nread; - } else if (nread < 0) { - if (nread == UV_EOF) { - uv_close((uv_handle_t*)pipe, pipe_close_cb); - } - } -} - - -static void spawn(void) { - uv_stdio_container_t stdio[2]; - int r; - - ASSERT(process_open == 0); - ASSERT(pipe_open == 0); - - args[0] = exepath; - args[1] = "spawn_helper"; - args[2] = NULL; - options.file = exepath; - options.args = args; - options.exit_cb = exit_cb; - - uv_pipe_init(loop, &out, 0); - - options.stdio = stdio; - options.stdio_count = 2; - options.stdio[0].flags = UV_IGNORE; - options.stdio[1].flags = UV_CREATE_PIPE | UV_WRITABLE_PIPE; - options.stdio[1].data.stream = (uv_stream_t*)&out; - - r = uv_spawn(loop, &process, &options); - ASSERT(r == 0); - - process_open = 1; - pipe_open = 1; - output_used = 0; - - r = uv_read_start((uv_stream_t*) &out, on_alloc, on_read); - ASSERT(r == 0); -} - - -BENCHMARK_IMPL(spawn) { - int r; - static int64_t start_time, end_time; - - loop = uv_default_loop(); - - r = uv_exepath(exepath, &exepath_size); - ASSERT(r == 0); - exepath[exepath_size] = '\0'; - - uv_update_time(loop); - start_time = uv_now(loop); - - spawn(); - - r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT(r == 0); - - uv_update_time(loop); - end_time = uv_now(loop); - - fprintf(stderr, "spawn: %.0f spawns/s\n", - (double) N / (double) (end_time - start_time) * 1000.0); - fflush(stderr); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/benchmark-tcp-write-batch.c b/outside/libuv-v1.7.5/test/benchmark-tcp-write-batch.c deleted file mode 100644 index 96921b70d..000000000 --- a/outside/libuv-v1.7.5/test/benchmark-tcp-write-batch.c +++ /dev/null @@ -1,144 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#include -#include - -#define WRITE_REQ_DATA "Hello, world." -#define NUM_WRITE_REQS (1000 * 1000) - -typedef struct { - uv_write_t req; - uv_buf_t buf; -} write_req; - - -static write_req* write_reqs; -static uv_tcp_t tcp_client; -static uv_connect_t connect_req; -static uv_shutdown_t shutdown_req; - -static int shutdown_cb_called = 0; -static int connect_cb_called = 0; -static int write_cb_called = 0; -static int close_cb_called = 0; - -static void connect_cb(uv_connect_t* req, int status); -static void write_cb(uv_write_t* req, int status); -static void shutdown_cb(uv_shutdown_t* req, int status); -static void close_cb(uv_handle_t* handle); - - -static void connect_cb(uv_connect_t* req, int status) { - write_req* w; - int i; - int r; - - ASSERT(req->handle == (uv_stream_t*)&tcp_client); - - for (i = 0; i < NUM_WRITE_REQS; i++) { - w = &write_reqs[i]; - r = uv_write(&w->req, req->handle, &w->buf, 1, write_cb); - ASSERT(r == 0); - } - - r = uv_shutdown(&shutdown_req, req->handle, shutdown_cb); - ASSERT(r == 0); - - connect_cb_called++; -} - - -static void write_cb(uv_write_t* req, int status) { - ASSERT(req != NULL); - ASSERT(status == 0); - write_cb_called++; -} - - -static void shutdown_cb(uv_shutdown_t* req, int status) { - ASSERT(req->handle == (uv_stream_t*)&tcp_client); - ASSERT(req->handle->write_queue_size == 0); - - uv_close((uv_handle_t*)req->handle, close_cb); - free(write_reqs); - - shutdown_cb_called++; -} - - -static void close_cb(uv_handle_t* handle) { - ASSERT(handle == (uv_handle_t*)&tcp_client); - close_cb_called++; -} - - -BENCHMARK_IMPL(tcp_write_batch) { - struct sockaddr_in addr; - uv_loop_t* loop; - uint64_t start; - uint64_t stop; - int i; - int r; - - write_reqs = malloc(sizeof(*write_reqs) * NUM_WRITE_REQS); - ASSERT(write_reqs != NULL); - - /* Prepare the data to write out. */ - for (i = 0; i < NUM_WRITE_REQS; i++) { - write_reqs[i].buf = uv_buf_init(WRITE_REQ_DATA, - sizeof(WRITE_REQ_DATA) - 1); - } - - loop = uv_default_loop(); - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - - r = uv_tcp_init(loop, &tcp_client); - ASSERT(r == 0); - - r = uv_tcp_connect(&connect_req, - &tcp_client, - (const struct sockaddr*) &addr, - connect_cb); - ASSERT(r == 0); - - start = uv_hrtime(); - - r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT(r == 0); - - stop = uv_hrtime(); - - ASSERT(connect_cb_called == 1); - ASSERT(write_cb_called == NUM_WRITE_REQS); - ASSERT(shutdown_cb_called == 1); - ASSERT(close_cb_called == 1); - - printf("%ld write requests in %.2fs.\n", - (long)NUM_WRITE_REQS, - (stop - start) / 1e9); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/benchmark-thread.c b/outside/libuv-v1.7.5/test/benchmark-thread.c deleted file mode 100644 index b37a7fd6d..000000000 --- a/outside/libuv-v1.7.5/test/benchmark-thread.c +++ /dev/null @@ -1,64 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#include -#include - -#define NUM_THREADS (20 * 1000) - -static volatile int num_threads; - - -static void thread_entry(void* arg) { - ASSERT(arg == (void *) 42); - num_threads++; - /* FIXME write barrier? */ -} - - -BENCHMARK_IMPL(thread_create) { - uint64_t start_time; - double duration; - uv_thread_t tid; - int i, r; - - start_time = uv_hrtime(); - - for (i = 0; i < NUM_THREADS; i++) { - r = uv_thread_create(&tid, thread_entry, (void *) 42); - ASSERT(r == 0); - - r = uv_thread_join(&tid); - ASSERT(r == 0); - } - - duration = (uv_hrtime() - start_time) / 1e9; - - ASSERT(num_threads == NUM_THREADS); - - printf("%d threads created in %.2f seconds (%.0f/s)\n", - NUM_THREADS, duration, NUM_THREADS / duration); - - return 0; -} diff --git a/outside/libuv-v1.7.5/test/benchmark-udp-pummel.c b/outside/libuv-v1.7.5/test/benchmark-udp-pummel.c deleted file mode 100644 index 68a2373d7..000000000 --- a/outside/libuv-v1.7.5/test/benchmark-udp-pummel.c +++ /dev/null @@ -1,243 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "task.h" -#include "uv.h" - -#include -#include -#include - -#define EXPECTED "RANG TANG DING DONG I AM THE JAPANESE SANDMAN" - -#define TEST_DURATION 5000 /* ms */ - -#define BASE_PORT 12345 - -struct sender_state { - struct sockaddr_in addr; - uv_udp_send_t send_req; - uv_udp_t udp_handle; -}; - -struct receiver_state { - struct sockaddr_in addr; - uv_udp_t udp_handle; -}; - -/* not used in timed mode */ -static unsigned int packet_counter = (unsigned int) 1e6; - -static int n_senders_; -static int n_receivers_; -static uv_buf_t bufs[5]; -static struct sender_state senders[1024]; -static struct receiver_state receivers[1024]; - -static unsigned int send_cb_called; -static unsigned int recv_cb_called; -static unsigned int close_cb_called; -static int timed; -static int exiting; - - -static void alloc_cb(uv_handle_t* handle, - size_t suggested_size, - uv_buf_t* buf) { - static char slab[65536]; - ASSERT(suggested_size <= sizeof(slab)); - buf->base = slab; - buf->len = sizeof(slab); -} - - -static void send_cb(uv_udp_send_t* req, int status) { - struct sender_state* s; - - ASSERT(req != NULL); - - if (status != 0) { - ASSERT(status == UV_ECANCELED); - return; - } - - if (exiting) - return; - - s = container_of(req, struct sender_state, send_req); - ASSERT(req->handle == &s->udp_handle); - - if (timed) - goto send; - - if (packet_counter == 0) { - uv_close((uv_handle_t*)&s->udp_handle, NULL); - return; - } - - packet_counter--; - -send: - ASSERT(0 == uv_udp_send(&s->send_req, - &s->udp_handle, - bufs, - ARRAY_SIZE(bufs), - (const struct sockaddr*) &s->addr, - send_cb)); - send_cb_called++; -} - - -static void recv_cb(uv_udp_t* handle, - ssize_t nread, - const uv_buf_t* buf, - const struct sockaddr* addr, - unsigned flags) { - if (nread == 0) - return; - - if (nread < 0) { - ASSERT(nread == UV_ECANCELED); - return; - } - - ASSERT(addr->sa_family == AF_INET); - ASSERT(!memcmp(buf->base, EXPECTED, nread)); - - recv_cb_called++; -} - - -static void close_cb(uv_handle_t* handle) { - ASSERT(handle != NULL); - close_cb_called++; -} - - -static void timeout_cb(uv_timer_t* timer) { - int i; - - exiting = 1; - - for (i = 0; i < n_senders_; i++) - uv_close((uv_handle_t*)&senders[i].udp_handle, close_cb); - - for (i = 0; i < n_receivers_; i++) - uv_close((uv_handle_t*)&receivers[i].udp_handle, close_cb); -} - - -static int pummel(unsigned int n_senders, - unsigned int n_receivers, - unsigned long timeout) { - uv_timer_t timer_handle; - uint64_t duration; - uv_loop_t* loop; - unsigned int i; - - ASSERT(n_senders <= ARRAY_SIZE(senders)); - ASSERT(n_receivers <= ARRAY_SIZE(receivers)); - - loop = uv_default_loop(); - - n_senders_ = n_senders; - n_receivers_ = n_receivers; - - if (timeout) { - ASSERT(0 == uv_timer_init(loop, &timer_handle)); - ASSERT(0 == uv_timer_start(&timer_handle, timeout_cb, timeout, 0)); - /* Timer should not keep loop alive. */ - uv_unref((uv_handle_t*)&timer_handle); - timed = 1; - } - - for (i = 0; i < n_receivers; i++) { - struct receiver_state* s = receivers + i; - struct sockaddr_in addr; - ASSERT(0 == uv_ip4_addr("0.0.0.0", BASE_PORT + i, &addr)); - ASSERT(0 == uv_udp_init(loop, &s->udp_handle)); - ASSERT(0 == uv_udp_bind(&s->udp_handle, (const struct sockaddr*) &addr, 0)); - ASSERT(0 == uv_udp_recv_start(&s->udp_handle, alloc_cb, recv_cb)); - uv_unref((uv_handle_t*)&s->udp_handle); - } - - bufs[0] = uv_buf_init(EXPECTED + 0, 10); - bufs[1] = uv_buf_init(EXPECTED + 10, 10); - bufs[2] = uv_buf_init(EXPECTED + 20, 10); - bufs[3] = uv_buf_init(EXPECTED + 30, 10); - bufs[4] = uv_buf_init(EXPECTED + 40, 5); - - for (i = 0; i < n_senders; i++) { - struct sender_state* s = senders + i; - ASSERT(0 == uv_ip4_addr("127.0.0.1", - BASE_PORT + (i % n_receivers), - &s->addr)); - ASSERT(0 == uv_udp_init(loop, &s->udp_handle)); - ASSERT(0 == uv_udp_send(&s->send_req, - &s->udp_handle, - bufs, - ARRAY_SIZE(bufs), - (const struct sockaddr*) &s->addr, - send_cb)); - } - - duration = uv_hrtime(); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - duration = uv_hrtime() - duration; - /* convert from nanoseconds to milliseconds */ - duration = duration / (uint64_t) 1e6; - - printf("udp_pummel_%dv%d: %.0f/s received, %.0f/s sent. " - "%u received, %u sent in %.1f seconds.\n", - n_receivers, - n_senders, - recv_cb_called / (duration / 1000.0), - send_cb_called / (duration / 1000.0), - recv_cb_called, - send_cb_called, - duration / 1000.0); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -#define X(a, b) \ - BENCHMARK_IMPL(udp_pummel_##a##v##b) { \ - return pummel(a, b, 0); \ - } \ - BENCHMARK_IMPL(udp_timed_pummel_##a##v##b) { \ - return pummel(a, b, TEST_DURATION); \ - } - -X(1, 1) -X(1, 10) -X(1, 100) -X(1, 1000) -X(10, 10) -X(10, 100) -X(10, 1000) -X(100, 10) -X(100, 100) -X(100, 1000) -X(1000, 1000) - -#undef X diff --git a/outside/libuv-v1.7.5/test/blackhole-server.c b/outside/libuv-v1.7.5/test/blackhole-server.c deleted file mode 100644 index ad878b35c..000000000 --- a/outside/libuv-v1.7.5/test/blackhole-server.c +++ /dev/null @@ -1,121 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#include -#include - -typedef struct { - uv_tcp_t handle; - uv_shutdown_t shutdown_req; -} conn_rec; - -static uv_tcp_t tcp_server; - -static void connection_cb(uv_stream_t* stream, int status); -static void alloc_cb(uv_handle_t* handle, size_t suggested_size, uv_buf_t* buf); -static void read_cb(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf); -static void shutdown_cb(uv_shutdown_t* req, int status); -static void close_cb(uv_handle_t* handle); - - -static void connection_cb(uv_stream_t* stream, int status) { - conn_rec* conn; - int r; - - ASSERT(status == 0); - ASSERT(stream == (uv_stream_t*)&tcp_server); - - conn = malloc(sizeof *conn); - ASSERT(conn != NULL); - - r = uv_tcp_init(stream->loop, &conn->handle); - ASSERT(r == 0); - - r = uv_accept(stream, (uv_stream_t*)&conn->handle); - ASSERT(r == 0); - - r = uv_read_start((uv_stream_t*)&conn->handle, alloc_cb, read_cb); - ASSERT(r == 0); -} - - -static void alloc_cb(uv_handle_t* handle, - size_t suggested_size, - uv_buf_t* buf) { - static char slab[65536]; - buf->base = slab; - buf->len = sizeof(slab); -} - - -static void read_cb(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf) { - conn_rec* conn; - int r; - - if (nread >= 0) - return; - - ASSERT(nread == UV_EOF); - - conn = container_of(stream, conn_rec, handle); - - r = uv_shutdown(&conn->shutdown_req, stream, shutdown_cb); - ASSERT(r == 0); -} - - -static void shutdown_cb(uv_shutdown_t* req, int status) { - conn_rec* conn = container_of(req, conn_rec, shutdown_req); - uv_close((uv_handle_t*)&conn->handle, close_cb); -} - - -static void close_cb(uv_handle_t* handle) { - conn_rec* conn = container_of(handle, conn_rec, handle); - free(conn); -} - - -HELPER_IMPL(tcp4_blackhole_server) { - struct sockaddr_in addr; - uv_loop_t* loop; - int r; - - loop = uv_default_loop(); - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - - r = uv_tcp_init(loop, &tcp_server); - ASSERT(r == 0); - - r = uv_tcp_bind(&tcp_server, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); - - r = uv_listen((uv_stream_t*)&tcp_server, 128, connection_cb); - ASSERT(r == 0); - - r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT(0 && "Blackhole server dropped out of event loop."); - - return 0; -} diff --git a/outside/libuv-v1.7.5/test/dns-server.c b/outside/libuv-v1.7.5/test/dns-server.c deleted file mode 100644 index 80052c703..000000000 --- a/outside/libuv-v1.7.5/test/dns-server.c +++ /dev/null @@ -1,340 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" -#include -#include -#include - - -typedef struct { - uv_write_t req; - uv_buf_t buf; -} write_req_t; - - -/* used to track multiple DNS requests received */ -typedef struct { - char* prevbuf_ptr; - int prevbuf_pos; - int prevbuf_rem; -} dnsstate; - - -/* modify handle to append dnsstate */ -typedef struct { - uv_tcp_t handle; - dnsstate state; -} dnshandle; - - -static uv_loop_t* loop; - - -static uv_tcp_t server; - - -static void after_write(uv_write_t* req, int status); -static void after_read(uv_stream_t*, ssize_t nread, const uv_buf_t* buf); -static void on_close(uv_handle_t* peer); -static void on_connection(uv_stream_t*, int status); - -#define WRITE_BUF_LEN (64*1024) -#define DNSREC_LEN (4) - -#define LEN_OFFSET 0 -#define QUERYID_OFFSET 2 - -static unsigned char DNSRsp[] = { - 0, 43, 0, 0, 0x81, 0x80, 0, 1, 0, 1, 0, 0, 0, 0 -}; - -static unsigned char qrecord[] = { - 5, 'e', 'c', 'h', 'o', 's', 3, 's', 'r', 'v', 0, 0, 1, 0, 1 -}; - -static unsigned char arecord[] = { - 0xc0, 0x0c, 0, 1, 0, 1, 0, 0, 5, 0xbd, 0, 4, 10, 0, 1, 1 -}; - - -static void after_write(uv_write_t* req, int status) { - write_req_t* wr; - - if (status) { - fprintf(stderr, "uv_write error: %s\n", uv_strerror(status)); - ASSERT(0); - } - - wr = (write_req_t*) req; - - /* Free the read/write buffer and the request */ - free(wr->buf.base); - free(wr); -} - - -static void after_shutdown(uv_shutdown_t* req, int status) { - uv_close((uv_handle_t*) req->handle, on_close); - free(req); -} - - -static void addrsp(write_req_t* wr, char* hdr) { - char * dnsrsp; - short int rsplen; - short int* reclen; - - rsplen = sizeof(DNSRsp) + sizeof(qrecord) + sizeof(arecord); - - ASSERT (rsplen + wr->buf.len < WRITE_BUF_LEN); - - dnsrsp = wr->buf.base + wr->buf.len; - - /* copy stock response */ - memcpy(dnsrsp, DNSRsp, sizeof(DNSRsp)); - memcpy(dnsrsp + sizeof(DNSRsp), qrecord, sizeof(qrecord)); - memcpy(dnsrsp + sizeof(DNSRsp) + sizeof(qrecord), arecord, sizeof(arecord)); - - /* overwrite with network order length and id from request header */ - reclen = (short int*)dnsrsp; - *reclen = htons(rsplen-2); - dnsrsp[QUERYID_OFFSET] = hdr[QUERYID_OFFSET]; - dnsrsp[QUERYID_OFFSET+1] = hdr[QUERYID_OFFSET+1]; - - wr->buf.len += rsplen; -} - -static void process_req(uv_stream_t* handle, - ssize_t nread, - const uv_buf_t* buf) { - write_req_t* wr; - dnshandle* dns = (dnshandle*)handle; - char hdrbuf[DNSREC_LEN]; - int hdrbuf_remaining = DNSREC_LEN; - int rec_remaining = 0; - int readbuf_remaining; - char* dnsreq; - char* hdrstart; - int usingprev = 0; - - wr = (write_req_t*) malloc(sizeof *wr); - wr->buf.base = (char*)malloc(WRITE_BUF_LEN); - wr->buf.len = 0; - - if (dns->state.prevbuf_ptr != NULL) { - dnsreq = dns->state.prevbuf_ptr + dns->state.prevbuf_pos; - readbuf_remaining = dns->state.prevbuf_rem; - usingprev = 1; - } else { - dnsreq = buf->base; - readbuf_remaining = nread; - } - hdrstart = dnsreq; - - while (dnsreq != NULL) { - /* something to process */ - while (readbuf_remaining > 0) { - /* something to process in current buffer */ - if (hdrbuf_remaining > 0) { - /* process len and id */ - if (readbuf_remaining < hdrbuf_remaining) { - /* too little to get request header. save for next buffer */ - memcpy(&hdrbuf[DNSREC_LEN - hdrbuf_remaining], - dnsreq, - readbuf_remaining); - hdrbuf_remaining = DNSREC_LEN - readbuf_remaining; - break; - } else { - /* save header */ - memcpy(&hdrbuf[DNSREC_LEN - hdrbuf_remaining], - dnsreq, - hdrbuf_remaining); - dnsreq += hdrbuf_remaining; - readbuf_remaining -= hdrbuf_remaining; - hdrbuf_remaining = 0; - - /* get record length */ - rec_remaining = (unsigned) hdrbuf[0] * 256 + (unsigned) hdrbuf[1]; - rec_remaining -= (DNSREC_LEN - 2); - } - } - - if (rec_remaining <= readbuf_remaining) { - /* prepare reply */ - addrsp(wr, hdrbuf); - - /* move to next record */ - dnsreq += rec_remaining; - hdrstart = dnsreq; - readbuf_remaining -= rec_remaining; - rec_remaining = 0; - hdrbuf_remaining = DNSREC_LEN; - } else { - /* otherwise this buffer is done. */ - rec_remaining -= readbuf_remaining; - break; - } - } - - /* If we had to use bytes from prev buffer, start processing the current - * one. - */ - if (usingprev == 1) { - /* free previous buffer */ - free(dns->state.prevbuf_ptr); - dnsreq = buf->base; - readbuf_remaining = nread; - usingprev = 0; - } else { - dnsreq = NULL; - } - } - - /* send write buffer */ - if (wr->buf.len > 0) { - if (uv_write((uv_write_t*) &wr->req, handle, &wr->buf, 1, after_write)) { - FATAL("uv_write failed"); - } - } - - if (readbuf_remaining > 0) { - /* save start of record position, so we can continue on next read */ - dns->state.prevbuf_ptr = buf->base; - dns->state.prevbuf_pos = hdrstart - buf->base; - dns->state.prevbuf_rem = nread - dns->state.prevbuf_pos; - } else { - /* nothing left in this buffer */ - dns->state.prevbuf_ptr = NULL; - dns->state.prevbuf_pos = 0; - dns->state.prevbuf_rem = 0; - free(buf->base); - } -} - -static void after_read(uv_stream_t* handle, - ssize_t nread, - const uv_buf_t* buf) { - uv_shutdown_t* req; - - if (nread < 0) { - /* Error or EOF */ - ASSERT(nread == UV_EOF); - - if (buf->base) { - free(buf->base); - } - - req = malloc(sizeof *req); - uv_shutdown(req, handle, after_shutdown); - - return; - } - - if (nread == 0) { - /* Everything OK, but nothing read. */ - free(buf->base); - return; - } - /* process requests and send responses */ - process_req(handle, nread, buf); -} - - -static void on_close(uv_handle_t* peer) { - free(peer); -} - - -static void buf_alloc(uv_handle_t* handle, - size_t suggested_size, - uv_buf_t* buf) { - buf->base = malloc(suggested_size); - buf->len = suggested_size; -} - - -static void on_connection(uv_stream_t* server, int status) { - dnshandle* handle; - int r; - - ASSERT(status == 0); - - handle = (dnshandle*) malloc(sizeof *handle); - ASSERT(handle != NULL); - - /* initialize read buffer state */ - handle->state.prevbuf_ptr = 0; - handle->state.prevbuf_pos = 0; - handle->state.prevbuf_rem = 0; - - r = uv_tcp_init(loop, (uv_tcp_t*)handle); - ASSERT(r == 0); - - r = uv_accept(server, (uv_stream_t*)handle); - ASSERT(r == 0); - - r = uv_read_start((uv_stream_t*)handle, buf_alloc, after_read); - ASSERT(r == 0); -} - - -static int dns_start(int port) { - struct sockaddr_in addr; - int r; - - ASSERT(0 == uv_ip4_addr("0.0.0.0", port, &addr)); - - r = uv_tcp_init(loop, &server); - if (r) { - /* TODO: Error codes */ - fprintf(stderr, "Socket creation error\n"); - return 1; - } - - r = uv_tcp_bind(&server, (const struct sockaddr*) &addr, 0); - if (r) { - /* TODO: Error codes */ - fprintf(stderr, "Bind error\n"); - return 1; - } - - r = uv_listen((uv_stream_t*)&server, 128, on_connection); - if (r) { - /* TODO: Error codes */ - fprintf(stderr, "Listen error\n"); - return 1; - } - - return 0; -} - - -HELPER_IMPL(dns_server) { - loop = uv_default_loop(); - - if (dns_start(TEST_PORT_2)) - return 1; - - uv_run(loop, UV_RUN_DEFAULT); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/echo-server.c b/outside/libuv-v1.7.5/test/echo-server.c deleted file mode 100644 index bfed67675..000000000 --- a/outside/libuv-v1.7.5/test/echo-server.c +++ /dev/null @@ -1,378 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" -#include -#include - -typedef struct { - uv_write_t req; - uv_buf_t buf; -} write_req_t; - -static uv_loop_t* loop; - -static int server_closed; -static stream_type serverType; -static uv_tcp_t tcpServer; -static uv_udp_t udpServer; -static uv_pipe_t pipeServer; -static uv_handle_t* server; - -static void after_write(uv_write_t* req, int status); -static void after_read(uv_stream_t*, ssize_t nread, const uv_buf_t* buf); -static void on_close(uv_handle_t* peer); -static void on_server_close(uv_handle_t* handle); -static void on_connection(uv_stream_t*, int status); - - -static void after_write(uv_write_t* req, int status) { - write_req_t* wr; - - /* Free the read/write buffer and the request */ - wr = (write_req_t*) req; - free(wr->buf.base); - free(wr); - - if (status == 0) - return; - - fprintf(stderr, - "uv_write error: %s - %s\n", - uv_err_name(status), - uv_strerror(status)); -} - - -static void after_shutdown(uv_shutdown_t* req, int status) { - uv_close((uv_handle_t*) req->handle, on_close); - free(req); -} - - -static void after_read(uv_stream_t* handle, - ssize_t nread, - const uv_buf_t* buf) { - int i; - write_req_t *wr; - uv_shutdown_t* sreq; - - if (nread < 0) { - /* Error or EOF */ - ASSERT(nread == UV_EOF); - - free(buf->base); - sreq = malloc(sizeof* sreq); - ASSERT(0 == uv_shutdown(sreq, handle, after_shutdown)); - return; - } - - if (nread == 0) { - /* Everything OK, but nothing read. */ - free(buf->base); - return; - } - - /* - * Scan for the letter Q which signals that we should quit the server. - * If we get QS it means close the stream. - */ - if (!server_closed) { - for (i = 0; i < nread; i++) { - if (buf->base[i] == 'Q') { - if (i + 1 < nread && buf->base[i + 1] == 'S') { - free(buf->base); - uv_close((uv_handle_t*)handle, on_close); - return; - } else { - uv_close(server, on_server_close); - server_closed = 1; - } - } - } - } - - wr = (write_req_t*) malloc(sizeof *wr); - ASSERT(wr != NULL); - wr->buf = uv_buf_init(buf->base, nread); - - if (uv_write(&wr->req, handle, &wr->buf, 1, after_write)) { - FATAL("uv_write failed"); - } -} - - -static void on_close(uv_handle_t* peer) { - free(peer); -} - - -static void echo_alloc(uv_handle_t* handle, - size_t suggested_size, - uv_buf_t* buf) { - buf->base = malloc(suggested_size); - buf->len = suggested_size; -} - - -static void on_connection(uv_stream_t* server, int status) { - uv_stream_t* stream; - int r; - - if (status != 0) { - fprintf(stderr, "Connect error %s\n", uv_err_name(status)); - } - ASSERT(status == 0); - - switch (serverType) { - case TCP: - stream = malloc(sizeof(uv_tcp_t)); - ASSERT(stream != NULL); - r = uv_tcp_init(loop, (uv_tcp_t*)stream); - ASSERT(r == 0); - break; - - case PIPE: - stream = malloc(sizeof(uv_pipe_t)); - ASSERT(stream != NULL); - r = uv_pipe_init(loop, (uv_pipe_t*)stream, 0); - ASSERT(r == 0); - break; - - default: - ASSERT(0 && "Bad serverType"); - abort(); - } - - /* associate server with stream */ - stream->data = server; - - r = uv_accept(server, stream); - ASSERT(r == 0); - - r = uv_read_start(stream, echo_alloc, after_read); - ASSERT(r == 0); -} - - -static void on_server_close(uv_handle_t* handle) { - ASSERT(handle == server); -} - - -static void on_send(uv_udp_send_t* req, int status); - - -static void on_recv(uv_udp_t* handle, - ssize_t nread, - const uv_buf_t* rcvbuf, - const struct sockaddr* addr, - unsigned flags) { - uv_udp_send_t* req; - uv_buf_t sndbuf; - - ASSERT(nread > 0); - ASSERT(addr->sa_family == AF_INET); - - req = malloc(sizeof(*req)); - ASSERT(req != NULL); - - sndbuf = *rcvbuf; - ASSERT(0 == uv_udp_send(req, handle, &sndbuf, 1, addr, on_send)); -} - - -static void on_send(uv_udp_send_t* req, int status) { - ASSERT(status == 0); - free(req); -} - - -static int tcp4_echo_start(int port) { - struct sockaddr_in addr; - int r; - - ASSERT(0 == uv_ip4_addr("0.0.0.0", port, &addr)); - - server = (uv_handle_t*)&tcpServer; - serverType = TCP; - - r = uv_tcp_init(loop, &tcpServer); - if (r) { - /* TODO: Error codes */ - fprintf(stderr, "Socket creation error\n"); - return 1; - } - - r = uv_tcp_bind(&tcpServer, (const struct sockaddr*) &addr, 0); - if (r) { - /* TODO: Error codes */ - fprintf(stderr, "Bind error\n"); - return 1; - } - - r = uv_listen((uv_stream_t*)&tcpServer, SOMAXCONN, on_connection); - if (r) { - /* TODO: Error codes */ - fprintf(stderr, "Listen error %s\n", uv_err_name(r)); - return 1; - } - - return 0; -} - - -static int tcp6_echo_start(int port) { - struct sockaddr_in6 addr6; - int r; - - ASSERT(0 == uv_ip6_addr("::1", port, &addr6)); - - server = (uv_handle_t*)&tcpServer; - serverType = TCP; - - r = uv_tcp_init(loop, &tcpServer); - if (r) { - /* TODO: Error codes */ - fprintf(stderr, "Socket creation error\n"); - return 1; - } - - /* IPv6 is optional as not all platforms support it */ - r = uv_tcp_bind(&tcpServer, (const struct sockaddr*) &addr6, 0); - if (r) { - /* show message but return OK */ - fprintf(stderr, "IPv6 not supported\n"); - return 0; - } - - r = uv_listen((uv_stream_t*)&tcpServer, SOMAXCONN, on_connection); - if (r) { - /* TODO: Error codes */ - fprintf(stderr, "Listen error\n"); - return 1; - } - - return 0; -} - - -static int udp4_echo_start(int port) { - int r; - - server = (uv_handle_t*)&udpServer; - serverType = UDP; - - r = uv_udp_init(loop, &udpServer); - if (r) { - fprintf(stderr, "uv_udp_init: %s\n", uv_strerror(r)); - return 1; - } - - r = uv_udp_recv_start(&udpServer, echo_alloc, on_recv); - if (r) { - fprintf(stderr, "uv_udp_recv_start: %s\n", uv_strerror(r)); - return 1; - } - - return 0; -} - - -static int pipe_echo_start(char* pipeName) { - int r; - -#ifndef _WIN32 - { - uv_fs_t req; - uv_fs_unlink(NULL, &req, pipeName, NULL); - uv_fs_req_cleanup(&req); - } -#endif - - server = (uv_handle_t*)&pipeServer; - serverType = PIPE; - - r = uv_pipe_init(loop, &pipeServer, 0); - if (r) { - fprintf(stderr, "uv_pipe_init: %s\n", uv_strerror(r)); - return 1; - } - - r = uv_pipe_bind(&pipeServer, pipeName); - if (r) { - fprintf(stderr, "uv_pipe_bind: %s\n", uv_strerror(r)); - return 1; - } - - r = uv_listen((uv_stream_t*)&pipeServer, SOMAXCONN, on_connection); - if (r) { - fprintf(stderr, "uv_pipe_listen: %s\n", uv_strerror(r)); - return 1; - } - - return 0; -} - - -HELPER_IMPL(tcp4_echo_server) { - loop = uv_default_loop(); - - if (tcp4_echo_start(TEST_PORT)) - return 1; - - uv_run(loop, UV_RUN_DEFAULT); - return 0; -} - - -HELPER_IMPL(tcp6_echo_server) { - loop = uv_default_loop(); - - if (tcp6_echo_start(TEST_PORT)) - return 1; - - uv_run(loop, UV_RUN_DEFAULT); - return 0; -} - - -HELPER_IMPL(pipe_echo_server) { - loop = uv_default_loop(); - - if (pipe_echo_start(TEST_PIPENAME)) - return 1; - - uv_run(loop, UV_RUN_DEFAULT); - return 0; -} - - -HELPER_IMPL(udp4_echo_server) { - loop = uv_default_loop(); - - if (udp4_echo_start(TEST_PORT)) - return 1; - - uv_run(loop, UV_RUN_DEFAULT); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/fixtures/empty_file b/outside/libuv-v1.7.5/test/fixtures/empty_file deleted file mode 100644 index e69de29bb..000000000 diff --git a/outside/libuv-v1.7.5/test/fixtures/load_error.node b/outside/libuv-v1.7.5/test/fixtures/load_error.node deleted file mode 100644 index 323fae03f..000000000 --- a/outside/libuv-v1.7.5/test/fixtures/load_error.node +++ /dev/null @@ -1 +0,0 @@ -foobar diff --git a/outside/libuv-v1.7.5/test/run-benchmarks.c b/outside/libuv-v1.7.5/test/run-benchmarks.c deleted file mode 100644 index 6e42623d5..000000000 --- a/outside/libuv-v1.7.5/test/run-benchmarks.c +++ /dev/null @@ -1,65 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include -#include - -#include "runner.h" -#include "task.h" - -/* Actual benchmarks and helpers are defined in benchmark-list.h */ -#include "benchmark-list.h" - - -static int maybe_run_test(int argc, char **argv); - - -int main(int argc, char **argv) { - if (platform_init(argc, argv)) - return EXIT_FAILURE; - - switch (argc) { - case 1: return run_tests(1); - case 2: return maybe_run_test(argc, argv); - case 3: return run_test_part(argv[1], argv[2]); - default: - fprintf(stderr, "Too many arguments.\n"); - fflush(stderr); - return EXIT_FAILURE; - } - - return EXIT_SUCCESS; -} - - -static int maybe_run_test(int argc, char **argv) { - if (strcmp(argv[1], "--list") == 0) { - print_tests(stdout); - return 0; - } - - if (strcmp(argv[1], "spawn_helper") == 0) { - printf("hello world\n"); - return 42; - } - - return run_test(argv[1], 1, 1); -} diff --git a/outside/libuv-v1.7.5/test/run-tests.c b/outside/libuv-v1.7.5/test/run-tests.c deleted file mode 100644 index b4be01f6f..000000000 --- a/outside/libuv-v1.7.5/test/run-tests.c +++ /dev/null @@ -1,181 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include -#include -#include - -#ifdef _WIN32 -# include -#else -# include -#endif - -#include "uv.h" -#include "runner.h" -#include "task.h" - -/* Actual tests and helpers are defined in test-list.h */ -#include "test-list.h" - -int ipc_helper(int listen_after_write); -int ipc_helper_tcp_connection(void); -int ipc_send_recv_helper(void); -int ipc_helper_bind_twice(void); -int stdio_over_pipes_helper(void); -int spawn_stdin_stdout(void); - -static int maybe_run_test(int argc, char **argv); - - -int main(int argc, char **argv) { - if (platform_init(argc, argv)) - return EXIT_FAILURE; - - argv = uv_setup_args(argc, argv); - - switch (argc) { - case 1: return run_tests(0); - case 2: return maybe_run_test(argc, argv); - case 3: return run_test_part(argv[1], argv[2]); - default: - fprintf(stderr, "Too many arguments.\n"); - fflush(stderr); - return EXIT_FAILURE; - } - - return EXIT_SUCCESS; -} - - -static int maybe_run_test(int argc, char **argv) { - if (strcmp(argv[1], "--list") == 0) { - print_tests(stdout); - return 0; - } - - if (strcmp(argv[1], "ipc_helper_listen_before_write") == 0) { - return ipc_helper(0); - } - - if (strcmp(argv[1], "ipc_helper_listen_after_write") == 0) { - return ipc_helper(1); - } - - if (strcmp(argv[1], "ipc_send_recv_helper") == 0) { - return ipc_send_recv_helper(); - } - - if (strcmp(argv[1], "ipc_helper_tcp_connection") == 0) { - return ipc_helper_tcp_connection(); - } - - if (strcmp(argv[1], "ipc_helper_bind_twice") == 0) { - return ipc_helper_bind_twice(); - } - - if (strcmp(argv[1], "stdio_over_pipes_helper") == 0) { - return stdio_over_pipes_helper(); - } - - if (strcmp(argv[1], "spawn_helper1") == 0) { - return 1; - } - - if (strcmp(argv[1], "spawn_helper2") == 0) { - printf("hello world\n"); - return 1; - } - - if (strcmp(argv[1], "spawn_helper3") == 0) { - char buffer[256]; - ASSERT(buffer == fgets(buffer, sizeof(buffer) - 1, stdin)); - buffer[sizeof(buffer) - 1] = '\0'; - fputs(buffer, stdout); - return 1; - } - - if (strcmp(argv[1], "spawn_helper4") == 0) { - /* Never surrender, never return! */ - while (1) uv_sleep(10000); - } - - if (strcmp(argv[1], "spawn_helper5") == 0) { - const char out[] = "fourth stdio!\n"; -#ifdef _WIN32 - DWORD bytes; - WriteFile((HANDLE) _get_osfhandle(3), out, sizeof(out) - 1, &bytes, NULL); -#else - { - ssize_t r; - - do - r = write(3, out, sizeof(out) - 1); - while (r == -1 && errno == EINTR); - - fsync(3); - } -#endif - return 1; - } - - if (strcmp(argv[1], "spawn_helper6") == 0) { - int r; - - r = fprintf(stdout, "hello world\n"); - ASSERT(r > 0); - - r = fprintf(stderr, "hello errworld\n"); - ASSERT(r > 0); - - return 1; - } - - if (strcmp(argv[1], "spawn_helper7") == 0) { - int r; - char *test; - /* Test if the test value from the parent is still set */ - test = getenv("ENV_TEST"); - ASSERT(test != NULL); - - r = fprintf(stdout, "%s", test); - ASSERT(r > 0); - - return 1; - } - -#ifndef _WIN32 - if (strcmp(argv[1], "spawn_helper8") == 0) { - int fd; - ASSERT(sizeof(fd) == read(0, &fd, sizeof(fd))); - ASSERT(fd > 2); - ASSERT(-1 == write(fd, "x", 1)); - - return 1; - } -#endif /* !_WIN32 */ - - if (strcmp(argv[1], "spawn_helper9") == 0) { - return spawn_stdin_stdout(); - } - - return run_test(argv[1], 0, 1); -} diff --git a/outside/libuv-v1.7.5/test/runner-unix.c b/outside/libuv-v1.7.5/test/runner-unix.c deleted file mode 100644 index 2264d1e89..000000000 --- a/outside/libuv-v1.7.5/test/runner-unix.c +++ /dev/null @@ -1,400 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "runner-unix.h" -#include "runner.h" - -#include -#include /* uintptr_t */ - -#include -#include /* readlink, usleep */ -#include /* strdup */ -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - - -/* Do platform-specific initialization. */ -int platform_init(int argc, char **argv) { - const char* tap; - - tap = getenv("UV_TAP_OUTPUT"); - tap_output = (tap != NULL && atoi(tap) > 0); - - /* Disable stdio output buffering. */ - setvbuf(stdout, NULL, _IONBF, 0); - setvbuf(stderr, NULL, _IONBF, 0); - signal(SIGPIPE, SIG_IGN); - - if (realpath(argv[0], executable_path) == NULL) { - perror("realpath"); - return -1; - } - - return 0; -} - - -/* Invoke "argv[0] test-name [test-part]". Store process info in *p. */ -/* Make sure that all stdio output of the processes is buffered up. */ -int process_start(char* name, char* part, process_info_t* p, int is_helper) { - FILE* stdout_file; - const char* arg; - char* args[16]; - int n; - pid_t pid; - - stdout_file = tmpfile(); - if (!stdout_file) { - perror("tmpfile"); - return -1; - } - - p->terminated = 0; - p->status = 0; - - pid = fork(); - - if (pid < 0) { - perror("fork"); - return -1; - } - - if (pid == 0) { - /* child */ - arg = getenv("UV_USE_VALGRIND"); - n = 0; - - /* Disable valgrind for helpers, it complains about helpers leaking memory. - * They're killed after the test and as such never get a chance to clean up. - */ - if (is_helper == 0 && arg != NULL && atoi(arg) != 0) { - args[n++] = "valgrind"; - args[n++] = "--quiet"; - args[n++] = "--leak-check=full"; - args[n++] = "--show-reachable=yes"; - args[n++] = "--error-exitcode=125"; - } - - args[n++] = executable_path; - args[n++] = name; - args[n++] = part; - args[n++] = NULL; - - dup2(fileno(stdout_file), STDOUT_FILENO); - dup2(fileno(stdout_file), STDERR_FILENO); - execvp(args[0], args); - perror("execvp()"); - _exit(127); - } - - /* parent */ - p->pid = pid; - p->name = strdup(name); - p->stdout_file = stdout_file; - - return 0; -} - - -typedef struct { - int pipe[2]; - process_info_t* vec; - int n; -} dowait_args; - - -/* This function is run inside a pthread. We do this so that we can possibly - * timeout. - */ -static void* dowait(void* data) { - dowait_args* args = data; - - int i, r; - process_info_t* p; - - for (i = 0; i < args->n; i++) { - p = (process_info_t*)(args->vec + i * sizeof(process_info_t)); - if (p->terminated) continue; - r = waitpid(p->pid, &p->status, 0); - if (r < 0) { - perror("waitpid"); - return NULL; - } - p->terminated = 1; - } - - if (args->pipe[1] >= 0) { - /* Write a character to the main thread to notify it about this. */ - ssize_t r; - - do - r = write(args->pipe[1], "", 1); - while (r == -1 && errno == EINTR); - } - - return NULL; -} - - -/* Wait for all `n` processes in `vec` to terminate. */ -/* Time out after `timeout` msec, or never if timeout == -1 */ -/* Return 0 if all processes are terminated, -1 on error, -2 on timeout. */ -int process_wait(process_info_t* vec, int n, int timeout) { - int i; - int r; - int retval; - process_info_t* p; - dowait_args args; - pthread_t tid; - pthread_attr_t attr; - unsigned int elapsed_ms; - struct timeval timebase; - struct timeval tv; - fd_set fds; - - args.vec = vec; - args.n = n; - args.pipe[0] = -1; - args.pipe[1] = -1; - - /* The simple case is where there is no timeout */ - if (timeout == -1) { - dowait(&args); - return 0; - } - - /* Hard case. Do the wait with a timeout. - * - * Assumption: we are the only ones making this call right now. Otherwise - * we'd need to lock vec. - */ - - r = pipe((int*)&(args.pipe)); - if (r) { - perror("pipe()"); - return -1; - } - - if (pthread_attr_init(&attr)) - abort(); - - if (pthread_attr_setstacksize(&attr, 256 * 1024)) - abort(); - - r = pthread_create(&tid, &attr, dowait, &args); - - if (pthread_attr_destroy(&attr)) - abort(); - - if (r) { - perror("pthread_create()"); - retval = -1; - goto terminate; - } - - if (gettimeofday(&timebase, NULL)) - abort(); - - tv = timebase; - for (;;) { - /* Check that gettimeofday() doesn't jump back in time. */ - assert(tv.tv_sec == timebase.tv_sec || - (tv.tv_sec == timebase.tv_sec && tv.tv_usec >= timebase.tv_usec)); - - elapsed_ms = - (tv.tv_sec - timebase.tv_sec) * 1000 + - (tv.tv_usec / 1000) - - (timebase.tv_usec / 1000); - - r = 0; /* Timeout. */ - if (elapsed_ms >= (unsigned) timeout) - break; - - tv.tv_sec = (timeout - elapsed_ms) / 1000; - tv.tv_usec = (timeout - elapsed_ms) % 1000 * 1000; - - FD_ZERO(&fds); - FD_SET(args.pipe[0], &fds); - - r = select(args.pipe[0] + 1, &fds, NULL, NULL, &tv); - if (!(r == -1 && errno == EINTR)) - break; - - if (gettimeofday(&tv, NULL)) - abort(); - } - - if (r == -1) { - perror("select()"); - retval = -1; - - } else if (r) { - /* The thread completed successfully. */ - retval = 0; - - } else { - /* Timeout. Kill all the children. */ - for (i = 0; i < n; i++) { - p = (process_info_t*)(vec + i * sizeof(process_info_t)); - kill(p->pid, SIGTERM); - } - retval = -2; - } - - if (pthread_join(tid, NULL)) - abort(); - -terminate: - close(args.pipe[0]); - close(args.pipe[1]); - return retval; -} - - -/* Returns the number of bytes in the stdio output buffer for process `p`. */ -long int process_output_size(process_info_t *p) { - /* Size of the p->stdout_file */ - struct stat buf; - - int r = fstat(fileno(p->stdout_file), &buf); - if (r < 0) { - return -1; - } - - return (long)buf.st_size; -} - - -/* Copy the contents of the stdio output buffer to `fd`. */ -int process_copy_output(process_info_t *p, int fd) { - ssize_t nwritten; - char buf[1024]; - int r; - - r = fseek(p->stdout_file, 0, SEEK_SET); - if (r < 0) { - perror("fseek"); - return -1; - } - - /* TODO: what if the line is longer than buf */ - while (fgets(buf, sizeof(buf), p->stdout_file) != NULL) { - /* TODO: what if write doesn't write the whole buffer... */ - nwritten = 0; - - if (tap_output) - nwritten += write(fd, "#", 1); - - nwritten += write(fd, buf, strlen(buf)); - - if (nwritten < 0) { - perror("write"); - return -1; - } - } - - if (ferror(p->stdout_file)) { - perror("read"); - return -1; - } - - return 0; -} - - -/* Copy the last line of the stdio output buffer to `buffer` */ -int process_read_last_line(process_info_t *p, - char* buffer, - size_t buffer_len) { - char* ptr; - - int r = fseek(p->stdout_file, 0, SEEK_SET); - if (r < 0) { - perror("fseek"); - return -1; - } - - buffer[0] = '\0'; - - while (fgets(buffer, buffer_len, p->stdout_file) != NULL) { - for (ptr = buffer; *ptr && *ptr != '\r' && *ptr != '\n'; ptr++); - *ptr = '\0'; - } - - if (ferror(p->stdout_file)) { - perror("read"); - buffer[0] = '\0'; - return -1; - } - return 0; -} - - -/* Return the name that was specified when `p` was started by process_start */ -char* process_get_name(process_info_t *p) { - return p->name; -} - - -/* Terminate process `p`. */ -int process_terminate(process_info_t *p) { - return kill(p->pid, SIGTERM); -} - - -/* Return the exit code of process p. */ -/* On error, return -1. */ -int process_reap(process_info_t *p) { - if (WIFEXITED(p->status)) { - return WEXITSTATUS(p->status); - } else { - return p->status; /* ? */ - } -} - - -/* Clean up after terminating process `p` (e.g. free the output buffer etc.). */ -void process_cleanup(process_info_t *p) { - fclose(p->stdout_file); - free(p->name); -} - - -/* Move the console cursor one line up and back to the first column. */ -void rewind_cursor(void) { - fprintf(stderr, "\033[2K\r"); -} - - -/* Pause the calling thread for a number of milliseconds. */ -void uv_sleep(int msec) { - usleep(msec * 1000); -} diff --git a/outside/libuv-v1.7.5/test/runner-unix.h b/outside/libuv-v1.7.5/test/runner-unix.h deleted file mode 100644 index e21847f92..000000000 --- a/outside/libuv-v1.7.5/test/runner-unix.h +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#ifndef TEST_RUNNER_UNIX_H -#define TEST_RUNNER_UNIX_H - -#include -#include /* FILE */ - -typedef struct { - FILE* stdout_file; - pid_t pid; - char* name; - int status; - int terminated; -} process_info_t; - -#endif /* TEST_RUNNER_UNIX_H */ diff --git a/outside/libuv-v1.7.5/test/runner-win.c b/outside/libuv-v1.7.5/test/runner-win.c deleted file mode 100644 index 97ef7599e..000000000 --- a/outside/libuv-v1.7.5/test/runner-win.c +++ /dev/null @@ -1,371 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include -#include -#include -#include -#include -#if !defined(__MINGW32__) -# include -#endif - - -#include "task.h" -#include "runner.h" - - -/* - * Define the stuff that MinGW doesn't have - */ -#ifndef GetFileSizeEx - WINBASEAPI BOOL WINAPI GetFileSizeEx(HANDLE hFile, - PLARGE_INTEGER lpFileSize); -#endif - - -/* Do platform-specific initialization. */ -int platform_init(int argc, char **argv) { - const char* tap; - - tap = getenv("UV_TAP_OUTPUT"); - tap_output = (tap != NULL && atoi(tap) > 0); - - /* Disable the "application crashed" popup. */ - SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX | - SEM_NOOPENFILEERRORBOX); -#if !defined(__MINGW32__) - _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG); - _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG); -#endif - - _setmode(0, _O_BINARY); - _setmode(1, _O_BINARY); - _setmode(2, _O_BINARY); - - /* Disable stdio output buffering. */ - setvbuf(stdout, NULL, _IONBF, 0); - setvbuf(stderr, NULL, _IONBF, 0); - - strcpy(executable_path, argv[0]); - - return 0; -} - - -int process_start(char *name, char *part, process_info_t *p, int is_helper) { - HANDLE file = INVALID_HANDLE_VALUE; - HANDLE nul = INVALID_HANDLE_VALUE; - WCHAR path[MAX_PATH], filename[MAX_PATH]; - WCHAR image[MAX_PATH + 1]; - WCHAR args[MAX_PATH * 2]; - STARTUPINFOW si; - PROCESS_INFORMATION pi; - DWORD result; - - if (GetTempPathW(sizeof(path) / sizeof(WCHAR), (WCHAR*)&path) == 0) - goto error; - if (GetTempFileNameW((WCHAR*)&path, L"uv", 0, (WCHAR*)&filename) == 0) - goto error; - - file = CreateFileW((WCHAR*)filename, - GENERIC_READ | GENERIC_WRITE, - 0, - NULL, - CREATE_ALWAYS, - FILE_ATTRIBUTE_TEMPORARY | FILE_FLAG_DELETE_ON_CLOSE, - NULL); - if (file == INVALID_HANDLE_VALUE) - goto error; - - if (!SetHandleInformation(file, HANDLE_FLAG_INHERIT, HANDLE_FLAG_INHERIT)) - goto error; - - nul = CreateFileA("nul", - GENERIC_READ, - FILE_SHARE_READ | FILE_SHARE_WRITE, - NULL, - OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, - NULL); - if (nul == INVALID_HANDLE_VALUE) - goto error; - - if (!SetHandleInformation(nul, HANDLE_FLAG_INHERIT, HANDLE_FLAG_INHERIT)) - goto error; - - result = GetModuleFileNameW(NULL, - (WCHAR*) &image, - sizeof(image) / sizeof(WCHAR)); - if (result == 0 || result == sizeof(image)) - goto error; - - if (part) { - if (_snwprintf((WCHAR*)args, - sizeof(args) / sizeof(WCHAR), - L"\"%s\" %S %S", - image, - name, - part) < 0) { - goto error; - } - } else { - if (_snwprintf((WCHAR*)args, - sizeof(args) / sizeof(WCHAR), - L"\"%s\" %S", - image, - name) < 0) { - goto error; - } - } - - memset((void*)&si, 0, sizeof(si)); - si.cb = sizeof(si); - si.dwFlags = STARTF_USESTDHANDLES; - si.hStdInput = nul; - si.hStdOutput = file; - si.hStdError = file; - - if (!CreateProcessW(image, args, NULL, NULL, TRUE, - 0, NULL, NULL, &si, &pi)) - goto error; - - CloseHandle(pi.hThread); - - SetHandleInformation(nul, HANDLE_FLAG_INHERIT, 0); - SetHandleInformation(file, HANDLE_FLAG_INHERIT, 0); - - p->stdio_in = nul; - p->stdio_out = file; - p->process = pi.hProcess; - p->name = part; - - return 0; - -error: - if (file != INVALID_HANDLE_VALUE) - CloseHandle(file); - if (nul != INVALID_HANDLE_VALUE) - CloseHandle(nul); - - return -1; -} - - -/* Timeout is is msecs. Set timeout < 0 to never time out. */ -/* Returns 0 when all processes are terminated, -2 on timeout. */ -int process_wait(process_info_t *vec, int n, int timeout) { - int i; - HANDLE handles[MAXIMUM_WAIT_OBJECTS]; - DWORD timeout_api, result; - - /* If there's nothing to wait for, return immediately. */ - if (n == 0) - return 0; - - ASSERT(n <= MAXIMUM_WAIT_OBJECTS); - - for (i = 0; i < n; i++) - handles[i] = vec[i].process; - - if (timeout >= 0) { - timeout_api = (DWORD)timeout; - } else { - timeout_api = INFINITE; - } - - result = WaitForMultipleObjects(n, handles, TRUE, timeout_api); - - if (result >= WAIT_OBJECT_0 && result < WAIT_OBJECT_0 + n) { - /* All processes are terminated. */ - return 0; - } - if (result == WAIT_TIMEOUT) { - return -2; - } - return -1; -} - - -long int process_output_size(process_info_t *p) { - LARGE_INTEGER size; - if (!GetFileSizeEx(p->stdio_out, &size)) - return -1; - return (long int)size.QuadPart; -} - - -int process_copy_output(process_info_t *p, int fd) { - DWORD read; - char buf[1024]; - char *line, *start; - - if (SetFilePointer(p->stdio_out, - 0, - 0, - FILE_BEGIN) == INVALID_SET_FILE_POINTER) { - return -1; - } - - if (tap_output) - write(fd, "#", 1); - - while (ReadFile(p->stdio_out, (void*)&buf, sizeof(buf), &read, NULL) && - read > 0) { - if (tap_output) { - start = buf; - - while ((line = strchr(start, '\n')) != NULL) { - write(fd, start, line - start + 1); - write(fd, "#", 1); - start = line + 1; - } - - if (start < buf + read) - write(fd, start, buf + read - start); - } else { - write(fd, buf, read); - } - } - - if (tap_output) - write(fd, "\n", 1); - - if (GetLastError() != ERROR_HANDLE_EOF) - return -1; - - return 0; -} - - -int process_read_last_line(process_info_t *p, - char * buffer, - size_t buffer_len) { - DWORD size; - DWORD read; - DWORD start; - OVERLAPPED overlapped; - - ASSERT(buffer_len > 0); - - size = GetFileSize(p->stdio_out, NULL); - if (size == INVALID_FILE_SIZE) - return -1; - - if (size == 0) { - buffer[0] = '\0'; - return 1; - } - - memset(&overlapped, 0, sizeof overlapped); - if (size >= buffer_len) - overlapped.Offset = size - buffer_len - 1; - - if (!ReadFile(p->stdio_out, buffer, buffer_len - 1, &read, &overlapped)) - return -1; - - for (start = read - 1; start >= 0; start--) { - if (buffer[start] == '\n' || buffer[start] == '\r') - break; - } - - if (start > 0) - memmove(buffer, buffer + start, read - start); - - buffer[read - start] = '\0'; - - return 0; -} - - -char* process_get_name(process_info_t *p) { - return p->name; -} - - -int process_terminate(process_info_t *p) { - if (!TerminateProcess(p->process, 1)) - return -1; - return 0; -} - - -int process_reap(process_info_t *p) { - DWORD exitCode; - if (!GetExitCodeProcess(p->process, &exitCode)) - return -1; - return (int)exitCode; -} - - -void process_cleanup(process_info_t *p) { - CloseHandle(p->process); - CloseHandle(p->stdio_in); - CloseHandle(p->stdio_out); -} - - -static int clear_line() { - HANDLE handle; - CONSOLE_SCREEN_BUFFER_INFO info; - COORD coord; - DWORD written; - - handle = (HANDLE)_get_osfhandle(fileno(stderr)); - if (handle == INVALID_HANDLE_VALUE) - return -1; - - if (!GetConsoleScreenBufferInfo(handle, &info)) - return -1; - - coord = info.dwCursorPosition; - if (coord.Y <= 0) - return -1; - - coord.X = 0; - - if (!SetConsoleCursorPosition(handle, coord)) - return -1; - - if (!FillConsoleOutputCharacterW(handle, - 0x20, - info.dwSize.X, - coord, - &written)) { - return -1; - } - - return 0; -} - - -void rewind_cursor() { - if (clear_line() == -1) { - /* If clear_line fails (stdout is not a console), print a newline. */ - fprintf(stderr, "\n"); - } -} - - -/* Pause the calling thread for a number of milliseconds. */ -void uv_sleep(int msec) { - Sleep(msec); -} diff --git a/outside/libuv-v1.7.5/test/runner-win.h b/outside/libuv-v1.7.5/test/runner-win.h deleted file mode 100644 index c94b89bd5..000000000 --- a/outside/libuv-v1.7.5/test/runner-win.h +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -/* Don't complain about _snprintf being insecure. */ -#define _CRT_SECURE_NO_WARNINGS - -/* Don't complain about write(), fileno() etc. being deprecated. */ -#pragma warning(disable : 4996) - - -#include -#include -#include - - -/* Windows has no snprintf, only _snprintf. */ -#define snprintf _snprintf - - -typedef struct { - HANDLE process; - HANDLE stdio_in; - HANDLE stdio_out; - char *name; -} process_info_t; diff --git a/outside/libuv-v1.7.5/test/runner.c b/outside/libuv-v1.7.5/test/runner.c deleted file mode 100644 index e094defc7..000000000 --- a/outside/libuv-v1.7.5/test/runner.c +++ /dev/null @@ -1,464 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include -#include - -#include "runner.h" -#include "task.h" -#include "uv.h" - -char executable_path[sizeof(executable_path)]; - -int tap_output = 0; - - -static void log_progress(int total, - int passed, - int failed, - int todos, - int skipped, - const char* name) { - int progress; - - if (total == 0) - total = 1; - - progress = 100 * (passed + failed + skipped + todos) / total; - fprintf(stderr, "[%% %3d|+ %3d|- %3d|T %3d|S %3d]: %s", - progress, - passed, - failed, - todos, - skipped, - name); - fflush(stderr); -} - - -const char* fmt(double d) { - static char buf[1024]; - static char* p; - uint64_t v; - - if (p == NULL) - p = buf; - - p += 31; - - if (p >= buf + sizeof(buf)) - return ""; - - v = (uint64_t) d; - -#if 0 /* works but we don't care about fractional precision */ - if (d - v >= 0.01) { - *--p = '0' + (uint64_t) (d * 100) % 10; - *--p = '0' + (uint64_t) (d * 10) % 10; - *--p = '.'; - } -#endif - - if (v == 0) - *--p = '0'; - - while (v) { - if (v) *--p = '0' + (v % 10), v /= 10; - if (v) *--p = '0' + (v % 10), v /= 10; - if (v) *--p = '0' + (v % 10), v /= 10; - if (v) *--p = ','; - } - - return p; -} - - -int run_tests(int benchmark_output) { - int total; - int passed; - int failed; - int todos; - int skipped; - int current; - int test_result; - task_entry_t* task; - - /* Count the number of tests. */ - total = 0; - for (task = TASKS; task->main; task++) { - if (!task->is_helper) { - total++; - } - } - - if (tap_output) { - fprintf(stderr, "1..%d\n", total); - fflush(stderr); - } - - /* Run all tests. */ - passed = 0; - failed = 0; - todos = 0; - skipped = 0; - current = 1; - for (task = TASKS; task->main; task++) { - if (task->is_helper) { - continue; - } - - if (!tap_output) - rewind_cursor(); - - if (!benchmark_output && !tap_output) { - log_progress(total, passed, failed, todos, skipped, task->task_name); - } - - test_result = run_test(task->task_name, benchmark_output, current); - switch (test_result) { - case TEST_OK: passed++; break; - case TEST_TODO: todos++; break; - case TEST_SKIP: skipped++; break; - default: failed++; - } - current++; - } - - if (!tap_output) - rewind_cursor(); - - if (!benchmark_output && !tap_output) { - log_progress(total, passed, failed, todos, skipped, "Done.\n"); - } - - return failed; -} - - -void log_tap_result(int test_count, - const char* test, - int status, - process_info_t* process) { - const char* result; - const char* directive; - char reason[1024]; - - switch (status) { - case TEST_OK: - result = "ok"; - directive = ""; - break; - case TEST_TODO: - result = "not ok"; - directive = " # TODO "; - break; - case TEST_SKIP: - result = "ok"; - directive = " # SKIP "; - break; - default: - result = "not ok"; - directive = ""; - } - - if ((status == TEST_SKIP || status == TEST_TODO) && - process_output_size(process) > 0) { - process_read_last_line(process, reason, sizeof reason); - } else { - reason[0] = '\0'; - } - - fprintf(stderr, "%s %d - %s%s%s\n", result, test_count, test, directive, reason); - fflush(stderr); -} - - -int run_test(const char* test, - int benchmark_output, - int test_count) { - char errmsg[1024] = "no error"; - process_info_t processes[1024]; - process_info_t *main_proc; - task_entry_t* task; - int process_count; - int result; - int status; - int i; - - status = 255; - main_proc = NULL; - process_count = 0; - -#ifndef _WIN32 - /* Clean up stale socket from previous run. */ - remove(TEST_PIPENAME); -#endif - - /* If it's a helper the user asks for, start it directly. */ - for (task = TASKS; task->main; task++) { - if (task->is_helper && strcmp(test, task->process_name) == 0) { - return task->main(); - } - } - - /* Start the helpers first. */ - for (task = TASKS; task->main; task++) { - if (strcmp(test, task->task_name) != 0) { - continue; - } - - /* Skip the test itself. */ - if (!task->is_helper) { - continue; - } - - if (process_start(task->task_name, - task->process_name, - &processes[process_count], - 1 /* is_helper */) == -1) { - snprintf(errmsg, - sizeof errmsg, - "Process `%s` failed to start.", - task->process_name); - goto out; - } - - process_count++; - } - - /* Give the helpers time to settle. Race-y, fix this. */ - uv_sleep(250); - - /* Now start the test itself. */ - for (task = TASKS; task->main; task++) { - if (strcmp(test, task->task_name) != 0) { - continue; - } - - if (task->is_helper) { - continue; - } - - if (process_start(task->task_name, - task->process_name, - &processes[process_count], - 0 /* !is_helper */) == -1) { - snprintf(errmsg, - sizeof errmsg, - "Process `%s` failed to start.", - task->process_name); - goto out; - } - - main_proc = &processes[process_count]; - process_count++; - break; - } - - if (main_proc == NULL) { - snprintf(errmsg, - sizeof errmsg, - "No test with that name: %s", - test); - goto out; - } - - result = process_wait(main_proc, 1, task->timeout); - if (result == -1) { - FATAL("process_wait failed"); - } else if (result == -2) { - /* Don't have to clean up the process, process_wait() has killed it. */ - snprintf(errmsg, - sizeof errmsg, - "timeout"); - goto out; - } - - status = process_reap(main_proc); - if (status != TEST_OK) { - snprintf(errmsg, - sizeof errmsg, - "exit code %d", - status); - goto out; - } - - if (benchmark_output) { - /* Give the helpers time to clean up their act. */ - uv_sleep(1000); - } - -out: - /* Reap running processes except the main process, it's already dead. */ - for (i = 0; i < process_count - 1; i++) { - process_terminate(&processes[i]); - } - - if (process_count > 0 && - process_wait(processes, process_count - 1, -1) < 0) { - FATAL("process_wait failed"); - } - - if (tap_output) - log_tap_result(test_count, test, status, &processes[i]); - - /* Show error and output from processes if the test failed. */ - if (status != 0 || task->show_output) { - if (tap_output) { - fprintf(stderr, "#"); - } else if (status == TEST_TODO) { - fprintf(stderr, "\n`%s` todo\n", test); - } else if (status == TEST_SKIP) { - fprintf(stderr, "\n`%s` skipped\n", test); - } else if (status != 0) { - fprintf(stderr, "\n`%s` failed: %s\n", test, errmsg); - } else { - fprintf(stderr, "\n"); - } - fflush(stderr); - - for (i = 0; i < process_count; i++) { - switch (process_output_size(&processes[i])) { - case -1: - fprintf(stderr, "Output from process `%s`: (unavailable)\n", - process_get_name(&processes[i])); - fflush(stderr); - break; - - case 0: - fprintf(stderr, "Output from process `%s`: (no output)\n", - process_get_name(&processes[i])); - fflush(stderr); - break; - - default: - fprintf(stderr, "Output from process `%s`:\n", process_get_name(&processes[i])); - fflush(stderr); - process_copy_output(&processes[i], fileno(stderr)); - break; - } - } - - if (!tap_output) { - fprintf(stderr, "=============================================================\n"); - } - - /* In benchmark mode show concise output from the main process. */ - } else if (benchmark_output) { - switch (process_output_size(main_proc)) { - case -1: - fprintf(stderr, "%s: (unavailable)\n", test); - fflush(stderr); - break; - - case 0: - fprintf(stderr, "%s: (no output)\n", test); - fflush(stderr); - break; - - default: - for (i = 0; i < process_count; i++) { - process_copy_output(&processes[i], fileno(stderr)); - } - break; - } - } - - /* Clean up all process handles. */ - for (i = 0; i < process_count; i++) { - process_cleanup(&processes[i]); - } - - return status; -} - - -/* Returns the status code of the task part - * or 255 if no matching task was not found. - */ -int run_test_part(const char* test, const char* part) { - task_entry_t* task; - int r; - - for (task = TASKS; task->main; task++) { - if (strcmp(test, task->task_name) == 0 && - strcmp(part, task->process_name) == 0) { - r = task->main(); - return r; - } - } - - fprintf(stderr, "No test part with that name: %s:%s\n", test, part); - fflush(stderr); - return 255; -} - - -static int compare_task(const void* va, const void* vb) { - const task_entry_t* a = va; - const task_entry_t* b = vb; - return strcmp(a->task_name, b->task_name); -} - - -static int find_helpers(const task_entry_t* task, - const task_entry_t** helpers) { - const task_entry_t* helper; - int n_helpers; - - for (n_helpers = 0, helper = TASKS; helper->main; helper++) { - if (helper->is_helper && strcmp(helper->task_name, task->task_name) == 0) { - *helpers++ = helper; - n_helpers++; - } - } - - return n_helpers; -} - - -void print_tests(FILE* stream) { - const task_entry_t* helpers[1024]; - const task_entry_t* task; - int n_helpers; - int n_tasks; - int i; - - for (n_tasks = 0, task = TASKS; task->main; n_tasks++, task++); - qsort(TASKS, n_tasks, sizeof(TASKS[0]), compare_task); - - for (task = TASKS; task->main; task++) { - if (task->is_helper) { - continue; - } - - n_helpers = find_helpers(task, helpers); - if (n_helpers) { - printf("%-25s (helpers:", task->task_name); - for (i = 0; i < n_helpers; i++) { - printf(" %s", helpers[i]->process_name); - } - printf(")\n"); - } else { - printf("%s\n", task->task_name); - } - } -} diff --git a/outside/libuv-v1.7.5/test/runner.h b/outside/libuv-v1.7.5/test/runner.h deleted file mode 100644 index 78f3c880a..000000000 --- a/outside/libuv-v1.7.5/test/runner.h +++ /dev/null @@ -1,178 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#ifndef RUNNER_H_ -#define RUNNER_H_ - -#include /* PATH_MAX */ -#include /* FILE */ - - -/* - * The maximum number of processes (main + helpers) that a test / benchmark - * can have. - */ -#define MAX_PROCESSES 8 - - -/* - * Struct to store both tests and to define helper processes for tasks. - */ -typedef struct { - char *task_name; - char *process_name; - int (*main)(void); - int is_helper; - int show_output; - - /* - * The time in milliseconds after which a single test or benchmark times out. - */ - int timeout; -} task_entry_t, bench_entry_t; - - -/* - * Macros used by test-list.h and benchmark-list.h. - */ -#define TASK_LIST_START \ - task_entry_t TASKS[] = { - -#define TASK_LIST_END \ - { 0, 0, 0, 0, 0, 0 } \ - }; - -#define TEST_DECLARE(name) \ - int run_test_##name(void); - -#define TEST_ENTRY(name) \ - { #name, #name, &run_test_##name, 0, 0, 5000 }, - -#define TEST_ENTRY_CUSTOM(name, is_helper, show_output, timeout) \ - { #name, #name, &run_test_##name, is_helper, show_output, timeout }, - -#define BENCHMARK_DECLARE(name) \ - int run_benchmark_##name(void); - -#define BENCHMARK_ENTRY(name) \ - { #name, #name, &run_benchmark_##name, 0, 0, 60000 }, - -#define HELPER_DECLARE(name) \ - int run_helper_##name(void); - -#define HELPER_ENTRY(task_name, name) \ - { #task_name, #name, &run_helper_##name, 1, 0, 0 }, - -#define TEST_HELPER HELPER_ENTRY -#define BENCHMARK_HELPER HELPER_ENTRY - -#ifdef PATH_MAX -extern char executable_path[PATH_MAX]; -#else -extern char executable_path[4096]; -#endif - -/* - * Include platform-dependent definitions - */ -#ifdef _WIN32 -# include "runner-win.h" -#else -# include "runner-unix.h" -#endif - - -/* The array that is filled by test-list.h or benchmark-list.h */ -extern task_entry_t TASKS[]; - -/* - * Run all tests. - */ -int run_tests(int benchmark_output); - -/* - * Run a single test. Starts up any helpers. - */ -int run_test(const char* test, - int benchmark_output, - int test_count); - -/* - * Run a test part, i.e. the test or one of its helpers. - */ -int run_test_part(const char* test, const char* part); - - -/* - * Print tests in sorted order to `stream`. Used by `./run-tests --list`. - */ -void print_tests(FILE* stream); - - -/* - * Stuff that should be implemented by test-runner-.h - * All functions return 0 on success, -1 on failure, unless specified - * otherwise. - */ - -/* Do platform-specific initialization. */ -int platform_init(int argc, char** argv); - -/* Invoke "argv[0] test-name [test-part]". Store process info in *p. */ -/* Make sure that all stdio output of the processes is buffered up. */ -int process_start(char *name, char* part, process_info_t *p, int is_helper); - -/* Wait for all `n` processes in `vec` to terminate. */ -/* Time out after `timeout` msec, or never if timeout == -1 */ -/* Return 0 if all processes are terminated, -1 on error, -2 on timeout. */ -int process_wait(process_info_t *vec, int n, int timeout); - -/* Returns the number of bytes in the stdio output buffer for process `p`. */ -long int process_output_size(process_info_t *p); - -/* Copy the contents of the stdio output buffer to `fd`. */ -int process_copy_output(process_info_t *p, int fd); - -/* Copy the last line of the stdio output buffer to `buffer` */ -int process_read_last_line(process_info_t *p, - char * buffer, - size_t buffer_len); - -/* Return the name that was specified when `p` was started by process_start */ -char* process_get_name(process_info_t *p); - -/* Terminate process `p`. */ -int process_terminate(process_info_t *p); - -/* Return the exit code of process p. */ -/* On error, return -1. */ -int process_reap(process_info_t *p); - -/* Clean up after terminating process `p` (e.g. free the output buffer etc.). */ -void process_cleanup(process_info_t *p); - -/* Move the console cursor one line up and back to the first column. */ -void rewind_cursor(void); - -/* trigger output as tap */ -extern int tap_output; - -#endif /* RUNNER_H_ */ diff --git a/outside/libuv-v1.7.5/test/task.h b/outside/libuv-v1.7.5/test/task.h deleted file mode 100644 index e73676380..000000000 --- a/outside/libuv-v1.7.5/test/task.h +++ /dev/null @@ -1,250 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#ifndef TASK_H_ -#define TASK_H_ - -#include "uv.h" - -#include -#include -#include - -#if defined(_MSC_VER) && _MSC_VER < 1600 -# include "stdint-msvc2008.h" -#else -# include -#endif - -#if !defined(_WIN32) -# include -# include /* setrlimit() */ -#endif - -#ifdef __clang__ -# pragma clang diagnostic ignored "-Wvariadic-macros" -# pragma clang diagnostic ignored "-Wc99-extensions" -#endif - -#define TEST_PORT 9123 -#define TEST_PORT_2 9124 - -#ifdef _WIN32 -# define TEST_PIPENAME "\\\\?\\pipe\\uv-test" -# define TEST_PIPENAME_2 "\\\\?\\pipe\\uv-test2" -#else -# define TEST_PIPENAME "/tmp/uv-test-sock" -# define TEST_PIPENAME_2 "/tmp/uv-test-sock2" -#endif - -#ifdef _WIN32 -# include -# ifndef S_IRUSR -# define S_IRUSR _S_IREAD -# endif -# ifndef S_IWUSR -# define S_IWUSR _S_IWRITE -# endif -#endif - -#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) - -#define container_of(ptr, type, member) \ - ((type *) ((char *) (ptr) - offsetof(type, member))) - -typedef enum { - TCP = 0, - UDP, - PIPE -} stream_type; - -/* Die with fatal error. */ -#define FATAL(msg) \ - do { \ - fprintf(stderr, \ - "Fatal error in %s on line %d: %s\n", \ - __FILE__, \ - __LINE__, \ - msg); \ - fflush(stderr); \ - abort(); \ - } while (0) - -/* Have our own assert, so we are sure it does not get optimized away in - * a release build. - */ -#define ASSERT(expr) \ - do { \ - if (!(expr)) { \ - fprintf(stderr, \ - "Assertion failed in %s on line %d: %s\n", \ - __FILE__, \ - __LINE__, \ - #expr); \ - abort(); \ - } \ - } while (0) - -/* This macro cleans up the main loop. This is used to avoid valgrind - * warnings about memory being "leaked" by the main event loop. - */ -#define MAKE_VALGRIND_HAPPY() \ - do { \ - close_loop(uv_default_loop()); \ - uv_loop_delete(uv_default_loop()); \ - } while (0) - -/* Just sugar for wrapping the main() for a task or helper. */ -#define TEST_IMPL(name) \ - int run_test_##name(void); \ - int run_test_##name(void) - -#define BENCHMARK_IMPL(name) \ - int run_benchmark_##name(void); \ - int run_benchmark_##name(void) - -#define HELPER_IMPL(name) \ - int run_helper_##name(void); \ - int run_helper_##name(void) - -/* Pause the calling thread for a number of milliseconds. */ -void uv_sleep(int msec); - -/* Format big numbers nicely. WARNING: leaks memory. */ -const char* fmt(double d); - -/* Reserved test exit codes. */ -enum test_status { - TEST_OK = 0, - TEST_TODO, - TEST_SKIP -}; - -#define RETURN_OK() \ - do { \ - return TEST_OK; \ - } while (0) - -#define RETURN_TODO(explanation) \ - do { \ - fprintf(stderr, "%s\n", explanation); \ - fflush(stderr); \ - return TEST_TODO; \ - } while (0) - -#define RETURN_SKIP(explanation) \ - do { \ - fprintf(stderr, "%s\n", explanation); \ - fflush(stderr); \ - return TEST_SKIP; \ - } while (0) - -#if !defined(_WIN32) - -# define TEST_FILE_LIMIT(num) \ - do { \ - struct rlimit lim; \ - lim.rlim_cur = (num); \ - lim.rlim_max = lim.rlim_cur; \ - if (setrlimit(RLIMIT_NOFILE, &lim)) \ - RETURN_SKIP("File descriptor limit too low."); \ - } while (0) - -#else /* defined(_WIN32) */ - -# define TEST_FILE_LIMIT(num) do {} while (0) - -#endif - - -#if defined _WIN32 && ! defined __GNUC__ - -#include - -/* Define inline for MSVC<2015 */ -# if defined(_MSC_VER) && _MSC_VER < 1900 -# define inline __inline -# endif - -# if defined(_MSC_VER) && _MSC_VER < 1900 -/* Emulate snprintf() on MSVC<2015, _snprintf() doesn't zero-terminate the buffer - * on overflow... - */ -inline int snprintf(char* buf, size_t len, const char* fmt, ...) { - va_list ap; - int n; - - va_start(ap, fmt); - n = _vsprintf_p(buf, len, fmt, ap); - va_end(ap); - - /* It's a sad fact of life that no one ever checks the return value of - * snprintf(). Zero-terminating the buffer hopefully reduces the risk - * of gaping security holes. - */ - if (n < 0) - if (len > 0) - buf[0] = '\0'; - - return n; -} -# endif - -#endif - -#if defined(__clang__) || \ - defined(__GNUC__) || \ - defined(__INTEL_COMPILER) || \ - defined(__SUNPRO_C) -# define UNUSED __attribute__((unused)) -#else -# define UNUSED -#endif - -/* Fully close a loop */ -static void close_walk_cb(uv_handle_t* handle, void* arg) { - if (!uv_is_closing(handle)) - uv_close(handle, NULL); -} - -UNUSED static void close_loop(uv_loop_t* loop) { - uv_walk(loop, close_walk_cb, NULL); - uv_run(loop, UV_RUN_DEFAULT); -} - -UNUSED static int can_ipv6(void) { - uv_interface_address_t* addr; - int supported; - int count; - int i; - - if (uv_interface_addresses(&addr, &count)) - return 1; /* Assume IPv6 support on failure. */ - - supported = 0; - for (i = 0; supported == 0 && i < count; i += 1) - supported = (AF_INET6 == addr[i].address.address6.sin6_family); - - uv_free_interface_addresses(addr, count); - return supported; -} - -#endif /* TASK_H_ */ diff --git a/outside/libuv-v1.7.5/test/test-active.c b/outside/libuv-v1.7.5/test/test-active.c deleted file mode 100644 index b17bd1760..000000000 --- a/outside/libuv-v1.7.5/test/test-active.c +++ /dev/null @@ -1,84 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#include -#include - - -static int close_cb_called = 0; - - -static void close_cb(uv_handle_t* handle) { - ASSERT(handle != NULL); - close_cb_called++; -} - - -static void timer_cb(uv_timer_t* handle) { - ASSERT(0 && "timer_cb should not have been called"); -} - - -TEST_IMPL(active) { - int r; - uv_timer_t timer; - - r = uv_timer_init(uv_default_loop(), &timer); - ASSERT(r == 0); - - /* uv_is_active() and uv_is_closing() should always return either 0 or 1. */ - ASSERT(0 == uv_is_active((uv_handle_t*) &timer)); - ASSERT(0 == uv_is_closing((uv_handle_t*) &timer)); - - r = uv_timer_start(&timer, timer_cb, 1000, 0); - ASSERT(r == 0); - - ASSERT(1 == uv_is_active((uv_handle_t*) &timer)); - ASSERT(0 == uv_is_closing((uv_handle_t*) &timer)); - - r = uv_timer_stop(&timer); - ASSERT(r == 0); - - ASSERT(0 == uv_is_active((uv_handle_t*) &timer)); - ASSERT(0 == uv_is_closing((uv_handle_t*) &timer)); - - r = uv_timer_start(&timer, timer_cb, 1000, 0); - ASSERT(r == 0); - - ASSERT(1 == uv_is_active((uv_handle_t*) &timer)); - ASSERT(0 == uv_is_closing((uv_handle_t*) &timer)); - - uv_close((uv_handle_t*) &timer, close_cb); - - ASSERT(0 == uv_is_active((uv_handle_t*) &timer)); - ASSERT(1 == uv_is_closing((uv_handle_t*) &timer)); - - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - - ASSERT(close_cb_called == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-async-null-cb.c b/outside/libuv-v1.7.5/test/test-async-null-cb.c deleted file mode 100644 index 757944a27..000000000 --- a/outside/libuv-v1.7.5/test/test-async-null-cb.c +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -static uv_async_t async_handle; -static uv_check_t check_handle; -static int check_cb_called; -static uv_thread_t thread; - - -static void thread_cb(void* dummy) { - (void) &dummy; - uv_async_send(&async_handle); -} - - -static void check_cb(uv_check_t* handle) { - ASSERT(check_cb_called == 0); - uv_close((uv_handle_t*) &async_handle, NULL); - uv_close((uv_handle_t*) &check_handle, NULL); - check_cb_called++; -} - - -TEST_IMPL(async_null_cb) { - ASSERT(0 == uv_async_init(uv_default_loop(), &async_handle, NULL)); - ASSERT(0 == uv_check_init(uv_default_loop(), &check_handle)); - ASSERT(0 == uv_check_start(&check_handle, check_cb)); - ASSERT(0 == uv_thread_create(&thread, thread_cb, NULL)); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - ASSERT(0 == uv_thread_join(&thread)); - ASSERT(1 == check_cb_called); - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-async.c b/outside/libuv-v1.7.5/test/test-async.c deleted file mode 100644 index 6f5351bf1..000000000 --- a/outside/libuv-v1.7.5/test/test-async.c +++ /dev/null @@ -1,134 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" -#include -#include - -static uv_thread_t thread; -static uv_mutex_t mutex; - -static uv_prepare_t prepare; -static uv_async_t async; - -static volatile int async_cb_called; -static int prepare_cb_called; -static int close_cb_called; - - -static void thread_cb(void *arg) { - int n; - int r; - - for (;;) { - uv_mutex_lock(&mutex); - n = async_cb_called; - uv_mutex_unlock(&mutex); - - if (n == 3) { - break; - } - - r = uv_async_send(&async); - ASSERT(r == 0); - - /* Work around a bug in Valgrind. - * - * Valgrind runs threads not in parallel but sequentially, i.e. one after - * the other. It also doesn't preempt them, instead it depends on threads - * yielding voluntarily by making a syscall. - * - * That never happens here: the pipe that is associated with the async - * handle is written to once but that's too early for Valgrind's scheduler - * to kick in. Afterwards, the thread busy-loops, starving the main thread. - * Therefore, we yield. - * - * This behavior has been observed with Valgrind 3.7.0 and 3.9.0. - */ - uv_sleep(0); - } -} - - -static void close_cb(uv_handle_t* handle) { - ASSERT(handle != NULL); - close_cb_called++; -} - - -static void async_cb(uv_async_t* handle) { - int n; - - ASSERT(handle == &async); - - uv_mutex_lock(&mutex); - n = ++async_cb_called; - uv_mutex_unlock(&mutex); - - if (n == 3) { - uv_close((uv_handle_t*)&async, close_cb); - uv_close((uv_handle_t*)&prepare, close_cb); - } -} - - -static void prepare_cb(uv_prepare_t* handle) { - int r; - - ASSERT(handle == &prepare); - - if (prepare_cb_called++) - return; - - r = uv_thread_create(&thread, thread_cb, NULL); - ASSERT(r == 0); - uv_mutex_unlock(&mutex); -} - - -TEST_IMPL(async) { - int r; - - r = uv_mutex_init(&mutex); - ASSERT(r == 0); - uv_mutex_lock(&mutex); - - r = uv_prepare_init(uv_default_loop(), &prepare); - ASSERT(r == 0); - r = uv_prepare_start(&prepare, prepare_cb); - ASSERT(r == 0); - - r = uv_async_init(uv_default_loop(), &async, async_cb); - ASSERT(r == 0); - - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - - ASSERT(prepare_cb_called > 0); - ASSERT(async_cb_called == 3); - ASSERT(close_cb_called == 2); - - ASSERT(0 == uv_thread_join(&thread)); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-barrier.c b/outside/libuv-v1.7.5/test/test-barrier.c deleted file mode 100644 index dfd2dbdef..000000000 --- a/outside/libuv-v1.7.5/test/test-barrier.c +++ /dev/null @@ -1,106 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#include -#include - -typedef struct { - uv_barrier_t barrier; - int delay; - volatile int posted; - int main_barrier_wait_rval; - int worker_barrier_wait_rval; -} worker_config; - - -static void worker(void* arg) { - worker_config* c = arg; - - if (c->delay) - uv_sleep(c->delay); - - c->worker_barrier_wait_rval = uv_barrier_wait(&c->barrier); -} - - -TEST_IMPL(barrier_1) { - uv_thread_t thread; - worker_config wc; - - memset(&wc, 0, sizeof(wc)); - - ASSERT(0 == uv_barrier_init(&wc.barrier, 2)); - ASSERT(0 == uv_thread_create(&thread, worker, &wc)); - - uv_sleep(100); - wc.main_barrier_wait_rval = uv_barrier_wait(&wc.barrier); - - ASSERT(0 == uv_thread_join(&thread)); - uv_barrier_destroy(&wc.barrier); - - ASSERT(1 == (wc.main_barrier_wait_rval ^ wc.worker_barrier_wait_rval)); - - return 0; -} - - -TEST_IMPL(barrier_2) { - uv_thread_t thread; - worker_config wc; - - memset(&wc, 0, sizeof(wc)); - wc.delay = 100; - - ASSERT(0 == uv_barrier_init(&wc.barrier, 2)); - ASSERT(0 == uv_thread_create(&thread, worker, &wc)); - - wc.main_barrier_wait_rval = uv_barrier_wait(&wc.barrier); - - ASSERT(0 == uv_thread_join(&thread)); - uv_barrier_destroy(&wc.barrier); - - ASSERT(1 == (wc.main_barrier_wait_rval ^ wc.worker_barrier_wait_rval)); - - return 0; -} - - -TEST_IMPL(barrier_3) { - uv_thread_t thread; - worker_config wc; - - memset(&wc, 0, sizeof(wc)); - - ASSERT(0 == uv_barrier_init(&wc.barrier, 2)); - ASSERT(0 == uv_thread_create(&thread, worker, &wc)); - - wc.main_barrier_wait_rval = uv_barrier_wait(&wc.barrier); - - ASSERT(0 == uv_thread_join(&thread)); - uv_barrier_destroy(&wc.barrier); - - ASSERT(1 == (wc.main_barrier_wait_rval ^ wc.worker_barrier_wait_rval)); - - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-callback-order.c b/outside/libuv-v1.7.5/test/test-callback-order.c deleted file mode 100644 index 8bc2c4f75..000000000 --- a/outside/libuv-v1.7.5/test/test-callback-order.c +++ /dev/null @@ -1,77 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -static int idle_cb_called; -static int timer_cb_called; - -static uv_idle_t idle_handle; -static uv_timer_t timer_handle; - - -/* idle_cb should run before timer_cb */ -static void idle_cb(uv_idle_t* handle) { - ASSERT(idle_cb_called == 0); - ASSERT(timer_cb_called == 0); - uv_idle_stop(handle); - idle_cb_called++; -} - - -static void timer_cb(uv_timer_t* handle) { - ASSERT(idle_cb_called == 1); - ASSERT(timer_cb_called == 0); - uv_timer_stop(handle); - timer_cb_called++; -} - - -static void next_tick(uv_idle_t* handle) { - uv_loop_t* loop = handle->loop; - uv_idle_stop(handle); - uv_idle_init(loop, &idle_handle); - uv_idle_start(&idle_handle, idle_cb); - uv_timer_init(loop, &timer_handle); - uv_timer_start(&timer_handle, timer_cb, 0, 0); -} - - -TEST_IMPL(callback_order) { - uv_loop_t* loop; - uv_idle_t idle; - - loop = uv_default_loop(); - uv_idle_init(loop, &idle); - uv_idle_start(&idle, next_tick); - - ASSERT(idle_cb_called == 0); - ASSERT(timer_cb_called == 0); - - uv_run(loop, UV_RUN_DEFAULT); - - ASSERT(idle_cb_called == 1); - ASSERT(timer_cb_called == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-callback-stack.c b/outside/libuv-v1.7.5/test/test-callback-stack.c deleted file mode 100644 index 8855c0841..000000000 --- a/outside/libuv-v1.7.5/test/test-callback-stack.c +++ /dev/null @@ -1,205 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -/* - * TODO: Add explanation of why we want on_close to be called from fresh - * stack. - */ - -#include "uv.h" -#include "task.h" - - -static const char MESSAGE[] = "Failure is for the weak. Everyone dies alone."; - -static uv_tcp_t client; -static uv_timer_t timer; -static uv_connect_t connect_req; -static uv_write_t write_req; -static uv_shutdown_t shutdown_req; - -static int nested = 0; -static int close_cb_called = 0; -static int connect_cb_called = 0; -static int write_cb_called = 0; -static int timer_cb_called = 0; -static int bytes_received = 0; -static int shutdown_cb_called = 0; - - -static void alloc_cb(uv_handle_t* handle, size_t size, uv_buf_t* buf) { - buf->len = size; - buf->base = malloc(size); - ASSERT(buf->base != NULL); -} - - -static void close_cb(uv_handle_t* handle) { - ASSERT(nested == 0 && "close_cb must be called from a fresh stack"); - - close_cb_called++; -} - - -static void shutdown_cb(uv_shutdown_t* req, int status) { - ASSERT(status == 0); - ASSERT(nested == 0 && "shutdown_cb must be called from a fresh stack"); - - shutdown_cb_called++; -} - - -static void read_cb(uv_stream_t* tcp, ssize_t nread, const uv_buf_t* buf) { - ASSERT(nested == 0 && "read_cb must be called from a fresh stack"); - - printf("Read. nread == %d\n", (int)nread); - free(buf->base); - - if (nread == 0) { - return; - - } else if (nread < 0) { - ASSERT(nread == UV_EOF); - - nested++; - uv_close((uv_handle_t*)tcp, close_cb); - nested--; - - return; - } - - bytes_received += nread; - - /* We call shutdown here because when bytes_received == sizeof MESSAGE */ - /* there will be no more data sent nor received, so here it would be */ - /* possible for a backend to to call shutdown_cb immediately and *not* */ - /* from a fresh stack. */ - if (bytes_received == sizeof MESSAGE) { - nested++; - - puts("Shutdown"); - - if (uv_shutdown(&shutdown_req, (uv_stream_t*)tcp, shutdown_cb)) { - FATAL("uv_shutdown failed"); - } - nested--; - } -} - - -static void timer_cb(uv_timer_t* handle) { - ASSERT(handle == &timer); - ASSERT(nested == 0 && "timer_cb must be called from a fresh stack"); - - puts("Timeout complete. Now read data..."); - - nested++; - if (uv_read_start((uv_stream_t*)&client, alloc_cb, read_cb)) { - FATAL("uv_read_start failed"); - } - nested--; - - timer_cb_called++; - - uv_close((uv_handle_t*)handle, close_cb); -} - - -static void write_cb(uv_write_t* req, int status) { - int r; - - ASSERT(status == 0); - ASSERT(nested == 0 && "write_cb must be called from a fresh stack"); - - puts("Data written. 500ms timeout..."); - - /* After the data has been sent, we're going to wait for a while, then */ - /* start reading. This makes us certain that the message has been echoed */ - /* back to our receive buffer when we start reading. This maximizes the */ - /* temptation for the backend to use dirty stack for calling read_cb. */ - nested++; - r = uv_timer_init(uv_default_loop(), &timer); - ASSERT(r == 0); - r = uv_timer_start(&timer, timer_cb, 500, 0); - ASSERT(r == 0); - nested--; - - write_cb_called++; -} - - -static void connect_cb(uv_connect_t* req, int status) { - uv_buf_t buf; - - puts("Connected. Write some data to echo server..."); - - ASSERT(status == 0); - ASSERT(nested == 0 && "connect_cb must be called from a fresh stack"); - - nested++; - - buf.base = (char*) &MESSAGE; - buf.len = sizeof MESSAGE; - - if (uv_write(&write_req, (uv_stream_t*)req->handle, &buf, 1, write_cb)) { - FATAL("uv_write failed"); - } - - nested--; - - connect_cb_called++; -} - - -TEST_IMPL(callback_stack) { - struct sockaddr_in addr; - - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - - if (uv_tcp_init(uv_default_loop(), &client)) { - FATAL("uv_tcp_init failed"); - } - - puts("Connecting..."); - - nested++; - - if (uv_tcp_connect(&connect_req, - &client, - (const struct sockaddr*) &addr, - connect_cb)) { - FATAL("uv_tcp_connect failed"); - } - nested--; - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(nested == 0); - ASSERT(connect_cb_called == 1 && "connect_cb must be called exactly once"); - ASSERT(write_cb_called == 1 && "write_cb must be called exactly once"); - ASSERT(timer_cb_called == 1 && "timer_cb must be called exactly once"); - ASSERT(bytes_received == sizeof MESSAGE); - ASSERT(shutdown_cb_called == 1 && "shutdown_cb must be called exactly once"); - ASSERT(close_cb_called == 2 && "close_cb must be called exactly twice"); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-close-fd.c b/outside/libuv-v1.7.5/test/test-close-fd.c deleted file mode 100644 index 93a7bd7c0..000000000 --- a/outside/libuv-v1.7.5/test/test-close-fd.c +++ /dev/null @@ -1,76 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#if !defined(_WIN32) - -#include "uv.h" -#include "task.h" -#include -#include - -static unsigned int read_cb_called; - -static void alloc_cb(uv_handle_t *handle, size_t size, uv_buf_t *buf) { - static char slab[1]; - buf->base = slab; - buf->len = sizeof(slab); -} - -static void read_cb(uv_stream_t *handle, ssize_t nread, const uv_buf_t *buf) { - switch (++read_cb_called) { - case 1: - ASSERT(nread == 1); - uv_read_stop(handle); - break; - case 2: - ASSERT(nread == UV_EOF); - uv_close((uv_handle_t *) handle, NULL); - break; - default: - ASSERT(!"read_cb_called > 2"); - } -} - -TEST_IMPL(close_fd) { - uv_pipe_t pipe_handle; - int fd[2]; - - ASSERT(0 == pipe(fd)); - ASSERT(0 == uv_pipe_init(uv_default_loop(), &pipe_handle, 0)); - ASSERT(0 == uv_pipe_open(&pipe_handle, fd[0])); - fd[0] = -1; /* uv_pipe_open() takes ownership of the file descriptor. */ - ASSERT(1 == write(fd[1], "", 1)); - ASSERT(0 == close(fd[1])); - fd[1] = -1; - ASSERT(0 == uv_read_start((uv_stream_t *) &pipe_handle, alloc_cb, read_cb)); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - ASSERT(1 == read_cb_called); - ASSERT(0 == uv_is_active((const uv_handle_t *) &pipe_handle)); - ASSERT(0 == uv_read_start((uv_stream_t *) &pipe_handle, alloc_cb, read_cb)); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - ASSERT(2 == read_cb_called); - ASSERT(0 != uv_is_closing((const uv_handle_t *) &pipe_handle)); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - -#endif /* !defined(_WIN32) */ diff --git a/outside/libuv-v1.7.5/test/test-close-order.c b/outside/libuv-v1.7.5/test/test-close-order.c deleted file mode 100644 index 2b24f6d65..000000000 --- a/outside/libuv-v1.7.5/test/test-close-order.c +++ /dev/null @@ -1,80 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -static int check_cb_called; -static int timer_cb_called; -static int close_cb_called; - -static uv_check_t check_handle; -static uv_timer_t timer_handle1; -static uv_timer_t timer_handle2; - - -static void close_cb(uv_handle_t* handle) { - ASSERT(handle != NULL); - close_cb_called++; -} - - -/* check_cb should run before any close_cb */ -static void check_cb(uv_check_t* handle) { - ASSERT(check_cb_called == 0); - ASSERT(timer_cb_called == 1); - ASSERT(close_cb_called == 0); - uv_close((uv_handle_t*) handle, close_cb); - uv_close((uv_handle_t*) &timer_handle2, close_cb); - check_cb_called++; -} - - -static void timer_cb(uv_timer_t* handle) { - uv_close((uv_handle_t*) handle, close_cb); - timer_cb_called++; -} - - -TEST_IMPL(close_order) { - uv_loop_t* loop; - loop = uv_default_loop(); - - uv_check_init(loop, &check_handle); - uv_check_start(&check_handle, check_cb); - uv_timer_init(loop, &timer_handle1); - uv_timer_start(&timer_handle1, timer_cb, 0, 0); - uv_timer_init(loop, &timer_handle2); - uv_timer_start(&timer_handle2, timer_cb, 100000, 0); - - ASSERT(check_cb_called == 0); - ASSERT(close_cb_called == 0); - ASSERT(timer_cb_called == 0); - - uv_run(loop, UV_RUN_DEFAULT); - - ASSERT(check_cb_called == 1); - ASSERT(close_cb_called == 3); - ASSERT(timer_cb_called == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-condvar.c b/outside/libuv-v1.7.5/test/test-condvar.c deleted file mode 100644 index dbacdba38..000000000 --- a/outside/libuv-v1.7.5/test/test-condvar.c +++ /dev/null @@ -1,173 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#include -#include - -typedef struct { - uv_mutex_t mutex; - uv_cond_t cond; - int delay; - int use_broadcast; - volatile int posted; -} worker_config; - - -static void worker(void* arg) { - worker_config* c = arg; - - if (c->delay) - uv_sleep(c->delay); - - uv_mutex_lock(&c->mutex); - ASSERT(c->posted == 0); - c->posted = 1; - if (c->use_broadcast) - uv_cond_broadcast(&c->cond); - else - uv_cond_signal(&c->cond); - uv_mutex_unlock(&c->mutex); -} - - -TEST_IMPL(condvar_1) { - uv_thread_t thread; - worker_config wc; - - memset(&wc, 0, sizeof(wc)); - - ASSERT(0 == uv_cond_init(&wc.cond)); - ASSERT(0 == uv_mutex_init(&wc.mutex)); - ASSERT(0 == uv_thread_create(&thread, worker, &wc)); - - uv_mutex_lock(&wc.mutex); - uv_sleep(100); - uv_cond_wait(&wc.cond, &wc.mutex); - ASSERT(wc.posted == 1); - uv_mutex_unlock(&wc.mutex); - - ASSERT(0 == uv_thread_join(&thread)); - uv_mutex_destroy(&wc.mutex); - uv_cond_destroy(&wc.cond); - - return 0; -} - - -TEST_IMPL(condvar_2) { - uv_thread_t thread; - worker_config wc; - - memset(&wc, 0, sizeof(wc)); - wc.delay = 100; - - ASSERT(0 == uv_cond_init(&wc.cond)); - ASSERT(0 == uv_mutex_init(&wc.mutex)); - ASSERT(0 == uv_thread_create(&thread, worker, &wc)); - - uv_mutex_lock(&wc.mutex); - uv_cond_wait(&wc.cond, &wc.mutex); - uv_mutex_unlock(&wc.mutex); - - ASSERT(0 == uv_thread_join(&thread)); - uv_mutex_destroy(&wc.mutex); - uv_cond_destroy(&wc.cond); - - return 0; -} - - -TEST_IMPL(condvar_3) { - uv_thread_t thread; - worker_config wc; - int r; - - memset(&wc, 0, sizeof(wc)); - wc.delay = 100; - - ASSERT(0 == uv_cond_init(&wc.cond)); - ASSERT(0 == uv_mutex_init(&wc.mutex)); - ASSERT(0 == uv_thread_create(&thread, worker, &wc)); - - uv_mutex_lock(&wc.mutex); - r = uv_cond_timedwait(&wc.cond, &wc.mutex, (uint64_t)(50 * 1e6)); - ASSERT(r == UV_ETIMEDOUT); - uv_mutex_unlock(&wc.mutex); - - ASSERT(0 == uv_thread_join(&thread)); - uv_mutex_destroy(&wc.mutex); - uv_cond_destroy(&wc.cond); - - return 0; -} - - -TEST_IMPL(condvar_4) { - uv_thread_t thread; - worker_config wc; - int r; - - memset(&wc, 0, sizeof(wc)); - wc.delay = 100; - - ASSERT(0 == uv_cond_init(&wc.cond)); - ASSERT(0 == uv_mutex_init(&wc.mutex)); - ASSERT(0 == uv_thread_create(&thread, worker, &wc)); - - uv_mutex_lock(&wc.mutex); - r = uv_cond_timedwait(&wc.cond, &wc.mutex, (uint64_t)(150 * 1e6)); - ASSERT(r == 0); - uv_mutex_unlock(&wc.mutex); - - ASSERT(0 == uv_thread_join(&thread)); - uv_mutex_destroy(&wc.mutex); - uv_cond_destroy(&wc.cond); - - return 0; -} - - -TEST_IMPL(condvar_5) { - uv_thread_t thread; - worker_config wc; - - memset(&wc, 0, sizeof(wc)); - wc.use_broadcast = 1; - - ASSERT(0 == uv_cond_init(&wc.cond)); - ASSERT(0 == uv_mutex_init(&wc.mutex)); - ASSERT(0 == uv_thread_create(&thread, worker, &wc)); - - uv_mutex_lock(&wc.mutex); - uv_sleep(100); - uv_cond_wait(&wc.cond, &wc.mutex); - ASSERT(wc.posted == 1); - uv_mutex_unlock(&wc.mutex); - - ASSERT(0 == uv_thread_join(&thread)); - uv_mutex_destroy(&wc.mutex); - uv_cond_destroy(&wc.cond); - - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-connection-fail.c b/outside/libuv-v1.7.5/test/test-connection-fail.c deleted file mode 100644 index 328bff46e..000000000 --- a/outside/libuv-v1.7.5/test/test-connection-fail.c +++ /dev/null @@ -1,151 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#include -#include - - -static uv_tcp_t tcp; -static uv_connect_t req; -static int connect_cb_calls; -static int close_cb_calls; - -static uv_timer_t timer; -static int timer_close_cb_calls; -static int timer_cb_calls; - - -static void on_close(uv_handle_t* handle) { - close_cb_calls++; -} - - -static void timer_close_cb(uv_handle_t* handle) { - timer_close_cb_calls++; -} - - -static void timer_cb(uv_timer_t* handle) { - timer_cb_calls++; - - /* - * These are the important asserts. The connection callback has been made, - * but libuv hasn't automatically closed the socket. The user must - * uv_close the handle manually. - */ - ASSERT(close_cb_calls == 0); - ASSERT(connect_cb_calls == 1); - - /* Close the tcp handle. */ - uv_close((uv_handle_t*)&tcp, on_close); - - /* Close the timer. */ - uv_close((uv_handle_t*)handle, timer_close_cb); -} - - -static void on_connect_with_close(uv_connect_t *req, int status) { - ASSERT((uv_stream_t*) &tcp == req->handle); - ASSERT(status == UV_ECONNREFUSED); - connect_cb_calls++; - - ASSERT(close_cb_calls == 0); - uv_close((uv_handle_t*)req->handle, on_close); -} - - -static void on_connect_without_close(uv_connect_t *req, int status) { - ASSERT(status == UV_ECONNREFUSED); - connect_cb_calls++; - - uv_timer_start(&timer, timer_cb, 100, 0); - - ASSERT(close_cb_calls == 0); -} - - -static void connection_fail(uv_connect_cb connect_cb) { - struct sockaddr_in client_addr, server_addr; - int r; - - ASSERT(0 == uv_ip4_addr("0.0.0.0", 0, &client_addr)); - - /* There should be no servers listening on this port. */ - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &server_addr)); - - /* Try to connect to the server and do NUM_PINGS ping-pongs. */ - r = uv_tcp_init(uv_default_loop(), &tcp); - ASSERT(!r); - - /* We are never doing multiple reads/connects at a time anyway. */ - /* so these handles can be pre-initialized. */ - ASSERT(0 == uv_tcp_bind(&tcp, (const struct sockaddr*) &client_addr, 0)); - - r = uv_tcp_connect(&req, - &tcp, - (const struct sockaddr*) &server_addr, - connect_cb); - ASSERT(!r); - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(connect_cb_calls == 1); - ASSERT(close_cb_calls == 1); -} - - -/* - * This test attempts to connect to a port where no server is running. We - * expect an error. - */ -TEST_IMPL(connection_fail) { - connection_fail(on_connect_with_close); - - ASSERT(timer_close_cb_calls == 0); - ASSERT(timer_cb_calls == 0); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -/* - * This test is the same as the first except it check that the close - * callback of the tcp handle hasn't been made after the failed connection - * attempt. - */ -TEST_IMPL(connection_fail_doesnt_auto_close) { - int r; - - r = uv_timer_init(uv_default_loop(), &timer); - ASSERT(r == 0); - - connection_fail(on_connect_without_close); - - ASSERT(timer_close_cb_calls == 1); - ASSERT(timer_cb_calls == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-cwd-and-chdir.c b/outside/libuv-v1.7.5/test/test-cwd-and-chdir.c deleted file mode 100644 index 1e95043c1..000000000 --- a/outside/libuv-v1.7.5/test/test-cwd-and-chdir.c +++ /dev/null @@ -1,51 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" -#include - -#define PATHMAX 1024 -extern char executable_path[]; - -TEST_IMPL(cwd_and_chdir) { - char buffer_orig[PATHMAX]; - char buffer_new[PATHMAX]; - size_t size1; - size_t size2; - int err; - - size1 = sizeof buffer_orig; - err = uv_cwd(buffer_orig, &size1); - ASSERT(err == 0); - - err = uv_chdir(buffer_orig); - ASSERT(err == 0); - - size2 = sizeof buffer_new; - err = uv_cwd(buffer_new, &size2); - ASSERT(err == 0); - - ASSERT(size1 == size2); - ASSERT(strcmp(buffer_orig, buffer_new) == 0); - - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-default-loop-close.c b/outside/libuv-v1.7.5/test/test-default-loop-close.c deleted file mode 100644 index fd11cfa8c..000000000 --- a/outside/libuv-v1.7.5/test/test-default-loop-close.c +++ /dev/null @@ -1,59 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - - -static int timer_cb_called; - - -static void timer_cb(uv_timer_t* timer) { - timer_cb_called++; - uv_close((uv_handle_t*) timer, NULL); -} - - -TEST_IMPL(default_loop_close) { - uv_loop_t* loop; - uv_timer_t timer_handle; - - loop = uv_default_loop(); - ASSERT(loop != NULL); - - ASSERT(0 == uv_timer_init(loop, &timer_handle)); - ASSERT(0 == uv_timer_start(&timer_handle, timer_cb, 1, 0)); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - ASSERT(1 == timer_cb_called); - ASSERT(0 == uv_loop_close(loop)); - - loop = uv_default_loop(); - ASSERT(loop != NULL); - - ASSERT(0 == uv_timer_init(loop, &timer_handle)); - ASSERT(0 == uv_timer_start(&timer_handle, timer_cb, 1, 0)); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - ASSERT(2 == timer_cb_called); - ASSERT(0 == uv_loop_close(loop)); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-delayed-accept.c b/outside/libuv-v1.7.5/test/test-delayed-accept.c deleted file mode 100644 index 4a7998909..000000000 --- a/outside/libuv-v1.7.5/test/test-delayed-accept.c +++ /dev/null @@ -1,189 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" -#include -#include - -static int connection_cb_called = 0; -static int do_accept_called = 0; -static int close_cb_called = 0; -static int connect_cb_called = 0; - - -static void alloc_cb(uv_handle_t* handle, size_t size, uv_buf_t* buf) { - buf->base = malloc(size); - buf->len = size; -} - - -static void close_cb(uv_handle_t* handle) { - ASSERT(handle != NULL); - - free(handle); - - close_cb_called++; -} - - -static void do_accept(uv_timer_t* timer_handle) { - uv_tcp_t* server; - uv_tcp_t* accepted_handle = (uv_tcp_t*)malloc(sizeof *accepted_handle); - int r; - - ASSERT(timer_handle != NULL); - ASSERT(accepted_handle != NULL); - - r = uv_tcp_init(uv_default_loop(), accepted_handle); - ASSERT(r == 0); - - server = (uv_tcp_t*)timer_handle->data; - r = uv_accept((uv_stream_t*)server, (uv_stream_t*)accepted_handle); - ASSERT(r == 0); - - do_accept_called++; - - /* Immediately close the accepted handle. */ - uv_close((uv_handle_t*)accepted_handle, close_cb); - - /* After accepting the two clients close the server handle */ - if (do_accept_called == 2) { - uv_close((uv_handle_t*)server, close_cb); - } - - /* Dispose the timer. */ - uv_close((uv_handle_t*)timer_handle, close_cb); -} - - -static void connection_cb(uv_stream_t* tcp, int status) { - int r; - uv_timer_t* timer_handle; - - ASSERT(status == 0); - - timer_handle = (uv_timer_t*)malloc(sizeof *timer_handle); - ASSERT(timer_handle != NULL); - - /* Accept the client after 1 second */ - r = uv_timer_init(uv_default_loop(), timer_handle); - ASSERT(r == 0); - - timer_handle->data = tcp; - - r = uv_timer_start(timer_handle, do_accept, 1000, 0); - ASSERT(r == 0); - - connection_cb_called++; -} - - -static void start_server(void) { - struct sockaddr_in addr; - uv_tcp_t* server = (uv_tcp_t*)malloc(sizeof *server); - int r; - - ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); - ASSERT(server != NULL); - - r = uv_tcp_init(uv_default_loop(), server); - ASSERT(r == 0); - r = uv_tcp_bind(server, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); - - r = uv_listen((uv_stream_t*)server, 128, connection_cb); - ASSERT(r == 0); -} - - -static void read_cb(uv_stream_t* tcp, ssize_t nread, const uv_buf_t* buf) { - /* The server will not send anything, it should close gracefully. */ - - if (buf->base) { - free(buf->base); - } - - if (nread >= 0) { - ASSERT(nread == 0); - } else { - ASSERT(tcp != NULL); - ASSERT(nread == UV_EOF); - uv_close((uv_handle_t*)tcp, close_cb); - } -} - - -static void connect_cb(uv_connect_t* req, int status) { - int r; - - ASSERT(req != NULL); - ASSERT(status == 0); - - /* Not that the server will send anything, but otherwise we'll never know */ - /* when the server closes the connection. */ - r = uv_read_start((uv_stream_t*)(req->handle), alloc_cb, read_cb); - ASSERT(r == 0); - - connect_cb_called++; - - free(req); -} - - -static void client_connect(void) { - struct sockaddr_in addr; - uv_tcp_t* client = (uv_tcp_t*)malloc(sizeof *client); - uv_connect_t* connect_req = malloc(sizeof *connect_req); - int r; - - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - ASSERT(client != NULL); - ASSERT(connect_req != NULL); - - r = uv_tcp_init(uv_default_loop(), client); - ASSERT(r == 0); - - r = uv_tcp_connect(connect_req, - client, - (const struct sockaddr*) &addr, - connect_cb); - ASSERT(r == 0); -} - - - -TEST_IMPL(delayed_accept) { - start_server(); - - client_connect(); - client_connect(); - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(connection_cb_called == 2); - ASSERT(do_accept_called == 2); - ASSERT(connect_cb_called == 2); - ASSERT(close_cb_called == 7); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-dlerror.c b/outside/libuv-v1.7.5/test/test-dlerror.c deleted file mode 100644 index 091200edb..000000000 --- a/outside/libuv-v1.7.5/test/test-dlerror.c +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" -#include - - -TEST_IMPL(dlerror) { - const char* path = "test/fixtures/load_error.node"; - const char* dlerror_no_error = "no error"; - const char* msg; - uv_lib_t lib; - int r; - - lib.errmsg = NULL; - lib.handle = NULL; - msg = uv_dlerror(&lib); - ASSERT(msg != NULL); - ASSERT(strstr(msg, dlerror_no_error) != NULL); - - r = uv_dlopen(path, &lib); - ASSERT(r == -1); - - msg = uv_dlerror(&lib); - ASSERT(msg != NULL); - ASSERT(strstr(msg, dlerror_no_error) == NULL); - - /* Should return the same error twice in a row. */ - msg = uv_dlerror(&lib); - ASSERT(msg != NULL); - ASSERT(strstr(msg, dlerror_no_error) == NULL); - - uv_dlclose(&lib); - - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-embed.c b/outside/libuv-v1.7.5/test/test-embed.c deleted file mode 100644 index 06137456f..000000000 --- a/outside/libuv-v1.7.5/test/test-embed.c +++ /dev/null @@ -1,138 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" -#include -#include -#include - -#ifndef HAVE_KQUEUE -# if defined(__APPLE__) || \ - defined(__DragonFly__) || \ - defined(__FreeBSD__) || \ - defined(__OpenBSD__) || \ - defined(__NetBSD__) -# define HAVE_KQUEUE 1 -# endif -#endif - -#ifndef HAVE_EPOLL -# if defined(__linux__) -# define HAVE_EPOLL 1 -# endif -#endif - -#if defined(HAVE_KQUEUE) || defined(HAVE_EPOLL) - -#if defined(HAVE_KQUEUE) -# include -# include -# include -#endif - -#if defined(HAVE_EPOLL) -# include -#endif - -static uv_thread_t embed_thread; -static uv_sem_t embed_sem; -static uv_timer_t embed_timer; -static uv_async_t embed_async; -static volatile int embed_closed; - -static int embed_timer_called; - - -static void embed_thread_runner(void* arg) { - int r; - int fd; - int timeout; - - while (!embed_closed) { - fd = uv_backend_fd(uv_default_loop()); - timeout = uv_backend_timeout(uv_default_loop()); - - do { -#if defined(HAVE_KQUEUE) - struct timespec ts; - ts.tv_sec = timeout / 1000; - ts.tv_nsec = (timeout % 1000) * 1000000; - r = kevent(fd, NULL, 0, NULL, 0, &ts); -#elif defined(HAVE_EPOLL) - { - struct epoll_event ev; - r = epoll_wait(fd, &ev, 1, timeout); - } -#endif - } while (r == -1 && errno == EINTR); - uv_async_send(&embed_async); - uv_sem_wait(&embed_sem); - } -} - - -static void embed_cb(uv_async_t* async) { - uv_run(uv_default_loop(), UV_RUN_ONCE); - - uv_sem_post(&embed_sem); -} - - -static void embed_timer_cb(uv_timer_t* timer) { - embed_timer_called++; - embed_closed = 1; - - uv_close((uv_handle_t*) &embed_async, NULL); -} -#endif - - -TEST_IMPL(embed) { -#if defined(HAVE_KQUEUE) || defined(HAVE_EPOLL) - uv_loop_t external; - - ASSERT(0 == uv_loop_init(&external)); - - embed_timer_called = 0; - embed_closed = 0; - - uv_async_init(&external, &embed_async, embed_cb); - - /* Start timer in default loop */ - uv_timer_init(uv_default_loop(), &embed_timer); - uv_timer_start(&embed_timer, embed_timer_cb, 250, 0); - - /* Start worker that will interrupt external loop */ - uv_sem_init(&embed_sem, 0); - uv_thread_create(&embed_thread, embed_thread_runner, NULL); - - /* But run external loop */ - uv_run(&external, UV_RUN_DEFAULT); - - uv_thread_join(&embed_thread); - uv_loop_close(&external); - - ASSERT(embed_timer_called == 1); -#endif - - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-emfile.c b/outside/libuv-v1.7.5/test/test-emfile.c deleted file mode 100644 index 453bfe4cf..000000000 --- a/outside/libuv-v1.7.5/test/test-emfile.c +++ /dev/null @@ -1,111 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#if !defined(_WIN32) - -#include "uv.h" -#include "task.h" - -#include -#include -#include -#include - -static void connection_cb(uv_stream_t* server_handle, int status); -static void connect_cb(uv_connect_t* req, int status); - -static const int maxfd = 31; -static unsigned connect_cb_called; -static uv_tcp_t server_handle; -static uv_tcp_t client_handle; - - -TEST_IMPL(emfile) { - struct sockaddr_in addr; - struct rlimit limits; - uv_connect_t connect_req; - uv_loop_t* loop; - int first_fd; - - loop = uv_default_loop(); - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - ASSERT(0 == uv_tcp_init(loop, &server_handle)); - ASSERT(0 == uv_tcp_init(loop, &client_handle)); - ASSERT(0 == uv_tcp_bind(&server_handle, (const struct sockaddr*) &addr, 0)); - ASSERT(0 == uv_listen((uv_stream_t*) &server_handle, 8, connection_cb)); - - /* Lower the file descriptor limit and use up all fds save one. */ - limits.rlim_cur = limits.rlim_max = maxfd + 1; - if (setrlimit(RLIMIT_NOFILE, &limits)) { - perror("setrlimit(RLIMIT_NOFILE)"); - ASSERT(0); - } - - /* Remember the first one so we can clean up afterwards. */ - do - first_fd = dup(0); - while (first_fd == -1 && errno == EINTR); - ASSERT(first_fd > 0); - - while (dup(0) != -1 || errno == EINTR); - ASSERT(errno == EMFILE); - close(maxfd); - - /* Now connect and use up the last available file descriptor. The EMFILE - * handling logic in src/unix/stream.c should ensure that connect_cb() runs - * whereas connection_cb() should *not* run. - */ - ASSERT(0 == uv_tcp_connect(&connect_req, - &client_handle, - (const struct sockaddr*) &addr, - connect_cb)); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - ASSERT(1 == connect_cb_called); - - /* Close the dups again. Ignore errors in the unlikely event that the - * file descriptors were not contiguous. - */ - while (first_fd < maxfd) { - close(first_fd); - first_fd += 1; - } - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -static void connection_cb(uv_stream_t* server_handle, int status) { - ASSERT(0 && "connection_cb should not be called."); -} - - -static void connect_cb(uv_connect_t* req, int status) { - /* |status| should equal 0 because the connection should have been accepted, - * it's just that the server immediately closes it again. - */ - ASSERT(0 == status); - connect_cb_called += 1; - uv_close((uv_handle_t*) &server_handle, NULL); - uv_close((uv_handle_t*) &client_handle, NULL); -} - -#endif /* !defined(_WIN32) */ diff --git a/outside/libuv-v1.7.5/test/test-error.c b/outside/libuv-v1.7.5/test/test-error.c deleted file mode 100644 index eb337e66f..000000000 --- a/outside/libuv-v1.7.5/test/test-error.c +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#include -#include -#include - - -/* - * Synthetic errors (errors that originate from within libuv, not the system) - * should produce sensible error messages when run through uv_strerror(). - * - * See https://github.com/joyent/libuv/issues/210 - */ -TEST_IMPL(error_message) { - /* Cop out. Can't do proper checks on systems with - * i18n-ized error messages... - */ - if (strcmp(uv_strerror(0), "Success") != 0) { - printf("i18n error messages detected, skipping test.\n"); - return 0; - } - - ASSERT(strstr(uv_strerror(UV_EINVAL), "Success") == NULL); - ASSERT(strcmp(uv_strerror(1337), "Unknown error") == 0); - ASSERT(strcmp(uv_strerror(-1337), "Unknown error") == 0); - - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-fail-always.c b/outside/libuv-v1.7.5/test/test-fail-always.c deleted file mode 100644 index 0008459ea..000000000 --- a/outside/libuv-v1.7.5/test/test-fail-always.c +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "task.h" - - -TEST_IMPL(fail_always) { - /* This test always fails. It is used to test the test runner. */ - FATAL("Yes, it always fails"); - return 2; -} diff --git a/outside/libuv-v1.7.5/test/test-fs-event.c b/outside/libuv-v1.7.5/test/test-fs-event.c deleted file mode 100644 index a0908ce57..000000000 --- a/outside/libuv-v1.7.5/test/test-fs-event.c +++ /dev/null @@ -1,883 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#include -#include - -#ifndef HAVE_KQUEUE -# if defined(__APPLE__) || \ - defined(__DragonFly__) || \ - defined(__FreeBSD__) || \ - defined(__OpenBSD__) || \ - defined(__NetBSD__) -# define HAVE_KQUEUE 1 -# endif -#endif - -static uv_fs_event_t fs_event; -static const char file_prefix[] = "fsevent-"; -static const int fs_event_file_count = 16; -#if defined(__APPLE__) || defined(_WIN32) -static const char file_prefix_in_subdir[] = "subdir"; -#endif -static uv_timer_t timer; -static int timer_cb_called; -static int close_cb_called; -static int fs_event_created; -static int fs_event_removed; -static int fs_event_cb_called; -#if defined(PATH_MAX) -static char fs_event_filename[PATH_MAX]; -#else -static char fs_event_filename[1024]; -#endif /* defined(PATH_MAX) */ -static int timer_cb_touch_called; - -static void create_dir(const char* name) { - int r; - uv_fs_t req; - r = uv_fs_mkdir(NULL, &req, name, 0755, NULL); - ASSERT(r == 0 || r == UV_EEXIST); - uv_fs_req_cleanup(&req); -} - -static void create_file(const char* name) { - int r; - uv_file file; - uv_fs_t req; - - r = uv_fs_open(NULL, &req, name, O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - file = r; - uv_fs_req_cleanup(&req); - r = uv_fs_close(NULL, &req, file, NULL); - ASSERT(r == 0); - uv_fs_req_cleanup(&req); -} - -static void touch_file(const char* name) { - int r; - uv_file file; - uv_fs_t req; - uv_buf_t buf; - - r = uv_fs_open(NULL, &req, name, O_RDWR, 0, NULL); - ASSERT(r >= 0); - file = r; - uv_fs_req_cleanup(&req); - - buf = uv_buf_init("foo", 4); - r = uv_fs_write(NULL, &req, file, &buf, 1, -1, NULL); - ASSERT(r >= 0); - uv_fs_req_cleanup(&req); - - r = uv_fs_close(NULL, &req, file, NULL); - ASSERT(r == 0); - uv_fs_req_cleanup(&req); -} - -static void close_cb(uv_handle_t* handle) { - ASSERT(handle != NULL); - close_cb_called++; -} - -static void fail_cb(uv_fs_event_t* handle, - const char* path, - int events, - int status) { - ASSERT(0 && "fail_cb called"); -} - -static void fs_event_cb_dir(uv_fs_event_t* handle, const char* filename, - int events, int status) { - ++fs_event_cb_called; - ASSERT(handle == &fs_event); - ASSERT(status == 0); - ASSERT(events == UV_RENAME); - ASSERT(filename == NULL || strcmp(filename, "file1") == 0); - ASSERT(0 == uv_fs_event_stop(handle)); - uv_close((uv_handle_t*)handle, close_cb); -} - -static const char* fs_event_get_filename(int i) { - snprintf(fs_event_filename, - sizeof(fs_event_filename), - "watch_dir/%s%d", - file_prefix, - i); - return fs_event_filename; -} - -static void fs_event_create_files(uv_timer_t* handle) { - /* Make sure we're not attempting to create files we do not intend */ - ASSERT(fs_event_created < fs_event_file_count); - - /* Create the file */ - create_file(fs_event_get_filename(fs_event_created)); - - if (++fs_event_created < fs_event_file_count) { - /* Create another file on a different event loop tick. We do it this way - * to avoid fs events coalescing into one fs event. */ - ASSERT(0 == uv_timer_start(&timer, fs_event_create_files, 1, 0)); - } -} - -static void fs_event_unlink_files(uv_timer_t* handle) { - int r; - int i; - - /* NOTE: handle might be NULL if invoked not as timer callback */ - if (handle == NULL) { - /* Unlink all files */ - for (i = 0; i < 16; i++) { - r = remove(fs_event_get_filename(i)); - if (handle != NULL) - ASSERT(r == 0); - } - } else { - /* Make sure we're not attempting to remove files we do not intend */ - ASSERT(fs_event_removed < fs_event_file_count); - - /* Remove the file */ - ASSERT(0 == remove(fs_event_get_filename(fs_event_removed))); - - if (++fs_event_removed < fs_event_file_count) { - /* Remove another file on a different event loop tick. We do it this way - * to avoid fs events coalescing into one fs event. */ - ASSERT(0 == uv_timer_start(&timer, fs_event_unlink_files, 1, 0)); - } - } -} - -static void fs_event_cb_dir_multi_file(uv_fs_event_t* handle, - const char* filename, - int events, - int status) { - fs_event_cb_called++; - ASSERT(handle == &fs_event); - ASSERT(status == 0); - ASSERT(events == UV_CHANGE || UV_RENAME); - ASSERT(filename == NULL || - strncmp(filename, file_prefix, sizeof(file_prefix) - 1) == 0); - - if (fs_event_created + fs_event_removed == fs_event_file_count) { - /* Once we've processed all create events, delete all files */ - ASSERT(0 == uv_timer_start(&timer, fs_event_unlink_files, 1, 0)); - } else if (fs_event_cb_called == 2 * fs_event_file_count) { - /* Once we've processed all create and delete events, stop watching */ - uv_close((uv_handle_t*) &timer, close_cb); - uv_close((uv_handle_t*) handle, close_cb); - } -} - -#if defined(__APPLE__) || defined(_WIN32) -static const char* fs_event_get_filename_in_subdir(int i) { - snprintf(fs_event_filename, - sizeof(fs_event_filename), - "watch_dir/subdir/%s%d", - file_prefix, - i); - return fs_event_filename; -} - -static void fs_event_create_files_in_subdir(uv_timer_t* handle) { - /* Make sure we're not attempting to create files we do not intend */ - ASSERT(fs_event_created < fs_event_file_count); - - /* Create the file */ - create_file(fs_event_get_filename_in_subdir(fs_event_created)); - - if (++fs_event_created < fs_event_file_count) { - /* Create another file on a different event loop tick. We do it this way - * to avoid fs events coalescing into one fs event. */ - ASSERT(0 == uv_timer_start(&timer, fs_event_create_files_in_subdir, 1, 0)); - } -} - -static void fs_event_unlink_files_in_subdir(uv_timer_t* handle) { - int r; - int i; - - /* NOTE: handle might be NULL if invoked not as timer callback */ - if (handle == NULL) { - /* Unlink all files */ - for (i = 0; i < 16; i++) { - r = remove(fs_event_get_filename_in_subdir(i)); - if (handle != NULL) - ASSERT(r == 0); - } - } else { - /* Make sure we're not attempting to remove files we do not intend */ - ASSERT(fs_event_removed < fs_event_file_count); - - /* Remove the file */ - ASSERT(0 == remove(fs_event_get_filename_in_subdir(fs_event_removed))); - - if (++fs_event_removed < fs_event_file_count) { - /* Remove another file on a different event loop tick. We do it this way - * to avoid fs events coalescing into one fs event. */ - ASSERT(0 == uv_timer_start(&timer, fs_event_unlink_files_in_subdir, 1, 0)); - } - } -} - -static void fs_event_cb_dir_multi_file_in_subdir(uv_fs_event_t* handle, - const char* filename, - int events, - int status) { - fs_event_cb_called++; - ASSERT(handle == &fs_event); - ASSERT(status == 0); - ASSERT(events == UV_CHANGE || UV_RENAME); - ASSERT(filename == NULL || - strncmp(filename, file_prefix_in_subdir, sizeof(file_prefix_in_subdir) - 1) == 0); - - if (fs_event_created + fs_event_removed == fs_event_file_count) { - /* Once we've processed all create events, delete all files */ - ASSERT(0 == uv_timer_start(&timer, fs_event_unlink_files_in_subdir, 1, 0)); - } else if (fs_event_cb_called == 2 * fs_event_file_count) { - /* Once we've processed all create and delete events, stop watching */ - uv_close((uv_handle_t*) &timer, close_cb); - uv_close((uv_handle_t*) handle, close_cb); - } -} -#endif - -static void fs_event_cb_file(uv_fs_event_t* handle, const char* filename, - int events, int status) { - ++fs_event_cb_called; - ASSERT(handle == &fs_event); - ASSERT(status == 0); - ASSERT(events == UV_CHANGE); - ASSERT(filename == NULL || strcmp(filename, "file2") == 0); - ASSERT(0 == uv_fs_event_stop(handle)); - uv_close((uv_handle_t*)handle, close_cb); -} - -static void timer_cb_close_handle(uv_timer_t* timer) { - uv_handle_t* handle; - - ASSERT(timer != NULL); - handle = timer->data; - - uv_close((uv_handle_t*)timer, NULL); - uv_close((uv_handle_t*)handle, close_cb); -} - -static void fs_event_cb_file_current_dir(uv_fs_event_t* handle, - const char* filename, int events, int status) { - ASSERT(fs_event_cb_called == 0); - ++fs_event_cb_called; - - ASSERT(handle == &fs_event); - ASSERT(status == 0); - ASSERT(events == UV_CHANGE); - ASSERT(filename == NULL || strcmp(filename, "watch_file") == 0); - - /* Regression test for SunOS: touch should generate just one event. */ - { - static uv_timer_t timer; - uv_timer_init(handle->loop, &timer); - timer.data = handle; - uv_timer_start(&timer, timer_cb_close_handle, 250, 0); - } -} - -static void timer_cb_file(uv_timer_t* handle) { - ++timer_cb_called; - - if (timer_cb_called == 1) { - touch_file("watch_dir/file1"); - } else { - touch_file("watch_dir/file2"); - uv_close((uv_handle_t*)handle, close_cb); - } -} - -static void timer_cb_touch(uv_timer_t* timer) { - uv_close((uv_handle_t*)timer, NULL); - touch_file("watch_file"); - timer_cb_touch_called++; -} - -static void timer_cb_watch_twice(uv_timer_t* handle) { - uv_fs_event_t* handles = handle->data; - uv_close((uv_handle_t*) (handles + 0), NULL); - uv_close((uv_handle_t*) (handles + 1), NULL); - uv_close((uv_handle_t*) handle, NULL); -} - -TEST_IMPL(fs_event_watch_dir) { - uv_loop_t* loop = uv_default_loop(); - int r; - - /* Setup */ - fs_event_unlink_files(NULL); - remove("watch_dir/file2"); - remove("watch_dir/file1"); - remove("watch_dir/"); - create_dir("watch_dir"); - - r = uv_fs_event_init(loop, &fs_event); - ASSERT(r == 0); - r = uv_fs_event_start(&fs_event, fs_event_cb_dir_multi_file, "watch_dir", 0); - ASSERT(r == 0); - r = uv_timer_init(loop, &timer); - ASSERT(r == 0); - r = uv_timer_start(&timer, fs_event_create_files, 100, 0); - ASSERT(r == 0); - - uv_run(loop, UV_RUN_DEFAULT); - - ASSERT(fs_event_cb_called == fs_event_created + fs_event_removed); - ASSERT(close_cb_called == 2); - - /* Cleanup */ - fs_event_unlink_files(NULL); - remove("watch_dir/file2"); - remove("watch_dir/file1"); - remove("watch_dir/"); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - -TEST_IMPL(fs_event_watch_dir_recursive) { -#if defined(__APPLE__) || defined(_WIN32) - uv_loop_t* loop; - int r; - - /* Setup */ - loop = uv_default_loop(); - fs_event_unlink_files(NULL); - remove("watch_dir/file2"); - remove("watch_dir/file1"); - remove("watch_dir/subdir"); - remove("watch_dir/"); - create_dir("watch_dir"); - create_dir("watch_dir/subdir"); - - r = uv_fs_event_init(loop, &fs_event); - ASSERT(r == 0); - r = uv_fs_event_start(&fs_event, fs_event_cb_dir_multi_file_in_subdir, "watch_dir", UV_FS_EVENT_RECURSIVE); - ASSERT(r == 0); - r = uv_timer_init(loop, &timer); - ASSERT(r == 0); - r = uv_timer_start(&timer, fs_event_create_files_in_subdir, 100, 0); - ASSERT(r == 0); - - uv_run(loop, UV_RUN_DEFAULT); - - ASSERT(fs_event_cb_called == fs_event_created + fs_event_removed); - ASSERT(close_cb_called == 2); - - /* Cleanup */ - fs_event_unlink_files_in_subdir(NULL); - remove("watch_dir/file2"); - remove("watch_dir/file1"); - remove("watch_dir/subdir"); - remove("watch_dir/"); - - MAKE_VALGRIND_HAPPY(); - return 0; -#else - RETURN_SKIP("Recursive directory watching not supported on this platform."); -#endif -} - - -TEST_IMPL(fs_event_watch_file) { - uv_loop_t* loop = uv_default_loop(); - int r; - - /* Setup */ - remove("watch_dir/file2"); - remove("watch_dir/file1"); - remove("watch_dir/"); - create_dir("watch_dir"); - create_file("watch_dir/file1"); - create_file("watch_dir/file2"); - - r = uv_fs_event_init(loop, &fs_event); - ASSERT(r == 0); - r = uv_fs_event_start(&fs_event, fs_event_cb_file, "watch_dir/file2", 0); - ASSERT(r == 0); - r = uv_timer_init(loop, &timer); - ASSERT(r == 0); - r = uv_timer_start(&timer, timer_cb_file, 100, 100); - ASSERT(r == 0); - - uv_run(loop, UV_RUN_DEFAULT); - - ASSERT(fs_event_cb_called == 1); - ASSERT(timer_cb_called == 2); - ASSERT(close_cb_called == 2); - - /* Cleanup */ - remove("watch_dir/file2"); - remove("watch_dir/file1"); - remove("watch_dir/"); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - -TEST_IMPL(fs_event_watch_file_twice) { - const char path[] = "test/fixtures/empty_file"; - uv_fs_event_t watchers[2]; - uv_timer_t timer; - uv_loop_t* loop; - - loop = uv_default_loop(); - timer.data = watchers; - - ASSERT(0 == uv_fs_event_init(loop, watchers + 0)); - ASSERT(0 == uv_fs_event_start(watchers + 0, fail_cb, path, 0)); - ASSERT(0 == uv_fs_event_init(loop, watchers + 1)); - ASSERT(0 == uv_fs_event_start(watchers + 1, fail_cb, path, 0)); - ASSERT(0 == uv_timer_init(loop, &timer)); - ASSERT(0 == uv_timer_start(&timer, timer_cb_watch_twice, 10, 0)); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - -TEST_IMPL(fs_event_watch_file_current_dir) { - uv_timer_t timer; - uv_loop_t* loop; - int r; - - loop = uv_default_loop(); - - /* Setup */ - remove("watch_file"); - create_file("watch_file"); - - r = uv_fs_event_init(loop, &fs_event); - ASSERT(r == 0); - r = uv_fs_event_start(&fs_event, - fs_event_cb_file_current_dir, - "watch_file", - 0); - ASSERT(r == 0); - - - r = uv_timer_init(loop, &timer); - ASSERT(r == 0); - - r = uv_timer_start(&timer, timer_cb_touch, 1, 0); - ASSERT(r == 0); - - ASSERT(timer_cb_touch_called == 0); - ASSERT(fs_event_cb_called == 0); - ASSERT(close_cb_called == 0); - - uv_run(loop, UV_RUN_DEFAULT); - - ASSERT(timer_cb_touch_called == 1); - ASSERT(fs_event_cb_called == 1); - ASSERT(close_cb_called == 1); - - /* Cleanup */ - remove("watch_file"); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - -TEST_IMPL(fs_event_no_callback_after_close) { - uv_loop_t* loop = uv_default_loop(); - int r; - - /* Setup */ - remove("watch_dir/file1"); - remove("watch_dir/"); - create_dir("watch_dir"); - create_file("watch_dir/file1"); - - r = uv_fs_event_init(loop, &fs_event); - ASSERT(r == 0); - r = uv_fs_event_start(&fs_event, - fs_event_cb_file, - "watch_dir/file1", - 0); - ASSERT(r == 0); - - - uv_close((uv_handle_t*)&fs_event, close_cb); - touch_file("watch_dir/file1"); - uv_run(loop, UV_RUN_DEFAULT); - - ASSERT(fs_event_cb_called == 0); - ASSERT(close_cb_called == 1); - - /* Cleanup */ - remove("watch_dir/file1"); - remove("watch_dir/"); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - -TEST_IMPL(fs_event_no_callback_on_close) { - uv_loop_t* loop = uv_default_loop(); - int r; - - /* Setup */ - remove("watch_dir/file1"); - remove("watch_dir/"); - create_dir("watch_dir"); - create_file("watch_dir/file1"); - - r = uv_fs_event_init(loop, &fs_event); - ASSERT(r == 0); - r = uv_fs_event_start(&fs_event, - fs_event_cb_file, - "watch_dir/file1", - 0); - ASSERT(r == 0); - - uv_close((uv_handle_t*)&fs_event, close_cb); - - uv_run(loop, UV_RUN_DEFAULT); - - ASSERT(fs_event_cb_called == 0); - ASSERT(close_cb_called == 1); - - /* Cleanup */ - remove("watch_dir/file1"); - remove("watch_dir/"); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -static void fs_event_fail(uv_fs_event_t* handle, const char* filename, - int events, int status) { - ASSERT(0 && "should never be called"); -} - - -static void timer_cb(uv_timer_t* handle) { - int r; - - r = uv_fs_event_init(handle->loop, &fs_event); - ASSERT(r == 0); - r = uv_fs_event_start(&fs_event, fs_event_fail, ".", 0); - ASSERT(r == 0); - - uv_close((uv_handle_t*)&fs_event, close_cb); - uv_close((uv_handle_t*)handle, close_cb); -} - - -TEST_IMPL(fs_event_immediate_close) { - uv_timer_t timer; - uv_loop_t* loop; - int r; - - loop = uv_default_loop(); - - r = uv_timer_init(loop, &timer); - ASSERT(r == 0); - - r = uv_timer_start(&timer, timer_cb, 1, 0); - ASSERT(r == 0); - - uv_run(loop, UV_RUN_DEFAULT); - - ASSERT(close_cb_called == 2); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(fs_event_close_with_pending_event) { - uv_loop_t* loop; - int r; - - loop = uv_default_loop(); - - create_dir("watch_dir"); - create_file("watch_dir/file"); - - r = uv_fs_event_init(loop, &fs_event); - ASSERT(r == 0); - r = uv_fs_event_start(&fs_event, fs_event_fail, "watch_dir", 0); - ASSERT(r == 0); - - /* Generate an fs event. */ - touch_file("watch_dir/file"); - - uv_close((uv_handle_t*)&fs_event, close_cb); - - uv_run(loop, UV_RUN_DEFAULT); - - ASSERT(close_cb_called == 1); - - /* Clean up */ - remove("watch_dir/file"); - remove("watch_dir/"); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - -#if defined(HAVE_KQUEUE) - -/* kqueue doesn't register fs events if you don't have an active watcher. - * The file descriptor needs to be part of the kqueue set of interest and - * that's not the case until we actually enter the event loop. - */ -TEST_IMPL(fs_event_close_in_callback) { - fprintf(stderr, "Skipping test, doesn't work with kqueue.\n"); - return 0; -} - -#else /* !HAVE_KQUEUE */ - -static void fs_event_cb_close(uv_fs_event_t* handle, const char* filename, - int events, int status) { - ASSERT(status == 0); - - ASSERT(fs_event_cb_called < 3); - ++fs_event_cb_called; - - if (fs_event_cb_called == 3) { - uv_close((uv_handle_t*) handle, close_cb); - } -} - - -TEST_IMPL(fs_event_close_in_callback) { - uv_loop_t* loop; - int r; - - loop = uv_default_loop(); - - create_dir("watch_dir"); - create_file("watch_dir/file1"); - create_file("watch_dir/file2"); - create_file("watch_dir/file3"); - create_file("watch_dir/file4"); - create_file("watch_dir/file5"); - - r = uv_fs_event_init(loop, &fs_event); - ASSERT(r == 0); - r = uv_fs_event_start(&fs_event, fs_event_cb_close, "watch_dir", 0); - ASSERT(r == 0); - - /* Generate a couple of fs events. */ - touch_file("watch_dir/file1"); - touch_file("watch_dir/file2"); - touch_file("watch_dir/file3"); - touch_file("watch_dir/file4"); - touch_file("watch_dir/file5"); - - uv_run(loop, UV_RUN_DEFAULT); - - ASSERT(close_cb_called == 1); - ASSERT(fs_event_cb_called == 3); - - /* Clean up */ - remove("watch_dir/file1"); - remove("watch_dir/file2"); - remove("watch_dir/file3"); - remove("watch_dir/file4"); - remove("watch_dir/file5"); - remove("watch_dir/"); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - -#endif /* HAVE_KQUEUE */ - -TEST_IMPL(fs_event_start_and_close) { - uv_loop_t* loop; - uv_fs_event_t fs_event1; - uv_fs_event_t fs_event2; - int r; - - loop = uv_default_loop(); - - create_dir("watch_dir"); - - r = uv_fs_event_init(loop, &fs_event1); - ASSERT(r == 0); - r = uv_fs_event_start(&fs_event1, fs_event_cb_dir, "watch_dir", 0); - ASSERT(r == 0); - - r = uv_fs_event_init(loop, &fs_event2); - ASSERT(r == 0); - r = uv_fs_event_start(&fs_event2, fs_event_cb_dir, "watch_dir", 0); - ASSERT(r == 0); - - uv_close((uv_handle_t*) &fs_event2, close_cb); - uv_close((uv_handle_t*) &fs_event1, close_cb); - - uv_run(loop, UV_RUN_DEFAULT); - - ASSERT(close_cb_called == 2); - - remove("watch_dir/"); - MAKE_VALGRIND_HAPPY(); - return 0; -} - -TEST_IMPL(fs_event_getpath) { - uv_loop_t* loop = uv_default_loop(); - int r; - char buf[1024]; - size_t len; - - create_dir("watch_dir"); - - r = uv_fs_event_init(loop, &fs_event); - ASSERT(r == 0); - len = sizeof buf; - r = uv_fs_event_getpath(&fs_event, buf, &len); - ASSERT(r == UV_EINVAL); - r = uv_fs_event_start(&fs_event, fail_cb, "watch_dir", 0); - ASSERT(r == 0); - len = sizeof buf; - r = uv_fs_event_getpath(&fs_event, buf, &len); - ASSERT(r == 0); - ASSERT(buf[len - 1] != 0); - ASSERT(memcmp(buf, "watch_dir", len) == 0); - r = uv_fs_event_stop(&fs_event); - ASSERT(r == 0); - uv_close((uv_handle_t*) &fs_event, close_cb); - - uv_run(loop, UV_RUN_DEFAULT); - - ASSERT(close_cb_called == 1); - - remove("watch_dir/"); - MAKE_VALGRIND_HAPPY(); - return 0; -} - -#if defined(__APPLE__) - -static int fs_event_error_reported; - -static void fs_event_error_report_cb(uv_fs_event_t* handle, - const char* filename, - int events, - int status) { - if (status != 0) - fs_event_error_reported = status; -} - -static void timer_cb_nop(uv_timer_t* handle) { - ++timer_cb_called; - uv_close((uv_handle_t*) handle, close_cb); -} - -static void fs_event_error_report_close_cb(uv_handle_t* handle) { - ASSERT(handle != NULL); - close_cb_called++; - - /* handle is allocated on-stack, no need to free it */ -} - - -TEST_IMPL(fs_event_error_reporting) { - unsigned int i; - uv_loop_t loops[1024]; - uv_fs_event_t events[ARRAY_SIZE(loops)]; - uv_loop_t* loop; - uv_fs_event_t* event; - - TEST_FILE_LIMIT(ARRAY_SIZE(loops) * 3); - - remove("watch_dir/"); - create_dir("watch_dir"); - - /* Create a lot of loops, and start FSEventStream in each of them. - * Eventually, this should create enough streams to make FSEventStreamStart() - * fail. - */ - for (i = 0; i < ARRAY_SIZE(loops); i++) { - loop = &loops[i]; - ASSERT(0 == uv_loop_init(loop)); - event = &events[i]; - - timer_cb_called = 0; - close_cb_called = 0; - ASSERT(0 == uv_fs_event_init(loop, event)); - ASSERT(0 == uv_fs_event_start(event, - fs_event_error_report_cb, - "watch_dir", - 0)); - uv_unref((uv_handle_t*) event); - - /* Let loop run for some time */ - ASSERT(0 == uv_timer_init(loop, &timer)); - ASSERT(0 == uv_timer_start(&timer, timer_cb_nop, 2, 0)); - uv_run(loop, UV_RUN_DEFAULT); - ASSERT(1 == timer_cb_called); - ASSERT(1 == close_cb_called); - if (fs_event_error_reported != 0) - break; - } - - /* At least one loop should fail */ - ASSERT(fs_event_error_reported == UV_EMFILE); - - /* Stop and close all events, and destroy loops */ - do { - loop = &loops[i]; - event = &events[i]; - - ASSERT(0 == uv_fs_event_stop(event)); - uv_ref((uv_handle_t*) event); - uv_close((uv_handle_t*) event, fs_event_error_report_close_cb); - - close_cb_called = 0; - uv_run(loop, UV_RUN_DEFAULT); - ASSERT(close_cb_called == 1); - - uv_loop_close(loop); - } while (i-- != 0); - - remove("watch_dir/"); - MAKE_VALGRIND_HAPPY(); - return 0; -} - -#else /* !defined(__APPLE__) */ - -TEST_IMPL(fs_event_error_reporting) { - /* No-op, needed only for FSEvents backend */ - - MAKE_VALGRIND_HAPPY(); - return 0; -} - -#endif /* defined(__APPLE__) */ diff --git a/outside/libuv-v1.7.5/test/test-fs-poll.c b/outside/libuv-v1.7.5/test/test-fs-poll.c deleted file mode 100644 index dbc1515b0..000000000 --- a/outside/libuv-v1.7.5/test/test-fs-poll.c +++ /dev/null @@ -1,186 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#include - -#define FIXTURE "testfile" - -static void timer_cb(uv_timer_t* handle); -static void close_cb(uv_handle_t* handle); -static void poll_cb(uv_fs_poll_t* handle, - int status, - const uv_stat_t* prev, - const uv_stat_t* curr); - -static void poll_cb_fail(uv_fs_poll_t* handle, - int status, - const uv_stat_t* prev, - const uv_stat_t* curr); - -static uv_fs_poll_t poll_handle; -static uv_timer_t timer_handle; -static uv_loop_t* loop; - -static int poll_cb_called; -static int timer_cb_called; -static int close_cb_called; - - -static void touch_file(const char* path) { - static int count; - FILE* fp; - int i; - - ASSERT((fp = fopen(FIXTURE, "w+"))); - - /* Need to change the file size because the poller may not pick up - * sub-second mtime changes. - */ - i = ++count; - - while (i--) - fputc('*', fp); - - fclose(fp); -} - - -static void close_cb(uv_handle_t* handle) { - close_cb_called++; -} - - -static void timer_cb(uv_timer_t* handle) { - touch_file(FIXTURE); - timer_cb_called++; -} - - -static void poll_cb_fail(uv_fs_poll_t* handle, - int status, - const uv_stat_t* prev, - const uv_stat_t* curr) { - ASSERT(0 && "fail_cb called"); -} - - -static void poll_cb(uv_fs_poll_t* handle, - int status, - const uv_stat_t* prev, - const uv_stat_t* curr) { - uv_stat_t zero_statbuf; - - memset(&zero_statbuf, 0, sizeof(zero_statbuf)); - - ASSERT(handle == &poll_handle); - ASSERT(1 == uv_is_active((uv_handle_t*) handle)); - ASSERT(prev != NULL); - ASSERT(curr != NULL); - - switch (poll_cb_called++) { - case 0: - ASSERT(status == UV_ENOENT); - ASSERT(0 == memcmp(prev, &zero_statbuf, sizeof(zero_statbuf))); - ASSERT(0 == memcmp(curr, &zero_statbuf, sizeof(zero_statbuf))); - touch_file(FIXTURE); - break; - - case 1: - ASSERT(status == 0); - ASSERT(0 == memcmp(prev, &zero_statbuf, sizeof(zero_statbuf))); - ASSERT(0 != memcmp(curr, &zero_statbuf, sizeof(zero_statbuf))); - ASSERT(0 == uv_timer_start(&timer_handle, timer_cb, 20, 0)); - break; - - case 2: - ASSERT(status == 0); - ASSERT(0 != memcmp(prev, &zero_statbuf, sizeof(zero_statbuf))); - ASSERT(0 != memcmp(curr, &zero_statbuf, sizeof(zero_statbuf))); - ASSERT(0 == uv_timer_start(&timer_handle, timer_cb, 200, 0)); - break; - - case 3: - ASSERT(status == 0); - ASSERT(0 != memcmp(prev, &zero_statbuf, sizeof(zero_statbuf))); - ASSERT(0 != memcmp(curr, &zero_statbuf, sizeof(zero_statbuf))); - remove(FIXTURE); - break; - - case 4: - ASSERT(status == UV_ENOENT); - ASSERT(0 != memcmp(prev, &zero_statbuf, sizeof(zero_statbuf))); - ASSERT(0 == memcmp(curr, &zero_statbuf, sizeof(zero_statbuf))); - uv_close((uv_handle_t*)handle, close_cb); - break; - - default: - ASSERT(0); - } -} - - -TEST_IMPL(fs_poll) { - loop = uv_default_loop(); - - remove(FIXTURE); - - ASSERT(0 == uv_timer_init(loop, &timer_handle)); - ASSERT(0 == uv_fs_poll_init(loop, &poll_handle)); - ASSERT(0 == uv_fs_poll_start(&poll_handle, poll_cb, FIXTURE, 100)); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - - ASSERT(poll_cb_called == 5); - ASSERT(timer_cb_called == 2); - ASSERT(close_cb_called == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(fs_poll_getpath) { - char buf[1024]; - size_t len; - loop = uv_default_loop(); - - remove(FIXTURE); - - ASSERT(0 == uv_fs_poll_init(loop, &poll_handle)); - len = sizeof buf; - ASSERT(UV_EINVAL == uv_fs_poll_getpath(&poll_handle, buf, &len)); - ASSERT(0 == uv_fs_poll_start(&poll_handle, poll_cb_fail, FIXTURE, 100)); - len = sizeof buf; - ASSERT(0 == uv_fs_poll_getpath(&poll_handle, buf, &len)); - ASSERT(buf[len - 1] != 0); - ASSERT(0 == memcmp(buf, FIXTURE, len)); - - uv_close((uv_handle_t*) &poll_handle, close_cb); - - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - - ASSERT(close_cb_called == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-fs.c b/outside/libuv-v1.7.5/test/test-fs.c deleted file mode 100644 index 90572ca61..000000000 --- a/outside/libuv-v1.7.5/test/test-fs.c +++ /dev/null @@ -1,2540 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#include -#include /* memset */ -#include -#include - -/* FIXME we shouldn't need to branch in this file */ -#if defined(__unix__) || defined(__POSIX__) || \ - defined(__APPLE__) || defined(_AIX) -#include /* unlink, rmdir, etc. */ -#else -# include -# include -# define unlink _unlink -# define rmdir _rmdir -# define open _open -# define write _write -# define close _close -# ifndef stat -# define stat _stati64 -# endif -# ifndef lseek -# define lseek _lseek -# endif -#endif - -#define TOO_LONG_NAME_LENGTH 65536 -#define PATHMAX 1024 - -typedef struct { - const char* path; - double atime; - double mtime; -} utime_check_t; - - -static int dummy_cb_count; -static int close_cb_count; -static int create_cb_count; -static int open_cb_count; -static int read_cb_count; -static int write_cb_count; -static int unlink_cb_count; -static int mkdir_cb_count; -static int mkdtemp_cb_count; -static int rmdir_cb_count; -static int scandir_cb_count; -static int stat_cb_count; -static int rename_cb_count; -static int fsync_cb_count; -static int fdatasync_cb_count; -static int ftruncate_cb_count; -static int sendfile_cb_count; -static int fstat_cb_count; -static int access_cb_count; -static int chmod_cb_count; -static int fchmod_cb_count; -static int chown_cb_count; -static int fchown_cb_count; -static int link_cb_count; -static int symlink_cb_count; -static int readlink_cb_count; -static int utime_cb_count; -static int futime_cb_count; - -static uv_loop_t* loop; - -static uv_fs_t open_req1; -static uv_fs_t open_req2; -static uv_fs_t read_req; -static uv_fs_t write_req; -static uv_fs_t unlink_req; -static uv_fs_t close_req; -static uv_fs_t mkdir_req; -static uv_fs_t mkdtemp_req1; -static uv_fs_t mkdtemp_req2; -static uv_fs_t rmdir_req; -static uv_fs_t scandir_req; -static uv_fs_t stat_req; -static uv_fs_t rename_req; -static uv_fs_t fsync_req; -static uv_fs_t fdatasync_req; -static uv_fs_t ftruncate_req; -static uv_fs_t sendfile_req; -static uv_fs_t utime_req; -static uv_fs_t futime_req; - -static char buf[32]; -static char buf2[32]; -static char test_buf[] = "test-buffer\n"; -static char test_buf2[] = "second-buffer\n"; -static uv_buf_t iov; - -static void check_permission(const char* filename, unsigned int mode) { - int r; - uv_fs_t req; - uv_stat_t* s; - - r = uv_fs_stat(NULL, &req, filename, NULL); - ASSERT(r == 0); - ASSERT(req.result == 0); - - s = &req.statbuf; -#ifdef _WIN32 - /* - * On Windows, chmod can only modify S_IWUSR (_S_IWRITE) bit, - * so only testing for the specified flags. - */ - ASSERT((s->st_mode & 0777) & mode); -#else - ASSERT((s->st_mode & 0777) == mode); -#endif - - uv_fs_req_cleanup(&req); -} - - -static void dummy_cb(uv_fs_t* req) { - (void) req; - dummy_cb_count++; -} - - -static void link_cb(uv_fs_t* req) { - ASSERT(req->fs_type == UV_FS_LINK); - ASSERT(req->result == 0); - link_cb_count++; - uv_fs_req_cleanup(req); -} - - -static void symlink_cb(uv_fs_t* req) { - ASSERT(req->fs_type == UV_FS_SYMLINK); - ASSERT(req->result == 0); - symlink_cb_count++; - uv_fs_req_cleanup(req); -} - -static void readlink_cb(uv_fs_t* req) { - ASSERT(req->fs_type == UV_FS_READLINK); - ASSERT(req->result == 0); - ASSERT(strcmp(req->ptr, "test_file_symlink2") == 0); - readlink_cb_count++; - uv_fs_req_cleanup(req); -} - - -static void access_cb(uv_fs_t* req) { - ASSERT(req->fs_type == UV_FS_ACCESS); - access_cb_count++; - uv_fs_req_cleanup(req); -} - - -static void fchmod_cb(uv_fs_t* req) { - ASSERT(req->fs_type == UV_FS_FCHMOD); - ASSERT(req->result == 0); - fchmod_cb_count++; - uv_fs_req_cleanup(req); - check_permission("test_file", *(int*)req->data); -} - - -static void chmod_cb(uv_fs_t* req) { - ASSERT(req->fs_type == UV_FS_CHMOD); - ASSERT(req->result == 0); - chmod_cb_count++; - uv_fs_req_cleanup(req); - check_permission("test_file", *(int*)req->data); -} - - -static void fchown_cb(uv_fs_t* req) { - ASSERT(req->fs_type == UV_FS_FCHOWN); - ASSERT(req->result == 0); - fchown_cb_count++; - uv_fs_req_cleanup(req); -} - - -static void chown_cb(uv_fs_t* req) { - ASSERT(req->fs_type == UV_FS_CHOWN); - ASSERT(req->result == 0); - chown_cb_count++; - uv_fs_req_cleanup(req); -} - -static void chown_root_cb(uv_fs_t* req) { - ASSERT(req->fs_type == UV_FS_CHOWN); -#ifdef _WIN32 - /* On windows, chown is a no-op and always succeeds. */ - ASSERT(req->result == 0); -#else - /* On unix, chown'ing the root directory is not allowed - - * unless you're root, of course. - */ - if (geteuid() == 0) - ASSERT(req->result == 0); - else - ASSERT(req->result == UV_EPERM); -#endif - chown_cb_count++; - uv_fs_req_cleanup(req); -} - -static void unlink_cb(uv_fs_t* req) { - ASSERT(req == &unlink_req); - ASSERT(req->fs_type == UV_FS_UNLINK); - ASSERT(req->result == 0); - unlink_cb_count++; - uv_fs_req_cleanup(req); -} - -static void fstat_cb(uv_fs_t* req) { - uv_stat_t* s = req->ptr; - ASSERT(req->fs_type == UV_FS_FSTAT); - ASSERT(req->result == 0); - ASSERT(s->st_size == sizeof(test_buf)); - uv_fs_req_cleanup(req); - fstat_cb_count++; -} - - -static void close_cb(uv_fs_t* req) { - int r; - ASSERT(req == &close_req); - ASSERT(req->fs_type == UV_FS_CLOSE); - ASSERT(req->result == 0); - close_cb_count++; - uv_fs_req_cleanup(req); - if (close_cb_count == 3) { - r = uv_fs_unlink(loop, &unlink_req, "test_file2", unlink_cb); - ASSERT(r == 0); - } -} - - -static void ftruncate_cb(uv_fs_t* req) { - int r; - ASSERT(req == &ftruncate_req); - ASSERT(req->fs_type == UV_FS_FTRUNCATE); - ASSERT(req->result == 0); - ftruncate_cb_count++; - uv_fs_req_cleanup(req); - r = uv_fs_close(loop, &close_req, open_req1.result, close_cb); - ASSERT(r == 0); -} - - -static void read_cb(uv_fs_t* req) { - int r; - ASSERT(req == &read_req); - ASSERT(req->fs_type == UV_FS_READ); - ASSERT(req->result >= 0); /* FIXME(bnoordhuis) Check if requested size? */ - read_cb_count++; - uv_fs_req_cleanup(req); - if (read_cb_count == 1) { - ASSERT(strcmp(buf, test_buf) == 0); - r = uv_fs_ftruncate(loop, &ftruncate_req, open_req1.result, 7, - ftruncate_cb); - } else { - ASSERT(strcmp(buf, "test-bu") == 0); - r = uv_fs_close(loop, &close_req, open_req1.result, close_cb); - } - ASSERT(r == 0); -} - - -static void open_cb(uv_fs_t* req) { - int r; - ASSERT(req == &open_req1); - ASSERT(req->fs_type == UV_FS_OPEN); - if (req->result < 0) { - fprintf(stderr, "async open error: %d\n", (int) req->result); - ASSERT(0); - } - open_cb_count++; - ASSERT(req->path); - ASSERT(memcmp(req->path, "test_file2\0", 11) == 0); - uv_fs_req_cleanup(req); - memset(buf, 0, sizeof(buf)); - iov = uv_buf_init(buf, sizeof(buf)); - r = uv_fs_read(loop, &read_req, open_req1.result, &iov, 1, -1, - read_cb); - ASSERT(r == 0); -} - - -static void open_cb_simple(uv_fs_t* req) { - ASSERT(req->fs_type == UV_FS_OPEN); - if (req->result < 0) { - fprintf(stderr, "async open error: %d\n", (int) req->result); - ASSERT(0); - } - open_cb_count++; - ASSERT(req->path); - uv_fs_req_cleanup(req); -} - - -static void fsync_cb(uv_fs_t* req) { - int r; - ASSERT(req == &fsync_req); - ASSERT(req->fs_type == UV_FS_FSYNC); - ASSERT(req->result == 0); - fsync_cb_count++; - uv_fs_req_cleanup(req); - r = uv_fs_close(loop, &close_req, open_req1.result, close_cb); - ASSERT(r == 0); -} - - -static void fdatasync_cb(uv_fs_t* req) { - int r; - ASSERT(req == &fdatasync_req); - ASSERT(req->fs_type == UV_FS_FDATASYNC); - ASSERT(req->result == 0); - fdatasync_cb_count++; - uv_fs_req_cleanup(req); - r = uv_fs_fsync(loop, &fsync_req, open_req1.result, fsync_cb); - ASSERT(r == 0); -} - - -static void write_cb(uv_fs_t* req) { - int r; - ASSERT(req == &write_req); - ASSERT(req->fs_type == UV_FS_WRITE); - ASSERT(req->result >= 0); /* FIXME(bnoordhuis) Check if requested size? */ - write_cb_count++; - uv_fs_req_cleanup(req); - r = uv_fs_fdatasync(loop, &fdatasync_req, open_req1.result, fdatasync_cb); - ASSERT(r == 0); -} - - -static void create_cb(uv_fs_t* req) { - int r; - ASSERT(req == &open_req1); - ASSERT(req->fs_type == UV_FS_OPEN); - ASSERT(req->result >= 0); - create_cb_count++; - uv_fs_req_cleanup(req); - iov = uv_buf_init(test_buf, sizeof(test_buf)); - r = uv_fs_write(loop, &write_req, req->result, &iov, 1, -1, write_cb); - ASSERT(r == 0); -} - - -static void rename_cb(uv_fs_t* req) { - ASSERT(req == &rename_req); - ASSERT(req->fs_type == UV_FS_RENAME); - ASSERT(req->result == 0); - rename_cb_count++; - uv_fs_req_cleanup(req); -} - - -static void mkdir_cb(uv_fs_t* req) { - ASSERT(req == &mkdir_req); - ASSERT(req->fs_type == UV_FS_MKDIR); - ASSERT(req->result == 0); - mkdir_cb_count++; - ASSERT(req->path); - ASSERT(memcmp(req->path, "test_dir\0", 9) == 0); - uv_fs_req_cleanup(req); -} - - -static void check_mkdtemp_result(uv_fs_t* req) { - int r; - - ASSERT(req->fs_type == UV_FS_MKDTEMP); - ASSERT(req->result == 0); - ASSERT(req->path); - ASSERT(strlen(req->path) == 15); - ASSERT(memcmp(req->path, "test_dir_", 9) == 0); - ASSERT(memcmp(req->path + 9, "XXXXXX", 6) != 0); - check_permission(req->path, 0700); - - /* Check if req->path is actually a directory */ - r = uv_fs_stat(NULL, &stat_req, req->path, NULL); - ASSERT(r == 0); - ASSERT(((uv_stat_t*)stat_req.ptr)->st_mode & S_IFDIR); - uv_fs_req_cleanup(&stat_req); -} - - -static void mkdtemp_cb(uv_fs_t* req) { - ASSERT(req == &mkdtemp_req1); - check_mkdtemp_result(req); - mkdtemp_cb_count++; -} - - -static void rmdir_cb(uv_fs_t* req) { - ASSERT(req == &rmdir_req); - ASSERT(req->fs_type == UV_FS_RMDIR); - ASSERT(req->result == 0); - rmdir_cb_count++; - ASSERT(req->path); - ASSERT(memcmp(req->path, "test_dir\0", 9) == 0); - uv_fs_req_cleanup(req); -} - - -static void assert_is_file_type(uv_dirent_t dent) { -#ifdef HAVE_DIRENT_TYPES - /* - * For Apple and Windows, we know getdents is expected to work but for other - * environments, the filesystem dictates whether or not getdents supports - * returning the file type. - * - * See: - * http://man7.org/linux/man-pages/man2/getdents.2.html - * https://github.com/libuv/libuv/issues/501 - */ - #if defined(__APPLE__) || defined(_WIN32) - ASSERT(dent.type == UV_DIRENT_FILE); - #else - ASSERT(dent.type == UV_DIRENT_FILE || dent.type == UV_DIRENT_UNKNOWN); - #endif -#else - ASSERT(dent.type == UV_DIRENT_UNKNOWN); -#endif -} - - -static void scandir_cb(uv_fs_t* req) { - uv_dirent_t dent; - ASSERT(req == &scandir_req); - ASSERT(req->fs_type == UV_FS_SCANDIR); - ASSERT(req->result == 2); - ASSERT(req->ptr); - - while (UV_EOF != uv_fs_scandir_next(req, &dent)) { - ASSERT(strcmp(dent.name, "file1") == 0 || strcmp(dent.name, "file2") == 0); - assert_is_file_type(dent); - } - scandir_cb_count++; - ASSERT(req->path); - ASSERT(memcmp(req->path, "test_dir\0", 9) == 0); - uv_fs_req_cleanup(req); - ASSERT(!req->ptr); -} - - -static void empty_scandir_cb(uv_fs_t* req) { - uv_dirent_t dent; - - ASSERT(req == &scandir_req); - ASSERT(req->fs_type == UV_FS_SCANDIR); - ASSERT(req->result == 0); - ASSERT(req->ptr == NULL); - ASSERT(UV_EOF == uv_fs_scandir_next(req, &dent)); - uv_fs_req_cleanup(req); - scandir_cb_count++; -} - - -static void file_scandir_cb(uv_fs_t* req) { - ASSERT(req == &scandir_req); - ASSERT(req->fs_type == UV_FS_SCANDIR); - ASSERT(req->result == UV_ENOTDIR); - ASSERT(req->ptr == NULL); - uv_fs_req_cleanup(req); - scandir_cb_count++; -} - - -static void stat_cb(uv_fs_t* req) { - ASSERT(req == &stat_req); - ASSERT(req->fs_type == UV_FS_STAT || req->fs_type == UV_FS_LSTAT); - ASSERT(req->result == 0); - ASSERT(req->ptr); - stat_cb_count++; - uv_fs_req_cleanup(req); - ASSERT(!req->ptr); -} - - -static void sendfile_cb(uv_fs_t* req) { - ASSERT(req == &sendfile_req); - ASSERT(req->fs_type == UV_FS_SENDFILE); - ASSERT(req->result == 65546); - sendfile_cb_count++; - uv_fs_req_cleanup(req); -} - - -static void open_noent_cb(uv_fs_t* req) { - ASSERT(req->fs_type == UV_FS_OPEN); - ASSERT(req->result == UV_ENOENT); - open_cb_count++; - uv_fs_req_cleanup(req); -} - -static void open_nametoolong_cb(uv_fs_t* req) { - ASSERT(req->fs_type == UV_FS_OPEN); - ASSERT(req->result == UV_ENAMETOOLONG); - open_cb_count++; - uv_fs_req_cleanup(req); -} - -static void open_loop_cb(uv_fs_t* req) { - ASSERT(req->fs_type == UV_FS_OPEN); - ASSERT(req->result == UV_ELOOP); - open_cb_count++; - uv_fs_req_cleanup(req); -} - - -TEST_IMPL(fs_file_noent) { - uv_fs_t req; - int r; - - loop = uv_default_loop(); - - r = uv_fs_open(NULL, &req, "does_not_exist", O_RDONLY, 0, NULL); - ASSERT(r == UV_ENOENT); - ASSERT(req.result == UV_ENOENT); - uv_fs_req_cleanup(&req); - - r = uv_fs_open(loop, &req, "does_not_exist", O_RDONLY, 0, open_noent_cb); - ASSERT(r == 0); - - ASSERT(open_cb_count == 0); - uv_run(loop, UV_RUN_DEFAULT); - ASSERT(open_cb_count == 1); - - /* TODO add EACCES test */ - - MAKE_VALGRIND_HAPPY(); - return 0; -} - -TEST_IMPL(fs_file_nametoolong) { - uv_fs_t req; - int r; - char name[TOO_LONG_NAME_LENGTH + 1]; - - loop = uv_default_loop(); - - memset(name, 'a', TOO_LONG_NAME_LENGTH); - name[TOO_LONG_NAME_LENGTH] = 0; - - r = uv_fs_open(NULL, &req, name, O_RDONLY, 0, NULL); - ASSERT(r == UV_ENAMETOOLONG); - ASSERT(req.result == UV_ENAMETOOLONG); - uv_fs_req_cleanup(&req); - - r = uv_fs_open(loop, &req, name, O_RDONLY, 0, open_nametoolong_cb); - ASSERT(r == 0); - - ASSERT(open_cb_count == 0); - uv_run(loop, UV_RUN_DEFAULT); - ASSERT(open_cb_count == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - -TEST_IMPL(fs_file_loop) { - uv_fs_t req; - int r; - - loop = uv_default_loop(); - - unlink("test_symlink"); - r = uv_fs_symlink(NULL, &req, "test_symlink", "test_symlink", 0, NULL); -#ifdef _WIN32 - /* - * Windows XP and Server 2003 don't support symlinks; we'll get UV_ENOTSUP. - * Starting with vista they are supported, but only when elevated, otherwise - * we'll see UV_EPERM. - */ - if (r == UV_ENOTSUP || r == UV_EPERM) - return 0; -#endif - ASSERT(r == 0); - uv_fs_req_cleanup(&req); - - r = uv_fs_open(NULL, &req, "test_symlink", O_RDONLY, 0, NULL); - ASSERT(r == UV_ELOOP); - ASSERT(req.result == UV_ELOOP); - uv_fs_req_cleanup(&req); - - r = uv_fs_open(loop, &req, "test_symlink", O_RDONLY, 0, open_loop_cb); - ASSERT(r == 0); - - ASSERT(open_cb_count == 0); - uv_run(loop, UV_RUN_DEFAULT); - ASSERT(open_cb_count == 1); - - unlink("test_symlink"); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - -static void check_utime(const char* path, double atime, double mtime) { - uv_stat_t* s; - uv_fs_t req; - int r; - - r = uv_fs_stat(loop, &req, path, NULL); - ASSERT(r == 0); - - ASSERT(req.result == 0); - s = &req.statbuf; - - ASSERT(s->st_atim.tv_sec == atime); - ASSERT(s->st_mtim.tv_sec == mtime); - - uv_fs_req_cleanup(&req); -} - - -static void utime_cb(uv_fs_t* req) { - utime_check_t* c; - - ASSERT(req == &utime_req); - ASSERT(req->result == 0); - ASSERT(req->fs_type == UV_FS_UTIME); - - c = req->data; - check_utime(c->path, c->atime, c->mtime); - - uv_fs_req_cleanup(req); - utime_cb_count++; -} - - -static void futime_cb(uv_fs_t* req) { - utime_check_t* c; - - ASSERT(req == &futime_req); - ASSERT(req->result == 0); - ASSERT(req->fs_type == UV_FS_FUTIME); - - c = req->data; - check_utime(c->path, c->atime, c->mtime); - - uv_fs_req_cleanup(req); - futime_cb_count++; -} - - -TEST_IMPL(fs_file_async) { - int r; - - /* Setup. */ - unlink("test_file"); - unlink("test_file2"); - - loop = uv_default_loop(); - - r = uv_fs_open(loop, &open_req1, "test_file", O_WRONLY | O_CREAT, - S_IRUSR | S_IWUSR, create_cb); - ASSERT(r == 0); - uv_run(loop, UV_RUN_DEFAULT); - - ASSERT(create_cb_count == 1); - ASSERT(write_cb_count == 1); - ASSERT(fsync_cb_count == 1); - ASSERT(fdatasync_cb_count == 1); - ASSERT(close_cb_count == 1); - - r = uv_fs_rename(loop, &rename_req, "test_file", "test_file2", rename_cb); - ASSERT(r == 0); - - uv_run(loop, UV_RUN_DEFAULT); - ASSERT(create_cb_count == 1); - ASSERT(write_cb_count == 1); - ASSERT(close_cb_count == 1); - ASSERT(rename_cb_count == 1); - - r = uv_fs_open(loop, &open_req1, "test_file2", O_RDWR, 0, open_cb); - ASSERT(r == 0); - - uv_run(loop, UV_RUN_DEFAULT); - ASSERT(open_cb_count == 1); - ASSERT(read_cb_count == 1); - ASSERT(close_cb_count == 2); - ASSERT(rename_cb_count == 1); - ASSERT(create_cb_count == 1); - ASSERT(write_cb_count == 1); - ASSERT(ftruncate_cb_count == 1); - - r = uv_fs_open(loop, &open_req1, "test_file2", O_RDONLY, 0, open_cb); - ASSERT(r == 0); - - uv_run(loop, UV_RUN_DEFAULT); - ASSERT(open_cb_count == 2); - ASSERT(read_cb_count == 2); - ASSERT(close_cb_count == 3); - ASSERT(rename_cb_count == 1); - ASSERT(unlink_cb_count == 1); - ASSERT(create_cb_count == 1); - ASSERT(write_cb_count == 1); - ASSERT(ftruncate_cb_count == 1); - - /* Cleanup. */ - unlink("test_file"); - unlink("test_file2"); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(fs_file_sync) { - int r; - - /* Setup. */ - unlink("test_file"); - unlink("test_file2"); - - loop = uv_default_loop(); - - r = uv_fs_open(loop, &open_req1, "test_file", O_WRONLY | O_CREAT, - S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(open_req1.result >= 0); - uv_fs_req_cleanup(&open_req1); - - iov = uv_buf_init(test_buf, sizeof(test_buf)); - r = uv_fs_write(NULL, &write_req, open_req1.result, &iov, 1, -1, NULL); - ASSERT(r >= 0); - ASSERT(write_req.result >= 0); - uv_fs_req_cleanup(&write_req); - - r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); - ASSERT(close_req.result == 0); - uv_fs_req_cleanup(&close_req); - - r = uv_fs_open(NULL, &open_req1, "test_file", O_RDWR, 0, NULL); - ASSERT(r >= 0); - ASSERT(open_req1.result >= 0); - uv_fs_req_cleanup(&open_req1); - - iov = uv_buf_init(buf, sizeof(buf)); - r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, -1, NULL); - ASSERT(r >= 0); - ASSERT(read_req.result >= 0); - ASSERT(strcmp(buf, test_buf) == 0); - uv_fs_req_cleanup(&read_req); - - r = uv_fs_ftruncate(NULL, &ftruncate_req, open_req1.result, 7, NULL); - ASSERT(r == 0); - ASSERT(ftruncate_req.result == 0); - uv_fs_req_cleanup(&ftruncate_req); - - r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); - ASSERT(close_req.result == 0); - uv_fs_req_cleanup(&close_req); - - r = uv_fs_rename(NULL, &rename_req, "test_file", "test_file2", NULL); - ASSERT(r == 0); - ASSERT(rename_req.result == 0); - uv_fs_req_cleanup(&rename_req); - - r = uv_fs_open(NULL, &open_req1, "test_file2", O_RDONLY, 0, NULL); - ASSERT(r >= 0); - ASSERT(open_req1.result >= 0); - uv_fs_req_cleanup(&open_req1); - - memset(buf, 0, sizeof(buf)); - iov = uv_buf_init(buf, sizeof(buf)); - r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, -1, NULL); - ASSERT(r >= 0); - ASSERT(read_req.result >= 0); - ASSERT(strcmp(buf, "test-bu") == 0); - uv_fs_req_cleanup(&read_req); - - r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); - ASSERT(close_req.result == 0); - uv_fs_req_cleanup(&close_req); - - r = uv_fs_unlink(NULL, &unlink_req, "test_file2", NULL); - ASSERT(r == 0); - ASSERT(unlink_req.result == 0); - uv_fs_req_cleanup(&unlink_req); - - /* Cleanup */ - unlink("test_file"); - unlink("test_file2"); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(fs_file_write_null_buffer) { - int r; - - /* Setup. */ - unlink("test_file"); - - loop = uv_default_loop(); - - r = uv_fs_open(NULL, &open_req1, "test_file", O_WRONLY | O_CREAT, - S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(open_req1.result >= 0); - uv_fs_req_cleanup(&open_req1); - - iov = uv_buf_init(NULL, 0); - r = uv_fs_write(NULL, &write_req, open_req1.result, &iov, 1, -1, NULL); - ASSERT(r == 0); - ASSERT(write_req.result == 0); - uv_fs_req_cleanup(&write_req); - - r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); - ASSERT(close_req.result == 0); - uv_fs_req_cleanup(&close_req); - - unlink("test_file"); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(fs_async_dir) { - int r; - uv_dirent_t dent; - - /* Setup */ - unlink("test_dir/file1"); - unlink("test_dir/file2"); - rmdir("test_dir"); - - loop = uv_default_loop(); - - r = uv_fs_mkdir(loop, &mkdir_req, "test_dir", 0755, mkdir_cb); - ASSERT(r == 0); - - uv_run(loop, UV_RUN_DEFAULT); - ASSERT(mkdir_cb_count == 1); - - /* Create 2 files synchronously. */ - r = uv_fs_open(NULL, &open_req1, "test_dir/file1", O_WRONLY | O_CREAT, - S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - uv_fs_req_cleanup(&open_req1); - r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); - uv_fs_req_cleanup(&close_req); - - r = uv_fs_open(NULL, &open_req1, "test_dir/file2", O_WRONLY | O_CREAT, - S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - uv_fs_req_cleanup(&open_req1); - r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); - uv_fs_req_cleanup(&close_req); - - r = uv_fs_scandir(loop, &scandir_req, "test_dir", 0, scandir_cb); - ASSERT(r == 0); - - uv_run(loop, UV_RUN_DEFAULT); - ASSERT(scandir_cb_count == 1); - - /* sync uv_fs_scandir */ - r = uv_fs_scandir(NULL, &scandir_req, "test_dir", 0, NULL); - ASSERT(r == 2); - ASSERT(scandir_req.result == 2); - ASSERT(scandir_req.ptr); - while (UV_EOF != uv_fs_scandir_next(&scandir_req, &dent)) { - ASSERT(strcmp(dent.name, "file1") == 0 || strcmp(dent.name, "file2") == 0); - assert_is_file_type(dent); - } - uv_fs_req_cleanup(&scandir_req); - ASSERT(!scandir_req.ptr); - - r = uv_fs_stat(loop, &stat_req, "test_dir", stat_cb); - ASSERT(r == 0); - uv_run(loop, UV_RUN_DEFAULT); - - r = uv_fs_stat(loop, &stat_req, "test_dir/", stat_cb); - ASSERT(r == 0); - uv_run(loop, UV_RUN_DEFAULT); - - r = uv_fs_lstat(loop, &stat_req, "test_dir", stat_cb); - ASSERT(r == 0); - uv_run(loop, UV_RUN_DEFAULT); - - r = uv_fs_lstat(loop, &stat_req, "test_dir/", stat_cb); - ASSERT(r == 0); - uv_run(loop, UV_RUN_DEFAULT); - - ASSERT(stat_cb_count == 4); - - r = uv_fs_unlink(loop, &unlink_req, "test_dir/file1", unlink_cb); - ASSERT(r == 0); - uv_run(loop, UV_RUN_DEFAULT); - ASSERT(unlink_cb_count == 1); - - r = uv_fs_unlink(loop, &unlink_req, "test_dir/file2", unlink_cb); - ASSERT(r == 0); - uv_run(loop, UV_RUN_DEFAULT); - ASSERT(unlink_cb_count == 2); - - r = uv_fs_rmdir(loop, &rmdir_req, "test_dir", rmdir_cb); - ASSERT(r == 0); - uv_run(loop, UV_RUN_DEFAULT); - ASSERT(rmdir_cb_count == 1); - - /* Cleanup */ - unlink("test_dir/file1"); - unlink("test_dir/file2"); - rmdir("test_dir"); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(fs_async_sendfile) { - int f, r; - struct stat s1, s2; - - loop = uv_default_loop(); - - /* Setup. */ - unlink("test_file"); - unlink("test_file2"); - - f = open("test_file", O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR); - ASSERT(f != -1); - - r = write(f, "begin\n", 6); - ASSERT(r == 6); - - r = lseek(f, 65536, SEEK_CUR); - ASSERT(r == 65542); - - r = write(f, "end\n", 4); - ASSERT(r != -1); - - r = close(f); - ASSERT(r == 0); - - /* Test starts here. */ - r = uv_fs_open(NULL, &open_req1, "test_file", O_RDWR, 0, NULL); - ASSERT(r >= 0); - ASSERT(open_req1.result >= 0); - uv_fs_req_cleanup(&open_req1); - - r = uv_fs_open(NULL, &open_req2, "test_file2", O_WRONLY | O_CREAT, - S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(open_req2.result >= 0); - uv_fs_req_cleanup(&open_req2); - - r = uv_fs_sendfile(loop, &sendfile_req, open_req2.result, open_req1.result, - 0, 131072, sendfile_cb); - ASSERT(r == 0); - uv_run(loop, UV_RUN_DEFAULT); - - ASSERT(sendfile_cb_count == 1); - - r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); - uv_fs_req_cleanup(&close_req); - r = uv_fs_close(NULL, &close_req, open_req2.result, NULL); - ASSERT(r == 0); - uv_fs_req_cleanup(&close_req); - - stat("test_file", &s1); - stat("test_file2", &s2); - ASSERT(65546 == s2.st_size && s1.st_size == s2.st_size); - - /* Cleanup. */ - unlink("test_file"); - unlink("test_file2"); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(fs_mkdtemp) { - int r; - const char* path_template = "test_dir_XXXXXX"; - - loop = uv_default_loop(); - - r = uv_fs_mkdtemp(loop, &mkdtemp_req1, path_template, mkdtemp_cb); - ASSERT(r == 0); - - uv_run(loop, UV_RUN_DEFAULT); - ASSERT(mkdtemp_cb_count == 1); - - /* sync mkdtemp */ - r = uv_fs_mkdtemp(NULL, &mkdtemp_req2, path_template, NULL); - ASSERT(r == 0); - check_mkdtemp_result(&mkdtemp_req2); - - /* mkdtemp return different values on subsequent calls */ - ASSERT(strcmp(mkdtemp_req1.path, mkdtemp_req2.path) != 0); - - /* Cleanup */ - rmdir(mkdtemp_req1.path); - rmdir(mkdtemp_req2.path); - uv_fs_req_cleanup(&mkdtemp_req1); - uv_fs_req_cleanup(&mkdtemp_req2); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(fs_fstat) { - int r; - uv_fs_t req; - uv_file file; - uv_stat_t* s; -#ifndef _WIN32 - struct stat t; -#endif - - /* Setup. */ - unlink("test_file"); - - loop = uv_default_loop(); - - r = uv_fs_open(NULL, &req, "test_file", O_RDWR | O_CREAT, - S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(req.result >= 0); - file = req.result; - uv_fs_req_cleanup(&req); - - iov = uv_buf_init(test_buf, sizeof(test_buf)); - r = uv_fs_write(NULL, &req, file, &iov, 1, -1, NULL); - ASSERT(r == sizeof(test_buf)); - ASSERT(req.result == sizeof(test_buf)); - uv_fs_req_cleanup(&req); - - r = uv_fs_fstat(NULL, &req, file, NULL); - ASSERT(r == 0); - ASSERT(req.result == 0); - s = req.ptr; - ASSERT(s->st_size == sizeof(test_buf)); - -#ifndef _WIN32 - r = fstat(file, &t); - ASSERT(r == 0); - - ASSERT(s->st_dev == (uint64_t) t.st_dev); - ASSERT(s->st_mode == (uint64_t) t.st_mode); - ASSERT(s->st_nlink == (uint64_t) t.st_nlink); - ASSERT(s->st_uid == (uint64_t) t.st_uid); - ASSERT(s->st_gid == (uint64_t) t.st_gid); - ASSERT(s->st_rdev == (uint64_t) t.st_rdev); - ASSERT(s->st_ino == (uint64_t) t.st_ino); - ASSERT(s->st_size == (uint64_t) t.st_size); - ASSERT(s->st_blksize == (uint64_t) t.st_blksize); - ASSERT(s->st_blocks == (uint64_t) t.st_blocks); -#if defined(__APPLE__) - ASSERT(s->st_atim.tv_sec == t.st_atimespec.tv_sec); - ASSERT(s->st_atim.tv_nsec == t.st_atimespec.tv_nsec); - ASSERT(s->st_mtim.tv_sec == t.st_mtimespec.tv_sec); - ASSERT(s->st_mtim.tv_nsec == t.st_mtimespec.tv_nsec); - ASSERT(s->st_ctim.tv_sec == t.st_ctimespec.tv_sec); - ASSERT(s->st_ctim.tv_nsec == t.st_ctimespec.tv_nsec); - ASSERT(s->st_birthtim.tv_sec == t.st_birthtimespec.tv_sec); - ASSERT(s->st_birthtim.tv_nsec == t.st_birthtimespec.tv_nsec); - ASSERT(s->st_flags == t.st_flags); - ASSERT(s->st_gen == t.st_gen); -#elif defined(_AIX) - ASSERT(s->st_atim.tv_sec == t.st_atime); - ASSERT(s->st_atim.tv_nsec == 0); - ASSERT(s->st_mtim.tv_sec == t.st_mtime); - ASSERT(s->st_mtim.tv_nsec == 0); - ASSERT(s->st_ctim.tv_sec == t.st_ctime); - ASSERT(s->st_ctim.tv_nsec == 0); -#elif defined(__sun) || \ - defined(_BSD_SOURCE) || \ - defined(_SVID_SOURCE) || \ - defined(_XOPEN_SOURCE) || \ - defined(_DEFAULT_SOURCE) - ASSERT(s->st_atim.tv_sec == t.st_atim.tv_sec); - ASSERT(s->st_atim.tv_nsec == t.st_atim.tv_nsec); - ASSERT(s->st_mtim.tv_sec == t.st_mtim.tv_sec); - ASSERT(s->st_mtim.tv_nsec == t.st_mtim.tv_nsec); - ASSERT(s->st_ctim.tv_sec == t.st_ctim.tv_sec); - ASSERT(s->st_ctim.tv_nsec == t.st_ctim.tv_nsec); -# if defined(__DragonFly__) || \ - defined(__FreeBSD__) || \ - defined(__OpenBSD__) || \ - defined(__NetBSD__) - ASSERT(s->st_birthtim.tv_sec == t.st_birthtim.tv_sec); - ASSERT(s->st_birthtim.tv_nsec == t.st_birthtim.tv_nsec); - ASSERT(s->st_flags == t.st_flags); - ASSERT(s->st_gen == t.st_gen); -# endif -#else - ASSERT(s->st_atim.tv_sec == t.st_atime); - ASSERT(s->st_atim.tv_nsec == 0); - ASSERT(s->st_mtim.tv_sec == t.st_mtime); - ASSERT(s->st_mtim.tv_nsec == 0); - ASSERT(s->st_ctim.tv_sec == t.st_ctime); - ASSERT(s->st_ctim.tv_nsec == 0); -#endif -#endif - - uv_fs_req_cleanup(&req); - - /* Now do the uv_fs_fstat call asynchronously */ - r = uv_fs_fstat(loop, &req, file, fstat_cb); - ASSERT(r == 0); - uv_run(loop, UV_RUN_DEFAULT); - ASSERT(fstat_cb_count == 1); - - - r = uv_fs_close(NULL, &req, file, NULL); - ASSERT(r == 0); - ASSERT(req.result == 0); - uv_fs_req_cleanup(&req); - - /* - * Run the loop just to check we don't have make any extraneous uv_ref() - * calls. This should drop out immediately. - */ - uv_run(loop, UV_RUN_DEFAULT); - - /* Cleanup. */ - unlink("test_file"); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(fs_access) { - int r; - uv_fs_t req; - uv_file file; - - /* Setup. */ - unlink("test_file"); - rmdir("test_dir"); - - loop = uv_default_loop(); - - /* File should not exist */ - r = uv_fs_access(NULL, &req, "test_file", F_OK, NULL); - ASSERT(r < 0); - ASSERT(req.result < 0); - uv_fs_req_cleanup(&req); - - /* File should not exist */ - r = uv_fs_access(loop, &req, "test_file", F_OK, access_cb); - ASSERT(r == 0); - uv_run(loop, UV_RUN_DEFAULT); - ASSERT(access_cb_count == 1); - access_cb_count = 0; /* reset for the next test */ - - /* Create file */ - r = uv_fs_open(NULL, &req, "test_file", O_RDWR | O_CREAT, - S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(req.result >= 0); - file = req.result; - uv_fs_req_cleanup(&req); - - /* File should exist */ - r = uv_fs_access(NULL, &req, "test_file", F_OK, NULL); - ASSERT(r == 0); - ASSERT(req.result == 0); - uv_fs_req_cleanup(&req); - - /* File should exist */ - r = uv_fs_access(loop, &req, "test_file", F_OK, access_cb); - ASSERT(r == 0); - uv_run(loop, UV_RUN_DEFAULT); - ASSERT(access_cb_count == 1); - access_cb_count = 0; /* reset for the next test */ - - /* Close file */ - r = uv_fs_close(NULL, &req, file, NULL); - ASSERT(r == 0); - ASSERT(req.result == 0); - uv_fs_req_cleanup(&req); - - /* Directory access */ - r = uv_fs_mkdir(NULL, &req, "test_dir", 0777, NULL); - ASSERT(r == 0); - uv_fs_req_cleanup(&req); - - r = uv_fs_access(NULL, &req, "test_dir", W_OK, NULL); - ASSERT(r == 0); - ASSERT(req.result == 0); - uv_fs_req_cleanup(&req); - - /* - * Run the loop just to check we don't have make any extraneous uv_ref() - * calls. This should drop out immediately. - */ - uv_run(loop, UV_RUN_DEFAULT); - - /* Cleanup. */ - unlink("test_file"); - rmdir("test_dir"); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(fs_chmod) { - int r; - uv_fs_t req; - uv_file file; - - /* Setup. */ - unlink("test_file"); - - loop = uv_default_loop(); - - r = uv_fs_open(NULL, &req, "test_file", O_RDWR | O_CREAT, - S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(req.result >= 0); - file = req.result; - uv_fs_req_cleanup(&req); - - iov = uv_buf_init(test_buf, sizeof(test_buf)); - r = uv_fs_write(NULL, &req, file, &iov, 1, -1, NULL); - ASSERT(r == sizeof(test_buf)); - ASSERT(req.result == sizeof(test_buf)); - uv_fs_req_cleanup(&req); - -#ifndef _WIN32 - /* Make the file write-only */ - r = uv_fs_chmod(NULL, &req, "test_file", 0200, NULL); - ASSERT(r == 0); - ASSERT(req.result == 0); - uv_fs_req_cleanup(&req); - - check_permission("test_file", 0200); -#endif - - /* Make the file read-only */ - r = uv_fs_chmod(NULL, &req, "test_file", 0400, NULL); - ASSERT(r == 0); - ASSERT(req.result == 0); - uv_fs_req_cleanup(&req); - - check_permission("test_file", 0400); - - /* Make the file read+write with sync uv_fs_fchmod */ - r = uv_fs_fchmod(NULL, &req, file, 0600, NULL); - ASSERT(r == 0); - ASSERT(req.result == 0); - uv_fs_req_cleanup(&req); - - check_permission("test_file", 0600); - -#ifndef _WIN32 - /* async chmod */ - { - static int mode = 0200; - req.data = &mode; - } - r = uv_fs_chmod(loop, &req, "test_file", 0200, chmod_cb); - ASSERT(r == 0); - uv_run(loop, UV_RUN_DEFAULT); - ASSERT(chmod_cb_count == 1); - chmod_cb_count = 0; /* reset for the next test */ -#endif - - /* async chmod */ - { - static int mode = 0400; - req.data = &mode; - } - r = uv_fs_chmod(loop, &req, "test_file", 0400, chmod_cb); - ASSERT(r == 0); - uv_run(loop, UV_RUN_DEFAULT); - ASSERT(chmod_cb_count == 1); - - /* async fchmod */ - { - static int mode = 0600; - req.data = &mode; - } - r = uv_fs_fchmod(loop, &req, file, 0600, fchmod_cb); - ASSERT(r == 0); - uv_run(loop, UV_RUN_DEFAULT); - ASSERT(fchmod_cb_count == 1); - - close(file); - - /* - * Run the loop just to check we don't have make any extraneous uv_ref() - * calls. This should drop out immediately. - */ - uv_run(loop, UV_RUN_DEFAULT); - - /* Cleanup. */ - unlink("test_file"); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(fs_unlink_readonly) { - int r; - uv_fs_t req; - uv_file file; - - /* Setup. */ - unlink("test_file"); - - loop = uv_default_loop(); - - r = uv_fs_open(NULL, - &req, - "test_file", - O_RDWR | O_CREAT, - S_IWUSR | S_IRUSR, - NULL); - ASSERT(r >= 0); - ASSERT(req.result >= 0); - file = req.result; - uv_fs_req_cleanup(&req); - - iov = uv_buf_init(test_buf, sizeof(test_buf)); - r = uv_fs_write(NULL, &req, file, &iov, 1, -1, NULL); - ASSERT(r == sizeof(test_buf)); - ASSERT(req.result == sizeof(test_buf)); - uv_fs_req_cleanup(&req); - - close(file); - - /* Make the file read-only */ - r = uv_fs_chmod(NULL, &req, "test_file", 0400, NULL); - ASSERT(r == 0); - ASSERT(req.result == 0); - uv_fs_req_cleanup(&req); - - check_permission("test_file", 0400); - - /* Try to unlink the file */ - r = uv_fs_unlink(NULL, &req, "test_file", NULL); - ASSERT(r == 0); - ASSERT(req.result == 0); - uv_fs_req_cleanup(&req); - - /* - * Run the loop just to check we don't have make any extraneous uv_ref() - * calls. This should drop out immediately. - */ - uv_run(loop, UV_RUN_DEFAULT); - - /* Cleanup. */ - uv_fs_chmod(NULL, &req, "test_file", 0600, NULL); - uv_fs_req_cleanup(&req); - unlink("test_file"); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(fs_chown) { - int r; - uv_fs_t req; - uv_file file; - - /* Setup. */ - unlink("test_file"); - - loop = uv_default_loop(); - - r = uv_fs_open(NULL, &req, "test_file", O_RDWR | O_CREAT, - S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(req.result >= 0); - file = req.result; - uv_fs_req_cleanup(&req); - - /* sync chown */ - r = uv_fs_chown(NULL, &req, "test_file", -1, -1, NULL); - ASSERT(r == 0); - ASSERT(req.result == 0); - uv_fs_req_cleanup(&req); - - /* sync fchown */ - r = uv_fs_fchown(NULL, &req, file, -1, -1, NULL); - ASSERT(r == 0); - ASSERT(req.result == 0); - uv_fs_req_cleanup(&req); - - /* async chown */ - r = uv_fs_chown(loop, &req, "test_file", -1, -1, chown_cb); - ASSERT(r == 0); - uv_run(loop, UV_RUN_DEFAULT); - ASSERT(chown_cb_count == 1); - - /* chown to root (fail) */ - chown_cb_count = 0; - r = uv_fs_chown(loop, &req, "test_file", 0, 0, chown_root_cb); - uv_run(loop, UV_RUN_DEFAULT); - ASSERT(chown_cb_count == 1); - - /* async fchown */ - r = uv_fs_fchown(loop, &req, file, -1, -1, fchown_cb); - ASSERT(r == 0); - uv_run(loop, UV_RUN_DEFAULT); - ASSERT(fchown_cb_count == 1); - - close(file); - - /* - * Run the loop just to check we don't have make any extraneous uv_ref() - * calls. This should drop out immediately. - */ - uv_run(loop, UV_RUN_DEFAULT); - - /* Cleanup. */ - unlink("test_file"); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(fs_link) { - int r; - uv_fs_t req; - uv_file file; - uv_file link; - - /* Setup. */ - unlink("test_file"); - unlink("test_file_link"); - unlink("test_file_link2"); - - loop = uv_default_loop(); - - r = uv_fs_open(NULL, &req, "test_file", O_RDWR | O_CREAT, - S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(req.result >= 0); - file = req.result; - uv_fs_req_cleanup(&req); - - iov = uv_buf_init(test_buf, sizeof(test_buf)); - r = uv_fs_write(NULL, &req, file, &iov, 1, -1, NULL); - ASSERT(r == sizeof(test_buf)); - ASSERT(req.result == sizeof(test_buf)); - uv_fs_req_cleanup(&req); - - close(file); - - /* sync link */ - r = uv_fs_link(NULL, &req, "test_file", "test_file_link", NULL); - ASSERT(r == 0); - ASSERT(req.result == 0); - uv_fs_req_cleanup(&req); - - r = uv_fs_open(NULL, &req, "test_file_link", O_RDWR, 0, NULL); - ASSERT(r >= 0); - ASSERT(req.result >= 0); - link = req.result; - uv_fs_req_cleanup(&req); - - memset(buf, 0, sizeof(buf)); - iov = uv_buf_init(buf, sizeof(buf)); - r = uv_fs_read(NULL, &req, link, &iov, 1, 0, NULL); - ASSERT(r >= 0); - ASSERT(req.result >= 0); - ASSERT(strcmp(buf, test_buf) == 0); - - close(link); - - /* async link */ - r = uv_fs_link(loop, &req, "test_file", "test_file_link2", link_cb); - ASSERT(r == 0); - uv_run(loop, UV_RUN_DEFAULT); - ASSERT(link_cb_count == 1); - - r = uv_fs_open(NULL, &req, "test_file_link2", O_RDWR, 0, NULL); - ASSERT(r >= 0); - ASSERT(req.result >= 0); - link = req.result; - uv_fs_req_cleanup(&req); - - memset(buf, 0, sizeof(buf)); - iov = uv_buf_init(buf, sizeof(buf)); - r = uv_fs_read(NULL, &req, link, &iov, 1, 0, NULL); - ASSERT(r >= 0); - ASSERT(req.result >= 0); - ASSERT(strcmp(buf, test_buf) == 0); - - close(link); - - /* - * Run the loop just to check we don't have make any extraneous uv_ref() - * calls. This should drop out immediately. - */ - uv_run(loop, UV_RUN_DEFAULT); - - /* Cleanup. */ - unlink("test_file"); - unlink("test_file_link"); - unlink("test_file_link2"); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(fs_readlink) { - uv_fs_t req; - - loop = uv_default_loop(); - ASSERT(0 == uv_fs_readlink(loop, &req, "no_such_file", dummy_cb)); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - ASSERT(dummy_cb_count == 1); - ASSERT(req.ptr == NULL); - ASSERT(req.result == UV_ENOENT); - uv_fs_req_cleanup(&req); - - ASSERT(UV_ENOENT == uv_fs_readlink(NULL, &req, "no_such_file", NULL)); - ASSERT(req.ptr == NULL); - ASSERT(req.result == UV_ENOENT); - uv_fs_req_cleanup(&req); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(fs_symlink) { - int r; - uv_fs_t req; - uv_file file; - uv_file link; - - /* Setup. */ - unlink("test_file"); - unlink("test_file_symlink"); - unlink("test_file_symlink2"); - unlink("test_file_symlink_symlink"); - unlink("test_file_symlink2_symlink"); - - loop = uv_default_loop(); - - r = uv_fs_open(NULL, &req, "test_file", O_RDWR | O_CREAT, - S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(req.result >= 0); - file = req.result; - uv_fs_req_cleanup(&req); - - iov = uv_buf_init(test_buf, sizeof(test_buf)); - r = uv_fs_write(NULL, &req, file, &iov, 1, -1, NULL); - ASSERT(r == sizeof(test_buf)); - ASSERT(req.result == sizeof(test_buf)); - uv_fs_req_cleanup(&req); - - close(file); - - /* sync symlink */ - r = uv_fs_symlink(NULL, &req, "test_file", "test_file_symlink", 0, NULL); -#ifdef _WIN32 - if (r < 0) { - if (r == UV_ENOTSUP) { - /* - * Windows doesn't support symlinks on older versions. - * We just pass the test and bail out early if we get ENOTSUP. - */ - return 0; - } else if (r == UV_EPERM) { - /* - * Creating a symlink is only allowed when running elevated. - * We pass the test and bail out early if we get UV_EPERM. - */ - return 0; - } - } -#endif - ASSERT(r == 0); - ASSERT(req.result == 0); - uv_fs_req_cleanup(&req); - - r = uv_fs_open(NULL, &req, "test_file_symlink", O_RDWR, 0, NULL); - ASSERT(r >= 0); - ASSERT(req.result >= 0); - link = req.result; - uv_fs_req_cleanup(&req); - - memset(buf, 0, sizeof(buf)); - iov = uv_buf_init(buf, sizeof(buf)); - r = uv_fs_read(NULL, &req, link, &iov, 1, 0, NULL); - ASSERT(r >= 0); - ASSERT(req.result >= 0); - ASSERT(strcmp(buf, test_buf) == 0); - - close(link); - - r = uv_fs_symlink(NULL, - &req, - "test_file_symlink", - "test_file_symlink_symlink", - 0, - NULL); - ASSERT(r == 0); - uv_fs_req_cleanup(&req); - - r = uv_fs_readlink(NULL, &req, "test_file_symlink_symlink", NULL); - ASSERT(r == 0); - ASSERT(strcmp(req.ptr, "test_file_symlink") == 0); - uv_fs_req_cleanup(&req); - - /* async link */ - r = uv_fs_symlink(loop, - &req, - "test_file", - "test_file_symlink2", - 0, - symlink_cb); - ASSERT(r == 0); - uv_run(loop, UV_RUN_DEFAULT); - ASSERT(symlink_cb_count == 1); - - r = uv_fs_open(NULL, &req, "test_file_symlink2", O_RDWR, 0, NULL); - ASSERT(r >= 0); - ASSERT(req.result >= 0); - link = req.result; - uv_fs_req_cleanup(&req); - - memset(buf, 0, sizeof(buf)); - iov = uv_buf_init(buf, sizeof(buf)); - r = uv_fs_read(NULL, &req, link, &iov, 1, 0, NULL); - ASSERT(r >= 0); - ASSERT(req.result >= 0); - ASSERT(strcmp(buf, test_buf) == 0); - - close(link); - - r = uv_fs_symlink(NULL, - &req, - "test_file_symlink2", - "test_file_symlink2_symlink", - 0, - NULL); - ASSERT(r == 0); - uv_fs_req_cleanup(&req); - - r = uv_fs_readlink(loop, &req, "test_file_symlink2_symlink", readlink_cb); - ASSERT(r == 0); - uv_run(loop, UV_RUN_DEFAULT); - ASSERT(readlink_cb_count == 1); - - /* - * Run the loop just to check we don't have make any extraneous uv_ref() - * calls. This should drop out immediately. - */ - uv_run(loop, UV_RUN_DEFAULT); - - /* Cleanup. */ - unlink("test_file"); - unlink("test_file_symlink"); - unlink("test_file_symlink_symlink"); - unlink("test_file_symlink2"); - unlink("test_file_symlink2_symlink"); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(fs_symlink_dir) { - uv_fs_t req; - int r; - char* test_dir; - uv_dirent_t dent; - - /* set-up */ - unlink("test_dir/file1"); - unlink("test_dir/file2"); - rmdir("test_dir"); - rmdir("test_dir_symlink"); - - loop = uv_default_loop(); - - uv_fs_mkdir(NULL, &req, "test_dir", 0777, NULL); - uv_fs_req_cleanup(&req); - -#ifdef _WIN32 - { - static char src_path_buf[PATHMAX]; - size_t size; - size = sizeof(src_path_buf); - strcpy(src_path_buf, "\\\\?\\"); - uv_cwd(src_path_buf + 4, &size); - strcat(src_path_buf, "\\test_dir\\"); - test_dir = src_path_buf; - } -#else - test_dir = "test_dir"; -#endif - - r = uv_fs_symlink(NULL, &req, test_dir, "test_dir_symlink", - UV_FS_SYMLINK_JUNCTION, NULL); - fprintf(stderr, "r == %i\n", r); - ASSERT(r == 0); - ASSERT(req.result == 0); - uv_fs_req_cleanup(&req); - - r = uv_fs_stat(NULL, &req, "test_dir_symlink", NULL); - ASSERT(r == 0); - ASSERT(((uv_stat_t*)req.ptr)->st_mode & S_IFDIR); - uv_fs_req_cleanup(&req); - - r = uv_fs_lstat(NULL, &req, "test_dir_symlink", NULL); - ASSERT(r == 0); - ASSERT(((uv_stat_t*)req.ptr)->st_mode & S_IFLNK); -#ifdef _WIN32 - ASSERT(((uv_stat_t*)req.ptr)->st_size == strlen(test_dir + 4)); -#else - ASSERT(((uv_stat_t*)req.ptr)->st_size == strlen(test_dir)); -#endif - uv_fs_req_cleanup(&req); - - r = uv_fs_readlink(NULL, &req, "test_dir_symlink", NULL); - ASSERT(r == 0); -#ifdef _WIN32 - ASSERT(strcmp(req.ptr, test_dir + 4) == 0); -#else - ASSERT(strcmp(req.ptr, test_dir) == 0); -#endif - uv_fs_req_cleanup(&req); - - r = uv_fs_open(NULL, &open_req1, "test_dir/file1", O_WRONLY | O_CREAT, - S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - uv_fs_req_cleanup(&open_req1); - r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); - uv_fs_req_cleanup(&close_req); - - r = uv_fs_open(NULL, &open_req1, "test_dir/file2", O_WRONLY | O_CREAT, - S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - uv_fs_req_cleanup(&open_req1); - r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); - uv_fs_req_cleanup(&close_req); - - r = uv_fs_scandir(NULL, &scandir_req, "test_dir_symlink", 0, NULL); - ASSERT(r == 2); - ASSERT(scandir_req.result == 2); - ASSERT(scandir_req.ptr); - while (UV_EOF != uv_fs_scandir_next(&scandir_req, &dent)) { - ASSERT(strcmp(dent.name, "file1") == 0 || strcmp(dent.name, "file2") == 0); - assert_is_file_type(dent); - } - uv_fs_req_cleanup(&scandir_req); - ASSERT(!scandir_req.ptr); - - /* unlink will remove the directory symlink */ - r = uv_fs_unlink(NULL, &req, "test_dir_symlink", NULL); - ASSERT(r == 0); - uv_fs_req_cleanup(&req); - - r = uv_fs_scandir(NULL, &scandir_req, "test_dir_symlink", 0, NULL); - ASSERT(r == UV_ENOENT); - uv_fs_req_cleanup(&scandir_req); - - r = uv_fs_scandir(NULL, &scandir_req, "test_dir", 0, NULL); - ASSERT(r == 2); - ASSERT(scandir_req.result == 2); - ASSERT(scandir_req.ptr); - while (UV_EOF != uv_fs_scandir_next(&scandir_req, &dent)) { - ASSERT(strcmp(dent.name, "file1") == 0 || strcmp(dent.name, "file2") == 0); - assert_is_file_type(dent); - } - uv_fs_req_cleanup(&scandir_req); - ASSERT(!scandir_req.ptr); - - /* clean-up */ - unlink("test_dir/file1"); - unlink("test_dir/file2"); - rmdir("test_dir"); - rmdir("test_dir_symlink"); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(fs_utime) { - utime_check_t checkme; - const char* path = "test_file"; - double atime; - double mtime; - uv_fs_t req; - int r; - - /* Setup. */ - loop = uv_default_loop(); - unlink(path); - r = uv_fs_open(NULL, &req, path, O_RDWR | O_CREAT, S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(req.result >= 0); - uv_fs_req_cleanup(&req); - close(r); - - atime = mtime = 400497753; /* 1982-09-10 11:22:33 */ - - r = uv_fs_utime(NULL, &req, path, atime, mtime, NULL); - ASSERT(r == 0); - ASSERT(req.result == 0); - uv_fs_req_cleanup(&req); - - r = uv_fs_stat(NULL, &req, path, NULL); - ASSERT(r == 0); - ASSERT(req.result == 0); - check_utime(path, atime, mtime); - uv_fs_req_cleanup(&req); - - atime = mtime = 1291404900; /* 2010-12-03 20:35:00 - mees <3 */ - checkme.path = path; - checkme.atime = atime; - checkme.mtime = mtime; - - /* async utime */ - utime_req.data = &checkme; - r = uv_fs_utime(loop, &utime_req, path, atime, mtime, utime_cb); - ASSERT(r == 0); - uv_run(loop, UV_RUN_DEFAULT); - ASSERT(utime_cb_count == 1); - - /* Cleanup. */ - unlink(path); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -#ifdef _WIN32 -TEST_IMPL(fs_stat_root) { - int r; - uv_loop_t* loop = uv_default_loop(); - - r = uv_fs_stat(NULL, &stat_req, "\\", NULL); - ASSERT(r == 0); - - r = uv_fs_stat(NULL, &stat_req, "..\\..\\..\\..\\..\\..\\..", NULL); - ASSERT(r == 0); - - r = uv_fs_stat(NULL, &stat_req, "..", NULL); - ASSERT(r == 0); - - r = uv_fs_stat(NULL, &stat_req, "..\\", NULL); - ASSERT(r == 0); - - /* stats the current directory on c: */ - r = uv_fs_stat(NULL, &stat_req, "c:", NULL); - ASSERT(r == 0); - - r = uv_fs_stat(NULL, &stat_req, "c:\\", NULL); - ASSERT(r == 0); - - r = uv_fs_stat(NULL, &stat_req, "\\\\?\\C:\\", NULL); - ASSERT(r == 0); - - MAKE_VALGRIND_HAPPY(); - return 0; -} -#endif - - -TEST_IMPL(fs_futime) { - utime_check_t checkme; - const char* path = "test_file"; - double atime; - double mtime; - uv_file file; - uv_fs_t req; - int r; - - /* Setup. */ - loop = uv_default_loop(); - unlink(path); - r = uv_fs_open(NULL, &req, path, O_RDWR | O_CREAT, S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(req.result >= 0); - uv_fs_req_cleanup(&req); - close(r); - - atime = mtime = 400497753; /* 1982-09-10 11:22:33 */ - - r = uv_fs_open(NULL, &req, path, O_RDWR, 0, NULL); - ASSERT(r >= 0); - ASSERT(req.result >= 0); - file = req.result; /* FIXME probably not how it's supposed to be used */ - uv_fs_req_cleanup(&req); - - r = uv_fs_futime(NULL, &req, file, atime, mtime, NULL); - ASSERT(r == 0); - ASSERT(req.result == 0); - uv_fs_req_cleanup(&req); - - r = uv_fs_stat(NULL, &req, path, NULL); - ASSERT(r == 0); - ASSERT(req.result == 0); - check_utime(path, atime, mtime); - uv_fs_req_cleanup(&req); - - atime = mtime = 1291404900; /* 2010-12-03 20:35:00 - mees <3 */ - - checkme.atime = atime; - checkme.mtime = mtime; - checkme.path = path; - - /* async futime */ - futime_req.data = &checkme; - r = uv_fs_futime(loop, &futime_req, file, atime, mtime, futime_cb); - ASSERT(r == 0); - uv_run(loop, UV_RUN_DEFAULT); - ASSERT(futime_cb_count == 1); - - /* Cleanup. */ - unlink(path); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(fs_stat_missing_path) { - uv_fs_t req; - int r; - - loop = uv_default_loop(); - - r = uv_fs_stat(NULL, &req, "non_existent_file", NULL); - ASSERT(r == UV_ENOENT); - ASSERT(req.result == UV_ENOENT); - uv_fs_req_cleanup(&req); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(fs_scandir_empty_dir) { - const char* path; - uv_fs_t req; - uv_dirent_t dent; - int r; - - path = "./empty_dir/"; - loop = uv_default_loop(); - - uv_fs_mkdir(NULL, &req, path, 0777, NULL); - uv_fs_req_cleanup(&req); - - /* Fill the req to ensure that required fields are cleaned up */ - memset(&req, 0xdb, sizeof(req)); - - r = uv_fs_scandir(NULL, &req, path, 0, NULL); - ASSERT(r == 0); - ASSERT(req.result == 0); - ASSERT(req.ptr == NULL); - ASSERT(UV_EOF == uv_fs_scandir_next(&req, &dent)); - uv_fs_req_cleanup(&req); - - r = uv_fs_scandir(loop, &scandir_req, path, 0, empty_scandir_cb); - ASSERT(r == 0); - - ASSERT(scandir_cb_count == 0); - uv_run(loop, UV_RUN_DEFAULT); - ASSERT(scandir_cb_count == 1); - - uv_fs_rmdir(NULL, &req, path, NULL); - uv_fs_req_cleanup(&req); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(fs_scandir_file) { - const char* path; - int r; - - path = "test/fixtures/empty_file"; - loop = uv_default_loop(); - - r = uv_fs_scandir(NULL, &scandir_req, path, 0, NULL); - ASSERT(r == UV_ENOTDIR); - uv_fs_req_cleanup(&scandir_req); - - r = uv_fs_scandir(loop, &scandir_req, path, 0, file_scandir_cb); - ASSERT(r == 0); - - ASSERT(scandir_cb_count == 0); - uv_run(loop, UV_RUN_DEFAULT); - ASSERT(scandir_cb_count == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(fs_open_dir) { - const char* path; - uv_fs_t req; - int r, file; - - path = "."; - loop = uv_default_loop(); - - r = uv_fs_open(NULL, &req, path, O_RDONLY, 0, NULL); - ASSERT(r >= 0); - ASSERT(req.result >= 0); - ASSERT(req.ptr == NULL); - file = r; - uv_fs_req_cleanup(&req); - - r = uv_fs_close(NULL, &req, file, NULL); - ASSERT(r == 0); - - r = uv_fs_open(loop, &req, path, O_RDONLY, 0, open_cb_simple); - ASSERT(r == 0); - - ASSERT(open_cb_count == 0); - uv_run(loop, UV_RUN_DEFAULT); - ASSERT(open_cb_count == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(fs_file_open_append) { - int r; - - /* Setup. */ - unlink("test_file"); - - loop = uv_default_loop(); - - r = uv_fs_open(NULL, &open_req1, "test_file", O_WRONLY | O_CREAT, - S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(open_req1.result >= 0); - uv_fs_req_cleanup(&open_req1); - - iov = uv_buf_init(test_buf, sizeof(test_buf)); - r = uv_fs_write(NULL, &write_req, open_req1.result, &iov, 1, -1, NULL); - ASSERT(r >= 0); - ASSERT(write_req.result >= 0); - uv_fs_req_cleanup(&write_req); - - r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); - ASSERT(close_req.result == 0); - uv_fs_req_cleanup(&close_req); - - r = uv_fs_open(NULL, &open_req1, "test_file", O_RDWR | O_APPEND, 0, NULL); - ASSERT(r >= 0); - ASSERT(open_req1.result >= 0); - uv_fs_req_cleanup(&open_req1); - - iov = uv_buf_init(test_buf, sizeof(test_buf)); - r = uv_fs_write(NULL, &write_req, open_req1.result, &iov, 1, -1, NULL); - ASSERT(r >= 0); - ASSERT(write_req.result >= 0); - uv_fs_req_cleanup(&write_req); - - r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); - ASSERT(close_req.result == 0); - uv_fs_req_cleanup(&close_req); - - r = uv_fs_open(NULL, &open_req1, "test_file", O_RDONLY, S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(open_req1.result >= 0); - uv_fs_req_cleanup(&open_req1); - - iov = uv_buf_init(buf, sizeof(buf)); - r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, -1, NULL); - printf("read = %d\n", r); - ASSERT(r == 26); - ASSERT(read_req.result == 26); - ASSERT(memcmp(buf, - "test-buffer\n\0test-buffer\n\0", - sizeof("test-buffer\n\0test-buffer\n\0") - 1) == 0); - uv_fs_req_cleanup(&read_req); - - r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); - ASSERT(close_req.result == 0); - uv_fs_req_cleanup(&close_req); - - /* Cleanup */ - unlink("test_file"); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(fs_rename_to_existing_file) { - int r; - - /* Setup. */ - unlink("test_file"); - unlink("test_file2"); - - loop = uv_default_loop(); - - r = uv_fs_open(NULL, &open_req1, "test_file", O_WRONLY | O_CREAT, - S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(open_req1.result >= 0); - uv_fs_req_cleanup(&open_req1); - - iov = uv_buf_init(test_buf, sizeof(test_buf)); - r = uv_fs_write(NULL, &write_req, open_req1.result, &iov, 1, -1, NULL); - ASSERT(r >= 0); - ASSERT(write_req.result >= 0); - uv_fs_req_cleanup(&write_req); - - r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); - ASSERT(close_req.result == 0); - uv_fs_req_cleanup(&close_req); - - r = uv_fs_open(NULL, &open_req1, "test_file2", O_WRONLY | O_CREAT, - S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(open_req1.result >= 0); - uv_fs_req_cleanup(&open_req1); - - r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); - ASSERT(close_req.result == 0); - uv_fs_req_cleanup(&close_req); - - r = uv_fs_rename(NULL, &rename_req, "test_file", "test_file2", NULL); - ASSERT(r == 0); - ASSERT(rename_req.result == 0); - uv_fs_req_cleanup(&rename_req); - - r = uv_fs_open(NULL, &open_req1, "test_file2", O_RDONLY, 0, NULL); - ASSERT(r >= 0); - ASSERT(open_req1.result >= 0); - uv_fs_req_cleanup(&open_req1); - - memset(buf, 0, sizeof(buf)); - iov = uv_buf_init(buf, sizeof(buf)); - r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, -1, NULL); - ASSERT(r >= 0); - ASSERT(read_req.result >= 0); - ASSERT(strcmp(buf, test_buf) == 0); - uv_fs_req_cleanup(&read_req); - - r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); - ASSERT(close_req.result == 0); - uv_fs_req_cleanup(&close_req); - - /* Cleanup */ - unlink("test_file"); - unlink("test_file2"); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(fs_read_file_eof) { - int r; - - /* Setup. */ - unlink("test_file"); - - loop = uv_default_loop(); - - r = uv_fs_open(NULL, &open_req1, "test_file", O_WRONLY | O_CREAT, - S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(open_req1.result >= 0); - uv_fs_req_cleanup(&open_req1); - - iov = uv_buf_init(test_buf, sizeof(test_buf)); - r = uv_fs_write(NULL, &write_req, open_req1.result, &iov, 1, -1, NULL); - ASSERT(r >= 0); - ASSERT(write_req.result >= 0); - uv_fs_req_cleanup(&write_req); - - r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); - ASSERT(close_req.result == 0); - uv_fs_req_cleanup(&close_req); - - r = uv_fs_open(NULL, &open_req1, "test_file", O_RDONLY, 0, NULL); - ASSERT(r >= 0); - ASSERT(open_req1.result >= 0); - uv_fs_req_cleanup(&open_req1); - - memset(buf, 0, sizeof(buf)); - iov = uv_buf_init(buf, sizeof(buf)); - r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, -1, NULL); - ASSERT(r >= 0); - ASSERT(read_req.result >= 0); - ASSERT(strcmp(buf, test_buf) == 0); - uv_fs_req_cleanup(&read_req); - - iov = uv_buf_init(buf, sizeof(buf)); - r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, - read_req.result, NULL); - ASSERT(r == 0); - ASSERT(read_req.result == 0); - uv_fs_req_cleanup(&read_req); - - r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); - ASSERT(close_req.result == 0); - uv_fs_req_cleanup(&close_req); - - /* Cleanup */ - unlink("test_file"); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(fs_write_multiple_bufs) { - uv_buf_t iovs[2]; - int r; - - /* Setup. */ - unlink("test_file"); - - loop = uv_default_loop(); - - r = uv_fs_open(NULL, &open_req1, "test_file", O_WRONLY | O_CREAT, - S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(open_req1.result >= 0); - uv_fs_req_cleanup(&open_req1); - - iovs[0] = uv_buf_init(test_buf, sizeof(test_buf)); - iovs[1] = uv_buf_init(test_buf2, sizeof(test_buf2)); - r = uv_fs_write(NULL, &write_req, open_req1.result, iovs, 2, 0, NULL); - ASSERT(r >= 0); - ASSERT(write_req.result >= 0); - uv_fs_req_cleanup(&write_req); - - r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); - ASSERT(close_req.result == 0); - uv_fs_req_cleanup(&close_req); - - r = uv_fs_open(NULL, &open_req1, "test_file", O_RDONLY, 0, NULL); - ASSERT(r >= 0); - ASSERT(open_req1.result >= 0); - uv_fs_req_cleanup(&open_req1); - - memset(buf, 0, sizeof(buf)); - memset(buf2, 0, sizeof(buf2)); - /* Read the strings back to separate buffers. */ - iovs[0] = uv_buf_init(buf, sizeof(test_buf)); - iovs[1] = uv_buf_init(buf2, sizeof(test_buf2)); - r = uv_fs_read(NULL, &read_req, open_req1.result, iovs, 2, 0, NULL); - ASSERT(r >= 0); - ASSERT(read_req.result >= 0); - ASSERT(strcmp(buf, test_buf) == 0); - ASSERT(strcmp(buf2, test_buf2) == 0); - uv_fs_req_cleanup(&read_req); - - iov = uv_buf_init(buf, sizeof(buf)); - r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, - read_req.result, NULL); - ASSERT(r == 0); - ASSERT(read_req.result == 0); - uv_fs_req_cleanup(&read_req); - - r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); - ASSERT(close_req.result == 0); - uv_fs_req_cleanup(&close_req); - - /* Cleanup */ - unlink("test_file"); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(fs_write_alotof_bufs) { - const size_t iovcount = 54321; - uv_buf_t* iovs; - char* buffer; - size_t index; - int r; - - /* Setup. */ - unlink("test_file"); - - loop = uv_default_loop(); - - iovs = malloc(sizeof(*iovs) * iovcount); - ASSERT(iovs != NULL); - - r = uv_fs_open(NULL, - &open_req1, - "test_file", - O_RDWR | O_CREAT, - S_IWUSR | S_IRUSR, - NULL); - ASSERT(r >= 0); - ASSERT(open_req1.result >= 0); - uv_fs_req_cleanup(&open_req1); - - for (index = 0; index < iovcount; ++index) - iovs[index] = uv_buf_init(test_buf, sizeof(test_buf)); - - r = uv_fs_write(NULL, - &write_req, - open_req1.result, - iovs, - iovcount, - -1, - NULL); - ASSERT(r >= 0); - ASSERT((size_t)write_req.result == sizeof(test_buf) * iovcount); - uv_fs_req_cleanup(&write_req); - - /* Read the strings back to separate buffers. */ - buffer = malloc(sizeof(test_buf) * iovcount); - ASSERT(buffer != NULL); - - for (index = 0; index < iovcount; ++index) - iovs[index] = uv_buf_init(buffer + index * sizeof(test_buf), - sizeof(test_buf)); - - r = uv_fs_read(NULL, &read_req, open_req1.result, iovs, iovcount, 0, NULL); - ASSERT(r >= 0); - ASSERT((size_t)read_req.result == sizeof(test_buf) * iovcount); - - for (index = 0; index < iovcount; ++index) - ASSERT(strncmp(buffer + index * sizeof(test_buf), - test_buf, - sizeof(test_buf)) == 0); - - uv_fs_req_cleanup(&read_req); - free(buffer); - - iov = uv_buf_init(buf, sizeof(buf)); - r = uv_fs_read(NULL, - &read_req, - open_req1.result, - &iov, - 1, - read_req.result, - NULL); - ASSERT(r == 0); - ASSERT(read_req.result == 0); - uv_fs_req_cleanup(&read_req); - - r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); - ASSERT(close_req.result == 0); - uv_fs_req_cleanup(&close_req); - - /* Cleanup */ - unlink("test_file"); - free(iovs); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(fs_write_alotof_bufs_with_offset) { - const size_t iovcount = 54321; - uv_buf_t* iovs; - char* buffer; - size_t index; - int r; - int64_t offset; - char* filler = "0123456789"; - int filler_len = strlen(filler); - - /* Setup. */ - unlink("test_file"); - - loop = uv_default_loop(); - - iovs = malloc(sizeof(*iovs) * iovcount); - ASSERT(iovs != NULL); - - r = uv_fs_open(NULL, - &open_req1, - "test_file", - O_RDWR | O_CREAT, - S_IWUSR | S_IRUSR, - NULL); - ASSERT(r >= 0); - ASSERT(open_req1.result >= 0); - uv_fs_req_cleanup(&open_req1); - - iov = uv_buf_init(filler, filler_len); - r = uv_fs_write(NULL, &write_req, open_req1.result, &iov, 1, -1, NULL); - ASSERT(r == filler_len); - ASSERT(write_req.result == filler_len); - uv_fs_req_cleanup(&write_req); - offset = (int64_t)r; - - for (index = 0; index < iovcount; ++index) - iovs[index] = uv_buf_init(test_buf, sizeof(test_buf)); - - r = uv_fs_write(NULL, - &write_req, - open_req1.result, - iovs, - iovcount, - offset, - NULL); - ASSERT(r >= 0); - ASSERT((size_t)write_req.result == sizeof(test_buf) * iovcount); - uv_fs_req_cleanup(&write_req); - - /* Read the strings back to separate buffers. */ - buffer = malloc(sizeof(test_buf) * iovcount); - ASSERT(buffer != NULL); - - for (index = 0; index < iovcount; ++index) - iovs[index] = uv_buf_init(buffer + index * sizeof(test_buf), - sizeof(test_buf)); - - r = uv_fs_read(NULL, &read_req, open_req1.result, - iovs, iovcount, offset, NULL); - ASSERT(r >= 0); - ASSERT(read_req.result == sizeof(test_buf) * iovcount); - - for (index = 0; index < iovcount; ++index) - ASSERT(strncmp(buffer + index * sizeof(test_buf), - test_buf, - sizeof(test_buf)) == 0); - - uv_fs_req_cleanup(&read_req); - free(buffer); - - r = uv_fs_stat(NULL, &stat_req, "test_file", NULL); - ASSERT(r == 0); - ASSERT((int64_t)((uv_stat_t*)stat_req.ptr)->st_size == - offset + (int64_t)(iovcount * sizeof(test_buf))); - uv_fs_req_cleanup(&stat_req); - - iov = uv_buf_init(buf, sizeof(buf)); - r = uv_fs_read(NULL, - &read_req, - open_req1.result, - &iov, - 1, - read_req.result + offset, - NULL); - ASSERT(r == 0); - ASSERT(read_req.result == 0); - uv_fs_req_cleanup(&read_req); - - r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); - ASSERT(close_req.result == 0); - uv_fs_req_cleanup(&close_req); - - /* Cleanup */ - unlink("test_file"); - free(iovs); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(fs_read_write_null_arguments) { - int r; - - r = uv_fs_read(NULL, NULL, 0, NULL, 0, -1, NULL); - ASSERT(r == UV_EINVAL); - - r = uv_fs_write(NULL, NULL, 0, NULL, 0, -1, NULL); - ASSERT(r == UV_EINVAL); - - iov = uv_buf_init(NULL, 0); - r = uv_fs_read(NULL, NULL, 0, &iov, 0, -1, NULL); - ASSERT(r == UV_EINVAL); - - iov = uv_buf_init(NULL, 0); - r = uv_fs_write(NULL, NULL, 0, &iov, 0, -1, NULL); - ASSERT(r == UV_EINVAL); - - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-get-currentexe.c b/outside/libuv-v1.7.5/test/test-get-currentexe.c deleted file mode 100644 index 0e9d69654..000000000 --- a/outside/libuv-v1.7.5/test/test-get-currentexe.c +++ /dev/null @@ -1,86 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" -#include - -#define PATHMAX 1024 -extern char executable_path[]; - -TEST_IMPL(get_currentexe) { - char buffer[PATHMAX]; - size_t size; - char* match; - char* path; - int r; - - size = sizeof(buffer) / sizeof(buffer[0]); - r = uv_exepath(buffer, &size); - ASSERT(!r); - - /* uv_exepath can return an absolute path on darwin, so if the test runner - * was run with a relative prefix of "./", we need to strip that prefix off - * executable_path or we'll fail. */ - if (executable_path[0] == '.' && executable_path[1] == '/') { - path = executable_path + 2; - } else { - path = executable_path; - } - - match = strstr(buffer, path); - /* Verify that the path returned from uv_exepath is a subdirectory of - * executable_path. - */ - ASSERT(match && !strcmp(match, path)); - ASSERT(size == strlen(buffer)); - - /* Negative tests */ - size = sizeof(buffer) / sizeof(buffer[0]); - r = uv_exepath(NULL, &size); - ASSERT(r == UV_EINVAL); - - r = uv_exepath(buffer, NULL); - ASSERT(r == UV_EINVAL); - - size = 0; - r = uv_exepath(buffer, &size); - ASSERT(r == UV_EINVAL); - - memset(buffer, -1, sizeof(buffer)); - - size = 1; - r = uv_exepath(buffer, &size); - ASSERT(r == 0); - ASSERT(size == 0); - ASSERT(buffer[0] == '\0'); - - memset(buffer, -1, sizeof(buffer)); - - size = 2; - r = uv_exepath(buffer, &size); - ASSERT(r == 0); - ASSERT(size == 1); - ASSERT(buffer[0] != '\0'); - ASSERT(buffer[1] == '\0'); - - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-get-loadavg.c b/outside/libuv-v1.7.5/test/test-get-loadavg.c deleted file mode 100644 index 7465e18b9..000000000 --- a/outside/libuv-v1.7.5/test/test-get-loadavg.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -TEST_IMPL(get_loadavg) { - - double avg[3]; - uv_loadavg(avg); - - ASSERT(avg != NULL); - ASSERT(avg[0] >= 0); - ASSERT(avg[1] >= 0); - ASSERT(avg[2] >= 0); - - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-get-memory.c b/outside/libuv-v1.7.5/test/test-get-memory.c deleted file mode 100644 index 2396939bc..000000000 --- a/outside/libuv-v1.7.5/test/test-get-memory.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -TEST_IMPL(get_memory) { - uint64_t free_mem = uv_get_free_memory(); - uint64_t total_mem = uv_get_total_memory(); - - printf("free_mem=%llu, total_mem=%llu\n", - (unsigned long long) free_mem, - (unsigned long long) total_mem); - - ASSERT(free_mem > 0); - ASSERT(total_mem > 0); - ASSERT(total_mem > free_mem); - - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-getaddrinfo.c b/outside/libuv-v1.7.5/test/test-getaddrinfo.c deleted file mode 100644 index 45813c313..000000000 --- a/outside/libuv-v1.7.5/test/test-getaddrinfo.c +++ /dev/null @@ -1,182 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" -#include - -#define CONCURRENT_COUNT 10 - -static const char* name = "localhost"; - -static int getaddrinfo_cbs = 0; - -/* data used for running multiple calls concurrently */ -static uv_getaddrinfo_t* getaddrinfo_handle; -static uv_getaddrinfo_t getaddrinfo_handles[CONCURRENT_COUNT]; -static int callback_counts[CONCURRENT_COUNT]; -static int fail_cb_called; - - -static void getaddrinfo_fail_cb(uv_getaddrinfo_t* req, - int status, - struct addrinfo* res) { - ASSERT(fail_cb_called == 0); - ASSERT(status < 0); - ASSERT(res == NULL); - uv_freeaddrinfo(res); /* Should not crash. */ - fail_cb_called++; -} - - -static void getaddrinfo_basic_cb(uv_getaddrinfo_t* handle, - int status, - struct addrinfo* res) { - ASSERT(handle == getaddrinfo_handle); - getaddrinfo_cbs++; - free(handle); - uv_freeaddrinfo(res); -} - - -static void getaddrinfo_cuncurrent_cb(uv_getaddrinfo_t* handle, - int status, - struct addrinfo* res) { - int i; - int* data = (int*)handle->data; - - for (i = 0; i < CONCURRENT_COUNT; i++) { - if (&getaddrinfo_handles[i] == handle) { - ASSERT(i == *data); - - callback_counts[i]++; - break; - } - } - ASSERT (i < CONCURRENT_COUNT); - - free(data); - uv_freeaddrinfo(res); - - getaddrinfo_cbs++; -} - - -TEST_IMPL(getaddrinfo_fail) { - uv_getaddrinfo_t req; - - ASSERT(0 == uv_getaddrinfo(uv_default_loop(), - &req, - getaddrinfo_fail_cb, - "xyzzy.xyzzy.xyzzy", - NULL, - NULL)); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - ASSERT(fail_cb_called == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(getaddrinfo_fail_sync) { - uv_getaddrinfo_t req; - - ASSERT(0 > uv_getaddrinfo(uv_default_loop(), - &req, - NULL, - "xyzzy.xyzzy.xyzzy", - NULL, - NULL)); - uv_freeaddrinfo(req.addrinfo); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(getaddrinfo_basic) { - int r; - getaddrinfo_handle = (uv_getaddrinfo_t*)malloc(sizeof(uv_getaddrinfo_t)); - - r = uv_getaddrinfo(uv_default_loop(), - getaddrinfo_handle, - &getaddrinfo_basic_cb, - name, - NULL, - NULL); - ASSERT(r == 0); - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(getaddrinfo_cbs == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(getaddrinfo_basic_sync) { - uv_getaddrinfo_t req; - - ASSERT(0 == uv_getaddrinfo(uv_default_loop(), - &req, - NULL, - name, - NULL, - NULL)); - uv_freeaddrinfo(req.addrinfo); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(getaddrinfo_concurrent) { - int i, r; - int* data; - - for (i = 0; i < CONCURRENT_COUNT; i++) { - callback_counts[i] = 0; - - data = (int*)malloc(sizeof(int)); - ASSERT(data != NULL); - *data = i; - getaddrinfo_handles[i].data = data; - - r = uv_getaddrinfo(uv_default_loop(), - &getaddrinfo_handles[i], - &getaddrinfo_cuncurrent_cb, - name, - NULL, - NULL); - ASSERT(r == 0); - } - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - for (i = 0; i < CONCURRENT_COUNT; i++) { - ASSERT(callback_counts[i] == 1); - } - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-getnameinfo.c b/outside/libuv-v1.7.5/test/test-getnameinfo.c deleted file mode 100644 index ebe924669..000000000 --- a/outside/libuv-v1.7.5/test/test-getnameinfo.c +++ /dev/null @@ -1,101 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. -* -* 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. -*/ - -#include "uv.h" -#include "task.h" -#include -#include -#include - - -static const char* address_ip4 = "127.0.0.1"; -static const char* address_ip6 = "::1"; -static const int port = 80; - -static struct sockaddr_in addr4; -static struct sockaddr_in6 addr6; -static uv_getnameinfo_t req; - -static void getnameinfo_req(uv_getnameinfo_t* handle, - int status, - const char* hostname, - const char* service) { - ASSERT(handle != NULL); - ASSERT(status == 0); - ASSERT(hostname != NULL); - ASSERT(service != NULL); -} - - -TEST_IMPL(getnameinfo_basic_ip4) { - int r; - - r = uv_ip4_addr(address_ip4, port, &addr4); - ASSERT(r == 0); - - r = uv_getnameinfo(uv_default_loop(), - &req, - &getnameinfo_req, - (const struct sockaddr*)&addr4, - 0); - ASSERT(r == 0); - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(getnameinfo_basic_ip4_sync) { - ASSERT(0 == uv_ip4_addr(address_ip4, port, &addr4)); - - ASSERT(0 == uv_getnameinfo(uv_default_loop(), - &req, - NULL, - (const struct sockaddr*)&addr4, - 0)); - ASSERT(req.host != NULL); - ASSERT(req.service != NULL); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(getnameinfo_basic_ip6) { - int r; - - r = uv_ip6_addr(address_ip6, port, &addr6); - ASSERT(r == 0); - - r = uv_getnameinfo(uv_default_loop(), - &req, - &getnameinfo_req, - (const struct sockaddr*)&addr6, - 0); - ASSERT(r == 0); - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-getsockname.c b/outside/libuv-v1.7.5/test/test-getsockname.c deleted file mode 100644 index 565c17fe5..000000000 --- a/outside/libuv-v1.7.5/test/test-getsockname.c +++ /dev/null @@ -1,361 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#include -#include -#include - -static const int server_port = TEST_PORT; -/* Will be updated right after making the uv_connect_call */ -static int connect_port = -1; - -static int getsocknamecount = 0; -static int getpeernamecount = 0; - -static uv_loop_t* loop; -static uv_tcp_t tcp; -static uv_udp_t udp; -static uv_connect_t connect_req; -static uv_tcp_t tcpServer; -static uv_udp_t udpServer; -static uv_udp_send_t send_req; - - -static void alloc(uv_handle_t* handle, size_t suggested_size, uv_buf_t* buf) { - buf->base = malloc(suggested_size); - buf->len = suggested_size; -} - - -static void on_close(uv_handle_t* peer) { - free(peer); - uv_close((uv_handle_t*)&tcpServer, NULL); -} - - -static void after_shutdown(uv_shutdown_t* req, int status) { - uv_close((uv_handle_t*) req->handle, on_close); - free(req); -} - - -static void after_read(uv_stream_t* handle, - ssize_t nread, - const uv_buf_t* buf) { - uv_shutdown_t* req; - int r; - - if (buf->base) { - free(buf->base); - } - - req = (uv_shutdown_t*) malloc(sizeof *req); - r = uv_shutdown(req, handle, after_shutdown); - ASSERT(r == 0); -} - - -static void check_sockname(struct sockaddr* addr, const char* compare_ip, - int compare_port, const char* context) { - struct sockaddr_in check_addr = *(struct sockaddr_in*) addr; - struct sockaddr_in compare_addr; - char check_ip[17]; - int r; - - ASSERT(0 == uv_ip4_addr(compare_ip, compare_port, &compare_addr)); - - /* Both addresses should be ipv4 */ - ASSERT(check_addr.sin_family == AF_INET); - ASSERT(compare_addr.sin_family == AF_INET); - - /* Check if the ip matches */ - ASSERT(memcmp(&check_addr.sin_addr, - &compare_addr.sin_addr, - sizeof compare_addr.sin_addr) == 0); - - /* Check if the port matches. If port == 0 anything goes. */ - ASSERT(compare_port == 0 || check_addr.sin_port == compare_addr.sin_port); - - r = uv_ip4_name(&check_addr, (char*) check_ip, sizeof check_ip); - ASSERT(r == 0); - - printf("%s: %s:%d\n", context, check_ip, ntohs(check_addr.sin_port)); -} - - -static void on_connection(uv_stream_t* server, int status) { - struct sockaddr sockname, peername; - int namelen; - uv_tcp_t* handle; - int r; - - if (status != 0) { - fprintf(stderr, "Connect error %s\n", uv_err_name(status)); - } - ASSERT(status == 0); - - handle = malloc(sizeof(*handle)); - ASSERT(handle != NULL); - - r = uv_tcp_init(loop, handle); - ASSERT(r == 0); - - /* associate server with stream */ - handle->data = server; - - r = uv_accept(server, (uv_stream_t*)handle); - ASSERT(r == 0); - - namelen = sizeof sockname; - r = uv_tcp_getsockname(handle, &sockname, &namelen); - ASSERT(r == 0); - check_sockname(&sockname, "127.0.0.1", server_port, "accepted socket"); - getsocknamecount++; - - namelen = sizeof peername; - r = uv_tcp_getpeername(handle, &peername, &namelen); - ASSERT(r == 0); - check_sockname(&peername, "127.0.0.1", connect_port, "accepted socket peer"); - getpeernamecount++; - - r = uv_read_start((uv_stream_t*)handle, alloc, after_read); - ASSERT(r == 0); -} - - -static void on_connect(uv_connect_t* req, int status) { - struct sockaddr sockname, peername; - int r, namelen; - - ASSERT(status == 0); - - namelen = sizeof sockname; - r = uv_tcp_getsockname((uv_tcp_t*) req->handle, &sockname, &namelen); - ASSERT(r == 0); - check_sockname(&sockname, "127.0.0.1", 0, "connected socket"); - getsocknamecount++; - - namelen = sizeof peername; - r = uv_tcp_getpeername((uv_tcp_t*) req->handle, &peername, &namelen); - ASSERT(r == 0); - check_sockname(&peername, "127.0.0.1", server_port, "connected socket peer"); - getpeernamecount++; - - uv_close((uv_handle_t*)&tcp, NULL); -} - - -static int tcp_listener(void) { - struct sockaddr_in addr; - struct sockaddr sockname, peername; - int namelen; - int r; - - ASSERT(0 == uv_ip4_addr("0.0.0.0", server_port, &addr)); - - r = uv_tcp_init(loop, &tcpServer); - if (r) { - fprintf(stderr, "Socket creation error\n"); - return 1; - } - - r = uv_tcp_bind(&tcpServer, (const struct sockaddr*) &addr, 0); - if (r) { - fprintf(stderr, "Bind error\n"); - return 1; - } - - r = uv_listen((uv_stream_t*)&tcpServer, 128, on_connection); - if (r) { - fprintf(stderr, "Listen error\n"); - return 1; - } - - memset(&sockname, -1, sizeof sockname); - namelen = sizeof sockname; - r = uv_tcp_getsockname(&tcpServer, &sockname, &namelen); - ASSERT(r == 0); - check_sockname(&sockname, "0.0.0.0", server_port, "server socket"); - getsocknamecount++; - - namelen = sizeof sockname; - r = uv_tcp_getpeername(&tcpServer, &peername, &namelen); - ASSERT(r == UV_ENOTCONN); - getpeernamecount++; - - return 0; -} - - -static void tcp_connector(void) { - struct sockaddr_in server_addr; - struct sockaddr sockname; - int r, namelen; - - ASSERT(0 == uv_ip4_addr("127.0.0.1", server_port, &server_addr)); - - r = uv_tcp_init(loop, &tcp); - tcp.data = &connect_req; - ASSERT(!r); - - r = uv_tcp_connect(&connect_req, - &tcp, - (const struct sockaddr*) &server_addr, - on_connect); - ASSERT(!r); - - /* Fetch the actual port used by the connecting socket. */ - namelen = sizeof sockname; - r = uv_tcp_getsockname(&tcp, &sockname, &namelen); - ASSERT(!r); - ASSERT(sockname.sa_family == AF_INET); - connect_port = ntohs(((struct sockaddr_in*) &sockname)->sin_port); - ASSERT(connect_port > 0); -} - - -static void udp_recv(uv_udp_t* handle, - ssize_t nread, - const uv_buf_t* buf, - const struct sockaddr* addr, - unsigned flags) { - struct sockaddr sockname; - int namelen; - int r; - - ASSERT(nread >= 0); - free(buf->base); - - if (nread == 0) { - return; - } - - memset(&sockname, -1, sizeof sockname); - namelen = sizeof(sockname); - r = uv_udp_getsockname(&udp, &sockname, &namelen); - ASSERT(r == 0); - check_sockname(&sockname, "0.0.0.0", 0, "udp receiving socket"); - getsocknamecount++; - - uv_close((uv_handle_t*) &udp, NULL); - uv_close((uv_handle_t*) handle, NULL); -} - - -static void udp_send(uv_udp_send_t* req, int status) { - -} - - -static int udp_listener(void) { - struct sockaddr_in addr; - struct sockaddr sockname; - int namelen; - int r; - - ASSERT(0 == uv_ip4_addr("0.0.0.0", server_port, &addr)); - - r = uv_udp_init(loop, &udpServer); - if (r) { - fprintf(stderr, "Socket creation error\n"); - return 1; - } - - r = uv_udp_bind(&udpServer, (const struct sockaddr*) &addr, 0); - if (r) { - fprintf(stderr, "Bind error\n"); - return 1; - } - - memset(&sockname, -1, sizeof sockname); - namelen = sizeof sockname; - r = uv_udp_getsockname(&udpServer, &sockname, &namelen); - ASSERT(r == 0); - check_sockname(&sockname, "0.0.0.0", server_port, "udp listener socket"); - getsocknamecount++; - - r = uv_udp_recv_start(&udpServer, alloc, udp_recv); - ASSERT(r == 0); - - return 0; -} - - -static void udp_sender(void) { - struct sockaddr_in server_addr; - uv_buf_t buf; - int r; - - r = uv_udp_init(loop, &udp); - ASSERT(!r); - - buf = uv_buf_init("PING", 4); - ASSERT(0 == uv_ip4_addr("127.0.0.1", server_port, &server_addr)); - - r = uv_udp_send(&send_req, - &udp, - &buf, - 1, - (const struct sockaddr*) &server_addr, - udp_send); - ASSERT(!r); -} - - -TEST_IMPL(getsockname_tcp) { - loop = uv_default_loop(); - - if (tcp_listener()) - return 1; - - tcp_connector(); - - uv_run(loop, UV_RUN_DEFAULT); - - ASSERT(getsocknamecount == 3); - ASSERT(getpeernamecount == 3); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(getsockname_udp) { - loop = uv_default_loop(); - - if (udp_listener()) - return 1; - - udp_sender(); - - uv_run(loop, UV_RUN_DEFAULT); - - ASSERT(getsocknamecount == 2); - - ASSERT(udp.send_queue_size == 0); - ASSERT(udpServer.send_queue_size == 0); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-handle-fileno.c b/outside/libuv-v1.7.5/test/test-handle-fileno.c deleted file mode 100644 index 3fe933ade..000000000 --- a/outside/libuv-v1.7.5/test/test-handle-fileno.c +++ /dev/null @@ -1,121 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - - -static int get_tty_fd(void) { - /* Make sure we have an FD that refers to a tty */ -#ifdef _WIN32 - HANDLE handle; - handle = CreateFileA("conout$", - GENERIC_READ | GENERIC_WRITE, - FILE_SHARE_READ | FILE_SHARE_WRITE, - NULL, - OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, - NULL); - if (handle == INVALID_HANDLE_VALUE) - return -1; - return _open_osfhandle((intptr_t) handle, 0); -#else /* unix */ - return open("/dev/tty", O_RDONLY, 0); -#endif -} - - -TEST_IMPL(handle_fileno) { - int r; - int tty_fd; - struct sockaddr_in addr; - uv_os_fd_t fd; - uv_tcp_t tcp; - uv_udp_t udp; - uv_pipe_t pipe; - uv_tty_t tty; - uv_idle_t idle; - uv_loop_t* loop; - - loop = uv_default_loop(); - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - - r = uv_idle_init(loop, &idle); - ASSERT(r == 0); - r = uv_fileno((uv_handle_t*) &idle, &fd); - ASSERT(r == UV_EINVAL); - uv_close((uv_handle_t*) &idle, NULL); - - r = uv_tcp_init(loop, &tcp); - ASSERT(r == 0); - r = uv_fileno((uv_handle_t*) &tcp, &fd); - ASSERT(r == UV_EBADF); - r = uv_tcp_bind(&tcp, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); - r = uv_fileno((uv_handle_t*) &tcp, &fd); - ASSERT(r == 0); - uv_close((uv_handle_t*) &tcp, NULL); - r = uv_fileno((uv_handle_t*) &tcp, &fd); - ASSERT(r == UV_EBADF); - - r = uv_udp_init(loop, &udp); - ASSERT(r == 0); - r = uv_fileno((uv_handle_t*) &udp, &fd); - ASSERT(r == UV_EBADF); - r = uv_udp_bind(&udp, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); - r = uv_fileno((uv_handle_t*) &udp, &fd); - ASSERT(r == 0); - uv_close((uv_handle_t*) &udp, NULL); - r = uv_fileno((uv_handle_t*) &udp, &fd); - ASSERT(r == UV_EBADF); - - r = uv_pipe_init(loop, &pipe, 0); - ASSERT(r == 0); - r = uv_fileno((uv_handle_t*) &pipe, &fd); - ASSERT(r == UV_EBADF); - r = uv_pipe_bind(&pipe, TEST_PIPENAME); - ASSERT(r == 0); - r = uv_fileno((uv_handle_t*) &pipe, &fd); - ASSERT(r == 0); - uv_close((uv_handle_t*) &pipe, NULL); - r = uv_fileno((uv_handle_t*) &pipe, &fd); - ASSERT(r == UV_EBADF); - - tty_fd = get_tty_fd(); - if (tty_fd < 0) { - fprintf(stderr, "Cannot open a TTY fd"); - fflush(stderr); - } else { - r = uv_tty_init(loop, &tty, tty_fd, 0); - ASSERT(r == 0); - r = uv_fileno((uv_handle_t*) &tty, &fd); - ASSERT(r == 0); - uv_close((uv_handle_t*) &tty, NULL); - r = uv_fileno((uv_handle_t*) &tty, &fd); - ASSERT(r == UV_EBADF); - } - - uv_run(loop, UV_RUN_DEFAULT); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-homedir.c b/outside/libuv-v1.7.5/test/test-homedir.c deleted file mode 100644 index cbc47566c..000000000 --- a/outside/libuv-v1.7.5/test/test-homedir.c +++ /dev/null @@ -1,49 +0,0 @@ -#include "uv.h" -#include "task.h" -#include - -#define PATHMAX 1024 -#define SMALLPATH 1 - -TEST_IMPL(homedir) { - char homedir[PATHMAX]; - size_t len; - char last; - int r; - - /* Test the normal case */ - len = sizeof homedir; - homedir[0] = '\0'; - ASSERT(strlen(homedir) == 0); - r = uv_os_homedir(homedir, &len); - ASSERT(r == 0); - ASSERT(strlen(homedir) == len); - ASSERT(len > 0); - ASSERT(homedir[len] == '\0'); - - if (len > 1) { - last = homedir[len - 1]; -#ifdef _WIN32 - ASSERT(last != '\\'); -#else - ASSERT(last != '/'); -#endif - } - - /* Test the case where the buffer is too small */ - len = SMALLPATH; - r = uv_os_homedir(homedir, &len); - ASSERT(r == UV_ENOBUFS); - ASSERT(len > SMALLPATH); - - /* Test invalid inputs */ - r = uv_os_homedir(NULL, &len); - ASSERT(r == UV_EINVAL); - r = uv_os_homedir(homedir, NULL); - ASSERT(r == UV_EINVAL); - len = 0; - r = uv_os_homedir(homedir, &len); - ASSERT(r == UV_EINVAL); - - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-hrtime.c b/outside/libuv-v1.7.5/test/test-hrtime.c deleted file mode 100644 index 72a4d4b18..000000000 --- a/outside/libuv-v1.7.5/test/test-hrtime.c +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#ifndef MILLISEC -# define MILLISEC 1000 -#endif - -#ifndef NANOSEC -# define NANOSEC ((uint64_t) 1e9) -#endif - - -TEST_IMPL(hrtime) { - uint64_t a, b, diff; - int i = 75; - while (i > 0) { - a = uv_hrtime(); - uv_sleep(45); - b = uv_hrtime(); - - diff = b - a; - - /* printf("i= %d diff = %llu\n", i, (unsigned long long int) diff); */ - - /* The windows Sleep() function has only a resolution of 10-20 ms. */ - /* Check that the difference between the two hrtime values is somewhat in */ - /* the range we expect it to be. */ - ASSERT(diff > (uint64_t) 25 * NANOSEC / MILLISEC); - ASSERT(diff < (uint64_t) 80 * NANOSEC / MILLISEC); - --i; - } - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-idle.c b/outside/libuv-v1.7.5/test/test-idle.c deleted file mode 100644 index f49d19648..000000000 --- a/outside/libuv-v1.7.5/test/test-idle.c +++ /dev/null @@ -1,99 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - - -static uv_idle_t idle_handle; -static uv_check_t check_handle; -static uv_timer_t timer_handle; - -static int idle_cb_called = 0; -static int check_cb_called = 0; -static int timer_cb_called = 0; -static int close_cb_called = 0; - - -static void close_cb(uv_handle_t* handle) { - close_cb_called++; -} - - -static void timer_cb(uv_timer_t* handle) { - ASSERT(handle == &timer_handle); - - uv_close((uv_handle_t*) &idle_handle, close_cb); - uv_close((uv_handle_t*) &check_handle, close_cb); - uv_close((uv_handle_t*) &timer_handle, close_cb); - - timer_cb_called++; - fprintf(stderr, "timer_cb %d\n", timer_cb_called); - fflush(stderr); -} - - -static void idle_cb(uv_idle_t* handle) { - ASSERT(handle == &idle_handle); - - idle_cb_called++; - fprintf(stderr, "idle_cb %d\n", idle_cb_called); - fflush(stderr); -} - - -static void check_cb(uv_check_t* handle) { - ASSERT(handle == &check_handle); - - check_cb_called++; - fprintf(stderr, "check_cb %d\n", check_cb_called); - fflush(stderr); -} - - -TEST_IMPL(idle_starvation) { - int r; - - r = uv_idle_init(uv_default_loop(), &idle_handle); - ASSERT(r == 0); - r = uv_idle_start(&idle_handle, idle_cb); - ASSERT(r == 0); - - r = uv_check_init(uv_default_loop(), &check_handle); - ASSERT(r == 0); - r = uv_check_start(&check_handle, check_cb); - ASSERT(r == 0); - - r = uv_timer_init(uv_default_loop(), &timer_handle); - ASSERT(r == 0); - r = uv_timer_start(&timer_handle, timer_cb, 50, 0); - ASSERT(r == 0); - - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - - ASSERT(idle_cb_called > 0); - ASSERT(timer_cb_called == 1); - ASSERT(close_cb_called == 3); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-ip4-addr.c b/outside/libuv-v1.7.5/test/test-ip4-addr.c deleted file mode 100644 index 3d6e0cf28..000000000 --- a/outside/libuv-v1.7.5/test/test-ip4-addr.c +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#include -#include - - -TEST_IMPL(ip4_addr) { - - struct sockaddr_in addr; - - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - ASSERT(0 == uv_ip4_addr("255.255.255.255", TEST_PORT, &addr)); - ASSERT(UV_EINVAL == uv_ip4_addr("255.255.255*000", TEST_PORT, &addr)); - ASSERT(UV_EINVAL == uv_ip4_addr("255.255.255.256", TEST_PORT, &addr)); - ASSERT(UV_EINVAL == uv_ip4_addr("2555.0.0.0", TEST_PORT, &addr)); - ASSERT(UV_EINVAL == uv_ip4_addr("255", TEST_PORT, &addr)); - - /* for broken address family */ - ASSERT(UV_EAFNOSUPPORT == uv_inet_pton(42, "127.0.0.1", - &addr.sin_addr.s_addr)); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-ip6-addr.c b/outside/libuv-v1.7.5/test/test-ip6-addr.c deleted file mode 100644 index 869b099e0..000000000 --- a/outside/libuv-v1.7.5/test/test-ip6-addr.c +++ /dev/null @@ -1,141 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#include -#include - -#ifdef __linux__ -# include -# include -#endif - - -TEST_IMPL(ip6_addr_link_local) { - char string_address[INET6_ADDRSTRLEN]; - uv_interface_address_t* addresses; - uv_interface_address_t* address; - struct sockaddr_in6 addr; - unsigned int iface_index; - const char* device_name; - /* 40 bytes address, 16 bytes device name, plus reserve. */ - char scoped_addr[128]; - int count; - int ix; - - ASSERT(0 == uv_interface_addresses(&addresses, &count)); - - for (ix = 0; ix < count; ix++) { - address = addresses + ix; - - if (address->address.address6.sin6_family != AF_INET6) - continue; - - ASSERT(0 == uv_inet_ntop(AF_INET6, - &address->address.address6.sin6_addr, - string_address, - sizeof(string_address))); - - /* Skip addresses that are not link-local. */ - if (strncmp(string_address, "fe80::", 6) != 0) - continue; - - iface_index = address->address.address6.sin6_scope_id; - device_name = address->name; - -#ifdef _WIN32 - snprintf(scoped_addr, - sizeof(scoped_addr), - "%s%%%d", - string_address, - iface_index); -#else - snprintf(scoped_addr, - sizeof(scoped_addr), - "%s%%%s", - string_address, - device_name); -#endif - - fprintf(stderr, "Testing link-local address %s " - "(iface_index: 0x%02x, device_name: %s)\n", - scoped_addr, - iface_index, - device_name); - fflush(stderr); - - ASSERT(0 == uv_ip6_addr(scoped_addr, TEST_PORT, &addr)); - fprintf(stderr, "Got scope_id 0x%02x\n", addr.sin6_scope_id); - fflush(stderr); - ASSERT(iface_index == addr.sin6_scope_id); - } - - uv_free_interface_addresses(addresses, count); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -#define GOOD_ADDR_LIST(X) \ - X("::") \ - X("::1") \ - X("fe80::1") \ - X("fe80::") \ - X("fe80::2acf:daff:fedd:342a") \ - X("fe80:0:0:0:2acf:daff:fedd:342a") \ - X("fe80:0:0:0:2acf:daff:1.2.3.4") \ - X("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255") \ - -#define BAD_ADDR_LIST(X) \ - X(":::1") \ - X("abcde::1") \ - X("fe80:0:0:0:2acf:daff:fedd:342a:5678") \ - X("fe80:0:0:0:2acf:daff:abcd:1.2.3.4") \ - X("fe80:0:0:2acf:daff:1.2.3.4.5") \ - X("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255.255") \ - -#define TEST_GOOD(ADDR) \ - ASSERT(0 == uv_inet_pton(AF_INET6, ADDR, &addr)); \ - ASSERT(0 == uv_inet_pton(AF_INET6, ADDR "%en1", &addr)); \ - ASSERT(0 == uv_inet_pton(AF_INET6, ADDR "%%%%", &addr)); \ - ASSERT(0 == uv_inet_pton(AF_INET6, ADDR "%en1:1.2.3.4", &addr)); \ - -#define TEST_BAD(ADDR) \ - ASSERT(0 != uv_inet_pton(AF_INET6, ADDR, &addr)); \ - ASSERT(0 != uv_inet_pton(AF_INET6, ADDR "%en1", &addr)); \ - ASSERT(0 != uv_inet_pton(AF_INET6, ADDR "%%%%", &addr)); \ - ASSERT(0 != uv_inet_pton(AF_INET6, ADDR "%en1:1.2.3.4", &addr)); \ - -TEST_IMPL(ip6_pton) { - struct in6_addr addr; - - GOOD_ADDR_LIST(TEST_GOOD) - BAD_ADDR_LIST(TEST_BAD) - - MAKE_VALGRIND_HAPPY(); - return 0; -} - -#undef GOOD_ADDR_LIST -#undef BAD_ADDR_LIST diff --git a/outside/libuv-v1.7.5/test/test-ipc-send-recv.c b/outside/libuv-v1.7.5/test/test-ipc-send-recv.c deleted file mode 100644 index d9b913339..000000000 --- a/outside/libuv-v1.7.5/test/test-ipc-send-recv.c +++ /dev/null @@ -1,236 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#include -#include - -/* See test-ipc.ctx */ -void spawn_helper(uv_pipe_t* channel, - uv_process_t* process, - const char* helper); - -union handles { - uv_handle_t handle; - uv_stream_t stream; - uv_pipe_t pipe; - uv_tcp_t tcp; - uv_tty_t tty; -}; - -struct echo_ctx { - uv_pipe_t channel; - uv_write_t write_req; - uv_handle_type expected_type; - union handles send; - union handles recv; -}; - -static struct echo_ctx ctx; -static int num_recv_handles; - - -static void alloc_cb(uv_handle_t* handle, - size_t suggested_size, - uv_buf_t* buf) { - /* we're not actually reading anything so a small buffer is okay */ - static char slab[8]; - buf->base = slab; - buf->len = sizeof(slab); -} - - -static void recv_cb(uv_stream_t* handle, - ssize_t nread, - const uv_buf_t* buf) { - uv_handle_type pending; - uv_pipe_t* pipe; - int r; - - pipe = (uv_pipe_t*) handle; - ASSERT(pipe == &ctx.channel); - ASSERT(nread >= 0); - ASSERT(1 == uv_pipe_pending_count(pipe)); - - pending = uv_pipe_pending_type(pipe); - ASSERT(pending == ctx.expected_type); - - if (pending == UV_NAMED_PIPE) - r = uv_pipe_init(ctx.channel.loop, &ctx.recv.pipe, 0); - else if (pending == UV_TCP) - r = uv_tcp_init(ctx.channel.loop, &ctx.recv.tcp); - else - abort(); - ASSERT(r == 0); - - r = uv_accept(handle, &ctx.recv.stream); - ASSERT(r == 0); - - uv_close((uv_handle_t*)&ctx.channel, NULL); - uv_close(&ctx.send.handle, NULL); - uv_close(&ctx.recv.handle, NULL); - num_recv_handles++; -} - - -static int run_test(void) { - uv_process_t process; - uv_buf_t buf; - int r; - - spawn_helper(&ctx.channel, &process, "ipc_send_recv_helper"); - - buf = uv_buf_init(".", 1); - r = uv_write2(&ctx.write_req, - (uv_stream_t*)&ctx.channel, - &buf, 1, - &ctx.send.stream, - NULL); - ASSERT(r == 0); - - r = uv_read_start((uv_stream_t*)&ctx.channel, alloc_cb, recv_cb); - ASSERT(r == 0); - - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - - ASSERT(num_recv_handles == 1); - - return 0; -} - - -TEST_IMPL(ipc_send_recv_pipe) { - int r; - - ctx.expected_type = UV_NAMED_PIPE; - - r = uv_pipe_init(uv_default_loop(), &ctx.send.pipe, 1); - ASSERT(r == 0); - - r = uv_pipe_bind(&ctx.send.pipe, TEST_PIPENAME); - ASSERT(r == 0); - - r = run_test(); - ASSERT(r == 0); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(ipc_send_recv_tcp) { - struct sockaddr_in addr; - int r; - - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - - ctx.expected_type = UV_TCP; - - r = uv_tcp_init(uv_default_loop(), &ctx.send.tcp); - ASSERT(r == 0); - - r = uv_tcp_bind(&ctx.send.tcp, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); - - r = run_test(); - ASSERT(r == 0); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -/* Everything here runs in a child process. */ - -static void write2_cb(uv_write_t* req, int status) { - ASSERT(status == 0); - uv_close(&ctx.recv.handle, NULL); - uv_close((uv_handle_t*)&ctx.channel, NULL); -} - - -static void read_cb(uv_stream_t* handle, - ssize_t nread, - const uv_buf_t* rdbuf) { - uv_buf_t wrbuf; - uv_pipe_t* pipe; - uv_handle_type pending; - int r; - - pipe = (uv_pipe_t*) handle; - ASSERT(pipe == &ctx.channel); - ASSERT(nread >= 0); - ASSERT(1 == uv_pipe_pending_count(pipe)); - - pending = uv_pipe_pending_type(pipe); - ASSERT(pending == UV_NAMED_PIPE || pending == UV_TCP); - - wrbuf = uv_buf_init(".", 1); - - if (pending == UV_NAMED_PIPE) - r = uv_pipe_init(ctx.channel.loop, &ctx.recv.pipe, 0); - else if (pending == UV_TCP) - r = uv_tcp_init(ctx.channel.loop, &ctx.recv.tcp); - else - abort(); - ASSERT(r == 0); - - r = uv_accept(handle, &ctx.recv.stream); - ASSERT(r == 0); - - r = uv_write2(&ctx.write_req, - (uv_stream_t*)&ctx.channel, - &wrbuf, - 1, - &ctx.recv.stream, - write2_cb); - ASSERT(r == 0); -} - - -/* stdin is a duplex channel over which a handle is sent. - * We receive it and send it back where it came from. - */ -int ipc_send_recv_helper(void) { - int r; - - memset(&ctx, 0, sizeof(ctx)); - - r = uv_pipe_init(uv_default_loop(), &ctx.channel, 1); - ASSERT(r == 0); - - uv_pipe_open(&ctx.channel, 0); - ASSERT(1 == uv_is_readable((uv_stream_t*)&ctx.channel)); - ASSERT(1 == uv_is_writable((uv_stream_t*)&ctx.channel)); - ASSERT(0 == uv_is_closing((uv_handle_t*)&ctx.channel)); - - r = uv_read_start((uv_stream_t*)&ctx.channel, alloc_cb, read_cb); - ASSERT(r == 0); - - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-ipc.c b/outside/libuv-v1.7.5/test/test-ipc.c deleted file mode 100644 index f018c2d4d..000000000 --- a/outside/libuv-v1.7.5/test/test-ipc.c +++ /dev/null @@ -1,779 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#include -#include - -static uv_pipe_t channel; -static uv_tcp_t tcp_server; -static uv_tcp_t tcp_server2; -static uv_tcp_t tcp_connection; - -static int exit_cb_called; -static int read_cb_called; -static int tcp_write_cb_called; -static int tcp_read_cb_called; -static int on_pipe_read_called; -static int local_conn_accepted; -static int remote_conn_accepted; -static int tcp_server_listening; -static uv_write_t write_req; -static uv_write_t conn_notify_req; -static int close_cb_called; -static int connection_accepted; -static int tcp_conn_read_cb_called; -static int tcp_conn_write_cb_called; - -typedef struct { - uv_connect_t conn_req; - uv_write_t tcp_write_req; - uv_tcp_t conn; -} tcp_conn; - -#define CONN_COUNT 100 -#define BACKLOG 128 - - -static void close_server_conn_cb(uv_handle_t* handle) { - free(handle); -} - - -static void on_connection(uv_stream_t* server, int status) { - uv_tcp_t* conn; - int r; - - if (!local_conn_accepted) { - /* Accept the connection and close it. Also and close the server. */ - ASSERT(status == 0); - ASSERT((uv_stream_t*)&tcp_server == server); - - conn = malloc(sizeof(*conn)); - ASSERT(conn); - r = uv_tcp_init(server->loop, conn); - ASSERT(r == 0); - - r = uv_accept(server, (uv_stream_t*)conn); - ASSERT(r == 0); - - uv_close((uv_handle_t*)conn, close_server_conn_cb); - uv_close((uv_handle_t*)server, NULL); - local_conn_accepted = 1; - } -} - - -static void exit_cb(uv_process_t* process, - int64_t exit_status, - int term_signal) { - printf("exit_cb\n"); - exit_cb_called++; - ASSERT(exit_status == 0); - uv_close((uv_handle_t*)process, NULL); -} - - -static void on_alloc(uv_handle_t* handle, - size_t suggested_size, - uv_buf_t* buf) { - buf->base = malloc(suggested_size); - buf->len = suggested_size; -} - - -static void close_client_conn_cb(uv_handle_t* handle) { - tcp_conn* p = (tcp_conn*)handle->data; - free(p); -} - - -static void connect_cb(uv_connect_t* req, int status) { - uv_close((uv_handle_t*)req->handle, close_client_conn_cb); -} - - -static void make_many_connections(void) { - tcp_conn* conn; - struct sockaddr_in addr; - int r, i; - - for (i = 0; i < CONN_COUNT; i++) { - conn = malloc(sizeof(*conn)); - ASSERT(conn); - - r = uv_tcp_init(uv_default_loop(), &conn->conn); - ASSERT(r == 0); - - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - - r = uv_tcp_connect(&conn->conn_req, - (uv_tcp_t*) &conn->conn, - (const struct sockaddr*) &addr, - connect_cb); - ASSERT(r == 0); - - conn->conn.data = conn; - } -} - - -static void on_read(uv_stream_t* handle, - ssize_t nread, - const uv_buf_t* buf) { - int r; - uv_pipe_t* pipe; - uv_handle_type pending; - uv_buf_t outbuf; - - pipe = (uv_pipe_t*) handle; - - if (nread == 0) { - /* Everything OK, but nothing read. */ - free(buf->base); - return; - } - - if (nread < 0) { - if (nread == UV_EOF) { - free(buf->base); - return; - } - - printf("error recving on channel: %s\n", uv_strerror(nread)); - abort(); - } - - fprintf(stderr, "got %d bytes\n", (int)nread); - - pending = uv_pipe_pending_type(pipe); - if (!tcp_server_listening) { - ASSERT(1 == uv_pipe_pending_count(pipe)); - ASSERT(nread > 0 && buf->base && pending != UV_UNKNOWN_HANDLE); - read_cb_called++; - - /* Accept the pending TCP server, and start listening on it. */ - ASSERT(pending == UV_TCP); - r = uv_tcp_init(uv_default_loop(), &tcp_server); - ASSERT(r == 0); - - r = uv_accept((uv_stream_t*)pipe, (uv_stream_t*)&tcp_server); - ASSERT(r == 0); - - r = uv_listen((uv_stream_t*)&tcp_server, BACKLOG, on_connection); - ASSERT(r == 0); - - tcp_server_listening = 1; - - /* Make sure that the expected data is correctly multiplexed. */ - ASSERT(memcmp("hello\n", buf->base, nread) == 0); - - outbuf = uv_buf_init("world\n", 6); - r = uv_write(&write_req, (uv_stream_t*)pipe, &outbuf, 1, NULL); - ASSERT(r == 0); - - /* Create a bunch of connections to get both servers to accept. */ - make_many_connections(); - } else if (memcmp("accepted_connection\n", buf->base, nread) == 0) { - /* Remote server has accepted a connection. Close the channel. */ - ASSERT(0 == uv_pipe_pending_count(pipe)); - ASSERT(pending == UV_UNKNOWN_HANDLE); - remote_conn_accepted = 1; - uv_close((uv_handle_t*)&channel, NULL); - } - - free(buf->base); -} - -#ifdef _WIN32 -static void on_read_listen_after_bound_twice(uv_stream_t* handle, - ssize_t nread, - const uv_buf_t* buf) { - int r; - uv_pipe_t* pipe; - uv_handle_type pending; - - pipe = (uv_pipe_t*) handle; - - if (nread == 0) { - /* Everything OK, but nothing read. */ - free(buf->base); - return; - } - - if (nread < 0) { - if (nread == UV_EOF) { - free(buf->base); - return; - } - - printf("error recving on channel: %s\n", uv_strerror(nread)); - abort(); - } - - fprintf(stderr, "got %d bytes\n", (int)nread); - - ASSERT(uv_pipe_pending_count(pipe) > 0); - pending = uv_pipe_pending_type(pipe); - ASSERT(nread > 0 && buf->base && pending != UV_UNKNOWN_HANDLE); - read_cb_called++; - - if (read_cb_called == 1) { - /* Accept the first TCP server, and start listening on it. */ - ASSERT(pending == UV_TCP); - r = uv_tcp_init(uv_default_loop(), &tcp_server); - ASSERT(r == 0); - - r = uv_accept((uv_stream_t*)pipe, (uv_stream_t*)&tcp_server); - ASSERT(r == 0); - - r = uv_listen((uv_stream_t*)&tcp_server, BACKLOG, on_connection); - ASSERT(r == 0); - } else if (read_cb_called == 2) { - /* Accept the second TCP server, and start listening on it. */ - ASSERT(pending == UV_TCP); - r = uv_tcp_init(uv_default_loop(), &tcp_server2); - ASSERT(r == 0); - - r = uv_accept((uv_stream_t*)pipe, (uv_stream_t*)&tcp_server2); - ASSERT(r == 0); - - r = uv_listen((uv_stream_t*)&tcp_server2, BACKLOG, on_connection); - ASSERT(r == UV_EADDRINUSE); - - uv_close((uv_handle_t*)&tcp_server, NULL); - uv_close((uv_handle_t*)&tcp_server2, NULL); - ASSERT(0 == uv_pipe_pending_count(pipe)); - uv_close((uv_handle_t*)&channel, NULL); - } - - free(buf->base); -} -#endif - -void spawn_helper(uv_pipe_t* channel, - uv_process_t* process, - const char* helper) { - uv_process_options_t options; - size_t exepath_size; - char exepath[1024]; - char* args[3]; - int r; - uv_stdio_container_t stdio[1]; - - r = uv_pipe_init(uv_default_loop(), channel, 1); - ASSERT(r == 0); - ASSERT(channel->ipc); - - exepath_size = sizeof(exepath); - r = uv_exepath(exepath, &exepath_size); - ASSERT(r == 0); - - exepath[exepath_size] = '\0'; - args[0] = exepath; - args[1] = (char*)helper; - args[2] = NULL; - - memset(&options, 0, sizeof(options)); - options.file = exepath; - options.args = args; - options.exit_cb = exit_cb; - - options.stdio = stdio; - options.stdio[0].flags = UV_CREATE_PIPE | - UV_READABLE_PIPE | UV_WRITABLE_PIPE; - options.stdio[0].data.stream = (uv_stream_t*)channel; - options.stdio_count = 1; - - r = uv_spawn(uv_default_loop(), process, &options); - ASSERT(r == 0); -} - - -static void on_tcp_write(uv_write_t* req, int status) { - ASSERT(status == 0); - ASSERT(req->handle == (uv_stream_t*)&tcp_connection); - tcp_write_cb_called++; -} - - -static void on_read_alloc(uv_handle_t* handle, - size_t suggested_size, - uv_buf_t* buf) { - buf->base = malloc(suggested_size); - buf->len = suggested_size; -} - - -static void on_tcp_read(uv_stream_t* tcp, ssize_t nread, const uv_buf_t* buf) { - ASSERT(nread > 0); - ASSERT(memcmp("hello again\n", buf->base, nread) == 0); - ASSERT(tcp == (uv_stream_t*)&tcp_connection); - free(buf->base); - - tcp_read_cb_called++; - - uv_close((uv_handle_t*)tcp, NULL); - uv_close((uv_handle_t*)&channel, NULL); -} - - -static void on_read_connection(uv_stream_t* handle, - ssize_t nread, - const uv_buf_t* buf) { - int r; - uv_buf_t outbuf; - uv_pipe_t* pipe; - uv_handle_type pending; - - pipe = (uv_pipe_t*) handle; - if (nread == 0) { - /* Everything OK, but nothing read. */ - free(buf->base); - return; - } - - if (nread < 0) { - if (nread == UV_EOF) { - free(buf->base); - return; - } - - printf("error recving on channel: %s\n", uv_strerror(nread)); - abort(); - } - - fprintf(stderr, "got %d bytes\n", (int)nread); - - ASSERT(1 == uv_pipe_pending_count(pipe)); - pending = uv_pipe_pending_type(pipe); - - ASSERT(nread > 0 && buf->base && pending != UV_UNKNOWN_HANDLE); - read_cb_called++; - - /* Accept the pending TCP connection */ - ASSERT(pending == UV_TCP); - r = uv_tcp_init(uv_default_loop(), &tcp_connection); - ASSERT(r == 0); - - r = uv_accept(handle, (uv_stream_t*)&tcp_connection); - ASSERT(r == 0); - - /* Make sure that the expected data is correctly multiplexed. */ - ASSERT(memcmp("hello\n", buf->base, nread) == 0); - - /* Write/read to/from the connection */ - outbuf = uv_buf_init("world\n", 6); - r = uv_write(&write_req, (uv_stream_t*)&tcp_connection, &outbuf, 1, - on_tcp_write); - ASSERT(r == 0); - - r = uv_read_start((uv_stream_t*)&tcp_connection, on_read_alloc, on_tcp_read); - ASSERT(r == 0); - - free(buf->base); -} - - -static int run_ipc_test(const char* helper, uv_read_cb read_cb) { - uv_process_t process; - int r; - - spawn_helper(&channel, &process, helper); - uv_read_start((uv_stream_t*)&channel, on_alloc, read_cb); - - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(ipc_listen_before_write) { - int r = run_ipc_test("ipc_helper_listen_before_write", on_read); - ASSERT(local_conn_accepted == 1); - ASSERT(remote_conn_accepted == 1); - ASSERT(read_cb_called == 1); - ASSERT(exit_cb_called == 1); - return r; -} - - -TEST_IMPL(ipc_listen_after_write) { - int r = run_ipc_test("ipc_helper_listen_after_write", on_read); - ASSERT(local_conn_accepted == 1); - ASSERT(remote_conn_accepted == 1); - ASSERT(read_cb_called == 1); - ASSERT(exit_cb_called == 1); - return r; -} - - -TEST_IMPL(ipc_tcp_connection) { - int r = run_ipc_test("ipc_helper_tcp_connection", on_read_connection); - ASSERT(read_cb_called == 1); - ASSERT(tcp_write_cb_called == 1); - ASSERT(tcp_read_cb_called == 1); - ASSERT(exit_cb_called == 1); - return r; -} - - -#ifdef _WIN32 -TEST_IMPL(listen_with_simultaneous_accepts) { - uv_tcp_t server; - int r; - struct sockaddr_in addr; - - ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); - - r = uv_tcp_init(uv_default_loop(), &server); - ASSERT(r == 0); - - r = uv_tcp_bind(&server, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); - - r = uv_tcp_simultaneous_accepts(&server, 1); - ASSERT(r == 0); - - r = uv_listen((uv_stream_t*)&server, SOMAXCONN, NULL); - ASSERT(r == 0); - ASSERT(server.reqs_pending == 32); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(listen_no_simultaneous_accepts) { - uv_tcp_t server; - int r; - struct sockaddr_in addr; - - ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); - - r = uv_tcp_init(uv_default_loop(), &server); - ASSERT(r == 0); - - r = uv_tcp_bind(&server, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); - - r = uv_tcp_simultaneous_accepts(&server, 0); - ASSERT(r == 0); - - r = uv_listen((uv_stream_t*)&server, SOMAXCONN, NULL); - ASSERT(r == 0); - ASSERT(server.reqs_pending == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - -TEST_IMPL(ipc_listen_after_bind_twice) { - int r = run_ipc_test("ipc_helper_bind_twice", on_read_listen_after_bound_twice); - ASSERT(read_cb_called == 2); - ASSERT(exit_cb_called == 1); - return r; -} -#endif - - -/* Everything here runs in a child process. */ - -static tcp_conn conn; - - -static void close_cb(uv_handle_t* handle) { - close_cb_called++; -} - - -static void conn_notify_write_cb(uv_write_t* req, int status) { - uv_close((uv_handle_t*)&tcp_server, close_cb); - uv_close((uv_handle_t*)&channel, close_cb); -} - - -static void tcp_connection_write_cb(uv_write_t* req, int status) { - ASSERT((uv_handle_t*)&conn.conn == (uv_handle_t*)req->handle); - uv_close((uv_handle_t*)req->handle, close_cb); - uv_close((uv_handle_t*)&channel, close_cb); - uv_close((uv_handle_t*)&tcp_server, close_cb); - tcp_conn_write_cb_called++; -} - - -static void on_tcp_child_process_read(uv_stream_t* tcp, - ssize_t nread, - const uv_buf_t* buf) { - uv_buf_t outbuf; - int r; - - if (nread < 0) { - if (nread == UV_EOF) { - free(buf->base); - return; - } - - printf("error recving on tcp connection: %s\n", uv_strerror(nread)); - abort(); - } - - ASSERT(nread > 0); - ASSERT(memcmp("world\n", buf->base, nread) == 0); - on_pipe_read_called++; - free(buf->base); - - /* Write to the socket */ - outbuf = uv_buf_init("hello again\n", 12); - r = uv_write(&conn.tcp_write_req, tcp, &outbuf, 1, tcp_connection_write_cb); - ASSERT(r == 0); - - tcp_conn_read_cb_called++; -} - - -static void connect_child_process_cb(uv_connect_t* req, int status) { - int r; - - ASSERT(status == 0); - r = uv_read_start(req->handle, on_read_alloc, on_tcp_child_process_read); - ASSERT(r == 0); -} - - -static void ipc_on_connection(uv_stream_t* server, int status) { - int r; - uv_buf_t buf; - - if (!connection_accepted) { - /* - * Accept the connection and close it. Also let the other - * side know. - */ - ASSERT(status == 0); - ASSERT((uv_stream_t*)&tcp_server == server); - - r = uv_tcp_init(server->loop, &conn.conn); - ASSERT(r == 0); - - r = uv_accept(server, (uv_stream_t*)&conn.conn); - ASSERT(r == 0); - - uv_close((uv_handle_t*)&conn.conn, close_cb); - - buf = uv_buf_init("accepted_connection\n", 20); - r = uv_write2(&conn_notify_req, (uv_stream_t*)&channel, &buf, 1, - NULL, conn_notify_write_cb); - ASSERT(r == 0); - - connection_accepted = 1; - } -} - - -static void ipc_on_connection_tcp_conn(uv_stream_t* server, int status) { - int r; - uv_buf_t buf; - uv_tcp_t* conn; - - ASSERT(status == 0); - ASSERT((uv_stream_t*)&tcp_server == server); - - conn = malloc(sizeof(*conn)); - ASSERT(conn); - - r = uv_tcp_init(server->loop, conn); - ASSERT(r == 0); - - r = uv_accept(server, (uv_stream_t*)conn); - ASSERT(r == 0); - - /* Send the accepted connection to the other process */ - buf = uv_buf_init("hello\n", 6); - r = uv_write2(&conn_notify_req, (uv_stream_t*)&channel, &buf, 1, - (uv_stream_t*)conn, NULL); - ASSERT(r == 0); - - r = uv_read_start((uv_stream_t*) conn, - on_read_alloc, - on_tcp_child_process_read); - ASSERT(r == 0); - - uv_close((uv_handle_t*)conn, close_cb); -} - - -int ipc_helper(int listen_after_write) { - /* - * This is launched from test-ipc.c. stdin is a duplex channel that we - * over which a handle will be transmitted. - */ - struct sockaddr_in addr; - uv_write_t write_req; - int r; - uv_buf_t buf; - - ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); - - r = uv_pipe_init(uv_default_loop(), &channel, 1); - ASSERT(r == 0); - - uv_pipe_open(&channel, 0); - - ASSERT(1 == uv_is_readable((uv_stream_t*) &channel)); - ASSERT(1 == uv_is_writable((uv_stream_t*) &channel)); - ASSERT(0 == uv_is_closing((uv_handle_t*) &channel)); - - r = uv_tcp_init(uv_default_loop(), &tcp_server); - ASSERT(r == 0); - - r = uv_tcp_bind(&tcp_server, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); - - if (!listen_after_write) { - r = uv_listen((uv_stream_t*)&tcp_server, BACKLOG, ipc_on_connection); - ASSERT(r == 0); - } - - buf = uv_buf_init("hello\n", 6); - r = uv_write2(&write_req, (uv_stream_t*)&channel, &buf, 1, - (uv_stream_t*)&tcp_server, NULL); - ASSERT(r == 0); - - if (listen_after_write) { - r = uv_listen((uv_stream_t*)&tcp_server, BACKLOG, ipc_on_connection); - ASSERT(r == 0); - } - - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - - ASSERT(connection_accepted == 1); - ASSERT(close_cb_called == 3); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -int ipc_helper_tcp_connection(void) { - /* - * This is launched from test-ipc.c. stdin is a duplex channel - * over which a handle will be transmitted. - */ - - int r; - struct sockaddr_in addr; - - r = uv_pipe_init(uv_default_loop(), &channel, 1); - ASSERT(r == 0); - - uv_pipe_open(&channel, 0); - - ASSERT(1 == uv_is_readable((uv_stream_t*) &channel)); - ASSERT(1 == uv_is_writable((uv_stream_t*) &channel)); - ASSERT(0 == uv_is_closing((uv_handle_t*) &channel)); - - r = uv_tcp_init(uv_default_loop(), &tcp_server); - ASSERT(r == 0); - - ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); - - r = uv_tcp_bind(&tcp_server, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); - - r = uv_listen((uv_stream_t*)&tcp_server, BACKLOG, ipc_on_connection_tcp_conn); - ASSERT(r == 0); - - /* Make a connection to the server */ - r = uv_tcp_init(uv_default_loop(), &conn.conn); - ASSERT(r == 0); - - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - - r = uv_tcp_connect(&conn.conn_req, - (uv_tcp_t*) &conn.conn, - (const struct sockaddr*) &addr, - connect_child_process_cb); - ASSERT(r == 0); - - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - - ASSERT(tcp_conn_read_cb_called == 1); - ASSERT(tcp_conn_write_cb_called == 1); - ASSERT(close_cb_called == 4); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - -int ipc_helper_bind_twice(void) { - /* - * This is launched from test-ipc.c. stdin is a duplex channel - * over which two handles will be transmitted. - */ - struct sockaddr_in addr; - uv_write_t write_req; - uv_write_t write_req2; - int r; - uv_buf_t buf; - - ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); - - r = uv_pipe_init(uv_default_loop(), &channel, 1); - ASSERT(r == 0); - - uv_pipe_open(&channel, 0); - - ASSERT(1 == uv_is_readable((uv_stream_t*) &channel)); - ASSERT(1 == uv_is_writable((uv_stream_t*) &channel)); - ASSERT(0 == uv_is_closing((uv_handle_t*) &channel)); - - buf = uv_buf_init("hello\n", 6); - - r = uv_tcp_init(uv_default_loop(), &tcp_server); - ASSERT(r == 0); - r = uv_tcp_init(uv_default_loop(), &tcp_server2); - ASSERT(r == 0); - - r = uv_tcp_bind(&tcp_server, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); - r = uv_tcp_bind(&tcp_server2, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); - - r = uv_write2(&write_req, (uv_stream_t*)&channel, &buf, 1, - (uv_stream_t*)&tcp_server, NULL); - ASSERT(r == 0); - r = uv_write2(&write_req2, (uv_stream_t*)&channel, &buf, 1, - (uv_stream_t*)&tcp_server2, NULL); - ASSERT(r == 0); - - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-list.h b/outside/libuv-v1.7.5/test/test-list.h deleted file mode 100644 index 8ee74391a..000000000 --- a/outside/libuv-v1.7.5/test/test-list.h +++ /dev/null @@ -1,722 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -TEST_DECLARE (platform_output) -TEST_DECLARE (callback_order) -TEST_DECLARE (close_order) -TEST_DECLARE (run_once) -TEST_DECLARE (run_nowait) -TEST_DECLARE (loop_alive) -TEST_DECLARE (loop_close) -TEST_DECLARE (loop_stop) -TEST_DECLARE (loop_update_time) -TEST_DECLARE (loop_backend_timeout) -TEST_DECLARE (loop_configure) -TEST_DECLARE (default_loop_close) -TEST_DECLARE (barrier_1) -TEST_DECLARE (barrier_2) -TEST_DECLARE (barrier_3) -TEST_DECLARE (condvar_1) -TEST_DECLARE (condvar_2) -TEST_DECLARE (condvar_3) -TEST_DECLARE (condvar_4) -TEST_DECLARE (condvar_5) -TEST_DECLARE (semaphore_1) -TEST_DECLARE (semaphore_2) -TEST_DECLARE (semaphore_3) -TEST_DECLARE (tty) -TEST_DECLARE (tty_file) -TEST_DECLARE (stdio_over_pipes) -TEST_DECLARE (ip6_pton) -TEST_DECLARE (ipc_listen_before_write) -TEST_DECLARE (ipc_listen_after_write) -#ifndef _WIN32 -TEST_DECLARE (ipc_send_recv_pipe) -#endif -TEST_DECLARE (ipc_send_recv_tcp) -TEST_DECLARE (ipc_tcp_connection) -TEST_DECLARE (tcp_ping_pong) -TEST_DECLARE (tcp_ping_pong_v6) -TEST_DECLARE (pipe_ping_pong) -TEST_DECLARE (delayed_accept) -TEST_DECLARE (multiple_listen) -#ifndef _WIN32 -TEST_DECLARE (tcp_write_after_connect) -#endif -TEST_DECLARE (tcp_writealot) -TEST_DECLARE (tcp_write_fail) -TEST_DECLARE (tcp_try_write) -TEST_DECLARE (tcp_write_queue_order) -TEST_DECLARE (tcp_open) -TEST_DECLARE (tcp_open_twice) -TEST_DECLARE (tcp_connect_error_after_write) -TEST_DECLARE (tcp_shutdown_after_write) -TEST_DECLARE (tcp_bind_error_addrinuse) -TEST_DECLARE (tcp_bind_error_addrnotavail_1) -TEST_DECLARE (tcp_bind_error_addrnotavail_2) -TEST_DECLARE (tcp_bind_error_fault) -TEST_DECLARE (tcp_bind_error_inval) -TEST_DECLARE (tcp_bind_localhost_ok) -TEST_DECLARE (tcp_bind_invalid_flags) -TEST_DECLARE (tcp_listen_without_bind) -TEST_DECLARE (tcp_connect_error_fault) -TEST_DECLARE (tcp_connect_timeout) -TEST_DECLARE (tcp_close_while_connecting) -TEST_DECLARE (tcp_close) -TEST_DECLARE (tcp_create_early) -TEST_DECLARE (tcp_create_early_bad_bind) -TEST_DECLARE (tcp_create_early_bad_domain) -TEST_DECLARE (tcp_create_early_accept) -#ifndef _WIN32 -TEST_DECLARE (tcp_close_accept) -TEST_DECLARE (tcp_oob) -#endif -TEST_DECLARE (tcp_flags) -TEST_DECLARE (tcp_write_to_half_open_connection) -TEST_DECLARE (tcp_unexpected_read) -TEST_DECLARE (tcp_read_stop) -TEST_DECLARE (tcp_bind6_error_addrinuse) -TEST_DECLARE (tcp_bind6_error_addrnotavail) -TEST_DECLARE (tcp_bind6_error_fault) -TEST_DECLARE (tcp_bind6_error_inval) -TEST_DECLARE (tcp_bind6_localhost_ok) -TEST_DECLARE (udp_bind) -TEST_DECLARE (udp_bind_reuseaddr) -TEST_DECLARE (udp_create_early) -TEST_DECLARE (udp_create_early_bad_bind) -TEST_DECLARE (udp_create_early_bad_domain) -TEST_DECLARE (udp_send_and_recv) -TEST_DECLARE (udp_send_immediate) -TEST_DECLARE (udp_send_unreachable) -TEST_DECLARE (udp_multicast_join) -TEST_DECLARE (udp_multicast_join6) -TEST_DECLARE (udp_multicast_ttl) -TEST_DECLARE (udp_multicast_interface) -TEST_DECLARE (udp_multicast_interface6) -TEST_DECLARE (udp_dgram_too_big) -TEST_DECLARE (udp_dual_stack) -TEST_DECLARE (udp_ipv6_only) -TEST_DECLARE (udp_options) -TEST_DECLARE (udp_options6) -TEST_DECLARE (udp_no_autobind) -TEST_DECLARE (udp_open) -TEST_DECLARE (udp_open_twice) -TEST_DECLARE (udp_try_send) -TEST_DECLARE (pipe_bind_error_addrinuse) -TEST_DECLARE (pipe_bind_error_addrnotavail) -TEST_DECLARE (pipe_bind_error_inval) -TEST_DECLARE (pipe_connect_multiple) -TEST_DECLARE (pipe_listen_without_bind) -TEST_DECLARE (pipe_connect_bad_name) -TEST_DECLARE (pipe_connect_to_file) -TEST_DECLARE (pipe_connect_on_prepare) -TEST_DECLARE (pipe_getsockname) -TEST_DECLARE (pipe_getsockname_abstract) -TEST_DECLARE (pipe_getsockname_blocking) -TEST_DECLARE (pipe_pending_instances) -TEST_DECLARE (pipe_sendmsg) -TEST_DECLARE (pipe_server_close) -TEST_DECLARE (connection_fail) -TEST_DECLARE (connection_fail_doesnt_auto_close) -TEST_DECLARE (shutdown_close_tcp) -TEST_DECLARE (shutdown_close_pipe) -TEST_DECLARE (shutdown_eof) -TEST_DECLARE (shutdown_twice) -TEST_DECLARE (callback_stack) -TEST_DECLARE (error_message) -TEST_DECLARE (timer) -TEST_DECLARE (timer_init) -TEST_DECLARE (timer_again) -TEST_DECLARE (timer_start_twice) -TEST_DECLARE (timer_order) -TEST_DECLARE (timer_huge_timeout) -TEST_DECLARE (timer_huge_repeat) -TEST_DECLARE (timer_run_once) -TEST_DECLARE (timer_from_check) -TEST_DECLARE (timer_null_callback) -TEST_DECLARE (idle_starvation) -TEST_DECLARE (loop_handles) -TEST_DECLARE (get_loadavg) -TEST_DECLARE (walk_handles) -TEST_DECLARE (watcher_cross_stop) -TEST_DECLARE (ref) -TEST_DECLARE (idle_ref) -TEST_DECLARE (async_ref) -TEST_DECLARE (prepare_ref) -TEST_DECLARE (check_ref) -TEST_DECLARE (unref_in_prepare_cb) -TEST_DECLARE (timer_ref) -TEST_DECLARE (timer_ref2) -TEST_DECLARE (fs_event_ref) -TEST_DECLARE (fs_poll_ref) -TEST_DECLARE (tcp_ref) -TEST_DECLARE (tcp_ref2) -TEST_DECLARE (tcp_ref2b) -TEST_DECLARE (tcp_ref3) -TEST_DECLARE (tcp_ref4) -TEST_DECLARE (udp_ref) -TEST_DECLARE (udp_ref2) -TEST_DECLARE (udp_ref3) -TEST_DECLARE (pipe_ref) -TEST_DECLARE (pipe_ref2) -TEST_DECLARE (pipe_ref3) -TEST_DECLARE (pipe_ref4) -#ifndef _WIN32 -TEST_DECLARE (pipe_close_stdout_read_stdin) -#endif -TEST_DECLARE (pipe_set_non_blocking) -TEST_DECLARE (process_ref) -TEST_DECLARE (has_ref) -TEST_DECLARE (active) -TEST_DECLARE (embed) -TEST_DECLARE (async) -TEST_DECLARE (async_null_cb) -TEST_DECLARE (get_currentexe) -TEST_DECLARE (process_title) -TEST_DECLARE (cwd_and_chdir) -TEST_DECLARE (get_memory) -TEST_DECLARE (handle_fileno) -TEST_DECLARE (homedir) -TEST_DECLARE (hrtime) -TEST_DECLARE (getaddrinfo_fail) -TEST_DECLARE (getaddrinfo_fail_sync) -TEST_DECLARE (getaddrinfo_basic) -TEST_DECLARE (getaddrinfo_basic_sync) -TEST_DECLARE (getaddrinfo_concurrent) -TEST_DECLARE (getnameinfo_basic_ip4) -TEST_DECLARE (getnameinfo_basic_ip4_sync) -TEST_DECLARE (getnameinfo_basic_ip6) -TEST_DECLARE (getsockname_tcp) -TEST_DECLARE (getsockname_udp) -TEST_DECLARE (fail_always) -TEST_DECLARE (pass_always) -TEST_DECLARE (socket_buffer_size) -TEST_DECLARE (spawn_fails) -#ifndef _WIN32 -TEST_DECLARE (spawn_fails_check_for_waitpid_cleanup) -#endif -TEST_DECLARE (spawn_exit_code) -TEST_DECLARE (spawn_stdout) -TEST_DECLARE (spawn_stdin) -TEST_DECLARE (spawn_stdio_greater_than_3) -TEST_DECLARE (spawn_ignored_stdio) -TEST_DECLARE (spawn_and_kill) -TEST_DECLARE (spawn_detached) -TEST_DECLARE (spawn_and_kill_with_std) -TEST_DECLARE (spawn_and_ping) -TEST_DECLARE (spawn_preserve_env) -TEST_DECLARE (spawn_setuid_fails) -TEST_DECLARE (spawn_setgid_fails) -TEST_DECLARE (spawn_stdout_to_file) -TEST_DECLARE (spawn_stdout_and_stderr_to_file) -TEST_DECLARE (spawn_stdout_and_stderr_to_file2) -TEST_DECLARE (spawn_stdout_and_stderr_to_file_swap) -TEST_DECLARE (spawn_auto_unref) -TEST_DECLARE (spawn_closed_process_io) -TEST_DECLARE (spawn_reads_child_path) -TEST_DECLARE (spawn_inherit_streams) -TEST_DECLARE (fs_poll) -TEST_DECLARE (fs_poll_getpath) -TEST_DECLARE (kill) -TEST_DECLARE (fs_file_noent) -TEST_DECLARE (fs_file_nametoolong) -TEST_DECLARE (fs_file_loop) -TEST_DECLARE (fs_file_async) -TEST_DECLARE (fs_file_sync) -TEST_DECLARE (fs_file_write_null_buffer) -TEST_DECLARE (fs_async_dir) -TEST_DECLARE (fs_async_sendfile) -TEST_DECLARE (fs_mkdtemp) -TEST_DECLARE (fs_fstat) -TEST_DECLARE (fs_access) -TEST_DECLARE (fs_chmod) -TEST_DECLARE (fs_unlink_readonly) -TEST_DECLARE (fs_chown) -TEST_DECLARE (fs_link) -TEST_DECLARE (fs_readlink) -TEST_DECLARE (fs_symlink) -TEST_DECLARE (fs_symlink_dir) -TEST_DECLARE (fs_utime) -TEST_DECLARE (fs_futime) -TEST_DECLARE (fs_file_open_append) -TEST_DECLARE (fs_stat_missing_path) -TEST_DECLARE (fs_read_file_eof) -TEST_DECLARE (fs_event_watch_dir) -TEST_DECLARE (fs_event_watch_dir_recursive) -TEST_DECLARE (fs_event_watch_file) -TEST_DECLARE (fs_event_watch_file_twice) -TEST_DECLARE (fs_event_watch_file_current_dir) -TEST_DECLARE (fs_event_no_callback_after_close) -TEST_DECLARE (fs_event_no_callback_on_close) -TEST_DECLARE (fs_event_immediate_close) -TEST_DECLARE (fs_event_close_with_pending_event) -TEST_DECLARE (fs_event_close_in_callback) -TEST_DECLARE (fs_event_start_and_close) -TEST_DECLARE (fs_event_error_reporting) -TEST_DECLARE (fs_event_getpath) -TEST_DECLARE (fs_scandir_empty_dir) -TEST_DECLARE (fs_scandir_file) -TEST_DECLARE (fs_open_dir) -TEST_DECLARE (fs_rename_to_existing_file) -TEST_DECLARE (fs_write_multiple_bufs) -TEST_DECLARE (fs_read_write_null_arguments) -TEST_DECLARE (fs_write_alotof_bufs) -TEST_DECLARE (fs_write_alotof_bufs_with_offset) -TEST_DECLARE (threadpool_queue_work_simple) -TEST_DECLARE (threadpool_queue_work_einval) -TEST_DECLARE (threadpool_multiple_event_loops) -TEST_DECLARE (threadpool_cancel_getaddrinfo) -TEST_DECLARE (threadpool_cancel_getnameinfo) -TEST_DECLARE (threadpool_cancel_work) -TEST_DECLARE (threadpool_cancel_fs) -TEST_DECLARE (threadpool_cancel_single) -TEST_DECLARE (thread_local_storage) -TEST_DECLARE (thread_mutex) -TEST_DECLARE (thread_rwlock) -TEST_DECLARE (thread_rwlock_trylock) -TEST_DECLARE (thread_create) -TEST_DECLARE (thread_equal) -TEST_DECLARE (dlerror) -TEST_DECLARE (poll_duplex) -TEST_DECLARE (poll_unidirectional) -TEST_DECLARE (poll_close) - -TEST_DECLARE (ip4_addr) -TEST_DECLARE (ip6_addr_link_local) - -#ifdef _WIN32 -TEST_DECLARE (poll_close_doesnt_corrupt_stack) -TEST_DECLARE (poll_closesocket) -TEST_DECLARE (spawn_detect_pipe_name_collisions_on_windows) -#if !defined(USING_UV_SHARED) -TEST_DECLARE (argument_escaping) -TEST_DECLARE (environment_creation) -#endif -TEST_DECLARE (listen_with_simultaneous_accepts) -TEST_DECLARE (listen_no_simultaneous_accepts) -TEST_DECLARE (fs_stat_root) -TEST_DECLARE (spawn_with_an_odd_path) -TEST_DECLARE (ipc_listen_after_bind_twice) -#else -TEST_DECLARE (emfile) -TEST_DECLARE (close_fd) -TEST_DECLARE (spawn_fs_open) -TEST_DECLARE (spawn_setuid_setgid) -TEST_DECLARE (we_get_signal) -TEST_DECLARE (we_get_signals) -TEST_DECLARE (signal_multiple_loops) -TEST_DECLARE (closed_fd_events) -#endif -#ifdef __APPLE__ -TEST_DECLARE (osx_select) -TEST_DECLARE (osx_select_many_fds) -#endif -HELPER_DECLARE (tcp4_echo_server) -HELPER_DECLARE (tcp6_echo_server) -HELPER_DECLARE (udp4_echo_server) -HELPER_DECLARE (pipe_echo_server) - - -TASK_LIST_START - TEST_ENTRY_CUSTOM (platform_output, 0, 1, 5000) - -#if 0 - TEST_ENTRY (callback_order) -#endif - TEST_ENTRY (close_order) - TEST_ENTRY (run_once) - TEST_ENTRY (run_nowait) - TEST_ENTRY (loop_alive) - TEST_ENTRY (loop_close) - TEST_ENTRY (loop_stop) - TEST_ENTRY (loop_update_time) - TEST_ENTRY (loop_backend_timeout) - TEST_ENTRY (loop_configure) - TEST_ENTRY (default_loop_close) - TEST_ENTRY (barrier_1) - TEST_ENTRY (barrier_2) - TEST_ENTRY (barrier_3) - TEST_ENTRY (condvar_1) - TEST_ENTRY (condvar_2) - TEST_ENTRY (condvar_3) - TEST_ENTRY (condvar_4) - TEST_ENTRY (condvar_5) - TEST_ENTRY (semaphore_1) - TEST_ENTRY (semaphore_2) - TEST_ENTRY (semaphore_3) - - TEST_ENTRY (pipe_connect_bad_name) - TEST_ENTRY (pipe_connect_to_file) - TEST_ENTRY (pipe_connect_on_prepare) - - TEST_ENTRY (pipe_server_close) -#ifndef _WIN32 - TEST_ENTRY (pipe_close_stdout_read_stdin) -#endif - TEST_ENTRY (pipe_set_non_blocking) - TEST_ENTRY (tty) - TEST_ENTRY (tty_file) - TEST_ENTRY (stdio_over_pipes) - TEST_ENTRY (ip6_pton) - TEST_ENTRY (ipc_listen_before_write) - TEST_ENTRY (ipc_listen_after_write) -#ifndef _WIN32 - TEST_ENTRY (ipc_send_recv_pipe) -#endif - TEST_ENTRY (ipc_send_recv_tcp) - TEST_ENTRY (ipc_tcp_connection) - - TEST_ENTRY (tcp_ping_pong) - TEST_HELPER (tcp_ping_pong, tcp4_echo_server) - - TEST_ENTRY (tcp_ping_pong_v6) - TEST_HELPER (tcp_ping_pong_v6, tcp6_echo_server) - - TEST_ENTRY (pipe_ping_pong) - TEST_HELPER (pipe_ping_pong, pipe_echo_server) - - TEST_ENTRY (delayed_accept) - TEST_ENTRY (multiple_listen) - -#ifndef _WIN32 - TEST_ENTRY (tcp_write_after_connect) -#endif - - TEST_ENTRY (tcp_writealot) - TEST_HELPER (tcp_writealot, tcp4_echo_server) - - TEST_ENTRY (tcp_write_fail) - TEST_HELPER (tcp_write_fail, tcp4_echo_server) - - TEST_ENTRY (tcp_try_write) - - TEST_ENTRY (tcp_write_queue_order) - - TEST_ENTRY (tcp_open) - TEST_HELPER (tcp_open, tcp4_echo_server) - TEST_ENTRY (tcp_open_twice) - - TEST_ENTRY (tcp_shutdown_after_write) - TEST_HELPER (tcp_shutdown_after_write, tcp4_echo_server) - - TEST_ENTRY (tcp_connect_error_after_write) - TEST_ENTRY (tcp_bind_error_addrinuse) - TEST_ENTRY (tcp_bind_error_addrnotavail_1) - TEST_ENTRY (tcp_bind_error_addrnotavail_2) - TEST_ENTRY (tcp_bind_error_fault) - TEST_ENTRY (tcp_bind_error_inval) - TEST_ENTRY (tcp_bind_localhost_ok) - TEST_ENTRY (tcp_bind_invalid_flags) - TEST_ENTRY (tcp_listen_without_bind) - TEST_ENTRY (tcp_connect_error_fault) - TEST_ENTRY (tcp_connect_timeout) - TEST_ENTRY (tcp_close_while_connecting) - TEST_ENTRY (tcp_close) - TEST_ENTRY (tcp_create_early) - TEST_ENTRY (tcp_create_early_bad_bind) - TEST_ENTRY (tcp_create_early_bad_domain) - TEST_ENTRY (tcp_create_early_accept) -#ifndef _WIN32 - TEST_ENTRY (tcp_close_accept) - TEST_ENTRY (tcp_oob) -#endif - TEST_ENTRY (tcp_flags) - TEST_ENTRY (tcp_write_to_half_open_connection) - TEST_ENTRY (tcp_unexpected_read) - - TEST_ENTRY (tcp_read_stop) - TEST_HELPER (tcp_read_stop, tcp4_echo_server) - - TEST_ENTRY (tcp_bind6_error_addrinuse) - TEST_ENTRY (tcp_bind6_error_addrnotavail) - TEST_ENTRY (tcp_bind6_error_fault) - TEST_ENTRY (tcp_bind6_error_inval) - TEST_ENTRY (tcp_bind6_localhost_ok) - - TEST_ENTRY (udp_bind) - TEST_ENTRY (udp_bind_reuseaddr) - TEST_ENTRY (udp_create_early) - TEST_ENTRY (udp_create_early_bad_bind) - TEST_ENTRY (udp_create_early_bad_domain) - TEST_ENTRY (udp_send_and_recv) - TEST_ENTRY (udp_send_immediate) - TEST_ENTRY (udp_send_unreachable) - TEST_ENTRY (udp_dgram_too_big) - TEST_ENTRY (udp_dual_stack) - TEST_ENTRY (udp_ipv6_only) - TEST_ENTRY (udp_options) - TEST_ENTRY (udp_options6) - TEST_ENTRY (udp_no_autobind) - TEST_ENTRY (udp_multicast_interface) - TEST_ENTRY (udp_multicast_interface6) - TEST_ENTRY (udp_multicast_join) - TEST_ENTRY (udp_multicast_join6) - TEST_ENTRY (udp_multicast_ttl) - TEST_ENTRY (udp_try_send) - - TEST_ENTRY (udp_open) - TEST_HELPER (udp_open, udp4_echo_server) - TEST_ENTRY (udp_open_twice) - - TEST_ENTRY (pipe_bind_error_addrinuse) - TEST_ENTRY (pipe_bind_error_addrnotavail) - TEST_ENTRY (pipe_bind_error_inval) - TEST_ENTRY (pipe_connect_multiple) - TEST_ENTRY (pipe_listen_without_bind) - TEST_ENTRY (pipe_getsockname) - TEST_ENTRY (pipe_getsockname_abstract) - TEST_ENTRY (pipe_getsockname_blocking) - TEST_ENTRY (pipe_pending_instances) - TEST_ENTRY (pipe_sendmsg) - - TEST_ENTRY (connection_fail) - TEST_ENTRY (connection_fail_doesnt_auto_close) - - TEST_ENTRY (shutdown_close_tcp) - TEST_HELPER (shutdown_close_tcp, tcp4_echo_server) - TEST_ENTRY (shutdown_close_pipe) - TEST_HELPER (shutdown_close_pipe, pipe_echo_server) - - TEST_ENTRY (shutdown_eof) - TEST_HELPER (shutdown_eof, tcp4_echo_server) - - TEST_ENTRY (shutdown_twice) - TEST_HELPER (shutdown_twice, tcp4_echo_server) - - TEST_ENTRY (callback_stack) - TEST_HELPER (callback_stack, tcp4_echo_server) - - TEST_ENTRY (error_message) - - TEST_ENTRY (timer) - TEST_ENTRY (timer_init) - TEST_ENTRY (timer_again) - TEST_ENTRY (timer_start_twice) - TEST_ENTRY (timer_order) - TEST_ENTRY (timer_huge_timeout) - TEST_ENTRY (timer_huge_repeat) - TEST_ENTRY (timer_run_once) - TEST_ENTRY (timer_from_check) - TEST_ENTRY (timer_null_callback) - - TEST_ENTRY (idle_starvation) - - TEST_ENTRY (ref) - TEST_ENTRY (idle_ref) - TEST_ENTRY (fs_poll_ref) - TEST_ENTRY (async_ref) - TEST_ENTRY (prepare_ref) - TEST_ENTRY (check_ref) - TEST_ENTRY (unref_in_prepare_cb) - TEST_ENTRY (timer_ref) - TEST_ENTRY (timer_ref2) - TEST_ENTRY (fs_event_ref) - TEST_ENTRY (tcp_ref) - TEST_ENTRY (tcp_ref2) - TEST_ENTRY (tcp_ref2b) - TEST_ENTRY (tcp_ref3) - TEST_HELPER (tcp_ref3, tcp4_echo_server) - TEST_ENTRY (tcp_ref4) - TEST_HELPER (tcp_ref4, tcp4_echo_server) - TEST_ENTRY (udp_ref) - TEST_ENTRY (udp_ref2) - TEST_ENTRY (udp_ref3) - TEST_HELPER (udp_ref3, udp4_echo_server) - TEST_ENTRY (pipe_ref) - TEST_ENTRY (pipe_ref2) - TEST_ENTRY (pipe_ref3) - TEST_HELPER (pipe_ref3, pipe_echo_server) - TEST_ENTRY (pipe_ref4) - TEST_HELPER (pipe_ref4, pipe_echo_server) - TEST_ENTRY (process_ref) - TEST_ENTRY (has_ref) - - TEST_ENTRY (loop_handles) - TEST_ENTRY (walk_handles) - - TEST_ENTRY (watcher_cross_stop) - - TEST_ENTRY (active) - - TEST_ENTRY (embed) - - TEST_ENTRY (async) - TEST_ENTRY (async_null_cb) - - TEST_ENTRY (get_currentexe) - - TEST_ENTRY (process_title) - - TEST_ENTRY (cwd_and_chdir) - - TEST_ENTRY (get_memory) - - TEST_ENTRY (get_loadavg) - - TEST_ENTRY (handle_fileno) - - TEST_ENTRY (homedir) - - TEST_ENTRY (hrtime) - - TEST_ENTRY_CUSTOM (getaddrinfo_fail, 0, 0, 10000) - TEST_ENTRY (getaddrinfo_fail_sync) - - TEST_ENTRY (getaddrinfo_basic) - TEST_ENTRY (getaddrinfo_basic_sync) - TEST_ENTRY (getaddrinfo_concurrent) - - TEST_ENTRY (getnameinfo_basic_ip4) - TEST_ENTRY (getnameinfo_basic_ip4_sync) - TEST_ENTRY (getnameinfo_basic_ip6) - - TEST_ENTRY (getsockname_tcp) - TEST_ENTRY (getsockname_udp) - - TEST_ENTRY (poll_duplex) - TEST_ENTRY (poll_unidirectional) - TEST_ENTRY (poll_close) - - TEST_ENTRY (socket_buffer_size) - - TEST_ENTRY (spawn_fails) -#ifndef _WIN32 - TEST_ENTRY (spawn_fails_check_for_waitpid_cleanup) -#endif - TEST_ENTRY (spawn_exit_code) - TEST_ENTRY (spawn_stdout) - TEST_ENTRY (spawn_stdin) - TEST_ENTRY (spawn_stdio_greater_than_3) - TEST_ENTRY (spawn_ignored_stdio) - TEST_ENTRY (spawn_and_kill) - TEST_ENTRY (spawn_detached) - TEST_ENTRY (spawn_and_kill_with_std) - TEST_ENTRY (spawn_and_ping) - TEST_ENTRY (spawn_preserve_env) - TEST_ENTRY (spawn_setuid_fails) - TEST_ENTRY (spawn_setgid_fails) - TEST_ENTRY (spawn_stdout_to_file) - TEST_ENTRY (spawn_stdout_and_stderr_to_file) - TEST_ENTRY (spawn_stdout_and_stderr_to_file2) - TEST_ENTRY (spawn_stdout_and_stderr_to_file_swap) - TEST_ENTRY (spawn_auto_unref) - TEST_ENTRY (spawn_closed_process_io) - TEST_ENTRY (spawn_reads_child_path) - TEST_ENTRY (spawn_inherit_streams) - TEST_ENTRY (fs_poll) - TEST_ENTRY (fs_poll_getpath) - TEST_ENTRY (kill) - -#ifdef _WIN32 - TEST_ENTRY (poll_close_doesnt_corrupt_stack) - TEST_ENTRY (poll_closesocket) - TEST_ENTRY (spawn_detect_pipe_name_collisions_on_windows) -#if !defined(USING_UV_SHARED) - TEST_ENTRY (argument_escaping) - TEST_ENTRY (environment_creation) -# endif - TEST_ENTRY (listen_with_simultaneous_accepts) - TEST_ENTRY (listen_no_simultaneous_accepts) - TEST_ENTRY (fs_stat_root) - TEST_ENTRY (spawn_with_an_odd_path) - TEST_ENTRY (ipc_listen_after_bind_twice) -#else - TEST_ENTRY (emfile) - TEST_ENTRY (close_fd) - TEST_ENTRY (spawn_fs_open) - TEST_ENTRY (spawn_setuid_setgid) - TEST_ENTRY (we_get_signal) - TEST_ENTRY (we_get_signals) - TEST_ENTRY (signal_multiple_loops) - TEST_ENTRY (closed_fd_events) -#endif - -#ifdef __APPLE__ - TEST_ENTRY (osx_select) - TEST_ENTRY (osx_select_many_fds) -#endif - - TEST_ENTRY (fs_file_noent) - TEST_ENTRY (fs_file_nametoolong) - TEST_ENTRY (fs_file_loop) - TEST_ENTRY (fs_file_async) - TEST_ENTRY (fs_file_sync) - TEST_ENTRY (fs_file_write_null_buffer) - TEST_ENTRY (fs_async_dir) - TEST_ENTRY (fs_async_sendfile) - TEST_ENTRY (fs_mkdtemp) - TEST_ENTRY (fs_fstat) - TEST_ENTRY (fs_access) - TEST_ENTRY (fs_chmod) - TEST_ENTRY (fs_unlink_readonly) - TEST_ENTRY (fs_chown) - TEST_ENTRY (fs_utime) - TEST_ENTRY (fs_futime) - TEST_ENTRY (fs_readlink) - TEST_ENTRY (fs_symlink) - TEST_ENTRY (fs_symlink_dir) - TEST_ENTRY (fs_stat_missing_path) - TEST_ENTRY (fs_read_file_eof) - TEST_ENTRY (fs_file_open_append) - TEST_ENTRY (fs_event_watch_dir) - TEST_ENTRY (fs_event_watch_dir_recursive) - TEST_ENTRY (fs_event_watch_file) - TEST_ENTRY (fs_event_watch_file_twice) - TEST_ENTRY (fs_event_watch_file_current_dir) - TEST_ENTRY (fs_event_no_callback_after_close) - TEST_ENTRY (fs_event_no_callback_on_close) - TEST_ENTRY (fs_event_immediate_close) - TEST_ENTRY (fs_event_close_with_pending_event) - TEST_ENTRY (fs_event_close_in_callback) - TEST_ENTRY (fs_event_start_and_close) - TEST_ENTRY (fs_event_error_reporting) - TEST_ENTRY (fs_event_getpath) - TEST_ENTRY (fs_scandir_empty_dir) - TEST_ENTRY (fs_scandir_file) - TEST_ENTRY (fs_open_dir) - TEST_ENTRY (fs_rename_to_existing_file) - TEST_ENTRY (fs_write_multiple_bufs) - TEST_ENTRY (fs_write_alotof_bufs) - TEST_ENTRY (fs_write_alotof_bufs_with_offset) - TEST_ENTRY (fs_read_write_null_arguments) - TEST_ENTRY (threadpool_queue_work_simple) - TEST_ENTRY (threadpool_queue_work_einval) - TEST_ENTRY (threadpool_multiple_event_loops) - TEST_ENTRY (threadpool_cancel_getaddrinfo) - TEST_ENTRY (threadpool_cancel_getnameinfo) - TEST_ENTRY (threadpool_cancel_work) - TEST_ENTRY (threadpool_cancel_fs) - TEST_ENTRY (threadpool_cancel_single) - TEST_ENTRY (thread_local_storage) - TEST_ENTRY (thread_mutex) - TEST_ENTRY (thread_rwlock) - TEST_ENTRY (thread_rwlock_trylock) - TEST_ENTRY (thread_create) - TEST_ENTRY (thread_equal) - TEST_ENTRY (dlerror) - TEST_ENTRY (ip4_addr) - TEST_ENTRY (ip6_addr_link_local) -#if 0 - /* These are for testing the test runner. */ - TEST_ENTRY (fail_always) - TEST_ENTRY (pass_always) -#endif -TASK_LIST_END diff --git a/outside/libuv-v1.7.5/test/test-loop-alive.c b/outside/libuv-v1.7.5/test/test-loop-alive.c deleted file mode 100644 index cf4d30193..000000000 --- a/outside/libuv-v1.7.5/test/test-loop-alive.c +++ /dev/null @@ -1,67 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -static uv_timer_t timer_handle; - -static void timer_cb(uv_timer_t* handle) { - ASSERT(handle); -} - - -static uv_work_t work_req; - -static void work_cb(uv_work_t* req) { - ASSERT(req); -} - -static void after_work_cb(uv_work_t* req, int status) { - ASSERT(req); - ASSERT(status == 0); -} - - -TEST_IMPL(loop_alive) { - int r; - ASSERT(!uv_loop_alive(uv_default_loop())); - - /* loops with handles are alive */ - uv_timer_init(uv_default_loop(), &timer_handle); - uv_timer_start(&timer_handle, timer_cb, 100, 0); - ASSERT(uv_loop_alive(uv_default_loop())); - - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - ASSERT(!uv_loop_alive(uv_default_loop())); - - /* loops with requests are alive */ - r = uv_queue_work(uv_default_loop(), &work_req, work_cb, after_work_cb); - ASSERT(r == 0); - ASSERT(uv_loop_alive(uv_default_loop())); - - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - ASSERT(!uv_loop_alive(uv_default_loop())); - - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-loop-close.c b/outside/libuv-v1.7.5/test/test-loop-close.c deleted file mode 100644 index 5aec234ed..000000000 --- a/outside/libuv-v1.7.5/test/test-loop-close.c +++ /dev/null @@ -1,53 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -static uv_timer_t timer_handle; - -static void timer_cb(uv_timer_t* handle) { - ASSERT(handle); - uv_stop(handle->loop); -} - - -TEST_IMPL(loop_close) { - int r; - uv_loop_t loop; - - ASSERT(0 == uv_loop_init(&loop)); - - uv_timer_init(&loop, &timer_handle); - uv_timer_start(&timer_handle, timer_cb, 100, 100); - - ASSERT(UV_EBUSY == uv_loop_close(&loop)); - - uv_run(&loop, UV_RUN_DEFAULT); - - uv_close((uv_handle_t*) &timer_handle, NULL); - r = uv_run(&loop, UV_RUN_DEFAULT); - ASSERT(r == 0); - - ASSERT(0 == uv_loop_close(&loop)); - - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-loop-configure.c b/outside/libuv-v1.7.5/test/test-loop-configure.c deleted file mode 100644 index d057c1ed8..000000000 --- a/outside/libuv-v1.7.5/test/test-loop-configure.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2014, Ben Noordhuis - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include "uv.h" -#include "task.h" - -static void timer_cb(uv_timer_t* handle) { - uv_close((uv_handle_t*) handle, NULL); -} - - -TEST_IMPL(loop_configure) { - uv_timer_t timer_handle; - uv_loop_t loop; - ASSERT(0 == uv_loop_init(&loop)); -#ifdef _WIN32 - ASSERT(UV_ENOSYS == uv_loop_configure(&loop, UV_LOOP_BLOCK_SIGNAL, 0)); -#else - ASSERT(0 == uv_loop_configure(&loop, UV_LOOP_BLOCK_SIGNAL, SIGPROF)); -#endif - ASSERT(0 == uv_timer_init(&loop, &timer_handle)); - ASSERT(0 == uv_timer_start(&timer_handle, timer_cb, 10, 0)); - ASSERT(0 == uv_run(&loop, UV_RUN_DEFAULT)); - ASSERT(0 == uv_loop_close(&loop)); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-loop-handles.c b/outside/libuv-v1.7.5/test/test-loop-handles.c deleted file mode 100644 index c3e8498ae..000000000 --- a/outside/libuv-v1.7.5/test/test-loop-handles.c +++ /dev/null @@ -1,337 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -/* Tests commented out with XXX are ones that are failing on Linux */ - -/* - * Purpose of this test is to check semantics of starting and stopping - * prepare, check and idle watchers. - * - * - A watcher must be able to safely stop or close itself; - * - Once a watcher is stopped or closed its callback should never be called. - * - If a watcher is closed, it is implicitly stopped and its close_cb should - * be called exactly once. - * - A watcher can safely start and stop other watchers of the same type. - * - Prepare and check watchers are called once per event loop iterations. - * - All active idle watchers are queued when the event loop has no more work - * to do. This is done repeatedly until all idle watchers are inactive. - * - If a watcher starts another watcher of the same type its callback is not - * immediately queued. For check and prepare watchers, that means that if - * a watcher makes another of the same type active, it'll not be called until - * the next event loop iteration. For idle. watchers this means that the - * newly activated idle watcher might not be queued immediately. - * - Prepare, check, idle watchers keep the event loop alive even when they're - * not active. - * - * This is what the test globally does: - * - * - prepare_1 is always active and counts event loop iterations. It also - * creates and starts prepare_2 every other iteration. Finally it verifies - * that no idle watchers are active before polling. - * - prepare_2 is started by prepare_1 every other iteration. It immediately - * stops itself. It verifies that a watcher is not queued immediately - * if created by another watcher of the same type. - * - There's a check watcher that stops the event loop after a certain number - * of iterations. It starts a varying number of idle_1 watchers. - * - Idle_1 watchers stop themselves after being called a few times. All idle_1 - * watchers try to start the idle_2 watcher if it is not already started or - * awaiting its close callback. - * - The idle_2 watcher always exists but immediately closes itself after - * being started by a check_1 watcher. It verifies that a watcher is - * implicitly stopped when closed, and that a watcher can close itself - * safely. - * - There is a repeating timer. It does not keep the event loop alive - * (ev_unref) but makes sure that the loop keeps polling the system for - * events. - */ - - -#include "uv.h" -#include "task.h" - -#include - - -#define IDLE_COUNT 7 -#define ITERATIONS 21 -#define TIMEOUT 100 - - -static uv_prepare_t prepare_1_handle; -static uv_prepare_t prepare_2_handle; - -static uv_check_t check_handle; - -static uv_idle_t idle_1_handles[IDLE_COUNT]; -static uv_idle_t idle_2_handle; - -static uv_timer_t timer_handle; - - -static int loop_iteration = 0; - -static int prepare_1_cb_called = 0; -static int prepare_1_close_cb_called = 0; - -static int prepare_2_cb_called = 0; -static int prepare_2_close_cb_called = 0; - -static int check_cb_called = 0; -static int check_close_cb_called = 0; - -static int idle_1_cb_called = 0; -static int idle_1_close_cb_called = 0; -static int idles_1_active = 0; - -static int idle_2_cb_called = 0; -static int idle_2_close_cb_called = 0; -static int idle_2_cb_started = 0; -static int idle_2_is_active = 0; - - -static void timer_cb(uv_timer_t* handle) { - ASSERT(handle == &timer_handle); -} - - -static void idle_2_close_cb(uv_handle_t* handle) { - fprintf(stderr, "%s", "IDLE_2_CLOSE_CB\n"); - fflush(stderr); - - ASSERT(handle == (uv_handle_t*)&idle_2_handle); - - ASSERT(idle_2_is_active); - - idle_2_close_cb_called++; - idle_2_is_active = 0; -} - - -static void idle_2_cb(uv_idle_t* handle) { - fprintf(stderr, "%s", "IDLE_2_CB\n"); - fflush(stderr); - - ASSERT(handle == &idle_2_handle); - - idle_2_cb_called++; - - uv_close((uv_handle_t*)handle, idle_2_close_cb); -} - - -static void idle_1_cb(uv_idle_t* handle) { - int r; - - fprintf(stderr, "%s", "IDLE_1_CB\n"); - fflush(stderr); - - ASSERT(handle != NULL); - ASSERT(idles_1_active > 0); - - /* Init idle_2 and make it active */ - if (!idle_2_is_active && !uv_is_closing((uv_handle_t*)&idle_2_handle)) { - r = uv_idle_init(uv_default_loop(), &idle_2_handle); - ASSERT(r == 0); - r = uv_idle_start(&idle_2_handle, idle_2_cb); - ASSERT(r == 0); - idle_2_is_active = 1; - idle_2_cb_started++; - } - - idle_1_cb_called++; - - if (idle_1_cb_called % 5 == 0) { - r = uv_idle_stop((uv_idle_t*)handle); - ASSERT(r == 0); - idles_1_active--; - } -} - - -static void idle_1_close_cb(uv_handle_t* handle) { - fprintf(stderr, "%s", "IDLE_1_CLOSE_CB\n"); - fflush(stderr); - - ASSERT(handle != NULL); - - idle_1_close_cb_called++; -} - - -static void prepare_1_close_cb(uv_handle_t* handle) { - fprintf(stderr, "%s", "PREPARE_1_CLOSE_CB"); - fflush(stderr); - ASSERT(handle == (uv_handle_t*)&prepare_1_handle); - - prepare_1_close_cb_called++; -} - - -static void check_close_cb(uv_handle_t* handle) { - fprintf(stderr, "%s", "CHECK_CLOSE_CB\n"); - fflush(stderr); - ASSERT(handle == (uv_handle_t*)&check_handle); - - check_close_cb_called++; -} - - -static void prepare_2_close_cb(uv_handle_t* handle) { - fprintf(stderr, "%s", "PREPARE_2_CLOSE_CB\n"); - fflush(stderr); - ASSERT(handle == (uv_handle_t*)&prepare_2_handle); - - prepare_2_close_cb_called++; -} - - -static void check_cb(uv_check_t* handle) { - int i, r; - - fprintf(stderr, "%s", "CHECK_CB\n"); - fflush(stderr); - ASSERT(handle == &check_handle); - - if (loop_iteration < ITERATIONS) { - /* Make some idle watchers active */ - for (i = 0; i < 1 + (loop_iteration % IDLE_COUNT); i++) { - r = uv_idle_start(&idle_1_handles[i], idle_1_cb); - ASSERT(r == 0); - idles_1_active++; - } - - } else { - /* End of the test - close all handles */ - uv_close((uv_handle_t*)&prepare_1_handle, prepare_1_close_cb); - uv_close((uv_handle_t*)&check_handle, check_close_cb); - uv_close((uv_handle_t*)&prepare_2_handle, prepare_2_close_cb); - - for (i = 0; i < IDLE_COUNT; i++) { - uv_close((uv_handle_t*)&idle_1_handles[i], idle_1_close_cb); - } - - /* This handle is closed/recreated every time, close it only if it is */ - /* active.*/ - if (idle_2_is_active) { - uv_close((uv_handle_t*)&idle_2_handle, idle_2_close_cb); - } - } - - check_cb_called++; -} - - -static void prepare_2_cb(uv_prepare_t* handle) { - int r; - - fprintf(stderr, "%s", "PREPARE_2_CB\n"); - fflush(stderr); - ASSERT(handle == &prepare_2_handle); - - /* prepare_2 gets started by prepare_1 when (loop_iteration % 2 == 0), */ - /* and it stops itself immediately. A started watcher is not queued */ - /* until the next round, so when this callback is made */ - /* (loop_iteration % 2 == 0) cannot be true. */ - ASSERT(loop_iteration % 2 != 0); - - r = uv_prepare_stop((uv_prepare_t*)handle); - ASSERT(r == 0); - - prepare_2_cb_called++; -} - - -static void prepare_1_cb(uv_prepare_t* handle) { - int r; - - fprintf(stderr, "%s", "PREPARE_1_CB\n"); - fflush(stderr); - ASSERT(handle == &prepare_1_handle); - - if (loop_iteration % 2 == 0) { - r = uv_prepare_start(&prepare_2_handle, prepare_2_cb); - ASSERT(r == 0); - } - - prepare_1_cb_called++; - loop_iteration++; - - printf("Loop iteration %d of %d.\n", loop_iteration, ITERATIONS); -} - - -TEST_IMPL(loop_handles) { - int i; - int r; - - r = uv_prepare_init(uv_default_loop(), &prepare_1_handle); - ASSERT(r == 0); - r = uv_prepare_start(&prepare_1_handle, prepare_1_cb); - ASSERT(r == 0); - - r = uv_check_init(uv_default_loop(), &check_handle); - ASSERT(r == 0); - r = uv_check_start(&check_handle, check_cb); - ASSERT(r == 0); - - /* initialize only, prepare_2 is started by prepare_1_cb */ - r = uv_prepare_init(uv_default_loop(), &prepare_2_handle); - ASSERT(r == 0); - - for (i = 0; i < IDLE_COUNT; i++) { - /* initialize only, idle_1 handles are started by check_cb */ - r = uv_idle_init(uv_default_loop(), &idle_1_handles[i]); - ASSERT(r == 0); - } - - /* don't init or start idle_2, both is done by idle_1_cb */ - - /* the timer callback is there to keep the event loop polling */ - /* unref it as it is not supposed to keep the loop alive */ - r = uv_timer_init(uv_default_loop(), &timer_handle); - ASSERT(r == 0); - r = uv_timer_start(&timer_handle, timer_cb, TIMEOUT, TIMEOUT); - ASSERT(r == 0); - uv_unref((uv_handle_t*)&timer_handle); - - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - - ASSERT(loop_iteration == ITERATIONS); - - ASSERT(prepare_1_cb_called == ITERATIONS); - ASSERT(prepare_1_close_cb_called == 1); - - ASSERT(prepare_2_cb_called == floor(ITERATIONS / 2.0)); - ASSERT(prepare_2_close_cb_called == 1); - - ASSERT(check_cb_called == ITERATIONS); - ASSERT(check_close_cb_called == 1); - - /* idle_1_cb should be called a lot */ - ASSERT(idle_1_close_cb_called == IDLE_COUNT); - - ASSERT(idle_2_close_cb_called == idle_2_cb_started); - ASSERT(idle_2_is_active == 0); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-loop-stop.c b/outside/libuv-v1.7.5/test/test-loop-stop.c deleted file mode 100644 index 14b8c1118..000000000 --- a/outside/libuv-v1.7.5/test/test-loop-stop.c +++ /dev/null @@ -1,71 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -static uv_prepare_t prepare_handle; -static uv_timer_t timer_handle; -static int prepare_called = 0; -static int timer_called = 0; -static int num_ticks = 10; - - -static void prepare_cb(uv_prepare_t* handle) { - ASSERT(handle == &prepare_handle); - prepare_called++; - if (prepare_called == num_ticks) - uv_prepare_stop(handle); -} - - -static void timer_cb(uv_timer_t* handle) { - ASSERT(handle == &timer_handle); - timer_called++; - if (timer_called == 1) - uv_stop(uv_default_loop()); - else if (timer_called == num_ticks) - uv_timer_stop(handle); -} - - -TEST_IMPL(loop_stop) { - int r; - uv_prepare_init(uv_default_loop(), &prepare_handle); - uv_prepare_start(&prepare_handle, prepare_cb); - uv_timer_init(uv_default_loop(), &timer_handle); - uv_timer_start(&timer_handle, timer_cb, 100, 100); - - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r != 0); - ASSERT(timer_called == 1); - - r = uv_run(uv_default_loop(), UV_RUN_NOWAIT); - ASSERT(r != 0); - ASSERT(prepare_called > 1); - - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - ASSERT(timer_called == 10); - ASSERT(prepare_called == 10); - - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-loop-time.c b/outside/libuv-v1.7.5/test/test-loop-time.c deleted file mode 100644 index a2db42cce..000000000 --- a/outside/libuv-v1.7.5/test/test-loop-time.c +++ /dev/null @@ -1,63 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - - -TEST_IMPL(loop_update_time) { - uint64_t start; - - start = uv_now(uv_default_loop()); - while (uv_now(uv_default_loop()) - start < 1000) - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_NOWAIT)); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - -static void cb(uv_timer_t* timer) { - uv_close((uv_handle_t*)timer, NULL); -} - -TEST_IMPL(loop_backend_timeout) { - uv_loop_t *loop = uv_default_loop(); - uv_timer_t timer; - int r; - - r = uv_timer_init(loop, &timer); - ASSERT(r == 0); - - ASSERT(!uv_loop_alive(loop)); - ASSERT(uv_backend_timeout(loop) == 0); - - r = uv_timer_start(&timer, cb, 1000, 0); /* 1 sec */ - ASSERT(r == 0); - ASSERT(uv_backend_timeout(loop) > 100); /* 0.1 sec */ - ASSERT(uv_backend_timeout(loop) <= 1000); /* 1 sec */ - - r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT(r == 0); - ASSERT(uv_backend_timeout(loop) == 0); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-multiple-listen.c b/outside/libuv-v1.7.5/test/test-multiple-listen.c deleted file mode 100644 index 4ae5fa67b..000000000 --- a/outside/libuv-v1.7.5/test/test-multiple-listen.c +++ /dev/null @@ -1,109 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" -#include -#include - -static int connection_cb_called = 0; -static int close_cb_called = 0; -static int connect_cb_called = 0; -static uv_tcp_t server; -static uv_tcp_t client; - - -static void close_cb(uv_handle_t* handle) { - ASSERT(handle != NULL); - close_cb_called++; -} - - -static void connection_cb(uv_stream_t* tcp, int status) { - ASSERT(status == 0); - uv_close((uv_handle_t*)&server, close_cb); - connection_cb_called++; -} - - -static void start_server(void) { - struct sockaddr_in addr; - int r; - - ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); - - r = uv_tcp_init(uv_default_loop(), &server); - ASSERT(r == 0); - - r = uv_tcp_bind(&server, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); - - r = uv_listen((uv_stream_t*)&server, 128, connection_cb); - ASSERT(r == 0); - - r = uv_listen((uv_stream_t*)&server, 128, connection_cb); - ASSERT(r == 0); -} - - -static void connect_cb(uv_connect_t* req, int status) { - ASSERT(req != NULL); - ASSERT(status == 0); - free(req); - uv_close((uv_handle_t*)&client, close_cb); - connect_cb_called++; -} - - -static void client_connect(void) { - struct sockaddr_in addr; - uv_connect_t* connect_req = malloc(sizeof *connect_req); - int r; - - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - ASSERT(connect_req != NULL); - - r = uv_tcp_init(uv_default_loop(), &client); - ASSERT(r == 0); - - r = uv_tcp_connect(connect_req, - &client, - (const struct sockaddr*) &addr, - connect_cb); - ASSERT(r == 0); -} - - - -TEST_IMPL(multiple_listen) { - start_server(); - - client_connect(); - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(connection_cb_called == 1); - ASSERT(connect_cb_called == 1); - ASSERT(close_cb_called == 2); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-mutexes.c b/outside/libuv-v1.7.5/test/test-mutexes.c deleted file mode 100644 index 4aeac73b4..000000000 --- a/outside/libuv-v1.7.5/test/test-mutexes.c +++ /dev/null @@ -1,122 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#include -#include - - -/* The mutex and rwlock tests are really poor. - * They're very basic sanity checks and nothing more. - * Apologies if that rhymes. - */ - -TEST_IMPL(thread_mutex) { - uv_mutex_t mutex; - int r; - - r = uv_mutex_init(&mutex); - ASSERT(r == 0); - - uv_mutex_lock(&mutex); - uv_mutex_unlock(&mutex); - uv_mutex_destroy(&mutex); - - return 0; -} - - -TEST_IMPL(thread_rwlock) { - uv_rwlock_t rwlock; - int r; - - r = uv_rwlock_init(&rwlock); - ASSERT(r == 0); - - uv_rwlock_rdlock(&rwlock); - uv_rwlock_rdunlock(&rwlock); - uv_rwlock_wrlock(&rwlock); - uv_rwlock_wrunlock(&rwlock); - uv_rwlock_destroy(&rwlock); - - return 0; -} - - -TEST_IMPL(thread_rwlock_trylock) { - uv_rwlock_t rwlock; - int r; - - r = uv_rwlock_init(&rwlock); - ASSERT(r == 0); - - /* No locks held. */ - - r = uv_rwlock_trywrlock(&rwlock); - ASSERT(r == 0); - - /* Write lock held. */ - - r = uv_rwlock_tryrdlock(&rwlock); - ASSERT(r == UV_EBUSY); - r = uv_rwlock_trywrlock(&rwlock); - ASSERT(r == UV_EBUSY); - - uv_rwlock_wrunlock(&rwlock); - - /* No locks held. */ - - r = uv_rwlock_tryrdlock(&rwlock); - ASSERT(r == 0); - - /* One read lock held. */ - - r = uv_rwlock_tryrdlock(&rwlock); - ASSERT(r == 0); - - /* Two read locks held. */ - - r = uv_rwlock_trywrlock(&rwlock); - ASSERT(r == UV_EBUSY); - - uv_rwlock_rdunlock(&rwlock); - - /* One read lock held. */ - - uv_rwlock_rdunlock(&rwlock); - - /* No read locks held. */ - - r = uv_rwlock_trywrlock(&rwlock); - ASSERT(r == 0); - - /* Write lock held. */ - - uv_rwlock_wrunlock(&rwlock); - - /* No locks held. */ - - uv_rwlock_destroy(&rwlock); - - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-osx-select.c b/outside/libuv-v1.7.5/test/test-osx-select.c deleted file mode 100644 index a0afda918..000000000 --- a/outside/libuv-v1.7.5/test/test-osx-select.c +++ /dev/null @@ -1,140 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#ifdef __APPLE__ - -#include -#include - -static int read_count; - - -static void alloc_cb(uv_handle_t* handle, size_t size, uv_buf_t* buf) { - static char slab[1024]; - buf->base = slab; - buf->len = sizeof(slab); -} - - -static void read_cb(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf) { - fprintf(stdout, "got data %d\n", ++read_count); - fflush(stdout); - - if (read_count == 3) - uv_close((uv_handle_t*) stream, NULL); -} - - -TEST_IMPL(osx_select) { - int r; - int fd; - size_t i; - size_t len; - const char* str; - uv_tty_t tty; - - fd = open("/dev/tty", O_RDONLY); - if (fd < 0) { - fprintf(stderr, "Cannot open /dev/tty as read-only: %s\n", strerror(errno)); - fflush(stderr); - return TEST_SKIP; - } - - r = uv_tty_init(uv_default_loop(), &tty, fd, 1); - ASSERT(r == 0); - - uv_read_start((uv_stream_t*) &tty, alloc_cb, read_cb); - - /* Emulate user-input */ - str = "got some input\n" - "with a couple of lines\n" - "feel pretty happy\n"; - for (i = 0, len = strlen(str); i < len; i++) { - r = ioctl(fd, TIOCSTI, str + i); - ASSERT(r == 0); - } - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(read_count == 3); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(osx_select_many_fds) { - int r; - int fd; - size_t i; - size_t len; - const char* str; - struct sockaddr_in addr; - uv_tty_t tty; - uv_tcp_t tcps[1500]; - - TEST_FILE_LIMIT(ARRAY_SIZE(tcps) + 100); - - r = uv_ip4_addr("127.0.0.1", 0, &addr); - ASSERT(r == 0); - - for (i = 0; i < ARRAY_SIZE(tcps); i++) { - r = uv_tcp_init(uv_default_loop(), &tcps[i]); - ASSERT(r == 0); - r = uv_tcp_bind(&tcps[i], (const struct sockaddr *) &addr, 0); - ASSERT(r == 0); - uv_unref((uv_handle_t*) &tcps[i]); - } - - fd = open("/dev/tty", O_RDONLY); - if (fd < 0) { - fprintf(stderr, "Cannot open /dev/tty as read-only: %s\n", strerror(errno)); - fflush(stderr); - return TEST_SKIP; - } - - r = uv_tty_init(uv_default_loop(), &tty, fd, 1); - ASSERT(r == 0); - - r = uv_read_start((uv_stream_t*) &tty, alloc_cb, read_cb); - ASSERT(r == 0); - - /* Emulate user-input */ - str = "got some input\n" - "with a couple of lines\n" - "feel pretty happy\n"; - for (i = 0, len = strlen(str); i < len; i++) { - r = ioctl(fd, TIOCSTI, str + i); - ASSERT(r == 0); - } - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(read_count == 3); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - -#endif /* __APPLE__ */ diff --git a/outside/libuv-v1.7.5/test/test-pass-always.c b/outside/libuv-v1.7.5/test/test-pass-always.c deleted file mode 100644 index 4fb58ff94..000000000 --- a/outside/libuv-v1.7.5/test/test-pass-always.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "task.h" - - -TEST_IMPL(pass_always) { - /* This test always passes. It is used to test the test runner. */ - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-ping-pong.c b/outside/libuv-v1.7.5/test/test-ping-pong.c deleted file mode 100644 index c07417854..000000000 --- a/outside/libuv-v1.7.5/test/test-ping-pong.c +++ /dev/null @@ -1,270 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#include -#include - -static int completed_pingers = 0; - -#define NUM_PINGS 1000 - -/* 64 bytes is enough for a pinger */ -#define BUFSIZE 10240 - -static char PING[] = "PING\n"; -static int pinger_on_connect_count; - - -typedef struct { - int pongs; - int state; - union { - uv_tcp_t tcp; - uv_pipe_t pipe; - } stream; - uv_connect_t connect_req; - char read_buffer[BUFSIZE]; -} pinger_t; - - -static void alloc_cb(uv_handle_t* handle, size_t size, uv_buf_t* buf) { - buf->base = malloc(size); - buf->len = size; -} - - -static void pinger_on_close(uv_handle_t* handle) { - pinger_t* pinger = (pinger_t*)handle->data; - - ASSERT(NUM_PINGS == pinger->pongs); - - free(pinger); - - completed_pingers++; -} - - -static void pinger_after_write(uv_write_t *req, int status) { - ASSERT(status == 0); - free(req); -} - - -static void pinger_write_ping(pinger_t* pinger) { - uv_write_t *req; - uv_buf_t buf; - - buf = uv_buf_init(PING, sizeof(PING) - 1); - - req = malloc(sizeof(*req)); - if (uv_write(req, - (uv_stream_t*) &pinger->stream.tcp, - &buf, - 1, - pinger_after_write)) { - FATAL("uv_write failed"); - } - - puts("PING"); -} - - -static void pinger_read_cb(uv_stream_t* stream, - ssize_t nread, - const uv_buf_t* buf) { - ssize_t i; - pinger_t* pinger; - - pinger = (pinger_t*)stream->data; - - if (nread < 0) { - ASSERT(nread == UV_EOF); - - puts("got EOF"); - free(buf->base); - - uv_close((uv_handle_t*)(&pinger->stream.tcp), pinger_on_close); - - return; - } - - /* Now we count the pings */ - for (i = 0; i < nread; i++) { - ASSERT(buf->base[i] == PING[pinger->state]); - pinger->state = (pinger->state + 1) % (sizeof(PING) - 1); - - if (pinger->state != 0) - continue; - - printf("PONG %d\n", pinger->pongs); - pinger->pongs++; - - if (pinger->pongs < NUM_PINGS) { - pinger_write_ping(pinger); - } else { - uv_close((uv_handle_t*)(&pinger->stream.tcp), pinger_on_close); - break; - } - } - - free(buf->base); -} - - -static void pinger_on_connect(uv_connect_t *req, int status) { - pinger_t *pinger = (pinger_t*)req->handle->data; - - pinger_on_connect_count++; - - ASSERT(status == 0); - - ASSERT(1 == uv_is_readable(req->handle)); - ASSERT(1 == uv_is_writable(req->handle)); - ASSERT(0 == uv_is_closing((uv_handle_t *) req->handle)); - - pinger_write_ping(pinger); - - uv_read_start((uv_stream_t*)(req->handle), alloc_cb, pinger_read_cb); -} - - -/* same ping-pong test, but using IPv6 connection */ -static void tcp_pinger_v6_new(void) { - int r; - struct sockaddr_in6 server_addr; - pinger_t *pinger; - - - ASSERT(0 ==uv_ip6_addr("::1", TEST_PORT, &server_addr)); - pinger = malloc(sizeof(*pinger)); - ASSERT(pinger != NULL); - pinger->state = 0; - pinger->pongs = 0; - - /* Try to connect to the server and do NUM_PINGS ping-pongs. */ - r = uv_tcp_init(uv_default_loop(), &pinger->stream.tcp); - pinger->stream.tcp.data = pinger; - ASSERT(!r); - - /* We are never doing multiple reads/connects at a time anyway. */ - /* so these handles can be pre-initialized. */ - r = uv_tcp_connect(&pinger->connect_req, - &pinger->stream.tcp, - (const struct sockaddr*) &server_addr, - pinger_on_connect); - ASSERT(!r); - - /* Synchronous connect callbacks are not allowed. */ - ASSERT(pinger_on_connect_count == 0); -} - - -static void tcp_pinger_new(void) { - int r; - struct sockaddr_in server_addr; - pinger_t *pinger; - - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &server_addr)); - pinger = malloc(sizeof(*pinger)); - ASSERT(pinger != NULL); - pinger->state = 0; - pinger->pongs = 0; - - /* Try to connect to the server and do NUM_PINGS ping-pongs. */ - r = uv_tcp_init(uv_default_loop(), &pinger->stream.tcp); - pinger->stream.tcp.data = pinger; - ASSERT(!r); - - /* We are never doing multiple reads/connects at a time anyway. */ - /* so these handles can be pre-initialized. */ - r = uv_tcp_connect(&pinger->connect_req, - &pinger->stream.tcp, - (const struct sockaddr*) &server_addr, - pinger_on_connect); - ASSERT(!r); - - /* Synchronous connect callbacks are not allowed. */ - ASSERT(pinger_on_connect_count == 0); -} - - -static void pipe_pinger_new(void) { - int r; - pinger_t *pinger; - - pinger = (pinger_t*)malloc(sizeof(*pinger)); - ASSERT(pinger != NULL); - pinger->state = 0; - pinger->pongs = 0; - - /* Try to connect to the server and do NUM_PINGS ping-pongs. */ - r = uv_pipe_init(uv_default_loop(), &pinger->stream.pipe, 0); - pinger->stream.pipe.data = pinger; - ASSERT(!r); - - /* We are never doing multiple reads/connects at a time anyway. */ - /* so these handles can be pre-initialized. */ - - uv_pipe_connect(&pinger->connect_req, &pinger->stream.pipe, TEST_PIPENAME, - pinger_on_connect); - - /* Synchronous connect callbacks are not allowed. */ - ASSERT(pinger_on_connect_count == 0); -} - - -TEST_IMPL(tcp_ping_pong) { - tcp_pinger_new(); - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(completed_pingers == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(tcp_ping_pong_v6) { - if (!can_ipv6()) - RETURN_SKIP("IPv6 not supported"); - - tcp_pinger_v6_new(); - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(completed_pingers == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(pipe_ping_pong) { - pipe_pinger_new(); - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(completed_pingers == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-pipe-bind-error.c b/outside/libuv-v1.7.5/test/test-pipe-bind-error.c deleted file mode 100644 index 38b57db69..000000000 --- a/outside/libuv-v1.7.5/test/test-pipe-bind-error.c +++ /dev/null @@ -1,136 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" -#include -#include - - -#ifdef _WIN32 -# define BAD_PIPENAME "bad-pipe" -#else -# define BAD_PIPENAME "/path/to/unix/socket/that/really/should/not/be/there" -#endif - - -static int close_cb_called = 0; - - -static void close_cb(uv_handle_t* handle) { - ASSERT(handle != NULL); - close_cb_called++; -} - - -TEST_IMPL(pipe_bind_error_addrinuse) { - uv_pipe_t server1, server2; - int r; - - r = uv_pipe_init(uv_default_loop(), &server1, 0); - ASSERT(r == 0); - r = uv_pipe_bind(&server1, TEST_PIPENAME); - ASSERT(r == 0); - - r = uv_pipe_init(uv_default_loop(), &server2, 0); - ASSERT(r == 0); - r = uv_pipe_bind(&server2, TEST_PIPENAME); - ASSERT(r == UV_EADDRINUSE); - - r = uv_listen((uv_stream_t*)&server1, SOMAXCONN, NULL); - ASSERT(r == 0); - r = uv_listen((uv_stream_t*)&server2, SOMAXCONN, NULL); - ASSERT(r == UV_EINVAL); - - uv_close((uv_handle_t*)&server1, close_cb); - uv_close((uv_handle_t*)&server2, close_cb); - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(close_cb_called == 2); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(pipe_bind_error_addrnotavail) { - uv_pipe_t server; - int r; - - r = uv_pipe_init(uv_default_loop(), &server, 0); - ASSERT(r == 0); - - r = uv_pipe_bind(&server, BAD_PIPENAME); - ASSERT(r == UV_EACCES); - - uv_close((uv_handle_t*)&server, close_cb); - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(close_cb_called == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(pipe_bind_error_inval) { - uv_pipe_t server; - int r; - - r = uv_pipe_init(uv_default_loop(), &server, 0); - ASSERT(r == 0); - r = uv_pipe_bind(&server, TEST_PIPENAME); - ASSERT(r == 0); - r = uv_pipe_bind(&server, TEST_PIPENAME_2); - ASSERT(r == UV_EINVAL); - - uv_close((uv_handle_t*)&server, close_cb); - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(close_cb_called == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(pipe_listen_without_bind) { - uv_pipe_t server; - int r; - - r = uv_pipe_init(uv_default_loop(), &server, 0); - ASSERT(r == 0); - - r = uv_listen((uv_stream_t*)&server, SOMAXCONN, NULL); - ASSERT(r == UV_EINVAL); - - uv_close((uv_handle_t*)&server, close_cb); - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(close_cb_called == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-pipe-close-stdout-read-stdin.c b/outside/libuv-v1.7.5/test/test-pipe-close-stdout-read-stdin.c deleted file mode 100644 index ee8bb2a9a..000000000 --- a/outside/libuv-v1.7.5/test/test-pipe-close-stdout-read-stdin.c +++ /dev/null @@ -1,104 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#ifndef _WIN32 - -#include -#include -#include -#include - -#include "uv.h" -#include "task.h" - -void alloc_buffer(uv_handle_t *handle, size_t suggested_size, uv_buf_t* buf) -{ - static char buffer[1024]; - - buf->base = buffer; - buf->len = sizeof(buffer); -} - -void read_stdin(uv_stream_t *stream, ssize_t nread, const uv_buf_t* buf) -{ - if (nread < 0) { - uv_close((uv_handle_t*)stream, NULL); - return; - } -} - -/* - * This test is a reproduction of joyent/libuv#1419 . - */ -TEST_IMPL(pipe_close_stdout_read_stdin) { - int r = -1; - int pid; - int fd[2]; - int status; - uv_pipe_t stdin_pipe; - - r = pipe(fd); - ASSERT(r == 0); - - if ((pid = fork()) == 0) { - /* - * Make the read side of the pipe our stdin. - * The write side will be closed by the parent process. - */ - close(fd[1]); - close(0); - r = dup(fd[0]); - ASSERT(r != -1); - - /* Create a stream that reads from the pipe. */ - r = uv_pipe_init(uv_default_loop(), (uv_pipe_t *)&stdin_pipe, 0); - ASSERT(r == 0); - - r = uv_pipe_open((uv_pipe_t *)&stdin_pipe, 0); - ASSERT(r == 0); - - r = uv_read_start((uv_stream_t *)&stdin_pipe, alloc_buffer, read_stdin); - ASSERT(r == 0); - - /* - * Because the other end of the pipe was closed, there should - * be no event left to process after one run of the event loop. - * Otherwise, it means that events were not processed correctly. - */ - ASSERT(uv_run(uv_default_loop(), UV_RUN_NOWAIT) == 0); - } else { - /* - * Close both ends of the pipe so that the child - * get a POLLHUP event when it tries to read from - * the other end. - */ - close(fd[1]); - close(fd[0]); - - waitpid(pid, &status, 0); - ASSERT(WIFEXITED(status) && WEXITSTATUS(status) == 0); - } - - MAKE_VALGRIND_HAPPY(); - return 0; -} - -#endif /* ifndef _WIN32 */ diff --git a/outside/libuv-v1.7.5/test/test-pipe-connect-error.c b/outside/libuv-v1.7.5/test/test-pipe-connect-error.c deleted file mode 100644 index ebb2a6ca8..000000000 --- a/outside/libuv-v1.7.5/test/test-pipe-connect-error.c +++ /dev/null @@ -1,95 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" -#include -#include - - -#ifdef _WIN32 -# define BAD_PIPENAME "bad-pipe" -#else -# define BAD_PIPENAME "/path/to/unix/socket/that/really/should/not/be/there" -#endif - - -static int close_cb_called = 0; -static int connect_cb_called = 0; - - -static void close_cb(uv_handle_t* handle) { - ASSERT(handle != NULL); - close_cb_called++; -} - - -static void connect_cb(uv_connect_t* connect_req, int status) { - ASSERT(status == UV_ENOENT); - uv_close((uv_handle_t*)connect_req->handle, close_cb); - connect_cb_called++; -} - - -static void connect_cb_file(uv_connect_t* connect_req, int status) { - ASSERT(status == UV_ENOTSOCK || status == UV_ECONNREFUSED); - uv_close((uv_handle_t*)connect_req->handle, close_cb); - connect_cb_called++; -} - - -TEST_IMPL(pipe_connect_bad_name) { - uv_pipe_t client; - uv_connect_t req; - int r; - - r = uv_pipe_init(uv_default_loop(), &client, 0); - ASSERT(r == 0); - uv_pipe_connect(&req, &client, BAD_PIPENAME, connect_cb); - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(close_cb_called == 1); - ASSERT(connect_cb_called == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(pipe_connect_to_file) { - const char* path = "test/fixtures/empty_file"; - uv_pipe_t client; - uv_connect_t req; - int r; - - r = uv_pipe_init(uv_default_loop(), &client, 0); - ASSERT(r == 0); - uv_pipe_connect(&req, &client, path, connect_cb_file); - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(close_cb_called == 1); - ASSERT(connect_cb_called == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-pipe-connect-multiple.c b/outside/libuv-v1.7.5/test/test-pipe-connect-multiple.c deleted file mode 100644 index 3de5a9a0b..000000000 --- a/outside/libuv-v1.7.5/test/test-pipe-connect-multiple.c +++ /dev/null @@ -1,104 +0,0 @@ -/* Copyright (c) 2015 Saúl Ibarra Corretgé . - * All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" -#include -#include - - -static int connection_cb_called = 0; -static int connect_cb_called = 0; - -#define NUM_CLIENTS 4 - -typedef struct { - uv_pipe_t pipe_handle; - uv_connect_t conn_req; -} client_t; - -static uv_pipe_t server_handle; -static client_t clients[NUM_CLIENTS]; -static uv_pipe_t connections[NUM_CLIENTS]; - - -static void connection_cb(uv_stream_t* server, int status) { - int r; - uv_pipe_t* conn; - ASSERT(status == 0); - - conn = &connections[connection_cb_called]; - r = uv_pipe_init(server->loop, conn, 0); - ASSERT(r == 0); - - r = uv_accept(server, (uv_stream_t*)conn); - ASSERT(r == 0); - - if (++connection_cb_called == NUM_CLIENTS && - connect_cb_called == NUM_CLIENTS) { - uv_stop(server->loop); - } -} - - -static void connect_cb(uv_connect_t* connect_req, int status) { - ASSERT(status == 0); - if (++connect_cb_called == NUM_CLIENTS && - connection_cb_called == NUM_CLIENTS) { - uv_stop(connect_req->handle->loop); - } -} - - -TEST_IMPL(pipe_connect_multiple) { - int i; - int r; - uv_loop_t* loop; - - loop = uv_default_loop(); - - r = uv_pipe_init(loop, &server_handle, 0); - ASSERT(r == 0); - - r = uv_pipe_bind(&server_handle, TEST_PIPENAME); - ASSERT(r == 0); - - r = uv_listen((uv_stream_t*)&server_handle, 128, connection_cb); - ASSERT(r == 0); - - for (i = 0; i < NUM_CLIENTS; i++) { - r = uv_pipe_init(loop, &clients[i].pipe_handle, 0); - ASSERT(r == 0); - uv_pipe_connect(&clients[i].conn_req, - &clients[i].pipe_handle, - TEST_PIPENAME, - connect_cb); - } - - uv_run(loop, UV_RUN_DEFAULT); - - ASSERT(connection_cb_called == NUM_CLIENTS); - ASSERT(connect_cb_called == NUM_CLIENTS); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-pipe-connect-prepare.c b/outside/libuv-v1.7.5/test/test-pipe-connect-prepare.c deleted file mode 100644 index a86e7284a..000000000 --- a/outside/libuv-v1.7.5/test/test-pipe-connect-prepare.c +++ /dev/null @@ -1,83 +0,0 @@ -/* Copyright (c) 2015 Saúl Ibarra Corretgé . - * All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" -#include -#include - - -#ifdef _WIN32 -# define BAD_PIPENAME "bad-pipe" -#else -# define BAD_PIPENAME "/path/to/unix/socket/that/really/should/not/be/there" -#endif - - -static int close_cb_called = 0; -static int connect_cb_called = 0; - -static uv_pipe_t pipe_handle; -static uv_prepare_t prepare_handle; -static uv_connect_t conn_req; - - -static void close_cb(uv_handle_t* handle) { - ASSERT(handle != NULL); - close_cb_called++; -} - - -static void connect_cb(uv_connect_t* connect_req, int status) { - ASSERT(status == UV_ENOENT); - connect_cb_called++; - uv_close((uv_handle_t*)&prepare_handle, close_cb); - uv_close((uv_handle_t*)&pipe_handle, close_cb); -} - - -static void prepare_cb(uv_prepare_t* handle) { - ASSERT(handle == &prepare_handle); - uv_pipe_connect(&conn_req, &pipe_handle, BAD_PIPENAME, connect_cb); -} - - -TEST_IMPL(pipe_connect_on_prepare) { - int r; - - r = uv_pipe_init(uv_default_loop(), &pipe_handle, 0); - ASSERT(r == 0); - - r = uv_prepare_init(uv_default_loop(), &prepare_handle); - ASSERT(r == 0); - r = uv_prepare_start(&prepare_handle, prepare_cb); - ASSERT(r == 0); - - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - - ASSERT(close_cb_called == 2); - ASSERT(connect_cb_called == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-pipe-getsockname.c b/outside/libuv-v1.7.5/test/test-pipe-getsockname.c deleted file mode 100644 index 5e036f9d5..000000000 --- a/outside/libuv-v1.7.5/test/test-pipe-getsockname.c +++ /dev/null @@ -1,263 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" -#include -#include -#include - -#if defined(__linux__) - #include - #include -#endif - -#ifndef _WIN32 -# include /* close */ -#else -# include -#endif - -static uv_pipe_t pipe_client; -static uv_pipe_t pipe_server; -static uv_connect_t connect_req; - -static int pipe_close_cb_called = 0; -static int pipe_client_connect_cb_called = 0; - - -static void pipe_close_cb(uv_handle_t* handle) { - ASSERT(handle == (uv_handle_t*) &pipe_client || - handle == (uv_handle_t*) &pipe_server); - pipe_close_cb_called++; -} - - -static void pipe_client_connect_cb(uv_connect_t* req, int status) { - char buf[1024]; - size_t len; - int r; - - ASSERT(req == &connect_req); - ASSERT(status == 0); - - len = sizeof buf; - r = uv_pipe_getpeername(&pipe_client, buf, &len); - ASSERT(r == 0); - - ASSERT(buf[len - 1] != 0); - ASSERT(memcmp(buf, TEST_PIPENAME, len) == 0); - - len = sizeof buf; - r = uv_pipe_getsockname(&pipe_client, buf, &len); - ASSERT(r == 0 && len == 0); - - pipe_client_connect_cb_called++; - - - uv_close((uv_handle_t*) &pipe_client, pipe_close_cb); - uv_close((uv_handle_t*) &pipe_server, pipe_close_cb); -} - - -static void pipe_server_connection_cb(uv_stream_t* handle, int status) { - /* This function *may* be called, depending on whether accept or the - * connection callback is called first. - */ - ASSERT(status == 0); -} - - -TEST_IMPL(pipe_getsockname) { - uv_loop_t* loop; - char buf[1024]; - size_t len; - int r; - - loop = uv_default_loop(); - ASSERT(loop != NULL); - - r = uv_pipe_init(loop, &pipe_server, 0); - ASSERT(r == 0); - - len = sizeof buf; - r = uv_pipe_getsockname(&pipe_server, buf, &len); - ASSERT(r == UV_EBADF); - - len = sizeof buf; - r = uv_pipe_getpeername(&pipe_server, buf, &len); - ASSERT(r == UV_EBADF); - - r = uv_pipe_bind(&pipe_server, TEST_PIPENAME); - ASSERT(r == 0); - - len = sizeof buf; - r = uv_pipe_getsockname(&pipe_server, buf, &len); - ASSERT(r == 0); - - ASSERT(buf[len - 1] != 0); - ASSERT(memcmp(buf, TEST_PIPENAME, len) == 0); - - len = sizeof buf; - r = uv_pipe_getpeername(&pipe_server, buf, &len); - ASSERT(r == UV_ENOTCONN); - - r = uv_listen((uv_stream_t*) &pipe_server, 0, pipe_server_connection_cb); - ASSERT(r == 0); - - r = uv_pipe_init(loop, &pipe_client, 0); - ASSERT(r == 0); - - len = sizeof buf; - r = uv_pipe_getsockname(&pipe_client, buf, &len); - ASSERT(r == UV_EBADF); - - len = sizeof buf; - r = uv_pipe_getpeername(&pipe_client, buf, &len); - ASSERT(r == UV_EBADF); - - uv_pipe_connect(&connect_req, &pipe_client, TEST_PIPENAME, pipe_client_connect_cb); - - len = sizeof buf; - r = uv_pipe_getsockname(&pipe_client, buf, &len); - ASSERT(r == 0 && len == 0); - - len = sizeof buf; - r = uv_pipe_getpeername(&pipe_client, buf, &len); - ASSERT(r == 0); - - ASSERT(buf[len - 1] != 0); - ASSERT(memcmp(buf, TEST_PIPENAME, len) == 0); - - r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT(r == 0); - ASSERT(pipe_client_connect_cb_called == 1); - ASSERT(pipe_close_cb_called == 2); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(pipe_getsockname_abstract) { -#if defined(__linux__) - char buf[1024]; - size_t len; - int r; - int sock; - struct sockaddr_un sun; - socklen_t sun_len; - char abstract_pipe[] = "\0test-pipe"; - - sock = socket(AF_LOCAL, SOCK_STREAM, 0); - ASSERT(sock != -1); - - sun_len = sizeof sun; - memset(&sun, 0, sun_len); - sun.sun_family = AF_UNIX; - memcpy(sun.sun_path, abstract_pipe, sizeof abstract_pipe); - - r = bind(sock, (struct sockaddr*)&sun, sun_len); - ASSERT(r == 0); - - r = uv_pipe_init(uv_default_loop(), &pipe_server, 0); - ASSERT(r == 0); - r = uv_pipe_open(&pipe_server, sock); - ASSERT(r == 0); - - len = sizeof buf; - r = uv_pipe_getsockname(&pipe_server, buf, &len); - ASSERT(r == 0); - - ASSERT(memcmp(buf, abstract_pipe, sizeof abstract_pipe) == 0); - - uv_close((uv_handle_t*)&pipe_server, pipe_close_cb); - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - close(sock); - - ASSERT(pipe_close_cb_called == 1); - MAKE_VALGRIND_HAPPY(); - return 0; -#else - MAKE_VALGRIND_HAPPY(); - return 0; -#endif -} - -TEST_IMPL(pipe_getsockname_blocking) { -#ifdef _WIN32 - HANDLE readh, writeh; - int readfd; - char buf1[1024], buf2[1024]; - size_t len1, len2; - int r; - - r = CreatePipe(&readh, &writeh, NULL, 65536); - ASSERT(r != 0); - - r = uv_pipe_init(uv_default_loop(), &pipe_client, 0); - ASSERT(r == 0); - readfd = _open_osfhandle((intptr_t)readh, _O_RDONLY); - ASSERT(r != -1); - r = uv_pipe_open(&pipe_client, readfd); - ASSERT(r == 0); - r = uv_read_start((uv_stream_t*)&pipe_client, NULL, NULL); - ASSERT(r == 0); - Sleep(100); - r = uv_read_stop((uv_stream_t*)&pipe_client); - ASSERT(r == 0); - - len1 = sizeof buf1; - r = uv_pipe_getsockname(&pipe_client, buf1, &len1); - ASSERT(r == 0); - ASSERT(buf1[len1 - 1] != 0); - - r = uv_read_start((uv_stream_t*)&pipe_client, NULL, NULL); - ASSERT(r == 0); - Sleep(100); - - len2 = sizeof buf2; - r = uv_pipe_getsockname(&pipe_client, buf2, &len2); - ASSERT(r == 0); - ASSERT(buf2[len2 - 1] != 0); - - r = uv_read_stop((uv_stream_t*)&pipe_client); - ASSERT(r == 0); - - ASSERT(len1 == len2); - ASSERT(memcmp(buf1, buf2, len1) == 0); - - pipe_close_cb_called = 0; - uv_close((uv_handle_t*)&pipe_client, pipe_close_cb); - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(pipe_close_cb_called == 1); - - _close(readfd); - CloseHandle(writeh); -#endif - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-pipe-pending-instances.c b/outside/libuv-v1.7.5/test/test-pipe-pending-instances.c deleted file mode 100644 index b6ff911a0..000000000 --- a/outside/libuv-v1.7.5/test/test-pipe-pending-instances.c +++ /dev/null @@ -1,59 +0,0 @@ -/* Copyright (c) 2015 Saúl Ibarra Corretgé . - * All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - - -static void connection_cb(uv_stream_t* server, int status) { - ASSERT(0 && "this will never be called"); -} - - -TEST_IMPL(pipe_pending_instances) { - int r; - uv_pipe_t pipe_handle; - uv_loop_t* loop; - - loop = uv_default_loop(); - - r = uv_pipe_init(loop, &pipe_handle, 0); - ASSERT(r == 0); - - uv_pipe_pending_instances(&pipe_handle, 8); - - r = uv_pipe_bind(&pipe_handle, TEST_PIPENAME); - ASSERT(r == 0); - - uv_pipe_pending_instances(&pipe_handle, 16); - - r = uv_listen((uv_stream_t*)&pipe_handle, 128, connection_cb); - ASSERT(r == 0); - - uv_close((uv_handle_t*)&pipe_handle, NULL); - - r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT(r == 0); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-pipe-sendmsg.c b/outside/libuv-v1.7.5/test/test-pipe-sendmsg.c deleted file mode 100644 index f6d893b44..000000000 --- a/outside/libuv-v1.7.5/test/test-pipe-sendmsg.c +++ /dev/null @@ -1,169 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - - -#ifndef _WIN32 - -#include -#include -#include -#include -#include -#include -#include - - -/* NOTE: size should be divisible by 2 */ -static uv_pipe_t incoming[4]; -static unsigned int incoming_count; -static unsigned int close_called; - - -static void set_nonblocking(uv_os_sock_t sock) { - int r; -#ifdef _WIN32 - unsigned long on = 1; - r = ioctlsocket(sock, FIONBIO, &on); - ASSERT(r == 0); -#else - int flags = fcntl(sock, F_GETFL, 0); - ASSERT(flags >= 0); - r = fcntl(sock, F_SETFL, flags | O_NONBLOCK); - ASSERT(r >= 0); -#endif -} - - - - -static void close_cb(uv_handle_t* handle) { - close_called++; -} - - -static void alloc_cb(uv_handle_t* handle, size_t size, uv_buf_t* buf) { - static char base[1]; - - buf->base = base; - buf->len = sizeof(base); -} - - -static void read_cb(uv_stream_t* handle, - ssize_t nread, - const uv_buf_t* buf) { - uv_pipe_t* p; - uv_pipe_t* inc; - uv_handle_type pending; - unsigned int i; - - p = (uv_pipe_t*) handle; - ASSERT(nread >= 0); - - while (uv_pipe_pending_count(p) != 0) { - pending = uv_pipe_pending_type(p); - ASSERT(pending == UV_NAMED_PIPE); - - ASSERT(incoming_count < ARRAY_SIZE(incoming)); - inc = &incoming[incoming_count++]; - ASSERT(0 == uv_pipe_init(p->loop, inc, 0)); - ASSERT(0 == uv_accept(handle, (uv_stream_t*) inc)); - } - - if (incoming_count != ARRAY_SIZE(incoming)) - return; - - ASSERT(0 == uv_read_stop((uv_stream_t*) p)); - uv_close((uv_handle_t*) p, close_cb); - for (i = 0; i < ARRAY_SIZE(incoming); i++) - uv_close((uv_handle_t*) &incoming[i], close_cb); -} - - -TEST_IMPL(pipe_sendmsg) { - uv_pipe_t p; - int r; - int fds[2]; - int send_fds[ARRAY_SIZE(incoming)]; - struct msghdr msg; - char scratch[64]; - struct cmsghdr *cmsg; - unsigned int i; - uv_buf_t buf; - - ASSERT(0 == socketpair(AF_UNIX, SOCK_STREAM, 0, fds)); - for (i = 0; i < ARRAY_SIZE(send_fds); i += 2) - ASSERT(0 == socketpair(AF_UNIX, SOCK_STREAM, 0, send_fds + i)); - ASSERT(i == ARRAY_SIZE(send_fds)); - ASSERT(0 == uv_pipe_init(uv_default_loop(), &p, 1)); - ASSERT(0 == uv_pipe_open(&p, fds[1])); - - buf = uv_buf_init("X", 1); - memset(&msg, 0, sizeof(msg)); - msg.msg_iov = (struct iovec*) &buf; - msg.msg_iovlen = 1; - msg.msg_flags = 0; - - msg.msg_control = (void*) scratch; - msg.msg_controllen = CMSG_LEN(sizeof(send_fds)); - ASSERT(sizeof(scratch) >= msg.msg_controllen); - - cmsg = CMSG_FIRSTHDR(&msg); - cmsg->cmsg_level = SOL_SOCKET; - cmsg->cmsg_type = SCM_RIGHTS; - cmsg->cmsg_len = msg.msg_controllen; - - /* silence aliasing warning */ - { - void* pv = CMSG_DATA(cmsg); - int* pi = pv; - for (i = 0; i < ARRAY_SIZE(send_fds); i++) - pi[i] = send_fds[i]; - } - - set_nonblocking(fds[1]); - ASSERT(0 == uv_read_start((uv_stream_t*) &p, alloc_cb, read_cb)); - - do - r = sendmsg(fds[0], &msg, 0); - while (r == -1 && errno == EINTR); - ASSERT(r == 1); - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(ARRAY_SIZE(incoming) == incoming_count); - ASSERT(ARRAY_SIZE(incoming) + 1 == close_called); - close(fds[0]); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - -#else /* !_WIN32 */ - -TEST_IMPL(pipe_sendmsg) { - MAKE_VALGRIND_HAPPY(); - return 0; -} - -#endif /* _WIN32 */ diff --git a/outside/libuv-v1.7.5/test/test-pipe-server-close.c b/outside/libuv-v1.7.5/test/test-pipe-server-close.c deleted file mode 100644 index 1dcdfffaf..000000000 --- a/outside/libuv-v1.7.5/test/test-pipe-server-close.c +++ /dev/null @@ -1,91 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#include -#include - - -static uv_pipe_t pipe_client; -static uv_pipe_t pipe_server; -static uv_connect_t connect_req; - -static int pipe_close_cb_called = 0; -static int pipe_client_connect_cb_called = 0; - - -static void pipe_close_cb(uv_handle_t* handle) { - ASSERT(handle == (uv_handle_t*) &pipe_client || - handle == (uv_handle_t*) &pipe_server); - pipe_close_cb_called++; -} - - -static void pipe_client_connect_cb(uv_connect_t* req, int status) { - ASSERT(req == &connect_req); - ASSERT(status == 0); - - pipe_client_connect_cb_called++; - - uv_close((uv_handle_t*) &pipe_client, pipe_close_cb); - uv_close((uv_handle_t*) &pipe_server, pipe_close_cb); -} - - -static void pipe_server_connection_cb(uv_stream_t* handle, int status) { - /* This function *may* be called, depending on whether accept or the - * connection callback is called first. - */ - ASSERT(status == 0); -} - - -TEST_IMPL(pipe_server_close) { - uv_loop_t* loop; - int r; - - loop = uv_default_loop(); - ASSERT(loop != NULL); - - r = uv_pipe_init(loop, &pipe_server, 0); - ASSERT(r == 0); - - r = uv_pipe_bind(&pipe_server, TEST_PIPENAME); - ASSERT(r == 0); - - r = uv_listen((uv_stream_t*) &pipe_server, 0, pipe_server_connection_cb); - ASSERT(r == 0); - - r = uv_pipe_init(loop, &pipe_client, 0); - ASSERT(r == 0); - - uv_pipe_connect(&connect_req, &pipe_client, TEST_PIPENAME, pipe_client_connect_cb); - - r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT(r == 0); - ASSERT(pipe_client_connect_cb_called == 1); - ASSERT(pipe_close_cb_called == 2); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-pipe-set-non-blocking.c b/outside/libuv-v1.7.5/test/test-pipe-set-non-blocking.c deleted file mode 100644 index fcc9fc0da..000000000 --- a/outside/libuv-v1.7.5/test/test-pipe-set-non-blocking.c +++ /dev/null @@ -1,99 +0,0 @@ -/* Copyright (c) 2015, Ben Noordhuis - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include "uv.h" -#include "task.h" - -#ifdef _WIN32 - -TEST_IMPL(pipe_set_non_blocking) { - RETURN_SKIP("Test not implemented on Windows."); -} - -#else /* !_WIN32 */ - -#include -#include -#include -#include -#include -#include - -struct thread_ctx { - uv_barrier_t barrier; - int fd; -}; - -static void thread_main(void* arg) { - struct thread_ctx* ctx; - char buf[4096]; - ssize_t n; - - ctx = arg; - uv_barrier_wait(&ctx->barrier); - - do - n = read(ctx->fd, buf, sizeof(buf)); - while (n > 0 || (n == -1 && errno == EINTR)); - - ASSERT(n == 0); -} - -TEST_IMPL(pipe_set_non_blocking) { - struct thread_ctx ctx; - uv_pipe_t pipe_handle; - uv_thread_t thread; - size_t nwritten; - char data[4096]; - uv_buf_t buf; - int fd[2]; - int n; - - ASSERT(0 == uv_pipe_init(uv_default_loop(), &pipe_handle, 0)); - ASSERT(0 == socketpair(AF_UNIX, SOCK_STREAM, 0, fd)); - ASSERT(0 == uv_pipe_open(&pipe_handle, fd[0])); - ASSERT(0 == uv_stream_set_blocking((uv_stream_t*) &pipe_handle, 1)); - - ctx.fd = fd[1]; - ASSERT(0 == uv_barrier_init(&ctx.barrier, 2)); - ASSERT(0 == uv_thread_create(&thread, thread_main, &ctx)); - uv_barrier_wait(&ctx.barrier); - - buf.len = sizeof(data); - buf.base = data; - memset(data, '.', sizeof(data)); - - nwritten = 0; - while (nwritten < 10 << 20) { - /* The stream is in blocking mode so uv_try_write() should always succeed - * with the exact number of bytes that we wanted written. - */ - n = uv_try_write((uv_stream_t*) &pipe_handle, &buf, 1); - ASSERT(n == sizeof(data)); - nwritten += n; - } - - uv_close((uv_handle_t*) &pipe_handle, NULL); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - - ASSERT(0 == uv_thread_join(&thread)); - ASSERT(0 == close(fd[1])); /* fd[0] is closed by uv_close(). */ - uv_barrier_destroy(&ctx.barrier); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - -#endif /* !_WIN32 */ diff --git a/outside/libuv-v1.7.5/test/test-platform-output.c b/outside/libuv-v1.7.5/test/test-platform-output.c deleted file mode 100644 index 76495e14f..000000000 --- a/outside/libuv-v1.7.5/test/test-platform-output.c +++ /dev/null @@ -1,126 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" -#include - - -TEST_IMPL(platform_output) { - char buffer[512]; - size_t rss; - size_t size; - double uptime; - uv_rusage_t rusage; - uv_cpu_info_t* cpus; - uv_interface_address_t* interfaces; - int count; - int i; - int err; - - err = uv_get_process_title(buffer, sizeof(buffer)); - ASSERT(err == 0); - printf("uv_get_process_title: %s\n", buffer); - - size = sizeof(buffer); - err = uv_cwd(buffer, &size); - ASSERT(err == 0); - printf("uv_cwd: %s\n", buffer); - - err = uv_resident_set_memory(&rss); - ASSERT(err == 0); - printf("uv_resident_set_memory: %llu\n", (unsigned long long) rss); - - err = uv_uptime(&uptime); - ASSERT(err == 0); - ASSERT(uptime > 0); - printf("uv_uptime: %f\n", uptime); - - err = uv_getrusage(&rusage); - ASSERT(err == 0); - ASSERT(rusage.ru_utime.tv_sec >= 0); - ASSERT(rusage.ru_utime.tv_usec >= 0); - ASSERT(rusage.ru_stime.tv_sec >= 0); - ASSERT(rusage.ru_stime.tv_usec >= 0); - printf("uv_getrusage:\n"); - printf(" user: %llu sec %llu microsec\n", - (unsigned long long) rusage.ru_utime.tv_sec, - (unsigned long long) rusage.ru_utime.tv_usec); - printf(" system: %llu sec %llu microsec\n", - (unsigned long long) rusage.ru_stime.tv_sec, - (unsigned long long) rusage.ru_stime.tv_usec); - - err = uv_cpu_info(&cpus, &count); - ASSERT(err == 0); - - printf("uv_cpu_info:\n"); - for (i = 0; i < count; i++) { - printf(" model: %s\n", cpus[i].model); - printf(" speed: %d\n", cpus[i].speed); - printf(" times.sys: %llu\n", (unsigned long long) cpus[i].cpu_times.sys); - printf(" times.user: %llu\n", - (unsigned long long) cpus[i].cpu_times.user); - printf(" times.idle: %llu\n", - (unsigned long long) cpus[i].cpu_times.idle); - printf(" times.irq: %llu\n", (unsigned long long) cpus[i].cpu_times.irq); - printf(" times.nice: %llu\n", - (unsigned long long) cpus[i].cpu_times.nice); - } - uv_free_cpu_info(cpus, count); - - err = uv_interface_addresses(&interfaces, &count); - ASSERT(err == 0); - - printf("uv_interface_addresses:\n"); - for (i = 0; i < count; i++) { - printf(" name: %s\n", interfaces[i].name); - printf(" internal: %d\n", interfaces[i].is_internal); - printf(" physical address: "); - printf("%02x:%02x:%02x:%02x:%02x:%02x\n", - (unsigned char)interfaces[i].phys_addr[0], - (unsigned char)interfaces[i].phys_addr[1], - (unsigned char)interfaces[i].phys_addr[2], - (unsigned char)interfaces[i].phys_addr[3], - (unsigned char)interfaces[i].phys_addr[4], - (unsigned char)interfaces[i].phys_addr[5]); - - if (interfaces[i].address.address4.sin_family == AF_INET) { - uv_ip4_name(&interfaces[i].address.address4, buffer, sizeof(buffer)); - } else if (interfaces[i].address.address4.sin_family == AF_INET6) { - uv_ip6_name(&interfaces[i].address.address6, buffer, sizeof(buffer)); - } - - printf(" address: %s\n", buffer); - - if (interfaces[i].netmask.netmask4.sin_family == AF_INET) { - uv_ip4_name(&interfaces[i].netmask.netmask4, buffer, sizeof(buffer)); - printf(" netmask: %s\n", buffer); - } else if (interfaces[i].netmask.netmask4.sin_family == AF_INET6) { - uv_ip6_name(&interfaces[i].netmask.netmask6, buffer, sizeof(buffer)); - printf(" netmask: %s\n", buffer); - } else { - printf(" netmask: none\n"); - } - } - uv_free_interface_addresses(interfaces, count); - - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-poll-close-doesnt-corrupt-stack.c b/outside/libuv-v1.7.5/test/test-poll-close-doesnt-corrupt-stack.c deleted file mode 100644 index fc2cc004f..000000000 --- a/outside/libuv-v1.7.5/test/test-poll-close-doesnt-corrupt-stack.c +++ /dev/null @@ -1,114 +0,0 @@ -/* Copyright Bert Belder, and other libuv contributors. All rights reserved. - * - * 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. - */ - -#ifdef _WIN32 - -#include -#include - -#include "uv.h" -#include "task.h" - -#ifdef _MSC_VER /* msvc */ -# define NO_INLINE __declspec(noinline) -#else /* gcc */ -# define NO_INLINE __attribute__ ((noinline)) -#endif - - -uv_os_sock_t sock; -uv_poll_t handle; - -static int close_cb_called = 0; - - -static void close_cb(uv_handle_t* h) { - close_cb_called++; -} - - -static void poll_cb(uv_poll_t* h, int status, int events) { - ASSERT(0 && "should never get here"); -} - - -static void NO_INLINE close_socket_and_verify_stack() { - const uint32_t MARKER = 0xDEADBEEF; - const int VERIFY_AFTER = 10; /* ms */ - int r; - - volatile uint32_t data[65536]; - size_t i; - - for (i = 0; i < ARRAY_SIZE(data); i++) - data[i] = MARKER; - - r = closesocket(sock); - ASSERT(r == 0); - - uv_sleep(VERIFY_AFTER); - - for (i = 0; i < ARRAY_SIZE(data); i++) - ASSERT(data[i] == MARKER); -} - - -TEST_IMPL(poll_close_doesnt_corrupt_stack) { - struct WSAData wsa_data; - int r; - unsigned long on; - struct sockaddr_in addr; - - r = WSAStartup(MAKEWORD(2, 2), &wsa_data); - ASSERT(r == 0); - - sock = socket(AF_INET, SOCK_STREAM, 0); - ASSERT(sock != INVALID_SOCKET); - on = 1; - r = ioctlsocket(sock, FIONBIO, &on); - ASSERT(r == 0); - - r = uv_ip4_addr("127.0.0.1", TEST_PORT, &addr); - ASSERT(r == 0); - - r = connect(sock, (const struct sockaddr*) &addr, sizeof addr); - ASSERT(r != 0); - ASSERT(WSAGetLastError() == WSAEWOULDBLOCK); - - r = uv_poll_init_socket(uv_default_loop(), &handle, sock); - ASSERT(r == 0); - r = uv_poll_start(&handle, UV_READABLE | UV_WRITABLE, poll_cb); - ASSERT(r == 0); - - uv_close((uv_handle_t*) &handle, close_cb); - - close_socket_and_verify_stack(); - - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - - ASSERT(close_cb_called == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - -#endif /* _WIN32 */ diff --git a/outside/libuv-v1.7.5/test/test-poll-close.c b/outside/libuv-v1.7.5/test/test-poll-close.c deleted file mode 100644 index 2eccddf5b..000000000 --- a/outside/libuv-v1.7.5/test/test-poll-close.c +++ /dev/null @@ -1,73 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include - -#ifndef _WIN32 -# include -# include -# include -#endif - -#include "uv.h" -#include "task.h" - -#define NUM_SOCKETS 64 - - -static int close_cb_called = 0; - - -static void close_cb(uv_handle_t* handle) { - close_cb_called++; -} - - -TEST_IMPL(poll_close) { - uv_os_sock_t sockets[NUM_SOCKETS]; - uv_poll_t poll_handles[NUM_SOCKETS]; - int i; - -#ifdef _WIN32 - { - struct WSAData wsa_data; - int r = WSAStartup(MAKEWORD(2, 2), &wsa_data); - ASSERT(r == 0); - } -#endif - - for (i = 0; i < NUM_SOCKETS; i++) { - sockets[i] = socket(AF_INET, SOCK_STREAM, 0); - uv_poll_init_socket(uv_default_loop(), &poll_handles[i], sockets[i]); - uv_poll_start(&poll_handles[i], UV_READABLE | UV_WRITABLE, NULL); - } - - for (i = 0; i < NUM_SOCKETS; i++) { - uv_close((uv_handle_t*) &poll_handles[i], close_cb); - } - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(close_cb_called == NUM_SOCKETS); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-poll-closesocket.c b/outside/libuv-v1.7.5/test/test-poll-closesocket.c deleted file mode 100644 index 4db74a01f..000000000 --- a/outside/libuv-v1.7.5/test/test-poll-closesocket.c +++ /dev/null @@ -1,89 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#ifdef _WIN32 - -#include - -#include "uv.h" -#include "task.h" - -uv_os_sock_t sock; -uv_poll_t handle; - -static int close_cb_called = 0; - - -static void close_cb(uv_handle_t* h) { - close_cb_called++; -} - - -static void poll_cb(uv_poll_t* h, int status, int events) { - int r; - - ASSERT(status == 0); - ASSERT(h == &handle); - - r = uv_poll_start(&handle, UV_READABLE, poll_cb); - ASSERT(r == 0); - - closesocket(sock); - uv_close((uv_handle_t*) &handle, close_cb); - -} - - -TEST_IMPL(poll_closesocket) { - struct WSAData wsa_data; - int r; - unsigned long on; - struct sockaddr_in addr; - - r = WSAStartup(MAKEWORD(2, 2), &wsa_data); - ASSERT(r == 0); - - sock = socket(AF_INET, SOCK_STREAM, 0); - ASSERT(sock != INVALID_SOCKET); - on = 1; - r = ioctlsocket(sock, FIONBIO, &on); - ASSERT(r == 0); - - r = uv_ip4_addr("127.0.0.1", TEST_PORT, &addr); - ASSERT(r == 0); - - r = connect(sock, (const struct sockaddr*) &addr, sizeof addr); - ASSERT(r != 0); - ASSERT(WSAGetLastError() == WSAEWOULDBLOCK); - - r = uv_poll_init_socket(uv_default_loop(), &handle, sock); - ASSERT(r == 0); - r = uv_poll_start(&handle, UV_WRITABLE, poll_cb); - ASSERT(r == 0); - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(close_cb_called == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} -#endif diff --git a/outside/libuv-v1.7.5/test/test-poll.c b/outside/libuv-v1.7.5/test/test-poll.c deleted file mode 100644 index be8b00c32..000000000 --- a/outside/libuv-v1.7.5/test/test-poll.c +++ /dev/null @@ -1,560 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include - -#ifndef _WIN32 -# include -# include -#endif - -#include "uv.h" -#include "task.h" - - -#define NUM_CLIENTS 5 -#define TRANSFER_BYTES (1 << 16) - -#undef MIN -#define MIN(a, b) (((a) < (b)) ? (a) : (b)); - - -typedef enum { - UNIDIRECTIONAL, - DUPLEX -} test_mode_t; - -typedef struct connection_context_s { - uv_poll_t poll_handle; - uv_timer_t timer_handle; - uv_os_sock_t sock; - size_t read, sent; - int is_server_connection; - int open_handles; - int got_fin, sent_fin; - unsigned int events, delayed_events; -} connection_context_t; - -typedef struct server_context_s { - uv_poll_t poll_handle; - uv_os_sock_t sock; - int connections; -} server_context_t; - - -static void delay_timer_cb(uv_timer_t* timer); - - -static test_mode_t test_mode = DUPLEX; - -static int closed_connections = 0; - -static int valid_writable_wakeups = 0; -static int spurious_writable_wakeups = 0; - - -static int got_eagain(void) { -#ifdef _WIN32 - return WSAGetLastError() == WSAEWOULDBLOCK; -#else - return errno == EAGAIN - || errno == EINPROGRESS -#ifdef EWOULDBLOCK - || errno == EWOULDBLOCK; -#endif - ; -#endif -} - - -static uv_os_sock_t create_bound_socket (struct sockaddr_in bind_addr) { - uv_os_sock_t sock; - int r; - - sock = socket(AF_INET, SOCK_STREAM, IPPROTO_IP); -#ifdef _WIN32 - ASSERT(sock != INVALID_SOCKET); -#else - ASSERT(sock >= 0); -#endif - -#ifndef _WIN32 - { - /* Allow reuse of the port. */ - int yes = 1; - r = setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof yes); - ASSERT(r == 0); - } -#endif - - r = bind(sock, (const struct sockaddr*) &bind_addr, sizeof bind_addr); - ASSERT(r == 0); - - return sock; -} - - -static void close_socket(uv_os_sock_t sock) { - int r; -#ifdef _WIN32 - r = closesocket(sock); -#else - r = close(sock); -#endif - ASSERT(r == 0); -} - - -static connection_context_t* create_connection_context( - uv_os_sock_t sock, int is_server_connection) { - int r; - connection_context_t* context; - - context = (connection_context_t*) malloc(sizeof *context); - ASSERT(context != NULL); - - context->sock = sock; - context->is_server_connection = is_server_connection; - context->read = 0; - context->sent = 0; - context->open_handles = 0; - context->events = 0; - context->delayed_events = 0; - context->got_fin = 0; - context->sent_fin = 0; - - r = uv_poll_init_socket(uv_default_loop(), &context->poll_handle, sock); - context->open_handles++; - context->poll_handle.data = context; - ASSERT(r == 0); - - r = uv_timer_init(uv_default_loop(), &context->timer_handle); - context->open_handles++; - context->timer_handle.data = context; - ASSERT(r == 0); - - return context; -} - - -static void connection_close_cb(uv_handle_t* handle) { - connection_context_t* context = (connection_context_t*) handle->data; - - if (--context->open_handles == 0) { - if (test_mode == DUPLEX || context->is_server_connection) { - ASSERT(context->read == TRANSFER_BYTES); - } else { - ASSERT(context->read == 0); - } - - if (test_mode == DUPLEX || !context->is_server_connection) { - ASSERT(context->sent == TRANSFER_BYTES); - } else { - ASSERT(context->sent == 0); - } - - closed_connections++; - - free(context); - } -} - - -static void destroy_connection_context(connection_context_t* context) { - uv_close((uv_handle_t*) &context->poll_handle, connection_close_cb); - uv_close((uv_handle_t*) &context->timer_handle, connection_close_cb); -} - - -static void connection_poll_cb(uv_poll_t* handle, int status, int events) { - connection_context_t* context = (connection_context_t*) handle->data; - unsigned int new_events; - int r; - - ASSERT(status == 0); - ASSERT(events & context->events); - ASSERT(!(events & ~context->events)); - - new_events = context->events; - - if (events & UV_READABLE) { - int action = rand() % 7; - - switch (action) { - case 0: - case 1: { - /* Read a couple of bytes. */ - static char buffer[74]; - r = recv(context->sock, buffer, sizeof buffer, 0); - ASSERT(r >= 0); - - if (r > 0) { - context->read += r; - } else { - /* Got FIN. */ - context->got_fin = 1; - new_events &= ~UV_READABLE; - } - - break; - } - - case 2: - case 3: { - /* Read until EAGAIN. */ - static char buffer[931]; - r = recv(context->sock, buffer, sizeof buffer, 0); - ASSERT(r >= 0); - - while (r > 0) { - context->read += r; - r = recv(context->sock, buffer, sizeof buffer, 0); - } - - if (r == 0) { - /* Got FIN. */ - context->got_fin = 1; - new_events &= ~UV_READABLE; - } else { - ASSERT(got_eagain()); - } - - break; - } - - case 4: - /* Ignore. */ - break; - - case 5: - /* Stop reading for a while. Restart in timer callback. */ - new_events &= ~UV_READABLE; - if (!uv_is_active((uv_handle_t*) &context->timer_handle)) { - context->delayed_events = UV_READABLE; - uv_timer_start(&context->timer_handle, delay_timer_cb, 10, 0); - } else { - context->delayed_events |= UV_READABLE; - } - break; - - case 6: - /* Fudge with the event mask. */ - uv_poll_start(&context->poll_handle, UV_WRITABLE, connection_poll_cb); - uv_poll_start(&context->poll_handle, UV_READABLE, connection_poll_cb); - context->events = UV_READABLE; - break; - - default: - ASSERT(0); - } - } - - if (events & UV_WRITABLE) { - if (context->sent < TRANSFER_BYTES && - !(test_mode == UNIDIRECTIONAL && context->is_server_connection)) { - /* We have to send more bytes. */ - int action = rand() % 7; - - switch (action) { - case 0: - case 1: { - /* Send a couple of bytes. */ - static char buffer[103]; - - int send_bytes = MIN(TRANSFER_BYTES - context->sent, sizeof buffer); - ASSERT(send_bytes > 0); - - r = send(context->sock, buffer, send_bytes, 0); - - if (r < 0) { - ASSERT(got_eagain()); - spurious_writable_wakeups++; - break; - } - - ASSERT(r > 0); - context->sent += r; - valid_writable_wakeups++; - break; - } - - case 2: - case 3: { - /* Send until EAGAIN. */ - static char buffer[1234]; - - int send_bytes = MIN(TRANSFER_BYTES - context->sent, sizeof buffer); - ASSERT(send_bytes > 0); - - r = send(context->sock, buffer, send_bytes, 0); - - if (r < 0) { - ASSERT(got_eagain()); - spurious_writable_wakeups++; - break; - } - - ASSERT(r > 0); - valid_writable_wakeups++; - context->sent += r; - - while (context->sent < TRANSFER_BYTES) { - send_bytes = MIN(TRANSFER_BYTES - context->sent, sizeof buffer); - ASSERT(send_bytes > 0); - - r = send(context->sock, buffer, send_bytes, 0); - - if (r <= 0) break; - context->sent += r; - } - ASSERT(r > 0 || got_eagain()); - break; - } - - case 4: - /* Ignore. */ - break; - - case 5: - /* Stop sending for a while. Restart in timer callback. */ - new_events &= ~UV_WRITABLE; - if (!uv_is_active((uv_handle_t*) &context->timer_handle)) { - context->delayed_events = UV_WRITABLE; - uv_timer_start(&context->timer_handle, delay_timer_cb, 100, 0); - } else { - context->delayed_events |= UV_WRITABLE; - } - break; - - case 6: - /* Fudge with the event mask. */ - uv_poll_start(&context->poll_handle, - UV_READABLE, - connection_poll_cb); - uv_poll_start(&context->poll_handle, - UV_WRITABLE, - connection_poll_cb); - context->events = UV_WRITABLE; - break; - - default: - ASSERT(0); - } - - } else { - /* Nothing more to write. Send FIN. */ - int r; -#ifdef _WIN32 - r = shutdown(context->sock, SD_SEND); -#else - r = shutdown(context->sock, SHUT_WR); -#endif - ASSERT(r == 0); - context->sent_fin = 1; - new_events &= ~UV_WRITABLE; - } - } - - if (context->got_fin && context->sent_fin) { - /* Sent and received FIN. Close and destroy context. */ - close_socket(context->sock); - destroy_connection_context(context); - context->events = 0; - - } else if (new_events != context->events) { - /* Poll mask changed. Call uv_poll_start again. */ - context->events = new_events; - uv_poll_start(handle, new_events, connection_poll_cb); - } - - /* Assert that uv_is_active works correctly for poll handles. */ - if (context->events != 0) { - ASSERT(1 == uv_is_active((uv_handle_t*) handle)); - } else { - ASSERT(0 == uv_is_active((uv_handle_t*) handle)); - } -} - - -static void delay_timer_cb(uv_timer_t* timer) { - connection_context_t* context = (connection_context_t*) timer->data; - int r; - - /* Timer should auto stop. */ - ASSERT(0 == uv_is_active((uv_handle_t*) timer)); - - /* Add the requested events to the poll mask. */ - ASSERT(context->delayed_events != 0); - context->events |= context->delayed_events; - context->delayed_events = 0; - - r = uv_poll_start(&context->poll_handle, - context->events, - connection_poll_cb); - ASSERT(r == 0); -} - - -static server_context_t* create_server_context( - uv_os_sock_t sock) { - int r; - server_context_t* context; - - context = (server_context_t*) malloc(sizeof *context); - ASSERT(context != NULL); - - context->sock = sock; - context->connections = 0; - - r = uv_poll_init_socket(uv_default_loop(), &context->poll_handle, sock); - context->poll_handle.data = context; - ASSERT(r == 0); - - return context; -} - - -static void server_close_cb(uv_handle_t* handle) { - server_context_t* context = (server_context_t*) handle->data; - free(context); -} - - -static void destroy_server_context(server_context_t* context) { - uv_close((uv_handle_t*) &context->poll_handle, server_close_cb); -} - - -static void server_poll_cb(uv_poll_t* handle, int status, int events) { - server_context_t* server_context = (server_context_t*) - handle->data; - connection_context_t* connection_context; - struct sockaddr_in addr; - socklen_t addr_len; - uv_os_sock_t sock; - int r; - - addr_len = sizeof addr; - sock = accept(server_context->sock, (struct sockaddr*) &addr, &addr_len); -#ifdef _WIN32 - ASSERT(sock != INVALID_SOCKET); -#else - ASSERT(sock >= 0); -#endif - - connection_context = create_connection_context(sock, 1); - connection_context->events = UV_READABLE | UV_WRITABLE; - r = uv_poll_start(&connection_context->poll_handle, - UV_READABLE | UV_WRITABLE, - connection_poll_cb); - ASSERT(r == 0); - - if (++server_context->connections == NUM_CLIENTS) { - close_socket(server_context->sock); - destroy_server_context(server_context); - } -} - - -static void start_server(void) { - server_context_t* context; - struct sockaddr_in addr; - uv_os_sock_t sock; - int r; - - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - sock = create_bound_socket(addr); - context = create_server_context(sock); - - r = listen(sock, 100); - ASSERT(r == 0); - - r = uv_poll_start(&context->poll_handle, UV_READABLE, server_poll_cb); - ASSERT(r == 0); -} - - -static void start_client(void) { - uv_os_sock_t sock; - connection_context_t* context; - struct sockaddr_in server_addr; - struct sockaddr_in addr; - int r; - - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &server_addr)); - ASSERT(0 == uv_ip4_addr("0.0.0.0", 0, &addr)); - - sock = create_bound_socket(addr); - context = create_connection_context(sock, 0); - - context->events = UV_READABLE | UV_WRITABLE; - r = uv_poll_start(&context->poll_handle, - UV_READABLE | UV_WRITABLE, - connection_poll_cb); - ASSERT(r == 0); - - r = connect(sock, (struct sockaddr*) &server_addr, sizeof server_addr); - ASSERT(r == 0 || got_eagain()); -} - - -static void start_poll_test(void) { - int i, r; - -#ifdef _WIN32 - { - struct WSAData wsa_data; - int r = WSAStartup(MAKEWORD(2, 2), &wsa_data); - ASSERT(r == 0); - } -#endif - - start_server(); - - for (i = 0; i < NUM_CLIENTS; i++) - start_client(); - - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - - /* Assert that at most five percent of the writable wakeups was spurious. */ - ASSERT(spurious_writable_wakeups == 0 || - (valid_writable_wakeups + spurious_writable_wakeups) / - spurious_writable_wakeups > 20); - - ASSERT(closed_connections == NUM_CLIENTS * 2); - - MAKE_VALGRIND_HAPPY(); -} - - -TEST_IMPL(poll_duplex) { - test_mode = DUPLEX; - start_poll_test(); - return 0; -} - - -TEST_IMPL(poll_unidirectional) { - test_mode = UNIDIRECTIONAL; - start_poll_test(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-process-title.c b/outside/libuv-v1.7.5/test/test-process-title.c deleted file mode 100644 index 29be20749..000000000 --- a/outside/libuv-v1.7.5/test/test-process-title.c +++ /dev/null @@ -1,53 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" -#include - - -static void set_title(const char* title) { - char buffer[512]; - int err; - - err = uv_get_process_title(buffer, sizeof(buffer)); - ASSERT(err == 0); - - err = uv_set_process_title(title); - ASSERT(err == 0); - - err = uv_get_process_title(buffer, sizeof(buffer)); - ASSERT(err == 0); - - ASSERT(strcmp(buffer, title) == 0); -} - - -TEST_IMPL(process_title) { -#if defined(__sun) - RETURN_SKIP("uv_(get|set)_process_title is not implemented."); -#else - /* Check for format string vulnerabilities. */ - set_title("%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s"); - set_title("new title"); - return 0; -#endif -} diff --git a/outside/libuv-v1.7.5/test/test-ref.c b/outside/libuv-v1.7.5/test/test-ref.c deleted file mode 100644 index ddaa17380..000000000 --- a/outside/libuv-v1.7.5/test/test-ref.c +++ /dev/null @@ -1,442 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#include -#include - - -static uv_write_t write_req; -static uv_shutdown_t shutdown_req; -static uv_connect_t connect_req; - -static char buffer[32767]; - -static int req_cb_called; -static int connect_cb_called; -static int write_cb_called; -static int shutdown_cb_called; -static int close_cb_called; - - -static void close_cb(uv_handle_t* handle) { - close_cb_called++; -} - - -static void do_close(void* handle) { - close_cb_called = 0; - uv_close((uv_handle_t*)handle, close_cb); - ASSERT(close_cb_called == 0); - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(close_cb_called == 1); -} - - -static void fail_cb(void) { - FATAL("fail_cb should not have been called"); -} - - -static void fail_cb2(void) { - ASSERT(0 && "fail_cb2 should not have been called"); -} - - -static void req_cb(uv_handle_t* req, int status) { - req_cb_called++; -} - - -static void shutdown_cb(uv_shutdown_t* req, int status) { - ASSERT(req == &shutdown_req); - shutdown_cb_called++; -} - - -static void write_cb(uv_write_t* req, int status) { - ASSERT(req == &write_req); - uv_shutdown(&shutdown_req, req->handle, shutdown_cb); - write_cb_called++; -} - - -static void connect_and_write(uv_connect_t* req, int status) { - uv_buf_t buf = uv_buf_init(buffer, sizeof buffer); - ASSERT(req == &connect_req); - ASSERT(status == 0); - uv_write(&write_req, req->handle, &buf, 1, write_cb); - connect_cb_called++; -} - - - -static void connect_and_shutdown(uv_connect_t* req, int status) { - ASSERT(req == &connect_req); - ASSERT(status == 0); - uv_shutdown(&shutdown_req, req->handle, shutdown_cb); - connect_cb_called++; -} - - -TEST_IMPL(ref) { - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(idle_ref) { - uv_idle_t h; - uv_idle_init(uv_default_loop(), &h); - uv_idle_start(&h, (uv_idle_cb) fail_cb2); - uv_unref((uv_handle_t*)&h); - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - do_close(&h); - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(async_ref) { - uv_async_t h; - uv_async_init(uv_default_loop(), &h, NULL); - uv_unref((uv_handle_t*)&h); - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - do_close(&h); - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(prepare_ref) { - uv_prepare_t h; - uv_prepare_init(uv_default_loop(), &h); - uv_prepare_start(&h, (uv_prepare_cb) fail_cb2); - uv_unref((uv_handle_t*)&h); - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - do_close(&h); - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(check_ref) { - uv_check_t h; - uv_check_init(uv_default_loop(), &h); - uv_check_start(&h, (uv_check_cb) fail_cb2); - uv_unref((uv_handle_t*)&h); - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - do_close(&h); - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -static void prepare_cb(uv_prepare_t* h) { - ASSERT(h != NULL); - uv_unref((uv_handle_t*)h); -} - - -TEST_IMPL(unref_in_prepare_cb) { - uv_prepare_t h; - uv_prepare_init(uv_default_loop(), &h); - uv_prepare_start(&h, prepare_cb); - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - do_close(&h); - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(timer_ref) { - uv_timer_t h; - uv_timer_init(uv_default_loop(), &h); - uv_unref((uv_handle_t*)&h); - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - do_close(&h); - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(timer_ref2) { - uv_timer_t h; - uv_timer_init(uv_default_loop(), &h); - uv_timer_start(&h, (uv_timer_cb)fail_cb, 42, 42); - uv_unref((uv_handle_t*)&h); - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - do_close(&h); - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(fs_event_ref) { - uv_fs_event_t h; - uv_fs_event_init(uv_default_loop(), &h); - uv_fs_event_start(&h, (uv_fs_event_cb)fail_cb, ".", 0); - uv_unref((uv_handle_t*)&h); - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - do_close(&h); - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(fs_poll_ref) { - uv_fs_poll_t h; - uv_fs_poll_init(uv_default_loop(), &h); - uv_fs_poll_start(&h, NULL, ".", 999); - uv_unref((uv_handle_t*)&h); - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - do_close(&h); - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(tcp_ref) { - uv_tcp_t h; - uv_tcp_init(uv_default_loop(), &h); - uv_unref((uv_handle_t*)&h); - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - do_close(&h); - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(tcp_ref2) { - uv_tcp_t h; - uv_tcp_init(uv_default_loop(), &h); - uv_listen((uv_stream_t*)&h, 128, (uv_connection_cb)fail_cb); - uv_unref((uv_handle_t*)&h); - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - do_close(&h); - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(tcp_ref2b) { - uv_tcp_t h; - uv_tcp_init(uv_default_loop(), &h); - uv_listen((uv_stream_t*)&h, 128, (uv_connection_cb)fail_cb); - uv_unref((uv_handle_t*)&h); - uv_close((uv_handle_t*)&h, close_cb); - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(close_cb_called == 1); - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(tcp_ref3) { - struct sockaddr_in addr; - uv_tcp_t h; - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - uv_tcp_init(uv_default_loop(), &h); - uv_tcp_connect(&connect_req, - &h, - (const struct sockaddr*) &addr, - connect_and_shutdown); - uv_unref((uv_handle_t*)&h); - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(connect_cb_called == 1); - ASSERT(shutdown_cb_called == 1); - do_close(&h); - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(tcp_ref4) { - struct sockaddr_in addr; - uv_tcp_t h; - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - uv_tcp_init(uv_default_loop(), &h); - uv_tcp_connect(&connect_req, - &h, - (const struct sockaddr*) &addr, - connect_and_write); - uv_unref((uv_handle_t*)&h); - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(connect_cb_called == 1); - ASSERT(write_cb_called == 1); - ASSERT(shutdown_cb_called == 1); - do_close(&h); - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(udp_ref) { - uv_udp_t h; - uv_udp_init(uv_default_loop(), &h); - uv_unref((uv_handle_t*)&h); - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - do_close(&h); - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(udp_ref2) { - struct sockaddr_in addr; - uv_udp_t h; - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - uv_udp_init(uv_default_loop(), &h); - uv_udp_bind(&h, (const struct sockaddr*) &addr, 0); - uv_udp_recv_start(&h, (uv_alloc_cb)fail_cb, (uv_udp_recv_cb)fail_cb); - uv_unref((uv_handle_t*)&h); - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - do_close(&h); - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(udp_ref3) { - struct sockaddr_in addr; - uv_buf_t buf = uv_buf_init("PING", 4); - uv_udp_send_t req; - uv_udp_t h; - - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - uv_udp_init(uv_default_loop(), &h); - uv_udp_send(&req, - &h, - &buf, - 1, - (const struct sockaddr*) &addr, - (uv_udp_send_cb) req_cb); - uv_unref((uv_handle_t*)&h); - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(req_cb_called == 1); - do_close(&h); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(pipe_ref) { - uv_pipe_t h; - uv_pipe_init(uv_default_loop(), &h, 0); - uv_unref((uv_handle_t*)&h); - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - do_close(&h); - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(pipe_ref2) { - uv_pipe_t h; - uv_pipe_init(uv_default_loop(), &h, 0); - uv_listen((uv_stream_t*)&h, 128, (uv_connection_cb)fail_cb); - uv_unref((uv_handle_t*)&h); - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - do_close(&h); - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(pipe_ref3) { - uv_pipe_t h; - uv_pipe_init(uv_default_loop(), &h, 0); - uv_pipe_connect(&connect_req, &h, TEST_PIPENAME, connect_and_shutdown); - uv_unref((uv_handle_t*)&h); - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(connect_cb_called == 1); - ASSERT(shutdown_cb_called == 1); - do_close(&h); - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(pipe_ref4) { - uv_pipe_t h; - uv_pipe_init(uv_default_loop(), &h, 0); - uv_pipe_connect(&connect_req, &h, TEST_PIPENAME, connect_and_write); - uv_unref((uv_handle_t*)&h); - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(connect_cb_called == 1); - ASSERT(write_cb_called == 1); - ASSERT(shutdown_cb_called == 1); - do_close(&h); - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(process_ref) { - /* spawn_helper4 blocks indefinitely. */ - char *argv[] = { NULL, "spawn_helper4", NULL }; - uv_process_options_t options; - size_t exepath_size; - char exepath[256]; - uv_process_t h; - int r; - - memset(&options, 0, sizeof(options)); - exepath_size = sizeof(exepath); - - r = uv_exepath(exepath, &exepath_size); - ASSERT(r == 0); - - argv[0] = exepath; - options.file = exepath; - options.args = argv; - options.exit_cb = NULL; - - r = uv_spawn(uv_default_loop(), &h, &options); - ASSERT(r == 0); - - uv_unref((uv_handle_t*)&h); - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - r = uv_process_kill(&h, /* SIGTERM */ 15); - ASSERT(r == 0); - - do_close(&h); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(has_ref) { - uv_idle_t h; - uv_idle_init(uv_default_loop(), &h); - uv_ref((uv_handle_t*)&h); - ASSERT(uv_has_ref((uv_handle_t*)&h) == 1); - uv_unref((uv_handle_t*)&h); - ASSERT(uv_has_ref((uv_handle_t*)&h) == 0); - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-run-nowait.c b/outside/libuv-v1.7.5/test/test-run-nowait.c deleted file mode 100644 index 43524f636..000000000 --- a/outside/libuv-v1.7.5/test/test-run-nowait.c +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -static uv_timer_t timer_handle; -static int timer_called = 0; - - -static void timer_cb(uv_timer_t* handle) { - ASSERT(handle == &timer_handle); - timer_called = 1; -} - - -TEST_IMPL(run_nowait) { - int r; - uv_timer_init(uv_default_loop(), &timer_handle); - uv_timer_start(&timer_handle, timer_cb, 100, 100); - - r = uv_run(uv_default_loop(), UV_RUN_NOWAIT); - ASSERT(r != 0); - ASSERT(timer_called == 0); - - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-run-once.c b/outside/libuv-v1.7.5/test/test-run-once.c deleted file mode 100644 index 10cbf95e4..000000000 --- a/outside/libuv-v1.7.5/test/test-run-once.c +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#define NUM_TICKS 64 - -static uv_idle_t idle_handle; -static int idle_counter; - - -static void idle_cb(uv_idle_t* handle) { - ASSERT(handle == &idle_handle); - - if (++idle_counter == NUM_TICKS) - uv_idle_stop(handle); -} - - -TEST_IMPL(run_once) { - uv_idle_init(uv_default_loop(), &idle_handle); - uv_idle_start(&idle_handle, idle_cb); - - while (uv_run(uv_default_loop(), UV_RUN_ONCE)); - ASSERT(idle_counter == NUM_TICKS); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-semaphore.c b/outside/libuv-v1.7.5/test/test-semaphore.c deleted file mode 100644 index ac03bb08f..000000000 --- a/outside/libuv-v1.7.5/test/test-semaphore.c +++ /dev/null @@ -1,111 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#include -#include - -typedef struct { - uv_mutex_t mutex; - uv_sem_t sem; - int delay; - volatile int posted; -} worker_config; - - -static void worker(void* arg) { - worker_config* c = arg; - - if (c->delay) - uv_sleep(c->delay); - - uv_mutex_lock(&c->mutex); - ASSERT(c->posted == 0); - uv_sem_post(&c->sem); - c->posted = 1; - uv_mutex_unlock(&c->mutex); -} - - -TEST_IMPL(semaphore_1) { - uv_thread_t thread; - worker_config wc; - - memset(&wc, 0, sizeof(wc)); - - ASSERT(0 == uv_sem_init(&wc.sem, 0)); - ASSERT(0 == uv_mutex_init(&wc.mutex)); - ASSERT(0 == uv_thread_create(&thread, worker, &wc)); - - uv_sleep(100); - uv_mutex_lock(&wc.mutex); - ASSERT(wc.posted == 1); - uv_sem_wait(&wc.sem); /* should not block */ - uv_mutex_unlock(&wc.mutex); /* ergo, it should be ok to unlock after wait */ - - ASSERT(0 == uv_thread_join(&thread)); - uv_mutex_destroy(&wc.mutex); - uv_sem_destroy(&wc.sem); - - return 0; -} - - -TEST_IMPL(semaphore_2) { - uv_thread_t thread; - worker_config wc; - - memset(&wc, 0, sizeof(wc)); - wc.delay = 100; - - ASSERT(0 == uv_sem_init(&wc.sem, 0)); - ASSERT(0 == uv_mutex_init(&wc.mutex)); - ASSERT(0 == uv_thread_create(&thread, worker, &wc)); - - uv_sem_wait(&wc.sem); - - ASSERT(0 == uv_thread_join(&thread)); - uv_mutex_destroy(&wc.mutex); - uv_sem_destroy(&wc.sem); - - return 0; -} - - -TEST_IMPL(semaphore_3) { - uv_sem_t sem; - - ASSERT(0 == uv_sem_init(&sem, 3)); - uv_sem_wait(&sem); /* should not block */ - uv_sem_wait(&sem); /* should not block */ - ASSERT(0 == uv_sem_trywait(&sem)); - ASSERT(UV_EAGAIN == uv_sem_trywait(&sem)); - - uv_sem_post(&sem); - ASSERT(0 == uv_sem_trywait(&sem)); - ASSERT(UV_EAGAIN == uv_sem_trywait(&sem)); - - uv_sem_destroy(&sem); - - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-shutdown-close.c b/outside/libuv-v1.7.5/test/test-shutdown-close.c deleted file mode 100644 index 78c369be2..000000000 --- a/outside/libuv-v1.7.5/test/test-shutdown-close.c +++ /dev/null @@ -1,108 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -/* - * These tests verify that the uv_shutdown callback is always made, even when - * it is immediately followed by an uv_close call. - */ - -#include "uv.h" -#include "task.h" - - -static uv_shutdown_t shutdown_req; -static uv_connect_t connect_req; - -static int connect_cb_called = 0; -static int shutdown_cb_called = 0; -static int close_cb_called = 0; - - -static void shutdown_cb(uv_shutdown_t* req, int status) { - ASSERT(req == &shutdown_req); - ASSERT(status == 0 || status == UV_ECANCELED); - shutdown_cb_called++; -} - - -static void close_cb(uv_handle_t* handle) { - close_cb_called++; -} - - -static void connect_cb(uv_connect_t* req, int status) { - int r; - - ASSERT(req == &connect_req); - ASSERT(status == 0); - - r = uv_shutdown(&shutdown_req, req->handle, shutdown_cb); - ASSERT(r == 0); - ASSERT(0 == uv_is_closing((uv_handle_t*) req->handle)); - uv_close((uv_handle_t*) req->handle, close_cb); - ASSERT(1 == uv_is_closing((uv_handle_t*) req->handle)); - - connect_cb_called++; -} - - -TEST_IMPL(shutdown_close_tcp) { - struct sockaddr_in addr; - uv_tcp_t h; - int r; - - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - r = uv_tcp_init(uv_default_loop(), &h); - ASSERT(r == 0); - r = uv_tcp_connect(&connect_req, - &h, - (const struct sockaddr*) &addr, - connect_cb); - ASSERT(r == 0); - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - - ASSERT(connect_cb_called == 1); - ASSERT(shutdown_cb_called == 1); - ASSERT(close_cb_called == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(shutdown_close_pipe) { - uv_pipe_t h; - int r; - - r = uv_pipe_init(uv_default_loop(), &h, 0); - ASSERT(r == 0); - uv_pipe_connect(&connect_req, &h, TEST_PIPENAME, connect_cb); - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - - ASSERT(connect_cb_called == 1); - ASSERT(shutdown_cb_called == 1); - ASSERT(close_cb_called == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-shutdown-eof.c b/outside/libuv-v1.7.5/test/test-shutdown-eof.c deleted file mode 100644 index 9f95e7561..000000000 --- a/outside/libuv-v1.7.5/test/test-shutdown-eof.c +++ /dev/null @@ -1,182 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" -#include -#include - -static uv_timer_t timer; -static uv_tcp_t tcp; -static uv_connect_t connect_req; -static uv_write_t write_req; -static uv_shutdown_t shutdown_req; -static uv_buf_t qbuf; -static int got_q; -static int got_eof; -static int called_connect_cb; -static int called_shutdown_cb; -static int called_tcp_close_cb; -static int called_timer_close_cb; -static int called_timer_cb; - - -static void alloc_cb(uv_handle_t* handle, size_t size, uv_buf_t* buf) { - buf->base = malloc(size); - buf->len = size; -} - - -static void read_cb(uv_stream_t* t, ssize_t nread, const uv_buf_t* buf) { - ASSERT((uv_tcp_t*)t == &tcp); - - if (nread == 0) { - free(buf->base); - return; - } - - if (!got_q) { - ASSERT(nread == 1); - ASSERT(!got_eof); - ASSERT(buf->base[0] == 'Q'); - free(buf->base); - got_q = 1; - puts("got Q"); - } else { - ASSERT(nread == UV_EOF); - if (buf->base) { - free(buf->base); - } - got_eof = 1; - puts("got EOF"); - } -} - - -static void shutdown_cb(uv_shutdown_t *req, int status) { - ASSERT(req == &shutdown_req); - - ASSERT(called_connect_cb == 1); - ASSERT(!got_eof); - ASSERT(called_tcp_close_cb == 0); - ASSERT(called_timer_close_cb == 0); - ASSERT(called_timer_cb == 0); - - called_shutdown_cb++; -} - - -static void connect_cb(uv_connect_t *req, int status) { - ASSERT(status == 0); - ASSERT(req == &connect_req); - - /* Start reading from our connection so we can receive the EOF. */ - uv_read_start((uv_stream_t*)&tcp, alloc_cb, read_cb); - - /* - * Write the letter 'Q' to gracefully kill the echo-server. This will not - * effect our connection. - */ - uv_write(&write_req, (uv_stream_t*) &tcp, &qbuf, 1, NULL); - - /* Shutdown our end of the connection. */ - uv_shutdown(&shutdown_req, (uv_stream_t*) &tcp, shutdown_cb); - - called_connect_cb++; - ASSERT(called_shutdown_cb == 0); -} - - -static void tcp_close_cb(uv_handle_t* handle) { - ASSERT(handle == (uv_handle_t*) &tcp); - - ASSERT(called_connect_cb == 1); - ASSERT(got_q); - ASSERT(got_eof); - ASSERT(called_timer_cb == 1); - - called_tcp_close_cb++; -} - - -static void timer_close_cb(uv_handle_t* handle) { - ASSERT(handle == (uv_handle_t*) &timer); - called_timer_close_cb++; -} - - -static void timer_cb(uv_timer_t* handle) { - ASSERT(handle == &timer); - uv_close((uv_handle_t*) handle, timer_close_cb); - - /* - * The most important assert of the test: we have not received - * tcp_close_cb yet. - */ - ASSERT(called_tcp_close_cb == 0); - uv_close((uv_handle_t*) &tcp, tcp_close_cb); - - called_timer_cb++; -} - - -/* - * This test has a client which connects to the echo_server and immediately - * issues a shutdown. The echo-server, in response, will also shutdown their - * connection. We check, with a timer, that libuv is not automatically - * calling uv_close when the client receives the EOF from echo-server. - */ -TEST_IMPL(shutdown_eof) { - struct sockaddr_in server_addr; - int r; - - qbuf.base = "Q"; - qbuf.len = 1; - - r = uv_timer_init(uv_default_loop(), &timer); - ASSERT(r == 0); - - uv_timer_start(&timer, timer_cb, 100, 0); - - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &server_addr)); - r = uv_tcp_init(uv_default_loop(), &tcp); - ASSERT(!r); - - r = uv_tcp_connect(&connect_req, - &tcp, - (const struct sockaddr*) &server_addr, - connect_cb); - ASSERT(!r); - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(called_connect_cb == 1); - ASSERT(called_shutdown_cb == 1); - ASSERT(got_eof); - ASSERT(got_q); - ASSERT(called_tcp_close_cb == 1); - ASSERT(called_timer_close_cb == 1); - ASSERT(called_timer_cb == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - diff --git a/outside/libuv-v1.7.5/test/test-shutdown-twice.c b/outside/libuv-v1.7.5/test/test-shutdown-twice.c deleted file mode 100644 index 75c054354..000000000 --- a/outside/libuv-v1.7.5/test/test-shutdown-twice.c +++ /dev/null @@ -1,84 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -/* - * This is a regression test for issue #1113 (calling uv_shutdown twice will - * leave a ghost request in the system) - */ - -#include "uv.h" -#include "task.h" - -static uv_shutdown_t req1; -static uv_shutdown_t req2; - -static int shutdown_cb_called = 0; - -static void close_cb(uv_handle_t* handle) { - -} - -static void shutdown_cb(uv_shutdown_t* req, int status) { - ASSERT(req == &req1); - ASSERT(status == 0); - shutdown_cb_called++; - uv_close((uv_handle_t*) req->handle, close_cb); -} - -static void connect_cb(uv_connect_t* req, int status) { - int r; - - ASSERT(status == 0); - - r = uv_shutdown(&req1, req->handle, shutdown_cb); - ASSERT(r == 0); - r = uv_shutdown(&req2, req->handle, shutdown_cb); - ASSERT(r != 0); - -} - -TEST_IMPL(shutdown_twice) { - struct sockaddr_in addr; - uv_loop_t* loop; - int r; - uv_tcp_t h; - - uv_connect_t connect_req; - - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - loop = uv_default_loop(); - - r = uv_tcp_init(loop, &h); - - r = uv_tcp_connect(&connect_req, - &h, - (const struct sockaddr*) &addr, - connect_cb); - ASSERT(r == 0); - - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - - ASSERT(shutdown_cb_called == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-signal-multiple-loops.c b/outside/libuv-v1.7.5/test/test-signal-multiple-loops.c deleted file mode 100644 index 158129919..000000000 --- a/outside/libuv-v1.7.5/test/test-signal-multiple-loops.c +++ /dev/null @@ -1,290 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - - -/* This test does not pretend to be cross-platform. */ -#ifndef _WIN32 - -#include "uv.h" -#include "task.h" - -#include -#include -#include -#include -#include -#include -#include - -/* The value of NUM_SIGNAL_HANDLING_THREADS is not arbitrary; it needs to be a - * multiple of three for reasons that will become clear when you scroll down. - * We're basically creating three different thread groups. The total needs - * to be divisible by three in order for the numbers in the final check to - * match up. - */ -#define NUM_SIGNAL_HANDLING_THREADS 24 -#define NUM_LOOP_CREATING_THREADS 10 - -enum signal_action { - ONLY_SIGUSR1, - ONLY_SIGUSR2, - SIGUSR1_AND_SIGUSR2 -}; - -static uv_sem_t sem; -static uv_mutex_t counter_lock; -static volatile int stop = 0; - -static volatile int signal1_cb_counter = 0; -static volatile int signal2_cb_counter = 0; -static volatile int loop_creation_counter = 0; - - -static void increment_counter(volatile int* counter) { - uv_mutex_lock(&counter_lock); - ++(*counter); - uv_mutex_unlock(&counter_lock); -} - - -static void signal1_cb(uv_signal_t* handle, int signum) { - ASSERT(signum == SIGUSR1); - increment_counter(&signal1_cb_counter); - uv_signal_stop(handle); -} - - -static void signal2_cb(uv_signal_t* handle, int signum) { - ASSERT(signum == SIGUSR2); - increment_counter(&signal2_cb_counter); - uv_signal_stop(handle); -} - - -static void signal_handling_worker(void* context) { - enum signal_action action; - uv_signal_t signal1a; - uv_signal_t signal1b; - uv_signal_t signal2; - uv_loop_t loop; - int r; - - action = (enum signal_action) (uintptr_t) context; - - ASSERT(0 == uv_loop_init(&loop)); - - /* Setup the signal watchers and start them. */ - if (action == ONLY_SIGUSR1 || action == SIGUSR1_AND_SIGUSR2) { - r = uv_signal_init(&loop, &signal1a); - ASSERT(r == 0); - r = uv_signal_start(&signal1a, signal1_cb, SIGUSR1); - ASSERT(r == 0); - r = uv_signal_init(&loop, &signal1b); - ASSERT(r == 0); - r = uv_signal_start(&signal1b, signal1_cb, SIGUSR1); - ASSERT(r == 0); - } - - if (action == ONLY_SIGUSR2 || action == SIGUSR1_AND_SIGUSR2) { - r = uv_signal_init(&loop, &signal2); - ASSERT(r == 0); - r = uv_signal_start(&signal2, signal2_cb, SIGUSR2); - ASSERT(r == 0); - } - - /* Signal watchers are now set up. */ - uv_sem_post(&sem); - - /* Wait for all signals. The signal callbacks stop the watcher, so uv_run - * will return when all signal watchers caught a signal. - */ - r = uv_run(&loop, UV_RUN_DEFAULT); - ASSERT(r == 0); - - /* Restart the signal watchers. */ - if (action == ONLY_SIGUSR1 || action == SIGUSR1_AND_SIGUSR2) { - r = uv_signal_start(&signal1a, signal1_cb, SIGUSR1); - ASSERT(r == 0); - r = uv_signal_start(&signal1b, signal1_cb, SIGUSR1); - ASSERT(r == 0); - } - - if (action == ONLY_SIGUSR2 || action == SIGUSR1_AND_SIGUSR2) { - r = uv_signal_start(&signal2, signal2_cb, SIGUSR2); - ASSERT(r == 0); - } - - /* Wait for signals once more. */ - uv_sem_post(&sem); - - r = uv_run(&loop, UV_RUN_DEFAULT); - ASSERT(r == 0); - - /* Close the watchers. */ - if (action == ONLY_SIGUSR1 || action == SIGUSR1_AND_SIGUSR2) { - uv_close((uv_handle_t*) &signal1a, NULL); - uv_close((uv_handle_t*) &signal1b, NULL); - } - - if (action == ONLY_SIGUSR2 || action == SIGUSR1_AND_SIGUSR2) { - uv_close((uv_handle_t*) &signal2, NULL); - } - - /* Wait for the signal watchers to close. */ - r = uv_run(&loop, UV_RUN_DEFAULT); - ASSERT(r == 0); - - uv_loop_close(&loop); -} - - -static void signal_unexpected_cb(uv_signal_t* handle, int signum) { - ASSERT(0 && "signal_unexpected_cb should never be called"); -} - - -static void loop_creating_worker(void* context) { - (void) context; - - do { - uv_loop_t *loop; - uv_signal_t signal; - int r; - - loop = malloc(sizeof(*loop)); - ASSERT(loop != NULL); - ASSERT(0 == uv_loop_init(loop)); - - r = uv_signal_init(loop, &signal); - ASSERT(r == 0); - - r = uv_signal_start(&signal, signal_unexpected_cb, SIGTERM); - ASSERT(r == 0); - - uv_close((uv_handle_t*) &signal, NULL); - - r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT(r == 0); - - uv_loop_close(loop); - free(loop); - - increment_counter(&loop_creation_counter); - } while (!stop); -} - - -TEST_IMPL(signal_multiple_loops) { - uv_thread_t loop_creating_threads[NUM_LOOP_CREATING_THREADS]; - uv_thread_t signal_handling_threads[NUM_SIGNAL_HANDLING_THREADS]; - enum signal_action action; - sigset_t sigset; - int i; - int r; - - r = uv_sem_init(&sem, 0); - ASSERT(r == 0); - - r = uv_mutex_init(&counter_lock); - ASSERT(r == 0); - - /* Create a couple of threads that create a destroy loops continuously. */ - for (i = 0; i < NUM_LOOP_CREATING_THREADS; i++) { - r = uv_thread_create(&loop_creating_threads[i], - loop_creating_worker, - NULL); - ASSERT(r == 0); - } - - /* Create a couple of threads that actually handle signals. */ - for (i = 0; i < NUM_SIGNAL_HANDLING_THREADS; i++) { - switch (i % 3) { - case 0: action = ONLY_SIGUSR1; break; - case 1: action = ONLY_SIGUSR2; break; - case 2: action = SIGUSR1_AND_SIGUSR2; break; - } - - r = uv_thread_create(&signal_handling_threads[i], - signal_handling_worker, - (void*) (uintptr_t) action); - ASSERT(r == 0); - } - - /* Wait until all threads have started and set up their signal watchers. */ - for (i = 0; i < NUM_SIGNAL_HANDLING_THREADS; i++) - uv_sem_wait(&sem); - - r = kill(getpid(), SIGUSR1); - ASSERT(r == 0); - r = kill(getpid(), SIGUSR2); - ASSERT(r == 0); - - /* Wait for all threads to handle these signals. */ - for (i = 0; i < NUM_SIGNAL_HANDLING_THREADS; i++) - uv_sem_wait(&sem); - - /* Block all signals to this thread, so we are sure that from here the signal - * handler runs in another thread. This is is more likely to catch thread and - * signal safety issues if there are any. - */ - sigfillset(&sigset); - pthread_sigmask(SIG_SETMASK, &sigset, NULL); - - r = kill(getpid(), SIGUSR1); - ASSERT(r == 0); - r = kill(getpid(), SIGUSR2); - ASSERT(r == 0); - - /* Wait for all signal handling threads to exit. */ - for (i = 0; i < NUM_SIGNAL_HANDLING_THREADS; i++) { - r = uv_thread_join(&signal_handling_threads[i]); - ASSERT(r == 0); - } - - /* Tell all loop creating threads to stop. */ - stop = 1; - - /* Wait for all loop creating threads to exit. */ - for (i = 0; i < NUM_LOOP_CREATING_THREADS; i++) { - r = uv_thread_join(&loop_creating_threads[i]); - ASSERT(r == 0); - } - - printf("signal1_cb calls: %d\n", signal1_cb_counter); - printf("signal2_cb calls: %d\n", signal2_cb_counter); - printf("loops created and destroyed: %d\n", loop_creation_counter); - - /* The division by three reflects the fact that we spawn three different - * thread groups of (NUM_SIGNAL_HANDLING_THREADS / 3) threads each. - */ - ASSERT(signal1_cb_counter == 8 * (NUM_SIGNAL_HANDLING_THREADS / 3)); - ASSERT(signal2_cb_counter == 4 * (NUM_SIGNAL_HANDLING_THREADS / 3)); - - /* We don't know exactly how much loops will be created and destroyed, but at - * least there should be 1 for every loop creating thread. - */ - ASSERT(loop_creation_counter >= NUM_LOOP_CREATING_THREADS); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - -#endif /* !_WIN32 */ diff --git a/outside/libuv-v1.7.5/test/test-signal.c b/outside/libuv-v1.7.5/test/test-signal.c deleted file mode 100644 index fcdd8e4d2..000000000 --- a/outside/libuv-v1.7.5/test/test-signal.c +++ /dev/null @@ -1,152 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - - -/* This test does not pretend to be cross-platform. */ -#ifndef _WIN32 - -#include "uv.h" -#include "task.h" - -#include -#include -#include -#include -#include -#include -#include - -#define NSIGNALS 10 - -struct timer_ctx { - unsigned int ncalls; - uv_timer_t handle; - int signum; -}; - -struct signal_ctx { - enum { CLOSE, STOP } stop_or_close; - unsigned int ncalls; - uv_signal_t handle; - int signum; -}; - - -static void signal_cb(uv_signal_t* handle, int signum) { - struct signal_ctx* ctx = container_of(handle, struct signal_ctx, handle); - ASSERT(signum == ctx->signum); - - if (++ctx->ncalls == NSIGNALS) { - if (ctx->stop_or_close == STOP) - uv_signal_stop(handle); - else if (ctx->stop_or_close == CLOSE) - uv_close((uv_handle_t*)handle, NULL); - else - ASSERT(0); - } -} - - -static void timer_cb(uv_timer_t* handle) { - struct timer_ctx* ctx = container_of(handle, struct timer_ctx, handle); - - raise(ctx->signum); - - if (++ctx->ncalls == NSIGNALS) - uv_close((uv_handle_t*)handle, NULL); -} - - -static void start_watcher(uv_loop_t* loop, int signum, struct signal_ctx* ctx) { - ctx->ncalls = 0; - ctx->signum = signum; - ctx->stop_or_close = CLOSE; - ASSERT(0 == uv_signal_init(loop, &ctx->handle)); - ASSERT(0 == uv_signal_start(&ctx->handle, signal_cb, signum)); -} - - -static void start_timer(uv_loop_t* loop, int signum, struct timer_ctx* ctx) { - ctx->ncalls = 0; - ctx->signum = signum; - ASSERT(0 == uv_timer_init(loop, &ctx->handle)); - ASSERT(0 == uv_timer_start(&ctx->handle, timer_cb, 5, 5)); -} - - -TEST_IMPL(we_get_signal) { - struct signal_ctx sc; - struct timer_ctx tc; - uv_loop_t* loop; - - loop = uv_default_loop(); - start_timer(loop, SIGCHLD, &tc); - start_watcher(loop, SIGCHLD, &sc); - sc.stop_or_close = STOP; /* stop, don't close the signal handle */ - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - ASSERT(tc.ncalls == NSIGNALS); - ASSERT(sc.ncalls == NSIGNALS); - - start_timer(loop, SIGCHLD, &tc); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - ASSERT(tc.ncalls == NSIGNALS); - ASSERT(sc.ncalls == NSIGNALS); - - sc.ncalls = 0; - sc.stop_or_close = CLOSE; /* now close it when it's done */ - uv_signal_start(&sc.handle, signal_cb, SIGCHLD); - - start_timer(loop, SIGCHLD, &tc); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - ASSERT(tc.ncalls == NSIGNALS); - ASSERT(sc.ncalls == NSIGNALS); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(we_get_signals) { - struct signal_ctx sc[4]; - struct timer_ctx tc[2]; - uv_loop_t* loop; - unsigned int i; - - loop = uv_default_loop(); - start_watcher(loop, SIGUSR1, sc + 0); - start_watcher(loop, SIGUSR1, sc + 1); - start_watcher(loop, SIGUSR2, sc + 2); - start_watcher(loop, SIGUSR2, sc + 3); - start_timer(loop, SIGUSR1, tc + 0); - start_timer(loop, SIGUSR2, tc + 1); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - - for (i = 0; i < ARRAY_SIZE(sc); i++) - ASSERT(sc[i].ncalls == NSIGNALS); - - for (i = 0; i < ARRAY_SIZE(tc); i++) - ASSERT(tc[i].ncalls == NSIGNALS); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - -#endif /* _WIN32 */ diff --git a/outside/libuv-v1.7.5/test/test-socket-buffer-size.c b/outside/libuv-v1.7.5/test/test-socket-buffer-size.c deleted file mode 100644 index 72f8c2524..000000000 --- a/outside/libuv-v1.7.5/test/test-socket-buffer-size.c +++ /dev/null @@ -1,77 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#include -#include -#include - -static uv_udp_t udp; -static uv_tcp_t tcp; -static int close_cb_called; - - -static void close_cb(uv_handle_t* handle) { - close_cb_called++; -} - - -static void check_buffer_size(uv_handle_t* handle) { - int value; - - value = 0; - ASSERT(0 == uv_recv_buffer_size(handle, &value)); - ASSERT(value > 0); - - value = 10000; - ASSERT(0 == uv_recv_buffer_size(handle, &value)); - - value = 0; - ASSERT(0 == uv_recv_buffer_size(handle, &value)); - /* linux sets double the value */ - ASSERT(value == 10000 || value == 20000); -} - - -TEST_IMPL(socket_buffer_size) { - struct sockaddr_in addr; - - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - - ASSERT(0 == uv_tcp_init(uv_default_loop(), &tcp)); - ASSERT(0 == uv_tcp_bind(&tcp, (struct sockaddr*) &addr, 0)); - check_buffer_size((uv_handle_t*) &tcp); - uv_close((uv_handle_t*) &tcp, close_cb); - - ASSERT(0 == uv_udp_init(uv_default_loop(), &udp)); - ASSERT(0 == uv_udp_bind(&udp, (struct sockaddr*) &addr, 0)); - check_buffer_size((uv_handle_t*) &udp); - uv_close((uv_handle_t*) &udp, close_cb); - - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - - ASSERT(close_cb_called == 2); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-spawn.c b/outside/libuv-v1.7.5/test/test-spawn.c deleted file mode 100644 index e71f0f7d5..000000000 --- a/outside/libuv-v1.7.5/test/test-spawn.c +++ /dev/null @@ -1,1706 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" -#include -#include -#include -#include -#include - -#ifdef _WIN32 -# if defined(__MINGW32__) -# include -# endif -# include -# include -#else -# include -# include -#endif - - -static int close_cb_called; -static int exit_cb_called; -static uv_process_t process; -static uv_timer_t timer; -static uv_process_options_t options; -static char exepath[1024]; -static size_t exepath_size = 1024; -static char* args[3]; -static int no_term_signal; -static int timer_counter; - -#define OUTPUT_SIZE 1024 -static char output[OUTPUT_SIZE]; -static int output_used; - - -static void close_cb(uv_handle_t* handle) { - printf("close_cb\n"); - close_cb_called++; -} - -static void exit_cb(uv_process_t* process, - int64_t exit_status, - int term_signal) { - printf("exit_cb\n"); - exit_cb_called++; - ASSERT(exit_status == 1); - ASSERT(term_signal == 0); - uv_close((uv_handle_t*)process, close_cb); -} - - -static void fail_cb(uv_process_t* process, - int64_t exit_status, - int term_signal) { - ASSERT(0 && "fail_cb called"); -} - - -static void kill_cb(uv_process_t* process, - int64_t exit_status, - int term_signal) { - int err; - - printf("exit_cb\n"); - exit_cb_called++; -#ifdef _WIN32 - ASSERT(exit_status == 1); -#else - ASSERT(exit_status == 0); -#endif - ASSERT(no_term_signal || term_signal == 15); - uv_close((uv_handle_t*)process, close_cb); - - /* - * Sending signum == 0 should check if the - * child process is still alive, not kill it. - * This process should be dead. - */ - err = uv_kill(process->pid, 0); - ASSERT(err == UV_ESRCH); -} - -static void detach_failure_cb(uv_process_t* process, - int64_t exit_status, - int term_signal) { - printf("detach_cb\n"); - exit_cb_called++; -} - -static void on_alloc(uv_handle_t* handle, - size_t suggested_size, - uv_buf_t* buf) { - buf->base = output + output_used; - buf->len = OUTPUT_SIZE - output_used; -} - - -static void on_read(uv_stream_t* tcp, ssize_t nread, const uv_buf_t* buf) { - if (nread > 0) { - output_used += nread; - } else if (nread < 0) { - ASSERT(nread == UV_EOF); - uv_close((uv_handle_t*)tcp, close_cb); - } -} - - -static void on_read_once(uv_stream_t* tcp, ssize_t nread, const uv_buf_t* buf) { - uv_read_stop(tcp); - on_read(tcp, nread, buf); -} - - -static void write_cb(uv_write_t* req, int status) { - ASSERT(status == 0); - uv_close((uv_handle_t*)req->handle, close_cb); -} - - -static void init_process_options(char* test, uv_exit_cb exit_cb) { - /* Note spawn_helper1 defined in test/run-tests.c */ - int r = uv_exepath(exepath, &exepath_size); - ASSERT(r == 0); - exepath[exepath_size] = '\0'; - args[0] = exepath; - args[1] = test; - args[2] = NULL; - options.file = exepath; - options.args = args; - options.exit_cb = exit_cb; - options.flags = 0; -} - - -static void timer_cb(uv_timer_t* handle) { - uv_process_kill(&process, /* SIGTERM */ 15); - uv_close((uv_handle_t*)handle, close_cb); -} - - -static void timer_counter_cb(uv_timer_t* handle) { - ++timer_counter; -} - - -TEST_IMPL(spawn_fails) { - int r; - - init_process_options("", fail_cb); - options.file = options.args[0] = "program-that-had-better-not-exist"; - - r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT(r == UV_ENOENT || r == UV_EACCES); - ASSERT(0 == uv_is_active((uv_handle_t*) &process)); - uv_close((uv_handle_t*) &process, NULL); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -#ifndef _WIN32 -TEST_IMPL(spawn_fails_check_for_waitpid_cleanup) { - int r; - int status; - int err; - - init_process_options("", fail_cb); - options.file = options.args[0] = "program-that-had-better-not-exist"; - - r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT(r == UV_ENOENT || r == UV_EACCES); - ASSERT(0 == uv_is_active((uv_handle_t*) &process)); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - - /* verify the child is successfully cleaned up within libuv */ - do - err = waitpid(process.pid, &status, 0); - while (err == -1 && errno == EINTR); - - ASSERT(err == -1); - ASSERT(errno == ECHILD); - - uv_close((uv_handle_t*) &process, NULL); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - - MAKE_VALGRIND_HAPPY(); - return 0; -} -#endif - - -TEST_IMPL(spawn_exit_code) { - int r; - - init_process_options("spawn_helper1", exit_cb); - - r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT(r == 0); - - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - - ASSERT(exit_cb_called == 1); - ASSERT(close_cb_called == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(spawn_stdout) { - int r; - uv_pipe_t out; - uv_stdio_container_t stdio[2]; - - init_process_options("spawn_helper2", exit_cb); - - uv_pipe_init(uv_default_loop(), &out, 0); - options.stdio = stdio; - options.stdio[0].flags = UV_IGNORE; - options.stdio[1].flags = UV_CREATE_PIPE | UV_WRITABLE_PIPE; - options.stdio[1].data.stream = (uv_stream_t*)&out; - options.stdio_count = 2; - - r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT(r == 0); - - r = uv_read_start((uv_stream_t*) &out, on_alloc, on_read); - ASSERT(r == 0); - - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - - ASSERT(exit_cb_called == 1); - ASSERT(close_cb_called == 2); /* Once for process once for the pipe. */ - printf("output is: %s", output); - ASSERT(strcmp("hello world\n", output) == 0); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(spawn_stdout_to_file) { - int r; - uv_file file; - uv_fs_t fs_req; - uv_stdio_container_t stdio[2]; - uv_buf_t buf; - - /* Setup. */ - unlink("stdout_file"); - - init_process_options("spawn_helper2", exit_cb); - - r = uv_fs_open(NULL, &fs_req, "stdout_file", O_CREAT | O_RDWR, - S_IRUSR | S_IWUSR, NULL); - ASSERT(r != -1); - uv_fs_req_cleanup(&fs_req); - - file = r; - - options.stdio = stdio; - options.stdio[0].flags = UV_IGNORE; - options.stdio[1].flags = UV_INHERIT_FD; - options.stdio[1].data.fd = file; - options.stdio_count = 2; - - r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT(r == 0); - - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - - ASSERT(exit_cb_called == 1); - ASSERT(close_cb_called == 1); - - buf = uv_buf_init(output, sizeof(output)); - r = uv_fs_read(NULL, &fs_req, file, &buf, 1, 0, NULL); - ASSERT(r == 12); - uv_fs_req_cleanup(&fs_req); - - r = uv_fs_close(NULL, &fs_req, file, NULL); - ASSERT(r == 0); - uv_fs_req_cleanup(&fs_req); - - printf("output is: %s", output); - ASSERT(strcmp("hello world\n", output) == 0); - - /* Cleanup. */ - unlink("stdout_file"); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(spawn_stdout_and_stderr_to_file) { - int r; - uv_file file; - uv_fs_t fs_req; - uv_stdio_container_t stdio[3]; - uv_buf_t buf; - - /* Setup. */ - unlink("stdout_file"); - - init_process_options("spawn_helper6", exit_cb); - - r = uv_fs_open(NULL, &fs_req, "stdout_file", O_CREAT | O_RDWR, - S_IRUSR | S_IWUSR, NULL); - ASSERT(r != -1); - uv_fs_req_cleanup(&fs_req); - - file = r; - - options.stdio = stdio; - options.stdio[0].flags = UV_IGNORE; - options.stdio[1].flags = UV_INHERIT_FD; - options.stdio[1].data.fd = file; - options.stdio[2].flags = UV_INHERIT_FD; - options.stdio[2].data.fd = file; - options.stdio_count = 3; - - r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT(r == 0); - - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - - ASSERT(exit_cb_called == 1); - ASSERT(close_cb_called == 1); - - buf = uv_buf_init(output, sizeof(output)); - r = uv_fs_read(NULL, &fs_req, file, &buf, 1, 0, NULL); - ASSERT(r == 27); - uv_fs_req_cleanup(&fs_req); - - r = uv_fs_close(NULL, &fs_req, file, NULL); - ASSERT(r == 0); - uv_fs_req_cleanup(&fs_req); - - printf("output is: %s", output); - ASSERT(strcmp("hello world\nhello errworld\n", output) == 0); - - /* Cleanup. */ - unlink("stdout_file"); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(spawn_stdout_and_stderr_to_file2) { -#ifndef _WIN32 - int r; - uv_file file; - uv_fs_t fs_req; - uv_stdio_container_t stdio[3]; - uv_buf_t buf; - - /* Setup. */ - unlink("stdout_file"); - - init_process_options("spawn_helper6", exit_cb); - - /* Replace stderr with our file */ - r = uv_fs_open(NULL, - &fs_req, - "stdout_file", - O_CREAT | O_RDWR, - S_IRUSR | S_IWUSR, - NULL); - ASSERT(r != -1); - uv_fs_req_cleanup(&fs_req); - file = dup2(r, STDERR_FILENO); - ASSERT(file != -1); - - options.stdio = stdio; - options.stdio[0].flags = UV_IGNORE; - options.stdio[1].flags = UV_INHERIT_FD; - options.stdio[1].data.fd = file; - options.stdio[2].flags = UV_INHERIT_FD; - options.stdio[2].data.fd = file; - options.stdio_count = 3; - - r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT(r == 0); - - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - - ASSERT(exit_cb_called == 1); - ASSERT(close_cb_called == 1); - - buf = uv_buf_init(output, sizeof(output)); - r = uv_fs_read(NULL, &fs_req, file, &buf, 1, 0, NULL); - ASSERT(r == 27); - uv_fs_req_cleanup(&fs_req); - - r = uv_fs_close(NULL, &fs_req, file, NULL); - ASSERT(r == 0); - uv_fs_req_cleanup(&fs_req); - - printf("output is: %s", output); - ASSERT(strcmp("hello world\nhello errworld\n", output) == 0); - - /* Cleanup. */ - unlink("stdout_file"); - - MAKE_VALGRIND_HAPPY(); - return 0; -#else - RETURN_SKIP("Unix only test"); -#endif -} - - -TEST_IMPL(spawn_stdout_and_stderr_to_file_swap) { -#ifndef _WIN32 - int r; - uv_file stdout_file; - uv_file stderr_file; - uv_fs_t fs_req; - uv_stdio_container_t stdio[3]; - uv_buf_t buf; - - /* Setup. */ - unlink("stdout_file"); - unlink("stderr_file"); - - init_process_options("spawn_helper6", exit_cb); - - /* open 'stdout_file' and replace STDOUT_FILENO with it */ - r = uv_fs_open(NULL, - &fs_req, - "stdout_file", - O_CREAT | O_RDWR, - S_IRUSR | S_IWUSR, - NULL); - ASSERT(r != -1); - uv_fs_req_cleanup(&fs_req); - stdout_file = dup2(r, STDOUT_FILENO); - ASSERT(stdout_file != -1); - - /* open 'stderr_file' and replace STDERR_FILENO with it */ - r = uv_fs_open(NULL, &fs_req, "stderr_file", O_CREAT | O_RDWR, - S_IRUSR | S_IWUSR, NULL); - ASSERT(r != -1); - uv_fs_req_cleanup(&fs_req); - stderr_file = dup2(r, STDERR_FILENO); - ASSERT(stderr_file != -1); - - /* now we're going to swap them: the child process' stdout will be our - * stderr_file and vice versa */ - options.stdio = stdio; - options.stdio[0].flags = UV_IGNORE; - options.stdio[1].flags = UV_INHERIT_FD; - options.stdio[1].data.fd = stderr_file; - options.stdio[2].flags = UV_INHERIT_FD; - options.stdio[2].data.fd = stdout_file; - options.stdio_count = 3; - - r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT(r == 0); - - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - - ASSERT(exit_cb_called == 1); - ASSERT(close_cb_called == 1); - - buf = uv_buf_init(output, sizeof(output)); - - /* check the content of stdout_file */ - r = uv_fs_read(NULL, &fs_req, stdout_file, &buf, 1, 0, NULL); - ASSERT(r >= 15); - uv_fs_req_cleanup(&fs_req); - - r = uv_fs_close(NULL, &fs_req, stdout_file, NULL); - ASSERT(r == 0); - uv_fs_req_cleanup(&fs_req); - - printf("output is: %s", output); - ASSERT(strncmp("hello errworld\n", output, 15) == 0); - - /* check the content of stderr_file */ - r = uv_fs_read(NULL, &fs_req, stderr_file, &buf, 1, 0, NULL); - ASSERT(r >= 12); - uv_fs_req_cleanup(&fs_req); - - r = uv_fs_close(NULL, &fs_req, stderr_file, NULL); - ASSERT(r == 0); - uv_fs_req_cleanup(&fs_req); - - printf("output is: %s", output); - ASSERT(strncmp("hello world\n", output, 12) == 0); - - /* Cleanup. */ - unlink("stdout_file"); - unlink("stderr_file"); - - MAKE_VALGRIND_HAPPY(); - return 0; -#else - RETURN_SKIP("Unix only test"); -#endif -} - - -TEST_IMPL(spawn_stdin) { - int r; - uv_pipe_t out; - uv_pipe_t in; - uv_write_t write_req; - uv_buf_t buf; - uv_stdio_container_t stdio[2]; - char buffer[] = "hello-from-spawn_stdin"; - - init_process_options("spawn_helper3", exit_cb); - - uv_pipe_init(uv_default_loop(), &out, 0); - uv_pipe_init(uv_default_loop(), &in, 0); - options.stdio = stdio; - options.stdio[0].flags = UV_CREATE_PIPE | UV_READABLE_PIPE; - options.stdio[0].data.stream = (uv_stream_t*)∈ - options.stdio[1].flags = UV_CREATE_PIPE | UV_WRITABLE_PIPE; - options.stdio[1].data.stream = (uv_stream_t*)&out; - options.stdio_count = 2; - - r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT(r == 0); - - buf.base = buffer; - buf.len = sizeof(buffer); - r = uv_write(&write_req, (uv_stream_t*)&in, &buf, 1, write_cb); - ASSERT(r == 0); - - r = uv_read_start((uv_stream_t*) &out, on_alloc, on_read); - ASSERT(r == 0); - - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - - ASSERT(exit_cb_called == 1); - ASSERT(close_cb_called == 3); /* Once for process twice for the pipe. */ - ASSERT(strcmp(buffer, output) == 0); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(spawn_stdio_greater_than_3) { - int r; - uv_pipe_t pipe; - uv_stdio_container_t stdio[4]; - - init_process_options("spawn_helper5", exit_cb); - - uv_pipe_init(uv_default_loop(), &pipe, 0); - options.stdio = stdio; - options.stdio[0].flags = UV_IGNORE; - options.stdio[1].flags = UV_IGNORE; - options.stdio[2].flags = UV_IGNORE; - options.stdio[3].flags = UV_CREATE_PIPE | UV_WRITABLE_PIPE; - options.stdio[3].data.stream = (uv_stream_t*)&pipe; - options.stdio_count = 4; - - r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT(r == 0); - - r = uv_read_start((uv_stream_t*) &pipe, on_alloc, on_read); - ASSERT(r == 0); - - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - - ASSERT(exit_cb_called == 1); - ASSERT(close_cb_called == 2); /* Once for process once for the pipe. */ - printf("output from stdio[3] is: %s", output); - ASSERT(strcmp("fourth stdio!\n", output) == 0); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(spawn_ignored_stdio) { - int r; - - init_process_options("spawn_helper6", exit_cb); - - options.stdio = NULL; - options.stdio_count = 0; - - r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT(r == 0); - - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - - ASSERT(exit_cb_called == 1); - ASSERT(close_cb_called == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(spawn_and_kill) { - int r; - - init_process_options("spawn_helper4", kill_cb); - - r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT(r == 0); - - r = uv_timer_init(uv_default_loop(), &timer); - ASSERT(r == 0); - - r = uv_timer_start(&timer, timer_cb, 500, 0); - ASSERT(r == 0); - - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - - ASSERT(exit_cb_called == 1); - ASSERT(close_cb_called == 2); /* Once for process and once for timer. */ - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(spawn_preserve_env) { - int r; - uv_pipe_t out; - uv_stdio_container_t stdio[2]; - - init_process_options("spawn_helper7", exit_cb); - - uv_pipe_init(uv_default_loop(), &out, 0); - options.stdio = stdio; - options.stdio[0].flags = UV_IGNORE; - options.stdio[1].flags = UV_CREATE_PIPE | UV_WRITABLE_PIPE; - options.stdio[1].data.stream = (uv_stream_t*) &out; - options.stdio_count = 2; - - r = putenv("ENV_TEST=testval"); - ASSERT(r == 0); - - /* Explicitly set options.env to NULL to test for env clobbering. */ - options.env = NULL; - - r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT(r == 0); - - r = uv_read_start((uv_stream_t*) &out, on_alloc, on_read); - ASSERT(r == 0); - - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - - ASSERT(exit_cb_called == 1); - ASSERT(close_cb_called == 2); - - printf("output is: %s", output); - ASSERT(strcmp("testval", output) == 0); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(spawn_detached) { - int r; - - init_process_options("spawn_helper4", detach_failure_cb); - - options.flags |= UV_PROCESS_DETACHED; - - r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT(r == 0); - - uv_unref((uv_handle_t*)&process); - - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - - ASSERT(exit_cb_called == 0); - - r = uv_kill(process.pid, 0); - ASSERT(r == 0); - - r = uv_kill(process.pid, 15); - ASSERT(r == 0); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - -TEST_IMPL(spawn_and_kill_with_std) { - int r; - uv_pipe_t in, out, err; - uv_write_t write; - char message[] = "Nancy's joining me because the message this evening is " - "not my message but ours."; - uv_buf_t buf; - uv_stdio_container_t stdio[3]; - - init_process_options("spawn_helper4", kill_cb); - - r = uv_pipe_init(uv_default_loop(), &in, 0); - ASSERT(r == 0); - - r = uv_pipe_init(uv_default_loop(), &out, 0); - ASSERT(r == 0); - - r = uv_pipe_init(uv_default_loop(), &err, 0); - ASSERT(r == 0); - - options.stdio = stdio; - options.stdio[0].flags = UV_CREATE_PIPE | UV_READABLE_PIPE; - options.stdio[0].data.stream = (uv_stream_t*)∈ - options.stdio[1].flags = UV_CREATE_PIPE | UV_WRITABLE_PIPE; - options.stdio[1].data.stream = (uv_stream_t*)&out; - options.stdio[2].flags = UV_CREATE_PIPE | UV_WRITABLE_PIPE; - options.stdio[2].data.stream = (uv_stream_t*)&err; - options.stdio_count = 3; - - r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT(r == 0); - - buf = uv_buf_init(message, sizeof message); - r = uv_write(&write, (uv_stream_t*) &in, &buf, 1, write_cb); - ASSERT(r == 0); - - r = uv_read_start((uv_stream_t*) &out, on_alloc, on_read); - ASSERT(r == 0); - - r = uv_read_start((uv_stream_t*) &err, on_alloc, on_read); - ASSERT(r == 0); - - r = uv_timer_init(uv_default_loop(), &timer); - ASSERT(r == 0); - - r = uv_timer_start(&timer, timer_cb, 500, 0); - ASSERT(r == 0); - - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - - ASSERT(exit_cb_called == 1); - ASSERT(close_cb_called == 5); /* process x 1, timer x 1, stdio x 3. */ - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(spawn_and_ping) { - uv_write_t write_req; - uv_pipe_t in, out; - uv_buf_t buf; - uv_stdio_container_t stdio[2]; - int r; - - init_process_options("spawn_helper3", exit_cb); - buf = uv_buf_init("TEST", 4); - - uv_pipe_init(uv_default_loop(), &out, 0); - uv_pipe_init(uv_default_loop(), &in, 0); - options.stdio = stdio; - options.stdio[0].flags = UV_CREATE_PIPE | UV_READABLE_PIPE; - options.stdio[0].data.stream = (uv_stream_t*)∈ - options.stdio[1].flags = UV_CREATE_PIPE | UV_WRITABLE_PIPE; - options.stdio[1].data.stream = (uv_stream_t*)&out; - options.stdio_count = 2; - - r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT(r == 0); - - /* Sending signum == 0 should check if the - * child process is still alive, not kill it. - */ - r = uv_process_kill(&process, 0); - ASSERT(r == 0); - - r = uv_write(&write_req, (uv_stream_t*)&in, &buf, 1, write_cb); - ASSERT(r == 0); - - r = uv_read_start((uv_stream_t*)&out, on_alloc, on_read); - ASSERT(r == 0); - - ASSERT(exit_cb_called == 0); - - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - - ASSERT(exit_cb_called == 1); - ASSERT(strcmp(output, "TEST") == 0); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(spawn_same_stdout_stderr) { - uv_write_t write_req; - uv_pipe_t in, out; - uv_buf_t buf; - uv_stdio_container_t stdio[3]; - int r; - - init_process_options("spawn_helper3", exit_cb); - buf = uv_buf_init("TEST", 4); - - uv_pipe_init(uv_default_loop(), &out, 0); - uv_pipe_init(uv_default_loop(), &in, 0); - options.stdio = stdio; - options.stdio[0].flags = UV_CREATE_PIPE | UV_READABLE_PIPE; - options.stdio[0].data.stream = (uv_stream_t*)∈ - options.stdio[1].flags = UV_CREATE_PIPE | UV_WRITABLE_PIPE; - options.stdio[1].data.stream = (uv_stream_t*)&out; - options.stdio_count = 2; - - r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT(r == 0); - - /* Sending signum == 0 should check if the - * child process is still alive, not kill it. - */ - r = uv_process_kill(&process, 0); - ASSERT(r == 0); - - r = uv_write(&write_req, (uv_stream_t*)&in, &buf, 1, write_cb); - ASSERT(r == 0); - - r = uv_read_start((uv_stream_t*)&out, on_alloc, on_read); - ASSERT(r == 0); - - ASSERT(exit_cb_called == 0); - - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - - ASSERT(exit_cb_called == 1); - ASSERT(strcmp(output, "TEST") == 0); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(spawn_closed_process_io) { - uv_pipe_t in; - uv_write_t write_req; - uv_buf_t buf; - uv_stdio_container_t stdio[2]; - static char buffer[] = "hello-from-spawn_stdin\n"; - - init_process_options("spawn_helper3", exit_cb); - - uv_pipe_init(uv_default_loop(), &in, 0); - options.stdio = stdio; - options.stdio[0].flags = UV_CREATE_PIPE | UV_READABLE_PIPE; - options.stdio[0].data.stream = (uv_stream_t*) ∈ - options.stdio_count = 1; - - close(0); /* Close process stdin. */ - - ASSERT(0 == uv_spawn(uv_default_loop(), &process, &options)); - - buf = uv_buf_init(buffer, sizeof(buffer)); - ASSERT(0 == uv_write(&write_req, (uv_stream_t*) &in, &buf, 1, write_cb)); - - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - - ASSERT(exit_cb_called == 1); - ASSERT(close_cb_called == 2); /* process, child stdin */ - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(kill) { - int r; - -#ifdef _WIN32 - no_term_signal = 1; -#endif - - init_process_options("spawn_helper4", kill_cb); - - r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT(r == 0); - - /* Sending signum == 0 should check if the - * child process is still alive, not kill it. - */ - r = uv_kill(process.pid, 0); - ASSERT(r == 0); - - /* Kill the process. */ - r = uv_kill(process.pid, /* SIGTERM */ 15); - ASSERT(r == 0); - - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - - ASSERT(exit_cb_called == 1); - ASSERT(close_cb_called == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -#ifdef _WIN32 -TEST_IMPL(spawn_detect_pipe_name_collisions_on_windows) { - int r; - uv_pipe_t out; - char name[64]; - HANDLE pipe_handle; - uv_stdio_container_t stdio[2]; - - init_process_options("spawn_helper2", exit_cb); - - uv_pipe_init(uv_default_loop(), &out, 0); - options.stdio = stdio; - options.stdio[0].flags = UV_IGNORE; - options.stdio[1].flags = UV_CREATE_PIPE | UV_WRITABLE_PIPE; - options.stdio[1].data.stream = (uv_stream_t*)&out; - options.stdio_count = 2; - - /* Create a pipe that'll cause a collision. */ - _snprintf(name, - sizeof(name), - "\\\\.\\pipe\\uv\\%p-%d", - &out, - GetCurrentProcessId()); - pipe_handle = CreateNamedPipeA(name, - PIPE_ACCESS_INBOUND | FILE_FLAG_OVERLAPPED, - PIPE_TYPE_BYTE | PIPE_READMODE_BYTE | PIPE_WAIT, - 10, - 65536, - 65536, - 0, - NULL); - ASSERT(pipe_handle != INVALID_HANDLE_VALUE); - - r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT(r == 0); - - r = uv_read_start((uv_stream_t*) &out, on_alloc, on_read); - ASSERT(r == 0); - - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - - ASSERT(exit_cb_called == 1); - ASSERT(close_cb_called == 2); /* Once for process once for the pipe. */ - printf("output is: %s", output); - ASSERT(strcmp("hello world\n", output) == 0); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -#if !defined(USING_UV_SHARED) -int make_program_args(char** args, int verbatim_arguments, WCHAR** dst_ptr); -WCHAR* quote_cmd_arg(const WCHAR *source, WCHAR *target); - -TEST_IMPL(argument_escaping) { - const WCHAR* test_str[] = { - L"", - L"HelloWorld", - L"Hello World", - L"Hello\"World", - L"Hello World\\", - L"Hello\\\"World", - L"Hello\\World", - L"Hello\\\\World", - L"Hello World\\", - L"c:\\path\\to\\node.exe --eval \"require('c:\\\\path\\\\to\\\\test.js')\"" - }; - const int count = sizeof(test_str) / sizeof(*test_str); - WCHAR** test_output; - WCHAR* command_line; - WCHAR** cracked; - size_t total_size = 0; - int i; - int num_args; - int result; - - char* verbatim[] = { - "cmd.exe", - "/c", - "c:\\path\\to\\node.exe --eval \"require('c:\\\\path\\\\to\\\\test.js')\"", - NULL - }; - WCHAR* verbatim_output; - WCHAR* non_verbatim_output; - - test_output = calloc(count, sizeof(WCHAR*)); - ASSERT(test_output != NULL); - for (i = 0; i < count; ++i) { - test_output[i] = calloc(2 * (wcslen(test_str[i]) + 2), sizeof(WCHAR)); - quote_cmd_arg(test_str[i], test_output[i]); - wprintf(L"input : %s\n", test_str[i]); - wprintf(L"output: %s\n", test_output[i]); - total_size += wcslen(test_output[i]) + 1; - } - command_line = calloc(total_size + 1, sizeof(WCHAR)); - ASSERT(command_line != NULL); - for (i = 0; i < count; ++i) { - wcscat(command_line, test_output[i]); - wcscat(command_line, L" "); - } - command_line[total_size - 1] = L'\0'; - - wprintf(L"command_line: %s\n", command_line); - - cracked = CommandLineToArgvW(command_line, &num_args); - for (i = 0; i < num_args; ++i) { - wprintf(L"%d: %s\t%s\n", i, test_str[i], cracked[i]); - ASSERT(wcscmp(test_str[i], cracked[i]) == 0); - } - - LocalFree(cracked); - for (i = 0; i < count; ++i) { - free(test_output[i]); - } - - result = make_program_args(verbatim, 1, &verbatim_output); - ASSERT(result == 0); - result = make_program_args(verbatim, 0, &non_verbatim_output); - ASSERT(result == 0); - - wprintf(L" verbatim_output: %s\n", verbatim_output); - wprintf(L"non_verbatim_output: %s\n", non_verbatim_output); - - ASSERT(wcscmp(verbatim_output, - L"cmd.exe /c c:\\path\\to\\node.exe --eval " - L"\"require('c:\\\\path\\\\to\\\\test.js')\"") == 0); - ASSERT(wcscmp(non_verbatim_output, - L"cmd.exe /c \"c:\\path\\to\\node.exe --eval " - L"\\\"require('c:\\\\path\\\\to\\\\test.js')\\\"\"") == 0); - - free(verbatim_output); - free(non_verbatim_output); - - return 0; -} - -int make_program_env(char** env_block, WCHAR** dst_ptr); - -TEST_IMPL(environment_creation) { - int i; - char* environment[] = { - "FOO=BAR", - "SYSTEM=ROOT", /* substring of a supplied var name */ - "SYSTEMROOTED=OMG", /* supplied var name is a substring */ - "TEMP=C:\\Temp", - "INVALID", - "BAZ=QUX", - "B_Z=QUX", - "B\xe2\x82\xacZ=QUX", - "B\xf0\x90\x80\x82Z=QUX", - "B\xef\xbd\xa1Z=QUX", - "B\xf0\xa3\x91\x96Z=QUX", - "BAZ", /* repeat, invalid variable */ - NULL - }; - WCHAR* wenvironment[] = { - L"BAZ=QUX", - L"B_Z=QUX", - L"B\x20acZ=QUX", - L"B\xd800\xdc02Z=QUX", - L"B\xd84d\xdc56Z=QUX", - L"B\xff61Z=QUX", - L"FOO=BAR", - L"SYSTEM=ROOT", /* substring of a supplied var name */ - L"SYSTEMROOTED=OMG", /* supplied var name is a substring */ - L"TEMP=C:\\Temp", - }; - WCHAR* from_env[] = { - /* list should be kept in sync with list - * in process.c, minus variables in wenvironment */ - L"HOMEDRIVE", - L"HOMEPATH", - L"LOGONSERVER", - L"PATH", - L"USERDOMAIN", - L"USERNAME", - L"USERPROFILE", - L"SYSTEMDRIVE", - L"SYSTEMROOT", - L"WINDIR", - /* test for behavior in the absence of a - * required-environment variable: */ - L"ZTHIS_ENV_VARIABLE_DOES_NOT_EXIST", - }; - int found_in_loc_env[ARRAY_SIZE(wenvironment)] = {0}; - int found_in_usr_env[ARRAY_SIZE(from_env)] = {0}; - WCHAR *expected[ARRAY_SIZE(from_env)]; - int result; - WCHAR* str; - WCHAR* prev; - WCHAR* env; - - for (i = 0; i < ARRAY_SIZE(from_env); i++) { - /* copy expected additions to environment locally */ - size_t len = GetEnvironmentVariableW(from_env[i], NULL, 0); - if (len == 0) { - found_in_usr_env[i] = 1; - str = malloc(1 * sizeof(WCHAR)); - *str = 0; - expected[i] = str; - } else { - size_t name_len = wcslen(from_env[i]); - str = malloc((name_len+1+len) * sizeof(WCHAR)); - wmemcpy(str, from_env[i], name_len); - expected[i] = str; - str += name_len; - *str++ = L'='; - GetEnvironmentVariableW(from_env[i], str, len); - } - } - - result = make_program_env(environment, &env); - ASSERT(result == 0); - - for (str = env, prev = NULL; *str; prev = str, str += wcslen(str) + 1) { - int found = 0; -#if 0 - _cputws(str); - putchar('\n'); -#endif - for (i = 0; i < ARRAY_SIZE(wenvironment) && !found; i++) { - if (!wcscmp(str, wenvironment[i])) { - ASSERT(!found_in_loc_env[i]); - found_in_loc_env[i] = 1; - found = 1; - } - } - for (i = 0; i < ARRAY_SIZE(expected) && !found; i++) { - if (!wcscmp(str, expected[i])) { - ASSERT(!found_in_usr_env[i]); - found_in_usr_env[i] = 1; - found = 1; - } - } - if (prev) { /* verify sort order -- requires Vista */ -#if _WIN32_WINNT >= 0x0600 && \ - (!defined(__MINGW32__) || defined(__MINGW64_VERSION_MAJOR)) - ASSERT(CompareStringOrdinal(prev, -1, str, -1, TRUE) == 1); -#endif - } - ASSERT(found); /* verify that we expected this variable */ - } - - /* verify that we found all expected variables */ - for (i = 0; i < ARRAY_SIZE(wenvironment); i++) { - ASSERT(found_in_loc_env[i]); - } - for (i = 0; i < ARRAY_SIZE(expected); i++) { - ASSERT(found_in_usr_env[i]); - } - - return 0; -} -#endif - -/* Regression test for issue #909 */ -TEST_IMPL(spawn_with_an_odd_path) { - int r; - - char newpath[2048]; - char *path = getenv("PATH"); - ASSERT(path != NULL); - snprintf(newpath, 2048, ";.;%s", path); - SetEnvironmentVariable("PATH", newpath); - - init_process_options("", exit_cb); - options.file = options.args[0] = "program-that-had-better-not-exist"; - r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT(r == UV_ENOENT || r == UV_EACCES); - ASSERT(0 == uv_is_active((uv_handle_t*) &process)); - uv_close((uv_handle_t*) &process, NULL); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - - MAKE_VALGRIND_HAPPY(); - return 0; -} -#endif - -#ifndef _WIN32 -TEST_IMPL(spawn_setuid_setgid) { - int r; - struct passwd* pw; - - /* if not root, then this will fail. */ - uv_uid_t uid = getuid(); - if (uid != 0) { - fprintf(stderr, "spawn_setuid_setgid skipped: not root\n"); - return 0; - } - - init_process_options("spawn_helper1", exit_cb); - - /* become the "nobody" user. */ - pw = getpwnam("nobody"); - ASSERT(pw != NULL); - options.uid = pw->pw_uid; - options.gid = pw->pw_gid; - options.flags = UV_PROCESS_SETUID | UV_PROCESS_SETGID; - - r = uv_spawn(uv_default_loop(), &process, &options); - if (r == UV_EACCES) - RETURN_SKIP("user 'nobody' cannot access the test runner"); - - ASSERT(r == 0); - - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - - ASSERT(exit_cb_called == 1); - ASSERT(close_cb_called == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} -#endif - - -#ifndef _WIN32 -TEST_IMPL(spawn_setuid_fails) { - int r; - - /* if root, become nobody. */ - uv_uid_t uid = getuid(); - if (uid == 0) { - struct passwd* pw; - pw = getpwnam("nobody"); - ASSERT(pw != NULL); - ASSERT(0 == setgid(pw->pw_gid)); - ASSERT(0 == setuid(pw->pw_uid)); - } - - init_process_options("spawn_helper1", fail_cb); - - options.flags |= UV_PROCESS_SETUID; - options.uid = 0; - - r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT(r == UV_EPERM); - - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - - ASSERT(close_cb_called == 0); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(spawn_setgid_fails) { - int r; - - /* if root, become nobody. */ - uv_uid_t uid = getuid(); - if (uid == 0) { - struct passwd* pw; - pw = getpwnam("nobody"); - ASSERT(pw != NULL); - ASSERT(0 == setgid(pw->pw_gid)); - ASSERT(0 == setuid(pw->pw_uid)); - } - - init_process_options("spawn_helper1", fail_cb); - - options.flags |= UV_PROCESS_SETGID; - options.gid = 0; - - r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT(r == UV_EPERM); - - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - - ASSERT(close_cb_called == 0); - - MAKE_VALGRIND_HAPPY(); - return 0; -} -#endif - - -#ifdef _WIN32 - -static void exit_cb_unexpected(uv_process_t* process, - int64_t exit_status, - int term_signal) { - ASSERT(0 && "should not have been called"); -} - - -TEST_IMPL(spawn_setuid_fails) { - int r; - - init_process_options("spawn_helper1", exit_cb_unexpected); - - options.flags |= UV_PROCESS_SETUID; - options.uid = (uv_uid_t) -42424242; - - r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT(r == UV_ENOTSUP); - - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - - ASSERT(close_cb_called == 0); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(spawn_setgid_fails) { - int r; - - init_process_options("spawn_helper1", exit_cb_unexpected); - - options.flags |= UV_PROCESS_SETGID; - options.gid = (uv_gid_t) -42424242; - - r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT(r == UV_ENOTSUP); - - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - - ASSERT(close_cb_called == 0); - - MAKE_VALGRIND_HAPPY(); - return 0; -} -#endif - - -TEST_IMPL(spawn_auto_unref) { - init_process_options("spawn_helper1", NULL); - ASSERT(0 == uv_spawn(uv_default_loop(), &process, &options)); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - ASSERT(0 == uv_is_closing((uv_handle_t*) &process)); - uv_close((uv_handle_t*) &process, NULL); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - ASSERT(1 == uv_is_closing((uv_handle_t*) &process)); - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -#ifndef _WIN32 -TEST_IMPL(spawn_fs_open) { - int fd; - uv_fs_t fs_req; - uv_pipe_t in; - uv_write_t write_req; - uv_buf_t buf; - uv_stdio_container_t stdio[1]; - - fd = uv_fs_open(NULL, &fs_req, "/dev/null", O_RDWR, 0, NULL); - ASSERT(fd >= 0); - uv_fs_req_cleanup(&fs_req); - - init_process_options("spawn_helper8", exit_cb); - - ASSERT(0 == uv_pipe_init(uv_default_loop(), &in, 0)); - - options.stdio = stdio; - options.stdio[0].flags = UV_CREATE_PIPE | UV_READABLE_PIPE; - options.stdio[0].data.stream = (uv_stream_t*) ∈ - options.stdio_count = 1; - - ASSERT(0 == uv_spawn(uv_default_loop(), &process, &options)); - - buf = uv_buf_init((char*) &fd, sizeof(fd)); - ASSERT(0 == uv_write(&write_req, (uv_stream_t*) &in, &buf, 1, write_cb)); - - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - ASSERT(0 == uv_fs_close(NULL, &fs_req, fd, NULL)); - - ASSERT(exit_cb_called == 1); - ASSERT(close_cb_called == 2); /* One for `in`, one for process */ - - MAKE_VALGRIND_HAPPY(); - return 0; -} -#endif /* !_WIN32 */ - - -#ifndef _WIN32 -TEST_IMPL(closed_fd_events) { - uv_stdio_container_t stdio[3]; - uv_pipe_t pipe_handle; - int fd[2]; - - /* create a pipe and share it with a child process */ - ASSERT(0 == pipe(fd)); - - /* spawn_helper4 blocks indefinitely. */ - init_process_options("spawn_helper4", exit_cb); - options.stdio_count = 3; - options.stdio = stdio; - options.stdio[0].flags = UV_INHERIT_FD; - options.stdio[0].data.fd = fd[0]; - options.stdio[1].flags = UV_IGNORE; - options.stdio[2].flags = UV_IGNORE; - - ASSERT(0 == uv_spawn(uv_default_loop(), &process, &options)); - uv_unref((uv_handle_t*) &process); - - /* read from the pipe with uv */ - ASSERT(0 == uv_pipe_init(uv_default_loop(), &pipe_handle, 0)); - ASSERT(0 == uv_pipe_open(&pipe_handle, fd[0])); - fd[0] = -1; - - ASSERT(0 == uv_read_start((uv_stream_t*) &pipe_handle, on_alloc, on_read_once)); - - ASSERT(1 == write(fd[1], "", 1)); - - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_ONCE)); - - /* should have received just one byte */ - ASSERT(output_used == 1); - - /* close the pipe and see if we still get events */ - uv_close((uv_handle_t*) &pipe_handle, close_cb); - - ASSERT(1 == write(fd[1], "", 1)); - - ASSERT(0 == uv_timer_init(uv_default_loop(), &timer)); - ASSERT(0 == uv_timer_start(&timer, timer_counter_cb, 10, 0)); - - /* see if any spurious events interrupt the timer */ - if (1 == uv_run(uv_default_loop(), UV_RUN_ONCE)) - /* have to run again to really trigger the timer */ - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_ONCE)); - - ASSERT(timer_counter == 1); - - /* cleanup */ - ASSERT(0 == uv_process_kill(&process, /* SIGTERM */ 15)); - ASSERT(0 == close(fd[1])); - - MAKE_VALGRIND_HAPPY(); - return 0; -} -#endif /* !_WIN32 */ - -TEST_IMPL(spawn_reads_child_path) { - int r; - int len; - char file[64]; - char path[1024]; - char* env[3]; - - /* Need to carry over the dynamic linker path when the test runner is - * linked against libuv.so, see https://github.com/libuv/libuv/issues/85. - */ -#if defined(__APPLE__) - static const char dyld_path_var[] = "DYLD_LIBRARY_PATH"; -#else - static const char dyld_path_var[] = "LD_LIBRARY_PATH"; -#endif - - /* Set up the process, but make sure that the file to run is relative and */ - /* requires a lookup into PATH */ - init_process_options("spawn_helper1", exit_cb); - - /* Set up the PATH env variable */ - for (len = strlen(exepath); - exepath[len - 1] != '/' && exepath[len - 1] != '\\'; - len--); - strcpy(file, exepath + len); - exepath[len] = 0; - strcpy(path, "PATH="); - strcpy(path + 5, exepath); - - env[0] = path; - env[1] = getenv(dyld_path_var); - env[2] = NULL; - - if (env[1] != NULL) { - static char buf[1024 + sizeof(dyld_path_var)]; - snprintf(buf, sizeof(buf), "%s=%s", dyld_path_var, env[1]); - env[1] = buf; - } - - options.file = file; - options.args[0] = file; - options.env = env; - - r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT(r == 0); - - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - - ASSERT(exit_cb_called == 1); - ASSERT(close_cb_called == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - -#ifndef _WIN32 -static int mpipe(int *fds) { - if (pipe(fds) == -1) - return -1; - if (fcntl(fds[0], F_SETFD, FD_CLOEXEC) == -1 || - fcntl(fds[1], F_SETFD, FD_CLOEXEC) == -1) { - close(fds[0]); - close(fds[1]); - return -1; - } - return 0; -} -#else -static int mpipe(int *fds) { - SECURITY_ATTRIBUTES attr; - HANDLE readh, writeh; - attr.nLength = sizeof(attr); - attr.lpSecurityDescriptor = NULL; - attr.bInheritHandle = FALSE; - if (!CreatePipe(&readh, &writeh, &attr, 0)) - return -1; - fds[0] = _open_osfhandle((intptr_t)readh, 0); - fds[1] = _open_osfhandle((intptr_t)writeh, 0); - if (fds[0] == -1 || fds[1] == -1) { - CloseHandle(readh); - CloseHandle(writeh); - return -1; - } - return 0; -} -#endif /* !_WIN32 */ - -TEST_IMPL(spawn_inherit_streams) { - uv_process_t child_req; - uv_stdio_container_t child_stdio[2]; - int fds_stdin[2]; - int fds_stdout[2]; - uv_pipe_t pipe_stdin_child; - uv_pipe_t pipe_stdout_child; - uv_pipe_t pipe_stdin_parent; - uv_pipe_t pipe_stdout_parent; - unsigned char ubuf[OUTPUT_SIZE - 1]; - uv_buf_t buf; - unsigned int i; - int r; - uv_write_t write_req; - uv_loop_t* loop; - - init_process_options("spawn_helper9", exit_cb); - - loop = uv_default_loop(); - ASSERT(uv_pipe_init(loop, &pipe_stdin_child, 0) == 0); - ASSERT(uv_pipe_init(loop, &pipe_stdout_child, 0) == 0); - ASSERT(uv_pipe_init(loop, &pipe_stdin_parent, 0) == 0); - ASSERT(uv_pipe_init(loop, &pipe_stdout_parent, 0) == 0); - - ASSERT(mpipe(fds_stdin) != -1); - ASSERT(mpipe(fds_stdout) != -1); - - ASSERT(uv_pipe_open(&pipe_stdin_child, fds_stdin[0]) == 0); - ASSERT(uv_pipe_open(&pipe_stdout_child, fds_stdout[1]) == 0); - ASSERT(uv_pipe_open(&pipe_stdin_parent, fds_stdin[1]) == 0); - ASSERT(uv_pipe_open(&pipe_stdout_parent, fds_stdout[0]) == 0); - - child_stdio[0].flags = UV_INHERIT_STREAM; - child_stdio[0].data.stream = (uv_stream_t *)&pipe_stdin_child; - - child_stdio[1].flags = UV_INHERIT_STREAM; - child_stdio[1].data.stream = (uv_stream_t *)&pipe_stdout_child; - - options.stdio = child_stdio; - options.stdio_count = 2; - - ASSERT(uv_spawn(loop, &child_req, &options) == 0); - - uv_close((uv_handle_t*)&pipe_stdin_child, NULL); - uv_close((uv_handle_t*)&pipe_stdout_child, NULL); - - buf = uv_buf_init((char*)ubuf, sizeof ubuf); - for (i = 0; i < sizeof ubuf; ++i) - ubuf[i] = i & 255u; - memset(output, 0, sizeof ubuf); - - r = uv_write(&write_req, - (uv_stream_t*)&pipe_stdin_parent, - &buf, - 1, - write_cb); - ASSERT(r == 0); - - r = uv_read_start((uv_stream_t*)&pipe_stdout_parent, on_alloc, on_read); - ASSERT(r == 0); - - r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT(r == 0); - - ASSERT(exit_cb_called == 1); - ASSERT(close_cb_called == 3); - - r = memcmp(ubuf, output, sizeof ubuf); - ASSERT(r == 0); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - -/* Helper for child process of spawn_inherit_streams */ -#ifndef _WIN32 -int spawn_stdin_stdout(void) { - char buf[1024]; - char* pbuf; - for (;;) { - ssize_t r, w, c; - do { - r = read(0, buf, sizeof buf); - } while (r == -1 && errno == EINTR); - if (r == 0) { - return 1; - } - ASSERT(r > 0); - c = r; - pbuf = buf; - while (c) { - do { - w = write(1, pbuf, (size_t)c); - } while (w == -1 && errno == EINTR); - ASSERT(w >= 0); - pbuf = pbuf + w; - c = c - w; - } - } - return 2; -} -#else -int spawn_stdin_stdout(void) { - char buf[1024]; - char* pbuf; - HANDLE h_stdin = GetStdHandle(STD_INPUT_HANDLE); - HANDLE h_stdout = GetStdHandle(STD_OUTPUT_HANDLE); - ASSERT(h_stdin != INVALID_HANDLE_VALUE); - ASSERT(h_stdout != INVALID_HANDLE_VALUE); - for (;;) { - DWORD n_read; - DWORD n_written; - DWORD to_write; - if (!ReadFile(h_stdin, buf, sizeof buf, &n_read, NULL)) { - ASSERT(GetLastError() == ERROR_BROKEN_PIPE); - return 1; - } - to_write = n_read; - pbuf = buf; - while (to_write) { - ASSERT(WriteFile(h_stdout, pbuf, to_write, &n_written, NULL)); - to_write -= n_written; - pbuf += n_written; - } - } - return 2; -} -#endif /* !_WIN32 */ diff --git a/outside/libuv-v1.7.5/test/test-stdio-over-pipes.c b/outside/libuv-v1.7.5/test/test-stdio-over-pipes.c deleted file mode 100644 index 157447610..000000000 --- a/outside/libuv-v1.7.5/test/test-stdio-over-pipes.c +++ /dev/null @@ -1,255 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#include -#include - - -static char exepath[1024]; -static size_t exepath_size = 1024; -static char* args[3]; -static uv_process_options_t options; -static int close_cb_called; -static int exit_cb_called; -static int on_read_cb_called; -static int after_write_cb_called; -static uv_pipe_t in; -static uv_pipe_t out; -static uv_loop_t* loop; -#define OUTPUT_SIZE 1024 -static char output[OUTPUT_SIZE]; -static int output_used; - - -static void close_cb(uv_handle_t* handle) { - close_cb_called++; -} - - -static void exit_cb(uv_process_t* process, - int64_t exit_status, - int term_signal) { - printf("exit_cb\n"); - exit_cb_called++; - ASSERT(exit_status == 0); - ASSERT(term_signal == 0); - uv_close((uv_handle_t*)process, close_cb); - uv_close((uv_handle_t*)&in, close_cb); - uv_close((uv_handle_t*)&out, close_cb); -} - - -static void init_process_options(char* test, uv_exit_cb exit_cb) { - int r = uv_exepath(exepath, &exepath_size); - ASSERT(r == 0); - exepath[exepath_size] = '\0'; - args[0] = exepath; - args[1] = test; - args[2] = NULL; - options.file = exepath; - options.args = args; - options.exit_cb = exit_cb; -} - - -static void on_alloc(uv_handle_t* handle, - size_t suggested_size, - uv_buf_t* buf) { - buf->base = output + output_used; - buf->len = OUTPUT_SIZE - output_used; -} - - -static void after_write(uv_write_t* req, int status) { - if (status) { - fprintf(stderr, "uv_write error: %s\n", uv_strerror(status)); - ASSERT(0); - } - - /* Free the read/write buffer and the request */ - free(req); - - after_write_cb_called++; -} - - -static void on_read(uv_stream_t* tcp, ssize_t nread, const uv_buf_t* rdbuf) { - uv_write_t* req; - uv_buf_t wrbuf; - int r; - - ASSERT(nread > 0 || nread == UV_EOF); - - if (nread > 0) { - output_used += nread; - if (output_used == 12) { - ASSERT(memcmp("hello world\n", output, 12) == 0); - wrbuf = uv_buf_init(output, output_used); - req = malloc(sizeof(*req)); - r = uv_write(req, (uv_stream_t*)&in, &wrbuf, 1, after_write); - ASSERT(r == 0); - } - } - - on_read_cb_called++; -} - - -TEST_IMPL(stdio_over_pipes) { - int r; - uv_process_t process; - uv_stdio_container_t stdio[2]; - - loop = uv_default_loop(); - - init_process_options("stdio_over_pipes_helper", exit_cb); - - uv_pipe_init(loop, &out, 0); - uv_pipe_init(loop, &in, 0); - - options.stdio = stdio; - options.stdio[0].flags = UV_CREATE_PIPE | UV_READABLE_PIPE; - options.stdio[0].data.stream = (uv_stream_t*)∈ - options.stdio[1].flags = UV_CREATE_PIPE | UV_WRITABLE_PIPE; - options.stdio[1].data.stream = (uv_stream_t*)&out; - options.stdio_count = 2; - - r = uv_spawn(loop, &process, &options); - ASSERT(r == 0); - - r = uv_read_start((uv_stream_t*) &out, on_alloc, on_read); - ASSERT(r == 0); - - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - - ASSERT(on_read_cb_called > 1); - ASSERT(after_write_cb_called == 1); - ASSERT(exit_cb_called == 1); - ASSERT(close_cb_called == 3); - ASSERT(memcmp("hello world\n", output, 12) == 0); - ASSERT(output_used == 12); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -/* Everything here runs in a child process. */ - -static int on_pipe_read_called; -static int after_write_called; -static uv_pipe_t stdin_pipe; -static uv_pipe_t stdout_pipe; - -static void on_pipe_read(uv_stream_t* tcp, ssize_t nread, const uv_buf_t* buf) { - ASSERT(nread > 0); - ASSERT(memcmp("hello world\n", buf->base, nread) == 0); - on_pipe_read_called++; - - free(buf->base); - - uv_close((uv_handle_t*)&stdin_pipe, close_cb); - uv_close((uv_handle_t*)&stdout_pipe, close_cb); -} - - -static void after_pipe_write(uv_write_t* req, int status) { - ASSERT(status == 0); - after_write_called++; -} - - -static void on_read_alloc(uv_handle_t* handle, - size_t suggested_size, - uv_buf_t* buf) { - buf->base = malloc(suggested_size); - buf->len = suggested_size; -} - - -int stdio_over_pipes_helper(void) { - /* Write several buffers to test that the write order is preserved. */ - char* buffers[] = { - "he", - "ll", - "o ", - "wo", - "rl", - "d", - "\n" - }; - - uv_write_t write_req[ARRAY_SIZE(buffers)]; - uv_buf_t buf[ARRAY_SIZE(buffers)]; - unsigned int i; - int r; - uv_loop_t* loop = uv_default_loop(); - - ASSERT(UV_NAMED_PIPE == uv_guess_handle(0)); - ASSERT(UV_NAMED_PIPE == uv_guess_handle(1)); - - r = uv_pipe_init(loop, &stdin_pipe, 0); - ASSERT(r == 0); - r = uv_pipe_init(loop, &stdout_pipe, 0); - ASSERT(r == 0); - - uv_pipe_open(&stdin_pipe, 0); - uv_pipe_open(&stdout_pipe, 1); - - /* Unref both stdio handles to make sure that all writes complete. */ - uv_unref((uv_handle_t*)&stdin_pipe); - uv_unref((uv_handle_t*)&stdout_pipe); - - for (i = 0; i < ARRAY_SIZE(buffers); i++) { - buf[i] = uv_buf_init((char*)buffers[i], strlen(buffers[i])); - } - - for (i = 0; i < ARRAY_SIZE(buffers); i++) { - r = uv_write(&write_req[i], (uv_stream_t*)&stdout_pipe, &buf[i], 1, - after_pipe_write); - ASSERT(r == 0); - } - - uv_run(loop, UV_RUN_DEFAULT); - - ASSERT(after_write_called == 7); - ASSERT(on_pipe_read_called == 0); - ASSERT(close_cb_called == 0); - - uv_ref((uv_handle_t*)&stdout_pipe); - uv_ref((uv_handle_t*)&stdin_pipe); - - r = uv_read_start((uv_stream_t*)&stdin_pipe, on_read_alloc, on_pipe_read); - ASSERT(r == 0); - - uv_run(loop, UV_RUN_DEFAULT); - - ASSERT(after_write_called == 7); - ASSERT(on_pipe_read_called == 1); - ASSERT(close_cb_called == 2); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-tcp-bind-error.c b/outside/libuv-v1.7.5/test/test-tcp-bind-error.c deleted file mode 100644 index 10ed68e10..000000000 --- a/outside/libuv-v1.7.5/test/test-tcp-bind-error.c +++ /dev/null @@ -1,216 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" -#include -#include - - -static int close_cb_called = 0; - - -static void close_cb(uv_handle_t* handle) { - ASSERT(handle != NULL); - close_cb_called++; -} - - -TEST_IMPL(tcp_bind_error_addrinuse) { - struct sockaddr_in addr; - uv_tcp_t server1, server2; - int r; - - ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); - r = uv_tcp_init(uv_default_loop(), &server1); - ASSERT(r == 0); - r = uv_tcp_bind(&server1, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); - - r = uv_tcp_init(uv_default_loop(), &server2); - ASSERT(r == 0); - r = uv_tcp_bind(&server2, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); - - r = uv_listen((uv_stream_t*)&server1, 128, NULL); - ASSERT(r == 0); - r = uv_listen((uv_stream_t*)&server2, 128, NULL); - ASSERT(r == UV_EADDRINUSE); - - uv_close((uv_handle_t*)&server1, close_cb); - uv_close((uv_handle_t*)&server2, close_cb); - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(close_cb_called == 2); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(tcp_bind_error_addrnotavail_1) { - struct sockaddr_in addr; - uv_tcp_t server; - int r; - - ASSERT(0 == uv_ip4_addr("127.255.255.255", TEST_PORT, &addr)); - - r = uv_tcp_init(uv_default_loop(), &server); - ASSERT(r == 0); - - /* It seems that Linux is broken here - bind succeeds. */ - r = uv_tcp_bind(&server, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0 || r == UV_EADDRNOTAVAIL); - - uv_close((uv_handle_t*)&server, close_cb); - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(close_cb_called == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(tcp_bind_error_addrnotavail_2) { - struct sockaddr_in addr; - uv_tcp_t server; - int r; - - ASSERT(0 == uv_ip4_addr("4.4.4.4", TEST_PORT, &addr)); - - r = uv_tcp_init(uv_default_loop(), &server); - ASSERT(r == 0); - r = uv_tcp_bind(&server, (const struct sockaddr*) &addr, 0); - ASSERT(r == UV_EADDRNOTAVAIL); - - uv_close((uv_handle_t*)&server, close_cb); - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(close_cb_called == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(tcp_bind_error_fault) { - char garbage[] = - "blah blah blah blah blah blah blah blah blah blah blah blah"; - struct sockaddr_in* garbage_addr; - uv_tcp_t server; - int r; - - garbage_addr = (struct sockaddr_in*) &garbage; - - r = uv_tcp_init(uv_default_loop(), &server); - ASSERT(r == 0); - r = uv_tcp_bind(&server, (const struct sockaddr*) garbage_addr, 0); - ASSERT(r == UV_EINVAL); - - uv_close((uv_handle_t*)&server, close_cb); - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(close_cb_called == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - -/* Notes: On Linux uv_bind(server, NULL) will segfault the program. */ - -TEST_IMPL(tcp_bind_error_inval) { - struct sockaddr_in addr1; - struct sockaddr_in addr2; - uv_tcp_t server; - int r; - - ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr1)); - ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT_2, &addr2)); - - r = uv_tcp_init(uv_default_loop(), &server); - ASSERT(r == 0); - r = uv_tcp_bind(&server, (const struct sockaddr*) &addr1, 0); - ASSERT(r == 0); - r = uv_tcp_bind(&server, (const struct sockaddr*) &addr2, 0); - ASSERT(r == UV_EINVAL); - - uv_close((uv_handle_t*)&server, close_cb); - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(close_cb_called == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(tcp_bind_localhost_ok) { - struct sockaddr_in addr; - uv_tcp_t server; - int r; - - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - - r = uv_tcp_init(uv_default_loop(), &server); - ASSERT(r == 0); - r = uv_tcp_bind(&server, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(tcp_bind_invalid_flags) { - struct sockaddr_in addr; - uv_tcp_t server; - int r; - - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - - r = uv_tcp_init(uv_default_loop(), &server); - ASSERT(r == 0); - r = uv_tcp_bind(&server, (const struct sockaddr*) &addr, UV_TCP_IPV6ONLY); - ASSERT(r == UV_EINVAL); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(tcp_listen_without_bind) { - int r; - uv_tcp_t server; - - r = uv_tcp_init(uv_default_loop(), &server); - ASSERT(r == 0); - r = uv_listen((uv_stream_t*)&server, 128, NULL); - ASSERT(r == 0); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-tcp-bind6-error.c b/outside/libuv-v1.7.5/test/test-tcp-bind6-error.c deleted file mode 100644 index b762bcb3d..000000000 --- a/outside/libuv-v1.7.5/test/test-tcp-bind6-error.c +++ /dev/null @@ -1,176 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" -#include -#include - - -static int close_cb_called = 0; - - -static void close_cb(uv_handle_t* handle) { - ASSERT(handle != NULL); - close_cb_called++; -} - - -TEST_IMPL(tcp_bind6_error_addrinuse) { - struct sockaddr_in6 addr; - uv_tcp_t server1, server2; - int r; - - if (!can_ipv6()) - RETURN_SKIP("IPv6 not supported"); - - ASSERT(0 == uv_ip6_addr("::", TEST_PORT, &addr)); - - r = uv_tcp_init(uv_default_loop(), &server1); - ASSERT(r == 0); - r = uv_tcp_bind(&server1, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); - - r = uv_tcp_init(uv_default_loop(), &server2); - ASSERT(r == 0); - r = uv_tcp_bind(&server2, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); - - r = uv_listen((uv_stream_t*)&server1, 128, NULL); - ASSERT(r == 0); - r = uv_listen((uv_stream_t*)&server2, 128, NULL); - ASSERT(r == UV_EADDRINUSE); - - uv_close((uv_handle_t*)&server1, close_cb); - uv_close((uv_handle_t*)&server2, close_cb); - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(close_cb_called == 2); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(tcp_bind6_error_addrnotavail) { - struct sockaddr_in6 addr; - uv_tcp_t server; - int r; - - if (!can_ipv6()) - RETURN_SKIP("IPv6 not supported"); - - ASSERT(0 == uv_ip6_addr("4:4:4:4:4:4:4:4", TEST_PORT, &addr)); - - r = uv_tcp_init(uv_default_loop(), &server); - ASSERT(r == 0); - r = uv_tcp_bind(&server, (const struct sockaddr*) &addr, 0); - ASSERT(r == UV_EADDRNOTAVAIL); - - uv_close((uv_handle_t*)&server, close_cb); - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(close_cb_called == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(tcp_bind6_error_fault) { - char garbage[] = - "blah blah blah blah blah blah blah blah blah blah blah blah"; - struct sockaddr_in6* garbage_addr; - uv_tcp_t server; - int r; - - if (!can_ipv6()) - RETURN_SKIP("IPv6 not supported"); - - garbage_addr = (struct sockaddr_in6*) &garbage; - - r = uv_tcp_init(uv_default_loop(), &server); - ASSERT(r == 0); - r = uv_tcp_bind(&server, (const struct sockaddr*) garbage_addr, 0); - ASSERT(r == UV_EINVAL); - - uv_close((uv_handle_t*)&server, close_cb); - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(close_cb_called == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - -/* Notes: On Linux uv_bind6(server, NULL) will segfault the program. */ - -TEST_IMPL(tcp_bind6_error_inval) { - struct sockaddr_in6 addr1; - struct sockaddr_in6 addr2; - uv_tcp_t server; - int r; - - if (!can_ipv6()) - RETURN_SKIP("IPv6 not supported"); - - ASSERT(0 == uv_ip6_addr("::", TEST_PORT, &addr1)); - ASSERT(0 == uv_ip6_addr("::", TEST_PORT_2, &addr2)); - - r = uv_tcp_init(uv_default_loop(), &server); - ASSERT(r == 0); - r = uv_tcp_bind(&server, (const struct sockaddr*) &addr1, 0); - ASSERT(r == 0); - r = uv_tcp_bind(&server, (const struct sockaddr*) &addr2, 0); - ASSERT(r == UV_EINVAL); - - uv_close((uv_handle_t*)&server, close_cb); - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(close_cb_called == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(tcp_bind6_localhost_ok) { - struct sockaddr_in6 addr; - uv_tcp_t server; - int r; - - if (!can_ipv6()) - RETURN_SKIP("IPv6 not supported"); - - ASSERT(0 == uv_ip6_addr("::1", TEST_PORT, &addr)); - - r = uv_tcp_init(uv_default_loop(), &server); - ASSERT(r == 0); - r = uv_tcp_bind(&server, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-tcp-close-accept.c b/outside/libuv-v1.7.5/test/test-tcp-close-accept.c deleted file mode 100644 index 5517aaf99..000000000 --- a/outside/libuv-v1.7.5/test/test-tcp-close-accept.c +++ /dev/null @@ -1,188 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -/* this test is Unix only */ -#ifndef _WIN32 - -#include "uv.h" -#include "task.h" - -#include -#include - -static struct sockaddr_in addr; -static uv_tcp_t tcp_server; -static uv_tcp_t tcp_outgoing[2]; -static uv_tcp_t tcp_incoming[ARRAY_SIZE(tcp_outgoing)]; -static uv_connect_t connect_reqs[ARRAY_SIZE(tcp_outgoing)]; -static uv_tcp_t tcp_check; -static uv_connect_t tcp_check_req; -static uv_write_t write_reqs[ARRAY_SIZE(tcp_outgoing)]; -static unsigned int got_connections; -static unsigned int close_cb_called; -static unsigned int write_cb_called; -static unsigned int read_cb_called; - -static void close_cb(uv_handle_t* handle) { - close_cb_called++; -} - -static void write_cb(uv_write_t* req, int status) { - ASSERT(status == 0); - write_cb_called++; -} - -static void connect_cb(uv_connect_t* req, int status) { - unsigned int i; - uv_buf_t buf; - uv_stream_t* outgoing; - - if (req == &tcp_check_req) { - ASSERT(status != 0); - - /* Close check and incoming[0], time to finish test */ - uv_close((uv_handle_t*) &tcp_incoming[0], close_cb); - uv_close((uv_handle_t*) &tcp_check, close_cb); - return; - } - - ASSERT(status == 0); - ASSERT(connect_reqs <= req); - ASSERT(req <= connect_reqs + ARRAY_SIZE(connect_reqs)); - i = req - connect_reqs; - - buf = uv_buf_init("x", 1); - outgoing = (uv_stream_t*) &tcp_outgoing[i]; - ASSERT(0 == uv_write(&write_reqs[i], outgoing, &buf, 1, write_cb)); -} - -static void alloc_cb(uv_handle_t* handle, size_t size, uv_buf_t* buf) { - static char slab[1]; - buf->base = slab; - buf->len = sizeof(slab); -} - -static void read_cb(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf) { - uv_loop_t* loop; - unsigned int i; - - /* Only first stream should receive read events */ - ASSERT(stream == (uv_stream_t*) &tcp_incoming[0]); - ASSERT(0 == uv_read_stop(stream)); - ASSERT(1 == nread); - - loop = stream->loop; - read_cb_called++; - - /* Close all active incomings, except current one */ - for (i = 1; i < got_connections; i++) - uv_close((uv_handle_t*) &tcp_incoming[i], close_cb); - - /* Create new fd that should be one of the closed incomings */ - ASSERT(0 == uv_tcp_init(loop, &tcp_check)); - ASSERT(0 == uv_tcp_connect(&tcp_check_req, - &tcp_check, - (const struct sockaddr*) &addr, - connect_cb)); - ASSERT(0 == uv_read_start((uv_stream_t*) &tcp_check, alloc_cb, read_cb)); - - /* Close server, so no one will connect to it */ - uv_close((uv_handle_t*) &tcp_server, close_cb); -} - -static void connection_cb(uv_stream_t* server, int status) { - unsigned int i; - uv_tcp_t* incoming; - - ASSERT(server == (uv_stream_t*) &tcp_server); - - /* Ignore tcp_check connection */ - if (got_connections == ARRAY_SIZE(tcp_incoming)) - return; - - /* Accept everyone */ - incoming = &tcp_incoming[got_connections++]; - ASSERT(0 == uv_tcp_init(server->loop, incoming)); - ASSERT(0 == uv_accept(server, (uv_stream_t*) incoming)); - - if (got_connections != ARRAY_SIZE(tcp_incoming)) - return; - - /* Once all clients are accepted - start reading */ - for (i = 0; i < ARRAY_SIZE(tcp_incoming); i++) { - incoming = &tcp_incoming[i]; - ASSERT(0 == uv_read_start((uv_stream_t*) incoming, alloc_cb, read_cb)); - } -} - -TEST_IMPL(tcp_close_accept) { - unsigned int i; - uv_loop_t* loop; - uv_tcp_t* client; - - /* - * A little explanation of what goes on below: - * - * We'll create server and connect to it using two clients, each writing one - * byte once connected. - * - * When all clients will be accepted by server - we'll start reading from them - * and, on first client's first byte, will close second client and server. - * After that, we'll immediately initiate new connection to server using - * tcp_check handle (thus, reusing fd from second client). - * - * In this situation uv__io_poll()'s event list should still contain read - * event for second client, and, if not cleaned up properly, `tcp_check` will - * receive stale event of second incoming and invoke `connect_cb` with zero - * status. - */ - - loop = uv_default_loop(); - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - - ASSERT(0 == uv_tcp_init(loop, &tcp_server)); - ASSERT(0 == uv_tcp_bind(&tcp_server, (const struct sockaddr*) &addr, 0)); - ASSERT(0 == uv_listen((uv_stream_t*) &tcp_server, - ARRAY_SIZE(tcp_outgoing), - connection_cb)); - - for (i = 0; i < ARRAY_SIZE(tcp_outgoing); i++) { - client = tcp_outgoing + i; - - ASSERT(0 == uv_tcp_init(loop, client)); - ASSERT(0 == uv_tcp_connect(&connect_reqs[i], - client, - (const struct sockaddr*) &addr, - connect_cb)); - } - - uv_run(loop, UV_RUN_DEFAULT); - - ASSERT(ARRAY_SIZE(tcp_outgoing) == got_connections); - ASSERT((ARRAY_SIZE(tcp_outgoing) + 2) == close_cb_called); - ASSERT(ARRAY_SIZE(tcp_outgoing) == write_cb_called); - ASSERT(1 == read_cb_called); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - -#endif /* !_WIN32 */ diff --git a/outside/libuv-v1.7.5/test/test-tcp-close-while-connecting.c b/outside/libuv-v1.7.5/test/test-tcp-close-while-connecting.c deleted file mode 100644 index 2c39b652b..000000000 --- a/outside/libuv-v1.7.5/test/test-tcp-close-while-connecting.c +++ /dev/null @@ -1,86 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -static uv_timer_t timer1_handle; -static uv_timer_t timer2_handle; -static uv_tcp_t tcp_handle; - -static int connect_cb_called; -static int timer1_cb_called; -static int close_cb_called; - - -static void close_cb(uv_handle_t* handle) { - close_cb_called++; -} - - -static void connect_cb(uv_connect_t* req, int status) { - ASSERT(status == UV_ECANCELED); - uv_timer_stop(&timer2_handle); - connect_cb_called++; -} - - -static void timer1_cb(uv_timer_t* handle) { - uv_close((uv_handle_t*)handle, close_cb); - uv_close((uv_handle_t*)&tcp_handle, close_cb); - timer1_cb_called++; -} - - -static void timer2_cb(uv_timer_t* handle) { - ASSERT(0 && "should not be called"); -} - - -TEST_IMPL(tcp_close_while_connecting) { - uv_connect_t connect_req; - struct sockaddr_in addr; - uv_loop_t* loop; - int r; - - loop = uv_default_loop(); - ASSERT(0 == uv_ip4_addr("1.2.3.4", TEST_PORT, &addr)); - ASSERT(0 == uv_tcp_init(loop, &tcp_handle)); - r = uv_tcp_connect(&connect_req, - &tcp_handle, - (const struct sockaddr*) &addr, - connect_cb); - if (r == UV_ENETUNREACH) - RETURN_SKIP("Network unreachable."); - ASSERT(r == 0); - ASSERT(0 == uv_timer_init(loop, &timer1_handle)); - ASSERT(0 == uv_timer_start(&timer1_handle, timer1_cb, 50, 0)); - ASSERT(0 == uv_timer_init(loop, &timer2_handle)); - ASSERT(0 == uv_timer_start(&timer2_handle, timer2_cb, 86400 * 1000, 0)); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - - ASSERT(connect_cb_called == 1); - ASSERT(timer1_cb_called == 1); - ASSERT(close_cb_called == 2); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-tcp-close.c b/outside/libuv-v1.7.5/test/test-tcp-close.c deleted file mode 100644 index e65885aa5..000000000 --- a/outside/libuv-v1.7.5/test/test-tcp-close.c +++ /dev/null @@ -1,136 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#include -#include /* memset */ - -#define NUM_WRITE_REQS 32 - -static uv_tcp_t tcp_handle; -static uv_connect_t connect_req; - -static int write_cb_called; -static int close_cb_called; - -static void connect_cb(uv_connect_t* req, int status); -static void write_cb(uv_write_t* req, int status); -static void close_cb(uv_handle_t* handle); - - -static void connect_cb(uv_connect_t* conn_req, int status) { - uv_write_t* req; - uv_buf_t buf; - int i, r; - - buf = uv_buf_init("PING", 4); - for (i = 0; i < NUM_WRITE_REQS; i++) { - req = malloc(sizeof *req); - ASSERT(req != NULL); - - r = uv_write(req, (uv_stream_t*)&tcp_handle, &buf, 1, write_cb); - ASSERT(r == 0); - } - - uv_close((uv_handle_t*)&tcp_handle, close_cb); -} - - -static void write_cb(uv_write_t* req, int status) { - /* write callbacks should run before the close callback */ - ASSERT(close_cb_called == 0); - ASSERT(req->handle == (uv_stream_t*)&tcp_handle); - write_cb_called++; - free(req); -} - - -static void close_cb(uv_handle_t* handle) { - ASSERT(handle == (uv_handle_t*)&tcp_handle); - close_cb_called++; -} - - -static void connection_cb(uv_stream_t* server, int status) { - ASSERT(status == 0); -} - - -static void start_server(uv_loop_t* loop, uv_tcp_t* handle) { - struct sockaddr_in addr; - int r; - - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - - r = uv_tcp_init(loop, handle); - ASSERT(r == 0); - - r = uv_tcp_bind(handle, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); - - r = uv_listen((uv_stream_t*)handle, 128, connection_cb); - ASSERT(r == 0); - - uv_unref((uv_handle_t*)handle); -} - - -/* Check that pending write requests have their callbacks - * invoked when the handle is closed. - */ -TEST_IMPL(tcp_close) { - struct sockaddr_in addr; - uv_tcp_t tcp_server; - uv_loop_t* loop; - int r; - - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - - loop = uv_default_loop(); - - /* We can't use the echo server, it doesn't handle ECONNRESET. */ - start_server(loop, &tcp_server); - - r = uv_tcp_init(loop, &tcp_handle); - ASSERT(r == 0); - - r = uv_tcp_connect(&connect_req, - &tcp_handle, - (const struct sockaddr*) &addr, - connect_cb); - ASSERT(r == 0); - - ASSERT(write_cb_called == 0); - ASSERT(close_cb_called == 0); - - r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT(r == 0); - - printf("%d of %d write reqs seen\n", write_cb_called, NUM_WRITE_REQS); - - ASSERT(write_cb_called == NUM_WRITE_REQS); - ASSERT(close_cb_called == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-tcp-connect-error-after-write.c b/outside/libuv-v1.7.5/test/test-tcp-connect-error-after-write.c deleted file mode 100644 index 3f2e3572d..000000000 --- a/outside/libuv-v1.7.5/test/test-tcp-connect-error-after-write.c +++ /dev/null @@ -1,98 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#include -#include -#include - -static int connect_cb_called; -static int write_cb_called; -static int close_cb_called; - - -static void close_cb(uv_handle_t* handle) { - close_cb_called++; -} - - -static void connect_cb(uv_connect_t* req, int status) { - ASSERT(status < 0); - connect_cb_called++; - uv_close((uv_handle_t*)req->handle, close_cb); -} - - -static void write_cb(uv_write_t* req, int status) { - ASSERT(status < 0); - write_cb_called++; -} - - -/* - * Try to connect to an address on which nothing listens, get ECONNREFUSED - * (uv errno 12) and get connect_cb() called once with status != 0. - * Related issue: https://github.com/joyent/libuv/issues/443 - */ -TEST_IMPL(tcp_connect_error_after_write) { - uv_connect_t connect_req; - struct sockaddr_in addr; - uv_write_t write_req; - uv_tcp_t conn; - uv_buf_t buf; - int r; - -#ifdef _WIN32 - fprintf(stderr, "This test is disabled on Windows for now.\n"); - fprintf(stderr, "See https://github.com/joyent/libuv/issues/444\n"); - return 0; /* windows slackers... */ -#endif - - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - buf = uv_buf_init("TEST", 4); - - r = uv_tcp_init(uv_default_loop(), &conn); - ASSERT(r == 0); - - r = uv_write(&write_req, (uv_stream_t*)&conn, &buf, 1, write_cb); - ASSERT(r == UV_EBADF); - - r = uv_tcp_connect(&connect_req, - &conn, - (const struct sockaddr*) &addr, - connect_cb); - ASSERT(r == 0); - - r = uv_write(&write_req, (uv_stream_t*)&conn, &buf, 1, write_cb); - ASSERT(r == 0); - - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - - ASSERT(connect_cb_called == 1); - ASSERT(write_cb_called == 1); - ASSERT(close_cb_called == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-tcp-connect-error.c b/outside/libuv-v1.7.5/test/test-tcp-connect-error.c deleted file mode 100644 index eab1eeb25..000000000 --- a/outside/libuv-v1.7.5/test/test-tcp-connect-error.c +++ /dev/null @@ -1,73 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" -#include -#include - - -static int connect_cb_called = 0; -static int close_cb_called = 0; - - - -static void connect_cb(uv_connect_t* handle, int status) { - ASSERT(handle != NULL); - connect_cb_called++; -} - - - -static void close_cb(uv_handle_t* handle) { - ASSERT(handle != NULL); - close_cb_called++; -} - - -TEST_IMPL(tcp_connect_error_fault) { - const char garbage[] = - "blah blah blah blah blah blah blah blah blah blah blah blah"; - const struct sockaddr_in* garbage_addr; - uv_tcp_t server; - int r; - uv_connect_t req; - - garbage_addr = (const struct sockaddr_in*) &garbage; - - r = uv_tcp_init(uv_default_loop(), &server); - ASSERT(r == 0); - r = uv_tcp_connect(&req, - &server, - (const struct sockaddr*) garbage_addr, - connect_cb); - ASSERT(r == UV_EINVAL); - - uv_close((uv_handle_t*)&server, close_cb); - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(connect_cb_called == 0); - ASSERT(close_cb_called == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-tcp-connect-timeout.c b/outside/libuv-v1.7.5/test/test-tcp-connect-timeout.c deleted file mode 100644 index 081424b80..000000000 --- a/outside/libuv-v1.7.5/test/test-tcp-connect-timeout.c +++ /dev/null @@ -1,91 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" -#include -#include - - -static int connect_cb_called; -static int close_cb_called; - -static uv_connect_t connect_req; -static uv_timer_t timer; -static uv_tcp_t conn; - -static void connect_cb(uv_connect_t* req, int status); -static void timer_cb(uv_timer_t* handle); -static void close_cb(uv_handle_t* handle); - - -static void connect_cb(uv_connect_t* req, int status) { - ASSERT(req == &connect_req); - ASSERT(status == UV_ECANCELED); - connect_cb_called++; -} - - -static void timer_cb(uv_timer_t* handle) { - ASSERT(handle == &timer); - uv_close((uv_handle_t*)&conn, close_cb); - uv_close((uv_handle_t*)&timer, close_cb); -} - - -static void close_cb(uv_handle_t* handle) { - ASSERT(handle == (uv_handle_t*)&conn || handle == (uv_handle_t*)&timer); - close_cb_called++; -} - - -/* Verify that connecting to an unreachable address or port doesn't hang - * the event loop. - */ -TEST_IMPL(tcp_connect_timeout) { - struct sockaddr_in addr; - int r; - - ASSERT(0 == uv_ip4_addr("8.8.8.8", 9999, &addr)); - - r = uv_timer_init(uv_default_loop(), &timer); - ASSERT(r == 0); - - r = uv_timer_start(&timer, timer_cb, 50, 0); - ASSERT(r == 0); - - r = uv_tcp_init(uv_default_loop(), &conn); - ASSERT(r == 0); - - r = uv_tcp_connect(&connect_req, - &conn, - (const struct sockaddr*) &addr, - connect_cb); - if (r == UV_ENETUNREACH) - RETURN_SKIP("Network unreachable."); - ASSERT(r == 0); - - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-tcp-connect6-error.c b/outside/libuv-v1.7.5/test/test-tcp-connect6-error.c deleted file mode 100644 index 91ac0a3a1..000000000 --- a/outside/libuv-v1.7.5/test/test-tcp-connect6-error.c +++ /dev/null @@ -1,71 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" -#include -#include - - -static int connect_cb_called = 0; -static int close_cb_called = 0; - - -static void connect_cb(uv_connect_t* handle, int status) { - ASSERT(handle != NULL); - connect_cb_called++; -} - - -static void close_cb(uv_handle_t* handle) { - ASSERT(handle != NULL); - close_cb_called++; -} - - -TEST_IMPL(tcp_connect6_error_fault) { - const char garbage[] = - "blah blah blah blah blah blah blah blah blah blah blah blah"; - const struct sockaddr_in6* garbage_addr; - uv_tcp_t server; - int r; - uv_connect_t req; - - garbage_addr = (const struct sockaddr_in6*) &garbage; - - r = uv_tcp_init(uv_default_loop(), &server); - ASSERT(r == 0); - r = uv_tcp_connect(&req, - &server, - (const struct sockaddr*) garbage_addr, - connect_cb); - ASSERT(r == UV_EINVAL); - - uv_close((uv_handle_t*)&server, close_cb); - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(connect_cb_called == 0); - ASSERT(close_cb_called == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-tcp-create-socket-early.c b/outside/libuv-v1.7.5/test/test-tcp-create-socket-early.c deleted file mode 100644 index 65650adcc..000000000 --- a/outside/libuv-v1.7.5/test/test-tcp-create-socket-early.c +++ /dev/null @@ -1,206 +0,0 @@ -/* Copyright (c) 2015 Saúl Ibarra Corretgé . - * All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" -#include - -#ifdef _WIN32 -# define INVALID_FD (INVALID_HANDLE_VALUE) -#else -# define INVALID_FD (-1) -#endif - - -static void on_connect(uv_connect_t* req, int status) { - ASSERT(status == 0); - uv_close((uv_handle_t*) req->handle, NULL); -} - - -static void on_connection(uv_stream_t* server, int status) { - uv_tcp_t* handle; - int r; - - ASSERT(status == 0); - - handle = malloc(sizeof(*handle)); - ASSERT(handle != NULL); - - r = uv_tcp_init_ex(server->loop, handle, AF_INET); - ASSERT(r == 0); - - r = uv_accept(server, (uv_stream_t*)handle); - ASSERT(r == UV_EBUSY); - - uv_close((uv_handle_t*) server, NULL); - uv_close((uv_handle_t*) handle, (uv_close_cb)free); -} - - -static void tcp_listener(uv_loop_t* loop, uv_tcp_t* server) { - struct sockaddr_in addr; - int r; - - ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); - - r = uv_tcp_init(loop, server); - ASSERT(r == 0); - - r = uv_tcp_bind(server, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); - - r = uv_listen((uv_stream_t*) server, 128, on_connection); - ASSERT(r == 0); -} - - -static void tcp_connector(uv_loop_t* loop, uv_tcp_t* client, uv_connect_t* req) { - struct sockaddr_in server_addr; - int r; - - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &server_addr)); - - r = uv_tcp_init(loop, client); - ASSERT(r == 0); - - r = uv_tcp_connect(req, - client, - (const struct sockaddr*) &server_addr, - on_connect); - ASSERT(r == 0); -} - - -TEST_IMPL(tcp_create_early) { - struct sockaddr_in addr; - struct sockaddr_in sockname; - uv_tcp_t client; - uv_os_fd_t fd; - int r, namelen; - - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - - r = uv_tcp_init_ex(uv_default_loop(), &client, AF_INET); - ASSERT(r == 0); - - r = uv_fileno((const uv_handle_t*) &client, &fd); - ASSERT(r == 0); - ASSERT(fd != INVALID_FD); - - /* Windows returns WSAEINVAL if the socket is not bound */ -#ifndef _WIN32 - namelen = sizeof sockname; - r = uv_tcp_getsockname(&client, (struct sockaddr*) &sockname, &namelen); - ASSERT(r == 0); - ASSERT(sockname.sin_family == AF_INET); -#endif - - r = uv_tcp_bind(&client, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); - - namelen = sizeof sockname; - r = uv_tcp_getsockname(&client, (struct sockaddr*) &sockname, &namelen); - ASSERT(r == 0); - ASSERT(memcmp(&addr.sin_addr, - &sockname.sin_addr, - sizeof(addr.sin_addr)) == 0); - - uv_close((uv_handle_t*) &client, NULL); - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(tcp_create_early_bad_bind) { - struct sockaddr_in addr; - uv_tcp_t client; - uv_os_fd_t fd; - int r; - - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - - r = uv_tcp_init_ex(uv_default_loop(), &client, AF_INET6); - ASSERT(r == 0); - - r = uv_fileno((const uv_handle_t*) &client, &fd); - ASSERT(r == 0); - ASSERT(fd != INVALID_FD); - - /* Windows returns WSAEINVAL if the socket is not bound */ -#ifndef _WIN32 - { - int namelen; - struct sockaddr_in6 sockname; - namelen = sizeof sockname; - r = uv_tcp_getsockname(&client, (struct sockaddr*) &sockname, &namelen); - ASSERT(r == 0); - ASSERT(sockname.sin6_family == AF_INET6); - } -#endif - - r = uv_tcp_bind(&client, (const struct sockaddr*) &addr, 0); -#ifndef _WIN32 - ASSERT(r == UV_EINVAL); -#else - ASSERT(r == UV_EFAULT); -#endif - - uv_close((uv_handle_t*) &client, NULL); - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(tcp_create_early_bad_domain) { - uv_tcp_t client; - int r; - - r = uv_tcp_init_ex(uv_default_loop(), &client, 47); - ASSERT(r == UV_EINVAL); - - r = uv_tcp_init_ex(uv_default_loop(), &client, 1024); - ASSERT(r == UV_EINVAL); - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(tcp_create_early_accept) { - uv_tcp_t client, server; - uv_connect_t connect_req; - - tcp_listener(uv_default_loop(), &server); - tcp_connector(uv_default_loop(), &client, &connect_req); - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-tcp-flags.c b/outside/libuv-v1.7.5/test/test-tcp-flags.c deleted file mode 100644 index 68afb39f4..000000000 --- a/outside/libuv-v1.7.5/test/test-tcp-flags.c +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#include -#include - - -TEST_IMPL(tcp_flags) { - uv_loop_t* loop; - uv_tcp_t handle; - int r; - - loop = uv_default_loop(); - - r = uv_tcp_init(loop, &handle); - ASSERT(r == 0); - - r = uv_tcp_nodelay(&handle, 1); - ASSERT(r == 0); - - r = uv_tcp_keepalive(&handle, 1, 60); - ASSERT(r == 0); - - uv_close((uv_handle_t*)&handle, NULL); - - r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT(r == 0); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-tcp-oob.c b/outside/libuv-v1.7.5/test/test-tcp-oob.c deleted file mode 100644 index fc011ee49..000000000 --- a/outside/libuv-v1.7.5/test/test-tcp-oob.c +++ /dev/null @@ -1,128 +0,0 @@ -/* Copyright Fedor Indutny. All rights reserved. - * - * 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. - */ - -#if !defined(_WIN32) - -#include "uv.h" -#include "task.h" - -#include -#include -#include - -static uv_tcp_t server_handle; -static uv_tcp_t client_handle; -static uv_tcp_t peer_handle; -static uv_idle_t idle; -static uv_connect_t connect_req; -static int ticks; -static const int kMaxTicks = 10; - -static void alloc_cb(uv_handle_t* handle, - size_t suggested_size, - uv_buf_t* buf) { - static char storage[1024]; - *buf = uv_buf_init(storage, sizeof(storage)); -} - - -static void idle_cb(uv_idle_t* idle) { - if (++ticks < kMaxTicks) - return; - - uv_close((uv_handle_t*) &server_handle, NULL); - uv_close((uv_handle_t*) &client_handle, NULL); - uv_close((uv_handle_t*) &peer_handle, NULL); - uv_close((uv_handle_t*) idle, NULL); -} - - -static void read_cb(uv_stream_t* handle, ssize_t nread, const uv_buf_t* buf) { - ASSERT(nread > 0); - ASSERT(0 == uv_idle_start(&idle, idle_cb)); -} - - -static void connect_cb(uv_connect_t* req, int status) { - ASSERT(req->handle == (uv_stream_t*) &client_handle); - ASSERT(0 == status); -} - - -static void connection_cb(uv_stream_t* handle, int status) { - int r; - uv_os_fd_t fd; - - ASSERT(0 == status); - ASSERT(0 == uv_accept(handle, (uv_stream_t*) &peer_handle)); - ASSERT(0 == uv_read_start((uv_stream_t*) &peer_handle, alloc_cb, read_cb)); - - /* Send some OOB data */ - ASSERT(0 == uv_fileno((uv_handle_t*) &client_handle, &fd)); - - ASSERT(0 == uv_stream_set_blocking((uv_stream_t*) &client_handle, 1)); - - /* The problem triggers only on a second message, it seem that xnu is not - * triggering `kevent()` for the first one - */ - do { - r = send(fd, "hello", 5, MSG_OOB); - } while (r < 0 && errno == EINTR); - ASSERT(5 == r); - - do { - r = send(fd, "hello", 5, MSG_OOB); - } while (r < 0 && errno == EINTR); - ASSERT(5 == r); - - ASSERT(0 == uv_stream_set_blocking((uv_stream_t*) &client_handle, 0)); -} - - -TEST_IMPL(tcp_oob) { - struct sockaddr_in addr; - uv_loop_t* loop; - - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - loop = uv_default_loop(); - - ASSERT(0 == uv_tcp_init(loop, &server_handle)); - ASSERT(0 == uv_tcp_init(loop, &client_handle)); - ASSERT(0 == uv_tcp_init(loop, &peer_handle)); - ASSERT(0 == uv_idle_init(loop, &idle)); - ASSERT(0 == uv_tcp_bind(&server_handle, (const struct sockaddr*) &addr, 0)); - ASSERT(0 == uv_listen((uv_stream_t*) &server_handle, 1, connection_cb)); - - /* Ensure two separate packets */ - ASSERT(0 == uv_tcp_nodelay(&client_handle, 1)); - - ASSERT(0 == uv_tcp_connect(&connect_req, - &client_handle, - (const struct sockaddr*) &addr, - connect_cb)); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - - ASSERT(ticks == kMaxTicks); - - MAKE_VALGRIND_HAPPY(); - return 0; -} -#endif diff --git a/outside/libuv-v1.7.5/test/test-tcp-open.c b/outside/libuv-v1.7.5/test/test-tcp-open.c deleted file mode 100644 index 6c8d43d00..000000000 --- a/outside/libuv-v1.7.5/test/test-tcp-open.c +++ /dev/null @@ -1,220 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" -#include -#include -#include - -#ifndef _WIN32 -# include -#endif - -static int shutdown_cb_called = 0; -static int connect_cb_called = 0; -static int write_cb_called = 0; -static int close_cb_called = 0; - -static uv_connect_t connect_req; -static uv_shutdown_t shutdown_req; -static uv_write_t write_req; - - -static void startup(void) { -#ifdef _WIN32 - struct WSAData wsa_data; - int r = WSAStartup(MAKEWORD(2, 2), &wsa_data); - ASSERT(r == 0); -#endif -} - - -static uv_os_sock_t create_tcp_socket(void) { - uv_os_sock_t sock; - - sock = socket(AF_INET, SOCK_STREAM, IPPROTO_IP); -#ifdef _WIN32 - ASSERT(sock != INVALID_SOCKET); -#else - ASSERT(sock >= 0); -#endif - -#ifndef _WIN32 - { - /* Allow reuse of the port. */ - int yes = 1; - int r = setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof yes); - ASSERT(r == 0); - } -#endif - - return sock; -} - - -static void close_socket(uv_os_sock_t sock) { - int r; -#ifdef _WIN32 - r = closesocket(sock); -#else - r = close(sock); -#endif - ASSERT(r == 0); -} - - -static void alloc_cb(uv_handle_t* handle, - size_t suggested_size, - uv_buf_t* buf) { - static char slab[65536]; - ASSERT(suggested_size <= sizeof(slab)); - buf->base = slab; - buf->len = sizeof(slab); -} - - -static void close_cb(uv_handle_t* handle) { - ASSERT(handle != NULL); - close_cb_called++; -} - - -static void shutdown_cb(uv_shutdown_t* req, int status) { - ASSERT(req == &shutdown_req); - ASSERT(status == 0); - - /* Now we wait for the EOF */ - shutdown_cb_called++; -} - - -static void read_cb(uv_stream_t* tcp, ssize_t nread, const uv_buf_t* buf) { - ASSERT(tcp != NULL); - - if (nread >= 0) { - ASSERT(nread == 4); - ASSERT(memcmp("PING", buf->base, nread) == 0); - } - else { - ASSERT(nread == UV_EOF); - printf("GOT EOF\n"); - uv_close((uv_handle_t*)tcp, close_cb); - } -} - - -static void write_cb(uv_write_t* req, int status) { - ASSERT(req != NULL); - - if (status) { - fprintf(stderr, "uv_write error: %s\n", uv_strerror(status)); - ASSERT(0); - } - - write_cb_called++; -} - - -static void connect_cb(uv_connect_t* req, int status) { - uv_buf_t buf = uv_buf_init("PING", 4); - uv_stream_t* stream; - int r; - - ASSERT(req == &connect_req); - ASSERT(status == 0); - - stream = req->handle; - connect_cb_called++; - - r = uv_write(&write_req, stream, &buf, 1, write_cb); - ASSERT(r == 0); - - /* Shutdown on drain. */ - r = uv_shutdown(&shutdown_req, stream, shutdown_cb); - ASSERT(r == 0); - - /* Start reading */ - r = uv_read_start(stream, alloc_cb, read_cb); - ASSERT(r == 0); -} - - -TEST_IMPL(tcp_open) { - struct sockaddr_in addr; - uv_tcp_t client; - uv_os_sock_t sock; - int r; - - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - - startup(); - sock = create_tcp_socket(); - - r = uv_tcp_init(uv_default_loop(), &client); - ASSERT(r == 0); - - r = uv_tcp_open(&client, sock); - ASSERT(r == 0); - - r = uv_tcp_connect(&connect_req, - &client, - (const struct sockaddr*) &addr, - connect_cb); - ASSERT(r == 0); - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(shutdown_cb_called == 1); - ASSERT(connect_cb_called == 1); - ASSERT(write_cb_called == 1); - ASSERT(close_cb_called == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(tcp_open_twice) { - uv_tcp_t client; - uv_os_sock_t sock1, sock2; - int r; - - startup(); - sock1 = create_tcp_socket(); - sock2 = create_tcp_socket(); - - r = uv_tcp_init(uv_default_loop(), &client); - ASSERT(r == 0); - - r = uv_tcp_open(&client, sock1); - ASSERT(r == 0); - - r = uv_tcp_open(&client, sock2); - ASSERT(r == UV_EBUSY); - close_socket(sock2); - - uv_close((uv_handle_t*) &client, NULL); - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-tcp-read-stop.c b/outside/libuv-v1.7.5/test/test-tcp-read-stop.c deleted file mode 100644 index 488e8fb49..000000000 --- a/outside/libuv-v1.7.5/test/test-tcp-read-stop.c +++ /dev/null @@ -1,76 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -static uv_timer_t timer_handle; -static uv_tcp_t tcp_handle; -static uv_write_t write_req; - - -static void fail_cb(void) { - ASSERT(0 && "fail_cb called"); -} - - -static void write_cb(uv_write_t* req, int status) { - uv_close((uv_handle_t*) &timer_handle, NULL); - uv_close((uv_handle_t*) &tcp_handle, NULL); -} - - -static void timer_cb(uv_timer_t* handle) { - uv_buf_t buf = uv_buf_init("PING", 4); - ASSERT(0 == uv_write(&write_req, - (uv_stream_t*) &tcp_handle, - &buf, - 1, - write_cb)); - ASSERT(0 == uv_read_stop((uv_stream_t*) &tcp_handle)); -} - - -static void connect_cb(uv_connect_t* req, int status) { - ASSERT(0 == status); - ASSERT(0 == uv_timer_start(&timer_handle, timer_cb, 50, 0)); - ASSERT(0 == uv_read_start((uv_stream_t*) &tcp_handle, - (uv_alloc_cb) fail_cb, - (uv_read_cb) fail_cb)); -} - - -TEST_IMPL(tcp_read_stop) { - uv_connect_t connect_req; - struct sockaddr_in addr; - - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - ASSERT(0 == uv_timer_init(uv_default_loop(), &timer_handle)); - ASSERT(0 == uv_tcp_init(uv_default_loop(), &tcp_handle)); - ASSERT(0 == uv_tcp_connect(&connect_req, - &tcp_handle, - (const struct sockaddr*) &addr, - connect_cb)); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - MAKE_VALGRIND_HAPPY(); - - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-tcp-shutdown-after-write.c b/outside/libuv-v1.7.5/test/test-tcp-shutdown-after-write.c deleted file mode 100644 index 463b4b0d7..000000000 --- a/outside/libuv-v1.7.5/test/test-tcp-shutdown-after-write.c +++ /dev/null @@ -1,138 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -static void write_cb(uv_write_t* req, int status); -static void shutdown_cb(uv_shutdown_t* req, int status); - -static uv_tcp_t conn; -static uv_timer_t timer; -static uv_connect_t connect_req; -static uv_write_t write_req; -static uv_shutdown_t shutdown_req; - -static int connect_cb_called; -static int write_cb_called; -static int shutdown_cb_called; - -static int conn_close_cb_called; -static int timer_close_cb_called; - - -static void close_cb(uv_handle_t* handle) { - if (handle == (uv_handle_t*)&conn) - conn_close_cb_called++; - else if (handle == (uv_handle_t*)&timer) - timer_close_cb_called++; - else - ASSERT(0 && "bad handle in close_cb"); -} - - -static void alloc_cb(uv_handle_t* handle, - size_t suggested_size, - uv_buf_t* buf) { - static char slab[64]; - buf->base = slab; - buf->len = sizeof(slab); -} - - -static void timer_cb(uv_timer_t* handle) { - uv_buf_t buf; - int r; - - uv_close((uv_handle_t*)handle, close_cb); - - buf = uv_buf_init("TEST", 4); - r = uv_write(&write_req, (uv_stream_t*)&conn, &buf, 1, write_cb); - ASSERT(r == 0); - - r = uv_shutdown(&shutdown_req, (uv_stream_t*)&conn, shutdown_cb); - ASSERT(r == 0); -} - - -static void read_cb(uv_stream_t* handle, ssize_t nread, const uv_buf_t* buf) { -} - - -static void connect_cb(uv_connect_t* req, int status) { - int r; - - ASSERT(status == 0); - connect_cb_called++; - - r = uv_read_start((uv_stream_t*)&conn, alloc_cb, read_cb); - ASSERT(r == 0); -} - - -static void write_cb(uv_write_t* req, int status) { - ASSERT(status == 0); - write_cb_called++; -} - - -static void shutdown_cb(uv_shutdown_t* req, int status) { - ASSERT(status == 0); - shutdown_cb_called++; - uv_close((uv_handle_t*)&conn, close_cb); -} - - -TEST_IMPL(tcp_shutdown_after_write) { - struct sockaddr_in addr; - uv_loop_t* loop; - int r; - - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - loop = uv_default_loop(); - - r = uv_timer_init(loop, &timer); - ASSERT(r == 0); - - r = uv_timer_start(&timer, timer_cb, 125, 0); - ASSERT(r == 0); - - r = uv_tcp_init(loop, &conn); - ASSERT(r == 0); - - r = uv_tcp_connect(&connect_req, - &conn, - (const struct sockaddr*) &addr, - connect_cb); - ASSERT(r == 0); - - r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT(r == 0); - - ASSERT(connect_cb_called == 1); - ASSERT(write_cb_called == 1); - ASSERT(shutdown_cb_called == 1); - ASSERT(conn_close_cb_called == 1); - ASSERT(timer_close_cb_called == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-tcp-try-write.c b/outside/libuv-v1.7.5/test/test-tcp-try-write.c deleted file mode 100644 index 8a60136b6..000000000 --- a/outside/libuv-v1.7.5/test/test-tcp-try-write.c +++ /dev/null @@ -1,130 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#include -#include -#include - -#define MAX_BYTES 1024 * 1024 - -static uv_tcp_t server; -static uv_tcp_t client; -static uv_tcp_t incoming; -static int connect_cb_called; -static int close_cb_called; -static int connection_cb_called; -static int bytes_read; -static int bytes_written; - - -static void close_cb(uv_handle_t* handle) { - close_cb_called++; -} - - -static void connect_cb(uv_connect_t* req, int status) { - int r; - uv_buf_t buf; - ASSERT(status == 0); - connect_cb_called++; - - do { - buf = uv_buf_init("PING", 4); - r = uv_try_write((uv_stream_t*) &client, &buf, 1); - ASSERT(r > 0 || r == UV_EAGAIN); - if (r > 0) { - bytes_written += r; - break; - } - } while (1); - uv_close((uv_handle_t*) &client, close_cb); -} - - -static void alloc_cb(uv_handle_t* handle, size_t size, uv_buf_t* buf) { - static char base[1024]; - - buf->base = base; - buf->len = sizeof(base); -} - - -static void read_cb(uv_stream_t* tcp, ssize_t nread, const uv_buf_t* buf) { - if (nread < 0) { - uv_close((uv_handle_t*) tcp, close_cb); - uv_close((uv_handle_t*) &server, close_cb); - return; - } - - bytes_read += nread; -} - - -static void connection_cb(uv_stream_t* tcp, int status) { - ASSERT(status == 0); - - ASSERT(0 == uv_tcp_init(tcp->loop, &incoming)); - ASSERT(0 == uv_accept(tcp, (uv_stream_t*) &incoming)); - - connection_cb_called++; - ASSERT(0 == uv_read_start((uv_stream_t*) &incoming, alloc_cb, read_cb)); -} - - -static void start_server(void) { - struct sockaddr_in addr; - - ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); - - ASSERT(0 == uv_tcp_init(uv_default_loop(), &server)); - ASSERT(0 == uv_tcp_bind(&server, (struct sockaddr*) &addr, 0)); - ASSERT(0 == uv_listen((uv_stream_t*) &server, 128, connection_cb)); -} - - -TEST_IMPL(tcp_try_write) { - uv_connect_t connect_req; - struct sockaddr_in addr; - - start_server(); - - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - - ASSERT(0 == uv_tcp_init(uv_default_loop(), &client)); - ASSERT(0 == uv_tcp_connect(&connect_req, - &client, - (struct sockaddr*) &addr, - connect_cb)); - - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - - ASSERT(connect_cb_called == 1); - ASSERT(close_cb_called == 3); - ASSERT(connection_cb_called == 1); - ASSERT(bytes_read == bytes_written); - ASSERT(bytes_written > 0); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-tcp-unexpected-read.c b/outside/libuv-v1.7.5/test/test-tcp-unexpected-read.c deleted file mode 100644 index c7b981456..000000000 --- a/outside/libuv-v1.7.5/test/test-tcp-unexpected-read.c +++ /dev/null @@ -1,117 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -static uv_check_t check_handle; -static uv_timer_t timer_handle; -static uv_tcp_t server_handle; -static uv_tcp_t client_handle; -static uv_tcp_t peer_handle; -static uv_write_t write_req; -static uv_connect_t connect_req; - -static unsigned long ticks; /* event loop ticks */ - - -static void check_cb(uv_check_t* handle) { - ticks++; -} - - -static void timer_cb(uv_timer_t* handle) { - uv_close((uv_handle_t*) &check_handle, NULL); - uv_close((uv_handle_t*) &timer_handle, NULL); - uv_close((uv_handle_t*) &server_handle, NULL); - uv_close((uv_handle_t*) &client_handle, NULL); - uv_close((uv_handle_t*) &peer_handle, NULL); -} - - -static void alloc_cb(uv_handle_t* handle, - size_t suggested_size, - uv_buf_t* buf) { - ASSERT(0 && "alloc_cb should not have been called"); -} - - -static void read_cb(uv_stream_t* handle, ssize_t nread, const uv_buf_t* buf) { - ASSERT(0 && "read_cb should not have been called"); -} - - -static void connect_cb(uv_connect_t* req, int status) { - ASSERT(req->handle == (uv_stream_t*) &client_handle); - ASSERT(0 == status); -} - - -static void write_cb(uv_write_t* req, int status) { - ASSERT(req->handle == (uv_stream_t*) &peer_handle); - ASSERT(0 == status); -} - - -static void connection_cb(uv_stream_t* handle, int status) { - uv_buf_t buf; - - buf = uv_buf_init("PING", 4); - - ASSERT(0 == status); - ASSERT(0 == uv_accept(handle, (uv_stream_t*) &peer_handle)); - ASSERT(0 == uv_read_start((uv_stream_t*) &peer_handle, alloc_cb, read_cb)); - ASSERT(0 == uv_write(&write_req, (uv_stream_t*) &peer_handle, - &buf, 1, write_cb)); -} - - -TEST_IMPL(tcp_unexpected_read) { - struct sockaddr_in addr; - uv_loop_t* loop; - - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - loop = uv_default_loop(); - - ASSERT(0 == uv_timer_init(loop, &timer_handle)); - ASSERT(0 == uv_timer_start(&timer_handle, timer_cb, 1000, 0)); - ASSERT(0 == uv_check_init(loop, &check_handle)); - ASSERT(0 == uv_check_start(&check_handle, check_cb)); - ASSERT(0 == uv_tcp_init(loop, &server_handle)); - ASSERT(0 == uv_tcp_init(loop, &client_handle)); - ASSERT(0 == uv_tcp_init(loop, &peer_handle)); - ASSERT(0 == uv_tcp_bind(&server_handle, (const struct sockaddr*) &addr, 0)); - ASSERT(0 == uv_listen((uv_stream_t*) &server_handle, 1, connection_cb)); - ASSERT(0 == uv_tcp_connect(&connect_req, - &client_handle, - (const struct sockaddr*) &addr, - connect_cb)); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - - /* This is somewhat inexact but the idea is that the event loop should not - * start busy looping when the server sends a message and the client isn't - * reading. - */ - ASSERT(ticks <= 20); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-tcp-write-after-connect.c b/outside/libuv-v1.7.5/test/test-tcp-write-after-connect.c deleted file mode 100644 index aa03228f1..000000000 --- a/outside/libuv-v1.7.5/test/test-tcp-write-after-connect.c +++ /dev/null @@ -1,68 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#ifndef _WIN32 - -#include "uv.h" -#include "task.h" - -uv_loop_t loop; -uv_tcp_t tcp_client; -uv_connect_t connection_request; -uv_write_t write_request; -uv_buf_t buf = { "HELLO", 4 }; - - -static void write_cb(uv_write_t *req, int status) { - ASSERT(status == UV_ECANCELED); - uv_close((uv_handle_t*) req->handle, NULL); -} - - -static void connect_cb(uv_connect_t *req, int status) { - ASSERT(status == UV_ECONNREFUSED); -} - - -TEST_IMPL(tcp_write_after_connect) { - struct sockaddr_in sa; - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &sa)); - ASSERT(0 == uv_loop_init(&loop)); - ASSERT(0 == uv_tcp_init(&loop, &tcp_client)); - - ASSERT(0 == uv_tcp_connect(&connection_request, - &tcp_client, - (const struct sockaddr *) - &sa, - connect_cb)); - - ASSERT(0 == uv_write(&write_request, - (uv_stream_t *)&tcp_client, - &buf, 1, - write_cb)); - - uv_run(&loop, UV_RUN_DEFAULT); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - -#endif diff --git a/outside/libuv-v1.7.5/test/test-tcp-write-fail.c b/outside/libuv-v1.7.5/test/test-tcp-write-fail.c deleted file mode 100644 index 2840d8161..000000000 --- a/outside/libuv-v1.7.5/test/test-tcp-write-fail.c +++ /dev/null @@ -1,115 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" -#include -#include -#ifndef _WIN32 -# include -#endif - - -static int connect_cb_called = 0; -static int write_cb_called = 0; -static int close_cb_called = 0; - -static uv_connect_t connect_req; -static uv_write_t write_req; - - -static void close_socket(uv_tcp_t* sock) { - uv_os_fd_t fd; - int r; - - r = uv_fileno((uv_handle_t*)sock, &fd); - ASSERT(r == 0); -#ifdef _WIN32 - r = closesocket(fd); -#else - r = close(fd); -#endif - ASSERT(r == 0); -} - - -static void close_cb(uv_handle_t* handle) { - ASSERT(handle != NULL); - close_cb_called++; -} - - -static void write_cb(uv_write_t* req, int status) { - ASSERT(req != NULL); - - ASSERT(status != 0); - fprintf(stderr, "uv_write error: %s\n", uv_strerror(status)); - write_cb_called++; - - uv_close((uv_handle_t*)(req->handle), close_cb); -} - - -static void connect_cb(uv_connect_t* req, int status) { - uv_buf_t buf; - uv_stream_t* stream; - int r; - - ASSERT(req == &connect_req); - ASSERT(status == 0); - - stream = req->handle; - connect_cb_called++; - - /* close the socket, the hard way */ - close_socket((uv_tcp_t*)stream); - - buf = uv_buf_init("hello\n", 6); - r = uv_write(&write_req, stream, &buf, 1, write_cb); - ASSERT(r == 0); -} - - -TEST_IMPL(tcp_write_fail) { - struct sockaddr_in addr; - uv_tcp_t client; - int r; - - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - - r = uv_tcp_init(uv_default_loop(), &client); - ASSERT(r == 0); - - r = uv_tcp_connect(&connect_req, - &client, - (const struct sockaddr*) &addr, - connect_cb); - ASSERT(r == 0); - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(connect_cb_called == 1); - ASSERT(write_cb_called == 1); - ASSERT(close_cb_called == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-tcp-write-queue-order.c b/outside/libuv-v1.7.5/test/test-tcp-write-queue-order.c deleted file mode 100644 index aa4d2acc2..000000000 --- a/outside/libuv-v1.7.5/test/test-tcp-write-queue-order.c +++ /dev/null @@ -1,137 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include -#include -#include - -#include "uv.h" -#include "task.h" - -#define REQ_COUNT 10000 - -static uv_timer_t timer; -static uv_tcp_t server; -static uv_tcp_t client; -static uv_tcp_t incoming; -static int connect_cb_called; -static int close_cb_called; -static int connection_cb_called; -static int write_callbacks; -static int write_cancelled_callbacks; -static int write_error_callbacks; - -static uv_write_t write_requests[REQ_COUNT]; - - -static void close_cb(uv_handle_t* handle) { - close_cb_called++; -} - -void timer_cb(uv_timer_t* handle) { - uv_close((uv_handle_t*) &client, close_cb); - uv_close((uv_handle_t*) &server, close_cb); - uv_close((uv_handle_t*) &incoming, close_cb); -} - -void write_cb(uv_write_t* req, int status) { - if (status == 0) - write_callbacks++; - else if (status == UV_ECANCELED) - write_cancelled_callbacks++; - else - write_error_callbacks++; -} - -static void connect_cb(uv_connect_t* req, int status) { - static char base[1024]; - int r; - int i; - uv_buf_t buf; - - ASSERT(status == 0); - connect_cb_called++; - - buf = uv_buf_init(base, sizeof(base)); - - for (i = 0; i < REQ_COUNT; i++) { - r = uv_write(&write_requests[i], - req->handle, - &buf, - 1, - write_cb); - ASSERT(r == 0); - } -} - - -static void connection_cb(uv_stream_t* tcp, int status) { - ASSERT(status == 0); - - ASSERT(0 == uv_tcp_init(tcp->loop, &incoming)); - ASSERT(0 == uv_accept(tcp, (uv_stream_t*) &incoming)); - - connection_cb_called++; -} - - -static void start_server(void) { - struct sockaddr_in addr; - - ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); - - ASSERT(0 == uv_tcp_init(uv_default_loop(), &server)); - ASSERT(0 == uv_tcp_bind(&server, (struct sockaddr*) &addr, 0)); - ASSERT(0 == uv_listen((uv_stream_t*) &server, 128, connection_cb)); -} - - -TEST_IMPL(tcp_write_queue_order) { - uv_connect_t connect_req; - struct sockaddr_in addr; - - start_server(); - - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - - ASSERT(0 == uv_tcp_init(uv_default_loop(), &client)); - ASSERT(0 == uv_tcp_connect(&connect_req, - &client, - (struct sockaddr*) &addr, - connect_cb)); - - ASSERT(0 == uv_timer_init(uv_default_loop(), &timer)); - ASSERT(0 == uv_timer_start(&timer, timer_cb, 100, 0)); - - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - - ASSERT(connect_cb_called == 1); - ASSERT(connection_cb_called == 1); - ASSERT(write_callbacks > 0); - ASSERT(write_cancelled_callbacks > 0); - ASSERT(write_callbacks + - write_error_callbacks + - write_cancelled_callbacks == REQ_COUNT); - ASSERT(close_cb_called == 3); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-tcp-write-to-half-open-connection.c b/outside/libuv-v1.7.5/test/test-tcp-write-to-half-open-connection.c deleted file mode 100644 index 2fa2ae722..000000000 --- a/outside/libuv-v1.7.5/test/test-tcp-write-to-half-open-connection.c +++ /dev/null @@ -1,141 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#include -#include -#include - -static void connection_cb(uv_stream_t* server, int status); -static void connect_cb(uv_connect_t* req, int status); -static void write_cb(uv_write_t* req, int status); -static void read_cb(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf); -static void alloc_cb(uv_handle_t* handle, size_t suggested_size, uv_buf_t* buf); - -static uv_tcp_t tcp_server; -static uv_tcp_t tcp_client; -static uv_tcp_t tcp_peer; /* client socket as accept()-ed by server */ -static uv_connect_t connect_req; -static uv_write_t write_req; - -static int write_cb_called; -static int read_cb_called; - -static void connection_cb(uv_stream_t* server, int status) { - int r; - uv_buf_t buf; - - ASSERT(server == (uv_stream_t*)&tcp_server); - ASSERT(status == 0); - - r = uv_tcp_init(server->loop, &tcp_peer); - ASSERT(r == 0); - - r = uv_accept(server, (uv_stream_t*)&tcp_peer); - ASSERT(r == 0); - - r = uv_read_start((uv_stream_t*)&tcp_peer, alloc_cb, read_cb); - ASSERT(r == 0); - - buf.base = "hello\n"; - buf.len = 6; - - r = uv_write(&write_req, (uv_stream_t*)&tcp_peer, &buf, 1, write_cb); - ASSERT(r == 0); -} - - -static void alloc_cb(uv_handle_t* handle, - size_t suggested_size, - uv_buf_t* buf) { - static char slab[1024]; - buf->base = slab; - buf->len = sizeof(slab); -} - - -static void read_cb(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf) { - if (nread < 0) { - fprintf(stderr, "read_cb error: %s\n", uv_err_name(nread)); - ASSERT(nread == UV_ECONNRESET || nread == UV_EOF); - - uv_close((uv_handle_t*)&tcp_server, NULL); - uv_close((uv_handle_t*)&tcp_peer, NULL); - } - - read_cb_called++; -} - - -static void connect_cb(uv_connect_t* req, int status) { - ASSERT(req == &connect_req); - ASSERT(status == 0); - - /* Close the client. */ - uv_close((uv_handle_t*)&tcp_client, NULL); -} - - -static void write_cb(uv_write_t* req, int status) { - ASSERT(status == 0); - write_cb_called++; -} - - -TEST_IMPL(tcp_write_to_half_open_connection) { - struct sockaddr_in addr; - uv_loop_t* loop; - int r; - - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - - loop = uv_default_loop(); - ASSERT(loop != NULL); - - r = uv_tcp_init(loop, &tcp_server); - ASSERT(r == 0); - - r = uv_tcp_bind(&tcp_server, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); - - r = uv_listen((uv_stream_t*)&tcp_server, 1, connection_cb); - ASSERT(r == 0); - - r = uv_tcp_init(loop, &tcp_client); - ASSERT(r == 0); - - r = uv_tcp_connect(&connect_req, - &tcp_client, - (const struct sockaddr*) &addr, - connect_cb); - ASSERT(r == 0); - - r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT(r == 0); - - ASSERT(write_cb_called > 0); - ASSERT(read_cb_called > 0); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-tcp-writealot.c b/outside/libuv-v1.7.5/test/test-tcp-writealot.c deleted file mode 100644 index 6cfe2ebb1..000000000 --- a/outside/libuv-v1.7.5/test/test-tcp-writealot.c +++ /dev/null @@ -1,176 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" -#include -#include - - -#define WRITES 3 -#define CHUNKS_PER_WRITE 4096 -#define CHUNK_SIZE 10024 /* 10 kb */ - -#define TOTAL_BYTES (WRITES * CHUNKS_PER_WRITE * CHUNK_SIZE) - -static char* send_buffer; - -static int shutdown_cb_called = 0; -static int connect_cb_called = 0; -static int write_cb_called = 0; -static int close_cb_called = 0; -static size_t bytes_sent = 0; -static size_t bytes_sent_done = 0; -static size_t bytes_received_done = 0; - -static uv_connect_t connect_req; -static uv_shutdown_t shutdown_req; -static uv_write_t write_reqs[WRITES]; - - -static void alloc_cb(uv_handle_t* handle, size_t size, uv_buf_t* buf) { - buf->base = malloc(size); - buf->len = size; -} - - -static void close_cb(uv_handle_t* handle) { - ASSERT(handle != NULL); - close_cb_called++; -} - - -static void shutdown_cb(uv_shutdown_t* req, int status) { - uv_tcp_t* tcp; - - ASSERT(req == &shutdown_req); - ASSERT(status == 0); - - tcp = (uv_tcp_t*)(req->handle); - - /* The write buffer should be empty by now. */ - ASSERT(tcp->write_queue_size == 0); - - /* Now we wait for the EOF */ - shutdown_cb_called++; - - /* We should have had all the writes called already. */ - ASSERT(write_cb_called == WRITES); -} - - -static void read_cb(uv_stream_t* tcp, ssize_t nread, const uv_buf_t* buf) { - ASSERT(tcp != NULL); - - if (nread >= 0) { - bytes_received_done += nread; - } - else { - ASSERT(nread == UV_EOF); - printf("GOT EOF\n"); - uv_close((uv_handle_t*)tcp, close_cb); - } - - free(buf->base); -} - - -static void write_cb(uv_write_t* req, int status) { - ASSERT(req != NULL); - - if (status) { - fprintf(stderr, "uv_write error: %s\n", uv_strerror(status)); - ASSERT(0); - } - - bytes_sent_done += CHUNKS_PER_WRITE * CHUNK_SIZE; - write_cb_called++; -} - - -static void connect_cb(uv_connect_t* req, int status) { - uv_buf_t send_bufs[CHUNKS_PER_WRITE]; - uv_stream_t* stream; - int i, j, r; - - ASSERT(req == &connect_req); - ASSERT(status == 0); - - stream = req->handle; - connect_cb_called++; - - /* Write a lot of data */ - for (i = 0; i < WRITES; i++) { - uv_write_t* write_req = write_reqs + i; - - for (j = 0; j < CHUNKS_PER_WRITE; j++) { - send_bufs[j] = uv_buf_init(send_buffer + bytes_sent, CHUNK_SIZE); - bytes_sent += CHUNK_SIZE; - } - - r = uv_write(write_req, stream, send_bufs, CHUNKS_PER_WRITE, write_cb); - ASSERT(r == 0); - } - - /* Shutdown on drain. */ - r = uv_shutdown(&shutdown_req, stream, shutdown_cb); - ASSERT(r == 0); - - /* Start reading */ - r = uv_read_start(stream, alloc_cb, read_cb); - ASSERT(r == 0); -} - - -TEST_IMPL(tcp_writealot) { - struct sockaddr_in addr; - uv_tcp_t client; - int r; - - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - - send_buffer = calloc(1, TOTAL_BYTES); - ASSERT(send_buffer != NULL); - - r = uv_tcp_init(uv_default_loop(), &client); - ASSERT(r == 0); - - r = uv_tcp_connect(&connect_req, - &client, - (const struct sockaddr*) &addr, - connect_cb); - ASSERT(r == 0); - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(shutdown_cb_called == 1); - ASSERT(connect_cb_called == 1); - ASSERT(write_cb_called == WRITES); - ASSERT(close_cb_called == 1); - ASSERT(bytes_sent == TOTAL_BYTES); - ASSERT(bytes_sent_done == TOTAL_BYTES); - ASSERT(bytes_received_done == TOTAL_BYTES); - - free(send_buffer); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-thread-equal.c b/outside/libuv-v1.7.5/test/test-thread-equal.c deleted file mode 100644 index 27c07ee2c..000000000 --- a/outside/libuv-v1.7.5/test/test-thread-equal.c +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -uv_thread_t main_thread_id; -uv_thread_t subthreads[2]; - -static void check_thread(void* arg) { - uv_thread_t *thread_id = arg; - uv_thread_t self_id = uv_thread_self(); - ASSERT(uv_thread_equal(&main_thread_id, &self_id) == 0); - *thread_id = uv_thread_self(); -} - -TEST_IMPL(thread_equal) { - uv_thread_t threads[2]; - main_thread_id = uv_thread_self(); - ASSERT(0 != uv_thread_equal(&main_thread_id, &main_thread_id)); - ASSERT(0 == uv_thread_create(threads + 0, check_thread, subthreads + 0)); - ASSERT(0 == uv_thread_create(threads + 1, check_thread, subthreads + 1)); - ASSERT(0 == uv_thread_join(threads + 0)); - ASSERT(0 == uv_thread_join(threads + 1)); - ASSERT(0 == uv_thread_equal(subthreads + 0, subthreads + 1)); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-thread.c b/outside/libuv-v1.7.5/test/test-thread.c deleted file mode 100644 index 7f3321aa0..000000000 --- a/outside/libuv-v1.7.5/test/test-thread.c +++ /dev/null @@ -1,211 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#include -#include -#include /* memset */ - -struct getaddrinfo_req { - uv_thread_t thread_id; - unsigned int counter; - uv_loop_t* loop; - uv_getaddrinfo_t handle; -}; - - -struct fs_req { - uv_thread_t thread_id; - unsigned int counter; - uv_loop_t* loop; - uv_fs_t handle; -}; - - -struct test_thread { - uv_thread_t thread_id; - volatile int thread_called; -}; - -static void getaddrinfo_do(struct getaddrinfo_req* req); -static void getaddrinfo_cb(uv_getaddrinfo_t* handle, - int status, - struct addrinfo* res); -static void fs_do(struct fs_req* req); -static void fs_cb(uv_fs_t* handle); - -static volatile int thread_called; -static uv_key_t tls_key; - - -static void getaddrinfo_do(struct getaddrinfo_req* req) { - int r; - - r = uv_getaddrinfo(req->loop, - &req->handle, - getaddrinfo_cb, - "localhost", - NULL, - NULL); - ASSERT(r == 0); -} - - -static void getaddrinfo_cb(uv_getaddrinfo_t* handle, - int status, - struct addrinfo* res) { - struct getaddrinfo_req* req; - - ASSERT(status == 0); - - req = container_of(handle, struct getaddrinfo_req, handle); - uv_freeaddrinfo(res); - - if (--req->counter) - getaddrinfo_do(req); -} - - -static void fs_do(struct fs_req* req) { - int r; - - r = uv_fs_stat(req->loop, &req->handle, ".", fs_cb); - ASSERT(r == 0); -} - - -static void fs_cb(uv_fs_t* handle) { - struct fs_req* req = container_of(handle, struct fs_req, handle); - - uv_fs_req_cleanup(handle); - - if (--req->counter) - fs_do(req); -} - - -static void do_work(void* arg) { - struct getaddrinfo_req getaddrinfo_reqs[16]; - struct fs_req fs_reqs[16]; - uv_loop_t* loop; - size_t i; - int r; - struct test_thread* thread = arg; - - loop = malloc(sizeof *loop); - ASSERT(loop != NULL); - ASSERT(0 == uv_loop_init(loop)); - - for (i = 0; i < ARRAY_SIZE(getaddrinfo_reqs); i++) { - struct getaddrinfo_req* req = getaddrinfo_reqs + i; - req->counter = 16; - req->loop = loop; - getaddrinfo_do(req); - } - - for (i = 0; i < ARRAY_SIZE(fs_reqs); i++) { - struct fs_req* req = fs_reqs + i; - req->counter = 16; - req->loop = loop; - fs_do(req); - } - - r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT(r == 0); - - ASSERT(0 == uv_loop_close(loop)); - free(loop); - thread->thread_called = 1; -} - - -static void thread_entry(void* arg) { - ASSERT(arg == (void *) 42); - thread_called++; -} - - -TEST_IMPL(thread_create) { - uv_thread_t tid; - int r; - - r = uv_thread_create(&tid, thread_entry, (void *) 42); - ASSERT(r == 0); - - r = uv_thread_join(&tid); - ASSERT(r == 0); - - ASSERT(thread_called == 1); - - return 0; -} - - -/* Hilariously bad test name. Run a lot of tasks in the thread pool and verify - * that each "finished" callback is run in its originating thread. - */ -TEST_IMPL(threadpool_multiple_event_loops) { - struct test_thread threads[8]; - size_t i; - int r; - - memset(threads, 0, sizeof(threads)); - - for (i = 0; i < ARRAY_SIZE(threads); i++) { - r = uv_thread_create(&threads[i].thread_id, do_work, &threads[i]); - ASSERT(r == 0); - } - - for (i = 0; i < ARRAY_SIZE(threads); i++) { - r = uv_thread_join(&threads[i].thread_id); - ASSERT(r == 0); - ASSERT(threads[i].thread_called); - } - - return 0; -} - - -static void tls_thread(void* arg) { - ASSERT(NULL == uv_key_get(&tls_key)); - uv_key_set(&tls_key, arg); - ASSERT(arg == uv_key_get(&tls_key)); - uv_key_set(&tls_key, NULL); - ASSERT(NULL == uv_key_get(&tls_key)); -} - - -TEST_IMPL(thread_local_storage) { - char name[] = "main"; - uv_thread_t threads[2]; - ASSERT(0 == uv_key_create(&tls_key)); - ASSERT(NULL == uv_key_get(&tls_key)); - uv_key_set(&tls_key, name); - ASSERT(name == uv_key_get(&tls_key)); - ASSERT(0 == uv_thread_create(threads + 0, tls_thread, threads + 0)); - ASSERT(0 == uv_thread_create(threads + 1, tls_thread, threads + 1)); - ASSERT(0 == uv_thread_join(threads + 0)); - ASSERT(0 == uv_thread_join(threads + 1)); - uv_key_delete(&tls_key); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-threadpool-cancel.c b/outside/libuv-v1.7.5/test/test-threadpool-cancel.c deleted file mode 100644 index cb4562245..000000000 --- a/outside/libuv-v1.7.5/test/test-threadpool-cancel.c +++ /dev/null @@ -1,361 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#define INIT_CANCEL_INFO(ci, what) \ - do { \ - (ci)->reqs = (what); \ - (ci)->nreqs = ARRAY_SIZE(what); \ - (ci)->stride = sizeof((what)[0]); \ - } \ - while (0) - -struct cancel_info { - void* reqs; - unsigned nreqs; - unsigned stride; - uv_timer_t timer_handle; -}; - -static uv_cond_t signal_cond; -static uv_mutex_t signal_mutex; -static uv_mutex_t wait_mutex; -static unsigned num_threads; -static unsigned fs_cb_called; -static unsigned work_cb_called; -static unsigned done_cb_called; -static unsigned done2_cb_called; -static unsigned timer_cb_called; - - -static void work_cb(uv_work_t* req) { - uv_mutex_lock(&signal_mutex); - uv_cond_signal(&signal_cond); - uv_mutex_unlock(&signal_mutex); - - uv_mutex_lock(&wait_mutex); - uv_mutex_unlock(&wait_mutex); - - work_cb_called++; -} - - -static void done_cb(uv_work_t* req, int status) { - done_cb_called++; - free(req); -} - - -static void saturate_threadpool(void) { - uv_work_t* req; - - ASSERT(0 == uv_cond_init(&signal_cond)); - ASSERT(0 == uv_mutex_init(&signal_mutex)); - ASSERT(0 == uv_mutex_init(&wait_mutex)); - - uv_mutex_lock(&signal_mutex); - uv_mutex_lock(&wait_mutex); - - for (num_threads = 0; /* empty */; num_threads++) { - req = malloc(sizeof(*req)); - ASSERT(req != NULL); - ASSERT(0 == uv_queue_work(uv_default_loop(), req, work_cb, done_cb)); - - /* Expect to get signalled within 350 ms, otherwise assume that - * the thread pool is saturated. As with any timing dependent test, - * this is obviously not ideal. - */ - if (uv_cond_timedwait(&signal_cond, - &signal_mutex, - (uint64_t) (350 * 1e6))) { - ASSERT(0 == uv_cancel((uv_req_t*) req)); - break; - } - } -} - - -static void unblock_threadpool(void) { - uv_mutex_unlock(&signal_mutex); - uv_mutex_unlock(&wait_mutex); -} - - -static void cleanup_threadpool(void) { - ASSERT(done_cb_called == num_threads + 1); /* +1 == cancelled work req. */ - ASSERT(work_cb_called == num_threads); - - uv_cond_destroy(&signal_cond); - uv_mutex_destroy(&signal_mutex); - uv_mutex_destroy(&wait_mutex); -} - - -static void fs_cb(uv_fs_t* req) { - ASSERT(req->result == UV_ECANCELED); - uv_fs_req_cleanup(req); - fs_cb_called++; -} - - -static void getaddrinfo_cb(uv_getaddrinfo_t* req, - int status, - struct addrinfo* res) { - ASSERT(status == UV_EAI_CANCELED); - ASSERT(res == NULL); - uv_freeaddrinfo(res); /* Should not crash. */ -} - - -static void getnameinfo_cb(uv_getnameinfo_t* handle, - int status, - const char* hostname, - const char* service) { - ASSERT(status == UV_EAI_CANCELED); - ASSERT(hostname == NULL); - ASSERT(service == NULL); -} - - -static void work2_cb(uv_work_t* req) { - ASSERT(0 && "work2_cb called"); -} - - -static void done2_cb(uv_work_t* req, int status) { - ASSERT(status == UV_ECANCELED); - done2_cb_called++; -} - - -static void timer_cb(uv_timer_t* handle) { - struct cancel_info* ci; - uv_req_t* req; - unsigned i; - - ci = container_of(handle, struct cancel_info, timer_handle); - - for (i = 0; i < ci->nreqs; i++) { - req = (uv_req_t*) ((char*) ci->reqs + i * ci->stride); - ASSERT(0 == uv_cancel(req)); - } - - uv_close((uv_handle_t*) &ci->timer_handle, NULL); - unblock_threadpool(); - timer_cb_called++; -} - - -static void nop_work_cb(uv_work_t* req) { -} - - -static void nop_done_cb(uv_work_t* req, int status) { - req->data = "OK"; -} - - -TEST_IMPL(threadpool_cancel_getaddrinfo) { - uv_getaddrinfo_t reqs[4]; - struct cancel_info ci; - struct addrinfo hints; - uv_loop_t* loop; - int r; - - INIT_CANCEL_INFO(&ci, reqs); - loop = uv_default_loop(); - saturate_threadpool(); - - r = uv_getaddrinfo(loop, reqs + 0, getaddrinfo_cb, "fail", NULL, NULL); - ASSERT(r == 0); - - r = uv_getaddrinfo(loop, reqs + 1, getaddrinfo_cb, NULL, "fail", NULL); - ASSERT(r == 0); - - r = uv_getaddrinfo(loop, reqs + 2, getaddrinfo_cb, "fail", "fail", NULL); - ASSERT(r == 0); - - r = uv_getaddrinfo(loop, reqs + 3, getaddrinfo_cb, "fail", NULL, &hints); - ASSERT(r == 0); - - ASSERT(0 == uv_timer_init(loop, &ci.timer_handle)); - ASSERT(0 == uv_timer_start(&ci.timer_handle, timer_cb, 10, 0)); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - ASSERT(1 == timer_cb_called); - - cleanup_threadpool(); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(threadpool_cancel_getnameinfo) { - uv_getnameinfo_t reqs[4]; - struct sockaddr_in addr4; - struct cancel_info ci; - uv_loop_t* loop; - int r; - - r = uv_ip4_addr("127.0.0.1", 80, &addr4); - ASSERT(r == 0); - - INIT_CANCEL_INFO(&ci, reqs); - loop = uv_default_loop(); - saturate_threadpool(); - - r = uv_getnameinfo(loop, reqs + 0, getnameinfo_cb, (const struct sockaddr*)&addr4, 0); - ASSERT(r == 0); - - r = uv_getnameinfo(loop, reqs + 1, getnameinfo_cb, (const struct sockaddr*)&addr4, 0); - ASSERT(r == 0); - - r = uv_getnameinfo(loop, reqs + 2, getnameinfo_cb, (const struct sockaddr*)&addr4, 0); - ASSERT(r == 0); - - r = uv_getnameinfo(loop, reqs + 3, getnameinfo_cb, (const struct sockaddr*)&addr4, 0); - ASSERT(r == 0); - - ASSERT(0 == uv_timer_init(loop, &ci.timer_handle)); - ASSERT(0 == uv_timer_start(&ci.timer_handle, timer_cb, 10, 0)); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - ASSERT(1 == timer_cb_called); - - cleanup_threadpool(); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(threadpool_cancel_work) { - struct cancel_info ci; - uv_work_t reqs[16]; - uv_loop_t* loop; - unsigned i; - - INIT_CANCEL_INFO(&ci, reqs); - loop = uv_default_loop(); - saturate_threadpool(); - - for (i = 0; i < ARRAY_SIZE(reqs); i++) - ASSERT(0 == uv_queue_work(loop, reqs + i, work2_cb, done2_cb)); - - ASSERT(0 == uv_timer_init(loop, &ci.timer_handle)); - ASSERT(0 == uv_timer_start(&ci.timer_handle, timer_cb, 10, 0)); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - ASSERT(1 == timer_cb_called); - ASSERT(ARRAY_SIZE(reqs) == done2_cb_called); - - cleanup_threadpool(); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(threadpool_cancel_fs) { - struct cancel_info ci; - uv_fs_t reqs[25]; - uv_loop_t* loop; - unsigned n; - uv_buf_t iov; - - INIT_CANCEL_INFO(&ci, reqs); - loop = uv_default_loop(); - saturate_threadpool(); - iov = uv_buf_init(NULL, 0); - - /* Needs to match ARRAY_SIZE(fs_reqs). */ - n = 0; - ASSERT(0 == uv_fs_chmod(loop, reqs + n++, "/", 0, fs_cb)); - ASSERT(0 == uv_fs_chown(loop, reqs + n++, "/", 0, 0, fs_cb)); - ASSERT(0 == uv_fs_close(loop, reqs + n++, 0, fs_cb)); - ASSERT(0 == uv_fs_fchmod(loop, reqs + n++, 0, 0, fs_cb)); - ASSERT(0 == uv_fs_fchown(loop, reqs + n++, 0, 0, 0, fs_cb)); - ASSERT(0 == uv_fs_fdatasync(loop, reqs + n++, 0, fs_cb)); - ASSERT(0 == uv_fs_fstat(loop, reqs + n++, 0, fs_cb)); - ASSERT(0 == uv_fs_fsync(loop, reqs + n++, 0, fs_cb)); - ASSERT(0 == uv_fs_ftruncate(loop, reqs + n++, 0, 0, fs_cb)); - ASSERT(0 == uv_fs_futime(loop, reqs + n++, 0, 0, 0, fs_cb)); - ASSERT(0 == uv_fs_link(loop, reqs + n++, "/", "/", fs_cb)); - ASSERT(0 == uv_fs_lstat(loop, reqs + n++, "/", fs_cb)); - ASSERT(0 == uv_fs_mkdir(loop, reqs + n++, "/", 0, fs_cb)); - ASSERT(0 == uv_fs_open(loop, reqs + n++, "/", 0, 0, fs_cb)); - ASSERT(0 == uv_fs_read(loop, reqs + n++, 0, &iov, 1, 0, fs_cb)); - ASSERT(0 == uv_fs_scandir(loop, reqs + n++, "/", 0, fs_cb)); - ASSERT(0 == uv_fs_readlink(loop, reqs + n++, "/", fs_cb)); - ASSERT(0 == uv_fs_rename(loop, reqs + n++, "/", "/", fs_cb)); - ASSERT(0 == uv_fs_mkdir(loop, reqs + n++, "/", 0, fs_cb)); - ASSERT(0 == uv_fs_sendfile(loop, reqs + n++, 0, 0, 0, 0, fs_cb)); - ASSERT(0 == uv_fs_stat(loop, reqs + n++, "/", fs_cb)); - ASSERT(0 == uv_fs_symlink(loop, reqs + n++, "/", "/", 0, fs_cb)); - ASSERT(0 == uv_fs_unlink(loop, reqs + n++, "/", fs_cb)); - ASSERT(0 == uv_fs_utime(loop, reqs + n++, "/", 0, 0, fs_cb)); - ASSERT(0 == uv_fs_write(loop, reqs + n++, 0, &iov, 1, 0, fs_cb)); - ASSERT(n == ARRAY_SIZE(reqs)); - - ASSERT(0 == uv_timer_init(loop, &ci.timer_handle)); - ASSERT(0 == uv_timer_start(&ci.timer_handle, timer_cb, 10, 0)); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - ASSERT(n == fs_cb_called); - ASSERT(1 == timer_cb_called); - - cleanup_threadpool(); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(threadpool_cancel_single) { - uv_loop_t* loop; - uv_work_t req; - int cancelled; - int i; - - loop = uv_default_loop(); - for (i = 0; i < 5000; i++) { - req.data = NULL; - ASSERT(0 == uv_queue_work(loop, &req, nop_work_cb, nop_done_cb)); - - cancelled = uv_cancel((uv_req_t*) &req); - if (cancelled == 0) - break; - - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - } - - if (cancelled != 0) { - fputs("Failed to cancel a work req in 5,000 iterations, giving up.\n", - stderr); - return 1; - } - - ASSERT(req.data == NULL); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - ASSERT(req.data != NULL); /* Should have been updated by nop_done_cb(). */ - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-threadpool.c b/outside/libuv-v1.7.5/test/test-threadpool.c deleted file mode 100644 index e3d17d754..000000000 --- a/outside/libuv-v1.7.5/test/test-threadpool.c +++ /dev/null @@ -1,76 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -static int work_cb_count; -static int after_work_cb_count; -static uv_work_t work_req; -static char data; - - -static void work_cb(uv_work_t* req) { - ASSERT(req == &work_req); - ASSERT(req->data == &data); - work_cb_count++; -} - - -static void after_work_cb(uv_work_t* req, int status) { - ASSERT(status == 0); - ASSERT(req == &work_req); - ASSERT(req->data == &data); - after_work_cb_count++; -} - - -TEST_IMPL(threadpool_queue_work_simple) { - int r; - - work_req.data = &data; - r = uv_queue_work(uv_default_loop(), &work_req, work_cb, after_work_cb); - ASSERT(r == 0); - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(work_cb_count == 1); - ASSERT(after_work_cb_count == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(threadpool_queue_work_einval) { - int r; - - work_req.data = &data; - r = uv_queue_work(uv_default_loop(), &work_req, NULL, after_work_cb); - ASSERT(r == UV_EINVAL); - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(work_cb_count == 0); - ASSERT(after_work_cb_count == 0); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-timer-again.c b/outside/libuv-v1.7.5/test/test-timer-again.c deleted file mode 100644 index f93c509be..000000000 --- a/outside/libuv-v1.7.5/test/test-timer-again.c +++ /dev/null @@ -1,141 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - - -static int close_cb_called = 0; -static int repeat_1_cb_called = 0; -static int repeat_2_cb_called = 0; - -static int repeat_2_cb_allowed = 0; - -static uv_timer_t dummy, repeat_1, repeat_2; - -static uint64_t start_time; - - -static void close_cb(uv_handle_t* handle) { - ASSERT(handle != NULL); - - close_cb_called++; -} - - -static void repeat_1_cb(uv_timer_t* handle) { - int r; - - ASSERT(handle == &repeat_1); - ASSERT(uv_timer_get_repeat((uv_timer_t*)handle) == 50); - - fprintf(stderr, "repeat_1_cb called after %ld ms\n", - (long int)(uv_now(uv_default_loop()) - start_time)); - fflush(stderr); - - repeat_1_cb_called++; - - r = uv_timer_again(&repeat_2); - ASSERT(r == 0); - - if (repeat_1_cb_called == 10) { - uv_close((uv_handle_t*)handle, close_cb); - /* We're not calling uv_timer_again on repeat_2 any more, so after this */ - /* timer_2_cb is expected. */ - repeat_2_cb_allowed = 1; - return; - } -} - - -static void repeat_2_cb(uv_timer_t* handle) { - ASSERT(handle == &repeat_2); - ASSERT(repeat_2_cb_allowed); - - fprintf(stderr, "repeat_2_cb called after %ld ms\n", - (long int)(uv_now(uv_default_loop()) - start_time)); - fflush(stderr); - - repeat_2_cb_called++; - - if (uv_timer_get_repeat(&repeat_2) == 0) { - ASSERT(0 == uv_is_active((uv_handle_t*) handle)); - uv_close((uv_handle_t*)handle, close_cb); - return; - } - - fprintf(stderr, "uv_timer_get_repeat %ld ms\n", - (long int)uv_timer_get_repeat(&repeat_2)); - fflush(stderr); - ASSERT(uv_timer_get_repeat(&repeat_2) == 100); - - /* This shouldn't take effect immediately. */ - uv_timer_set_repeat(&repeat_2, 0); -} - - -TEST_IMPL(timer_again) { - int r; - - start_time = uv_now(uv_default_loop()); - ASSERT(0 < start_time); - - /* Verify that it is not possible to uv_timer_again a never-started timer. */ - r = uv_timer_init(uv_default_loop(), &dummy); - ASSERT(r == 0); - r = uv_timer_again(&dummy); - ASSERT(r == UV_EINVAL); - uv_unref((uv_handle_t*)&dummy); - - /* Start timer repeat_1. */ - r = uv_timer_init(uv_default_loop(), &repeat_1); - ASSERT(r == 0); - r = uv_timer_start(&repeat_1, repeat_1_cb, 50, 0); - ASSERT(r == 0); - ASSERT(uv_timer_get_repeat(&repeat_1) == 0); - - /* Actually make repeat_1 repeating. */ - uv_timer_set_repeat(&repeat_1, 50); - ASSERT(uv_timer_get_repeat(&repeat_1) == 50); - - /* - * Start another repeating timer. It'll be again()ed by the repeat_1 so - * it should not time out until repeat_1 stops. - */ - r = uv_timer_init(uv_default_loop(), &repeat_2); - ASSERT(r == 0); - r = uv_timer_start(&repeat_2, repeat_2_cb, 100, 100); - ASSERT(r == 0); - ASSERT(uv_timer_get_repeat(&repeat_2) == 100); - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(repeat_1_cb_called == 10); - ASSERT(repeat_2_cb_called == 2); - ASSERT(close_cb_called == 2); - - fprintf(stderr, "Test took %ld ms (expected ~700 ms)\n", - (long int)(uv_now(uv_default_loop()) - start_time)); - fflush(stderr); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-timer-from-check.c b/outside/libuv-v1.7.5/test/test-timer-from-check.c deleted file mode 100644 index a18c7e1fb..000000000 --- a/outside/libuv-v1.7.5/test/test-timer-from-check.c +++ /dev/null @@ -1,80 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -static uv_prepare_t prepare_handle; -static uv_check_t check_handle; -static uv_timer_t timer_handle; - -static int prepare_cb_called; -static int check_cb_called; -static int timer_cb_called; - - -static void prepare_cb(uv_prepare_t* handle) { - ASSERT(0 == uv_prepare_stop(&prepare_handle)); - ASSERT(0 == prepare_cb_called); - ASSERT(1 == check_cb_called); - ASSERT(0 == timer_cb_called); - prepare_cb_called++; -} - - -static void timer_cb(uv_timer_t* handle) { - ASSERT(0 == uv_timer_stop(&timer_handle)); - ASSERT(1 == prepare_cb_called); - ASSERT(1 == check_cb_called); - ASSERT(0 == timer_cb_called); - timer_cb_called++; -} - - -static void check_cb(uv_check_t* handle) { - ASSERT(0 == uv_check_stop(&check_handle)); - ASSERT(0 == uv_timer_stop(&timer_handle)); /* Runs before timer_cb. */ - ASSERT(0 == uv_timer_start(&timer_handle, timer_cb, 50, 0)); - ASSERT(0 == uv_prepare_start(&prepare_handle, prepare_cb)); - ASSERT(0 == prepare_cb_called); - ASSERT(0 == check_cb_called); - ASSERT(0 == timer_cb_called); - check_cb_called++; -} - - -TEST_IMPL(timer_from_check) { - ASSERT(0 == uv_prepare_init(uv_default_loop(), &prepare_handle)); - ASSERT(0 == uv_check_init(uv_default_loop(), &check_handle)); - ASSERT(0 == uv_check_start(&check_handle, check_cb)); - ASSERT(0 == uv_timer_init(uv_default_loop(), &timer_handle)); - ASSERT(0 == uv_timer_start(&timer_handle, timer_cb, 50, 0)); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - ASSERT(1 == prepare_cb_called); - ASSERT(1 == check_cb_called); - ASSERT(1 == timer_cb_called); - uv_close((uv_handle_t*) &prepare_handle, NULL); - uv_close((uv_handle_t*) &check_handle, NULL); - uv_close((uv_handle_t*) &timer_handle, NULL); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_ONCE)); - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-timer.c b/outside/libuv-v1.7.5/test/test-timer.c deleted file mode 100644 index aba050fd6..000000000 --- a/outside/libuv-v1.7.5/test/test-timer.c +++ /dev/null @@ -1,303 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - - -static int once_cb_called = 0; -static int once_close_cb_called = 0; -static int repeat_cb_called = 0; -static int repeat_close_cb_called = 0; -static int order_cb_called = 0; -static uint64_t start_time; -static uv_timer_t tiny_timer; -static uv_timer_t huge_timer1; -static uv_timer_t huge_timer2; - - -static void once_close_cb(uv_handle_t* handle) { - printf("ONCE_CLOSE_CB\n"); - - ASSERT(handle != NULL); - ASSERT(0 == uv_is_active(handle)); - - once_close_cb_called++; -} - - -static void once_cb(uv_timer_t* handle) { - printf("ONCE_CB %d\n", once_cb_called); - - ASSERT(handle != NULL); - ASSERT(0 == uv_is_active((uv_handle_t*) handle)); - - once_cb_called++; - - uv_close((uv_handle_t*)handle, once_close_cb); - - /* Just call this randomly for the code coverage. */ - uv_update_time(uv_default_loop()); -} - - -static void repeat_close_cb(uv_handle_t* handle) { - printf("REPEAT_CLOSE_CB\n"); - - ASSERT(handle != NULL); - - repeat_close_cb_called++; -} - - -static void repeat_cb(uv_timer_t* handle) { - printf("REPEAT_CB\n"); - - ASSERT(handle != NULL); - ASSERT(1 == uv_is_active((uv_handle_t*) handle)); - - repeat_cb_called++; - - if (repeat_cb_called == 5) { - uv_close((uv_handle_t*)handle, repeat_close_cb); - } -} - - -static void never_cb(uv_timer_t* handle) { - FATAL("never_cb should never be called"); -} - - -TEST_IMPL(timer) { - uv_timer_t once_timers[10]; - uv_timer_t *once; - uv_timer_t repeat, never; - unsigned int i; - int r; - - start_time = uv_now(uv_default_loop()); - ASSERT(0 < start_time); - - /* Let 10 timers time out in 500 ms total. */ - for (i = 0; i < ARRAY_SIZE(once_timers); i++) { - once = once_timers + i; - r = uv_timer_init(uv_default_loop(), once); - ASSERT(r == 0); - r = uv_timer_start(once, once_cb, i * 50, 0); - ASSERT(r == 0); - } - - /* The 11th timer is a repeating timer that runs 4 times */ - r = uv_timer_init(uv_default_loop(), &repeat); - ASSERT(r == 0); - r = uv_timer_start(&repeat, repeat_cb, 100, 100); - ASSERT(r == 0); - - /* The 12th timer should not do anything. */ - r = uv_timer_init(uv_default_loop(), &never); - ASSERT(r == 0); - r = uv_timer_start(&never, never_cb, 100, 100); - ASSERT(r == 0); - r = uv_timer_stop(&never); - ASSERT(r == 0); - uv_unref((uv_handle_t*)&never); - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(once_cb_called == 10); - ASSERT(once_close_cb_called == 10); - printf("repeat_cb_called %d\n", repeat_cb_called); - ASSERT(repeat_cb_called == 5); - ASSERT(repeat_close_cb_called == 1); - - ASSERT(500 <= uv_now(uv_default_loop()) - start_time); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(timer_start_twice) { - uv_timer_t once; - int r; - - r = uv_timer_init(uv_default_loop(), &once); - ASSERT(r == 0); - r = uv_timer_start(&once, never_cb, 86400 * 1000, 0); - ASSERT(r == 0); - r = uv_timer_start(&once, once_cb, 10, 0); - ASSERT(r == 0); - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - - ASSERT(once_cb_called == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(timer_init) { - uv_timer_t handle; - - ASSERT(0 == uv_timer_init(uv_default_loop(), &handle)); - ASSERT(0 == uv_timer_get_repeat(&handle)); - ASSERT(0 == uv_is_active((uv_handle_t*) &handle)); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -static void order_cb_a(uv_timer_t *handle) { - ASSERT(order_cb_called++ == *(int*)handle->data); -} - - -static void order_cb_b(uv_timer_t *handle) { - ASSERT(order_cb_called++ == *(int*)handle->data); -} - - -TEST_IMPL(timer_order) { - int first; - int second; - uv_timer_t handle_a; - uv_timer_t handle_b; - - first = 0; - second = 1; - ASSERT(0 == uv_timer_init(uv_default_loop(), &handle_a)); - ASSERT(0 == uv_timer_init(uv_default_loop(), &handle_b)); - - /* Test for starting handle_a then handle_b */ - handle_a.data = &first; - ASSERT(0 == uv_timer_start(&handle_a, order_cb_a, 0, 0)); - handle_b.data = &second; - ASSERT(0 == uv_timer_start(&handle_b, order_cb_b, 0, 0)); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - - ASSERT(order_cb_called == 2); - - ASSERT(0 == uv_timer_stop(&handle_a)); - ASSERT(0 == uv_timer_stop(&handle_b)); - - /* Test for starting handle_b then handle_a */ - order_cb_called = 0; - handle_b.data = &first; - ASSERT(0 == uv_timer_start(&handle_b, order_cb_b, 0, 0)); - - handle_a.data = &second; - ASSERT(0 == uv_timer_start(&handle_a, order_cb_a, 0, 0)); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - - ASSERT(order_cb_called == 2); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -static void tiny_timer_cb(uv_timer_t* handle) { - ASSERT(handle == &tiny_timer); - uv_close((uv_handle_t*) &tiny_timer, NULL); - uv_close((uv_handle_t*) &huge_timer1, NULL); - uv_close((uv_handle_t*) &huge_timer2, NULL); -} - - -TEST_IMPL(timer_huge_timeout) { - ASSERT(0 == uv_timer_init(uv_default_loop(), &tiny_timer)); - ASSERT(0 == uv_timer_init(uv_default_loop(), &huge_timer1)); - ASSERT(0 == uv_timer_init(uv_default_loop(), &huge_timer2)); - ASSERT(0 == uv_timer_start(&tiny_timer, tiny_timer_cb, 1, 0)); - ASSERT(0 == uv_timer_start(&huge_timer1, tiny_timer_cb, 0xffffffffffffLL, 0)); - ASSERT(0 == uv_timer_start(&huge_timer2, tiny_timer_cb, (uint64_t) -1, 0)); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -static void huge_repeat_cb(uv_timer_t* handle) { - static int ncalls; - - if (ncalls == 0) - ASSERT(handle == &huge_timer1); - else - ASSERT(handle == &tiny_timer); - - if (++ncalls == 10) { - uv_close((uv_handle_t*) &tiny_timer, NULL); - uv_close((uv_handle_t*) &huge_timer1, NULL); - } -} - - -TEST_IMPL(timer_huge_repeat) { - ASSERT(0 == uv_timer_init(uv_default_loop(), &tiny_timer)); - ASSERT(0 == uv_timer_init(uv_default_loop(), &huge_timer1)); - ASSERT(0 == uv_timer_start(&tiny_timer, huge_repeat_cb, 2, 2)); - ASSERT(0 == uv_timer_start(&huge_timer1, huge_repeat_cb, 1, (uint64_t) -1)); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -static unsigned int timer_run_once_timer_cb_called; - - -static void timer_run_once_timer_cb(uv_timer_t* handle) { - timer_run_once_timer_cb_called++; -} - - -TEST_IMPL(timer_run_once) { - uv_timer_t timer_handle; - - ASSERT(0 == uv_timer_init(uv_default_loop(), &timer_handle)); - ASSERT(0 == uv_timer_start(&timer_handle, timer_run_once_timer_cb, 0, 0)); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_ONCE)); - ASSERT(1 == timer_run_once_timer_cb_called); - - ASSERT(0 == uv_timer_start(&timer_handle, timer_run_once_timer_cb, 1, 0)); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_ONCE)); - ASSERT(2 == timer_run_once_timer_cb_called); - - uv_close((uv_handle_t*) &timer_handle, NULL); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_ONCE)); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(timer_null_callback) { - uv_timer_t handle; - - ASSERT(0 == uv_timer_init(uv_default_loop(), &handle)); - ASSERT(UV_EINVAL == uv_timer_start(&handle, NULL, 100, 100)); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-tty.c b/outside/libuv-v1.7.5/test/test-tty.c deleted file mode 100644 index 81e612c1d..000000000 --- a/outside/libuv-v1.7.5/test/test-tty.c +++ /dev/null @@ -1,181 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#ifdef _WIN32 -# include -# include -#else /* Unix */ -# include -# include -#endif - -#include -#include - - -TEST_IMPL(tty) { - int r, width, height; - int ttyin_fd, ttyout_fd; - uv_tty_t tty_in, tty_out; - uv_loop_t* loop = uv_default_loop(); - - /* Make sure we have an FD that refers to a tty */ -#ifdef _WIN32 - HANDLE handle; - handle = CreateFileA("conin$", - GENERIC_READ | GENERIC_WRITE, - FILE_SHARE_READ | FILE_SHARE_WRITE, - NULL, - OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, - NULL); - ASSERT(handle != INVALID_HANDLE_VALUE); - ttyin_fd = _open_osfhandle((intptr_t) handle, 0); - - handle = CreateFileA("conout$", - GENERIC_READ | GENERIC_WRITE, - FILE_SHARE_READ | FILE_SHARE_WRITE, - NULL, - OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, - NULL); - ASSERT(handle != INVALID_HANDLE_VALUE); - ttyout_fd = _open_osfhandle((intptr_t) handle, 0); - -#else /* unix */ - ttyin_fd = open("/dev/tty", O_RDONLY, 0); - if (ttyin_fd < 0) { - fprintf(stderr, "Cannot open /dev/tty as read-only: %s\n", strerror(errno)); - fflush(stderr); - return TEST_SKIP; - } - - ttyout_fd = open("/dev/tty", O_WRONLY, 0); - if (ttyout_fd < 0) { - fprintf(stderr, "Cannot open /dev/tty as write-only: %s\n", strerror(errno)); - fflush(stderr); - return TEST_SKIP; - } -#endif - - ASSERT(ttyin_fd >= 0); - ASSERT(ttyout_fd >= 0); - - ASSERT(UV_UNKNOWN_HANDLE == uv_guess_handle(-1)); - - ASSERT(UV_TTY == uv_guess_handle(ttyin_fd)); - ASSERT(UV_TTY == uv_guess_handle(ttyout_fd)); - - r = uv_tty_init(uv_default_loop(), &tty_in, ttyin_fd, 1); /* Readable. */ - ASSERT(r == 0); - - r = uv_tty_init(uv_default_loop(), &tty_out, ttyout_fd, 0); /* Writable. */ - ASSERT(r == 0); - - r = uv_tty_get_winsize(&tty_out, &width, &height); - ASSERT(r == 0); - - printf("width=%d height=%d\n", width, height); - - if (width == 0 && height == 0) { - /* Some environments such as containers or Jenkins behave like this - * sometimes */ - MAKE_VALGRIND_HAPPY(); - return TEST_SKIP; - } - - /* - * Is it a safe assumption that most people have terminals larger than - * 10x10? - */ - ASSERT(width > 10); - ASSERT(height > 10); - - /* Turn on raw mode. */ - r = uv_tty_set_mode(&tty_in, UV_TTY_MODE_RAW); - ASSERT(r == 0); - - /* Turn off raw mode. */ - r = uv_tty_set_mode(&tty_in, UV_TTY_MODE_NORMAL); - ASSERT(r == 0); - - /* Calling uv_tty_reset_mode() repeatedly should not clobber errno. */ - errno = 0; - ASSERT(0 == uv_tty_reset_mode()); - ASSERT(0 == uv_tty_reset_mode()); - ASSERT(0 == uv_tty_reset_mode()); - ASSERT(0 == errno); - - /* TODO check the actual mode! */ - - uv_close((uv_handle_t*) &tty_in, NULL); - uv_close((uv_handle_t*) &tty_out, NULL); - - uv_run(loop, UV_RUN_DEFAULT); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(tty_file) { -#ifndef _WIN32 - uv_loop_t loop; - uv_tty_t tty; - int fd; - - ASSERT(0 == uv_loop_init(&loop)); - - fd = open("test/fixtures/empty_file", O_RDONLY); - if (fd != -1) { - ASSERT(UV_EINVAL == uv_tty_init(&loop, &tty, fd, 1)); - ASSERT(0 == close(fd)); - } - - fd = open("/dev/random", O_RDONLY); - if (fd != -1) { - ASSERT(UV_EINVAL == uv_tty_init(&loop, &tty, fd, 1)); - ASSERT(0 == close(fd)); - } - - fd = open("/dev/zero", O_RDONLY); - if (fd != -1) { - ASSERT(UV_EINVAL == uv_tty_init(&loop, &tty, fd, 1)); - ASSERT(0 == close(fd)); - } - - fd = open("/dev/tty", O_RDONLY); - if (fd != -1) { - ASSERT(0 == uv_tty_init(&loop, &tty, fd, 1)); - ASSERT(0 == close(fd)); - uv_close((uv_handle_t*) &tty, NULL); - } - - ASSERT(0 == uv_run(&loop, UV_RUN_DEFAULT)); - ASSERT(0 == uv_loop_close(&loop)); - - MAKE_VALGRIND_HAPPY(); -#endif - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-udp-bind.c b/outside/libuv-v1.7.5/test/test-udp-bind.c deleted file mode 100644 index a1e080ee7..000000000 --- a/outside/libuv-v1.7.5/test/test-udp-bind.c +++ /dev/null @@ -1,93 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#include -#include -#include - - -TEST_IMPL(udp_bind) { - struct sockaddr_in addr; - uv_loop_t* loop; - uv_udp_t h1, h2; - int r; - - ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); - - loop = uv_default_loop(); - - r = uv_udp_init(loop, &h1); - ASSERT(r == 0); - - r = uv_udp_init(loop, &h2); - ASSERT(r == 0); - - r = uv_udp_bind(&h1, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); - - r = uv_udp_bind(&h2, (const struct sockaddr*) &addr, 0); - ASSERT(r == UV_EADDRINUSE); - - uv_close((uv_handle_t*) &h1, NULL); - uv_close((uv_handle_t*) &h2, NULL); - - r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT(r == 0); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(udp_bind_reuseaddr) { - struct sockaddr_in addr; - uv_loop_t* loop; - uv_udp_t h1, h2; - int r; - - ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); - - loop = uv_default_loop(); - - r = uv_udp_init(loop, &h1); - ASSERT(r == 0); - - r = uv_udp_init(loop, &h2); - ASSERT(r == 0); - - r = uv_udp_bind(&h1, (const struct sockaddr*) &addr, UV_UDP_REUSEADDR); - ASSERT(r == 0); - - r = uv_udp_bind(&h2, (const struct sockaddr*) &addr, UV_UDP_REUSEADDR); - ASSERT(r == 0); - - uv_close((uv_handle_t*) &h1, NULL); - uv_close((uv_handle_t*) &h2, NULL); - - r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT(r == 0); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-udp-create-socket-early.c b/outside/libuv-v1.7.5/test/test-udp-create-socket-early.c deleted file mode 100644 index 3d0152428..000000000 --- a/outside/libuv-v1.7.5/test/test-udp-create-socket-early.c +++ /dev/null @@ -1,132 +0,0 @@ -/* Copyright (c) 2015 Saúl Ibarra Corretgé . - * All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" -#include - -#ifdef _WIN32 -# define INVALID_FD (INVALID_HANDLE_VALUE) -#else -# define INVALID_FD (-1) -#endif - - -TEST_IMPL(udp_create_early) { - struct sockaddr_in addr; - struct sockaddr_in sockname; - uv_udp_t client; - uv_os_fd_t fd; - int r, namelen; - - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - - r = uv_udp_init_ex(uv_default_loop(), &client, AF_INET); - ASSERT(r == 0); - - r = uv_fileno((const uv_handle_t*) &client, &fd); - ASSERT(r == 0); - ASSERT(fd != INVALID_FD); - - /* Windows returns WSAEINVAL if the socket is not bound */ -#ifndef _WIN32 - namelen = sizeof sockname; - r = uv_udp_getsockname(&client, (struct sockaddr*) &sockname, &namelen); - ASSERT(r == 0); - ASSERT(sockname.sin_family == AF_INET); -#endif - - r = uv_udp_bind(&client, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); - - namelen = sizeof sockname; - r = uv_udp_getsockname(&client, (struct sockaddr*) &sockname, &namelen); - ASSERT(r == 0); - ASSERT(memcmp(&addr.sin_addr, - &sockname.sin_addr, - sizeof(addr.sin_addr)) == 0); - - uv_close((uv_handle_t*) &client, NULL); - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(udp_create_early_bad_bind) { - struct sockaddr_in addr; - uv_udp_t client; - uv_os_fd_t fd; - int r; - - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - - r = uv_udp_init_ex(uv_default_loop(), &client, AF_INET6); - ASSERT(r == 0); - - r = uv_fileno((const uv_handle_t*) &client, &fd); - ASSERT(r == 0); - ASSERT(fd != INVALID_FD); - - /* Windows returns WSAEINVAL if the socket is not bound */ -#ifndef _WIN32 - { - int namelen; - struct sockaddr_in6 sockname; - namelen = sizeof sockname; - r = uv_udp_getsockname(&client, (struct sockaddr*) &sockname, &namelen); - ASSERT(r == 0); - ASSERT(sockname.sin6_family == AF_INET6); - } -#endif - - r = uv_udp_bind(&client, (const struct sockaddr*) &addr, 0); -#ifndef _WIN32 - ASSERT(r == UV_EINVAL); -#else - ASSERT(r == UV_EFAULT); -#endif - - uv_close((uv_handle_t*) &client, NULL); - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(udp_create_early_bad_domain) { - uv_udp_t client; - int r; - - r = uv_udp_init_ex(uv_default_loop(), &client, 47); - ASSERT(r == UV_EINVAL); - - r = uv_udp_init_ex(uv_default_loop(), &client, 1024); - ASSERT(r == UV_EINVAL); - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-udp-dgram-too-big.c b/outside/libuv-v1.7.5/test/test-udp-dgram-too-big.c deleted file mode 100644 index bd44c4252..000000000 --- a/outside/libuv-v1.7.5/test/test-udp-dgram-too-big.c +++ /dev/null @@ -1,91 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#include -#include -#include - -#define CHECK_HANDLE(handle) \ - ASSERT((uv_udp_t*)(handle) == &handle_) - -#define CHECK_REQ(req) \ - ASSERT((req) == &req_); - -static uv_udp_t handle_; -static uv_udp_send_t req_; - -static int send_cb_called; -static int close_cb_called; - - -static void close_cb(uv_handle_t* handle) { - CHECK_HANDLE(handle); - close_cb_called++; -} - - -static void send_cb(uv_udp_send_t* req, int status) { - CHECK_REQ(req); - CHECK_HANDLE(req->handle); - - ASSERT(status == UV_EMSGSIZE); - - uv_close((uv_handle_t*)req->handle, close_cb); - send_cb_called++; -} - - -TEST_IMPL(udp_dgram_too_big) { - char dgram[65536]; /* 64K MTU is unlikely, even on localhost */ - struct sockaddr_in addr; - uv_buf_t buf; - int r; - - memset(dgram, 42, sizeof dgram); /* silence valgrind */ - - r = uv_udp_init(uv_default_loop(), &handle_); - ASSERT(r == 0); - - buf = uv_buf_init(dgram, sizeof dgram); - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - - r = uv_udp_send(&req_, - &handle_, - &buf, - 1, - (const struct sockaddr*) &addr, - send_cb); - ASSERT(r == 0); - - ASSERT(close_cb_called == 0); - ASSERT(send_cb_called == 0); - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(send_cb_called == 1); - ASSERT(close_cb_called == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-udp-ipv6.c b/outside/libuv-v1.7.5/test/test-udp-ipv6.c deleted file mode 100644 index 1d5720ce7..000000000 --- a/outside/libuv-v1.7.5/test/test-udp-ipv6.c +++ /dev/null @@ -1,172 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#include -#include -#include - -#define CHECK_HANDLE(handle) \ - ASSERT((uv_udp_t*)(handle) == &server \ - || (uv_udp_t*)(handle) == &client \ - || (uv_timer_t*)(handle) == &timeout) - -#define CHECK_REQ(req) \ - ASSERT((req) == &req_); - -static uv_udp_t client; -static uv_udp_t server; -static uv_udp_send_t req_; -static uv_timer_t timeout; - -static int send_cb_called; -static int recv_cb_called; -static int close_cb_called; - - -static void alloc_cb(uv_handle_t* handle, - size_t suggested_size, - uv_buf_t* buf) { - static char slab[65536]; - CHECK_HANDLE(handle); - buf->base = slab; - buf->len = sizeof(slab); -} - - -static void close_cb(uv_handle_t* handle) { - CHECK_HANDLE(handle); - close_cb_called++; -} - - -static void send_cb(uv_udp_send_t* req, int status) { - CHECK_REQ(req); - CHECK_HANDLE(req->handle); - ASSERT(status == 0); - send_cb_called++; -} - - -static void ipv6_recv_fail(uv_udp_t* handle, - ssize_t nread, - const uv_buf_t* buf, - const struct sockaddr* addr, - unsigned flags) { - ASSERT(0 && "this function should not have been called"); -} - - -static void ipv6_recv_ok(uv_udp_t* handle, - ssize_t nread, - const uv_buf_t* buf, - const struct sockaddr* addr, - unsigned flags) { - CHECK_HANDLE(handle); - ASSERT(nread >= 0); - - if (nread) - recv_cb_called++; -} - - -static void timeout_cb(uv_timer_t* timer) { - uv_close((uv_handle_t*)&server, close_cb); - uv_close((uv_handle_t*)&client, close_cb); - uv_close((uv_handle_t*)&timeout, close_cb); -} - - -static void do_test(uv_udp_recv_cb recv_cb, int bind_flags) { - struct sockaddr_in6 addr6; - struct sockaddr_in addr; - uv_buf_t buf; - int r; - - ASSERT(0 == uv_ip6_addr("::0", TEST_PORT, &addr6)); - - r = uv_udp_init(uv_default_loop(), &server); - ASSERT(r == 0); - - r = uv_udp_bind(&server, (const struct sockaddr*) &addr6, bind_flags); - ASSERT(r == 0); - - r = uv_udp_recv_start(&server, alloc_cb, recv_cb); - ASSERT(r == 0); - - r = uv_udp_init(uv_default_loop(), &client); - ASSERT(r == 0); - - buf = uv_buf_init("PING", 4); - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - - r = uv_udp_send(&req_, - &client, - &buf, - 1, - (const struct sockaddr*) &addr, - send_cb); - ASSERT(r == 0); - - r = uv_timer_init(uv_default_loop(), &timeout); - ASSERT(r == 0); - - r = uv_timer_start(&timeout, timeout_cb, 500, 0); - ASSERT(r == 0); - - ASSERT(close_cb_called == 0); - ASSERT(send_cb_called == 0); - ASSERT(recv_cb_called == 0); - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(close_cb_called == 3); - - MAKE_VALGRIND_HAPPY(); -} - - -TEST_IMPL(udp_dual_stack) { - if (!can_ipv6()) - RETURN_SKIP("IPv6 not supported"); - - do_test(ipv6_recv_ok, 0); - - ASSERT(recv_cb_called == 1); - ASSERT(send_cb_called == 1); - - return 0; -} - - -TEST_IMPL(udp_ipv6_only) { - if (!can_ipv6()) - RETURN_SKIP("IPv6 not supported"); - - do_test(ipv6_recv_fail, UV_UDP_IPV6ONLY); - - ASSERT(recv_cb_called == 0); - ASSERT(send_cb_called == 1); - - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-udp-multicast-interface.c b/outside/libuv-v1.7.5/test/test-udp-multicast-interface.c deleted file mode 100644 index 71001a77e..000000000 --- a/outside/libuv-v1.7.5/test/test-udp-multicast-interface.c +++ /dev/null @@ -1,99 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#include -#include -#include - -#define CHECK_HANDLE(handle) \ - ASSERT((uv_udp_t*)(handle) == &server || (uv_udp_t*)(handle) == &client) - -static uv_udp_t server; -static uv_udp_t client; - -static int sv_send_cb_called; -static int close_cb_called; - - -static void close_cb(uv_handle_t* handle) { - CHECK_HANDLE(handle); - close_cb_called++; -} - - -static void sv_send_cb(uv_udp_send_t* req, int status) { - ASSERT(req != NULL); - ASSERT(status == 0 || status == UV_ENETUNREACH); - CHECK_HANDLE(req->handle); - - sv_send_cb_called++; - - uv_close((uv_handle_t*) req->handle, close_cb); -} - - -TEST_IMPL(udp_multicast_interface) { - int r; - uv_udp_send_t req; - uv_buf_t buf; - struct sockaddr_in addr; - struct sockaddr_in baddr; - - ASSERT(0 == uv_ip4_addr("239.255.0.1", TEST_PORT, &addr)); - - r = uv_udp_init(uv_default_loop(), &server); - ASSERT(r == 0); - - ASSERT(0 == uv_ip4_addr("0.0.0.0", 0, &baddr)); - r = uv_udp_bind(&server, (const struct sockaddr*)&baddr, 0); - ASSERT(r == 0); - - r = uv_udp_set_multicast_interface(&server, "0.0.0.0"); - ASSERT(r == 0); - - /* server sends "PING" */ - buf = uv_buf_init("PING", 4); - r = uv_udp_send(&req, - &server, - &buf, - 1, - (const struct sockaddr*)&addr, - sv_send_cb); - ASSERT(r == 0); - - ASSERT(close_cb_called == 0); - ASSERT(sv_send_cb_called == 0); - - /* run the loop till all events are processed */ - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(sv_send_cb_called == 1); - ASSERT(close_cb_called == 1); - - ASSERT(client.send_queue_size == 0); - ASSERT(server.send_queue_size == 0); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-udp-multicast-interface6.c b/outside/libuv-v1.7.5/test/test-udp-multicast-interface6.c deleted file mode 100644 index d3881e83b..000000000 --- a/outside/libuv-v1.7.5/test/test-udp-multicast-interface6.c +++ /dev/null @@ -1,103 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#include -#include -#include - -#define CHECK_HANDLE(handle) \ - ASSERT((uv_udp_t*)(handle) == &server || (uv_udp_t*)(handle) == &client) - -static uv_udp_t server; -static uv_udp_t client; - -static int sv_send_cb_called; -static int close_cb_called; - - -static void close_cb(uv_handle_t* handle) { - CHECK_HANDLE(handle); - close_cb_called++; -} - - -static void sv_send_cb(uv_udp_send_t* req, int status) { - ASSERT(req != NULL); - ASSERT(status == 0); - CHECK_HANDLE(req->handle); - - sv_send_cb_called++; - - uv_close((uv_handle_t*) req->handle, close_cb); -} - - -TEST_IMPL(udp_multicast_interface6) { - int r; - uv_udp_send_t req; - uv_buf_t buf; - struct sockaddr_in6 addr; - struct sockaddr_in6 baddr; - - if (!can_ipv6()) - RETURN_SKIP("IPv6 not supported"); - - ASSERT(0 == uv_ip6_addr("::1", TEST_PORT, &addr)); - - r = uv_udp_init(uv_default_loop(), &server); - ASSERT(r == 0); - - ASSERT(0 == uv_ip6_addr("::", 0, &baddr)); - r = uv_udp_bind(&server, (const struct sockaddr*)&baddr, 0); - ASSERT(r == 0); - -#if defined(__APPLE__) || defined(__FreeBSD__) - r = uv_udp_set_multicast_interface(&server, "::1%lo0"); -#else - r = uv_udp_set_multicast_interface(&server, NULL); -#endif - ASSERT(r == 0); - - /* server sends "PING" */ - buf = uv_buf_init("PING", 4); - r = uv_udp_send(&req, - &server, - &buf, - 1, - (const struct sockaddr*)&addr, - sv_send_cb); - ASSERT(r == 0); - - ASSERT(close_cb_called == 0); - ASSERT(sv_send_cb_called == 0); - - /* run the loop till all events are processed */ - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(sv_send_cb_called == 1); - ASSERT(close_cb_called == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-udp-multicast-join.c b/outside/libuv-v1.7.5/test/test-udp-multicast-join.c deleted file mode 100644 index 6110a8d92..000000000 --- a/outside/libuv-v1.7.5/test/test-udp-multicast-join.c +++ /dev/null @@ -1,150 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#include -#include -#include - -#define CHECK_HANDLE(handle) \ - ASSERT((uv_udp_t*)(handle) == &server || (uv_udp_t*)(handle) == &client) - -static uv_udp_t server; -static uv_udp_t client; - -static int cl_recv_cb_called; - -static int sv_send_cb_called; - -static int close_cb_called; - -static void alloc_cb(uv_handle_t* handle, - size_t suggested_size, - uv_buf_t* buf) { - static char slab[65536]; - CHECK_HANDLE(handle); - ASSERT(suggested_size <= sizeof(slab)); - buf->base = slab; - buf->len = sizeof(slab); -} - - -static void close_cb(uv_handle_t* handle) { - CHECK_HANDLE(handle); - close_cb_called++; -} - - -static void sv_send_cb(uv_udp_send_t* req, int status) { - ASSERT(req != NULL); - ASSERT(status == 0); - CHECK_HANDLE(req->handle); - - sv_send_cb_called++; - - uv_close((uv_handle_t*) req->handle, close_cb); -} - - -static void cl_recv_cb(uv_udp_t* handle, - ssize_t nread, - const uv_buf_t* buf, - const struct sockaddr* addr, - unsigned flags) { - CHECK_HANDLE(handle); - ASSERT(flags == 0); - - cl_recv_cb_called++; - - if (nread < 0) { - ASSERT(0 && "unexpected error"); - } - - if (nread == 0) { - /* Returning unused buffer */ - /* Don't count towards cl_recv_cb_called */ - ASSERT(addr == NULL); - return; - } - - ASSERT(addr != NULL); - ASSERT(nread == 4); - ASSERT(!memcmp("PING", buf->base, nread)); - - /* we are done with the client handle, we can close it */ - uv_close((uv_handle_t*) &client, close_cb); -} - - -TEST_IMPL(udp_multicast_join) { - int r; - uv_udp_send_t req; - uv_buf_t buf; - struct sockaddr_in addr; - - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - - r = uv_udp_init(uv_default_loop(), &server); - ASSERT(r == 0); - - r = uv_udp_init(uv_default_loop(), &client); - ASSERT(r == 0); - - /* bind to the desired port */ - r = uv_udp_bind(&client, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); - - /* join the multicast channel */ - r = uv_udp_set_membership(&client, "239.255.0.1", NULL, UV_JOIN_GROUP); - if (r == UV_ENODEV) - RETURN_SKIP("No multicast support."); - ASSERT(r == 0); - - r = uv_udp_recv_start(&client, alloc_cb, cl_recv_cb); - ASSERT(r == 0); - - buf = uv_buf_init("PING", 4); - - /* server sends "PING" */ - r = uv_udp_send(&req, - &server, - &buf, - 1, - (const struct sockaddr*) &addr, - sv_send_cb); - ASSERT(r == 0); - - ASSERT(close_cb_called == 0); - ASSERT(cl_recv_cb_called == 0); - ASSERT(sv_send_cb_called == 0); - - /* run the loop till all events are processed */ - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(cl_recv_cb_called == 1); - ASSERT(sv_send_cb_called == 1); - ASSERT(close_cb_called == 2); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-udp-multicast-join6.c b/outside/libuv-v1.7.5/test/test-udp-multicast-join6.c deleted file mode 100644 index 873cb6d81..000000000 --- a/outside/libuv-v1.7.5/test/test-udp-multicast-join6.c +++ /dev/null @@ -1,161 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#include -#include -#include - - -#define CHECK_HANDLE(handle) \ - ASSERT((uv_udp_t*)(handle) == &server || (uv_udp_t*)(handle) == &client) - -static uv_udp_t server; -static uv_udp_t client; - -static int cl_recv_cb_called; - -static int sv_send_cb_called; - -static int close_cb_called; - -static void alloc_cb(uv_handle_t* handle, - size_t suggested_size, - uv_buf_t* buf) { - static char slab[65536]; - CHECK_HANDLE(handle); - ASSERT(suggested_size <= sizeof(slab)); - buf->base = slab; - buf->len = sizeof(slab); -} - - -static void close_cb(uv_handle_t* handle) { - CHECK_HANDLE(handle); - close_cb_called++; -} - - -static void sv_send_cb(uv_udp_send_t* req, int status) { - ASSERT(req != NULL); - ASSERT(status == 0); - CHECK_HANDLE(req->handle); - - sv_send_cb_called++; - - uv_close((uv_handle_t*) req->handle, close_cb); -} - - -static void cl_recv_cb(uv_udp_t* handle, - ssize_t nread, - const uv_buf_t* buf, - const struct sockaddr* addr, - unsigned flags) { - CHECK_HANDLE(handle); - ASSERT(flags == 0); - - cl_recv_cb_called++; - - if (nread < 0) { - ASSERT(0 && "unexpected error"); - } - - if (nread == 0) { - /* Returning unused buffer */ - /* Don't count towards cl_recv_cb_called */ - ASSERT(addr == NULL); - return; - } - - ASSERT(addr != NULL); - ASSERT(nread == 4); - ASSERT(!memcmp("PING", buf->base, nread)); - - /* we are done with the client handle, we can close it */ - uv_close((uv_handle_t*) &client, close_cb); -} - - -TEST_IMPL(udp_multicast_join6) { - int r; - uv_udp_send_t req; - uv_buf_t buf; - struct sockaddr_in6 addr; - - if (!can_ipv6()) - RETURN_SKIP("IPv6 not supported"); - - ASSERT(0 == uv_ip6_addr("::1", TEST_PORT, &addr)); - - r = uv_udp_init(uv_default_loop(), &server); - ASSERT(r == 0); - - r = uv_udp_init(uv_default_loop(), &client); - ASSERT(r == 0); - - /* bind to the desired port */ - r = uv_udp_bind(&client, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); - - /* join the multicast channel */ -#if defined(__APPLE__) - r = uv_udp_set_membership(&client, "ff02::1", "::1%lo0", UV_JOIN_GROUP); -#else - r = uv_udp_set_membership(&client, "ff02::1", NULL, UV_JOIN_GROUP); -#endif - if (r == UV_ENODEV) { - MAKE_VALGRIND_HAPPY(); - RETURN_SKIP("No ipv6 multicast route"); - } - - ASSERT(r == 0); - - r = uv_udp_recv_start(&client, alloc_cb, cl_recv_cb); - ASSERT(r == 0); - - buf = uv_buf_init("PING", 4); - - /* server sends "PING" */ - r = uv_udp_send(&req, - &server, - &buf, - 1, - (const struct sockaddr*) &addr, - sv_send_cb); - ASSERT(r == 0); - - ASSERT(close_cb_called == 0); - ASSERT(cl_recv_cb_called == 0); - ASSERT(sv_send_cb_called == 0); - - /* run the loop till all events are processed */ - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(cl_recv_cb_called == 1); - ASSERT(sv_send_cb_called == 1); - ASSERT(close_cb_called == 2); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-udp-multicast-ttl.c b/outside/libuv-v1.7.5/test/test-udp-multicast-ttl.c deleted file mode 100644 index 7f1af9b9d..000000000 --- a/outside/libuv-v1.7.5/test/test-udp-multicast-ttl.c +++ /dev/null @@ -1,94 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#include -#include -#include - -#define CHECK_HANDLE(handle) \ - ASSERT((uv_udp_t*)(handle) == &server || (uv_udp_t*)(handle) == &client) - -static uv_udp_t server; -static uv_udp_t client; - -static int sv_send_cb_called; -static int close_cb_called; - - -static void close_cb(uv_handle_t* handle) { - CHECK_HANDLE(handle); - close_cb_called++; -} - - -static void sv_send_cb(uv_udp_send_t* req, int status) { - ASSERT(req != NULL); - ASSERT(status == 0 || status == UV_ENETUNREACH); - CHECK_HANDLE(req->handle); - - sv_send_cb_called++; - - uv_close((uv_handle_t*) req->handle, close_cb); -} - - -TEST_IMPL(udp_multicast_ttl) { - int r; - uv_udp_send_t req; - uv_buf_t buf; - struct sockaddr_in addr; - - r = uv_udp_init(uv_default_loop(), &server); - ASSERT(r == 0); - - ASSERT(0 == uv_ip4_addr("0.0.0.0", 0, &addr)); - r = uv_udp_bind(&server, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); - - r = uv_udp_set_multicast_ttl(&server, 32); - ASSERT(r == 0); - - /* server sends "PING" */ - buf = uv_buf_init("PING", 4); - ASSERT(0 == uv_ip4_addr("239.255.0.1", TEST_PORT, &addr)); - r = uv_udp_send(&req, - &server, - &buf, - 1, - (const struct sockaddr*) &addr, - sv_send_cb); - ASSERT(r == 0); - - ASSERT(close_cb_called == 0); - ASSERT(sv_send_cb_called == 0); - - /* run the loop till all events are processed */ - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(sv_send_cb_called == 1); - ASSERT(close_cb_called == 1); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-udp-open.c b/outside/libuv-v1.7.5/test/test-udp-open.c deleted file mode 100644 index 4d77f45d3..000000000 --- a/outside/libuv-v1.7.5/test/test-udp-open.c +++ /dev/null @@ -1,204 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" -#include -#include -#include - -#ifndef _WIN32 -# include -#endif - -static int send_cb_called = 0; -static int close_cb_called = 0; - -static uv_udp_send_t send_req; - - -static void startup(void) { -#ifdef _WIN32 - struct WSAData wsa_data; - int r = WSAStartup(MAKEWORD(2, 2), &wsa_data); - ASSERT(r == 0); -#endif -} - - -static uv_os_sock_t create_udp_socket(void) { - uv_os_sock_t sock; - - sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP); -#ifdef _WIN32 - ASSERT(sock != INVALID_SOCKET); -#else - ASSERT(sock >= 0); -#endif - -#ifndef _WIN32 - { - /* Allow reuse of the port. */ - int yes = 1; - int r = setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof yes); - ASSERT(r == 0); - } -#endif - - return sock; -} - - -static void close_socket(uv_os_sock_t sock) { - int r; -#ifdef _WIN32 - r = closesocket(sock); -#else - r = close(sock); -#endif - ASSERT(r == 0); -} - - -static void alloc_cb(uv_handle_t* handle, - size_t suggested_size, - uv_buf_t* buf) { - static char slab[65536]; - ASSERT(suggested_size <= sizeof(slab)); - buf->base = slab; - buf->len = sizeof(slab); -} - - -static void close_cb(uv_handle_t* handle) { - ASSERT(handle != NULL); - close_cb_called++; -} - - -static void recv_cb(uv_udp_t* handle, - ssize_t nread, - const uv_buf_t* buf, - const struct sockaddr* addr, - unsigned flags) { - int r; - - if (nread < 0) { - ASSERT(0 && "unexpected error"); - } - - if (nread == 0) { - /* Returning unused buffer */ - /* Don't count towards sv_recv_cb_called */ - ASSERT(addr == NULL); - return; - } - - ASSERT(flags == 0); - - ASSERT(addr != NULL); - ASSERT(nread == 4); - ASSERT(memcmp("PING", buf->base, nread) == 0); - - r = uv_udp_recv_stop(handle); - ASSERT(r == 0); - - uv_close((uv_handle_t*) handle, close_cb); -} - - -static void send_cb(uv_udp_send_t* req, int status) { - ASSERT(req != NULL); - ASSERT(status == 0); - - send_cb_called++; -} - - -TEST_IMPL(udp_open) { - struct sockaddr_in addr; - uv_buf_t buf = uv_buf_init("PING", 4); - uv_udp_t client; - uv_os_sock_t sock; - int r; - - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - - startup(); - sock = create_udp_socket(); - - r = uv_udp_init(uv_default_loop(), &client); - ASSERT(r == 0); - - r = uv_udp_open(&client, sock); - ASSERT(r == 0); - - r = uv_udp_bind(&client, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); - - r = uv_udp_recv_start(&client, alloc_cb, recv_cb); - ASSERT(r == 0); - - r = uv_udp_send(&send_req, - &client, - &buf, - 1, - (const struct sockaddr*) &addr, - send_cb); - ASSERT(r == 0); - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(send_cb_called == 1); - ASSERT(close_cb_called == 1); - - ASSERT(client.send_queue_size == 0); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(udp_open_twice) { - uv_udp_t client; - uv_os_sock_t sock1, sock2; - int r; - - startup(); - sock1 = create_udp_socket(); - sock2 = create_udp_socket(); - - r = uv_udp_init(uv_default_loop(), &client); - ASSERT(r == 0); - - r = uv_udp_open(&client, sock1); - ASSERT(r == 0); - - r = uv_udp_open(&client, sock2); - ASSERT(r == UV_EBUSY); - close_socket(sock2); - - uv_close((uv_handle_t*) &client, NULL); - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-udp-options.c b/outside/libuv-v1.7.5/test/test-udp-options.c deleted file mode 100644 index 0da1786f5..000000000 --- a/outside/libuv-v1.7.5/test/test-udp-options.c +++ /dev/null @@ -1,126 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#include -#include -#include - - -static int udp_options_test(const struct sockaddr* addr) { - static int invalid_ttls[] = { -1, 0, 256 }; - uv_loop_t* loop; - uv_udp_t h; - int i, r; - - loop = uv_default_loop(); - - r = uv_udp_init(loop, &h); - ASSERT(r == 0); - - uv_unref((uv_handle_t*)&h); /* don't keep the loop alive */ - - r = uv_udp_bind(&h, addr, 0); - ASSERT(r == 0); - - r = uv_udp_set_broadcast(&h, 1); - r |= uv_udp_set_broadcast(&h, 1); - r |= uv_udp_set_broadcast(&h, 0); - r |= uv_udp_set_broadcast(&h, 0); - ASSERT(r == 0); - - /* values 1-255 should work */ - for (i = 1; i <= 255; i++) { - r = uv_udp_set_ttl(&h, i); - ASSERT(r == 0); - } - - for (i = 0; i < (int) ARRAY_SIZE(invalid_ttls); i++) { - r = uv_udp_set_ttl(&h, invalid_ttls[i]); - ASSERT(r == UV_EINVAL); - } - - r = uv_udp_set_multicast_loop(&h, 1); - r |= uv_udp_set_multicast_loop(&h, 1); - r |= uv_udp_set_multicast_loop(&h, 0); - r |= uv_udp_set_multicast_loop(&h, 0); - ASSERT(r == 0); - - /* values 0-255 should work */ - for (i = 0; i <= 255; i++) { - r = uv_udp_set_multicast_ttl(&h, i); - ASSERT(r == 0); - } - - /* anything >255 should fail */ - r = uv_udp_set_multicast_ttl(&h, 256); - ASSERT(r == UV_EINVAL); - /* don't test ttl=-1, it's a valid value on some platforms */ - - r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT(r == 0); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - - -TEST_IMPL(udp_options) { - struct sockaddr_in addr; - - ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); - return udp_options_test((const struct sockaddr*) &addr); -} - - -TEST_IMPL(udp_options6) { - struct sockaddr_in6 addr; - - if (!can_ipv6()) - RETURN_SKIP("IPv6 not supported"); - - ASSERT(0 == uv_ip6_addr("::", TEST_PORT, &addr)); - return udp_options_test((const struct sockaddr*) &addr); -} - - -TEST_IMPL(udp_no_autobind) { - uv_loop_t* loop; - uv_udp_t h; - - loop = uv_default_loop(); - - ASSERT(0 == uv_udp_init(loop, &h)); - ASSERT(UV_EBADF == uv_udp_set_multicast_ttl(&h, 32)); - ASSERT(UV_EBADF == uv_udp_set_broadcast(&h, 1)); - ASSERT(UV_EBADF == uv_udp_set_ttl(&h, 1)); - ASSERT(UV_EBADF == uv_udp_set_multicast_loop(&h, 1)); - ASSERT(UV_EBADF == uv_udp_set_multicast_interface(&h, "0.0.0.0")); - - uv_close((uv_handle_t*) &h, NULL); - - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-udp-send-and-recv.c b/outside/libuv-v1.7.5/test/test-udp-send-and-recv.c deleted file mode 100644 index 633a16727..000000000 --- a/outside/libuv-v1.7.5/test/test-udp-send-and-recv.c +++ /dev/null @@ -1,214 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#include -#include -#include - -#define CHECK_HANDLE(handle) \ - ASSERT((uv_udp_t*)(handle) == &server || (uv_udp_t*)(handle) == &client) - -static uv_udp_t server; -static uv_udp_t client; - -static int cl_send_cb_called; -static int cl_recv_cb_called; - -static int sv_send_cb_called; -static int sv_recv_cb_called; - -static int close_cb_called; - - -static void alloc_cb(uv_handle_t* handle, - size_t suggested_size, - uv_buf_t* buf) { - static char slab[65536]; - CHECK_HANDLE(handle); - ASSERT(suggested_size <= sizeof(slab)); - buf->base = slab; - buf->len = sizeof(slab); -} - - -static void close_cb(uv_handle_t* handle) { - CHECK_HANDLE(handle); - ASSERT(1 == uv_is_closing(handle)); - close_cb_called++; -} - - -static void cl_recv_cb(uv_udp_t* handle, - ssize_t nread, - const uv_buf_t* buf, - const struct sockaddr* addr, - unsigned flags) { - CHECK_HANDLE(handle); - ASSERT(flags == 0); - - if (nread < 0) { - ASSERT(0 && "unexpected error"); - } - - if (nread == 0) { - /* Returning unused buffer */ - /* Don't count towards cl_recv_cb_called */ - ASSERT(addr == NULL); - return; - } - - ASSERT(addr != NULL); - ASSERT(nread == 4); - ASSERT(!memcmp("PONG", buf->base, nread)); - - cl_recv_cb_called++; - - uv_close((uv_handle_t*) handle, close_cb); -} - - -static void cl_send_cb(uv_udp_send_t* req, int status) { - int r; - - ASSERT(req != NULL); - ASSERT(status == 0); - CHECK_HANDLE(req->handle); - - r = uv_udp_recv_start(req->handle, alloc_cb, cl_recv_cb); - ASSERT(r == 0); - - cl_send_cb_called++; -} - - -static void sv_send_cb(uv_udp_send_t* req, int status) { - ASSERT(req != NULL); - ASSERT(status == 0); - CHECK_HANDLE(req->handle); - - uv_close((uv_handle_t*) req->handle, close_cb); - free(req); - - sv_send_cb_called++; -} - - -static void sv_recv_cb(uv_udp_t* handle, - ssize_t nread, - const uv_buf_t* rcvbuf, - const struct sockaddr* addr, - unsigned flags) { - uv_udp_send_t* req; - uv_buf_t sndbuf; - int r; - - if (nread < 0) { - ASSERT(0 && "unexpected error"); - } - - if (nread == 0) { - /* Returning unused buffer */ - /* Don't count towards sv_recv_cb_called */ - ASSERT(addr == NULL); - return; - } - - CHECK_HANDLE(handle); - ASSERT(flags == 0); - - ASSERT(addr != NULL); - ASSERT(nread == 4); - ASSERT(!memcmp("PING", rcvbuf->base, nread)); - - /* FIXME? `uv_udp_recv_stop` does what it says: recv_cb is not called - * anymore. That's problematic because the read buffer won't be returned - * either... Not sure I like that but it's consistent with `uv_read_stop`. - */ - r = uv_udp_recv_stop(handle); - ASSERT(r == 0); - - req = malloc(sizeof *req); - ASSERT(req != NULL); - - sndbuf = uv_buf_init("PONG", 4); - r = uv_udp_send(req, handle, &sndbuf, 1, addr, sv_send_cb); - ASSERT(r == 0); - - sv_recv_cb_called++; -} - - -TEST_IMPL(udp_send_and_recv) { - struct sockaddr_in addr; - uv_udp_send_t req; - uv_buf_t buf; - int r; - - ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); - - r = uv_udp_init(uv_default_loop(), &server); - ASSERT(r == 0); - - r = uv_udp_bind(&server, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); - - r = uv_udp_recv_start(&server, alloc_cb, sv_recv_cb); - ASSERT(r == 0); - - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - - r = uv_udp_init(uv_default_loop(), &client); - ASSERT(r == 0); - - /* client sends "PING", expects "PONG" */ - buf = uv_buf_init("PING", 4); - - r = uv_udp_send(&req, - &client, - &buf, - 1, - (const struct sockaddr*) &addr, - cl_send_cb); - ASSERT(r == 0); - - ASSERT(close_cb_called == 0); - ASSERT(cl_send_cb_called == 0); - ASSERT(cl_recv_cb_called == 0); - ASSERT(sv_send_cb_called == 0); - ASSERT(sv_recv_cb_called == 0); - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(cl_send_cb_called == 1); - ASSERT(cl_recv_cb_called == 1); - ASSERT(sv_send_cb_called == 1); - ASSERT(sv_recv_cb_called == 1); - ASSERT(close_cb_called == 2); - - ASSERT(client.send_queue_size == 0); - ASSERT(server.send_queue_size == 0); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-udp-send-immediate.c b/outside/libuv-v1.7.5/test/test-udp-send-immediate.c deleted file mode 100644 index 0999f6b34..000000000 --- a/outside/libuv-v1.7.5/test/test-udp-send-immediate.c +++ /dev/null @@ -1,148 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#include -#include -#include - -#define CHECK_HANDLE(handle) \ - ASSERT((uv_udp_t*)(handle) == &server || (uv_udp_t*)(handle) == &client) - -static uv_udp_t server; -static uv_udp_t client; - -static int cl_send_cb_called; -static int sv_recv_cb_called; -static int close_cb_called; - - -static void alloc_cb(uv_handle_t* handle, - size_t suggested_size, - uv_buf_t* buf) { - static char slab[65536]; - CHECK_HANDLE(handle); - ASSERT(suggested_size <= sizeof(slab)); - buf->base = slab; - buf->len = sizeof(slab); -} - - -static void close_cb(uv_handle_t* handle) { - CHECK_HANDLE(handle); - ASSERT(1 == uv_is_closing(handle)); - close_cb_called++; -} - - -static void cl_send_cb(uv_udp_send_t* req, int status) { - ASSERT(req != NULL); - ASSERT(status == 0); - CHECK_HANDLE(req->handle); - - cl_send_cb_called++; -} - - -static void sv_recv_cb(uv_udp_t* handle, - ssize_t nread, - const uv_buf_t* rcvbuf, - const struct sockaddr* addr, - unsigned flags) { - if (nread < 0) { - ASSERT(0 && "unexpected error"); - } - - if (nread == 0) { - /* Returning unused buffer */ - /* Don't count towards sv_recv_cb_called */ - ASSERT(addr == NULL); - return; - } - - CHECK_HANDLE(handle); - ASSERT(flags == 0); - - ASSERT(addr != NULL); - ASSERT(nread == 4); - ASSERT(memcmp("PING", rcvbuf->base, nread) == 0 || - memcmp("PANG", rcvbuf->base, nread) == 0); - - if (++sv_recv_cb_called == 2) { - uv_close((uv_handle_t*) &server, close_cb); - uv_close((uv_handle_t*) &client, close_cb); - } -} - - -TEST_IMPL(udp_send_immediate) { - struct sockaddr_in addr; - uv_udp_send_t req1, req2; - uv_buf_t buf; - int r; - - ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); - - r = uv_udp_init(uv_default_loop(), &server); - ASSERT(r == 0); - - r = uv_udp_bind(&server, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); - - r = uv_udp_recv_start(&server, alloc_cb, sv_recv_cb); - ASSERT(r == 0); - - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - - r = uv_udp_init(uv_default_loop(), &client); - ASSERT(r == 0); - - /* client sends "PING", then "PANG" */ - buf = uv_buf_init("PING", 4); - - r = uv_udp_send(&req1, - &client, - &buf, - 1, - (const struct sockaddr*) &addr, - cl_send_cb); - ASSERT(r == 0); - - buf = uv_buf_init("PANG", 4); - - r = uv_udp_send(&req2, - &client, - &buf, - 1, - (const struct sockaddr*) &addr, - cl_send_cb); - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(cl_send_cb_called == 2); - ASSERT(sv_recv_cb_called == 2); - ASSERT(close_cb_called == 2); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-udp-send-unreachable.c b/outside/libuv-v1.7.5/test/test-udp-send-unreachable.c deleted file mode 100644 index c6500320d..000000000 --- a/outside/libuv-v1.7.5/test/test-udp-send-unreachable.c +++ /dev/null @@ -1,150 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#include -#include -#include - -#define CHECK_HANDLE(handle) \ - ASSERT((uv_udp_t*)(handle) == &client) - -static uv_udp_t client; -static uv_timer_t timer; - -static int send_cb_called; -static int recv_cb_called; -static int close_cb_called; -static int alloc_cb_called; -static int timer_cb_called; - - -static void alloc_cb(uv_handle_t* handle, - size_t suggested_size, - uv_buf_t* buf) { - static char slab[65536]; - CHECK_HANDLE(handle); - ASSERT(suggested_size <= sizeof(slab)); - buf->base = slab; - buf->len = sizeof(slab); - alloc_cb_called++; -} - - -static void close_cb(uv_handle_t* handle) { - ASSERT(1 == uv_is_closing(handle)); - close_cb_called++; -} - - -static void send_cb(uv_udp_send_t* req, int status) { - ASSERT(req != NULL); - ASSERT(status == 0); - CHECK_HANDLE(req->handle); - send_cb_called++; -} - - -static void recv_cb(uv_udp_t* handle, - ssize_t nread, - const uv_buf_t* rcvbuf, - const struct sockaddr* addr, - unsigned flags) { - CHECK_HANDLE(handle); - recv_cb_called++; - - if (nread < 0) { - ASSERT(0 && "unexpected error"); - } else if (nread == 0) { - /* Returning unused buffer */ - ASSERT(addr == NULL); - } else { - ASSERT(addr != NULL); - } -} - - -static void timer_cb(uv_timer_t* h) { - ASSERT(h == &timer); - timer_cb_called++; - uv_close((uv_handle_t*) &client, close_cb); - uv_close((uv_handle_t*) h, close_cb); -} - - -TEST_IMPL(udp_send_unreachable) { - struct sockaddr_in addr; - struct sockaddr_in addr2; - uv_udp_send_t req1, req2; - uv_buf_t buf; - int r; - - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT_2, &addr2)); - - r = uv_timer_init( uv_default_loop(), &timer ); - ASSERT(r == 0); - - r = uv_timer_start( &timer, timer_cb, 1000, 0 ); - ASSERT(r == 0); - - r = uv_udp_init(uv_default_loop(), &client); - ASSERT(r == 0); - - r = uv_udp_bind(&client, (const struct sockaddr*) &addr2, 0); - ASSERT(r == 0); - - r = uv_udp_recv_start(&client, alloc_cb, recv_cb); - ASSERT(r == 0); - - /* client sends "PING", then "PANG" */ - buf = uv_buf_init("PING", 4); - - r = uv_udp_send(&req1, - &client, - &buf, - 1, - (const struct sockaddr*) &addr, - send_cb); - ASSERT(r == 0); - - buf = uv_buf_init("PANG", 4); - - r = uv_udp_send(&req2, - &client, - &buf, - 1, - (const struct sockaddr*) &addr, - send_cb); - ASSERT(r == 0); - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(send_cb_called == 2); - ASSERT(recv_cb_called == alloc_cb_called); - ASSERT(timer_cb_called == 1); - ASSERT(close_cb_called == 2); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-udp-try-send.c b/outside/libuv-v1.7.5/test/test-udp-try-send.c deleted file mode 100644 index 7b6de3654..000000000 --- a/outside/libuv-v1.7.5/test/test-udp-try-send.c +++ /dev/null @@ -1,133 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#include -#include -#include - -#ifdef _WIN32 - -TEST_IMPL(udp_try_send) { - - MAKE_VALGRIND_HAPPY(); - return 0; -} - -#else /* !_WIN32 */ - -#define CHECK_HANDLE(handle) \ - ASSERT((uv_udp_t*)(handle) == &server || (uv_udp_t*)(handle) == &client) - -static uv_udp_t server; -static uv_udp_t client; - -static int sv_recv_cb_called; - -static int close_cb_called; - - -static void alloc_cb(uv_handle_t* handle, - size_t suggested_size, - uv_buf_t* buf) { - static char slab[65536]; - CHECK_HANDLE(handle); - ASSERT(suggested_size <= sizeof(slab)); - buf->base = slab; - buf->len = sizeof(slab); -} - - -static void close_cb(uv_handle_t* handle) { - CHECK_HANDLE(handle); - ASSERT(uv_is_closing(handle)); - close_cb_called++; -} - - -static void sv_recv_cb(uv_udp_t* handle, - ssize_t nread, - const uv_buf_t* rcvbuf, - const struct sockaddr* addr, - unsigned flags) { - ASSERT(nread > 0); - - if (nread == 0) { - ASSERT(addr == NULL); - return; - } - - ASSERT(nread == 4); - ASSERT(addr != NULL); - - ASSERT(memcmp("EXIT", rcvbuf->base, nread) == 0); - uv_close((uv_handle_t*) handle, close_cb); - uv_close((uv_handle_t*) &client, close_cb); - - sv_recv_cb_called++; -} - - -TEST_IMPL(udp_try_send) { - struct sockaddr_in addr; - static char buffer[64 * 1024]; - uv_buf_t buf; - int r; - - ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); - - r = uv_udp_init(uv_default_loop(), &server); - ASSERT(r == 0); - - r = uv_udp_bind(&server, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); - - r = uv_udp_recv_start(&server, alloc_cb, sv_recv_cb); - ASSERT(r == 0); - - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - - r = uv_udp_init(uv_default_loop(), &client); - ASSERT(r == 0); - - buf = uv_buf_init(buffer, sizeof(buffer)); - r = uv_udp_try_send(&client, &buf, 1, (const struct sockaddr*) &addr); - ASSERT(r == UV_EMSGSIZE); - - buf = uv_buf_init("EXIT", 4); - r = uv_udp_try_send(&client, &buf, 1, (const struct sockaddr*) &addr); - ASSERT(r == 4); - - uv_run(uv_default_loop(), UV_RUN_DEFAULT); - - ASSERT(close_cb_called == 2); - ASSERT(sv_recv_cb_called == 1); - - ASSERT(client.send_queue_size == 0); - ASSERT(server.send_queue_size == 0); - - MAKE_VALGRIND_HAPPY(); - return 0; -} - -#endif /* !_WIN32 */ diff --git a/outside/libuv-v1.7.5/test/test-walk-handles.c b/outside/libuv-v1.7.5/test/test-walk-handles.c deleted file mode 100644 index 4b0ca6ebc..000000000 --- a/outside/libuv-v1.7.5/test/test-walk-handles.c +++ /dev/null @@ -1,77 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#include -#include - -static char magic_cookie[] = "magic cookie"; -static int seen_timer_handle; -static uv_timer_t timer; - - -static void walk_cb(uv_handle_t* handle, void* arg) { - ASSERT(arg == (void*)magic_cookie); - - if (handle == (uv_handle_t*)&timer) { - seen_timer_handle++; - } else { - ASSERT(0 && "unexpected handle"); - } -} - - -static void timer_cb(uv_timer_t* handle) { - ASSERT(handle == &timer); - - uv_walk(handle->loop, walk_cb, magic_cookie); - uv_close((uv_handle_t*)handle, NULL); -} - - -TEST_IMPL(walk_handles) { - uv_loop_t* loop; - int r; - - loop = uv_default_loop(); - - r = uv_timer_init(loop, &timer); - ASSERT(r == 0); - - r = uv_timer_start(&timer, timer_cb, 1, 0); - ASSERT(r == 0); - - /* Start event loop, expect to see the timer handle in walk_cb. */ - ASSERT(seen_timer_handle == 0); - r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT(r == 0); - ASSERT(seen_timer_handle == 1); - - /* Loop is finished, walk_cb should not see our timer handle. */ - seen_timer_handle = 0; - uv_walk(loop, walk_cb, magic_cookie); - ASSERT(seen_timer_handle == 0); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/test/test-watcher-cross-stop.c b/outside/libuv-v1.7.5/test/test-watcher-cross-stop.c deleted file mode 100644 index 910ed0fb6..000000000 --- a/outside/libuv-v1.7.5/test/test-watcher-cross-stop.c +++ /dev/null @@ -1,103 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * 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. - */ - -#include "uv.h" -#include "task.h" - -#include -#include - -/* NOTE: Number should be big enough to trigger this problem */ -static uv_udp_t sockets[2500]; -static uv_udp_send_t reqs[ARRAY_SIZE(sockets)]; -static char slab[1]; -static unsigned int recv_cb_called; -static unsigned int send_cb_called; -static unsigned int close_cb_called; - -static void alloc_cb(uv_handle_t* handle, size_t size, uv_buf_t* buf) { - buf->base = slab; - buf->len = sizeof(slab); -} - - -static void recv_cb(uv_udp_t* handle, - ssize_t nread, - const uv_buf_t* buf, - const struct sockaddr* addr, - unsigned flags) { - recv_cb_called++; -} - - -static void send_cb(uv_udp_send_t* req, int status) { - send_cb_called++; -} - - -static void close_cb(uv_handle_t* handle) { - close_cb_called++; -} - - -TEST_IMPL(watcher_cross_stop) { - uv_loop_t* loop = uv_default_loop(); - unsigned int i; - struct sockaddr_in addr; - uv_buf_t buf; - char big_string[1024]; - - TEST_FILE_LIMIT(ARRAY_SIZE(sockets) + 32); - - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - memset(big_string, 'A', sizeof(big_string)); - buf = uv_buf_init(big_string, sizeof(big_string)); - - for (i = 0; i < ARRAY_SIZE(sockets); i++) { - ASSERT(0 == uv_udp_init(loop, &sockets[i])); - ASSERT(0 == uv_udp_bind(&sockets[i], - (const struct sockaddr*) &addr, - UV_UDP_REUSEADDR)); - ASSERT(0 == uv_udp_recv_start(&sockets[i], alloc_cb, recv_cb)); - ASSERT(0 == uv_udp_send(&reqs[i], - &sockets[i], - &buf, - 1, - (const struct sockaddr*) &addr, - send_cb)); - } - - while (recv_cb_called == 0) - uv_run(loop, UV_RUN_ONCE); - - for (i = 0; i < ARRAY_SIZE(sockets); i++) - uv_close((uv_handle_t*) &sockets[i], close_cb); - - ASSERT(recv_cb_called > 0); - - uv_run(loop, UV_RUN_DEFAULT); - - ASSERT(ARRAY_SIZE(sockets) == send_cb_called); - ASSERT(ARRAY_SIZE(sockets) == close_cb_called); - - MAKE_VALGRIND_HAPPY(); - return 0; -} diff --git a/outside/libuv-v1.7.5/uv.gyp b/outside/libuv-v1.7.5/uv.gyp deleted file mode 100644 index 8049faa7a..000000000 --- a/outside/libuv-v1.7.5/uv.gyp +++ /dev/null @@ -1,500 +0,0 @@ -{ - 'target_defaults': { - 'conditions': [ - ['OS != "win"', { - 'defines': [ - '_LARGEFILE_SOURCE', - '_FILE_OFFSET_BITS=64', - ], - 'conditions': [ - ['OS=="solaris"', { - 'cflags': [ '-pthreads' ], - }], - ['OS not in "solaris android"', { - 'cflags': [ '-pthread' ], - }], - ], - }], - ], - 'xcode_settings': { - 'WARNING_CFLAGS': [ '-Wall', '-Wextra', '-Wno-unused-parameter' ], - 'OTHER_CFLAGS': [ '-g', '--std=gnu89', '-pedantic' ], - } - }, - - 'targets': [ - { - 'target_name': 'libuv', - 'type': '<(uv_library)', - 'include_dirs': [ - 'include', - 'src/', - ], - 'direct_dependent_settings': { - 'include_dirs': [ 'include' ], - 'conditions': [ - ['OS != "win"', { - 'defines': [ - '_LARGEFILE_SOURCE', - '_FILE_OFFSET_BITS=64', - ], - }], - ['OS in "mac ios"', { - 'defines': [ '_DARWIN_USE_64_BIT_INODE=1' ], - }], - ['OS == "linux"', { - 'defines': [ '_POSIX_C_SOURCE=200112' ], - }], - ], - }, - 'sources': [ - 'common.gypi', - 'include/uv.h', - 'include/tree.h', - 'include/uv-errno.h', - 'include/uv-threadpool.h', - 'include/uv-version.h', - 'src/fs-poll.c', - 'src/heap-inl.h', - 'src/inet.c', - 'src/queue.h', - 'src/threadpool.c', - 'src/uv-common.c', - 'src/uv-common.h', - 'src/version.c' - ], - 'conditions': [ - [ 'OS=="win"', { - 'defines': [ - '_WIN32_WINNT=0x0600', - '_GNU_SOURCE', - ], - 'sources': [ - 'include/uv-win.h', - 'src/win/async.c', - 'src/win/atomicops-inl.h', - 'src/win/core.c', - 'src/win/dl.c', - 'src/win/error.c', - 'src/win/fs.c', - 'src/win/fs-event.c', - 'src/win/getaddrinfo.c', - 'src/win/getnameinfo.c', - 'src/win/handle.c', - 'src/win/handle-inl.h', - 'src/win/internal.h', - 'src/win/loop-watcher.c', - 'src/win/pipe.c', - 'src/win/thread.c', - 'src/win/poll.c', - 'src/win/process.c', - 'src/win/process-stdio.c', - 'src/win/req.c', - 'src/win/req-inl.h', - 'src/win/signal.c', - 'src/win/stream.c', - 'src/win/stream-inl.h', - 'src/win/tcp.c', - 'src/win/tty.c', - 'src/win/timer.c', - 'src/win/udp.c', - 'src/win/util.c', - 'src/win/winapi.c', - 'src/win/winapi.h', - 'src/win/winsock.c', - 'src/win/winsock.h', - ], - 'link_settings': { - 'libraries': [ - '-ladvapi32', - '-liphlpapi', - '-lpsapi', - '-lshell32', - '-luserenv', - '-lws2_32' - ], - }, - }, { # Not Windows i.e. POSIX - 'cflags': [ - '-g', - '--std=gnu89', - '-pedantic', - '-Wall', - '-Wextra', - '-Wno-unused-parameter', - ], - 'sources': [ - 'include/uv-unix.h', - 'include/uv-linux.h', - 'include/uv-sunos.h', - 'include/uv-darwin.h', - 'include/uv-bsd.h', - 'include/uv-aix.h', - 'src/unix/async.c', - 'src/unix/atomic-ops.h', - 'src/unix/core.c', - 'src/unix/dl.c', - 'src/unix/fs.c', - 'src/unix/getaddrinfo.c', - 'src/unix/getnameinfo.c', - 'src/unix/internal.h', - 'src/unix/loop.c', - 'src/unix/loop-watcher.c', - 'src/unix/pipe.c', - 'src/unix/poll.c', - 'src/unix/process.c', - 'src/unix/signal.c', - 'src/unix/spinlock.h', - 'src/unix/stream.c', - 'src/unix/tcp.c', - 'src/unix/thread.c', - 'src/unix/timer.c', - 'src/unix/tty.c', - 'src/unix/udp.c', - ], - 'link_settings': { - 'libraries': [ '-lm' ], - 'conditions': [ - ['OS=="solaris"', { - 'ldflags': [ '-pthreads' ], - }], - ['OS != "solaris" and OS != "android"', { - 'ldflags': [ '-pthread' ], - }], - ], - }, - 'conditions': [ - ['uv_library=="shared_library"', { - 'cflags': [ '-fPIC' ], - }], - ['uv_library=="shared_library" and OS!="mac"', { - # This will cause gyp to set soname - # Must correspond with UV_VERSION_MAJOR - # in include/uv-version.h - 'product_extension': 'so.1', - }], - ], - }], - [ 'OS in "linux mac ios android"', { - 'sources': [ 'src/unix/proctitle.c' ], - }], - [ 'OS in "mac ios"', { - 'sources': [ - 'src/unix/darwin.c', - 'src/unix/fsevents.c', - 'src/unix/darwin-proctitle.c', - ], - 'defines': [ - '_DARWIN_USE_64_BIT_INODE=1', - '_DARWIN_UNLIMITED_SELECT=1', - ] - }], - [ 'OS!="mac"', { - # Enable on all platforms except OS X. The antique gcc/clang that - # ships with Xcode emits waaaay too many false positives. - 'cflags': [ '-Wstrict-aliasing' ], - }], - [ 'OS=="linux"', { - 'defines': [ '_GNU_SOURCE' ], - 'sources': [ - 'src/unix/linux-core.c', - 'src/unix/linux-inotify.c', - 'src/unix/linux-syscalls.c', - 'src/unix/linux-syscalls.h', - ], - 'link_settings': { - 'libraries': [ '-ldl', '-lrt' ], - }, - }], - [ 'OS=="android"', { - 'sources': [ - 'src/unix/linux-core.c', - 'src/unix/linux-inotify.c', - 'src/unix/linux-syscalls.c', - 'src/unix/linux-syscalls.h', - 'src/unix/pthread-fixes.c', - 'src/unix/android-ifaddrs.c' - ], - 'link_settings': { - 'libraries': [ '-ldl' ], - }, - }], - [ 'OS=="solaris"', { - 'sources': [ 'src/unix/sunos.c' ], - 'defines': [ - '__EXTENSIONS__', - '_XOPEN_SOURCE=500', - ], - 'link_settings': { - 'libraries': [ - '-lkstat', - '-lnsl', - '-lsendfile', - '-lsocket', - ], - }, - }], - [ 'OS=="aix"', { - 'sources': [ 'src/unix/aix.c' ], - 'defines': [ - '_ALL_SOURCE', - '_XOPEN_SOURCE=500', - '_LINUX_SOURCE_COMPAT', - ], - 'link_settings': { - 'libraries': [ - '-lperfstat', - ], - }, - }], - [ 'OS=="freebsd" or OS=="dragonflybsd"', { - 'sources': [ 'src/unix/freebsd.c' ], - }], - [ 'OS=="openbsd"', { - 'sources': [ 'src/unix/openbsd.c' ], - }], - [ 'OS=="netbsd"', { - 'sources': [ 'src/unix/netbsd.c' ], - }], - [ 'OS in "freebsd dragonflybsd openbsd netbsd".split()', { - 'link_settings': { - 'libraries': [ '-lkvm' ], - }, - }], - [ 'OS in "ios mac freebsd dragonflybsd openbsd netbsd".split()', { - 'sources': [ 'src/unix/kqueue.c' ], - }], - ['uv_library=="shared_library"', { - 'defines': [ 'BUILDING_UV_SHARED=1' ] - }], - ] - }, - - { - 'target_name': 'run-tests', - 'type': 'executable', - 'dependencies': [ 'libuv' ], - 'sources': [ - 'test/blackhole-server.c', - 'test/echo-server.c', - 'test/run-tests.c', - 'test/runner.c', - 'test/runner.h', - 'test/test-get-loadavg.c', - 'test/task.h', - 'test/test-active.c', - 'test/test-async.c', - 'test/test-async-null-cb.c', - 'test/test-callback-stack.c', - 'test/test-callback-order.c', - 'test/test-close-fd.c', - 'test/test-close-order.c', - 'test/test-connection-fail.c', - 'test/test-cwd-and-chdir.c', - 'test/test-default-loop-close.c', - 'test/test-delayed-accept.c', - 'test/test-error.c', - 'test/test-embed.c', - 'test/test-emfile.c', - 'test/test-fail-always.c', - 'test/test-fs.c', - 'test/test-fs-event.c', - 'test/test-get-currentexe.c', - 'test/test-get-memory.c', - 'test/test-getaddrinfo.c', - 'test/test-getnameinfo.c', - 'test/test-getsockname.c', - 'test/test-handle-fileno.c', - 'test/test-homedir.c', - 'test/test-hrtime.c', - 'test/test-idle.c', - 'test/test-ip6-addr.c', - 'test/test-ipc.c', - 'test/test-ipc-send-recv.c', - 'test/test-list.h', - 'test/test-loop-handles.c', - 'test/test-loop-alive.c', - 'test/test-loop-close.c', - 'test/test-loop-stop.c', - 'test/test-loop-time.c', - 'test/test-loop-configure.c', - 'test/test-walk-handles.c', - 'test/test-watcher-cross-stop.c', - 'test/test-multiple-listen.c', - 'test/test-osx-select.c', - 'test/test-pass-always.c', - 'test/test-ping-pong.c', - 'test/test-pipe-bind-error.c', - 'test/test-pipe-connect-error.c', - 'test/test-pipe-connect-multiple.c', - 'test/test-pipe-connect-prepare.c', - 'test/test-pipe-getsockname.c', - 'test/test-pipe-pending-instances.c', - 'test/test-pipe-sendmsg.c', - 'test/test-pipe-server-close.c', - 'test/test-pipe-close-stdout-read-stdin.c', - 'test/test-pipe-set-non-blocking.c', - 'test/test-platform-output.c', - 'test/test-poll.c', - 'test/test-poll-close.c', - 'test/test-poll-close-doesnt-corrupt-stack.c', - 'test/test-poll-closesocket.c', - 'test/test-process-title.c', - 'test/test-ref.c', - 'test/test-run-nowait.c', - 'test/test-run-once.c', - 'test/test-semaphore.c', - 'test/test-shutdown-close.c', - 'test/test-shutdown-eof.c', - 'test/test-shutdown-twice.c', - 'test/test-signal.c', - 'test/test-signal-multiple-loops.c', - 'test/test-socket-buffer-size.c', - 'test/test-spawn.c', - 'test/test-fs-poll.c', - 'test/test-stdio-over-pipes.c', - 'test/test-tcp-bind-error.c', - 'test/test-tcp-bind6-error.c', - 'test/test-tcp-close.c', - 'test/test-tcp-close-accept.c', - 'test/test-tcp-close-while-connecting.c', - 'test/test-tcp-create-socket-early.c', - 'test/test-tcp-connect-error-after-write.c', - 'test/test-tcp-shutdown-after-write.c', - 'test/test-tcp-flags.c', - 'test/test-tcp-connect-error.c', - 'test/test-tcp-connect-timeout.c', - 'test/test-tcp-connect6-error.c', - 'test/test-tcp-open.c', - 'test/test-tcp-write-to-half-open-connection.c', - 'test/test-tcp-write-after-connect.c', - 'test/test-tcp-writealot.c', - 'test/test-tcp-write-fail.c', - 'test/test-tcp-try-write.c', - 'test/test-tcp-unexpected-read.c', - 'test/test-tcp-oob.c', - 'test/test-tcp-read-stop.c', - 'test/test-tcp-write-queue-order.c', - 'test/test-threadpool.c', - 'test/test-threadpool-cancel.c', - 'test/test-thread-equal.c', - 'test/test-mutexes.c', - 'test/test-thread.c', - 'test/test-barrier.c', - 'test/test-condvar.c', - 'test/test-timer-again.c', - 'test/test-timer-from-check.c', - 'test/test-timer.c', - 'test/test-tty.c', - 'test/test-udp-bind.c', - 'test/test-udp-create-socket-early.c', - 'test/test-udp-dgram-too-big.c', - 'test/test-udp-ipv6.c', - 'test/test-udp-open.c', - 'test/test-udp-options.c', - 'test/test-udp-send-and-recv.c', - 'test/test-udp-send-immediate.c', - 'test/test-udp-send-unreachable.c', - 'test/test-udp-multicast-join.c', - 'test/test-udp-multicast-join6.c', - 'test/test-dlerror.c', - 'test/test-udp-multicast-ttl.c', - 'test/test-ip4-addr.c', - 'test/test-ip6-addr.c', - 'test/test-udp-multicast-interface.c', - 'test/test-udp-multicast-interface6.c', - 'test/test-udp-try-send.c', - ], - 'conditions': [ - [ 'OS=="win"', { - 'sources': [ - 'test/runner-win.c', - 'test/runner-win.h' - ], - 'libraries': [ '-lws2_32' ] - }, { # POSIX - 'defines': [ '_GNU_SOURCE' ], - 'sources': [ - 'test/runner-unix.c', - 'test/runner-unix.h', - ], - }], - [ 'OS=="solaris"', { # make test-fs.c compile, needs _POSIX_C_SOURCE - 'defines': [ - '__EXTENSIONS__', - '_XOPEN_SOURCE=500', - ], - }], - [ 'OS=="aix"', { # make test-fs.c compile, needs _POSIX_C_SOURCE - 'defines': [ - '_ALL_SOURCE', - '_XOPEN_SOURCE=500', - ], - }], - ['uv_library=="shared_library"', { - 'defines': [ 'USING_UV_SHARED=1' ] - }], - ], - 'msvs-settings': { - 'VCLinkerTool': { - 'SubSystem': 1, # /subsystem:console - }, - }, - }, - - { - 'target_name': 'run-benchmarks', - 'type': 'executable', - 'dependencies': [ 'libuv' ], - 'sources': [ - 'test/benchmark-async.c', - 'test/benchmark-async-pummel.c', - 'test/benchmark-fs-stat.c', - 'test/benchmark-getaddrinfo.c', - 'test/benchmark-list.h', - 'test/benchmark-loop-count.c', - 'test/benchmark-million-async.c', - 'test/benchmark-million-timers.c', - 'test/benchmark-multi-accept.c', - 'test/benchmark-ping-pongs.c', - 'test/benchmark-pound.c', - 'test/benchmark-pump.c', - 'test/benchmark-sizes.c', - 'test/benchmark-spawn.c', - 'test/benchmark-thread.c', - 'test/benchmark-tcp-write-batch.c', - 'test/benchmark-udp-pummel.c', - 'test/dns-server.c', - 'test/echo-server.c', - 'test/blackhole-server.c', - 'test/run-benchmarks.c', - 'test/runner.c', - 'test/runner.h', - 'test/task.h', - ], - 'conditions': [ - [ 'OS=="win"', { - 'sources': [ - 'test/runner-win.c', - 'test/runner-win.h', - ], - 'libraries': [ '-lws2_32' ] - }, { # POSIX - 'defines': [ '_GNU_SOURCE' ], - 'sources': [ - 'test/runner-unix.c', - 'test/runner-unix.h', - ] - }], - ['uv_library=="shared_library"', { - 'defines': [ 'USING_UV_SHARED=1' ] - }], - ], - 'msvs-settings': { - 'VCLinkerTool': { - 'SubSystem': 1, # /subsystem:console - }, - }, - }, - ] -} diff --git a/outside/libuv-v1.7.5/vcbuild.bat b/outside/libuv-v1.7.5/vcbuild.bat deleted file mode 100644 index 696f0db30..000000000 --- a/outside/libuv-v1.7.5/vcbuild.bat +++ /dev/null @@ -1,153 +0,0 @@ -@echo off - -cd %~dp0 - -if /i "%1"=="help" goto help -if /i "%1"=="--help" goto help -if /i "%1"=="-help" goto help -if /i "%1"=="/help" goto help -if /i "%1"=="?" goto help -if /i "%1"=="-?" goto help -if /i "%1"=="--?" goto help -if /i "%1"=="/?" goto help - -@rem Process arguments. -set config= -set target=Build -set noprojgen= -set nobuild= -set run= -set target_arch=ia32 -set vs_toolset=x86 -set platform=WIN32 -set library=static_library - -:next-arg -if "%1"=="" goto args-done -if /i "%1"=="debug" set config=Debug&goto arg-ok -if /i "%1"=="release" set config=Release&goto arg-ok -if /i "%1"=="test" set run=run-tests.exe&goto arg-ok -if /i "%1"=="bench" set run=run-benchmarks.exe&goto arg-ok -if /i "%1"=="clean" set target=Clean&goto arg-ok -if /i "%1"=="noprojgen" set noprojgen=1&goto arg-ok -if /i "%1"=="nobuild" set nobuild=1&goto arg-ok -if /i "%1"=="x86" set target_arch=ia32&set platform=WIN32&set vs_toolset=x86&goto arg-ok -if /i "%1"=="ia32" set target_arch=ia32&set platform=WIN32&set vs_toolset=x86&goto arg-ok -if /i "%1"=="x64" set target_arch=x64&set platform=x64&set vs_toolset=x64&goto arg-ok -if /i "%1"=="shared" set library=shared_library&goto arg-ok -if /i "%1"=="static" set library=static_library&goto arg-ok -:arg-ok -shift -goto next-arg -:args-done - -if defined WindowsSDKDir goto select-target -if defined VCINSTALLDIR goto select-target - -@rem Look for Visual Studio 2015 -if not defined VS140COMNTOOLS goto vc-set-2013 -if not exist "%VS140COMNTOOLS%\..\..\vc\vcvarsall.bat" goto vc-set-2013 -call "%VS140COMNTOOLS%\..\..\vc\vcvarsall.bat" %vs_toolset% -set GYP_MSVS_VERSION=2015 -goto select-target - -:vc-set-2013 -@rem Look for Visual Studio 2013 -if not defined VS120COMNTOOLS goto vc-set-2012 -if not exist "%VS120COMNTOOLS%\..\..\vc\vcvarsall.bat" goto vc-set-2012 -call "%VS120COMNTOOLS%\..\..\vc\vcvarsall.bat" %vs_toolset% -set GYP_MSVS_VERSION=2013 -goto select-target - -:vc-set-2012 -@rem Look for Visual Studio 2012 -if not defined VS110COMNTOOLS goto vc-set-2010 -if not exist "%VS110COMNTOOLS%\..\..\vc\vcvarsall.bat" goto vc-set-2010 -call "%VS110COMNTOOLS%\..\..\vc\vcvarsall.bat" %vs_toolset% -set GYP_MSVS_VERSION=2012 -goto select-target - -:vc-set-2010 -@rem Look for Visual Studio 2010 -if not defined VS100COMNTOOLS goto vc-set-2008 -if not exist "%VS100COMNTOOLS%\..\..\vc\vcvarsall.bat" goto vc-set-2008 -call "%VS100COMNTOOLS%\..\..\vc\vcvarsall.bat" %vs_toolset% -set GYP_MSVS_VERSION=2010 -goto select-target - -:vc-set-2008 -@rem Look for Visual Studio 2008 -if not defined VS90COMNTOOLS goto vc-set-notfound -if not exist "%VS90COMNTOOLS%\..\..\vc\vcvarsall.bat" goto vc-set-notfound -call "%VS90COMNTOOLS%\..\..\vc\vcvarsall.bat" %vs_toolset% -set GYP_MSVS_VERSION=2008 -goto select-target - -:vc-set-notfound -echo Warning: Visual Studio not found - -:select-target -if not "%config%"=="" goto project-gen -if "%run%"=="run-tests.exe" set config=Debug& goto project-gen -if "%run%"=="run-benchmarks.exe" set config=Release& goto project-gen -set config=Debug - -:project-gen -@rem Skip project generation if requested. -if defined noprojgen goto msbuild - -@rem Generate the VS project. -if exist build\gyp goto have_gyp -echo git clone https://chromium.googlesource.com/external/gyp build/gyp -git clone https://chromium.googlesource.com/external/gyp build/gyp -if errorlevel 1 goto gyp_install_failed -goto have_gyp - -:gyp_install_failed -echo Failed to download gyp. Make sure you have git installed, or -echo manually install gyp into %~dp0build\gyp. -exit /b 1 - -:have_gyp -if not defined PYTHON set PYTHON=python -"%PYTHON%" gyp_uv.py -Dtarget_arch=%target_arch% -Duv_library=%library% -if errorlevel 1 goto create-msvs-files-failed -if not exist uv.sln goto create-msvs-files-failed -echo Project files generated. - -:msbuild -@rem Skip project generation if requested. -if defined nobuild goto run - -@rem Check if VS build env is available -if defined VCINSTALLDIR goto msbuild-found -if defined WindowsSDKDir goto msbuild-found -echo Build skipped. To build, this file needs to run from VS cmd prompt. -goto run - -@rem Build the sln with msbuild. -:msbuild-found -msbuild uv.sln /t:%target% /p:Configuration=%config% /p:Platform="%platform%" /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo -if errorlevel 1 exit /b 1 - -:run -@rem Run tests if requested. -if "%run%"=="" goto exit -if not exist %config%\%run% goto exit -echo running '%config%\%run%' -%config%\%run% -goto exit - -:create-msvs-files-failed -echo Failed to create vc project files. -exit /b 1 - -:help -echo vcbuild.bat [debug/release] [test/bench] [clean] [noprojgen] [nobuild] [x86/x64] [static/shared] -echo Examples: -echo vcbuild.bat : builds debug build -echo vcbuild.bat test : builds debug build and runs tests -echo vcbuild.bat release bench: builds release build and runs benchmarks -goto exit - -:exit diff --git a/outside/murmur3/MurmurHash3.c b/outside/murmur3/MurmurHash3.c deleted file mode 100644 index 1d86fea41..000000000 --- a/outside/murmur3/MurmurHash3.c +++ /dev/null @@ -1,328 +0,0 @@ -/* - MurmurHash3 was written by Austin Appleby, and is placed in the public - domain. The author hereby disclaims copyright to this source code. - - Note - The x86 and x64 versions do _not_ produce the same results, as the - algorithms are optimized for their respective platforms. You can still - compile and run any of them on any platform, but your performance with the - non-native version will be less than optimal. -*/ - -#include "MurmurHash3.h" - -/* Platform-specific functions and macros */ - -/* Microsoft Visual Studio */ - -#if defined(_MSC_VER) - -#define FORCE_INLINE __forceinline - -#include - -#define ROTL32(x,y) _rotl(x,y) -#define ROTL64(x,y) _rotl64(x,y) - -#define BIG_CONSTANT(x) (x) - -/* Other compilers */ - -#else /* defined(_MSC_VER) */ - -#define FORCE_INLINE inline __attribute__((always_inline)) - -FORCE_INLINE uint32_t rotl32 ( uint32_t x, int8_t r ) -{ - return (x << r) | (x >> (32 - r)); -} - -FORCE_INLINE uint64_t rotl64 ( uint64_t x, int8_t r ) -{ - return (x << r) | (x >> (64 - r)); -} - -#define ROTL32(x,y) rotl32(x,y) -#define ROTL64(x,y) rotl64(x,y) - -#define BIG_CONSTANT(x) (x##LLU) - -#endif /* !defined(_MSC_VER) */ - -/* - Block read - if your platform needs to do endian-swapping or can only - handle aligned reads, do the conversion here -*/ - -FORCE_INLINE uint32_t getblock32 ( const uint32_t * p, int i ) -{ - return p[i]; -} - -FORCE_INLINE uint64_t getblock64 ( const uint64_t * p, int i ) -{ - return p[i]; -} - -/* Finalization mix - force all bits of a hash block to avalanche */ - -FORCE_INLINE uint32_t fmix32 ( uint32_t h ) -{ - h ^= h >> 16; - h *= 0x85ebca6b; - h ^= h >> 13; - h *= 0xc2b2ae35; - h ^= h >> 16; - - return h; -} - -/*----------*/ - -FORCE_INLINE uint64_t fmix64 ( uint64_t k ) -{ - k ^= k >> 33; - k *= BIG_CONSTANT(0xff51afd7ed558ccd); - k ^= k >> 33; - k *= BIG_CONSTANT(0xc4ceb9fe1a85ec53); - k ^= k >> 33; - - return k; -} - -/*---------------------------------------------------------------------------*/ - -void MurmurHash3_x86_32 ( const void * key, int len, - uint32_t seed, void * out ) -{ - const uint8_t * data = (const uint8_t*)key; - const int nblocks = len / 4; - int i; - - uint32_t h1 = seed; - - const uint32_t c1 = 0xcc9e2d51; - const uint32_t c2 = 0x1b873593; - - /* body */ - - const uint32_t * blocks = (const uint32_t *)(data + nblocks*4); - - for(i = -nblocks; i; i++) - { - uint32_t k1 = getblock32(blocks,i); - - k1 *= c1; - k1 = ROTL32(k1,15); - k1 *= c2; - - h1 ^= k1; - h1 = ROTL32(h1,13); - h1 = h1*5+0xe6546b64; - } - - /* tail */ - - const uint8_t * tail = (const uint8_t*)(data + nblocks*4); - - uint32_t k1 = 0; - - switch(len & 3) - { - case 3: k1 ^= tail[2] << 16; - case 2: k1 ^= tail[1] << 8; - case 1: k1 ^= tail[0]; - k1 *= c1; k1 = ROTL32(k1,15); k1 *= c2; h1 ^= k1; - }; - - /* finalization */ - - h1 ^= len; - - h1 = fmix32(h1); - - *(uint32_t*)out = h1; -} - -/*---------------------------------------------------------------------------*/ - -void MurmurHash3_x86_128 ( const void * key, const int len, - uint32_t seed, void * out ) -{ - const uint8_t * data = (const uint8_t*)key; - const int nblocks = len / 16; - int i; - - uint32_t h1 = seed; - uint32_t h2 = seed; - uint32_t h3 = seed; - uint32_t h4 = seed; - - const uint32_t c1 = 0x239b961b; - const uint32_t c2 = 0xab0e9789; - const uint32_t c3 = 0x38b34ae5; - const uint32_t c4 = 0xa1e38b93; - - /* body */ - - const uint32_t * blocks = (const uint32_t *)(data + nblocks*16); - - for(i = -nblocks; i; i++) - { - uint32_t k1 = getblock32(blocks,i*4+0); - uint32_t k2 = getblock32(blocks,i*4+1); - uint32_t k3 = getblock32(blocks,i*4+2); - uint32_t k4 = getblock32(blocks,i*4+3); - - k1 *= c1; k1 = ROTL32(k1,15); k1 *= c2; h1 ^= k1; - - h1 = ROTL32(h1,19); h1 += h2; h1 = h1*5+0x561ccd1b; - - k2 *= c2; k2 = ROTL32(k2,16); k2 *= c3; h2 ^= k2; - - h2 = ROTL32(h2,17); h2 += h3; h2 = h2*5+0x0bcaa747; - - k3 *= c3; k3 = ROTL32(k3,17); k3 *= c4; h3 ^= k3; - - h3 = ROTL32(h3,15); h3 += h4; h3 = h3*5+0x96cd1c35; - - k4 *= c4; k4 = ROTL32(k4,18); k4 *= c1; h4 ^= k4; - - h4 = ROTL32(h4,13); h4 += h1; h4 = h4*5+0x32ac3b17; - } - - /* tail */ - - const uint8_t * tail = (const uint8_t*)(data + nblocks*16); - - uint32_t k1 = 0; - uint32_t k2 = 0; - uint32_t k3 = 0; - uint32_t k4 = 0; - - switch(len & 15) - { - case 15: k4 ^= tail[14] << 16; - case 14: k4 ^= tail[13] << 8; - case 13: k4 ^= tail[12] << 0; - k4 *= c4; k4 = ROTL32(k4,18); k4 *= c1; h4 ^= k4; - - case 12: k3 ^= tail[11] << 24; - case 11: k3 ^= tail[10] << 16; - case 10: k3 ^= tail[ 9] << 8; - case 9: k3 ^= tail[ 8] << 0; - k3 *= c3; k3 = ROTL32(k3,17); k3 *= c4; h3 ^= k3; - - case 8: k2 ^= tail[ 7] << 24; - case 7: k2 ^= tail[ 6] << 16; - case 6: k2 ^= tail[ 5] << 8; - case 5: k2 ^= tail[ 4] << 0; - k2 *= c2; k2 = ROTL32(k2,16); k2 *= c3; h2 ^= k2; - - case 4: k1 ^= tail[ 3] << 24; - case 3: k1 ^= tail[ 2] << 16; - case 2: k1 ^= tail[ 1] << 8; - case 1: k1 ^= tail[ 0] << 0; - k1 *= c1; k1 = ROTL32(k1,15); k1 *= c2; h1 ^= k1; - }; - - /* finalization */ - - h1 ^= len; h2 ^= len; h3 ^= len; h4 ^= len; - - h1 += h2; h1 += h3; h1 += h4; - h2 += h1; h3 += h1; h4 += h1; - - h1 = fmix32(h1); - h2 = fmix32(h2); - h3 = fmix32(h3); - h4 = fmix32(h4); - - h1 += h2; h1 += h3; h1 += h4; - h2 += h1; h3 += h1; h4 += h1; - - ((uint32_t*)out)[0] = h1; - ((uint32_t*)out)[1] = h2; - ((uint32_t*)out)[2] = h3; - ((uint32_t*)out)[3] = h4; -} - -/*---------------------------------------------------------------------------*/ - -void MurmurHash3_x64_128 ( const void * key, const int len, - const uint32_t seed, void * out ) -{ - const uint8_t * data = (const uint8_t*)key; - const int nblocks = len / 16; - int i; - - uint64_t h1 = seed; - uint64_t h2 = seed; - - const uint64_t c1 = BIG_CONSTANT(0x87c37b91114253d5); - const uint64_t c2 = BIG_CONSTANT(0x4cf5ad432745937f); - - /* body */ - - const uint64_t * blocks = (const uint64_t *)(data); - - for(i = 0; i < nblocks; i++) - { - uint64_t k1 = getblock64(blocks,i*2+0); - uint64_t k2 = getblock64(blocks,i*2+1); - - k1 *= c1; k1 = ROTL64(k1,31); k1 *= c2; h1 ^= k1; - - h1 = ROTL64(h1,27); h1 += h2; h1 = h1*5+0x52dce729; - - k2 *= c2; k2 = ROTL64(k2,33); k2 *= c1; h2 ^= k2; - - h2 = ROTL64(h2,31); h2 += h1; h2 = h2*5+0x38495ab5; - } - - /* tail */ - - const uint8_t * tail = (const uint8_t*)(data + nblocks*16); - - uint64_t k1 = 0; - uint64_t k2 = 0; - - switch(len & 15) - { - case 15: k2 ^= ((uint64_t)tail[14]) << 48; - case 14: k2 ^= ((uint64_t)tail[13]) << 40; - case 13: k2 ^= ((uint64_t)tail[12]) << 32; - case 12: k2 ^= ((uint64_t)tail[11]) << 24; - case 11: k2 ^= ((uint64_t)tail[10]) << 16; - case 10: k2 ^= ((uint64_t)tail[ 9]) << 8; - case 9: k2 ^= ((uint64_t)tail[ 8]) << 0; - k2 *= c2; k2 = ROTL64(k2,33); k2 *= c1; h2 ^= k2; - - case 8: k1 ^= ((uint64_t)tail[ 7]) << 56; - case 7: k1 ^= ((uint64_t)tail[ 6]) << 48; - case 6: k1 ^= ((uint64_t)tail[ 5]) << 40; - case 5: k1 ^= ((uint64_t)tail[ 4]) << 32; - case 4: k1 ^= ((uint64_t)tail[ 3]) << 24; - case 3: k1 ^= ((uint64_t)tail[ 2]) << 16; - case 2: k1 ^= ((uint64_t)tail[ 1]) << 8; - case 1: k1 ^= ((uint64_t)tail[ 0]) << 0; - k1 *= c1; k1 = ROTL64(k1,31); k1 *= c2; h1 ^= k1; - }; - - /* finalization */ - - h1 ^= len; h2 ^= len; - - h1 += h2; - h2 += h1; - - h1 = fmix64(h1); - h2 = fmix64(h2); - - h1 += h2; - h2 += h1; - - ((uint64_t*)out)[0] = h1; - ((uint64_t*)out)[1] = h2; -} - -/*---------------------------------------------------------------------------*/ diff --git a/outside/murmur3/MurmurHash3.h b/outside/murmur3/MurmurHash3.h deleted file mode 100644 index e3caafa3e..000000000 --- a/outside/murmur3/MurmurHash3.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - MurmurHash3 was written by Austin Appleby, and is placed in the public - domain. The author hereby disclaims copyright to this source code. -*/ - -#ifndef _MURMURHASH3_H_ -#define _MURMURHASH3_H_ - -/* Platform-specific functions and macros */ - -/* Microsoft Visual Studio */ - -#if defined(_MSC_VER) && (_MSC_VER < 1600) - -typedef unsigned char uint8_t; -typedef unsigned int uint32_t; -typedef unsigned __int64 uint64_t; - -/* Other compilers */ - -#else /* defined(_MSC_VER) */ - -#include - -#endif /* !defined(_MSC_VER) */ - -/*---------------------------------------------------------------------------*/ - -void MurmurHash3_x86_32 ( const void * key, int len, uint32_t seed, void * out ); - -void MurmurHash3_x86_128 ( const void * key, int len, uint32_t seed, void * out ); - -void MurmurHash3_x64_128 ( const void * key, int len, uint32_t seed, void * out ); - -/*---------------------------------------------------------------------------*/ - -#endif /* _MURMURHASH3_H_ */ diff --git a/outside/scrypt/Makefile b/outside/scrypt/Makefile deleted file mode 100644 index 6185ce200..000000000 --- a/outside/scrypt/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -default: all - -CC?=gcc -CFLAGS?=-O2 -ffast-math \ - -Wall -g -D_FORTIFY_SOURCE=2 -fPIC -CFLAGS_EXTRA?=-Wl,-rpath=. - -all: scrypt.a - -OBJS= crypto_scrypt-nosse.o sha256.o - -scrypt.a: $(OBJS) - ar rcs scrypt.a $(OBJS) - -clean: - rm -f *.o scrypt.a diff --git a/outside/scrypt/crypto_scrypt-nosse.c b/outside/scrypt/crypto_scrypt-nosse.c deleted file mode 100644 index d62e3ab4f..000000000 --- a/outside/scrypt/crypto_scrypt-nosse.c +++ /dev/null @@ -1,329 +0,0 @@ -/*- - * Copyright 2009 Colin Percival - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * This file was originally written by Colin Percival as part of the Tarsnap - * online backup system. - */ -#include -#include - -#include -#include -#include -#include - -#include "sha256.h" -#include "sysendian.h" - -#include "crypto_scrypt.h" - -static void -blkcpy(void * dest, void * src, size_t len) -{ - size_t * D = dest; - size_t * S = src; - size_t L = len / sizeof(size_t); - size_t i; - - for (i = 0; i < L; i++) - D[i] = S[i]; -} - -static void -blkxor(void * dest, void * src, size_t len) -{ - size_t * D = dest; - size_t * S = src; - size_t L = len / sizeof(size_t); - size_t i; - - for (i = 0; i < L; i++) - D[i] ^= S[i]; -} - -/** - * salsa20_8(B): - * Apply the salsa20/8 core to the provided block. - */ -static void -salsa20_8(uint32_t B[16]) -{ - uint32_t x[16]; - size_t i; - - blkcpy(x, B, 64); - for (i = 0; i < 8; i += 2) { -#define R(a,b) (((a) << (b)) | ((a) >> (32 - (b)))) - /* Operate on columns. */ - x[ 4] ^= R(x[ 0]+x[12], 7); x[ 8] ^= R(x[ 4]+x[ 0], 9); - x[12] ^= R(x[ 8]+x[ 4],13); x[ 0] ^= R(x[12]+x[ 8],18); - - x[ 9] ^= R(x[ 5]+x[ 1], 7); x[13] ^= R(x[ 9]+x[ 5], 9); - x[ 1] ^= R(x[13]+x[ 9],13); x[ 5] ^= R(x[ 1]+x[13],18); - - x[14] ^= R(x[10]+x[ 6], 7); x[ 2] ^= R(x[14]+x[10], 9); - x[ 6] ^= R(x[ 2]+x[14],13); x[10] ^= R(x[ 6]+x[ 2],18); - - x[ 3] ^= R(x[15]+x[11], 7); x[ 7] ^= R(x[ 3]+x[15], 9); - x[11] ^= R(x[ 7]+x[ 3],13); x[15] ^= R(x[11]+x[ 7],18); - - /* Operate on rows. */ - x[ 1] ^= R(x[ 0]+x[ 3], 7); x[ 2] ^= R(x[ 1]+x[ 0], 9); - x[ 3] ^= R(x[ 2]+x[ 1],13); x[ 0] ^= R(x[ 3]+x[ 2],18); - - x[ 6] ^= R(x[ 5]+x[ 4], 7); x[ 7] ^= R(x[ 6]+x[ 5], 9); - x[ 4] ^= R(x[ 7]+x[ 6],13); x[ 5] ^= R(x[ 4]+x[ 7],18); - - x[11] ^= R(x[10]+x[ 9], 7); x[ 8] ^= R(x[11]+x[10], 9); - x[ 9] ^= R(x[ 8]+x[11],13); x[10] ^= R(x[ 9]+x[ 8],18); - - x[12] ^= R(x[15]+x[14], 7); x[13] ^= R(x[12]+x[15], 9); - x[14] ^= R(x[13]+x[12],13); x[15] ^= R(x[14]+x[13],18); -#undef R - } - for (i = 0; i < 16; i++) - B[i] += x[i]; -} - -/** - * blockmix_salsa8(Bin, Bout, X, r): - * Compute Bout = BlockMix_{salsa20/8, r}(Bin). The input Bin must be 128r - * bytes in length; the output Bout must also be the same size. The - * temporary space X must be 64 bytes. - */ -static void -blockmix_salsa8(uint32_t * Bin, uint32_t * Bout, uint32_t * X, size_t r) -{ - size_t i; - - /* 1: X <-- B_{2r - 1} */ - blkcpy(X, &Bin[(2 * r - 1) * 16], 64); - - /* 2: for i = 0 to 2r - 1 do */ - for (i = 0; i < 2 * r; i += 2) { - /* 3: X <-- H(X \xor B_i) */ - blkxor(X, &Bin[i * 16], 64); - salsa20_8(X); - - /* 4: Y_i <-- X */ - /* 6: B' <-- (Y_0, Y_2 ... Y_{2r-2}, Y_1, Y_3 ... Y_{2r-1}) */ - blkcpy(&Bout[i * 8], X, 64); - - /* 3: X <-- H(X \xor B_i) */ - blkxor(X, &Bin[i * 16 + 16], 64); - salsa20_8(X); - - /* 4: Y_i <-- X */ - /* 6: B' <-- (Y_0, Y_2 ... Y_{2r-2}, Y_1, Y_3 ... Y_{2r-1}) */ - blkcpy(&Bout[i * 8 + r * 16], X, 64); - } -} - -/** - * integerify(B, r): - * Return the result of parsing B_{2r-1} as a little-endian integer. - */ -static uint64_t -integerify(void * B, size_t r) -{ - uint32_t * X = (void *)((uintptr_t)(B) + (2 * r - 1) * 64); - - return (((uint64_t)(X[1]) << 32) + X[0]); -} - -/** - * smix(B, r, N, V, XY): - * Compute B = SMix_r(B, N). The input B must be 128r bytes in length; - * the temporary storage V must be 128rN bytes in length; the temporary - * storage XY must be 256r + 64 bytes in length. The value N must be a - * power of 2 greater than 1. The arrays B, V, and XY must be aligned to a - * multiple of 64 bytes. - */ -void -smix(uint8_t * B, size_t r, uint64_t N, uint32_t * V, uint32_t * XY) -{ - uint32_t * X = XY; - uint32_t * Y = &XY[32 * r]; - uint32_t * Z = &XY[64 * r]; - uint64_t i; - uint64_t j; - size_t k; - - /* 1: X <-- B */ - for (k = 0; k < 32 * r; k++) - X[k] = le32dec(&B[4 * k]); - - /* 2: for i = 0 to N - 1 do */ - for (i = 0; i < N; i += 2) { - /* 3: V_i <-- X */ - blkcpy(&V[i * (32 * r)], X, 128 * r); - - /* 4: X <-- H(X) */ - blockmix_salsa8(X, Y, Z, r); - - /* 3: V_i <-- X */ - blkcpy(&V[(i + 1) * (32 * r)], Y, 128 * r); - - /* 4: X <-- H(X) */ - blockmix_salsa8(Y, X, Z, r); - } - - /* 6: for i = 0 to N - 1 do */ - for (i = 0; i < N; i += 2) { - /* 7: j <-- Integerify(X) mod N */ - j = integerify(X, r) & (N - 1); - - /* 8: X <-- H(X \xor V_j) */ - blkxor(X, &V[j * (32 * r)], 128 * r); - blockmix_salsa8(X, Y, Z, r); - - /* 7: j <-- Integerify(X) mod N */ - j = integerify(Y, r) & (N - 1); - - /* 8: X <-- H(X \xor V_j) */ - blkxor(Y, &V[j * (32 * r)], 128 * r); - blockmix_salsa8(Y, X, Z, r); - } - - /* 10: B' <-- X */ - for (k = 0; k < 32 * r; k++) - le32enc(&B[4 * k], X[k]); -} - -/** - * crypto_scrypt(passwd, passwdlen, salt, saltlen, N, r, p, buf, buflen): - * Compute scrypt(passwd[0 .. passwdlen - 1], salt[0 .. saltlen - 1], N, r, - * p, buflen) and write the result into buf. The parameters r, p, and buflen - * must satisfy r * p < 2^30 and buflen <= (2^32 - 1) * 32. The parameter N - * must be a power of 2 greater than 1. - * - * Return 0 on success; or -1 on error. - */ -int -crypto_scrypt(const uint8_t * passwd, size_t passwdlen, - const uint8_t * salt, size_t saltlen, uint64_t N, uint32_t r, uint32_t p, - uint8_t * buf, size_t buflen) -{ - void * B0, * V0, * XY0; - uint8_t * B; - uint32_t * V; - uint32_t * XY; - uint32_t i; - - /* Sanity-check parameters. */ -#if SIZE_MAX > UINT32_MAX - if (buflen > (((uint64_t)(1) << 32) - 1) * 32) { - errno = EFBIG; - goto err0; - } -#endif - if ((uint64_t)(r) * (uint64_t)(p) >= (1 << 30)) { - errno = EFBIG; - goto err0; - } - if (((N & (N - 1)) != 0) || (N == 0)) { - errno = EINVAL; - goto err0; - } - if ((r > SIZE_MAX / 128 / p) || -#if SIZE_MAX / 256 <= UINT32_MAX - (r > SIZE_MAX / 256) || -#endif - (N > SIZE_MAX / 128 / r)) { - errno = ENOMEM; - goto err0; - } - - /* Allocate memory. */ -#ifdef HAVE_POSIX_MEMALIGN - if ((errno = posix_memalign(&B0, 64, 128 * r * p)) != 0) - goto err0; - B = (uint8_t *)(B0); - if ((errno = posix_memalign(&XY0, 64, 256 * r + 64)) != 0) - goto err1; - XY = (uint32_t *)(XY0); -#ifndef MAP_ANON - if ((errno = posix_memalign(&V0, 64, 128 * r * N)) != 0) - goto err2; - V = (uint32_t *)(V0); -#endif -#else - if ((B0 = malloc(128 * r * p + 63)) == NULL) - goto err0; - B = (uint8_t *)(((uintptr_t)(B0) + 63) & ~ (uintptr_t)(63)); - if ((XY0 = malloc(256 * r + 64 + 63)) == NULL) - goto err1; - XY = (uint32_t *)(((uintptr_t)(XY0) + 63) & ~ (uintptr_t)(63)); -#ifndef MAP_ANON - if ((V0 = malloc(128 * r * N + 63)) == NULL) - goto err2; - V = (uint32_t *)(((uintptr_t)(V0) + 63) & ~ (uintptr_t)(63)); -#endif -#endif -#ifdef MAP_ANON - if ((V0 = mmap(NULL, 128 * r * N, PROT_READ | PROT_WRITE, -#ifdef MAP_NOCORE - MAP_ANON | MAP_PRIVATE | MAP_NOCORE, -#else - MAP_ANON | MAP_PRIVATE, -#endif - -1, 0)) == MAP_FAILED) - goto err2; - V = (uint32_t *)(V0); -#endif - - /* 1: (B_0 ... B_{p-1}) <-- PBKDF2(P, S, 1, p * MFLen) */ - PBKDF2_SHA256(passwd, passwdlen, salt, saltlen, 1, B, p * 128 * r); - - /* 2: for i = 0 to p - 1 do */ - for (i = 0; i < p; i++) { - /* 3: B_i <-- MF(B_i, N) */ - smix(&B[i * 128 * r], r, N, V, XY); - } - - /* 5: DK <-- PBKDF2(P, B, 1, dkLen) */ - PBKDF2_SHA256(passwd, passwdlen, B, p * 128 * r, 1, buf, buflen); - - /* Free memory. */ -#ifdef MAP_ANON - if (munmap(V0, 128 * r * N)) - goto err2; -#else - free(V0); -#endif - free(XY0); - free(B0); - - /* Success! */ - return (0); - -err2: - free(XY0); -err1: - free(B0); -err0: - /* Failure! */ - return (-1); -} diff --git a/outside/scrypt/crypto_scrypt.h b/outside/scrypt/crypto_scrypt.h deleted file mode 100644 index 39cad5c5b..000000000 --- a/outside/scrypt/crypto_scrypt.h +++ /dev/null @@ -1,50 +0,0 @@ -/*- - * Copyright 2009 Colin Percival - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * This file was originally written by Colin Percival as part of the Tarsnap - * online backup system. - */ -#ifndef _CRYPTO_SCRYPT_H_ -#define _CRYPTO_SCRYPT_H_ - -#include - -void smix(uint8_t *, size_t, uint64_t, uint32_t *, uint32_t *); -void PBKDF2_SHA256(const uint8_t *, size_t, const uint8_t *, size_t, - uint64_t, uint8_t *, size_t); - -/** - * crypto_scrypt(passwd, passwdlen, salt, saltlen, N, r, p, buf, buflen): - * Compute scrypt(passwd[0 .. passwdlen - 1], salt[0 .. saltlen - 1], N, r, - * p, buflen) and write the result into buf. The parameters r, p, and buflen - * must satisfy r * p < 2^30 and buflen <= (2^32 - 1) * 32. The parameter N - * must be a power of 2 greater than 1. - * - * Return 0 on success; or -1 on error. - */ -int crypto_scrypt(const uint8_t *, size_t, const uint8_t *, size_t, uint64_t, - uint32_t, uint32_t, uint8_t *, size_t); - -#endif /* !_CRYPTO_SCRYPT_H_ */ diff --git a/outside/scrypt/sha256.c b/outside/scrypt/sha256.c deleted file mode 100644 index d2f915f1a..000000000 --- a/outside/scrypt/sha256.c +++ /dev/null @@ -1,411 +0,0 @@ -/*- - * Copyright 2005,2007,2009 Colin Percival - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. - */ - -#include - -#include -#include - -#include "sysendian.h" - -#include "sha256.h" - -/* - * Encode a length len/4 vector of (uint32_t) into a length len vector of - * (unsigned char) in big-endian form. Assumes len is a multiple of 4. - */ -static void -be32enc_vect(unsigned char *dst, const uint32_t *src, size_t len) -{ - size_t i; - - for (i = 0; i < len / 4; i++) - be32enc(dst + i * 4, src[i]); -} - -/* - * Decode a big-endian length len vector of (unsigned char) into a length - * len/4 vector of (uint32_t). Assumes len is a multiple of 4. - */ -static void -be32dec_vect(uint32_t *dst, const unsigned char *src, size_t len) -{ - size_t i; - - for (i = 0; i < len / 4; i++) - dst[i] = be32dec(src + i * 4); -} - -/* Elementary functions used by SHA256 */ -#define Ch(x, y, z) ((x & (y ^ z)) ^ z) -#define Maj(x, y, z) ((x & (y | z)) | (y & z)) -#define SHR(x, n) (x >> n) -#define ROTR(x, n) ((x >> n) | (x << (32 - n))) -#define S0(x) (ROTR(x, 2) ^ ROTR(x, 13) ^ ROTR(x, 22)) -#define S1(x) (ROTR(x, 6) ^ ROTR(x, 11) ^ ROTR(x, 25)) -#define s0(x) (ROTR(x, 7) ^ ROTR(x, 18) ^ SHR(x, 3)) -#define s1(x) (ROTR(x, 17) ^ ROTR(x, 19) ^ SHR(x, 10)) - -/* SHA256 round function */ -#define RND(a, b, c, d, e, f, g, h, k) \ - t0 = h + S1(e) + Ch(e, f, g) + k; \ - t1 = S0(a) + Maj(a, b, c); \ - d += t0; \ - h = t0 + t1; - -/* Adjusted round function for rotating state */ -#define RNDr(S, W, i, k) \ - RND(S[(64 - i) % 8], S[(65 - i) % 8], \ - S[(66 - i) % 8], S[(67 - i) % 8], \ - S[(68 - i) % 8], S[(69 - i) % 8], \ - S[(70 - i) % 8], S[(71 - i) % 8], \ - W[i] + k) - -/* - * SHA256 block compression function. The 256-bit state is transformed via - * the 512-bit input block to produce a new state. - */ -static void -SHA256_Transform(uint32_t * state, const unsigned char block[64]) -{ - uint32_t W[64]; - uint32_t S[8]; - uint32_t t0, t1; - int i; - - /* 1. Prepare message schedule W. */ - be32dec_vect(W, block, 64); - for (i = 16; i < 64; i++) - W[i] = s1(W[i - 2]) + W[i - 7] + s0(W[i - 15]) + W[i - 16]; - - /* 2. Initialize working variables. */ - memcpy(S, state, 32); - - /* 3. Mix. */ - RNDr(S, W, 0, 0x428a2f98); - RNDr(S, W, 1, 0x71374491); - RNDr(S, W, 2, 0xb5c0fbcf); - RNDr(S, W, 3, 0xe9b5dba5); - RNDr(S, W, 4, 0x3956c25b); - RNDr(S, W, 5, 0x59f111f1); - RNDr(S, W, 6, 0x923f82a4); - RNDr(S, W, 7, 0xab1c5ed5); - RNDr(S, W, 8, 0xd807aa98); - RNDr(S, W, 9, 0x12835b01); - RNDr(S, W, 10, 0x243185be); - RNDr(S, W, 11, 0x550c7dc3); - RNDr(S, W, 12, 0x72be5d74); - RNDr(S, W, 13, 0x80deb1fe); - RNDr(S, W, 14, 0x9bdc06a7); - RNDr(S, W, 15, 0xc19bf174); - RNDr(S, W, 16, 0xe49b69c1); - RNDr(S, W, 17, 0xefbe4786); - RNDr(S, W, 18, 0x0fc19dc6); - RNDr(S, W, 19, 0x240ca1cc); - RNDr(S, W, 20, 0x2de92c6f); - RNDr(S, W, 21, 0x4a7484aa); - RNDr(S, W, 22, 0x5cb0a9dc); - RNDr(S, W, 23, 0x76f988da); - RNDr(S, W, 24, 0x983e5152); - RNDr(S, W, 25, 0xa831c66d); - RNDr(S, W, 26, 0xb00327c8); - RNDr(S, W, 27, 0xbf597fc7); - RNDr(S, W, 28, 0xc6e00bf3); - RNDr(S, W, 29, 0xd5a79147); - RNDr(S, W, 30, 0x06ca6351); - RNDr(S, W, 31, 0x14292967); - RNDr(S, W, 32, 0x27b70a85); - RNDr(S, W, 33, 0x2e1b2138); - RNDr(S, W, 34, 0x4d2c6dfc); - RNDr(S, W, 35, 0x53380d13); - RNDr(S, W, 36, 0x650a7354); - RNDr(S, W, 37, 0x766a0abb); - RNDr(S, W, 38, 0x81c2c92e); - RNDr(S, W, 39, 0x92722c85); - RNDr(S, W, 40, 0xa2bfe8a1); - RNDr(S, W, 41, 0xa81a664b); - RNDr(S, W, 42, 0xc24b8b70); - RNDr(S, W, 43, 0xc76c51a3); - RNDr(S, W, 44, 0xd192e819); - RNDr(S, W, 45, 0xd6990624); - RNDr(S, W, 46, 0xf40e3585); - RNDr(S, W, 47, 0x106aa070); - RNDr(S, W, 48, 0x19a4c116); - RNDr(S, W, 49, 0x1e376c08); - RNDr(S, W, 50, 0x2748774c); - RNDr(S, W, 51, 0x34b0bcb5); - RNDr(S, W, 52, 0x391c0cb3); - RNDr(S, W, 53, 0x4ed8aa4a); - RNDr(S, W, 54, 0x5b9cca4f); - RNDr(S, W, 55, 0x682e6ff3); - RNDr(S, W, 56, 0x748f82ee); - RNDr(S, W, 57, 0x78a5636f); - RNDr(S, W, 58, 0x84c87814); - RNDr(S, W, 59, 0x8cc70208); - RNDr(S, W, 60, 0x90befffa); - RNDr(S, W, 61, 0xa4506ceb); - RNDr(S, W, 62, 0xbef9a3f7); - RNDr(S, W, 63, 0xc67178f2); - - /* 4. Mix local working variables into global state */ - for (i = 0; i < 8; i++) - state[i] += S[i]; - - /* Clean the stack. */ - memset(W, 0, 256); - memset(S, 0, 32); - t0 = t1 = 0; -} - -static unsigned char PAD[64] = { - 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -}; - -/* Add padding and terminating bit-count. */ -static void -SHA256_Pad(SHA256_CTX * ctx) -{ - unsigned char len[8]; - uint32_t r, plen; - - /* - * Convert length to a vector of bytes -- we do this now rather - * than later because the length will change after we pad. - */ - be32enc_vect(len, ctx->count, 8); - - /* Add 1--64 bytes so that the resulting length is 56 mod 64 */ - r = (ctx->count[1] >> 3) & 0x3f; - plen = (r < 56) ? (56 - r) : (120 - r); - SHA256_Update(ctx, PAD, (size_t)plen); - - /* Add the terminating bit-count */ - SHA256_Update(ctx, len, 8); -} - -/* SHA-256 initialization. Begins a SHA-256 operation. */ -void -SHA256_Init(SHA256_CTX * ctx) -{ - - /* Zero bits processed so far */ - ctx->count[0] = ctx->count[1] = 0; - - /* Magic initialization constants */ - ctx->state[0] = 0x6A09E667; - ctx->state[1] = 0xBB67AE85; - ctx->state[2] = 0x3C6EF372; - ctx->state[3] = 0xA54FF53A; - ctx->state[4] = 0x510E527F; - ctx->state[5] = 0x9B05688C; - ctx->state[6] = 0x1F83D9AB; - ctx->state[7] = 0x5BE0CD19; -} - -/* Add bytes into the hash */ -void -SHA256_Update(SHA256_CTX * ctx, const void *in, size_t len) -{ - uint32_t bitlen[2]; - uint32_t r; - const unsigned char *src = in; - - /* Number of bytes left in the buffer from previous updates */ - r = (ctx->count[1] >> 3) & 0x3f; - - /* Convert the length into a number of bits */ - bitlen[1] = ((uint32_t)len) << 3; - bitlen[0] = (uint32_t)(len >> 29); - - /* Update number of bits */ - if ((ctx->count[1] += bitlen[1]) < bitlen[1]) - ctx->count[0]++; - ctx->count[0] += bitlen[0]; - - /* Handle the case where we don't need to perform any transforms */ - if (len < 64 - r) { - memcpy(&ctx->buf[r], src, len); - return; - } - - /* Finish the current block */ - memcpy(&ctx->buf[r], src, 64 - r); - SHA256_Transform(ctx->state, ctx->buf); - src += 64 - r; - len -= 64 - r; - - /* Perform complete blocks */ - while (len >= 64) { - SHA256_Transform(ctx->state, src); - src += 64; - len -= 64; - } - - /* Copy left over data into buffer */ - memcpy(ctx->buf, src, len); -} - -/* - * SHA-256 finalization. Pads the input data, exports the hash value, - * and clears the context state. - */ -void -SHA256_Final(unsigned char digest[32], SHA256_CTX * ctx) -{ - - /* Add padding */ - SHA256_Pad(ctx); - - /* Write the hash */ - be32enc_vect(digest, ctx->state, 32); - - /* Clear the context state */ - memset((void *)ctx, 0, sizeof(*ctx)); -} - -/* Initialize an HMAC-SHA256 operation with the given key. */ -void -HMAC_SHA256_Init(HMAC_SHA256_CTX * ctx, const void * _K, size_t Klen) -{ - unsigned char pad[64]; - unsigned char khash[32]; - const unsigned char * K = _K; - size_t i; - - /* If Klen > 64, the key is really SHA256(K). */ - if (Klen > 64) { - SHA256_Init(&ctx->ictx); - SHA256_Update(&ctx->ictx, K, Klen); - SHA256_Final(khash, &ctx->ictx); - K = khash; - Klen = 32; - } - - /* Inner SHA256 operation is SHA256(K xor [block of 0x36] || data). */ - SHA256_Init(&ctx->ictx); - memset(pad, 0x36, 64); - for (i = 0; i < Klen; i++) - pad[i] ^= K[i]; - SHA256_Update(&ctx->ictx, pad, 64); - - /* Outer SHA256 operation is SHA256(K xor [block of 0x5c] || hash). */ - SHA256_Init(&ctx->octx); - memset(pad, 0x5c, 64); - for (i = 0; i < Klen; i++) - pad[i] ^= K[i]; - SHA256_Update(&ctx->octx, pad, 64); - - /* Clean the stack. */ - memset(khash, 0, 32); -} - -/* Add bytes to the HMAC-SHA256 operation. */ -void -HMAC_SHA256_Update(HMAC_SHA256_CTX * ctx, const void *in, size_t len) -{ - - /* Feed data to the inner SHA256 operation. */ - SHA256_Update(&ctx->ictx, in, len); -} - -/* Finish an HMAC-SHA256 operation. */ -void -HMAC_SHA256_Final(unsigned char digest[32], HMAC_SHA256_CTX * ctx) -{ - unsigned char ihash[32]; - - /* Finish the inner SHA256 operation. */ - SHA256_Final(ihash, &ctx->ictx); - - /* Feed the inner hash to the outer SHA256 operation. */ - SHA256_Update(&ctx->octx, ihash, 32); - - /* Finish the outer SHA256 operation. */ - SHA256_Final(digest, &ctx->octx); - - /* Clean the stack. */ - memset(ihash, 0, 32); -} - -/** - * PBKDF2_SHA256(passwd, passwdlen, salt, saltlen, c, buf, dkLen): - * Compute PBKDF2(passwd, salt, c, dkLen) using HMAC-SHA256 as the PRF, and - * write the output to buf. The value dkLen must be at most 32 * (2^32 - 1). - */ -void -PBKDF2_SHA256(const uint8_t * passwd, size_t passwdlen, const uint8_t * salt, - size_t saltlen, uint64_t c, uint8_t * buf, size_t dkLen) -{ - HMAC_SHA256_CTX PShctx, hctx; - size_t i; - uint8_t ivec[4]; - uint8_t U[32]; - uint8_t T[32]; - uint64_t j; - int k; - size_t clen; - - /* Compute HMAC state after processing P and S. */ - HMAC_SHA256_Init(&PShctx, passwd, passwdlen); - HMAC_SHA256_Update(&PShctx, salt, saltlen); - - /* Iterate through the blocks. */ - for (i = 0; i * 32 < dkLen; i++) { - /* Generate INT(i + 1). */ - be32enc(ivec, (uint32_t)(i + 1)); - - /* Compute U_1 = PRF(P, S || INT(i)). */ - memcpy(&hctx, &PShctx, sizeof(HMAC_SHA256_CTX)); - HMAC_SHA256_Update(&hctx, ivec, 4); - HMAC_SHA256_Final(U, &hctx); - - /* T_i = U_1 ... */ - memcpy(T, U, 32); - - for (j = 2; j <= c; j++) { - /* Compute U_j. */ - HMAC_SHA256_Init(&hctx, passwd, passwdlen); - HMAC_SHA256_Update(&hctx, U, 32); - HMAC_SHA256_Final(U, &hctx); - - /* ... xor U_j ... */ - for (k = 0; k < 32; k++) - T[k] ^= U[k]; - } - - /* Copy as many bytes as necessary into buf. */ - clen = dkLen - i * 32; - if (clen > 32) - clen = 32; - memcpy(&buf[i * 32], T, clen); - } - - /* Clean PShctx, since we never called _Final on it. */ - memset(&PShctx, 0, sizeof(HMAC_SHA256_CTX)); -} diff --git a/outside/scrypt/sha256.h b/outside/scrypt/sha256.h deleted file mode 100644 index 289a5232f..000000000 --- a/outside/scrypt/sha256.h +++ /dev/null @@ -1,62 +0,0 @@ -/*- - * Copyright 2005,2007,2009 Colin Percival - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. - * - * $FreeBSD: src/lib/libmd/sha256.h,v 1.2 2006/01/17 15:35:56 phk Exp $ - */ - -#ifndef _SHA256_H_ -#define _SHA256_H_ - -#include - -#include - -typedef struct SHA256Context { - uint32_t state[8]; - uint32_t count[2]; - unsigned char buf[64]; -} SHA256_CTX; - -typedef struct HMAC_SHA256Context { - SHA256_CTX ictx; - SHA256_CTX octx; -} HMAC_SHA256_CTX; - -void SHA256_Init(SHA256_CTX *); -void SHA256_Update(SHA256_CTX *, const void *, size_t); -void SHA256_Final(unsigned char [32], SHA256_CTX *); -void HMAC_SHA256_Init(HMAC_SHA256_CTX *, const void *, size_t); -void HMAC_SHA256_Update(HMAC_SHA256_CTX *, const void *, size_t); -void HMAC_SHA256_Final(unsigned char [32], HMAC_SHA256_CTX *); - -/** - * PBKDF2_SHA256(passwd, passwdlen, salt, saltlen, c, buf, dkLen): - * Compute PBKDF2(passwd, salt, c, dkLen) using HMAC-SHA256 as the PRF, and - * write the output to buf. The value dkLen must be at most 32 * (2^32 - 1). - */ -void PBKDF2_SHA256(const uint8_t *, size_t, const uint8_t *, size_t, - uint64_t, uint8_t *, size_t); - -#endif /* !_SHA256_H_ */ diff --git a/outside/scrypt/sysendian.h b/outside/scrypt/sysendian.h deleted file mode 100644 index 207fb0693..000000000 --- a/outside/scrypt/sysendian.h +++ /dev/null @@ -1,129 +0,0 @@ -/*- - * Copyright 2007-2009 Colin Percival - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * This file was originally written by Colin Percival as part of the Tarsnap - * online backup system. - */ -#ifndef _SYSENDIAN_H_ -#define _SYSENDIAN_H_ - -#if defined(U3_OS_bsd) -#include -#else -#include - -static inline uint32_t -be32dec(const void *pp) -{ - const uint8_t *p = (uint8_t const *)pp; - - return ((uint32_t)(p[3]) + ((uint32_t)(p[2]) << 8) + - ((uint32_t)(p[1]) << 16) + ((uint32_t)(p[0]) << 24)); -} - -static inline void -be32enc(void *pp, uint32_t x) -{ - uint8_t * p = (uint8_t *)pp; - - p[3] = x & 0xff; - p[2] = (x >> 8) & 0xff; - p[1] = (x >> 16) & 0xff; - p[0] = (x >> 24) & 0xff; -} - -static inline uint64_t -be64dec(const void *pp) -{ - const uint8_t *p = (uint8_t const *)pp; - - return ((uint64_t)(p[7]) + ((uint64_t)(p[6]) << 8) + - ((uint64_t)(p[5]) << 16) + ((uint64_t)(p[4]) << 24) + - ((uint64_t)(p[3]) << 32) + ((uint64_t)(p[2]) << 40) + - ((uint64_t)(p[1]) << 48) + ((uint64_t)(p[0]) << 56)); -} - -static inline void -be64enc(void *pp, uint64_t x) -{ - uint8_t * p = (uint8_t *)pp; - - p[7] = x & 0xff; - p[6] = (x >> 8) & 0xff; - p[5] = (x >> 16) & 0xff; - p[4] = (x >> 24) & 0xff; - p[3] = (x >> 32) & 0xff; - p[2] = (x >> 40) & 0xff; - p[1] = (x >> 48) & 0xff; - p[0] = (x >> 56) & 0xff; -} - -static inline uint32_t -le32dec(const void *pp) -{ - const uint8_t *p = (uint8_t const *)pp; - - return ((uint32_t)(p[0]) + ((uint32_t)(p[1]) << 8) + - ((uint32_t)(p[2]) << 16) + ((uint32_t)(p[3]) << 24)); -} - -static inline void -le32enc(void *pp, uint32_t x) -{ - uint8_t * p = (uint8_t *)pp; - - p[0] = x & 0xff; - p[1] = (x >> 8) & 0xff; - p[2] = (x >> 16) & 0xff; - p[3] = (x >> 24) & 0xff; -} - -static inline uint64_t -le64dec(const void *pp) -{ - const uint8_t *p = (uint8_t const *)pp; - - return ((uint64_t)(p[0]) + ((uint64_t)(p[1]) << 8) + - ((uint64_t)(p[2]) << 16) + ((uint64_t)(p[3]) << 24) + - ((uint64_t)(p[4]) << 32) + ((uint64_t)(p[5]) << 40) + - ((uint64_t)(p[6]) << 48) + ((uint64_t)(p[7]) << 56)); -} - -static inline void -le64enc(void *pp, uint64_t x) -{ - uint8_t * p = (uint8_t *)pp; - - p[0] = x & 0xff; - p[1] = (x >> 8) & 0xff; - p[2] = (x >> 16) & 0xff; - p[3] = (x >> 24) & 0xff; - p[4] = (x >> 32) & 0xff; - p[5] = (x >> 40) & 0xff; - p[6] = (x >> 48) & 0xff; - p[7] = (x >> 56) & 0xff; -} -#endif -#endif /* !_SYSENDIAN_H_ */ diff --git a/outside/softfloat-3/COPYING.txt b/outside/softfloat-3/COPYING.txt deleted file mode 100644 index 3754d0cd1..000000000 --- a/outside/softfloat-3/COPYING.txt +++ /dev/null @@ -1,37 +0,0 @@ - -License for Berkeley SoftFloat Release 3c - -John R. Hauser -2017 February 10 - -The following applies to the whole of SoftFloat Release 3c as well as to -each source file individually. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the -University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions, and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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/outside/softfloat-3/README.html b/outside/softfloat-3/README.html deleted file mode 100644 index 8f08e004e..000000000 --- a/outside/softfloat-3/README.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - -Berkeley SoftFloat Package Overview - - - - -

    Package Overview for Berkeley SoftFloat Release 3c

    - -

    -John R. Hauser
    -2017 February 10
    -

    - -

    -Berkeley SoftFloat is a software implementation of binary floating-point that -conforms to the IEEE Standard for Floating-Point Arithmetic. -SoftFloat is distributed in the form of C source code. -Building the SoftFloat sources generates a library file (typically -softfloat.a or libsoftfloat.a) containing the -floating-point subroutines. -

    - -

    -The SoftFloat package is documented in the following files in the -doc subdirectory: -

    - - - - - - - - - - - - - -
    SoftFloat.htmlDocumentation for using the SoftFloat functions.
    SoftFloat-source.htmlDocumentation for building SoftFloat.
    SoftFloat-history.html   History of the major changes to SoftFloat.
    -
    -Other files in the package comprise the source code for SoftFloat. -

    - - - diff --git a/outside/softfloat-3/README.txt b/outside/softfloat-3/README.txt deleted file mode 100644 index 2a05181b9..000000000 --- a/outside/softfloat-3/README.txt +++ /dev/null @@ -1,21 +0,0 @@ - -Package Overview for Berkeley SoftFloat Release 3c - -John R. Hauser -2017 February 10 - -Berkeley SoftFloat is a software implementation of binary floating-point -that conforms to the IEEE Standard for Floating-Point Arithmetic. SoftFloat -is distributed in the form of C source code. Building the SoftFloat sources -generates a library file (typically "softfloat.a" or "libsoftfloat.a") -containing the floating-point subroutines. - -The SoftFloat package is documented in the following files in the "doc" -subdirectory: - - SoftFloat.html Documentation for using the SoftFloat functions. - SoftFloat-source.html Documentation for building SoftFloat. - SoftFloat-history.html History of the major changes to SoftFloat. - -Other files in the package comprise the source code for SoftFloat. - diff --git a/outside/softfloat-3/build/Linux-386-GCC/Makefile b/outside/softfloat-3/build/Linux-386-GCC/Makefile deleted file mode 100644 index 3a3543323..000000000 --- a/outside/softfloat-3/build/Linux-386-GCC/Makefile +++ /dev/null @@ -1,323 +0,0 @@ - -#============================================================================= -# -# This Makefile is part of the SoftFloat IEEE Floating-Point Arithmetic -# Package, Release 3c, by John R. Hauser. -# -# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the -# University of California. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright notice, -# this list of conditions, and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions, and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. -# -#============================================================================= - -SOURCE_DIR ?= ../../source -SPECIALIZE_TYPE ?= 8086 - -SOFTFLOAT_OPTS ?= \ - -DSOFTFLOAT_ROUND_ODD -DINLINE_LEVEL=5 -DSOFTFLOAT_FAST_DIV32TO16 \ - -DSOFTFLOAT_FAST_DIV64TO32 - -DELETE = rm -f -C_INCLUDES = -I. -I$(SOURCE_DIR)/$(SPECIALIZE_TYPE) -I$(SOURCE_DIR)/include -COMPILE_C = \ - $(CC) -c -std=gnu89 -Werror-implicit-function-declaration $(SOFTFLOAT_OPTS) \ - $(C_INCLUDES) -O2 -o $@ -MAKELIB = ar crs $@ - -OBJSUF = .o -LIBSUF = .a - -.PHONY: all -all: softfloat$(LIBSUF) - -OBJS_PRIMITIVES = \ - s_compare96M$(OBJSUF) \ - s_compare128M$(OBJSUF) \ - s_shortShiftLeft64To96M$(OBJSUF) \ - s_shortShiftLeftM$(OBJSUF) \ - s_shiftLeftM$(OBJSUF) \ - s_shortShiftRightM$(OBJSUF) \ - s_shortShiftRightJam64$(OBJSUF) \ - s_shortShiftRightJamM$(OBJSUF) \ - s_shiftRightJam32$(OBJSUF) \ - s_shiftRightJam64$(OBJSUF) \ - s_shiftRightJamM$(OBJSUF) \ - s_shiftRightM$(OBJSUF) \ - s_countLeadingZeros8$(OBJSUF) \ - s_countLeadingZeros16$(OBJSUF) \ - s_countLeadingZeros32$(OBJSUF) \ - s_countLeadingZeros64$(OBJSUF) \ - s_addM$(OBJSUF) \ - s_addCarryM$(OBJSUF) \ - s_addComplCarryM$(OBJSUF) \ - s_negXM$(OBJSUF) \ - s_sub1XM$(OBJSUF) \ - s_subM$(OBJSUF) \ - s_mul64To128M$(OBJSUF) \ - s_mul128MTo256M$(OBJSUF) \ - s_approxRecip_1Ks$(OBJSUF) \ - s_approxRecip32_1$(OBJSUF) \ - s_approxRecipSqrt_1Ks$(OBJSUF) \ - s_approxRecipSqrt32_1$(OBJSUF) \ - s_remStepMBy32$(OBJSUF) \ - -OBJS_SPECIALIZE = \ - softfloat_raiseFlags$(OBJSUF) \ - s_f16UIToCommonNaN$(OBJSUF) \ - s_commonNaNToF16UI$(OBJSUF) \ - s_propagateNaNF16UI$(OBJSUF) \ - s_f32UIToCommonNaN$(OBJSUF) \ - s_commonNaNToF32UI$(OBJSUF) \ - s_propagateNaNF32UI$(OBJSUF) \ - s_f64UIToCommonNaN$(OBJSUF) \ - s_commonNaNToF64UI$(OBJSUF) \ - s_propagateNaNF64UI$(OBJSUF) \ - extF80M_isSignalingNaN$(OBJSUF) \ - s_extF80MToCommonNaN$(OBJSUF) \ - s_commonNaNToExtF80M$(OBJSUF) \ - s_propagateNaNExtF80M$(OBJSUF) \ - f128M_isSignalingNaN$(OBJSUF) \ - s_f128MToCommonNaN$(OBJSUF) \ - s_commonNaNToF128M$(OBJSUF) \ - s_propagateNaNF128M$(OBJSUF) \ - -OBJS_OTHERS = \ - s_roundToUI32$(OBJSUF) \ - s_roundMToUI64$(OBJSUF) \ - s_roundToI32$(OBJSUF) \ - s_roundMToI64$(OBJSUF) \ - s_normSubnormalF16Sig$(OBJSUF) \ - s_roundPackToF16$(OBJSUF) \ - s_normRoundPackToF16$(OBJSUF) \ - s_addMagsF16$(OBJSUF) \ - s_subMagsF16$(OBJSUF) \ - s_mulAddF16$(OBJSUF) \ - s_normSubnormalF32Sig$(OBJSUF) \ - s_roundPackToF32$(OBJSUF) \ - s_normRoundPackToF32$(OBJSUF) \ - s_addMagsF32$(OBJSUF) \ - s_subMagsF32$(OBJSUF) \ - s_mulAddF32$(OBJSUF) \ - s_normSubnormalF64Sig$(OBJSUF) \ - s_roundPackToF64$(OBJSUF) \ - s_normRoundPackToF64$(OBJSUF) \ - s_addMagsF64$(OBJSUF) \ - s_subMagsF64$(OBJSUF) \ - s_mulAddF64$(OBJSUF) \ - s_tryPropagateNaNExtF80M$(OBJSUF) \ - s_invalidExtF80M$(OBJSUF) \ - s_normExtF80SigM$(OBJSUF) \ - s_roundPackMToExtF80M$(OBJSUF) \ - s_normRoundPackMToExtF80M$(OBJSUF) \ - s_addExtF80M$(OBJSUF) \ - s_compareNonnormExtF80M$(OBJSUF) \ - s_isNaNF128M$(OBJSUF) \ - s_tryPropagateNaNF128M$(OBJSUF) \ - s_invalidF128M$(OBJSUF) \ - s_shiftNormSigF128M$(OBJSUF) \ - s_roundPackMToF128M$(OBJSUF) \ - s_normRoundPackMToF128M$(OBJSUF) \ - s_addF128M$(OBJSUF) \ - s_mulAddF128M$(OBJSUF) \ - softfloat_state$(OBJSUF) \ - ui32_to_f16$(OBJSUF) \ - ui32_to_f32$(OBJSUF) \ - ui32_to_f64$(OBJSUF) \ - ui32_to_extF80M$(OBJSUF) \ - ui32_to_f128M$(OBJSUF) \ - ui64_to_f16$(OBJSUF) \ - ui64_to_f32$(OBJSUF) \ - ui64_to_f64$(OBJSUF) \ - ui64_to_extF80M$(OBJSUF) \ - ui64_to_f128M$(OBJSUF) \ - i32_to_f16$(OBJSUF) \ - i32_to_f32$(OBJSUF) \ - i32_to_f64$(OBJSUF) \ - i32_to_extF80M$(OBJSUF) \ - i32_to_f128M$(OBJSUF) \ - i64_to_f16$(OBJSUF) \ - i64_to_f32$(OBJSUF) \ - i64_to_f64$(OBJSUF) \ - i64_to_extF80M$(OBJSUF) \ - i64_to_f128M$(OBJSUF) \ - f16_to_ui32$(OBJSUF) \ - f16_to_ui64$(OBJSUF) \ - f16_to_i32$(OBJSUF) \ - f16_to_i64$(OBJSUF) \ - f16_to_ui32_r_minMag$(OBJSUF) \ - f16_to_ui64_r_minMag$(OBJSUF) \ - f16_to_i32_r_minMag$(OBJSUF) \ - f16_to_i64_r_minMag$(OBJSUF) \ - f16_to_f32$(OBJSUF) \ - f16_to_f64$(OBJSUF) \ - f16_to_extF80M$(OBJSUF) \ - f16_to_f128M$(OBJSUF) \ - f16_roundToInt$(OBJSUF) \ - f16_add$(OBJSUF) \ - f16_sub$(OBJSUF) \ - f16_mul$(OBJSUF) \ - f16_mulAdd$(OBJSUF) \ - f16_div$(OBJSUF) \ - f16_rem$(OBJSUF) \ - f16_sqrt$(OBJSUF) \ - f16_eq$(OBJSUF) \ - f16_le$(OBJSUF) \ - f16_lt$(OBJSUF) \ - f16_eq_signaling$(OBJSUF) \ - f16_le_quiet$(OBJSUF) \ - f16_lt_quiet$(OBJSUF) \ - f16_isSignalingNaN$(OBJSUF) \ - f32_to_ui32$(OBJSUF) \ - f32_to_ui64$(OBJSUF) \ - f32_to_i32$(OBJSUF) \ - f32_to_i64$(OBJSUF) \ - f32_to_ui32_r_minMag$(OBJSUF) \ - f32_to_ui64_r_minMag$(OBJSUF) \ - f32_to_i32_r_minMag$(OBJSUF) \ - f32_to_i64_r_minMag$(OBJSUF) \ - f32_to_f16$(OBJSUF) \ - f32_to_f64$(OBJSUF) \ - f32_to_extF80M$(OBJSUF) \ - f32_to_f128M$(OBJSUF) \ - f32_roundToInt$(OBJSUF) \ - f32_add$(OBJSUF) \ - f32_sub$(OBJSUF) \ - f32_mul$(OBJSUF) \ - f32_mulAdd$(OBJSUF) \ - f32_div$(OBJSUF) \ - f32_rem$(OBJSUF) \ - f32_sqrt$(OBJSUF) \ - f32_eq$(OBJSUF) \ - f32_le$(OBJSUF) \ - f32_lt$(OBJSUF) \ - f32_eq_signaling$(OBJSUF) \ - f32_le_quiet$(OBJSUF) \ - f32_lt_quiet$(OBJSUF) \ - f32_isSignalingNaN$(OBJSUF) \ - f64_to_ui32$(OBJSUF) \ - f64_to_ui64$(OBJSUF) \ - f64_to_i32$(OBJSUF) \ - f64_to_i64$(OBJSUF) \ - f64_to_ui32_r_minMag$(OBJSUF) \ - f64_to_ui64_r_minMag$(OBJSUF) \ - f64_to_i32_r_minMag$(OBJSUF) \ - f64_to_i64_r_minMag$(OBJSUF) \ - f64_to_f16$(OBJSUF) \ - f64_to_f32$(OBJSUF) \ - f64_to_extF80M$(OBJSUF) \ - f64_to_f128M$(OBJSUF) \ - f64_roundToInt$(OBJSUF) \ - f64_add$(OBJSUF) \ - f64_sub$(OBJSUF) \ - f64_mul$(OBJSUF) \ - f64_mulAdd$(OBJSUF) \ - f64_div$(OBJSUF) \ - f64_rem$(OBJSUF) \ - f64_sqrt$(OBJSUF) \ - f64_eq$(OBJSUF) \ - f64_le$(OBJSUF) \ - f64_lt$(OBJSUF) \ - f64_eq_signaling$(OBJSUF) \ - f64_le_quiet$(OBJSUF) \ - f64_lt_quiet$(OBJSUF) \ - f64_isSignalingNaN$(OBJSUF) \ - extF80M_to_ui32$(OBJSUF) \ - extF80M_to_ui64$(OBJSUF) \ - extF80M_to_i32$(OBJSUF) \ - extF80M_to_i64$(OBJSUF) \ - extF80M_to_ui32_r_minMag$(OBJSUF) \ - extF80M_to_ui64_r_minMag$(OBJSUF) \ - extF80M_to_i32_r_minMag$(OBJSUF) \ - extF80M_to_i64_r_minMag$(OBJSUF) \ - extF80M_to_f16$(OBJSUF) \ - extF80M_to_f32$(OBJSUF) \ - extF80M_to_f64$(OBJSUF) \ - extF80M_to_f128M$(OBJSUF) \ - extF80M_roundToInt$(OBJSUF) \ - extF80M_add$(OBJSUF) \ - extF80M_sub$(OBJSUF) \ - extF80M_mul$(OBJSUF) \ - extF80M_div$(OBJSUF) \ - extF80M_rem$(OBJSUF) \ - extF80M_sqrt$(OBJSUF) \ - extF80M_eq$(OBJSUF) \ - extF80M_le$(OBJSUF) \ - extF80M_lt$(OBJSUF) \ - extF80M_eq_signaling$(OBJSUF) \ - extF80M_le_quiet$(OBJSUF) \ - extF80M_lt_quiet$(OBJSUF) \ - f128M_to_ui32$(OBJSUF) \ - f128M_to_ui64$(OBJSUF) \ - f128M_to_i32$(OBJSUF) \ - f128M_to_i64$(OBJSUF) \ - f128M_to_ui32_r_minMag$(OBJSUF) \ - f128M_to_ui64_r_minMag$(OBJSUF) \ - f128M_to_i32_r_minMag$(OBJSUF) \ - f128M_to_i64_r_minMag$(OBJSUF) \ - f128M_to_f16$(OBJSUF) \ - f128M_to_f32$(OBJSUF) \ - f128M_to_f64$(OBJSUF) \ - f128M_to_extF80M$(OBJSUF) \ - f128M_roundToInt$(OBJSUF) \ - f128M_add$(OBJSUF) \ - f128M_sub$(OBJSUF) \ - f128M_mul$(OBJSUF) \ - f128M_mulAdd$(OBJSUF) \ - f128M_div$(OBJSUF) \ - f128M_rem$(OBJSUF) \ - f128M_sqrt$(OBJSUF) \ - f128M_eq$(OBJSUF) \ - f128M_le$(OBJSUF) \ - f128M_lt$(OBJSUF) \ - f128M_eq_signaling$(OBJSUF) \ - f128M_le_quiet$(OBJSUF) \ - f128M_lt_quiet$(OBJSUF) \ - -OBJS_ALL = $(OBJS_PRIMITIVES) $(OBJS_SPECIALIZE) $(OBJS_OTHERS) - -$(OBJS_ALL): \ - platform.h $(SOURCE_DIR)/include/primitiveTypes.h \ - $(SOURCE_DIR)/include/primitives.h -$(OBJS_SPECIALIZE) $(OBJS_OTHERS): \ - $(SOURCE_DIR)/include/softfloat_types.h $(SOURCE_DIR)/include/internals.h \ - $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/specialize.h \ - $(SOURCE_DIR)/include/softfloat.h - -$(OBJS_PRIMITIVES) $(OBJS_OTHERS): %$(OBJSUF): $(SOURCE_DIR)/%.c - $(COMPILE_C) $(SOURCE_DIR)/$*.c - -$(OBJS_SPECIALIZE): %$(OBJSUF): $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/%.c - $(COMPILE_C) $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/$*.c - -softfloat$(LIBSUF): $(OBJS_ALL) - $(DELETE) $@ - $(MAKELIB) $^ - -.PHONY: clean -clean: - $(DELETE) $(OBJS_ALL) softfloat$(LIBSUF) - diff --git a/outside/softfloat-3/build/Linux-386-GCC/platform.h b/outside/softfloat-3/build/Linux-386-GCC/platform.h deleted file mode 100644 index 8af002ebe..000000000 --- a/outside/softfloat-3/build/Linux-386-GCC/platform.h +++ /dev/null @@ -1,48 +0,0 @@ - -/*============================================================================ - -This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -/*---------------------------------------------------------------------------- -*----------------------------------------------------------------------------*/ -#define LITTLEENDIAN 1 - -/*---------------------------------------------------------------------------- -*----------------------------------------------------------------------------*/ -#ifdef __GNUC_STDC_INLINE__ -#define INLINE inline -#else -#define INLINE extern inline -#endif - diff --git a/outside/softfloat-3/build/Linux-386-SSE2-GCC/Makefile b/outside/softfloat-3/build/Linux-386-SSE2-GCC/Makefile deleted file mode 100644 index 8e4bf1526..000000000 --- a/outside/softfloat-3/build/Linux-386-SSE2-GCC/Makefile +++ /dev/null @@ -1,323 +0,0 @@ - -#============================================================================= -# -# This Makefile is part of the SoftFloat IEEE Floating-Point Arithmetic -# Package, Release 3c, by John R. Hauser. -# -# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the -# University of California. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright notice, -# this list of conditions, and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions, and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. -# -#============================================================================= - -SOURCE_DIR ?= ../../source -SPECIALIZE_TYPE ?= 8086-SSE - -SOFTFLOAT_OPTS ?= \ - -DSOFTFLOAT_ROUND_ODD -DINLINE_LEVEL=5 -DSOFTFLOAT_FAST_DIV32TO16 \ - -DSOFTFLOAT_FAST_DIV64TO32 - -DELETE = rm -f -C_INCLUDES = -I. -I$(SOURCE_DIR)/$(SPECIALIZE_TYPE) -I$(SOURCE_DIR)/include -COMPILE_C = \ - gcc -c -Werror-implicit-function-declaration $(SOFTFLOAT_OPTS) \ - $(C_INCLUDES) -O2 -o $@ -MAKELIB = ar crs $@ - -OBJ = .o -LIB = .a - -.PHONY: all -all: softfloat$(LIB) - -OBJS_PRIMITIVES = \ - s_compare96M$(OBJ) \ - s_compare128M$(OBJ) \ - s_shortShiftLeft64To96M$(OBJ) \ - s_shortShiftLeftM$(OBJ) \ - s_shiftLeftM$(OBJ) \ - s_shortShiftRightM$(OBJ) \ - s_shortShiftRightJam64$(OBJ) \ - s_shortShiftRightJamM$(OBJ) \ - s_shiftRightJam32$(OBJ) \ - s_shiftRightJam64$(OBJ) \ - s_shiftRightJamM$(OBJ) \ - s_shiftRightM$(OBJ) \ - s_countLeadingZeros8$(OBJ) \ - s_countLeadingZeros16$(OBJ) \ - s_countLeadingZeros32$(OBJ) \ - s_countLeadingZeros64$(OBJ) \ - s_addM$(OBJ) \ - s_addCarryM$(OBJ) \ - s_addComplCarryM$(OBJ) \ - s_negXM$(OBJ) \ - s_sub1XM$(OBJ) \ - s_subM$(OBJ) \ - s_mul64To128M$(OBJ) \ - s_mul128MTo256M$(OBJ) \ - s_approxRecip_1Ks$(OBJ) \ - s_approxRecip32_1$(OBJ) \ - s_approxRecipSqrt_1Ks$(OBJ) \ - s_approxRecipSqrt32_1$(OBJ) \ - s_remStepMBy32$(OBJ) \ - -OBJS_SPECIALIZE = \ - softfloat_raiseFlags$(OBJ) \ - s_f16UIToCommonNaN$(OBJ) \ - s_commonNaNToF16UI$(OBJ) \ - s_propagateNaNF16UI$(OBJ) \ - s_f32UIToCommonNaN$(OBJ) \ - s_commonNaNToF32UI$(OBJ) \ - s_propagateNaNF32UI$(OBJ) \ - s_f64UIToCommonNaN$(OBJ) \ - s_commonNaNToF64UI$(OBJ) \ - s_propagateNaNF64UI$(OBJ) \ - extF80M_isSignalingNaN$(OBJ) \ - s_extF80MToCommonNaN$(OBJ) \ - s_commonNaNToExtF80M$(OBJ) \ - s_propagateNaNExtF80M$(OBJ) \ - f128M_isSignalingNaN$(OBJ) \ - s_f128MToCommonNaN$(OBJ) \ - s_commonNaNToF128M$(OBJ) \ - s_propagateNaNF128M$(OBJ) \ - -OBJS_OTHERS = \ - s_roundToUI32$(OBJ) \ - s_roundMToUI64$(OBJ) \ - s_roundToI32$(OBJ) \ - s_roundMToI64$(OBJ) \ - s_normSubnormalF16Sig$(OBJ) \ - s_roundPackToF16$(OBJ) \ - s_normRoundPackToF16$(OBJ) \ - s_addMagsF16$(OBJ) \ - s_subMagsF16$(OBJ) \ - s_mulAddF16$(OBJ) \ - s_normSubnormalF32Sig$(OBJ) \ - s_roundPackToF32$(OBJ) \ - s_normRoundPackToF32$(OBJ) \ - s_addMagsF32$(OBJ) \ - s_subMagsF32$(OBJ) \ - s_mulAddF32$(OBJ) \ - s_normSubnormalF64Sig$(OBJ) \ - s_roundPackToF64$(OBJ) \ - s_normRoundPackToF64$(OBJ) \ - s_addMagsF64$(OBJ) \ - s_subMagsF64$(OBJ) \ - s_mulAddF64$(OBJ) \ - s_tryPropagateNaNExtF80M$(OBJ) \ - s_invalidExtF80M$(OBJ) \ - s_normExtF80SigM$(OBJ) \ - s_roundPackMToExtF80M$(OBJ) \ - s_normRoundPackMToExtF80M$(OBJ) \ - s_addExtF80M$(OBJ) \ - s_compareNonnormExtF80M$(OBJ) \ - s_isNaNF128M$(OBJ) \ - s_tryPropagateNaNF128M$(OBJ) \ - s_invalidF128M$(OBJ) \ - s_shiftNormSigF128M$(OBJ) \ - s_roundPackMToF128M$(OBJ) \ - s_normRoundPackMToF128M$(OBJ) \ - s_addF128M$(OBJ) \ - s_mulAddF128M$(OBJ) \ - softfloat_state$(OBJ) \ - ui32_to_f16$(OBJ) \ - ui32_to_f32$(OBJ) \ - ui32_to_f64$(OBJ) \ - ui32_to_extF80M$(OBJ) \ - ui32_to_f128M$(OBJ) \ - ui64_to_f16$(OBJ) \ - ui64_to_f32$(OBJ) \ - ui64_to_f64$(OBJ) \ - ui64_to_extF80M$(OBJ) \ - ui64_to_f128M$(OBJ) \ - i32_to_f16$(OBJ) \ - i32_to_f32$(OBJ) \ - i32_to_f64$(OBJ) \ - i32_to_extF80M$(OBJ) \ - i32_to_f128M$(OBJ) \ - i64_to_f16$(OBJ) \ - i64_to_f32$(OBJ) \ - i64_to_f64$(OBJ) \ - i64_to_extF80M$(OBJ) \ - i64_to_f128M$(OBJ) \ - f16_to_ui32$(OBJ) \ - f16_to_ui64$(OBJ) \ - f16_to_i32$(OBJ) \ - f16_to_i64$(OBJ) \ - f16_to_ui32_r_minMag$(OBJ) \ - f16_to_ui64_r_minMag$(OBJ) \ - f16_to_i32_r_minMag$(OBJ) \ - f16_to_i64_r_minMag$(OBJ) \ - f16_to_f32$(OBJ) \ - f16_to_f64$(OBJ) \ - f16_to_extF80M$(OBJ) \ - f16_to_f128M$(OBJ) \ - f16_roundToInt$(OBJ) \ - f16_add$(OBJ) \ - f16_sub$(OBJ) \ - f16_mul$(OBJ) \ - f16_mulAdd$(OBJ) \ - f16_div$(OBJ) \ - f16_rem$(OBJ) \ - f16_sqrt$(OBJ) \ - f16_eq$(OBJ) \ - f16_le$(OBJ) \ - f16_lt$(OBJ) \ - f16_eq_signaling$(OBJ) \ - f16_le_quiet$(OBJ) \ - f16_lt_quiet$(OBJ) \ - f16_isSignalingNaN$(OBJ) \ - f32_to_ui32$(OBJ) \ - f32_to_ui64$(OBJ) \ - f32_to_i32$(OBJ) \ - f32_to_i64$(OBJ) \ - f32_to_ui32_r_minMag$(OBJ) \ - f32_to_ui64_r_minMag$(OBJ) \ - f32_to_i32_r_minMag$(OBJ) \ - f32_to_i64_r_minMag$(OBJ) \ - f32_to_f16$(OBJ) \ - f32_to_f64$(OBJ) \ - f32_to_extF80M$(OBJ) \ - f32_to_f128M$(OBJ) \ - f32_roundToInt$(OBJ) \ - f32_add$(OBJ) \ - f32_sub$(OBJ) \ - f32_mul$(OBJ) \ - f32_mulAdd$(OBJ) \ - f32_div$(OBJ) \ - f32_rem$(OBJ) \ - f32_sqrt$(OBJ) \ - f32_eq$(OBJ) \ - f32_le$(OBJ) \ - f32_lt$(OBJ) \ - f32_eq_signaling$(OBJ) \ - f32_le_quiet$(OBJ) \ - f32_lt_quiet$(OBJ) \ - f32_isSignalingNaN$(OBJ) \ - f64_to_ui32$(OBJ) \ - f64_to_ui64$(OBJ) \ - f64_to_i32$(OBJ) \ - f64_to_i64$(OBJ) \ - f64_to_ui32_r_minMag$(OBJ) \ - f64_to_ui64_r_minMag$(OBJ) \ - f64_to_i32_r_minMag$(OBJ) \ - f64_to_i64_r_minMag$(OBJ) \ - f64_to_f16$(OBJ) \ - f64_to_f32$(OBJ) \ - f64_to_extF80M$(OBJ) \ - f64_to_f128M$(OBJ) \ - f64_roundToInt$(OBJ) \ - f64_add$(OBJ) \ - f64_sub$(OBJ) \ - f64_mul$(OBJ) \ - f64_mulAdd$(OBJ) \ - f64_div$(OBJ) \ - f64_rem$(OBJ) \ - f64_sqrt$(OBJ) \ - f64_eq$(OBJ) \ - f64_le$(OBJ) \ - f64_lt$(OBJ) \ - f64_eq_signaling$(OBJ) \ - f64_le_quiet$(OBJ) \ - f64_lt_quiet$(OBJ) \ - f64_isSignalingNaN$(OBJ) \ - extF80M_to_ui32$(OBJ) \ - extF80M_to_ui64$(OBJ) \ - extF80M_to_i32$(OBJ) \ - extF80M_to_i64$(OBJ) \ - extF80M_to_ui32_r_minMag$(OBJ) \ - extF80M_to_ui64_r_minMag$(OBJ) \ - extF80M_to_i32_r_minMag$(OBJ) \ - extF80M_to_i64_r_minMag$(OBJ) \ - extF80M_to_f16$(OBJ) \ - extF80M_to_f32$(OBJ) \ - extF80M_to_f64$(OBJ) \ - extF80M_to_f128M$(OBJ) \ - extF80M_roundToInt$(OBJ) \ - extF80M_add$(OBJ) \ - extF80M_sub$(OBJ) \ - extF80M_mul$(OBJ) \ - extF80M_div$(OBJ) \ - extF80M_rem$(OBJ) \ - extF80M_sqrt$(OBJ) \ - extF80M_eq$(OBJ) \ - extF80M_le$(OBJ) \ - extF80M_lt$(OBJ) \ - extF80M_eq_signaling$(OBJ) \ - extF80M_le_quiet$(OBJ) \ - extF80M_lt_quiet$(OBJ) \ - f128M_to_ui32$(OBJ) \ - f128M_to_ui64$(OBJ) \ - f128M_to_i32$(OBJ) \ - f128M_to_i64$(OBJ) \ - f128M_to_ui32_r_minMag$(OBJ) \ - f128M_to_ui64_r_minMag$(OBJ) \ - f128M_to_i32_r_minMag$(OBJ) \ - f128M_to_i64_r_minMag$(OBJ) \ - f128M_to_f16$(OBJ) \ - f128M_to_f32$(OBJ) \ - f128M_to_f64$(OBJ) \ - f128M_to_extF80M$(OBJ) \ - f128M_roundToInt$(OBJ) \ - f128M_add$(OBJ) \ - f128M_sub$(OBJ) \ - f128M_mul$(OBJ) \ - f128M_mulAdd$(OBJ) \ - f128M_div$(OBJ) \ - f128M_rem$(OBJ) \ - f128M_sqrt$(OBJ) \ - f128M_eq$(OBJ) \ - f128M_le$(OBJ) \ - f128M_lt$(OBJ) \ - f128M_eq_signaling$(OBJ) \ - f128M_le_quiet$(OBJ) \ - f128M_lt_quiet$(OBJ) \ - -OBJS_ALL = $(OBJS_PRIMITIVES) $(OBJS_SPECIALIZE) $(OBJS_OTHERS) - -$(OBJS_ALL): \ - platform.h $(SOURCE_DIR)/include/primitiveTypes.h \ - $(SOURCE_DIR)/include/primitives.h -$(OBJS_SPECIALIZE) $(OBJS_OTHERS): \ - $(SOURCE_DIR)/include/softfloat_types.h $(SOURCE_DIR)/include/internals.h \ - $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/specialize.h \ - $(SOURCE_DIR)/include/softfloat.h - -$(OBJS_PRIMITIVES) $(OBJS_OTHERS): %$(OBJ): $(SOURCE_DIR)/%.c - $(COMPILE_C) $(SOURCE_DIR)/$*.c - -$(OBJS_SPECIALIZE): %$(OBJ): $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/%.c - $(COMPILE_C) $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/$*.c - -softfloat$(LIB): $(OBJS_ALL) - $(DELETE) $@ - $(MAKELIB) $^ - -.PHONY: clean -clean: - $(DELETE) $(OBJS_ALL) softfloat$(LIB) - diff --git a/outside/softfloat-3/build/Linux-386-SSE2-GCC/platform.h b/outside/softfloat-3/build/Linux-386-SSE2-GCC/platform.h deleted file mode 100644 index 8af002ebe..000000000 --- a/outside/softfloat-3/build/Linux-386-SSE2-GCC/platform.h +++ /dev/null @@ -1,48 +0,0 @@ - -/*============================================================================ - -This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -/*---------------------------------------------------------------------------- -*----------------------------------------------------------------------------*/ -#define LITTLEENDIAN 1 - -/*---------------------------------------------------------------------------- -*----------------------------------------------------------------------------*/ -#ifdef __GNUC_STDC_INLINE__ -#define INLINE inline -#else -#define INLINE extern inline -#endif - diff --git a/outside/softfloat-3/build/Linux-x86_64-GCC/Makefile b/outside/softfloat-3/build/Linux-x86_64-GCC/Makefile deleted file mode 100644 index cd54af2d7..000000000 --- a/outside/softfloat-3/build/Linux-x86_64-GCC/Makefile +++ /dev/null @@ -1,388 +0,0 @@ - -#============================================================================= -# -# This Makefile is part of the SoftFloat IEEE Floating-Point Arithmetic -# Package, Release 3c, by John R. Hauser. -# -# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the -# University of California. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright notice, -# this list of conditions, and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions, and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. -# -#============================================================================= - -SOURCE_DIR ?= ../../source -SPECIALIZE_TYPE ?= 8086-SSE - -SOFTFLOAT_OPTS ?= \ - -DSOFTFLOAT_ROUND_ODD -DINLINE_LEVEL=5 -DSOFTFLOAT_FAST_DIV32TO16 \ - -DSOFTFLOAT_FAST_DIV64TO32 - -DELETE = rm -f -C_INCLUDES = -I. -I$(SOURCE_DIR)/$(SPECIALIZE_TYPE) -I$(SOURCE_DIR)/include -COMPILE_C = \ - gcc -c -Werror-implicit-function-declaration -DSOFTFLOAT_FAST_INT64 \ - $(SOFTFLOAT_OPTS) $(C_INCLUDES) -O2 -o $@ -MAKELIB = ar crs $@ - -OBJ = .o -LIB = .a - -.PHONY: all -all: softfloat$(LIB) - -OBJS_PRIMITIVES = \ - s_eq128$(OBJ) \ - s_le128$(OBJ) \ - s_lt128$(OBJ) \ - s_shortShiftLeft128$(OBJ) \ - s_shortShiftRight128$(OBJ) \ - s_shortShiftRightJam64$(OBJ) \ - s_shortShiftRightJam64Extra$(OBJ) \ - s_shortShiftRightJam128$(OBJ) \ - s_shortShiftRightJam128Extra$(OBJ) \ - s_shiftRightJam32$(OBJ) \ - s_shiftRightJam64$(OBJ) \ - s_shiftRightJam64Extra$(OBJ) \ - s_shiftRightJam128$(OBJ) \ - s_shiftRightJam128Extra$(OBJ) \ - s_shiftRightJam256M$(OBJ) \ - s_countLeadingZeros8$(OBJ) \ - s_countLeadingZeros16$(OBJ) \ - s_countLeadingZeros32$(OBJ) \ - s_countLeadingZeros64$(OBJ) \ - s_add128$(OBJ) \ - s_add256M$(OBJ) \ - s_sub128$(OBJ) \ - s_sub256M$(OBJ) \ - s_mul64ByShifted32To128$(OBJ) \ - s_mul64To128$(OBJ) \ - s_mul128By32$(OBJ) \ - s_mul128To256M$(OBJ) \ - s_approxRecip_1Ks$(OBJ) \ - s_approxRecip32_1$(OBJ) \ - s_approxRecipSqrt_1Ks$(OBJ) \ - s_approxRecipSqrt32_1$(OBJ) \ - -OBJS_SPECIALIZE = \ - softfloat_raiseFlags$(OBJ) \ - s_f16UIToCommonNaN$(OBJ) \ - s_commonNaNToF16UI$(OBJ) \ - s_propagateNaNF16UI$(OBJ) \ - s_f32UIToCommonNaN$(OBJ) \ - s_commonNaNToF32UI$(OBJ) \ - s_propagateNaNF32UI$(OBJ) \ - s_f64UIToCommonNaN$(OBJ) \ - s_commonNaNToF64UI$(OBJ) \ - s_propagateNaNF64UI$(OBJ) \ - extF80M_isSignalingNaN$(OBJ) \ - s_extF80UIToCommonNaN$(OBJ) \ - s_commonNaNToExtF80UI$(OBJ) \ - s_propagateNaNExtF80UI$(OBJ) \ - f128M_isSignalingNaN$(OBJ) \ - s_f128UIToCommonNaN$(OBJ) \ - s_commonNaNToF128UI$(OBJ) \ - s_propagateNaNF128UI$(OBJ) \ - -OBJS_OTHERS = \ - s_roundToUI32$(OBJ) \ - s_roundToUI64$(OBJ) \ - s_roundToI32$(OBJ) \ - s_roundToI64$(OBJ) \ - s_normSubnormalF16Sig$(OBJ) \ - s_roundPackToF16$(OBJ) \ - s_normRoundPackToF16$(OBJ) \ - s_addMagsF16$(OBJ) \ - s_subMagsF16$(OBJ) \ - s_mulAddF16$(OBJ) \ - s_normSubnormalF32Sig$(OBJ) \ - s_roundPackToF32$(OBJ) \ - s_normRoundPackToF32$(OBJ) \ - s_addMagsF32$(OBJ) \ - s_subMagsF32$(OBJ) \ - s_mulAddF32$(OBJ) \ - s_normSubnormalF64Sig$(OBJ) \ - s_roundPackToF64$(OBJ) \ - s_normRoundPackToF64$(OBJ) \ - s_addMagsF64$(OBJ) \ - s_subMagsF64$(OBJ) \ - s_mulAddF64$(OBJ) \ - s_normSubnormalExtF80Sig$(OBJ) \ - s_roundPackToExtF80$(OBJ) \ - s_normRoundPackToExtF80$(OBJ) \ - s_addMagsExtF80$(OBJ) \ - s_subMagsExtF80$(OBJ) \ - s_normSubnormalF128Sig$(OBJ) \ - s_roundPackToF128$(OBJ) \ - s_normRoundPackToF128$(OBJ) \ - s_addMagsF128$(OBJ) \ - s_subMagsF128$(OBJ) \ - s_mulAddF128$(OBJ) \ - softfloat_state$(OBJ) \ - ui32_to_f16$(OBJ) \ - ui32_to_f32$(OBJ) \ - ui32_to_f64$(OBJ) \ - ui32_to_extF80$(OBJ) \ - ui32_to_extF80M$(OBJ) \ - ui32_to_f128$(OBJ) \ - ui32_to_f128M$(OBJ) \ - ui64_to_f16$(OBJ) \ - ui64_to_f32$(OBJ) \ - ui64_to_f64$(OBJ) \ - ui64_to_extF80$(OBJ) \ - ui64_to_extF80M$(OBJ) \ - ui64_to_f128$(OBJ) \ - ui64_to_f128M$(OBJ) \ - i32_to_f16$(OBJ) \ - i32_to_f32$(OBJ) \ - i32_to_f64$(OBJ) \ - i32_to_extF80$(OBJ) \ - i32_to_extF80M$(OBJ) \ - i32_to_f128$(OBJ) \ - i32_to_f128M$(OBJ) \ - i64_to_f16$(OBJ) \ - i64_to_f32$(OBJ) \ - i64_to_f64$(OBJ) \ - i64_to_extF80$(OBJ) \ - i64_to_extF80M$(OBJ) \ - i64_to_f128$(OBJ) \ - i64_to_f128M$(OBJ) \ - f16_to_ui32$(OBJ) \ - f16_to_ui64$(OBJ) \ - f16_to_i32$(OBJ) \ - f16_to_i64$(OBJ) \ - f16_to_ui32_r_minMag$(OBJ) \ - f16_to_ui64_r_minMag$(OBJ) \ - f16_to_i32_r_minMag$(OBJ) \ - f16_to_i64_r_minMag$(OBJ) \ - f16_to_f32$(OBJ) \ - f16_to_f64$(OBJ) \ - f16_to_extF80$(OBJ) \ - f16_to_extF80M$(OBJ) \ - f16_to_f128$(OBJ) \ - f16_to_f128M$(OBJ) \ - f16_roundToInt$(OBJ) \ - f16_add$(OBJ) \ - f16_sub$(OBJ) \ - f16_mul$(OBJ) \ - f16_mulAdd$(OBJ) \ - f16_div$(OBJ) \ - f16_rem$(OBJ) \ - f16_sqrt$(OBJ) \ - f16_eq$(OBJ) \ - f16_le$(OBJ) \ - f16_lt$(OBJ) \ - f16_eq_signaling$(OBJ) \ - f16_le_quiet$(OBJ) \ - f16_lt_quiet$(OBJ) \ - f16_isSignalingNaN$(OBJ) \ - f32_to_ui32$(OBJ) \ - f32_to_ui64$(OBJ) \ - f32_to_i32$(OBJ) \ - f32_to_i64$(OBJ) \ - f32_to_ui32_r_minMag$(OBJ) \ - f32_to_ui64_r_minMag$(OBJ) \ - f32_to_i32_r_minMag$(OBJ) \ - f32_to_i64_r_minMag$(OBJ) \ - f32_to_f16$(OBJ) \ - f32_to_f64$(OBJ) \ - f32_to_extF80$(OBJ) \ - f32_to_extF80M$(OBJ) \ - f32_to_f128$(OBJ) \ - f32_to_f128M$(OBJ) \ - f32_roundToInt$(OBJ) \ - f32_add$(OBJ) \ - f32_sub$(OBJ) \ - f32_mul$(OBJ) \ - f32_mulAdd$(OBJ) \ - f32_div$(OBJ) \ - f32_rem$(OBJ) \ - f32_sqrt$(OBJ) \ - f32_eq$(OBJ) \ - f32_le$(OBJ) \ - f32_lt$(OBJ) \ - f32_eq_signaling$(OBJ) \ - f32_le_quiet$(OBJ) \ - f32_lt_quiet$(OBJ) \ - f32_isSignalingNaN$(OBJ) \ - f64_to_ui32$(OBJ) \ - f64_to_ui64$(OBJ) \ - f64_to_i32$(OBJ) \ - f64_to_i64$(OBJ) \ - f64_to_ui32_r_minMag$(OBJ) \ - f64_to_ui64_r_minMag$(OBJ) \ - f64_to_i32_r_minMag$(OBJ) \ - f64_to_i64_r_minMag$(OBJ) \ - f64_to_f16$(OBJ) \ - f64_to_f32$(OBJ) \ - f64_to_extF80$(OBJ) \ - f64_to_extF80M$(OBJ) \ - f64_to_f128$(OBJ) \ - f64_to_f128M$(OBJ) \ - f64_roundToInt$(OBJ) \ - f64_add$(OBJ) \ - f64_sub$(OBJ) \ - f64_mul$(OBJ) \ - f64_mulAdd$(OBJ) \ - f64_div$(OBJ) \ - f64_rem$(OBJ) \ - f64_sqrt$(OBJ) \ - f64_eq$(OBJ) \ - f64_le$(OBJ) \ - f64_lt$(OBJ) \ - f64_eq_signaling$(OBJ) \ - f64_le_quiet$(OBJ) \ - f64_lt_quiet$(OBJ) \ - f64_isSignalingNaN$(OBJ) \ - extF80_to_ui32$(OBJ) \ - extF80_to_ui64$(OBJ) \ - extF80_to_i32$(OBJ) \ - extF80_to_i64$(OBJ) \ - extF80_to_ui32_r_minMag$(OBJ) \ - extF80_to_ui64_r_minMag$(OBJ) \ - extF80_to_i32_r_minMag$(OBJ) \ - extF80_to_i64_r_minMag$(OBJ) \ - extF80_to_f16$(OBJ) \ - extF80_to_f32$(OBJ) \ - extF80_to_f64$(OBJ) \ - extF80_to_f128$(OBJ) \ - extF80_roundToInt$(OBJ) \ - extF80_add$(OBJ) \ - extF80_sub$(OBJ) \ - extF80_mul$(OBJ) \ - extF80_div$(OBJ) \ - extF80_rem$(OBJ) \ - extF80_sqrt$(OBJ) \ - extF80_eq$(OBJ) \ - extF80_le$(OBJ) \ - extF80_lt$(OBJ) \ - extF80_eq_signaling$(OBJ) \ - extF80_le_quiet$(OBJ) \ - extF80_lt_quiet$(OBJ) \ - extF80_isSignalingNaN$(OBJ) \ - extF80M_to_ui32$(OBJ) \ - extF80M_to_ui64$(OBJ) \ - extF80M_to_i32$(OBJ) \ - extF80M_to_i64$(OBJ) \ - extF80M_to_ui32_r_minMag$(OBJ) \ - extF80M_to_ui64_r_minMag$(OBJ) \ - extF80M_to_i32_r_minMag$(OBJ) \ - extF80M_to_i64_r_minMag$(OBJ) \ - extF80M_to_f16$(OBJ) \ - extF80M_to_f32$(OBJ) \ - extF80M_to_f64$(OBJ) \ - extF80M_to_f128M$(OBJ) \ - extF80M_roundToInt$(OBJ) \ - extF80M_add$(OBJ) \ - extF80M_sub$(OBJ) \ - extF80M_mul$(OBJ) \ - extF80M_div$(OBJ) \ - extF80M_rem$(OBJ) \ - extF80M_sqrt$(OBJ) \ - extF80M_eq$(OBJ) \ - extF80M_le$(OBJ) \ - extF80M_lt$(OBJ) \ - extF80M_eq_signaling$(OBJ) \ - extF80M_le_quiet$(OBJ) \ - extF80M_lt_quiet$(OBJ) \ - f128_to_ui32$(OBJ) \ - f128_to_ui64$(OBJ) \ - f128_to_i32$(OBJ) \ - f128_to_i64$(OBJ) \ - f128_to_ui32_r_minMag$(OBJ) \ - f128_to_ui64_r_minMag$(OBJ) \ - f128_to_i32_r_minMag$(OBJ) \ - f128_to_i64_r_minMag$(OBJ) \ - f128_to_f16$(OBJ) \ - f128_to_f32$(OBJ) \ - f128_to_extF80$(OBJ) \ - f128_to_f64$(OBJ) \ - f128_roundToInt$(OBJ) \ - f128_add$(OBJ) \ - f128_sub$(OBJ) \ - f128_mul$(OBJ) \ - f128_mulAdd$(OBJ) \ - f128_div$(OBJ) \ - f128_rem$(OBJ) \ - f128_sqrt$(OBJ) \ - f128_eq$(OBJ) \ - f128_le$(OBJ) \ - f128_lt$(OBJ) \ - f128_eq_signaling$(OBJ) \ - f128_le_quiet$(OBJ) \ - f128_lt_quiet$(OBJ) \ - f128_isSignalingNaN$(OBJ) \ - f128M_to_ui32$(OBJ) \ - f128M_to_ui64$(OBJ) \ - f128M_to_i32$(OBJ) \ - f128M_to_i64$(OBJ) \ - f128M_to_ui32_r_minMag$(OBJ) \ - f128M_to_ui64_r_minMag$(OBJ) \ - f128M_to_i32_r_minMag$(OBJ) \ - f128M_to_i64_r_minMag$(OBJ) \ - f128M_to_f16$(OBJ) \ - f128M_to_f32$(OBJ) \ - f128M_to_extF80M$(OBJ) \ - f128M_to_f64$(OBJ) \ - f128M_roundToInt$(OBJ) \ - f128M_add$(OBJ) \ - f128M_sub$(OBJ) \ - f128M_mul$(OBJ) \ - f128M_mulAdd$(OBJ) \ - f128M_div$(OBJ) \ - f128M_rem$(OBJ) \ - f128M_sqrt$(OBJ) \ - f128M_eq$(OBJ) \ - f128M_le$(OBJ) \ - f128M_lt$(OBJ) \ - f128M_eq_signaling$(OBJ) \ - f128M_le_quiet$(OBJ) \ - f128M_lt_quiet$(OBJ) \ - -OBJS_ALL = $(OBJS_PRIMITIVES) $(OBJS_SPECIALIZE) $(OBJS_OTHERS) - -$(OBJS_ALL): \ - platform.h $(SOURCE_DIR)/include/primitiveTypes.h \ - $(SOURCE_DIR)/include/primitives.h -$(OBJS_SPECIALIZE) $(OBJS_OTHERS): \ - $(SOURCE_DIR)/include/softfloat_types.h $(SOURCE_DIR)/include/internals.h \ - $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/specialize.h \ - $(SOURCE_DIR)/include/softfloat.h - -$(OBJS_PRIMITIVES) $(OBJS_OTHERS): %$(OBJ): $(SOURCE_DIR)/%.c - $(COMPILE_C) $(SOURCE_DIR)/$*.c - -$(OBJS_SPECIALIZE): %$(OBJ): $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/%.c - $(COMPILE_C) $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/$*.c - -softfloat$(LIB): $(OBJS_ALL) - $(DELETE) $@ - $(MAKELIB) $^ - -.PHONY: clean -clean: - $(DELETE) $(OBJS_ALL) softfloat$(LIB) - diff --git a/outside/softfloat-3/build/Linux-x86_64-GCC/platform.h b/outside/softfloat-3/build/Linux-x86_64-GCC/platform.h deleted file mode 100644 index 8af002ebe..000000000 --- a/outside/softfloat-3/build/Linux-x86_64-GCC/platform.h +++ /dev/null @@ -1,48 +0,0 @@ - -/*============================================================================ - -This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -/*---------------------------------------------------------------------------- -*----------------------------------------------------------------------------*/ -#define LITTLEENDIAN 1 - -/*---------------------------------------------------------------------------- -*----------------------------------------------------------------------------*/ -#ifdef __GNUC_STDC_INLINE__ -#define INLINE inline -#else -#define INLINE extern inline -#endif - diff --git a/outside/softfloat-3/build/Win32-MinGW/Makefile b/outside/softfloat-3/build/Win32-MinGW/Makefile deleted file mode 100644 index 994f07f3e..000000000 --- a/outside/softfloat-3/build/Win32-MinGW/Makefile +++ /dev/null @@ -1,323 +0,0 @@ - -#============================================================================= -# -# This Makefile is part of the SoftFloat IEEE Floating-Point Arithmetic -# Package, Release 3c, by John R. Hauser. -# -# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the -# University of California. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright notice, -# this list of conditions, and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions, and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. -# -#============================================================================= - -SOURCE_DIR ?= ../../source -SPECIALIZE_TYPE ?= 8086 - -SOFTFLOAT_OPTS ?= \ - -DSOFTFLOAT_ROUND_ODD -DINLINE_LEVEL=5 -DSOFTFLOAT_FAST_DIV32TO16 \ - -DSOFTFLOAT_FAST_DIV64TO32 - -DELETE = rm -f -C_INCLUDES = -I. -I$(SOURCE_DIR)/$(SPECIALIZE_TYPE) -I$(SOURCE_DIR)/include -COMPILE_C = \ - gcc -c -Werror-implicit-function-declaration $(SOFTFLOAT_OPTS) \ - $(C_INCLUDES) -O2 -o $@ -MAKELIB = ar crs $@ - -OBJ = .o -LIB = .a - -.PHONY: all -all: softfloat$(LIB) - -OBJS_PRIMITIVES = \ - s_compare96M$(OBJ) \ - s_compare128M$(OBJ) \ - s_shortShiftLeft64To96M$(OBJ) \ - s_shortShiftLeftM$(OBJ) \ - s_shiftLeftM$(OBJ) \ - s_shortShiftRightM$(OBJ) \ - s_shortShiftRightJam64$(OBJ) \ - s_shortShiftRightJamM$(OBJ) \ - s_shiftRightJam32$(OBJ) \ - s_shiftRightJam64$(OBJ) \ - s_shiftRightJamM$(OBJ) \ - s_shiftRightM$(OBJ) \ - s_countLeadingZeros8$(OBJ) \ - s_countLeadingZeros16$(OBJ) \ - s_countLeadingZeros32$(OBJ) \ - s_countLeadingZeros64$(OBJ) \ - s_addM$(OBJ) \ - s_addCarryM$(OBJ) \ - s_addComplCarryM$(OBJ) \ - s_negXM$(OBJ) \ - s_sub1XM$(OBJ) \ - s_subM$(OBJ) \ - s_mul64To128M$(OBJ) \ - s_mul128MTo256M$(OBJ) \ - s_approxRecip_1Ks$(OBJ) \ - s_approxRecip32_1$(OBJ) \ - s_approxRecipSqrt_1Ks$(OBJ) \ - s_approxRecipSqrt32_1$(OBJ) \ - s_remStepMBy32$(OBJ) \ - -OBJS_SPECIALIZE = \ - softfloat_raiseFlags$(OBJ) \ - s_f16UIToCommonNaN$(OBJ) \ - s_commonNaNToF16UI$(OBJ) \ - s_propagateNaNF16UI$(OBJ) \ - s_f32UIToCommonNaN$(OBJ) \ - s_commonNaNToF32UI$(OBJ) \ - s_propagateNaNF32UI$(OBJ) \ - s_f64UIToCommonNaN$(OBJ) \ - s_commonNaNToF64UI$(OBJ) \ - s_propagateNaNF64UI$(OBJ) \ - extF80M_isSignalingNaN$(OBJ) \ - s_extF80MToCommonNaN$(OBJ) \ - s_commonNaNToExtF80M$(OBJ) \ - s_propagateNaNExtF80M$(OBJ) \ - f128M_isSignalingNaN$(OBJ) \ - s_f128MToCommonNaN$(OBJ) \ - s_commonNaNToF128M$(OBJ) \ - s_propagateNaNF128M$(OBJ) \ - -OBJS_OTHERS = \ - s_roundToUI32$(OBJ) \ - s_roundMToUI64$(OBJ) \ - s_roundToI32$(OBJ) \ - s_roundMToI64$(OBJ) \ - s_normSubnormalF16Sig$(OBJ) \ - s_roundPackToF16$(OBJ) \ - s_normRoundPackToF16$(OBJ) \ - s_addMagsF16$(OBJ) \ - s_subMagsF16$(OBJ) \ - s_mulAddF16$(OBJ) \ - s_normSubnormalF32Sig$(OBJ) \ - s_roundPackToF32$(OBJ) \ - s_normRoundPackToF32$(OBJ) \ - s_addMagsF32$(OBJ) \ - s_subMagsF32$(OBJ) \ - s_mulAddF32$(OBJ) \ - s_normSubnormalF64Sig$(OBJ) \ - s_roundPackToF64$(OBJ) \ - s_normRoundPackToF64$(OBJ) \ - s_addMagsF64$(OBJ) \ - s_subMagsF64$(OBJ) \ - s_mulAddF64$(OBJ) \ - s_tryPropagateNaNExtF80M$(OBJ) \ - s_invalidExtF80M$(OBJ) \ - s_normExtF80SigM$(OBJ) \ - s_roundPackMToExtF80M$(OBJ) \ - s_normRoundPackMToExtF80M$(OBJ) \ - s_addExtF80M$(OBJ) \ - s_compareNonnormExtF80M$(OBJ) \ - s_isNaNF128M$(OBJ) \ - s_tryPropagateNaNF128M$(OBJ) \ - s_invalidF128M$(OBJ) \ - s_shiftNormSigF128M$(OBJ) \ - s_roundPackMToF128M$(OBJ) \ - s_normRoundPackMToF128M$(OBJ) \ - s_addF128M$(OBJ) \ - s_mulAddF128M$(OBJ) \ - softfloat_state$(OBJ) \ - ui32_to_f16$(OBJ) \ - ui32_to_f32$(OBJ) \ - ui32_to_f64$(OBJ) \ - ui32_to_extF80M$(OBJ) \ - ui32_to_f128M$(OBJ) \ - ui64_to_f16$(OBJ) \ - ui64_to_f32$(OBJ) \ - ui64_to_f64$(OBJ) \ - ui64_to_extF80M$(OBJ) \ - ui64_to_f128M$(OBJ) \ - i32_to_f16$(OBJ) \ - i32_to_f32$(OBJ) \ - i32_to_f64$(OBJ) \ - i32_to_extF80M$(OBJ) \ - i32_to_f128M$(OBJ) \ - i64_to_f16$(OBJ) \ - i64_to_f32$(OBJ) \ - i64_to_f64$(OBJ) \ - i64_to_extF80M$(OBJ) \ - i64_to_f128M$(OBJ) \ - f16_to_ui32$(OBJ) \ - f16_to_ui64$(OBJ) \ - f16_to_i32$(OBJ) \ - f16_to_i64$(OBJ) \ - f16_to_ui32_r_minMag$(OBJ) \ - f16_to_ui64_r_minMag$(OBJ) \ - f16_to_i32_r_minMag$(OBJ) \ - f16_to_i64_r_minMag$(OBJ) \ - f16_to_f32$(OBJ) \ - f16_to_f64$(OBJ) \ - f16_to_extF80M$(OBJ) \ - f16_to_f128M$(OBJ) \ - f16_roundToInt$(OBJ) \ - f16_add$(OBJ) \ - f16_sub$(OBJ) \ - f16_mul$(OBJ) \ - f16_mulAdd$(OBJ) \ - f16_div$(OBJ) \ - f16_rem$(OBJ) \ - f16_sqrt$(OBJ) \ - f16_eq$(OBJ) \ - f16_le$(OBJ) \ - f16_lt$(OBJ) \ - f16_eq_signaling$(OBJ) \ - f16_le_quiet$(OBJ) \ - f16_lt_quiet$(OBJ) \ - f16_isSignalingNaN$(OBJ) \ - f32_to_ui32$(OBJ) \ - f32_to_ui64$(OBJ) \ - f32_to_i32$(OBJ) \ - f32_to_i64$(OBJ) \ - f32_to_ui32_r_minMag$(OBJ) \ - f32_to_ui64_r_minMag$(OBJ) \ - f32_to_i32_r_minMag$(OBJ) \ - f32_to_i64_r_minMag$(OBJ) \ - f32_to_f16$(OBJ) \ - f32_to_f64$(OBJ) \ - f32_to_extF80M$(OBJ) \ - f32_to_f128M$(OBJ) \ - f32_roundToInt$(OBJ) \ - f32_add$(OBJ) \ - f32_sub$(OBJ) \ - f32_mul$(OBJ) \ - f32_mulAdd$(OBJ) \ - f32_div$(OBJ) \ - f32_rem$(OBJ) \ - f32_sqrt$(OBJ) \ - f32_eq$(OBJ) \ - f32_le$(OBJ) \ - f32_lt$(OBJ) \ - f32_eq_signaling$(OBJ) \ - f32_le_quiet$(OBJ) \ - f32_lt_quiet$(OBJ) \ - f32_isSignalingNaN$(OBJ) \ - f64_to_ui32$(OBJ) \ - f64_to_ui64$(OBJ) \ - f64_to_i32$(OBJ) \ - f64_to_i64$(OBJ) \ - f64_to_ui32_r_minMag$(OBJ) \ - f64_to_ui64_r_minMag$(OBJ) \ - f64_to_i32_r_minMag$(OBJ) \ - f64_to_i64_r_minMag$(OBJ) \ - f64_to_f16$(OBJ) \ - f64_to_f32$(OBJ) \ - f64_to_extF80M$(OBJ) \ - f64_to_f128M$(OBJ) \ - f64_roundToInt$(OBJ) \ - f64_add$(OBJ) \ - f64_sub$(OBJ) \ - f64_mul$(OBJ) \ - f64_mulAdd$(OBJ) \ - f64_div$(OBJ) \ - f64_rem$(OBJ) \ - f64_sqrt$(OBJ) \ - f64_eq$(OBJ) \ - f64_le$(OBJ) \ - f64_lt$(OBJ) \ - f64_eq_signaling$(OBJ) \ - f64_le_quiet$(OBJ) \ - f64_lt_quiet$(OBJ) \ - f64_isSignalingNaN$(OBJ) \ - extF80M_to_ui32$(OBJ) \ - extF80M_to_ui64$(OBJ) \ - extF80M_to_i32$(OBJ) \ - extF80M_to_i64$(OBJ) \ - extF80M_to_ui32_r_minMag$(OBJ) \ - extF80M_to_ui64_r_minMag$(OBJ) \ - extF80M_to_i32_r_minMag$(OBJ) \ - extF80M_to_i64_r_minMag$(OBJ) \ - extF80M_to_f16$(OBJ) \ - extF80M_to_f32$(OBJ) \ - extF80M_to_f64$(OBJ) \ - extF80M_to_f128M$(OBJ) \ - extF80M_roundToInt$(OBJ) \ - extF80M_add$(OBJ) \ - extF80M_sub$(OBJ) \ - extF80M_mul$(OBJ) \ - extF80M_div$(OBJ) \ - extF80M_rem$(OBJ) \ - extF80M_sqrt$(OBJ) \ - extF80M_eq$(OBJ) \ - extF80M_le$(OBJ) \ - extF80M_lt$(OBJ) \ - extF80M_eq_signaling$(OBJ) \ - extF80M_le_quiet$(OBJ) \ - extF80M_lt_quiet$(OBJ) \ - f128M_to_ui32$(OBJ) \ - f128M_to_ui64$(OBJ) \ - f128M_to_i32$(OBJ) \ - f128M_to_i64$(OBJ) \ - f128M_to_ui32_r_minMag$(OBJ) \ - f128M_to_ui64_r_minMag$(OBJ) \ - f128M_to_i32_r_minMag$(OBJ) \ - f128M_to_i64_r_minMag$(OBJ) \ - f128M_to_f16$(OBJ) \ - f128M_to_f32$(OBJ) \ - f128M_to_f64$(OBJ) \ - f128M_to_extF80M$(OBJ) \ - f128M_roundToInt$(OBJ) \ - f128M_add$(OBJ) \ - f128M_sub$(OBJ) \ - f128M_mul$(OBJ) \ - f128M_mulAdd$(OBJ) \ - f128M_div$(OBJ) \ - f128M_rem$(OBJ) \ - f128M_sqrt$(OBJ) \ - f128M_eq$(OBJ) \ - f128M_le$(OBJ) \ - f128M_lt$(OBJ) \ - f128M_eq_signaling$(OBJ) \ - f128M_le_quiet$(OBJ) \ - f128M_lt_quiet$(OBJ) \ - -OBJS_ALL = $(OBJS_PRIMITIVES) $(OBJS_SPECIALIZE) $(OBJS_OTHERS) - -$(OBJS_ALL): \ - platform.h $(SOURCE_DIR)/include/primitiveTypes.h \ - $(SOURCE_DIR)/include/primitives.h -$(OBJS_SPECIALIZE) $(OBJS_OTHERS): \ - $(SOURCE_DIR)/include/softfloat_types.h $(SOURCE_DIR)/include/internals.h \ - $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/specialize.h \ - $(SOURCE_DIR)/include/softfloat.h - -$(OBJS_PRIMITIVES) $(OBJS_OTHERS): %$(OBJ): $(SOURCE_DIR)/%.c - $(COMPILE_C) $(SOURCE_DIR)/$*.c - -$(OBJS_SPECIALIZE): %$(OBJ): $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/%.c - $(COMPILE_C) $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/$*.c - -softfloat$(LIB): $(OBJS_ALL) - $(DELETE) $@ - $(MAKELIB) $^ - -.PHONY: clean -clean: - $(DELETE) $(OBJS_ALL) softfloat$(LIB) - diff --git a/outside/softfloat-3/build/Win32-MinGW/platform.h b/outside/softfloat-3/build/Win32-MinGW/platform.h deleted file mode 100644 index 8af002ebe..000000000 --- a/outside/softfloat-3/build/Win32-MinGW/platform.h +++ /dev/null @@ -1,48 +0,0 @@ - -/*============================================================================ - -This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -/*---------------------------------------------------------------------------- -*----------------------------------------------------------------------------*/ -#define LITTLEENDIAN 1 - -/*---------------------------------------------------------------------------- -*----------------------------------------------------------------------------*/ -#ifdef __GNUC_STDC_INLINE__ -#define INLINE inline -#else -#define INLINE extern inline -#endif - diff --git a/outside/softfloat-3/build/Win32-SSE2-MinGW/Makefile b/outside/softfloat-3/build/Win32-SSE2-MinGW/Makefile deleted file mode 100644 index 8e4bf1526..000000000 --- a/outside/softfloat-3/build/Win32-SSE2-MinGW/Makefile +++ /dev/null @@ -1,323 +0,0 @@ - -#============================================================================= -# -# This Makefile is part of the SoftFloat IEEE Floating-Point Arithmetic -# Package, Release 3c, by John R. Hauser. -# -# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the -# University of California. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright notice, -# this list of conditions, and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions, and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. -# -#============================================================================= - -SOURCE_DIR ?= ../../source -SPECIALIZE_TYPE ?= 8086-SSE - -SOFTFLOAT_OPTS ?= \ - -DSOFTFLOAT_ROUND_ODD -DINLINE_LEVEL=5 -DSOFTFLOAT_FAST_DIV32TO16 \ - -DSOFTFLOAT_FAST_DIV64TO32 - -DELETE = rm -f -C_INCLUDES = -I. -I$(SOURCE_DIR)/$(SPECIALIZE_TYPE) -I$(SOURCE_DIR)/include -COMPILE_C = \ - gcc -c -Werror-implicit-function-declaration $(SOFTFLOAT_OPTS) \ - $(C_INCLUDES) -O2 -o $@ -MAKELIB = ar crs $@ - -OBJ = .o -LIB = .a - -.PHONY: all -all: softfloat$(LIB) - -OBJS_PRIMITIVES = \ - s_compare96M$(OBJ) \ - s_compare128M$(OBJ) \ - s_shortShiftLeft64To96M$(OBJ) \ - s_shortShiftLeftM$(OBJ) \ - s_shiftLeftM$(OBJ) \ - s_shortShiftRightM$(OBJ) \ - s_shortShiftRightJam64$(OBJ) \ - s_shortShiftRightJamM$(OBJ) \ - s_shiftRightJam32$(OBJ) \ - s_shiftRightJam64$(OBJ) \ - s_shiftRightJamM$(OBJ) \ - s_shiftRightM$(OBJ) \ - s_countLeadingZeros8$(OBJ) \ - s_countLeadingZeros16$(OBJ) \ - s_countLeadingZeros32$(OBJ) \ - s_countLeadingZeros64$(OBJ) \ - s_addM$(OBJ) \ - s_addCarryM$(OBJ) \ - s_addComplCarryM$(OBJ) \ - s_negXM$(OBJ) \ - s_sub1XM$(OBJ) \ - s_subM$(OBJ) \ - s_mul64To128M$(OBJ) \ - s_mul128MTo256M$(OBJ) \ - s_approxRecip_1Ks$(OBJ) \ - s_approxRecip32_1$(OBJ) \ - s_approxRecipSqrt_1Ks$(OBJ) \ - s_approxRecipSqrt32_1$(OBJ) \ - s_remStepMBy32$(OBJ) \ - -OBJS_SPECIALIZE = \ - softfloat_raiseFlags$(OBJ) \ - s_f16UIToCommonNaN$(OBJ) \ - s_commonNaNToF16UI$(OBJ) \ - s_propagateNaNF16UI$(OBJ) \ - s_f32UIToCommonNaN$(OBJ) \ - s_commonNaNToF32UI$(OBJ) \ - s_propagateNaNF32UI$(OBJ) \ - s_f64UIToCommonNaN$(OBJ) \ - s_commonNaNToF64UI$(OBJ) \ - s_propagateNaNF64UI$(OBJ) \ - extF80M_isSignalingNaN$(OBJ) \ - s_extF80MToCommonNaN$(OBJ) \ - s_commonNaNToExtF80M$(OBJ) \ - s_propagateNaNExtF80M$(OBJ) \ - f128M_isSignalingNaN$(OBJ) \ - s_f128MToCommonNaN$(OBJ) \ - s_commonNaNToF128M$(OBJ) \ - s_propagateNaNF128M$(OBJ) \ - -OBJS_OTHERS = \ - s_roundToUI32$(OBJ) \ - s_roundMToUI64$(OBJ) \ - s_roundToI32$(OBJ) \ - s_roundMToI64$(OBJ) \ - s_normSubnormalF16Sig$(OBJ) \ - s_roundPackToF16$(OBJ) \ - s_normRoundPackToF16$(OBJ) \ - s_addMagsF16$(OBJ) \ - s_subMagsF16$(OBJ) \ - s_mulAddF16$(OBJ) \ - s_normSubnormalF32Sig$(OBJ) \ - s_roundPackToF32$(OBJ) \ - s_normRoundPackToF32$(OBJ) \ - s_addMagsF32$(OBJ) \ - s_subMagsF32$(OBJ) \ - s_mulAddF32$(OBJ) \ - s_normSubnormalF64Sig$(OBJ) \ - s_roundPackToF64$(OBJ) \ - s_normRoundPackToF64$(OBJ) \ - s_addMagsF64$(OBJ) \ - s_subMagsF64$(OBJ) \ - s_mulAddF64$(OBJ) \ - s_tryPropagateNaNExtF80M$(OBJ) \ - s_invalidExtF80M$(OBJ) \ - s_normExtF80SigM$(OBJ) \ - s_roundPackMToExtF80M$(OBJ) \ - s_normRoundPackMToExtF80M$(OBJ) \ - s_addExtF80M$(OBJ) \ - s_compareNonnormExtF80M$(OBJ) \ - s_isNaNF128M$(OBJ) \ - s_tryPropagateNaNF128M$(OBJ) \ - s_invalidF128M$(OBJ) \ - s_shiftNormSigF128M$(OBJ) \ - s_roundPackMToF128M$(OBJ) \ - s_normRoundPackMToF128M$(OBJ) \ - s_addF128M$(OBJ) \ - s_mulAddF128M$(OBJ) \ - softfloat_state$(OBJ) \ - ui32_to_f16$(OBJ) \ - ui32_to_f32$(OBJ) \ - ui32_to_f64$(OBJ) \ - ui32_to_extF80M$(OBJ) \ - ui32_to_f128M$(OBJ) \ - ui64_to_f16$(OBJ) \ - ui64_to_f32$(OBJ) \ - ui64_to_f64$(OBJ) \ - ui64_to_extF80M$(OBJ) \ - ui64_to_f128M$(OBJ) \ - i32_to_f16$(OBJ) \ - i32_to_f32$(OBJ) \ - i32_to_f64$(OBJ) \ - i32_to_extF80M$(OBJ) \ - i32_to_f128M$(OBJ) \ - i64_to_f16$(OBJ) \ - i64_to_f32$(OBJ) \ - i64_to_f64$(OBJ) \ - i64_to_extF80M$(OBJ) \ - i64_to_f128M$(OBJ) \ - f16_to_ui32$(OBJ) \ - f16_to_ui64$(OBJ) \ - f16_to_i32$(OBJ) \ - f16_to_i64$(OBJ) \ - f16_to_ui32_r_minMag$(OBJ) \ - f16_to_ui64_r_minMag$(OBJ) \ - f16_to_i32_r_minMag$(OBJ) \ - f16_to_i64_r_minMag$(OBJ) \ - f16_to_f32$(OBJ) \ - f16_to_f64$(OBJ) \ - f16_to_extF80M$(OBJ) \ - f16_to_f128M$(OBJ) \ - f16_roundToInt$(OBJ) \ - f16_add$(OBJ) \ - f16_sub$(OBJ) \ - f16_mul$(OBJ) \ - f16_mulAdd$(OBJ) \ - f16_div$(OBJ) \ - f16_rem$(OBJ) \ - f16_sqrt$(OBJ) \ - f16_eq$(OBJ) \ - f16_le$(OBJ) \ - f16_lt$(OBJ) \ - f16_eq_signaling$(OBJ) \ - f16_le_quiet$(OBJ) \ - f16_lt_quiet$(OBJ) \ - f16_isSignalingNaN$(OBJ) \ - f32_to_ui32$(OBJ) \ - f32_to_ui64$(OBJ) \ - f32_to_i32$(OBJ) \ - f32_to_i64$(OBJ) \ - f32_to_ui32_r_minMag$(OBJ) \ - f32_to_ui64_r_minMag$(OBJ) \ - f32_to_i32_r_minMag$(OBJ) \ - f32_to_i64_r_minMag$(OBJ) \ - f32_to_f16$(OBJ) \ - f32_to_f64$(OBJ) \ - f32_to_extF80M$(OBJ) \ - f32_to_f128M$(OBJ) \ - f32_roundToInt$(OBJ) \ - f32_add$(OBJ) \ - f32_sub$(OBJ) \ - f32_mul$(OBJ) \ - f32_mulAdd$(OBJ) \ - f32_div$(OBJ) \ - f32_rem$(OBJ) \ - f32_sqrt$(OBJ) \ - f32_eq$(OBJ) \ - f32_le$(OBJ) \ - f32_lt$(OBJ) \ - f32_eq_signaling$(OBJ) \ - f32_le_quiet$(OBJ) \ - f32_lt_quiet$(OBJ) \ - f32_isSignalingNaN$(OBJ) \ - f64_to_ui32$(OBJ) \ - f64_to_ui64$(OBJ) \ - f64_to_i32$(OBJ) \ - f64_to_i64$(OBJ) \ - f64_to_ui32_r_minMag$(OBJ) \ - f64_to_ui64_r_minMag$(OBJ) \ - f64_to_i32_r_minMag$(OBJ) \ - f64_to_i64_r_minMag$(OBJ) \ - f64_to_f16$(OBJ) \ - f64_to_f32$(OBJ) \ - f64_to_extF80M$(OBJ) \ - f64_to_f128M$(OBJ) \ - f64_roundToInt$(OBJ) \ - f64_add$(OBJ) \ - f64_sub$(OBJ) \ - f64_mul$(OBJ) \ - f64_mulAdd$(OBJ) \ - f64_div$(OBJ) \ - f64_rem$(OBJ) \ - f64_sqrt$(OBJ) \ - f64_eq$(OBJ) \ - f64_le$(OBJ) \ - f64_lt$(OBJ) \ - f64_eq_signaling$(OBJ) \ - f64_le_quiet$(OBJ) \ - f64_lt_quiet$(OBJ) \ - f64_isSignalingNaN$(OBJ) \ - extF80M_to_ui32$(OBJ) \ - extF80M_to_ui64$(OBJ) \ - extF80M_to_i32$(OBJ) \ - extF80M_to_i64$(OBJ) \ - extF80M_to_ui32_r_minMag$(OBJ) \ - extF80M_to_ui64_r_minMag$(OBJ) \ - extF80M_to_i32_r_minMag$(OBJ) \ - extF80M_to_i64_r_minMag$(OBJ) \ - extF80M_to_f16$(OBJ) \ - extF80M_to_f32$(OBJ) \ - extF80M_to_f64$(OBJ) \ - extF80M_to_f128M$(OBJ) \ - extF80M_roundToInt$(OBJ) \ - extF80M_add$(OBJ) \ - extF80M_sub$(OBJ) \ - extF80M_mul$(OBJ) \ - extF80M_div$(OBJ) \ - extF80M_rem$(OBJ) \ - extF80M_sqrt$(OBJ) \ - extF80M_eq$(OBJ) \ - extF80M_le$(OBJ) \ - extF80M_lt$(OBJ) \ - extF80M_eq_signaling$(OBJ) \ - extF80M_le_quiet$(OBJ) \ - extF80M_lt_quiet$(OBJ) \ - f128M_to_ui32$(OBJ) \ - f128M_to_ui64$(OBJ) \ - f128M_to_i32$(OBJ) \ - f128M_to_i64$(OBJ) \ - f128M_to_ui32_r_minMag$(OBJ) \ - f128M_to_ui64_r_minMag$(OBJ) \ - f128M_to_i32_r_minMag$(OBJ) \ - f128M_to_i64_r_minMag$(OBJ) \ - f128M_to_f16$(OBJ) \ - f128M_to_f32$(OBJ) \ - f128M_to_f64$(OBJ) \ - f128M_to_extF80M$(OBJ) \ - f128M_roundToInt$(OBJ) \ - f128M_add$(OBJ) \ - f128M_sub$(OBJ) \ - f128M_mul$(OBJ) \ - f128M_mulAdd$(OBJ) \ - f128M_div$(OBJ) \ - f128M_rem$(OBJ) \ - f128M_sqrt$(OBJ) \ - f128M_eq$(OBJ) \ - f128M_le$(OBJ) \ - f128M_lt$(OBJ) \ - f128M_eq_signaling$(OBJ) \ - f128M_le_quiet$(OBJ) \ - f128M_lt_quiet$(OBJ) \ - -OBJS_ALL = $(OBJS_PRIMITIVES) $(OBJS_SPECIALIZE) $(OBJS_OTHERS) - -$(OBJS_ALL): \ - platform.h $(SOURCE_DIR)/include/primitiveTypes.h \ - $(SOURCE_DIR)/include/primitives.h -$(OBJS_SPECIALIZE) $(OBJS_OTHERS): \ - $(SOURCE_DIR)/include/softfloat_types.h $(SOURCE_DIR)/include/internals.h \ - $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/specialize.h \ - $(SOURCE_DIR)/include/softfloat.h - -$(OBJS_PRIMITIVES) $(OBJS_OTHERS): %$(OBJ): $(SOURCE_DIR)/%.c - $(COMPILE_C) $(SOURCE_DIR)/$*.c - -$(OBJS_SPECIALIZE): %$(OBJ): $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/%.c - $(COMPILE_C) $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/$*.c - -softfloat$(LIB): $(OBJS_ALL) - $(DELETE) $@ - $(MAKELIB) $^ - -.PHONY: clean -clean: - $(DELETE) $(OBJS_ALL) softfloat$(LIB) - diff --git a/outside/softfloat-3/build/Win32-SSE2-MinGW/platform.h b/outside/softfloat-3/build/Win32-SSE2-MinGW/platform.h deleted file mode 100644 index 8af002ebe..000000000 --- a/outside/softfloat-3/build/Win32-SSE2-MinGW/platform.h +++ /dev/null @@ -1,48 +0,0 @@ - -/*============================================================================ - -This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -/*---------------------------------------------------------------------------- -*----------------------------------------------------------------------------*/ -#define LITTLEENDIAN 1 - -/*---------------------------------------------------------------------------- -*----------------------------------------------------------------------------*/ -#ifdef __GNUC_STDC_INLINE__ -#define INLINE inline -#else -#define INLINE extern inline -#endif - diff --git a/outside/softfloat-3/build/Win64-MinGW-w64/Makefile b/outside/softfloat-3/build/Win64-MinGW-w64/Makefile deleted file mode 100644 index bec40ad5e..000000000 --- a/outside/softfloat-3/build/Win64-MinGW-w64/Makefile +++ /dev/null @@ -1,388 +0,0 @@ - -#============================================================================= -# -# This Makefile is part of the SoftFloat IEEE Floating-Point Arithmetic -# Package, Release 3c, by John R. Hauser. -# -# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the -# University of California. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright notice, -# this list of conditions, and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions, and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. -# -#============================================================================= - -SOURCE_DIR ?= ../../source -SPECIALIZE_TYPE ?= 8086-SSE - -SOFTFLOAT_OPTS ?= \ - -DSOFTFLOAT_ROUND_ODD -DINLINE_LEVEL=5 -DSOFTFLOAT_FAST_DIV32TO16 \ - -DSOFTFLOAT_FAST_DIV64TO32 - -DELETE = rm -f -C_INCLUDES = -I. -I$(SOURCE_DIR)/$(SPECIALIZE_TYPE) -I$(SOURCE_DIR)/include -COMPILE_C = \ - x86_64-w64-mingw32-gcc -c -Werror-implicit-function-declaration \ - -DSOFTFLOAT_FAST_INT64 $(SOFTFLOAT_OPTS) $(C_INCLUDES) -O2 -o $@ -MAKELIB = x86_64-w64-mingw32-ar crs $@ - -OBJ = .o -LIB = .a - -.PHONY: all -all: softfloat$(LIB) - -OBJS_PRIMITIVES = \ - s_eq128$(OBJ) \ - s_le128$(OBJ) \ - s_lt128$(OBJ) \ - s_shortShiftLeft128$(OBJ) \ - s_shortShiftRight128$(OBJ) \ - s_shortShiftRightJam64$(OBJ) \ - s_shortShiftRightJam64Extra$(OBJ) \ - s_shortShiftRightJam128$(OBJ) \ - s_shortShiftRightJam128Extra$(OBJ) \ - s_shiftRightJam32$(OBJ) \ - s_shiftRightJam64$(OBJ) \ - s_shiftRightJam64Extra$(OBJ) \ - s_shiftRightJam128$(OBJ) \ - s_shiftRightJam128Extra$(OBJ) \ - s_shiftRightJam256M$(OBJ) \ - s_countLeadingZeros8$(OBJ) \ - s_countLeadingZeros16$(OBJ) \ - s_countLeadingZeros32$(OBJ) \ - s_countLeadingZeros64$(OBJ) \ - s_add128$(OBJ) \ - s_add256M$(OBJ) \ - s_sub128$(OBJ) \ - s_sub256M$(OBJ) \ - s_mul64ByShifted32To128$(OBJ) \ - s_mul64To128$(OBJ) \ - s_mul128By32$(OBJ) \ - s_mul128To256M$(OBJ) \ - s_approxRecip_1Ks$(OBJ) \ - s_approxRecip32_1$(OBJ) \ - s_approxRecipSqrt_1Ks$(OBJ) \ - s_approxRecipSqrt32_1$(OBJ) \ - -OBJS_SPECIALIZE = \ - softfloat_raiseFlags$(OBJ) \ - s_f16UIToCommonNaN$(OBJ) \ - s_commonNaNToF16UI$(OBJ) \ - s_propagateNaNF16UI$(OBJ) \ - s_f32UIToCommonNaN$(OBJ) \ - s_commonNaNToF32UI$(OBJ) \ - s_propagateNaNF32UI$(OBJ) \ - s_f64UIToCommonNaN$(OBJ) \ - s_commonNaNToF64UI$(OBJ) \ - s_propagateNaNF64UI$(OBJ) \ - extF80M_isSignalingNaN$(OBJ) \ - s_extF80UIToCommonNaN$(OBJ) \ - s_commonNaNToExtF80UI$(OBJ) \ - s_propagateNaNExtF80UI$(OBJ) \ - f128M_isSignalingNaN$(OBJ) \ - s_f128UIToCommonNaN$(OBJ) \ - s_commonNaNToF128UI$(OBJ) \ - s_propagateNaNF128UI$(OBJ) \ - -OBJS_OTHERS = \ - s_roundToUI32$(OBJ) \ - s_roundToUI64$(OBJ) \ - s_roundToI32$(OBJ) \ - s_roundToI64$(OBJ) \ - s_normSubnormalF16Sig$(OBJ) \ - s_roundPackToF16$(OBJ) \ - s_normRoundPackToF16$(OBJ) \ - s_addMagsF16$(OBJ) \ - s_subMagsF16$(OBJ) \ - s_mulAddF16$(OBJ) \ - s_normSubnormalF32Sig$(OBJ) \ - s_roundPackToF32$(OBJ) \ - s_normRoundPackToF32$(OBJ) \ - s_addMagsF32$(OBJ) \ - s_subMagsF32$(OBJ) \ - s_mulAddF32$(OBJ) \ - s_normSubnormalF64Sig$(OBJ) \ - s_roundPackToF64$(OBJ) \ - s_normRoundPackToF64$(OBJ) \ - s_addMagsF64$(OBJ) \ - s_subMagsF64$(OBJ) \ - s_mulAddF64$(OBJ) \ - s_normSubnormalExtF80Sig$(OBJ) \ - s_roundPackToExtF80$(OBJ) \ - s_normRoundPackToExtF80$(OBJ) \ - s_addMagsExtF80$(OBJ) \ - s_subMagsExtF80$(OBJ) \ - s_normSubnormalF128Sig$(OBJ) \ - s_roundPackToF128$(OBJ) \ - s_normRoundPackToF128$(OBJ) \ - s_addMagsF128$(OBJ) \ - s_subMagsF128$(OBJ) \ - s_mulAddF128$(OBJ) \ - softfloat_state$(OBJ) \ - ui32_to_f16$(OBJ) \ - ui32_to_f32$(OBJ) \ - ui32_to_f64$(OBJ) \ - ui32_to_extF80$(OBJ) \ - ui32_to_extF80M$(OBJ) \ - ui32_to_f128$(OBJ) \ - ui32_to_f128M$(OBJ) \ - ui64_to_f16$(OBJ) \ - ui64_to_f32$(OBJ) \ - ui64_to_f64$(OBJ) \ - ui64_to_extF80$(OBJ) \ - ui64_to_extF80M$(OBJ) \ - ui64_to_f128$(OBJ) \ - ui64_to_f128M$(OBJ) \ - i32_to_f16$(OBJ) \ - i32_to_f32$(OBJ) \ - i32_to_f64$(OBJ) \ - i32_to_extF80$(OBJ) \ - i32_to_extF80M$(OBJ) \ - i32_to_f128$(OBJ) \ - i32_to_f128M$(OBJ) \ - i64_to_f16$(OBJ) \ - i64_to_f32$(OBJ) \ - i64_to_f64$(OBJ) \ - i64_to_extF80$(OBJ) \ - i64_to_extF80M$(OBJ) \ - i64_to_f128$(OBJ) \ - i64_to_f128M$(OBJ) \ - f16_to_ui32$(OBJ) \ - f16_to_ui64$(OBJ) \ - f16_to_i32$(OBJ) \ - f16_to_i64$(OBJ) \ - f16_to_ui32_r_minMag$(OBJ) \ - f16_to_ui64_r_minMag$(OBJ) \ - f16_to_i32_r_minMag$(OBJ) \ - f16_to_i64_r_minMag$(OBJ) \ - f16_to_f32$(OBJ) \ - f16_to_f64$(OBJ) \ - f16_to_extF80$(OBJ) \ - f16_to_extF80M$(OBJ) \ - f16_to_f128$(OBJ) \ - f16_to_f128M$(OBJ) \ - f16_roundToInt$(OBJ) \ - f16_add$(OBJ) \ - f16_sub$(OBJ) \ - f16_mul$(OBJ) \ - f16_mulAdd$(OBJ) \ - f16_div$(OBJ) \ - f16_rem$(OBJ) \ - f16_sqrt$(OBJ) \ - f16_eq$(OBJ) \ - f16_le$(OBJ) \ - f16_lt$(OBJ) \ - f16_eq_signaling$(OBJ) \ - f16_le_quiet$(OBJ) \ - f16_lt_quiet$(OBJ) \ - f16_isSignalingNaN$(OBJ) \ - f32_to_ui32$(OBJ) \ - f32_to_ui64$(OBJ) \ - f32_to_i32$(OBJ) \ - f32_to_i64$(OBJ) \ - f32_to_ui32_r_minMag$(OBJ) \ - f32_to_ui64_r_minMag$(OBJ) \ - f32_to_i32_r_minMag$(OBJ) \ - f32_to_i64_r_minMag$(OBJ) \ - f32_to_f16$(OBJ) \ - f32_to_f64$(OBJ) \ - f32_to_extF80$(OBJ) \ - f32_to_extF80M$(OBJ) \ - f32_to_f128$(OBJ) \ - f32_to_f128M$(OBJ) \ - f32_roundToInt$(OBJ) \ - f32_add$(OBJ) \ - f32_sub$(OBJ) \ - f32_mul$(OBJ) \ - f32_mulAdd$(OBJ) \ - f32_div$(OBJ) \ - f32_rem$(OBJ) \ - f32_sqrt$(OBJ) \ - f32_eq$(OBJ) \ - f32_le$(OBJ) \ - f32_lt$(OBJ) \ - f32_eq_signaling$(OBJ) \ - f32_le_quiet$(OBJ) \ - f32_lt_quiet$(OBJ) \ - f32_isSignalingNaN$(OBJ) \ - f64_to_ui32$(OBJ) \ - f64_to_ui64$(OBJ) \ - f64_to_i32$(OBJ) \ - f64_to_i64$(OBJ) \ - f64_to_ui32_r_minMag$(OBJ) \ - f64_to_ui64_r_minMag$(OBJ) \ - f64_to_i32_r_minMag$(OBJ) \ - f64_to_i64_r_minMag$(OBJ) \ - f64_to_f16$(OBJ) \ - f64_to_f32$(OBJ) \ - f64_to_extF80$(OBJ) \ - f64_to_extF80M$(OBJ) \ - f64_to_f128$(OBJ) \ - f64_to_f128M$(OBJ) \ - f64_roundToInt$(OBJ) \ - f64_add$(OBJ) \ - f64_sub$(OBJ) \ - f64_mul$(OBJ) \ - f64_mulAdd$(OBJ) \ - f64_div$(OBJ) \ - f64_rem$(OBJ) \ - f64_sqrt$(OBJ) \ - f64_eq$(OBJ) \ - f64_le$(OBJ) \ - f64_lt$(OBJ) \ - f64_eq_signaling$(OBJ) \ - f64_le_quiet$(OBJ) \ - f64_lt_quiet$(OBJ) \ - f64_isSignalingNaN$(OBJ) \ - extF80_to_ui32$(OBJ) \ - extF80_to_ui64$(OBJ) \ - extF80_to_i32$(OBJ) \ - extF80_to_i64$(OBJ) \ - extF80_to_ui32_r_minMag$(OBJ) \ - extF80_to_ui64_r_minMag$(OBJ) \ - extF80_to_i32_r_minMag$(OBJ) \ - extF80_to_i64_r_minMag$(OBJ) \ - extF80_to_f16$(OBJ) \ - extF80_to_f32$(OBJ) \ - extF80_to_f64$(OBJ) \ - extF80_to_f128$(OBJ) \ - extF80_roundToInt$(OBJ) \ - extF80_add$(OBJ) \ - extF80_sub$(OBJ) \ - extF80_mul$(OBJ) \ - extF80_div$(OBJ) \ - extF80_rem$(OBJ) \ - extF80_sqrt$(OBJ) \ - extF80_eq$(OBJ) \ - extF80_le$(OBJ) \ - extF80_lt$(OBJ) \ - extF80_eq_signaling$(OBJ) \ - extF80_le_quiet$(OBJ) \ - extF80_lt_quiet$(OBJ) \ - extF80_isSignalingNaN$(OBJ) \ - extF80M_to_ui32$(OBJ) \ - extF80M_to_ui64$(OBJ) \ - extF80M_to_i32$(OBJ) \ - extF80M_to_i64$(OBJ) \ - extF80M_to_ui32_r_minMag$(OBJ) \ - extF80M_to_ui64_r_minMag$(OBJ) \ - extF80M_to_i32_r_minMag$(OBJ) \ - extF80M_to_i64_r_minMag$(OBJ) \ - extF80M_to_f16$(OBJ) \ - extF80M_to_f32$(OBJ) \ - extF80M_to_f64$(OBJ) \ - extF80M_to_f128M$(OBJ) \ - extF80M_roundToInt$(OBJ) \ - extF80M_add$(OBJ) \ - extF80M_sub$(OBJ) \ - extF80M_mul$(OBJ) \ - extF80M_div$(OBJ) \ - extF80M_rem$(OBJ) \ - extF80M_sqrt$(OBJ) \ - extF80M_eq$(OBJ) \ - extF80M_le$(OBJ) \ - extF80M_lt$(OBJ) \ - extF80M_eq_signaling$(OBJ) \ - extF80M_le_quiet$(OBJ) \ - extF80M_lt_quiet$(OBJ) \ - f128_to_ui32$(OBJ) \ - f128_to_ui64$(OBJ) \ - f128_to_i32$(OBJ) \ - f128_to_i64$(OBJ) \ - f128_to_ui32_r_minMag$(OBJ) \ - f128_to_ui64_r_minMag$(OBJ) \ - f128_to_i32_r_minMag$(OBJ) \ - f128_to_i64_r_minMag$(OBJ) \ - f128_to_f16$(OBJ) \ - f128_to_f32$(OBJ) \ - f128_to_extF80$(OBJ) \ - f128_to_f64$(OBJ) \ - f128_roundToInt$(OBJ) \ - f128_add$(OBJ) \ - f128_sub$(OBJ) \ - f128_mul$(OBJ) \ - f128_mulAdd$(OBJ) \ - f128_div$(OBJ) \ - f128_rem$(OBJ) \ - f128_sqrt$(OBJ) \ - f128_eq$(OBJ) \ - f128_le$(OBJ) \ - f128_lt$(OBJ) \ - f128_eq_signaling$(OBJ) \ - f128_le_quiet$(OBJ) \ - f128_lt_quiet$(OBJ) \ - f128_isSignalingNaN$(OBJ) \ - f128M_to_ui32$(OBJ) \ - f128M_to_ui64$(OBJ) \ - f128M_to_i32$(OBJ) \ - f128M_to_i64$(OBJ) \ - f128M_to_ui32_r_minMag$(OBJ) \ - f128M_to_ui64_r_minMag$(OBJ) \ - f128M_to_i32_r_minMag$(OBJ) \ - f128M_to_i64_r_minMag$(OBJ) \ - f128M_to_f16$(OBJ) \ - f128M_to_f32$(OBJ) \ - f128M_to_extF80M$(OBJ) \ - f128M_to_f64$(OBJ) \ - f128M_roundToInt$(OBJ) \ - f128M_add$(OBJ) \ - f128M_sub$(OBJ) \ - f128M_mul$(OBJ) \ - f128M_mulAdd$(OBJ) \ - f128M_div$(OBJ) \ - f128M_rem$(OBJ) \ - f128M_sqrt$(OBJ) \ - f128M_eq$(OBJ) \ - f128M_le$(OBJ) \ - f128M_lt$(OBJ) \ - f128M_eq_signaling$(OBJ) \ - f128M_le_quiet$(OBJ) \ - f128M_lt_quiet$(OBJ) \ - -OBJS_ALL = $(OBJS_PRIMITIVES) $(OBJS_SPECIALIZE) $(OBJS_OTHERS) - -$(OBJS_ALL): \ - platform.h $(SOURCE_DIR)/include/primitiveTypes.h \ - $(SOURCE_DIR)/include/primitives.h -$(OBJS_SPECIALIZE) $(OBJS_OTHERS): \ - $(SOURCE_DIR)/include/softfloat_types.h $(SOURCE_DIR)/include/internals.h \ - $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/specialize.h \ - $(SOURCE_DIR)/include/softfloat.h - -$(OBJS_PRIMITIVES) $(OBJS_OTHERS): %$(OBJ): $(SOURCE_DIR)/%.c - $(COMPILE_C) $(SOURCE_DIR)/$*.c - -$(OBJS_SPECIALIZE): %$(OBJ): $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/%.c - $(COMPILE_C) $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/$*.c - -softfloat$(LIB): $(OBJS_ALL) - $(DELETE) $@ - $(MAKELIB) $^ - -.PHONY: clean -clean: - $(DELETE) $(OBJS_ALL) softfloat$(LIB) - diff --git a/outside/softfloat-3/build/Win64-MinGW-w64/platform.h b/outside/softfloat-3/build/Win64-MinGW-w64/platform.h deleted file mode 100644 index 8af002ebe..000000000 --- a/outside/softfloat-3/build/Win64-MinGW-w64/platform.h +++ /dev/null @@ -1,48 +0,0 @@ - -/*============================================================================ - -This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -/*---------------------------------------------------------------------------- -*----------------------------------------------------------------------------*/ -#define LITTLEENDIAN 1 - -/*---------------------------------------------------------------------------- -*----------------------------------------------------------------------------*/ -#ifdef __GNUC_STDC_INLINE__ -#define INLINE inline -#else -#define INLINE extern inline -#endif - diff --git a/outside/softfloat-3/build/template-FAST_INT64/Makefile b/outside/softfloat-3/build/template-FAST_INT64/Makefile deleted file mode 100644 index 64fabe447..000000000 --- a/outside/softfloat-3/build/template-FAST_INT64/Makefile +++ /dev/null @@ -1,389 +0,0 @@ - -#============================================================================= -# -# This Makefile template is part of the SoftFloat IEEE Floating-Point -# Arithmetic Package, Release 3c, by John R. Hauser. -# -# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the -# University of California. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright notice, -# this list of conditions, and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions, and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. -# -#============================================================================= - -# Edit lines marked with `==>'. See "SoftFloat-source.html". - -==> SOURCE_DIR ?= ../../source -==> SPECIALIZE_TYPE ?= 8086 - -==> SOFTFLOAT_OPTS ?= \ -==> -DSOFTFLOAT_ROUND_ODD -DINLINE_LEVEL=5 -DSOFTFLOAT_FAST_DIV32TO16 \ -==> -DSOFTFLOAT_FAST_DIV64TO32 - -==> DELETE = rm -f -==> C_INCLUDES = -I. -I$(SOURCE_DIR)/$(SPECIALIZE_TYPE) -I$(SOURCE_DIR)/include -==> COMPILE_C = \ -==> cc -c -DSOFTFLOAT_FAST_INT64 $(SOFTFLOAT_OPTS) $(C_INCLUDES) -O2 -o $@ -==> MAKELIB = ar crs $@ - -==> OBJ = .o -==> LIB = .a - -.PHONY: all -all: softfloat$(LIB) - -OBJS_PRIMITIVES = \ - s_eq128$(OBJ) \ - s_le128$(OBJ) \ - s_lt128$(OBJ) \ - s_shortShiftLeft128$(OBJ) \ - s_shortShiftRight128$(OBJ) \ - s_shortShiftRightJam64$(OBJ) \ - s_shortShiftRightJam64Extra$(OBJ) \ - s_shortShiftRightJam128$(OBJ) \ - s_shortShiftRightJam128Extra$(OBJ) \ - s_shiftRightJam32$(OBJ) \ - s_shiftRightJam64$(OBJ) \ - s_shiftRightJam64Extra$(OBJ) \ - s_shiftRightJam128$(OBJ) \ - s_shiftRightJam128Extra$(OBJ) \ - s_shiftRightJam256M$(OBJ) \ - s_countLeadingZeros8$(OBJ) \ - s_countLeadingZeros16$(OBJ) \ - s_countLeadingZeros32$(OBJ) \ - s_countLeadingZeros64$(OBJ) \ - s_add128$(OBJ) \ - s_add256M$(OBJ) \ - s_sub128$(OBJ) \ - s_sub256M$(OBJ) \ - s_mul64ByShifted32To128$(OBJ) \ - s_mul64To128$(OBJ) \ - s_mul128By32$(OBJ) \ - s_mul128To256M$(OBJ) \ - s_approxRecip_1Ks$(OBJ) \ - s_approxRecip32_1$(OBJ) \ - s_approxRecipSqrt_1Ks$(OBJ) \ - s_approxRecipSqrt32_1$(OBJ) \ - -OBJS_SPECIALIZE = \ - softfloat_raiseFlags$(OBJ) \ - s_f16UIToCommonNaN$(OBJ) \ - s_commonNaNToF16UI$(OBJ) \ - s_propagateNaNF16UI$(OBJ) \ - s_f32UIToCommonNaN$(OBJ) \ - s_commonNaNToF32UI$(OBJ) \ - s_propagateNaNF32UI$(OBJ) \ - s_f64UIToCommonNaN$(OBJ) \ - s_commonNaNToF64UI$(OBJ) \ - s_propagateNaNF64UI$(OBJ) \ - extF80M_isSignalingNaN$(OBJ) \ - s_extF80UIToCommonNaN$(OBJ) \ - s_commonNaNToExtF80UI$(OBJ) \ - s_propagateNaNExtF80UI$(OBJ) \ - f128M_isSignalingNaN$(OBJ) \ - s_f128UIToCommonNaN$(OBJ) \ - s_commonNaNToF128UI$(OBJ) \ - s_propagateNaNF128UI$(OBJ) \ - -OBJS_OTHERS = \ - s_roundToUI32$(OBJ) \ - s_roundToUI64$(OBJ) \ - s_roundToI32$(OBJ) \ - s_roundToI64$(OBJ) \ - s_normSubnormalF16Sig$(OBJ) \ - s_roundPackToF16$(OBJ) \ - s_normRoundPackToF16$(OBJ) \ - s_addMagsF16$(OBJ) \ - s_subMagsF16$(OBJ) \ - s_mulAddF16$(OBJ) \ - s_normSubnormalF32Sig$(OBJ) \ - s_roundPackToF32$(OBJ) \ - s_normRoundPackToF32$(OBJ) \ - s_addMagsF32$(OBJ) \ - s_subMagsF32$(OBJ) \ - s_mulAddF32$(OBJ) \ - s_normSubnormalF64Sig$(OBJ) \ - s_roundPackToF64$(OBJ) \ - s_normRoundPackToF64$(OBJ) \ - s_addMagsF64$(OBJ) \ - s_subMagsF64$(OBJ) \ - s_mulAddF64$(OBJ) \ - s_normSubnormalExtF80Sig$(OBJ) \ - s_roundPackToExtF80$(OBJ) \ - s_normRoundPackToExtF80$(OBJ) \ - s_addMagsExtF80$(OBJ) \ - s_subMagsExtF80$(OBJ) \ - s_normSubnormalF128Sig$(OBJ) \ - s_roundPackToF128$(OBJ) \ - s_normRoundPackToF128$(OBJ) \ - s_addMagsF128$(OBJ) \ - s_subMagsF128$(OBJ) \ - s_mulAddF128$(OBJ) \ - softfloat_state$(OBJ) \ - ui32_to_f16$(OBJ) \ - ui32_to_f32$(OBJ) \ - ui32_to_f64$(OBJ) \ - ui32_to_extF80$(OBJ) \ - ui32_to_extF80M$(OBJ) \ - ui32_to_f128$(OBJ) \ - ui32_to_f128M$(OBJ) \ - ui64_to_f16$(OBJ) \ - ui64_to_f32$(OBJ) \ - ui64_to_f64$(OBJ) \ - ui64_to_extF80$(OBJ) \ - ui64_to_extF80M$(OBJ) \ - ui64_to_f128$(OBJ) \ - ui64_to_f128M$(OBJ) \ - i32_to_f16$(OBJ) \ - i32_to_f32$(OBJ) \ - i32_to_f64$(OBJ) \ - i32_to_extF80$(OBJ) \ - i32_to_extF80M$(OBJ) \ - i32_to_f128$(OBJ) \ - i32_to_f128M$(OBJ) \ - i64_to_f16$(OBJ) \ - i64_to_f32$(OBJ) \ - i64_to_f64$(OBJ) \ - i64_to_extF80$(OBJ) \ - i64_to_extF80M$(OBJ) \ - i64_to_f128$(OBJ) \ - i64_to_f128M$(OBJ) \ - f16_to_ui32$(OBJ) \ - f16_to_ui64$(OBJ) \ - f16_to_i32$(OBJ) \ - f16_to_i64$(OBJ) \ - f16_to_ui32_r_minMag$(OBJ) \ - f16_to_ui64_r_minMag$(OBJ) \ - f16_to_i32_r_minMag$(OBJ) \ - f16_to_i64_r_minMag$(OBJ) \ - f16_to_f32$(OBJ) \ - f16_to_f64$(OBJ) \ - f16_to_extF80$(OBJ) \ - f16_to_extF80M$(OBJ) \ - f16_to_f128$(OBJ) \ - f16_to_f128M$(OBJ) \ - f16_roundToInt$(OBJ) \ - f16_add$(OBJ) \ - f16_sub$(OBJ) \ - f16_mul$(OBJ) \ - f16_mulAdd$(OBJ) \ - f16_div$(OBJ) \ - f16_rem$(OBJ) \ - f16_sqrt$(OBJ) \ - f16_eq$(OBJ) \ - f16_le$(OBJ) \ - f16_lt$(OBJ) \ - f16_eq_signaling$(OBJ) \ - f16_le_quiet$(OBJ) \ - f16_lt_quiet$(OBJ) \ - f16_isSignalingNaN$(OBJ) \ - f32_to_ui32$(OBJ) \ - f32_to_ui64$(OBJ) \ - f32_to_i32$(OBJ) \ - f32_to_i64$(OBJ) \ - f32_to_ui32_r_minMag$(OBJ) \ - f32_to_ui64_r_minMag$(OBJ) \ - f32_to_i32_r_minMag$(OBJ) \ - f32_to_i64_r_minMag$(OBJ) \ - f32_to_f16$(OBJ) \ - f32_to_f64$(OBJ) \ - f32_to_extF80$(OBJ) \ - f32_to_extF80M$(OBJ) \ - f32_to_f128$(OBJ) \ - f32_to_f128M$(OBJ) \ - f32_roundToInt$(OBJ) \ - f32_add$(OBJ) \ - f32_sub$(OBJ) \ - f32_mul$(OBJ) \ - f32_mulAdd$(OBJ) \ - f32_div$(OBJ) \ - f32_rem$(OBJ) \ - f32_sqrt$(OBJ) \ - f32_eq$(OBJ) \ - f32_le$(OBJ) \ - f32_lt$(OBJ) \ - f32_eq_signaling$(OBJ) \ - f32_le_quiet$(OBJ) \ - f32_lt_quiet$(OBJ) \ - f32_isSignalingNaN$(OBJ) \ - f64_to_ui32$(OBJ) \ - f64_to_ui64$(OBJ) \ - f64_to_i32$(OBJ) \ - f64_to_i64$(OBJ) \ - f64_to_ui32_r_minMag$(OBJ) \ - f64_to_ui64_r_minMag$(OBJ) \ - f64_to_i32_r_minMag$(OBJ) \ - f64_to_i64_r_minMag$(OBJ) \ - f64_to_f16$(OBJ) \ - f64_to_f32$(OBJ) \ - f64_to_extF80$(OBJ) \ - f64_to_extF80M$(OBJ) \ - f64_to_f128$(OBJ) \ - f64_to_f128M$(OBJ) \ - f64_roundToInt$(OBJ) \ - f64_add$(OBJ) \ - f64_sub$(OBJ) \ - f64_mul$(OBJ) \ - f64_mulAdd$(OBJ) \ - f64_div$(OBJ) \ - f64_rem$(OBJ) \ - f64_sqrt$(OBJ) \ - f64_eq$(OBJ) \ - f64_le$(OBJ) \ - f64_lt$(OBJ) \ - f64_eq_signaling$(OBJ) \ - f64_le_quiet$(OBJ) \ - f64_lt_quiet$(OBJ) \ - f64_isSignalingNaN$(OBJ) \ - extF80_to_ui32$(OBJ) \ - extF80_to_ui64$(OBJ) \ - extF80_to_i32$(OBJ) \ - extF80_to_i64$(OBJ) \ - extF80_to_ui32_r_minMag$(OBJ) \ - extF80_to_ui64_r_minMag$(OBJ) \ - extF80_to_i32_r_minMag$(OBJ) \ - extF80_to_i64_r_minMag$(OBJ) \ - extF80_to_f16$(OBJ) \ - extF80_to_f32$(OBJ) \ - extF80_to_f64$(OBJ) \ - extF80_to_f128$(OBJ) \ - extF80_roundToInt$(OBJ) \ - extF80_add$(OBJ) \ - extF80_sub$(OBJ) \ - extF80_mul$(OBJ) \ - extF80_div$(OBJ) \ - extF80_rem$(OBJ) \ - extF80_sqrt$(OBJ) \ - extF80_eq$(OBJ) \ - extF80_le$(OBJ) \ - extF80_lt$(OBJ) \ - extF80_eq_signaling$(OBJ) \ - extF80_le_quiet$(OBJ) \ - extF80_lt_quiet$(OBJ) \ - extF80_isSignalingNaN$(OBJ) \ - extF80M_to_ui32$(OBJ) \ - extF80M_to_ui64$(OBJ) \ - extF80M_to_i32$(OBJ) \ - extF80M_to_i64$(OBJ) \ - extF80M_to_ui32_r_minMag$(OBJ) \ - extF80M_to_ui64_r_minMag$(OBJ) \ - extF80M_to_i32_r_minMag$(OBJ) \ - extF80M_to_i64_r_minMag$(OBJ) \ - extF80M_to_f16$(OBJ) \ - extF80M_to_f32$(OBJ) \ - extF80M_to_f64$(OBJ) \ - extF80M_to_f128M$(OBJ) \ - extF80M_roundToInt$(OBJ) \ - extF80M_add$(OBJ) \ - extF80M_sub$(OBJ) \ - extF80M_mul$(OBJ) \ - extF80M_div$(OBJ) \ - extF80M_rem$(OBJ) \ - extF80M_sqrt$(OBJ) \ - extF80M_eq$(OBJ) \ - extF80M_le$(OBJ) \ - extF80M_lt$(OBJ) \ - extF80M_eq_signaling$(OBJ) \ - extF80M_le_quiet$(OBJ) \ - extF80M_lt_quiet$(OBJ) \ - f128_to_ui32$(OBJ) \ - f128_to_ui64$(OBJ) \ - f128_to_i32$(OBJ) \ - f128_to_i64$(OBJ) \ - f128_to_ui32_r_minMag$(OBJ) \ - f128_to_ui64_r_minMag$(OBJ) \ - f128_to_i32_r_minMag$(OBJ) \ - f128_to_i64_r_minMag$(OBJ) \ - f128_to_f16$(OBJ) \ - f128_to_f32$(OBJ) \ - f128_to_extF80$(OBJ) \ - f128_to_f64$(OBJ) \ - f128_roundToInt$(OBJ) \ - f128_add$(OBJ) \ - f128_sub$(OBJ) \ - f128_mul$(OBJ) \ - f128_mulAdd$(OBJ) \ - f128_div$(OBJ) \ - f128_rem$(OBJ) \ - f128_sqrt$(OBJ) \ - f128_eq$(OBJ) \ - f128_le$(OBJ) \ - f128_lt$(OBJ) \ - f128_eq_signaling$(OBJ) \ - f128_le_quiet$(OBJ) \ - f128_lt_quiet$(OBJ) \ - f128_isSignalingNaN$(OBJ) \ - f128M_to_ui32$(OBJ) \ - f128M_to_ui64$(OBJ) \ - f128M_to_i32$(OBJ) \ - f128M_to_i64$(OBJ) \ - f128M_to_ui32_r_minMag$(OBJ) \ - f128M_to_ui64_r_minMag$(OBJ) \ - f128M_to_i32_r_minMag$(OBJ) \ - f128M_to_i64_r_minMag$(OBJ) \ - f128M_to_f16$(OBJ) \ - f128M_to_f32$(OBJ) \ - f128M_to_extF80M$(OBJ) \ - f128M_to_f64$(OBJ) \ - f128M_roundToInt$(OBJ) \ - f128M_add$(OBJ) \ - f128M_sub$(OBJ) \ - f128M_mul$(OBJ) \ - f128M_mulAdd$(OBJ) \ - f128M_div$(OBJ) \ - f128M_rem$(OBJ) \ - f128M_sqrt$(OBJ) \ - f128M_eq$(OBJ) \ - f128M_le$(OBJ) \ - f128M_lt$(OBJ) \ - f128M_eq_signaling$(OBJ) \ - f128M_le_quiet$(OBJ) \ - f128M_lt_quiet$(OBJ) \ - -OBJS_ALL = $(OBJS_PRIMITIVES) $(OBJS_SPECIALIZE) $(OBJS_OTHERS) - -$(OBJS_ALL): \ - platform.h $(SOURCE_DIR)/include/primitiveTypes.h \ - $(SOURCE_DIR)/include/primitives.h -$(OBJS_SPECIALIZE) $(OBJS_OTHERS): \ - $(SOURCE_DIR)/include/softfloat_types.h $(SOURCE_DIR)/include/internals.h \ - $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/specialize.h \ - $(SOURCE_DIR)/include/softfloat.h - -$(OBJS_PRIMITIVES) $(OBJS_OTHERS): %$(OBJ): $(SOURCE_DIR)/%.c - $(COMPILE_C) $(SOURCE_DIR)/$*.c - -$(OBJS_SPECIALIZE): %$(OBJ): $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/%.c - $(COMPILE_C) $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/$*.c - -softfloat$(LIB): $(OBJS_ALL) - $(DELETE) $@ - $(MAKELIB) $^ - -.PHONY: clean -clean: - $(DELETE) $(OBJS_ALL) softfloat$(LIB) - diff --git a/outside/softfloat-3/build/template-FAST_INT64/platform.h b/outside/softfloat-3/build/template-FAST_INT64/platform.h deleted file mode 100644 index a8075e731..000000000 --- a/outside/softfloat-3/build/template-FAST_INT64/platform.h +++ /dev/null @@ -1,50 +0,0 @@ - -/*============================================================================ - -This C header template is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -// Edit lines marked with `==>'. See "SoftFloat-source.html". - -/*---------------------------------------------------------------------------- -*----------------------------------------------------------------------------*/ -==> #define LITTLEENDIAN 1 - -/*---------------------------------------------------------------------------- -*----------------------------------------------------------------------------*/ -==> #define INLINE inline - -/*---------------------------------------------------------------------------- -*----------------------------------------------------------------------------*/ -==> #define THREAD_LOCAL _Thread_local - diff --git a/outside/softfloat-3/build/template-not-FAST_INT64/Makefile b/outside/softfloat-3/build/template-not-FAST_INT64/Makefile deleted file mode 100644 index 33d765932..000000000 --- a/outside/softfloat-3/build/template-not-FAST_INT64/Makefile +++ /dev/null @@ -1,323 +0,0 @@ - -#============================================================================= -# -# This Makefile template is part of the SoftFloat IEEE Floating-Point -# Arithmetic Package, Release 3c, by John R. Hauser. -# -# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the -# University of California. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright notice, -# this list of conditions, and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions, and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. -# -#============================================================================= - -# Edit lines marked with `==>'. See "SoftFloat-source.html". - -==> SOURCE_DIR ?= ../../source -==> SPECIALIZE_TYPE ?= 8086 - -==> SOFTFLOAT_OPTS ?= \ -==> -DSOFTFLOAT_ROUND_ODD -DINLINE_LEVEL=5 -DSOFTFLOAT_FAST_DIV32TO16 \ -==> -DSOFTFLOAT_FAST_DIV64TO32 - -==> DELETE = rm -f -==> C_INCLUDES = -I. -I$(SOURCE_DIR)/$(SPECIALIZE_TYPE) -I$(SOURCE_DIR)/include -==> COMPILE_C = cc -c $(SOFTFLOAT_OPTS) $(C_INCLUDES) -O2 -o $@ -==> MAKELIB = ar crs $@ - -==> OBJ = .o -==> LIB = .a - -.PHONY: all -all: softfloat$(LIB) - -OBJS_PRIMITIVES = \ - s_compare96M$(OBJ) \ - s_compare128M$(OBJ) \ - s_shortShiftLeft64To96M$(OBJ) \ - s_shortShiftLeftM$(OBJ) \ - s_shiftLeftM$(OBJ) \ - s_shortShiftRightM$(OBJ) \ - s_shortShiftRightJam64$(OBJ) \ - s_shortShiftRightJamM$(OBJ) \ - s_shiftRightJam32$(OBJ) \ - s_shiftRightJam64$(OBJ) \ - s_shiftRightJamM$(OBJ) \ - s_shiftRightM$(OBJ) \ - s_countLeadingZeros8$(OBJ) \ - s_countLeadingZeros16$(OBJ) \ - s_countLeadingZeros32$(OBJ) \ - s_countLeadingZeros64$(OBJ) \ - s_addM$(OBJ) \ - s_addCarryM$(OBJ) \ - s_addComplCarryM$(OBJ) \ - s_negXM$(OBJ) \ - s_sub1XM$(OBJ) \ - s_subM$(OBJ) \ - s_mul64To128M$(OBJ) \ - s_mul128MTo256M$(OBJ) \ - s_approxRecip_1Ks$(OBJ) \ - s_approxRecip32_1$(OBJ) \ - s_approxRecipSqrt_1Ks$(OBJ) \ - s_approxRecipSqrt32_1$(OBJ) \ - s_remStepMBy32$(OBJ) \ - -OBJS_SPECIALIZE = \ - softfloat_raiseFlags$(OBJ) \ - s_f16UIToCommonNaN$(OBJ) \ - s_commonNaNToF16UI$(OBJ) \ - s_propagateNaNF16UI$(OBJ) \ - s_f32UIToCommonNaN$(OBJ) \ - s_commonNaNToF32UI$(OBJ) \ - s_propagateNaNF32UI$(OBJ) \ - s_f64UIToCommonNaN$(OBJ) \ - s_commonNaNToF64UI$(OBJ) \ - s_propagateNaNF64UI$(OBJ) \ - extF80M_isSignalingNaN$(OBJ) \ - s_extF80MToCommonNaN$(OBJ) \ - s_commonNaNToExtF80M$(OBJ) \ - s_propagateNaNExtF80M$(OBJ) \ - f128M_isSignalingNaN$(OBJ) \ - s_f128MToCommonNaN$(OBJ) \ - s_commonNaNToF128M$(OBJ) \ - s_propagateNaNF128M$(OBJ) \ - -OBJS_OTHERS = \ - s_roundToUI32$(OBJ) \ - s_roundMToUI64$(OBJ) \ - s_roundToI32$(OBJ) \ - s_roundMToI64$(OBJ) \ - s_normSubnormalF16Sig$(OBJ) \ - s_roundPackToF16$(OBJ) \ - s_normRoundPackToF16$(OBJ) \ - s_addMagsF16$(OBJ) \ - s_subMagsF16$(OBJ) \ - s_mulAddF16$(OBJ) \ - s_normSubnormalF32Sig$(OBJ) \ - s_roundPackToF32$(OBJ) \ - s_normRoundPackToF32$(OBJ) \ - s_addMagsF32$(OBJ) \ - s_subMagsF32$(OBJ) \ - s_mulAddF32$(OBJ) \ - s_normSubnormalF64Sig$(OBJ) \ - s_roundPackToF64$(OBJ) \ - s_normRoundPackToF64$(OBJ) \ - s_addMagsF64$(OBJ) \ - s_subMagsF64$(OBJ) \ - s_mulAddF64$(OBJ) \ - s_tryPropagateNaNExtF80M$(OBJ) \ - s_invalidExtF80M$(OBJ) \ - s_normExtF80SigM$(OBJ) \ - s_roundPackMToExtF80M$(OBJ) \ - s_normRoundPackMToExtF80M$(OBJ) \ - s_addExtF80M$(OBJ) \ - s_compareNonnormExtF80M$(OBJ) \ - s_isNaNF128M$(OBJ) \ - s_tryPropagateNaNF128M$(OBJ) \ - s_invalidF128M$(OBJ) \ - s_shiftNormSigF128M$(OBJ) \ - s_roundPackMToF128M$(OBJ) \ - s_normRoundPackMToF128M$(OBJ) \ - s_addF128M$(OBJ) \ - s_mulAddF128M$(OBJ) \ - softfloat_state$(OBJ) \ - ui32_to_f16$(OBJ) \ - ui32_to_f32$(OBJ) \ - ui32_to_f64$(OBJ) \ - ui32_to_extF80M$(OBJ) \ - ui32_to_f128M$(OBJ) \ - ui64_to_f16$(OBJ) \ - ui64_to_f32$(OBJ) \ - ui64_to_f64$(OBJ) \ - ui64_to_extF80M$(OBJ) \ - ui64_to_f128M$(OBJ) \ - i32_to_f16$(OBJ) \ - i32_to_f32$(OBJ) \ - i32_to_f64$(OBJ) \ - i32_to_extF80M$(OBJ) \ - i32_to_f128M$(OBJ) \ - i64_to_f16$(OBJ) \ - i64_to_f32$(OBJ) \ - i64_to_f64$(OBJ) \ - i64_to_extF80M$(OBJ) \ - i64_to_f128M$(OBJ) \ - f16_to_ui32$(OBJ) \ - f16_to_ui64$(OBJ) \ - f16_to_i32$(OBJ) \ - f16_to_i64$(OBJ) \ - f16_to_ui32_r_minMag$(OBJ) \ - f16_to_ui64_r_minMag$(OBJ) \ - f16_to_i32_r_minMag$(OBJ) \ - f16_to_i64_r_minMag$(OBJ) \ - f16_to_f32$(OBJ) \ - f16_to_f64$(OBJ) \ - f16_to_extF80M$(OBJ) \ - f16_to_f128M$(OBJ) \ - f16_roundToInt$(OBJ) \ - f16_add$(OBJ) \ - f16_sub$(OBJ) \ - f16_mul$(OBJ) \ - f16_mulAdd$(OBJ) \ - f16_div$(OBJ) \ - f16_rem$(OBJ) \ - f16_sqrt$(OBJ) \ - f16_eq$(OBJ) \ - f16_le$(OBJ) \ - f16_lt$(OBJ) \ - f16_eq_signaling$(OBJ) \ - f16_le_quiet$(OBJ) \ - f16_lt_quiet$(OBJ) \ - f16_isSignalingNaN$(OBJ) \ - f32_to_ui32$(OBJ) \ - f32_to_ui64$(OBJ) \ - f32_to_i32$(OBJ) \ - f32_to_i64$(OBJ) \ - f32_to_ui32_r_minMag$(OBJ) \ - f32_to_ui64_r_minMag$(OBJ) \ - f32_to_i32_r_minMag$(OBJ) \ - f32_to_i64_r_minMag$(OBJ) \ - f32_to_f16$(OBJ) \ - f32_to_f64$(OBJ) \ - f32_to_extF80M$(OBJ) \ - f32_to_f128M$(OBJ) \ - f32_roundToInt$(OBJ) \ - f32_add$(OBJ) \ - f32_sub$(OBJ) \ - f32_mul$(OBJ) \ - f32_mulAdd$(OBJ) \ - f32_div$(OBJ) \ - f32_rem$(OBJ) \ - f32_sqrt$(OBJ) \ - f32_eq$(OBJ) \ - f32_le$(OBJ) \ - f32_lt$(OBJ) \ - f32_eq_signaling$(OBJ) \ - f32_le_quiet$(OBJ) \ - f32_lt_quiet$(OBJ) \ - f32_isSignalingNaN$(OBJ) \ - f64_to_ui32$(OBJ) \ - f64_to_ui64$(OBJ) \ - f64_to_i32$(OBJ) \ - f64_to_i64$(OBJ) \ - f64_to_ui32_r_minMag$(OBJ) \ - f64_to_ui64_r_minMag$(OBJ) \ - f64_to_i32_r_minMag$(OBJ) \ - f64_to_i64_r_minMag$(OBJ) \ - f64_to_f16$(OBJ) \ - f64_to_f32$(OBJ) \ - f64_to_extF80M$(OBJ) \ - f64_to_f128M$(OBJ) \ - f64_roundToInt$(OBJ) \ - f64_add$(OBJ) \ - f64_sub$(OBJ) \ - f64_mul$(OBJ) \ - f64_mulAdd$(OBJ) \ - f64_div$(OBJ) \ - f64_rem$(OBJ) \ - f64_sqrt$(OBJ) \ - f64_eq$(OBJ) \ - f64_le$(OBJ) \ - f64_lt$(OBJ) \ - f64_eq_signaling$(OBJ) \ - f64_le_quiet$(OBJ) \ - f64_lt_quiet$(OBJ) \ - f64_isSignalingNaN$(OBJ) \ - extF80M_to_ui32$(OBJ) \ - extF80M_to_ui64$(OBJ) \ - extF80M_to_i32$(OBJ) \ - extF80M_to_i64$(OBJ) \ - extF80M_to_ui32_r_minMag$(OBJ) \ - extF80M_to_ui64_r_minMag$(OBJ) \ - extF80M_to_i32_r_minMag$(OBJ) \ - extF80M_to_i64_r_minMag$(OBJ) \ - extF80M_to_f16$(OBJ) \ - extF80M_to_f32$(OBJ) \ - extF80M_to_f64$(OBJ) \ - extF80M_to_f128M$(OBJ) \ - extF80M_roundToInt$(OBJ) \ - extF80M_add$(OBJ) \ - extF80M_sub$(OBJ) \ - extF80M_mul$(OBJ) \ - extF80M_div$(OBJ) \ - extF80M_rem$(OBJ) \ - extF80M_sqrt$(OBJ) \ - extF80M_eq$(OBJ) \ - extF80M_le$(OBJ) \ - extF80M_lt$(OBJ) \ - extF80M_eq_signaling$(OBJ) \ - extF80M_le_quiet$(OBJ) \ - extF80M_lt_quiet$(OBJ) \ - f128M_to_ui32$(OBJ) \ - f128M_to_ui64$(OBJ) \ - f128M_to_i32$(OBJ) \ - f128M_to_i64$(OBJ) \ - f128M_to_ui32_r_minMag$(OBJ) \ - f128M_to_ui64_r_minMag$(OBJ) \ - f128M_to_i32_r_minMag$(OBJ) \ - f128M_to_i64_r_minMag$(OBJ) \ - f128M_to_f16$(OBJ) \ - f128M_to_f32$(OBJ) \ - f128M_to_f64$(OBJ) \ - f128M_to_extF80M$(OBJ) \ - f128M_roundToInt$(OBJ) \ - f128M_add$(OBJ) \ - f128M_sub$(OBJ) \ - f128M_mul$(OBJ) \ - f128M_mulAdd$(OBJ) \ - f128M_div$(OBJ) \ - f128M_rem$(OBJ) \ - f128M_sqrt$(OBJ) \ - f128M_eq$(OBJ) \ - f128M_le$(OBJ) \ - f128M_lt$(OBJ) \ - f128M_eq_signaling$(OBJ) \ - f128M_le_quiet$(OBJ) \ - f128M_lt_quiet$(OBJ) \ - -OBJS_ALL = $(OBJS_PRIMITIVES) $(OBJS_SPECIALIZE) $(OBJS_OTHERS) - -$(OBJS_ALL): \ - platform.h $(SOURCE_DIR)/include/primitiveTypes.h \ - $(SOURCE_DIR)/include/primitives.h -$(OBJS_SPECIALIZE) $(OBJS_OTHERS): \ - $(SOURCE_DIR)/include/softfloat_types.h $(SOURCE_DIR)/include/internals.h \ - $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/specialize.h \ - $(SOURCE_DIR)/include/softfloat.h - -$(OBJS_PRIMITIVES) $(OBJS_OTHERS): %$(OBJ): $(SOURCE_DIR)/%.c - $(COMPILE_C) $(SOURCE_DIR)/$*.c - -$(OBJS_SPECIALIZE): %$(OBJ): $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/%.c - $(COMPILE_C) $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/$*.c - -softfloat$(LIB): $(OBJS_ALL) - $(DELETE) $@ - $(MAKELIB) $^ - -.PHONY: clean -clean: - $(DELETE) $(OBJS_ALL) softfloat$(LIB) - diff --git a/outside/softfloat-3/build/template-not-FAST_INT64/platform.h b/outside/softfloat-3/build/template-not-FAST_INT64/platform.h deleted file mode 100644 index a8075e731..000000000 --- a/outside/softfloat-3/build/template-not-FAST_INT64/platform.h +++ /dev/null @@ -1,50 +0,0 @@ - -/*============================================================================ - -This C header template is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -// Edit lines marked with `==>'. See "SoftFloat-source.html". - -/*---------------------------------------------------------------------------- -*----------------------------------------------------------------------------*/ -==> #define LITTLEENDIAN 1 - -/*---------------------------------------------------------------------------- -*----------------------------------------------------------------------------*/ -==> #define INLINE inline - -/*---------------------------------------------------------------------------- -*----------------------------------------------------------------------------*/ -==> #define THREAD_LOCAL _Thread_local - diff --git a/outside/softfloat-3/doc/SoftFloat-history.html b/outside/softfloat-3/doc/SoftFloat-history.html deleted file mode 100644 index eaee1377c..000000000 --- a/outside/softfloat-3/doc/SoftFloat-history.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - -Berkeley SoftFloat History - - - - -

    History of Berkeley SoftFloat, to Release 3c

    - -

    -John R. Hauser
    -2017 February 10
    -

    - - -

    Release 3c (2017 February)

    - -
      - -
    • -Added optional rounding mode odd (round to odd, also known as -jamming). - -
    • -Corrected the documentation concerning non-canonical representations in -80-bit double-extended-precision. - -
    - - -

    Release 3b (2016 July)

    - -
      - -
    • -Implemented the common 16-bit “half-precision” -floating-point format (float16_t). - -
    • -Made the integer values returned on invalid conversions to integer formats -be determined by the port-specific specialization instead of being the same for -all ports. - -
    • -Added preprocessor macro THREAD_LOCAL to allow the floating-point -state (modes and exception flags) to be made per-thread. - -
    • -Modified the provided Makefiles to allow some options to be overridden from the -make command. - -
    • -Made other minor improvements. - -
    - - -

    Release 3a (2015 October)

    - -
      - -
    • -Replaced the license text supplied by the University of California, Berkeley. - -
    - - -

    Release 3 (2015 February)

    - -
      - -
    • -Complete rewrite, funded by the University of California, Berkeley, and -consequently having a different use license than earlier releases. -Major changes included renaming most types and functions, upgrading some -algorithms, restructuring the source files, and making SoftFloat into a true -library. - -
    • -Added functions to convert between floating-point and unsigned integers, both -32-bit and 64-bit (uint32_t and -uint64_t). - -
    • -Added functions for fused multiply-add, for all supported floating-point -formats except 80-bit double-extended-precision. - -
    • -Added support for a fifth rounding mode, near_maxMag (round to -nearest, with ties to maximum magnitude, away from zero). - -
    • -Dropped the timesoftfloat program (now part of the Berkeley -TestFloat package). - -
    - - -

    Release 2c (2015 January)

    - -
      - -
    • -Fixed mistakes affecting some 64-bit processors. - -
    • -Further improved the documentation and the wording for the legal restrictions -on using SoftFloat releases through 2c (not applicable to -Release 3 or later). - -
    - - -

    Release 2b (2002 May)

    - -
      - -
    • -Made minor updates to the documentation, including improved wording for the -legal restrictions on using SoftFloat. - -
    - - -

    Release 2a (1998 December)

    - -
      - -
    • -Added functions to convert between 64-bit integers -(int64) and all supported floating-point formats. - -
    • -Fixed a bug in all 64-bit-version square root functions except -float32_sqrt that caused the result sometimes to be off by -1 unit in the last place (1 ulp) from what it should -be. -(Bug discovered by Paul Donahue.) - -
    • -Improved the Makefiles. -
    - - -

    Release 2 (1997 June)

    - -
      - -
    • -Created the 64-bit (bits64) version, adding the -floatx80 and float128 formats. - -
    • -Changed the source directory structure, splitting the sources into a -bits32 and a bits64 version. -Renamed environment.h to milieu.h to avoid confusion -with environment variables. - -
    • -Fixed a small error that caused float64_round_to_int often to -round the wrong way in nearest/even mode when the operand was between -220 and 221 and halfway between two integers. - -
    - - -

    Release 1a (1996 July)

    - -
      - -
    • -Corrected a mistake that caused borderline underflow cases not to raise the -underflow flag when they should have. -(Problem reported by Doug Priest.) - -
    • -Added the float_detect_tininess variable to control whether -tininess is detected before or after rounding. - -
    - - -

    Release 1 (1996 July)

    - -
      - -
    • -Original release, based on work done for the International Computer Science -Institute (ICSI) in Berkeley, California. - -
    - - - - diff --git a/outside/softfloat-3/doc/SoftFloat-source.html b/outside/softfloat-3/doc/SoftFloat-source.html deleted file mode 100644 index 3520c150d..000000000 --- a/outside/softfloat-3/doc/SoftFloat-source.html +++ /dev/null @@ -1,624 +0,0 @@ - - - - -Berkeley SoftFloat Source Documentation - - - - -

    Berkeley SoftFloat Release 3c: Source Documentation

    - -

    -John R. Hauser
    -2017 February 10
    -

    - - -

    Contents

    - -
    - --- - - - - - - - - - - - - - - - - - - - -
    1. Introduction
    2. Limitations
    3. Acknowledgments and License
    4. SoftFloat Package Directory Structure
    5. Issues for Porting SoftFloat to a New Target
    5.1. Standard Headers <stdbool.h> and - <stdint.h>
    5.2. Specializing Floating-Point Behavior
    5.3. Macros for Build Options
    5.4. Adapting a Template Target Directory
    5.5. Target-Specific Optimization of Primitive Functions
    6. Testing SoftFloat
    7. Providing SoftFloat as a Common Library for Applications
    8. Contact Information
    -
    - - -

    1. Introduction

    - -
    - -

    -The source code for SoftFloat is intended to be relatively machine-independent -and should be compilable with any ISO-Standard C compiler that also supports -64-bit integers. -SoftFloat has been successfully compiled with the GNU C Compiler -(gcc) for several platforms. -

    - -

    -Release 3 of SoftFloat was a complete rewrite relative to -Release 2 or earlier. -Changes to the interface of SoftFloat functions are documented in -SoftFloat.html. -The current version of SoftFloat is Release 3c. -

    - - -

    2. Limitations

    - -

    -SoftFloat assumes the computer has an addressable byte size of either 8 or -16 bits. -(Nearly all computers in use today have 8-bit bytes.) -

    - -

    -SoftFloat is written in C and is designed to work with other C code. -The C compiler used must conform at a minimum to the 1989 ANSI standard for the -C language (same as the 1990 ISO standard) and must in addition support basic -arithmetic on 64-bit integers. -Earlier releases of SoftFloat included implementations of 32-bit -single-precision and 64-bit double-precision floating-point that -did not require 64-bit integers, but this option is not supported -starting with Release 3. -Since 1999, ISO standards for C have mandated compiler support for -64-bit integers. -A compiler conforming to the 1999 C Standard or later is recommended but not -strictly required. -

    - -

    -C Standard header files <stdbool.h> and -<stdint.h> are required for defining standard Boolean and -integer types. -If these headers are not supplied with the C compiler, minimal substitutes must -be provided. -SoftFloat’s dependence on these headers is detailed later in -section 5.1, Standard Headers <stdbool.h> -and <stdint.h>. -

    - - -

    3. Acknowledgments and License

    - -

    -The SoftFloat package was written by me, John R. Hauser. -Release 3 of SoftFloat was a completely new implementation -supplanting earlier releases. -The project to create Release 3 (now through 3c) was -done in the employ of the University of California, Berkeley, within the -Department of Electrical Engineering and Computer Sciences, first for the -Parallel Computing Laboratory (Par Lab) and then for the ASPIRE Lab. -The work was officially overseen by Prof. Krste Asanovic, with funding provided -by these sources: -

    - ---- - - - - - - - - - -
    Par Lab: -Microsoft (Award #024263), Intel (Award #024894), and U.C. Discovery -(Award #DIG07-10227), with additional support from Par Lab affiliates Nokia, -NVIDIA, Oracle, and Samsung. -
    ASPIRE Lab: -DARPA PERFECT program (Award #HR0011-12-2-0016), with additional support from -ASPIRE industrial sponsor Intel and ASPIRE affiliates Google, Nokia, NVIDIA, -Oracle, and Samsung. -
    -
    -

    - -

    -The following applies to the whole of SoftFloat Release 3c as well -as to each source file individually. -

    - -

    -Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the -University of California. -All rights reserved. -

    - -

    -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: -

      - -
    1. -

      -Redistributions of source code must retain the above copyright notice, this -list of conditions, and the following disclaimer. -

      - -
    2. -

      -Redistributions in binary form must reproduce the above copyright notice, this -list of conditions, and the following disclaimer in the documentation and/or -other materials provided with the distribution. -

      - -
    3. -

      -Neither the name of the University 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 REGENTS 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 REGENTS 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. -

    - - -

    4. SoftFloat Package Directory Structure

    - -

    -Because SoftFloat is targeted to multiple platforms, its source code is -slightly scattered between target-specific and target-independent directories -and files. -The supplied directory structure is as follows: -

    -
    -doc
    -source
    -    include
    -    8086
    -    8086-SSE
    -build
    -    template-FAST_INT64
    -    template-not-FAST_INT64
    -    Linux-386-GCC
    -    Linux-386-SSE2-GCC
    -    Linux-x86_64-GCC
    -    Win32-MinGW
    -    Win32-SSE2-MinGW
    -    Win64-MinGW-w64
    -
    -
    -The majority of the SoftFloat sources are provided in the source -directory. -The include subdirectory of source contains several -header files (unsurprisingly), while the 8086 and -8086-SSE subdirectories contain source files that -specialize the floating-point behavior to match the Intel x86 line of -processors. -The files in directory 8086 give floating-point behavior -consistent solely with Intel’s older, 8087-derived floating-point, while -those in 8086-SSE update the behavior of the -non-extended formats (float16_t, float32_t, -float64_t, and float128_t) to mirror Intel’s -more recent Streaming SIMD Extensions (SSE) and other compatible extensions. -If other specializations are attempted, these would be expected to be other -subdirectories of source alongside 8086 and -8086-SSE. -Specialization is covered later, in section 5.2, Specializing -Floating-Point Behavior. -

    - -

    -The build directory is intended to contain a subdirectory for each -target platform for which a build of the SoftFloat library may be created. -For each build target, the target’s subdirectory is where all derived -object files and the completed SoftFloat library (typically -softfloat.a or libsoftfloat.a) are created. -The two template subdirectories are not actual build targets but -contain sample files for creating new target directories. -(The meaning of FAST_INT64 will be explained later.) -

    - -

    -Ignoring the template directories, the supplied target directories -are intended to follow a naming system of -<execution-environment>-<compiler>. -For the example targets, -<execution-environment> is -Linux-386, Linux-386-SSE2, -Linux-x86_64, Win32, -Win32-SSE2, or Win64, and -<compiler> is GCC, -MinGW, or MinGW-w64. -

    - -

    -As supplied, each target directory contains two files: -

    -
    -Makefile
    -platform.h
    -
    -
    -The provided Makefile is written for GNU make. -A build of SoftFloat for the specific target is begun by executing the -make command with the target directory as the current directory. -A completely different build tool can be used if an appropriate -Makefile equivalent is created. -

    - -

    -The platform.h header file exists to provide a location for -additional C declarations specific to the build target. -Every C source file of SoftFloat contains a #include for -platform.h. -In many cases, the contents of platform.h can be as simple as one -or two lines of code. -At the other extreme, to get maximal performance from SoftFloat, it may be -desirable to include in header platform.h (directly or via -#include) declarations for numerous target-specific optimizations. -Such possibilities are discussed in the next section, Issues for Porting -SoftFloat to a New Target. -If the target’s compiler or library has bugs or other shortcomings, -workarounds for these issues may also be possible with target-specific -declarations in platform.h, avoiding the need to modify the main -SoftFloat sources. -

    - - -

    5. Issues for Porting SoftFloat to a New Target

    - -

    5.1. Standard Headers <stdbool.h> and <stdint.h>

    - -

    -The SoftFloat sources make use of standard headers -<stdbool.h> and <stdint.h>, which have -been part of the ISO C Standard Library since 1999. -With any recent compiler, these standard headers are likely to be supported, -even if the compiler does not claim complete conformance to the latest ISO C -Standard. -For older or nonstandard compilers, substitutes for -<stdbool.h> and <stdint.h> may need to be -created. -SoftFloat depends on these names from <stdbool.h>: -

    -
    -bool
    -true
    -false
    -
    -
    -and on these names from <stdint.h>: -
    -
    -uint16_t
    -uint32_t
    -uint64_t
    -int32_t
    -int64_t
    -UINT64_C
    -INT64_C
    -uint_least8_t
    -uint_fast8_t
    -uint_fast16_t
    -uint_fast32_t
    -uint_fast64_t
    -int_fast8_t
    -int_fast16_t
    -int_fast32_t
    -int_fast64_t
    -
    -
    -

    - - -

    5.2. Specializing Floating-Point Behavior

    - -

    -The IEEE Floating-Point Standard allows for some flexibility in a conforming -implementation, particularly concerning NaNs. -The SoftFloat source directory is supplied with some -specialization subdirectories containing possible definitions for this -implementation-specific behavior. -For example, the 8086 and 8086-SSE -subdirectories have source files that specialize SoftFloat’s behavior to -match that of Intel’s x86 line of processors. -The files in a specialization subdirectory must determine: -

      -
    • -whether tininess for underflow is detected before or after rounding by default; -
    • -how signaling NaNs are distinguished from quiet NaNs; -
    • -what (if anything) special happens when exceptions are raised; -
    • -the default generated quiet NaNs; -
    • -how NaNs are propagated from function inputs to output; and -
    • -the integer results returned when conversions to integer type raise the -invalid exception. -
    -

    - -

    -As provided, the build process for a target expects to involve exactly -one specialization directory that defines all of these -implementation-specific details for the target. -A specialization directory such as 8086 is expected to contain a -header file called specialize.h, together with whatever other -source files are needed to complete the specialization. -

    - -

    -A new build target may use an existing specialization, such as the ones -provided by the 8086 and 8086-SSE -subdirectories. -If a build target needs a new specialization, different from any existing ones, -it is recommended that a new specialization subdirectory be created in the -source directory for this purpose. -The specialize.h header file from any of the provided -specialization subdirectories can be used as a model for what definitions are -needed. -

    - - -

    5.3. Macros for Build Options

    - -

    -The SoftFloat source files adapt the floating-point implementation according to -several C preprocessor macros: -

    -
    -
    LITTLEENDIAN -
    -Must be defined for little-endian machines; must not be defined for big-endian -machines. -
    INLINE -
    -Specifies the sequence of tokens used to indicate that a C function should be -inlined. -If macro INLINE_LEVEL is defined with a value of 1 or higher, this -macro must be defined; otherwise, this macro is ignored and need not be -defined. -For compilers that conform to the C Standard’s rules for inline -functions, this macro can be defined as the single keyword inline. -For other compilers that follow a convention pre-dating the standardization of -inline, this macro may need to be defined to extern -inline. -
    THREAD_LOCAL -
    -Can be defined to a sequence of tokens that, when appearing at the start of a -variable declaration, indicates to the C compiler that the variable is -per-thread, meaning that each execution thread gets its own separate -instance of the variable. -This macro is used in header softfloat.h in the declarations of -variables softfloat_roundingMode, -softfloat_detectTininess, extF80_roundingPrecision, -and softfloat_exceptionFlags. -If macro THREAD_LOCAL is left undefined, these variables will -default to being ordinary global variables. -Depending on the compiler, possible valid definitions of this macro include -_Thread_local and __thread. -
    -
    -
    SOFTFLOAT_ROUND_ODD -
    -Can be defined to enable support for optional rounding mode -softfloat_round_odd. -
    -
    -
    INLINE_LEVEL -
    -Can be defined to an integer to determine the degree of inlining requested of -the compiler. -Larger numbers request that more inlining be done. -If this macro is not defined or is defined to a value less than 1 -(zero or negative), no inlining is requested. -The maximum effective value is no higher than 5. -Defining this macro to a value greater than 5 is the same as defining it -to 5. -
    SOFTFLOAT_FAST_INT64 -
    -Can be defined to indicate that the build target’s implementation of -64-bit arithmetic is efficient. -For newer 64-bit processors, this macro should usually be defined. -For very small microprocessors whose buses and registers are 8-bit -or 16-bit in size, this macro should usually not be defined. -Whether this macro should be defined for a 32-bit processor may -depend on the target machine and the applications that will use SoftFloat. -
    SOFTFLOAT_FAST_DIV32TO16 -
    -Can be defined to indicate that the target’s division operator -in C (written as /) is reasonably efficient for -dividing a 32-bit unsigned integer by a 16-bit -unsigned integer. -Setting this macro may affect the performance of function f16_div. -
    SOFTFLOAT_FAST_DIV64TO32 -
    -Can be defined to indicate that the target’s division operator -in C (written as /) is reasonably efficient for -dividing a 64-bit unsigned integer by a 32-bit -unsigned integer. -Setting this macro may affect the performance of division, remainder, and -square root operations other than f16_div. -
    -
    -

    - -

    -Following the usual custom for C, for most of these macros (all -except INLINE, THREAD_LOCAL, and -INLINE_LEVEL), the content of any definition is irrelevant; -what matters is a macro’s effect on #ifdef directives. -

    - -

    -It is recommended that any definitions of macros LITTLEENDIAN, -INLINE, and THREAD_LOCAL be made in a build -target’s platform.h header file, because these macros are -expected to be determined inflexibly by the target machine and compiler. -The other five macros select options and control optimization, and thus might -be better located in the target’s Makefile (or its equivalent). -

    - - -

    5.4. Adapting a Template Target Directory

    - -

    -In the build directory, two template subdirectories -provide models for new target directories. -Two different templates exist because different functions are needed in the -SoftFloat library depending on whether macro SOFTFLOAT_FAST_INT64 -is defined. -If macro SOFTFLOAT_FAST_INT64 will be defined, -template-FAST_INT64 is the template to use; -otherwise, template-not-FAST_INT64 is the appropriate -template. -A new target directory can be created by copying the correct template directory -and editing the files inside. -To avoid confusion, it would be wise to refrain from editing the files within a -template directory directly. -

    - - -

    5.5. Target-Specific Optimization of Primitive Functions

    - -

    -Header file primitives.h (in directory -source/include) declares macros and functions for numerous -underlying arithmetic operations upon which many of SoftFloat’s -floating-point functions are ultimately built. -The SoftFloat sources include implementations of all of these functions/macros, -written as standard C code, so a complete and correct SoftFloat library can be -created using only the supplied code for all functions. -However, for many targets, SoftFloat’s performance can be improved by -substituting target-specific implementations of some of the functions/macros -declared in primitives.h. -

    - -

    -For example, primitives.h declares a function called -softfloat_countLeadingZeros32 that takes an unsigned -32-bit integer as an argument and returns the number of the -integer’s most-significant bits that are zeros. -While the SoftFloat sources include an implementation of this function written -in standard C, many processors can perform this same function -directly in only one or two machine instructions. -An alternative, target-specific implementation that maps to those instructions -is likely to be more efficient than the generic C code from the SoftFloat -package. -

    - -

    -A build target can replace the supplied version of any function or macro of -primitives.h by defining a macro with the same name in the -target’s platform.h header file. -For this purpose, it may be helpful for platform.h to -#include header file primitiveTypes.h, which defines -types used for arguments and results of functions declared in -primitives.h. -When a desired replacement implementation is a function, not a macro, it is -sufficient for platform.h to include the line -

    -
    -#define <function-name> <function-name>
    -
    -
    -where <function-name> is the name of the -function. -This technically defines <function-name> -as a macro, but one that resolves to the same name, which may then be a -function. -(A preprocessor that conforms to the C Standard must limit recursive macro -expansion from being applied more than once.) -

    - - -

    6. Testing SoftFloat

    - -

    -SoftFloat can be tested using the testsoftfloat program by the -same author. -This program is part of the Berkeley TestFloat package available at the Web -page -http://www.jhauser.us/arithmetic/TestFloat.html. -The TestFloat package also has a program called timesoftfloat that -measures the speed of SoftFloat’s floating-point functions. -

    - - -

    7. Providing SoftFloat as a Common Library for Applications

    - -

    -Header file softfloat.h defines the SoftFloat interface as seen by -clients. -If the SoftFloat library will be made a common library for programs on a -system, the supplied softfloat.h has a couple of deficiencies for -this purpose: -

      -
    • -As supplied, softfloat.h depends on another header, -softfloat_types.h, that is not intended for public use but which -must also be visible to the programmer’s compiler. -
    • -More troubling, at the time softfloat.h is included in a C source -file, macros SOFTFLOAT_FAST_INT64 and THREAD_LOCAL -must be defined, or not defined, consistent with how these macro were defined -when the SoftFloat library was built. -
    -In the situation that new programs may regularly #include header -file softfloat.h, it is recommended that a custom, self-contained -version of this header file be created that eliminates these issues. -

    - - -

    8. Contact Information

    - -

    -At the time of this writing, the most up-to-date information about SoftFloat -and the latest release can be found at the Web page -http://www.jhauser.us/arithmetic/SoftFloat.html. -

    - - - - diff --git a/outside/softfloat-3/doc/SoftFloat.html b/outside/softfloat-3/doc/SoftFloat.html deleted file mode 100644 index 7a638c06e..000000000 --- a/outside/softfloat-3/doc/SoftFloat.html +++ /dev/null @@ -1,1526 +0,0 @@ - - - - -Berkeley SoftFloat Library Interface - - - - -

    Berkeley SoftFloat Release 3c: Library Interface

    - -

    -John R. Hauser
    -2017 February 10
    -

    - - -

    Contents

    - -
    - --- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    1. Introduction
    2. Limitations
    3. Acknowledgments and License
    4. Types and Functions
    4.1. Boolean and Integer Types
    4.2. Floating-Point Types
    4.3. Supported Floating-Point Functions
    4.4. Non-canonical Representations in extFloat80_t
    4.5. Conventions for Passing Arguments and Results
    5. Reserved Names
    6. Mode Variables
    6.1. Rounding Mode
    6.2. Underflow Detection
    6.3. Rounding Precision for the 80-Bit Extended Format
    7. Exceptions and Exception Flags
    8. Function Details
    8.1. Conversions from Integer to Floating-Point
    8.2. Conversions from Floating-Point to Integer
    8.3. Conversions Among Floating-Point Types
    8.4. Basic Arithmetic Functions
    8.5. Fused Multiply-Add Functions
    8.6. Remainder Functions
    8.7. Round-to-Integer Functions
    8.8. Comparison Functions
    8.9. Signaling NaN Test Functions
    8.10. Raise-Exception Function
    9. Changes from SoftFloat Release 2
    9.1. Name Changes
    9.2. Changes to Function Arguments
    9.3. Added Capabilities
    9.4. Better Compatibility with the C Language
    9.5. New Organization as a Library
    9.6. Optimization Gains (and Losses)
    10. Future Directions
    11. Contact Information
    -
    - - -

    1. Introduction

    - -

    -Berkeley SoftFloat is a software implementation of binary floating-point that -conforms to the IEEE Standard for Floating-Point Arithmetic. -The current release supports five binary formats: 16-bit -half-precision, 32-bit single-precision, 64-bit -double-precision, 80-bit double-extended-precision, and -128-bit quadruple-precision. -The following functions are supported for each format: -

      -
    • -addition, subtraction, multiplication, division, and square root; -
    • -fused multiply-add as defined by the IEEE Standard, except for -80-bit double-extended-precision; -
    • -remainder as defined by the IEEE Standard; -
    • -round to integral value; -
    • -comparisons; -
    • -conversions to/from other supported formats; and -
    • -conversions to/from 32-bit and 64-bit integers, -signed and unsigned. -
    -All operations required by the original 1985 version of the IEEE Floating-Point -Standard are implemented, except for conversions to and from decimal. -

    - -

    -This document gives information about the types defined and the routines -implemented by SoftFloat. -It does not attempt to define or explain the IEEE Floating-Point Standard. -Information about the standard is available elsewhere. -

    - -

    -The current version of SoftFloat is Release 3c. -The only significant difference between this release and the previous -Release 3b is optional support for a rarely used rounding mode, -round to odd, also known as jamming. -

    - -

    -Release 3b differed from the earlier Release 3a -mainly in the addition of support for the 16-bit half-precision -format. -Depending on the specific port of SoftFloat, Release 3b may also -have changed the result obtained when conversion of a floating-point number to -an integer format overflows or is otherwise invalid. -For more about the evolution of SoftFloat releases, see -SoftFloat-history.html. -

    - -

    -The functional interface of SoftFloat Release 3 and later differs -in many details from that of earlier releases. -For specifics of these differences, see section 9 below, -Changes from SoftFloat Release 2. -

    - - -

    2. Limitations

    - -

    -SoftFloat assumes the computer has an addressable byte size of 8 or -16 bits. -(Nearly all computers in use today have 8-bit bytes.) -

    - -

    -SoftFloat is written in C and is designed to work with other C code. -The C compiler used must conform at a minimum to the 1989 ANSI standard for the -C language (same as the 1990 ISO standard) and must in addition support basic -arithmetic on 64-bit integers. -Earlier releases of SoftFloat included implementations of 32-bit -single-precision and 64-bit double-precision floating-point that -did not require 64-bit integers, but this option is not supported -starting with Release 3. -Since 1999, ISO standards for C have mandated compiler support for -64-bit integers. -A compiler conforming to the 1999 C Standard or later is recommended but not -strictly required. -

    - -

    -Most operations not required by the original 1985 version of the IEEE -Floating-Point Standard but added in the 2008 version are not yet supported in -SoftFloat Release 3c. -

    - - -

    3. Acknowledgments and License

    - -

    -The SoftFloat package was written by me, John R. Hauser. -Release 3 of SoftFloat was a completely new implementation -supplanting earlier releases. -The project to create Release 3 (now through 3c) was -done in the employ of the University of California, Berkeley, within the -Department of Electrical Engineering and Computer Sciences, first for the -Parallel Computing Laboratory (Par Lab) and then for the ASPIRE Lab. -The work was officially overseen by Prof. Krste Asanovic, with funding provided -by these sources: -

    - ---- - - - - - - - - - -
    Par Lab: -Microsoft (Award #024263), Intel (Award #024894), and U.C. Discovery -(Award #DIG07-10227), with additional support from Par Lab affiliates Nokia, -NVIDIA, Oracle, and Samsung. -
    ASPIRE Lab: -DARPA PERFECT program (Award #HR0011-12-2-0016), with additional support from -ASPIRE industrial sponsor Intel and ASPIRE affiliates Google, Nokia, NVIDIA, -Oracle, and Samsung. -
    -
    -

    - -

    -The following applies to the whole of SoftFloat Release 3c as well -as to each source file individually. -

    - -

    -Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the -University of California. -All rights reserved. -

    - -

    -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: -

      - -
    1. -

      -Redistributions of source code must retain the above copyright notice, this -list of conditions, and the following disclaimer. -

      - -
    2. -

      -Redistributions in binary form must reproduce the above copyright notice, this -list of conditions, and the following disclaimer in the documentation and/or -other materials provided with the distribution. -

      - -
    3. -

      -Neither the name of the University 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 REGENTS 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 REGENTS 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. -

    - - -

    4. Types and Functions

    - -

    -The types and functions of SoftFloat are declared in header file -softfloat.h. -

    - -

    4.1. Boolean and Integer Types

    - -

    -Header file softfloat.h depends on standard headers -<stdbool.h> and <stdint.h> to define type -bool and several integer types. -These standard headers have been part of the ISO C Standard Library since 1999. -With any recent compiler, they are likely to be supported, even if the compiler -does not claim complete conformance to the latest ISO C Standard. -For older or nonstandard compilers, a port of SoftFloat may have substitutes -for these headers. -Header softfloat.h depends only on the name bool from -<stdbool.h> and on these type names from -<stdint.h>: -

    -
    -uint16_t
    -uint32_t
    -uint64_t
    -int32_t
    -int64_t
    -uint_fast8_t
    -uint_fast32_t
    -uint_fast64_t
    -int_fast32_t
    -int_fast64_t
    -
    -
    -

    - - -

    4.2. Floating-Point Types

    - -

    -The softfloat.h header defines five floating-point types: -

    - - - - - - - - - - - - - - - - - - - - - -
    float16_t16-bit half-precision binary format
    float32_t32-bit single-precision binary format
    float64_t64-bit double-precision binary format
    extFloat80_t   80-bit double-extended-precision binary format (old Intel or -Motorola format)
    float128_t128-bit quadruple-precision binary format
    -
    -The non-extended types are each exactly the size specified: -16 bits for float16_t, 32 bits for -float32_t, 64 bits for float64_t, and -128 bits for float128_t. -Aside from these size requirements, the definitions of all these types may -differ for different ports of SoftFloat to specific systems. -A given port of SoftFloat may or may not define some of the floating-point -types as aliases for the C standard types float, -double, and long double. -

    - -

    -Header file softfloat.h also defines a structure, -struct extFloat80M, for the representation of -80-bit double-extended-precision floating-point values in memory. -This structure is the same size as type extFloat80_t and contains -at least these two fields (not necessarily in this order): -

    -
    -uint16_t signExp;
    -uint64_t signif;
    -
    -
    -Field signExp contains the sign and exponent of the floating-point -value, with the sign in the most significant bit (bit 15) and the -encoded exponent in the other 15 bits. -Field signif is the complete 64-bit significand of -the floating-point value. -(In the usual encoding for 80-bit extended floating-point, the -leading 1 bit of normalized numbers is not implicit but is stored -in the most significant bit of the significand.) -

    - -

    4.3. Supported Floating-Point Functions

    - -

    -SoftFloat implements these arithmetic operations for its floating-point types: -

      -
    • -conversions between any two floating-point formats; -
    • -for each floating-point format, conversions to and from signed and unsigned -32-bit and 64-bit integers; -
    • -for each format, the usual addition, subtraction, multiplication, division, and -square root operations; -
    • -for each format except extFloat80_t, the fused multiply-add -operation defined by the IEEE Standard; -
    • -for each format, the floating-point remainder operation defined by the IEEE -Standard; -
    • -for each format, a “round to integer” operation that rounds to the -nearest integer value in the same format; and -
    • -comparisons between two values in the same floating-point format. -
    -

    - -

    -The following operations required by the 2008 IEEE Floating-Point Standard are -not supported in SoftFloat Release 3c: -

      -
    • -nextUp, nextDown, minNum, maxNum, minNumMag, -maxNumMag, scaleB, and logB; -
    • -conversions between floating-point formats and decimal or hexadecimal character -sequences; -
    • -all “quiet-computation” operations (copy, negate, -abs, and copySign, which all involve only simple copying and/or -manipulation of the floating-point sign bit); and -
    • -all “non-computational” operations other than isSignaling -(which is supported). -
    -

    - -

    4.4. Non-canonical Representations in extFloat80_t

    - -

    -Because the 80-bit double-extended-precision format, -extFloat80_t, stores an explicit leading significand bit, many -finite floating-point numbers are encodable in this type in multiple equivalent -forms. -Of these multiple encodings, there is always a unique one with the least -encoded exponent value, and this encoding is considered the canonical -representation of the floating-point number. -Any other equivalent representations (having a higher encoded exponent value) -are non-canonical. -For a value in the subnormal range (including zero), the canonical -representation always has an encoded exponent of zero and a leading significand -bit of 0. -For finite values outside the subnormal range, the canonical representation -always has an encoded exponent that is nonzero and a leading significand bit -of 1. -

    - -

    -For an infinity or NaN, the leading significand bit is similarly expected to -be 1. -An infinity or NaN with a leading significand bit of 0 is again -considered non-canonical. -Hence, altogether, to be canonical, a value of type extFloat80_t -must have a leading significand bit of 1, unless the value is -subnormal or zero, in which case the leading significand bit and the encoded -exponent must both be zero. -

    - -

    -SoftFloat's functions are not guaranteed to operate as expected when inputs of -type extFloat80_t are non-canonical. -Assuming all of a function’s extFloat80_t inputs (if any) -are canonical, function outputs of type extFloat80_t will always -be canonical. -

    - -

    4.5. Conventions for Passing Arguments and Results

    - -

    -Values that are at most 64 bits in size (i.e., not the -80-bit or 128-bit floating-point formats) are in all -cases passed as function arguments by value. -Likewise, when an output of a function is no more than 64 bits, it -is always returned directly as the function result. -Thus, for example, the SoftFloat function for adding two 64-bit -floating-point values has this simple signature: -

    -float64_t f64_add( float64_t, float64_t ); -
    -

    - -

    -The story is more complex when function inputs and outputs are -80-bit and 128-bit floating-point. -For these types, SoftFloat always provides a function that passes these larger -values into or out of the function indirectly, via pointers. -For example, for adding two 128-bit floating-point values, -SoftFloat supplies this function: -

    -void f128M_add( const float128_t *, const float128_t *, float128_t * ); -
    -The first two arguments point to the values to be added, and the last argument -points to the location where the sum will be stored. -The M in the name f128M_add is mnemonic for the fact -that the 128-bit inputs and outputs are “in memory”, -pointed to by pointer arguments. -

    - -

    -All ports of SoftFloat implement these pass-by-pointer functions for -types extFloat80_t and float128_t. -At the same time, SoftFloat ports may also implement alternate versions of -these same functions that pass extFloat80_t and -float128_t by value, like the smaller formats. -Thus, besides the function with name f128M_add shown above, a -SoftFloat port may also supply an equivalent function with this signature: -

    -float128_t f128_add( float128_t, float128_t ); -
    -

    - -

    -As a general rule, on computers where the machine word size is -32 bits or smaller, only the pass-by-pointer versions of functions -(e.g., f128M_add) are provided for types extFloat80_t -and float128_t, because passing such large types directly can have -significant extra cost. -On computers where the word size is 64 bits or larger, both -function versions (f128M_add and f128_add) are -provided, because the cost of passing by value is then more reasonable. -Applications that must be portable accross both classes of computers must use -the pointer-based functions, as these are always implemented. -However, if it is known that SoftFloat includes the by-value functions for all -platforms of interest, programmers can use whichever version they prefer. -

    - - -

    5. Reserved Names

    - -

    -In addition to the variables and functions documented here, SoftFloat defines -some symbol names for its own private use. -These private names always begin with the prefix -‘softfloat_’. -When a program includes header softfloat.h or links with the -SoftFloat library, all names with prefix ‘softfloat_’ -are reserved for possible use by SoftFloat. -Applications that use SoftFloat should not define their own names with this -prefix, and should reference only such names as are documented. -

    - - -

    6. Mode Variables

    - -

    -The following global variables control rounding mode, underflow detection, and -the 80-bit extended format’s rounding precision: -

    -softfloat_roundingMode
    -softfloat_detectTininess
    -extF80_roundingPrecision -
    -These mode variables are covered in the next several subsections. -For some SoftFloat ports, these variables may be per-thread (declared -thread_local), meaning that different execution threads have their -own separate copies of the variables. -

    - -

    6.1. Rounding Mode

    - -

    -All five rounding modes defined by the 2008 IEEE Floating-Point Standard are -implemented for all operations that require rounding. -Some ports of SoftFloat may also implement the round-to-odd mode. -

    - -

    -The rounding mode is selected by the global variable -

    -uint_fast8_t softfloat_roundingMode; -
    -This variable may be set to one of the values -
    - - - - - - - - - - - - - - - - - - - - - - - - - -
    softfloat_round_near_evenround to nearest, with ties to even
    softfloat_round_near_maxMag  round to nearest, with ties to maximum magnitude (away from zero)
    softfloat_round_minMaground to minimum magnitude (toward zero)
    softfloat_round_minround to minimum (down)
    softfloat_round_maxround to maximum (up)
    softfloat_round_oddround to odd (jamming), if supported by the SoftFloat port
    -
    -Variable softfloat_roundingMode is initialized to -softfloat_round_near_even. -

    - -

    -If supported, mode softfloat_round_odd first rounds a -floating-point result to minimum magnitude, the same as -softfloat_round_minMag, and then, if the result is inexact, the -least-significant bit of the result is set to 1. -This rounding mode is also known as jamming. -As a special case, when softfloat_round_odd is the rounding mode -for a function that rounds to an integer value (either conversion to an integer -format or a ‘roundToInt’ function), rounding is the -same as softfloat_round_minMag, without any change to the -least-significant integer bit. -

    - -

    6.2. Underflow Detection

    - -

    -In the terminology of the IEEE Standard, SoftFloat can detect tininess for -underflow either before or after rounding. -The choice is made by the global variable -

    -uint_fast8_t softfloat_detectTininess; -
    -which can be set to either -
    -softfloat_tininess_beforeRounding
    -softfloat_tininess_afterRounding -
    -Detecting tininess after rounding is usually better because it results in fewer -spurious underflow signals. -The other option is provided for compatibility with some systems. -Like most systems (and as required by the newer 2008 IEEE Standard), SoftFloat -always detects loss of accuracy for underflow as an inexact result. -

    - -

    6.3. Rounding Precision for the 80-Bit Extended Format

    - -

    -For extFloat80_t only, the rounding precision of the basic -arithmetic operations is controlled by the global variable -

    -uint_fast8_t extF80_roundingPrecision; -
    -The operations affected are: -
    -extF80_add
    -extF80_sub
    -extF80_mul
    -extF80_div
    -extF80_sqrt -
    -When extF80_roundingPrecision is set to its default value of 80, -these operations are rounded to the full precision of the 80-bit -double-extended-precision format, like occurs for other formats. -Setting extF80_roundingPrecision to 32 or to 64 causes the -operations listed to be rounded to 32-bit precision (equivalent to -float32_t) or to 64-bit precision (equivalent to -float64_t), respectively. -When rounding to reduced precision, additional bits in the result significand -beyond the rounding point are set to zero. -The consequences of setting extF80_roundingPrecision to a value -other than 32, 64, or 80 is not specified. -Operations other than the ones listed above are not affected by -extF80_roundingPrecision. -

    - - -

    7. Exceptions and Exception Flags

    - -

    -All five exception flags required by the IEEE Floating-Point Standard are -implemented. -Each flag is stored as a separate bit in the global variable -

    -uint_fast8_t softfloat_exceptionFlags; -
    -The positions of the exception flag bits within this variable are determined by -the bit masks -
    -softfloat_flag_inexact
    -softfloat_flag_underflow
    -softfloat_flag_overflow
    -softfloat_flag_infinite
    -softfloat_flag_invalid -
    -Variable softfloat_exceptionFlags is initialized to all zeros, -meaning no exceptions. -

    - -

    -For some SoftFloat ports, softfloat_exceptionFlags may be -per-thread (declared thread_local), meaning that different -execution threads have their own separate instances of it. -

    - -

    -An individual exception flag can be cleared with the statement -

    -softfloat_exceptionFlags &= ~softfloat_flag_<exception>; -
    -where <exception> is the appropriate name. -To raise a floating-point exception, function softfloat_raiseFlags -should normally be used. -

    - -

    -When SoftFloat detects an exception other than inexact, it calls -softfloat_raiseFlags. -The default version of this function simply raises the corresponding exception -flags. -Particular ports of SoftFloat may support alternate behavior, such as exception -traps, by modifying the default softfloat_raiseFlags. -A program may also supply its own softfloat_raiseFlags function to -override the one from the SoftFloat library. -

    - -

    -Because inexact results occur frequently under most circumstances (and thus are -hardly exceptional), SoftFloat does not ordinarily call -softfloat_raiseFlags for inexact exceptions. -It does always raise the inexact exception flag as required. -

    - - -

    8. Function Details

    - -

    -In this section, <float> appears in function names as -a substitute for one of these abbreviations: -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    f16indicates float16_t, passed by value
    f32indicates float32_t, passed by value
    f64indicates float64_t, passed by value
    extF80M   indicates extFloat80_t, passed indirectly via pointers
    extF80indicates extFloat80_t, passed by value
    f128Mindicates float128_t, passed indirectly via pointers
    f128indicates float128_t, passed by value
    -
    -The circumstances under which values of floating-point types -extFloat80_t and float128_t may be passed either by -value or indirectly via pointers was discussed earlier in -section 4.5, Conventions for Passing Arguments and Results. -

    - -

    8.1. Conversions from Integer to Floating-Point

    - -

    -All conversions from a 32-bit or 64-bit integer, -signed or unsigned, to a floating-point format are supported. -Functions performing these conversions have these names: -

    -ui32_to_<float>
    -ui64_to_<float>
    -i32_to_<float>
    -i64_to_<float> -
    -Conversions from 32-bit integers to 64-bit -double-precision and larger formats are always exact, and likewise conversions -from 64-bit integers to 80-bit -double-extended-precision and 128-bit quadruple-precision are also -always exact. -

    - -

    -Each conversion function takes one input of the appropriate type and generates -one output. -The following illustrates the signatures of these functions in cases when the -floating-point result is passed either by value or via pointers: -

    -
    -float64_t i32_to_f64( int32_t a );
    -
    -
    -void i32_to_f128M( int32_t a, float128_t *destPtr );
    -
    -
    -

    - -

    8.2. Conversions from Floating-Point to Integer

    - -

    -Conversions from a floating-point format to a 32-bit or -64-bit integer, signed or unsigned, are supported with these -functions: -

    -<float>_to_ui32
    -<float>_to_ui64
    -<float>_to_i32
    -<float>_to_i64 -
    -The functions have signatures as follows, depending on whether the -floating-point input is passed by value or via pointers: -
    -
    -int_fast32_t f64_to_i32( float64_t a, uint_fast8_t roundingMode, bool exact );
    -
    -
    -int_fast32_t
    - f128M_to_i32( const float128_t *aPtr, uint_fast8_t roundingMode, bool exact );
    -
    -
    -

    - -

    -The roundingMode argument specifies the rounding mode for -the conversion. -The variable that usually indicates rounding mode, -softfloat_roundingMode, is ignored. -If roundingMode is softfloat_round_odd, -rounding is to minimum magnitude, the same as -softfloat_round_minMag, rather than to an odd integer. -

    - -

    -Argument exact determines whether the inexact -exception flag is raised if the conversion is not exact. -If exact is true, the inexact flag may -be raised; -otherwise, it will not be, even if the conversion is inexact. -

    - -

    -A conversion from floating-point to integer format raises the invalid -exception if the source value cannot be rounded to a representable integer of -the desired size (32 or 64 bits). -In such circumstances, the integer result returned is determined by the -particular port of SoftFloat, although typically this value will be either the -maximum or minimum value of the integer format. -The functions that convert to integer types never raise the floating-point -overflow exception. -

    - -

    -Because languages such as C require that conversions to integers -be rounded toward zero, the following functions are provided for improved speed -and convenience: -

    -<float>_to_ui32_r_minMag
    -<float>_to_ui64_r_minMag
    -<float>_to_i32_r_minMag
    -<float>_to_i64_r_minMag -
    -These functions round only toward zero (to minimum magnitude). -The signatures for these functions are the same as above without the redundant -roundingMode argument: -
    -
    -int_fast32_t f64_to_i32_r_minMag( float64_t a, bool exact );
    -
    -
    -int_fast32_t f128M_to_i32_r_minMag( const float128_t *aPtr, bool exact );
    -
    -
    -

    - -

    8.3. Conversions Among Floating-Point Types

    - -

    -Conversions between floating-point formats are done by functions with these -names: -

    -<float>_to_<float> -
    -All combinations of source and result type are supported where the source and -result are different formats. -There are four different styles of signature for these functions, depending on -whether the input and the output floating-point values are passed by value or -via pointers: -
    -
    -float32_t f64_to_f32( float64_t a );
    -
    -
    -float32_t f128M_to_f32( const float128_t *aPtr );
    -
    -
    -void f32_to_f128M( float32_t a, float128_t *destPtr );
    -
    -
    -void extF80M_to_f128M( const extFloat80_t *aPtr, float128_t *destPtr );
    -
    -
    -

    - -

    -Conversions from a smaller to a larger floating-point format are always exact -and so require no rounding. -

    - -

    8.4. Basic Arithmetic Functions

    - -

    -The following basic arithmetic functions are provided: -

    -<float>_add
    -<float>_sub
    -<float>_mul
    -<float>_div
    -<float>_sqrt -
    -Each floating-point operation takes two operands, except for sqrt -(square root) which takes only one. -The operands and result are all of the same floating-point format. -Signatures for these functions take the following forms: -
    -
    -float64_t f64_add( float64_t a, float64_t b );
    -
    -
    -void
    - f128M_add(
    -     const float128_t *aPtr, const float128_t *bPtr, float128_t *destPtr );
    -
    -
    -float64_t f64_sqrt( float64_t a );
    -
    -
    -void f128M_sqrt( const float128_t *aPtr, float128_t *destPtr );
    -
    -
    -When floating-point values are passed indirectly through pointers, arguments -aPtr and bPtr point to the input -operands, and the last argument, destPtr, points to the -location where the result is stored. -

    - -

    -Rounding of the 80-bit double-extended-precision -(extFloat80_t) functions is affected by variable -extF80_roundingPrecision, as explained earlier in -section 6.3, -Rounding Precision for the 80-Bit Extended Format. -

    - -

    8.5. Fused Multiply-Add Functions

    - -

    -The 2008 version of the IEEE Floating-Point Standard defines a fused -multiply-add operation that does a combined multiplication and addition -with only a single rounding. -SoftFloat implements fused multiply-add with functions -

    -<float>_mulAdd -
    -Unlike other operations, fused multiple-add is not supported for the -80-bit double-extended-precision format, -extFloat80_t. -

    - -

    -Depending on whether floating-point values are passed by value or via pointers, -the fused multiply-add functions have signatures of these forms: -

    -
    -float64_t f64_mulAdd( float64_t a, float64_t b, float64_t c );
    -
    -
    -void
    - f128M_mulAdd(
    -     const float128_t *aPtr,
    -     const float128_t *bPtr,
    -     const float128_t *cPtr,
    -     float128_t *destPtr
    - );
    -
    -
    -The functions compute -(a × b) - + c -with a single rounding. -When floating-point values are passed indirectly through pointers, arguments -aPtr, bPtr, and -cPtr point to operands a, -b, and c respectively, and -destPtr points to the location where the result is stored. -

    - -

    -If one of the multiplication operands a and -b is infinite and the other is zero, these functions raise -the invalid exception even if operand c is a quiet NaN. -

    - -

    8.6. Remainder Functions

    - -

    -For each format, SoftFloat implements the remainder operation defined by the -IEEE Floating-Point Standard. -The remainder functions have names -

    -<float>_rem -
    -Each remainder operation takes two floating-point operands of the same format -and returns a result in the same format. -Depending on whether floating-point values are passed by value or via pointers, -the remainder functions have signatures of these forms: -
    -
    -float64_t f64_rem( float64_t a, float64_t b );
    -
    -
    -void
    - f128M_rem(
    -     const float128_t *aPtr, const float128_t *bPtr, float128_t *destPtr );
    -
    -
    -When floating-point values are passed indirectly through pointers, arguments -aPtr and bPtr point to operands -a and b respectively, and -destPtr points to the location where the result is stored. -

    - -

    -The IEEE Standard remainder operation computes the value -a - − n × b, -where n is the integer closest to -a ÷ b. -If a ÷ b is exactly -halfway between two integers, n is the even integer closest to -a ÷ b. -The IEEE Standard’s remainder operation is always exact and so requires -no rounding. -

    - -

    -Depending on the relative magnitudes of the operands, the remainder -functions can take considerably longer to execute than the other SoftFloat -functions. -This is an inherent characteristic of the remainder operation itself and is not -a flaw in the SoftFloat implementation. -

    - -

    8.7. Round-to-Integer Functions

    - -

    -For each format, SoftFloat implements the round-to-integer operation specified -by the IEEE Floating-Point Standard. -These functions are named -

    -<float>_roundToInt -
    -Each round-to-integer operation takes a single floating-point operand. -This operand is rounded to an integer according to a specified rounding mode, -and the resulting integer value is returned in the same floating-point format. -(Note that the result is not an integer type.) -

    - -

    -The signatures of the round-to-integer functions are similar to those for -conversions to an integer type: -

    -
    -float64_t f64_roundToInt( float64_t a, uint_fast8_t roundingMode, bool exact );
    -
    -
    -void
    - f128M_roundToInt(
    -     const float128_t *aPtr,
    -     uint_fast8_t roundingMode,
    -     bool exact,
    -     float128_t *destPtr
    - );
    -
    -
    -When floating-point values are passed indirectly through pointers, -aPtr points to the input operand and -destPtr points to the location where the result is stored. -

    - -

    -The roundingMode argument specifies the rounding mode to -apply. -The variable that usually indicates rounding mode, -softfloat_roundingMode, is ignored. -If roundingMode is softfloat_round_odd, -rounding is to minimum magnitude, the same as -softfloat_round_minMag, rather than to an odd integer value. -

    - -

    -Argument exact determines whether the inexact -exception flag is raised if the conversion is not exact. -If exact is true, the inexact flag may -be raised; -otherwise, it will not be, even if the conversion is inexact. -

    - -

    8.8. Comparison Functions

    - -

    -For each format, the following floating-point comparison functions are -provided: -

    -<float>_eq
    -<float>_le
    -<float>_lt -
    -Each comparison takes two operands of the same type and returns a Boolean. -The abbreviation eq stands for “equal” (=); -le stands for “less than or equal” (≤); -and lt stands for “less than” (<). -Depending on whether the floating-point operands are passed by value or via -pointers, the comparison functions have signatures of these forms: -
    -
    -bool f64_eq( float64_t a, float64_t b );
    -
    -
    -bool f128M_eq( const float128_t *aPtr, const float128_t *bPtr );
    -
    -
    -

    - -

    -The usual greater-than (>), greater-than-or-equal (≥), and not-equal -(≠) comparisons are easily obtained from the functions provided. -The not-equal function is just the logical complement of the equal function. -The greater-than-or-equal function is identical to the less-than-or-equal -function with the arguments in reverse order, and likewise the greater-than -function is identical to the less-than function with the arguments reversed. -

    - -

    -The IEEE Floating-Point Standard specifies that the less-than-or-equal and -less-than comparisons by default raise the invalid exception if either -operand is any kind of NaN. -Equality comparisons, on the other hand, are defined by default to raise the -invalid exception only for signaling NaNs, not quiet NaNs. -For completeness, SoftFloat provides these complementary functions: -

    -<float>_eq_signaling
    -<float>_le_quiet
    -<float>_lt_quiet -
    -The signaling equality comparisons are identical to the default -equality comparisons except that the invalid exception is raised for any -NaN input, not just for signaling NaNs. -Similarly, the quiet comparison functions are identical to their -default counterparts except that the invalid exception is not raised for -quiet NaNs. -

    - -

    8.9. Signaling NaN Test Functions

    - -

    -Functions for testing whether a floating-point value is a signaling NaN are -provided with these names: -

    -<float>_isSignalingNaN -
    -The functions take one floating-point operand and return a Boolean indicating -whether the operand is a signaling NaN. -Accordingly, the functions have the forms -
    -
    -bool f64_isSignalingNaN( float64_t a );
    -
    -
    -bool f128M_isSignalingNaN( const float128_t *aPtr );
    -
    -
    -

    - -

    8.10. Raise-Exception Function

    - -

    -SoftFloat provides a single function for raising floating-point exceptions: -

    -
    -void softfloat_raiseFlags( uint_fast8_t exceptions );
    -
    -
    -The exceptions argument is a mask indicating the set of -exceptions to raise. -(See earlier section 7, Exceptions and Exception Flags.) -In addition to setting the specified exception flags in variable -softfloat_exceptionFlags, the softfloat_raiseFlags -function may cause a trap or abort appropriate for the current system. -

    - - -

    9. Changes from SoftFloat Release 2

    - -

    -Apart from a change in the legal use license, Release 3 of -SoftFloat introduced numerous technical differences compared to earlier -releases. -

    - -

    9.1. Name Changes

    - -

    -The most obvious and pervasive difference compared to Release 2 -is that the names of most functions and variables have changed, even when the -behavior has not. -First, the floating-point types, the mode variables, the exception flags -variable, the function to raise exceptions, and various associated constants -have been renamed as follows: -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    old name, Release 2:new name, Release 3:
    float32float32_t
    float64float64_t
    floatx80extFloat80_t
    float128float128_t
    float_rounding_modesoftfloat_roundingMode
    float_round_nearest_evensoftfloat_round_near_even
    float_round_to_zerosoftfloat_round_minMag
    float_round_downsoftfloat_round_min
    float_round_upsoftfloat_round_max
    float_detect_tininesssoftfloat_detectTininess
    float_tininess_before_rounding    softfloat_tininess_beforeRounding
    float_tininess_after_roundingsoftfloat_tininess_afterRounding
    floatx80_rounding_precisionextF80_roundingPrecision
    float_exception_flagssoftfloat_exceptionFlags
    float_flag_inexactsoftfloat_flag_inexact
    float_flag_underflowsoftfloat_flag_underflow
    float_flag_overflowsoftfloat_flag_overflow
    float_flag_divbyzerosoftfloat_flag_infinite
    float_flag_invalidsoftfloat_flag_invalid
    float_raisesoftfloat_raiseFlags
    -
    -

    - -

    -Furthermore, Release 3 adopted the following new abbreviations for -function names: -

    - - - - - - - - - - - -
    used in names in Release 2:    used in names in Release 3:
    int32 i32
    int64 i64
    float32 f32
    float64 f64
    floatx80 extF80
    float128 f128
    -
    -Thus, for example, the function to add two 32-bit floating-point -numbers, previously called float32_add in Release 2, -is now f32_add. -Lastly, there have been a few other changes to function names: -
    - - - - - - - - - - - - - - - - - - - - - -
    used in names in Release 2:   used in names in Release 3:   relevant functions:
    _round_to_zero_r_minMagconversions from floating-point to integer (section 8.2)
    round_to_introundToIntround-to-integer functions (section 8.7)
    is_signaling_nan    isSignalingNaNsignaling NaN test functions (section 8.9)
    -
    -

    - -

    9.2. Changes to Function Arguments

    - -

    -Besides simple name changes, some operations were given a different interface -in Release 3 than they had in Release 2: -

      - -
    • -

      -Since Release 3, integer arguments and results of functions have -standard types from header <stdint.h>, such as -uint32_t, whereas previously their types could be defined -differently for each port of SoftFloat, usually using traditional C types such -as unsigned int. -Likewise, functions in Release 3 and later pass Booleans as -standard type bool from <stdbool.h>, whereas -previously these were again passed as a port-specific type (usually -int). -

      - -
    • -

      -As explained earlier in section 4.5, Conventions for Passing -Arguments and Results, SoftFloat functions in Release 3 and -later may pass 80-bit and 128-bit floating-point -values through pointers, meaning that functions take pointer arguments and then -read or write floating-point values at the locations indicated by the pointers. -In Release 2, floating-point arguments and results were always -passed by value, regardless of their size. -

      - -
    • -

      -Functions that round to an integer have additional -roundingMode and exact arguments that -they did not have in Release 2. -Refer to sections 8.2 and 8.7 for descriptions of these functions -since Release 3. -For Release 2, the rounding mode, when needed, was taken from the -same global variable that affects the basic arithmetic operations (now called -softfloat_roundingMode but previously known as -float_rounding_mode). -Also, for Release 2, if the original floating-point input was not -an exact integer value, and if the invalid exception was not raised by -the function, the inexact exception was always raised. -Release 2 had no option to suppress raising inexact in this -case. -Applications using SoftFloat Release 3 or later can get the same -effect as Release 2 by passing variable -softfloat_roundingMode for argument -roundingMode and true for argument -exact. -

      - -
    -

    - -

    9.3. Added Capabilities

    - -

    -With Release 3, some new features have been added that were not -present in Release 2: -

      - -
    • -

      -A port of SoftFloat can now define any of the floating-point types -float32_t, float64_t, extFloat80_t, and -float128_t as aliases for C’s standard floating-point types -float, double, and long -double, using either #define or typedef. -This potential convenience was not supported under Release 2. -

      - -

      -(Note, however, that there may be a performance cost to defining -SoftFloat’s floating-point types this way, depending on the platform and -the applications using SoftFloat. -Ports of SoftFloat may choose to forgo the convenience in favor of better -speed.) -

      - -

      -

    • -As of Release 3b, 16-bit half-precision, -float16_t, is supported. -

      - -

      -

    • -Functions have been added for converting between the floating-point types and -unsigned integers. -Release 2 supported only signed integers, not unsigned. -

      - -

      -

    • -Fused multiply-add functions have been added for all floating-point formats -except 80-bit double-extended-precision, -extFloat80_t. -

      - -

      -

    • -New rounding modes are supported: -softfloat_round_near_maxMag (round to nearest, with ties to -maximum magnitude, away from zero), and, as of Release 3c, -optional softfloat_round_odd (round to odd, also known as -jamming). -

      - -
    -

    - -

    9.4. Better Compatibility with the C Language

    - -

    -Release 3 of SoftFloat was written to conform better to the ISO C -Standard’s rules for portability. -For example, older releases of SoftFloat employed type conversions in ways -that, while commonly practiced, are not fully defined by the C Standard. -Such problematic type conversions have generally been replaced by the use of -unions, the behavior around which is more strictly regulated these days. -

    - -

    9.5. New Organization as a Library

    - -

    -Starting with Release 3, SoftFloat now builds as a library. -Previously, SoftFloat compiled into a single, monolithic object file containing -all the SoftFloat functions, with the consequence that a program linking with -SoftFloat would get every SoftFloat function in its binary file even if only a -few functions were actually used. -With SoftFloat in the form of a library, a program that is linked by a standard -linker will include only those functions of SoftFloat that it needs and no -others. -

    - -

    9.6. Optimization Gains (and Losses)

    - -

    -Individual SoftFloat functions have been variously improved in -Release 3 compared to earlier releases. -In particular, better, faster algorithms have been deployed for the operations -of division, square root, and remainder. -For functions operating on the larger 80-bit and -128-bit formats, extFloat80_t and -float128_t, code size has also generally been reduced. -

    - -

    -However, because Release 2 compiled all of SoftFloat together as a -single object file, compilers could make optimizations across function calls -when one SoftFloat function calls another. -Now that the functions of SoftFloat are compiled separately and only afterward -linked together into a program, there is not usually the same opportunity to -optimize across function calls. -Some loss of speed has been observed due to this change. -

    - - -

    10. Future Directions

    - -

    -The following improvements are anticipated for future releases of SoftFloat: -

      -
    • -more functions from the 2008 version of the IEEE Floating-Point Standard; -
    • -consistent, defined behavior for non-canonical representations of extended -format extFloat80_t (discussed in section 4.4, -Non-canonical Representations in extFloat80_t). - -
    -

    - - -

    11. Contact Information

    - -

    -At the time of this writing, the most up-to-date information about SoftFloat -and the latest release can be found at the Web page -http://www.jhauser.us/arithmetic/SoftFloat.html. -

    - - - - diff --git a/outside/softfloat-3/source/8086-SSE/extF80M_isSignalingNaN.c b/outside/softfloat-3/source/8086-SSE/extF80M_isSignalingNaN.c deleted file mode 100644 index 986ab4f69..000000000 --- a/outside/softfloat-3/source/8086-SSE/extF80M_isSignalingNaN.c +++ /dev/null @@ -1,57 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "softfloat.h" - -/*---------------------------------------------------------------------------- -*----------------------------------------------------------------------------*/ -bool extF80M_isSignalingNaN( const extFloat80_t *aPtr ) -{ - const struct extFloat80M *aSPtr; - uint64_t uiA0; - - aSPtr = (const struct extFloat80M *) aPtr; - if ( (aSPtr->signExp & 0x7FFF) != 0x7FFF ) return false; - uiA0 = aSPtr->signif; - return - ! (uiA0 & UINT64_C( 0x4000000000000000 )) - && (uiA0 & UINT64_C( 0x3FFFFFFFFFFFFFFF)); - -} - diff --git a/outside/softfloat-3/source/8086-SSE/f128M_isSignalingNaN.c b/outside/softfloat-3/source/8086-SSE/f128M_isSignalingNaN.c deleted file mode 100644 index b2c323f4b..000000000 --- a/outside/softfloat-3/source/8086-SSE/f128M_isSignalingNaN.c +++ /dev/null @@ -1,60 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "primitives.h" -#include "softfloat.h" - -/*---------------------------------------------------------------------------- -*----------------------------------------------------------------------------*/ -bool f128M_isSignalingNaN( const float128_t *aPtr ) -{ - const uint32_t *aWPtr; - uint32_t uiA96; - - aWPtr = (const uint32_t *) aPtr; - uiA96 = aWPtr[indexWordHi( 4 )]; - if ( (uiA96 & 0x7FFF8000) != 0x7FFF0000 ) return false; - return - ((uiA96 & 0x00007FFF) != 0) - || ((aWPtr[indexWord( 4, 2 )] | aWPtr[indexWord( 4, 1 )] - | aWPtr[indexWord( 4, 0 )]) - != 0); - -} - diff --git a/outside/softfloat-3/source/8086-SSE/s_commonNaNToExtF80M.c b/outside/softfloat-3/source/8086-SSE/s_commonNaNToExtF80M.c deleted file mode 100644 index 198ab52e3..000000000 --- a/outside/softfloat-3/source/8086-SSE/s_commonNaNToExtF80M.c +++ /dev/null @@ -1,56 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" - -/*---------------------------------------------------------------------------- -| Converts the common NaN pointed to by `aPtr' into an 80-bit extended -| floating-point NaN, and stores this NaN at the location pointed to by -| `zSPtr'. -*----------------------------------------------------------------------------*/ -void - softfloat_commonNaNToExtF80M( - const struct commonNaN *aPtr, struct extFloat80M *zSPtr ) -{ - - zSPtr->signExp = packToExtF80UI64( aPtr->sign, 0x7FFF ); - zSPtr->signif = UINT64_C( 0xC000000000000000 ) | aPtr->v64>>1; - -} - diff --git a/outside/softfloat-3/source/8086-SSE/s_commonNaNToExtF80UI.c b/outside/softfloat-3/source/8086-SSE/s_commonNaNToExtF80UI.c deleted file mode 100644 index fe51a8000..000000000 --- a/outside/softfloat-3/source/8086-SSE/s_commonNaNToExtF80UI.c +++ /dev/null @@ -1,56 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "primitives.h" -#include "specialize.h" - -/*---------------------------------------------------------------------------- -| Converts the common NaN pointed to by `aPtr' into an 80-bit extended -| floating-point NaN, and returns the bit pattern of this value as an unsigned -| integer. -*----------------------------------------------------------------------------*/ -struct uint128 softfloat_commonNaNToExtF80UI( const struct commonNaN *aPtr ) -{ - struct uint128 uiZ; - - uiZ.v64 = (uint_fast16_t) aPtr->sign<<15 | 0x7FFF; - uiZ.v0 = UINT64_C( 0xC000000000000000 ) | aPtr->v64>>1; - return uiZ; - -} - diff --git a/outside/softfloat-3/source/8086-SSE/s_commonNaNToF128M.c b/outside/softfloat-3/source/8086-SSE/s_commonNaNToF128M.c deleted file mode 100644 index 69ab3778d..000000000 --- a/outside/softfloat-3/source/8086-SSE/s_commonNaNToF128M.c +++ /dev/null @@ -1,56 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "primitives.h" -#include "specialize.h" - -/*---------------------------------------------------------------------------- -| Converts the common NaN pointed to by `aPtr' into a 128-bit floating-point -| NaN, and stores this NaN at the location pointed to by `zWPtr'. Argument -| `zWPtr' points to an array of four 32-bit elements that concatenate in the -| platform's normal endian order to form a 128-bit floating-point value. -*----------------------------------------------------------------------------*/ -void - softfloat_commonNaNToF128M( const struct commonNaN *aPtr, uint32_t *zWPtr ) -{ - - softfloat_shortShiftRight128M( (const uint32_t *) &aPtr->v0, 16, zWPtr ); - zWPtr[indexWordHi( 4 )] |= (uint32_t) aPtr->sign<<31 | 0x7FFF8000; - -} - diff --git a/outside/softfloat-3/source/8086-SSE/s_commonNaNToF128UI.c b/outside/softfloat-3/source/8086-SSE/s_commonNaNToF128UI.c deleted file mode 100644 index 8fedb0ce6..000000000 --- a/outside/softfloat-3/source/8086-SSE/s_commonNaNToF128UI.c +++ /dev/null @@ -1,55 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "primitives.h" -#include "specialize.h" - -/*---------------------------------------------------------------------------- -| Converts the common NaN pointed to by `aPtr' into a 128-bit floating-point -| NaN, and returns the bit pattern of this value as an unsigned integer. -*----------------------------------------------------------------------------*/ -struct uint128 softfloat_commonNaNToF128UI( const struct commonNaN *aPtr ) -{ - struct uint128 uiZ; - - uiZ = softfloat_shortShiftRight128( aPtr->v64, aPtr->v0, 16 ); - uiZ.v64 |= (uint_fast64_t) aPtr->sign<<63 | UINT64_C( 0x7FFF800000000000 ); - return uiZ; - -} - diff --git a/outside/softfloat-3/source/8086-SSE/s_commonNaNToF16UI.c b/outside/softfloat-3/source/8086-SSE/s_commonNaNToF16UI.c deleted file mode 100644 index ef8af33f6..000000000 --- a/outside/softfloat-3/source/8086-SSE/s_commonNaNToF16UI.c +++ /dev/null @@ -1,51 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "specialize.h" - -/*---------------------------------------------------------------------------- -| Converts the common NaN pointed to by `aPtr' into a 16-bit floating-point -| NaN, and returns the bit pattern of this value as an unsigned integer. -*----------------------------------------------------------------------------*/ -uint_fast16_t softfloat_commonNaNToF16UI( const struct commonNaN *aPtr ) -{ - - return (uint_fast16_t) aPtr->sign<<15 | 0x7E00 | aPtr->v64>>54; - -} - diff --git a/outside/softfloat-3/source/8086-SSE/s_commonNaNToF32UI.c b/outside/softfloat-3/source/8086-SSE/s_commonNaNToF32UI.c deleted file mode 100644 index 19a5968bb..000000000 --- a/outside/softfloat-3/source/8086-SSE/s_commonNaNToF32UI.c +++ /dev/null @@ -1,51 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "specialize.h" - -/*---------------------------------------------------------------------------- -| Converts the common NaN pointed to by `aPtr' into a 32-bit floating-point -| NaN, and returns the bit pattern of this value as an unsigned integer. -*----------------------------------------------------------------------------*/ -uint_fast32_t softfloat_commonNaNToF32UI( const struct commonNaN *aPtr ) -{ - - return (uint_fast32_t) aPtr->sign<<31 | 0x7FC00000 | aPtr->v64>>41; - -} - diff --git a/outside/softfloat-3/source/8086-SSE/s_commonNaNToF64UI.c b/outside/softfloat-3/source/8086-SSE/s_commonNaNToF64UI.c deleted file mode 100644 index 977432955..000000000 --- a/outside/softfloat-3/source/8086-SSE/s_commonNaNToF64UI.c +++ /dev/null @@ -1,53 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "specialize.h" - -/*---------------------------------------------------------------------------- -| Converts the common NaN pointed to by `aPtr' into a 64-bit floating-point -| NaN, and returns the bit pattern of this value as an unsigned integer. -*----------------------------------------------------------------------------*/ -uint_fast64_t softfloat_commonNaNToF64UI( const struct commonNaN *aPtr ) -{ - - return - (uint_fast64_t) aPtr->sign<<63 | UINT64_C( 0x7FF8000000000000 ) - | aPtr->v64>>12; - -} - diff --git a/outside/softfloat-3/source/8086-SSE/s_extF80MToCommonNaN.c b/outside/softfloat-3/source/8086-SSE/s_extF80MToCommonNaN.c deleted file mode 100644 index 982013c1c..000000000 --- a/outside/softfloat-3/source/8086-SSE/s_extF80MToCommonNaN.c +++ /dev/null @@ -1,62 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -/*---------------------------------------------------------------------------- -| Assuming the 80-bit extended floating-point value pointed to by `aSPtr' is -| a NaN, converts this NaN to the common NaN form, and stores the resulting -| common NaN at the location pointed to by `zPtr'. If the NaN is a signaling -| NaN, the invalid exception is raised. -*----------------------------------------------------------------------------*/ -void - softfloat_extF80MToCommonNaN( - const struct extFloat80M *aSPtr, struct commonNaN *zPtr ) -{ - - if ( extF80M_isSignalingNaN( (const extFloat80_t *) aSPtr ) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - } - zPtr->sign = signExtF80UI64( aSPtr->signExp ); - zPtr->v64 = aSPtr->signif<<1; - zPtr->v0 = 0; - -} - diff --git a/outside/softfloat-3/source/8086-SSE/s_extF80UIToCommonNaN.c b/outside/softfloat-3/source/8086-SSE/s_extF80UIToCommonNaN.c deleted file mode 100644 index 75e448c9b..000000000 --- a/outside/softfloat-3/source/8086-SSE/s_extF80UIToCommonNaN.c +++ /dev/null @@ -1,62 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "specialize.h" -#include "softfloat.h" - -/*---------------------------------------------------------------------------- -| Assuming the unsigned integer formed from concatenating `uiA64' and `uiA0' -| has the bit pattern of an 80-bit extended floating-point NaN, converts -| this NaN to the common NaN form, and stores the resulting common NaN at the -| location pointed to by `zPtr'. If the NaN is a signaling NaN, the invalid -| exception is raised. -*----------------------------------------------------------------------------*/ -void - softfloat_extF80UIToCommonNaN( - uint_fast16_t uiA64, uint_fast64_t uiA0, struct commonNaN *zPtr ) -{ - - if ( softfloat_isSigNaNExtF80UI( uiA64, uiA0 ) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - } - zPtr->sign = uiA64>>15; - zPtr->v64 = uiA0<<1; - zPtr->v0 = 0; - -} - diff --git a/outside/softfloat-3/source/8086-SSE/s_f128MToCommonNaN.c b/outside/softfloat-3/source/8086-SSE/s_f128MToCommonNaN.c deleted file mode 100644 index 585defe56..000000000 --- a/outside/softfloat-3/source/8086-SSE/s_f128MToCommonNaN.c +++ /dev/null @@ -1,62 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "primitives.h" -#include "specialize.h" -#include "softfloat.h" - -/*---------------------------------------------------------------------------- -| Assuming the 128-bit floating-point value pointed to by `aWPtr' is a NaN, -| converts this NaN to the common NaN form, and stores the resulting common -| NaN at the location pointed to by `zPtr'. If the NaN is a signaling NaN, -| the invalid exception is raised. Argument `aWPtr' points to an array of -| four 32-bit elements that concatenate in the platform's normal endian order -| to form a 128-bit floating-point value. -*----------------------------------------------------------------------------*/ -void - softfloat_f128MToCommonNaN( const uint32_t *aWPtr, struct commonNaN *zPtr ) -{ - - if ( f128M_isSignalingNaN( (const float128_t *) aWPtr ) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - } - zPtr->sign = aWPtr[indexWordHi( 4 )]>>31; - softfloat_shortShiftLeft128M( aWPtr, 16, (uint32_t *) &zPtr->v0 ); - -} - diff --git a/outside/softfloat-3/source/8086-SSE/s_f128UIToCommonNaN.c b/outside/softfloat-3/source/8086-SSE/s_f128UIToCommonNaN.c deleted file mode 100644 index d9ef1b800..000000000 --- a/outside/softfloat-3/source/8086-SSE/s_f128UIToCommonNaN.c +++ /dev/null @@ -1,65 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "primitives.h" -#include "specialize.h" -#include "softfloat.h" - -/*---------------------------------------------------------------------------- -| Assuming the unsigned integer formed from concatenating `uiA64' and `uiA0' -| has the bit pattern of a 128-bit floating-point NaN, converts this NaN to -| the common NaN form, and stores the resulting common NaN at the location -| pointed to by `zPtr'. If the NaN is a signaling NaN, the invalid exception -| is raised. -*----------------------------------------------------------------------------*/ -void - softfloat_f128UIToCommonNaN( - uint_fast64_t uiA64, uint_fast64_t uiA0, struct commonNaN *zPtr ) -{ - struct uint128 NaNSig; - - if ( softfloat_isSigNaNF128UI( uiA64, uiA0 ) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - } - NaNSig = softfloat_shortShiftLeft128( uiA64, uiA0, 16 ); - zPtr->sign = uiA64>>63; - zPtr->v64 = NaNSig.v64; - zPtr->v0 = NaNSig.v0; - -} - diff --git a/outside/softfloat-3/source/8086-SSE/s_f16UIToCommonNaN.c b/outside/softfloat-3/source/8086-SSE/s_f16UIToCommonNaN.c deleted file mode 100644 index 758cfc5ff..000000000 --- a/outside/softfloat-3/source/8086-SSE/s_f16UIToCommonNaN.c +++ /dev/null @@ -1,59 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "specialize.h" -#include "softfloat.h" - -/*---------------------------------------------------------------------------- -| Assuming `uiA' has the bit pattern of a 16-bit floating-point NaN, converts -| this NaN to the common NaN form, and stores the resulting common NaN at the -| location pointed to by `zPtr'. If the NaN is a signaling NaN, the invalid -| exception is raised. -*----------------------------------------------------------------------------*/ -void softfloat_f16UIToCommonNaN( uint_fast16_t uiA, struct commonNaN *zPtr ) -{ - - if ( softfloat_isSigNaNF16UI( uiA ) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - } - zPtr->sign = uiA>>15; - zPtr->v64 = (uint_fast64_t) uiA<<54; - zPtr->v0 = 0; - -} - diff --git a/outside/softfloat-3/source/8086-SSE/s_f32UIToCommonNaN.c b/outside/softfloat-3/source/8086-SSE/s_f32UIToCommonNaN.c deleted file mode 100644 index e5c7e7213..000000000 --- a/outside/softfloat-3/source/8086-SSE/s_f32UIToCommonNaN.c +++ /dev/null @@ -1,59 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "specialize.h" -#include "softfloat.h" - -/*---------------------------------------------------------------------------- -| Assuming `uiA' has the bit pattern of a 32-bit floating-point NaN, converts -| this NaN to the common NaN form, and stores the resulting common NaN at the -| location pointed to by `zPtr'. If the NaN is a signaling NaN, the invalid -| exception is raised. -*----------------------------------------------------------------------------*/ -void softfloat_f32UIToCommonNaN( uint_fast32_t uiA, struct commonNaN *zPtr ) -{ - - if ( softfloat_isSigNaNF32UI( uiA ) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - } - zPtr->sign = uiA>>31; - zPtr->v64 = (uint_fast64_t) uiA<<41; - zPtr->v0 = 0; - -} - diff --git a/outside/softfloat-3/source/8086-SSE/s_f64UIToCommonNaN.c b/outside/softfloat-3/source/8086-SSE/s_f64UIToCommonNaN.c deleted file mode 100644 index b104398de..000000000 --- a/outside/softfloat-3/source/8086-SSE/s_f64UIToCommonNaN.c +++ /dev/null @@ -1,59 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "specialize.h" -#include "softfloat.h" - -/*---------------------------------------------------------------------------- -| Assuming `uiA' has the bit pattern of a 64-bit floating-point NaN, converts -| this NaN to the common NaN form, and stores the resulting common NaN at the -| location pointed to by `zPtr'. If the NaN is a signaling NaN, the invalid -| exception is raised. -*----------------------------------------------------------------------------*/ -void softfloat_f64UIToCommonNaN( uint_fast64_t uiA, struct commonNaN *zPtr ) -{ - - if ( softfloat_isSigNaNF64UI( uiA ) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - } - zPtr->sign = uiA>>63; - zPtr->v64 = uiA<<12; - zPtr->v0 = 0; - -} - diff --git a/outside/softfloat-3/source/8086-SSE/s_propagateNaNExtF80M.c b/outside/softfloat-3/source/8086-SSE/s_propagateNaNExtF80M.c deleted file mode 100644 index e378134bc..000000000 --- a/outside/softfloat-3/source/8086-SSE/s_propagateNaNExtF80M.c +++ /dev/null @@ -1,107 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -/*---------------------------------------------------------------------------- -| Assuming at least one of the two 80-bit extended floating-point values -| pointed to by `aSPtr' and `bSPtr' is a NaN, stores the combined NaN result -| at the location pointed to by `zSPtr'. If either original floating-point -| value is a signaling NaN, the invalid exception is raised. -*----------------------------------------------------------------------------*/ -void - softfloat_propagateNaNExtF80M( - const struct extFloat80M *aSPtr, - const struct extFloat80M *bSPtr, - struct extFloat80M *zSPtr - ) -{ - bool isSigNaNA; - const struct extFloat80M *sPtr; - bool isSigNaNB; - uint_fast16_t uiB64; - uint64_t uiB0; - uint_fast16_t uiA64; - uint64_t uiA0; - uint_fast16_t uiMagA64, uiMagB64; - - isSigNaNA = extF80M_isSignalingNaN( (const extFloat80_t *) aSPtr ); - sPtr = aSPtr; - if ( ! bSPtr ) { - if ( isSigNaNA ) softfloat_raiseFlags( softfloat_flag_invalid ); - goto copy; - } - isSigNaNB = extF80M_isSignalingNaN( (const extFloat80_t *) bSPtr ); - if ( isSigNaNA | isSigNaNB ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - if ( isSigNaNA ) { - uiB64 = bSPtr->signExp; - if ( isSigNaNB ) goto returnLargerUIMag; - uiB0 = bSPtr->signif; - if ( isNaNExtF80UI( uiB64, uiB0 ) ) goto copyB; - goto copy; - } else { - uiA64 = aSPtr->signExp; - uiA0 = aSPtr->signif; - if ( isNaNExtF80UI( uiA64, uiA0 ) ) goto copy; - goto copyB; - } - } - uiB64 = bSPtr->signExp; - returnLargerUIMag: - uiA64 = aSPtr->signExp; - uiMagA64 = uiA64 & 0x7FFF; - uiMagB64 = uiB64 & 0x7FFF; - if ( uiMagA64 < uiMagB64 ) goto copyB; - if ( uiMagB64 < uiMagA64 ) goto copy; - uiA0 = aSPtr->signif; - uiB0 = bSPtr->signif; - if ( uiA0 < uiB0 ) goto copyB; - if ( uiB0 < uiA0 ) goto copy; - if ( uiA64 < uiB64 ) goto copy; - copyB: - sPtr = bSPtr; - copy: - zSPtr->signExp = sPtr->signExp; - zSPtr->signif = sPtr->signif | UINT64_C( 0xC000000000000000 ); - -} - diff --git a/outside/softfloat-3/source/8086-SSE/s_propagateNaNExtF80UI.c b/outside/softfloat-3/source/8086-SSE/s_propagateNaNExtF80UI.c deleted file mode 100644 index 1e7cf6ed6..000000000 --- a/outside/softfloat-3/source/8086-SSE/s_propagateNaNExtF80UI.c +++ /dev/null @@ -1,106 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -/*---------------------------------------------------------------------------- -| Interpreting the unsigned integer formed from concatenating `uiA64' and -| `uiA0' as an 80-bit extended floating-point value, and likewise interpreting -| the unsigned integer formed from concatenating `uiB64' and `uiB0' as another -| 80-bit extended floating-point value, and assuming at least on of these -| floating-point values is a NaN, returns the bit pattern of the combined NaN -| result. If either original floating-point value is a signaling NaN, the -| invalid exception is raised. -*----------------------------------------------------------------------------*/ -struct uint128 - softfloat_propagateNaNExtF80UI( - uint_fast16_t uiA64, - uint_fast64_t uiA0, - uint_fast16_t uiB64, - uint_fast64_t uiB0 - ) -{ - bool isSigNaNA, isSigNaNB; - uint_fast64_t uiNonsigA0, uiNonsigB0; - uint_fast16_t uiMagA64, uiMagB64; - struct uint128 uiZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - isSigNaNA = softfloat_isSigNaNExtF80UI( uiA64, uiA0 ); - isSigNaNB = softfloat_isSigNaNExtF80UI( uiB64, uiB0 ); - /*------------------------------------------------------------------------ - | Make NaNs non-signaling. - *------------------------------------------------------------------------*/ - uiNonsigA0 = uiA0 | UINT64_C( 0xC000000000000000 ); - uiNonsigB0 = uiB0 | UINT64_C( 0xC000000000000000 ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( isSigNaNA | isSigNaNB ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - if ( isSigNaNA ) { - if ( isSigNaNB ) goto returnLargerMag; - if ( isNaNExtF80UI( uiB64, uiB0 ) ) goto returnB; - goto returnA; - } else { - if ( isNaNExtF80UI( uiA64, uiA0 ) ) goto returnA; - goto returnB; - } - } - returnLargerMag: - uiMagA64 = uiA64 & 0x7FFF; - uiMagB64 = uiB64 & 0x7FFF; - if ( uiMagA64 < uiMagB64 ) goto returnB; - if ( uiMagB64 < uiMagA64 ) goto returnA; - if ( uiNonsigA0 < uiNonsigB0 ) goto returnB; - if ( uiNonsigB0 < uiNonsigA0 ) goto returnA; - if ( uiA64 < uiB64 ) goto returnA; - returnB: - uiZ.v64 = uiB64; - uiZ.v0 = uiNonsigB0; - return uiZ; - returnA: - uiZ.v64 = uiA64; - uiZ.v0 = uiNonsigA0; - return uiZ; - -} - diff --git a/outside/softfloat-3/source/8086-SSE/s_propagateNaNF128M.c b/outside/softfloat-3/source/8086-SSE/s_propagateNaNF128M.c deleted file mode 100644 index 112192402..000000000 --- a/outside/softfloat-3/source/8086-SSE/s_propagateNaNF128M.c +++ /dev/null @@ -1,76 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -/*---------------------------------------------------------------------------- -| Assuming at least one of the two 128-bit floating-point values pointed to by -| `aWPtr' and `bWPtr' is a NaN, stores the combined NaN result at the location -| pointed to by `zWPtr'. If either original floating-point value is a -| signaling NaN, the invalid exception is raised. Each of `aWPtr', `bWPtr', -| and `zWPtr' points to an array of four 32-bit elements that concatenate in -| the platform's normal endian order to form a 128-bit floating-point value. -*----------------------------------------------------------------------------*/ -void - softfloat_propagateNaNF128M( - const uint32_t *aWPtr, const uint32_t *bWPtr, uint32_t *zWPtr ) -{ - bool isSigNaNA; - const uint32_t *ptr; - - ptr = aWPtr; - isSigNaNA = f128M_isSignalingNaN( (const float128_t *) aWPtr ); - if ( - isSigNaNA - || (bWPtr && f128M_isSignalingNaN( (const float128_t *) bWPtr )) - ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - if ( isSigNaNA ) goto copy; - } - if ( ! softfloat_isNaNF128M( aWPtr ) ) ptr = bWPtr; - copy: - zWPtr[indexWordHi( 4 )] = ptr[indexWordHi( 4 )] | 0x00008000; - zWPtr[indexWord( 4, 2 )] = ptr[indexWord( 4, 2 )]; - zWPtr[indexWord( 4, 1 )] = ptr[indexWord( 4, 1 )]; - zWPtr[indexWord( 4, 0 )] = ptr[indexWord( 4, 0 )]; - -} - diff --git a/outside/softfloat-3/source/8086-SSE/s_propagateNaNF128UI.c b/outside/softfloat-3/source/8086-SSE/s_propagateNaNF128UI.c deleted file mode 100644 index 7b82fbde6..000000000 --- a/outside/softfloat-3/source/8086-SSE/s_propagateNaNF128UI.c +++ /dev/null @@ -1,81 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -/*---------------------------------------------------------------------------- -| Interpreting the unsigned integer formed from concatenating `uiA64' and -| `uiA0' as a 128-bit floating-point value, and likewise interpreting the -| unsigned integer formed from concatenating `uiB64' and `uiB0' as another -| 128-bit floating-point value, and assuming at least on of these floating- -| point values is a NaN, returns the bit pattern of the combined NaN result. -| If either original floating-point value is a signaling NaN, the invalid -| exception is raised. -*----------------------------------------------------------------------------*/ -struct uint128 - softfloat_propagateNaNF128UI( - uint_fast64_t uiA64, - uint_fast64_t uiA0, - uint_fast64_t uiB64, - uint_fast64_t uiB0 - ) -{ - bool isSigNaNA; - struct uint128 uiZ; - - isSigNaNA = softfloat_isSigNaNF128UI( uiA64, uiA0 ); - if ( isSigNaNA || softfloat_isSigNaNF128UI( uiB64, uiB0 ) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - if ( isSigNaNA ) goto returnNonsigA; - } - if ( isNaNF128UI( uiA64, uiA0 ) ) { - returnNonsigA: - uiZ.v64 = uiA64; - uiZ.v0 = uiA0; - } else { - uiZ.v64 = uiB64; - uiZ.v0 = uiB0; - } - uiZ.v64 |= UINT64_C( 0x0000800000000000 ); - return uiZ; - -} - diff --git a/outside/softfloat-3/source/8086-SSE/s_propagateNaNF16UI.c b/outside/softfloat-3/source/8086-SSE/s_propagateNaNF16UI.c deleted file mode 100644 index a296eb79a..000000000 --- a/outside/softfloat-3/source/8086-SSE/s_propagateNaNF16UI.c +++ /dev/null @@ -1,63 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -/*---------------------------------------------------------------------------- -| Interpreting `uiA' and `uiB' as the bit patterns of two 16-bit floating- -| point values, at least one of which is a NaN, returns the bit pattern of -| the combined NaN result. If either `uiA' or `uiB' has the pattern of a -| signaling NaN, the invalid exception is raised. -*----------------------------------------------------------------------------*/ -uint_fast16_t - softfloat_propagateNaNF16UI( uint_fast16_t uiA, uint_fast16_t uiB ) -{ - bool isSigNaNA; - - isSigNaNA = softfloat_isSigNaNF16UI( uiA ); - if ( isSigNaNA || softfloat_isSigNaNF16UI( uiB ) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - if ( isSigNaNA ) return uiA | 0x0200; - } - return (isNaNF16UI( uiA ) ? uiA : uiB) | 0x0200; - -} - diff --git a/outside/softfloat-3/source/8086-SSE/s_propagateNaNF32UI.c b/outside/softfloat-3/source/8086-SSE/s_propagateNaNF32UI.c deleted file mode 100644 index e8eb5dd2f..000000000 --- a/outside/softfloat-3/source/8086-SSE/s_propagateNaNF32UI.c +++ /dev/null @@ -1,63 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -/*---------------------------------------------------------------------------- -| Interpreting `uiA' and `uiB' as the bit patterns of two 32-bit floating- -| point values, at least one of which is a NaN, returns the bit pattern of -| the combined NaN result. If either `uiA' or `uiB' has the pattern of a -| signaling NaN, the invalid exception is raised. -*----------------------------------------------------------------------------*/ -uint_fast32_t - softfloat_propagateNaNF32UI( uint_fast32_t uiA, uint_fast32_t uiB ) -{ - bool isSigNaNA; - - isSigNaNA = softfloat_isSigNaNF32UI( uiA ); - if ( isSigNaNA || softfloat_isSigNaNF32UI( uiB ) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - if ( isSigNaNA ) return uiA | 0x00400000; - } - return (isNaNF32UI( uiA ) ? uiA : uiB) | 0x00400000; - -} - diff --git a/outside/softfloat-3/source/8086-SSE/s_propagateNaNF64UI.c b/outside/softfloat-3/source/8086-SSE/s_propagateNaNF64UI.c deleted file mode 100644 index 3781ae841..000000000 --- a/outside/softfloat-3/source/8086-SSE/s_propagateNaNF64UI.c +++ /dev/null @@ -1,63 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -/*---------------------------------------------------------------------------- -| Interpreting `uiA' and `uiB' as the bit patterns of two 64-bit floating- -| point values, at least one of which is a NaN, returns the bit pattern of -| the combined NaN result. If either `uiA' or `uiB' has the pattern of a -| signaling NaN, the invalid exception is raised. -*----------------------------------------------------------------------------*/ -uint_fast64_t - softfloat_propagateNaNF64UI( uint_fast64_t uiA, uint_fast64_t uiB ) -{ - bool isSigNaNA; - - isSigNaNA = softfloat_isSigNaNF64UI( uiA ); - if ( isSigNaNA || softfloat_isSigNaNF64UI( uiB ) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - if ( isSigNaNA ) return uiA | UINT64_C( 0x0008000000000000 ); - } - return (isNaNF64UI( uiA ) ? uiA : uiB) | UINT64_C( 0x0008000000000000 ); - -} - diff --git a/outside/softfloat-3/source/8086-SSE/softfloat_raiseFlags.c b/outside/softfloat-3/source/8086-SSE/softfloat_raiseFlags.c deleted file mode 100644 index f480e72a9..000000000 --- a/outside/softfloat-3/source/8086-SSE/softfloat_raiseFlags.c +++ /dev/null @@ -1,52 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include "platform.h" -#include "softfloat.h" - -/*---------------------------------------------------------------------------- -| Raises the exceptions specified by `flags'. Floating-point traps can be -| defined here if desired. It is currently not possible for such a trap -| to substitute a result value. If traps are not implemented, this routine -| should be simply `softfloat_exceptionFlags |= flags;'. -*----------------------------------------------------------------------------*/ -void softfloat_raiseFlags( uint_fast8_t flags ) -{ - - softfloat_exceptionFlags |= flags; - -} - diff --git a/outside/softfloat-3/source/8086-SSE/specialize.h b/outside/softfloat-3/source/8086-SSE/specialize.h deleted file mode 100644 index d205ae021..000000000 --- a/outside/softfloat-3/source/8086-SSE/specialize.h +++ /dev/null @@ -1,375 +0,0 @@ - -/*============================================================================ - -This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#ifndef specialize_h -#define specialize_h 1 - -#include -#include -#include "softfloat_types.h" - -/*---------------------------------------------------------------------------- -| Default value for `softfloat_detectTininess'. -*----------------------------------------------------------------------------*/ -#define init_detectTininess softfloat_tininess_afterRounding - -/*---------------------------------------------------------------------------- -| The values to return on conversions to 32-bit integer formats that raise an -| invalid exception. -*----------------------------------------------------------------------------*/ -#define ui32_fromPosOverflow 0xFFFFFFFF -#define ui32_fromNegOverflow 0 -#define ui32_fromNaN 0xFFFFFFFF -#define i32_fromPosOverflow 0x7FFFFFFF -#define i32_fromNegOverflow (-0x7FFFFFFF - 1) -#define i32_fromNaN 0x7FFFFFFF - -/*---------------------------------------------------------------------------- -| The values to return on conversions to 64-bit integer formats that raise an -| invalid exception. -*----------------------------------------------------------------------------*/ -#define ui64_fromPosOverflow UINT64_C( 0xFFFFFFFFFFFFFFFF ) -#define ui64_fromNegOverflow 0 -#define ui64_fromNaN UINT64_C( 0xFFFFFFFFFFFFFFFF ) -#define i64_fromPosOverflow UINT64_C( 0x7FFFFFFFFFFFFFFF ) -#define i64_fromNegOverflow (-UINT64_C( 0x7FFFFFFFFFFFFFFF ) - 1) -#define i64_fromNaN UINT64_C( 0x7FFFFFFFFFFFFFFF ) - -/*---------------------------------------------------------------------------- -| "Common NaN" structure, used to transfer NaN representations from one format -| to another. -*----------------------------------------------------------------------------*/ -struct commonNaN { - bool sign; -#ifdef LITTLEENDIAN - uint64_t v0, v64; -#else - uint64_t v64, v0; -#endif -}; - -/*---------------------------------------------------------------------------- -| The bit pattern for a default generated 16-bit floating-point NaN. -*----------------------------------------------------------------------------*/ -#define defaultNaNF16UI 0xFE00 - -/*---------------------------------------------------------------------------- -| Returns true when 16-bit unsigned integer `uiA' has the bit pattern of a -| 16-bit floating-point signaling NaN. -| Note: This macro evaluates its argument more than once. -*----------------------------------------------------------------------------*/ -#define softfloat_isSigNaNF16UI( uiA ) ((((uiA) & 0x7E00) == 0x7C00) && ((uiA) & 0x01FF)) - -/*---------------------------------------------------------------------------- -| Assuming `uiA' has the bit pattern of a 16-bit floating-point NaN, converts -| this NaN to the common NaN form, and stores the resulting common NaN at the -| location pointed to by `zPtr'. If the NaN is a signaling NaN, the invalid -| exception is raised. -*----------------------------------------------------------------------------*/ -void softfloat_f16UIToCommonNaN( uint_fast16_t uiA, struct commonNaN *zPtr ); - -/*---------------------------------------------------------------------------- -| Converts the common NaN pointed to by `aPtr' into a 16-bit floating-point -| NaN, and returns the bit pattern of this value as an unsigned integer. -*----------------------------------------------------------------------------*/ -uint_fast16_t softfloat_commonNaNToF16UI( const struct commonNaN *aPtr ); - -/*---------------------------------------------------------------------------- -| Interpreting `uiA' and `uiB' as the bit patterns of two 16-bit floating- -| point values, at least one of which is a NaN, returns the bit pattern of -| the combined NaN result. If either `uiA' or `uiB' has the pattern of a -| signaling NaN, the invalid exception is raised. -*----------------------------------------------------------------------------*/ -uint_fast16_t - softfloat_propagateNaNF16UI( uint_fast16_t uiA, uint_fast16_t uiB ); - -/*---------------------------------------------------------------------------- -| The bit pattern for a default generated 32-bit floating-point NaN. -*----------------------------------------------------------------------------*/ -#define defaultNaNF32UI 0xFFC00000 - -/*---------------------------------------------------------------------------- -| Returns true when 32-bit unsigned integer `uiA' has the bit pattern of a -| 32-bit floating-point signaling NaN. -| Note: This macro evaluates its argument more than once. -*----------------------------------------------------------------------------*/ -#define softfloat_isSigNaNF32UI( uiA ) ((((uiA) & 0x7FC00000) == 0x7F800000) && ((uiA) & 0x003FFFFF)) - -/*---------------------------------------------------------------------------- -| Assuming `uiA' has the bit pattern of a 32-bit floating-point NaN, converts -| this NaN to the common NaN form, and stores the resulting common NaN at the -| location pointed to by `zPtr'. If the NaN is a signaling NaN, the invalid -| exception is raised. -*----------------------------------------------------------------------------*/ -void softfloat_f32UIToCommonNaN( uint_fast32_t uiA, struct commonNaN *zPtr ); - -/*---------------------------------------------------------------------------- -| Converts the common NaN pointed to by `aPtr' into a 32-bit floating-point -| NaN, and returns the bit pattern of this value as an unsigned integer. -*----------------------------------------------------------------------------*/ -uint_fast32_t softfloat_commonNaNToF32UI( const struct commonNaN *aPtr ); - -/*---------------------------------------------------------------------------- -| Interpreting `uiA' and `uiB' as the bit patterns of two 32-bit floating- -| point values, at least one of which is a NaN, returns the bit pattern of -| the combined NaN result. If either `uiA' or `uiB' has the pattern of a -| signaling NaN, the invalid exception is raised. -*----------------------------------------------------------------------------*/ -uint_fast32_t - softfloat_propagateNaNF32UI( uint_fast32_t uiA, uint_fast32_t uiB ); - -/*---------------------------------------------------------------------------- -| The bit pattern for a default generated 64-bit floating-point NaN. -*----------------------------------------------------------------------------*/ -#define defaultNaNF64UI UINT64_C( 0xFFF8000000000000 ) - -/*---------------------------------------------------------------------------- -| Returns true when 64-bit unsigned integer `uiA' has the bit pattern of a -| 64-bit floating-point signaling NaN. -| Note: This macro evaluates its argument more than once. -*----------------------------------------------------------------------------*/ -#define softfloat_isSigNaNF64UI( uiA ) ((((uiA) & UINT64_C( 0x7FF8000000000000 )) == UINT64_C( 0x7FF0000000000000 )) && ((uiA) & UINT64_C( 0x0007FFFFFFFFFFFF ))) - -/*---------------------------------------------------------------------------- -| Assuming `uiA' has the bit pattern of a 64-bit floating-point NaN, converts -| this NaN to the common NaN form, and stores the resulting common NaN at the -| location pointed to by `zPtr'. If the NaN is a signaling NaN, the invalid -| exception is raised. -*----------------------------------------------------------------------------*/ -void softfloat_f64UIToCommonNaN( uint_fast64_t uiA, struct commonNaN *zPtr ); - -/*---------------------------------------------------------------------------- -| Converts the common NaN pointed to by `aPtr' into a 64-bit floating-point -| NaN, and returns the bit pattern of this value as an unsigned integer. -*----------------------------------------------------------------------------*/ -uint_fast64_t softfloat_commonNaNToF64UI( const struct commonNaN *aPtr ); - -/*---------------------------------------------------------------------------- -| Interpreting `uiA' and `uiB' as the bit patterns of two 64-bit floating- -| point values, at least one of which is a NaN, returns the bit pattern of -| the combined NaN result. If either `uiA' or `uiB' has the pattern of a -| signaling NaN, the invalid exception is raised. -*----------------------------------------------------------------------------*/ -uint_fast64_t - softfloat_propagateNaNF64UI( uint_fast64_t uiA, uint_fast64_t uiB ); - -/*---------------------------------------------------------------------------- -| The bit pattern for a default generated 80-bit extended floating-point NaN. -*----------------------------------------------------------------------------*/ -#define defaultNaNExtF80UI64 0xFFFF -#define defaultNaNExtF80UI0 UINT64_C( 0xC000000000000000 ) - -/*---------------------------------------------------------------------------- -| Returns true when the 80-bit unsigned integer formed from concatenating -| 16-bit `uiA64' and 64-bit `uiA0' has the bit pattern of an 80-bit extended -| floating-point signaling NaN. -| Note: This macro evaluates its arguments more than once. -*----------------------------------------------------------------------------*/ -#define softfloat_isSigNaNExtF80UI( uiA64, uiA0 ) ((((uiA64) & 0x7FFF) == 0x7FFF) && ! ((uiA0) & UINT64_C( 0x4000000000000000 )) && ((uiA0) & UINT64_C( 0x3FFFFFFFFFFFFFFF ))) - -#ifdef SOFTFLOAT_FAST_INT64 - -/*---------------------------------------------------------------------------- -| The following functions are needed only when `SOFTFLOAT_FAST_INT64' is -| defined. -*----------------------------------------------------------------------------*/ - -/*---------------------------------------------------------------------------- -| Assuming the unsigned integer formed from concatenating `uiA64' and `uiA0' -| has the bit pattern of an 80-bit extended floating-point NaN, converts -| this NaN to the common NaN form, and stores the resulting common NaN at the -| location pointed to by `zPtr'. If the NaN is a signaling NaN, the invalid -| exception is raised. -*----------------------------------------------------------------------------*/ -void - softfloat_extF80UIToCommonNaN( - uint_fast16_t uiA64, uint_fast64_t uiA0, struct commonNaN *zPtr ); - -/*---------------------------------------------------------------------------- -| Converts the common NaN pointed to by `aPtr' into an 80-bit extended -| floating-point NaN, and returns the bit pattern of this value as an unsigned -| integer. -*----------------------------------------------------------------------------*/ -struct uint128 softfloat_commonNaNToExtF80UI( const struct commonNaN *aPtr ); - -/*---------------------------------------------------------------------------- -| Interpreting the unsigned integer formed from concatenating `uiA64' and -| `uiA0' as an 80-bit extended floating-point value, and likewise interpreting -| the unsigned integer formed from concatenating `uiB64' and `uiB0' as another -| 80-bit extended floating-point value, and assuming at least on of these -| floating-point values is a NaN, returns the bit pattern of the combined NaN -| result. If either original floating-point value is a signaling NaN, the -| invalid exception is raised. -*----------------------------------------------------------------------------*/ -struct uint128 - softfloat_propagateNaNExtF80UI( - uint_fast16_t uiA64, - uint_fast64_t uiA0, - uint_fast16_t uiB64, - uint_fast64_t uiB0 - ); - -/*---------------------------------------------------------------------------- -| The bit pattern for a default generated 128-bit floating-point NaN. -*----------------------------------------------------------------------------*/ -#define defaultNaNF128UI64 UINT64_C( 0xFFFF800000000000 ) -#define defaultNaNF128UI0 UINT64_C( 0 ) - -/*---------------------------------------------------------------------------- -| Returns true when the 128-bit unsigned integer formed from concatenating -| 64-bit `uiA64' and 64-bit `uiA0' has the bit pattern of a 128-bit floating- -| point signaling NaN. -| Note: This macro evaluates its arguments more than once. -*----------------------------------------------------------------------------*/ -#define softfloat_isSigNaNF128UI( uiA64, uiA0 ) ((((uiA64) & UINT64_C( 0x7FFF800000000000 )) == UINT64_C( 0x7FFF000000000000 )) && ((uiA0) || ((uiA64) & UINT64_C( 0x00007FFFFFFFFFFF )))) - -/*---------------------------------------------------------------------------- -| Assuming the unsigned integer formed from concatenating `uiA64' and `uiA0' -| has the bit pattern of a 128-bit floating-point NaN, converts this NaN to -| the common NaN form, and stores the resulting common NaN at the location -| pointed to by `zPtr'. If the NaN is a signaling NaN, the invalid exception -| is raised. -*----------------------------------------------------------------------------*/ -void - softfloat_f128UIToCommonNaN( - uint_fast64_t uiA64, uint_fast64_t uiA0, struct commonNaN *zPtr ); - -/*---------------------------------------------------------------------------- -| Converts the common NaN pointed to by `aPtr' into a 128-bit floating-point -| NaN, and returns the bit pattern of this value as an unsigned integer. -*----------------------------------------------------------------------------*/ -struct uint128 softfloat_commonNaNToF128UI( const struct commonNaN * ); - -/*---------------------------------------------------------------------------- -| Interpreting the unsigned integer formed from concatenating `uiA64' and -| `uiA0' as a 128-bit floating-point value, and likewise interpreting the -| unsigned integer formed from concatenating `uiB64' and `uiB0' as another -| 128-bit floating-point value, and assuming at least on of these floating- -| point values is a NaN, returns the bit pattern of the combined NaN result. -| If either original floating-point value is a signaling NaN, the invalid -| exception is raised. -*----------------------------------------------------------------------------*/ -struct uint128 - softfloat_propagateNaNF128UI( - uint_fast64_t uiA64, - uint_fast64_t uiA0, - uint_fast64_t uiB64, - uint_fast64_t uiB0 - ); - -#else - -/*---------------------------------------------------------------------------- -| The following functions are needed only when `SOFTFLOAT_FAST_INT64' is not -| defined. -*----------------------------------------------------------------------------*/ - -/*---------------------------------------------------------------------------- -| Assuming the 80-bit extended floating-point value pointed to by `aSPtr' is -| a NaN, converts this NaN to the common NaN form, and stores the resulting -| common NaN at the location pointed to by `zPtr'. If the NaN is a signaling -| NaN, the invalid exception is raised. -*----------------------------------------------------------------------------*/ -void - softfloat_extF80MToCommonNaN( - const struct extFloat80M *aSPtr, struct commonNaN *zPtr ); - -/*---------------------------------------------------------------------------- -| Converts the common NaN pointed to by `aPtr' into an 80-bit extended -| floating-point NaN, and stores this NaN at the location pointed to by -| `zSPtr'. -*----------------------------------------------------------------------------*/ -void - softfloat_commonNaNToExtF80M( - const struct commonNaN *aPtr, struct extFloat80M *zSPtr ); - -/*---------------------------------------------------------------------------- -| Assuming at least one of the two 80-bit extended floating-point values -| pointed to by `aSPtr' and `bSPtr' is a NaN, stores the combined NaN result -| at the location pointed to by `zSPtr'. If either original floating-point -| value is a signaling NaN, the invalid exception is raised. -*----------------------------------------------------------------------------*/ -void - softfloat_propagateNaNExtF80M( - const struct extFloat80M *aSPtr, - const struct extFloat80M *bSPtr, - struct extFloat80M *zSPtr - ); - -/*---------------------------------------------------------------------------- -| The bit pattern for a default generated 128-bit floating-point NaN. -*----------------------------------------------------------------------------*/ -#define defaultNaNF128UI96 0xFFFF8000 -#define defaultNaNF128UI64 0 -#define defaultNaNF128UI32 0 -#define defaultNaNF128UI0 0 - -/*---------------------------------------------------------------------------- -| Assuming the 128-bit floating-point value pointed to by `aWPtr' is a NaN, -| converts this NaN to the common NaN form, and stores the resulting common -| NaN at the location pointed to by `zPtr'. If the NaN is a signaling NaN, -| the invalid exception is raised. Argument `aWPtr' points to an array of -| four 32-bit elements that concatenate in the platform's normal endian order -| to form a 128-bit floating-point value. -*----------------------------------------------------------------------------*/ -void - softfloat_f128MToCommonNaN( const uint32_t *aWPtr, struct commonNaN *zPtr ); - -/*---------------------------------------------------------------------------- -| Converts the common NaN pointed to by `aPtr' into a 128-bit floating-point -| NaN, and stores this NaN at the location pointed to by `zWPtr'. Argument -| `zWPtr' points to an array of four 32-bit elements that concatenate in the -| platform's normal endian order to form a 128-bit floating-point value. -*----------------------------------------------------------------------------*/ -void - softfloat_commonNaNToF128M( const struct commonNaN *aPtr, uint32_t *zWPtr ); - -/*---------------------------------------------------------------------------- -| Assuming at least one of the two 128-bit floating-point values pointed to by -| `aWPtr' and `bWPtr' is a NaN, stores the combined NaN result at the location -| pointed to by `zWPtr'. If either original floating-point value is a -| signaling NaN, the invalid exception is raised. Each of `aWPtr', `bWPtr', -| and `zWPtr' points to an array of four 32-bit elements that concatenate in -| the platform's normal endian order to form a 128-bit floating-point value. -*----------------------------------------------------------------------------*/ -void - softfloat_propagateNaNF128M( - const uint32_t *aWPtr, const uint32_t *bWPtr, uint32_t *zWPtr ); - -#endif - -#endif - diff --git a/outside/softfloat-3/source/8086/extF80M_isSignalingNaN.c b/outside/softfloat-3/source/8086/extF80M_isSignalingNaN.c deleted file mode 100644 index 986ab4f69..000000000 --- a/outside/softfloat-3/source/8086/extF80M_isSignalingNaN.c +++ /dev/null @@ -1,57 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "softfloat.h" - -/*---------------------------------------------------------------------------- -*----------------------------------------------------------------------------*/ -bool extF80M_isSignalingNaN( const extFloat80_t *aPtr ) -{ - const struct extFloat80M *aSPtr; - uint64_t uiA0; - - aSPtr = (const struct extFloat80M *) aPtr; - if ( (aSPtr->signExp & 0x7FFF) != 0x7FFF ) return false; - uiA0 = aSPtr->signif; - return - ! (uiA0 & UINT64_C( 0x4000000000000000 )) - && (uiA0 & UINT64_C( 0x3FFFFFFFFFFFFFFF)); - -} - diff --git a/outside/softfloat-3/source/8086/f128M_isSignalingNaN.c b/outside/softfloat-3/source/8086/f128M_isSignalingNaN.c deleted file mode 100644 index b2c323f4b..000000000 --- a/outside/softfloat-3/source/8086/f128M_isSignalingNaN.c +++ /dev/null @@ -1,60 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "primitives.h" -#include "softfloat.h" - -/*---------------------------------------------------------------------------- -*----------------------------------------------------------------------------*/ -bool f128M_isSignalingNaN( const float128_t *aPtr ) -{ - const uint32_t *aWPtr; - uint32_t uiA96; - - aWPtr = (const uint32_t *) aPtr; - uiA96 = aWPtr[indexWordHi( 4 )]; - if ( (uiA96 & 0x7FFF8000) != 0x7FFF0000 ) return false; - return - ((uiA96 & 0x00007FFF) != 0) - || ((aWPtr[indexWord( 4, 2 )] | aWPtr[indexWord( 4, 1 )] - | aWPtr[indexWord( 4, 0 )]) - != 0); - -} - diff --git a/outside/softfloat-3/source/8086/s_commonNaNToExtF80M.c b/outside/softfloat-3/source/8086/s_commonNaNToExtF80M.c deleted file mode 100644 index 198ab52e3..000000000 --- a/outside/softfloat-3/source/8086/s_commonNaNToExtF80M.c +++ /dev/null @@ -1,56 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" - -/*---------------------------------------------------------------------------- -| Converts the common NaN pointed to by `aPtr' into an 80-bit extended -| floating-point NaN, and stores this NaN at the location pointed to by -| `zSPtr'. -*----------------------------------------------------------------------------*/ -void - softfloat_commonNaNToExtF80M( - const struct commonNaN *aPtr, struct extFloat80M *zSPtr ) -{ - - zSPtr->signExp = packToExtF80UI64( aPtr->sign, 0x7FFF ); - zSPtr->signif = UINT64_C( 0xC000000000000000 ) | aPtr->v64>>1; - -} - diff --git a/outside/softfloat-3/source/8086/s_commonNaNToExtF80UI.c b/outside/softfloat-3/source/8086/s_commonNaNToExtF80UI.c deleted file mode 100644 index fe51a8000..000000000 --- a/outside/softfloat-3/source/8086/s_commonNaNToExtF80UI.c +++ /dev/null @@ -1,56 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "primitives.h" -#include "specialize.h" - -/*---------------------------------------------------------------------------- -| Converts the common NaN pointed to by `aPtr' into an 80-bit extended -| floating-point NaN, and returns the bit pattern of this value as an unsigned -| integer. -*----------------------------------------------------------------------------*/ -struct uint128 softfloat_commonNaNToExtF80UI( const struct commonNaN *aPtr ) -{ - struct uint128 uiZ; - - uiZ.v64 = (uint_fast16_t) aPtr->sign<<15 | 0x7FFF; - uiZ.v0 = UINT64_C( 0xC000000000000000 ) | aPtr->v64>>1; - return uiZ; - -} - diff --git a/outside/softfloat-3/source/8086/s_commonNaNToF128M.c b/outside/softfloat-3/source/8086/s_commonNaNToF128M.c deleted file mode 100644 index 69ab3778d..000000000 --- a/outside/softfloat-3/source/8086/s_commonNaNToF128M.c +++ /dev/null @@ -1,56 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "primitives.h" -#include "specialize.h" - -/*---------------------------------------------------------------------------- -| Converts the common NaN pointed to by `aPtr' into a 128-bit floating-point -| NaN, and stores this NaN at the location pointed to by `zWPtr'. Argument -| `zWPtr' points to an array of four 32-bit elements that concatenate in the -| platform's normal endian order to form a 128-bit floating-point value. -*----------------------------------------------------------------------------*/ -void - softfloat_commonNaNToF128M( const struct commonNaN *aPtr, uint32_t *zWPtr ) -{ - - softfloat_shortShiftRight128M( (const uint32_t *) &aPtr->v0, 16, zWPtr ); - zWPtr[indexWordHi( 4 )] |= (uint32_t) aPtr->sign<<31 | 0x7FFF8000; - -} - diff --git a/outside/softfloat-3/source/8086/s_commonNaNToF128UI.c b/outside/softfloat-3/source/8086/s_commonNaNToF128UI.c deleted file mode 100644 index 8fedb0ce6..000000000 --- a/outside/softfloat-3/source/8086/s_commonNaNToF128UI.c +++ /dev/null @@ -1,55 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "primitives.h" -#include "specialize.h" - -/*---------------------------------------------------------------------------- -| Converts the common NaN pointed to by `aPtr' into a 128-bit floating-point -| NaN, and returns the bit pattern of this value as an unsigned integer. -*----------------------------------------------------------------------------*/ -struct uint128 softfloat_commonNaNToF128UI( const struct commonNaN *aPtr ) -{ - struct uint128 uiZ; - - uiZ = softfloat_shortShiftRight128( aPtr->v64, aPtr->v0, 16 ); - uiZ.v64 |= (uint_fast64_t) aPtr->sign<<63 | UINT64_C( 0x7FFF800000000000 ); - return uiZ; - -} - diff --git a/outside/softfloat-3/source/8086/s_commonNaNToF16UI.c b/outside/softfloat-3/source/8086/s_commonNaNToF16UI.c deleted file mode 100644 index ef8af33f6..000000000 --- a/outside/softfloat-3/source/8086/s_commonNaNToF16UI.c +++ /dev/null @@ -1,51 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "specialize.h" - -/*---------------------------------------------------------------------------- -| Converts the common NaN pointed to by `aPtr' into a 16-bit floating-point -| NaN, and returns the bit pattern of this value as an unsigned integer. -*----------------------------------------------------------------------------*/ -uint_fast16_t softfloat_commonNaNToF16UI( const struct commonNaN *aPtr ) -{ - - return (uint_fast16_t) aPtr->sign<<15 | 0x7E00 | aPtr->v64>>54; - -} - diff --git a/outside/softfloat-3/source/8086/s_commonNaNToF32UI.c b/outside/softfloat-3/source/8086/s_commonNaNToF32UI.c deleted file mode 100644 index 19a5968bb..000000000 --- a/outside/softfloat-3/source/8086/s_commonNaNToF32UI.c +++ /dev/null @@ -1,51 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "specialize.h" - -/*---------------------------------------------------------------------------- -| Converts the common NaN pointed to by `aPtr' into a 32-bit floating-point -| NaN, and returns the bit pattern of this value as an unsigned integer. -*----------------------------------------------------------------------------*/ -uint_fast32_t softfloat_commonNaNToF32UI( const struct commonNaN *aPtr ) -{ - - return (uint_fast32_t) aPtr->sign<<31 | 0x7FC00000 | aPtr->v64>>41; - -} - diff --git a/outside/softfloat-3/source/8086/s_commonNaNToF64UI.c b/outside/softfloat-3/source/8086/s_commonNaNToF64UI.c deleted file mode 100644 index 977432955..000000000 --- a/outside/softfloat-3/source/8086/s_commonNaNToF64UI.c +++ /dev/null @@ -1,53 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "specialize.h" - -/*---------------------------------------------------------------------------- -| Converts the common NaN pointed to by `aPtr' into a 64-bit floating-point -| NaN, and returns the bit pattern of this value as an unsigned integer. -*----------------------------------------------------------------------------*/ -uint_fast64_t softfloat_commonNaNToF64UI( const struct commonNaN *aPtr ) -{ - - return - (uint_fast64_t) aPtr->sign<<63 | UINT64_C( 0x7FF8000000000000 ) - | aPtr->v64>>12; - -} - diff --git a/outside/softfloat-3/source/8086/s_extF80MToCommonNaN.c b/outside/softfloat-3/source/8086/s_extF80MToCommonNaN.c deleted file mode 100644 index 982013c1c..000000000 --- a/outside/softfloat-3/source/8086/s_extF80MToCommonNaN.c +++ /dev/null @@ -1,62 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -/*---------------------------------------------------------------------------- -| Assuming the 80-bit extended floating-point value pointed to by `aSPtr' is -| a NaN, converts this NaN to the common NaN form, and stores the resulting -| common NaN at the location pointed to by `zPtr'. If the NaN is a signaling -| NaN, the invalid exception is raised. -*----------------------------------------------------------------------------*/ -void - softfloat_extF80MToCommonNaN( - const struct extFloat80M *aSPtr, struct commonNaN *zPtr ) -{ - - if ( extF80M_isSignalingNaN( (const extFloat80_t *) aSPtr ) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - } - zPtr->sign = signExtF80UI64( aSPtr->signExp ); - zPtr->v64 = aSPtr->signif<<1; - zPtr->v0 = 0; - -} - diff --git a/outside/softfloat-3/source/8086/s_extF80UIToCommonNaN.c b/outside/softfloat-3/source/8086/s_extF80UIToCommonNaN.c deleted file mode 100644 index 75e448c9b..000000000 --- a/outside/softfloat-3/source/8086/s_extF80UIToCommonNaN.c +++ /dev/null @@ -1,62 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "specialize.h" -#include "softfloat.h" - -/*---------------------------------------------------------------------------- -| Assuming the unsigned integer formed from concatenating `uiA64' and `uiA0' -| has the bit pattern of an 80-bit extended floating-point NaN, converts -| this NaN to the common NaN form, and stores the resulting common NaN at the -| location pointed to by `zPtr'. If the NaN is a signaling NaN, the invalid -| exception is raised. -*----------------------------------------------------------------------------*/ -void - softfloat_extF80UIToCommonNaN( - uint_fast16_t uiA64, uint_fast64_t uiA0, struct commonNaN *zPtr ) -{ - - if ( softfloat_isSigNaNExtF80UI( uiA64, uiA0 ) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - } - zPtr->sign = uiA64>>15; - zPtr->v64 = uiA0<<1; - zPtr->v0 = 0; - -} - diff --git a/outside/softfloat-3/source/8086/s_f128MToCommonNaN.c b/outside/softfloat-3/source/8086/s_f128MToCommonNaN.c deleted file mode 100644 index 585defe56..000000000 --- a/outside/softfloat-3/source/8086/s_f128MToCommonNaN.c +++ /dev/null @@ -1,62 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "primitives.h" -#include "specialize.h" -#include "softfloat.h" - -/*---------------------------------------------------------------------------- -| Assuming the 128-bit floating-point value pointed to by `aWPtr' is a NaN, -| converts this NaN to the common NaN form, and stores the resulting common -| NaN at the location pointed to by `zPtr'. If the NaN is a signaling NaN, -| the invalid exception is raised. Argument `aWPtr' points to an array of -| four 32-bit elements that concatenate in the platform's normal endian order -| to form a 128-bit floating-point value. -*----------------------------------------------------------------------------*/ -void - softfloat_f128MToCommonNaN( const uint32_t *aWPtr, struct commonNaN *zPtr ) -{ - - if ( f128M_isSignalingNaN( (const float128_t *) aWPtr ) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - } - zPtr->sign = aWPtr[indexWordHi( 4 )]>>31; - softfloat_shortShiftLeft128M( aWPtr, 16, (uint32_t *) &zPtr->v0 ); - -} - diff --git a/outside/softfloat-3/source/8086/s_f128UIToCommonNaN.c b/outside/softfloat-3/source/8086/s_f128UIToCommonNaN.c deleted file mode 100644 index d9ef1b800..000000000 --- a/outside/softfloat-3/source/8086/s_f128UIToCommonNaN.c +++ /dev/null @@ -1,65 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "primitives.h" -#include "specialize.h" -#include "softfloat.h" - -/*---------------------------------------------------------------------------- -| Assuming the unsigned integer formed from concatenating `uiA64' and `uiA0' -| has the bit pattern of a 128-bit floating-point NaN, converts this NaN to -| the common NaN form, and stores the resulting common NaN at the location -| pointed to by `zPtr'. If the NaN is a signaling NaN, the invalid exception -| is raised. -*----------------------------------------------------------------------------*/ -void - softfloat_f128UIToCommonNaN( - uint_fast64_t uiA64, uint_fast64_t uiA0, struct commonNaN *zPtr ) -{ - struct uint128 NaNSig; - - if ( softfloat_isSigNaNF128UI( uiA64, uiA0 ) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - } - NaNSig = softfloat_shortShiftLeft128( uiA64, uiA0, 16 ); - zPtr->sign = uiA64>>63; - zPtr->v64 = NaNSig.v64; - zPtr->v0 = NaNSig.v0; - -} - diff --git a/outside/softfloat-3/source/8086/s_f16UIToCommonNaN.c b/outside/softfloat-3/source/8086/s_f16UIToCommonNaN.c deleted file mode 100644 index 758cfc5ff..000000000 --- a/outside/softfloat-3/source/8086/s_f16UIToCommonNaN.c +++ /dev/null @@ -1,59 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "specialize.h" -#include "softfloat.h" - -/*---------------------------------------------------------------------------- -| Assuming `uiA' has the bit pattern of a 16-bit floating-point NaN, converts -| this NaN to the common NaN form, and stores the resulting common NaN at the -| location pointed to by `zPtr'. If the NaN is a signaling NaN, the invalid -| exception is raised. -*----------------------------------------------------------------------------*/ -void softfloat_f16UIToCommonNaN( uint_fast16_t uiA, struct commonNaN *zPtr ) -{ - - if ( softfloat_isSigNaNF16UI( uiA ) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - } - zPtr->sign = uiA>>15; - zPtr->v64 = (uint_fast64_t) uiA<<54; - zPtr->v0 = 0; - -} - diff --git a/outside/softfloat-3/source/8086/s_f32UIToCommonNaN.c b/outside/softfloat-3/source/8086/s_f32UIToCommonNaN.c deleted file mode 100644 index e5c7e7213..000000000 --- a/outside/softfloat-3/source/8086/s_f32UIToCommonNaN.c +++ /dev/null @@ -1,59 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "specialize.h" -#include "softfloat.h" - -/*---------------------------------------------------------------------------- -| Assuming `uiA' has the bit pattern of a 32-bit floating-point NaN, converts -| this NaN to the common NaN form, and stores the resulting common NaN at the -| location pointed to by `zPtr'. If the NaN is a signaling NaN, the invalid -| exception is raised. -*----------------------------------------------------------------------------*/ -void softfloat_f32UIToCommonNaN( uint_fast32_t uiA, struct commonNaN *zPtr ) -{ - - if ( softfloat_isSigNaNF32UI( uiA ) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - } - zPtr->sign = uiA>>31; - zPtr->v64 = (uint_fast64_t) uiA<<41; - zPtr->v0 = 0; - -} - diff --git a/outside/softfloat-3/source/8086/s_f64UIToCommonNaN.c b/outside/softfloat-3/source/8086/s_f64UIToCommonNaN.c deleted file mode 100644 index b104398de..000000000 --- a/outside/softfloat-3/source/8086/s_f64UIToCommonNaN.c +++ /dev/null @@ -1,59 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "specialize.h" -#include "softfloat.h" - -/*---------------------------------------------------------------------------- -| Assuming `uiA' has the bit pattern of a 64-bit floating-point NaN, converts -| this NaN to the common NaN form, and stores the resulting common NaN at the -| location pointed to by `zPtr'. If the NaN is a signaling NaN, the invalid -| exception is raised. -*----------------------------------------------------------------------------*/ -void softfloat_f64UIToCommonNaN( uint_fast64_t uiA, struct commonNaN *zPtr ) -{ - - if ( softfloat_isSigNaNF64UI( uiA ) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - } - zPtr->sign = uiA>>63; - zPtr->v64 = uiA<<12; - zPtr->v0 = 0; - -} - diff --git a/outside/softfloat-3/source/8086/s_propagateNaNExtF80M.c b/outside/softfloat-3/source/8086/s_propagateNaNExtF80M.c deleted file mode 100644 index e378134bc..000000000 --- a/outside/softfloat-3/source/8086/s_propagateNaNExtF80M.c +++ /dev/null @@ -1,107 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -/*---------------------------------------------------------------------------- -| Assuming at least one of the two 80-bit extended floating-point values -| pointed to by `aSPtr' and `bSPtr' is a NaN, stores the combined NaN result -| at the location pointed to by `zSPtr'. If either original floating-point -| value is a signaling NaN, the invalid exception is raised. -*----------------------------------------------------------------------------*/ -void - softfloat_propagateNaNExtF80M( - const struct extFloat80M *aSPtr, - const struct extFloat80M *bSPtr, - struct extFloat80M *zSPtr - ) -{ - bool isSigNaNA; - const struct extFloat80M *sPtr; - bool isSigNaNB; - uint_fast16_t uiB64; - uint64_t uiB0; - uint_fast16_t uiA64; - uint64_t uiA0; - uint_fast16_t uiMagA64, uiMagB64; - - isSigNaNA = extF80M_isSignalingNaN( (const extFloat80_t *) aSPtr ); - sPtr = aSPtr; - if ( ! bSPtr ) { - if ( isSigNaNA ) softfloat_raiseFlags( softfloat_flag_invalid ); - goto copy; - } - isSigNaNB = extF80M_isSignalingNaN( (const extFloat80_t *) bSPtr ); - if ( isSigNaNA | isSigNaNB ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - if ( isSigNaNA ) { - uiB64 = bSPtr->signExp; - if ( isSigNaNB ) goto returnLargerUIMag; - uiB0 = bSPtr->signif; - if ( isNaNExtF80UI( uiB64, uiB0 ) ) goto copyB; - goto copy; - } else { - uiA64 = aSPtr->signExp; - uiA0 = aSPtr->signif; - if ( isNaNExtF80UI( uiA64, uiA0 ) ) goto copy; - goto copyB; - } - } - uiB64 = bSPtr->signExp; - returnLargerUIMag: - uiA64 = aSPtr->signExp; - uiMagA64 = uiA64 & 0x7FFF; - uiMagB64 = uiB64 & 0x7FFF; - if ( uiMagA64 < uiMagB64 ) goto copyB; - if ( uiMagB64 < uiMagA64 ) goto copy; - uiA0 = aSPtr->signif; - uiB0 = bSPtr->signif; - if ( uiA0 < uiB0 ) goto copyB; - if ( uiB0 < uiA0 ) goto copy; - if ( uiA64 < uiB64 ) goto copy; - copyB: - sPtr = bSPtr; - copy: - zSPtr->signExp = sPtr->signExp; - zSPtr->signif = sPtr->signif | UINT64_C( 0xC000000000000000 ); - -} - diff --git a/outside/softfloat-3/source/8086/s_propagateNaNExtF80UI.c b/outside/softfloat-3/source/8086/s_propagateNaNExtF80UI.c deleted file mode 100644 index 1e7cf6ed6..000000000 --- a/outside/softfloat-3/source/8086/s_propagateNaNExtF80UI.c +++ /dev/null @@ -1,106 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -/*---------------------------------------------------------------------------- -| Interpreting the unsigned integer formed from concatenating `uiA64' and -| `uiA0' as an 80-bit extended floating-point value, and likewise interpreting -| the unsigned integer formed from concatenating `uiB64' and `uiB0' as another -| 80-bit extended floating-point value, and assuming at least on of these -| floating-point values is a NaN, returns the bit pattern of the combined NaN -| result. If either original floating-point value is a signaling NaN, the -| invalid exception is raised. -*----------------------------------------------------------------------------*/ -struct uint128 - softfloat_propagateNaNExtF80UI( - uint_fast16_t uiA64, - uint_fast64_t uiA0, - uint_fast16_t uiB64, - uint_fast64_t uiB0 - ) -{ - bool isSigNaNA, isSigNaNB; - uint_fast64_t uiNonsigA0, uiNonsigB0; - uint_fast16_t uiMagA64, uiMagB64; - struct uint128 uiZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - isSigNaNA = softfloat_isSigNaNExtF80UI( uiA64, uiA0 ); - isSigNaNB = softfloat_isSigNaNExtF80UI( uiB64, uiB0 ); - /*------------------------------------------------------------------------ - | Make NaNs non-signaling. - *------------------------------------------------------------------------*/ - uiNonsigA0 = uiA0 | UINT64_C( 0xC000000000000000 ); - uiNonsigB0 = uiB0 | UINT64_C( 0xC000000000000000 ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( isSigNaNA | isSigNaNB ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - if ( isSigNaNA ) { - if ( isSigNaNB ) goto returnLargerMag; - if ( isNaNExtF80UI( uiB64, uiB0 ) ) goto returnB; - goto returnA; - } else { - if ( isNaNExtF80UI( uiA64, uiA0 ) ) goto returnA; - goto returnB; - } - } - returnLargerMag: - uiMagA64 = uiA64 & 0x7FFF; - uiMagB64 = uiB64 & 0x7FFF; - if ( uiMagA64 < uiMagB64 ) goto returnB; - if ( uiMagB64 < uiMagA64 ) goto returnA; - if ( uiNonsigA0 < uiNonsigB0 ) goto returnB; - if ( uiNonsigB0 < uiNonsigA0 ) goto returnA; - if ( uiA64 < uiB64 ) goto returnA; - returnB: - uiZ.v64 = uiB64; - uiZ.v0 = uiNonsigB0; - return uiZ; - returnA: - uiZ.v64 = uiA64; - uiZ.v0 = uiNonsigA0; - return uiZ; - -} - diff --git a/outside/softfloat-3/source/8086/s_propagateNaNF128M.c b/outside/softfloat-3/source/8086/s_propagateNaNF128M.c deleted file mode 100644 index c8cf80109..000000000 --- a/outside/softfloat-3/source/8086/s_propagateNaNF128M.c +++ /dev/null @@ -1,108 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -/*---------------------------------------------------------------------------- -| Assuming at least one of the two 128-bit floating-point values pointed to by -| `aWPtr' and `bWPtr' is a NaN, stores the combined NaN result at the location -| pointed to by `zWPtr'. If either original floating-point value is a -| signaling NaN, the invalid exception is raised. Each of `aWPtr', `bWPtr', -| and `zWPtr' points to an array of four 32-bit elements that concatenate in -| the platform's normal endian order to form a 128-bit floating-point value. -*----------------------------------------------------------------------------*/ -void - softfloat_propagateNaNF128M( - const uint32_t *aWPtr, const uint32_t *bWPtr, uint32_t *zWPtr ) -{ - bool isSigNaNA; - const uint32_t *ptr; - bool isSigNaNB; - uint32_t uiA96, uiB96, wordMagA, wordMagB; - - isSigNaNA = f128M_isSignalingNaN( (const float128_t *) aWPtr ); - ptr = aWPtr; - if ( ! bWPtr ) { - if ( isSigNaNA ) softfloat_raiseFlags( softfloat_flag_invalid ); - goto copy; - } - isSigNaNB = f128M_isSignalingNaN( (const float128_t *) bWPtr ); - if ( isSigNaNA | isSigNaNB ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - if ( isSigNaNA ) { - if ( isSigNaNB ) goto returnLargerUIMag; - if ( softfloat_isNaNF128M( bWPtr ) ) goto copyB; - goto copy; - } else { - if ( softfloat_isNaNF128M( aWPtr ) ) goto copy; - goto copyB; - } - } - returnLargerUIMag: - uiA96 = aWPtr[indexWordHi( 4 )]; - uiB96 = bWPtr[indexWordHi( 4 )]; - wordMagA = uiA96 & 0x7FFFFFFF; - wordMagB = uiB96 & 0x7FFFFFFF; - if ( wordMagA < wordMagB ) goto copyB; - if ( wordMagB < wordMagA ) goto copy; - wordMagA = aWPtr[indexWord( 4, 2 )]; - wordMagB = bWPtr[indexWord( 4, 2 )]; - if ( wordMagA < wordMagB ) goto copyB; - if ( wordMagB < wordMagA ) goto copy; - wordMagA = aWPtr[indexWord( 4, 1 )]; - wordMagB = bWPtr[indexWord( 4, 1 )]; - if ( wordMagA < wordMagB ) goto copyB; - if ( wordMagB < wordMagA ) goto copy; - wordMagA = aWPtr[indexWord( 4, 0 )]; - wordMagB = bWPtr[indexWord( 4, 0 )]; - if ( wordMagA < wordMagB ) goto copyB; - if ( wordMagB < wordMagA ) goto copy; - if ( uiA96 < uiB96 ) goto copy; - copyB: - ptr = bWPtr; - copy: - zWPtr[indexWordHi( 4 )] = ptr[indexWordHi( 4 )] | 0x00008000; - zWPtr[indexWord( 4, 2 )] = ptr[indexWord( 4, 2 )]; - zWPtr[indexWord( 4, 1 )] = ptr[indexWord( 4, 1 )]; - zWPtr[indexWord( 4, 0 )] = ptr[indexWord( 4, 0 )]; - -} - diff --git a/outside/softfloat-3/source/8086/s_propagateNaNF128UI.c b/outside/softfloat-3/source/8086/s_propagateNaNF128UI.c deleted file mode 100644 index cf0b27440..000000000 --- a/outside/softfloat-3/source/8086/s_propagateNaNF128UI.c +++ /dev/null @@ -1,105 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -/*---------------------------------------------------------------------------- -| Interpreting the unsigned integer formed from concatenating `uiA64' and -| `uiA0' as a 128-bit floating-point value, and likewise interpreting the -| unsigned integer formed from concatenating `uiB64' and `uiB0' as another -| 128-bit floating-point value, and assuming at least on of these floating- -| point values is a NaN, returns the bit pattern of the combined NaN result. -| If either original floating-point value is a signaling NaN, the invalid -| exception is raised. -*----------------------------------------------------------------------------*/ -struct uint128 - softfloat_propagateNaNF128UI( - uint_fast64_t uiA64, - uint_fast64_t uiA0, - uint_fast64_t uiB64, - uint_fast64_t uiB0 - ) -{ - bool isSigNaNA, isSigNaNB; - uint_fast64_t uiNonsigA64, uiNonsigB64, uiMagA64, uiMagB64; - struct uint128 uiZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - isSigNaNA = softfloat_isSigNaNF128UI( uiA64, uiA0 ); - isSigNaNB = softfloat_isSigNaNF128UI( uiB64, uiB0 ); - /*------------------------------------------------------------------------ - | Make NaNs non-signaling. - *------------------------------------------------------------------------*/ - uiNonsigA64 = uiA64 | UINT64_C( 0x0000800000000000 ); - uiNonsigB64 = uiB64 | UINT64_C( 0x0000800000000000 ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( isSigNaNA | isSigNaNB ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - if ( isSigNaNA ) { - if ( isSigNaNB ) goto returnLargerMag; - if ( isNaNF128UI( uiB64, uiB0 ) ) goto returnB; - goto returnA; - } else { - if ( isNaNF128UI( uiA64, uiA0 ) ) goto returnA; - goto returnB; - } - } - returnLargerMag: - uiMagA64 = uiNonsigA64 & UINT64_C( 0x7FFFFFFFFFFFFFFF ); - uiMagB64 = uiNonsigB64 & UINT64_C( 0x7FFFFFFFFFFFFFFF ); - if ( uiMagA64 < uiMagB64 ) goto returnB; - if ( uiMagB64 < uiMagA64 ) goto returnA; - if ( uiA0 < uiB0 ) goto returnB; - if ( uiB0 < uiA0 ) goto returnA; - if ( uiNonsigA64 < uiNonsigB64 ) goto returnA; - returnB: - uiZ.v64 = uiNonsigB64; - uiZ.v0 = uiB0; - return uiZ; - returnA: - uiZ.v64 = uiNonsigA64; - uiZ.v0 = uiA0; - return uiZ; - -} - diff --git a/outside/softfloat-3/source/8086/s_propagateNaNF16UI.c b/outside/softfloat-3/source/8086/s_propagateNaNF16UI.c deleted file mode 100644 index ddee55fe4..000000000 --- a/outside/softfloat-3/source/8086/s_propagateNaNF16UI.c +++ /dev/null @@ -1,84 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -/*---------------------------------------------------------------------------- -| Interpreting `uiA' and `uiB' as the bit patterns of two 16-bit floating- -| point values, at least one of which is a NaN, returns the bit pattern of -| the combined NaN result. If either `uiA' or `uiB' has the pattern of a -| signaling NaN, the invalid exception is raised. -*----------------------------------------------------------------------------*/ -uint_fast16_t - softfloat_propagateNaNF16UI( uint_fast16_t uiA, uint_fast16_t uiB ) -{ - bool isSigNaNA, isSigNaNB; - uint_fast16_t uiNonsigA, uiNonsigB, uiMagA, uiMagB; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - isSigNaNA = softfloat_isSigNaNF16UI( uiA ); - isSigNaNB = softfloat_isSigNaNF16UI( uiB ); - /*------------------------------------------------------------------------ - | Make NaNs non-signaling. - *------------------------------------------------------------------------*/ - uiNonsigA = uiA | 0x0200; - uiNonsigB = uiB | 0x0200; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( isSigNaNA | isSigNaNB ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - if ( isSigNaNA ) { - if ( isSigNaNB ) goto returnLargerMag; - return isNaNF16UI( uiB ) ? uiNonsigB : uiNonsigA; - } else { - return isNaNF16UI( uiA ) ? uiNonsigA : uiNonsigB; - } - } - returnLargerMag: - uiMagA = uiNonsigA & 0x7FFF; - uiMagB = uiNonsigB & 0x7FFF; - if ( uiMagA < uiMagB ) return uiNonsigB; - if ( uiMagB < uiMagA ) return uiNonsigA; - return (uiNonsigA < uiNonsigB) ? uiNonsigA : uiNonsigB; - -} - diff --git a/outside/softfloat-3/source/8086/s_propagateNaNF32UI.c b/outside/softfloat-3/source/8086/s_propagateNaNF32UI.c deleted file mode 100644 index 3e3ea8d3c..000000000 --- a/outside/softfloat-3/source/8086/s_propagateNaNF32UI.c +++ /dev/null @@ -1,84 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -/*---------------------------------------------------------------------------- -| Interpreting `uiA' and `uiB' as the bit patterns of two 32-bit floating- -| point values, at least one of which is a NaN, returns the bit pattern of -| the combined NaN result. If either `uiA' or `uiB' has the pattern of a -| signaling NaN, the invalid exception is raised. -*----------------------------------------------------------------------------*/ -uint_fast32_t - softfloat_propagateNaNF32UI( uint_fast32_t uiA, uint_fast32_t uiB ) -{ - bool isSigNaNA, isSigNaNB; - uint_fast32_t uiNonsigA, uiNonsigB, uiMagA, uiMagB; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - isSigNaNA = softfloat_isSigNaNF32UI( uiA ); - isSigNaNB = softfloat_isSigNaNF32UI( uiB ); - /*------------------------------------------------------------------------ - | Make NaNs non-signaling. - *------------------------------------------------------------------------*/ - uiNonsigA = uiA | 0x00400000; - uiNonsigB = uiB | 0x00400000; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( isSigNaNA | isSigNaNB ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - if ( isSigNaNA ) { - if ( isSigNaNB ) goto returnLargerMag; - return isNaNF32UI( uiB ) ? uiNonsigB : uiNonsigA; - } else { - return isNaNF32UI( uiA ) ? uiNonsigA : uiNonsigB; - } - } - returnLargerMag: - uiMagA = uiNonsigA & 0x7FFFFFFF; - uiMagB = uiNonsigB & 0x7FFFFFFF; - if ( uiMagA < uiMagB ) return uiNonsigB; - if ( uiMagB < uiMagA ) return uiNonsigA; - return (uiNonsigA < uiNonsigB) ? uiNonsigA : uiNonsigB; - -} - diff --git a/outside/softfloat-3/source/8086/s_propagateNaNF64UI.c b/outside/softfloat-3/source/8086/s_propagateNaNF64UI.c deleted file mode 100644 index faf4bbf7a..000000000 --- a/outside/softfloat-3/source/8086/s_propagateNaNF64UI.c +++ /dev/null @@ -1,84 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -/*---------------------------------------------------------------------------- -| Interpreting `uiA' and `uiB' as the bit patterns of two 64-bit floating- -| point values, at least one of which is a NaN, returns the bit pattern of -| the combined NaN result. If either `uiA' or `uiB' has the pattern of a -| signaling NaN, the invalid exception is raised. -*----------------------------------------------------------------------------*/ -uint_fast64_t - softfloat_propagateNaNF64UI( uint_fast64_t uiA, uint_fast64_t uiB ) -{ - bool isSigNaNA, isSigNaNB; - uint_fast64_t uiNonsigA, uiNonsigB, uiMagA, uiMagB; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - isSigNaNA = softfloat_isSigNaNF64UI( uiA ); - isSigNaNB = softfloat_isSigNaNF64UI( uiB ); - /*------------------------------------------------------------------------ - | Make NaNs non-signaling. - *------------------------------------------------------------------------*/ - uiNonsigA = uiA | UINT64_C( 0x0008000000000000 ); - uiNonsigB = uiB | UINT64_C( 0x0008000000000000 ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( isSigNaNA | isSigNaNB ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - if ( isSigNaNA ) { - if ( isSigNaNB ) goto returnLargerMag; - return isNaNF64UI( uiB ) ? uiNonsigB : uiNonsigA; - } else { - return isNaNF64UI( uiA ) ? uiNonsigA : uiNonsigB; - } - } - returnLargerMag: - uiMagA = uiNonsigA & UINT64_C( 0x7FFFFFFFFFFFFFFF ); - uiMagB = uiNonsigB & UINT64_C( 0x7FFFFFFFFFFFFFFF ); - if ( uiMagA < uiMagB ) return uiNonsigB; - if ( uiMagB < uiMagA ) return uiNonsigA; - return (uiNonsigA < uiNonsigB) ? uiNonsigA : uiNonsigB; - -} - diff --git a/outside/softfloat-3/source/8086/softfloat_raiseFlags.c b/outside/softfloat-3/source/8086/softfloat_raiseFlags.c deleted file mode 100644 index f480e72a9..000000000 --- a/outside/softfloat-3/source/8086/softfloat_raiseFlags.c +++ /dev/null @@ -1,52 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include "platform.h" -#include "softfloat.h" - -/*---------------------------------------------------------------------------- -| Raises the exceptions specified by `flags'. Floating-point traps can be -| defined here if desired. It is currently not possible for such a trap -| to substitute a result value. If traps are not implemented, this routine -| should be simply `softfloat_exceptionFlags |= flags;'. -*----------------------------------------------------------------------------*/ -void softfloat_raiseFlags( uint_fast8_t flags ) -{ - - softfloat_exceptionFlags |= flags; - -} - diff --git a/outside/softfloat-3/source/8086/specialize.h b/outside/softfloat-3/source/8086/specialize.h deleted file mode 100644 index d205ae021..000000000 --- a/outside/softfloat-3/source/8086/specialize.h +++ /dev/null @@ -1,375 +0,0 @@ - -/*============================================================================ - -This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#ifndef specialize_h -#define specialize_h 1 - -#include -#include -#include "softfloat_types.h" - -/*---------------------------------------------------------------------------- -| Default value for `softfloat_detectTininess'. -*----------------------------------------------------------------------------*/ -#define init_detectTininess softfloat_tininess_afterRounding - -/*---------------------------------------------------------------------------- -| The values to return on conversions to 32-bit integer formats that raise an -| invalid exception. -*----------------------------------------------------------------------------*/ -#define ui32_fromPosOverflow 0xFFFFFFFF -#define ui32_fromNegOverflow 0 -#define ui32_fromNaN 0xFFFFFFFF -#define i32_fromPosOverflow 0x7FFFFFFF -#define i32_fromNegOverflow (-0x7FFFFFFF - 1) -#define i32_fromNaN 0x7FFFFFFF - -/*---------------------------------------------------------------------------- -| The values to return on conversions to 64-bit integer formats that raise an -| invalid exception. -*----------------------------------------------------------------------------*/ -#define ui64_fromPosOverflow UINT64_C( 0xFFFFFFFFFFFFFFFF ) -#define ui64_fromNegOverflow 0 -#define ui64_fromNaN UINT64_C( 0xFFFFFFFFFFFFFFFF ) -#define i64_fromPosOverflow UINT64_C( 0x7FFFFFFFFFFFFFFF ) -#define i64_fromNegOverflow (-UINT64_C( 0x7FFFFFFFFFFFFFFF ) - 1) -#define i64_fromNaN UINT64_C( 0x7FFFFFFFFFFFFFFF ) - -/*---------------------------------------------------------------------------- -| "Common NaN" structure, used to transfer NaN representations from one format -| to another. -*----------------------------------------------------------------------------*/ -struct commonNaN { - bool sign; -#ifdef LITTLEENDIAN - uint64_t v0, v64; -#else - uint64_t v64, v0; -#endif -}; - -/*---------------------------------------------------------------------------- -| The bit pattern for a default generated 16-bit floating-point NaN. -*----------------------------------------------------------------------------*/ -#define defaultNaNF16UI 0xFE00 - -/*---------------------------------------------------------------------------- -| Returns true when 16-bit unsigned integer `uiA' has the bit pattern of a -| 16-bit floating-point signaling NaN. -| Note: This macro evaluates its argument more than once. -*----------------------------------------------------------------------------*/ -#define softfloat_isSigNaNF16UI( uiA ) ((((uiA) & 0x7E00) == 0x7C00) && ((uiA) & 0x01FF)) - -/*---------------------------------------------------------------------------- -| Assuming `uiA' has the bit pattern of a 16-bit floating-point NaN, converts -| this NaN to the common NaN form, and stores the resulting common NaN at the -| location pointed to by `zPtr'. If the NaN is a signaling NaN, the invalid -| exception is raised. -*----------------------------------------------------------------------------*/ -void softfloat_f16UIToCommonNaN( uint_fast16_t uiA, struct commonNaN *zPtr ); - -/*---------------------------------------------------------------------------- -| Converts the common NaN pointed to by `aPtr' into a 16-bit floating-point -| NaN, and returns the bit pattern of this value as an unsigned integer. -*----------------------------------------------------------------------------*/ -uint_fast16_t softfloat_commonNaNToF16UI( const struct commonNaN *aPtr ); - -/*---------------------------------------------------------------------------- -| Interpreting `uiA' and `uiB' as the bit patterns of two 16-bit floating- -| point values, at least one of which is a NaN, returns the bit pattern of -| the combined NaN result. If either `uiA' or `uiB' has the pattern of a -| signaling NaN, the invalid exception is raised. -*----------------------------------------------------------------------------*/ -uint_fast16_t - softfloat_propagateNaNF16UI( uint_fast16_t uiA, uint_fast16_t uiB ); - -/*---------------------------------------------------------------------------- -| The bit pattern for a default generated 32-bit floating-point NaN. -*----------------------------------------------------------------------------*/ -#define defaultNaNF32UI 0xFFC00000 - -/*---------------------------------------------------------------------------- -| Returns true when 32-bit unsigned integer `uiA' has the bit pattern of a -| 32-bit floating-point signaling NaN. -| Note: This macro evaluates its argument more than once. -*----------------------------------------------------------------------------*/ -#define softfloat_isSigNaNF32UI( uiA ) ((((uiA) & 0x7FC00000) == 0x7F800000) && ((uiA) & 0x003FFFFF)) - -/*---------------------------------------------------------------------------- -| Assuming `uiA' has the bit pattern of a 32-bit floating-point NaN, converts -| this NaN to the common NaN form, and stores the resulting common NaN at the -| location pointed to by `zPtr'. If the NaN is a signaling NaN, the invalid -| exception is raised. -*----------------------------------------------------------------------------*/ -void softfloat_f32UIToCommonNaN( uint_fast32_t uiA, struct commonNaN *zPtr ); - -/*---------------------------------------------------------------------------- -| Converts the common NaN pointed to by `aPtr' into a 32-bit floating-point -| NaN, and returns the bit pattern of this value as an unsigned integer. -*----------------------------------------------------------------------------*/ -uint_fast32_t softfloat_commonNaNToF32UI( const struct commonNaN *aPtr ); - -/*---------------------------------------------------------------------------- -| Interpreting `uiA' and `uiB' as the bit patterns of two 32-bit floating- -| point values, at least one of which is a NaN, returns the bit pattern of -| the combined NaN result. If either `uiA' or `uiB' has the pattern of a -| signaling NaN, the invalid exception is raised. -*----------------------------------------------------------------------------*/ -uint_fast32_t - softfloat_propagateNaNF32UI( uint_fast32_t uiA, uint_fast32_t uiB ); - -/*---------------------------------------------------------------------------- -| The bit pattern for a default generated 64-bit floating-point NaN. -*----------------------------------------------------------------------------*/ -#define defaultNaNF64UI UINT64_C( 0xFFF8000000000000 ) - -/*---------------------------------------------------------------------------- -| Returns true when 64-bit unsigned integer `uiA' has the bit pattern of a -| 64-bit floating-point signaling NaN. -| Note: This macro evaluates its argument more than once. -*----------------------------------------------------------------------------*/ -#define softfloat_isSigNaNF64UI( uiA ) ((((uiA) & UINT64_C( 0x7FF8000000000000 )) == UINT64_C( 0x7FF0000000000000 )) && ((uiA) & UINT64_C( 0x0007FFFFFFFFFFFF ))) - -/*---------------------------------------------------------------------------- -| Assuming `uiA' has the bit pattern of a 64-bit floating-point NaN, converts -| this NaN to the common NaN form, and stores the resulting common NaN at the -| location pointed to by `zPtr'. If the NaN is a signaling NaN, the invalid -| exception is raised. -*----------------------------------------------------------------------------*/ -void softfloat_f64UIToCommonNaN( uint_fast64_t uiA, struct commonNaN *zPtr ); - -/*---------------------------------------------------------------------------- -| Converts the common NaN pointed to by `aPtr' into a 64-bit floating-point -| NaN, and returns the bit pattern of this value as an unsigned integer. -*----------------------------------------------------------------------------*/ -uint_fast64_t softfloat_commonNaNToF64UI( const struct commonNaN *aPtr ); - -/*---------------------------------------------------------------------------- -| Interpreting `uiA' and `uiB' as the bit patterns of two 64-bit floating- -| point values, at least one of which is a NaN, returns the bit pattern of -| the combined NaN result. If either `uiA' or `uiB' has the pattern of a -| signaling NaN, the invalid exception is raised. -*----------------------------------------------------------------------------*/ -uint_fast64_t - softfloat_propagateNaNF64UI( uint_fast64_t uiA, uint_fast64_t uiB ); - -/*---------------------------------------------------------------------------- -| The bit pattern for a default generated 80-bit extended floating-point NaN. -*----------------------------------------------------------------------------*/ -#define defaultNaNExtF80UI64 0xFFFF -#define defaultNaNExtF80UI0 UINT64_C( 0xC000000000000000 ) - -/*---------------------------------------------------------------------------- -| Returns true when the 80-bit unsigned integer formed from concatenating -| 16-bit `uiA64' and 64-bit `uiA0' has the bit pattern of an 80-bit extended -| floating-point signaling NaN. -| Note: This macro evaluates its arguments more than once. -*----------------------------------------------------------------------------*/ -#define softfloat_isSigNaNExtF80UI( uiA64, uiA0 ) ((((uiA64) & 0x7FFF) == 0x7FFF) && ! ((uiA0) & UINT64_C( 0x4000000000000000 )) && ((uiA0) & UINT64_C( 0x3FFFFFFFFFFFFFFF ))) - -#ifdef SOFTFLOAT_FAST_INT64 - -/*---------------------------------------------------------------------------- -| The following functions are needed only when `SOFTFLOAT_FAST_INT64' is -| defined. -*----------------------------------------------------------------------------*/ - -/*---------------------------------------------------------------------------- -| Assuming the unsigned integer formed from concatenating `uiA64' and `uiA0' -| has the bit pattern of an 80-bit extended floating-point NaN, converts -| this NaN to the common NaN form, and stores the resulting common NaN at the -| location pointed to by `zPtr'. If the NaN is a signaling NaN, the invalid -| exception is raised. -*----------------------------------------------------------------------------*/ -void - softfloat_extF80UIToCommonNaN( - uint_fast16_t uiA64, uint_fast64_t uiA0, struct commonNaN *zPtr ); - -/*---------------------------------------------------------------------------- -| Converts the common NaN pointed to by `aPtr' into an 80-bit extended -| floating-point NaN, and returns the bit pattern of this value as an unsigned -| integer. -*----------------------------------------------------------------------------*/ -struct uint128 softfloat_commonNaNToExtF80UI( const struct commonNaN *aPtr ); - -/*---------------------------------------------------------------------------- -| Interpreting the unsigned integer formed from concatenating `uiA64' and -| `uiA0' as an 80-bit extended floating-point value, and likewise interpreting -| the unsigned integer formed from concatenating `uiB64' and `uiB0' as another -| 80-bit extended floating-point value, and assuming at least on of these -| floating-point values is a NaN, returns the bit pattern of the combined NaN -| result. If either original floating-point value is a signaling NaN, the -| invalid exception is raised. -*----------------------------------------------------------------------------*/ -struct uint128 - softfloat_propagateNaNExtF80UI( - uint_fast16_t uiA64, - uint_fast64_t uiA0, - uint_fast16_t uiB64, - uint_fast64_t uiB0 - ); - -/*---------------------------------------------------------------------------- -| The bit pattern for a default generated 128-bit floating-point NaN. -*----------------------------------------------------------------------------*/ -#define defaultNaNF128UI64 UINT64_C( 0xFFFF800000000000 ) -#define defaultNaNF128UI0 UINT64_C( 0 ) - -/*---------------------------------------------------------------------------- -| Returns true when the 128-bit unsigned integer formed from concatenating -| 64-bit `uiA64' and 64-bit `uiA0' has the bit pattern of a 128-bit floating- -| point signaling NaN. -| Note: This macro evaluates its arguments more than once. -*----------------------------------------------------------------------------*/ -#define softfloat_isSigNaNF128UI( uiA64, uiA0 ) ((((uiA64) & UINT64_C( 0x7FFF800000000000 )) == UINT64_C( 0x7FFF000000000000 )) && ((uiA0) || ((uiA64) & UINT64_C( 0x00007FFFFFFFFFFF )))) - -/*---------------------------------------------------------------------------- -| Assuming the unsigned integer formed from concatenating `uiA64' and `uiA0' -| has the bit pattern of a 128-bit floating-point NaN, converts this NaN to -| the common NaN form, and stores the resulting common NaN at the location -| pointed to by `zPtr'. If the NaN is a signaling NaN, the invalid exception -| is raised. -*----------------------------------------------------------------------------*/ -void - softfloat_f128UIToCommonNaN( - uint_fast64_t uiA64, uint_fast64_t uiA0, struct commonNaN *zPtr ); - -/*---------------------------------------------------------------------------- -| Converts the common NaN pointed to by `aPtr' into a 128-bit floating-point -| NaN, and returns the bit pattern of this value as an unsigned integer. -*----------------------------------------------------------------------------*/ -struct uint128 softfloat_commonNaNToF128UI( const struct commonNaN * ); - -/*---------------------------------------------------------------------------- -| Interpreting the unsigned integer formed from concatenating `uiA64' and -| `uiA0' as a 128-bit floating-point value, and likewise interpreting the -| unsigned integer formed from concatenating `uiB64' and `uiB0' as another -| 128-bit floating-point value, and assuming at least on of these floating- -| point values is a NaN, returns the bit pattern of the combined NaN result. -| If either original floating-point value is a signaling NaN, the invalid -| exception is raised. -*----------------------------------------------------------------------------*/ -struct uint128 - softfloat_propagateNaNF128UI( - uint_fast64_t uiA64, - uint_fast64_t uiA0, - uint_fast64_t uiB64, - uint_fast64_t uiB0 - ); - -#else - -/*---------------------------------------------------------------------------- -| The following functions are needed only when `SOFTFLOAT_FAST_INT64' is not -| defined. -*----------------------------------------------------------------------------*/ - -/*---------------------------------------------------------------------------- -| Assuming the 80-bit extended floating-point value pointed to by `aSPtr' is -| a NaN, converts this NaN to the common NaN form, and stores the resulting -| common NaN at the location pointed to by `zPtr'. If the NaN is a signaling -| NaN, the invalid exception is raised. -*----------------------------------------------------------------------------*/ -void - softfloat_extF80MToCommonNaN( - const struct extFloat80M *aSPtr, struct commonNaN *zPtr ); - -/*---------------------------------------------------------------------------- -| Converts the common NaN pointed to by `aPtr' into an 80-bit extended -| floating-point NaN, and stores this NaN at the location pointed to by -| `zSPtr'. -*----------------------------------------------------------------------------*/ -void - softfloat_commonNaNToExtF80M( - const struct commonNaN *aPtr, struct extFloat80M *zSPtr ); - -/*---------------------------------------------------------------------------- -| Assuming at least one of the two 80-bit extended floating-point values -| pointed to by `aSPtr' and `bSPtr' is a NaN, stores the combined NaN result -| at the location pointed to by `zSPtr'. If either original floating-point -| value is a signaling NaN, the invalid exception is raised. -*----------------------------------------------------------------------------*/ -void - softfloat_propagateNaNExtF80M( - const struct extFloat80M *aSPtr, - const struct extFloat80M *bSPtr, - struct extFloat80M *zSPtr - ); - -/*---------------------------------------------------------------------------- -| The bit pattern for a default generated 128-bit floating-point NaN. -*----------------------------------------------------------------------------*/ -#define defaultNaNF128UI96 0xFFFF8000 -#define defaultNaNF128UI64 0 -#define defaultNaNF128UI32 0 -#define defaultNaNF128UI0 0 - -/*---------------------------------------------------------------------------- -| Assuming the 128-bit floating-point value pointed to by `aWPtr' is a NaN, -| converts this NaN to the common NaN form, and stores the resulting common -| NaN at the location pointed to by `zPtr'. If the NaN is a signaling NaN, -| the invalid exception is raised. Argument `aWPtr' points to an array of -| four 32-bit elements that concatenate in the platform's normal endian order -| to form a 128-bit floating-point value. -*----------------------------------------------------------------------------*/ -void - softfloat_f128MToCommonNaN( const uint32_t *aWPtr, struct commonNaN *zPtr ); - -/*---------------------------------------------------------------------------- -| Converts the common NaN pointed to by `aPtr' into a 128-bit floating-point -| NaN, and stores this NaN at the location pointed to by `zWPtr'. Argument -| `zWPtr' points to an array of four 32-bit elements that concatenate in the -| platform's normal endian order to form a 128-bit floating-point value. -*----------------------------------------------------------------------------*/ -void - softfloat_commonNaNToF128M( const struct commonNaN *aPtr, uint32_t *zWPtr ); - -/*---------------------------------------------------------------------------- -| Assuming at least one of the two 128-bit floating-point values pointed to by -| `aWPtr' and `bWPtr' is a NaN, stores the combined NaN result at the location -| pointed to by `zWPtr'. If either original floating-point value is a -| signaling NaN, the invalid exception is raised. Each of `aWPtr', `bWPtr', -| and `zWPtr' points to an array of four 32-bit elements that concatenate in -| the platform's normal endian order to form a 128-bit floating-point value. -*----------------------------------------------------------------------------*/ -void - softfloat_propagateNaNF128M( - const uint32_t *aWPtr, const uint32_t *bWPtr, uint32_t *zWPtr ); - -#endif - -#endif - diff --git a/outside/softfloat-3/source/extF80M_add.c b/outside/softfloat-3/source/extF80M_add.c deleted file mode 100644 index 2e2eaa918..000000000 --- a/outside/softfloat-3/source/extF80M_add.c +++ /dev/null @@ -1,100 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -void - extF80M_add( - const extFloat80_t *aPtr, const extFloat80_t *bPtr, extFloat80_t *zPtr ) -{ - const struct extFloat80M *aSPtr, *bSPtr; - uint_fast16_t uiA64; - uint_fast64_t uiA0; - bool signA; - uint_fast16_t uiB64; - uint_fast64_t uiB0; - bool signB; -#if ! defined INLINE_LEVEL || (INLINE_LEVEL < 2) - extFloat80_t - (*magsFuncPtr)( - uint_fast16_t, uint_fast64_t, uint_fast16_t, uint_fast64_t, bool ); -#endif - - aSPtr = (const struct extFloat80M *) aPtr; - bSPtr = (const struct extFloat80M *) bPtr; - uiA64 = aSPtr->signExp; - uiA0 = aSPtr->signif; - signA = signExtF80UI64( uiA64 ); - uiB64 = bSPtr->signExp; - uiB0 = bSPtr->signif; - signB = signExtF80UI64( uiB64 ); -#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL) - if ( signA == signB ) { - *zPtr = softfloat_addMagsExtF80( uiA64, uiA0, uiB64, uiB0, signA ); - } else { - *zPtr = softfloat_subMagsExtF80( uiA64, uiA0, uiB64, uiB0, signA ); - } -#else - magsFuncPtr = - (signA == signB) ? softfloat_addMagsExtF80 : softfloat_subMagsExtF80; - *zPtr = (*magsFuncPtr)( uiA64, uiA0, uiB64, uiB0, signA ); -#endif - -} - -#else - -void - extF80M_add( - const extFloat80_t *aPtr, const extFloat80_t *bPtr, extFloat80_t *zPtr ) -{ - - softfloat_addExtF80M( - (const struct extFloat80M *) aPtr, - (const struct extFloat80M *) bPtr, - (struct extFloat80M *) zPtr, - false - ); - -} - -#endif - diff --git a/outside/softfloat-3/source/extF80M_div.c b/outside/softfloat-3/source/extF80M_div.c deleted file mode 100644 index 58b63351e..000000000 --- a/outside/softfloat-3/source/extF80M_div.c +++ /dev/null @@ -1,194 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -void - extF80M_div( - const extFloat80_t *aPtr, const extFloat80_t *bPtr, extFloat80_t *zPtr ) -{ - - *zPtr = extF80_div( *aPtr, *bPtr ); - -} - -#else - -void - extF80M_div( - const extFloat80_t *aPtr, const extFloat80_t *bPtr, extFloat80_t *zPtr ) -{ - const struct extFloat80M *aSPtr, *bSPtr; - struct extFloat80M *zSPtr; - uint_fast16_t uiA64; - int32_t expA; - uint_fast16_t uiB64; - int32_t expB; - bool signZ; - uint64_t sigA, x64; - int32_t expZ; - int shiftDist; - uint32_t y[3], recip32, sigB[3]; - int ix; - uint32_t q, qs[2]; - uint_fast16_t uiZ64; - uint64_t uiZ0; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - aSPtr = (const struct extFloat80M *) aPtr; - bSPtr = (const struct extFloat80M *) bPtr; - zSPtr = (struct extFloat80M *) zPtr; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiA64 = aSPtr->signExp; - expA = expExtF80UI64( uiA64 ); - uiB64 = bSPtr->signExp; - expB = expExtF80UI64( uiB64 ); - signZ = signExtF80UI64( uiA64 ) ^ signExtF80UI64( uiB64 ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( (expA == 0x7FFF) || (expB == 0x7FFF) ) { - if ( softfloat_tryPropagateNaNExtF80M( aSPtr, bSPtr, zSPtr ) ) return; - if ( expA == 0x7FFF ) { - if ( expB == 0x7FFF ) goto invalid; - goto infinity; - } - goto zero; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sigA = aSPtr->signif; - x64 = bSPtr->signif; - if ( ! expB ) expB = 1; - if ( ! (x64 & UINT64_C( 0x8000000000000000 )) ) { - if ( ! x64 ) { - if ( ! sigA ) goto invalid; - softfloat_raiseFlags( softfloat_flag_infinite ); - goto infinity; - } - expB += softfloat_normExtF80SigM( &x64 ); - } - if ( ! expA ) expA = 1; - if ( ! (sigA & UINT64_C( 0x8000000000000000 )) ) { - if ( ! sigA ) goto zero; - expA += softfloat_normExtF80SigM( &sigA ); - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expZ = expA - expB + 0x3FFF; - shiftDist = 29; - if ( sigA < x64 ) { - --expZ; - shiftDist = 30; - } - softfloat_shortShiftLeft64To96M( sigA, shiftDist, y ); - recip32 = softfloat_approxRecip32_1( x64>>32 ); - sigB[indexWord( 3, 0 )] = (uint32_t) x64<<30; - x64 >>= 2; - sigB[indexWord( 3, 2 )] = x64>>32; - sigB[indexWord( 3, 1 )] = x64; - ix = 2; - for (;;) { - x64 = (uint64_t) y[indexWordHi( 3 )] * recip32; - q = (x64 + 0x80000000)>>32; - --ix; - if ( ix < 0 ) break; - softfloat_remStep96MBy32( y, 29, sigB, q, y ); - if ( y[indexWordHi( 3 )] & 0x80000000 ) { - --q; - softfloat_add96M( y, sigB, y ); - } - qs[ix] = q; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ((q + 1) & 0x3FFFFF) < 2 ) { - softfloat_remStep96MBy32( y, 29, sigB, q, y ); - if ( y[indexWordHi( 3 )] & 0x80000000 ) { - --q; - softfloat_add96M( y, sigB, y ); - } else if ( softfloat_compare96M( sigB, y ) <= 0 ) { - ++q; - softfloat_sub96M( y, sigB, y ); - } - if ( - y[indexWordLo( 3 )] || y[indexWord( 3, 1 )] || y[indexWord( 3, 2 )] - ) { - q |= 1; - } - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - x64 = (uint64_t) q<<9; - y[indexWord( 3, 0 )] = x64; - x64 = ((uint64_t) qs[0]<<6) + (x64>>32); - y[indexWord( 3, 1 )] = x64; - y[indexWord( 3, 2 )] = (qs[1]<<3) + (x64>>32); - softfloat_roundPackMToExtF80M( - signZ, expZ, y, extF80_roundingPrecision, zSPtr ); - return; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - invalid: - softfloat_invalidExtF80M( zSPtr ); - return; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - infinity: - uiZ64 = packToExtF80UI64( signZ, 0x7FFF ); - uiZ0 = UINT64_C( 0x8000000000000000 ); - goto uiZ; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - zero: - uiZ64 = packToExtF80UI64( signZ, 0 ); - uiZ0 = 0; - uiZ: - zSPtr->signExp = uiZ64; - zSPtr->signif = uiZ0; - -} - -#endif - diff --git a/outside/softfloat-3/source/extF80M_eq.c b/outside/softfloat-3/source/extF80M_eq.c deleted file mode 100644 index d91170dc2..000000000 --- a/outside/softfloat-3/source/extF80M_eq.c +++ /dev/null @@ -1,98 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -bool extF80M_eq( const extFloat80_t *aPtr, const extFloat80_t *bPtr ) -{ - - return extF80_eq( *aPtr, *bPtr ); - -} - -#else - -bool extF80M_eq( const extFloat80_t *aPtr, const extFloat80_t *bPtr ) -{ - const struct extFloat80M *aSPtr, *bSPtr; - uint_fast16_t uiA64; - uint64_t uiA0; - uint_fast16_t uiB64; - uint64_t uiB0; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - aSPtr = (const struct extFloat80M *) aPtr; - bSPtr = (const struct extFloat80M *) bPtr; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiA64 = aSPtr->signExp; - uiA0 = aSPtr->signif; - uiB64 = bSPtr->signExp; - uiB0 = bSPtr->signif; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( isNaNExtF80UI( uiA64, uiA0 ) || isNaNExtF80UI( uiB64, uiB0 ) ) { - if ( - softfloat_isSigNaNExtF80UI( uiA64, uiA0 ) - || softfloat_isSigNaNExtF80UI( uiB64, uiB0 ) - ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - } - return false; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( uiA0 == uiB0 ) { - return (uiA64 == uiB64) || ! uiA0; - } else { - if ( ! ((uiA0 & uiB0) & UINT64_C( 0x8000000000000000 )) ) { - return ! softfloat_compareNonnormExtF80M( aSPtr, bSPtr ); - } - return false; - } - -} - -#endif - diff --git a/outside/softfloat-3/source/extF80M_eq_signaling.c b/outside/softfloat-3/source/extF80M_eq_signaling.c deleted file mode 100644 index 9836dbff1..000000000 --- a/outside/softfloat-3/source/extF80M_eq_signaling.c +++ /dev/null @@ -1,92 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -bool extF80M_eq_signaling( const extFloat80_t *aPtr, const extFloat80_t *bPtr ) -{ - - return extF80_eq_signaling( *aPtr, *bPtr ); - -} - -#else - -bool extF80M_eq_signaling( const extFloat80_t *aPtr, const extFloat80_t *bPtr ) -{ - const struct extFloat80M *aSPtr, *bSPtr; - uint_fast16_t uiA64; - uint64_t uiA0; - uint_fast16_t uiB64; - uint64_t uiB0; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - aSPtr = (const struct extFloat80M *) aPtr; - bSPtr = (const struct extFloat80M *) bPtr; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiA64 = aSPtr->signExp; - uiA0 = aSPtr->signif; - uiB64 = bSPtr->signExp; - uiB0 = bSPtr->signif; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( isNaNExtF80UI( uiA64, uiA0 ) || isNaNExtF80UI( uiB64, uiB0 ) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - return false; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( uiA0 == uiB0 ) { - return (uiA64 == uiB64) || ! uiA0; - } else { - if ( ! ((uiA0 & uiB0) & UINT64_C( 0x8000000000000000 )) ) { - return ! softfloat_compareNonnormExtF80M( aSPtr, bSPtr ); - } - return false; - } - -} - -#endif - diff --git a/outside/softfloat-3/source/extF80M_le.c b/outside/softfloat-3/source/extF80M_le.c deleted file mode 100644 index eac58e857..000000000 --- a/outside/softfloat-3/source/extF80M_le.c +++ /dev/null @@ -1,106 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -bool extF80M_le( const extFloat80_t *aPtr, const extFloat80_t *bPtr ) -{ - - return extF80_le( *aPtr, *bPtr ); - -} - -#else - -bool extF80M_le( const extFloat80_t *aPtr, const extFloat80_t *bPtr ) -{ - const struct extFloat80M *aSPtr, *bSPtr; - uint_fast16_t uiA64; - uint64_t uiA0; - uint_fast16_t uiB64; - uint64_t uiB0; - bool signA, ltMags; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - aSPtr = (const struct extFloat80M *) aPtr; - bSPtr = (const struct extFloat80M *) bPtr; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiA64 = aSPtr->signExp; - uiA0 = aSPtr->signif; - uiB64 = bSPtr->signExp; - uiB0 = bSPtr->signif; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( isNaNExtF80UI( uiA64, uiA0 ) || isNaNExtF80UI( uiB64, uiB0 ) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - return false; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - signA = signExtF80UI64( uiA64 ); - if ( (uiA64 ^ uiB64) & 0x8000 ) { - /*-------------------------------------------------------------------- - | Signs are different. - *--------------------------------------------------------------------*/ - return signA || ! (uiA0 | uiB0); - } else { - /*-------------------------------------------------------------------- - | Signs are the same. - *--------------------------------------------------------------------*/ - if ( ! ((uiA0 & uiB0) & UINT64_C( 0x8000000000000000 )) ) { - return (softfloat_compareNonnormExtF80M( aSPtr, bSPtr ) <= 0); - } - if ( uiA64 == uiB64 ) { - if ( uiA0 == uiB0 ) return true; - ltMags = (uiA0 < uiB0); - } else { - ltMags = (uiA64 < uiB64); - } - return signA ^ ltMags; - } - -} - -#endif - diff --git a/outside/softfloat-3/source/extF80M_le_quiet.c b/outside/softfloat-3/source/extF80M_le_quiet.c deleted file mode 100644 index 92d0b6c23..000000000 --- a/outside/softfloat-3/source/extF80M_le_quiet.c +++ /dev/null @@ -1,112 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -bool extF80M_le_quiet( const extFloat80_t *aPtr, const extFloat80_t *bPtr ) -{ - - return extF80_le_quiet( *aPtr, *bPtr ); - -} - -#else - -bool extF80M_le_quiet( const extFloat80_t *aPtr, const extFloat80_t *bPtr ) -{ - const struct extFloat80M *aSPtr, *bSPtr; - uint_fast16_t uiA64; - uint64_t uiA0; - uint_fast16_t uiB64; - uint64_t uiB0; - bool signA, ltMags; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - aSPtr = (const struct extFloat80M *) aPtr; - bSPtr = (const struct extFloat80M *) bPtr; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiA64 = aSPtr->signExp; - uiA0 = aSPtr->signif; - uiB64 = bSPtr->signExp; - uiB0 = bSPtr->signif; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( isNaNExtF80UI( uiA64, uiA0 ) || isNaNExtF80UI( uiB64, uiB0 ) ) { - if ( - softfloat_isSigNaNExtF80UI( uiA64, uiA0 ) - || softfloat_isSigNaNExtF80UI( uiB64, uiB0 ) - ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - } - return false; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - signA = signExtF80UI64( uiA64 ); - if ( (uiA64 ^ uiB64) & 0x8000 ) { - /*-------------------------------------------------------------------- - | Signs are different. - *--------------------------------------------------------------------*/ - return signA || ! (uiA0 | uiB0); - } else { - /*-------------------------------------------------------------------- - | Signs are the same. - *--------------------------------------------------------------------*/ - if ( ! ((uiA0 & uiB0) & UINT64_C( 0x8000000000000000 )) ) { - return (softfloat_compareNonnormExtF80M( aSPtr, bSPtr ) <= 0); - } - if ( uiA64 == uiB64 ) { - if ( uiA0 == uiB0 ) return true; - ltMags = (uiA0 < uiB0); - } else { - ltMags = (uiA64 < uiB64); - } - return signA ^ ltMags; - } - -} - -#endif - diff --git a/outside/softfloat-3/source/extF80M_lt.c b/outside/softfloat-3/source/extF80M_lt.c deleted file mode 100644 index bb15cf5b5..000000000 --- a/outside/softfloat-3/source/extF80M_lt.c +++ /dev/null @@ -1,106 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -bool extF80M_lt( const extFloat80_t *aPtr, const extFloat80_t *bPtr ) -{ - - return extF80_lt( *aPtr, *bPtr ); - -} - -#else - -bool extF80M_lt( const extFloat80_t *aPtr, const extFloat80_t *bPtr ) -{ - const struct extFloat80M *aSPtr, *bSPtr; - uint_fast16_t uiA64; - uint64_t uiA0; - uint_fast16_t uiB64; - uint64_t uiB0; - bool signA, ltMags; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - aSPtr = (const struct extFloat80M *) aPtr; - bSPtr = (const struct extFloat80M *) bPtr; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiA64 = aSPtr->signExp; - uiA0 = aSPtr->signif; - uiB64 = bSPtr->signExp; - uiB0 = bSPtr->signif; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( isNaNExtF80UI( uiA64, uiA0 ) || isNaNExtF80UI( uiB64, uiB0 ) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - return false; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - signA = signExtF80UI64( uiA64 ); - if ( (uiA64 ^ uiB64) & 0x8000 ) { - /*-------------------------------------------------------------------- - | Signs are different. - *--------------------------------------------------------------------*/ - return signA && ((uiA0 | uiB0) != 0); - } else { - /*-------------------------------------------------------------------- - | Signs are the same. - *--------------------------------------------------------------------*/ - if ( ! ((uiA0 & uiB0) & UINT64_C( 0x8000000000000000 )) ) { - return (softfloat_compareNonnormExtF80M( aSPtr, bSPtr ) < 0); - } - if ( uiA64 == uiB64 ) { - if ( uiA0 == uiB0 ) return false; - ltMags = (uiA0 < uiB0); - } else { - ltMags = (uiA64 < uiB64); - } - return signA ^ ltMags; - } - -} - -#endif - diff --git a/outside/softfloat-3/source/extF80M_lt_quiet.c b/outside/softfloat-3/source/extF80M_lt_quiet.c deleted file mode 100644 index 2407124d7..000000000 --- a/outside/softfloat-3/source/extF80M_lt_quiet.c +++ /dev/null @@ -1,112 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -bool extF80M_lt_quiet( const extFloat80_t *aPtr, const extFloat80_t *bPtr ) -{ - - return extF80_lt_quiet( *aPtr, *bPtr ); - -} - -#else - -bool extF80M_lt_quiet( const extFloat80_t *aPtr, const extFloat80_t *bPtr ) -{ - const struct extFloat80M *aSPtr, *bSPtr; - uint_fast16_t uiA64; - uint64_t uiA0; - uint_fast16_t uiB64; - uint64_t uiB0; - bool signA, ltMags; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - aSPtr = (const struct extFloat80M *) aPtr; - bSPtr = (const struct extFloat80M *) bPtr; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiA64 = aSPtr->signExp; - uiA0 = aSPtr->signif; - uiB64 = bSPtr->signExp; - uiB0 = bSPtr->signif; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( isNaNExtF80UI( uiA64, uiA0 ) || isNaNExtF80UI( uiB64, uiB0 ) ) { - if ( - softfloat_isSigNaNExtF80UI( uiA64, uiA0 ) - || softfloat_isSigNaNExtF80UI( uiB64, uiB0 ) - ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - } - return false; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - signA = signExtF80UI64( uiA64 ); - if ( (uiA64 ^ uiB64) & 0x8000 ) { - /*-------------------------------------------------------------------- - | Signs are different. - *--------------------------------------------------------------------*/ - return signA && ((uiA0 | uiB0) != 0); - } else { - /*-------------------------------------------------------------------- - | Signs are the same. - *--------------------------------------------------------------------*/ - if ( ! ((uiA0 & uiB0) & UINT64_C( 0x8000000000000000 )) ) { - return (softfloat_compareNonnormExtF80M( aSPtr, bSPtr ) < 0); - } - if ( uiA64 == uiB64 ) { - if ( uiA0 == uiB0 ) return false; - ltMags = (uiA0 < uiB0); - } else { - ltMags = (uiA64 < uiB64); - } - return signA ^ ltMags; - } - -} - -#endif - diff --git a/outside/softfloat-3/source/extF80M_mul.c b/outside/softfloat-3/source/extF80M_mul.c deleted file mode 100644 index 526192de9..000000000 --- a/outside/softfloat-3/source/extF80M_mul.c +++ /dev/null @@ -1,139 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -void - extF80M_mul( - const extFloat80_t *aPtr, const extFloat80_t *bPtr, extFloat80_t *zPtr ) -{ - - *zPtr = extF80_mul( *aPtr, *bPtr ); - -} - -#else - -void - extF80M_mul( - const extFloat80_t *aPtr, const extFloat80_t *bPtr, extFloat80_t *zPtr ) -{ - const struct extFloat80M *aSPtr, *bSPtr; - struct extFloat80M *zSPtr; - uint_fast16_t uiA64; - int32_t expA; - uint_fast16_t uiB64; - int32_t expB; - bool signZ; - uint_fast16_t exp, uiZ64; - uint64_t uiZ0, sigA, sigB; - int32_t expZ; - uint32_t sigProd[4], *extSigZPtr; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - aSPtr = (const struct extFloat80M *) aPtr; - bSPtr = (const struct extFloat80M *) bPtr; - zSPtr = (struct extFloat80M *) zPtr; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiA64 = aSPtr->signExp; - expA = expExtF80UI64( uiA64 ); - uiB64 = bSPtr->signExp; - expB = expExtF80UI64( uiB64 ); - signZ = signExtF80UI64( uiA64 ) ^ signExtF80UI64( uiB64 ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( (expA == 0x7FFF) || (expB == 0x7FFF) ) { - if ( softfloat_tryPropagateNaNExtF80M( aSPtr, bSPtr, zSPtr ) ) return; - if ( - (! aSPtr->signif && (expA != 0x7FFF)) - || (! bSPtr->signif && (expB != 0x7FFF)) - ) { - softfloat_invalidExtF80M( zSPtr ); - return; - } - uiZ64 = packToExtF80UI64( signZ, 0x7FFF ); - uiZ0 = UINT64_C( 0x8000000000000000 ); - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! expA ) expA = 1; - sigA = aSPtr->signif; - if ( ! (sigA & UINT64_C( 0x8000000000000000 )) ) { - if ( ! sigA ) goto zero; - expA += softfloat_normExtF80SigM( &sigA ); - } - if ( ! expB ) expB = 1; - sigB = bSPtr->signif; - if ( ! (sigB & UINT64_C( 0x8000000000000000 )) ) { - if ( ! sigB ) goto zero; - expB += softfloat_normExtF80SigM( &sigB ); - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expZ = expA + expB - 0x3FFE; - softfloat_mul64To128M( sigA, sigB, sigProd ); - if ( sigProd[indexWordLo( 4 )] ) sigProd[indexWord( 4, 1 )] |= 1; - extSigZPtr = &sigProd[indexMultiwordHi( 4, 3 )]; - if ( sigProd[indexWordHi( 4 )] < 0x80000000 ) { - --expZ; - softfloat_add96M( extSigZPtr, extSigZPtr, extSigZPtr ); - } - softfloat_roundPackMToExtF80M( - signZ, expZ, extSigZPtr, extF80_roundingPrecision, zSPtr ); - return; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - zero: - uiZ64 = packToExtF80UI64( signZ, 0 ); - uiZ0 = 0; - uiZ: - zSPtr->signExp = uiZ64; - zSPtr->signif = uiZ0; - -} - -#endif - diff --git a/outside/softfloat-3/source/extF80M_rem.c b/outside/softfloat-3/source/extF80M_rem.c deleted file mode 100644 index 4302d587e..000000000 --- a/outside/softfloat-3/source/extF80M_rem.c +++ /dev/null @@ -1,204 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -void - extF80M_rem( - const extFloat80_t *aPtr, const extFloat80_t *bPtr, extFloat80_t *zPtr ) -{ - - *zPtr = extF80_rem( *aPtr, *bPtr ); - -} - -#else - -void - extF80M_rem( - const extFloat80_t *aPtr, const extFloat80_t *bPtr, extFloat80_t *zPtr ) -{ - const struct extFloat80M *aSPtr, *bSPtr; - struct extFloat80M *zSPtr; - uint_fast16_t uiA64; - int32_t expA, expB; - uint64_t x64; - bool signRem; - uint64_t sigA; - int32_t expDiff; - uint32_t rem[3], x[3], sig32B, q, recip32, rem2[3], *remPtr, *altRemPtr; - uint32_t *newRemPtr, wordMeanRem; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - aSPtr = (const struct extFloat80M *) aPtr; - bSPtr = (const struct extFloat80M *) bPtr; - zSPtr = (struct extFloat80M *) zPtr; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiA64 = aSPtr->signExp; - expA = expExtF80UI64( uiA64 ); - expB = expExtF80UI64( bSPtr->signExp ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( (expA == 0x7FFF) || (expB == 0x7FFF) ) { - if ( softfloat_tryPropagateNaNExtF80M( aSPtr, bSPtr, zSPtr ) ) return; - if ( expA == 0x7FFF ) goto invalid; - /*-------------------------------------------------------------------- - | If we get here, then argument b is an infinity and `expB' is 0x7FFF; - | Doubling `expB' is an easy way to ensure that `expDiff' later is - | less than -1, which will result in returning a canonicalized version - | of argument a. - *--------------------------------------------------------------------*/ - expB += expB; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! expB ) expB = 1; - x64 = bSPtr->signif; - if ( ! (x64 & UINT64_C( 0x8000000000000000 )) ) { - if ( ! x64 ) goto invalid; - expB += softfloat_normExtF80SigM( &x64 ); - } - signRem = signExtF80UI64( uiA64 ); - if ( ! expA ) expA = 1; - sigA = aSPtr->signif; - if ( ! (sigA & UINT64_C( 0x8000000000000000 )) ) { - if ( ! sigA ) { - expA = 0; - goto copyA; - } - expA += softfloat_normExtF80SigM( &sigA ); - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expDiff = expA - expB; - if ( expDiff < -1 ) goto copyA; - rem[indexWord( 3, 2 )] = sigA>>34; - rem[indexWord( 3, 1 )] = sigA>>2; - rem[indexWord( 3, 0 )] = (uint32_t) sigA<<30; - x[indexWord( 3, 0 )] = (uint32_t) x64<<30; - sig32B = x64>>32; - x64 >>= 2; - x[indexWord( 3, 2 )] = x64>>32; - x[indexWord( 3, 1 )] = x64; - if ( expDiff < 1 ) { - if ( expDiff ) { - --expB; - softfloat_add96M( x, x, x ); - q = 0; - } else { - q = (softfloat_compare96M( x, rem ) <= 0); - if ( q ) softfloat_sub96M( rem, x, rem ); - } - } else { - recip32 = softfloat_approxRecip32_1( sig32B ); - expDiff -= 30; - for (;;) { - x64 = (uint64_t) rem[indexWordHi( 3 )] * recip32; - if ( expDiff < 0 ) break; - q = (x64 + 0x80000000)>>32; - softfloat_remStep96MBy32( rem, 29, x, q, rem ); - if ( rem[indexWordHi( 3 )] & 0x80000000 ) { - softfloat_add96M( rem, x, rem ); - } - expDiff -= 29; - } - /*-------------------------------------------------------------------- - | (`expDiff' cannot be less than -29 here.) - *--------------------------------------------------------------------*/ - q = (uint32_t) (x64>>32)>>(~expDiff & 31); - softfloat_remStep96MBy32( rem, expDiff + 30, x, q, rem ); - if ( rem[indexWordHi( 3 )] & 0x80000000 ) { - remPtr = rem; - altRemPtr = rem2; - softfloat_add96M( remPtr, x, altRemPtr ); - goto selectRem; - } - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - remPtr = rem; - altRemPtr = rem2; - do { - ++q; - newRemPtr = altRemPtr; - softfloat_sub96M( remPtr, x, newRemPtr ); - altRemPtr = remPtr; - remPtr = newRemPtr; - } while ( ! (remPtr[indexWordHi( 3 )] & 0x80000000) ); - selectRem: - softfloat_add96M( remPtr, altRemPtr, x ); - wordMeanRem = x[indexWordHi( 3 )]; - if ( - (wordMeanRem & 0x80000000) - || (! wordMeanRem && (q & 1) && ! x[indexWord( 3, 0 )] - && ! x[indexWord( 3, 1 )]) - ) { - remPtr = altRemPtr; - } - if ( remPtr[indexWordHi( 3 )] & 0x80000000 ) { - signRem = ! signRem; - softfloat_negX96M( remPtr ); - } - softfloat_normRoundPackMToExtF80M( signRem, expB + 2, remPtr, 80, zSPtr ); - return; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - invalid: - softfloat_invalidExtF80M( zSPtr ); - return; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - copyA: - if ( expA < 1 ) { - sigA >>= 1 - expA; - expA = 0; - } - zSPtr->signExp = packToExtF80UI64( signRem, expA ); - zSPtr->signif = sigA; - -} - -#endif - diff --git a/outside/softfloat-3/source/extF80M_roundToInt.c b/outside/softfloat-3/source/extF80M_roundToInt.c deleted file mode 100644 index 57c71e478..000000000 --- a/outside/softfloat-3/source/extF80M_roundToInt.c +++ /dev/null @@ -1,169 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -void - extF80M_roundToInt( - const extFloat80_t *aPtr, - uint_fast8_t roundingMode, - bool exact, - extFloat80_t *zPtr - ) -{ - - *zPtr = extF80_roundToInt( *aPtr, roundingMode, exact ); - -} - -#else - -void - extF80M_roundToInt( - const extFloat80_t *aPtr, - uint_fast8_t roundingMode, - bool exact, - extFloat80_t *zPtr - ) -{ - const struct extFloat80M *aSPtr; - struct extFloat80M *zSPtr; - uint_fast16_t uiA64, signUI64; - int32_t exp; - uint64_t sigA; - uint_fast16_t uiZ64; - uint64_t sigZ, lastBitMask, roundBitsMask; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - aSPtr = (const struct extFloat80M *) aPtr; - zSPtr = (struct extFloat80M *) zPtr; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiA64 = aSPtr->signExp; - signUI64 = uiA64 & packToExtF80UI64( 1, 0 ); - exp = expExtF80UI64( uiA64 ); - sigA = aSPtr->signif; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! (sigA & UINT64_C( 0x8000000000000000 )) && (exp != 0x7FFF) ) { - if ( ! sigA ) { - uiZ64 = signUI64; - sigZ = 0; - goto uiZ; - } - exp += softfloat_normExtF80SigM( &sigA ); - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp <= 0x3FFE ) { - if ( exact ) softfloat_exceptionFlags |= softfloat_flag_inexact; - switch ( roundingMode ) { - case softfloat_round_near_even: - if ( ! (sigA & UINT64_C( 0x7FFFFFFFFFFFFFFF )) ) break; - case softfloat_round_near_maxMag: - if ( exp == 0x3FFE ) goto mag1; - break; - case softfloat_round_min: - if ( signUI64 ) goto mag1; - break; - case softfloat_round_max: - if ( ! signUI64 ) goto mag1; - break; - } - uiZ64 = signUI64; - sigZ = 0; - goto uiZ; - mag1: - uiZ64 = signUI64 | 0x3FFF; - sigZ = UINT64_C( 0x8000000000000000 ); - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( 0x403E <= exp ) { - if ( exp == 0x7FFF ) { - if ( sigA & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) { - softfloat_propagateNaNExtF80M( aSPtr, 0, zSPtr ); - return; - } - sigZ = UINT64_C( 0x8000000000000000 ); - } else { - sigZ = sigA; - } - uiZ64 = signUI64 | exp; - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiZ64 = signUI64 | exp; - lastBitMask = (uint64_t) 1<<(0x403E - exp); - roundBitsMask = lastBitMask - 1; - sigZ = sigA; - if ( roundingMode == softfloat_round_near_maxMag ) { - sigZ += lastBitMask>>1; - } else if ( roundingMode == softfloat_round_near_even ) { - sigZ += lastBitMask>>1; - if ( ! (sigZ & roundBitsMask) ) sigZ &= ~lastBitMask; - } else if ( - roundingMode == (signUI64 ? softfloat_round_min : softfloat_round_max) - ) { - sigZ += roundBitsMask; - } - sigZ &= ~roundBitsMask; - if ( ! sigZ ) { - ++uiZ64; - sigZ = UINT64_C( 0x8000000000000000 ); - } - if ( exact && (sigZ != sigA) ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; - } - uiZ: - zSPtr->signExp = uiZ64; - zSPtr->signif = sigZ; - return; - -} - -#endif - diff --git a/outside/softfloat-3/source/extF80M_sqrt.c b/outside/softfloat-3/source/extF80M_sqrt.c deleted file mode 100644 index b3f89973f..000000000 --- a/outside/softfloat-3/source/extF80M_sqrt.c +++ /dev/null @@ -1,176 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -void extF80M_sqrt( const extFloat80_t *aPtr, extFloat80_t *zPtr ) -{ - - *zPtr = extF80_sqrt( *aPtr ); - -} - -#else - -void extF80M_sqrt( const extFloat80_t *aPtr, extFloat80_t *zPtr ) -{ - const struct extFloat80M *aSPtr; - struct extFloat80M *zSPtr; - uint_fast16_t uiA64, signUI64; - int32_t expA; - uint64_t rem64; - int32_t expZ; - uint32_t rem[4], sig32A, recipSqrt32, sig32Z, q; - uint64_t sig64Z, x64; - uint32_t term[4], extSigZ[3]; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - aSPtr = (const struct extFloat80M *) aPtr; - zSPtr = (struct extFloat80M *) zPtr; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiA64 = aSPtr->signExp; - signUI64 = uiA64 & packToExtF80UI64( 1, 0 ); - expA = expExtF80UI64( uiA64 ); - rem64 = aSPtr->signif; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( expA == 0x7FFF ) { - if ( rem64 & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) { - softfloat_propagateNaNExtF80M( aSPtr, 0, zSPtr ); - return; - } - if ( signUI64 ) goto invalid; - rem64 = UINT64_C( 0x8000000000000000 ); - goto copyA; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! expA ) expA = 1; - if ( ! (rem64 & UINT64_C( 0x8000000000000000 )) ) { - if ( ! rem64 ) { - uiA64 = signUI64; - goto copyA; - } - expA += softfloat_normExtF80SigM( &rem64 ); - } - if ( signUI64 ) goto invalid; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expZ = ((expA - 0x3FFF)>>1) + 0x3FFF; - expA &= 1; - softfloat_shortShiftLeft64To96M( - rem64, 30 - expA, &rem[indexMultiwordHi( 4, 3 )] ); - sig32A = rem64>>32; - recipSqrt32 = softfloat_approxRecipSqrt32_1( expA, sig32A ); - sig32Z = ((uint64_t) sig32A * recipSqrt32)>>32; - if ( expA ) sig32Z >>= 1; - rem64 = - ((uint64_t) rem[indexWord( 4, 3 )]<<32 | rem[indexWord( 4, 2 )]) - - (uint64_t) sig32Z * sig32Z; - rem[indexWord( 4, 3 )] = rem64>>32; - rem[indexWord( 4, 2 )] = rem64; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - q = ((uint32_t) (rem64>>2) * (uint64_t) recipSqrt32)>>32; - sig64Z = ((uint64_t) sig32Z<<32) + ((uint64_t) q<<3); - x64 = ((uint64_t) sig32Z<<32) + sig64Z; - term[indexWord( 3, 2 )] = 0; - term[indexWord( 3, 1 )] = x64>>32; - term[indexWord( 3, 0 )] = x64; - softfloat_remStep96MBy32( - &rem[indexMultiwordHi( 4, 3 )], - 29, - term, - q, - &rem[indexMultiwordHi( 4, 3 )] - ); - rem64 = (uint64_t) rem[indexWord( 4, 3 )]<<32 | rem[indexWord( 4, 2 )]; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - q = (((uint32_t) (rem64>>2) * (uint64_t) recipSqrt32)>>32) + 2; - x64 = (uint64_t) q<<7; - extSigZ[indexWord( 3, 0 )] = x64; - x64 = (sig64Z<<1) + (x64>>32); - extSigZ[indexWord( 3, 2 )] = x64>>32; - extSigZ[indexWord( 3, 1 )] = x64; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( (q & 0xFFFFFF) <= 2 ) { - q &= ~(uint32_t) 0xFFFF; - extSigZ[indexWordLo( 3 )] = q<<7; - x64 = sig64Z + (q>>27); - term[indexWord( 4, 3 )] = 0; - term[indexWord( 4, 2 )] = x64>>32; - term[indexWord( 4, 1 )] = x64; - term[indexWord( 4, 0 )] = q<<5; - rem[indexWord( 4, 0 )] = 0; - softfloat_remStep128MBy32( rem, 28, term, q, rem ); - q = rem[indexWordHi( 4 )]; - if ( q & 0x80000000 ) { - softfloat_sub1X96M( extSigZ ); - } else { - if ( q || rem[indexWord( 4, 1 )] || rem[indexWord( 4, 2 )] ) { - extSigZ[indexWordLo( 3 )] |= 1; - } - } - } - softfloat_roundPackMToExtF80M( - 0, expZ, extSigZ, extF80_roundingPrecision, zSPtr ); - return; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - invalid: - softfloat_invalidExtF80M( zSPtr ); - return; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - copyA: - zSPtr->signExp = uiA64; - zSPtr->signif = rem64; - -} - -#endif - diff --git a/outside/softfloat-3/source/extF80M_sub.c b/outside/softfloat-3/source/extF80M_sub.c deleted file mode 100644 index 934a8378b..000000000 --- a/outside/softfloat-3/source/extF80M_sub.c +++ /dev/null @@ -1,100 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -void - extF80M_sub( - const extFloat80_t *aPtr, const extFloat80_t *bPtr, extFloat80_t *zPtr ) -{ - const struct extFloat80M *aSPtr, *bSPtr; - uint_fast16_t uiA64; - uint_fast64_t uiA0; - bool signA; - uint_fast16_t uiB64; - uint_fast64_t uiB0; - bool signB; -#if ! defined INLINE_LEVEL || (INLINE_LEVEL < 2) - extFloat80_t - (*magsFuncPtr)( - uint_fast16_t, uint_fast64_t, uint_fast16_t, uint_fast64_t, bool ); -#endif - - aSPtr = (const struct extFloat80M *) aPtr; - bSPtr = (const struct extFloat80M *) bPtr; - uiA64 = aSPtr->signExp; - uiA0 = aSPtr->signif; - signA = signExtF80UI64( uiA64 ); - uiB64 = bSPtr->signExp; - uiB0 = bSPtr->signif; - signB = signExtF80UI64( uiB64 ); -#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL) - if ( signA == signB ) { - *zPtr = softfloat_subMagsExtF80( uiA64, uiA0, uiB64, uiB0, signA ); - } else { - *zPtr = softfloat_addMagsExtF80( uiA64, uiA0, uiB64, uiB0, signA ); - } -#else - magsFuncPtr = - (signA == signB) ? softfloat_subMagsExtF80 : softfloat_addMagsExtF80; - *zPtr = (*magsFuncPtr)( uiA64, uiA0, uiB64, uiB0, signA ); -#endif - -} - -#else - -void - extF80M_sub( - const extFloat80_t *aPtr, const extFloat80_t *bPtr, extFloat80_t *zPtr ) -{ - - softfloat_addExtF80M( - (const struct extFloat80M *) aPtr, - (const struct extFloat80M *) bPtr, - (struct extFloat80M *) zPtr, - true - ); - -} - -#endif - diff --git a/outside/softfloat-3/source/extF80M_to_f128M.c b/outside/softfloat-3/source/extF80M_to_f128M.c deleted file mode 100644 index 11a1b0424..000000000 --- a/outside/softfloat-3/source/extF80M_to_f128M.c +++ /dev/null @@ -1,125 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -void extF80M_to_f128M( const extFloat80_t *aPtr, float128_t *zPtr ) -{ - - *zPtr = extF80_to_f128( *aPtr ); - -} - -#else - -void extF80M_to_f128M( const extFloat80_t *aPtr, float128_t *zPtr ) -{ - const struct extFloat80M *aSPtr; - uint32_t *zWPtr; - uint_fast16_t uiA64; - bool sign; - int32_t exp; - uint64_t sig; - struct commonNaN commonNaN; - uint32_t uiZ96; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - aSPtr = (const struct extFloat80M *) aPtr; - zWPtr = (uint32_t *) zPtr; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiA64 = aSPtr->signExp; - sign = signExtF80UI64( uiA64 ); - exp = expExtF80UI64( uiA64 ); - sig = aSPtr->signif; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - zWPtr[indexWord( 4, 0 )] = 0; - if ( exp == 0x7FFF ) { - if ( sig & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) { - softfloat_extF80MToCommonNaN( aSPtr, &commonNaN ); - softfloat_commonNaNToF128M( &commonNaN, zWPtr ); - return; - } - uiZ96 = packToF128UI96( sign, 0x7FFF, 0 ); - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp ) --exp; - if ( ! (sig & UINT64_C( 0x8000000000000000 )) ) { - if ( ! sig ) { - uiZ96 = packToF128UI96( sign, 0, 0 ); - goto uiZ; - } - exp += softfloat_normExtF80SigM( &sig ); - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - zWPtr[indexWord( 4, 1 )] = (uint32_t) sig<<17; - sig >>= 15; - zWPtr[indexWord( 4, 2 )] = sig; - if ( exp < 0 ) { - zWPtr[indexWordHi( 4 )] = sig>>32; - softfloat_shiftRight96M( - &zWPtr[indexMultiwordHi( 4, 3 )], - -exp, - &zWPtr[indexMultiwordHi( 4, 3 )] - ); - exp = 0; - sig = (uint64_t) zWPtr[indexWordHi( 4 )]<<32; - } - zWPtr[indexWordHi( 4 )] = packToF128UI96( sign, exp, sig>>32 ); - return; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiZ: - zWPtr[indexWord( 4, 3 )] = uiZ96; - zWPtr[indexWord( 4, 2 )] = 0; - zWPtr[indexWord( 4, 1 )] = 0; - -} - -#endif - diff --git a/outside/softfloat-3/source/extF80M_to_f16.c b/outside/softfloat-3/source/extF80M_to_f16.c deleted file mode 100644 index ff4436cb0..000000000 --- a/outside/softfloat-3/source/extF80M_to_f16.c +++ /dev/null @@ -1,112 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -float16_t extF80M_to_f16( const extFloat80_t *aPtr ) -{ - - return extF80_to_f16( *aPtr ); - -} - -#else - -float16_t extF80M_to_f16( const extFloat80_t *aPtr ) -{ - const struct extFloat80M *aSPtr; - uint_fast16_t uiA64; - bool sign; - int32_t exp; - uint64_t sig; - struct commonNaN commonNaN; - uint16_t uiZ, sig16; - union ui16_f16 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - aSPtr = (const struct extFloat80M *) aPtr; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiA64 = aSPtr->signExp; - sign = signExtF80UI64( uiA64 ); - exp = expExtF80UI64( uiA64 ); - sig = aSPtr->signif; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp == 0x7FFF ) { - if ( sig & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) { - softfloat_extF80MToCommonNaN( aSPtr, &commonNaN ); - uiZ = softfloat_commonNaNToF16UI( &commonNaN ); - } else { - uiZ = packToF16UI( sign, 0x1F, 0 ); - } - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! (sig & UINT64_C( 0x8000000000000000 )) ) { - if ( ! sig ) { - uiZ = packToF16UI( sign, 0, 0 ); - goto uiZ; - } - exp += softfloat_normExtF80SigM( &sig ); - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sig16 = softfloat_shortShiftRightJam64( sig, 49 ); - exp -= 0x3FF1; - if ( sizeof (int_fast16_t) < sizeof (int32_t) ) { - if ( exp < -0x40 ) exp = -0x40; - } - return softfloat_roundPackToF16( sign, exp, sig16 ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - -#endif - diff --git a/outside/softfloat-3/source/extF80M_to_f32.c b/outside/softfloat-3/source/extF80M_to_f32.c deleted file mode 100644 index d0cb869a0..000000000 --- a/outside/softfloat-3/source/extF80M_to_f32.c +++ /dev/null @@ -1,112 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -float32_t extF80M_to_f32( const extFloat80_t *aPtr ) -{ - - return extF80_to_f32( *aPtr ); - -} - -#else - -float32_t extF80M_to_f32( const extFloat80_t *aPtr ) -{ - const struct extFloat80M *aSPtr; - uint_fast16_t uiA64; - bool sign; - int32_t exp; - uint64_t sig; - struct commonNaN commonNaN; - uint32_t uiZ, sig32; - union ui32_f32 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - aSPtr = (const struct extFloat80M *) aPtr; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiA64 = aSPtr->signExp; - sign = signExtF80UI64( uiA64 ); - exp = expExtF80UI64( uiA64 ); - sig = aSPtr->signif; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp == 0x7FFF ) { - if ( sig & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) { - softfloat_extF80MToCommonNaN( aSPtr, &commonNaN ); - uiZ = softfloat_commonNaNToF32UI( &commonNaN ); - } else { - uiZ = packToF32UI( sign, 0xFF, 0 ); - } - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! (sig & UINT64_C( 0x8000000000000000 )) ) { - if ( ! sig ) { - uiZ = packToF32UI( sign, 0, 0 ); - goto uiZ; - } - exp += softfloat_normExtF80SigM( &sig ); - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sig32 = softfloat_shortShiftRightJam64( sig, 33 ); - exp -= 0x3F81; - if ( sizeof (int_fast16_t) < sizeof (int32_t) ) { - if ( exp < -0x1000 ) exp = -0x1000; - } - return softfloat_roundPackToF32( sign, exp, sig32 ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - -#endif - diff --git a/outside/softfloat-3/source/extF80M_to_f64.c b/outside/softfloat-3/source/extF80M_to_f64.c deleted file mode 100644 index e34bcade8..000000000 --- a/outside/softfloat-3/source/extF80M_to_f64.c +++ /dev/null @@ -1,112 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -float64_t extF80M_to_f64( const extFloat80_t *aPtr ) -{ - - return extF80_to_f64( *aPtr ); - -} - -#else - -float64_t extF80M_to_f64( const extFloat80_t *aPtr ) -{ - const struct extFloat80M *aSPtr; - uint_fast16_t uiA64; - bool sign; - int32_t exp; - uint64_t sig; - struct commonNaN commonNaN; - uint64_t uiZ; - union ui64_f64 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - aSPtr = (const struct extFloat80M *) aPtr; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiA64 = aSPtr->signExp; - sign = signExtF80UI64( uiA64 ); - exp = expExtF80UI64( uiA64 ); - sig = aSPtr->signif; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp == 0x7FFF ) { - if ( sig & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) { - softfloat_extF80MToCommonNaN( aSPtr, &commonNaN ); - uiZ = softfloat_commonNaNToF64UI( &commonNaN ); - } else { - uiZ = packToF64UI( sign, 0x7FF, 0 ); - } - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! (sig & UINT64_C( 0x8000000000000000 )) ) { - if ( ! sig ) { - uiZ = packToF64UI( sign, 0, 0 ); - goto uiZ; - } - exp += softfloat_normExtF80SigM( &sig ); - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sig = softfloat_shortShiftRightJam64( sig, 1 ); - exp -= 0x3C01; - if ( sizeof (int_fast16_t) < sizeof (int32_t) ) { - if ( exp < -0x1000 ) exp = -0x1000; - } - return softfloat_roundPackToF64( sign, exp, sig ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - -#endif - diff --git a/outside/softfloat-3/source/extF80M_to_i32.c b/outside/softfloat-3/source/extF80M_to_i32.c deleted file mode 100644 index 6d365ddb3..000000000 --- a/outside/softfloat-3/source/extF80M_to_i32.c +++ /dev/null @@ -1,100 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the -University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -int_fast32_t - extF80M_to_i32( - const extFloat80_t *aPtr, uint_fast8_t roundingMode, bool exact ) -{ - - return extF80_to_i32( *aPtr, roundingMode, exact ); - -} - -#else - -int_fast32_t - extF80M_to_i32( - const extFloat80_t *aPtr, uint_fast8_t roundingMode, bool exact ) -{ - const struct extFloat80M *aSPtr; - uint_fast16_t uiA64; - bool sign; - int32_t exp; - uint64_t sig; - int32_t shiftDist; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - aSPtr = (const struct extFloat80M *) aPtr; - uiA64 = aSPtr->signExp; - sign = signExtF80UI64( uiA64 ); - exp = expExtF80UI64( uiA64 ); - sig = aSPtr->signif; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - shiftDist = 0x4032 - exp; - if ( shiftDist <= 0 ) { - if ( sig>>32 ) goto invalid; - if ( -32 < shiftDist ) { - sig <<= -shiftDist; - } else { - if ( (uint32_t) sig ) goto invalid; - } - } else { - sig = softfloat_shiftRightJam64( sig, shiftDist ); - } - return softfloat_roundToI32( sign, sig, roundingMode, exact ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - invalid: - softfloat_raiseFlags( softfloat_flag_invalid ); - return - (exp == 0x7FFF) && (sig & UINT64_C( 0x7FFFFFFFFFFFFFFF )) ? i32_fromNaN - : sign ? i32_fromNegOverflow : i32_fromPosOverflow; - -} - -#endif - diff --git a/outside/softfloat-3/source/extF80M_to_i32_r_minMag.c b/outside/softfloat-3/source/extF80M_to_i32_r_minMag.c deleted file mode 100644 index f72cd9ee7..000000000 --- a/outside/softfloat-3/source/extF80M_to_i32_r_minMag.c +++ /dev/null @@ -1,120 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -int_fast32_t extF80M_to_i32_r_minMag( const extFloat80_t *aPtr, bool exact ) -{ - - return extF80_to_i32_r_minMag( *aPtr, exact ); - -} - -#else - -int_fast32_t extF80M_to_i32_r_minMag( const extFloat80_t *aPtr, bool exact ) -{ - const struct extFloat80M *aSPtr; - uint_fast16_t uiA64; - int32_t exp; - uint64_t sig; - int32_t shiftDist; - bool sign, raiseInexact; - int32_t z; - uint64_t shiftedSig; - uint32_t absZ; - union { uint32_t ui; int32_t i; } u; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - aSPtr = (const struct extFloat80M *) aPtr; - uiA64 = aSPtr->signExp; - exp = expExtF80UI64( uiA64 ); - sig = aSPtr->signif; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! sig && (exp != 0x7FFF) ) return 0; - shiftDist = 0x403E - exp; - if ( 64 <= shiftDist ) { - raiseInexact = exact; - z = 0; - } else { - sign = signExtF80UI64( uiA64 ); - raiseInexact = false; - if ( shiftDist < 0 ) { - if ( sig>>32 || (shiftDist <= -31) ) goto invalid; - shiftedSig = (uint64_t) (uint32_t) sig<<-shiftDist; - if ( shiftedSig>>32 ) goto invalid; - absZ = shiftedSig; - } else { - shiftedSig = sig; - if ( shiftDist ) shiftedSig >>= shiftDist; - if ( shiftedSig>>32 ) goto invalid; - absZ = shiftedSig; - if ( exact && shiftDist ) { - raiseInexact = ((uint64_t) absZ< -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -int_fast64_t - extF80M_to_i64( - const extFloat80_t *aPtr, uint_fast8_t roundingMode, bool exact ) -{ - - return extF80_to_i64( *aPtr, roundingMode, exact ); - -} - -#else - -int_fast64_t - extF80M_to_i64( - const extFloat80_t *aPtr, uint_fast8_t roundingMode, bool exact ) -{ - const struct extFloat80M *aSPtr; - uint_fast16_t uiA64; - bool sign; - int32_t exp; - uint64_t sig; - int32_t shiftDist; - uint32_t extSig[3]; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - aSPtr = (const struct extFloat80M *) aPtr; - uiA64 = aSPtr->signExp; - sign = signExtF80UI64( uiA64 ); - exp = expExtF80UI64( uiA64 ); - sig = aSPtr->signif; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - shiftDist = 0x403E - exp; - if ( shiftDist < 0 ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - return - (exp == 0x7FFF) && (sig & UINT64_C( 0x7FFFFFFFFFFFFFFF )) - ? i64_fromNaN - : sign ? i64_fromNegOverflow : i64_fromPosOverflow; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - extSig[indexWord( 3, 2 )] = sig>>32; - extSig[indexWord( 3, 1 )] = sig; - extSig[indexWord( 3, 0 )] = 0; - if ( shiftDist ) softfloat_shiftRightJam96M( extSig, shiftDist, extSig ); - return softfloat_roundMToI64( sign, extSig, roundingMode, exact ); - -} - -#endif - diff --git a/outside/softfloat-3/source/extF80M_to_i64_r_minMag.c b/outside/softfloat-3/source/extF80M_to_i64_r_minMag.c deleted file mode 100644 index 047abc416..000000000 --- a/outside/softfloat-3/source/extF80M_to_i64_r_minMag.c +++ /dev/null @@ -1,115 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -int_fast64_t extF80M_to_i64_r_minMag( const extFloat80_t *aPtr, bool exact ) -{ - - return extF80_to_i64_r_minMag( *aPtr, exact ); - -} - -#else - -int_fast64_t extF80M_to_i64_r_minMag( const extFloat80_t *aPtr, bool exact ) -{ - const struct extFloat80M *aSPtr; - uint_fast16_t uiA64; - int32_t exp; - uint64_t sig; - int32_t shiftDist; - bool sign, raiseInexact; - int64_t z; - uint64_t absZ; - union { uint64_t ui; int64_t i; } u; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - aSPtr = (const struct extFloat80M *) aPtr; - uiA64 = aSPtr->signExp; - exp = expExtF80UI64( uiA64 ); - sig = aSPtr->signif; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! sig && (exp != 0x7FFF) ) return 0; - shiftDist = 0x403E - exp; - if ( 64 <= shiftDist ) { - raiseInexact = exact; - z = 0; - } else { - sign = signExtF80UI64( uiA64 ); - raiseInexact = false; - if ( shiftDist < 0 ) { - if ( shiftDist <= -63 ) goto invalid; - shiftDist = -shiftDist; - absZ = sig<>shiftDist != sig ) goto invalid; - } else { - absZ = sig; - if ( shiftDist ) absZ >>= shiftDist; - if ( exact && shiftDist ) raiseInexact = (absZ< -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -uint_fast32_t - extF80M_to_ui32( - const extFloat80_t *aPtr, uint_fast8_t roundingMode, bool exact ) -{ - - return extF80_to_ui32( *aPtr, roundingMode, exact ); - -} - -#else - -uint_fast32_t - extF80M_to_ui32( - const extFloat80_t *aPtr, uint_fast8_t roundingMode, bool exact ) -{ - const struct extFloat80M *aSPtr; - uint_fast16_t uiA64; - bool sign; - int32_t exp; - uint64_t sig; - int32_t shiftDist; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - aSPtr = (const struct extFloat80M *) aPtr; - uiA64 = aSPtr->signExp; - sign = signExtF80UI64( uiA64 ); - exp = expExtF80UI64( uiA64 ); - sig = aSPtr->signif; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - shiftDist = 0x4032 - exp; - if ( shiftDist <= 0 ) { - if ( sig>>32 ) goto invalid; - if ( -32 < shiftDist ) { - sig <<= -shiftDist; - } else { - if ( (uint32_t) sig ) goto invalid; - } - } else { - sig = softfloat_shiftRightJam64( sig, shiftDist ); - } - return softfloat_roundToUI32( sign, sig, roundingMode, exact ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - invalid: - softfloat_raiseFlags( softfloat_flag_invalid ); - return - (exp == 0x7FFF) && (sig & UINT64_C( 0x7FFFFFFFFFFFFFFF )) - ? ui32_fromNaN - : sign ? ui32_fromNegOverflow : ui32_fromPosOverflow; - -} - -#endif - diff --git a/outside/softfloat-3/source/extF80M_to_ui32_r_minMag.c b/outside/softfloat-3/source/extF80M_to_ui32_r_minMag.c deleted file mode 100644 index 1e6a64878..000000000 --- a/outside/softfloat-3/source/extF80M_to_ui32_r_minMag.c +++ /dev/null @@ -1,111 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -uint_fast32_t extF80M_to_ui32_r_minMag( const extFloat80_t *aPtr, bool exact ) -{ - - return extF80_to_ui32_r_minMag( *aPtr, exact ); - -} - -#else - -uint_fast32_t extF80M_to_ui32_r_minMag( const extFloat80_t *aPtr, bool exact ) -{ - const struct extFloat80M *aSPtr; - uint_fast16_t uiA64; - int32_t exp; - uint64_t sig; - int32_t shiftDist; - bool sign; - uint64_t shiftedSig; - uint32_t z; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - aSPtr = (const struct extFloat80M *) aPtr; - uiA64 = aSPtr->signExp; - exp = expExtF80UI64( uiA64 ); - sig = aSPtr->signif; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! sig && (exp != 0x7FFF) ) return 0; - shiftDist = 0x403E - exp; - if ( 64 <= shiftDist ) { - if ( exact ) softfloat_exceptionFlags |= softfloat_flag_inexact; - return 0; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sign = signExtF80UI64( uiA64 ); - if ( shiftDist < 0 ) { - if ( sign || sig>>32 || (shiftDist <= -31) ) goto invalid; - shiftedSig = (uint64_t) (uint32_t) sig<<-shiftDist; - if ( shiftedSig>>32 ) goto invalid; - z = shiftedSig; - } else { - shiftedSig = sig; - if ( shiftDist ) shiftedSig >>= shiftDist; - if ( shiftedSig>>32 ) goto invalid; - z = shiftedSig; - if ( sign && z ) goto invalid; - if ( exact && shiftDist && ((uint64_t) z< -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -uint_fast64_t - extF80M_to_ui64( - const extFloat80_t *aPtr, uint_fast8_t roundingMode, bool exact ) -{ - - return extF80_to_ui64( *aPtr, roundingMode, exact ); - -} - -#else - -uint_fast64_t - extF80M_to_ui64( - const extFloat80_t *aPtr, uint_fast8_t roundingMode, bool exact ) -{ - const struct extFloat80M *aSPtr; - uint_fast16_t uiA64; - bool sign; - int32_t exp; - uint64_t sig; - int32_t shiftDist; - uint32_t extSig[3]; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - aSPtr = (const struct extFloat80M *) aPtr; - uiA64 = aSPtr->signExp; - sign = signExtF80UI64( uiA64 ); - exp = expExtF80UI64( uiA64 ); - sig = aSPtr->signif; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - shiftDist = 0x403E - exp; - if ( shiftDist < 0 ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - return - (exp == 0x7FFF) && (sig & UINT64_C( 0x7FFFFFFFFFFFFFFF )) - ? ui64_fromNaN - : sign ? ui64_fromNegOverflow : ui64_fromPosOverflow; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - extSig[indexWord( 3, 2 )] = sig>>32; - extSig[indexWord( 3, 1 )] = sig; - extSig[indexWord( 3, 0 )] = 0; - if ( shiftDist ) softfloat_shiftRightJam96M( extSig, shiftDist, extSig ); - return softfloat_roundMToUI64( sign, extSig, roundingMode, exact ); - -} - -#endif - diff --git a/outside/softfloat-3/source/extF80M_to_ui64_r_minMag.c b/outside/softfloat-3/source/extF80M_to_ui64_r_minMag.c deleted file mode 100644 index fe7e2c359..000000000 --- a/outside/softfloat-3/source/extF80M_to_ui64_r_minMag.c +++ /dev/null @@ -1,108 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -uint_fast64_t extF80M_to_ui64_r_minMag( const extFloat80_t *aPtr, bool exact ) -{ - - return extF80_to_ui64_r_minMag( *aPtr, exact ); - -} - -#else - -uint_fast64_t extF80M_to_ui64_r_minMag( const extFloat80_t *aPtr, bool exact ) -{ - const struct extFloat80M *aSPtr; - uint_fast16_t uiA64; - int32_t exp; - uint64_t sig; - int32_t shiftDist; - bool sign; - uint64_t z; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - aSPtr = (const struct extFloat80M *) aPtr; - uiA64 = aSPtr->signExp; - exp = expExtF80UI64( uiA64 ); - sig = aSPtr->signif; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! sig && (exp != 0x7FFF) ) return 0; - shiftDist = 0x403E - exp; - if ( 64 <= shiftDist ) { - if ( exact ) softfloat_exceptionFlags |= softfloat_flag_inexact; - return 0; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sign = signExtF80UI64( uiA64 ); - if ( shiftDist < 0 ) { - if ( sign || (shiftDist <= -63) ) goto invalid; - shiftDist = -shiftDist; - z = sig<>shiftDist != sig ) goto invalid; - } else { - z = sig; - if ( shiftDist ) z >>= shiftDist; - if ( sign && z ) goto invalid; - if ( exact && shiftDist && (z< -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -extFloat80_t extF80_add( extFloat80_t a, extFloat80_t b ) -{ - union { struct extFloat80M s; extFloat80_t f; } uA; - uint_fast16_t uiA64; - uint_fast64_t uiA0; - bool signA; - union { struct extFloat80M s; extFloat80_t f; } uB; - uint_fast16_t uiB64; - uint_fast64_t uiB0; - bool signB; -#if ! defined INLINE_LEVEL || (INLINE_LEVEL < 2) - extFloat80_t - (*magsFuncPtr)( - uint_fast16_t, uint_fast64_t, uint_fast16_t, uint_fast64_t, bool ); -#endif - - uA.f = a; - uiA64 = uA.s.signExp; - uiA0 = uA.s.signif; - signA = signExtF80UI64( uiA64 ); - uB.f = b; - uiB64 = uB.s.signExp; - uiB0 = uB.s.signif; - signB = signExtF80UI64( uiB64 ); -#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL) - if ( signA == signB ) { - return softfloat_addMagsExtF80( uiA64, uiA0, uiB64, uiB0, signA ); - } else { - return softfloat_subMagsExtF80( uiA64, uiA0, uiB64, uiB0, signA ); - } -#else - magsFuncPtr = - (signA == signB) ? softfloat_addMagsExtF80 : softfloat_subMagsExtF80; - return (*magsFuncPtr)( uiA64, uiA0, uiB64, uiB0, signA ); -#endif - -} - diff --git a/outside/softfloat-3/source/extF80_div.c b/outside/softfloat-3/source/extF80_div.c deleted file mode 100644 index aff2e5319..000000000 --- a/outside/softfloat-3/source/extF80_div.c +++ /dev/null @@ -1,203 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -extFloat80_t extF80_div( extFloat80_t a, extFloat80_t b ) -{ - union { struct extFloat80M s; extFloat80_t f; } uA; - uint_fast16_t uiA64; - uint_fast64_t uiA0; - bool signA; - int_fast32_t expA; - uint_fast64_t sigA; - union { struct extFloat80M s; extFloat80_t f; } uB; - uint_fast16_t uiB64; - uint_fast64_t uiB0; - bool signB; - int_fast32_t expB; - uint_fast64_t sigB; - bool signZ; - struct exp32_sig64 normExpSig; - int_fast32_t expZ; - struct uint128 rem; - uint_fast32_t recip32; - uint_fast64_t sigZ; - int ix; - uint_fast64_t q64; - uint_fast32_t q; - struct uint128 term; - uint_fast64_t sigZExtra; - struct uint128 uiZ; - uint_fast16_t uiZ64; - uint_fast64_t uiZ0; - union { struct extFloat80M s; extFloat80_t f; } uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA64 = uA.s.signExp; - uiA0 = uA.s.signif; - signA = signExtF80UI64( uiA64 ); - expA = expExtF80UI64( uiA64 ); - sigA = uiA0; - uB.f = b; - uiB64 = uB.s.signExp; - uiB0 = uB.s.signif; - signB = signExtF80UI64( uiB64 ); - expB = expExtF80UI64( uiB64 ); - sigB = uiB0; - signZ = signA ^ signB; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( expA == 0x7FFF ) { - if ( sigA & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) goto propagateNaN; - if ( expB == 0x7FFF ) { - if ( sigB & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) goto propagateNaN; - goto invalid; - } - goto infinity; - } - if ( expB == 0x7FFF ) { - if ( sigB & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) goto propagateNaN; - goto zero; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! expB ) expB = 1; - if ( ! (sigB & UINT64_C( 0x8000000000000000 )) ) { - if ( ! sigB ) { - if ( ! sigA ) goto invalid; - softfloat_raiseFlags( softfloat_flag_infinite ); - goto infinity; - } - normExpSig = softfloat_normSubnormalExtF80Sig( sigB ); - expB += normExpSig.exp; - sigB = normExpSig.sig; - } - if ( ! expA ) expA = 1; - if ( ! (sigA & UINT64_C( 0x8000000000000000 )) ) { - if ( ! sigA ) goto zero; - normExpSig = softfloat_normSubnormalExtF80Sig( sigA ); - expA += normExpSig.exp; - sigA = normExpSig.sig; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expZ = expA - expB + 0x3FFF; - if ( sigA < sigB ) { - --expZ; - rem = softfloat_shortShiftLeft128( 0, sigA, 32 ); - } else { - rem = softfloat_shortShiftLeft128( 0, sigA, 31 ); - } - recip32 = softfloat_approxRecip32_1( sigB>>32 ); - sigZ = 0; - ix = 2; - for (;;) { - q64 = (uint_fast64_t) (uint32_t) (rem.v64>>2) * recip32; - q = (q64 + 0x80000000)>>32; - --ix; - if ( ix < 0 ) break; - rem = softfloat_shortShiftLeft128( rem.v64, rem.v0, 29 ); - term = softfloat_mul64ByShifted32To128( sigB, q ); - rem = softfloat_sub128( rem.v64, rem.v0, term.v64, term.v0 ); - if ( rem.v64 & UINT64_C( 0x8000000000000000 ) ) { - --q; - rem = softfloat_add128( rem.v64, rem.v0, sigB>>32, sigB<<32 ); - } - sigZ = (sigZ<<29) + q; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ((q + 1) & 0x3FFFFF) < 2 ) { - rem = softfloat_shortShiftLeft128( rem.v64, rem.v0, 29 ); - term = softfloat_mul64ByShifted32To128( sigB, q ); - rem = softfloat_sub128( rem.v64, rem.v0, term.v64, term.v0 ); - term = softfloat_shortShiftLeft128( 0, sigB, 32 ); - if ( rem.v64 & UINT64_C( 0x8000000000000000 ) ) { - --q; - rem = softfloat_add128( rem.v64, rem.v0, term.v64, term.v0 ); - } else if ( softfloat_le128( term.v64, term.v0, rem.v64, rem.v0 ) ) { - ++q; - rem = softfloat_sub128( rem.v64, rem.v0, term.v64, term.v0 ); - } - if ( rem.v64 | rem.v0 ) q |= 1; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sigZ = (sigZ<<6) + (q>>23); - sigZExtra = (uint64_t) ((uint_fast64_t) q<<41); - return - softfloat_roundPackToExtF80( - signZ, expZ, sigZ, sigZExtra, extF80_roundingPrecision ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - propagateNaN: - uiZ = softfloat_propagateNaNExtF80UI( uiA64, uiA0, uiB64, uiB0 ); - uiZ64 = uiZ.v64; - uiZ0 = uiZ.v0; - goto uiZ; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - invalid: - softfloat_raiseFlags( softfloat_flag_invalid ); - uiZ64 = defaultNaNExtF80UI64; - uiZ0 = defaultNaNExtF80UI0; - goto uiZ; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - infinity: - uiZ64 = packToExtF80UI64( signZ, 0x7FFF ); - uiZ0 = UINT64_C( 0x8000000000000000 ); - goto uiZ; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - zero: - uiZ64 = packToExtF80UI64( signZ, 0 ); - uiZ0 = 0; - uiZ: - uZ.s.signExp = uiZ64; - uZ.s.signif = uiZ0; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/extF80_eq.c b/outside/softfloat-3/source/extF80_eq.c deleted file mode 100644 index 39f6c945b..000000000 --- a/outside/softfloat-3/source/extF80_eq.c +++ /dev/null @@ -1,73 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -bool extF80_eq( extFloat80_t a, extFloat80_t b ) -{ - union { struct extFloat80M s; extFloat80_t f; } uA; - uint_fast16_t uiA64; - uint_fast64_t uiA0; - union { struct extFloat80M s; extFloat80_t f; } uB; - uint_fast16_t uiB64; - uint_fast64_t uiB0; - - uA.f = a; - uiA64 = uA.s.signExp; - uiA0 = uA.s.signif; - uB.f = b; - uiB64 = uB.s.signExp; - uiB0 = uB.s.signif; - if ( isNaNExtF80UI( uiA64, uiA0 ) || isNaNExtF80UI( uiB64, uiB0 ) ) { - if ( - softfloat_isSigNaNExtF80UI( uiA64, uiA0 ) - || softfloat_isSigNaNExtF80UI( uiB64, uiB0 ) - ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - } - return false; - } - return - (uiA0 == uiB0) - && ((uiA64 == uiB64) || (! uiA0 && ! ((uiA64 | uiB64) & 0x7FFF))); - -} - diff --git a/outside/softfloat-3/source/extF80_eq_signaling.c b/outside/softfloat-3/source/extF80_eq_signaling.c deleted file mode 100644 index 1dd8e7cb0..000000000 --- a/outside/softfloat-3/source/extF80_eq_signaling.c +++ /dev/null @@ -1,67 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -bool extF80_eq_signaling( extFloat80_t a, extFloat80_t b ) -{ - union { struct extFloat80M s; extFloat80_t f; } uA; - uint_fast16_t uiA64; - uint_fast64_t uiA0; - union { struct extFloat80M s; extFloat80_t f; } uB; - uint_fast16_t uiB64; - uint_fast64_t uiB0; - - uA.f = a; - uiA64 = uA.s.signExp; - uiA0 = uA.s.signif; - uB.f = b; - uiB64 = uB.s.signExp; - uiB0 = uB.s.signif; - if ( isNaNExtF80UI( uiA64, uiA0 ) || isNaNExtF80UI( uiB64, uiB0 ) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - return false; - } - return - (uiA0 == uiB0) - && ((uiA64 == uiB64) || (! uiA0 && ! ((uiA64 | uiB64) & 0x7FFF))); - -} - diff --git a/outside/softfloat-3/source/extF80_isSignalingNaN.c b/outside/softfloat-3/source/extF80_isSignalingNaN.c deleted file mode 100644 index 684fc9d5d..000000000 --- a/outside/softfloat-3/source/extF80_isSignalingNaN.c +++ /dev/null @@ -1,51 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -bool extF80_isSignalingNaN( extFloat80_t a ) -{ - union { struct extFloat80M s; extFloat80_t f; } uA; - - uA.f = a; - return softfloat_isSigNaNExtF80UI( uA.s.signExp, uA.s.signif ); - -} - diff --git a/outside/softfloat-3/source/extF80_le.c b/outside/softfloat-3/source/extF80_le.c deleted file mode 100644 index 3ca2925e3..000000000 --- a/outside/softfloat-3/source/extF80_le.c +++ /dev/null @@ -1,73 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -bool extF80_le( extFloat80_t a, extFloat80_t b ) -{ - union { struct extFloat80M s; extFloat80_t f; } uA; - uint_fast16_t uiA64; - uint_fast64_t uiA0; - union { struct extFloat80M s; extFloat80_t f; } uB; - uint_fast16_t uiB64; - uint_fast64_t uiB0; - bool signA, signB; - - uA.f = a; - uiA64 = uA.s.signExp; - uiA0 = uA.s.signif; - uB.f = b; - uiB64 = uB.s.signExp; - uiB0 = uB.s.signif; - if ( isNaNExtF80UI( uiA64, uiA0 ) || isNaNExtF80UI( uiB64, uiB0 ) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - return false; - } - signA = signExtF80UI64( uiA64 ); - signB = signExtF80UI64( uiB64 ); - return - (signA != signB) - ? signA || ! (((uiA64 | uiB64) & 0x7FFF) | uiA0 | uiB0) - : ((uiA64 == uiB64) && (uiA0 == uiB0)) - || (signA ^ softfloat_lt128( uiA64, uiA0, uiB64, uiB0 )); - -} - diff --git a/outside/softfloat-3/source/extF80_le_quiet.c b/outside/softfloat-3/source/extF80_le_quiet.c deleted file mode 100644 index 896731732..000000000 --- a/outside/softfloat-3/source/extF80_le_quiet.c +++ /dev/null @@ -1,78 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -bool extF80_le_quiet( extFloat80_t a, extFloat80_t b ) -{ - union { struct extFloat80M s; extFloat80_t f; } uA; - uint_fast16_t uiA64; - uint_fast64_t uiA0; - union { struct extFloat80M s; extFloat80_t f; } uB; - uint_fast16_t uiB64; - uint_fast64_t uiB0; - bool signA, signB; - - uA.f = a; - uiA64 = uA.s.signExp; - uiA0 = uA.s.signif; - uB.f = b; - uiB64 = uB.s.signExp; - uiB0 = uB.s.signif; - if ( isNaNExtF80UI( uiA64, uiA0 ) || isNaNExtF80UI( uiB64, uiB0 ) ) { - if ( - softfloat_isSigNaNExtF80UI( uiA64, uiA0 ) - || softfloat_isSigNaNExtF80UI( uiB64, uiB0 ) - ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - } - return false; - } - signA = signExtF80UI64( uiA64 ); - signB = signExtF80UI64( uiB64 ); - return - (signA != signB) - ? signA || ! (((uiA64 | uiB64) & 0x7FFF) | uiA0 | uiB0) - : ((uiA64 == uiB64) && (uiA0 == uiB0)) - || (signA ^ softfloat_lt128( uiA64, uiA0, uiB64, uiB0 )); - -} - diff --git a/outside/softfloat-3/source/extF80_lt.c b/outside/softfloat-3/source/extF80_lt.c deleted file mode 100644 index c40c6e629..000000000 --- a/outside/softfloat-3/source/extF80_lt.c +++ /dev/null @@ -1,73 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -bool extF80_lt( extFloat80_t a, extFloat80_t b ) -{ - union { struct extFloat80M s; extFloat80_t f; } uA; - uint_fast16_t uiA64; - uint_fast64_t uiA0; - union { struct extFloat80M s; extFloat80_t f; } uB; - uint_fast16_t uiB64; - uint_fast64_t uiB0; - bool signA, signB; - - uA.f = a; - uiA64 = uA.s.signExp; - uiA0 = uA.s.signif; - uB.f = b; - uiB64 = uB.s.signExp; - uiB0 = uB.s.signif; - if ( isNaNExtF80UI( uiA64, uiA0 ) || isNaNExtF80UI( uiB64, uiB0 ) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - return false; - } - signA = signExtF80UI64( uiA64 ); - signB = signExtF80UI64( uiB64 ); - return - (signA != signB) - ? signA && (((uiA64 | uiB64) & 0x7FFF) | uiA0 | uiB0) - : ((uiA64 != uiB64) || (uiA0 != uiB0)) - && (signA ^ softfloat_lt128( uiA64, uiA0, uiB64, uiB0 )); - -} - diff --git a/outside/softfloat-3/source/extF80_lt_quiet.c b/outside/softfloat-3/source/extF80_lt_quiet.c deleted file mode 100644 index 5ddb0ba95..000000000 --- a/outside/softfloat-3/source/extF80_lt_quiet.c +++ /dev/null @@ -1,78 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -bool extF80_lt_quiet( extFloat80_t a, extFloat80_t b ) -{ - union { struct extFloat80M s; extFloat80_t f; } uA; - uint_fast16_t uiA64; - uint_fast64_t uiA0; - union { struct extFloat80M s; extFloat80_t f; } uB; - uint_fast16_t uiB64; - uint_fast64_t uiB0; - bool signA, signB; - - uA.f = a; - uiA64 = uA.s.signExp; - uiA0 = uA.s.signif; - uB.f = b; - uiB64 = uB.s.signExp; - uiB0 = uB.s.signif; - if ( isNaNExtF80UI( uiA64, uiA0 ) || isNaNExtF80UI( uiB64, uiB0 ) ) { - if ( - softfloat_isSigNaNExtF80UI( uiA64, uiA0 ) - || softfloat_isSigNaNExtF80UI( uiB64, uiB0 ) - ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - } - return false; - } - signA = signExtF80UI64( uiA64 ); - signB = signExtF80UI64( uiB64 ); - return - (signA != signB) - ? signA && (((uiA64 | uiB64) & 0x7FFF) | uiA0 | uiB0) - : ((uiA64 != uiB64) || (uiA0 != uiB0)) - && (signA ^ softfloat_lt128( uiA64, uiA0, uiB64, uiB0 )); - -} - diff --git a/outside/softfloat-3/source/extF80_mul.c b/outside/softfloat-3/source/extF80_mul.c deleted file mode 100644 index e0a1e6197..000000000 --- a/outside/softfloat-3/source/extF80_mul.c +++ /dev/null @@ -1,158 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -extFloat80_t extF80_mul( extFloat80_t a, extFloat80_t b ) -{ - union { struct extFloat80M s; extFloat80_t f; } uA; - uint_fast16_t uiA64; - uint_fast64_t uiA0; - bool signA; - int_fast32_t expA; - uint_fast64_t sigA; - union { struct extFloat80M s; extFloat80_t f; } uB; - uint_fast16_t uiB64; - uint_fast64_t uiB0; - bool signB; - int_fast32_t expB; - uint_fast64_t sigB; - bool signZ; - uint_fast64_t magBits; - struct exp32_sig64 normExpSig; - int_fast32_t expZ; - struct uint128 sig128Z, uiZ; - uint_fast16_t uiZ64; - uint_fast64_t uiZ0; - union { struct extFloat80M s; extFloat80_t f; } uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA64 = uA.s.signExp; - uiA0 = uA.s.signif; - signA = signExtF80UI64( uiA64 ); - expA = expExtF80UI64( uiA64 ); - sigA = uiA0; - uB.f = b; - uiB64 = uB.s.signExp; - uiB0 = uB.s.signif; - signB = signExtF80UI64( uiB64 ); - expB = expExtF80UI64( uiB64 ); - sigB = uiB0; - signZ = signA ^ signB; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( expA == 0x7FFF ) { - if ( - (sigA & UINT64_C( 0x7FFFFFFFFFFFFFFF )) - || ((expB == 0x7FFF) && (sigB & UINT64_C( 0x7FFFFFFFFFFFFFFF ))) - ) { - goto propagateNaN; - } - magBits = expB | sigB; - goto infArg; - } - if ( expB == 0x7FFF ) { - if ( sigB & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) goto propagateNaN; - magBits = expA | sigA; - goto infArg; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! expA ) expA = 1; - if ( ! (sigA & UINT64_C( 0x8000000000000000 )) ) { - if ( ! sigA ) goto zero; - normExpSig = softfloat_normSubnormalExtF80Sig( sigA ); - expA += normExpSig.exp; - sigA = normExpSig.sig; - } - if ( ! expB ) expB = 1; - if ( ! (sigB & UINT64_C( 0x8000000000000000 )) ) { - if ( ! sigB ) goto zero; - normExpSig = softfloat_normSubnormalExtF80Sig( sigB ); - expB += normExpSig.exp; - sigB = normExpSig.sig; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expZ = expA + expB - 0x3FFE; - sig128Z = softfloat_mul64To128( sigA, sigB ); - if ( sig128Z.v64 < UINT64_C( 0x8000000000000000 ) ) { - --expZ; - sig128Z = - softfloat_add128( - sig128Z.v64, sig128Z.v0, sig128Z.v64, sig128Z.v0 ); - } - return - softfloat_roundPackToExtF80( - signZ, expZ, sig128Z.v64, sig128Z.v0, extF80_roundingPrecision ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - propagateNaN: - uiZ = softfloat_propagateNaNExtF80UI( uiA64, uiA0, uiB64, uiB0 ); - uiZ64 = uiZ.v64; - uiZ0 = uiZ.v0; - goto uiZ; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - infArg: - if ( ! magBits ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - uiZ64 = defaultNaNExtF80UI64; - uiZ0 = defaultNaNExtF80UI0; - } else { - uiZ64 = packToExtF80UI64( signZ, 0x7FFF ); - uiZ0 = UINT64_C( 0x8000000000000000 ); - } - goto uiZ; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - zero: - uiZ64 = packToExtF80UI64( signZ, 0 ); - uiZ0 = 0; - uiZ: - uZ.s.signExp = uiZ64; - uZ.s.signif = uiZ0; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/extF80_rem.c b/outside/softfloat-3/source/extF80_rem.c deleted file mode 100644 index 42a33b877..000000000 --- a/outside/softfloat-3/source/extF80_rem.c +++ /dev/null @@ -1,225 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the -University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -extFloat80_t extF80_rem( extFloat80_t a, extFloat80_t b ) -{ - union { struct extFloat80M s; extFloat80_t f; } uA; - uint_fast16_t uiA64; - uint_fast64_t uiA0; - bool signA; - int_fast32_t expA; - uint_fast64_t sigA; - union { struct extFloat80M s; extFloat80_t f; } uB; - uint_fast16_t uiB64; - uint_fast64_t uiB0; - int_fast32_t expB; - uint_fast64_t sigB; - struct exp32_sig64 normExpSig; - int_fast32_t expDiff; - struct uint128 rem, shiftedSigB; - uint_fast32_t q, recip32; - uint_fast64_t q64; - struct uint128 term, altRem, meanRem; - bool signRem; - struct uint128 uiZ; - uint_fast16_t uiZ64; - uint_fast64_t uiZ0; - union { struct extFloat80M s; extFloat80_t f; } uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA64 = uA.s.signExp; - uiA0 = uA.s.signif; - signA = signExtF80UI64( uiA64 ); - expA = expExtF80UI64( uiA64 ); - sigA = uiA0; - uB.f = b; - uiB64 = uB.s.signExp; - uiB0 = uB.s.signif; - expB = expExtF80UI64( uiB64 ); - sigB = uiB0; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( expA == 0x7FFF ) { - if ( - (sigA & UINT64_C( 0x7FFFFFFFFFFFFFFF )) - || ((expB == 0x7FFF) && (sigB & UINT64_C( 0x7FFFFFFFFFFFFFFF ))) - ) { - goto propagateNaN; - } - goto invalid; - } - if ( expB == 0x7FFF ) { - if ( sigB & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) goto propagateNaN; - /*-------------------------------------------------------------------- - | Argument b is an infinity. Doubling `expB' is an easy way to ensure - | that `expDiff' later is less than -1, which will result in returning - | a canonicalized version of argument a. - *--------------------------------------------------------------------*/ - expB += expB; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! expB ) expB = 1; - if ( ! (sigB & UINT64_C( 0x8000000000000000 )) ) { - if ( ! sigB ) goto invalid; - normExpSig = softfloat_normSubnormalExtF80Sig( sigB ); - expB += normExpSig.exp; - sigB = normExpSig.sig; - } - if ( ! expA ) expA = 1; - if ( ! (sigA & UINT64_C( 0x8000000000000000 )) ) { - if ( ! sigA ) { - expA = 0; - goto copyA; - } - normExpSig = softfloat_normSubnormalExtF80Sig( sigA ); - expA += normExpSig.exp; - sigA = normExpSig.sig; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expDiff = expA - expB; - if ( expDiff < -1 ) goto copyA; - rem = softfloat_shortShiftLeft128( 0, sigA, 32 ); - shiftedSigB = softfloat_shortShiftLeft128( 0, sigB, 32 ); - if ( expDiff < 1 ) { - if ( expDiff ) { - --expB; - shiftedSigB = softfloat_shortShiftLeft128( 0, sigB, 33 ); - q = 0; - } else { - q = (sigB <= sigA); - if ( q ) { - rem = - softfloat_sub128( - rem.v64, rem.v0, shiftedSigB.v64, shiftedSigB.v0 ); - } - } - } else { - recip32 = softfloat_approxRecip32_1( sigB>>32 ); - expDiff -= 30; - for (;;) { - q64 = (uint_fast64_t) (uint32_t) (rem.v64>>2) * recip32; - if ( expDiff < 0 ) break; - q = (q64 + 0x80000000)>>32; - rem = softfloat_shortShiftLeft128( rem.v64, rem.v0, 29 ); - term = softfloat_mul64ByShifted32To128( sigB, q ); - rem = softfloat_sub128( rem.v64, rem.v0, term.v64, term.v0 ); - if ( rem.v64 & UINT64_C( 0x8000000000000000 ) ) { - rem = - softfloat_add128( - rem.v64, rem.v0, shiftedSigB.v64, shiftedSigB.v0 ); - } - expDiff -= 29; - } - /*-------------------------------------------------------------------- - | (`expDiff' cannot be less than -29 here.) - *--------------------------------------------------------------------*/ - q = (uint32_t) (q64>>32)>>(~expDiff & 31); - rem = softfloat_shortShiftLeft128( rem.v64, rem.v0, expDiff + 30 ); - term = softfloat_mul64ByShifted32To128( sigB, q ); - rem = softfloat_sub128( rem.v64, rem.v0, term.v64, term.v0 ); - if ( rem.v64 & UINT64_C( 0x8000000000000000 ) ) { - altRem = - softfloat_add128( - rem.v64, rem.v0, shiftedSigB.v64, shiftedSigB.v0 ); - goto selectRem; - } - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - do { - altRem = rem; - ++q; - rem = - softfloat_sub128( - rem.v64, rem.v0, shiftedSigB.v64, shiftedSigB.v0 ); - } while ( ! (rem.v64 & UINT64_C( 0x8000000000000000 )) ); - selectRem: - meanRem = softfloat_add128( rem.v64, rem.v0, altRem.v64, altRem.v0 ); - if ( - (meanRem.v64 & UINT64_C( 0x8000000000000000 )) - || (! (meanRem.v64 | meanRem.v0) && (q & 1)) - ) { - rem = altRem; - } - signRem = signA; - if ( rem.v64 & UINT64_C( 0x8000000000000000 ) ) { - signRem = ! signRem; - rem = softfloat_sub128( 0, 0, rem.v64, rem.v0 ); - } - return - softfloat_normRoundPackToExtF80( - signRem, rem.v64 | rem.v0 ? expB + 32 : 0, rem.v64, rem.v0, 80 ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - propagateNaN: - uiZ = softfloat_propagateNaNExtF80UI( uiA64, uiA0, uiB64, uiB0 ); - uiZ64 = uiZ.v64; - uiZ0 = uiZ.v0; - goto uiZ; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - invalid: - softfloat_raiseFlags( softfloat_flag_invalid ); - uiZ64 = defaultNaNExtF80UI64; - uiZ0 = defaultNaNExtF80UI0; - goto uiZ; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - copyA: - if ( expA < 1 ) { - sigA >>= 1 - expA; - expA = 0; - } - uiZ64 = packToExtF80UI64( signA, expA ); - uiZ0 = sigA; - uiZ: - uZ.s.signExp = uiZ64; - uZ.s.signif = uiZ0; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/extF80_roundToInt.c b/outside/softfloat-3/source/extF80_roundToInt.c deleted file mode 100644 index 2bf6da292..000000000 --- a/outside/softfloat-3/source/extF80_roundToInt.c +++ /dev/null @@ -1,147 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -extFloat80_t - extF80_roundToInt( extFloat80_t a, uint_fast8_t roundingMode, bool exact ) -{ - union { struct extFloat80M s; extFloat80_t f; } uA; - uint_fast16_t uiA64, signUI64; - int_fast32_t exp; - uint_fast64_t sigA; - uint_fast16_t uiZ64; - uint_fast64_t sigZ; - struct exp32_sig64 normExpSig; - struct uint128 uiZ; - uint_fast64_t lastBitMask, roundBitsMask; - union { struct extFloat80M s; extFloat80_t f; } uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA64 = uA.s.signExp; - signUI64 = uiA64 & packToExtF80UI64( 1, 0 ); - exp = expExtF80UI64( uiA64 ); - sigA = uA.s.signif; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! (sigA & UINT64_C( 0x8000000000000000 )) && (exp != 0x7FFF) ) { - if ( ! sigA ) { - uiZ64 = signUI64; - sigZ = 0; - goto uiZ; - } - normExpSig = softfloat_normSubnormalExtF80Sig( sigA ); - exp += normExpSig.exp; - sigA = normExpSig.sig; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( 0x403E <= exp ) { - if ( exp == 0x7FFF ) { - if ( sigA & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) { - uiZ = softfloat_propagateNaNExtF80UI( uiA64, sigA, 0, 0 ); - uiZ64 = uiZ.v64; - sigZ = uiZ.v0; - goto uiZ; - } - sigZ = UINT64_C( 0x8000000000000000 ); - } else { - sigZ = sigA; - } - uiZ64 = signUI64 | exp; - goto uiZ; - } - if ( exp <= 0x3FFE ) { - if ( exact ) softfloat_exceptionFlags |= softfloat_flag_inexact; - switch ( roundingMode ) { - case softfloat_round_near_even: - if ( ! (sigA & UINT64_C( 0x7FFFFFFFFFFFFFFF )) ) break; - case softfloat_round_near_maxMag: - if ( exp == 0x3FFE ) goto mag1; - break; - case softfloat_round_min: - if ( signUI64 ) goto mag1; - break; - case softfloat_round_max: - if ( ! signUI64 ) goto mag1; - break; - } - uiZ64 = signUI64; - sigZ = 0; - goto uiZ; - mag1: - uiZ64 = signUI64 | 0x3FFF; - sigZ = UINT64_C( 0x8000000000000000 ); - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiZ64 = signUI64 | exp; - lastBitMask = (uint_fast64_t) 1<<(0x403E - exp); - roundBitsMask = lastBitMask - 1; - sigZ = sigA; - if ( roundingMode == softfloat_round_near_maxMag ) { - sigZ += lastBitMask>>1; - } else if ( roundingMode == softfloat_round_near_even ) { - sigZ += lastBitMask>>1; - if ( ! (sigZ & roundBitsMask) ) sigZ &= ~lastBitMask; - } else if ( - roundingMode == (signUI64 ? softfloat_round_min : softfloat_round_max) - ) { - sigZ += roundBitsMask; - } - sigZ &= ~roundBitsMask; - if ( ! sigZ ) { - ++uiZ64; - sigZ = UINT64_C( 0x8000000000000000 ); - } - if ( exact && (sigZ != sigA) ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; - } - uiZ: - uZ.s.signExp = uiZ64; - uZ.s.signif = sigZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/extF80_sqrt.c b/outside/softfloat-3/source/extF80_sqrt.c deleted file mode 100644 index a8d6c3961..000000000 --- a/outside/softfloat-3/source/extF80_sqrt.c +++ /dev/null @@ -1,168 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -extFloat80_t extF80_sqrt( extFloat80_t a ) -{ - union { struct extFloat80M s; extFloat80_t f; } uA; - uint_fast16_t uiA64; - uint_fast64_t uiA0; - bool signA; - int_fast32_t expA; - uint_fast64_t sigA; - struct uint128 uiZ; - uint_fast16_t uiZ64; - uint_fast64_t uiZ0; - struct exp32_sig64 normExpSig; - int_fast32_t expZ; - uint_fast32_t sig32A, recipSqrt32, sig32Z; - struct uint128 rem; - uint_fast64_t q, sigZ, x64; - struct uint128 term; - uint_fast64_t sigZExtra; - union { struct extFloat80M s; extFloat80_t f; } uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA64 = uA.s.signExp; - uiA0 = uA.s.signif; - signA = signExtF80UI64( uiA64 ); - expA = expExtF80UI64( uiA64 ); - sigA = uiA0; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( expA == 0x7FFF ) { - if ( sigA & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) { - uiZ = softfloat_propagateNaNExtF80UI( uiA64, uiA0, 0, 0 ); - uiZ64 = uiZ.v64; - uiZ0 = uiZ.v0; - goto uiZ; - } - if ( ! signA ) return a; - goto invalid; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( signA ) { - if ( ! sigA ) goto zero; - goto invalid; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! expA ) expA = 1; - if ( ! (sigA & UINT64_C( 0x8000000000000000 )) ) { - if ( ! sigA ) goto zero; - normExpSig = softfloat_normSubnormalExtF80Sig( sigA ); - expA += normExpSig.exp; - sigA = normExpSig.sig; - } - /*------------------------------------------------------------------------ - | (`sig32Z' is guaranteed to be a lower bound on the square root of - | `sig32A', which makes `sig32Z' also a lower bound on the square root of - | `sigA'.) - *------------------------------------------------------------------------*/ - expZ = ((expA - 0x3FFF)>>1) + 0x3FFF; - expA &= 1; - sig32A = sigA>>32; - recipSqrt32 = softfloat_approxRecipSqrt32_1( expA, sig32A ); - sig32Z = ((uint_fast64_t) sig32A * recipSqrt32)>>32; - if ( expA ) { - sig32Z >>= 1; - rem = softfloat_shortShiftLeft128( 0, sigA, 61 ); - } else { - rem = softfloat_shortShiftLeft128( 0, sigA, 62 ); - } - rem.v64 -= (uint_fast64_t) sig32Z * sig32Z; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - q = ((uint32_t) (rem.v64>>2) * (uint_fast64_t) recipSqrt32)>>32; - sigZ = ((uint_fast64_t) sig32Z<<32) + (q<<3); - x64 = ((uint_fast64_t) sig32Z<<32) + sigZ; - term = softfloat_mul64ByShifted32To128( x64, q ); - rem = softfloat_shortShiftLeft128( rem.v64, rem.v0, 29 ); - rem = softfloat_sub128( rem.v64, rem.v0, term.v64, term.v0 ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - q = (((uint32_t) (rem.v64>>2) * (uint_fast64_t) recipSqrt32)>>32) + 2; - x64 = sigZ; - sigZ = (sigZ<<1) + (q>>25); - sigZExtra = (uint64_t) (q<<39); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( (q & 0xFFFFFF) <= 2 ) { - q &= ~(uint_fast64_t) 0xFFFF; - sigZExtra = (uint64_t) (q<<39); - term = softfloat_mul64ByShifted32To128( x64 + (q>>27), q ); - x64 = (uint32_t) (q<<5) * (uint_fast64_t) (uint32_t) q; - term = softfloat_add128( term.v64, term.v0, 0, x64 ); - rem = softfloat_shortShiftLeft128( rem.v64, rem.v0, 28 ); - rem = softfloat_sub128( rem.v64, rem.v0, term.v64, term.v0 ); - if ( rem.v64 & UINT64_C( 0x8000000000000000 ) ) { - if ( ! sigZExtra ) --sigZ; - --sigZExtra; - } else { - if ( rem.v64 | rem.v0 ) sigZExtra |= 1; - } - } - return - softfloat_roundPackToExtF80( - 0, expZ, sigZ, sigZExtra, extF80_roundingPrecision ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - invalid: - softfloat_raiseFlags( softfloat_flag_invalid ); - uiZ64 = defaultNaNExtF80UI64; - uiZ0 = defaultNaNExtF80UI0; - goto uiZ; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - zero: - uiZ64 = packToExtF80UI64( signA, 0 ); - uiZ0 = 0; - uiZ: - uZ.s.signExp = uiZ64; - uZ.s.signif = uiZ0; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/extF80_sub.c b/outside/softfloat-3/source/extF80_sub.c deleted file mode 100644 index 64dda1b51..000000000 --- a/outside/softfloat-3/source/extF80_sub.c +++ /dev/null @@ -1,80 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -extFloat80_t extF80_sub( extFloat80_t a, extFloat80_t b ) -{ - union { struct extFloat80M s; extFloat80_t f; } uA; - uint_fast16_t uiA64; - uint_fast64_t uiA0; - bool signA; - union { struct extFloat80M s; extFloat80_t f; } uB; - uint_fast16_t uiB64; - uint_fast64_t uiB0; - bool signB; -#if ! defined INLINE_LEVEL || (INLINE_LEVEL < 2) - extFloat80_t - (*magsFuncPtr)( - uint_fast16_t, uint_fast64_t, uint_fast16_t, uint_fast64_t, bool ); -#endif - - uA.f = a; - uiA64 = uA.s.signExp; - uiA0 = uA.s.signif; - signA = signExtF80UI64( uiA64 ); - uB.f = b; - uiB64 = uB.s.signExp; - uiB0 = uB.s.signif; - signB = signExtF80UI64( uiB64 ); -#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL) - if ( signA == signB ) { - return softfloat_subMagsExtF80( uiA64, uiA0, uiB64, uiB0, signA ); - } else { - return softfloat_addMagsExtF80( uiA64, uiA0, uiB64, uiB0, signA ); - } -#else - magsFuncPtr = - (signA == signB) ? softfloat_subMagsExtF80 : softfloat_addMagsExtF80; - return (*magsFuncPtr)( uiA64, uiA0, uiB64, uiB0, signA ); -#endif - -} - diff --git a/outside/softfloat-3/source/extF80_to_f128.c b/outside/softfloat-3/source/extF80_to_f128.c deleted file mode 100644 index c4d75aa39..000000000 --- a/outside/softfloat-3/source/extF80_to_f128.c +++ /dev/null @@ -1,75 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -float128_t extF80_to_f128( extFloat80_t a ) -{ - union { struct extFloat80M s; extFloat80_t f; } uA; - uint_fast16_t uiA64; - uint_fast64_t uiA0; - uint_fast16_t exp; - uint_fast64_t frac; - struct commonNaN commonNaN; - struct uint128 uiZ; - bool sign; - struct uint128 frac128; - union ui128_f128 uZ; - - uA.f = a; - uiA64 = uA.s.signExp; - uiA0 = uA.s.signif; - exp = expExtF80UI64( uiA64 ); - frac = uiA0 & UINT64_C( 0x7FFFFFFFFFFFFFFF ); - if ( (exp == 0x7FFF) && frac ) { - softfloat_extF80UIToCommonNaN( uiA64, uiA0, &commonNaN ); - uiZ = softfloat_commonNaNToF128UI( &commonNaN ); - } else { - sign = signExtF80UI64( uiA64 ); - frac128 = softfloat_shortShiftLeft128( 0, frac, 49 ); - uiZ.v64 = packToF128UI64( sign, exp, frac128.v64 ); - uiZ.v0 = frac128.v0; - } - uZ.ui = uiZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/extF80_to_f16.c b/outside/softfloat-3/source/extF80_to_f16.c deleted file mode 100644 index 8f89dd3d7..000000000 --- a/outside/softfloat-3/source/extF80_to_f16.c +++ /dev/null @@ -1,96 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -float16_t extF80_to_f16( extFloat80_t a ) -{ - union { struct extFloat80M s; extFloat80_t f; } uA; - uint_fast16_t uiA64; - uint_fast64_t uiA0; - bool sign; - int_fast32_t exp; - uint_fast64_t sig; - struct commonNaN commonNaN; - uint_fast16_t uiZ, sig16; - union ui16_f16 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA64 = uA.s.signExp; - uiA0 = uA.s.signif; - sign = signExtF80UI64( uiA64 ); - exp = expExtF80UI64( uiA64 ); - sig = uiA0; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp == 0x7FFF ) { - if ( sig & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) { - softfloat_extF80UIToCommonNaN( uiA64, uiA0, &commonNaN ); - uiZ = softfloat_commonNaNToF16UI( &commonNaN ); - } else { - uiZ = packToF16UI( sign, 0x1F, 0 ); - } - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sig16 = softfloat_shortShiftRightJam64( sig, 49 ); - if ( ! (exp | sig16) ) { - uiZ = packToF16UI( sign, 0, 0 ); - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - exp -= 0x3FF1; - if ( sizeof (int_fast16_t) < sizeof (int_fast32_t) ) { - if ( exp < -0x40 ) exp = -0x40; - } - return softfloat_roundPackToF16( sign, exp, sig16 ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/extF80_to_f32.c b/outside/softfloat-3/source/extF80_to_f32.c deleted file mode 100644 index 2eeaae943..000000000 --- a/outside/softfloat-3/source/extF80_to_f32.c +++ /dev/null @@ -1,96 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -float32_t extF80_to_f32( extFloat80_t a ) -{ - union { struct extFloat80M s; extFloat80_t f; } uA; - uint_fast16_t uiA64; - uint_fast64_t uiA0; - bool sign; - int_fast32_t exp; - uint_fast64_t sig; - struct commonNaN commonNaN; - uint_fast32_t uiZ, sig32; - union ui32_f32 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA64 = uA.s.signExp; - uiA0 = uA.s.signif; - sign = signExtF80UI64( uiA64 ); - exp = expExtF80UI64( uiA64 ); - sig = uiA0; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp == 0x7FFF ) { - if ( sig & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) { - softfloat_extF80UIToCommonNaN( uiA64, uiA0, &commonNaN ); - uiZ = softfloat_commonNaNToF32UI( &commonNaN ); - } else { - uiZ = packToF32UI( sign, 0xFF, 0 ); - } - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sig32 = softfloat_shortShiftRightJam64( sig, 33 ); - if ( ! (exp | sig32) ) { - uiZ = packToF32UI( sign, 0, 0 ); - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - exp -= 0x3F81; - if ( sizeof (int_fast16_t) < sizeof (int_fast32_t) ) { - if ( exp < -0x1000 ) exp = -0x1000; - } - return softfloat_roundPackToF32( sign, exp, sig32 ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/extF80_to_f64.c b/outside/softfloat-3/source/extF80_to_f64.c deleted file mode 100644 index 4574fd6d0..000000000 --- a/outside/softfloat-3/source/extF80_to_f64.c +++ /dev/null @@ -1,96 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -float64_t extF80_to_f64( extFloat80_t a ) -{ - union { struct extFloat80M s; extFloat80_t f; } uA; - uint_fast16_t uiA64; - uint_fast64_t uiA0; - bool sign; - int_fast32_t exp; - uint_fast64_t sig; - struct commonNaN commonNaN; - uint_fast64_t uiZ; - union ui64_f64 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA64 = uA.s.signExp; - uiA0 = uA.s.signif; - sign = signExtF80UI64( uiA64 ); - exp = expExtF80UI64( uiA64 ); - sig = uiA0; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! (exp | sig) ) { - uiZ = packToF64UI( sign, 0, 0 ); - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp == 0x7FFF ) { - if ( sig & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) { - softfloat_extF80UIToCommonNaN( uiA64, uiA0, &commonNaN ); - uiZ = softfloat_commonNaNToF64UI( &commonNaN ); - } else { - uiZ = packToF64UI( sign, 0x7FF, 0 ); - } - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sig = softfloat_shortShiftRightJam64( sig, 1 ); - exp -= 0x3C01; - if ( sizeof (int_fast16_t) < sizeof (int_fast32_t) ) { - if ( exp < -0x1000 ) exp = -0x1000; - } - return softfloat_roundPackToF64( sign, exp, sig ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/extF80_to_i32.c b/outside/softfloat-3/source/extF80_to_i32.c deleted file mode 100644 index cd510bfc9..000000000 --- a/outside/softfloat-3/source/extF80_to_i32.c +++ /dev/null @@ -1,83 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the -University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -int_fast32_t - extF80_to_i32( extFloat80_t a, uint_fast8_t roundingMode, bool exact ) -{ - union { struct extFloat80M s; extFloat80_t f; } uA; - uint_fast16_t uiA64; - bool sign; - int_fast32_t exp; - uint_fast64_t sig; - int_fast32_t shiftDist; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA64 = uA.s.signExp; - sign = signExtF80UI64( uiA64 ); - exp = expExtF80UI64( uiA64 ); - sig = uA.s.signif; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ -#if (i32_fromNaN != i32_fromPosOverflow) || (i32_fromNaN != i32_fromNegOverflow) - if ( (exp == 0x7FFF) && (sig & UINT64_C( 0x7FFFFFFFFFFFFFFF )) ) { -#if (i32_fromNaN == i32_fromPosOverflow) - sign = 0; -#elif (i32_fromNaN == i32_fromNegOverflow) - sign = 1; -#else - softfloat_raiseFlags( softfloat_flag_invalid ); - return i32_fromNaN; -#endif - } -#endif - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - shiftDist = 0x4032 - exp; - if ( shiftDist <= 0 ) shiftDist = 1; - sig = softfloat_shiftRightJam64( sig, shiftDist ); - return softfloat_roundToI32( sign, sig, roundingMode, exact ); - -} - diff --git a/outside/softfloat-3/source/extF80_to_i32_r_minMag.c b/outside/softfloat-3/source/extF80_to_i32_r_minMag.c deleted file mode 100644 index 0e1dd8089..000000000 --- a/outside/softfloat-3/source/extF80_to_i32_r_minMag.c +++ /dev/null @@ -1,97 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -int_fast32_t extF80_to_i32_r_minMag( extFloat80_t a, bool exact ) -{ - union { struct extFloat80M s; extFloat80_t f; } uA; - uint_fast16_t uiA64; - int_fast32_t exp; - uint_fast64_t sig; - int_fast32_t shiftDist; - bool sign; - int_fast32_t absZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA64 = uA.s.signExp; - exp = expExtF80UI64( uiA64 ); - sig = uA.s.signif; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - shiftDist = 0x403E - exp; - if ( 64 <= shiftDist ) { - if ( exact && (exp | sig) ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; - } - return 0; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sign = signExtF80UI64( uiA64 ); - if ( shiftDist < 33 ) { - if ( - (uiA64 == packToExtF80UI64( 1, 0x401E )) - && (sig < UINT64_C( 0x8000000100000000 )) - ) { - if ( exact && (sig & UINT64_C( 0x00000000FFFFFFFF )) ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; - } - return -0x7FFFFFFF - 1; - } - softfloat_raiseFlags( softfloat_flag_invalid ); - return - (exp == 0x7FFF) && (sig & UINT64_C( 0x7FFFFFFFFFFFFFFF )) - ? i32_fromNaN - : sign ? i32_fromNegOverflow : i32_fromPosOverflow; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - absZ = sig>>shiftDist; - if ( exact && ((uint_fast64_t) (uint_fast32_t) absZ< -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -int_fast64_t - extF80_to_i64( extFloat80_t a, uint_fast8_t roundingMode, bool exact ) -{ - union { struct extFloat80M s; extFloat80_t f; } uA; - uint_fast16_t uiA64; - bool sign; - int_fast32_t exp; - uint_fast64_t sig; - int_fast32_t shiftDist; - uint_fast64_t sigExtra; - struct uint64_extra sig64Extra; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA64 = uA.s.signExp; - sign = signExtF80UI64( uiA64 ); - exp = expExtF80UI64( uiA64 ); - sig = uA.s.signif; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - shiftDist = 0x403E - exp; - if ( shiftDist <= 0 ) { - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - if ( shiftDist ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - return - (exp == 0x7FFF) && (sig & UINT64_C( 0x7FFFFFFFFFFFFFFF )) - ? i64_fromNaN - : sign ? i64_fromNegOverflow : i64_fromPosOverflow; - } - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - sigExtra = 0; - } else { - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - sig64Extra = softfloat_shiftRightJam64Extra( sig, 0, shiftDist ); - sig = sig64Extra.v; - sigExtra = sig64Extra.extra; - } - return softfloat_roundToI64( sign, sig, sigExtra, roundingMode, exact ); - -} - diff --git a/outside/softfloat-3/source/extF80_to_i64_r_minMag.c b/outside/softfloat-3/source/extF80_to_i64_r_minMag.c deleted file mode 100644 index d977c8370..000000000 --- a/outside/softfloat-3/source/extF80_to_i64_r_minMag.c +++ /dev/null @@ -1,94 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -int_fast64_t extF80_to_i64_r_minMag( extFloat80_t a, bool exact ) -{ - union { struct extFloat80M s; extFloat80_t f; } uA; - uint_fast16_t uiA64; - int_fast32_t exp; - uint_fast64_t sig; - int_fast32_t shiftDist; - bool sign; - int_fast64_t absZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA64 = uA.s.signExp; - exp = expExtF80UI64( uiA64 ); - sig = uA.s.signif; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - shiftDist = 0x403E - exp; - if ( 64 <= shiftDist ) { - if ( exact && (exp | sig) ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; - } - return 0; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sign = signExtF80UI64( uiA64 ); - if ( shiftDist <= 0 ) { - if ( - (uiA64 == packToExtF80UI64( 1, 0x403E )) - && (sig == UINT64_C( 0x8000000000000000 )) - ) { - return -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1; - } - softfloat_raiseFlags( softfloat_flag_invalid ); - return - (exp == 0x7FFF) && (sig & UINT64_C( 0x7FFFFFFFFFFFFFFF )) - ? i64_fromNaN - : sign ? i64_fromNegOverflow : i64_fromPosOverflow; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - absZ = sig>>shiftDist; - if ( exact && (uint64_t) (sig<<(-shiftDist & 63)) ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; - } - return sign ? -absZ : absZ; - -} - diff --git a/outside/softfloat-3/source/extF80_to_ui32.c b/outside/softfloat-3/source/extF80_to_ui32.c deleted file mode 100644 index 00aa7fe2b..000000000 --- a/outside/softfloat-3/source/extF80_to_ui32.c +++ /dev/null @@ -1,83 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the -University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -uint_fast32_t - extF80_to_ui32( extFloat80_t a, uint_fast8_t roundingMode, bool exact ) -{ - union { struct extFloat80M s; extFloat80_t f; } uA; - uint_fast16_t uiA64; - bool sign; - int_fast32_t exp; - uint_fast64_t sig; - int_fast32_t shiftDist; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA64 = uA.s.signExp; - sign = signExtF80UI64( uiA64 ); - exp = expExtF80UI64( uiA64 ); - sig = uA.s.signif; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ -#if (ui32_fromNaN != ui32_fromPosOverflow) || (ui32_fromNaN != ui32_fromNegOverflow) - if ( (exp == 0x7FFF) && (sig & UINT64_C( 0x7FFFFFFFFFFFFFFF )) ) { -#if (ui32_fromNaN == ui32_fromPosOverflow) - sign = 0; -#elif (ui32_fromNaN == ui32_fromNegOverflow) - sign = 1; -#else - softfloat_raiseFlags( softfloat_flag_invalid ); - return ui32_fromNaN; -#endif - } -#endif - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - shiftDist = 0x4032 - exp; - if ( shiftDist <= 0 ) shiftDist = 1; - sig = softfloat_shiftRightJam64( sig, shiftDist ); - return softfloat_roundToUI32( sign, sig, roundingMode, exact ); - -} - diff --git a/outside/softfloat-3/source/extF80_to_ui32_r_minMag.c b/outside/softfloat-3/source/extF80_to_ui32_r_minMag.c deleted file mode 100644 index ecea9ce98..000000000 --- a/outside/softfloat-3/source/extF80_to_ui32_r_minMag.c +++ /dev/null @@ -1,88 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -uint_fast32_t extF80_to_ui32_r_minMag( extFloat80_t a, bool exact ) -{ - union { struct extFloat80M s; extFloat80_t f; } uA; - uint_fast16_t uiA64; - int_fast32_t exp; - uint_fast64_t sig; - int_fast32_t shiftDist; - bool sign; - uint_fast32_t z; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA64 = uA.s.signExp; - exp = expExtF80UI64( uiA64 ); - sig = uA.s.signif; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - shiftDist = 0x403E - exp; - if ( 64 <= shiftDist ) { - if ( exact && (exp | sig) ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; - } - return 0; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sign = signExtF80UI64( uiA64 ); - if ( sign || (shiftDist < 32) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - return - (exp == 0x7FFF) && (sig & UINT64_C( 0x7FFFFFFFFFFFFFFF )) - ? ui32_fromNaN - : sign ? ui32_fromNegOverflow : ui32_fromPosOverflow; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - z = sig>>shiftDist; - if ( exact && ((uint_fast64_t) z< -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -uint_fast64_t - extF80_to_ui64( extFloat80_t a, uint_fast8_t roundingMode, bool exact ) -{ - union { struct extFloat80M s; extFloat80_t f; } uA; - uint_fast16_t uiA64; - bool sign; - int_fast32_t exp; - uint_fast64_t sig; - int_fast32_t shiftDist; - uint_fast64_t sigExtra; - struct uint64_extra sig64Extra; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA64 = uA.s.signExp; - sign = signExtF80UI64( uiA64 ); - exp = expExtF80UI64( uiA64 ); - sig = uA.s.signif; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - shiftDist = 0x403E - exp; - if ( shiftDist < 0 ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - return - (exp == 0x7FFF) && (sig & UINT64_C( 0x7FFFFFFFFFFFFFFF )) - ? ui64_fromNaN - : sign ? ui64_fromNegOverflow : ui64_fromPosOverflow; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sigExtra = 0; - if ( shiftDist ) { - sig64Extra = softfloat_shiftRightJam64Extra( sig, 0, shiftDist ); - sig = sig64Extra.v; - sigExtra = sig64Extra.extra; - } - return softfloat_roundToUI64( sign, sig, sigExtra, roundingMode, exact ); - -} - diff --git a/outside/softfloat-3/source/extF80_to_ui64_r_minMag.c b/outside/softfloat-3/source/extF80_to_ui64_r_minMag.c deleted file mode 100644 index 01000693a..000000000 --- a/outside/softfloat-3/source/extF80_to_ui64_r_minMag.c +++ /dev/null @@ -1,88 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -uint_fast64_t extF80_to_ui64_r_minMag( extFloat80_t a, bool exact ) -{ - union { struct extFloat80M s; extFloat80_t f; } uA; - uint_fast16_t uiA64; - int_fast32_t exp; - uint_fast64_t sig; - int_fast32_t shiftDist; - bool sign; - uint_fast64_t z; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA64 = uA.s.signExp; - exp = expExtF80UI64( uiA64 ); - sig = uA.s.signif; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - shiftDist = 0x403E - exp; - if ( 64 <= shiftDist ) { - if ( exact && (exp | sig) ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; - } - return 0; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sign = signExtF80UI64( uiA64 ); - if ( sign || (shiftDist < 0) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - return - (exp == 0x7FFF) && (sig & UINT64_C( 0x7FFFFFFFFFFFFFFF )) - ? ui64_fromNaN - : sign ? ui64_fromNegOverflow : ui64_fromPosOverflow; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - z = sig>>shiftDist; - if ( exact && (z< -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -void - f128M_add( const float128_t *aPtr, const float128_t *bPtr, float128_t *zPtr ) -{ - const uint64_t *aWPtr, *bWPtr; - uint_fast64_t uiA64, uiA0; - bool signA; - uint_fast64_t uiB64, uiB0; - bool signB; -#if ! defined INLINE_LEVEL || (INLINE_LEVEL < 2) - float128_t - (*magsFuncPtr)( - uint_fast64_t, uint_fast64_t, uint_fast64_t, uint_fast64_t, bool ); -#endif - - aWPtr = (const uint64_t *) aPtr; - bWPtr = (const uint64_t *) bPtr; - uiA64 = aWPtr[indexWord( 2, 1 )]; - uiA0 = aWPtr[indexWord( 2, 0 )]; - signA = signF128UI64( uiA64 ); - uiB64 = bWPtr[indexWord( 2, 1 )]; - uiB0 = bWPtr[indexWord( 2, 0 )]; - signB = signF128UI64( uiB64 ); -#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL) - if ( signA == signB ) { - *zPtr = softfloat_addMagsF128( uiA64, uiA0, uiB64, uiB0, signA ); - } else { - *zPtr = softfloat_subMagsF128( uiA64, uiA0, uiB64, uiB0, signA ); - } -#else - magsFuncPtr = - (signA == signB) ? softfloat_addMagsF128 : softfloat_subMagsF128; - *zPtr = (*magsFuncPtr)( uiA64, uiA0, uiB64, uiB0, signA ); -#endif - -} - -#else - -void - f128M_add( const float128_t *aPtr, const float128_t *bPtr, float128_t *zPtr ) -{ - - softfloat_addF128M( - (const uint32_t *) aPtr, - (const uint32_t *) bPtr, - (uint32_t *) zPtr, - false - ); - -} - -#endif - diff --git a/outside/softfloat-3/source/f128M_div.c b/outside/softfloat-3/source/f128M_div.c deleted file mode 100644 index aaef1342c..000000000 --- a/outside/softfloat-3/source/f128M_div.c +++ /dev/null @@ -1,187 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -void - f128M_div( const float128_t *aPtr, const float128_t *bPtr, float128_t *zPtr ) -{ - - *zPtr = f128_div( *aPtr, *bPtr ); - -} - -#else - -void - f128M_div( const float128_t *aPtr, const float128_t *bPtr, float128_t *zPtr ) -{ - const uint32_t *aWPtr, *bWPtr; - uint32_t *zWPtr, uiA96; - bool signA; - int32_t expA; - uint32_t uiB96; - bool signB; - int32_t expB; - bool signZ; - uint32_t y[5], sigB[4]; - int32_t expZ; - uint32_t recip32; - int ix; - uint64_t q64; - uint32_t q, qs[3], uiZ96; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - aWPtr = (const uint32_t *) aPtr; - bWPtr = (const uint32_t *) bPtr; - zWPtr = (uint32_t *) zPtr; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiA96 = aWPtr[indexWordHi( 4 )]; - signA = signF128UI96( uiA96 ); - expA = expF128UI96( uiA96 ); - uiB96 = bWPtr[indexWordHi( 4 )]; - signB = signF128UI96( uiB96 ); - expB = expF128UI96( uiB96 ); - signZ = signA ^ signB; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( (expA == 0x7FFF) || (expB == 0x7FFF) ) { - if ( softfloat_tryPropagateNaNF128M( aWPtr, bWPtr, zWPtr ) ) return; - if ( expA == 0x7FFF ) { - if ( expB == 0x7FFF ) goto invalid; - goto infinity; - } - goto zero; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expA = softfloat_shiftNormSigF128M( aWPtr, 13, y ); - expB = softfloat_shiftNormSigF128M( bWPtr, 13, sigB ); - if ( expA == -128 ) { - if ( expB == -128 ) goto invalid; - goto zero; - } - if ( expB == -128 ) { - softfloat_raiseFlags( softfloat_flag_infinite ); - goto infinity; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expZ = expA - expB + 0x3FFE; - if ( softfloat_compare128M( y, sigB ) < 0 ) { - --expZ; - softfloat_add128M( y, y, y ); - } - recip32 = - softfloat_approxRecip32_1( - ((uint64_t) sigB[indexWord( 4, 3 )]<<32 | sigB[indexWord( 4, 2 )]) - >>30 - ); - ix = 3; - for (;;) { - q64 = (uint64_t) y[indexWordHi( 4 )] * recip32; - q = (q64 + 0x80000000)>>32; - --ix; - if ( ix < 0 ) break; - softfloat_remStep128MBy32( y, 29, sigB, q, y ); - if ( y[indexWordHi( 4 )] & 0x80000000 ) { - --q; - softfloat_add128M( y, sigB, y ); - } - qs[ix] = q; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ((q + 1) & 7) < 2 ) { - softfloat_remStep128MBy32( y, 29, sigB, q, y ); - if ( y[indexWordHi( 4 )] & 0x80000000 ) { - --q; - softfloat_add128M( y, sigB, y ); - } else if ( softfloat_compare128M( sigB, y ) <= 0 ) { - ++q; - softfloat_sub128M( y, sigB, y ); - } - if ( - y[indexWordLo( 4 )] || y[indexWord( 4, 1 )] - || (y[indexWord( 4, 2 )] | y[indexWord( 4, 3 )]) - ) { - q |= 1; - } - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - q64 = (uint64_t) q<<28; - y[indexWord( 5, 0 )] = q64; - q64 = ((uint64_t) qs[0]<<25) + (q64>>32); - y[indexWord( 5, 1 )] = q64; - q64 = ((uint64_t) qs[1]<<22) + (q64>>32); - y[indexWord( 5, 2 )] = q64; - q64 = ((uint64_t) qs[2]<<19) + (q64>>32); - y[indexWord( 5, 3 )] = q64; - y[indexWord( 5, 4 )] = q64>>32; - softfloat_roundPackMToF128M( signZ, expZ, y, zWPtr ); - return; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - invalid: - softfloat_invalidF128M( zWPtr ); - return; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - infinity: - uiZ96 = packToF128UI96( signZ, 0x7FFF, 0 ); - goto uiZ96; - zero: - uiZ96 = packToF128UI96( signZ, 0, 0 ); - uiZ96: - zWPtr[indexWordHi( 4 )] = uiZ96; - zWPtr[indexWord( 4, 2 )] = 0; - zWPtr[indexWord( 4, 1 )] = 0; - zWPtr[indexWord( 4, 0 )] = 0; - -} - -#endif - diff --git a/outside/softfloat-3/source/f128M_eq.c b/outside/softfloat-3/source/f128M_eq.c deleted file mode 100644 index cd8b11669..000000000 --- a/outside/softfloat-3/source/f128M_eq.c +++ /dev/null @@ -1,100 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -bool f128M_eq( const float128_t *aPtr, const float128_t *bPtr ) -{ - - return f128_eq( *aPtr, *bPtr ); - -} - -#else - -bool f128M_eq( const float128_t *aPtr, const float128_t *bPtr ) -{ - const uint32_t *aWPtr, *bWPtr; - uint32_t wordA, wordB, uiA96, uiB96; - bool possibleOppositeZeros; - uint32_t mashWord; - - aWPtr = (const uint32_t *) aPtr; - bWPtr = (const uint32_t *) bPtr; - wordA = aWPtr[indexWord( 4, 2 )]; - wordB = bWPtr[indexWord( 4, 2 )]; - if ( wordA != wordB ) goto false_checkSigNaNs; - uiA96 = aWPtr[indexWordHi( 4 )]; - uiB96 = bWPtr[indexWordHi( 4 )]; - possibleOppositeZeros = false; - if ( uiA96 != uiB96 ) { - possibleOppositeZeros = (((uiA96 | uiB96) & 0x7FFFFFFF) == 0); - if ( ! possibleOppositeZeros ) goto false_checkSigNaNs; - } - mashWord = wordA | wordB; - wordA = aWPtr[indexWord( 4, 1 )]; - wordB = bWPtr[indexWord( 4, 1 )]; - if ( wordA != wordB ) goto false_checkSigNaNs; - mashWord |= wordA | wordB; - wordA = aWPtr[indexWord( 4, 0 )]; - wordB = bWPtr[indexWord( 4, 0 )]; - if ( wordA != wordB ) goto false_checkSigNaNs; - if ( possibleOppositeZeros && ((mashWord | wordA | wordB) != 0) ) { - goto false_checkSigNaNs; - } - if ( ! softfloat_isNaNF128M( aWPtr ) && ! softfloat_isNaNF128M( bWPtr ) ) { - return true; - } - false_checkSigNaNs: - if ( - f128M_isSignalingNaN( (const float128_t *) aWPtr ) - || f128M_isSignalingNaN( (const float128_t *) bWPtr ) - ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - } - return false; - -} - -#endif - diff --git a/outside/softfloat-3/source/f128M_eq_signaling.c b/outside/softfloat-3/source/f128M_eq_signaling.c deleted file mode 100644 index 328c1f9ec..000000000 --- a/outside/softfloat-3/source/f128M_eq_signaling.c +++ /dev/null @@ -1,92 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -bool f128M_eq_signaling( const float128_t *aPtr, const float128_t *bPtr ) -{ - - return f128_eq_signaling( *aPtr, *bPtr ); - -} - -#else - -bool f128M_eq_signaling( const float128_t *aPtr, const float128_t *bPtr ) -{ - const uint32_t *aWPtr, *bWPtr; - uint32_t wordA, wordB, uiA96, uiB96; - bool possibleOppositeZeros; - uint32_t mashWord; - - aWPtr = (const uint32_t *) aPtr; - bWPtr = (const uint32_t *) bPtr; - if ( softfloat_isNaNF128M( aWPtr ) || softfloat_isNaNF128M( bWPtr ) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - return false; - } - wordA = aWPtr[indexWord( 4, 2 )]; - wordB = bWPtr[indexWord( 4, 2 )]; - if ( wordA != wordB ) return false; - uiA96 = aWPtr[indexWordHi( 4 )]; - uiB96 = bWPtr[indexWordHi( 4 )]; - possibleOppositeZeros = false; - if ( uiA96 != uiB96 ) { - possibleOppositeZeros = (((uiA96 | uiB96) & 0x7FFFFFFF) == 0); - if ( ! possibleOppositeZeros ) return false; - } - mashWord = wordA | wordB; - wordA = aWPtr[indexWord( 4, 1 )]; - wordB = bWPtr[indexWord( 4, 1 )]; - if ( wordA != wordB ) return false; - mashWord |= wordA | wordB; - wordA = aWPtr[indexWord( 4, 0 )]; - wordB = bWPtr[indexWord( 4, 0 )]; - return - (wordA == wordB) - && (! possibleOppositeZeros || ((mashWord | wordA | wordB) == 0)); - -} - -#endif - diff --git a/outside/softfloat-3/source/f128M_le.c b/outside/softfloat-3/source/f128M_le.c deleted file mode 100644 index f764eeffa..000000000 --- a/outside/softfloat-3/source/f128M_le.c +++ /dev/null @@ -1,93 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -bool f128M_le( const float128_t *aPtr, const float128_t *bPtr ) -{ - - return f128_le( *aPtr, *bPtr ); - -} - -#else - -bool f128M_le( const float128_t *aPtr, const float128_t *bPtr ) -{ - const uint32_t *aWPtr, *bWPtr; - uint32_t uiA96, uiB96; - bool signA, signB; - uint32_t wordA, wordB; - - aWPtr = (const uint32_t *) aPtr; - bWPtr = (const uint32_t *) bPtr; - if ( softfloat_isNaNF128M( aWPtr ) || softfloat_isNaNF128M( bWPtr ) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - return false; - } - uiA96 = aWPtr[indexWordHi( 4 )]; - uiB96 = bWPtr[indexWordHi( 4 )]; - signA = signF128UI96( uiA96 ); - signB = signF128UI96( uiB96 ); - if ( signA != signB ) { - if ( signA ) return true; - if ( (uiA96 | uiB96) & 0x7FFFFFFF ) return false; - wordA = aWPtr[indexWord( 4, 2 )]; - wordB = bWPtr[indexWord( 4, 2 )]; - if ( wordA | wordB ) return false; - wordA = aWPtr[indexWord( 4, 1 )]; - wordB = bWPtr[indexWord( 4, 1 )]; - if ( wordA | wordB ) return false; - wordA = aWPtr[indexWord( 4, 0 )]; - wordB = bWPtr[indexWord( 4, 0 )]; - return ((wordA | wordB) == 0); - } - if ( signA ) { - aWPtr = (const uint32_t *) bPtr; - bWPtr = (const uint32_t *) aPtr; - } - return (softfloat_compare128M( aWPtr, bWPtr ) <= 0); - -} - -#endif - diff --git a/outside/softfloat-3/source/f128M_le_quiet.c b/outside/softfloat-3/source/f128M_le_quiet.c deleted file mode 100644 index 929d90fa8..000000000 --- a/outside/softfloat-3/source/f128M_le_quiet.c +++ /dev/null @@ -1,96 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -bool f128M_le_quiet( const float128_t *aPtr, const float128_t *bPtr ) -{ - - return f128_le_quiet( *aPtr, *bPtr ); - -} - -#else - -bool f128M_le_quiet( const float128_t *aPtr, const float128_t *bPtr ) -{ - const uint32_t *aWPtr, *bWPtr; - uint32_t uiA96, uiB96; - bool signA, signB; - uint32_t wordA, wordB; - - aWPtr = (const uint32_t *) aPtr; - bWPtr = (const uint32_t *) bPtr; - if ( softfloat_isNaNF128M( aWPtr ) || softfloat_isNaNF128M( bWPtr ) ) { - if ( f128M_isSignalingNaN( aPtr ) || f128M_isSignalingNaN( bPtr ) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - } - return false; - } - uiA96 = aWPtr[indexWordHi( 4 )]; - uiB96 = bWPtr[indexWordHi( 4 )]; - signA = signF128UI96( uiA96 ); - signB = signF128UI96( uiB96 ); - if ( signA != signB ) { - if ( signA ) return true; - if ( (uiA96 | uiB96) & 0x7FFFFFFF ) return false; - wordA = aWPtr[indexWord( 4, 2 )]; - wordB = bWPtr[indexWord( 4, 2 )]; - if ( wordA | wordB ) return false; - wordA = aWPtr[indexWord( 4, 1 )]; - wordB = bWPtr[indexWord( 4, 1 )]; - if ( wordA | wordB ) return false; - wordA = aWPtr[indexWord( 4, 0 )]; - wordB = bWPtr[indexWord( 4, 0 )]; - return ((wordA | wordB) == 0); - } - if ( signA ) { - aWPtr = (const uint32_t *) bPtr; - bWPtr = (const uint32_t *) aPtr; - } - return (softfloat_compare128M( aWPtr, bWPtr ) <= 0); - -} - -#endif - diff --git a/outside/softfloat-3/source/f128M_lt.c b/outside/softfloat-3/source/f128M_lt.c deleted file mode 100644 index 9509ba34d..000000000 --- a/outside/softfloat-3/source/f128M_lt.c +++ /dev/null @@ -1,93 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -bool f128M_lt( const float128_t *aPtr, const float128_t *bPtr ) -{ - - return f128_lt( *aPtr, *bPtr ); - -} - -#else - -bool f128M_lt( const float128_t *aPtr, const float128_t *bPtr ) -{ - const uint32_t *aWPtr, *bWPtr; - uint32_t uiA96, uiB96; - bool signA, signB; - uint32_t wordA, wordB; - - aWPtr = (const uint32_t *) aPtr; - bWPtr = (const uint32_t *) bPtr; - if ( softfloat_isNaNF128M( aWPtr ) || softfloat_isNaNF128M( bWPtr ) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - return false; - } - uiA96 = aWPtr[indexWordHi( 4 )]; - uiB96 = bWPtr[indexWordHi( 4 )]; - signA = signF128UI96( uiA96 ); - signB = signF128UI96( uiB96 ); - if ( signA != signB ) { - if ( signB ) return false; - if ( (uiA96 | uiB96) & 0x7FFFFFFF ) return true; - wordA = aWPtr[indexWord( 4, 2 )]; - wordB = bWPtr[indexWord( 4, 2 )]; - if ( wordA | wordB ) return true; - wordA = aWPtr[indexWord( 4, 1 )]; - wordB = bWPtr[indexWord( 4, 1 )]; - if ( wordA | wordB ) return true; - wordA = aWPtr[indexWord( 4, 0 )]; - wordB = bWPtr[indexWord( 4, 0 )]; - return ((wordA | wordB) != 0); - } - if ( signA ) { - aWPtr = (const uint32_t *) bPtr; - bWPtr = (const uint32_t *) aPtr; - } - return (softfloat_compare128M( aWPtr, bWPtr ) < 0); - -} - -#endif - diff --git a/outside/softfloat-3/source/f128M_lt_quiet.c b/outside/softfloat-3/source/f128M_lt_quiet.c deleted file mode 100644 index f90ef3301..000000000 --- a/outside/softfloat-3/source/f128M_lt_quiet.c +++ /dev/null @@ -1,96 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -bool f128M_lt_quiet( const float128_t *aPtr, const float128_t *bPtr ) -{ - - return f128_lt_quiet( *aPtr, *bPtr ); - -} - -#else - -bool f128M_lt_quiet( const float128_t *aPtr, const float128_t *bPtr ) -{ - const uint32_t *aWPtr, *bWPtr; - uint32_t uiA96, uiB96; - bool signA, signB; - uint32_t wordA, wordB; - - aWPtr = (const uint32_t *) aPtr; - bWPtr = (const uint32_t *) bPtr; - if ( softfloat_isNaNF128M( aWPtr ) || softfloat_isNaNF128M( bWPtr ) ) { - if ( f128M_isSignalingNaN( aPtr ) || f128M_isSignalingNaN( bPtr ) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - } - return false; - } - uiA96 = aWPtr[indexWordHi( 4 )]; - uiB96 = bWPtr[indexWordHi( 4 )]; - signA = signF128UI96( uiA96 ); - signB = signF128UI96( uiB96 ); - if ( signA != signB ) { - if ( signB ) return false; - if ( (uiA96 | uiB96) & 0x7FFFFFFF ) return true; - wordA = aWPtr[indexWord( 4, 2 )]; - wordB = bWPtr[indexWord( 4, 2 )]; - if ( wordA | wordB ) return true; - wordA = aWPtr[indexWord( 4, 1 )]; - wordB = bWPtr[indexWord( 4, 1 )]; - if ( wordA | wordB ) return true; - wordA = aWPtr[indexWord( 4, 0 )]; - wordB = bWPtr[indexWord( 4, 0 )]; - return ((wordA | wordB) != 0); - } - if ( signA ) { - aWPtr = (const uint32_t *) bPtr; - bWPtr = (const uint32_t *) aPtr; - } - return (softfloat_compare128M( aWPtr, bWPtr ) < 0); - -} - -#endif - diff --git a/outside/softfloat-3/source/f128M_mul.c b/outside/softfloat-3/source/f128M_mul.c deleted file mode 100644 index c73f94f51..000000000 --- a/outside/softfloat-3/source/f128M_mul.c +++ /dev/null @@ -1,158 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -void - f128M_mul( const float128_t *aPtr, const float128_t *bPtr, float128_t *zPtr ) -{ - - *zPtr = f128_mul( *aPtr, *bPtr ); - -} - -#else - -void - f128M_mul( const float128_t *aPtr, const float128_t *bPtr, float128_t *zPtr ) -{ - const uint32_t *aWPtr, *bWPtr; - uint32_t *zWPtr; - uint32_t uiA96; - int32_t expA; - uint32_t uiB96; - int32_t expB; - bool signZ; - const uint32_t *ptr; - uint32_t uiZ96, sigA[4]; - uint_fast8_t shiftDist; - uint32_t sigB[4]; - int32_t expZ; - uint32_t sigProd[8], *extSigZPtr; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - aWPtr = (const uint32_t *) aPtr; - bWPtr = (const uint32_t *) bPtr; - zWPtr = (uint32_t *) zPtr; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiA96 = aWPtr[indexWordHi( 4 )]; - expA = expF128UI96( uiA96 ); - uiB96 = bWPtr[indexWordHi( 4 )]; - expB = expF128UI96( uiB96 ); - signZ = signF128UI96( uiA96 ) ^ signF128UI96( uiB96 ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( (expA == 0x7FFF) || (expB == 0x7FFF) ) { - if ( softfloat_tryPropagateNaNF128M( aWPtr, bWPtr, zWPtr ) ) return; - ptr = aWPtr; - if ( ! expA ) goto possiblyInvalid; - if ( ! expB ) { - ptr = bWPtr; - possiblyInvalid: - if ( - ! fracF128UI96( ptr[indexWordHi( 4 )] ) - && ! (ptr[indexWord( 4, 2 )] | ptr[indexWord( 4, 1 )] - | ptr[indexWord( 4, 0 )]) - ) { - softfloat_invalidF128M( zWPtr ); - return; - } - } - uiZ96 = packToF128UI96( signZ, 0x7FFF, 0 ); - goto uiZ96; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( expA ) { - sigA[indexWordHi( 4 )] = fracF128UI96( uiA96 ) | 0x00010000; - sigA[indexWord( 4, 2 )] = aWPtr[indexWord( 4, 2 )]; - sigA[indexWord( 4, 1 )] = aWPtr[indexWord( 4, 1 )]; - sigA[indexWord( 4, 0 )] = aWPtr[indexWord( 4, 0 )]; - } else { - expA = softfloat_shiftNormSigF128M( aWPtr, 0, sigA ); - if ( expA == -128 ) goto zero; - } - if ( expB ) { - sigB[indexWordHi( 4 )] = fracF128UI96( uiB96 ) | 0x00010000; - sigB[indexWord( 4, 2 )] = bWPtr[indexWord( 4, 2 )]; - sigB[indexWord( 4, 1 )] = bWPtr[indexWord( 4, 1 )]; - sigB[indexWord( 4, 0 )] = bWPtr[indexWord( 4, 0 )]; - } else { - expB = softfloat_shiftNormSigF128M( bWPtr, 0, sigB ); - if ( expB == -128 ) goto zero; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expZ = expA + expB - 0x4000; - softfloat_mul128MTo256M( sigA, sigB, sigProd ); - if ( - sigProd[indexWord( 8, 2 )] - || (sigProd[indexWord( 8, 1 )] | sigProd[indexWord( 8, 0 )]) - ) { - sigProd[indexWord( 8, 3 )] |= 1; - } - extSigZPtr = &sigProd[indexMultiwordHi( 8, 5 )]; - shiftDist = 16; - if ( extSigZPtr[indexWordHi( 5 )] & 2 ) { - ++expZ; - shiftDist = 15; - } - softfloat_shortShiftLeft160M( extSigZPtr, shiftDist, extSigZPtr ); - softfloat_roundPackMToF128M( signZ, expZ, extSigZPtr, zWPtr ); - return; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - zero: - uiZ96 = packToF128UI96( signZ, 0, 0 ); - uiZ96: - zWPtr[indexWordHi( 4 )] = uiZ96; - zWPtr[indexWord( 4, 2 )] = 0; - zWPtr[indexWord( 4, 1 )] = 0; - zWPtr[indexWord( 4, 0 )] = 0; - -} - -#endif - diff --git a/outside/softfloat-3/source/f128M_mulAdd.c b/outside/softfloat-3/source/f128M_mulAdd.c deleted file mode 100644 index a085c1a26..000000000 --- a/outside/softfloat-3/source/f128M_mulAdd.c +++ /dev/null @@ -1,92 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -void - f128M_mulAdd( - const float128_t *aPtr, - const float128_t *bPtr, - const float128_t *cPtr, - float128_t *zPtr - ) -{ - const uint64_t *aWPtr, *bWPtr, *cWPtr; - uint_fast64_t uiA64, uiA0; - uint_fast64_t uiB64, uiB0; - uint_fast64_t uiC64, uiC0; - - aWPtr = (const uint64_t *) aPtr; - bWPtr = (const uint64_t *) bPtr; - cWPtr = (const uint64_t *) cPtr; - uiA64 = aWPtr[indexWord( 2, 1 )]; - uiA0 = aWPtr[indexWord( 2, 0 )]; - uiB64 = bWPtr[indexWord( 2, 1 )]; - uiB0 = bWPtr[indexWord( 2, 0 )]; - uiC64 = cWPtr[indexWord( 2, 1 )]; - uiC0 = cWPtr[indexWord( 2, 0 )]; - *zPtr = softfloat_mulAddF128( uiA64, uiA0, uiB64, uiB0, uiC64, uiC0, 0 ); - -} - -#else - -void - f128M_mulAdd( - const float128_t *aPtr, - const float128_t *bPtr, - const float128_t *cPtr, - float128_t *zPtr - ) -{ - - softfloat_mulAddF128M( - (const uint32_t *) aPtr, - (const uint32_t *) bPtr, - (const uint32_t *) cPtr, - (uint32_t *) zPtr, - 0 - ); - -} - -#endif - diff --git a/outside/softfloat-3/source/f128M_rem.c b/outside/softfloat-3/source/f128M_rem.c deleted file mode 100644 index 4b11ddbdf..000000000 --- a/outside/softfloat-3/source/f128M_rem.c +++ /dev/null @@ -1,182 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -void - f128M_rem( const float128_t *aPtr, const float128_t *bPtr, float128_t *zPtr ) -{ - - *zPtr = f128_rem( *aPtr, *bPtr ); - -} - -#else - -void - f128M_rem( const float128_t *aPtr, const float128_t *bPtr, float128_t *zPtr ) -{ - const uint32_t *aWPtr, *bWPtr; - uint32_t *zWPtr, uiA96; - int32_t expA, expB; - uint32_t x[4], rem1[5], *remPtr; - bool signRem; - int32_t expDiff; - uint32_t q, recip32; - uint64_t q64; - uint32_t rem2[5], *altRemPtr, *newRemPtr, wordMeanRem; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - aWPtr = (const uint32_t *) aPtr; - bWPtr = (const uint32_t *) bPtr; - zWPtr = (uint32_t *) zPtr; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiA96 = aWPtr[indexWordHi( 4 )]; - expA = expF128UI96( uiA96 ); - expB = expF128UI96( bWPtr[indexWordHi( 4 )] ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( (expA == 0x7FFF) || (expB == 0x7FFF) ) { - if ( softfloat_tryPropagateNaNF128M( aWPtr, bWPtr, zWPtr ) ) return; - if ( expA == 0x7FFF ) goto invalid; - goto copyA; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( expA < expB - 1 ) goto copyA; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expB = softfloat_shiftNormSigF128M( bWPtr, 13, x ); - if ( expB == -128 ) goto invalid; - remPtr = &rem1[indexMultiwordLo( 5, 4 )]; - expA = softfloat_shiftNormSigF128M( aWPtr, 13, remPtr ); - if ( expA == -128 ) goto copyA; - signRem = signF128UI96( uiA96 ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expDiff = expA - expB; - if ( expDiff < 1 ) { - if ( expDiff < -1 ) goto copyA; - if ( expDiff ) { - --expB; - softfloat_add128M( x, x, x ); - q = 0; - } else { - q = (softfloat_compare128M( x, remPtr ) <= 0); - if ( q ) softfloat_sub128M( remPtr, x, remPtr ); - } - } else { - recip32 = - softfloat_approxRecip32_1( - ((uint64_t) x[indexWord( 4, 3 )]<<32 | x[indexWord( 4, 2 )]) - >>30 - ); - expDiff -= 30; - for (;;) { - q64 = (uint64_t) remPtr[indexWordHi( 4 )] * recip32; - if ( expDiff < 0 ) break; - q = (q64 + 0x80000000)>>32; - softfloat_remStep128MBy32( remPtr, 29, x, q, remPtr ); - if ( remPtr[indexWordHi( 4 )] & 0x80000000 ) { - softfloat_add128M( remPtr, x, remPtr ); - } - expDiff -= 29; - } - /*-------------------------------------------------------------------- - | (`expDiff' cannot be less than -29 here.) - *--------------------------------------------------------------------*/ - q = (uint32_t) (q64>>32)>>(~expDiff & 31); - softfloat_remStep128MBy32( remPtr, expDiff + 30, x, q, remPtr ); - if ( remPtr[indexWordHi( 4 )] & 0x80000000 ) { - altRemPtr = &rem2[indexMultiwordLo( 5, 4 )]; - softfloat_add128M( remPtr, x, altRemPtr ); - goto selectRem; - } - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - altRemPtr = &rem2[indexMultiwordLo( 5, 4 )]; - do { - ++q; - newRemPtr = altRemPtr; - softfloat_sub128M( remPtr, x, newRemPtr ); - altRemPtr = remPtr; - remPtr = newRemPtr; - } while ( ! (remPtr[indexWordHi( 4 )] & 0x80000000) ); - selectRem: - softfloat_add128M( remPtr, altRemPtr, x ); - wordMeanRem = x[indexWordHi( 4 )]; - if ( - (wordMeanRem & 0x80000000) - || (! wordMeanRem && (q & 1) && ! x[indexWord( 4, 0 )] - && ! (x[indexWord( 4, 2 )] | x[indexWord( 4, 1 )])) - ) { - remPtr = altRemPtr; - } - if ( remPtr[indexWordHi( 4 )] & 0x80000000 ) { - signRem = ! signRem; - softfloat_negX128M( remPtr ); - } - remPtr -= indexMultiwordLo( 5, 4 ); - remPtr[indexWordHi( 5 )] = 0; - softfloat_normRoundPackMToF128M( signRem, expB + 18, remPtr, zWPtr ); - return; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - invalid: - softfloat_invalidF128M( zWPtr ); - return; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - copyA: - zWPtr[indexWordHi( 4 )] = uiA96; - zWPtr[indexWord( 4, 2 )] = aWPtr[indexWord( 4, 2 )]; - zWPtr[indexWord( 4, 1 )] = aWPtr[indexWord( 4, 1 )]; - zWPtr[indexWord( 4, 0 )] = aWPtr[indexWord( 4, 0 )]; - -} - -#endif - diff --git a/outside/softfloat-3/source/f128M_roundToInt.c b/outside/softfloat-3/source/f128M_roundToInt.c deleted file mode 100644 index 8d7637b18..000000000 --- a/outside/softfloat-3/source/f128M_roundToInt.c +++ /dev/null @@ -1,216 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -void - f128M_roundToInt( - const float128_t *aPtr, - uint_fast8_t roundingMode, - bool exact, - float128_t *zPtr - ) -{ - - *zPtr = f128_roundToInt( *aPtr, roundingMode, exact ); - -} - -#else - -void - f128M_roundToInt( - const float128_t *aPtr, - uint_fast8_t roundingMode, - bool exact, - float128_t *zPtr - ) -{ - const uint32_t *aWPtr; - uint32_t *zWPtr; - uint32_t ui96; - int32_t exp; - uint32_t sigExtra; - bool sign; - uint_fast8_t bitPos; - bool roundNear; - unsigned int index, lastIndex; - bool extra; - uint32_t wordA, bit, wordZ; - uint_fast8_t carry; - uint32_t extrasMask; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - aWPtr = (const uint32_t *) aPtr; - zWPtr = (uint32_t *) zPtr; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - ui96 = aWPtr[indexWordHi( 4 )]; - exp = expF128UI96( ui96 ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp < 0x3FFF ) { - zWPtr[indexWord( 4, 2 )] = 0; - zWPtr[indexWord( 4, 1 )] = 0; - zWPtr[indexWord( 4, 0 )] = 0; - sigExtra = aWPtr[indexWord( 4, 2 )]; - if ( ! sigExtra ) { - sigExtra = aWPtr[indexWord( 4, 1 )] | aWPtr[indexWord( 4, 0 )]; - } - if ( ! sigExtra && ! (ui96 & 0x7FFFFFFF) ) goto ui96; - if ( exact ) softfloat_exceptionFlags |= softfloat_flag_inexact; - sign = signF128UI96( ui96 ); - switch ( roundingMode ) { - case softfloat_round_near_even: - if ( ! fracF128UI96( ui96 ) && ! sigExtra ) break; - case softfloat_round_near_maxMag: - if ( exp == 0x3FFE ) goto mag1; - break; - case softfloat_round_min: - if ( sign ) goto mag1; - break; - case softfloat_round_max: - if ( ! sign ) goto mag1; - break; - } - ui96 = packToF128UI96( sign, 0, 0 ); - goto ui96; - mag1: - ui96 = packToF128UI96( sign, 0x3FFF, 0 ); - goto ui96; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( 0x406F <= exp ) { - if ( - (exp == 0x7FFF) - && (fracF128UI96( ui96 ) - || (aWPtr[indexWord( 4, 2 )] | aWPtr[indexWord( 4, 1 )] - | aWPtr[indexWord( 4, 0 )])) - ) { - softfloat_propagateNaNF128M( aWPtr, 0, zWPtr ); - return; - } - zWPtr[indexWord( 4, 2 )] = aWPtr[indexWord( 4, 2 )]; - zWPtr[indexWord( 4, 1 )] = aWPtr[indexWord( 4, 1 )]; - zWPtr[indexWord( 4, 0 )] = aWPtr[indexWord( 4, 0 )]; - goto ui96; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - bitPos = 0x406F - exp; - roundNear = - (roundingMode == softfloat_round_near_maxMag) - || (roundingMode == softfloat_round_near_even); - bitPos -= roundNear; - index = indexWordLo( 4 ); - lastIndex = indexWordHi( 4 ); - extra = 0; - for (;;) { - wordA = aWPtr[index]; - if ( bitPos < 32 ) break; - if ( wordA ) extra = 1; - zWPtr[index] = 0; - index += wordIncr; - bitPos -= 32; - } - bit = (uint32_t) 1< -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -void f128M_sqrt( const float128_t *aPtr, float128_t *zPtr ) -{ - - *zPtr = f128_sqrt( *aPtr ); - -} - -#else - -void f128M_sqrt( const float128_t *aPtr, float128_t *zPtr ) -{ - const uint32_t *aWPtr; - uint32_t *zWPtr; - uint32_t uiA96; - bool signA; - int32_t rawExpA; - uint32_t rem[6]; - int32_t expA, expZ; - uint64_t rem64; - uint32_t sig32A, recipSqrt32, sig32Z, qs[3], q; - uint64_t sig64Z, x64; - uint32_t term[5], y[5], rem32; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - aWPtr = (const uint32_t *) aPtr; - zWPtr = (uint32_t *) zPtr; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiA96 = aWPtr[indexWordHi( 4 )]; - signA = signF128UI96( uiA96 ); - rawExpA = expF128UI96( uiA96 ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( rawExpA == 0x7FFF ) { - if ( - fracF128UI96( uiA96 ) - || (aWPtr[indexWord( 4, 2 )] | aWPtr[indexWord( 4, 1 )] - | aWPtr[indexWord( 4, 0 )]) - ) { - softfloat_propagateNaNF128M( aWPtr, 0, zWPtr ); - return; - } - if ( ! signA ) goto copyA; - goto invalid; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expA = softfloat_shiftNormSigF128M( aWPtr, 13 - (rawExpA & 1), rem ); - if ( expA == -128 ) goto copyA; - if ( signA ) goto invalid; - /*------------------------------------------------------------------------ - | (`sig32Z' is guaranteed to be a lower bound on the square root of - | `sig32A', which makes `sig32Z' also a lower bound on the square root of - | `sigA'.) - *------------------------------------------------------------------------*/ - expZ = ((expA - 0x3FFF)>>1) + 0x3FFE; - expA &= 1; - rem64 = (uint64_t) rem[indexWord( 4, 3 )]<<32 | rem[indexWord( 4, 2 )]; - if ( expA ) { - if ( ! rawExpA ) { - softfloat_shortShiftRight128M( rem, 1, rem ); - rem64 >>= 1; - } - sig32A = rem64>>29; - } else { - sig32A = rem64>>30; - } - recipSqrt32 = softfloat_approxRecipSqrt32_1( expA, sig32A ); - sig32Z = ((uint64_t) sig32A * recipSqrt32)>>32; - if ( expA ) sig32Z >>= 1; - qs[2] = sig32Z; - rem64 -= (uint64_t) sig32Z * sig32Z; - rem[indexWord( 4, 3 )] = rem64>>32; - rem[indexWord( 4, 2 )] = rem64; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - q = ((uint32_t) (rem64>>2) * (uint64_t) recipSqrt32)>>32; - qs[1] = q; - sig64Z = ((uint64_t) sig32Z<<32) + ((uint64_t) q<<3); - x64 = ((uint64_t) sig32Z<<32) + sig64Z; - term[indexWord( 4, 3 )] = 0; - term[indexWord( 4, 2 )] = x64>>32; - term[indexWord( 4, 1 )] = x64; - term[indexWord( 4, 0 )] = 0; - softfloat_remStep128MBy32( rem, 29, term, q, y ); - rem64 = (uint64_t) y[indexWord( 4, 3 )]<<32 | y[indexWord( 4, 2 )]; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - q = ((uint32_t) (rem64>>2) * (uint64_t) recipSqrt32)>>32; - sig64Z <<= 1; - /*------------------------------------------------------------------------ - | (Repeating this loop is a rare occurrence.) - *------------------------------------------------------------------------*/ - for (;;) { - x64 = sig64Z + (q>>26); - term[indexWord( 4, 2 )] = x64>>32; - term[indexWord( 4, 1 )] = x64; - term[indexWord( 4, 0 )] = q<<6; - term[indexWord( 4, 3 )] = 0; - softfloat_remStep128MBy32( - y, 29, term, q, &rem[indexMultiwordHi( 6, 4 )] ); - rem32 = rem[indexWordHi( 6 )]; - if ( ! (rem32 & 0x80000000) ) break; - --q; - } - qs[0] = q; - rem64 = (uint64_t) rem32<<32 | rem[indexWord( 6, 4 )]; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - q = (((uint32_t) (rem64>>2) * (uint64_t) recipSqrt32)>>32) + 2; - x64 = (uint64_t) q<<27; - y[indexWord( 5, 0 )] = x64; - x64 = ((uint64_t) qs[0]<<24) + (x64>>32); - y[indexWord( 5, 1 )] = x64; - x64 = ((uint64_t) qs[1]<<21) + (x64>>32); - y[indexWord( 5, 2 )] = x64; - x64 = ((uint64_t) qs[2]<<18) + (x64>>32); - y[indexWord( 5, 3 )] = x64; - y[indexWord( 5, 4 )] = x64>>32; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( (q & 0xF) <= 2 ) { - q &= ~3; - y[indexWordLo( 5 )] = q<<27; - term[indexWord( 5, 4 )] = 0; - term[indexWord( 5, 3 )] = 0; - term[indexWord( 5, 2 )] = 0; - term[indexWord( 5, 1 )] = q>>6; - term[indexWord( 5, 0 )] = q<<26; - softfloat_sub160M( y, term, term ); - rem[indexWord( 6, 1 )] = 0; - rem[indexWord( 6, 0 )] = 0; - softfloat_remStep160MBy32( - &rem[indexMultiwordLo( 6, 5 )], - 14, - term, - q, - &rem[indexMultiwordLo( 6, 5 )] - ); - rem32 = rem[indexWord( 6, 4 )]; - if ( rem32 & 0x80000000 ) { - softfloat_sub1X160M( y ); - } else { - if ( - rem32 || rem[indexWord( 6, 0 )] || rem[indexWord( 6, 1 )] - || (rem[indexWord( 6, 3 )] | rem[indexWord( 6, 2 )]) - ) { - y[indexWordLo( 5 )] |= 1; - } - } - } - softfloat_roundPackMToF128M( 0, expZ, y, zWPtr ); - return; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - invalid: - softfloat_invalidF128M( zWPtr ); - return; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - copyA: - zWPtr[indexWordHi( 4 )] = uiA96; - zWPtr[indexWord( 4, 2 )] = aWPtr[indexWord( 4, 2 )]; - zWPtr[indexWord( 4, 1 )] = aWPtr[indexWord( 4, 1 )]; - zWPtr[indexWord( 4, 0 )] = aWPtr[indexWord( 4, 0 )]; - -} - -#endif - diff --git a/outside/softfloat-3/source/f128M_sub.c b/outside/softfloat-3/source/f128M_sub.c deleted file mode 100644 index ed0ca149c..000000000 --- a/outside/softfloat-3/source/f128M_sub.c +++ /dev/null @@ -1,97 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -void - f128M_sub( const float128_t *aPtr, const float128_t *bPtr, float128_t *zPtr ) -{ - const uint64_t *aWPtr, *bWPtr; - uint_fast64_t uiA64, uiA0; - bool signA; - uint_fast64_t uiB64, uiB0; - bool signB; -#if ! defined INLINE_LEVEL || (INLINE_LEVEL < 2) - float128_t - (*magsFuncPtr)( - uint_fast64_t, uint_fast64_t, uint_fast64_t, uint_fast64_t, bool ); -#endif - - aWPtr = (const uint64_t *) aPtr; - bWPtr = (const uint64_t *) bPtr; - uiA64 = aWPtr[indexWord( 2, 1 )]; - uiA0 = aWPtr[indexWord( 2, 0 )]; - signA = signF128UI64( uiA64 ); - uiB64 = bWPtr[indexWord( 2, 1 )]; - uiB0 = bWPtr[indexWord( 2, 0 )]; - signB = signF128UI64( uiB64 ); -#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL) - if ( signA == signB ) { - *zPtr = softfloat_subMagsF128( uiA64, uiA0, uiB64, uiB0, signA ); - } else { - *zPtr = softfloat_addMagsF128( uiA64, uiA0, uiB64, uiB0, signA ); - } -#else - magsFuncPtr = - (signA == signB) ? softfloat_subMagsF128 : softfloat_addMagsF128; - *zPtr = (*magsFuncPtr)( uiA64, uiA0, uiB64, uiB0, signA ); -#endif - -} - -#else - -void - f128M_sub( const float128_t *aPtr, const float128_t *bPtr, float128_t *zPtr ) -{ - - softfloat_addF128M( - (const uint32_t *) aPtr, - (const uint32_t *) bPtr, - (uint32_t *) zPtr, - true - ); - -} - -#endif - diff --git a/outside/softfloat-3/source/f128M_to_extF80M.c b/outside/softfloat-3/source/f128M_to_extF80M.c deleted file mode 100644 index a3d9edcbc..000000000 --- a/outside/softfloat-3/source/f128M_to_extF80M.c +++ /dev/null @@ -1,101 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -void f128M_to_extF80M( const float128_t *aPtr, extFloat80_t *zPtr ) -{ - - *zPtr = f128_to_extF80( *aPtr ); - -} - -#else - -void f128M_to_extF80M( const float128_t *aPtr, extFloat80_t *zPtr ) -{ - const uint32_t *aWPtr; - struct extFloat80M *zSPtr; - uint32_t uiA96; - bool sign; - int32_t exp; - struct commonNaN commonNaN; - uint32_t sig[4]; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - aWPtr = (const uint32_t *) aPtr; - zSPtr = (struct extFloat80M *) zPtr; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiA96 = aWPtr[indexWordHi( 4 )]; - sign = signF128UI96( uiA96 ); - exp = expF128UI96( uiA96 ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp == 0x7FFF ) { - if ( softfloat_isNaNF128M( aWPtr ) ) { - softfloat_f128MToCommonNaN( aWPtr, &commonNaN ); - softfloat_commonNaNToExtF80M( &commonNaN, zSPtr ); - return; - } - zSPtr->signExp = packToExtF80UI64( sign, 0x7FFF ); - zSPtr->signif = UINT64_C( 0x8000000000000000 ); - return; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - exp = softfloat_shiftNormSigF128M( aWPtr, 15, sig ); - if ( exp == -128 ) { - zSPtr->signExp = packToExtF80UI64( sign, 0 ); - zSPtr->signif = 0; - return; - } - if ( sig[indexWord( 4, 0 )] ) sig[indexWord( 4, 1 )] |= 1; - softfloat_roundPackMToExtF80M( - sign, exp, &sig[indexMultiwordHi( 4, 3 )], 80, zSPtr ); - -} - -#endif - diff --git a/outside/softfloat-3/source/f128M_to_f16.c b/outside/softfloat-3/source/f128M_to_f16.c deleted file mode 100644 index 485cffaa9..000000000 --- a/outside/softfloat-3/source/f128M_to_f16.c +++ /dev/null @@ -1,113 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -float16_t f128M_to_f16( const float128_t *aPtr ) -{ - - return f128_to_f16( *aPtr ); - -} - -#else - -float16_t f128M_to_f16( const float128_t *aPtr ) -{ - const uint32_t *aWPtr; - uint32_t uiA96; - bool sign; - int32_t exp; - uint32_t frac32; - struct commonNaN commonNaN; - uint16_t uiZ, frac16; - union ui16_f16 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - aWPtr = (const uint32_t *) aPtr; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiA96 = aWPtr[indexWordHi( 4 )]; - sign = signF128UI96( uiA96 ); - exp = expF128UI96( uiA96 ); - frac32 = - fracF128UI96( uiA96 ) - | ((aWPtr[indexWord( 4, 2 )] | aWPtr[indexWord( 4, 1 )] - | aWPtr[indexWord( 4, 0 )]) - != 0); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp == 0x7FFF ) { - if ( frac32 ) { - softfloat_f128MToCommonNaN( aWPtr, &commonNaN ); - uiZ = softfloat_commonNaNToF16UI( &commonNaN ); - } else { - uiZ = packToF16UI( sign, 0x1F, 0 ); - } - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - frac16 = frac32>>2 | (frac32 & 3); - if ( ! (exp | frac16) ) { - uiZ = packToF16UI( sign, 0, 0 ); - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - exp -= 0x3FF1; - if ( sizeof (int_fast16_t) < sizeof (int32_t) ) { - if ( exp < -0x40 ) exp = -0x40; - } - return softfloat_roundPackToF16( sign, exp, frac16 | 0x4000 ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - -#endif - diff --git a/outside/softfloat-3/source/f128M_to_f32.c b/outside/softfloat-3/source/f128M_to_f32.c deleted file mode 100644 index 89d865281..000000000 --- a/outside/softfloat-3/source/f128M_to_f32.c +++ /dev/null @@ -1,109 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -float32_t f128M_to_f32( const float128_t *aPtr ) -{ - - return f128_to_f32( *aPtr ); - -} - -#else - -float32_t f128M_to_f32( const float128_t *aPtr ) -{ - const uint32_t *aWPtr; - uint32_t uiA96; - bool sign; - int32_t exp; - uint64_t frac64; - struct commonNaN commonNaN; - uint32_t uiZ, frac32; - union ui32_f32 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - aWPtr = (const uint32_t *) aPtr; - uiA96 = aWPtr[indexWordHi( 4 )]; - sign = signF128UI96( uiA96 ); - exp = expF128UI96( uiA96 ); - frac64 = - (uint64_t) fracF128UI96( uiA96 )<<32 | aWPtr[indexWord( 4, 2 )] - | ((aWPtr[indexWord( 4, 1 )] | aWPtr[indexWord( 4, 0 )]) != 0); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp == 0x7FFF ) { - if ( frac64 ) { - softfloat_f128MToCommonNaN( aWPtr, &commonNaN ); - uiZ = softfloat_commonNaNToF32UI( &commonNaN ); - } else { - uiZ = packToF32UI( sign, 0xFF, 0 ); - } - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - frac32 = softfloat_shortShiftRightJam64( frac64, 18 ); - if ( ! (exp | frac32) ) { - uiZ = packToF32UI( sign, 0, 0 ); - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - exp -= 0x3F81; - if ( sizeof (int_fast16_t) < sizeof (int32_t) ) { - if ( exp < -0x1000 ) exp = -0x1000; - } - return softfloat_roundPackToF32( sign, exp, frac32 | 0x40000000 ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - -#endif - diff --git a/outside/softfloat-3/source/f128M_to_f64.c b/outside/softfloat-3/source/f128M_to_f64.c deleted file mode 100644 index 5731491f2..000000000 --- a/outside/softfloat-3/source/f128M_to_f64.c +++ /dev/null @@ -1,112 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -float64_t f128M_to_f64( const float128_t *aPtr ) -{ - - return f128_to_f64( *aPtr ); - -} - -#else - -float64_t f128M_to_f64( const float128_t *aPtr ) -{ - const uint32_t *aWPtr; - uint32_t uiA96; - bool sign; - int32_t exp; - uint64_t frac64; - struct commonNaN commonNaN; - uint64_t uiZ; - uint32_t frac32; - union ui64_f64 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - aWPtr = (const uint32_t *) aPtr; - uiA96 = aWPtr[indexWordHi( 4 )]; - sign = signF128UI96( uiA96 ); - exp = expF128UI96( uiA96 ); - frac64 = (uint64_t) fracF128UI96( uiA96 )<<32 | aWPtr[indexWord( 4, 2 )]; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp == 0x7FFF ) { - if ( frac64 || aWPtr[indexWord( 4, 1 )] | aWPtr[indexWord( 4, 0 )] ) { - softfloat_f128MToCommonNaN( aWPtr, &commonNaN ); - uiZ = softfloat_commonNaNToF64UI( &commonNaN ); - } else { - uiZ = packToF64UI( sign, 0x7FF, 0 ); - } - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - frac32 = aWPtr[indexWord( 4, 1 )]; - frac64 = frac64<<14 | frac32>>18; - if ( (frac32 & 0x0003FFFF) || aWPtr[indexWord( 4, 0 )] ) frac64 |= 1; - if ( ! (exp | frac64) ) { - uiZ = packToF64UI( sign, 0, 0 ); - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - exp -= 0x3C01; - if ( sizeof (int_fast16_t) < sizeof (int32_t) ) { - if ( exp < -0x1000 ) exp = -0x1000; - } - return - softfloat_roundPackToF64( - sign, exp, frac64 | UINT64_C( 0x4000000000000000 ) ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - -#endif - diff --git a/outside/softfloat-3/source/f128M_to_i32.c b/outside/softfloat-3/source/f128M_to_i32.c deleted file mode 100644 index 4b0e47edd..000000000 --- a/outside/softfloat-3/source/f128M_to_i32.c +++ /dev/null @@ -1,98 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the -University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -int_fast32_t - f128M_to_i32( const float128_t *aPtr, uint_fast8_t roundingMode, bool exact ) -{ - - return f128_to_i32( *aPtr, roundingMode, exact ); - -} - -#else - -int_fast32_t - f128M_to_i32( const float128_t *aPtr, uint_fast8_t roundingMode, bool exact ) -{ - const uint32_t *aWPtr; - uint32_t uiA96; - bool sign; - int32_t exp; - uint64_t sig64; - int32_t shiftDist; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - aWPtr = (const uint32_t *) aPtr; - uiA96 = aWPtr[indexWordHi( 4 )]; - sign = signF128UI96( uiA96 ); - exp = expF128UI96( uiA96 ); - sig64 = (uint64_t) fracF128UI96( uiA96 )<<32 | aWPtr[indexWord( 4, 2 )]; - if ( aWPtr[indexWord( 4, 1 )] | aWPtr[indexWord( 4, 0 )] ) sig64 |= 1; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ -#if (i32_fromNaN != i32_fromPosOverflow) || (i32_fromNaN != i32_fromNegOverflow) - if ( (exp == 0x7FFF) && sig64 ) { -#if (i32_fromNaN == i32_fromPosOverflow) - sign = 0; -#elif (i32_fromNaN == i32_fromNegOverflow) - sign = 1; -#else - softfloat_raiseFlags( softfloat_flag_invalid ); - return i32_fromNaN; -#endif - } -#endif - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp ) sig64 |= UINT64_C( 0x0001000000000000 ); - shiftDist = 0x4023 - exp; - if ( 0 < shiftDist ) sig64 = softfloat_shiftRightJam64( sig64, shiftDist ); - return softfloat_roundToI32( sign, sig64, roundingMode, exact ); - -} - -#endif - diff --git a/outside/softfloat-3/source/f128M_to_i32_r_minMag.c b/outside/softfloat-3/source/f128M_to_i32_r_minMag.c deleted file mode 100644 index beba75296..000000000 --- a/outside/softfloat-3/source/f128M_to_i32_r_minMag.c +++ /dev/null @@ -1,106 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -int_fast32_t f128M_to_i32_r_minMag( const float128_t *aPtr, bool exact ) -{ - - return f128_to_i32_r_minMag( *aPtr, exact ); - -} - -#else - -int_fast32_t f128M_to_i32_r_minMag( const float128_t *aPtr, bool exact ) -{ - const uint32_t *aWPtr; - uint32_t uiA96; - bool sign; - int32_t exp; - uint64_t sig64; - int32_t shiftDist; - uint32_t absZ, uiZ; - union { uint32_t ui; int32_t i; } uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - aWPtr = (const uint32_t *) aPtr; - uiA96 = aWPtr[indexWordHi( 4 )]; - sign = signF128UI96( uiA96 ); - exp = expF128UI96( uiA96 ); - sig64 = (uint64_t) fracF128UI96( uiA96 )<<32 | aWPtr[indexWord( 4, 2 )]; - if ( aWPtr[indexWord( 4, 1 )] | aWPtr[indexWord( 4, 0 )] ) sig64 |= 1; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp < 0x3FFF ) { - if ( exact && (exp | sig64) ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; - } - return 0; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( 0x401F <= exp ) goto invalid; - shiftDist = 0x402F - exp; - sig64 |= UINT64_C( 0x0001000000000000 ); - absZ = sig64>>shiftDist; - uiZ = sign ? -absZ : absZ; - if ( uiZ>>31 != sign ) goto invalid; - if ( exact && ((uint64_t) absZ< -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -int_fast64_t - f128M_to_i64( const float128_t *aPtr, uint_fast8_t roundingMode, bool exact ) -{ - - return f128_to_i64( *aPtr, roundingMode, exact ); - -} - -#else - -int_fast64_t - f128M_to_i64( const float128_t *aPtr, uint_fast8_t roundingMode, bool exact ) -{ - const uint32_t *aWPtr; - uint32_t uiA96; - bool sign; - int32_t exp; - uint32_t sig96; - int32_t shiftDist; - uint32_t sig[4]; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - aWPtr = (const uint32_t *) aPtr; - uiA96 = aWPtr[indexWordHi( 4 )]; - sign = signF128UI96( uiA96 ); - exp = expF128UI96( uiA96 ); - sig96 = fracF128UI96( uiA96 ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - shiftDist = 0x404F - exp; - if ( shiftDist < 17 ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - return - (exp == 0x7FFF) - && (sig96 - || (aWPtr[indexWord( 4, 2 )] | aWPtr[indexWord( 4, 1 )] - | aWPtr[indexWord( 4, 0 )])) - ? i64_fromNaN - : sign ? i64_fromNegOverflow : i64_fromPosOverflow; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp ) sig96 |= 0x00010000; - sig[indexWord( 4, 3 )] = sig96; - sig[indexWord( 4, 2 )] = aWPtr[indexWord( 4, 2 )]; - sig[indexWord( 4, 1 )] = aWPtr[indexWord( 4, 1 )]; - sig[indexWord( 4, 0 )] = aWPtr[indexWord( 4, 0 )]; - softfloat_shiftRightJam128M( sig, shiftDist, sig ); - return - softfloat_roundMToI64( - sign, sig + indexMultiwordLo( 4, 3 ), roundingMode, exact ); - -} - -#endif - diff --git a/outside/softfloat-3/source/f128M_to_i64_r_minMag.c b/outside/softfloat-3/source/f128M_to_i64_r_minMag.c deleted file mode 100644 index e5d7eb703..000000000 --- a/outside/softfloat-3/source/f128M_to_i64_r_minMag.c +++ /dev/null @@ -1,124 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -int_fast64_t f128M_to_i64_r_minMag( const float128_t *aPtr, bool exact ) -{ - - return f128_to_i64_r_minMag( *aPtr, exact ); - -} - -#else - -int_fast64_t f128M_to_i64_r_minMag( const float128_t *aPtr, bool exact ) -{ - const uint32_t *aWPtr; - uint32_t uiA96; - bool sign; - int32_t exp; - uint32_t sig96; - int32_t shiftDist; - uint32_t sig[4]; - uint64_t uiZ; - union { uint64_t ui; int64_t i; } uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - aWPtr = (const uint32_t *) aPtr; - uiA96 = aWPtr[indexWordHi( 4 )]; - sign = signF128UI96( uiA96 ); - exp = expF128UI96( uiA96 ); - sig96 = fracF128UI96( uiA96 ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - shiftDist = 0x403E - exp; - if ( shiftDist < 0 ) goto invalid; - if ( exact ) { - if ( exp ) sig96 |= 0x00010000; - sig[indexWord( 4, 3 )] = sig96; - sig[indexWord( 4, 2 )] = aWPtr[indexWord( 4, 2 )]; - sig[indexWord( 4, 1 )] = aWPtr[indexWord( 4, 1 )]; - sig[indexWord( 4, 0 )] = aWPtr[indexWord( 4, 0 )]; - softfloat_shiftRightJam128M( sig, shiftDist + 17, sig ); - uiZ = (uint64_t) sig[indexWord( 4, 2 )]<<32 | sig[indexWord( 4, 1 )]; - if ( uiZ>>63 && (! sign || (uiZ != UINT64_C( 0x8000000000000000 ))) ) { - goto invalid; - } - if ( sig[indexWordLo( 4 )] ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; - } - } else { - if ( 64 <= shiftDist ) return 0; - uiZ = - (uint64_t) sig96<<47 - | (uint64_t) aWPtr[indexWord( 4, 2 )]<<15 - | aWPtr[indexWord( 4, 1 )]>>17; - if ( shiftDist ) { - uiZ |= UINT64_C( 0x8000000000000000 ); - uiZ >>= shiftDist; - } else { - if ( uiZ || ! sign ) goto invalid; - uiZ |= UINT64_C( 0x8000000000000000 ); - } - } - if ( sign ) uiZ = -uiZ; - uZ.ui = uiZ; - return uZ.i; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - invalid: - softfloat_raiseFlags( softfloat_flag_invalid ); - return - (exp == 0x7FFF) - && (sig96 - || (aWPtr[indexWord( 4, 2 )] | aWPtr[indexWord( 4, 1 )] - | aWPtr[indexWord( 4, 0 )])) - ? i64_fromNaN - : sign ? i64_fromNegOverflow : i64_fromPosOverflow; - -} - -#endif - diff --git a/outside/softfloat-3/source/f128M_to_ui32.c b/outside/softfloat-3/source/f128M_to_ui32.c deleted file mode 100644 index dca5db3e8..000000000 --- a/outside/softfloat-3/source/f128M_to_ui32.c +++ /dev/null @@ -1,98 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the -University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -uint_fast32_t - f128M_to_ui32( const float128_t *aPtr, uint_fast8_t roundingMode, bool exact ) -{ - - return f128_to_ui32( *aPtr, roundingMode, exact ); - -} - -#else - -uint_fast32_t - f128M_to_ui32( const float128_t *aPtr, uint_fast8_t roundingMode, bool exact ) -{ - const uint32_t *aWPtr; - uint32_t uiA96; - bool sign; - int32_t exp; - uint64_t sig64; - int32_t shiftDist; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - aWPtr = (const uint32_t *) aPtr; - uiA96 = aWPtr[indexWordHi( 4 )]; - sign = signF128UI96( uiA96 ); - exp = expF128UI96( uiA96 ); - sig64 = (uint64_t) fracF128UI96( uiA96 )<<32 | aWPtr[indexWord( 4, 2 )]; - if ( aWPtr[indexWord( 4, 1 )] | aWPtr[indexWord( 4, 0 )] ) sig64 |= 1; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ -#if (ui32_fromNaN != ui32_fromPosOverflow) || (ui32_fromNaN != ui32_fromNegOverflow) - if ( (exp == 0x7FFF) && sig64 ) { -#if (ui32_fromNaN == ui32_fromPosOverflow) - sign = 0; -#elif (ui32_fromNaN == ui32_fromNegOverflow) - sign = 1; -#else - softfloat_raiseFlags( softfloat_flag_invalid ); - return ui32_fromNaN; -#endif - } -#endif - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp ) sig64 |= UINT64_C( 0x0001000000000000 ); - shiftDist = 0x4023 - exp; - if ( 0 < shiftDist ) sig64 = softfloat_shiftRightJam64( sig64, shiftDist ); - return softfloat_roundToUI32( sign, sig64, roundingMode, exact ); - -} - -#endif - diff --git a/outside/softfloat-3/source/f128M_to_ui32_r_minMag.c b/outside/softfloat-3/source/f128M_to_ui32_r_minMag.c deleted file mode 100644 index bd0945f25..000000000 --- a/outside/softfloat-3/source/f128M_to_ui32_r_minMag.c +++ /dev/null @@ -1,102 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -uint_fast32_t f128M_to_ui32_r_minMag( const float128_t *aPtr, bool exact ) -{ - - return f128_to_ui32_r_minMag( *aPtr, exact ); - -} - -#else - -uint_fast32_t f128M_to_ui32_r_minMag( const float128_t *aPtr, bool exact ) -{ - const uint32_t *aWPtr; - uint32_t uiA96; - int32_t exp; - uint64_t sig64; - int32_t shiftDist; - bool sign; - uint32_t z; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - aWPtr = (const uint32_t *) aPtr; - uiA96 = aWPtr[indexWordHi( 4 )]; - exp = expF128UI96( uiA96 ); - sig64 = (uint64_t) fracF128UI96( uiA96 )<<32 | aWPtr[indexWord( 4, 2 )]; - if ( aWPtr[indexWord( 4, 1 )] | aWPtr[indexWord( 4, 0 )] ) sig64 |= 1; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - shiftDist = 0x402F - exp; - if ( 49 <= shiftDist ) { - if ( exact && (exp | sig64) ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; - } - return 0; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sign = signF128UI96( uiA96 ); - if ( sign || (shiftDist < 17) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - return - (exp == 0x7FFF) && sig64 ? ui32_fromNaN - : sign ? ui32_fromNegOverflow : ui32_fromPosOverflow; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sig64 |= UINT64_C( 0x0001000000000000 ); - z = sig64>>shiftDist; - if ( exact && ((uint64_t) z< -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -uint_fast64_t - f128M_to_ui64( const float128_t *aPtr, uint_fast8_t roundingMode, bool exact ) -{ - - return f128_to_ui64( *aPtr, roundingMode, exact ); - -} - -#else - -uint_fast64_t - f128M_to_ui64( const float128_t *aPtr, uint_fast8_t roundingMode, bool exact ) -{ - const uint32_t *aWPtr; - uint32_t uiA96; - bool sign; - int32_t exp; - uint32_t sig96; - int32_t shiftDist; - uint32_t sig[4]; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - aWPtr = (const uint32_t *) aPtr; - uiA96 = aWPtr[indexWordHi( 4 )]; - sign = signF128UI96( uiA96 ); - exp = expF128UI96( uiA96 ); - sig96 = fracF128UI96( uiA96 ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - shiftDist = 0x404F - exp; - if ( shiftDist < 17 ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - return - (exp == 0x7FFF) - && (sig96 - || (aWPtr[indexWord( 4, 2 )] | aWPtr[indexWord( 4, 1 )] - | aWPtr[indexWord( 4, 0 )])) - ? ui64_fromNaN - : sign ? ui64_fromNegOverflow : ui64_fromPosOverflow; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp ) sig96 |= 0x00010000; - sig[indexWord( 4, 3 )] = sig96; - sig[indexWord( 4, 2 )] = aWPtr[indexWord( 4, 2 )]; - sig[indexWord( 4, 1 )] = aWPtr[indexWord( 4, 1 )]; - sig[indexWord( 4, 0 )] = aWPtr[indexWord( 4, 0 )]; - softfloat_shiftRightJam128M( sig, shiftDist, sig ); - return - softfloat_roundMToUI64( - sign, sig + indexMultiwordLo( 4, 3 ), roundingMode, exact ); - -} - -#endif - diff --git a/outside/softfloat-3/source/f128M_to_ui64_r_minMag.c b/outside/softfloat-3/source/f128M_to_ui64_r_minMag.c deleted file mode 100644 index 0b25798a1..000000000 --- a/outside/softfloat-3/source/f128M_to_ui64_r_minMag.c +++ /dev/null @@ -1,114 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -uint_fast64_t f128M_to_ui64_r_minMag( const float128_t *aPtr, bool exact ) -{ - - return f128_to_ui64_r_minMag( *aPtr, exact ); - -} - -#else - -uint_fast64_t f128M_to_ui64_r_minMag( const float128_t *aPtr, bool exact ) -{ - const uint32_t *aWPtr; - uint32_t uiA96; - bool sign; - int32_t exp; - uint32_t sig96; - int32_t shiftDist; - uint32_t sig[4]; - uint64_t z; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - aWPtr = (const uint32_t *) aPtr; - uiA96 = aWPtr[indexWordHi( 4 )]; - sign = signF128UI96( uiA96 ); - exp = expF128UI96( uiA96 ); - sig96 = fracF128UI96( uiA96 ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - shiftDist = 0x403E - exp; - if ( shiftDist < 0 ) goto invalid; - if ( exact ) { - if ( exp ) sig96 |= 0x00010000; - sig[indexWord( 4, 3 )] = sig96; - sig[indexWord( 4, 2 )] = aWPtr[indexWord( 4, 2 )]; - sig[indexWord( 4, 1 )] = aWPtr[indexWord( 4, 1 )]; - sig[indexWord( 4, 0 )] = aWPtr[indexWord( 4, 0 )]; - softfloat_shiftRightJam128M( sig, shiftDist + 17, sig ); - z = (uint64_t) sig[indexWord( 4, 2 )]<<32 | sig[indexWord( 4, 1 )]; - if ( sign && z ) goto invalid; - if ( sig[indexWordLo( 4 )] ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; - } - } else { - if ( 64 <= shiftDist ) return 0; - if ( sign ) goto invalid; - z = UINT64_C( 0x8000000000000000 ) - | (uint64_t) sig96<<47 - | (uint64_t) aWPtr[indexWord( 4, 2 )]<<15 - | aWPtr[indexWord( 4, 1 )]>>17; - z >>= shiftDist; - } - return z; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - invalid: - softfloat_raiseFlags( softfloat_flag_invalid ); - return - (exp == 0x7FFF) - && (sig96 - || (aWPtr[indexWord( 4, 2 )] | aWPtr[indexWord( 4, 1 )] - | aWPtr[indexWord( 4, 0 )])) - ? ui64_fromNaN - : sign ? ui64_fromNegOverflow : ui64_fromPosOverflow; - -} - -#endif - diff --git a/outside/softfloat-3/source/f128_add.c b/outside/softfloat-3/source/f128_add.c deleted file mode 100644 index d031739b3..000000000 --- a/outside/softfloat-3/source/f128_add.c +++ /dev/null @@ -1,78 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -float128_t f128_add( float128_t a, float128_t b ) -{ - union ui128_f128 uA; - uint_fast64_t uiA64, uiA0; - bool signA; - union ui128_f128 uB; - uint_fast64_t uiB64, uiB0; - bool signB; -#if ! defined INLINE_LEVEL || (INLINE_LEVEL < 2) - float128_t - (*magsFuncPtr)( - uint_fast64_t, uint_fast64_t, uint_fast64_t, uint_fast64_t, bool ); -#endif - - uA.f = a; - uiA64 = uA.ui.v64; - uiA0 = uA.ui.v0; - signA = signF128UI64( uiA64 ); - uB.f = b; - uiB64 = uB.ui.v64; - uiB0 = uB.ui.v0; - signB = signF128UI64( uiB64 ); -#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL) - if ( signA == signB ) { - return softfloat_addMagsF128( uiA64, uiA0, uiB64, uiB0, signA ); - } else { - return softfloat_subMagsF128( uiA64, uiA0, uiB64, uiB0, signA ); - } -#else - magsFuncPtr = - (signA == signB) ? softfloat_addMagsF128 : softfloat_subMagsF128; - return (*magsFuncPtr)( uiA64, uiA0, uiB64, uiB0, signA ); -#endif - -} - diff --git a/outside/softfloat-3/source/f128_div.c b/outside/softfloat-3/source/f128_div.c deleted file mode 100644 index cced6a507..000000000 --- a/outside/softfloat-3/source/f128_div.c +++ /dev/null @@ -1,199 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -float128_t f128_div( float128_t a, float128_t b ) -{ - union ui128_f128 uA; - uint_fast64_t uiA64, uiA0; - bool signA; - int_fast32_t expA; - struct uint128 sigA; - union ui128_f128 uB; - uint_fast64_t uiB64, uiB0; - bool signB; - int_fast32_t expB; - struct uint128 sigB; - bool signZ; - struct exp32_sig128 normExpSig; - int_fast32_t expZ; - struct uint128 rem; - uint_fast32_t recip32; - int ix; - uint_fast64_t q64; - uint_fast32_t q; - struct uint128 term; - uint_fast32_t qs[3]; - uint_fast64_t sigZExtra; - struct uint128 sigZ, uiZ; - union ui128_f128 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA64 = uA.ui.v64; - uiA0 = uA.ui.v0; - signA = signF128UI64( uiA64 ); - expA = expF128UI64( uiA64 ); - sigA.v64 = fracF128UI64( uiA64 ); - sigA.v0 = uiA0; - uB.f = b; - uiB64 = uB.ui.v64; - uiB0 = uB.ui.v0; - signB = signF128UI64( uiB64 ); - expB = expF128UI64( uiB64 ); - sigB.v64 = fracF128UI64( uiB64 ); - sigB.v0 = uiB0; - signZ = signA ^ signB; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( expA == 0x7FFF ) { - if ( sigA.v64 | sigA.v0 ) goto propagateNaN; - if ( expB == 0x7FFF ) { - if ( sigB.v64 | sigB.v0 ) goto propagateNaN; - goto invalid; - } - goto infinity; - } - if ( expB == 0x7FFF ) { - if ( sigB.v64 | sigB.v0 ) goto propagateNaN; - goto zero; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! expB ) { - if ( ! (sigB.v64 | sigB.v0) ) { - if ( ! (expA | sigA.v64 | sigA.v0) ) goto invalid; - softfloat_raiseFlags( softfloat_flag_infinite ); - goto infinity; - } - normExpSig = softfloat_normSubnormalF128Sig( sigB.v64, sigB.v0 ); - expB = normExpSig.exp; - sigB = normExpSig.sig; - } - if ( ! expA ) { - if ( ! (sigA.v64 | sigA.v0) ) goto zero; - normExpSig = softfloat_normSubnormalF128Sig( sigA.v64, sigA.v0 ); - expA = normExpSig.exp; - sigA = normExpSig.sig; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expZ = expA - expB + 0x3FFE; - sigA.v64 |= UINT64_C( 0x0001000000000000 ); - sigB.v64 |= UINT64_C( 0x0001000000000000 ); - rem = sigA; - if ( softfloat_lt128( sigA.v64, sigA.v0, sigB.v64, sigB.v0 ) ) { - --expZ; - rem = softfloat_add128( sigA.v64, sigA.v0, sigA.v64, sigA.v0 ); - } - recip32 = softfloat_approxRecip32_1( sigB.v64>>17 ); - ix = 3; - for (;;) { - q64 = (uint_fast64_t) (uint32_t) (rem.v64>>19) * recip32; - q = (q64 + 0x80000000)>>32; - --ix; - if ( ix < 0 ) break; - rem = softfloat_shortShiftLeft128( rem.v64, rem.v0, 29 ); - term = softfloat_mul128By32( sigB.v64, sigB.v0, q ); - rem = softfloat_sub128( rem.v64, rem.v0, term.v64, term.v0 ); - if ( rem.v64 & UINT64_C( 0x8000000000000000 ) ) { - --q; - rem = softfloat_add128( rem.v64, rem.v0, sigB.v64, sigB.v0 ); - } - qs[ix] = q; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ((q + 1) & 7) < 2 ) { - rem = softfloat_shortShiftLeft128( rem.v64, rem.v0, 29 ); - term = softfloat_mul128By32( sigB.v64, sigB.v0, q ); - rem = softfloat_sub128( rem.v64, rem.v0, term.v64, term.v0 ); - if ( rem.v64 & UINT64_C( 0x8000000000000000 ) ) { - --q; - rem = softfloat_add128( rem.v64, rem.v0, sigB.v64, sigB.v0 ); - } else if ( softfloat_le128( sigB.v64, sigB.v0, rem.v64, rem.v0 ) ) { - ++q; - rem = softfloat_sub128( rem.v64, rem.v0, sigB.v64, sigB.v0 ); - } - if ( rem.v64 | rem.v0 ) q |= 1; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sigZExtra = (uint64_t) ((uint_fast64_t) q<<60); - term = softfloat_shortShiftLeft128( 0, qs[1], 54 ); - sigZ = - softfloat_add128( - (uint_fast64_t) qs[2]<<19, ((uint_fast64_t) qs[0]<<25) + (q>>4), - term.v64, term.v0 - ); - return - softfloat_roundPackToF128( signZ, expZ, sigZ.v64, sigZ.v0, sigZExtra ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - propagateNaN: - uiZ = softfloat_propagateNaNF128UI( uiA64, uiA0, uiB64, uiB0 ); - goto uiZ; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - invalid: - softfloat_raiseFlags( softfloat_flag_invalid ); - uiZ.v64 = defaultNaNF128UI64; - uiZ.v0 = defaultNaNF128UI0; - goto uiZ; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - infinity: - uiZ.v64 = packToF128UI64( signZ, 0x7FFF, 0 ); - goto uiZ0; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - zero: - uiZ.v64 = packToF128UI64( signZ, 0, 0 ); - uiZ0: - uiZ.v0 = 0; - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/f128_eq.c b/outside/softfloat-3/source/f128_eq.c deleted file mode 100644 index 1aff71bc5..000000000 --- a/outside/softfloat-3/source/f128_eq.c +++ /dev/null @@ -1,73 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -bool f128_eq( float128_t a, float128_t b ) -{ - union ui128_f128 uA; - uint_fast64_t uiA64, uiA0; - union ui128_f128 uB; - uint_fast64_t uiB64, uiB0; - - uA.f = a; - uiA64 = uA.ui.v64; - uiA0 = uA.ui.v0; - uB.f = b; - uiB64 = uB.ui.v64; - uiB0 = uB.ui.v0; - if ( isNaNF128UI( uiA64, uiA0 ) || isNaNF128UI( uiB64, uiB0 ) ) { - if ( - softfloat_isSigNaNF128UI( uiA64, uiA0 ) - || softfloat_isSigNaNF128UI( uiB64, uiB0 ) - ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - } - return false; - } - return - (uiA0 == uiB0) - && ( (uiA64 == uiB64) - || (! uiA0 && ! ((uiA64 | uiB64) & UINT64_C( 0x7FFFFFFFFFFFFFFF ))) - ); - -} - diff --git a/outside/softfloat-3/source/f128_eq_signaling.c b/outside/softfloat-3/source/f128_eq_signaling.c deleted file mode 100644 index 96a7c0dd8..000000000 --- a/outside/softfloat-3/source/f128_eq_signaling.c +++ /dev/null @@ -1,67 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -bool f128_eq_signaling( float128_t a, float128_t b ) -{ - union ui128_f128 uA; - uint_fast64_t uiA64, uiA0; - union ui128_f128 uB; - uint_fast64_t uiB64, uiB0; - - uA.f = a; - uiA64 = uA.ui.v64; - uiA0 = uA.ui.v0; - uB.f = b; - uiB64 = uB.ui.v64; - uiB0 = uB.ui.v0; - if ( isNaNF128UI( uiA64, uiA0 ) || isNaNF128UI( uiB64, uiB0 ) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - return false; - } - return - (uiA0 == uiB0) - && ( (uiA64 == uiB64) - || (! uiA0 && ! ((uiA64 | uiB64) & UINT64_C( 0x7FFFFFFFFFFFFFFF ))) - ); - -} - diff --git a/outside/softfloat-3/source/f128_isSignalingNaN.c b/outside/softfloat-3/source/f128_isSignalingNaN.c deleted file mode 100644 index d6c4b9eef..000000000 --- a/outside/softfloat-3/source/f128_isSignalingNaN.c +++ /dev/null @@ -1,51 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -bool f128_isSignalingNaN( float128_t a ) -{ - union ui128_f128 uA; - - uA.f = a; - return softfloat_isSigNaNF128UI( uA.ui.v64, uA.ui.v0 ); - -} - diff --git a/outside/softfloat-3/source/f128_le.c b/outside/softfloat-3/source/f128_le.c deleted file mode 100644 index 1230bf4cd..000000000 --- a/outside/softfloat-3/source/f128_le.c +++ /dev/null @@ -1,72 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -bool f128_le( float128_t a, float128_t b ) -{ - union ui128_f128 uA; - uint_fast64_t uiA64, uiA0; - union ui128_f128 uB; - uint_fast64_t uiB64, uiB0; - bool signA, signB; - - uA.f = a; - uiA64 = uA.ui.v64; - uiA0 = uA.ui.v0; - uB.f = b; - uiB64 = uB.ui.v64; - uiB0 = uB.ui.v0; - if ( isNaNF128UI( uiA64, uiA0 ) || isNaNF128UI( uiB64, uiB0 ) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - return false; - } - signA = signF128UI64( uiA64 ); - signB = signF128UI64( uiB64 ); - return - (signA != signB) - ? signA - || ! (((uiA64 | uiB64) & UINT64_C( 0x7FFFFFFFFFFFFFFF )) - | uiA0 | uiB0) - : ((uiA64 == uiB64) && (uiA0 == uiB0)) - || (signA ^ softfloat_lt128( uiA64, uiA0, uiB64, uiB0 )); - -} - diff --git a/outside/softfloat-3/source/f128_le_quiet.c b/outside/softfloat-3/source/f128_le_quiet.c deleted file mode 100644 index 330bc5fd7..000000000 --- a/outside/softfloat-3/source/f128_le_quiet.c +++ /dev/null @@ -1,78 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -bool f128_le_quiet( float128_t a, float128_t b ) -{ - union ui128_f128 uA; - uint_fast64_t uiA64, uiA0; - union ui128_f128 uB; - uint_fast64_t uiB64, uiB0; - bool signA, signB; - - uA.f = a; - uiA64 = uA.ui.v64; - uiA0 = uA.ui.v0; - uB.f = b; - uiB64 = uB.ui.v64; - uiB0 = uB.ui.v0; - if ( isNaNF128UI( uiA64, uiA0 ) || isNaNF128UI( uiB64, uiB0 ) ) { - if ( - softfloat_isSigNaNF128UI( uiA64, uiA0 ) - || softfloat_isSigNaNF128UI( uiB64, uiB0 ) - ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - } - return false; - } - signA = signF128UI64( uiA64 ); - signB = signF128UI64( uiB64 ); - return - (signA != signB) - ? signA - || ! (((uiA64 | uiB64) & UINT64_C( 0x7FFFFFFFFFFFFFFF )) - | uiA0 | uiB0) - : ((uiA64 == uiB64) && (uiA0 == uiB0)) - || (signA ^ softfloat_lt128( uiA64, uiA0, uiB64, uiB0 )); - -} - diff --git a/outside/softfloat-3/source/f128_lt.c b/outside/softfloat-3/source/f128_lt.c deleted file mode 100644 index 23b2cc346..000000000 --- a/outside/softfloat-3/source/f128_lt.c +++ /dev/null @@ -1,72 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -bool f128_lt( float128_t a, float128_t b ) -{ - union ui128_f128 uA; - uint_fast64_t uiA64, uiA0; - union ui128_f128 uB; - uint_fast64_t uiB64, uiB0; - bool signA, signB; - - uA.f = a; - uiA64 = uA.ui.v64; - uiA0 = uA.ui.v0; - uB.f = b; - uiB64 = uB.ui.v64; - uiB0 = uB.ui.v0; - if ( isNaNF128UI( uiA64, uiA0 ) || isNaNF128UI( uiB64, uiB0 ) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - return false; - } - signA = signF128UI64( uiA64 ); - signB = signF128UI64( uiB64 ); - return - (signA != signB) - ? signA - && (((uiA64 | uiB64) & UINT64_C( 0x7FFFFFFFFFFFFFFF )) - | uiA0 | uiB0) - : ((uiA64 != uiB64) || (uiA0 != uiB0)) - && (signA ^ softfloat_lt128( uiA64, uiA0, uiB64, uiB0 )); - -} - diff --git a/outside/softfloat-3/source/f128_lt_quiet.c b/outside/softfloat-3/source/f128_lt_quiet.c deleted file mode 100644 index 828723147..000000000 --- a/outside/softfloat-3/source/f128_lt_quiet.c +++ /dev/null @@ -1,78 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -bool f128_lt_quiet( float128_t a, float128_t b ) -{ - union ui128_f128 uA; - uint_fast64_t uiA64, uiA0; - union ui128_f128 uB; - uint_fast64_t uiB64, uiB0; - bool signA, signB; - - uA.f = a; - uiA64 = uA.ui.v64; - uiA0 = uA.ui.v0; - uB.f = b; - uiB64 = uB.ui.v64; - uiB0 = uB.ui.v0; - if ( isNaNF128UI( uiA64, uiA0 ) || isNaNF128UI( uiB64, uiB0 ) ) { - if ( - softfloat_isSigNaNF128UI( uiA64, uiA0 ) - || softfloat_isSigNaNF128UI( uiB64, uiB0 ) - ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - } - return false; - } - signA = signF128UI64( uiA64 ); - signB = signF128UI64( uiB64 ); - return - (signA != signB) - ? signA - && (((uiA64 | uiB64) & UINT64_C( 0x7FFFFFFFFFFFFFFF )) - | uiA0 | uiB0) - : ((uiA64 != uiB64) || (uiA0 != uiB0)) - && (signA ^ softfloat_lt128( uiA64, uiA0, uiB64, uiB0 )); - -} - diff --git a/outside/softfloat-3/source/f128_mul.c b/outside/softfloat-3/source/f128_mul.c deleted file mode 100644 index e9765368c..000000000 --- a/outside/softfloat-3/source/f128_mul.c +++ /dev/null @@ -1,163 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -float128_t f128_mul( float128_t a, float128_t b ) -{ - union ui128_f128 uA; - uint_fast64_t uiA64, uiA0; - bool signA; - int_fast32_t expA; - struct uint128 sigA; - union ui128_f128 uB; - uint_fast64_t uiB64, uiB0; - bool signB; - int_fast32_t expB; - struct uint128 sigB; - bool signZ; - uint_fast64_t magBits; - struct exp32_sig128 normExpSig; - int_fast32_t expZ; - uint64_t sig256Z[4]; - uint_fast64_t sigZExtra; - struct uint128 sigZ; - struct uint128_extra sig128Extra; - struct uint128 uiZ; - union ui128_f128 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA64 = uA.ui.v64; - uiA0 = uA.ui.v0; - signA = signF128UI64( uiA64 ); - expA = expF128UI64( uiA64 ); - sigA.v64 = fracF128UI64( uiA64 ); - sigA.v0 = uiA0; - uB.f = b; - uiB64 = uB.ui.v64; - uiB0 = uB.ui.v0; - signB = signF128UI64( uiB64 ); - expB = expF128UI64( uiB64 ); - sigB.v64 = fracF128UI64( uiB64 ); - sigB.v0 = uiB0; - signZ = signA ^ signB; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( expA == 0x7FFF ) { - if ( - (sigA.v64 | sigA.v0) || ((expB == 0x7FFF) && (sigB.v64 | sigB.v0)) - ) { - goto propagateNaN; - } - magBits = expB | sigB.v64 | sigB.v0; - goto infArg; - } - if ( expB == 0x7FFF ) { - if ( sigB.v64 | sigB.v0 ) goto propagateNaN; - magBits = expA | sigA.v64 | sigA.v0; - goto infArg; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! expA ) { - if ( ! (sigA.v64 | sigA.v0) ) goto zero; - normExpSig = softfloat_normSubnormalF128Sig( sigA.v64, sigA.v0 ); - expA = normExpSig.exp; - sigA = normExpSig.sig; - } - if ( ! expB ) { - if ( ! (sigB.v64 | sigB.v0) ) goto zero; - normExpSig = softfloat_normSubnormalF128Sig( sigB.v64, sigB.v0 ); - expB = normExpSig.exp; - sigB = normExpSig.sig; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expZ = expA + expB - 0x4000; - sigA.v64 |= UINT64_C( 0x0001000000000000 ); - sigB = softfloat_shortShiftLeft128( sigB.v64, sigB.v0, 16 ); - softfloat_mul128To256M( sigA.v64, sigA.v0, sigB.v64, sigB.v0, sig256Z ); - sigZExtra = sig256Z[indexWord( 4, 1 )] | (sig256Z[indexWord( 4, 0 )] != 0); - sigZ = - softfloat_add128( - sig256Z[indexWord( 4, 3 )], sig256Z[indexWord( 4, 2 )], - sigA.v64, sigA.v0 - ); - if ( UINT64_C( 0x0002000000000000 ) <= sigZ.v64 ) { - ++expZ; - sig128Extra = - softfloat_shortShiftRightJam128Extra( - sigZ.v64, sigZ.v0, sigZExtra, 1 ); - sigZ = sig128Extra.v; - sigZExtra = sig128Extra.extra; - } - return - softfloat_roundPackToF128( signZ, expZ, sigZ.v64, sigZ.v0, sigZExtra ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - propagateNaN: - uiZ = softfloat_propagateNaNF128UI( uiA64, uiA0, uiB64, uiB0 ); - goto uiZ; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - infArg: - if ( ! magBits ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - uiZ.v64 = defaultNaNF128UI64; - uiZ.v0 = defaultNaNF128UI0; - goto uiZ; - } - uiZ.v64 = packToF128UI64( signZ, 0x7FFF, 0 ); - goto uiZ0; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - zero: - uiZ.v64 = packToF128UI64( signZ, 0, 0 ); - uiZ0: - uiZ.v0 = 0; - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/f128_mulAdd.c b/outside/softfloat-3/source/f128_mulAdd.c deleted file mode 100644 index b329de046..000000000 --- a/outside/softfloat-3/source/f128_mulAdd.c +++ /dev/null @@ -1,63 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -float128_t f128_mulAdd( float128_t a, float128_t b, float128_t c ) -{ - union ui128_f128 uA; - uint_fast64_t uiA64, uiA0; - union ui128_f128 uB; - uint_fast64_t uiB64, uiB0; - union ui128_f128 uC; - uint_fast64_t uiC64, uiC0; - - uA.f = a; - uiA64 = uA.ui.v64; - uiA0 = uA.ui.v0; - uB.f = b; - uiB64 = uB.ui.v64; - uiB0 = uB.ui.v0; - uC.f = c; - uiC64 = uC.ui.v64; - uiC0 = uC.ui.v0; - return softfloat_mulAddF128( uiA64, uiA0, uiB64, uiB0, uiC64, uiC0, 0 ); - -} - diff --git a/outside/softfloat-3/source/f128_rem.c b/outside/softfloat-3/source/f128_rem.c deleted file mode 100644 index 6d5e92628..000000000 --- a/outside/softfloat-3/source/f128_rem.c +++ /dev/null @@ -1,190 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -float128_t f128_rem( float128_t a, float128_t b ) -{ - union ui128_f128 uA; - uint_fast64_t uiA64, uiA0; - bool signA; - int_fast32_t expA; - struct uint128 sigA; - union ui128_f128 uB; - uint_fast64_t uiB64, uiB0; - int_fast32_t expB; - struct uint128 sigB; - struct exp32_sig128 normExpSig; - struct uint128 rem; - int_fast32_t expDiff; - uint_fast32_t q, recip32; - uint_fast64_t q64; - struct uint128 term, altRem, meanRem; - bool signRem; - struct uint128 uiZ; - union ui128_f128 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA64 = uA.ui.v64; - uiA0 = uA.ui.v0; - signA = signF128UI64( uiA64 ); - expA = expF128UI64( uiA64 ); - sigA.v64 = fracF128UI64( uiA64 ); - sigA.v0 = uiA0; - uB.f = b; - uiB64 = uB.ui.v64; - uiB0 = uB.ui.v0; - expB = expF128UI64( uiB64 ); - sigB.v64 = fracF128UI64( uiB64 ); - sigB.v0 = uiB0; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( expA == 0x7FFF ) { - if ( - (sigA.v64 | sigA.v0) || ((expB == 0x7FFF) && (sigB.v64 | sigB.v0)) - ) { - goto propagateNaN; - } - goto invalid; - } - if ( expB == 0x7FFF ) { - if ( sigB.v64 | sigB.v0 ) goto propagateNaN; - return a; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! expB ) { - if ( ! (sigB.v64 | sigB.v0) ) goto invalid; - normExpSig = softfloat_normSubnormalF128Sig( sigB.v64, sigB.v0 ); - expB = normExpSig.exp; - sigB = normExpSig.sig; - } - if ( ! expA ) { - if ( ! (sigA.v64 | sigA.v0) ) return a; - normExpSig = softfloat_normSubnormalF128Sig( sigA.v64, sigA.v0 ); - expA = normExpSig.exp; - sigA = normExpSig.sig; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sigA.v64 |= UINT64_C( 0x0001000000000000 ); - sigB.v64 |= UINT64_C( 0x0001000000000000 ); - rem = sigA; - expDiff = expA - expB; - if ( expDiff < 1 ) { - if ( expDiff < -1 ) return a; - if ( expDiff ) { - --expB; - sigB = softfloat_add128( sigB.v64, sigB.v0, sigB.v64, sigB.v0 ); - q = 0; - } else { - q = softfloat_le128( sigB.v64, sigB.v0, rem.v64, rem.v0 ); - if ( q ) { - rem = softfloat_sub128( rem.v64, rem.v0, sigB.v64, sigB.v0 ); - } - } - } else { - recip32 = softfloat_approxRecip32_1( sigB.v64>>17 ); - expDiff -= 30; - for (;;) { - q64 = (uint_fast64_t) (uint32_t) (rem.v64>>19) * recip32; - if ( expDiff < 0 ) break; - q = (q64 + 0x80000000)>>32; - rem = softfloat_shortShiftLeft128( rem.v64, rem.v0, 29 ); - term = softfloat_mul128By32( sigB.v64, sigB.v0, q ); - rem = softfloat_sub128( rem.v64, rem.v0, term.v64, term.v0 ); - if ( rem.v64 & UINT64_C( 0x8000000000000000 ) ) { - rem = softfloat_add128( rem.v64, rem.v0, sigB.v64, sigB.v0 ); - } - expDiff -= 29; - } - /*-------------------------------------------------------------------- - | (`expDiff' cannot be less than -29 here.) - *--------------------------------------------------------------------*/ - q = (uint32_t) (q64>>32)>>(~expDiff & 31); - rem = softfloat_shortShiftLeft128( rem.v64, rem.v0, expDiff + 30 ); - term = softfloat_mul128By32( sigB.v64, sigB.v0, q ); - rem = softfloat_sub128( rem.v64, rem.v0, term.v64, term.v0 ); - if ( rem.v64 & UINT64_C( 0x8000000000000000 ) ) { - altRem = softfloat_add128( rem.v64, rem.v0, sigB.v64, sigB.v0 ); - goto selectRem; - } - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - do { - altRem = rem; - ++q; - rem = softfloat_sub128( rem.v64, rem.v0, sigB.v64, sigB.v0 ); - } while ( ! (rem.v64 & UINT64_C( 0x8000000000000000 )) ); - selectRem: - meanRem = softfloat_add128( rem.v64, rem.v0, altRem.v64, altRem.v0 ); - if ( - (meanRem.v64 & UINT64_C( 0x8000000000000000 )) - || (! (meanRem.v64 | meanRem.v0) && (q & 1)) - ) { - rem = altRem; - } - signRem = signA; - if ( rem.v64 & UINT64_C( 0x8000000000000000 ) ) { - signRem = ! signRem; - rem = softfloat_sub128( 0, 0, rem.v64, rem.v0 ); - } - return softfloat_normRoundPackToF128( signRem, expB - 1, rem.v64, rem.v0 ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - propagateNaN: - uiZ = softfloat_propagateNaNF128UI( uiA64, uiA0, uiB64, uiB0 ); - goto uiZ; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - invalid: - softfloat_raiseFlags( softfloat_flag_invalid ); - uiZ.v64 = defaultNaNF128UI64; - uiZ.v0 = defaultNaNF128UI0; - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/f128_roundToInt.c b/outside/softfloat-3/source/f128_roundToInt.c deleted file mode 100644 index a70867e19..000000000 --- a/outside/softfloat-3/source/f128_roundToInt.c +++ /dev/null @@ -1,160 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -float128_t - f128_roundToInt( float128_t a, uint_fast8_t roundingMode, bool exact ) -{ - union ui128_f128 uA; - uint_fast64_t uiA64, uiA0; - int_fast32_t exp; - struct uint128 uiZ; - uint_fast64_t lastBitMask, roundBitsMask; - bool roundNearEven; - union ui128_f128 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA64 = uA.ui.v64; - uiA0 = uA.ui.v0; - exp = expF128UI64( uiA64 ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( 0x402F <= exp ) { - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - if ( 0x406F <= exp ) { - if ( (exp == 0x7FFF) && (fracF128UI64( uiA64 ) | uiA0) ) { - uiZ = softfloat_propagateNaNF128UI( uiA64, uiA0, 0, 0 ); - goto uiZ; - } - return a; - } - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - lastBitMask = (uint_fast64_t) 2<<(0x406E - exp); - roundBitsMask = lastBitMask - 1; - uiZ.v64 = uiA64; - uiZ.v0 = uiA0; - roundNearEven = (roundingMode == softfloat_round_near_even); - if ( roundNearEven || (roundingMode == softfloat_round_near_maxMag) ) { - if ( exp == 0x402F ) { - if ( UINT64_C( 0x8000000000000000 ) <= uiZ.v0 ) { - ++uiZ.v64; - if ( - roundNearEven - && (uiZ.v0 == UINT64_C( 0x8000000000000000 )) - ) { - uiZ.v64 &= ~1; - } - } - } else { - uiZ = softfloat_add128( uiZ.v64, uiZ.v0, 0, lastBitMask>>1 ); - if ( roundNearEven && ! (uiZ.v0 & roundBitsMask) ) { - uiZ.v0 &= ~lastBitMask; - } - } - } else if ( - roundingMode - == (signF128UI64( uiZ.v64 ) ? softfloat_round_min - : softfloat_round_max) - ) { - uiZ = softfloat_add128( uiZ.v64, uiZ.v0, 0, roundBitsMask ); - } - uiZ.v0 &= ~roundBitsMask; - } else { - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - if ( exp < 0x3FFF ) { - if ( ! ((uiA64 & UINT64_C( 0x7FFFFFFFFFFFFFFF )) | uiA0) ) { - return a; - } - if ( exact ) softfloat_exceptionFlags |= softfloat_flag_inexact; - uiZ.v64 = uiA64 & packToF128UI64( 1, 0, 0 ); - uiZ.v0 = 0; - switch ( roundingMode ) { - case softfloat_round_near_even: - if ( ! (fracF128UI64( uiA64 ) | uiA0) ) break; - case softfloat_round_near_maxMag: - if ( exp == 0x3FFE ) uiZ.v64 |= packToF128UI64( 0, 0x3FFF, 0 ); - break; - case softfloat_round_min: - if ( uiZ.v64 ) uiZ.v64 = packToF128UI64( 1, 0x3FFF, 0 ); - break; - case softfloat_round_max: - if ( ! uiZ.v64 ) uiZ.v64 = packToF128UI64( 0, 0x3FFF, 0 ); - break; - } - goto uiZ; - } - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - uiZ.v64 = uiA64; - uiZ.v0 = 0; - lastBitMask = (uint_fast64_t) 1<<(0x402F - exp); - roundBitsMask = lastBitMask - 1; - if ( roundingMode == softfloat_round_near_maxMag ) { - uiZ.v64 += lastBitMask>>1; - } else if ( roundingMode == softfloat_round_near_even ) { - uiZ.v64 += lastBitMask>>1; - if ( ! ((uiZ.v64 & roundBitsMask) | uiA0) ) { - uiZ.v64 &= ~lastBitMask; - } - } else if ( - roundingMode - == (signF128UI64( uiZ.v64 ) ? softfloat_round_min - : softfloat_round_max) - ) { - uiZ.v64 = (uiZ.v64 | (uiA0 != 0)) + roundBitsMask; - } - uiZ.v64 &= ~roundBitsMask; - } - if ( exact && ((uiZ.v64 != uiA64) || (uiZ.v0 != uiA0)) ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; - } - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/f128_sqrt.c b/outside/softfloat-3/source/f128_sqrt.c deleted file mode 100644 index e987911eb..000000000 --- a/outside/softfloat-3/source/f128_sqrt.c +++ /dev/null @@ -1,194 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -float128_t f128_sqrt( float128_t a ) -{ - union ui128_f128 uA; - uint_fast64_t uiA64, uiA0; - bool signA; - int_fast32_t expA; - struct uint128 sigA, uiZ; - struct exp32_sig128 normExpSig; - int_fast32_t expZ; - uint_fast32_t sig32A, recipSqrt32, sig32Z; - struct uint128 rem; - uint32_t qs[3]; - uint_fast32_t q; - uint_fast64_t x64, sig64Z; - struct uint128 term, y; - uint_fast64_t sigZExtra; - struct uint128 sigZ; - union ui128_f128 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA64 = uA.ui.v64; - uiA0 = uA.ui.v0; - signA = signF128UI64( uiA64 ); - expA = expF128UI64( uiA64 ); - sigA.v64 = fracF128UI64( uiA64 ); - sigA.v0 = uiA0; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( expA == 0x7FFF ) { - if ( sigA.v64 | sigA.v0 ) { - uiZ = softfloat_propagateNaNF128UI( uiA64, uiA0, 0, 0 ); - goto uiZ; - } - if ( ! signA ) return a; - goto invalid; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( signA ) { - if ( ! (expA | sigA.v64 | sigA.v0) ) return a; - goto invalid; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! expA ) { - if ( ! (sigA.v64 | sigA.v0) ) return a; - normExpSig = softfloat_normSubnormalF128Sig( sigA.v64, sigA.v0 ); - expA = normExpSig.exp; - sigA = normExpSig.sig; - } - /*------------------------------------------------------------------------ - | (`sig32Z' is guaranteed to be a lower bound on the square root of - | `sig32A', which makes `sig32Z' also a lower bound on the square root of - | `sigA'.) - *------------------------------------------------------------------------*/ - expZ = ((expA - 0x3FFF)>>1) + 0x3FFE; - expA &= 1; - sigA.v64 |= UINT64_C( 0x0001000000000000 ); - sig32A = sigA.v64>>17; - recipSqrt32 = softfloat_approxRecipSqrt32_1( expA, sig32A ); - sig32Z = ((uint_fast64_t) sig32A * recipSqrt32)>>32; - if ( expA ) { - sig32Z >>= 1; - rem = softfloat_shortShiftLeft128( sigA.v64, sigA.v0, 12 ); - } else { - rem = softfloat_shortShiftLeft128( sigA.v64, sigA.v0, 13 ); - } - qs[2] = sig32Z; - rem.v64 -= (uint_fast64_t) sig32Z * sig32Z; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - q = ((uint32_t) (rem.v64>>2) * (uint_fast64_t) recipSqrt32)>>32; - qs[1] = q; - x64 = (uint_fast64_t) sig32Z<<32; - sig64Z = x64 + ((uint_fast64_t) q<<3); - x64 += sig64Z; - rem = softfloat_shortShiftLeft128( rem.v64, rem.v0, 29 ); - term = softfloat_mul64ByShifted32To128( x64, q ); - rem = softfloat_sub128( rem.v64, rem.v0, term.v64, term.v0 ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - q = ((uint32_t) (rem.v64>>2) * (uint_fast64_t) recipSqrt32)>>32; - y = softfloat_shortShiftLeft128( rem.v64, rem.v0, 29 ); - sig64Z <<= 1; - /*------------------------------------------------------------------------ - | (Repeating this loop is a rare occurrence.) - *------------------------------------------------------------------------*/ - for (;;) { - term = softfloat_shortShiftLeft128( 0, sig64Z, 32 ); - term = softfloat_add128( term.v64, term.v0, 0, (uint_fast64_t) q<<6 ); - term = softfloat_mul128By32( term.v64, term.v0, q ); - rem = softfloat_sub128( y.v64, y.v0, term.v64, term.v0 ); - if ( ! (rem.v64 & UINT64_C( 0x8000000000000000 )) ) break; - --q; - } - qs[0] = q; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - q = (((uint32_t) (rem.v64>>2) * (uint_fast64_t) recipSqrt32)>>32) + 2; - sigZExtra = (uint64_t) ((uint_fast64_t) q<<59); - term = softfloat_shortShiftLeft128( 0, qs[1], 53 ); - sigZ = - softfloat_add128( - (uint_fast64_t) qs[2]<<18, ((uint_fast64_t) qs[0]<<24) + (q>>5), - term.v64, term.v0 - ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( (q & 0xF) <= 2 ) { - q &= ~3; - sigZExtra = (uint64_t) ((uint_fast64_t) q<<59); - y = softfloat_shortShiftLeft128( sigZ.v64, sigZ.v0, 6 ); - y.v0 |= sigZExtra>>58; - term = softfloat_sub128( y.v64, y.v0, 0, q ); - y = softfloat_mul64ByShifted32To128( term.v0, q ); - term = softfloat_mul64ByShifted32To128( term.v64, q ); - term = softfloat_add128( term.v64, term.v0, 0, y.v64 ); - rem = softfloat_shortShiftLeft128( rem.v64, rem.v0, 20 ); - term = softfloat_sub128( term.v64, term.v0, rem.v64, rem.v0 ); - /*-------------------------------------------------------------------- - | The concatenation of `term' and `y.v0' is now the negative remainder - | (3 words altogether). - *--------------------------------------------------------------------*/ - if ( term.v64 & UINT64_C( 0x8000000000000000 ) ) { - sigZExtra |= 1; - } else { - if ( term.v64 | term.v0 | y.v0 ) { - if ( sigZExtra ) { - --sigZExtra; - } else { - sigZ = softfloat_sub128( sigZ.v64, sigZ.v0, 0, 1 ); - sigZExtra = ~0; - } - } - } - } - return softfloat_roundPackToF128( 0, expZ, sigZ.v64, sigZ.v0, sigZExtra ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - invalid: - softfloat_raiseFlags( softfloat_flag_invalid ); - uiZ.v64 = defaultNaNF128UI64; - uiZ.v0 = defaultNaNF128UI0; - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/f128_sub.c b/outside/softfloat-3/source/f128_sub.c deleted file mode 100644 index d8d6b0f61..000000000 --- a/outside/softfloat-3/source/f128_sub.c +++ /dev/null @@ -1,78 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -float128_t f128_sub( float128_t a, float128_t b ) -{ - union ui128_f128 uA; - uint_fast64_t uiA64, uiA0; - bool signA; - union ui128_f128 uB; - uint_fast64_t uiB64, uiB0; - bool signB; -#if ! defined INLINE_LEVEL || (INLINE_LEVEL < 2) - float128_t - (*magsFuncPtr)( - uint_fast64_t, uint_fast64_t, uint_fast64_t, uint_fast64_t, bool ); -#endif - - uA.f = a; - uiA64 = uA.ui.v64; - uiA0 = uA.ui.v0; - signA = signF128UI64( uiA64 ); - uB.f = b; - uiB64 = uB.ui.v64; - uiB0 = uB.ui.v0; - signB = signF128UI64( uiB64 ); -#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL) - if ( signA == signB ) { - return softfloat_subMagsF128( uiA64, uiA0, uiB64, uiB0, signA ); - } else { - return softfloat_addMagsF128( uiA64, uiA0, uiB64, uiB0, signA ); - } -#else - magsFuncPtr = - (signA == signB) ? softfloat_subMagsF128 : softfloat_addMagsF128; - return (*magsFuncPtr)( uiA64, uiA0, uiB64, uiB0, signA ); -#endif - -} - diff --git a/outside/softfloat-3/source/f128_to_extF80.c b/outside/softfloat-3/source/f128_to_extF80.c deleted file mode 100644 index b88b634f3..000000000 --- a/outside/softfloat-3/source/f128_to_extF80.c +++ /dev/null @@ -1,109 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -extFloat80_t f128_to_extF80( float128_t a ) -{ - union ui128_f128 uA; - uint_fast64_t uiA64, uiA0; - bool sign; - int_fast32_t exp; - uint_fast64_t frac64, frac0; - struct commonNaN commonNaN; - struct uint128 uiZ; - uint_fast16_t uiZ64; - uint_fast64_t uiZ0; - struct exp32_sig128 normExpSig; - struct uint128 sig128; - union { struct extFloat80M s; extFloat80_t f; } uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA64 = uA.ui.v64; - uiA0 = uA.ui.v0; - sign = signF128UI64( uiA64 ); - exp = expF128UI64( uiA64 ); - frac64 = fracF128UI64( uiA64 ); - frac0 = uiA0; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp == 0x7FFF ) { - if ( frac64 | frac0 ) { - softfloat_f128UIToCommonNaN( uiA64, uiA0, &commonNaN ); - uiZ = softfloat_commonNaNToExtF80UI( &commonNaN ); - uiZ64 = uiZ.v64; - uiZ0 = uiZ.v0; - } else { - uiZ64 = packToExtF80UI64( sign, 0x7FFF ); - uiZ0 = UINT64_C( 0x8000000000000000 ); - } - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! exp ) { - if ( ! (frac64 | frac0) ) { - uiZ64 = packToExtF80UI64( sign, 0 ); - uiZ0 = 0; - goto uiZ; - } - normExpSig = softfloat_normSubnormalF128Sig( frac64, frac0 ); - exp = normExpSig.exp; - frac64 = normExpSig.sig.v64; - frac0 = normExpSig.sig.v0; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sig128 = - softfloat_shortShiftLeft128( - frac64 | UINT64_C( 0x0001000000000000 ), frac0, 15 ); - return softfloat_roundPackToExtF80( sign, exp, sig128.v64, sig128.v0, 80 ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiZ: - uZ.s.signExp = uiZ64; - uZ.s.signif = uiZ0; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/f128_to_f16.c b/outside/softfloat-3/source/f128_to_f16.c deleted file mode 100644 index 57ce39400..000000000 --- a/outside/softfloat-3/source/f128_to_f16.c +++ /dev/null @@ -1,95 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -float16_t f128_to_f16( float128_t a ) -{ - union ui128_f128 uA; - uint_fast64_t uiA64, uiA0; - bool sign; - int_fast32_t exp; - uint_fast64_t frac64; - struct commonNaN commonNaN; - uint_fast16_t uiZ, frac16; - union ui16_f16 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA64 = uA.ui.v64; - uiA0 = uA.ui.v0; - sign = signF128UI64( uiA64 ); - exp = expF128UI64( uiA64 ); - frac64 = fracF128UI64( uiA64 ) | (uiA0 != 0); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp == 0x7FFF ) { - if ( frac64 ) { - softfloat_f128UIToCommonNaN( uiA64, uiA0, &commonNaN ); - uiZ = softfloat_commonNaNToF16UI( &commonNaN ); - } else { - uiZ = packToF16UI( sign, 0x1F, 0 ); - } - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - frac16 = softfloat_shortShiftRightJam64( frac64, 34 ); - if ( ! (exp | frac16) ) { - uiZ = packToF16UI( sign, 0, 0 ); - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - exp -= 0x3FF1; - if ( sizeof (int_fast16_t) < sizeof (int_fast32_t) ) { - if ( exp < -0x40 ) exp = -0x40; - } - return softfloat_roundPackToF16( sign, exp, frac16 | 0x4000 ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/f128_to_f32.c b/outside/softfloat-3/source/f128_to_f32.c deleted file mode 100644 index ab068c36b..000000000 --- a/outside/softfloat-3/source/f128_to_f32.c +++ /dev/null @@ -1,95 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -float32_t f128_to_f32( float128_t a ) -{ - union ui128_f128 uA; - uint_fast64_t uiA64, uiA0; - bool sign; - int_fast32_t exp; - uint_fast64_t frac64; - struct commonNaN commonNaN; - uint_fast32_t uiZ, frac32; - union ui32_f32 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA64 = uA.ui.v64; - uiA0 = uA.ui.v0; - sign = signF128UI64( uiA64 ); - exp = expF128UI64( uiA64 ); - frac64 = fracF128UI64( uiA64 ) | (uiA0 != 0); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp == 0x7FFF ) { - if ( frac64 ) { - softfloat_f128UIToCommonNaN( uiA64, uiA0, &commonNaN ); - uiZ = softfloat_commonNaNToF32UI( &commonNaN ); - } else { - uiZ = packToF32UI( sign, 0xFF, 0 ); - } - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - frac32 = softfloat_shortShiftRightJam64( frac64, 18 ); - if ( ! (exp | frac32) ) { - uiZ = packToF32UI( sign, 0, 0 ); - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - exp -= 0x3F81; - if ( sizeof (int_fast16_t) < sizeof (int_fast32_t) ) { - if ( exp < -0x1000 ) exp = -0x1000; - } - return softfloat_roundPackToF32( sign, exp, frac32 | 0x40000000 ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/f128_to_f64.c b/outside/softfloat-3/source/f128_to_f64.c deleted file mode 100644 index b1ef4aa8c..000000000 --- a/outside/softfloat-3/source/f128_to_f64.c +++ /dev/null @@ -1,100 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -float64_t f128_to_f64( float128_t a ) -{ - union ui128_f128 uA; - uint_fast64_t uiA64, uiA0; - bool sign; - int_fast32_t exp; - uint_fast64_t frac64, frac0; - struct commonNaN commonNaN; - uint_fast64_t uiZ; - struct uint128 frac128; - union ui64_f64 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA64 = uA.ui.v64; - uiA0 = uA.ui.v0; - sign = signF128UI64( uiA64 ); - exp = expF128UI64( uiA64 ); - frac64 = fracF128UI64( uiA64 ); - frac0 = uiA0; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp == 0x7FFF ) { - if ( frac64 | frac0 ) { - softfloat_f128UIToCommonNaN( uiA64, uiA0, &commonNaN ); - uiZ = softfloat_commonNaNToF64UI( &commonNaN ); - } else { - uiZ = packToF64UI( sign, 0x7FF, 0 ); - } - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - frac128 = softfloat_shortShiftLeft128( frac64, frac0, 14 ); - frac64 = frac128.v64 | (frac128.v0 != 0); - if ( ! (exp | frac64) ) { - uiZ = packToF64UI( sign, 0, 0 ); - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - exp -= 0x3C01; - if ( sizeof (int_fast16_t) < sizeof (int_fast32_t) ) { - if ( exp < -0x1000 ) exp = -0x1000; - } - return - softfloat_roundPackToF64( - sign, exp, frac64 | UINT64_C( 0x4000000000000000 ) ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/f128_to_i32.c b/outside/softfloat-3/source/f128_to_i32.c deleted file mode 100644 index 490a3b782..000000000 --- a/outside/softfloat-3/source/f128_to_i32.c +++ /dev/null @@ -1,85 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the -University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -int_fast32_t f128_to_i32( float128_t a, uint_fast8_t roundingMode, bool exact ) -{ - union ui128_f128 uA; - uint_fast64_t uiA64, uiA0; - bool sign; - int_fast32_t exp; - uint_fast64_t sig64, sig0; - int_fast32_t shiftDist; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA64 = uA.ui.v64; - uiA0 = uA.ui.v0; - sign = signF128UI64( uiA64 ); - exp = expF128UI64( uiA64 ); - sig64 = fracF128UI64( uiA64 ); - sig0 = uiA0; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ -#if (i32_fromNaN != i32_fromPosOverflow) || (i32_fromNaN != i32_fromNegOverflow) - if ( (exp == 0x7FFF) && (sig64 | sig0) ) { -#if (i32_fromNaN == i32_fromPosOverflow) - sign = 0; -#elif (i32_fromNaN == i32_fromNegOverflow) - sign = 1; -#else - softfloat_raiseFlags( softfloat_flag_invalid ); - return i32_fromNaN; -#endif - } -#endif - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp ) sig64 |= UINT64_C( 0x0001000000000000 ); - sig64 |= (sig0 != 0); - shiftDist = 0x4023 - exp; - if ( 0 < shiftDist ) sig64 = softfloat_shiftRightJam64( sig64, shiftDist ); - return softfloat_roundToI32( sign, sig64, roundingMode, exact ); - -} - diff --git a/outside/softfloat-3/source/f128_to_i32_r_minMag.c b/outside/softfloat-3/source/f128_to_i32_r_minMag.c deleted file mode 100644 index d64bf4295..000000000 --- a/outside/softfloat-3/source/f128_to_i32_r_minMag.c +++ /dev/null @@ -1,100 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -int_fast32_t f128_to_i32_r_minMag( float128_t a, bool exact ) -{ - union ui128_f128 uA; - uint_fast64_t uiA64, uiA0; - int_fast32_t exp; - uint_fast64_t sig64; - int_fast32_t shiftDist; - bool sign; - int_fast32_t absZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA64 = uA.ui.v64; - uiA0 = uA.ui.v0; - exp = expF128UI64( uiA64 ); - sig64 = fracF128UI64( uiA64 ) | (uiA0 != 0); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - shiftDist = 0x402F - exp; - if ( 49 <= shiftDist ) { - if ( exact && (exp | sig64) ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; - } - return 0; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sign = signF128UI64( uiA64 ); - if ( shiftDist < 18 ) { - if ( - sign && (shiftDist == 17) - && (sig64 < UINT64_C( 0x0000000000020000 )) - ) { - if ( exact && sig64 ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; - } - return -0x7FFFFFFF - 1; - } - softfloat_raiseFlags( softfloat_flag_invalid ); - return - (exp == 0x7FFF) && sig64 ? i32_fromNaN - : sign ? i32_fromNegOverflow : i32_fromPosOverflow; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sig64 |= UINT64_C( 0x0001000000000000 ); - absZ = sig64>>shiftDist; - if ( - exact && ((uint_fast64_t) (uint_fast32_t) absZ< -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -int_fast64_t f128_to_i64( float128_t a, uint_fast8_t roundingMode, bool exact ) -{ - union ui128_f128 uA; - uint_fast64_t uiA64, uiA0; - bool sign; - int_fast32_t exp; - uint_fast64_t sig64, sig0; - int_fast32_t shiftDist; - struct uint128 sig128; - struct uint64_extra sigExtra; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA64 = uA.ui.v64; - uiA0 = uA.ui.v0; - sign = signF128UI64( uiA64 ); - exp = expF128UI64( uiA64 ); - sig64 = fracF128UI64( uiA64 ); - sig0 = uiA0; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - shiftDist = 0x402F - exp; - if ( shiftDist <= 0 ) { - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - if ( shiftDist < -15 ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - return - (exp == 0x7FFF) && (sig64 | sig0) ? i64_fromNaN - : sign ? i64_fromNegOverflow : i64_fromPosOverflow; - } - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - sig64 |= UINT64_C( 0x0001000000000000 ); - if ( shiftDist ) { - sig128 = softfloat_shortShiftLeft128( sig64, sig0, -shiftDist ); - sig64 = sig128.v64; - sig0 = sig128.v0; - } - } else { - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - if ( exp ) sig64 |= UINT64_C( 0x0001000000000000 ); - sigExtra = softfloat_shiftRightJam64Extra( sig64, sig0, shiftDist ); - sig64 = sigExtra.v; - sig0 = sigExtra.extra; - } - return softfloat_roundToI64( sign, sig64, sig0, roundingMode, exact ); - -} - diff --git a/outside/softfloat-3/source/f128_to_i64_r_minMag.c b/outside/softfloat-3/source/f128_to_i64_r_minMag.c deleted file mode 100644 index dc862bbb3..000000000 --- a/outside/softfloat-3/source/f128_to_i64_r_minMag.c +++ /dev/null @@ -1,113 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -int_fast64_t f128_to_i64_r_minMag( float128_t a, bool exact ) -{ - union ui128_f128 uA; - uint_fast64_t uiA64, uiA0; - bool sign; - int_fast32_t exp; - uint_fast64_t sig64, sig0; - int_fast32_t shiftDist; - int_fast8_t negShiftDist; - int_fast64_t absZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA64 = uA.ui.v64; - uiA0 = uA.ui.v0; - sign = signF128UI64( uiA64 ); - exp = expF128UI64( uiA64 ); - sig64 = fracF128UI64( uiA64 ); - sig0 = uiA0; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - shiftDist = 0x402F - exp; - if ( shiftDist < 0 ) { - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - if ( shiftDist < -14 ) { - if ( - (uiA64 == UINT64_C( 0xC03E000000000000 )) - && (sig0 < UINT64_C( 0x0002000000000000 )) - ) { - if ( exact && sig0 ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; - } - return -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1; - } - softfloat_raiseFlags( softfloat_flag_invalid ); - return - (exp == 0x7FFF) && (sig64 | sig0) ? i64_fromNaN - : sign ? i64_fromNegOverflow : i64_fromPosOverflow; - } - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - sig64 |= UINT64_C( 0x0001000000000000 ); - negShiftDist = -shiftDist; - absZ = sig64<>(shiftDist & 63); - if ( exact && (uint64_t) (sig0<>shiftDist; - if ( exact && (sig0 || (absZ< -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -uint_fast32_t - f128_to_ui32( float128_t a, uint_fast8_t roundingMode, bool exact ) -{ - union ui128_f128 uA; - uint_fast64_t uiA64, uiA0; - bool sign; - int_fast32_t exp; - uint_fast64_t sig64; - int_fast32_t shiftDist; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA64 = uA.ui.v64; - uiA0 = uA.ui.v0; - sign = signF128UI64( uiA64 ); - exp = expF128UI64( uiA64 ); - sig64 = fracF128UI64( uiA64 ) | (uiA0 != 0); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ -#if (ui32_fromNaN != ui32_fromPosOverflow) || (ui32_fromNaN != ui32_fromNegOverflow) - if ( (exp == 0x7FFF) && sig64 ) { -#if (ui32_fromNaN == ui32_fromPosOverflow) - sign = 0; -#elif (ui32_fromNaN == ui32_fromNegOverflow) - sign = 1; -#else - softfloat_raiseFlags( softfloat_flag_invalid ); - return ui32_fromNaN; -#endif - } -#endif - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp ) sig64 |= UINT64_C( 0x0001000000000000 ); - shiftDist = 0x4023 - exp; - if ( 0 < shiftDist ) { - sig64 = softfloat_shiftRightJam64( sig64, shiftDist ); - } - return softfloat_roundToUI32( sign, sig64, roundingMode, exact ); - -} - diff --git a/outside/softfloat-3/source/f128_to_ui32_r_minMag.c b/outside/softfloat-3/source/f128_to_ui32_r_minMag.c deleted file mode 100644 index aae6c13bd..000000000 --- a/outside/softfloat-3/source/f128_to_ui32_r_minMag.c +++ /dev/null @@ -1,89 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -uint_fast32_t f128_to_ui32_r_minMag( float128_t a, bool exact ) -{ - union ui128_f128 uA; - uint_fast64_t uiA64, uiA0; - int_fast32_t exp; - uint_fast64_t sig64; - int_fast32_t shiftDist; - bool sign; - uint_fast32_t z; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA64 = uA.ui.v64; - uiA0 = uA.ui.v0; - exp = expF128UI64( uiA64 ); - sig64 = fracF128UI64( uiA64 ) | (uiA0 != 0); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - shiftDist = 0x402F - exp; - if ( 49 <= shiftDist ) { - if ( exact && (exp | sig64) ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; - } - return 0; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sign = signF128UI64( uiA64 ); - if ( sign || (shiftDist < 17) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - return - (exp == 0x7FFF) && sig64 ? ui32_fromNaN - : sign ? ui32_fromNegOverflow : ui32_fromPosOverflow; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sig64 |= UINT64_C( 0x0001000000000000 ); - z = sig64>>shiftDist; - if ( exact && ((uint_fast64_t) z< -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -uint_fast64_t - f128_to_ui64( float128_t a, uint_fast8_t roundingMode, bool exact ) -{ - union ui128_f128 uA; - uint_fast64_t uiA64, uiA0; - bool sign; - int_fast32_t exp; - uint_fast64_t sig64, sig0; - int_fast32_t shiftDist; - struct uint128 sig128; - struct uint64_extra sigExtra; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA64 = uA.ui.v64; - uiA0 = uA.ui.v0; - sign = signF128UI64( uiA64 ); - exp = expF128UI64( uiA64 ); - sig64 = fracF128UI64( uiA64 ); - sig0 = uiA0; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - shiftDist = 0x402F - exp; - if ( shiftDist <= 0 ) { - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - if ( shiftDist < -15 ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - return - (exp == 0x7FFF) && (sig64 | sig0) ? ui64_fromNaN - : sign ? ui64_fromNegOverflow : ui64_fromPosOverflow; - } - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - sig64 |= UINT64_C( 0x0001000000000000 ); - if ( shiftDist ) { - sig128 = softfloat_shortShiftLeft128( sig64, sig0, -shiftDist ); - sig64 = sig128.v64; - sig0 = sig128.v0; - } - } else { - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - if ( exp ) sig64 |= UINT64_C( 0x0001000000000000 ); - sigExtra = softfloat_shiftRightJam64Extra( sig64, sig0, shiftDist ); - sig64 = sigExtra.v; - sig0 = sigExtra.extra; - } - return softfloat_roundToUI64( sign, sig64, sig0, roundingMode, exact ); - -} - diff --git a/outside/softfloat-3/source/f128_to_ui64_r_minMag.c b/outside/softfloat-3/source/f128_to_ui64_r_minMag.c deleted file mode 100644 index 42d01b2c7..000000000 --- a/outside/softfloat-3/source/f128_to_ui64_r_minMag.c +++ /dev/null @@ -1,105 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -uint_fast64_t f128_to_ui64_r_minMag( float128_t a, bool exact ) -{ - union ui128_f128 uA; - uint_fast64_t uiA64, uiA0; - bool sign; - int_fast32_t exp; - uint_fast64_t sig64, sig0; - int_fast32_t shiftDist; - int_fast8_t negShiftDist; - uint_fast64_t z; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA64 = uA.ui.v64; - uiA0 = uA.ui.v0; - sign = signF128UI64( uiA64 ); - exp = expF128UI64( uiA64 ); - sig64 = fracF128UI64( uiA64 ); - sig0 = uiA0; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - shiftDist = 0x402F - exp; - if ( shiftDist < 0 ) { - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - if ( sign || (shiftDist < -15) ) goto invalid; - sig64 |= UINT64_C( 0x0001000000000000 ); - negShiftDist = -shiftDist; - z = sig64<>(shiftDist & 63); - if ( exact && (uint64_t) (sig0<>shiftDist; - if ( exact && (sig0 || (z< -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -float16_t f16_add( float16_t a, float16_t b ) -{ - union ui16_f16 uA; - uint_fast16_t uiA; - union ui16_f16 uB; - uint_fast16_t uiB; -#if ! defined INLINE_LEVEL || (INLINE_LEVEL < 1) - float16_t (*magsFuncPtr)( uint_fast16_t, uint_fast16_t ); -#endif - - uA.f = a; - uiA = uA.ui; - uB.f = b; - uiB = uB.ui; -#if defined INLINE_LEVEL && (1 <= INLINE_LEVEL) - if ( signF16UI( uiA ^ uiB ) ) { - return softfloat_subMagsF16( uiA, uiB ); - } else { - return softfloat_addMagsF16( uiA, uiB ); - } -#else - magsFuncPtr = - signF16UI( uiA ^ uiB ) ? softfloat_subMagsF16 : softfloat_addMagsF16; - return (*magsFuncPtr)( uiA, uiB ); -#endif - -} - diff --git a/outside/softfloat-3/source/f16_div.c b/outside/softfloat-3/source/f16_div.c deleted file mode 100644 index 0a84851c4..000000000 --- a/outside/softfloat-3/source/f16_div.c +++ /dev/null @@ -1,186 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -extern const uint16_t softfloat_approxRecip_1k0s[]; -extern const uint16_t softfloat_approxRecip_1k1s[]; - -float16_t f16_div( float16_t a, float16_t b ) -{ - union ui16_f16 uA; - uint_fast16_t uiA; - bool signA; - int_fast8_t expA; - uint_fast16_t sigA; - union ui16_f16 uB; - uint_fast16_t uiB; - bool signB; - int_fast8_t expB; - uint_fast16_t sigB; - bool signZ; - struct exp8_sig16 normExpSig; - int_fast8_t expZ; -#ifdef SOFTFLOAT_FAST_DIV32TO16 - uint_fast32_t sig32A; - uint_fast16_t sigZ; -#else - int index; - uint16_t r0; - uint_fast16_t sigZ, rem; -#endif - uint_fast16_t uiZ; - union ui16_f16 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - signA = signF16UI( uiA ); - expA = expF16UI( uiA ); - sigA = fracF16UI( uiA ); - uB.f = b; - uiB = uB.ui; - signB = signF16UI( uiB ); - expB = expF16UI( uiB ); - sigB = fracF16UI( uiB ); - signZ = signA ^ signB; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( expA == 0x1F ) { - if ( sigA ) goto propagateNaN; - if ( expB == 0x1F ) { - if ( sigB ) goto propagateNaN; - goto invalid; - } - goto infinity; - } - if ( expB == 0x1F ) { - if ( sigB ) goto propagateNaN; - goto zero; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! expB ) { - if ( ! sigB ) { - if ( ! (expA | sigA) ) goto invalid; - softfloat_raiseFlags( softfloat_flag_infinite ); - goto infinity; - } - normExpSig = softfloat_normSubnormalF16Sig( sigB ); - expB = normExpSig.exp; - sigB = normExpSig.sig; - } - if ( ! expA ) { - if ( ! sigA ) goto zero; - normExpSig = softfloat_normSubnormalF16Sig( sigA ); - expA = normExpSig.exp; - sigA = normExpSig.sig; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expZ = expA - expB + 0xE; - sigA |= 0x0400; - sigB |= 0x0400; -#ifdef SOFTFLOAT_FAST_DIV32TO16 - if ( sigA < sigB ) { - --expZ; - sig32A = (uint_fast32_t) sigA<<15; - } else { - sig32A = (uint_fast32_t) sigA<<14; - } - sigZ = sig32A / sigB; - if ( ! (sigZ & 7) ) sigZ |= ((uint_fast32_t) sigB * sigZ != sig32A); -#else - if ( sigA < sigB ) { - --expZ; - sigA <<= 5; - } else { - sigA <<= 4; - } - index = sigB>>6 & 0xF; - r0 = softfloat_approxRecip_1k0s[index] - - (((uint_fast32_t) softfloat_approxRecip_1k1s[index] - * (sigB & 0x3F)) - >>10); - sigZ = ((uint_fast32_t) sigA * r0)>>16; - rem = (sigA<<10) - sigZ * sigB; - sigZ += (rem * (uint_fast32_t) r0)>>26; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - ++sigZ; - if ( ! (sigZ & 7) ) { - sigZ &= ~1; - rem = (sigA<<10) - sigZ * sigB; - if ( rem & 0x8000 ) { - sigZ -= 2; - } else { - if ( rem ) sigZ |= 1; - } - } -#endif - return softfloat_roundPackToF16( signZ, expZ, sigZ ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - propagateNaN: - uiZ = softfloat_propagateNaNF16UI( uiA, uiB ); - goto uiZ; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - invalid: - softfloat_raiseFlags( softfloat_flag_invalid ); - uiZ = defaultNaNF16UI; - goto uiZ; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - infinity: - uiZ = packToF16UI( signZ, 0x1F, 0 ); - goto uiZ; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - zero: - uiZ = packToF16UI( signZ, 0, 0 ); - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/f16_eq.c b/outside/softfloat-3/source/f16_eq.c deleted file mode 100644 index 029f8ddbe..000000000 --- a/outside/softfloat-3/source/f16_eq.c +++ /dev/null @@ -1,66 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -bool f16_eq( float16_t a, float16_t b ) -{ - union ui16_f16 uA; - uint_fast16_t uiA; - union ui16_f16 uB; - uint_fast16_t uiB; - - uA.f = a; - uiA = uA.ui; - uB.f = b; - uiB = uB.ui; - if ( isNaNF16UI( uiA ) || isNaNF16UI( uiB ) ) { - if ( - softfloat_isSigNaNF16UI( uiA ) || softfloat_isSigNaNF16UI( uiB ) - ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - } - return false; - } - return (uiA == uiB) || ! (uint16_t) ((uiA | uiB)<<1); - -} - diff --git a/outside/softfloat-3/source/f16_eq_signaling.c b/outside/softfloat-3/source/f16_eq_signaling.c deleted file mode 100644 index 3f28c835d..000000000 --- a/outside/softfloat-3/source/f16_eq_signaling.c +++ /dev/null @@ -1,61 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -bool f16_eq_signaling( float16_t a, float16_t b ) -{ - union ui16_f16 uA; - uint_fast16_t uiA; - union ui16_f16 uB; - uint_fast16_t uiB; - - uA.f = a; - uiA = uA.ui; - uB.f = b; - uiB = uB.ui; - if ( isNaNF16UI( uiA ) || isNaNF16UI( uiB ) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - return false; - } - return (uiA == uiB) || ! (uint16_t) ((uiA | uiB)<<1); - -} - diff --git a/outside/softfloat-3/source/f16_isSignalingNaN.c b/outside/softfloat-3/source/f16_isSignalingNaN.c deleted file mode 100644 index 04f9134bf..000000000 --- a/outside/softfloat-3/source/f16_isSignalingNaN.c +++ /dev/null @@ -1,51 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -bool f16_isSignalingNaN( float16_t a ) -{ - union ui16_f16 uA; - - uA.f = a; - return softfloat_isSigNaNF16UI( uA.ui ); - -} - diff --git a/outside/softfloat-3/source/f16_le.c b/outside/softfloat-3/source/f16_le.c deleted file mode 100644 index e42def174..000000000 --- a/outside/softfloat-3/source/f16_le.c +++ /dev/null @@ -1,66 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -bool f16_le( float16_t a, float16_t b ) -{ - union ui16_f16 uA; - uint_fast16_t uiA; - union ui16_f16 uB; - uint_fast16_t uiB; - bool signA, signB; - - uA.f = a; - uiA = uA.ui; - uB.f = b; - uiB = uB.ui; - if ( isNaNF16UI( uiA ) || isNaNF16UI( uiB ) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - return false; - } - signA = signF16UI( uiA ); - signB = signF16UI( uiB ); - return - (signA != signB) ? signA || ! (uint16_t) ((uiA | uiB)<<1) - : (uiA == uiB) || (signA ^ (uiA < uiB)); - -} - diff --git a/outside/softfloat-3/source/f16_le_quiet.c b/outside/softfloat-3/source/f16_le_quiet.c deleted file mode 100644 index 5b122b7af..000000000 --- a/outside/softfloat-3/source/f16_le_quiet.c +++ /dev/null @@ -1,71 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -bool f16_le_quiet( float16_t a, float16_t b ) -{ - union ui16_f16 uA; - uint_fast16_t uiA; - union ui16_f16 uB; - uint_fast16_t uiB; - bool signA, signB; - - uA.f = a; - uiA = uA.ui; - uB.f = b; - uiB = uB.ui; - if ( isNaNF16UI( uiA ) || isNaNF16UI( uiB ) ) { - if ( - softfloat_isSigNaNF16UI( uiA ) || softfloat_isSigNaNF16UI( uiB ) - ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - } - return false; - } - signA = signF16UI( uiA ); - signB = signF16UI( uiB ); - return - (signA != signB) ? signA || ! (uint16_t) ((uiA | uiB)<<1) - : (uiA == uiB) || (signA ^ (uiA < uiB)); - -} - diff --git a/outside/softfloat-3/source/f16_lt.c b/outside/softfloat-3/source/f16_lt.c deleted file mode 100644 index ec59cbcd7..000000000 --- a/outside/softfloat-3/source/f16_lt.c +++ /dev/null @@ -1,66 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -bool f16_lt( float16_t a, float16_t b ) -{ - union ui16_f16 uA; - uint_fast16_t uiA; - union ui16_f16 uB; - uint_fast16_t uiB; - bool signA, signB; - - uA.f = a; - uiA = uA.ui; - uB.f = b; - uiB = uB.ui; - if ( isNaNF16UI( uiA ) || isNaNF16UI( uiB ) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - return false; - } - signA = signF16UI( uiA ); - signB = signF16UI( uiB ); - return - (signA != signB) ? signA && ((uint16_t) ((uiA | uiB)<<1) != 0) - : (uiA != uiB) && (signA ^ (uiA < uiB)); - -} - diff --git a/outside/softfloat-3/source/f16_lt_quiet.c b/outside/softfloat-3/source/f16_lt_quiet.c deleted file mode 100644 index 2a072fa14..000000000 --- a/outside/softfloat-3/source/f16_lt_quiet.c +++ /dev/null @@ -1,71 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -bool f16_lt_quiet( float16_t a, float16_t b ) -{ - union ui16_f16 uA; - uint_fast16_t uiA; - union ui16_f16 uB; - uint_fast16_t uiB; - bool signA, signB; - - uA.f = a; - uiA = uA.ui; - uB.f = b; - uiB = uB.ui; - if ( isNaNF16UI( uiA ) || isNaNF16UI( uiB ) ) { - if ( - softfloat_isSigNaNF16UI( uiA ) || softfloat_isSigNaNF16UI( uiB ) - ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - } - return false; - } - signA = signF16UI( uiA ); - signB = signF16UI( uiB ); - return - (signA != signB) ? signA && ((uint16_t) ((uiA | uiB)<<1) != 0) - : (uiA != uiB) && (signA ^ (uiA < uiB)); - -} - diff --git a/outside/softfloat-3/source/f16_mul.c b/outside/softfloat-3/source/f16_mul.c deleted file mode 100644 index a62ab7b02..000000000 --- a/outside/softfloat-3/source/f16_mul.c +++ /dev/null @@ -1,140 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -float16_t f16_mul( float16_t a, float16_t b ) -{ - union ui16_f16 uA; - uint_fast16_t uiA; - bool signA; - int_fast8_t expA; - uint_fast16_t sigA; - union ui16_f16 uB; - uint_fast16_t uiB; - bool signB; - int_fast8_t expB; - uint_fast16_t sigB; - bool signZ; - uint_fast16_t magBits; - struct exp8_sig16 normExpSig; - int_fast8_t expZ; - uint_fast32_t sig32Z; - uint_fast16_t sigZ, uiZ; - union ui16_f16 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - signA = signF16UI( uiA ); - expA = expF16UI( uiA ); - sigA = fracF16UI( uiA ); - uB.f = b; - uiB = uB.ui; - signB = signF16UI( uiB ); - expB = expF16UI( uiB ); - sigB = fracF16UI( uiB ); - signZ = signA ^ signB; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( expA == 0x1F ) { - if ( sigA || ((expB == 0x1F) && sigB) ) goto propagateNaN; - magBits = expB | sigB; - goto infArg; - } - if ( expB == 0x1F ) { - if ( sigB ) goto propagateNaN; - magBits = expA | sigA; - goto infArg; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! expA ) { - if ( ! sigA ) goto zero; - normExpSig = softfloat_normSubnormalF16Sig( sigA ); - expA = normExpSig.exp; - sigA = normExpSig.sig; - } - if ( ! expB ) { - if ( ! sigB ) goto zero; - normExpSig = softfloat_normSubnormalF16Sig( sigB ); - expB = normExpSig.exp; - sigB = normExpSig.sig; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expZ = expA + expB - 0xF; - sigA = (sigA | 0x0400)<<4; - sigB = (sigB | 0x0400)<<5; - sig32Z = (uint_fast32_t) sigA * sigB; - sigZ = sig32Z>>16; - if ( sig32Z & 0xFFFF ) sigZ |= 1; - if ( sigZ < 0x4000 ) { - --expZ; - sigZ <<= 1; - } - return softfloat_roundPackToF16( signZ, expZ, sigZ ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - propagateNaN: - uiZ = softfloat_propagateNaNF16UI( uiA, uiB ); - goto uiZ; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - infArg: - if ( ! magBits ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - uiZ = defaultNaNF16UI; - } else { - uiZ = packToF16UI( signZ, 0x1F, 0 ); - } - goto uiZ; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - zero: - uiZ = packToF16UI( signZ, 0, 0 ); - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/f16_mulAdd.c b/outside/softfloat-3/source/f16_mulAdd.c deleted file mode 100644 index 6866433bd..000000000 --- a/outside/softfloat-3/source/f16_mulAdd.c +++ /dev/null @@ -1,60 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -float16_t f16_mulAdd( float16_t a, float16_t b, float16_t c ) -{ - union ui16_f16 uA; - uint_fast16_t uiA; - union ui16_f16 uB; - uint_fast16_t uiB; - union ui16_f16 uC; - uint_fast16_t uiC; - - uA.f = a; - uiA = uA.ui; - uB.f = b; - uiB = uB.ui; - uC.f = c; - uiC = uC.ui; - return softfloat_mulAddF16( uiA, uiB, uiC, 0 ); - -} - diff --git a/outside/softfloat-3/source/f16_rem.c b/outside/softfloat-3/source/f16_rem.c deleted file mode 100644 index b3b6f5577..000000000 --- a/outside/softfloat-3/source/f16_rem.c +++ /dev/null @@ -1,171 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -float16_t f16_rem( float16_t a, float16_t b ) -{ - union ui16_f16 uA; - uint_fast16_t uiA; - bool signA; - int_fast8_t expA; - uint_fast16_t sigA; - union ui16_f16 uB; - uint_fast16_t uiB; - int_fast8_t expB; - uint_fast16_t sigB; - struct exp8_sig16 normExpSig; - uint16_t rem; - int_fast8_t expDiff; - uint_fast16_t q; - uint32_t recip32, q32; - uint16_t altRem, meanRem; - bool signRem; - uint_fast16_t uiZ; - union ui16_f16 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - signA = signF16UI( uiA ); - expA = expF16UI( uiA ); - sigA = fracF16UI( uiA ); - uB.f = b; - uiB = uB.ui; - expB = expF16UI( uiB ); - sigB = fracF16UI( uiB ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( expA == 0x1F ) { - if ( sigA || ((expB == 0x1F) && sigB) ) goto propagateNaN; - goto invalid; - } - if ( expB == 0x1F ) { - if ( sigB ) goto propagateNaN; - return a; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! expB ) { - if ( ! sigB ) goto invalid; - normExpSig = softfloat_normSubnormalF16Sig( sigB ); - expB = normExpSig.exp; - sigB = normExpSig.sig; - } - if ( ! expA ) { - if ( ! sigA ) return a; - normExpSig = softfloat_normSubnormalF16Sig( sigA ); - expA = normExpSig.exp; - sigA = normExpSig.sig; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - rem = sigA | 0x0400; - sigB |= 0x0400; - expDiff = expA - expB; - if ( expDiff < 1 ) { - if ( expDiff < -1 ) return a; - sigB <<= 3; - if ( expDiff ) { - rem <<= 2; - q = 0; - } else { - rem <<= 3; - q = (sigB <= rem); - if ( q ) rem -= sigB; - } - } else { - recip32 = softfloat_approxRecip32_1( (uint_fast32_t) sigB<<21 ); - /*-------------------------------------------------------------------- - | Changing the shift of `rem' here requires also changing the initial - | subtraction from `expDiff'. - *--------------------------------------------------------------------*/ - rem <<= 4; - expDiff -= 31; - /*-------------------------------------------------------------------- - | The scale of `sigB' affects how many bits are obtained during each - | cycle of the loop. Currently this is 29 bits per loop iteration, - | which is believed to be the maximum possible. - *--------------------------------------------------------------------*/ - sigB <<= 3; - for (;;) { - q32 = (rem * (uint_fast64_t) recip32)>>16; - if ( expDiff < 0 ) break; - rem = -((uint_fast16_t) q32 * sigB); - expDiff -= 29; - } - /*-------------------------------------------------------------------- - | (`expDiff' cannot be less than -30 here.) - *--------------------------------------------------------------------*/ - q32 >>= ~expDiff & 31; - q = q32; - rem = (rem<<(expDiff + 30)) - q * sigB; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - do { - altRem = rem; - ++q; - rem -= sigB; - } while ( ! (rem & 0x8000) ); - meanRem = rem + altRem; - if ( (meanRem & 0x8000) || (! meanRem && (q & 1)) ) rem = altRem; - signRem = signA; - if ( 0x8000 <= rem ) { - signRem = ! signRem; - rem = -rem; - } - return softfloat_normRoundPackToF16( signRem, expB, rem ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - propagateNaN: - uiZ = softfloat_propagateNaNF16UI( uiA, uiB ); - goto uiZ; - invalid: - softfloat_raiseFlags( softfloat_flag_invalid ); - uiZ = defaultNaNF16UI; - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/f16_roundToInt.c b/outside/softfloat-3/source/f16_roundToInt.c deleted file mode 100644 index fcd1902f1..000000000 --- a/outside/softfloat-3/source/f16_roundToInt.c +++ /dev/null @@ -1,112 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -float16_t f16_roundToInt( float16_t a, uint_fast8_t roundingMode, bool exact ) -{ - union ui16_f16 uA; - uint_fast16_t uiA; - int_fast8_t exp; - uint_fast16_t uiZ, lastBitMask, roundBitsMask; - union ui16_f16 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - exp = expF16UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp <= 0xE ) { - if ( ! (uint16_t) (uiA<<1) ) return a; - if ( exact ) softfloat_exceptionFlags |= softfloat_flag_inexact; - uiZ = uiA & packToF16UI( 1, 0, 0 ); - switch ( roundingMode ) { - case softfloat_round_near_even: - if ( ! fracF16UI( uiA ) ) break; - case softfloat_round_near_maxMag: - if ( exp == 0xE ) uiZ |= packToF16UI( 0, 0xF, 0 ); - break; - case softfloat_round_min: - if ( uiZ ) uiZ = packToF16UI( 1, 0xF, 0 ); - break; - case softfloat_round_max: - if ( ! uiZ ) uiZ = packToF16UI( 0, 0xF, 0 ); - break; - } - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( 0x19 <= exp ) { - if ( (exp == 0x1F) && fracF16UI( uiA ) ) { - uiZ = softfloat_propagateNaNF16UI( uiA, 0 ); - goto uiZ; - } - return a; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiZ = uiA; - lastBitMask = (uint_fast16_t) 1<<(0x19 - exp); - roundBitsMask = lastBitMask - 1; - if ( roundingMode == softfloat_round_near_maxMag ) { - uiZ += lastBitMask>>1; - } else if ( roundingMode == softfloat_round_near_even ) { - uiZ += lastBitMask>>1; - if ( ! (uiZ & roundBitsMask) ) uiZ &= ~lastBitMask; - } else if ( - roundingMode - == (signF16UI( uiZ ) ? softfloat_round_min : softfloat_round_max) - ) { - uiZ += roundBitsMask; - } - uiZ &= ~roundBitsMask; - if ( exact && (uiZ != uiA) ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; - } - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/f16_sqrt.c b/outside/softfloat-3/source/f16_sqrt.c deleted file mode 100644 index f5464825e..000000000 --- a/outside/softfloat-3/source/f16_sqrt.c +++ /dev/null @@ -1,136 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -extern const uint16_t softfloat_approxRecipSqrt_1k0s[]; -extern const uint16_t softfloat_approxRecipSqrt_1k1s[]; - -float16_t f16_sqrt( float16_t a ) -{ - union ui16_f16 uA; - uint_fast16_t uiA; - bool signA; - int_fast8_t expA; - uint_fast16_t sigA, uiZ; - struct exp8_sig16 normExpSig; - int_fast8_t expZ; - int index; - uint_fast16_t r0; - uint_fast32_t ESqrR0; - uint16_t sigma0; - uint_fast16_t recipSqrt16, sigZ, shiftedSigZ; - uint16_t negRem; - union ui16_f16 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - signA = signF16UI( uiA ); - expA = expF16UI( uiA ); - sigA = fracF16UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( expA == 0x1F ) { - if ( sigA ) { - uiZ = softfloat_propagateNaNF16UI( uiA, 0 ); - goto uiZ; - } - if ( ! signA ) return a; - goto invalid; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( signA ) { - if ( ! (expA | sigA) ) return a; - goto invalid; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! expA ) { - if ( ! sigA ) return a; - normExpSig = softfloat_normSubnormalF16Sig( sigA ); - expA = normExpSig.exp; - sigA = normExpSig.sig; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expZ = ((expA - 0xF)>>1) + 0xE; - expA &= 1; - sigA |= 0x0400; - index = (sigA>>6 & 0xE) + expA; - r0 = softfloat_approxRecipSqrt_1k0s[index] - - (((uint_fast32_t) softfloat_approxRecipSqrt_1k1s[index] - * (sigA & 0x7F)) - >>11); - ESqrR0 = ((uint_fast32_t) r0 * r0)>>1; - if ( expA ) ESqrR0 >>= 1; - sigma0 = ~(uint_fast16_t) ((ESqrR0 * sigA)>>16); - recipSqrt16 = r0 + (((uint_fast32_t) r0 * sigma0)>>25); - if ( ! (recipSqrt16 & 0x8000) ) recipSqrt16 = 0x8000; - sigZ = ((uint_fast32_t) (sigA<<5) * recipSqrt16)>>16; - if ( expA ) sigZ >>= 1; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - ++sigZ; - if ( ! (sigZ & 7) ) { - shiftedSigZ = sigZ>>1; - negRem = shiftedSigZ * shiftedSigZ; - sigZ &= ~1; - if ( negRem & 0x8000 ) { - sigZ |= 1; - } else { - if ( negRem ) --sigZ; - } - } - return softfloat_roundPackToF16( 0, expZ, sigZ ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - invalid: - softfloat_raiseFlags( softfloat_flag_invalid ); - uiZ = defaultNaNF16UI; - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/f16_sub.c b/outside/softfloat-3/source/f16_sub.c deleted file mode 100644 index 70f23e54a..000000000 --- a/outside/softfloat-3/source/f16_sub.c +++ /dev/null @@ -1,70 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -float16_t f16_sub( float16_t a, float16_t b ) -{ - union ui16_f16 uA; - uint_fast16_t uiA; - union ui16_f16 uB; - uint_fast16_t uiB; -#if ! defined INLINE_LEVEL || (INLINE_LEVEL < 1) - float16_t (*magsFuncPtr)( uint_fast16_t, uint_fast16_t ); -#endif - - uA.f = a; - uiA = uA.ui; - uB.f = b; - uiB = uB.ui; -#if defined INLINE_LEVEL && (1 <= INLINE_LEVEL) - if ( signF16UI( uiA ^ uiB ) ) { - return softfloat_addMagsF16( uiA, uiB ); - } else { - return softfloat_subMagsF16( uiA, uiB ); - } -#else - magsFuncPtr = - signF16UI( uiA ^ uiB ) ? softfloat_addMagsF16 : softfloat_subMagsF16; - return (*magsFuncPtr)( uiA, uiB ); -#endif - -} - diff --git a/outside/softfloat-3/source/f16_to_extF80.c b/outside/softfloat-3/source/f16_to_extF80.c deleted file mode 100644 index 1a7590336..000000000 --- a/outside/softfloat-3/source/f16_to_extF80.c +++ /dev/null @@ -1,101 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -extFloat80_t f16_to_extF80( float16_t a ) -{ - union ui16_f16 uA; - uint_fast16_t uiA; - bool sign; - int_fast8_t exp; - uint_fast16_t frac; - struct commonNaN commonNaN; - struct uint128 uiZ; - uint_fast16_t uiZ64; - uint_fast64_t uiZ0; - struct exp8_sig16 normExpSig; - union { struct extFloat80M s; extFloat80_t f; } uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - sign = signF16UI( uiA ); - exp = expF16UI( uiA ); - frac = fracF16UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp == 0x1F ) { - if ( frac ) { - softfloat_f16UIToCommonNaN( uiA, &commonNaN ); - uiZ = softfloat_commonNaNToExtF80UI( &commonNaN ); - uiZ64 = uiZ.v64; - uiZ0 = uiZ.v0; - } else { - uiZ64 = packToExtF80UI64( sign, 0x7FFF ); - uiZ0 = UINT64_C( 0x8000000000000000 ); - } - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! exp ) { - if ( ! frac ) { - uiZ64 = packToExtF80UI64( sign, 0 ); - uiZ0 = 0; - goto uiZ; - } - normExpSig = softfloat_normSubnormalF16Sig( frac ); - exp = normExpSig.exp; - frac = normExpSig.sig; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiZ64 = packToExtF80UI64( sign, exp + 0x3FF0 ); - uiZ0 = (uint_fast64_t) (frac | 0x0400)<<53; - uiZ: - uZ.s.signExp = uiZ64; - uZ.s.signif = uiZ0; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/f16_to_extF80M.c b/outside/softfloat-3/source/f16_to_extF80M.c deleted file mode 100644 index 300ba68a2..000000000 --- a/outside/softfloat-3/source/f16_to_extF80M.c +++ /dev/null @@ -1,111 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -void f16_to_extF80M( float16_t a, extFloat80_t *zPtr ) -{ - - *zPtr = f16_to_extF80( a ); - -} - -#else - -void f16_to_extF80M( float16_t a, extFloat80_t *zPtr ) -{ - struct extFloat80M *zSPtr; - union ui16_f16 uA; - uint16_t uiA; - bool sign; - int_fast8_t exp; - uint16_t frac; - struct commonNaN commonNaN; - uint_fast16_t uiZ64; - uint32_t uiZ32; - struct exp8_sig16 normExpSig; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - zSPtr = (struct extFloat80M *) zPtr; - uA.f = a; - uiA = uA.ui; - sign = signF16UI( uiA ); - exp = expF16UI( uiA ); - frac = fracF16UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp == 0x1F ) { - if ( frac ) { - softfloat_f16UIToCommonNaN( uiA, &commonNaN ); - softfloat_commonNaNToExtF80M( &commonNaN, zSPtr ); - return; - } - uiZ64 = packToExtF80UI64( sign, 0x7FFF ); - uiZ32 = 0x80000000; - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! exp ) { - if ( ! frac ) { - uiZ64 = packToExtF80UI64( sign, 0 ); - uiZ32 = 0; - goto uiZ; - } - normExpSig = softfloat_normSubnormalF16Sig( frac ); - exp = normExpSig.exp; - frac = normExpSig.sig; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiZ64 = packToExtF80UI64( sign, exp + 0x3FF0 ); - uiZ32 = 0x80000000 | (uint32_t) frac<<21; - uiZ: - zSPtr->signExp = uiZ64; - zSPtr->signif = (uint64_t) uiZ32<<32; - -} - -#endif - diff --git a/outside/softfloat-3/source/f16_to_f128.c b/outside/softfloat-3/source/f16_to_f128.c deleted file mode 100644 index e7e8455b5..000000000 --- a/outside/softfloat-3/source/f16_to_f128.c +++ /dev/null @@ -1,96 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -float128_t f16_to_f128( float16_t a ) -{ - union ui16_f16 uA; - uint_fast16_t uiA; - bool sign; - int_fast8_t exp; - uint_fast16_t frac; - struct commonNaN commonNaN; - struct uint128 uiZ; - struct exp8_sig16 normExpSig; - union ui128_f128 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - sign = signF16UI( uiA ); - exp = expF16UI( uiA ); - frac = fracF16UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp == 0x1F ) { - if ( frac ) { - softfloat_f16UIToCommonNaN( uiA, &commonNaN ); - uiZ = softfloat_commonNaNToF128UI( &commonNaN ); - } else { - uiZ.v64 = packToF128UI64( sign, 0x7FFF, 0 ); - uiZ.v0 = 0; - } - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! exp ) { - if ( ! frac ) { - uiZ.v64 = packToF128UI64( sign, 0, 0 ); - uiZ.v0 = 0; - goto uiZ; - } - normExpSig = softfloat_normSubnormalF16Sig( frac ); - exp = normExpSig.exp - 1; - frac = normExpSig.sig; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiZ.v64 = packToF128UI64( sign, exp + 0x3FF0, (uint_fast64_t) frac<<38 ); - uiZ.v0 = 0; - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/f16_to_f128M.c b/outside/softfloat-3/source/f16_to_f128M.c deleted file mode 100644 index f43e0020a..000000000 --- a/outside/softfloat-3/source/f16_to_f128M.c +++ /dev/null @@ -1,112 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -void f16_to_f128M( float16_t a, float128_t *zPtr ) -{ - - *zPtr = f16_to_f128( a ); - -} - -#else - -void f16_to_f128M( float16_t a, float128_t *zPtr ) -{ - uint32_t *zWPtr; - union ui16_f16 uA; - uint16_t uiA; - bool sign; - int_fast8_t exp; - uint16_t frac; - struct commonNaN commonNaN; - uint32_t uiZ96; - struct exp8_sig16 normExpSig; - uint64_t frac64; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - zWPtr = (uint32_t *) zPtr; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - sign = signF16UI( uiA ); - exp = expF16UI( uiA ); - frac = fracF16UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp == 0x1F ) { - if ( frac ) { - softfloat_f16UIToCommonNaN( uiA, &commonNaN ); - softfloat_commonNaNToF128M( &commonNaN, zWPtr ); - return; - } - uiZ96 = packToF128UI96( sign, 0x7FFF, 0 ); - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! exp ) { - if ( ! frac ) { - uiZ96 = packToF128UI96( sign, 0, 0 ); - goto uiZ; - } - normExpSig = softfloat_normSubnormalF16Sig( frac ); - exp = normExpSig.exp - 1; - frac = normExpSig.sig; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiZ96 = packToF128UI96( sign, exp + 0x3FF0, (uint32_t) frac<<6 ); - uiZ: - zWPtr[indexWord( 4, 3 )] = uiZ96; - zWPtr[indexWord( 4, 2 )] = 0; - zWPtr[indexWord( 4, 1 )] = 0; - zWPtr[indexWord( 4, 0 )] = 0; - -} - -#endif - diff --git a/outside/softfloat-3/source/f16_to_f32.c b/outside/softfloat-3/source/f16_to_f32.c deleted file mode 100644 index 121d5f034..000000000 --- a/outside/softfloat-3/source/f16_to_f32.c +++ /dev/null @@ -1,93 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -float32_t f16_to_f32( float16_t a ) -{ - union ui16_f16 uA; - uint_fast16_t uiA; - bool sign; - int_fast8_t exp; - uint_fast16_t frac; - struct commonNaN commonNaN; - uint_fast32_t uiZ; - struct exp8_sig16 normExpSig; - union ui32_f32 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - sign = signF16UI( uiA ); - exp = expF16UI( uiA ); - frac = fracF16UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp == 0x1F ) { - if ( frac ) { - softfloat_f16UIToCommonNaN( uiA, &commonNaN ); - uiZ = softfloat_commonNaNToF32UI( &commonNaN ); - } else { - uiZ = packToF32UI( sign, 0xFF, 0 ); - } - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! exp ) { - if ( ! frac ) { - uiZ = packToF32UI( sign, 0, 0 ); - goto uiZ; - } - normExpSig = softfloat_normSubnormalF16Sig( frac ); - exp = normExpSig.exp - 1; - frac = normExpSig.sig; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiZ = packToF32UI( sign, exp + 0x70, (uint_fast32_t) frac<<13 ); - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/f16_to_f64.c b/outside/softfloat-3/source/f16_to_f64.c deleted file mode 100644 index 201f16f98..000000000 --- a/outside/softfloat-3/source/f16_to_f64.c +++ /dev/null @@ -1,93 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -float64_t f16_to_f64( float16_t a ) -{ - union ui16_f16 uA; - uint_fast16_t uiA; - bool sign; - int_fast8_t exp; - uint_fast16_t frac; - struct commonNaN commonNaN; - uint_fast64_t uiZ; - struct exp8_sig16 normExpSig; - union ui64_f64 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - sign = signF16UI( uiA ); - exp = expF16UI( uiA ); - frac = fracF16UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp == 0x1F ) { - if ( frac ) { - softfloat_f16UIToCommonNaN( uiA, &commonNaN ); - uiZ = softfloat_commonNaNToF64UI( &commonNaN ); - } else { - uiZ = packToF64UI( sign, 0x7FF, 0 ); - } - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! exp ) { - if ( ! frac ) { - uiZ = packToF64UI( sign, 0, 0 ); - goto uiZ; - } - normExpSig = softfloat_normSubnormalF16Sig( frac ); - exp = normExpSig.exp - 1; - frac = normExpSig.sig; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiZ = packToF64UI( sign, exp + 0x3F0, (uint_fast64_t) frac<<42 ); - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/f16_to_i32.c b/outside/softfloat-3/source/f16_to_i32.c deleted file mode 100644 index f3529bafb..000000000 --- a/outside/softfloat-3/source/f16_to_i32.c +++ /dev/null @@ -1,87 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the -University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -int_fast32_t f16_to_i32( float16_t a, uint_fast8_t roundingMode, bool exact ) -{ - union ui16_f16 uA; - uint_fast16_t uiA; - bool sign; - int_fast8_t exp; - uint_fast16_t frac; - int_fast32_t sig32; - int_fast8_t shiftDist; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - sign = signF16UI( uiA ); - exp = expF16UI( uiA ); - frac = fracF16UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp == 0x1F ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - return - frac ? i32_fromNaN - : sign ? i32_fromNegOverflow : i32_fromPosOverflow; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sig32 = frac; - if ( exp ) { - sig32 |= 0x0400; - shiftDist = exp - 0x19; - if ( 0 <= shiftDist ) { - sig32 <<= shiftDist; - return sign ? -sig32 : sig32; - } - shiftDist = exp - 0x0D; - if ( 0 < shiftDist ) sig32 <<= shiftDist; - } - return - softfloat_roundToI32( - sign, (uint_fast32_t) sig32, roundingMode, exact ); - -} - diff --git a/outside/softfloat-3/source/f16_to_i32_r_minMag.c b/outside/softfloat-3/source/f16_to_i32_r_minMag.c deleted file mode 100644 index 91c98045e..000000000 --- a/outside/softfloat-3/source/f16_to_i32_r_minMag.c +++ /dev/null @@ -1,88 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -int_fast32_t f16_to_i32_r_minMag( float16_t a, bool exact ) -{ - union ui16_f16 uA; - uint_fast16_t uiA; - int_fast8_t exp; - uint_fast16_t frac; - int_fast8_t shiftDist; - bool sign; - int_fast32_t alignedSig; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - exp = expF16UI( uiA ); - frac = fracF16UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - shiftDist = exp - 0x0F; - if ( shiftDist < 0 ) { - if ( exact && (exp | frac) ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; - } - return 0; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sign = signF16UI( uiA ); - if ( exp == 0x1F ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - return - (exp == 0x1F) && frac ? i32_fromNaN - : sign ? i32_fromNegOverflow : i32_fromPosOverflow; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - alignedSig = (int_fast32_t) (frac | 0x0400)<>= 10; - return sign ? -alignedSig : alignedSig; - -} - diff --git a/outside/softfloat-3/source/f16_to_i64.c b/outside/softfloat-3/source/f16_to_i64.c deleted file mode 100644 index 7f2c1156e..000000000 --- a/outside/softfloat-3/source/f16_to_i64.c +++ /dev/null @@ -1,87 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the -University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -int_fast64_t f16_to_i64( float16_t a, uint_fast8_t roundingMode, bool exact ) -{ - union ui16_f16 uA; - uint_fast16_t uiA; - bool sign; - int_fast8_t exp; - uint_fast16_t frac; - int_fast32_t sig32; - int_fast8_t shiftDist; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - sign = signF16UI( uiA ); - exp = expF16UI( uiA ); - frac = fracF16UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp == 0x1F ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - return - frac ? i64_fromNaN - : sign ? i64_fromNegOverflow : i64_fromPosOverflow; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sig32 = frac; - if ( exp ) { - sig32 |= 0x0400; - shiftDist = exp - 0x19; - if ( 0 <= shiftDist ) { - sig32 <<= shiftDist; - return sign ? -sig32 : sig32; - } - shiftDist = exp - 0x0D; - if ( 0 < shiftDist ) sig32 <<= shiftDist; - } - return - softfloat_roundToI32( - sign, (uint_fast32_t) sig32, roundingMode, exact ); - -} - diff --git a/outside/softfloat-3/source/f16_to_i64_r_minMag.c b/outside/softfloat-3/source/f16_to_i64_r_minMag.c deleted file mode 100644 index 0eb1d6017..000000000 --- a/outside/softfloat-3/source/f16_to_i64_r_minMag.c +++ /dev/null @@ -1,88 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -int_fast64_t f16_to_i64_r_minMag( float16_t a, bool exact ) -{ - union ui16_f16 uA; - uint_fast16_t uiA; - int_fast8_t exp; - uint_fast16_t frac; - int_fast8_t shiftDist; - bool sign; - int_fast32_t alignedSig; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - exp = expF16UI( uiA ); - frac = fracF16UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - shiftDist = exp - 0x0F; - if ( shiftDist < 0 ) { - if ( exact && (exp | frac) ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; - } - return 0; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sign = signF16UI( uiA ); - if ( exp == 0x1F ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - return - (exp == 0x1F) && frac ? i64_fromNaN - : sign ? i64_fromNegOverflow : i64_fromPosOverflow; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - alignedSig = (int_fast32_t) (frac | 0x0400)<>= 10; - return sign ? -alignedSig : alignedSig; - -} - diff --git a/outside/softfloat-3/source/f16_to_ui32.c b/outside/softfloat-3/source/f16_to_ui32.c deleted file mode 100644 index 26a35968d..000000000 --- a/outside/softfloat-3/source/f16_to_ui32.c +++ /dev/null @@ -1,84 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the -University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -uint_fast32_t f16_to_ui32( float16_t a, uint_fast8_t roundingMode, bool exact ) -{ - union ui16_f16 uA; - uint_fast16_t uiA; - bool sign; - int_fast8_t exp; - uint_fast16_t frac; - uint_fast32_t sig32; - int_fast8_t shiftDist; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - sign = signF16UI( uiA ); - exp = expF16UI( uiA ); - frac = fracF16UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp == 0x1F ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - return - frac ? ui32_fromNaN - : sign ? ui32_fromNegOverflow : ui32_fromPosOverflow; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sig32 = frac; - if ( exp ) { - sig32 |= 0x0400; - shiftDist = exp - 0x19; - if ( (0 <= shiftDist) && ! sign ) { - return sig32< -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -uint_fast32_t f16_to_ui32_r_minMag( float16_t a, bool exact ) -{ - union ui16_f16 uA; - uint_fast16_t uiA; - int_fast8_t exp; - uint_fast16_t frac; - int_fast8_t shiftDist; - bool sign; - uint_fast32_t alignedSig; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - exp = expF16UI( uiA ); - frac = fracF16UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - shiftDist = exp - 0x0F; - if ( shiftDist < 0 ) { - if ( exact && (exp | frac) ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; - } - return 0; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sign = signF16UI( uiA ); - if ( sign || (exp == 0x1F) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - return - (exp == 0x1F) && frac ? ui32_fromNaN - : sign ? ui32_fromNegOverflow : ui32_fromPosOverflow; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - alignedSig = (uint_fast32_t) (frac | 0x0400)<>10; - -} - diff --git a/outside/softfloat-3/source/f16_to_ui64.c b/outside/softfloat-3/source/f16_to_ui64.c deleted file mode 100644 index 7bd9b6f37..000000000 --- a/outside/softfloat-3/source/f16_to_ui64.c +++ /dev/null @@ -1,84 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the -University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -uint_fast64_t f16_to_ui64( float16_t a, uint_fast8_t roundingMode, bool exact ) -{ - union ui16_f16 uA; - uint_fast16_t uiA; - bool sign; - int_fast8_t exp; - uint_fast16_t frac; - uint_fast32_t sig32; - int_fast8_t shiftDist; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - sign = signF16UI( uiA ); - exp = expF16UI( uiA ); - frac = fracF16UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp == 0x1F ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - return - frac ? ui64_fromNaN - : sign ? ui64_fromNegOverflow : ui64_fromPosOverflow; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sig32 = frac; - if ( exp ) { - sig32 |= 0x0400; - shiftDist = exp - 0x19; - if ( (0 <= shiftDist) && ! sign ) { - return sig32< -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -uint_fast64_t f16_to_ui64_r_minMag( float16_t a, bool exact ) -{ - union ui16_f16 uA; - uint_fast16_t uiA; - int_fast8_t exp; - uint_fast16_t frac; - int_fast8_t shiftDist; - bool sign; - uint_fast32_t alignedSig; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - exp = expF16UI( uiA ); - frac = fracF16UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - shiftDist = exp - 0x0F; - if ( shiftDist < 0 ) { - if ( exact && (exp | frac) ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; - } - return 0; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sign = signF16UI( uiA ); - if ( sign || (exp == 0x1F) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - return - (exp == 0x1F) && frac ? ui64_fromNaN - : sign ? ui64_fromNegOverflow : ui64_fromPosOverflow; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - alignedSig = (uint_fast32_t) (frac | 0x0400)<>10; - -} - diff --git a/outside/softfloat-3/source/f32_add.c b/outside/softfloat-3/source/f32_add.c deleted file mode 100644 index 19b1caa8a..000000000 --- a/outside/softfloat-3/source/f32_add.c +++ /dev/null @@ -1,70 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -float32_t f32_add( float32_t a, float32_t b ) -{ - union ui32_f32 uA; - uint_fast32_t uiA; - union ui32_f32 uB; - uint_fast32_t uiB; -#if ! defined INLINE_LEVEL || (INLINE_LEVEL < 1) - float32_t (*magsFuncPtr)( uint_fast32_t, uint_fast32_t ); -#endif - - uA.f = a; - uiA = uA.ui; - uB.f = b; - uiB = uB.ui; -#if defined INLINE_LEVEL && (1 <= INLINE_LEVEL) - if ( signF32UI( uiA ^ uiB ) ) { - return softfloat_subMagsF32( uiA, uiB ); - } else { - return softfloat_addMagsF32( uiA, uiB ); - } -#else - magsFuncPtr = - signF32UI( uiA ^ uiB ) ? softfloat_subMagsF32 : softfloat_addMagsF32; - return (*magsFuncPtr)( uiA, uiB ); -#endif - -} - diff --git a/outside/softfloat-3/source/f32_div.c b/outside/softfloat-3/source/f32_div.c deleted file mode 100644 index 91d092c3f..000000000 --- a/outside/softfloat-3/source/f32_div.c +++ /dev/null @@ -1,180 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -float32_t f32_div( float32_t a, float32_t b ) -{ - union ui32_f32 uA; - uint_fast32_t uiA; - bool signA; - int_fast16_t expA; - uint_fast32_t sigA; - union ui32_f32 uB; - uint_fast32_t uiB; - bool signB; - int_fast16_t expB; - uint_fast32_t sigB; - bool signZ; - struct exp16_sig32 normExpSig; - int_fast16_t expZ; -#ifdef SOFTFLOAT_FAST_DIV64TO32 - uint_fast64_t sig64A; - uint_fast32_t sigZ; -#else - uint_fast32_t sigZ; - uint_fast64_t rem; -#endif - uint_fast32_t uiZ; - union ui32_f32 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - signA = signF32UI( uiA ); - expA = expF32UI( uiA ); - sigA = fracF32UI( uiA ); - uB.f = b; - uiB = uB.ui; - signB = signF32UI( uiB ); - expB = expF32UI( uiB ); - sigB = fracF32UI( uiB ); - signZ = signA ^ signB; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( expA == 0xFF ) { - if ( sigA ) goto propagateNaN; - if ( expB == 0xFF ) { - if ( sigB ) goto propagateNaN; - goto invalid; - } - goto infinity; - } - if ( expB == 0xFF ) { - if ( sigB ) goto propagateNaN; - goto zero; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! expB ) { - if ( ! sigB ) { - if ( ! (expA | sigA) ) goto invalid; - softfloat_raiseFlags( softfloat_flag_infinite ); - goto infinity; - } - normExpSig = softfloat_normSubnormalF32Sig( sigB ); - expB = normExpSig.exp; - sigB = normExpSig.sig; - } - if ( ! expA ) { - if ( ! sigA ) goto zero; - normExpSig = softfloat_normSubnormalF32Sig( sigA ); - expA = normExpSig.exp; - sigA = normExpSig.sig; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expZ = expA - expB + 0x7E; - sigA |= 0x00800000; - sigB |= 0x00800000; -#ifdef SOFTFLOAT_FAST_DIV64TO32 - if ( sigA < sigB ) { - --expZ; - sig64A = (uint_fast64_t) sigA<<31; - } else { - sig64A = (uint_fast64_t) sigA<<30; - } - sigZ = sig64A / sigB; - if ( ! (sigZ & 0x3F) ) sigZ |= ((uint_fast64_t) sigB * sigZ != sig64A); -#else - if ( sigA < sigB ) { - --expZ; - sigA <<= 8; - } else { - sigA <<= 7; - } - sigB <<= 8; - sigZ = ((uint_fast64_t) sigA * softfloat_approxRecip32_1( sigB ))>>32; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sigZ += 2; - if ( (sigZ & 0x3F) < 2 ) { - sigZ &= ~3; -#ifdef SOFTFLOAT_FAST_INT64 - rem = ((uint_fast64_t) sigA<<31) - (uint_fast64_t) sigZ * sigB; -#else - rem = ((uint_fast64_t) sigA<<32) - (uint_fast64_t) (sigZ<<1) * sigB; -#endif - if ( rem & UINT64_C( 0x8000000000000000 ) ) { - sigZ -= 4; - } else { - if ( rem ) sigZ |= 1; - } - } -#endif - return softfloat_roundPackToF32( signZ, expZ, sigZ ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - propagateNaN: - uiZ = softfloat_propagateNaNF32UI( uiA, uiB ); - goto uiZ; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - invalid: - softfloat_raiseFlags( softfloat_flag_invalid ); - uiZ = defaultNaNF32UI; - goto uiZ; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - infinity: - uiZ = packToF32UI( signZ, 0xFF, 0 ); - goto uiZ; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - zero: - uiZ = packToF32UI( signZ, 0, 0 ); - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/f32_eq.c b/outside/softfloat-3/source/f32_eq.c deleted file mode 100644 index 6d0375ffd..000000000 --- a/outside/softfloat-3/source/f32_eq.c +++ /dev/null @@ -1,66 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -bool f32_eq( float32_t a, float32_t b ) -{ - union ui32_f32 uA; - uint_fast32_t uiA; - union ui32_f32 uB; - uint_fast32_t uiB; - - uA.f = a; - uiA = uA.ui; - uB.f = b; - uiB = uB.ui; - if ( isNaNF32UI( uiA ) || isNaNF32UI( uiB ) ) { - if ( - softfloat_isSigNaNF32UI( uiA ) || softfloat_isSigNaNF32UI( uiB ) - ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - } - return false; - } - return (uiA == uiB) || ! (uint32_t) ((uiA | uiB)<<1); - -} - diff --git a/outside/softfloat-3/source/f32_eq_signaling.c b/outside/softfloat-3/source/f32_eq_signaling.c deleted file mode 100644 index a6835cef9..000000000 --- a/outside/softfloat-3/source/f32_eq_signaling.c +++ /dev/null @@ -1,61 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -bool f32_eq_signaling( float32_t a, float32_t b ) -{ - union ui32_f32 uA; - uint_fast32_t uiA; - union ui32_f32 uB; - uint_fast32_t uiB; - - uA.f = a; - uiA = uA.ui; - uB.f = b; - uiB = uB.ui; - if ( isNaNF32UI( uiA ) || isNaNF32UI( uiB ) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - return false; - } - return (uiA == uiB) || ! (uint32_t) ((uiA | uiB)<<1); - -} - diff --git a/outside/softfloat-3/source/f32_isSignalingNaN.c b/outside/softfloat-3/source/f32_isSignalingNaN.c deleted file mode 100644 index 8ddbc0dee..000000000 --- a/outside/softfloat-3/source/f32_isSignalingNaN.c +++ /dev/null @@ -1,51 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -bool f32_isSignalingNaN( float32_t a ) -{ - union ui32_f32 uA; - - uA.f = a; - return softfloat_isSigNaNF32UI( uA.ui ); - -} - diff --git a/outside/softfloat-3/source/f32_le.c b/outside/softfloat-3/source/f32_le.c deleted file mode 100644 index bdb18a39f..000000000 --- a/outside/softfloat-3/source/f32_le.c +++ /dev/null @@ -1,66 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -bool f32_le( float32_t a, float32_t b ) -{ - union ui32_f32 uA; - uint_fast32_t uiA; - union ui32_f32 uB; - uint_fast32_t uiB; - bool signA, signB; - - uA.f = a; - uiA = uA.ui; - uB.f = b; - uiB = uB.ui; - if ( isNaNF32UI( uiA ) || isNaNF32UI( uiB ) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - return false; - } - signA = signF32UI( uiA ); - signB = signF32UI( uiB ); - return - (signA != signB) ? signA || ! (uint32_t) ((uiA | uiB)<<1) - : (uiA == uiB) || (signA ^ (uiA < uiB)); - -} - diff --git a/outside/softfloat-3/source/f32_le_quiet.c b/outside/softfloat-3/source/f32_le_quiet.c deleted file mode 100644 index 25ef66379..000000000 --- a/outside/softfloat-3/source/f32_le_quiet.c +++ /dev/null @@ -1,71 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -bool f32_le_quiet( float32_t a, float32_t b ) -{ - union ui32_f32 uA; - uint_fast32_t uiA; - union ui32_f32 uB; - uint_fast32_t uiB; - bool signA, signB; - - uA.f = a; - uiA = uA.ui; - uB.f = b; - uiB = uB.ui; - if ( isNaNF32UI( uiA ) || isNaNF32UI( uiB ) ) { - if ( - softfloat_isSigNaNF32UI( uiA ) || softfloat_isSigNaNF32UI( uiB ) - ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - } - return false; - } - signA = signF32UI( uiA ); - signB = signF32UI( uiB ); - return - (signA != signB) ? signA || ! (uint32_t) ((uiA | uiB)<<1) - : (uiA == uiB) || (signA ^ (uiA < uiB)); - -} - diff --git a/outside/softfloat-3/source/f32_lt.c b/outside/softfloat-3/source/f32_lt.c deleted file mode 100644 index 22bbafb42..000000000 --- a/outside/softfloat-3/source/f32_lt.c +++ /dev/null @@ -1,66 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -bool f32_lt( float32_t a, float32_t b ) -{ - union ui32_f32 uA; - uint_fast32_t uiA; - union ui32_f32 uB; - uint_fast32_t uiB; - bool signA, signB; - - uA.f = a; - uiA = uA.ui; - uB.f = b; - uiB = uB.ui; - if ( isNaNF32UI( uiA ) || isNaNF32UI( uiB ) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - return false; - } - signA = signF32UI( uiA ); - signB = signF32UI( uiB ); - return - (signA != signB) ? signA && ((uint32_t) ((uiA | uiB)<<1) != 0) - : (uiA != uiB) && (signA ^ (uiA < uiB)); - -} - diff --git a/outside/softfloat-3/source/f32_lt_quiet.c b/outside/softfloat-3/source/f32_lt_quiet.c deleted file mode 100644 index 3fd66429a..000000000 --- a/outside/softfloat-3/source/f32_lt_quiet.c +++ /dev/null @@ -1,71 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -bool f32_lt_quiet( float32_t a, float32_t b ) -{ - union ui32_f32 uA; - uint_fast32_t uiA; - union ui32_f32 uB; - uint_fast32_t uiB; - bool signA, signB; - - uA.f = a; - uiA = uA.ui; - uB.f = b; - uiB = uB.ui; - if ( isNaNF32UI( uiA ) || isNaNF32UI( uiB ) ) { - if ( - softfloat_isSigNaNF32UI( uiA ) || softfloat_isSigNaNF32UI( uiB ) - ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - } - return false; - } - signA = signF32UI( uiA ); - signB = signF32UI( uiB ); - return - (signA != signB) ? signA && ((uint32_t) ((uiA | uiB)<<1) != 0) - : (uiA != uiB) && (signA ^ (uiA < uiB)); - -} - diff --git a/outside/softfloat-3/source/f32_mul.c b/outside/softfloat-3/source/f32_mul.c deleted file mode 100644 index f4db7cd4e..000000000 --- a/outside/softfloat-3/source/f32_mul.c +++ /dev/null @@ -1,137 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -float32_t f32_mul( float32_t a, float32_t b ) -{ - union ui32_f32 uA; - uint_fast32_t uiA; - bool signA; - int_fast16_t expA; - uint_fast32_t sigA; - union ui32_f32 uB; - uint_fast32_t uiB; - bool signB; - int_fast16_t expB; - uint_fast32_t sigB; - bool signZ; - uint_fast32_t magBits; - struct exp16_sig32 normExpSig; - int_fast16_t expZ; - uint_fast32_t sigZ, uiZ; - union ui32_f32 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - signA = signF32UI( uiA ); - expA = expF32UI( uiA ); - sigA = fracF32UI( uiA ); - uB.f = b; - uiB = uB.ui; - signB = signF32UI( uiB ); - expB = expF32UI( uiB ); - sigB = fracF32UI( uiB ); - signZ = signA ^ signB; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( expA == 0xFF ) { - if ( sigA || ((expB == 0xFF) && sigB) ) goto propagateNaN; - magBits = expB | sigB; - goto infArg; - } - if ( expB == 0xFF ) { - if ( sigB ) goto propagateNaN; - magBits = expA | sigA; - goto infArg; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! expA ) { - if ( ! sigA ) goto zero; - normExpSig = softfloat_normSubnormalF32Sig( sigA ); - expA = normExpSig.exp; - sigA = normExpSig.sig; - } - if ( ! expB ) { - if ( ! sigB ) goto zero; - normExpSig = softfloat_normSubnormalF32Sig( sigB ); - expB = normExpSig.exp; - sigB = normExpSig.sig; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expZ = expA + expB - 0x7F; - sigA = (sigA | 0x00800000)<<7; - sigB = (sigB | 0x00800000)<<8; - sigZ = softfloat_shortShiftRightJam64( (uint_fast64_t) sigA * sigB, 32 ); - if ( sigZ < 0x40000000 ) { - --expZ; - sigZ <<= 1; - } - return softfloat_roundPackToF32( signZ, expZ, sigZ ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - propagateNaN: - uiZ = softfloat_propagateNaNF32UI( uiA, uiB ); - goto uiZ; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - infArg: - if ( ! magBits ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - uiZ = defaultNaNF32UI; - } else { - uiZ = packToF32UI( signZ, 0xFF, 0 ); - } - goto uiZ; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - zero: - uiZ = packToF32UI( signZ, 0, 0 ); - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/f32_mulAdd.c b/outside/softfloat-3/source/f32_mulAdd.c deleted file mode 100644 index 15bddc410..000000000 --- a/outside/softfloat-3/source/f32_mulAdd.c +++ /dev/null @@ -1,60 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -float32_t f32_mulAdd( float32_t a, float32_t b, float32_t c ) -{ - union ui32_f32 uA; - uint_fast32_t uiA; - union ui32_f32 uB; - uint_fast32_t uiB; - union ui32_f32 uC; - uint_fast32_t uiC; - - uA.f = a; - uiA = uA.ui; - uB.f = b; - uiB = uB.ui; - uC.f = c; - uiC = uC.ui; - return softfloat_mulAddF32( uiA, uiB, uiC, 0 ); - -} - diff --git a/outside/softfloat-3/source/f32_rem.c b/outside/softfloat-3/source/f32_rem.c deleted file mode 100644 index a450d01ac..000000000 --- a/outside/softfloat-3/source/f32_rem.c +++ /dev/null @@ -1,168 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -float32_t f32_rem( float32_t a, float32_t b ) -{ - union ui32_f32 uA; - uint_fast32_t uiA; - bool signA; - int_fast16_t expA; - uint_fast32_t sigA; - union ui32_f32 uB; - uint_fast32_t uiB; - int_fast16_t expB; - uint_fast32_t sigB; - struct exp16_sig32 normExpSig; - uint32_t rem; - int_fast16_t expDiff; - uint32_t q, recip32, altRem, meanRem; - bool signRem; - uint_fast32_t uiZ; - union ui32_f32 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - signA = signF32UI( uiA ); - expA = expF32UI( uiA ); - sigA = fracF32UI( uiA ); - uB.f = b; - uiB = uB.ui; - expB = expF32UI( uiB ); - sigB = fracF32UI( uiB ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( expA == 0xFF ) { - if ( sigA || ((expB == 0xFF) && sigB) ) goto propagateNaN; - goto invalid; - } - if ( expB == 0xFF ) { - if ( sigB ) goto propagateNaN; - return a; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! expB ) { - if ( ! sigB ) goto invalid; - normExpSig = softfloat_normSubnormalF32Sig( sigB ); - expB = normExpSig.exp; - sigB = normExpSig.sig; - } - if ( ! expA ) { - if ( ! sigA ) return a; - normExpSig = softfloat_normSubnormalF32Sig( sigA ); - expA = normExpSig.exp; - sigA = normExpSig.sig; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - rem = sigA | 0x00800000; - sigB |= 0x00800000; - expDiff = expA - expB; - if ( expDiff < 1 ) { - if ( expDiff < -1 ) return a; - sigB <<= 6; - if ( expDiff ) { - rem <<= 5; - q = 0; - } else { - rem <<= 6; - q = (sigB <= rem); - if ( q ) rem -= sigB; - } - } else { - recip32 = softfloat_approxRecip32_1( sigB<<8 ); - /*-------------------------------------------------------------------- - | Changing the shift of `rem' here requires also changing the initial - | subtraction from `expDiff'. - *--------------------------------------------------------------------*/ - rem <<= 7; - expDiff -= 31; - /*-------------------------------------------------------------------- - | The scale of `sigB' affects how many bits are obtained during each - | cycle of the loop. Currently this is 29 bits per loop iteration, - | which is believed to be the maximum possible. - *--------------------------------------------------------------------*/ - sigB <<= 6; - for (;;) { - q = (rem * (uint_fast64_t) recip32)>>32; - if ( expDiff < 0 ) break; - rem = -(q * (uint32_t) sigB); - expDiff -= 29; - } - /*-------------------------------------------------------------------- - | (`expDiff' cannot be less than -30 here.) - *--------------------------------------------------------------------*/ - q >>= ~expDiff & 31; - rem = (rem<<(expDiff + 30)) - q * (uint32_t) sigB; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - do { - altRem = rem; - ++q; - rem -= sigB; - } while ( ! (rem & 0x80000000) ); - meanRem = rem + altRem; - if ( (meanRem & 0x80000000) || (! meanRem && (q & 1)) ) rem = altRem; - signRem = signA; - if ( 0x80000000 <= rem ) { - signRem = ! signRem; - rem = -rem; - } - return softfloat_normRoundPackToF32( signRem, expB, rem ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - propagateNaN: - uiZ = softfloat_propagateNaNF32UI( uiA, uiB ); - goto uiZ; - invalid: - softfloat_raiseFlags( softfloat_flag_invalid ); - uiZ = defaultNaNF32UI; - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/f32_roundToInt.c b/outside/softfloat-3/source/f32_roundToInt.c deleted file mode 100644 index 6fcc16110..000000000 --- a/outside/softfloat-3/source/f32_roundToInt.c +++ /dev/null @@ -1,112 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -float32_t f32_roundToInt( float32_t a, uint_fast8_t roundingMode, bool exact ) -{ - union ui32_f32 uA; - uint_fast32_t uiA; - int_fast16_t exp; - uint_fast32_t uiZ, lastBitMask, roundBitsMask; - union ui32_f32 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - exp = expF32UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp <= 0x7E ) { - if ( ! (uint32_t) (uiA<<1) ) return a; - if ( exact ) softfloat_exceptionFlags |= softfloat_flag_inexact; - uiZ = uiA & packToF32UI( 1, 0, 0 ); - switch ( roundingMode ) { - case softfloat_round_near_even: - if ( ! fracF32UI( uiA ) ) break; - case softfloat_round_near_maxMag: - if ( exp == 0x7E ) uiZ |= packToF32UI( 0, 0x7F, 0 ); - break; - case softfloat_round_min: - if ( uiZ ) uiZ = packToF32UI( 1, 0x7F, 0 ); - break; - case softfloat_round_max: - if ( ! uiZ ) uiZ = packToF32UI( 0, 0x7F, 0 ); - break; - } - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( 0x96 <= exp ) { - if ( (exp == 0xFF) && fracF32UI( uiA ) ) { - uiZ = softfloat_propagateNaNF32UI( uiA, 0 ); - goto uiZ; - } - return a; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiZ = uiA; - lastBitMask = (uint_fast32_t) 1<<(0x96 - exp); - roundBitsMask = lastBitMask - 1; - if ( roundingMode == softfloat_round_near_maxMag ) { - uiZ += lastBitMask>>1; - } else if ( roundingMode == softfloat_round_near_even ) { - uiZ += lastBitMask>>1; - if ( ! (uiZ & roundBitsMask) ) uiZ &= ~lastBitMask; - } else if ( - roundingMode - == (signF32UI( uiZ ) ? softfloat_round_min : softfloat_round_max) - ) { - uiZ += roundBitsMask; - } - uiZ &= ~roundBitsMask; - if ( exact && (uiZ != uiA) ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; - } - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/f32_sqrt.c b/outside/softfloat-3/source/f32_sqrt.c deleted file mode 100644 index c492734f1..000000000 --- a/outside/softfloat-3/source/f32_sqrt.c +++ /dev/null @@ -1,121 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -float32_t f32_sqrt( float32_t a ) -{ - union ui32_f32 uA; - uint_fast32_t uiA; - bool signA; - int_fast16_t expA; - uint_fast32_t sigA, uiZ; - struct exp16_sig32 normExpSig; - int_fast16_t expZ; - uint_fast32_t sigZ, shiftedSigZ; - uint32_t negRem; - union ui32_f32 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - signA = signF32UI( uiA ); - expA = expF32UI( uiA ); - sigA = fracF32UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( expA == 0xFF ) { - if ( sigA ) { - uiZ = softfloat_propagateNaNF32UI( uiA, 0 ); - goto uiZ; - } - if ( ! signA ) return a; - goto invalid; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( signA ) { - if ( ! (expA | sigA) ) return a; - goto invalid; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! expA ) { - if ( ! sigA ) return a; - normExpSig = softfloat_normSubnormalF32Sig( sigA ); - expA = normExpSig.exp; - sigA = normExpSig.sig; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expZ = ((expA - 0x7F)>>1) + 0x7E; - expA &= 1; - sigA = (sigA | 0x00800000)<<8; - sigZ = - ((uint_fast64_t) sigA * softfloat_approxRecipSqrt32_1( expA, sigA )) - >>32; - if ( expA ) sigZ >>= 1; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sigZ += 2; - if ( (sigZ & 0x3F) < 2 ) { - shiftedSigZ = sigZ>>2; - negRem = shiftedSigZ * shiftedSigZ; - sigZ &= ~3; - if ( negRem & 0x80000000 ) { - sigZ |= 1; - } else { - if ( negRem ) --sigZ; - } - } - return softfloat_roundPackToF32( 0, expZ, sigZ ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - invalid: - softfloat_raiseFlags( softfloat_flag_invalid ); - uiZ = defaultNaNF32UI; - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/f32_sub.c b/outside/softfloat-3/source/f32_sub.c deleted file mode 100644 index f05ce57be..000000000 --- a/outside/softfloat-3/source/f32_sub.c +++ /dev/null @@ -1,70 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -float32_t f32_sub( float32_t a, float32_t b ) -{ - union ui32_f32 uA; - uint_fast32_t uiA; - union ui32_f32 uB; - uint_fast32_t uiB; -#if ! defined INLINE_LEVEL || (INLINE_LEVEL < 1) - float32_t (*magsFuncPtr)( uint_fast32_t, uint_fast32_t ); -#endif - - uA.f = a; - uiA = uA.ui; - uB.f = b; - uiB = uB.ui; -#if defined INLINE_LEVEL && (1 <= INLINE_LEVEL) - if ( signF32UI( uiA ^ uiB ) ) { - return softfloat_addMagsF32( uiA, uiB ); - } else { - return softfloat_subMagsF32( uiA, uiB ); - } -#else - magsFuncPtr = - signF32UI( uiA ^ uiB ) ? softfloat_addMagsF32 : softfloat_subMagsF32; - return (*magsFuncPtr)( uiA, uiB ); -#endif - -} - diff --git a/outside/softfloat-3/source/f32_to_extF80.c b/outside/softfloat-3/source/f32_to_extF80.c deleted file mode 100644 index 65da302d5..000000000 --- a/outside/softfloat-3/source/f32_to_extF80.c +++ /dev/null @@ -1,101 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -extFloat80_t f32_to_extF80( float32_t a ) -{ - union ui32_f32 uA; - uint_fast32_t uiA; - bool sign; - int_fast16_t exp; - uint_fast32_t frac; - struct commonNaN commonNaN; - struct uint128 uiZ; - uint_fast16_t uiZ64; - uint_fast64_t uiZ0; - struct exp16_sig32 normExpSig; - union { struct extFloat80M s; extFloat80_t f; } uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - sign = signF32UI( uiA ); - exp = expF32UI( uiA ); - frac = fracF32UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp == 0xFF ) { - if ( frac ) { - softfloat_f32UIToCommonNaN( uiA, &commonNaN ); - uiZ = softfloat_commonNaNToExtF80UI( &commonNaN ); - uiZ64 = uiZ.v64; - uiZ0 = uiZ.v0; - } else { - uiZ64 = packToExtF80UI64( sign, 0x7FFF ); - uiZ0 = UINT64_C( 0x8000000000000000 ); - } - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! exp ) { - if ( ! frac ) { - uiZ64 = packToExtF80UI64( sign, 0 ); - uiZ0 = 0; - goto uiZ; - } - normExpSig = softfloat_normSubnormalF32Sig( frac ); - exp = normExpSig.exp; - frac = normExpSig.sig; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiZ64 = packToExtF80UI64( sign, exp + 0x3F80 ); - uiZ0 = (uint_fast64_t) (frac | 0x00800000)<<40; - uiZ: - uZ.s.signExp = uiZ64; - uZ.s.signif = uiZ0; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/f32_to_extF80M.c b/outside/softfloat-3/source/f32_to_extF80M.c deleted file mode 100644 index a16f9f5f2..000000000 --- a/outside/softfloat-3/source/f32_to_extF80M.c +++ /dev/null @@ -1,111 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -void f32_to_extF80M( float32_t a, extFloat80_t *zPtr ) -{ - - *zPtr = f32_to_extF80( a ); - -} - -#else - -void f32_to_extF80M( float32_t a, extFloat80_t *zPtr ) -{ - struct extFloat80M *zSPtr; - union ui32_f32 uA; - uint32_t uiA; - bool sign; - int_fast16_t exp; - uint32_t frac; - struct commonNaN commonNaN; - uint_fast16_t uiZ64; - uint32_t uiZ32; - struct exp16_sig32 normExpSig; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - zSPtr = (struct extFloat80M *) zPtr; - uA.f = a; - uiA = uA.ui; - sign = signF32UI( uiA ); - exp = expF32UI( uiA ); - frac = fracF32UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp == 0xFF ) { - if ( frac ) { - softfloat_f32UIToCommonNaN( uiA, &commonNaN ); - softfloat_commonNaNToExtF80M( &commonNaN, zSPtr ); - return; - } - uiZ64 = packToExtF80UI64( sign, 0x7FFF ); - uiZ32 = 0x80000000; - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! exp ) { - if ( ! frac ) { - uiZ64 = packToExtF80UI64( sign, 0 ); - uiZ32 = 0; - goto uiZ; - } - normExpSig = softfloat_normSubnormalF32Sig( frac ); - exp = normExpSig.exp; - frac = normExpSig.sig; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiZ64 = packToExtF80UI64( sign, exp + 0x3F80 ); - uiZ32 = 0x80000000 | (uint32_t) frac<<8; - uiZ: - zSPtr->signExp = uiZ64; - zSPtr->signif = (uint64_t) uiZ32<<32; - -} - -#endif - diff --git a/outside/softfloat-3/source/f32_to_f128.c b/outside/softfloat-3/source/f32_to_f128.c deleted file mode 100644 index b3487607e..000000000 --- a/outside/softfloat-3/source/f32_to_f128.c +++ /dev/null @@ -1,96 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -float128_t f32_to_f128( float32_t a ) -{ - union ui32_f32 uA; - uint_fast32_t uiA; - bool sign; - int_fast16_t exp; - uint_fast32_t frac; - struct commonNaN commonNaN; - struct uint128 uiZ; - struct exp16_sig32 normExpSig; - union ui128_f128 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - sign = signF32UI( uiA ); - exp = expF32UI( uiA ); - frac = fracF32UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp == 0xFF ) { - if ( frac ) { - softfloat_f32UIToCommonNaN( uiA, &commonNaN ); - uiZ = softfloat_commonNaNToF128UI( &commonNaN ); - } else { - uiZ.v64 = packToF128UI64( sign, 0x7FFF, 0 ); - uiZ.v0 = 0; - } - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! exp ) { - if ( ! frac ) { - uiZ.v64 = packToF128UI64( sign, 0, 0 ); - uiZ.v0 = 0; - goto uiZ; - } - normExpSig = softfloat_normSubnormalF32Sig( frac ); - exp = normExpSig.exp - 1; - frac = normExpSig.sig; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiZ.v64 = packToF128UI64( sign, exp + 0x3F80, (uint_fast64_t) frac<<25 ); - uiZ.v0 = 0; - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/f32_to_f128M.c b/outside/softfloat-3/source/f32_to_f128M.c deleted file mode 100644 index 892680dd0..000000000 --- a/outside/softfloat-3/source/f32_to_f128M.c +++ /dev/null @@ -1,115 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -void f32_to_f128M( float32_t a, float128_t *zPtr ) -{ - - *zPtr = f32_to_f128( a ); - -} - -#else - -void f32_to_f128M( float32_t a, float128_t *zPtr ) -{ - uint32_t *zWPtr; - union ui32_f32 uA; - uint32_t uiA; - bool sign; - int_fast16_t exp; - uint32_t frac, uiZ64; - struct commonNaN commonNaN; - uint32_t uiZ96; - struct exp16_sig32 normExpSig; - uint64_t frac64; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - zWPtr = (uint32_t *) zPtr; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - sign = signF32UI( uiA ); - exp = expF32UI( uiA ); - frac = fracF32UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiZ64 = 0; - if ( exp == 0xFF ) { - if ( frac ) { - softfloat_f32UIToCommonNaN( uiA, &commonNaN ); - softfloat_commonNaNToF128M( &commonNaN, zWPtr ); - return; - } - uiZ96 = packToF128UI96( sign, 0x7FFF, 0 ); - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! exp ) { - if ( ! frac ) { - uiZ96 = packToF128UI96( sign, 0, 0 ); - goto uiZ; - } - normExpSig = softfloat_normSubnormalF32Sig( frac ); - exp = normExpSig.exp - 1; - frac = normExpSig.sig; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - frac64 = (uint64_t) frac<<25; - uiZ96 = packToF128UI96( sign, exp + 0x3F80, frac64>>32 ); - uiZ64 = frac64; - uiZ: - zWPtr[indexWord( 4, 3 )] = uiZ96; - zWPtr[indexWord( 4, 2 )] = uiZ64; - zWPtr[indexWord( 4, 1 )] = 0; - zWPtr[indexWord( 4, 0 )] = 0; - -} - -#endif - diff --git a/outside/softfloat-3/source/f32_to_f16.c b/outside/softfloat-3/source/f32_to_f16.c deleted file mode 100644 index db1fff8dd..000000000 --- a/outside/softfloat-3/source/f32_to_f16.c +++ /dev/null @@ -1,88 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -float16_t f32_to_f16( float32_t a ) -{ - union ui32_f32 uA; - uint_fast32_t uiA; - bool sign; - int_fast16_t exp; - uint_fast32_t frac; - struct commonNaN commonNaN; - uint_fast16_t uiZ, frac16; - union ui16_f16 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - sign = signF32UI( uiA ); - exp = expF32UI( uiA ); - frac = fracF32UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp == 0xFF ) { - if ( frac ) { - softfloat_f32UIToCommonNaN( uiA, &commonNaN ); - uiZ = softfloat_commonNaNToF16UI( &commonNaN ); - } else { - uiZ = packToF16UI( sign, 0x1F, 0 ); - } - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - frac16 = frac>>9 | ((frac & 0x1FF) != 0); - if ( ! (exp | frac16) ) { - uiZ = packToF16UI( sign, 0, 0 ); - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - return softfloat_roundPackToF16( sign, exp - 0x71, frac16 | 0x4000 ); - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/f32_to_f64.c b/outside/softfloat-3/source/f32_to_f64.c deleted file mode 100644 index df61d0715..000000000 --- a/outside/softfloat-3/source/f32_to_f64.c +++ /dev/null @@ -1,93 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -float64_t f32_to_f64( float32_t a ) -{ - union ui32_f32 uA; - uint_fast32_t uiA; - bool sign; - int_fast16_t exp; - uint_fast32_t frac; - struct commonNaN commonNaN; - uint_fast64_t uiZ; - struct exp16_sig32 normExpSig; - union ui64_f64 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - sign = signF32UI( uiA ); - exp = expF32UI( uiA ); - frac = fracF32UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp == 0xFF ) { - if ( frac ) { - softfloat_f32UIToCommonNaN( uiA, &commonNaN ); - uiZ = softfloat_commonNaNToF64UI( &commonNaN ); - } else { - uiZ = packToF64UI( sign, 0x7FF, 0 ); - } - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! exp ) { - if ( ! frac ) { - uiZ = packToF64UI( sign, 0, 0 ); - goto uiZ; - } - normExpSig = softfloat_normSubnormalF32Sig( frac ); - exp = normExpSig.exp - 1; - frac = normExpSig.sig; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiZ = packToF64UI( sign, exp + 0x380, (uint_fast64_t) frac<<29 ); - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/f32_to_i32.c b/outside/softfloat-3/source/f32_to_i32.c deleted file mode 100644 index e44c71258..000000000 --- a/outside/softfloat-3/source/f32_to_i32.c +++ /dev/null @@ -1,84 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the -University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -int_fast32_t f32_to_i32( float32_t a, uint_fast8_t roundingMode, bool exact ) -{ - union ui32_f32 uA; - uint_fast32_t uiA; - bool sign; - int_fast16_t exp; - uint_fast32_t sig; - uint_fast64_t sig64; - int_fast16_t shiftDist; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - sign = signF32UI( uiA ); - exp = expF32UI( uiA ); - sig = fracF32UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ -#if (i32_fromNaN != i32_fromPosOverflow) || (i32_fromNaN != i32_fromNegOverflow) - if ( (exp == 0xFF) && sig ) { -#if (i32_fromNaN == i32_fromPosOverflow) - sign = 0; -#elif (i32_fromNaN == i32_fromNegOverflow) - sign = 1; -#else - softfloat_raiseFlags( softfloat_flag_invalid ); - return i32_fromNaN; -#endif - } -#endif - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp ) sig |= 0x00800000; - sig64 = (uint_fast64_t) sig<<32; - shiftDist = 0xAA - exp; - if ( 0 < shiftDist ) sig64 = softfloat_shiftRightJam64( sig64, shiftDist ); - return softfloat_roundToI32( sign, sig64, roundingMode, exact ); - -} - diff --git a/outside/softfloat-3/source/f32_to_i32_r_minMag.c b/outside/softfloat-3/source/f32_to_i32_r_minMag.c deleted file mode 100644 index 6ab30d503..000000000 --- a/outside/softfloat-3/source/f32_to_i32_r_minMag.c +++ /dev/null @@ -1,89 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -int_fast32_t f32_to_i32_r_minMag( float32_t a, bool exact ) -{ - union ui32_f32 uA; - uint_fast32_t uiA; - int_fast16_t exp; - uint_fast32_t sig; - int_fast16_t shiftDist; - bool sign; - int_fast32_t absZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - exp = expF32UI( uiA ); - sig = fracF32UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - shiftDist = 0x9E - exp; - if ( 32 <= shiftDist ) { - if ( exact && (exp | sig) ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; - } - return 0; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sign = signF32UI( uiA ); - if ( shiftDist <= 0 ) { - if ( uiA == packToF32UI( 1, 0x9E, 0 ) ) return -0x7FFFFFFF - 1; - softfloat_raiseFlags( softfloat_flag_invalid ); - return - (exp == 0xFF) && sig ? i32_fromNaN - : sign ? i32_fromNegOverflow : i32_fromPosOverflow; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sig = (sig | 0x00800000)<<8; - absZ = sig>>shiftDist; - if ( exact && ((uint_fast32_t) absZ< -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -int_fast64_t f32_to_i64( float32_t a, uint_fast8_t roundingMode, bool exact ) -{ - union ui32_f32 uA; - uint_fast32_t uiA; - bool sign; - int_fast16_t exp; - uint_fast32_t sig; - int_fast16_t shiftDist; -#ifdef SOFTFLOAT_FAST_INT64 - uint_fast64_t sig64, extra; - struct uint64_extra sig64Extra; -#else - uint32_t extSig[3]; -#endif - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - sign = signF32UI( uiA ); - exp = expF32UI( uiA ); - sig = fracF32UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - shiftDist = 0xBE - exp; - if ( shiftDist < 0 ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - return - (exp == 0xFF) && sig ? i64_fromNaN - : sign ? i64_fromNegOverflow : i64_fromPosOverflow; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp ) sig |= 0x00800000; -#ifdef SOFTFLOAT_FAST_INT64 - sig64 = (uint_fast64_t) sig<<40; - extra = 0; - if ( shiftDist ) { - sig64Extra = softfloat_shiftRightJam64Extra( sig64, 0, shiftDist ); - sig64 = sig64Extra.v; - extra = sig64Extra.extra; - } - return softfloat_roundToI64( sign, sig64, extra, roundingMode, exact ); -#else - extSig[indexWord( 3, 2 )] = sig<<8; - extSig[indexWord( 3, 1 )] = 0; - extSig[indexWord( 3, 0 )] = 0; - if ( shiftDist ) softfloat_shiftRightJam96M( extSig, shiftDist, extSig ); - return softfloat_roundMToI64( sign, extSig, roundingMode, exact ); -#endif - -} - diff --git a/outside/softfloat-3/source/f32_to_i64_r_minMag.c b/outside/softfloat-3/source/f32_to_i64_r_minMag.c deleted file mode 100644 index b3079f175..000000000 --- a/outside/softfloat-3/source/f32_to_i64_r_minMag.c +++ /dev/null @@ -1,94 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -int_fast64_t f32_to_i64_r_minMag( float32_t a, bool exact ) -{ - union ui32_f32 uA; - uint_fast32_t uiA; - int_fast16_t exp; - uint_fast32_t sig; - int_fast16_t shiftDist; - bool sign; - uint_fast64_t sig64; - int_fast64_t absZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - exp = expF32UI( uiA ); - sig = fracF32UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - shiftDist = 0xBE - exp; - if ( 64 <= shiftDist ) { - if ( exact && (exp | sig) ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; - } - return 0; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sign = signF32UI( uiA ); - if ( shiftDist <= 0 ) { - if ( uiA == packToF32UI( 1, 0xBE, 0 ) ) { - return -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1; - } - softfloat_raiseFlags( softfloat_flag_invalid ); - return - (exp == 0xFF) && sig ? i64_fromNaN - : sign ? i64_fromNegOverflow : i64_fromPosOverflow; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sig |= 0x00800000; - sig64 = (uint_fast64_t) sig<<40; - absZ = sig64>>shiftDist; - shiftDist = 40 - shiftDist; - if ( exact && (shiftDist < 0) && (uint32_t) (sig<<(shiftDist & 31)) ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; - } - return sign ? -absZ : absZ; - -} - diff --git a/outside/softfloat-3/source/f32_to_ui32.c b/outside/softfloat-3/source/f32_to_ui32.c deleted file mode 100644 index 5d2c5b1fc..000000000 --- a/outside/softfloat-3/source/f32_to_ui32.c +++ /dev/null @@ -1,84 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the -University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -uint_fast32_t f32_to_ui32( float32_t a, uint_fast8_t roundingMode, bool exact ) -{ - union ui32_f32 uA; - uint_fast32_t uiA; - bool sign; - int_fast16_t exp; - uint_fast32_t sig; - uint_fast64_t sig64; - int_fast16_t shiftDist; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - sign = signF32UI( uiA ); - exp = expF32UI( uiA ); - sig = fracF32UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ -#if (ui32_fromNaN != ui32_fromPosOverflow) || (ui32_fromNaN != ui32_fromNegOverflow) - if ( (exp == 0xFF) && sig ) { -#if (ui32_fromNaN == ui32_fromPosOverflow) - sign = 0; -#elif (ui32_fromNaN == ui32_fromNegOverflow) - sign = 1; -#else - softfloat_raiseFlags( softfloat_flag_invalid ); - return ui32_fromNaN; -#endif - } -#endif - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp ) sig |= 0x00800000; - sig64 = (uint_fast64_t) sig<<32; - shiftDist = 0xAA - exp; - if ( 0 < shiftDist ) sig64 = softfloat_shiftRightJam64( sig64, shiftDist ); - return softfloat_roundToUI32( sign, sig64, roundingMode, exact ); - -} - diff --git a/outside/softfloat-3/source/f32_to_ui32_r_minMag.c b/outside/softfloat-3/source/f32_to_ui32_r_minMag.c deleted file mode 100644 index d465cf8bc..000000000 --- a/outside/softfloat-3/source/f32_to_ui32_r_minMag.c +++ /dev/null @@ -1,88 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -uint_fast32_t f32_to_ui32_r_minMag( float32_t a, bool exact ) -{ - union ui32_f32 uA; - uint_fast32_t uiA; - int_fast16_t exp; - uint_fast32_t sig; - int_fast16_t shiftDist; - bool sign; - uint_fast32_t z; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - exp = expF32UI( uiA ); - sig = fracF32UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - shiftDist = 0x9E - exp; - if ( 32 <= shiftDist ) { - if ( exact && (exp | sig) ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; - } - return 0; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sign = signF32UI( uiA ); - if ( sign || (shiftDist < 0) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - return - (exp == 0xFF) && sig ? ui32_fromNaN - : sign ? ui32_fromNegOverflow : ui32_fromPosOverflow; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sig = (sig | 0x00800000)<<8; - z = sig>>shiftDist; - if ( exact && (z< -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -uint_fast64_t f32_to_ui64( float32_t a, uint_fast8_t roundingMode, bool exact ) -{ - union ui32_f32 uA; - uint_fast32_t uiA; - bool sign; - int_fast16_t exp; - uint_fast32_t sig; - int_fast16_t shiftDist; -#ifdef SOFTFLOAT_FAST_INT64 - uint_fast64_t sig64, extra; - struct uint64_extra sig64Extra; -#else - uint32_t extSig[3]; -#endif - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - sign = signF32UI( uiA ); - exp = expF32UI( uiA ); - sig = fracF32UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - shiftDist = 0xBE - exp; - if ( shiftDist < 0 ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - return - (exp == 0xFF) && sig ? ui64_fromNaN - : sign ? ui64_fromNegOverflow : ui64_fromPosOverflow; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp ) sig |= 0x00800000; -#ifdef SOFTFLOAT_FAST_INT64 - sig64 = (uint_fast64_t) sig<<40; - extra = 0; - if ( shiftDist ) { - sig64Extra = softfloat_shiftRightJam64Extra( sig64, 0, shiftDist ); - sig64 = sig64Extra.v; - extra = sig64Extra.extra; - } - return softfloat_roundToUI64( sign, sig64, extra, roundingMode, exact ); -#else - extSig[indexWord( 3, 2 )] = sig<<8; - extSig[indexWord( 3, 1 )] = 0; - extSig[indexWord( 3, 0 )] = 0; - if ( shiftDist ) softfloat_shiftRightJam96M( extSig, shiftDist, extSig ); - return softfloat_roundMToUI64( sign, extSig, roundingMode, exact ); -#endif - -} - diff --git a/outside/softfloat-3/source/f32_to_ui64_r_minMag.c b/outside/softfloat-3/source/f32_to_ui64_r_minMag.c deleted file mode 100644 index 95fae6910..000000000 --- a/outside/softfloat-3/source/f32_to_ui64_r_minMag.c +++ /dev/null @@ -1,90 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -uint_fast64_t f32_to_ui64_r_minMag( float32_t a, bool exact ) -{ - union ui32_f32 uA; - uint_fast32_t uiA; - int_fast16_t exp; - uint_fast32_t sig; - int_fast16_t shiftDist; - bool sign; - uint_fast64_t sig64, z; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - exp = expF32UI( uiA ); - sig = fracF32UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - shiftDist = 0xBE - exp; - if ( 64 <= shiftDist ) { - if ( exact && (exp | sig) ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; - } - return 0; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sign = signF32UI( uiA ); - if ( sign || (shiftDist < 0) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - return - (exp == 0xFF) && sig ? ui64_fromNaN - : sign ? ui64_fromNegOverflow : ui64_fromPosOverflow; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sig |= 0x00800000; - sig64 = (uint_fast64_t) sig<<40; - z = sig64>>shiftDist; - shiftDist = 40 - shiftDist; - if ( exact && (shiftDist < 0) && (uint32_t) (sig<<(shiftDist & 31)) ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; - } - return z; - -} - diff --git a/outside/softfloat-3/source/f64_add.c b/outside/softfloat-3/source/f64_add.c deleted file mode 100644 index f14c13c5e..000000000 --- a/outside/softfloat-3/source/f64_add.c +++ /dev/null @@ -1,74 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -float64_t f64_add( float64_t a, float64_t b ) -{ - union ui64_f64 uA; - uint_fast64_t uiA; - bool signA; - union ui64_f64 uB; - uint_fast64_t uiB; - bool signB; -#if ! defined INLINE_LEVEL || (INLINE_LEVEL < 2) - float64_t (*magsFuncPtr)( uint_fast64_t, uint_fast64_t, bool ); -#endif - - uA.f = a; - uiA = uA.ui; - signA = signF64UI( uiA ); - uB.f = b; - uiB = uB.ui; - signB = signF64UI( uiB ); -#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL) - if ( signA == signB ) { - return softfloat_addMagsF64( uiA, uiB, signA ); - } else { - return softfloat_subMagsF64( uiA, uiB, signA ); - } -#else - magsFuncPtr = - (signA == signB) ? softfloat_addMagsF64 : softfloat_subMagsF64; - return (*magsFuncPtr)( uiA, uiB, signA ); -#endif - -} - diff --git a/outside/softfloat-3/source/f64_div.c b/outside/softfloat-3/source/f64_div.c deleted file mode 100644 index 294317a9d..000000000 --- a/outside/softfloat-3/source/f64_div.c +++ /dev/null @@ -1,172 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -float64_t f64_div( float64_t a, float64_t b ) -{ - union ui64_f64 uA; - uint_fast64_t uiA; - bool signA; - int_fast16_t expA; - uint_fast64_t sigA; - union ui64_f64 uB; - uint_fast64_t uiB; - bool signB; - int_fast16_t expB; - uint_fast64_t sigB; - bool signZ; - struct exp16_sig64 normExpSig; - int_fast16_t expZ; - uint32_t recip32, sig32Z, doubleTerm; - uint_fast64_t rem; - uint32_t q; - uint_fast64_t sigZ; - uint_fast64_t uiZ; - union ui64_f64 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - signA = signF64UI( uiA ); - expA = expF64UI( uiA ); - sigA = fracF64UI( uiA ); - uB.f = b; - uiB = uB.ui; - signB = signF64UI( uiB ); - expB = expF64UI( uiB ); - sigB = fracF64UI( uiB ); - signZ = signA ^ signB; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( expA == 0x7FF ) { - if ( sigA ) goto propagateNaN; - if ( expB == 0x7FF ) { - if ( sigB ) goto propagateNaN; - goto invalid; - } - goto infinity; - } - if ( expB == 0x7FF ) { - if ( sigB ) goto propagateNaN; - goto zero; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! expB ) { - if ( ! sigB ) { - if ( ! (expA | sigA) ) goto invalid; - softfloat_raiseFlags( softfloat_flag_infinite ); - goto infinity; - } - normExpSig = softfloat_normSubnormalF64Sig( sigB ); - expB = normExpSig.exp; - sigB = normExpSig.sig; - } - if ( ! expA ) { - if ( ! sigA ) goto zero; - normExpSig = softfloat_normSubnormalF64Sig( sigA ); - expA = normExpSig.exp; - sigA = normExpSig.sig; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expZ = expA - expB + 0x3FE; - sigA |= UINT64_C( 0x0010000000000000 ); - sigB |= UINT64_C( 0x0010000000000000 ); - if ( sigA < sigB ) { - --expZ; - sigA <<= 11; - } else { - sigA <<= 10; - } - sigB <<= 11; - recip32 = softfloat_approxRecip32_1( sigB>>32 ) - 2; - sig32Z = ((uint32_t) (sigA>>32) * (uint_fast64_t) recip32)>>32; - doubleTerm = sig32Z<<1; - rem = - ((sigA - (uint_fast64_t) doubleTerm * (uint32_t) (sigB>>32))<<28) - - (uint_fast64_t) doubleTerm * ((uint32_t) sigB>>4); - q = (((uint32_t) (rem>>32) * (uint_fast64_t) recip32)>>32) + 4; - sigZ = ((uint_fast64_t) sig32Z<<32) + ((uint_fast64_t) q<<4); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( (sigZ & 0x1FF) < 4<<4 ) { - q &= ~7; - sigZ &= ~(uint_fast64_t) 0x7F; - doubleTerm = q<<1; - rem = - ((rem - (uint_fast64_t) doubleTerm * (uint32_t) (sigB>>32))<<28) - - (uint_fast64_t) doubleTerm * ((uint32_t) sigB>>4); - if ( rem & UINT64_C( 0x8000000000000000 ) ) { - sigZ -= 1<<7; - } else { - if ( rem ) sigZ |= 1; - } - } - return softfloat_roundPackToF64( signZ, expZ, sigZ ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - propagateNaN: - uiZ = softfloat_propagateNaNF64UI( uiA, uiB ); - goto uiZ; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - invalid: - softfloat_raiseFlags( softfloat_flag_invalid ); - uiZ = defaultNaNF64UI; - goto uiZ; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - infinity: - uiZ = packToF64UI( signZ, 0x7FF, 0 ); - goto uiZ; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - zero: - uiZ = packToF64UI( signZ, 0, 0 ); - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/f64_eq.c b/outside/softfloat-3/source/f64_eq.c deleted file mode 100644 index 40782f63b..000000000 --- a/outside/softfloat-3/source/f64_eq.c +++ /dev/null @@ -1,66 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -bool f64_eq( float64_t a, float64_t b ) -{ - union ui64_f64 uA; - uint_fast64_t uiA; - union ui64_f64 uB; - uint_fast64_t uiB; - - uA.f = a; - uiA = uA.ui; - uB.f = b; - uiB = uB.ui; - if ( isNaNF64UI( uiA ) || isNaNF64UI( uiB ) ) { - if ( - softfloat_isSigNaNF64UI( uiA ) || softfloat_isSigNaNF64UI( uiB ) - ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - } - return false; - } - return (uiA == uiB) || ! ((uiA | uiB) & UINT64_C( 0x7FFFFFFFFFFFFFFF )); - -} - diff --git a/outside/softfloat-3/source/f64_eq_signaling.c b/outside/softfloat-3/source/f64_eq_signaling.c deleted file mode 100644 index c8cb483b7..000000000 --- a/outside/softfloat-3/source/f64_eq_signaling.c +++ /dev/null @@ -1,61 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -bool f64_eq_signaling( float64_t a, float64_t b ) -{ - union ui64_f64 uA; - uint_fast64_t uiA; - union ui64_f64 uB; - uint_fast64_t uiB; - - uA.f = a; - uiA = uA.ui; - uB.f = b; - uiB = uB.ui; - if ( isNaNF64UI( uiA ) || isNaNF64UI( uiB ) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - return false; - } - return (uiA == uiB) || ! ((uiA | uiB) & UINT64_C( 0x7FFFFFFFFFFFFFFF )); - -} - diff --git a/outside/softfloat-3/source/f64_isSignalingNaN.c b/outside/softfloat-3/source/f64_isSignalingNaN.c deleted file mode 100644 index 858f8505e..000000000 --- a/outside/softfloat-3/source/f64_isSignalingNaN.c +++ /dev/null @@ -1,51 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -bool f64_isSignalingNaN( float64_t a ) -{ - union ui64_f64 uA; - - uA.f = a; - return softfloat_isSigNaNF64UI( uA.ui ); - -} - diff --git a/outside/softfloat-3/source/f64_le.c b/outside/softfloat-3/source/f64_le.c deleted file mode 100644 index c56ef74d1..000000000 --- a/outside/softfloat-3/source/f64_le.c +++ /dev/null @@ -1,67 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -bool f64_le( float64_t a, float64_t b ) -{ - union ui64_f64 uA; - uint_fast64_t uiA; - union ui64_f64 uB; - uint_fast64_t uiB; - bool signA, signB; - - uA.f = a; - uiA = uA.ui; - uB.f = b; - uiB = uB.ui; - if ( isNaNF64UI( uiA ) || isNaNF64UI( uiB ) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - return false; - } - signA = signF64UI( uiA ); - signB = signF64UI( uiB ); - return - (signA != signB) - ? signA || ! ((uiA | uiB) & UINT64_C( 0x7FFFFFFFFFFFFFFF )) - : (uiA == uiB) || (signA ^ (uiA < uiB)); - -} - diff --git a/outside/softfloat-3/source/f64_le_quiet.c b/outside/softfloat-3/source/f64_le_quiet.c deleted file mode 100644 index 8440622c4..000000000 --- a/outside/softfloat-3/source/f64_le_quiet.c +++ /dev/null @@ -1,72 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -bool f64_le_quiet( float64_t a, float64_t b ) -{ - union ui64_f64 uA; - uint_fast64_t uiA; - union ui64_f64 uB; - uint_fast64_t uiB; - bool signA, signB; - - uA.f = a; - uiA = uA.ui; - uB.f = b; - uiB = uB.ui; - if ( isNaNF64UI( uiA ) || isNaNF64UI( uiB ) ) { - if ( - softfloat_isSigNaNF64UI( uiA ) || softfloat_isSigNaNF64UI( uiB ) - ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - } - return false; - } - signA = signF64UI( uiA ); - signB = signF64UI( uiB ); - return - (signA != signB) - ? signA || ! ((uiA | uiB) & UINT64_C( 0x7FFFFFFFFFFFFFFF )) - : (uiA == uiB) || (signA ^ (uiA < uiB)); - -} - diff --git a/outside/softfloat-3/source/f64_lt.c b/outside/softfloat-3/source/f64_lt.c deleted file mode 100644 index f3452a11e..000000000 --- a/outside/softfloat-3/source/f64_lt.c +++ /dev/null @@ -1,67 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -bool f64_lt( float64_t a, float64_t b ) -{ - union ui64_f64 uA; - uint_fast64_t uiA; - union ui64_f64 uB; - uint_fast64_t uiB; - bool signA, signB; - - uA.f = a; - uiA = uA.ui; - uB.f = b; - uiB = uB.ui; - if ( isNaNF64UI( uiA ) || isNaNF64UI( uiB ) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - return false; - } - signA = signF64UI( uiA ); - signB = signF64UI( uiB ); - return - (signA != signB) - ? signA && ((uiA | uiB) & UINT64_C( 0x7FFFFFFFFFFFFFFF )) - : (uiA != uiB) && (signA ^ (uiA < uiB)); - -} - diff --git a/outside/softfloat-3/source/f64_lt_quiet.c b/outside/softfloat-3/source/f64_lt_quiet.c deleted file mode 100644 index fe03f55d3..000000000 --- a/outside/softfloat-3/source/f64_lt_quiet.c +++ /dev/null @@ -1,72 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -bool f64_lt_quiet( float64_t a, float64_t b ) -{ - union ui64_f64 uA; - uint_fast64_t uiA; - union ui64_f64 uB; - uint_fast64_t uiB; - bool signA, signB; - - uA.f = a; - uiA = uA.ui; - uB.f = b; - uiB = uB.ui; - if ( isNaNF64UI( uiA ) || isNaNF64UI( uiB ) ) { - if ( - softfloat_isSigNaNF64UI( uiA ) || softfloat_isSigNaNF64UI( uiB ) - ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - } - return false; - } - signA = signF64UI( uiA ); - signB = signF64UI( uiB ); - return - (signA != signB) - ? signA && ((uiA | uiB) & UINT64_C( 0x7FFFFFFFFFFFFFFF )) - : (uiA != uiB) && (signA ^ (uiA < uiB)); - -} - diff --git a/outside/softfloat-3/source/f64_mul.c b/outside/softfloat-3/source/f64_mul.c deleted file mode 100644 index 0cf112706..000000000 --- a/outside/softfloat-3/source/f64_mul.c +++ /dev/null @@ -1,150 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -float64_t f64_mul( float64_t a, float64_t b ) -{ - union ui64_f64 uA; - uint_fast64_t uiA; - bool signA; - int_fast16_t expA; - uint_fast64_t sigA; - union ui64_f64 uB; - uint_fast64_t uiB; - bool signB; - int_fast16_t expB; - uint_fast64_t sigB; - bool signZ; - uint_fast64_t magBits; - struct exp16_sig64 normExpSig; - int_fast16_t expZ; -#ifdef SOFTFLOAT_FAST_INT64 - struct uint128 sig128Z; -#else - uint32_t sig128Z[4]; -#endif - uint_fast64_t sigZ, uiZ; - union ui64_f64 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - signA = signF64UI( uiA ); - expA = expF64UI( uiA ); - sigA = fracF64UI( uiA ); - uB.f = b; - uiB = uB.ui; - signB = signF64UI( uiB ); - expB = expF64UI( uiB ); - sigB = fracF64UI( uiB ); - signZ = signA ^ signB; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( expA == 0x7FF ) { - if ( sigA || ((expB == 0x7FF) && sigB) ) goto propagateNaN; - magBits = expB | sigB; - goto infArg; - } - if ( expB == 0x7FF ) { - if ( sigB ) goto propagateNaN; - magBits = expA | sigA; - goto infArg; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! expA ) { - if ( ! sigA ) goto zero; - normExpSig = softfloat_normSubnormalF64Sig( sigA ); - expA = normExpSig.exp; - sigA = normExpSig.sig; - } - if ( ! expB ) { - if ( ! sigB ) goto zero; - normExpSig = softfloat_normSubnormalF64Sig( sigB ); - expB = normExpSig.exp; - sigB = normExpSig.sig; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expZ = expA + expB - 0x3FF; - sigA = (sigA | UINT64_C( 0x0010000000000000 ))<<10; - sigB = (sigB | UINT64_C( 0x0010000000000000 ))<<11; -#ifdef SOFTFLOAT_FAST_INT64 - sig128Z = softfloat_mul64To128( sigA, sigB ); - sigZ = sig128Z.v64 | (sig128Z.v0 != 0); -#else - softfloat_mul64To128M( sigA, sigB, sig128Z ); - sigZ = - (uint64_t) sig128Z[indexWord( 4, 3 )]<<32 | sig128Z[indexWord( 4, 2 )]; - if ( sig128Z[indexWord( 4, 1 )] || sig128Z[indexWord( 4, 0 )] ) sigZ |= 1; -#endif - if ( sigZ < UINT64_C( 0x4000000000000000 ) ) { - --expZ; - sigZ <<= 1; - } - return softfloat_roundPackToF64( signZ, expZ, sigZ ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - propagateNaN: - uiZ = softfloat_propagateNaNF64UI( uiA, uiB ); - goto uiZ; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - infArg: - if ( ! magBits ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - uiZ = defaultNaNF64UI; - } else { - uiZ = packToF64UI( signZ, 0x7FF, 0 ); - } - goto uiZ; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - zero: - uiZ = packToF64UI( signZ, 0, 0 ); - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/f64_mulAdd.c b/outside/softfloat-3/source/f64_mulAdd.c deleted file mode 100644 index 2880a8b9e..000000000 --- a/outside/softfloat-3/source/f64_mulAdd.c +++ /dev/null @@ -1,60 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -float64_t f64_mulAdd( float64_t a, float64_t b, float64_t c ) -{ - union ui64_f64 uA; - uint_fast64_t uiA; - union ui64_f64 uB; - uint_fast64_t uiB; - union ui64_f64 uC; - uint_fast64_t uiC; - - uA.f = a; - uiA = uA.ui; - uB.f = b; - uiB = uB.ui; - uC.f = c; - uiC = uC.ui; - return softfloat_mulAddF64( uiA, uiB, uiC, 0 ); - -} - diff --git a/outside/softfloat-3/source/f64_rem.c b/outside/softfloat-3/source/f64_rem.c deleted file mode 100644 index c140b8ba6..000000000 --- a/outside/softfloat-3/source/f64_rem.c +++ /dev/null @@ -1,189 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -float64_t f64_rem( float64_t a, float64_t b ) -{ - union ui64_f64 uA; - uint_fast64_t uiA; - bool signA; - int_fast16_t expA; - uint_fast64_t sigA; - union ui64_f64 uB; - uint_fast64_t uiB; - int_fast16_t expB; - uint_fast64_t sigB; - struct exp16_sig64 normExpSig; - uint64_t rem; - int_fast16_t expDiff; - uint32_t q, recip32; - uint_fast64_t q64; - uint64_t altRem, meanRem; - bool signRem; - uint_fast64_t uiZ; - union ui64_f64 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - signA = signF64UI( uiA ); - expA = expF64UI( uiA ); - sigA = fracF64UI( uiA ); - uB.f = b; - uiB = uB.ui; - expB = expF64UI( uiB ); - sigB = fracF64UI( uiB ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( expA == 0x7FF ) { - if ( sigA || ((expB == 0x7FF) && sigB) ) goto propagateNaN; - goto invalid; - } - if ( expB == 0x7FF ) { - if ( sigB ) goto propagateNaN; - return a; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( expA < expB - 1 ) return a; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! expB ) { - if ( ! sigB ) goto invalid; - normExpSig = softfloat_normSubnormalF64Sig( sigB ); - expB = normExpSig.exp; - sigB = normExpSig.sig; - } - if ( ! expA ) { - if ( ! sigA ) return a; - normExpSig = softfloat_normSubnormalF64Sig( sigA ); - expA = normExpSig.exp; - sigA = normExpSig.sig; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - rem = sigA | UINT64_C( 0x0010000000000000 ); - sigB |= UINT64_C( 0x0010000000000000 ); - expDiff = expA - expB; - if ( expDiff < 1 ) { - if ( expDiff < -1 ) return a; - sigB <<= 9; - if ( expDiff ) { - rem <<= 8; - q = 0; - } else { - rem <<= 9; - q = (sigB <= rem); - if ( q ) rem -= sigB; - } - } else { - recip32 = softfloat_approxRecip32_1( sigB>>21 ); - /*-------------------------------------------------------------------- - | Changing the shift of `rem' here requires also changing the initial - | subtraction from `expDiff'. - *--------------------------------------------------------------------*/ - rem <<= 9; - expDiff -= 30; - /*-------------------------------------------------------------------- - | The scale of `sigB' affects how many bits are obtained during each - | cycle of the loop. Currently this is 29 bits per loop iteration, - | the maximum possible. - *--------------------------------------------------------------------*/ - sigB <<= 9; - for (;;) { - q64 = (uint32_t) (rem>>32) * (uint_fast64_t) recip32; - if ( expDiff < 0 ) break; - q = (q64 + 0x80000000)>>32; -#ifdef SOFTFLOAT_FAST_INT64 - rem <<= 29; -#else - rem = (uint_fast64_t) (uint32_t) (rem>>3)<<32; -#endif - rem -= q * (uint64_t) sigB; - if ( rem & UINT64_C( 0x8000000000000000 ) ) rem += sigB; - expDiff -= 29; - } - /*-------------------------------------------------------------------- - | (`expDiff' cannot be less than -29 here.) - *--------------------------------------------------------------------*/ - q = (uint32_t) (q64>>32)>>(~expDiff & 31); - rem = (rem<<(expDiff + 30)) - q * (uint64_t) sigB; - if ( rem & UINT64_C( 0x8000000000000000 ) ) { - altRem = rem + sigB; - goto selectRem; - } - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - do { - altRem = rem; - ++q; - rem -= sigB; - } while ( ! (rem & UINT64_C( 0x8000000000000000 )) ); - selectRem: - meanRem = rem + altRem; - if ( - (meanRem & UINT64_C( 0x8000000000000000 )) || (! meanRem && (q & 1)) - ) { - rem = altRem; - } - signRem = signA; - if ( rem & UINT64_C( 0x8000000000000000 ) ) { - signRem = ! signRem; - rem = -rem; - } - return softfloat_normRoundPackToF64( signRem, expB, rem ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - propagateNaN: - uiZ = softfloat_propagateNaNF64UI( uiA, uiB ); - goto uiZ; - invalid: - softfloat_raiseFlags( softfloat_flag_invalid ); - uiZ = defaultNaNF64UI; - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/f64_roundToInt.c b/outside/softfloat-3/source/f64_roundToInt.c deleted file mode 100644 index 45ca95402..000000000 --- a/outside/softfloat-3/source/f64_roundToInt.c +++ /dev/null @@ -1,112 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -float64_t f64_roundToInt( float64_t a, uint_fast8_t roundingMode, bool exact ) -{ - union ui64_f64 uA; - uint_fast64_t uiA; - int_fast16_t exp; - uint_fast64_t uiZ, lastBitMask, roundBitsMask; - union ui64_f64 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - exp = expF64UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp <= 0x3FE ) { - if ( ! (uiA & UINT64_C( 0x7FFFFFFFFFFFFFFF )) ) return a; - if ( exact ) softfloat_exceptionFlags |= softfloat_flag_inexact; - uiZ = uiA & packToF64UI( 1, 0, 0 ); - switch ( roundingMode ) { - case softfloat_round_near_even: - if ( ! fracF64UI( uiA ) ) break; - case softfloat_round_near_maxMag: - if ( exp == 0x3FE ) uiZ |= packToF64UI( 0, 0x3FF, 0 ); - break; - case softfloat_round_min: - if ( uiZ ) uiZ = packToF64UI( 1, 0x3FF, 0 ); - break; - case softfloat_round_max: - if ( ! uiZ ) uiZ = packToF64UI( 0, 0x3FF, 0 ); - break; - } - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( 0x433 <= exp ) { - if ( (exp == 0x7FF) && fracF64UI( uiA ) ) { - uiZ = softfloat_propagateNaNF64UI( uiA, 0 ); - goto uiZ; - } - return a; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiZ = uiA; - lastBitMask = (uint_fast64_t) 1<<(0x433 - exp); - roundBitsMask = lastBitMask - 1; - if ( roundingMode == softfloat_round_near_maxMag ) { - uiZ += lastBitMask>>1; - } else if ( roundingMode == softfloat_round_near_even ) { - uiZ += lastBitMask>>1; - if ( ! (uiZ & roundBitsMask) ) uiZ &= ~lastBitMask; - } else if ( - roundingMode - == (signF64UI( uiZ ) ? softfloat_round_min : softfloat_round_max) - ) { - uiZ += roundBitsMask; - } - uiZ &= ~roundBitsMask; - if ( exact && (uiZ != uiA) ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; - } - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/f64_sqrt.c b/outside/softfloat-3/source/f64_sqrt.c deleted file mode 100644 index 2b3da29a0..000000000 --- a/outside/softfloat-3/source/f64_sqrt.c +++ /dev/null @@ -1,133 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -float64_t f64_sqrt( float64_t a ) -{ - union ui64_f64 uA; - uint_fast64_t uiA; - bool signA; - int_fast16_t expA; - uint_fast64_t sigA, uiZ; - struct exp16_sig64 normExpSig; - int_fast16_t expZ; - uint32_t sig32A, recipSqrt32, sig32Z; - uint_fast64_t rem; - uint32_t q; - uint_fast64_t sigZ, shiftedSigZ; - union ui64_f64 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - signA = signF64UI( uiA ); - expA = expF64UI( uiA ); - sigA = fracF64UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( expA == 0x7FF ) { - if ( sigA ) { - uiZ = softfloat_propagateNaNF64UI( uiA, 0 ); - goto uiZ; - } - if ( ! signA ) return a; - goto invalid; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( signA ) { - if ( ! (expA | sigA) ) return a; - goto invalid; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! expA ) { - if ( ! sigA ) return a; - normExpSig = softfloat_normSubnormalF64Sig( sigA ); - expA = normExpSig.exp; - sigA = normExpSig.sig; - } - /*------------------------------------------------------------------------ - | (`sig32Z' is guaranteed to be a lower bound on the square root of - | `sig32A', which makes `sig32Z' also a lower bound on the square root of - | `sigA'.) - *------------------------------------------------------------------------*/ - expZ = ((expA - 0x3FF)>>1) + 0x3FE; - expA &= 1; - sigA |= UINT64_C( 0x0010000000000000 ); - sig32A = sigA>>21; - recipSqrt32 = softfloat_approxRecipSqrt32_1( expA, sig32A ); - sig32Z = ((uint_fast64_t) sig32A * recipSqrt32)>>32; - if ( expA ) { - sigA <<= 8; - sig32Z >>= 1; - } else { - sigA <<= 9; - } - rem = sigA - (uint_fast64_t) sig32Z * sig32Z; - q = ((uint32_t) (rem>>2) * (uint_fast64_t) recipSqrt32)>>32; - sigZ = ((uint_fast64_t) sig32Z<<32 | 1<<5) + ((uint_fast64_t) q<<3); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( (sigZ & 0x1FF) < 1<<5 ) { - sigZ &= ~(uint_fast64_t) 0x3F; - shiftedSigZ = sigZ>>6; - rem = (sigA<<52) - shiftedSigZ * shiftedSigZ; - if ( rem & UINT64_C( 0x8000000000000000 ) ) { - --sigZ; - } else { - if ( rem ) sigZ |= 1; - } - } - return softfloat_roundPackToF64( 0, expZ, sigZ ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - invalid: - softfloat_raiseFlags( softfloat_flag_invalid ); - uiZ = defaultNaNF64UI; - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/f64_sub.c b/outside/softfloat-3/source/f64_sub.c deleted file mode 100644 index bc243f96e..000000000 --- a/outside/softfloat-3/source/f64_sub.c +++ /dev/null @@ -1,74 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -float64_t f64_sub( float64_t a, float64_t b ) -{ - union ui64_f64 uA; - uint_fast64_t uiA; - bool signA; - union ui64_f64 uB; - uint_fast64_t uiB; - bool signB; -#if ! defined INLINE_LEVEL || (INLINE_LEVEL < 2) - float64_t (*magsFuncPtr)( uint_fast64_t, uint_fast64_t, bool ); -#endif - - uA.f = a; - uiA = uA.ui; - signA = signF64UI( uiA ); - uB.f = b; - uiB = uB.ui; - signB = signF64UI( uiB ); -#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL) - if ( signA == signB ) { - return softfloat_subMagsF64( uiA, uiB, signA ); - } else { - return softfloat_addMagsF64( uiA, uiB, signA ); - } -#else - magsFuncPtr = - (signA == signB) ? softfloat_subMagsF64 : softfloat_addMagsF64; - return (*magsFuncPtr)( uiA, uiB, signA ); -#endif - -} - diff --git a/outside/softfloat-3/source/f64_to_extF80.c b/outside/softfloat-3/source/f64_to_extF80.c deleted file mode 100644 index 3595304c9..000000000 --- a/outside/softfloat-3/source/f64_to_extF80.c +++ /dev/null @@ -1,101 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -extFloat80_t f64_to_extF80( float64_t a ) -{ - union ui64_f64 uA; - uint_fast64_t uiA; - bool sign; - int_fast16_t exp; - uint_fast64_t frac; - struct commonNaN commonNaN; - struct uint128 uiZ; - uint_fast16_t uiZ64; - uint_fast64_t uiZ0; - struct exp16_sig64 normExpSig; - union { struct extFloat80M s; extFloat80_t f; } uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - sign = signF64UI( uiA ); - exp = expF64UI( uiA ); - frac = fracF64UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp == 0x7FF ) { - if ( frac ) { - softfloat_f64UIToCommonNaN( uiA, &commonNaN ); - uiZ = softfloat_commonNaNToExtF80UI( &commonNaN ); - uiZ64 = uiZ.v64; - uiZ0 = uiZ.v0; - } else { - uiZ64 = packToExtF80UI64( sign, 0x7FFF ); - uiZ0 = UINT64_C( 0x8000000000000000 ); - } - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! exp ) { - if ( ! frac ) { - uiZ64 = packToExtF80UI64( sign, 0 ); - uiZ0 = 0; - goto uiZ; - } - normExpSig = softfloat_normSubnormalF64Sig( frac ); - exp = normExpSig.exp; - frac = normExpSig.sig; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiZ64 = packToExtF80UI64( sign, exp + 0x3C00 ); - uiZ0 = (frac | UINT64_C( 0x0010000000000000 ))<<11; - uiZ: - uZ.s.signExp = uiZ64; - uZ.s.signif = uiZ0; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/f64_to_extF80M.c b/outside/softfloat-3/source/f64_to_extF80M.c deleted file mode 100644 index 2cc77db08..000000000 --- a/outside/softfloat-3/source/f64_to_extF80M.c +++ /dev/null @@ -1,111 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -void f64_to_extF80M( float64_t a, extFloat80_t *zPtr ) -{ - - *zPtr = f64_to_extF80( a ); - -} - -#else - -void f64_to_extF80M( float64_t a, extFloat80_t *zPtr ) -{ - struct extFloat80M *zSPtr; - union ui64_f64 uA; - uint64_t uiA; - bool sign; - int_fast16_t exp; - uint64_t frac; - struct commonNaN commonNaN; - uint_fast16_t uiZ64; - uint64_t uiZ0; - struct exp16_sig64 normExpSig; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - zSPtr = (struct extFloat80M *) zPtr; - uA.f = a; - uiA = uA.ui; - sign = signF64UI( uiA ); - exp = expF64UI( uiA ); - frac = fracF64UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp == 0x7FF ) { - if ( frac ) { - softfloat_f64UIToCommonNaN( uiA, &commonNaN ); - softfloat_commonNaNToExtF80M( &commonNaN, zSPtr ); - return; - } - uiZ64 = packToExtF80UI64( sign, 0x7FFF ); - uiZ0 = UINT64_C( 0x8000000000000000 ); - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! exp ) { - if ( ! frac ) { - uiZ64 = packToExtF80UI64( sign, 0 ); - uiZ0 = 0; - goto uiZ; - } - normExpSig = softfloat_normSubnormalF64Sig( frac ); - exp = normExpSig.exp; - frac = normExpSig.sig; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiZ64 = packToExtF80UI64( sign, exp + 0x3C00 ); - uiZ0 = UINT64_C( 0x8000000000000000 ) | frac<<11; - uiZ: - zSPtr->signExp = uiZ64; - zSPtr->signif = uiZ0; - -} - -#endif - diff --git a/outside/softfloat-3/source/f64_to_f128.c b/outside/softfloat-3/source/f64_to_f128.c deleted file mode 100644 index fd335e13c..000000000 --- a/outside/softfloat-3/source/f64_to_f128.c +++ /dev/null @@ -1,98 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -float128_t f64_to_f128( float64_t a ) -{ - union ui64_f64 uA; - uint_fast64_t uiA; - bool sign; - int_fast16_t exp; - uint_fast64_t frac; - struct commonNaN commonNaN; - struct uint128 uiZ; - struct exp16_sig64 normExpSig; - struct uint128 frac128; - union ui128_f128 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - sign = signF64UI( uiA ); - exp = expF64UI( uiA ); - frac = fracF64UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp == 0x7FF ) { - if ( frac ) { - softfloat_f64UIToCommonNaN( uiA, &commonNaN ); - uiZ = softfloat_commonNaNToF128UI( &commonNaN ); - } else { - uiZ.v64 = packToF128UI64( sign, 0x7FFF, 0 ); - uiZ.v0 = 0; - } - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! exp ) { - if ( ! frac ) { - uiZ.v64 = packToF128UI64( sign, 0, 0 ); - uiZ.v0 = 0; - goto uiZ; - } - normExpSig = softfloat_normSubnormalF64Sig( frac ); - exp = normExpSig.exp - 1; - frac = normExpSig.sig; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - frac128 = softfloat_shortShiftLeft128( 0, frac, 60 ); - uiZ.v64 = packToF128UI64( sign, exp + 0x3C00, frac128.v64 ); - uiZ.v0 = frac128.v0; - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/f64_to_f128M.c b/outside/softfloat-3/source/f64_to_f128M.c deleted file mode 100644 index b8a9feab2..000000000 --- a/outside/softfloat-3/source/f64_to_f128M.c +++ /dev/null @@ -1,117 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -void f64_to_f128M( float64_t a, float128_t *zPtr ) -{ - - *zPtr = f64_to_f128( a ); - -} - -#else - -void f64_to_f128M( float64_t a, float128_t *zPtr ) -{ - uint32_t *zWPtr; - union ui64_f64 uA; - uint64_t uiA; - bool sign; - int_fast16_t exp; - uint64_t frac; - struct commonNaN commonNaN; - uint32_t uiZ96; - struct exp16_sig64 normExpSig; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - zWPtr = (uint32_t *) zPtr; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - sign = signF64UI( uiA ); - exp = expF64UI( uiA ); - frac = fracF64UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - zWPtr[indexWord( 4, 0 )] = 0; - if ( exp == 0x7FF ) { - if ( frac ) { - softfloat_f64UIToCommonNaN( uiA, &commonNaN ); - softfloat_commonNaNToF128M( &commonNaN, zWPtr ); - return; - } - uiZ96 = packToF128UI96( sign, 0x7FFF, 0 ); - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! exp ) { - if ( ! frac ) { - uiZ96 = packToF128UI96( sign, 0, 0 ); - goto uiZ; - } - normExpSig = softfloat_normSubnormalF64Sig( frac ); - exp = normExpSig.exp - 1; - frac = normExpSig.sig; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - zWPtr[indexWord( 4, 1 )] = (uint32_t) frac<<28; - frac >>= 4; - zWPtr[indexWordHi( 4 )] = packToF128UI96( sign, exp + 0x3C00, frac>>32 ); - zWPtr[indexWord( 4, 2 )] = frac; - return; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiZ: - zWPtr[indexWord( 4, 3 )] = uiZ96; - zWPtr[indexWord( 4, 2 )] = 0; - zWPtr[indexWord( 4, 1 )] = 0; - -} - -#endif - diff --git a/outside/softfloat-3/source/f64_to_f16.c b/outside/softfloat-3/source/f64_to_f16.c deleted file mode 100644 index 85a3b118a..000000000 --- a/outside/softfloat-3/source/f64_to_f16.c +++ /dev/null @@ -1,88 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -float16_t f64_to_f16( float64_t a ) -{ - union ui64_f64 uA; - uint_fast64_t uiA; - bool sign; - int_fast16_t exp; - uint_fast64_t frac; - struct commonNaN commonNaN; - uint_fast16_t uiZ, frac16; - union ui16_f16 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - sign = signF64UI( uiA ); - exp = expF64UI( uiA ); - frac = fracF64UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp == 0x7FF ) { - if ( frac ) { - softfloat_f64UIToCommonNaN( uiA, &commonNaN ); - uiZ = softfloat_commonNaNToF16UI( &commonNaN ); - } else { - uiZ = packToF16UI( sign, 0x1F, 0 ); - } - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - frac16 = softfloat_shortShiftRightJam64( frac, 38 ); - if ( ! (exp | frac16) ) { - uiZ = packToF16UI( sign, 0, 0 ); - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - return softfloat_roundPackToF16( sign, exp - 0x3F1, frac16 | 0x4000 ); - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/f64_to_f32.c b/outside/softfloat-3/source/f64_to_f32.c deleted file mode 100644 index 37c2d9bcc..000000000 --- a/outside/softfloat-3/source/f64_to_f32.c +++ /dev/null @@ -1,88 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -float32_t f64_to_f32( float64_t a ) -{ - union ui64_f64 uA; - uint_fast64_t uiA; - bool sign; - int_fast16_t exp; - uint_fast64_t frac; - struct commonNaN commonNaN; - uint_fast32_t uiZ, frac32; - union ui32_f32 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - sign = signF64UI( uiA ); - exp = expF64UI( uiA ); - frac = fracF64UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp == 0x7FF ) { - if ( frac ) { - softfloat_f64UIToCommonNaN( uiA, &commonNaN ); - uiZ = softfloat_commonNaNToF32UI( &commonNaN ); - } else { - uiZ = packToF32UI( sign, 0xFF, 0 ); - } - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - frac32 = softfloat_shortShiftRightJam64( frac, 22 ); - if ( ! (exp | frac32) ) { - uiZ = packToF32UI( sign, 0, 0 ); - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - return softfloat_roundPackToF32( sign, exp - 0x381, frac32 | 0x40000000 ); - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/f64_to_i32.c b/outside/softfloat-3/source/f64_to_i32.c deleted file mode 100644 index 636d2fafd..000000000 --- a/outside/softfloat-3/source/f64_to_i32.c +++ /dev/null @@ -1,82 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the -University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -int_fast32_t f64_to_i32( float64_t a, uint_fast8_t roundingMode, bool exact ) -{ - union ui64_f64 uA; - uint_fast64_t uiA; - bool sign; - int_fast16_t exp; - uint_fast64_t sig; - int_fast16_t shiftDist; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - sign = signF64UI( uiA ); - exp = expF64UI( uiA ); - sig = fracF64UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ -#if (i32_fromNaN != i32_fromPosOverflow) || (i32_fromNaN != i32_fromNegOverflow) - if ( (exp == 0x7FF) && sig ) { -#if (i32_fromNaN == i32_fromPosOverflow) - sign = 0; -#elif (i32_fromNaN == i32_fromNegOverflow) - sign = 1; -#else - softfloat_raiseFlags( softfloat_flag_invalid ); - return i32_fromNaN; -#endif - } -#endif - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp ) sig |= UINT64_C( 0x0010000000000000 ); - shiftDist = 0x427 - exp; - if ( 0 < shiftDist ) sig = softfloat_shiftRightJam64( sig, shiftDist ); - return softfloat_roundToI32( sign, sig, roundingMode, exact ); - -} - diff --git a/outside/softfloat-3/source/f64_to_i32_r_minMag.c b/outside/softfloat-3/source/f64_to_i32_r_minMag.c deleted file mode 100644 index 79386e71f..000000000 --- a/outside/softfloat-3/source/f64_to_i32_r_minMag.c +++ /dev/null @@ -1,96 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -int_fast32_t f64_to_i32_r_minMag( float64_t a, bool exact ) -{ - union ui64_f64 uA; - uint_fast64_t uiA; - int_fast16_t exp; - uint_fast64_t sig; - int_fast16_t shiftDist; - bool sign; - int_fast32_t absZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - exp = expF64UI( uiA ); - sig = fracF64UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - shiftDist = 0x433 - exp; - if ( 53 <= shiftDist ) { - if ( exact && (exp | sig) ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; - } - return 0; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sign = signF64UI( uiA ); - if ( shiftDist < 22 ) { - if ( - sign && (exp == 0x41E) && (sig < UINT64_C( 0x0000000000200000 )) - ) { - if ( exact && sig ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; - } - return -0x7FFFFFFF - 1; - } - softfloat_raiseFlags( softfloat_flag_invalid ); - return - (exp == 0x7FF) && sig ? i32_fromNaN - : sign ? i32_fromNegOverflow : i32_fromPosOverflow; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sig |= UINT64_C( 0x0010000000000000 ); - absZ = sig>>shiftDist; - if ( exact && ((uint_fast64_t) (uint_fast32_t) absZ< -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -int_fast64_t f64_to_i64( float64_t a, uint_fast8_t roundingMode, bool exact ) -{ - union ui64_f64 uA; - uint_fast64_t uiA; - bool sign; - int_fast16_t exp; - uint_fast64_t sig; - int_fast16_t shiftDist; -#ifdef SOFTFLOAT_FAST_INT64 - struct uint64_extra sigExtra; -#else - uint32_t extSig[3]; -#endif - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - sign = signF64UI( uiA ); - exp = expF64UI( uiA ); - sig = fracF64UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp ) sig |= UINT64_C( 0x0010000000000000 ); - shiftDist = 0x433 - exp; -#ifdef SOFTFLOAT_FAST_INT64 - if ( shiftDist <= 0 ) { - if ( shiftDist < -11 ) goto invalid; - sigExtra.v = sig<<-shiftDist; - sigExtra.extra = 0; - } else { - sigExtra = softfloat_shiftRightJam64Extra( sig, 0, shiftDist ); - } - return - softfloat_roundToI64( - sign, sigExtra.v, sigExtra.extra, roundingMode, exact ); -#else - extSig[indexWord( 3, 0 )] = 0; - if ( shiftDist <= 0 ) { - if ( shiftDist < -11 ) goto invalid; - sig <<= -shiftDist; - extSig[indexWord( 3, 2 )] = sig>>32; - extSig[indexWord( 3, 1 )] = sig; - } else { - extSig[indexWord( 3, 2 )] = sig>>32; - extSig[indexWord( 3, 1 )] = sig; - softfloat_shiftRightJam96M( extSig, shiftDist, extSig ); - } - return softfloat_roundMToI64( sign, extSig, roundingMode, exact ); -#endif - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - invalid: - softfloat_raiseFlags( softfloat_flag_invalid ); - return - (exp == 0x7FF) && fracF64UI( uiA ) ? i64_fromNaN - : sign ? i64_fromNegOverflow : i64_fromPosOverflow; - -} - diff --git a/outside/softfloat-3/source/f64_to_i64_r_minMag.c b/outside/softfloat-3/source/f64_to_i64_r_minMag.c deleted file mode 100644 index 999005596..000000000 --- a/outside/softfloat-3/source/f64_to_i64_r_minMag.c +++ /dev/null @@ -1,100 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -int_fast64_t f64_to_i64_r_minMag( float64_t a, bool exact ) -{ - union ui64_f64 uA; - uint_fast64_t uiA; - bool sign; - int_fast16_t exp; - uint_fast64_t sig; - int_fast16_t shiftDist; - int_fast64_t absZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - sign = signF64UI( uiA ); - exp = expF64UI( uiA ); - sig = fracF64UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - shiftDist = 0x433 - exp; - if ( shiftDist <= 0 ) { - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - if ( shiftDist < -10 ) { - if ( uiA == packToF64UI( 1, 0x43E, 0 ) ) { - return -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1; - } - softfloat_raiseFlags( softfloat_flag_invalid ); - return - (exp == 0x7FF) && sig ? i64_fromNaN - : sign ? i64_fromNegOverflow : i64_fromPosOverflow; - } - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - sig |= UINT64_C( 0x0010000000000000 ); - absZ = sig<<-shiftDist; - } else { - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - if ( 53 <= shiftDist ) { - if ( exact && (exp | sig) ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; - } - return 0; - } - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - sig |= UINT64_C( 0x0010000000000000 ); - absZ = sig>>shiftDist; - if ( exact && (absZ< -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -uint_fast32_t f64_to_ui32( float64_t a, uint_fast8_t roundingMode, bool exact ) -{ - union ui64_f64 uA; - uint_fast64_t uiA; - bool sign; - int_fast16_t exp; - uint_fast64_t sig; - int_fast16_t shiftDist; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - sign = signF64UI( uiA ); - exp = expF64UI( uiA ); - sig = fracF64UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ -#if (ui32_fromNaN != ui32_fromPosOverflow) || (ui32_fromNaN != ui32_fromNegOverflow) - if ( (exp == 0x7FF) && sig ) { -#if (ui32_fromNaN == ui32_fromPosOverflow) - sign = 0; -#elif (ui32_fromNaN == ui32_fromNegOverflow) - sign = 1; -#else - softfloat_raiseFlags( softfloat_flag_invalid ); - return ui32_fromNaN; -#endif - } -#endif - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp ) sig |= UINT64_C( 0x0010000000000000 ); - shiftDist = 0x427 - exp; - if ( 0 < shiftDist ) sig = softfloat_shiftRightJam64( sig, shiftDist ); - return softfloat_roundToUI32( sign, sig, roundingMode, exact ); - -} - diff --git a/outside/softfloat-3/source/f64_to_ui32_r_minMag.c b/outside/softfloat-3/source/f64_to_ui32_r_minMag.c deleted file mode 100644 index 747613d20..000000000 --- a/outside/softfloat-3/source/f64_to_ui32_r_minMag.c +++ /dev/null @@ -1,88 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -uint_fast32_t f64_to_ui32_r_minMag( float64_t a, bool exact ) -{ - union ui64_f64 uA; - uint_fast64_t uiA; - int_fast16_t exp; - uint_fast64_t sig; - int_fast16_t shiftDist; - bool sign; - uint_fast32_t z; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - exp = expF64UI( uiA ); - sig = fracF64UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - shiftDist = 0x433 - exp; - if ( 53 <= shiftDist ) { - if ( exact && (exp | sig) ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; - } - return 0; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sign = signF64UI( uiA ); - if ( sign || (shiftDist < 21) ) { - softfloat_raiseFlags( softfloat_flag_invalid ); - return - (exp == 0x7FF) && sig ? ui32_fromNaN - : sign ? ui32_fromNegOverflow : ui32_fromPosOverflow; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sig |= UINT64_C( 0x0010000000000000 ); - z = sig>>shiftDist; - if ( exact && ((uint_fast64_t) z< -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -uint_fast64_t f64_to_ui64( float64_t a, uint_fast8_t roundingMode, bool exact ) -{ - union ui64_f64 uA; - uint_fast64_t uiA; - bool sign; - int_fast16_t exp; - uint_fast64_t sig; - int_fast16_t shiftDist; -#ifdef SOFTFLOAT_FAST_INT64 - struct uint64_extra sigExtra; -#else - uint32_t extSig[3]; -#endif - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - sign = signF64UI( uiA ); - exp = expF64UI( uiA ); - sig = fracF64UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( exp ) sig |= UINT64_C( 0x0010000000000000 ); - shiftDist = 0x433 - exp; -#ifdef SOFTFLOAT_FAST_INT64 - if ( shiftDist <= 0 ) { - if ( shiftDist < -11 ) goto invalid; - sigExtra.v = sig<<-shiftDist; - sigExtra.extra = 0; - } else { - sigExtra = softfloat_shiftRightJam64Extra( sig, 0, shiftDist ); - } - return - softfloat_roundToUI64( - sign, sigExtra.v, sigExtra.extra, roundingMode, exact ); -#else - extSig[indexWord( 3, 0 )] = 0; - if ( shiftDist <= 0 ) { - if ( shiftDist < -11 ) goto invalid; - sig <<= -shiftDist; - extSig[indexWord( 3, 2 )] = sig>>32; - extSig[indexWord( 3, 1 )] = sig; - } else { - extSig[indexWord( 3, 2 )] = sig>>32; - extSig[indexWord( 3, 1 )] = sig; - softfloat_shiftRightJam96M( extSig, shiftDist, extSig ); - } - return softfloat_roundMToUI64( sign, extSig, roundingMode, exact ); -#endif - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - invalid: - softfloat_raiseFlags( softfloat_flag_invalid ); - return - (exp == 0x7FF) && fracF64UI( uiA ) ? ui64_fromNaN - : sign ? ui64_fromNegOverflow : ui64_fromPosOverflow; - -} - diff --git a/outside/softfloat-3/source/f64_to_ui64_r_minMag.c b/outside/softfloat-3/source/f64_to_ui64_r_minMag.c deleted file mode 100644 index 78e556fed..000000000 --- a/outside/softfloat-3/source/f64_to_ui64_r_minMag.c +++ /dev/null @@ -1,93 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -uint_fast64_t f64_to_ui64_r_minMag( float64_t a, bool exact ) -{ - union ui64_f64 uA; - uint_fast64_t uiA; - int_fast16_t exp; - uint_fast64_t sig; - int_fast16_t shiftDist; - bool sign; - uint_fast64_t z; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uA.f = a; - uiA = uA.ui; - exp = expF64UI( uiA ); - sig = fracF64UI( uiA ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - shiftDist = 0x433 - exp; - if ( 53 <= shiftDist ) { - if ( exact && (exp | sig) ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; - } - return 0; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sign = signF64UI( uiA ); - if ( sign ) goto invalid; - if ( shiftDist <= 0 ) { - if ( shiftDist < -11 ) goto invalid; - z = (sig | UINT64_C( 0x0010000000000000 ))<<-shiftDist; - } else { - sig |= UINT64_C( 0x0010000000000000 ); - z = sig>>shiftDist; - if ( exact && (uint64_t) (sig<<(-shiftDist & 63)) ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; - } - } - return z; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - invalid: - softfloat_raiseFlags( softfloat_flag_invalid ); - return - (exp == 0x7FF) && sig ? ui64_fromNaN - : sign ? ui64_fromNegOverflow : ui64_fromPosOverflow; - -} - diff --git a/outside/softfloat-3/source/i32_to_extF80.c b/outside/softfloat-3/source/i32_to_extF80.c deleted file mode 100644 index 034d98585..000000000 --- a/outside/softfloat-3/source/i32_to_extF80.c +++ /dev/null @@ -1,65 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -extFloat80_t i32_to_extF80( int32_t a ) -{ - uint_fast16_t uiZ64; - uint_fast32_t absA; - bool sign; - int_fast8_t shiftDist; - union { struct extFloat80M s; extFloat80_t f; } uZ; - - uiZ64 = 0; - absA = 0; - if ( a ) { - sign = (a < 0); - absA = sign ? -(uint_fast32_t) a : (uint_fast32_t) a; - shiftDist = softfloat_countLeadingZeros32( absA ); - uiZ64 = packToExtF80UI64( sign, 0x401E - shiftDist ); - absA <<= shiftDist; - } - uZ.s.signExp = uiZ64; - uZ.s.signif = (uint_fast64_t) absA<<32; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/i32_to_extF80M.c b/outside/softfloat-3/source/i32_to_extF80M.c deleted file mode 100644 index 575d2a674..000000000 --- a/outside/softfloat-3/source/i32_to_extF80M.c +++ /dev/null @@ -1,78 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -void i32_to_extF80M( int32_t a, extFloat80_t *zPtr ) -{ - - *zPtr = i32_to_extF80( a ); - -} - -#else - -void i32_to_extF80M( int32_t a, extFloat80_t *zPtr ) -{ - struct extFloat80M *zSPtr; - uint_fast16_t uiZ64; - uint64_t sigZ; - bool sign; - uint32_t absA; - int_fast8_t shiftDist; - - zSPtr = (struct extFloat80M *) zPtr; - uiZ64 = 0; - sigZ = 0; - if ( a ) { - sign = (a < 0); - absA = sign ? -(uint32_t) a : (uint32_t) a; - shiftDist = softfloat_countLeadingZeros32( absA ); - uiZ64 = packToExtF80UI64( sign, 0x401E - shiftDist ); - sigZ = (uint64_t) (absA<signExp = uiZ64; - zSPtr->signif = sigZ; - -} - -#endif - diff --git a/outside/softfloat-3/source/i32_to_f128.c b/outside/softfloat-3/source/i32_to_f128.c deleted file mode 100644 index e6de67fbb..000000000 --- a/outside/softfloat-3/source/i32_to_f128.c +++ /dev/null @@ -1,64 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -float128_t i32_to_f128( int32_t a ) -{ - uint_fast64_t uiZ64; - bool sign; - uint_fast32_t absA; - int_fast8_t shiftDist; - union ui128_f128 uZ; - - uiZ64 = 0; - if ( a ) { - sign = (a < 0); - absA = sign ? -(uint_fast32_t) a : (uint_fast32_t) a; - shiftDist = softfloat_countLeadingZeros32( absA ) + 17; - uiZ64 = - packToF128UI64( - sign, 0x402E - shiftDist, (uint_fast64_t) absA< -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -void i32_to_f128M( int32_t a, float128_t *zPtr ) -{ - - *zPtr = i32_to_f128( a ); - -} - -#else - -void i32_to_f128M( int32_t a, float128_t *zPtr ) -{ - uint32_t *zWPtr; - uint32_t uiZ96, uiZ64; - bool sign; - uint32_t absA; - int_fast8_t shiftDist; - uint64_t normAbsA; - - zWPtr = (uint32_t *) zPtr; - uiZ96 = 0; - uiZ64 = 0; - if ( a ) { - sign = (a < 0); - absA = sign ? -(uint32_t) a : (uint32_t) a; - shiftDist = softfloat_countLeadingZeros32( absA ) + 17; - normAbsA = (uint64_t) absA<>32 ); - uiZ64 = normAbsA; - } - zWPtr[indexWord( 4, 3 )] = uiZ96; - zWPtr[indexWord( 4, 2 )] = uiZ64; - zWPtr[indexWord( 4, 1 )] = 0; - zWPtr[indexWord( 4, 0 )] = 0; - -} - -#endif - diff --git a/outside/softfloat-3/source/i32_to_f16.c b/outside/softfloat-3/source/i32_to_f16.c deleted file mode 100644 index 31d0a4b20..000000000 --- a/outside/softfloat-3/source/i32_to_f16.c +++ /dev/null @@ -1,71 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -float16_t i32_to_f16( int32_t a ) -{ - bool sign; - uint_fast32_t absA; - int_fast8_t shiftDist; - union ui16_f16 u; - uint_fast16_t sig; - - sign = (a < 0); - absA = sign ? -(uint_fast32_t) a : (uint_fast32_t) a; - shiftDist = softfloat_countLeadingZeros32( absA ) - 21; - if ( 0 <= shiftDist ) { - u.ui = - a ? packToF16UI( - sign, 0x18 - shiftDist, (uint_fast16_t) absA<>(-shiftDist) - | ((uint32_t) (absA<<(shiftDist & 31)) != 0) - : (uint_fast16_t) absA< -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -float32_t i32_to_f32( int32_t a ) -{ - bool sign; - union ui32_f32 uZ; - uint_fast32_t absA; - - sign = (a < 0); - if ( ! (a & 0x7FFFFFFF) ) { - uZ.ui = sign ? packToF32UI( 1, 0x9E, 0 ) : 0; - return uZ.f; - } - absA = sign ? -(uint_fast32_t) a : (uint_fast32_t) a; - return softfloat_normRoundPackToF32( sign, 0x9C, absA ); - -} - diff --git a/outside/softfloat-3/source/i32_to_f64.c b/outside/softfloat-3/source/i32_to_f64.c deleted file mode 100644 index 1f26ae611..000000000 --- a/outside/softfloat-3/source/i32_to_f64.c +++ /dev/null @@ -1,65 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -float64_t i32_to_f64( int32_t a ) -{ - uint_fast64_t uiZ; - bool sign; - uint_fast32_t absA; - int_fast8_t shiftDist; - union ui64_f64 uZ; - - if ( ! a ) { - uiZ = 0; - } else { - sign = (a < 0); - absA = sign ? -(uint_fast32_t) a : (uint_fast32_t) a; - shiftDist = softfloat_countLeadingZeros32( absA ) + 21; - uiZ = - packToF64UI( - sign, 0x432 - shiftDist, (uint_fast64_t) absA< -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -extFloat80_t i64_to_extF80( int64_t a ) -{ - uint_fast16_t uiZ64; - uint_fast64_t absA; - bool sign; - int_fast8_t shiftDist; - union { struct extFloat80M s; extFloat80_t f; } uZ; - - uiZ64 = 0; - absA = 0; - if ( a ) { - sign = (a < 0); - absA = sign ? -(uint_fast64_t) a : (uint_fast64_t) a; - shiftDist = softfloat_countLeadingZeros64( absA ); - uiZ64 = packToExtF80UI64( sign, 0x403E - shiftDist ); - absA <<= shiftDist; - } - uZ.s.signExp = uiZ64; - uZ.s.signif = absA; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/i64_to_extF80M.c b/outside/softfloat-3/source/i64_to_extF80M.c deleted file mode 100644 index 1276f61b1..000000000 --- a/outside/softfloat-3/source/i64_to_extF80M.c +++ /dev/null @@ -1,78 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -void i64_to_extF80M( int64_t a, extFloat80_t *zPtr ) -{ - - *zPtr = i64_to_extF80( a ); - -} - -#else - -void i64_to_extF80M( int64_t a, extFloat80_t *zPtr ) -{ - struct extFloat80M *zSPtr; - uint_fast16_t uiZ64; - uint64_t sigZ; - bool sign; - uint64_t absA; - int_fast8_t shiftDist; - - zSPtr = (struct extFloat80M *) zPtr; - uiZ64 = 0; - sigZ = 0; - if ( a ) { - sign = (a < 0); - absA = sign ? -(uint64_t) a : (uint64_t) a; - shiftDist = softfloat_countLeadingZeros64( absA ); - uiZ64 = packToExtF80UI64( sign, 0x403E - shiftDist ); - sigZ = absA<signExp = uiZ64; - zSPtr->signif = sigZ; - -} - -#endif - diff --git a/outside/softfloat-3/source/i64_to_f128.c b/outside/softfloat-3/source/i64_to_f128.c deleted file mode 100644 index 7585a2ff0..000000000 --- a/outside/softfloat-3/source/i64_to_f128.c +++ /dev/null @@ -1,72 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -float128_t i64_to_f128( int64_t a ) -{ - uint_fast64_t uiZ64, uiZ0; - bool sign; - uint_fast64_t absA; - int_fast8_t shiftDist; - struct uint128 zSig; - union ui128_f128 uZ; - - if ( ! a ) { - uiZ64 = 0; - uiZ0 = 0; - } else { - sign = (a < 0); - absA = sign ? -(uint_fast64_t) a : (uint_fast64_t) a; - shiftDist = softfloat_countLeadingZeros64( absA ) + 49; - if ( 64 <= shiftDist ) { - zSig.v64 = absA<<(shiftDist - 64); - zSig.v0 = 0; - } else { - zSig = softfloat_shortShiftLeft128( 0, absA, shiftDist ); - } - uiZ64 = packToF128UI64( sign, 0x406E - shiftDist, zSig.v64 ); - uiZ0 = zSig.v0; - } - uZ.ui.v64 = uiZ64; - uZ.ui.v0 = uiZ0; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/i64_to_f128M.c b/outside/softfloat-3/source/i64_to_f128M.c deleted file mode 100644 index a3fc20166..000000000 --- a/outside/softfloat-3/source/i64_to_f128M.c +++ /dev/null @@ -1,92 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -void i64_to_f128M( int64_t a, float128_t *zPtr ) -{ - - *zPtr = i64_to_f128( a ); - -} - -#else - -void i64_to_f128M( int64_t a, float128_t *zPtr ) -{ - uint32_t *zWPtr; - uint32_t uiZ96, uiZ64; - bool sign; - uint64_t absA; - uint_fast8_t shiftDist; - uint32_t *ptr; - - zWPtr = (uint32_t *) zPtr; - uiZ96 = 0; - uiZ64 = 0; - zWPtr[indexWord( 4, 1 )] = 0; - zWPtr[indexWord( 4, 0 )] = 0; - if ( a ) { - sign = (a < 0); - absA = sign ? -(uint64_t) a : (uint64_t) a; - shiftDist = softfloat_countLeadingZeros64( absA ) + 17; - if ( shiftDist < 32 ) { - ptr = zWPtr + indexMultiwordHi( 4, 3 ); - ptr[indexWord( 3, 2 )] = 0; - ptr[indexWord( 3, 1 )] = absA>>32; - ptr[indexWord( 3, 0 )] = absA; - softfloat_shortShiftLeft96M( ptr, shiftDist, ptr ); - ptr[indexWordHi( 3 )] = - packToF128UI96( - sign, 0x404E - shiftDist, ptr[indexWordHi( 3 )] ); - return; - } - absA <<= shiftDist - 32; - uiZ96 = packToF128UI96( sign, 0x404E - shiftDist, absA>>32 ); - uiZ64 = absA; - } - zWPtr[indexWord( 4, 3 )] = uiZ96; - zWPtr[indexWord( 4, 2 )] = uiZ64; - -} - -#endif - diff --git a/outside/softfloat-3/source/i64_to_f16.c b/outside/softfloat-3/source/i64_to_f16.c deleted file mode 100644 index 882653d1c..000000000 --- a/outside/softfloat-3/source/i64_to_f16.c +++ /dev/null @@ -1,70 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -float16_t i64_to_f16( int64_t a ) -{ - bool sign; - uint_fast64_t absA; - int_fast8_t shiftDist; - union ui16_f16 u; - uint_fast16_t sig; - - sign = (a < 0); - absA = sign ? -(uint_fast64_t) a : (uint_fast64_t) a; - shiftDist = softfloat_countLeadingZeros64( absA ) - 53; - if ( 0 <= shiftDist ) { - u.ui = - a ? packToF16UI( - sign, 0x18 - shiftDist, (uint_fast16_t) absA< -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -float32_t i64_to_f32( int64_t a ) -{ - bool sign; - uint_fast64_t absA; - int_fast8_t shiftDist; - union ui32_f32 u; - uint_fast32_t sig; - - sign = (a < 0); - absA = sign ? -(uint_fast64_t) a : (uint_fast64_t) a; - shiftDist = softfloat_countLeadingZeros64( absA ) - 40; - if ( 0 <= shiftDist ) { - u.ui = - a ? packToF32UI( - sign, 0x95 - shiftDist, (uint_fast32_t) absA< -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -float64_t i64_to_f64( int64_t a ) -{ - bool sign; - union ui64_f64 uZ; - uint_fast64_t absA; - - sign = (a < 0); - if ( ! (a & UINT64_C( 0x7FFFFFFFFFFFFFFF )) ) { - uZ.ui = sign ? packToF64UI( 1, 0x43E, 0 ) : 0; - return uZ.f; - } - absA = sign ? -(uint_fast64_t) a : (uint_fast64_t) a; - return softfloat_normRoundPackToF64( sign, 0x43C, absA ); - -} - diff --git a/outside/softfloat-3/source/include/internals.h b/outside/softfloat-3/source/include/internals.h deleted file mode 100644 index 365f2ba63..000000000 --- a/outside/softfloat-3/source/include/internals.h +++ /dev/null @@ -1,278 +0,0 @@ - -/*============================================================================ - -This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the -University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#ifndef internals_h -#define internals_h 1 - -#include -#include -#include "primitives.h" -#include "softfloat_types.h" - -union ui16_f16 { uint16_t ui; float16_t f; }; -union ui32_f32 { uint32_t ui; float32_t f; }; -union ui64_f64 { uint64_t ui; float64_t f; }; - -#ifdef SOFTFLOAT_FAST_INT64 -union extF80M_extF80 { struct extFloat80M fM; extFloat80_t f; }; -union ui128_f128 { struct uint128 ui; float128_t f; }; -#endif - -enum { - softfloat_mulAdd_subC = 1, - softfloat_mulAdd_subProd = 2 -}; - -/*---------------------------------------------------------------------------- -*----------------------------------------------------------------------------*/ -uint_fast32_t softfloat_roundToUI32( bool, uint_fast64_t, uint_fast8_t, bool ); - -#ifdef SOFTFLOAT_FAST_INT64 -uint_fast64_t - softfloat_roundToUI64( - bool, uint_fast64_t, uint_fast64_t, uint_fast8_t, bool ); -#else -uint_fast64_t softfloat_roundMToUI64( bool, uint32_t *, uint_fast8_t, bool ); -#endif - -int_fast32_t softfloat_roundToI32( bool, uint_fast64_t, uint_fast8_t, bool ); - -#ifdef SOFTFLOAT_FAST_INT64 -int_fast64_t - softfloat_roundToI64( - bool, uint_fast64_t, uint_fast64_t, uint_fast8_t, bool ); -#else -int_fast64_t softfloat_roundMToI64( bool, uint32_t *, uint_fast8_t, bool ); -#endif - -/*---------------------------------------------------------------------------- -*----------------------------------------------------------------------------*/ -#define signF16UI( a ) ((bool) ((uint16_t) (a)>>15)) -#define expF16UI( a ) ((int_fast8_t) ((a)>>10) & 0x1F) -#define fracF16UI( a ) ((a) & 0x03FF) -#define packToF16UI( sign, exp, sig ) (((uint16_t) (sign)<<15) + ((uint16_t) (exp)<<10) + (sig)) - -#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) - -struct exp8_sig16 { int_fast8_t exp; uint_fast16_t sig; }; -struct exp8_sig16 softfloat_normSubnormalF16Sig( uint_fast16_t ); - -float16_t softfloat_roundPackToF16( bool, int_fast16_t, uint_fast16_t ); -float16_t softfloat_normRoundPackToF16( bool, int_fast16_t, uint_fast16_t ); - -float16_t softfloat_addMagsF16( uint_fast16_t, uint_fast16_t ); -float16_t softfloat_subMagsF16( uint_fast16_t, uint_fast16_t ); -float16_t - softfloat_mulAddF16( - uint_fast16_t, uint_fast16_t, uint_fast16_t, uint_fast8_t ); - -/*---------------------------------------------------------------------------- -*----------------------------------------------------------------------------*/ -#define signF32UI( a ) ((bool) ((uint32_t) (a)>>31)) -#define expF32UI( a ) ((int_fast16_t) ((a)>>23) & 0xFF) -#define fracF32UI( a ) ((a) & 0x007FFFFF) -#define packToF32UI( sign, exp, sig ) (((uint32_t) (sign)<<31) + ((uint32_t) (exp)<<23) + (sig)) - -#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) - -struct exp16_sig32 { int_fast16_t exp; uint_fast32_t sig; }; -struct exp16_sig32 softfloat_normSubnormalF32Sig( uint_fast32_t ); - -float32_t softfloat_roundPackToF32( bool, int_fast16_t, uint_fast32_t ); -float32_t softfloat_normRoundPackToF32( bool, int_fast16_t, uint_fast32_t ); - -float32_t softfloat_addMagsF32( uint_fast32_t, uint_fast32_t ); -float32_t softfloat_subMagsF32( uint_fast32_t, uint_fast32_t ); -float32_t - softfloat_mulAddF32( - uint_fast32_t, uint_fast32_t, uint_fast32_t, uint_fast8_t ); - -/*---------------------------------------------------------------------------- -*----------------------------------------------------------------------------*/ -#define signF64UI( a ) ((bool) ((uint64_t) (a)>>63)) -#define expF64UI( a ) ((int_fast16_t) ((a)>>52) & 0x7FF) -#define fracF64UI( a ) ((a) & UINT64_C( 0x000FFFFFFFFFFFFF )) -#define packToF64UI( sign, exp, sig ) ((uint64_t) (((uint_fast64_t) (sign)<<63) + ((uint_fast64_t) (exp)<<52) + (sig))) - -#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) - -struct exp16_sig64 { int_fast16_t exp; uint_fast64_t sig; }; -struct exp16_sig64 softfloat_normSubnormalF64Sig( uint_fast64_t ); - -float64_t softfloat_roundPackToF64( bool, int_fast16_t, uint_fast64_t ); -float64_t softfloat_normRoundPackToF64( bool, int_fast16_t, uint_fast64_t ); - -float64_t softfloat_addMagsF64( uint_fast64_t, uint_fast64_t, bool ); -float64_t softfloat_subMagsF64( uint_fast64_t, uint_fast64_t, bool ); -float64_t - softfloat_mulAddF64( - uint_fast64_t, uint_fast64_t, uint_fast64_t, uint_fast8_t ); - -/*---------------------------------------------------------------------------- -*----------------------------------------------------------------------------*/ -#define signExtF80UI64( a64 ) ((bool) ((uint16_t) (a64)>>15)) -#define expExtF80UI64( a64 ) ((a64) & 0x7FFF) -#define packToExtF80UI64( sign, exp ) ((uint_fast16_t) (sign)<<15 | (exp)) - -#define isNaNExtF80UI( a64, a0 ) ((((a64) & 0x7FFF) == 0x7FFF) && ((a0) & UINT64_C( 0x7FFFFFFFFFFFFFFF ))) - -#ifdef SOFTFLOAT_FAST_INT64 - -/*---------------------------------------------------------------------------- -*----------------------------------------------------------------------------*/ - -struct exp32_sig64 { int_fast32_t exp; uint64_t sig; }; -struct exp32_sig64 softfloat_normSubnormalExtF80Sig( uint_fast64_t ); - -extFloat80_t - softfloat_roundPackToExtF80( - bool, int_fast32_t, uint_fast64_t, uint_fast64_t, uint_fast8_t ); -extFloat80_t - softfloat_normRoundPackToExtF80( - bool, int_fast32_t, uint_fast64_t, uint_fast64_t, uint_fast8_t ); - -extFloat80_t - softfloat_addMagsExtF80( - uint_fast16_t, uint_fast64_t, uint_fast16_t, uint_fast64_t, bool ); -extFloat80_t - softfloat_subMagsExtF80( - uint_fast16_t, uint_fast64_t, uint_fast16_t, uint_fast64_t, bool ); - -/*---------------------------------------------------------------------------- -*----------------------------------------------------------------------------*/ -#define signF128UI64( a64 ) ((bool) ((uint64_t) (a64)>>63)) -#define expF128UI64( a64 ) ((int_fast32_t) ((a64)>>48) & 0x7FFF) -#define fracF128UI64( a64 ) ((a64) & UINT64_C( 0x0000FFFFFFFFFFFF )) -#define packToF128UI64( sign, exp, sig64 ) (((uint_fast64_t) (sign)<<63) + ((uint_fast64_t) (exp)<<48) + (sig64)) - -#define isNaNF128UI( a64, a0 ) (((~(a64) & UINT64_C( 0x7FFF000000000000 )) == 0) && (a0 || ((a64) & UINT64_C( 0x0000FFFFFFFFFFFF )))) - -struct exp32_sig128 { int_fast32_t exp; struct uint128 sig; }; -struct exp32_sig128 - softfloat_normSubnormalF128Sig( uint_fast64_t, uint_fast64_t ); - -float128_t - softfloat_roundPackToF128( - bool, int_fast32_t, uint_fast64_t, uint_fast64_t, uint_fast64_t ); -float128_t - softfloat_normRoundPackToF128( - bool, int_fast32_t, uint_fast64_t, uint_fast64_t ); - -float128_t - softfloat_addMagsF128( - uint_fast64_t, uint_fast64_t, uint_fast64_t, uint_fast64_t, bool ); -float128_t - softfloat_subMagsF128( - uint_fast64_t, uint_fast64_t, uint_fast64_t, uint_fast64_t, bool ); -float128_t - softfloat_mulAddF128( - uint_fast64_t, - uint_fast64_t, - uint_fast64_t, - uint_fast64_t, - uint_fast64_t, - uint_fast64_t, - uint_fast8_t - ); - -#else - -/*---------------------------------------------------------------------------- -*----------------------------------------------------------------------------*/ - -bool - softfloat_tryPropagateNaNExtF80M( - const struct extFloat80M *, - const struct extFloat80M *, - struct extFloat80M * - ); -void softfloat_invalidExtF80M( struct extFloat80M * ); - -int softfloat_normExtF80SigM( uint64_t * ); - -void - softfloat_roundPackMToExtF80M( - bool, int32_t, uint32_t *, uint_fast8_t, struct extFloat80M * ); -void - softfloat_normRoundPackMToExtF80M( - bool, int32_t, uint32_t *, uint_fast8_t, struct extFloat80M * ); - -void - softfloat_addExtF80M( - const struct extFloat80M *, - const struct extFloat80M *, - struct extFloat80M *, - bool - ); - -int - softfloat_compareNonnormExtF80M( - const struct extFloat80M *, const struct extFloat80M * ); - -/*---------------------------------------------------------------------------- -*----------------------------------------------------------------------------*/ -#define signF128UI96( a96 ) ((bool) ((uint32_t) (a96)>>31)) -#define expF128UI96( a96 ) ((int32_t) ((a96)>>16) & 0x7FFF) -#define fracF128UI96( a96 ) ((a96) & 0x0000FFFF) -#define packToF128UI96( sign, exp, sig96 ) (((uint32_t) (sign)<<31) + ((uint32_t) (exp)<<16) + (sig96)) - -bool softfloat_isNaNF128M( const uint32_t * ); - -bool - softfloat_tryPropagateNaNF128M( - const uint32_t *, const uint32_t *, uint32_t * ); -void softfloat_invalidF128M( uint32_t * ); - -int softfloat_shiftNormSigF128M( const uint32_t *, uint_fast8_t, uint32_t * ); - -void softfloat_roundPackMToF128M( bool, int32_t, uint32_t *, uint32_t * ); -void softfloat_normRoundPackMToF128M( bool, int32_t, uint32_t *, uint32_t * ); - -void - softfloat_addF128M( const uint32_t *, const uint32_t *, uint32_t *, bool ); -void - softfloat_mulAddF128M( - const uint32_t *, - const uint32_t *, - const uint32_t *, - uint32_t *, - uint_fast8_t - ); - -#endif - -#endif - diff --git a/outside/softfloat-3/source/include/primitiveTypes.h b/outside/softfloat-3/source/include/primitiveTypes.h deleted file mode 100644 index 88dc9a4a3..000000000 --- a/outside/softfloat-3/source/include/primitiveTypes.h +++ /dev/null @@ -1,85 +0,0 @@ - -/*============================================================================ - -This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#ifndef primitiveTypes_h -#define primitiveTypes_h 1 - -#include - -#ifdef SOFTFLOAT_FAST_INT64 - -#ifdef LITTLEENDIAN -struct uint128 { uint64_t v0, v64; }; -struct uint64_extra { uint64_t extra, v; }; -struct uint128_extra { uint64_t extra; struct uint128 v; }; -#else -struct uint128 { uint64_t v64, v0; }; -struct uint64_extra { uint64_t v, extra; }; -struct uint128_extra { struct uint128 v; uint64_t extra; }; -#endif - -#endif - -/*---------------------------------------------------------------------------- -| These macros are used to isolate the differences in word order between big- -| endian and little-endian platforms. -*----------------------------------------------------------------------------*/ -#ifdef LITTLEENDIAN -#define wordIncr 1 -#define indexWord( total, n ) (n) -#define indexWordHi( total ) ((total) - 1) -#define indexWordLo( total ) 0 -#define indexMultiword( total, m, n ) (n) -#define indexMultiwordHi( total, n ) ((total) - (n)) -#define indexMultiwordLo( total, n ) 0 -#define indexMultiwordHiBut( total, n ) (n) -#define indexMultiwordLoBut( total, n ) 0 -#define INIT_UINTM4( v3, v2, v1, v0 ) { v0, v1, v2, v3 } -#else -#define wordIncr -1 -#define indexWord( total, n ) ((total) - 1 - (n)) -#define indexWordHi( total ) 0 -#define indexWordLo( total ) ((total) - 1) -#define indexMultiword( total, m, n ) ((total) - 1 - (m)) -#define indexMultiwordHi( total, n ) 0 -#define indexMultiwordLo( total, n ) ((total) - (n)) -#define indexMultiwordHiBut( total, n ) 0 -#define indexMultiwordLoBut( total, n ) (n) -#define INIT_UINTM4( v3, v2, v1, v0 ) { v3, v2, v1, v0 } -#endif - -#endif - diff --git a/outside/softfloat-3/source/include/primitives.h b/outside/softfloat-3/source/include/primitives.h deleted file mode 100644 index af4f19af6..000000000 --- a/outside/softfloat-3/source/include/primitives.h +++ /dev/null @@ -1,1160 +0,0 @@ - -/*============================================================================ - -This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the -University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#ifndef primitives_h -#define primitives_h 1 - -#include -#include -#include "primitiveTypes.h" - -#ifndef softfloat_shortShiftRightJam64 -/*---------------------------------------------------------------------------- -| Shifts 'a' right by the number of bits given in 'dist', which must be in -| the range 1 to 63. If any nonzero bits are shifted off, they are "jammed" -| into the least-significant bit of the shifted value by setting the least- -| significant bit to 1. This shifted-and-jammed value is returned. -*----------------------------------------------------------------------------*/ -#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL) -INLINE -uint64_t softfloat_shortShiftRightJam64( uint64_t a, uint_fast8_t dist ) - { return a>>dist | ((a & (((uint_fast64_t) 1<>dist | ((uint32_t) (a<<(-dist & 31)) != 0) : (a != 0); -} -#else -uint32_t softfloat_shiftRightJam32( uint32_t a, uint_fast16_t dist ); -#endif -#endif - -#ifndef softfloat_shiftRightJam64 -/*---------------------------------------------------------------------------- -| Shifts 'a' right by the number of bits given in 'dist', which must not -| be zero. If any nonzero bits are shifted off, they are "jammed" into the -| least-significant bit of the shifted value by setting the least-significant -| bit to 1. This shifted-and-jammed value is returned. -| The value of 'dist' can be arbitrarily large. In particular, if 'dist' is -| greater than 64, the result will be either 0 or 1, depending on whether 'a' -| is zero or nonzero. -*----------------------------------------------------------------------------*/ -#if defined INLINE_LEVEL && (3 <= INLINE_LEVEL) -INLINE uint64_t softfloat_shiftRightJam64( uint64_t a, uint_fast32_t dist ) -{ - return - (dist < 63) ? a>>dist | ((uint64_t) (a<<(-dist & 63)) != 0) : (a != 0); -} -#else -uint64_t softfloat_shiftRightJam64( uint64_t a, uint_fast32_t dist ); -#endif -#endif - -/*---------------------------------------------------------------------------- -| A constant table that translates an 8-bit unsigned integer (the array index) -| into the number of leading 0 bits before the most-significant 1 of that -| integer. For integer zero (index 0), the corresponding table element is 8. -*----------------------------------------------------------------------------*/ -extern const uint_least8_t softfloat_countLeadingZeros8[256]; - -#ifndef softfloat_countLeadingZeros16 -/*---------------------------------------------------------------------------- -| Returns the number of leading 0 bits before the most-significant 1 bit of -| 'a'. If 'a' is zero, 16 is returned. -*----------------------------------------------------------------------------*/ -#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL) -INLINE uint_fast8_t softfloat_countLeadingZeros16( uint16_t a ) -{ - uint_fast8_t count = 8; - if ( 0x100 <= a ) { - count = 0; - a >>= 8; - } - count += softfloat_countLeadingZeros8[a]; - return count; -} -#else -uint_fast8_t softfloat_countLeadingZeros16( uint16_t a ); -#endif -#endif - -#ifndef softfloat_countLeadingZeros32 -/*---------------------------------------------------------------------------- -| Returns the number of leading 0 bits before the most-significant 1 bit of -| 'a'. If 'a' is zero, 32 is returned. -*----------------------------------------------------------------------------*/ -#if defined INLINE_LEVEL && (3 <= INLINE_LEVEL) -INLINE uint_fast8_t softfloat_countLeadingZeros32( uint32_t a ) -{ - uint_fast8_t count = 0; - if ( a < 0x10000 ) { - count = 16; - a <<= 16; - } - if ( a < 0x1000000 ) { - count += 8; - a <<= 8; - } - count += softfloat_countLeadingZeros8[a>>24]; - return count; -} -#else -uint_fast8_t softfloat_countLeadingZeros32( uint32_t a ); -#endif -#endif - -#ifndef softfloat_countLeadingZeros64 -/*---------------------------------------------------------------------------- -| Returns the number of leading 0 bits before the most-significant 1 bit of -| 'a'. If 'a' is zero, 64 is returned. -*----------------------------------------------------------------------------*/ -uint_fast8_t softfloat_countLeadingZeros64( uint64_t a ); -#endif - -extern const uint16_t softfloat_approxRecip_1k0s[16]; -extern const uint16_t softfloat_approxRecip_1k1s[16]; - -#ifndef softfloat_approxRecip32_1 -/*---------------------------------------------------------------------------- -| Returns an approximation to the reciprocal of the number represented by 'a', -| where 'a' is interpreted as an unsigned fixed-point number with one integer -| bit and 31 fraction bits. The 'a' input must be "normalized", meaning that -| its most-significant bit (bit 31) must be 1. Thus, if A is the value of -| the fixed-point interpretation of 'a', then 1 <= A < 2. The returned value -| is interpreted as a pure unsigned fraction, having no integer bits and 32 -| fraction bits. The approximation returned is never greater than the true -| reciprocal 1/A, and it differs from the true reciprocal by at most 2.006 ulp -| (units in the last place). -*----------------------------------------------------------------------------*/ -#ifdef SOFTFLOAT_FAST_DIV64TO32 -#define softfloat_approxRecip32_1( a ) ((uint32_t) (UINT64_C( 0x7FFFFFFFFFFFFFFF ) / (uint32_t) (a))) -#else -uint32_t softfloat_approxRecip32_1( uint32_t a ); -#endif -#endif - -extern const uint16_t softfloat_approxRecipSqrt_1k0s[16]; -extern const uint16_t softfloat_approxRecipSqrt_1k1s[16]; - -#ifndef softfloat_approxRecipSqrt32_1 -/*---------------------------------------------------------------------------- -| Returns an approximation to the reciprocal of the square root of the number -| represented by 'a', where 'a' is interpreted as an unsigned fixed-point -| number either with one integer bit and 31 fraction bits or with two integer -| bits and 30 fraction bits. The format of 'a' is determined by 'oddExpA', -| which must be either 0 or 1. If 'oddExpA' is 1, 'a' is interpreted as -| having one integer bit, and if 'oddExpA' is 0, 'a' is interpreted as having -| two integer bits. The 'a' input must be "normalized", meaning that its -| most-significant bit (bit 31) must be 1. Thus, if A is the value of the -| fixed-point interpretation of 'a', it follows that 1 <= A < 2 when 'oddExpA' -| is 1, and 2 <= A < 4 when 'oddExpA' is 0. -| The returned value is interpreted as a pure unsigned fraction, having -| no integer bits and 32 fraction bits. The approximation returned is never -| greater than the true reciprocal 1/sqrt(A), and it differs from the true -| reciprocal by at most 2.06 ulp (units in the last place). The approximation -| returned is also always within the range 0.5 to 1; thus, the most- -| significant bit of the result is always set. -*----------------------------------------------------------------------------*/ -uint32_t softfloat_approxRecipSqrt32_1( unsigned int oddExpA, uint32_t a ); -#endif - -#ifdef SOFTFLOAT_FAST_INT64 - -/*---------------------------------------------------------------------------- -| The following functions are needed only when 'SOFTFLOAT_FAST_INT64' is -| defined. -*----------------------------------------------------------------------------*/ - -#ifndef softfloat_eq128 -/*---------------------------------------------------------------------------- -| Returns true if the 128-bit unsigned integer formed by concatenating 'a64' -| and 'a0' is equal to the 128-bit unsigned integer formed by concatenating -| 'b64' and 'b0'. -*----------------------------------------------------------------------------*/ -#if defined INLINE_LEVEL && (1 <= INLINE_LEVEL) -INLINE -bool softfloat_eq128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 ) - { return (a64 == b64) && (a0 == b0); } -#else -bool softfloat_eq128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 ); -#endif -#endif - -#ifndef softfloat_le128 -/*---------------------------------------------------------------------------- -| Returns true if the 128-bit unsigned integer formed by concatenating 'a64' -| and 'a0' is less than or equal to the 128-bit unsigned integer formed by -| concatenating 'b64' and 'b0'. -*----------------------------------------------------------------------------*/ -#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL) -INLINE -bool softfloat_le128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 ) - { return (a64 < b64) || ((a64 == b64) && (a0 <= b0)); } -#else -bool softfloat_le128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 ); -#endif -#endif - -#ifndef softfloat_lt128 -/*---------------------------------------------------------------------------- -| Returns true if the 128-bit unsigned integer formed by concatenating 'a64' -| and 'a0' is less than the 128-bit unsigned integer formed by concatenating -| 'b64' and 'b0'. -*----------------------------------------------------------------------------*/ -#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL) -INLINE -bool softfloat_lt128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 ) - { return (a64 < b64) || ((a64 == b64) && (a0 < b0)); } -#else -bool softfloat_lt128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 ); -#endif -#endif - -#ifndef softfloat_shortShiftLeft128 -/*---------------------------------------------------------------------------- -| Shifts the 128 bits formed by concatenating 'a64' and 'a0' left by the -| number of bits given in 'dist', which must be in the range 1 to 63. -*----------------------------------------------------------------------------*/ -#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL) -INLINE -struct uint128 - softfloat_shortShiftLeft128( uint64_t a64, uint64_t a0, uint_fast8_t dist ) -{ - struct uint128 z; - z.v64 = a64<>(-dist & 63); - z.v0 = a0<>dist; - z.v0 = a64<<(-dist & 63) | a0>>dist; - return z; -} -#else -struct uint128 - softfloat_shortShiftRight128( uint64_t a64, uint64_t a0, uint_fast8_t dist ); -#endif -#endif - -#ifndef softfloat_shortShiftRightJam64Extra -/*---------------------------------------------------------------------------- -| This function is the same as 'softfloat_shiftRightJam64Extra' (below), -| except that 'dist' must be in the range 1 to 63. -*----------------------------------------------------------------------------*/ -#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL) -INLINE -struct uint64_extra - softfloat_shortShiftRightJam64Extra( - uint64_t a, uint64_t extra, uint_fast8_t dist ) -{ - struct uint64_extra z; - z.v = a>>dist; - z.extra = a<<(-dist & 63) | (extra != 0); - return z; -} -#else -struct uint64_extra - softfloat_shortShiftRightJam64Extra( - uint64_t a, uint64_t extra, uint_fast8_t dist ); -#endif -#endif - -#ifndef softfloat_shortShiftRightJam128 -/*---------------------------------------------------------------------------- -| Shifts the 128 bits formed by concatenating 'a64' and 'a0' right by the -| number of bits given in 'dist', which must be in the range 1 to 63. If any -| nonzero bits are shifted off, they are "jammed" into the least-significant -| bit of the shifted value by setting the least-significant bit to 1. This -| shifted-and-jammed value is returned. -*----------------------------------------------------------------------------*/ -#if defined INLINE_LEVEL && (3 <= INLINE_LEVEL) -INLINE -struct uint128 - softfloat_shortShiftRightJam128( - uint64_t a64, uint64_t a0, uint_fast8_t dist ) -{ - uint_fast8_t negDist = -dist; - struct uint128 z; - z.v64 = a64>>dist; - z.v0 = - a64<<(negDist & 63) | a0>>dist - | ((uint64_t) (a0<<(negDist & 63)) != 0); - return z; -} -#else -struct uint128 - softfloat_shortShiftRightJam128( - uint64_t a64, uint64_t a0, uint_fast8_t dist ); -#endif -#endif - -#ifndef softfloat_shortShiftRightJam128Extra -/*---------------------------------------------------------------------------- -| This function is the same as 'softfloat_shiftRightJam128Extra' (below), -| except that 'dist' must be in the range 1 to 63. -*----------------------------------------------------------------------------*/ -#if defined INLINE_LEVEL && (3 <= INLINE_LEVEL) -INLINE -struct uint128_extra - softfloat_shortShiftRightJam128Extra( - uint64_t a64, uint64_t a0, uint64_t extra, uint_fast8_t dist ) -{ - uint_fast8_t negDist = -dist; - struct uint128_extra z; - z.v.v64 = a64>>dist; - z.v.v0 = a64<<(negDist & 63) | a0>>dist; - z.extra = a0<<(negDist & 63) | (extra != 0); - return z; -} -#else -struct uint128_extra - softfloat_shortShiftRightJam128Extra( - uint64_t a64, uint64_t a0, uint64_t extra, uint_fast8_t dist ); -#endif -#endif - -#ifndef softfloat_shiftRightJam64Extra -/*---------------------------------------------------------------------------- -| Shifts the 128 bits formed by concatenating 'a' and 'extra' right by 64 -| _plus_ the number of bits given in 'dist', which must not be zero. This -| shifted value is at most 64 nonzero bits and is returned in the 'v' field -| of the 'struct uint64_extra' result. The 64-bit 'extra' field of the result -| contains a value formed as follows from the bits that were shifted off: The -| _last_ bit shifted off is the most-significant bit of the 'extra' field, and -| the other 63 bits of the 'extra' field are all zero if and only if _all_but_ -| _the_last_ bits shifted off were all zero. -| (This function makes more sense if 'a' and 'extra' are considered to form -| an unsigned fixed-point number with binary point between 'a' and 'extra'. -| This fixed-point value is shifted right by the number of bits given in -| 'dist', and the integer part of this shifted value is returned in the 'v' -| field of the result. The fractional part of the shifted value is modified -| as described above and returned in the 'extra' field of the result.) -*----------------------------------------------------------------------------*/ -#if defined INLINE_LEVEL && (4 <= INLINE_LEVEL) -INLINE -struct uint64_extra - softfloat_shiftRightJam64Extra( - uint64_t a, uint64_t extra, uint_fast32_t dist ) -{ - struct uint64_extra z; - if ( dist < 64 ) { - z.v = a>>dist; - z.extra = a<<(-dist & 63); - } else { - z.v = 0; - z.extra = (dist == 64) ? a : (a != 0); - } - z.extra |= (extra != 0); - return z; -} -#else -struct uint64_extra - softfloat_shiftRightJam64Extra( - uint64_t a, uint64_t extra, uint_fast32_t dist ); -#endif -#endif - -#ifndef softfloat_shiftRightJam128 -/*---------------------------------------------------------------------------- -| Shifts the 128 bits formed by concatenating 'a64' and 'a0' right by the -| number of bits given in 'dist', which must not be zero. If any nonzero bits -| are shifted off, they are "jammed" into the least-significant bit of the -| shifted value by setting the least-significant bit to 1. This shifted-and- -| jammed value is returned. -| The value of 'dist' can be arbitrarily large. In particular, if 'dist' is -| greater than 128, the result will be either 0 or 1, depending on whether the -| original 128 bits are all zeros. -*----------------------------------------------------------------------------*/ -struct uint128 - softfloat_shiftRightJam128( uint64_t a64, uint64_t a0, uint_fast32_t dist ); -#endif - -#ifndef softfloat_shiftRightJam128Extra -/*---------------------------------------------------------------------------- -| Shifts the 192 bits formed by concatenating 'a64', 'a0', and 'extra' right -| by 64 _plus_ the number of bits given in 'dist', which must not be zero. -| This shifted value is at most 128 nonzero bits and is returned in the 'v' -| field of the 'struct uint128_extra' result. The 64-bit 'extra' field of the -| result contains a value formed as follows from the bits that were shifted -| off: The _last_ bit shifted off is the most-significant bit of the 'extra' -| field, and the other 63 bits of the 'extra' field are all zero if and only -| if _all_but_the_last_ bits shifted off were all zero. -| (This function makes more sense if 'a64', 'a0', and 'extra' are considered -| to form an unsigned fixed-point number with binary point between 'a0' and -| 'extra'. This fixed-point value is shifted right by the number of bits -| given in 'dist', and the integer part of this shifted value is returned -| in the 'v' field of the result. The fractional part of the shifted value -| is modified as described above and returned in the 'extra' field of the -| result.) -*----------------------------------------------------------------------------*/ -struct uint128_extra - softfloat_shiftRightJam128Extra( - uint64_t a64, uint64_t a0, uint64_t extra, uint_fast32_t dist ); -#endif - -#ifndef softfloat_shiftRightJam256M -/*---------------------------------------------------------------------------- -| Shifts the 256-bit unsigned integer pointed to by 'aPtr' right by the number -| of bits given in 'dist', which must not be zero. If any nonzero bits are -| shifted off, they are "jammed" into the least-significant bit of the shifted -| value by setting the least-significant bit to 1. This shifted-and-jammed -| value is stored at the location pointed to by 'zPtr'. Each of 'aPtr' and -| 'zPtr' points to an array of four 64-bit elements that concatenate in the -| platform's normal endian order to form a 256-bit integer. -| The value of 'dist' can be arbitrarily large. In particular, if 'dist' -| is greater than 256, the stored result will be either 0 or 1, depending on -| whether the original 256 bits are all zeros. -*----------------------------------------------------------------------------*/ -void - softfloat_shiftRightJam256M( - const uint64_t *aPtr, uint_fast32_t dist, uint64_t *zPtr ); -#endif - -#ifndef softfloat_add128 -/*---------------------------------------------------------------------------- -| Returns the sum of the 128-bit integer formed by concatenating 'a64' and -| 'a0' and the 128-bit integer formed by concatenating 'b64' and 'b0'. The -| addition is modulo 2^128, so any carry out is lost. -*----------------------------------------------------------------------------*/ -#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL) -INLINE -struct uint128 - softfloat_add128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 ) -{ - struct uint128 z; - z.v0 = a0 + b0; - z.v64 = a64 + b64 + (z.v0 < a0); - return z; -} -#else -struct uint128 - softfloat_add128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 ); -#endif -#endif - -#ifndef softfloat_add256M -/*---------------------------------------------------------------------------- -| Adds the two 256-bit integers pointed to by 'aPtr' and 'bPtr'. The addition -| is modulo 2^256, so any carry out is lost. The sum is stored at the -| location pointed to by 'zPtr'. Each of 'aPtr', 'bPtr', and 'zPtr' points to -| an array of four 64-bit elements that concatenate in the platform's normal -| endian order to form a 256-bit integer. -*----------------------------------------------------------------------------*/ -void - softfloat_add256M( - const uint64_t *aPtr, const uint64_t *bPtr, uint64_t *zPtr ); -#endif - -#ifndef softfloat_sub128 -/*---------------------------------------------------------------------------- -| Returns the difference of the 128-bit integer formed by concatenating 'a64' -| and 'a0' and the 128-bit integer formed by concatenating 'b64' and 'b0'. -| The subtraction is modulo 2^128, so any borrow out (carry out) is lost. -*----------------------------------------------------------------------------*/ -#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL) -INLINE -struct uint128 - softfloat_sub128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 ) -{ - struct uint128 z; - z.v0 = a0 - b0; - z.v64 = a64 - b64; - z.v64 -= (a0 < b0); - return z; -} -#else -struct uint128 - softfloat_sub128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 ); -#endif -#endif - -#ifndef softfloat_sub256M -/*---------------------------------------------------------------------------- -| Subtracts the 256-bit integer pointed to by 'bPtr' from the 256-bit integer -| pointed to by 'aPtr'. The addition is modulo 2^256, so any borrow out -| (carry out) is lost. The difference is stored at the location pointed to -| by 'zPtr'. Each of 'aPtr', 'bPtr', and 'zPtr' points to an array of four -| 64-bit elements that concatenate in the platform's normal endian order to -| form a 256-bit integer. -*----------------------------------------------------------------------------*/ -void - softfloat_sub256M( - const uint64_t *aPtr, const uint64_t *bPtr, uint64_t *zPtr ); -#endif - -#ifndef softfloat_mul64ByShifted32To128 -/*---------------------------------------------------------------------------- -| Returns the 128-bit product of 'a', 'b', and 2^32. -*----------------------------------------------------------------------------*/ -#if defined INLINE_LEVEL && (3 <= INLINE_LEVEL) -INLINE struct uint128 softfloat_mul64ByShifted32To128( uint64_t a, uint32_t b ) -{ - uint_fast64_t mid; - struct uint128 z; - mid = (uint_fast64_t) (uint32_t) a * b; - z.v0 = mid<<32; - z.v64 = (uint_fast64_t) (uint32_t) (a>>32) * b + (mid>>32); - return z; -} -#else -struct uint128 softfloat_mul64ByShifted32To128( uint64_t a, uint32_t b ); -#endif -#endif - -#ifndef softfloat_mul64To128 -/*---------------------------------------------------------------------------- -| Returns the 128-bit product of 'a' and 'b'. -*----------------------------------------------------------------------------*/ -struct uint128 softfloat_mul64To128( uint64_t a, uint64_t b ); -#endif - -#ifndef softfloat_mul128By32 -/*---------------------------------------------------------------------------- -| Returns the product of the 128-bit integer formed by concatenating 'a64' and -| 'a0', multiplied by 'b'. The multiplication is modulo 2^128; any overflow -| bits are discarded. -*----------------------------------------------------------------------------*/ -#if defined INLINE_LEVEL && (4 <= INLINE_LEVEL) -INLINE -struct uint128 softfloat_mul128By32( uint64_t a64, uint64_t a0, uint32_t b ) -{ - struct uint128 z; - uint_fast64_t mid; - uint_fast32_t carry; - z.v0 = a0 * b; - mid = (uint_fast64_t) (uint32_t) (a0>>32) * b; - carry = (uint32_t) ((uint_fast32_t) (z.v0>>32) - (uint_fast32_t) mid); - z.v64 = a64 * b + (uint_fast32_t) ((mid + carry)>>32); - return z; -} -#else -struct uint128 softfloat_mul128By32( uint64_t a64, uint64_t a0, uint32_t b ); -#endif -#endif - -#ifndef softfloat_mul128To256M -/*---------------------------------------------------------------------------- -| Multiplies the 128-bit unsigned integer formed by concatenating 'a64' and -| 'a0' by the 128-bit unsigned integer formed by concatenating 'b64' and -| 'b0'. The 256-bit product is stored at the location pointed to by 'zPtr'. -| Argument 'zPtr' points to an array of four 64-bit elements that concatenate -| in the platform's normal endian order to form a 256-bit integer. -*----------------------------------------------------------------------------*/ -void - softfloat_mul128To256M( - uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0, uint64_t *zPtr ); -#endif - -#else - -/*---------------------------------------------------------------------------- -| The following functions are needed only when 'SOFTFLOAT_FAST_INT64' is not -| defined. -*----------------------------------------------------------------------------*/ - -#ifndef softfloat_compare96M -/*---------------------------------------------------------------------------- -| Compares the two 96-bit unsigned integers pointed to by 'aPtr' and 'bPtr'. -| Returns -1 if the first integer (A) is less than the second (B); returns 0 -| if the two integers are equal; and returns +1 if the first integer (A) -| is greater than the second (B). (The result is thus the signum of A - B.) -| Each of 'aPtr' and 'bPtr' points to an array of three 32-bit elements that -| concatenate in the platform's normal endian order to form a 96-bit integer. -*----------------------------------------------------------------------------*/ -int_fast8_t softfloat_compare96M( const uint32_t *aPtr, const uint32_t *bPtr ); -#endif - -#ifndef softfloat_compare128M -/*---------------------------------------------------------------------------- -| Compares the two 128-bit unsigned integers pointed to by 'aPtr' and 'bPtr'. -| Returns -1 if the first integer (A) is less than the second (B); returns 0 -| if the two integers are equal; and returns +1 if the first integer (A) -| is greater than the second (B). (The result is thus the signum of A - B.) -| Each of 'aPtr' and 'bPtr' points to an array of four 32-bit elements that -| concatenate in the platform's normal endian order to form a 128-bit integer. -*----------------------------------------------------------------------------*/ -int_fast8_t - softfloat_compare128M( const uint32_t *aPtr, const uint32_t *bPtr ); -#endif - -#ifndef softfloat_shortShiftLeft64To96M -/*---------------------------------------------------------------------------- -| Extends 'a' to 96 bits and shifts the value left by the number of bits given -| in 'dist', which must be in the range 1 to 31. The result is stored at the -| location pointed to by 'zPtr'. Argument 'zPtr' points to an array of three -| 32-bit elements that concatenate in the platform's normal endian order to -| form a 96-bit integer. -*----------------------------------------------------------------------------*/ -#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL) -INLINE -void - softfloat_shortShiftLeft64To96M( - uint64_t a, uint_fast8_t dist, uint32_t *zPtr ) -{ - zPtr[indexWord( 3, 0 )] = (uint32_t) a<>= 32 - dist; - zPtr[indexWord( 3, 2 )] = a>>32; - zPtr[indexWord( 3, 1 )] = a; -} -#else -void - softfloat_shortShiftLeft64To96M( - uint64_t a, uint_fast8_t dist, uint32_t *zPtr ); -#endif -#endif - -#ifndef softfloat_shortShiftLeftM -/*---------------------------------------------------------------------------- -| Shifts the N-bit unsigned integer pointed to by 'aPtr' left by the number -| of bits given in 'dist', where N = 'size_words' * 32. The value of 'dist' -| must be in the range 1 to 31. Any nonzero bits shifted off are lost. The -| shifted N-bit result is stored at the location pointed to by 'zPtr'. Each -| of 'aPtr' and 'zPtr' points to a 'size_words'-long array of 32-bit elements -| that concatenate in the platform's normal endian order to form an N-bit -| integer. -*----------------------------------------------------------------------------*/ -void - softfloat_shortShiftLeftM( - uint_fast8_t size_words, - const uint32_t *aPtr, - uint_fast8_t dist, - uint32_t *zPtr - ); -#endif - -#ifndef softfloat_shortShiftLeft96M -/*---------------------------------------------------------------------------- -| This function or macro is the same as 'softfloat_shortShiftLeftM' with -| 'size_words' = 3 (N = 96). -*----------------------------------------------------------------------------*/ -#define softfloat_shortShiftLeft96M( aPtr, dist, zPtr ) softfloat_shortShiftLeftM( 3, aPtr, dist, zPtr ) -#endif - -#ifndef softfloat_shortShiftLeft128M -/*---------------------------------------------------------------------------- -| This function or macro is the same as 'softfloat_shortShiftLeftM' with -| 'size_words' = 4 (N = 128). -*----------------------------------------------------------------------------*/ -#define softfloat_shortShiftLeft128M( aPtr, dist, zPtr ) softfloat_shortShiftLeftM( 4, aPtr, dist, zPtr ) -#endif - -#ifndef softfloat_shortShiftLeft160M -/*---------------------------------------------------------------------------- -| This function or macro is the same as 'softfloat_shortShiftLeftM' with -| 'size_words' = 5 (N = 160). -*----------------------------------------------------------------------------*/ -#define softfloat_shortShiftLeft160M( aPtr, dist, zPtr ) softfloat_shortShiftLeftM( 5, aPtr, dist, zPtr ) -#endif - -#ifndef softfloat_shiftLeftM -/*---------------------------------------------------------------------------- -| Shifts the N-bit unsigned integer pointed to by 'aPtr' left by the number -| of bits given in 'dist', where N = 'size_words' * 32. The value of 'dist' -| must not be zero. Any nonzero bits shifted off are lost. The shifted -| N-bit result is stored at the location pointed to by 'zPtr'. Each of 'aPtr' -| and 'zPtr' points to a 'size_words'-long array of 32-bit elements that -| concatenate in the platform's normal endian order to form an N-bit integer. -| The value of 'dist' can be arbitrarily large. In particular, if 'dist' is -| greater than N, the stored result will be 0. -*----------------------------------------------------------------------------*/ -void - softfloat_shiftLeftM( - uint_fast8_t size_words, - const uint32_t *aPtr, - uint32_t dist, - uint32_t *zPtr - ); -#endif - -#ifndef softfloat_shiftLeft96M -/*---------------------------------------------------------------------------- -| This function or macro is the same as 'softfloat_shiftLeftM' with -| 'size_words' = 3 (N = 96). -*----------------------------------------------------------------------------*/ -#define softfloat_shiftLeft96M( aPtr, dist, zPtr ) softfloat_shiftLeftM( 3, aPtr, dist, zPtr ) -#endif - -#ifndef softfloat_shiftLeft128M -/*---------------------------------------------------------------------------- -| This function or macro is the same as 'softfloat_shiftLeftM' with -| 'size_words' = 4 (N = 128). -*----------------------------------------------------------------------------*/ -#define softfloat_shiftLeft128M( aPtr, dist, zPtr ) softfloat_shiftLeftM( 4, aPtr, dist, zPtr ) -#endif - -#ifndef softfloat_shiftLeft160M -/*---------------------------------------------------------------------------- -| This function or macro is the same as 'softfloat_shiftLeftM' with -| 'size_words' = 5 (N = 160). -*----------------------------------------------------------------------------*/ -#define softfloat_shiftLeft160M( aPtr, dist, zPtr ) softfloat_shiftLeftM( 5, aPtr, dist, zPtr ) -#endif - -#ifndef softfloat_shortShiftRightM -/*---------------------------------------------------------------------------- -| Shifts the N-bit unsigned integer pointed to by 'aPtr' right by the number -| of bits given in 'dist', where N = 'size_words' * 32. The value of 'dist' -| must be in the range 1 to 31. Any nonzero bits shifted off are lost. The -| shifted N-bit result is stored at the location pointed to by 'zPtr'. Each -| of 'aPtr' and 'zPtr' points to a 'size_words'-long array of 32-bit elements -| that concatenate in the platform's normal endian order to form an N-bit -| integer. -*----------------------------------------------------------------------------*/ -void - softfloat_shortShiftRightM( - uint_fast8_t size_words, - const uint32_t *aPtr, - uint_fast8_t dist, - uint32_t *zPtr - ); -#endif - -#ifndef softfloat_shortShiftRight128M -/*---------------------------------------------------------------------------- -| This function or macro is the same as 'softfloat_shortShiftRightM' with -| 'size_words' = 4 (N = 128). -*----------------------------------------------------------------------------*/ -#define softfloat_shortShiftRight128M( aPtr, dist, zPtr ) softfloat_shortShiftRightM( 4, aPtr, dist, zPtr ) -#endif - -#ifndef softfloat_shortShiftRight160M -/*---------------------------------------------------------------------------- -| This function or macro is the same as 'softfloat_shortShiftRightM' with -| 'size_words' = 5 (N = 160). -*----------------------------------------------------------------------------*/ -#define softfloat_shortShiftRight160M( aPtr, dist, zPtr ) softfloat_shortShiftRightM( 5, aPtr, dist, zPtr ) -#endif - -#ifndef softfloat_shortShiftRightJamM -/*---------------------------------------------------------------------------- -| Shifts the N-bit unsigned integer pointed to by 'aPtr' right by the number -| of bits given in 'dist', where N = 'size_words' * 32. The value of 'dist' -| must be in the range 1 to 31. If any nonzero bits are shifted off, they are -| "jammed" into the least-significant bit of the shifted value by setting the -| least-significant bit to 1. This shifted-and-jammed N-bit result is stored -| at the location pointed to by 'zPtr'. Each of 'aPtr' and 'zPtr' points -| to a 'size_words'-long array of 32-bit elements that concatenate in the -| platform's normal endian order to form an N-bit integer. -*----------------------------------------------------------------------------*/ -void - softfloat_shortShiftRightJamM( - uint_fast8_t, const uint32_t *, uint_fast8_t, uint32_t * ); -#endif - -#ifndef softfloat_shortShiftRightJam160M -/*---------------------------------------------------------------------------- -| This function or macro is the same as 'softfloat_shortShiftRightJamM' with -| 'size_words' = 5 (N = 160). -*----------------------------------------------------------------------------*/ -#define softfloat_shortShiftRightJam160M( aPtr, dist, zPtr ) softfloat_shortShiftRightJamM( 5, aPtr, dist, zPtr ) -#endif - -#ifndef softfloat_shiftRightM -/*---------------------------------------------------------------------------- -| Shifts the N-bit unsigned integer pointed to by 'aPtr' right by the number -| of bits given in 'dist', where N = 'size_words' * 32. The value of 'dist' -| must not be zero. Any nonzero bits shifted off are lost. The shifted -| N-bit result is stored at the location pointed to by 'zPtr'. Each of 'aPtr' -| and 'zPtr' points to a 'size_words'-long array of 32-bit elements that -| concatenate in the platform's normal endian order to form an N-bit integer. -| The value of 'dist' can be arbitrarily large. In particular, if 'dist' is -| greater than N, the stored result will be 0. -*----------------------------------------------------------------------------*/ -void - softfloat_shiftRightM( - uint_fast8_t size_words, - const uint32_t *aPtr, - uint32_t dist, - uint32_t *zPtr - ); -#endif - -#ifndef softfloat_shiftRight96M -/*---------------------------------------------------------------------------- -| This function or macro is the same as 'softfloat_shiftRightM' with -| 'size_words' = 3 (N = 96). -*----------------------------------------------------------------------------*/ -#define softfloat_shiftRight96M( aPtr, dist, zPtr ) softfloat_shiftRightM( 3, aPtr, dist, zPtr ) -#endif - -#ifndef softfloat_shiftRightJamM -/*---------------------------------------------------------------------------- -| Shifts the N-bit unsigned integer pointed to by 'aPtr' right by the number -| of bits given in 'dist', where N = 'size_words' * 32. The value of 'dist' -| must not be zero. If any nonzero bits are shifted off, they are "jammed" -| into the least-significant bit of the shifted value by setting the least- -| significant bit to 1. This shifted-and-jammed N-bit result is stored -| at the location pointed to by 'zPtr'. Each of 'aPtr' and 'zPtr' points -| to a 'size_words'-long array of 32-bit elements that concatenate in the -| platform's normal endian order to form an N-bit integer. -| The value of 'dist' can be arbitrarily large. In particular, if 'dist' -| is greater than N, the stored result will be either 0 or 1, depending on -| whether the original N bits are all zeros. -*----------------------------------------------------------------------------*/ -void - softfloat_shiftRightJamM( - uint_fast8_t size_words, - const uint32_t *aPtr, - uint32_t dist, - uint32_t *zPtr - ); -#endif - -#ifndef softfloat_shiftRightJam96M -/*---------------------------------------------------------------------------- -| This function or macro is the same as 'softfloat_shiftRightJamM' with -| 'size_words' = 3 (N = 96). -*----------------------------------------------------------------------------*/ -#define softfloat_shiftRightJam96M( aPtr, dist, zPtr ) softfloat_shiftRightJamM( 3, aPtr, dist, zPtr ) -#endif - -#ifndef softfloat_shiftRightJam128M -/*---------------------------------------------------------------------------- -| This function or macro is the same as 'softfloat_shiftRightJamM' with -| 'size_words' = 4 (N = 128). -*----------------------------------------------------------------------------*/ -#define softfloat_shiftRightJam128M( aPtr, dist, zPtr ) softfloat_shiftRightJamM( 4, aPtr, dist, zPtr ) -#endif - -#ifndef softfloat_shiftRightJam160M -/*---------------------------------------------------------------------------- -| This function or macro is the same as 'softfloat_shiftRightJamM' with -| 'size_words' = 5 (N = 160). -*----------------------------------------------------------------------------*/ -#define softfloat_shiftRightJam160M( aPtr, dist, zPtr ) softfloat_shiftRightJamM( 5, aPtr, dist, zPtr ) -#endif - -#ifndef softfloat_addM -/*---------------------------------------------------------------------------- -| Adds the two N-bit integers pointed to by 'aPtr' and 'bPtr', where N = -| 'size_words' * 32. The addition is modulo 2^N, so any carry out is lost. -| The N-bit sum is stored at the location pointed to by 'zPtr'. Each of -| 'aPtr', 'bPtr', and 'zPtr' points to a 'size_words'-long array of 32-bit -| elements that concatenate in the platform's normal endian order to form an -| N-bit integer. -*----------------------------------------------------------------------------*/ -void - softfloat_addM( - uint_fast8_t size_words, - const uint32_t *aPtr, - const uint32_t *bPtr, - uint32_t *zPtr - ); -#endif - -#ifndef softfloat_add96M -/*---------------------------------------------------------------------------- -| This function or macro is the same as 'softfloat_addM' with 'size_words' -| = 3 (N = 96). -*----------------------------------------------------------------------------*/ -#define softfloat_add96M( aPtr, bPtr, zPtr ) softfloat_addM( 3, aPtr, bPtr, zPtr ) -#endif - -#ifndef softfloat_add128M -/*---------------------------------------------------------------------------- -| This function or macro is the same as 'softfloat_addM' with 'size_words' -| = 4 (N = 128). -*----------------------------------------------------------------------------*/ -#define softfloat_add128M( aPtr, bPtr, zPtr ) softfloat_addM( 4, aPtr, bPtr, zPtr ) -#endif - -#ifndef softfloat_add160M -/*---------------------------------------------------------------------------- -| This function or macro is the same as 'softfloat_addM' with 'size_words' -| = 5 (N = 160). -*----------------------------------------------------------------------------*/ -#define softfloat_add160M( aPtr, bPtr, zPtr ) softfloat_addM( 5, aPtr, bPtr, zPtr ) -#endif - -#ifndef softfloat_addCarryM -/*---------------------------------------------------------------------------- -| Adds the two N-bit unsigned integers pointed to by 'aPtr' and 'bPtr', where -| N = 'size_words' * 32, plus 'carry', which must be either 0 or 1. The N-bit -| sum (modulo 2^N) is stored at the location pointed to by 'zPtr', and any -| carry out is returned as the result. Each of 'aPtr', 'bPtr', and 'zPtr' -| points to a 'size_words'-long array of 32-bit elements that concatenate in -| the platform's normal endian order to form an N-bit integer. -*----------------------------------------------------------------------------*/ -uint_fast8_t - softfloat_addCarryM( - uint_fast8_t size_words, - const uint32_t *aPtr, - const uint32_t *bPtr, - uint_fast8_t carry, - uint32_t *zPtr - ); -#endif - -#ifndef softfloat_addComplCarryM -/*---------------------------------------------------------------------------- -| This function or macro is the same as 'softfloat_addCarryM', except that -| the value of the unsigned integer pointed to by 'bPtr' is bit-wise completed -| before the addition. -*----------------------------------------------------------------------------*/ -uint_fast8_t - softfloat_addComplCarryM( - uint_fast8_t size_words, - const uint32_t *aPtr, - const uint32_t *bPtr, - uint_fast8_t carry, - uint32_t *zPtr - ); -#endif - -#ifndef softfloat_addComplCarry96M -/*---------------------------------------------------------------------------- -| This function or macro is the same as 'softfloat_addComplCarryM' with -| 'size_words' = 3 (N = 96). -*----------------------------------------------------------------------------*/ -#define softfloat_addComplCarry96M( aPtr, bPtr, carry, zPtr ) softfloat_addComplCarryM( 3, aPtr, bPtr, carry, zPtr ) -#endif - -#ifndef softfloat_negXM -/*---------------------------------------------------------------------------- -| Replaces the N-bit unsigned integer pointed to by 'zPtr' by the -| 2s-complement of itself, where N = 'size_words' * 32. Argument 'zPtr' -| points to a 'size_words'-long array of 32-bit elements that concatenate in -| the platform's normal endian order to form an N-bit integer. -*----------------------------------------------------------------------------*/ -void softfloat_negXM( uint_fast8_t size_words, uint32_t *zPtr ); -#endif - -#ifndef softfloat_negX96M -/*---------------------------------------------------------------------------- -| This function or macro is the same as 'softfloat_negXM' with 'size_words' -| = 3 (N = 96). -*----------------------------------------------------------------------------*/ -#define softfloat_negX96M( zPtr ) softfloat_negXM( 3, zPtr ) -#endif - -#ifndef softfloat_negX128M -/*---------------------------------------------------------------------------- -| This function or macro is the same as 'softfloat_negXM' with 'size_words' -| = 4 (N = 128). -*----------------------------------------------------------------------------*/ -#define softfloat_negX128M( zPtr ) softfloat_negXM( 4, zPtr ) -#endif - -#ifndef softfloat_negX160M -/*---------------------------------------------------------------------------- -| This function or macro is the same as 'softfloat_negXM' with 'size_words' -| = 5 (N = 160). -*----------------------------------------------------------------------------*/ -#define softfloat_negX160M( zPtr ) softfloat_negXM( 5, zPtr ) -#endif - -#ifndef softfloat_negX256M -/*---------------------------------------------------------------------------- -| This function or macro is the same as 'softfloat_negXM' with 'size_words' -| = 8 (N = 256). -*----------------------------------------------------------------------------*/ -#define softfloat_negX256M( zPtr ) softfloat_negXM( 8, zPtr ) -#endif - -#ifndef softfloat_sub1XM -/*---------------------------------------------------------------------------- -| Subtracts 1 from the N-bit integer pointed to by 'zPtr', where N = -| 'size_words' * 32. The subtraction is modulo 2^N, so any borrow out (carry -| out) is lost. Argument 'zPtr' points to a 'size_words'-long array of 32-bit -| elements that concatenate in the platform's normal endian order to form an -| N-bit integer. -*----------------------------------------------------------------------------*/ -void softfloat_sub1XM( uint_fast8_t size_words, uint32_t *zPtr ); -#endif - -#ifndef softfloat_sub1X96M -/*---------------------------------------------------------------------------- -| This function or macro is the same as 'softfloat_sub1XM' with 'size_words' -| = 3 (N = 96). -*----------------------------------------------------------------------------*/ -#define softfloat_sub1X96M( zPtr ) softfloat_sub1XM( 3, zPtr ) -#endif - -#ifndef softfloat_sub1X160M -/*---------------------------------------------------------------------------- -| This function or macro is the same as 'softfloat_sub1XM' with 'size_words' -| = 5 (N = 160). -*----------------------------------------------------------------------------*/ -#define softfloat_sub1X160M( zPtr ) softfloat_sub1XM( 5, zPtr ) -#endif - -#ifndef softfloat_subM -/*---------------------------------------------------------------------------- -| Subtracts the two N-bit integers pointed to by 'aPtr' and 'bPtr', where N = -| 'size_words' * 32. The subtraction is modulo 2^N, so any borrow out (carry -| out) is lost. The N-bit difference is stored at the location pointed to by -| 'zPtr'. Each of 'aPtr', 'bPtr', and 'zPtr' points to a 'size_words'-long -| array of 32-bit elements that concatenate in the platform's normal endian -| order to form an N-bit integer. -*----------------------------------------------------------------------------*/ -void - softfloat_subM( - uint_fast8_t size_words, - const uint32_t *aPtr, - const uint32_t *bPtr, - uint32_t *zPtr - ); -#endif - -#ifndef softfloat_sub96M -/*---------------------------------------------------------------------------- -| This function or macro is the same as 'softfloat_subM' with 'size_words' -| = 3 (N = 96). -*----------------------------------------------------------------------------*/ -#define softfloat_sub96M( aPtr, bPtr, zPtr ) softfloat_subM( 3, aPtr, bPtr, zPtr ) -#endif - -#ifndef softfloat_sub128M -/*---------------------------------------------------------------------------- -| This function or macro is the same as 'softfloat_subM' with 'size_words' -| = 4 (N = 128). -*----------------------------------------------------------------------------*/ -#define softfloat_sub128M( aPtr, bPtr, zPtr ) softfloat_subM( 4, aPtr, bPtr, zPtr ) -#endif - -#ifndef softfloat_sub160M -/*---------------------------------------------------------------------------- -| This function or macro is the same as 'softfloat_subM' with 'size_words' -| = 5 (N = 160). -*----------------------------------------------------------------------------*/ -#define softfloat_sub160M( aPtr, bPtr, zPtr ) softfloat_subM( 5, aPtr, bPtr, zPtr ) -#endif - -#ifndef softfloat_mul64To128M -/*---------------------------------------------------------------------------- -| Multiplies 'a' and 'b' and stores the 128-bit product at the location -| pointed to by 'zPtr'. Argument 'zPtr' points to an array of four 32-bit -| elements that concatenate in the platform's normal endian order to form a -| 128-bit integer. -*----------------------------------------------------------------------------*/ -void softfloat_mul64To128M( uint64_t a, uint64_t b, uint32_t *zPtr ); -#endif - -#ifndef softfloat_mul128MTo256M -/*---------------------------------------------------------------------------- -| Multiplies the two 128-bit unsigned integers pointed to by 'aPtr' and -| 'bPtr', and stores the 256-bit product at the location pointed to by 'zPtr'. -| Each of 'aPtr' and 'bPtr' points to an array of four 32-bit elements that -| concatenate in the platform's normal endian order to form a 128-bit integer. -| Argument 'zPtr' points to an array of eight 32-bit elements that concatenate -| to form a 256-bit integer. -*----------------------------------------------------------------------------*/ -void - softfloat_mul128MTo256M( - const uint32_t *aPtr, const uint32_t *bPtr, uint32_t *zPtr ); -#endif - -#ifndef softfloat_remStepMBy32 -/*---------------------------------------------------------------------------- -| Performs a "remainder reduction step" as follows: Arguments 'remPtr' and -| 'bPtr' both point to N-bit unsigned integers, where N = 'size_words' * 32. -| Defining R and B as the values of those integers, the expression (R<<'dist') -| - B * q is computed modulo 2^N, and the N-bit result is stored at the -| location pointed to by 'zPtr'. Each of 'remPtr', 'bPtr', and 'zPtr' points -| to a 'size_words'-long array of 32-bit elements that concatenate in the -| platform's normal endian order to form an N-bit integer. -*----------------------------------------------------------------------------*/ -void - softfloat_remStepMBy32( - uint_fast8_t size_words, - const uint32_t *remPtr, - uint_fast8_t dist, - const uint32_t *bPtr, - uint32_t q, - uint32_t *zPtr - ); -#endif - -#ifndef softfloat_remStep96MBy32 -/*---------------------------------------------------------------------------- -| This function or macro is the same as 'softfloat_remStepMBy32' with -| 'size_words' = 3 (N = 96). -*----------------------------------------------------------------------------*/ -#define softfloat_remStep96MBy32( remPtr, dist, bPtr, q, zPtr ) softfloat_remStepMBy32( 3, remPtr, dist, bPtr, q, zPtr ) -#endif - -#ifndef softfloat_remStep128MBy32 -/*---------------------------------------------------------------------------- -| This function or macro is the same as 'softfloat_remStepMBy32' with -| 'size_words' = 4 (N = 128). -*----------------------------------------------------------------------------*/ -#define softfloat_remStep128MBy32( remPtr, dist, bPtr, q, zPtr ) softfloat_remStepMBy32( 4, remPtr, dist, bPtr, q, zPtr ) -#endif - -#ifndef softfloat_remStep160MBy32 -/*---------------------------------------------------------------------------- -| This function or macro is the same as 'softfloat_remStepMBy32' with -| 'size_words' = 5 (N = 160). -*----------------------------------------------------------------------------*/ -#define softfloat_remStep160MBy32( remPtr, dist, bPtr, q, zPtr ) softfloat_remStepMBy32( 5, remPtr, dist, bPtr, q, zPtr ) -#endif - -#endif - -#endif - diff --git a/outside/softfloat-3/source/include/softfloat.h b/outside/softfloat-3/source/include/softfloat.h deleted file mode 100644 index 3f789fea0..000000000 --- a/outside/softfloat-3/source/include/softfloat.h +++ /dev/null @@ -1,372 +0,0 @@ - -/*============================================================================ - -This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the -University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - - -/*============================================================================ -| Note: If SoftFloat is made available as a general library for programs to -| use, it is strongly recommended that a platform-specific version of this -| header, "softfloat.h", be created that folds in "softfloat_types.h" and that -| eliminates all dependencies on compile-time macros. -*============================================================================*/ - - -#ifndef softfloat_h -#define softfloat_h 1 - -#include -#include -#include "softfloat_types.h" - -#ifndef THREAD_LOCAL -#define THREAD_LOCAL -#endif - -/*---------------------------------------------------------------------------- -| Software floating-point underflow tininess-detection mode. -*----------------------------------------------------------------------------*/ -extern THREAD_LOCAL uint_fast8_t softfloat_detectTininess; -enum { - softfloat_tininess_beforeRounding = 0, - softfloat_tininess_afterRounding = 1 -}; - -/*---------------------------------------------------------------------------- -| Software floating-point rounding mode. (Mode "odd" is supported only if -| SoftFloat is compiled with macro 'SOFTFLOAT_ROUND_ODD' defined.) -*----------------------------------------------------------------------------*/ -extern THREAD_LOCAL uint_fast8_t softfloat_roundingMode; -enum { - softfloat_round_near_even = 0, - softfloat_round_minMag = 1, - softfloat_round_min = 2, - softfloat_round_max = 3, - softfloat_round_near_maxMag = 4, - softfloat_round_odd = 5 -}; - -/*---------------------------------------------------------------------------- -| Software floating-point exception flags. -*----------------------------------------------------------------------------*/ -extern THREAD_LOCAL uint_fast8_t softfloat_exceptionFlags; -enum { - softfloat_flag_inexact = 1, - softfloat_flag_underflow = 2, - softfloat_flag_overflow = 4, - softfloat_flag_infinite = 8, - softfloat_flag_invalid = 16 -}; - -/*---------------------------------------------------------------------------- -| Routine to raise any or all of the software floating-point exception flags. -*----------------------------------------------------------------------------*/ -void softfloat_raiseFlags( uint_fast8_t ); - -/*---------------------------------------------------------------------------- -| Integer-to-floating-point conversion routines. -*----------------------------------------------------------------------------*/ -float16_t ui32_to_f16( uint32_t ); -float32_t ui32_to_f32( uint32_t ); -float64_t ui32_to_f64( uint32_t ); -#ifdef SOFTFLOAT_FAST_INT64 -extFloat80_t ui32_to_extF80( uint32_t ); -float128_t ui32_to_f128( uint32_t ); -#endif -void ui32_to_extF80M( uint32_t, extFloat80_t * ); -void ui32_to_f128M( uint32_t, float128_t * ); -float16_t ui64_to_f16( uint64_t ); -float32_t ui64_to_f32( uint64_t ); -float64_t ui64_to_f64( uint64_t ); -#ifdef SOFTFLOAT_FAST_INT64 -extFloat80_t ui64_to_extF80( uint64_t ); -float128_t ui64_to_f128( uint64_t ); -#endif -void ui64_to_extF80M( uint64_t, extFloat80_t * ); -void ui64_to_f128M( uint64_t, float128_t * ); -float16_t i32_to_f16( int32_t ); -float32_t i32_to_f32( int32_t ); -float64_t i32_to_f64( int32_t ); -#ifdef SOFTFLOAT_FAST_INT64 -extFloat80_t i32_to_extF80( int32_t ); -float128_t i32_to_f128( int32_t ); -#endif -void i32_to_extF80M( int32_t, extFloat80_t * ); -void i32_to_f128M( int32_t, float128_t * ); -float16_t i64_to_f16( int64_t ); -float32_t i64_to_f32( int64_t ); -float64_t i64_to_f64( int64_t ); -#ifdef SOFTFLOAT_FAST_INT64 -extFloat80_t i64_to_extF80( int64_t ); -float128_t i64_to_f128( int64_t ); -#endif -void i64_to_extF80M( int64_t, extFloat80_t * ); -void i64_to_f128M( int64_t, float128_t * ); - -/*---------------------------------------------------------------------------- -| 16-bit (half-precision) floating-point operations. -*----------------------------------------------------------------------------*/ -uint_fast32_t f16_to_ui32( float16_t, uint_fast8_t, bool ); -uint_fast64_t f16_to_ui64( float16_t, uint_fast8_t, bool ); -int_fast32_t f16_to_i32( float16_t, uint_fast8_t, bool ); -int_fast64_t f16_to_i64( float16_t, uint_fast8_t, bool ); -uint_fast32_t f16_to_ui32_r_minMag( float16_t, bool ); -uint_fast64_t f16_to_ui64_r_minMag( float16_t, bool ); -int_fast32_t f16_to_i32_r_minMag( float16_t, bool ); -int_fast64_t f16_to_i64_r_minMag( float16_t, bool ); -float32_t f16_to_f32( float16_t ); -float64_t f16_to_f64( float16_t ); -#ifdef SOFTFLOAT_FAST_INT64 -extFloat80_t f16_to_extF80( float16_t ); -float128_t f16_to_f128( float16_t ); -#endif -void f16_to_extF80M( float16_t, extFloat80_t * ); -void f16_to_f128M( float16_t, float128_t * ); -float16_t f16_roundToInt( float16_t, uint_fast8_t, bool ); -float16_t f16_add( float16_t, float16_t ); -float16_t f16_sub( float16_t, float16_t ); -float16_t f16_mul( float16_t, float16_t ); -float16_t f16_mulAdd( float16_t, float16_t, float16_t ); -float16_t f16_div( float16_t, float16_t ); -float16_t f16_rem( float16_t, float16_t ); -float16_t f16_sqrt( float16_t ); -bool f16_eq( float16_t, float16_t ); -bool f16_le( float16_t, float16_t ); -bool f16_lt( float16_t, float16_t ); -bool f16_eq_signaling( float16_t, float16_t ); -bool f16_le_quiet( float16_t, float16_t ); -bool f16_lt_quiet( float16_t, float16_t ); -bool f16_isSignalingNaN( float16_t ); - -/*---------------------------------------------------------------------------- -| 32-bit (single-precision) floating-point operations. -*----------------------------------------------------------------------------*/ -uint_fast32_t f32_to_ui32( float32_t, uint_fast8_t, bool ); -uint_fast64_t f32_to_ui64( float32_t, uint_fast8_t, bool ); -int_fast32_t f32_to_i32( float32_t, uint_fast8_t, bool ); -int_fast64_t f32_to_i64( float32_t, uint_fast8_t, bool ); -uint_fast32_t f32_to_ui32_r_minMag( float32_t, bool ); -uint_fast64_t f32_to_ui64_r_minMag( float32_t, bool ); -int_fast32_t f32_to_i32_r_minMag( float32_t, bool ); -int_fast64_t f32_to_i64_r_minMag( float32_t, bool ); -float16_t f32_to_f16( float32_t ); -float64_t f32_to_f64( float32_t ); -#ifdef SOFTFLOAT_FAST_INT64 -extFloat80_t f32_to_extF80( float32_t ); -float128_t f32_to_f128( float32_t ); -#endif -void f32_to_extF80M( float32_t, extFloat80_t * ); -void f32_to_f128M( float32_t, float128_t * ); -float32_t f32_roundToInt( float32_t, uint_fast8_t, bool ); -float32_t f32_add( float32_t, float32_t ); -float32_t f32_sub( float32_t, float32_t ); -float32_t f32_mul( float32_t, float32_t ); -float32_t f32_mulAdd( float32_t, float32_t, float32_t ); -float32_t f32_div( float32_t, float32_t ); -float32_t f32_rem( float32_t, float32_t ); -float32_t f32_sqrt( float32_t ); -bool f32_eq( float32_t, float32_t ); -bool f32_le( float32_t, float32_t ); -bool f32_lt( float32_t, float32_t ); -bool f32_eq_signaling( float32_t, float32_t ); -bool f32_le_quiet( float32_t, float32_t ); -bool f32_lt_quiet( float32_t, float32_t ); -bool f32_isSignalingNaN( float32_t ); - -/*---------------------------------------------------------------------------- -| 64-bit (double-precision) floating-point operations. -*----------------------------------------------------------------------------*/ -uint_fast32_t f64_to_ui32( float64_t, uint_fast8_t, bool ); -uint_fast64_t f64_to_ui64( float64_t, uint_fast8_t, bool ); -int_fast32_t f64_to_i32( float64_t, uint_fast8_t, bool ); -int_fast64_t f64_to_i64( float64_t, uint_fast8_t, bool ); -uint_fast32_t f64_to_ui32_r_minMag( float64_t, bool ); -uint_fast64_t f64_to_ui64_r_minMag( float64_t, bool ); -int_fast32_t f64_to_i32_r_minMag( float64_t, bool ); -int_fast64_t f64_to_i64_r_minMag( float64_t, bool ); -float16_t f64_to_f16( float64_t ); -float32_t f64_to_f32( float64_t ); -#ifdef SOFTFLOAT_FAST_INT64 -extFloat80_t f64_to_extF80( float64_t ); -float128_t f64_to_f128( float64_t ); -#endif -void f64_to_extF80M( float64_t, extFloat80_t * ); -void f64_to_f128M( float64_t, float128_t * ); -float64_t f64_roundToInt( float64_t, uint_fast8_t, bool ); -float64_t f64_add( float64_t, float64_t ); -float64_t f64_sub( float64_t, float64_t ); -float64_t f64_mul( float64_t, float64_t ); -float64_t f64_mulAdd( float64_t, float64_t, float64_t ); -float64_t f64_div( float64_t, float64_t ); -float64_t f64_rem( float64_t, float64_t ); -float64_t f64_sqrt( float64_t ); -bool f64_eq( float64_t, float64_t ); -bool f64_le( float64_t, float64_t ); -bool f64_lt( float64_t, float64_t ); -bool f64_eq_signaling( float64_t, float64_t ); -bool f64_le_quiet( float64_t, float64_t ); -bool f64_lt_quiet( float64_t, float64_t ); -bool f64_isSignalingNaN( float64_t ); - -/*---------------------------------------------------------------------------- -| Rounding precision for 80-bit extended double-precision floating-point. -| Valid values are 32, 64, and 80. -*----------------------------------------------------------------------------*/ -extern THREAD_LOCAL uint_fast8_t extF80_roundingPrecision; - -/*---------------------------------------------------------------------------- -| 80-bit extended double-precision floating-point operations. -*----------------------------------------------------------------------------*/ -#ifdef SOFTFLOAT_FAST_INT64 -uint_fast32_t extF80_to_ui32( extFloat80_t, uint_fast8_t, bool ); -uint_fast64_t extF80_to_ui64( extFloat80_t, uint_fast8_t, bool ); -int_fast32_t extF80_to_i32( extFloat80_t, uint_fast8_t, bool ); -int_fast64_t extF80_to_i64( extFloat80_t, uint_fast8_t, bool ); -uint_fast32_t extF80_to_ui32_r_minMag( extFloat80_t, bool ); -uint_fast64_t extF80_to_ui64_r_minMag( extFloat80_t, bool ); -int_fast32_t extF80_to_i32_r_minMag( extFloat80_t, bool ); -int_fast64_t extF80_to_i64_r_minMag( extFloat80_t, bool ); -float16_t extF80_to_f16( extFloat80_t ); -float32_t extF80_to_f32( extFloat80_t ); -float64_t extF80_to_f64( extFloat80_t ); -float128_t extF80_to_f128( extFloat80_t ); -extFloat80_t extF80_roundToInt( extFloat80_t, uint_fast8_t, bool ); -extFloat80_t extF80_add( extFloat80_t, extFloat80_t ); -extFloat80_t extF80_sub( extFloat80_t, extFloat80_t ); -extFloat80_t extF80_mul( extFloat80_t, extFloat80_t ); -extFloat80_t extF80_div( extFloat80_t, extFloat80_t ); -extFloat80_t extF80_rem( extFloat80_t, extFloat80_t ); -extFloat80_t extF80_sqrt( extFloat80_t ); -bool extF80_eq( extFloat80_t, extFloat80_t ); -bool extF80_le( extFloat80_t, extFloat80_t ); -bool extF80_lt( extFloat80_t, extFloat80_t ); -bool extF80_eq_signaling( extFloat80_t, extFloat80_t ); -bool extF80_le_quiet( extFloat80_t, extFloat80_t ); -bool extF80_lt_quiet( extFloat80_t, extFloat80_t ); -bool extF80_isSignalingNaN( extFloat80_t ); -#endif -uint_fast32_t extF80M_to_ui32( const extFloat80_t *, uint_fast8_t, bool ); -uint_fast64_t extF80M_to_ui64( const extFloat80_t *, uint_fast8_t, bool ); -int_fast32_t extF80M_to_i32( const extFloat80_t *, uint_fast8_t, bool ); -int_fast64_t extF80M_to_i64( const extFloat80_t *, uint_fast8_t, bool ); -uint_fast32_t extF80M_to_ui32_r_minMag( const extFloat80_t *, bool ); -uint_fast64_t extF80M_to_ui64_r_minMag( const extFloat80_t *, bool ); -int_fast32_t extF80M_to_i32_r_minMag( const extFloat80_t *, bool ); -int_fast64_t extF80M_to_i64_r_minMag( const extFloat80_t *, bool ); -float16_t extF80M_to_f16( const extFloat80_t * ); -float32_t extF80M_to_f32( const extFloat80_t * ); -float64_t extF80M_to_f64( const extFloat80_t * ); -void extF80M_to_f128M( const extFloat80_t *, float128_t * ); -void - extF80M_roundToInt( - const extFloat80_t *, uint_fast8_t, bool, extFloat80_t * ); -void extF80M_add( const extFloat80_t *, const extFloat80_t *, extFloat80_t * ); -void extF80M_sub( const extFloat80_t *, const extFloat80_t *, extFloat80_t * ); -void extF80M_mul( const extFloat80_t *, const extFloat80_t *, extFloat80_t * ); -void extF80M_div( const extFloat80_t *, const extFloat80_t *, extFloat80_t * ); -void extF80M_rem( const extFloat80_t *, const extFloat80_t *, extFloat80_t * ); -void extF80M_sqrt( const extFloat80_t *, extFloat80_t * ); -bool extF80M_eq( const extFloat80_t *, const extFloat80_t * ); -bool extF80M_le( const extFloat80_t *, const extFloat80_t * ); -bool extF80M_lt( const extFloat80_t *, const extFloat80_t * ); -bool extF80M_eq_signaling( const extFloat80_t *, const extFloat80_t * ); -bool extF80M_le_quiet( const extFloat80_t *, const extFloat80_t * ); -bool extF80M_lt_quiet( const extFloat80_t *, const extFloat80_t * ); -bool extF80M_isSignalingNaN( const extFloat80_t * ); - -/*---------------------------------------------------------------------------- -| 128-bit (quadruple-precision) floating-point operations. -*----------------------------------------------------------------------------*/ -#ifdef SOFTFLOAT_FAST_INT64 -uint_fast32_t f128_to_ui32( float128_t, uint_fast8_t, bool ); -uint_fast64_t f128_to_ui64( float128_t, uint_fast8_t, bool ); -int_fast32_t f128_to_i32( float128_t, uint_fast8_t, bool ); -int_fast64_t f128_to_i64( float128_t, uint_fast8_t, bool ); -uint_fast32_t f128_to_ui32_r_minMag( float128_t, bool ); -uint_fast64_t f128_to_ui64_r_minMag( float128_t, bool ); -int_fast32_t f128_to_i32_r_minMag( float128_t, bool ); -int_fast64_t f128_to_i64_r_minMag( float128_t, bool ); -float16_t f128_to_f16( float128_t ); -float32_t f128_to_f32( float128_t ); -float64_t f128_to_f64( float128_t ); -extFloat80_t f128_to_extF80( float128_t ); -float128_t f128_roundToInt( float128_t, uint_fast8_t, bool ); -float128_t f128_add( float128_t, float128_t ); -float128_t f128_sub( float128_t, float128_t ); -float128_t f128_mul( float128_t, float128_t ); -float128_t f128_mulAdd( float128_t, float128_t, float128_t ); -float128_t f128_div( float128_t, float128_t ); -float128_t f128_rem( float128_t, float128_t ); -float128_t f128_sqrt( float128_t ); -bool f128_eq( float128_t, float128_t ); -bool f128_le( float128_t, float128_t ); -bool f128_lt( float128_t, float128_t ); -bool f128_eq_signaling( float128_t, float128_t ); -bool f128_le_quiet( float128_t, float128_t ); -bool f128_lt_quiet( float128_t, float128_t ); -bool f128_isSignalingNaN( float128_t ); -#endif -uint_fast32_t f128M_to_ui32( const float128_t *, uint_fast8_t, bool ); -uint_fast64_t f128M_to_ui64( const float128_t *, uint_fast8_t, bool ); -int_fast32_t f128M_to_i32( const float128_t *, uint_fast8_t, bool ); -int_fast64_t f128M_to_i64( const float128_t *, uint_fast8_t, bool ); -uint_fast32_t f128M_to_ui32_r_minMag( const float128_t *, bool ); -uint_fast64_t f128M_to_ui64_r_minMag( const float128_t *, bool ); -int_fast32_t f128M_to_i32_r_minMag( const float128_t *, bool ); -int_fast64_t f128M_to_i64_r_minMag( const float128_t *, bool ); -float16_t f128M_to_f16( const float128_t * ); -float32_t f128M_to_f32( const float128_t * ); -float64_t f128M_to_f64( const float128_t * ); -void f128M_to_extF80M( const float128_t *, extFloat80_t * ); -void f128M_roundToInt( const float128_t *, uint_fast8_t, bool, float128_t * ); -void f128M_add( const float128_t *, const float128_t *, float128_t * ); -void f128M_sub( const float128_t *, const float128_t *, float128_t * ); -void f128M_mul( const float128_t *, const float128_t *, float128_t * ); -void - f128M_mulAdd( - const float128_t *, const float128_t *, const float128_t *, float128_t * - ); -void f128M_div( const float128_t *, const float128_t *, float128_t * ); -void f128M_rem( const float128_t *, const float128_t *, float128_t * ); -void f128M_sqrt( const float128_t *, float128_t * ); -bool f128M_eq( const float128_t *, const float128_t * ); -bool f128M_le( const float128_t *, const float128_t * ); -bool f128M_lt( const float128_t *, const float128_t * ); -bool f128M_eq_signaling( const float128_t *, const float128_t * ); -bool f128M_le_quiet( const float128_t *, const float128_t * ); -bool f128M_lt_quiet( const float128_t *, const float128_t * ); -bool f128M_isSignalingNaN( const float128_t * ); - -#endif - diff --git a/outside/softfloat-3/source/include/softfloat_types.h b/outside/softfloat-3/source/include/softfloat_types.h deleted file mode 100644 index d7a33a4b9..000000000 --- a/outside/softfloat-3/source/include/softfloat_types.h +++ /dev/null @@ -1,81 +0,0 @@ - -/*============================================================================ - -This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#ifndef softfloat_types_h -#define softfloat_types_h 1 - -#include - -/*---------------------------------------------------------------------------- -| Types used to pass 16-bit, 32-bit, 64-bit, and 128-bit floating-point -| arguments and results to/from functions. These types must be exactly -| 16 bits, 32 bits, 64 bits, and 128 bits in size, respectively. Where a -| platform has "native" support for IEEE-Standard floating-point formats, -| the types below may, if desired, be defined as aliases for the native types -| (typically 'float' and 'double', and possibly 'long double'). -*----------------------------------------------------------------------------*/ -typedef struct { uint16_t v; } float16_t; -typedef struct { uint32_t v; } float32_t; -typedef struct { uint64_t v; } float64_t; -typedef struct { uint64_t v[2]; } float128_t; - -/*---------------------------------------------------------------------------- -| The format of an 80-bit extended floating-point number in memory. This -| structure must contain a 16-bit field named 'signExp' and a 64-bit field -| named 'signif'. -*----------------------------------------------------------------------------*/ -#ifdef LITTLEENDIAN -struct extFloat80M { uint64_t signif; uint16_t signExp; }; -#else -struct extFloat80M { uint16_t signExp; uint64_t signif; }; -#endif - -/*---------------------------------------------------------------------------- -| The type used to pass 80-bit extended floating-point arguments and -| results to/from functions. This type must have size identical to -| 'struct extFloat80M'. Type 'extFloat80_t' can be defined as an alias for -| 'struct extFloat80M'. Alternatively, if a platform has "native" support -| for IEEE-Standard 80-bit extended floating-point, it may be possible, -| if desired, to define 'extFloat80_t' as an alias for the native type -| (presumably either 'long double' or a nonstandard compiler-intrinsic type). -| In that case, the 'signif' and 'signExp' fields of 'struct extFloat80M' -| must align exactly with the locations in memory of the sign, exponent, and -| significand of the native type. -*----------------------------------------------------------------------------*/ -typedef struct extFloat80M extFloat80_t; - -#endif - diff --git a/outside/softfloat-3/source/s_add128.c b/outside/softfloat-3/source/s_add128.c deleted file mode 100644 index f2c03e84b..000000000 --- a/outside/softfloat-3/source/s_add128.c +++ /dev/null @@ -1,55 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "primitiveTypes.h" - -#ifndef softfloat_add128 - -struct uint128 - softfloat_add128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 ) -{ - struct uint128 z; - - z.v0 = a0 + b0; - z.v64 = a64 + b64 + (z.v0 < a0); - return z; - -} - -#endif - diff --git a/outside/softfloat-3/source/s_add256M.c b/outside/softfloat-3/source/s_add256M.c deleted file mode 100644 index 7092dcc71..000000000 --- a/outside/softfloat-3/source/s_add256M.c +++ /dev/null @@ -1,65 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "primitiveTypes.h" - -#ifndef softfloat_add256M - -void - softfloat_add256M( - const uint64_t *aPtr, const uint64_t *bPtr, uint64_t *zPtr ) -{ - unsigned int index; - uint_fast8_t carry; - uint64_t wordA, wordZ; - - index = indexWordLo( 4 ); - carry = 0; - for (;;) { - wordA = aPtr[index]; - wordZ = wordA + bPtr[index] + carry; - zPtr[index] = wordZ; - if ( index == indexWordHi( 4 ) ) break; - if ( wordZ != wordA ) carry = (wordZ < wordA); - index += wordIncr; - } - -} - -#endif - diff --git a/outside/softfloat-3/source/s_addCarryM.c b/outside/softfloat-3/source/s_addCarryM.c deleted file mode 100644 index e9e910961..000000000 --- a/outside/softfloat-3/source/s_addCarryM.c +++ /dev/null @@ -1,70 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "primitiveTypes.h" - -#ifndef softfloat_addCarryM - -uint_fast8_t - softfloat_addCarryM( - uint_fast8_t size_words, - const uint32_t *aPtr, - const uint32_t *bPtr, - uint_fast8_t carry, - uint32_t *zPtr - ) -{ - unsigned int index, lastIndex; - uint32_t wordA, wordZ; - - index = indexWordLo( size_words ); - lastIndex = indexWordHi( size_words ); - for (;;) { - wordA = aPtr[index]; - wordZ = wordA + bPtr[index] + carry; - zPtr[index] = wordZ; - if ( wordZ != wordA ) carry = (wordZ < wordA); - if ( index == lastIndex ) break; - index += wordIncr; - } - return carry; - -} - -#endif - diff --git a/outside/softfloat-3/source/s_addComplCarryM.c b/outside/softfloat-3/source/s_addComplCarryM.c deleted file mode 100644 index 6b463af0e..000000000 --- a/outside/softfloat-3/source/s_addComplCarryM.c +++ /dev/null @@ -1,70 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "primitiveTypes.h" - -#ifndef softfloat_addComplCarryM - -uint_fast8_t - softfloat_addComplCarryM( - uint_fast8_t size_words, - const uint32_t *aPtr, - const uint32_t *bPtr, - uint_fast8_t carry, - uint32_t *zPtr - ) -{ - unsigned int index, lastIndex; - uint32_t wordA, wordZ; - - index = indexWordLo( size_words ); - lastIndex = indexWordHi( size_words ); - for (;;) { - wordA = aPtr[index]; - wordZ = wordA + ~bPtr[index] + carry; - zPtr[index] = wordZ; - if ( wordZ != wordA ) carry = (wordZ < wordA); - if ( index == lastIndex ) break; - index += wordIncr; - } - return carry; - -} - -#endif - diff --git a/outside/softfloat-3/source/s_addExtF80M.c b/outside/softfloat-3/source/s_addExtF80M.c deleted file mode 100644 index fad627d04..000000000 --- a/outside/softfloat-3/source/s_addExtF80M.c +++ /dev/null @@ -1,186 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -void - softfloat_addExtF80M( - const struct extFloat80M *aSPtr, - const struct extFloat80M *bSPtr, - struct extFloat80M *zSPtr, - bool negateB - ) -{ - uint32_t uiA64; - int32_t expA; - uint32_t uiB64; - int32_t expB; - uint32_t uiZ64; - bool signZ, signB; - const struct extFloat80M *tempSPtr; - uint64_t sigZ, sigB; - void - (*roundPackRoutinePtr)( - bool, int32_t, uint32_t *, uint_fast8_t, struct extFloat80M * ); - int32_t expDiff; - uint32_t extSigX[3], sigZExtra; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiA64 = aSPtr->signExp; - expA = expExtF80UI64( uiA64 ); - uiB64 = bSPtr->signExp; - expB = expExtF80UI64( uiB64 ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( (expA == 0x7FFF) || (expB == 0x7FFF) ) { - if ( softfloat_tryPropagateNaNExtF80M( aSPtr, bSPtr, zSPtr ) ) return; - uiZ64 = uiA64; - if ( expB == 0x7FFF ) { - uiZ64 = uiB64 ^ packToExtF80UI64( negateB, 0 ); - if ( (expA == 0x7FFF) && (uiZ64 != uiA64) ) { - softfloat_invalidExtF80M( zSPtr ); - return; - } - } - zSPtr->signExp = uiZ64; - zSPtr->signif = UINT64_C( 0x8000000000000000 ); - return; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - signZ = signExtF80UI64( uiA64 ); - signB = signExtF80UI64( uiB64 ) ^ negateB; - negateB = (signZ != signB); - if ( expA < expB ) { - signZ = signB; - expA = expB; - expB = expExtF80UI64( uiA64 ); - tempSPtr = aSPtr; - aSPtr = bSPtr; - bSPtr = tempSPtr; - } - if ( ! expB ) { - expB = 1; - if ( ! expA ) expA = 1; - } - sigZ = aSPtr->signif; - sigB = bSPtr->signif; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - roundPackRoutinePtr = softfloat_roundPackMToExtF80M; - expDiff = expA - expB; - if ( expDiff ) { - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - extSigX[indexWord( 3, 2 )] = sigB>>32; - extSigX[indexWord( 3, 1 )] = sigB; - extSigX[indexWord( 3, 0 )] = 0; - softfloat_shiftRightJam96M( extSigX, expDiff, extSigX ); - sigB = - (uint64_t) extSigX[indexWord( 3, 2 )]<<32 - | extSigX[indexWord( 3, 1 )]; - if ( negateB ) { - sigZ -= sigB; - sigZExtra = extSigX[indexWordLo( 3 )]; - if ( sigZExtra ) { - --sigZ; - sigZExtra = -sigZExtra; - } - if ( ! (sigZ & UINT64_C( 0x8000000000000000 )) ) { - if ( sigZ & UINT64_C( 0x4000000000000000 ) ) { - --expA; - sigZ = sigZ<<1 | sigZExtra>>31; - sigZExtra <<= 1; - } else { - roundPackRoutinePtr = softfloat_normRoundPackMToExtF80M; - } - } - } else { - sigZ += sigB; - if ( sigZ & UINT64_C( 0x8000000000000000 ) ) goto sigZ; - sigZExtra = (uint32_t) sigZ<<31 | (extSigX[indexWordLo( 3 )] != 0); - goto completeNormAfterAdd; - } - } else { - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - sigZExtra = 0; - if ( negateB ) { - if ( sigZ < sigB ) { - signZ = ! signZ; - sigZ = sigB - sigZ; - } else { - sigZ -= sigB; - if ( ! sigZ ) { - signZ = (softfloat_roundingMode == softfloat_round_min); - zSPtr->signExp = packToExtF80UI64( signZ, 0 ); - zSPtr->signif = 0; - return; - } - } - roundPackRoutinePtr = softfloat_normRoundPackMToExtF80M; - } else { - sigZ += sigB; - if ( sigZ < sigB ) { - sigZExtra = (uint32_t) sigZ<<31; - completeNormAfterAdd: - ++expA; - sigZ = UINT64_C( 0x8000000000000000 ) | sigZ>>1; - } else { - if ( ! (sigZ & UINT64_C( 0x8000000000000000 )) ) { - roundPackRoutinePtr = softfloat_normRoundPackMToExtF80M; - } - } - } - } - extSigX[indexWord( 3, 0 )] = sigZExtra; - sigZ: - extSigX[indexWord( 3, 2 )] = sigZ>>32; - extSigX[indexWord( 3, 1 )] = sigZ; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - roundPack: - (*roundPackRoutinePtr)( - signZ, expA, extSigX, extF80_roundingPrecision, zSPtr ); - -} - diff --git a/outside/softfloat-3/source/s_addF128M.c b/outside/softfloat-3/source/s_addF128M.c deleted file mode 100644 index 5922a3d10..000000000 --- a/outside/softfloat-3/source/s_addF128M.c +++ /dev/null @@ -1,211 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -void - softfloat_addF128M( - const uint32_t *aWPtr, - const uint32_t *bWPtr, - uint32_t *zWPtr, - bool negateB - ) -{ - uint32_t uiA96; - int32_t expA; - uint32_t uiB96; - int32_t expB; - uint32_t uiZ96; - bool signZ, signB; - const uint32_t *tempPtr; - uint32_t sig96A, sig96B; - int32_t expDiff; - uint_fast8_t - (*addCarryMRoutinePtr)( - uint_fast8_t, - const uint32_t *, - const uint32_t *, - uint_fast8_t, - uint32_t * - ); - uint32_t extSigZ[5], wordSigZ; - uint_fast8_t carry; - void (*roundPackRoutinePtr)( bool, int32_t, uint32_t *, uint32_t * ); - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiA96 = aWPtr[indexWordHi( 4 )]; - expA = expF128UI96( uiA96 ); - uiB96 = bWPtr[indexWordHi( 4 )]; - expB = expF128UI96( uiB96 ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( (expA == 0x7FFF) || (expB == 0x7FFF) ) { - if ( softfloat_tryPropagateNaNF128M( aWPtr, bWPtr, zWPtr ) ) return; - uiZ96 = uiA96; - if ( expB == 0x7FFF ) { - uiZ96 = uiB96 ^ packToF128UI96( negateB, 0, 0 ); - if ( (expA == 0x7FFF) && (uiZ96 != uiA96) ) { - softfloat_invalidF128M( zWPtr ); - return; - } - } - zWPtr[indexWordHi( 4 )] = uiZ96; - zWPtr[indexWord( 4, 2 )] = 0; - zWPtr[indexWord( 4, 1 )] = 0; - zWPtr[indexWord( 4, 0 )] = 0; - return; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - signZ = signF128UI96( uiA96 ); - signB = signF128UI96( uiB96 ) ^ negateB; - negateB = (signZ != signB); - if ( (uint32_t) (uiA96<<1) < (uint32_t) (uiB96<<1) ) { - signZ = signB; - expA = expB; - expB = expF128UI96( uiA96 ); - tempPtr = aWPtr; - aWPtr = bWPtr; - bWPtr = tempPtr; - uiA96 = uiB96; - uiB96 = bWPtr[indexWordHi( 4 )]; - } - sig96A = fracF128UI96( uiA96 ); - sig96B = fracF128UI96( uiB96 ); - if ( expA ) { - --expA; - sig96A |= 0x00010000; - if ( expB ) { - --expB; - sig96B |= 0x00010000; - } - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - addCarryMRoutinePtr = - negateB ? softfloat_addComplCarryM : softfloat_addCarryM; - expDiff = expA - expB; - if ( expDiff ) { - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - extSigZ[indexWordHi( 5 )] = sig96B; - extSigZ[indexWord( 5, 3 )] = bWPtr[indexWord( 4, 2 )]; - extSigZ[indexWord( 5, 2 )] = bWPtr[indexWord( 4, 1 )]; - extSigZ[indexWord( 5, 1 )] = bWPtr[indexWord( 4, 0 )]; - extSigZ[indexWord( 5, 0 )] = 0; - softfloat_shiftRightJam160M( extSigZ, expDiff, extSigZ ); - sig96B = extSigZ[indexWordHi( 5 )]; - carry = 0; - if ( negateB ) { - sig96B = ~sig96B; - wordSigZ = extSigZ[indexWordLo( 5 )]; - extSigZ[indexWordLo( 5 )] = -wordSigZ; - carry = ! wordSigZ; - } - carry = - (*addCarryMRoutinePtr)( - 3, - &aWPtr[indexMultiwordLo( 4, 3 )], - &extSigZ[indexMultiword( 5, 3, 1 )], - carry, - &extSigZ[indexMultiword( 5, 3, 1 )] - ); - wordSigZ = sig96A + sig96B + carry; - } else { - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - extSigZ[indexWordLo( 5 )] = 0; - carry = - (*addCarryMRoutinePtr)( - 3, - &aWPtr[indexMultiwordLo( 4, 3 )], - &bWPtr[indexMultiwordLo( 4, 3 )], - negateB, - &extSigZ[indexMultiword( 5, 3, 1 )] - ); - if ( negateB ) { - wordSigZ = sig96A + ~sig96B + carry; - if ( wordSigZ & 0x80000000 ) { - signZ = ! signZ; - carry = - softfloat_addComplCarry96M( - &bWPtr[indexMultiwordLo( 4, 3 )], - &aWPtr[indexMultiwordLo( 4, 3 )], - 1, - &extSigZ[indexMultiword( 5, 3, 1 )] - ); - wordSigZ = sig96B + ~sig96A + carry; - } else { - if ( - ! wordSigZ && ! extSigZ[indexWord( 5, 3 )] - && ! ( extSigZ[indexWord( 5, 2 )] - | extSigZ[indexWord( 5, 1 )] - | extSigZ[indexWord( 5, 0 )] - ) - ) { - signZ = (softfloat_roundingMode == softfloat_round_min); - zWPtr[indexWordHi( 4 )] = packToF128UI96( signZ, 0, 0 ); - zWPtr[indexWord( 4, 2 )] = 0; - zWPtr[indexWord( 4, 1 )] = 0; - zWPtr[indexWord( 4, 0 )] = 0; - return; - } - } - } else { - wordSigZ = sig96A + sig96B + carry; - } - } - extSigZ[indexWordHi( 5 )] = wordSigZ; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - roundPackRoutinePtr = softfloat_normRoundPackMToF128M; - if ( 0x00010000 <= wordSigZ ) { - if ( 0x00020000 <= wordSigZ ) { - ++expA; - softfloat_shortShiftRightJam160M( extSigZ, 1, extSigZ ); - } - roundPackRoutinePtr = softfloat_roundPackMToF128M; - } - (*roundPackRoutinePtr)( signZ, expA, extSigZ, zWPtr ); - -} - diff --git a/outside/softfloat-3/source/s_addM.c b/outside/softfloat-3/source/s_addM.c deleted file mode 100644 index 356e68fa0..000000000 --- a/outside/softfloat-3/source/s_addM.c +++ /dev/null @@ -1,70 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "primitiveTypes.h" - -#ifndef softfloat_addM - -void - softfloat_addM( - uint_fast8_t size_words, - const uint32_t *aPtr, - const uint32_t *bPtr, - uint32_t *zPtr - ) -{ - unsigned int index, lastIndex; - uint_fast8_t carry; - uint32_t wordA, wordZ; - - index = indexWordLo( size_words ); - lastIndex = indexWordHi( size_words ); - carry = 0; - for (;;) { - wordA = aPtr[index]; - wordZ = wordA + bPtr[index] + carry; - zPtr[index] = wordZ; - if ( index == lastIndex ) break; - if ( wordZ != wordA ) carry = (wordZ < wordA); - index += wordIncr; - } - -} - -#endif - diff --git a/outside/softfloat-3/source/s_addMagsExtF80.c b/outside/softfloat-3/source/s_addMagsExtF80.c deleted file mode 100644 index d8f277318..000000000 --- a/outside/softfloat-3/source/s_addMagsExtF80.c +++ /dev/null @@ -1,156 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -extFloat80_t - softfloat_addMagsExtF80( - uint_fast16_t uiA64, - uint_fast64_t uiA0, - uint_fast16_t uiB64, - uint_fast64_t uiB0, - bool signZ - ) -{ - int_fast32_t expA; - uint_fast64_t sigA; - int_fast32_t expB; - uint_fast64_t sigB; - int_fast32_t expDiff; - uint_fast16_t uiZ64; - uint_fast64_t uiZ0, sigZ, sigZExtra; - struct exp32_sig64 normExpSig; - int_fast32_t expZ; - struct uint64_extra sig64Extra; - struct uint128 uiZ; - union { struct extFloat80M s; extFloat80_t f; } uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expA = expExtF80UI64( uiA64 ); - sigA = uiA0; - expB = expExtF80UI64( uiB64 ); - sigB = uiB0; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expDiff = expA - expB; - if ( ! expDiff ) { - if ( expA == 0x7FFF ) { - if ( (sigA | sigB) & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) { - goto propagateNaN; - } - uiZ64 = uiA64; - uiZ0 = uiA0; - goto uiZ; - } - sigZ = sigA + sigB; - sigZExtra = 0; - if ( ! expA ) { - normExpSig = softfloat_normSubnormalExtF80Sig( sigZ ); - expZ = normExpSig.exp + 1; - sigZ = normExpSig.sig; - goto roundAndPack; - } - expZ = expA; - goto shiftRight1; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( expDiff < 0 ) { - if ( expB == 0x7FFF ) { - if ( sigB & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) goto propagateNaN; - uiZ64 = packToExtF80UI64( signZ, 0x7FFF ); - uiZ0 = uiB0; - goto uiZ; - } - expZ = expB; - if ( ! expA ) { - ++expDiff; - sigZExtra = 0; - if ( ! expDiff ) goto newlyAligned; - } - sig64Extra = softfloat_shiftRightJam64Extra( sigA, 0, -expDiff ); - sigA = sig64Extra.v; - sigZExtra = sig64Extra.extra; - } else { - if ( expA == 0x7FFF ) { - if ( sigA & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) goto propagateNaN; - uiZ64 = uiA64; - uiZ0 = uiA0; - goto uiZ; - } - expZ = expA; - if ( ! expB ) { - --expDiff; - sigZExtra = 0; - if ( ! expDiff ) goto newlyAligned; - } - sig64Extra = softfloat_shiftRightJam64Extra( sigB, 0, expDiff ); - sigB = sig64Extra.v; - sigZExtra = sig64Extra.extra; - } - newlyAligned: - sigZ = sigA + sigB; - if ( sigZ & UINT64_C( 0x8000000000000000 ) ) goto roundAndPack; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - shiftRight1: - sig64Extra = softfloat_shortShiftRightJam64Extra( sigZ, sigZExtra, 1 ); - sigZ = sig64Extra.v | UINT64_C( 0x8000000000000000 ); - sigZExtra = sig64Extra.extra; - ++expZ; - roundAndPack: - return - softfloat_roundPackToExtF80( - signZ, expZ, sigZ, sigZExtra, extF80_roundingPrecision ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - propagateNaN: - uiZ = softfloat_propagateNaNExtF80UI( uiA64, uiA0, uiB64, uiB0 ); - uiZ64 = uiZ.v64; - uiZ0 = uiZ.v0; - uiZ: - uZ.s.signExp = uiZ64; - uZ.s.signif = uiZ0; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/s_addMagsF128.c b/outside/softfloat-3/source/s_addMagsF128.c deleted file mode 100644 index 9af936612..000000000 --- a/outside/softfloat-3/source/s_addMagsF128.c +++ /dev/null @@ -1,154 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" - -float128_t - softfloat_addMagsF128( - uint_fast64_t uiA64, - uint_fast64_t uiA0, - uint_fast64_t uiB64, - uint_fast64_t uiB0, - bool signZ - ) -{ - int_fast32_t expA; - struct uint128 sigA; - int_fast32_t expB; - struct uint128 sigB; - int_fast32_t expDiff; - struct uint128 uiZ, sigZ; - int_fast32_t expZ; - uint_fast64_t sigZExtra; - struct uint128_extra sig128Extra; - union ui128_f128 uZ; - - expA = expF128UI64( uiA64 ); - sigA.v64 = fracF128UI64( uiA64 ); - sigA.v0 = uiA0; - expB = expF128UI64( uiB64 ); - sigB.v64 = fracF128UI64( uiB64 ); - sigB.v0 = uiB0; - expDiff = expA - expB; - if ( ! expDiff ) { - if ( expA == 0x7FFF ) { - if ( sigA.v64 | sigA.v0 | sigB.v64 | sigB.v0 ) goto propagateNaN; - uiZ.v64 = uiA64; - uiZ.v0 = uiA0; - goto uiZ; - } - sigZ = softfloat_add128( sigA.v64, sigA.v0, sigB.v64, sigB.v0 ); - if ( ! expA ) { - uiZ.v64 = packToF128UI64( signZ, 0, sigZ.v64 ); - uiZ.v0 = sigZ.v0; - goto uiZ; - } - expZ = expA; - sigZ.v64 |= UINT64_C( 0x0002000000000000 ); - sigZExtra = 0; - goto shiftRight1; - } - if ( expDiff < 0 ) { - if ( expB == 0x7FFF ) { - if ( sigB.v64 | sigB.v0 ) goto propagateNaN; - uiZ.v64 = packToF128UI64( signZ, 0x7FFF, 0 ); - uiZ.v0 = 0; - goto uiZ; - } - expZ = expB; - if ( expA ) { - sigA.v64 |= UINT64_C( 0x0001000000000000 ); - } else { - ++expDiff; - sigZExtra = 0; - if ( ! expDiff ) goto newlyAligned; - } - sig128Extra = - softfloat_shiftRightJam128Extra( sigA.v64, sigA.v0, 0, -expDiff ); - sigA = sig128Extra.v; - sigZExtra = sig128Extra.extra; - } else { - if ( expA == 0x7FFF ) { - if ( sigA.v64 | sigA.v0 ) goto propagateNaN; - uiZ.v64 = uiA64; - uiZ.v0 = uiA0; - goto uiZ; - } - expZ = expA; - if ( expB ) { - sigB.v64 |= UINT64_C( 0x0001000000000000 ); - } else { - --expDiff; - sigZExtra = 0; - if ( ! expDiff ) goto newlyAligned; - } - sig128Extra = - softfloat_shiftRightJam128Extra( sigB.v64, sigB.v0, 0, expDiff ); - sigB = sig128Extra.v; - sigZExtra = sig128Extra.extra; - } - newlyAligned: - sigZ = - softfloat_add128( - sigA.v64 | UINT64_C( 0x0001000000000000 ), - sigA.v0, - sigB.v64, - sigB.v0 - ); - --expZ; - if ( sigZ.v64 < UINT64_C( 0x0002000000000000 ) ) goto roundAndPack; - ++expZ; - shiftRight1: - sig128Extra = - softfloat_shortShiftRightJam128Extra( - sigZ.v64, sigZ.v0, sigZExtra, 1 ); - sigZ = sig128Extra.v; - sigZExtra = sig128Extra.extra; - roundAndPack: - return - softfloat_roundPackToF128( signZ, expZ, sigZ.v64, sigZ.v0, sigZExtra ); - propagateNaN: - uiZ = softfloat_propagateNaNF128UI( uiA64, uiA0, uiB64, uiB0 ); - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/s_addMagsF16.c b/outside/softfloat-3/source/s_addMagsF16.c deleted file mode 100644 index 50b85eef9..000000000 --- a/outside/softfloat-3/source/s_addMagsF16.c +++ /dev/null @@ -1,183 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the -University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -float16_t softfloat_addMagsF16( uint_fast16_t uiA, uint_fast16_t uiB ) -{ - int_fast8_t expA; - uint_fast16_t sigA; - int_fast8_t expB; - uint_fast16_t sigB; - int_fast8_t expDiff; - uint_fast16_t uiZ; - bool signZ; - int_fast8_t expZ; - uint_fast16_t sigZ; - uint_fast16_t sigX, sigY; - int_fast8_t shiftDist; - uint_fast32_t sig32Z; - int_fast8_t roundingMode; - union ui16_f16 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expA = expF16UI( uiA ); - sigA = fracF16UI( uiA ); - expB = expF16UI( uiB ); - sigB = fracF16UI( uiB ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expDiff = expA - expB; - if ( ! expDiff ) { - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - if ( ! expA ) { - uiZ = uiA + sigB; - goto uiZ; - } - if ( expA == 0x1F ) { - if ( sigA | sigB ) goto propagateNaN; - uiZ = uiA; - goto uiZ; - } - signZ = signF16UI( uiA ); - expZ = expA; - sigZ = 0x0800 + sigA + sigB; - if ( ! (sigZ & 1) && (expZ < 0x1E) ) { - sigZ >>= 1; - goto pack; - } - sigZ <<= 3; - } else { - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - signZ = signF16UI( uiA ); - if ( expDiff < 0 ) { - /*---------------------------------------------------------------- - *----------------------------------------------------------------*/ - if ( expB == 0x1F ) { - if ( sigB ) goto propagateNaN; - uiZ = packToF16UI( signZ, 0x1F, 0 ); - goto uiZ; - } - if ( expDiff <= -13 ) { - uiZ = packToF16UI( signZ, expB, sigB ); - if ( expA | sigA ) goto addEpsilon; - goto uiZ; - } - expZ = expB; - sigX = sigB | 0x0400; - sigY = sigA + (expA ? 0x0400 : sigA); - shiftDist = 19 + expDiff; - } else { - /*---------------------------------------------------------------- - *----------------------------------------------------------------*/ - uiZ = uiA; - if ( expA == 0x1F ) { - if ( sigA ) goto propagateNaN; - goto uiZ; - } - if ( 13 <= expDiff ) { - if ( expB | sigB ) goto addEpsilon; - goto uiZ; - } - expZ = expA; - sigX = sigA | 0x0400; - sigY = sigB + (expB ? 0x0400 : sigB); - shiftDist = 19 - expDiff; - } - sig32Z = - ((uint_fast32_t) sigX<<19) + ((uint_fast32_t) sigY<>16; - if ( sig32Z & 0xFFFF ) { - sigZ |= 1; - } else { - if ( ! (sigZ & 0xF) && (expZ < 0x1E) ) { - sigZ >>= 4; - goto pack; - } - } - } - return softfloat_roundPackToF16( signZ, expZ, sigZ ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - propagateNaN: - uiZ = softfloat_propagateNaNF16UI( uiA, uiB ); - goto uiZ; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - addEpsilon: - roundingMode = softfloat_roundingMode; - if ( roundingMode != softfloat_round_near_even ) { - if ( - roundingMode - == (signF16UI( uiZ ) ? softfloat_round_min - : softfloat_round_max) - ) { - ++uiZ; - if ( (uint16_t) (uiZ<<1) == 0xF800 ) { - softfloat_raiseFlags( - softfloat_flag_overflow | softfloat_flag_inexact ); - } - } -#ifdef SOFTFLOAT_ROUND_ODD - else if ( roundingMode == softfloat_round_odd ) { - uiZ |= 1; - } -#endif - } - softfloat_exceptionFlags |= softfloat_flag_inexact; - goto uiZ; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - pack: - uiZ = packToF16UI( signZ, expZ, sigZ ); - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/s_addMagsF32.c b/outside/softfloat-3/source/s_addMagsF32.c deleted file mode 100644 index b7945b033..000000000 --- a/outside/softfloat-3/source/s_addMagsF32.c +++ /dev/null @@ -1,126 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" - -float32_t softfloat_addMagsF32( uint_fast32_t uiA, uint_fast32_t uiB ) -{ - int_fast16_t expA; - uint_fast32_t sigA; - int_fast16_t expB; - uint_fast32_t sigB; - int_fast16_t expDiff; - uint_fast32_t uiZ; - bool signZ; - int_fast16_t expZ; - uint_fast32_t sigZ; - union ui32_f32 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expA = expF32UI( uiA ); - sigA = fracF32UI( uiA ); - expB = expF32UI( uiB ); - sigB = fracF32UI( uiB ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expDiff = expA - expB; - if ( ! expDiff ) { - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - if ( ! expA ) { - uiZ = uiA + sigB; - goto uiZ; - } - if ( expA == 0xFF ) { - if ( sigA | sigB ) goto propagateNaN; - uiZ = uiA; - goto uiZ; - } - signZ = signF32UI( uiA ); - expZ = expA; - sigZ = 0x01000000 + sigA + sigB; - if ( ! (sigZ & 1) && (expZ < 0xFE) ) { - uiZ = packToF32UI( signZ, expZ, sigZ>>1 ); - goto uiZ; - } - sigZ <<= 6; - } else { - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - signZ = signF32UI( uiA ); - sigA <<= 6; - sigB <<= 6; - if ( expDiff < 0 ) { - if ( expB == 0xFF ) { - if ( sigB ) goto propagateNaN; - uiZ = packToF32UI( signZ, 0xFF, 0 ); - goto uiZ; - } - expZ = expB; - sigA += expA ? 0x20000000 : sigA; - sigA = softfloat_shiftRightJam32( sigA, -expDiff ); - } else { - if ( expA == 0xFF ) { - if ( sigA ) goto propagateNaN; - uiZ = uiA; - goto uiZ; - } - expZ = expA; - sigB += expB ? 0x20000000 : sigB; - sigB = softfloat_shiftRightJam32( sigB, expDiff ); - } - sigZ = 0x20000000 + sigA + sigB; - if ( sigZ < 0x40000000 ) { - --expZ; - sigZ <<= 1; - } - } - return softfloat_roundPackToF32( signZ, expZ, sigZ ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - propagateNaN: - uiZ = softfloat_propagateNaNF32UI( uiA, uiB ); - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/s_addMagsF64.c b/outside/softfloat-3/source/s_addMagsF64.c deleted file mode 100644 index b4a289945..000000000 --- a/outside/softfloat-3/source/s_addMagsF64.c +++ /dev/null @@ -1,128 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" - -float64_t - softfloat_addMagsF64( uint_fast64_t uiA, uint_fast64_t uiB, bool signZ ) -{ - int_fast16_t expA; - uint_fast64_t sigA; - int_fast16_t expB; - uint_fast64_t sigB; - int_fast16_t expDiff; - uint_fast64_t uiZ; - int_fast16_t expZ; - uint_fast64_t sigZ; - union ui64_f64 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expA = expF64UI( uiA ); - sigA = fracF64UI( uiA ); - expB = expF64UI( uiB ); - sigB = fracF64UI( uiB ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expDiff = expA - expB; - if ( ! expDiff ) { - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - if ( ! expA ) { - uiZ = uiA + sigB; - goto uiZ; - } - if ( expA == 0x7FF ) { - if ( sigA | sigB ) goto propagateNaN; - uiZ = uiA; - goto uiZ; - } - expZ = expA; - sigZ = UINT64_C( 0x0020000000000000 ) + sigA + sigB; - sigZ <<= 9; - } else { - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - sigA <<= 9; - sigB <<= 9; - if ( expDiff < 0 ) { - if ( expB == 0x7FF ) { - if ( sigB ) goto propagateNaN; - uiZ = packToF64UI( signZ, 0x7FF, 0 ); - goto uiZ; - } - expZ = expB; - if ( expA ) { - sigA += UINT64_C( 0x2000000000000000 ); - } else { - sigA <<= 1; - } - sigA = softfloat_shiftRightJam64( sigA, -expDiff ); - } else { - if ( expA == 0x7FF ) { - if ( sigA ) goto propagateNaN; - uiZ = uiA; - goto uiZ; - } - expZ = expA; - if ( expB ) { - sigB += UINT64_C( 0x2000000000000000 ); - } else { - sigB <<= 1; - } - sigB = softfloat_shiftRightJam64( sigB, expDiff ); - } - sigZ = UINT64_C( 0x2000000000000000 ) + sigA + sigB; - if ( sigZ < UINT64_C( 0x4000000000000000 ) ) { - --expZ; - sigZ <<= 1; - } - } - return softfloat_roundPackToF64( signZ, expZ, sigZ ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - propagateNaN: - uiZ = softfloat_propagateNaNF64UI( uiA, uiB ); - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/s_approxRecip32_1.c b/outside/softfloat-3/source/s_approxRecip32_1.c deleted file mode 100644 index 109bb7e23..000000000 --- a/outside/softfloat-3/source/s_approxRecip32_1.c +++ /dev/null @@ -1,66 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" - -#ifndef softfloat_approxRecip32_1 - -extern const uint16_t softfloat_approxRecip_1k0s[16]; -extern const uint16_t softfloat_approxRecip_1k1s[16]; - -uint32_t softfloat_approxRecip32_1( uint32_t a ) -{ - int index; - uint16_t eps, r0; - uint32_t sigma0; - uint_fast32_t r; - uint32_t sqrSigma0; - - index = a>>27 & 0xF; - eps = (uint16_t) (a>>11); - r0 = softfloat_approxRecip_1k0s[index] - - ((softfloat_approxRecip_1k1s[index] * (uint_fast32_t) eps)>>20); - sigma0 = ~(uint_fast32_t) ((r0 * (uint_fast64_t) a)>>7); - r = ((uint_fast32_t) r0<<16) + ((r0 * (uint_fast64_t) sigma0)>>24); - sqrSigma0 = ((uint_fast64_t) sigma0 * sigma0)>>32; - r += ((uint32_t) r * (uint_fast64_t) sqrSigma0)>>48; - return r; - -} - -#endif - diff --git a/outside/softfloat-3/source/s_approxRecipSqrt32_1.c b/outside/softfloat-3/source/s_approxRecipSqrt32_1.c deleted file mode 100644 index 2e5bb7450..000000000 --- a/outside/softfloat-3/source/s_approxRecipSqrt32_1.c +++ /dev/null @@ -1,73 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" - -#ifndef softfloat_approxRecipSqrt32_1 - -extern const uint16_t softfloat_approxRecipSqrt_1k0s[]; -extern const uint16_t softfloat_approxRecipSqrt_1k1s[]; - -uint32_t softfloat_approxRecipSqrt32_1( unsigned int oddExpA, uint32_t a ) -{ - int index; - uint16_t eps, r0; - uint_fast32_t ESqrR0; - uint32_t sigma0; - uint_fast32_t r; - uint32_t sqrSigma0; - - index = (a>>27 & 0xE) + oddExpA; - eps = (uint16_t) (a>>12); - r0 = softfloat_approxRecipSqrt_1k0s[index] - - ((softfloat_approxRecipSqrt_1k1s[index] * (uint_fast32_t) eps) - >>20); - ESqrR0 = (uint_fast32_t) r0 * r0; - if ( ! oddExpA ) ESqrR0 <<= 1; - sigma0 = ~(uint_fast32_t) (((uint32_t) ESqrR0 * (uint_fast64_t) a)>>23); - r = ((uint_fast32_t) r0<<16) + ((r0 * (uint_fast64_t) sigma0)>>25); - sqrSigma0 = ((uint_fast64_t) sigma0 * sigma0)>>32; - r += ((uint32_t) ((r>>1) + (r>>3) - ((uint_fast32_t) r0<<14)) - * (uint_fast64_t) sqrSigma0) - >>48; - if ( ! (r & 0x80000000) ) r = 0x80000000; - return r; - -} - -#endif - diff --git a/outside/softfloat-3/source/s_approxRecipSqrt_1Ks.c b/outside/softfloat-3/source/s_approxRecipSqrt_1Ks.c deleted file mode 100644 index c0acc41a9..000000000 --- a/outside/softfloat-3/source/s_approxRecipSqrt_1Ks.c +++ /dev/null @@ -1,49 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "primitives.h" - -const uint16_t softfloat_approxRecipSqrt_1k0s[16] = { - 0xB4C9, 0xFFAB, 0xAA7D, 0xF11C, 0xA1C5, 0xE4C7, 0x9A43, 0xDA29, - 0x93B5, 0xD0E5, 0x8DED, 0xC8B7, 0x88C6, 0xC16D, 0x8424, 0xBAE1 -}; -const uint16_t softfloat_approxRecipSqrt_1k1s[16] = { - 0xA5A5, 0xEA42, 0x8C21, 0xC62D, 0x788F, 0xAA7F, 0x6928, 0x94B6, - 0x5CC7, 0x8335, 0x52A6, 0x74E2, 0x4A3E, 0x68FE, 0x432B, 0x5EFD -}; - diff --git a/outside/softfloat-3/source/s_approxRecip_1Ks.c b/outside/softfloat-3/source/s_approxRecip_1Ks.c deleted file mode 100644 index 03b97e9d2..000000000 --- a/outside/softfloat-3/source/s_approxRecip_1Ks.c +++ /dev/null @@ -1,49 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "primitives.h" - -const uint16_t softfloat_approxRecip_1k0s[16] = { - 0xFFC4, 0xF0BE, 0xE363, 0xD76F, 0xCCAD, 0xC2F0, 0xBA16, 0xB201, - 0xAA97, 0xA3C6, 0x9D7A, 0x97A6, 0x923C, 0x8D32, 0x887E, 0x8417 -}; -const uint16_t softfloat_approxRecip_1k1s[16] = { - 0xF0F1, 0xD62C, 0xBFA1, 0xAC77, 0x9C0A, 0x8DDB, 0x8185, 0x76BA, - 0x6D3B, 0x64D4, 0x5D5C, 0x56B1, 0x50B6, 0x4B55, 0x4679, 0x4211 -}; - diff --git a/outside/softfloat-3/source/s_compare128M.c b/outside/softfloat-3/source/s_compare128M.c deleted file mode 100644 index 593a77e63..000000000 --- a/outside/softfloat-3/source/s_compare128M.c +++ /dev/null @@ -1,62 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "primitiveTypes.h" - -#ifndef softfloat_compare128M - -int_fast8_t softfloat_compare128M( const uint32_t *aPtr, const uint32_t *bPtr ) -{ - unsigned int index, lastIndex; - uint32_t wordA, wordB; - - index = indexWordHi( 4 ); - lastIndex = indexWordLo( 4 ); - for (;;) { - wordA = aPtr[index]; - wordB = bPtr[index]; - if ( wordA != wordB ) return (wordA < wordB) ? -1 : 1; - if ( index == lastIndex ) break; - index -= wordIncr; - } - return 0; - -} - -#endif - diff --git a/outside/softfloat-3/source/s_compare96M.c b/outside/softfloat-3/source/s_compare96M.c deleted file mode 100644 index 21e240b9c..000000000 --- a/outside/softfloat-3/source/s_compare96M.c +++ /dev/null @@ -1,62 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "primitiveTypes.h" - -#ifndef softfloat_compare96M - -int_fast8_t softfloat_compare96M( const uint32_t *aPtr, const uint32_t *bPtr ) -{ - unsigned int index, lastIndex; - uint32_t wordA, wordB; - - index = indexWordHi( 3 ); - lastIndex = indexWordLo( 3 ); - for (;;) { - wordA = aPtr[index]; - wordB = bPtr[index]; - if ( wordA != wordB ) return (wordA < wordB) ? -1 : 1; - if ( index == lastIndex ) break; - index -= wordIncr; - } - return 0; - -} - -#endif - diff --git a/outside/softfloat-3/source/s_compareNonnormExtF80M.c b/outside/softfloat-3/source/s_compareNonnormExtF80M.c deleted file mode 100644 index 8adbf3758..000000000 --- a/outside/softfloat-3/source/s_compareNonnormExtF80M.c +++ /dev/null @@ -1,111 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "internals.h" -#include "softfloat_types.h" - -int - softfloat_compareNonnormExtF80M( - const struct extFloat80M *aSPtr, const struct extFloat80M *bSPtr ) -{ - uint_fast16_t uiA64, uiB64; - uint64_t sigA; - bool signB; - uint64_t sigB; - int32_t expA, expB; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiA64 = aSPtr->signExp; - uiB64 = bSPtr->signExp; - sigA = aSPtr->signif; - signB = signExtF80UI64( uiB64 ); - sigB = bSPtr->signif; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( (uiA64 ^ uiB64) & 0x8000 ) { - if ( ! (sigA | sigB) ) return 0; - goto resultFromSignB; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expA = expExtF80UI64( uiA64 ); - expB = expExtF80UI64( uiB64 ); - if ( expA == 0x7FFF ) { - if (expB == 0x7FFF) return 0; - signB = ! signB; - goto resultFromSignB; - } - if ( expB == 0x7FFF ) { - goto resultFromSignB; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! expA ) expA = 1; - if ( ! (sigA & UINT64_C( 0x8000000000000000 )) ) { - if ( sigA ) { - expA += softfloat_normExtF80SigM( &sigA ); - } else { - expA = -128; - } - } - if ( ! expB ) expB = 1; - if ( ! (sigB & UINT64_C( 0x8000000000000000 )) ) { - if ( sigB ) { - expB += softfloat_normExtF80SigM( &sigB ); - } else { - expB = -128; - } - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( signB ) { - if ( expA < expB ) return 1; - if ( (expB < expA) || (sigB < sigA) ) return -1; - } else { - if ( expB < expA ) return 1; - if ( (expA < expB) || (sigA < sigB) ) return -1; - } - return (sigA != sigB); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - resultFromSignB: - return signB ? 1 : -1; - -} - diff --git a/outside/softfloat-3/source/s_countLeadingZeros16.c b/outside/softfloat-3/source/s_countLeadingZeros16.c deleted file mode 100644 index 8fa479a70..000000000 --- a/outside/softfloat-3/source/s_countLeadingZeros16.c +++ /dev/null @@ -1,60 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" - -#ifndef softfloat_countLeadingZeros16 - -#define softfloat_countLeadingZeros16 softfloat_countLeadingZeros16 -#include "primitives.h" - -uint_fast8_t softfloat_countLeadingZeros16( uint16_t a ) -{ - uint_fast8_t count; - - count = 8; - if ( 0x100 <= a ) { - count = 0; - a >>= 8; - } - count += softfloat_countLeadingZeros8[a]; - return count; - -} - -#endif - diff --git a/outside/softfloat-3/source/s_countLeadingZeros32.c b/outside/softfloat-3/source/s_countLeadingZeros32.c deleted file mode 100644 index 43c6efae5..000000000 --- a/outside/softfloat-3/source/s_countLeadingZeros32.c +++ /dev/null @@ -1,64 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" - -#ifndef softfloat_countLeadingZeros32 - -#define softfloat_countLeadingZeros32 softfloat_countLeadingZeros32 -#include "primitives.h" - -uint_fast8_t softfloat_countLeadingZeros32( uint32_t a ) -{ - uint_fast8_t count; - - count = 0; - if ( a < 0x10000 ) { - count = 16; - a <<= 16; - } - if ( a < 0x1000000 ) { - count += 8; - a <<= 8; - } - count += softfloat_countLeadingZeros8[a>>24]; - return count; - -} - -#endif - diff --git a/outside/softfloat-3/source/s_countLeadingZeros64.c b/outside/softfloat-3/source/s_countLeadingZeros64.c deleted file mode 100644 index 592adab06..000000000 --- a/outside/softfloat-3/source/s_countLeadingZeros64.c +++ /dev/null @@ -1,73 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" - -#ifndef softfloat_countLeadingZeros64 - -#define softfloat_countLeadingZeros64 softfloat_countLeadingZeros64 -#include "primitives.h" - -uint_fast8_t softfloat_countLeadingZeros64( uint64_t a ) -{ - uint_fast8_t count; - uint32_t a32; - - count = 0; - a32 = a>>32; - if ( ! a32 ) { - count = 32; - a32 = a; - } - /*------------------------------------------------------------------------ - | From here, result is current count + count leading zeros of `a32'. - *------------------------------------------------------------------------*/ - if ( a32 < 0x10000 ) { - count += 16; - a32 <<= 16; - } - if ( a32 < 0x1000000 ) { - count += 8; - a32 <<= 8; - } - count += softfloat_countLeadingZeros8[a32>>24]; - return count; - -} - -#endif - diff --git a/outside/softfloat-3/source/s_countLeadingZeros8.c b/outside/softfloat-3/source/s_countLeadingZeros8.c deleted file mode 100644 index ebf185b26..000000000 --- a/outside/softfloat-3/source/s_countLeadingZeros8.c +++ /dev/null @@ -1,59 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "primitives.h" - -const uint_least8_t softfloat_countLeadingZeros8[256] = { - 8, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -}; - diff --git a/outside/softfloat-3/source/s_eq128.c b/outside/softfloat-3/source/s_eq128.c deleted file mode 100644 index ad21b6c30..000000000 --- a/outside/softfloat-3/source/s_eq128.c +++ /dev/null @@ -1,51 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" - -#ifndef softfloat_eq128 - -bool softfloat_eq128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 ) -{ - - return (a64 == b64) && (a0 == b0); - -} - -#endif - diff --git a/outside/softfloat-3/source/s_invalidExtF80M.c b/outside/softfloat-3/source/s_invalidExtF80M.c deleted file mode 100644 index 003610e7c..000000000 --- a/outside/softfloat-3/source/s_invalidExtF80M.c +++ /dev/null @@ -1,49 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include "platform.h" -#include "specialize.h" -#include "softfloat.h" - -void softfloat_invalidExtF80M( struct extFloat80M *zSPtr ) -{ - - softfloat_raiseFlags( softfloat_flag_invalid ); - zSPtr->signExp = defaultNaNExtF80UI64; - zSPtr->signif = defaultNaNExtF80UI0; - -} - diff --git a/outside/softfloat-3/source/s_invalidF128M.c b/outside/softfloat-3/source/s_invalidF128M.c deleted file mode 100644 index 26dbd90b1..000000000 --- a/outside/softfloat-3/source/s_invalidF128M.c +++ /dev/null @@ -1,53 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "primitives.h" -#include "specialize.h" -#include "softfloat.h" - -void softfloat_invalidF128M( uint32_t *zWPtr ) -{ - - softfloat_raiseFlags( softfloat_flag_invalid ); - zWPtr[indexWord( 4, 3 )] = defaultNaNF128UI96; - zWPtr[indexWord( 4, 2 )] = defaultNaNF128UI64; - zWPtr[indexWord( 4, 1 )] = defaultNaNF128UI32; - zWPtr[indexWord( 4, 0 )] = defaultNaNF128UI0; - -} - diff --git a/outside/softfloat-3/source/s_isNaNF128M.c b/outside/softfloat-3/source/s_isNaNF128M.c deleted file mode 100644 index e00046631..000000000 --- a/outside/softfloat-3/source/s_isNaNF128M.c +++ /dev/null @@ -1,57 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "primitives.h" - -/*---------------------------------------------------------------------------- -*----------------------------------------------------------------------------*/ -bool softfloat_isNaNF128M( const uint32_t *aWPtr ) -{ - uint32_t uiA96; - - uiA96 = aWPtr[indexWordHi( 4 )]; - if ( (~uiA96 & 0x7FFF0000) != 0 ) return false; - return - ((uiA96 & 0x0000FFFF) != 0) - || ((aWPtr[indexWord( 4, 2 )] | aWPtr[indexWord( 4, 1 )] - | aWPtr[indexWord( 4, 0 )]) - != 0); - -} - diff --git a/outside/softfloat-3/source/s_le128.c b/outside/softfloat-3/source/s_le128.c deleted file mode 100644 index d64debe00..000000000 --- a/outside/softfloat-3/source/s_le128.c +++ /dev/null @@ -1,51 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" - -#ifndef softfloat_le128 - -bool softfloat_le128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 ) -{ - - return (a64 < b64) || ((a64 == b64) && (a0 <= b0)); - -} - -#endif - diff --git a/outside/softfloat-3/source/s_lt128.c b/outside/softfloat-3/source/s_lt128.c deleted file mode 100644 index 49ccc0daf..000000000 --- a/outside/softfloat-3/source/s_lt128.c +++ /dev/null @@ -1,51 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" - -#ifndef softfloat_lt128 - -bool softfloat_lt128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 ) -{ - - return (a64 < b64) || ((a64 == b64) && (a0 < b0)); - -} - -#endif - diff --git a/outside/softfloat-3/source/s_mul128By32.c b/outside/softfloat-3/source/s_mul128By32.c deleted file mode 100644 index 31598378f..000000000 --- a/outside/softfloat-3/source/s_mul128By32.c +++ /dev/null @@ -1,58 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "primitiveTypes.h" - -#ifndef softfloat_mul128By32 - -struct uint128 softfloat_mul128By32( uint64_t a64, uint64_t a0, uint32_t b ) -{ - struct uint128 z; - uint_fast64_t mid; - uint_fast32_t carry; - - z.v0 = a0 * b; - mid = (uint_fast64_t) (uint32_t) (a0>>32) * b; - carry = (uint32_t) ((uint_fast32_t) (z.v0>>32) - (uint_fast32_t) mid); - z.v64 = a64 * b + (uint_fast32_t) ((mid + carry)>>32); - return z; - -} - -#endif - diff --git a/outside/softfloat-3/source/s_mul128MTo256M.c b/outside/softfloat-3/source/s_mul128MTo256M.c deleted file mode 100644 index ead48560a..000000000 --- a/outside/softfloat-3/source/s_mul128MTo256M.c +++ /dev/null @@ -1,100 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "primitiveTypes.h" - -#ifndef softfloat_mul128MTo256M - -void - softfloat_mul128MTo256M( - const uint32_t *aPtr, const uint32_t *bPtr, uint32_t *zPtr ) -{ - uint32_t *lastZPtr, wordB; - uint64_t dwordProd; - uint32_t wordZ; - uint_fast8_t carry; - - bPtr += indexWordLo( 4 ); - lastZPtr = zPtr + indexMultiwordHi( 8, 5 ); - zPtr += indexMultiwordLo( 8, 5 ); - wordB = *bPtr; - dwordProd = (uint64_t) aPtr[indexWord( 4, 0 )] * wordB; - zPtr[indexWord( 5, 0 )] = dwordProd; - dwordProd = (uint64_t) aPtr[indexWord( 4, 1 )] * wordB + (dwordProd>>32); - zPtr[indexWord( 5, 1 )] = dwordProd; - dwordProd = (uint64_t) aPtr[indexWord( 4, 2 )] * wordB + (dwordProd>>32); - zPtr[indexWord( 5, 2 )] = dwordProd; - dwordProd = (uint64_t) aPtr[indexWord( 4, 3 )] * wordB + (dwordProd>>32); - zPtr[indexWord( 5, 3 )] = dwordProd; - zPtr[indexWord( 5, 4 )] = dwordProd>>32; - do { - bPtr += wordIncr; - zPtr += wordIncr; - wordB = *bPtr; - dwordProd = (uint64_t) aPtr[indexWord( 4, 0 )] * wordB; - wordZ = zPtr[indexWord( 5, 0 )] + (uint32_t) dwordProd; - zPtr[indexWord( 5, 0 )] = wordZ; - carry = (wordZ < (uint32_t) dwordProd); - dwordProd = - (uint64_t) aPtr[indexWord( 4, 1 )] * wordB + (dwordProd>>32); - wordZ = zPtr[indexWord( 5, 1 )] + (uint32_t) dwordProd + carry; - zPtr[indexWord( 5, 1 )] = wordZ; - if ( wordZ != (uint32_t) dwordProd ) { - carry = (wordZ < (uint32_t) dwordProd); - } - dwordProd = - (uint64_t) aPtr[indexWord( 4, 2 )] * wordB + (dwordProd>>32); - wordZ = zPtr[indexWord( 5, 2 )] + (uint32_t) dwordProd + carry; - zPtr[indexWord( 5, 2 )] = wordZ; - if ( wordZ != (uint32_t) dwordProd ) { - carry = (wordZ < (uint32_t) dwordProd); - } - dwordProd = - (uint64_t) aPtr[indexWord( 4, 3 )] * wordB + (dwordProd>>32); - wordZ = zPtr[indexWord( 5, 3 )] + (uint32_t) dwordProd + carry; - zPtr[indexWord( 5, 3 )] = wordZ; - if ( wordZ != (uint32_t) dwordProd ) { - carry = (wordZ < (uint32_t) dwordProd); - } - zPtr[indexWord( 5, 4 )] = (dwordProd>>32) + carry; - } while ( zPtr != lastZPtr ); - -} - -#endif - diff --git a/outside/softfloat-3/source/s_mul128To256M.c b/outside/softfloat-3/source/s_mul128To256M.c deleted file mode 100644 index 9c24863bf..000000000 --- a/outside/softfloat-3/source/s_mul128To256M.c +++ /dev/null @@ -1,71 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" - -#ifndef softfloat_mul128To256M - -#define softfloat_mul128To256M softfloat_mul128To256M -#include "primitives.h" - -void - softfloat_mul128To256M( - uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0, uint64_t *zPtr ) -{ - struct uint128 p0, p64, p128; - uint_fast64_t z64, z128, z192; - - p0 = softfloat_mul64To128( a0, b0 ); - zPtr[indexWord( 4, 0 )] = p0.v0; - p64 = softfloat_mul64To128( a64, b0 ); - z64 = p64.v0 + p0.v64; - z128 = p64.v64 + (z64 < p64.v0); - p128 = softfloat_mul64To128( a64, b64 ); - z128 += p128.v0; - z192 = p128.v64 + (z128 < p128.v0); - p64 = softfloat_mul64To128( a0, b64 ); - z64 += p64.v0; - zPtr[indexWord( 4, 1 )] = z64; - p64.v64 += (z64 < p64.v0); - z128 += p64.v64; - zPtr[indexWord( 4, 2 )] = z128; - zPtr[indexWord( 4, 3 )] = z192 + (z128 < p64.v64); - -} - -#endif - diff --git a/outside/softfloat-3/source/s_mul64ByShifted32To128.c b/outside/softfloat-3/source/s_mul64ByShifted32To128.c deleted file mode 100644 index b7d026eba..000000000 --- a/outside/softfloat-3/source/s_mul64ByShifted32To128.c +++ /dev/null @@ -1,56 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "primitiveTypes.h" - -#ifndef softfloat_mul64ByShifted32To128 - -struct uint128 softfloat_mul64ByShifted32To128( uint64_t a, uint32_t b ) -{ - uint_fast64_t mid; - struct uint128 z; - - mid = (uint_fast64_t) (uint32_t) a * b; - z.v0 = mid<<32; - z.v64 = (uint_fast64_t) (uint32_t) (a>>32) * b + (mid>>32); - return z; - -} - -#endif - diff --git a/outside/softfloat-3/source/s_mul64To128.c b/outside/softfloat-3/source/s_mul64To128.c deleted file mode 100644 index ee0783385..000000000 --- a/outside/softfloat-3/source/s_mul64To128.c +++ /dev/null @@ -1,66 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "primitiveTypes.h" - -#ifndef softfloat_mul64To128 - -struct uint128 softfloat_mul64To128( uint64_t a, uint64_t b ) -{ - uint32_t a32, a0, b32, b0; - struct uint128 z; - uint64_t mid1, mid; - - a32 = a>>32; - a0 = a; - b32 = b>>32; - b0 = b; - z.v0 = (uint_fast64_t) a0 * b0; - mid1 = (uint_fast64_t) a32 * b0; - mid = mid1 + (uint_fast64_t) a0 * b32; - z.v64 = (uint_fast64_t) a32 * b32; - z.v64 += (uint_fast64_t) (mid < mid1)<<32 | mid>>32; - mid <<= 32; - z.v0 += mid; - z.v64 += (z.v0 < mid); - return z; - -} - -#endif - diff --git a/outside/softfloat-3/source/s_mul64To128M.c b/outside/softfloat-3/source/s_mul64To128M.c deleted file mode 100644 index 617f754de..000000000 --- a/outside/softfloat-3/source/s_mul64To128M.c +++ /dev/null @@ -1,68 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "primitiveTypes.h" - -#ifndef softfloat_mul64To128M - -void softfloat_mul64To128M( uint64_t a, uint64_t b, uint32_t *zPtr ) -{ - uint32_t a32, a0, b32, b0; - uint64_t z0, mid1, z64, mid; - - a32 = a>>32; - a0 = a; - b32 = b>>32; - b0 = b; - z0 = (uint64_t) a0 * b0; - mid1 = (uint64_t) a32 * b0; - mid = mid1 + (uint64_t) a0 * b32; - z64 = (uint64_t) a32 * b32; - z64 += (uint64_t) (mid < mid1)<<32 | mid>>32; - mid <<= 32; - z0 += mid; - zPtr[indexWord( 4, 1 )] = z0>>32; - zPtr[indexWord( 4, 0 )] = z0; - z64 += (z0 < mid); - zPtr[indexWord( 4, 3 )] = z64>>32; - zPtr[indexWord( 4, 2 )] = z64; - -} - -#endif - diff --git a/outside/softfloat-3/source/s_mulAddF128.c b/outside/softfloat-3/source/s_mulAddF128.c deleted file mode 100644 index 9ac3a67d6..000000000 --- a/outside/softfloat-3/source/s_mulAddF128.c +++ /dev/null @@ -1,350 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -float128_t - softfloat_mulAddF128( - uint_fast64_t uiA64, - uint_fast64_t uiA0, - uint_fast64_t uiB64, - uint_fast64_t uiB0, - uint_fast64_t uiC64, - uint_fast64_t uiC0, - uint_fast8_t op - ) -{ - bool signA; - int_fast32_t expA; - struct uint128 sigA; - bool signB; - int_fast32_t expB; - struct uint128 sigB; - bool signC; - int_fast32_t expC; - struct uint128 sigC; - bool signZ; - uint_fast64_t magBits; - struct uint128 uiZ; - struct exp32_sig128 normExpSig; - int_fast32_t expZ; - uint64_t sig256Z[4]; - struct uint128 sigZ; - int_fast32_t shiftDist, expDiff; - struct uint128 x128; - uint64_t sig256C[4]; - static uint64_t zero256[4] = INIT_UINTM4( 0, 0, 0, 0 ); - uint_fast64_t sigZExtra, sig256Z0; - union ui128_f128 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - signA = signF128UI64( uiA64 ); - expA = expF128UI64( uiA64 ); - sigA.v64 = fracF128UI64( uiA64 ); - sigA.v0 = uiA0; - signB = signF128UI64( uiB64 ); - expB = expF128UI64( uiB64 ); - sigB.v64 = fracF128UI64( uiB64 ); - sigB.v0 = uiB0; - signC = signF128UI64( uiC64 ) ^ (op == softfloat_mulAdd_subC); - expC = expF128UI64( uiC64 ); - sigC.v64 = fracF128UI64( uiC64 ); - sigC.v0 = uiC0; - signZ = signA ^ signB ^ (op == softfloat_mulAdd_subProd); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( expA == 0x7FFF ) { - if ( - (sigA.v64 | sigA.v0) || ((expB == 0x7FFF) && (sigB.v64 | sigB.v0)) - ) { - goto propagateNaN_ABC; - } - magBits = expB | sigB.v64 | sigB.v0; - goto infProdArg; - } - if ( expB == 0x7FFF ) { - if ( sigB.v64 | sigB.v0 ) goto propagateNaN_ABC; - magBits = expA | sigA.v64 | sigA.v0; - goto infProdArg; - } - if ( expC == 0x7FFF ) { - if ( sigC.v64 | sigC.v0 ) { - uiZ.v64 = 0; - uiZ.v0 = 0; - goto propagateNaN_ZC; - } - uiZ.v64 = uiC64; - uiZ.v0 = uiC0; - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! expA ) { - if ( ! (sigA.v64 | sigA.v0) ) goto zeroProd; - normExpSig = softfloat_normSubnormalF128Sig( sigA.v64, sigA.v0 ); - expA = normExpSig.exp; - sigA = normExpSig.sig; - } - if ( ! expB ) { - if ( ! (sigB.v64 | sigB.v0) ) goto zeroProd; - normExpSig = softfloat_normSubnormalF128Sig( sigB.v64, sigB.v0 ); - expB = normExpSig.exp; - sigB = normExpSig.sig; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expZ = expA + expB - 0x3FFE; - sigA.v64 |= UINT64_C( 0x0001000000000000 ); - sigB.v64 |= UINT64_C( 0x0001000000000000 ); - sigA = softfloat_shortShiftLeft128( sigA.v64, sigA.v0, 8 ); - sigB = softfloat_shortShiftLeft128( sigB.v64, sigB.v0, 15 ); - softfloat_mul128To256M( sigA.v64, sigA.v0, sigB.v64, sigB.v0, sig256Z ); - sigZ.v64 = sig256Z[indexWord( 4, 3 )]; - sigZ.v0 = sig256Z[indexWord( 4, 2 )]; - shiftDist = 0; - if ( ! (sigZ.v64 & UINT64_C( 0x0100000000000000 )) ) { - --expZ; - shiftDist = -1; - } - if ( ! expC ) { - if ( ! (sigC.v64 | sigC.v0) ) { - shiftDist += 8; - goto sigZ; - } - normExpSig = softfloat_normSubnormalF128Sig( sigC.v64, sigC.v0 ); - expC = normExpSig.exp; - sigC = normExpSig.sig; - } - sigC.v64 |= UINT64_C( 0x0001000000000000 ); - sigC = softfloat_shortShiftLeft128( sigC.v64, sigC.v0, 8 ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expDiff = expZ - expC; - if ( expDiff < 0 ) { - expZ = expC; - if ( (signZ == signC) || (expDiff < -1) ) { - shiftDist -= expDiff; - if ( shiftDist ) { - sigZ = - softfloat_shiftRightJam128( sigZ.v64, sigZ.v0, shiftDist ); - } - } else { - if ( ! shiftDist ) { - x128 = - softfloat_shortShiftRight128( - sig256Z[indexWord( 4, 1 )], sig256Z[indexWord( 4, 0 )], - 1 - ); - sig256Z[indexWord( 4, 1 )] = (sigZ.v0<<63) | x128.v64; - sig256Z[indexWord( 4, 0 )] = x128.v0; - sigZ = softfloat_shortShiftRight128( sigZ.v64, sigZ.v0, 1 ); - sig256Z[indexWord( 4, 3 )] = sigZ.v64; - sig256Z[indexWord( 4, 2 )] = sigZ.v0; - } - } - } else { - if ( shiftDist ) softfloat_add256M( sig256Z, sig256Z, sig256Z ); - if ( ! expDiff ) { - sigZ.v64 = sig256Z[indexWord( 4, 3 )]; - sigZ.v0 = sig256Z[indexWord( 4, 2 )]; - } else { - sig256C[indexWord( 4, 3 )] = sigC.v64; - sig256C[indexWord( 4, 2 )] = sigC.v0; - sig256C[indexWord( 4, 1 )] = 0; - sig256C[indexWord( 4, 0 )] = 0; - softfloat_shiftRightJam256M( sig256C, expDiff, sig256C ); - } - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - shiftDist = 8; - if ( signZ == signC ) { - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - if ( expDiff <= 0 ) { - sigZ = softfloat_add128( sigC.v64, sigC.v0, sigZ.v64, sigZ.v0 ); - } else { - softfloat_add256M( sig256Z, sig256C, sig256Z ); - sigZ.v64 = sig256Z[indexWord( 4, 3 )]; - sigZ.v0 = sig256Z[indexWord( 4, 2 )]; - } - if ( sigZ.v64 & UINT64_C( 0x0200000000000000 ) ) { - ++expZ; - shiftDist = 9; - } - } else { - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - if ( expDiff < 0 ) { - signZ = signC; - if ( expDiff < -1 ) { - sigZ = - softfloat_sub128( sigC.v64, sigC.v0, sigZ.v64, sigZ.v0 ); - sigZExtra = - sig256Z[indexWord( 4, 1 )] | sig256Z[indexWord( 4, 0 )]; - if ( sigZExtra ) { - sigZ = softfloat_sub128( sigZ.v64, sigZ.v0, 0, 1 ); - } - if ( ! (sigZ.v64 & UINT64_C( 0x0100000000000000 )) ) { - --expZ; - shiftDist = 7; - } - goto shiftRightRoundPack; - } else { - sig256C[indexWord( 4, 3 )] = sigC.v64; - sig256C[indexWord( 4, 2 )] = sigC.v0; - sig256C[indexWord( 4, 1 )] = 0; - sig256C[indexWord( 4, 0 )] = 0; - softfloat_sub256M( sig256C, sig256Z, sig256Z ); - } - } else if ( ! expDiff ) { - sigZ = softfloat_sub128( sigZ.v64, sigZ.v0, sigC.v64, sigC.v0 ); - if ( - ! (sigZ.v64 | sigZ.v0) && ! sig256Z[indexWord( 4, 1 )] - && ! sig256Z[indexWord( 4, 0 )] - ) { - goto completeCancellation; - } - sig256Z[indexWord( 4, 3 )] = sigZ.v64; - sig256Z[indexWord( 4, 2 )] = sigZ.v0; - if ( sigZ.v64 & UINT64_C( 0x8000000000000000 ) ) { - signZ = ! signZ; - softfloat_sub256M( zero256, sig256Z, sig256Z ); - } - } else { - softfloat_sub256M( sig256Z, sig256C, sig256Z ); - if ( 1 < expDiff ) { - sigZ.v64 = sig256Z[indexWord( 4, 3 )]; - sigZ.v0 = sig256Z[indexWord( 4, 2 )]; - if ( ! (sigZ.v64 & UINT64_C( 0x0100000000000000 )) ) { - --expZ; - shiftDist = 7; - } - goto sigZ; - } - } - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - sigZ.v64 = sig256Z[indexWord( 4, 3 )]; - sigZ.v0 = sig256Z[indexWord( 4, 2 )]; - sigZExtra = sig256Z[indexWord( 4, 1 )]; - sig256Z0 = sig256Z[indexWord( 4, 0 )]; - if ( sigZ.v64 ) { - if ( sig256Z0 ) sigZExtra |= 1; - } else { - expZ -= 64; - sigZ.v64 = sigZ.v0; - sigZ.v0 = sigZExtra; - sigZExtra = sig256Z0; - if ( ! sigZ.v64 ) { - expZ -= 64; - sigZ.v64 = sigZ.v0; - sigZ.v0 = sigZExtra; - sigZExtra = 0; - if ( ! sigZ.v64 ) { - expZ -= 64; - sigZ.v64 = sigZ.v0; - sigZ.v0 = 0; - } - } - } - shiftDist = softfloat_countLeadingZeros64( sigZ.v64 ); - expZ += 7 - shiftDist; - shiftDist = 15 - shiftDist; - if ( 0 < shiftDist ) goto shiftRightRoundPack; - if ( shiftDist ) { - shiftDist = -shiftDist; - sigZ = softfloat_shortShiftLeft128( sigZ.v64, sigZ.v0, shiftDist ); - x128 = softfloat_shortShiftLeft128( 0, sigZExtra, shiftDist ); - sigZ.v0 |= x128.v64; - sigZExtra = x128.v0; - } - goto roundPack; - } - sigZ: - sigZExtra = sig256Z[indexWord( 4, 1 )] | sig256Z[indexWord( 4, 0 )]; - shiftRightRoundPack: - sigZExtra = (uint64_t) (sigZ.v0<<(64 - shiftDist)) | (sigZExtra != 0); - sigZ = softfloat_shortShiftRight128( sigZ.v64, sigZ.v0, shiftDist ); - roundPack: - return - softfloat_roundPackToF128( - signZ, expZ - 1, sigZ.v64, sigZ.v0, sigZExtra ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - propagateNaN_ABC: - uiZ = softfloat_propagateNaNF128UI( uiA64, uiA0, uiB64, uiB0 ); - goto propagateNaN_ZC; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - infProdArg: - if ( magBits ) { - uiZ.v64 = packToF128UI64( signZ, 0x7FFF, 0 ); - uiZ.v0 = 0; - if ( expC != 0x7FFF ) goto uiZ; - if ( sigC.v64 | sigC.v0 ) goto propagateNaN_ZC; - if ( signZ == signC ) goto uiZ; - } - softfloat_raiseFlags( softfloat_flag_invalid ); - uiZ.v64 = defaultNaNF128UI64; - uiZ.v0 = defaultNaNF128UI0; - propagateNaN_ZC: - uiZ = softfloat_propagateNaNF128UI( uiZ.v64, uiZ.v0, uiC64, uiC0 ); - goto uiZ; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - zeroProd: - uiZ.v64 = uiC64; - uiZ.v0 = uiC0; - if ( ! (expC | sigC.v64 | sigC.v0) && (signZ != signC) ) { - completeCancellation: - uiZ.v64 = - packToF128UI64( - (softfloat_roundingMode == softfloat_round_min), 0, 0 ); - uiZ.v0 = 0; - } - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/s_mulAddF128M.c b/outside/softfloat-3/source/s_mulAddF128M.c deleted file mode 100644 index 47e7e1fd3..000000000 --- a/outside/softfloat-3/source/s_mulAddF128M.c +++ /dev/null @@ -1,382 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -void - softfloat_mulAddF128M( - const uint32_t *aWPtr, - const uint32_t *bWPtr, - const uint32_t *cWPtr, - uint32_t *zWPtr, - uint_fast8_t op - ) -{ - uint32_t uiA96; - int32_t expA; - uint32_t uiB96; - int32_t expB; - uint32_t uiC96; - bool signC; - int32_t expC; - bool signProd, prodIsInfinite; - uint32_t *ptr, uiZ96, sigA[4]; - uint_fast8_t shiftDist; - uint32_t sigX[5]; - int32_t expProd; - uint32_t sigProd[8], wordSig; - bool doSub; - uint_fast8_t - (*addCarryMRoutinePtr)( - uint_fast8_t, - const uint32_t *, - const uint32_t *, - uint_fast8_t, - uint32_t * - ); - int32_t expDiff; - bool signZ; - int32_t expZ; - uint32_t *extSigPtr; - uint_fast8_t carry; - void (*roundPackRoutinePtr)( bool, int32_t, uint32_t *, uint32_t * ); - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uiA96 = aWPtr[indexWordHi( 4 )]; - expA = expF128UI96( uiA96 ); - uiB96 = bWPtr[indexWordHi( 4 )]; - expB = expF128UI96( uiB96 ); - uiC96 = cWPtr[indexWordHi( 4 )]; - signC = signF128UI96( uiC96 ) ^ (op == softfloat_mulAdd_subC); - expC = expF128UI96( uiC96 ); - signProd = - signF128UI96( uiA96 ) ^ signF128UI96( uiB96 ) - ^ (op == softfloat_mulAdd_subProd); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - prodIsInfinite = false; - if ( (expA == 0x7FFF) || (expB == 0x7FFF) ) { - if ( softfloat_tryPropagateNaNF128M( aWPtr, bWPtr, zWPtr ) ) { - goto propagateNaN_ZC; - } - ptr = (uint32_t *) aWPtr; - if ( ! (uint32_t) (uiA96<<1) ) goto possibleInvalidProd; - if ( ! (uint32_t) (uiB96<<1) ) { - ptr = (uint32_t *) bWPtr; - possibleInvalidProd: - if ( - ! (ptr[indexWord( 4, 2 )] | ptr[indexWord( 4, 1 )] - | ptr[indexWord( 4, 0 )]) - ) { - goto invalid; - } - } - prodIsInfinite = true; - } - if ( expC == 0x7FFF ) { - if ( - fracF128UI96( uiC96 ) - || (cWPtr[indexWord( 4, 2 )] | cWPtr[indexWord( 4, 1 )] - | cWPtr[indexWord( 4, 0 )]) - ) { - zWPtr[indexWordHi( 4 )] = 0; - goto propagateNaN_ZC; - } - if ( prodIsInfinite && (signProd != signC) ) goto invalid; - goto copyC; - } - if ( prodIsInfinite ) { - uiZ96 = packToF128UI96( signProd, 0x7FFF, 0 ); - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( expA ) { - sigA[indexWordHi( 4 )] = fracF128UI96( uiA96 ) | 0x00010000; - sigA[indexWord( 4, 2 )] = aWPtr[indexWord( 4, 2 )]; - sigA[indexWord( 4, 1 )] = aWPtr[indexWord( 4, 1 )]; - sigA[indexWord( 4, 0 )] = aWPtr[indexWord( 4, 0 )]; - } else { - expA = softfloat_shiftNormSigF128M( aWPtr, 0, sigA ); - if ( expA == -128 ) goto zeroProd; - } - if ( expB ) { - sigX[indexWordHi( 4 )] = fracF128UI96( uiB96 ) | 0x00010000; - sigX[indexWord( 4, 2 )] = bWPtr[indexWord( 4, 2 )]; - sigX[indexWord( 4, 1 )] = bWPtr[indexWord( 4, 1 )]; - sigX[indexWord( 4, 0 )] = bWPtr[indexWord( 4, 0 )]; - } else { - expB = softfloat_shiftNormSigF128M( bWPtr, 0, sigX ); - if ( expB == -128 ) goto zeroProd; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expProd = expA + expB - 0x3FF0; - softfloat_mul128MTo256M( sigA, sigX, sigProd ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - wordSig = fracF128UI96( uiC96 ); - if ( expC ) { - --expC; - wordSig |= 0x00010000; - } - sigX[indexWordHi( 5 )] = wordSig; - sigX[indexWord( 5, 3 )] = cWPtr[indexWord( 4, 2 )]; - sigX[indexWord( 5, 2 )] = cWPtr[indexWord( 4, 1 )]; - sigX[indexWord( 5, 1 )] = cWPtr[indexWord( 4, 0 )]; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - doSub = (signProd != signC); - addCarryMRoutinePtr = - doSub ? softfloat_addComplCarryM : softfloat_addCarryM; - expDiff = expProd - expC; - if ( expDiff <= 0 ) { - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - signZ = signC; - expZ = expC; - if ( - sigProd[indexWord( 8, 2 )] - || (sigProd[indexWord( 8, 1 )] | sigProd[indexWord( 8, 0 )]) - ) { - sigProd[indexWord( 8, 3 )] |= 1; - } - extSigPtr = &sigProd[indexMultiwordHi( 8, 5 )]; - if ( expDiff ) { - softfloat_shiftRightJam160M( extSigPtr, -expDiff, extSigPtr ); - } - carry = 0; - if ( doSub ) { - wordSig = extSigPtr[indexWordLo( 5 )]; - extSigPtr[indexWordLo( 5 )] = -wordSig; - carry = ! wordSig; - } - (*addCarryMRoutinePtr)( - 4, - &sigX[indexMultiwordHi( 5, 4 )], - extSigPtr + indexMultiwordHi( 5, 4 ), - carry, - extSigPtr + indexMultiwordHi( 5, 4 ) - ); - wordSig = extSigPtr[indexWordHi( 5 )]; - if ( ! expZ ) { - if ( wordSig & 0x80000000 ) { - signZ = ! signZ; - softfloat_negX160M( extSigPtr ); - wordSig = extSigPtr[indexWordHi( 5 )]; - } - goto checkCancellation; - } - if ( wordSig < 0x00010000 ) { - --expZ; - softfloat_add160M( extSigPtr, extSigPtr, extSigPtr ); - goto roundPack; - } - goto extSigReady_noCancellation; - } else { - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - signZ = signProd; - expZ = expProd; - sigX[indexWordLo( 5 )] = 0; - expDiff -= 128; - if ( 0 <= expDiff ) { - /*---------------------------------------------------------------- - *----------------------------------------------------------------*/ - if ( expDiff ) softfloat_shiftRightJam160M( sigX, expDiff, sigX ); - wordSig = sigX[indexWordLo( 5 )]; - carry = 0; - if ( doSub ) { - carry = ! wordSig; - wordSig = -wordSig; - } - carry = - (*addCarryMRoutinePtr)( - 4, - &sigProd[indexMultiwordLo( 8, 4 )], - &sigX[indexMultiwordHi( 5, 4 )], - carry, - &sigProd[indexMultiwordLo( 8, 4 )] - ); - sigProd[indexWord( 8, 2 )] |= wordSig; - ptr = &sigProd[indexWord( 8, 4 )]; - } else { - /*---------------------------------------------------------------- - *----------------------------------------------------------------*/ - shiftDist = expDiff & 31; - if ( shiftDist ) { - softfloat_shortShiftRight160M( sigX, shiftDist, sigX ); - } - expDiff >>= 5; - extSigPtr = - &sigProd[indexMultiwordLo( 8, 5 )] - wordIncr - + expDiff * -wordIncr; - carry = - (*addCarryMRoutinePtr)( 5, extSigPtr, sigX, doSub, extSigPtr ); - if ( expDiff == -4 ) { - /*------------------------------------------------------------ - *------------------------------------------------------------*/ - wordSig = sigProd[indexWordHi( 8 )]; - if ( wordSig & 0x80000000 ) { - signZ = ! signZ; - softfloat_negX256M( sigProd ); - wordSig = sigProd[indexWordHi( 8 )]; - } - /*------------------------------------------------------------ - *------------------------------------------------------------*/ - if ( wordSig ) goto expProdBigger_noWordShift; - wordSig = sigProd[indexWord( 8, 6 )]; - if ( 0x00040000 <= wordSig ) goto expProdBigger_noWordShift; - expZ -= 32; - extSigPtr = &sigProd[indexMultiwordHi( 8, 5 )] - wordIncr; - for (;;) { - if ( wordSig ) break; - wordSig = extSigPtr[indexWord( 5, 3 )]; - if ( 0x00040000 <= wordSig ) break; - expZ -= 32; - extSigPtr -= wordIncr; - if ( extSigPtr == &sigProd[indexMultiwordLo( 8, 5 )] ) { - goto checkCancellation; - } - } - /*------------------------------------------------------------ - *------------------------------------------------------------*/ - ptr = extSigPtr + indexWordLo( 5 ); - do { - ptr -= wordIncr; - if ( *ptr ) { - extSigPtr[indexWordLo( 5 )] |= 1; - break; - } - } while ( ptr != &sigProd[indexWordLo( 8 )] ); - wordSig = extSigPtr[indexWordHi( 5 )]; - goto extSigReady; - } - ptr = extSigPtr + indexWordHi( 5 ) + wordIncr; - } - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - if ( carry != doSub ) { - if ( doSub ) { - do { - wordSig = *ptr; - *ptr = wordSig - 1; - ptr += wordIncr; - } while ( ! wordSig ); - } else { - do { - wordSig = *ptr + 1; - *ptr = wordSig; - ptr += wordIncr; - } while ( ! wordSig ); - } - } - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - expProdBigger_noWordShift: - if ( - sigProd[indexWord( 8, 2 )] - || (sigProd[indexWord( 8, 1 )] | sigProd[indexWord( 8, 0 )]) - ) { - sigProd[indexWord( 8, 3 )] |= 1; - } - extSigPtr = &sigProd[indexMultiwordHi( 8, 5 )]; - wordSig = extSigPtr[indexWordHi( 5 )]; - } - extSigReady: - roundPackRoutinePtr = softfloat_normRoundPackMToF128M; - if ( wordSig < 0x00010000 ) goto doRoundPack; - extSigReady_noCancellation: - if ( 0x00020000 <= wordSig ) { - ++expZ; - softfloat_shortShiftRightJam160M( extSigPtr, 1, extSigPtr ); - } - roundPack: - roundPackRoutinePtr = softfloat_roundPackMToF128M; - doRoundPack: - (*roundPackRoutinePtr)( signZ, expZ, extSigPtr, zWPtr ); - return; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - invalid: - softfloat_invalidF128M( zWPtr ); - propagateNaN_ZC: - softfloat_propagateNaNF128M( zWPtr, cWPtr, zWPtr ); - return; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - zeroProd: - if ( - ! (uint32_t) (uiC96<<1) && (signProd != signC) - && ! cWPtr[indexWord( 4, 2 )] - && ! (cWPtr[indexWord( 4, 1 )] | cWPtr[indexWord( 4, 0 )]) - ) { - goto completeCancellation; - } - copyC: - zWPtr[indexWordHi( 4 )] = uiC96; - zWPtr[indexWord( 4, 2 )] = cWPtr[indexWord( 4, 2 )]; - zWPtr[indexWord( 4, 1 )] = cWPtr[indexWord( 4, 1 )]; - zWPtr[indexWord( 4, 0 )] = cWPtr[indexWord( 4, 0 )]; - return; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - checkCancellation: - if ( - wordSig - || (extSigPtr[indexWord( 5, 3 )] | extSigPtr[indexWord( 5, 2 )]) - || (extSigPtr[indexWord( 5, 1 )] | extSigPtr[indexWord( 5, 0 )]) - ) { - goto extSigReady; - } - completeCancellation: - uiZ96 = - packToF128UI96( - (softfloat_roundingMode == softfloat_round_min), 0, 0 ); - uiZ: - zWPtr[indexWordHi( 4 )] = uiZ96; - zWPtr[indexWord( 4, 2 )] = 0; - zWPtr[indexWord( 4, 1 )] = 0; - zWPtr[indexWord( 4, 0 )] = 0; - -} - diff --git a/outside/softfloat-3/source/s_mulAddF16.c b/outside/softfloat-3/source/s_mulAddF16.c deleted file mode 100644 index e6663b1ce..000000000 --- a/outside/softfloat-3/source/s_mulAddF16.c +++ /dev/null @@ -1,226 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -float16_t - softfloat_mulAddF16( - uint_fast16_t uiA, uint_fast16_t uiB, uint_fast16_t uiC, uint_fast8_t op ) -{ - bool signA; - int_fast8_t expA; - uint_fast16_t sigA; - bool signB; - int_fast8_t expB; - uint_fast16_t sigB; - bool signC; - int_fast8_t expC; - uint_fast16_t sigC; - bool signProd; - uint_fast16_t magBits, uiZ; - struct exp8_sig16 normExpSig; - int_fast8_t expProd; - uint_fast32_t sigProd; - bool signZ; - int_fast8_t expZ; - uint_fast16_t sigZ; - int_fast8_t expDiff; - uint_fast32_t sig32Z, sig32C; - int_fast8_t shiftDist; - union ui16_f16 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - signA = signF16UI( uiA ); - expA = expF16UI( uiA ); - sigA = fracF16UI( uiA ); - signB = signF16UI( uiB ); - expB = expF16UI( uiB ); - sigB = fracF16UI( uiB ); - signC = signF16UI( uiC ) ^ (op == softfloat_mulAdd_subC); - expC = expF16UI( uiC ); - sigC = fracF16UI( uiC ); - signProd = signA ^ signB ^ (op == softfloat_mulAdd_subProd); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( expA == 0x1F ) { - if ( sigA || ((expB == 0x1F) && sigB) ) goto propagateNaN_ABC; - magBits = expB | sigB; - goto infProdArg; - } - if ( expB == 0x1F ) { - if ( sigB ) goto propagateNaN_ABC; - magBits = expA | sigA; - goto infProdArg; - } - if ( expC == 0x1F ) { - if ( sigC ) { - uiZ = 0; - goto propagateNaN_ZC; - } - uiZ = uiC; - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! expA ) { - if ( ! sigA ) goto zeroProd; - normExpSig = softfloat_normSubnormalF16Sig( sigA ); - expA = normExpSig.exp; - sigA = normExpSig.sig; - } - if ( ! expB ) { - if ( ! sigB ) goto zeroProd; - normExpSig = softfloat_normSubnormalF16Sig( sigB ); - expB = normExpSig.exp; - sigB = normExpSig.sig; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expProd = expA + expB - 0xE; - sigA = (sigA | 0x0400)<<4; - sigB = (sigB | 0x0400)<<4; - sigProd = (uint_fast32_t) sigA * sigB; - if ( sigProd < 0x20000000 ) { - --expProd; - sigProd <<= 1; - } - signZ = signProd; - if ( ! expC ) { - if ( ! sigC ) { - expZ = expProd - 1; - sigZ = sigProd>>15 | ((sigProd & 0x7FFF) != 0); - goto roundPack; - } - normExpSig = softfloat_normSubnormalF16Sig( sigC ); - expC = normExpSig.exp; - sigC = normExpSig.sig; - } - sigC = (sigC | 0x0400)<<3; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expDiff = expProd - expC; - if ( signProd == signC ) { - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - if ( expDiff <= 0 ) { - expZ = expC; - sigZ = sigC + softfloat_shiftRightJam32( sigProd, 16 - expDiff ); - } else { - expZ = expProd; - sig32Z = - sigProd - + softfloat_shiftRightJam32( - (uint_fast32_t) sigC<<16, expDiff ); - sigZ = sig32Z>>16 | ((sig32Z & 0xFFFF) != 0 ); - } - if ( sigZ < 0x4000 ) { - --expZ; - sigZ <<= 1; - } - } else { - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - sig32C = (uint_fast32_t) sigC<<16; - if ( expDiff < 0 ) { - signZ = signC; - expZ = expC; - sig32Z = sig32C - softfloat_shiftRightJam32( sigProd, -expDiff ); - } else if ( ! expDiff ) { - expZ = expProd; - sig32Z = sigProd - sig32C; - if ( ! sig32Z ) goto completeCancellation; - if ( sig32Z & 0x80000000 ) { - signZ = ! signZ; - sig32Z = -sig32Z; - } - } else { - expZ = expProd; - sig32Z = sigProd - softfloat_shiftRightJam32( sig32C, expDiff ); - } - shiftDist = softfloat_countLeadingZeros32( sig32Z ) - 1; - expZ -= shiftDist; - shiftDist -= 16; - if ( shiftDist < 0 ) { - sigZ = - sig32Z>>(-shiftDist) - | ((uint32_t) (sig32Z<<(shiftDist & 31)) != 0); - } else { - sigZ = (uint_fast16_t) sig32Z< -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -float32_t - softfloat_mulAddF32( - uint_fast32_t uiA, uint_fast32_t uiB, uint_fast32_t uiC, uint_fast8_t op ) -{ - bool signA; - int_fast16_t expA; - uint_fast32_t sigA; - bool signB; - int_fast16_t expB; - uint_fast32_t sigB; - bool signC; - int_fast16_t expC; - uint_fast32_t sigC; - bool signProd; - uint_fast32_t magBits, uiZ; - struct exp16_sig32 normExpSig; - int_fast16_t expProd; - uint_fast64_t sigProd; - bool signZ; - int_fast16_t expZ; - uint_fast32_t sigZ; - int_fast16_t expDiff; - uint_fast64_t sig64Z, sig64C; - int_fast8_t shiftDist; - union ui32_f32 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - signA = signF32UI( uiA ); - expA = expF32UI( uiA ); - sigA = fracF32UI( uiA ); - signB = signF32UI( uiB ); - expB = expF32UI( uiB ); - sigB = fracF32UI( uiB ); - signC = signF32UI( uiC ) ^ (op == softfloat_mulAdd_subC); - expC = expF32UI( uiC ); - sigC = fracF32UI( uiC ); - signProd = signA ^ signB ^ (op == softfloat_mulAdd_subProd); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( expA == 0xFF ) { - if ( sigA || ((expB == 0xFF) && sigB) ) goto propagateNaN_ABC; - magBits = expB | sigB; - goto infProdArg; - } - if ( expB == 0xFF ) { - if ( sigB ) goto propagateNaN_ABC; - magBits = expA | sigA; - goto infProdArg; - } - if ( expC == 0xFF ) { - if ( sigC ) { - uiZ = 0; - goto propagateNaN_ZC; - } - uiZ = uiC; - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! expA ) { - if ( ! sigA ) goto zeroProd; - normExpSig = softfloat_normSubnormalF32Sig( sigA ); - expA = normExpSig.exp; - sigA = normExpSig.sig; - } - if ( ! expB ) { - if ( ! sigB ) goto zeroProd; - normExpSig = softfloat_normSubnormalF32Sig( sigB ); - expB = normExpSig.exp; - sigB = normExpSig.sig; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expProd = expA + expB - 0x7E; - sigA = (sigA | 0x00800000)<<7; - sigB = (sigB | 0x00800000)<<7; - sigProd = (uint_fast64_t) sigA * sigB; - if ( sigProd < UINT64_C( 0x2000000000000000 ) ) { - --expProd; - sigProd <<= 1; - } - signZ = signProd; - if ( ! expC ) { - if ( ! sigC ) { - expZ = expProd - 1; - sigZ = softfloat_shortShiftRightJam64( sigProd, 31 ); - goto roundPack; - } - normExpSig = softfloat_normSubnormalF32Sig( sigC ); - expC = normExpSig.exp; - sigC = normExpSig.sig; - } - sigC = (sigC | 0x00800000)<<6; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expDiff = expProd - expC; - if ( signProd == signC ) { - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - if ( expDiff <= 0 ) { - expZ = expC; - sigZ = sigC + softfloat_shiftRightJam64( sigProd, 32 - expDiff ); - } else { - expZ = expProd; - sig64Z = - sigProd - + softfloat_shiftRightJam64( - (uint_fast64_t) sigC<<32, expDiff ); - sigZ = softfloat_shortShiftRightJam64( sig64Z, 32 ); - } - if ( sigZ < 0x40000000 ) { - --expZ; - sigZ <<= 1; - } - } else { - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - sig64C = (uint_fast64_t) sigC<<32; - if ( expDiff < 0 ) { - signZ = signC; - expZ = expC; - sig64Z = sig64C - softfloat_shiftRightJam64( sigProd, -expDiff ); - } else if ( ! expDiff ) { - expZ = expProd; - sig64Z = sigProd - sig64C; - if ( ! sig64Z ) goto completeCancellation; - if ( sig64Z & UINT64_C( 0x8000000000000000 ) ) { - signZ = ! signZ; - sig64Z = -sig64Z; - } - } else { - expZ = expProd; - sig64Z = sigProd - softfloat_shiftRightJam64( sig64C, expDiff ); - } - shiftDist = softfloat_countLeadingZeros64( sig64Z ) - 1; - expZ -= shiftDist; - shiftDist -= 32; - if ( shiftDist < 0 ) { - sigZ = softfloat_shortShiftRightJam64( sig64Z, -shiftDist ); - } else { - sigZ = (uint_fast32_t) sig64Z< -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -float64_t - softfloat_mulAddF64( - uint_fast64_t uiA, uint_fast64_t uiB, uint_fast64_t uiC, uint_fast8_t op ) -{ - bool signA; - int_fast16_t expA; - uint_fast64_t sigA; - bool signB; - int_fast16_t expB; - uint_fast64_t sigB; - bool signC; - int_fast16_t expC; - uint_fast64_t sigC; - bool signZ; - uint_fast64_t magBits, uiZ; - struct exp16_sig64 normExpSig; - int_fast16_t expZ; - struct uint128 sig128Z; - uint_fast64_t sigZ; - int_fast16_t expDiff; - struct uint128 sig128C; - int_fast8_t shiftDist; - union ui64_f64 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - signA = signF64UI( uiA ); - expA = expF64UI( uiA ); - sigA = fracF64UI( uiA ); - signB = signF64UI( uiB ); - expB = expF64UI( uiB ); - sigB = fracF64UI( uiB ); - signC = signF64UI( uiC ) ^ (op == softfloat_mulAdd_subC); - expC = expF64UI( uiC ); - sigC = fracF64UI( uiC ); - signZ = signA ^ signB ^ (op == softfloat_mulAdd_subProd); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( expA == 0x7FF ) { - if ( sigA || ((expB == 0x7FF) && sigB) ) goto propagateNaN_ABC; - magBits = expB | sigB; - goto infProdArg; - } - if ( expB == 0x7FF ) { - if ( sigB ) goto propagateNaN_ABC; - magBits = expA | sigA; - goto infProdArg; - } - if ( expC == 0x7FF ) { - if ( sigC ) { - uiZ = 0; - goto propagateNaN_ZC; - } - uiZ = uiC; - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! expA ) { - if ( ! sigA ) goto zeroProd; - normExpSig = softfloat_normSubnormalF64Sig( sigA ); - expA = normExpSig.exp; - sigA = normExpSig.sig; - } - if ( ! expB ) { - if ( ! sigB ) goto zeroProd; - normExpSig = softfloat_normSubnormalF64Sig( sigB ); - expB = normExpSig.exp; - sigB = normExpSig.sig; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expZ = expA + expB - 0x3FE; - sigA = (sigA | UINT64_C( 0x0010000000000000 ))<<10; - sigB = (sigB | UINT64_C( 0x0010000000000000 ))<<10; - sig128Z = softfloat_mul64To128( sigA, sigB ); - if ( sig128Z.v64 < UINT64_C( 0x2000000000000000 ) ) { - --expZ; - sig128Z = - softfloat_add128( - sig128Z.v64, sig128Z.v0, sig128Z.v64, sig128Z.v0 ); - } - if ( ! expC ) { - if ( ! sigC ) { - --expZ; - sigZ = sig128Z.v64<<1 | (sig128Z.v0 != 0); - goto roundPack; - } - normExpSig = softfloat_normSubnormalF64Sig( sigC ); - expC = normExpSig.exp; - sigC = normExpSig.sig; - } - sigC = (sigC | UINT64_C( 0x0010000000000000 ))<<9; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expDiff = expZ - expC; - if ( expDiff < 0 ) { - expZ = expC; - if ( (signZ == signC) || (expDiff < -1) ) { - sig128Z.v64 = softfloat_shiftRightJam64( sig128Z.v64, -expDiff ); - } else { - sig128Z = - softfloat_shortShiftRightJam128( sig128Z.v64, sig128Z.v0, 1 ); - } - } else if ( expDiff ) { - sig128C = softfloat_shiftRightJam128( sigC, 0, expDiff ); - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( signZ == signC ) { - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - if ( expDiff <= 0 ) { - sigZ = (sigC + sig128Z.v64) | (sig128Z.v0 != 0); - } else { - sig128Z = - softfloat_add128( - sig128Z.v64, sig128Z.v0, sig128C.v64, sig128C.v0 ); - sigZ = sig128Z.v64 | (sig128Z.v0 != 0); - } - if ( sigZ < UINT64_C( 0x4000000000000000 ) ) { - --expZ; - sigZ <<= 1; - } - } else { - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - if ( expDiff < 0 ) { - signZ = signC; - sig128Z = softfloat_sub128( sigC, 0, sig128Z.v64, sig128Z.v0 ); - } else if ( ! expDiff ) { - sig128Z.v64 = sig128Z.v64 - sigC; - if ( ! (sig128Z.v64 | sig128Z.v0) ) goto completeCancellation; - if ( sig128Z.v64 & UINT64_C( 0x8000000000000000 ) ) { - signZ = ! signZ; - sig128Z = softfloat_sub128( 0, 0, sig128Z.v64, sig128Z.v0 ); - } - } else { - sig128Z = - softfloat_sub128( - sig128Z.v64, sig128Z.v0, sig128C.v64, sig128C.v0 ); - } - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - if ( ! sig128Z.v64 ) { - expZ -= 64; - sig128Z.v64 = sig128Z.v0; - sig128Z.v0 = 0; - } - shiftDist = softfloat_countLeadingZeros64( sig128Z.v64 ) - 1; - expZ -= shiftDist; - if ( shiftDist < 0 ) { - sigZ = softfloat_shortShiftRightJam64( sig128Z.v64, -shiftDist ); - } else { - sig128Z = - softfloat_shortShiftLeft128( - sig128Z.v64, sig128Z.v0, shiftDist ); - sigZ = sig128Z.v64; - } - sigZ |= (sig128Z.v0 != 0); - } - roundPack: - return softfloat_roundPackToF64( signZ, expZ, sigZ ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - propagateNaN_ABC: - uiZ = softfloat_propagateNaNF64UI( uiA, uiB ); - goto propagateNaN_ZC; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - infProdArg: - if ( magBits ) { - uiZ = packToF64UI( signZ, 0x7FF, 0 ); - if ( expC != 0x7FF ) goto uiZ; - if ( sigC ) goto propagateNaN_ZC; - if ( signZ == signC ) goto uiZ; - } - softfloat_raiseFlags( softfloat_flag_invalid ); - uiZ = defaultNaNF64UI; - propagateNaN_ZC: - uiZ = softfloat_propagateNaNF64UI( uiZ, uiC ); - goto uiZ; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - zeroProd: - uiZ = uiC; - if ( ! (expC | sigC) && (signZ != signC) ) { - completeCancellation: - uiZ = - packToF64UI( - (softfloat_roundingMode == softfloat_round_min), 0, 0 ); - } - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - -#else - -float64_t - softfloat_mulAddF64( - uint_fast64_t uiA, uint_fast64_t uiB, uint_fast64_t uiC, uint_fast8_t op ) -{ - bool signA; - int_fast16_t expA; - uint64_t sigA; - bool signB; - int_fast16_t expB; - uint64_t sigB; - bool signC; - int_fast16_t expC; - uint64_t sigC; - bool signZ; - uint64_t magBits, uiZ; - struct exp16_sig64 normExpSig; - int_fast16_t expZ; - uint32_t sig128Z[4]; - uint64_t sigZ; - int_fast16_t shiftDist, expDiff; - uint32_t sig128C[4]; - union ui64_f64 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - signA = signF64UI( uiA ); - expA = expF64UI( uiA ); - sigA = fracF64UI( uiA ); - signB = signF64UI( uiB ); - expB = expF64UI( uiB ); - sigB = fracF64UI( uiB ); - signC = signF64UI( uiC ) ^ (op == softfloat_mulAdd_subC); - expC = expF64UI( uiC ); - sigC = fracF64UI( uiC ); - signZ = signA ^ signB ^ (op == softfloat_mulAdd_subProd); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( expA == 0x7FF ) { - if ( sigA || ((expB == 0x7FF) && sigB) ) goto propagateNaN_ABC; - magBits = expB | sigB; - goto infProdArg; - } - if ( expB == 0x7FF ) { - if ( sigB ) goto propagateNaN_ABC; - magBits = expA | sigA; - goto infProdArg; - } - if ( expC == 0x7FF ) { - if ( sigC ) { - uiZ = 0; - goto propagateNaN_ZC; - } - uiZ = uiC; - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( ! expA ) { - if ( ! sigA ) goto zeroProd; - normExpSig = softfloat_normSubnormalF64Sig( sigA ); - expA = normExpSig.exp; - sigA = normExpSig.sig; - } - if ( ! expB ) { - if ( ! sigB ) goto zeroProd; - normExpSig = softfloat_normSubnormalF64Sig( sigB ); - expB = normExpSig.exp; - sigB = normExpSig.sig; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expZ = expA + expB - 0x3FE; - sigA = (sigA | UINT64_C( 0x0010000000000000 ))<<10; - sigB = (sigB | UINT64_C( 0x0010000000000000 ))<<11; - softfloat_mul64To128M( sigA, sigB, sig128Z ); - sigZ = - (uint64_t) sig128Z[indexWord( 4, 3 )]<<32 | sig128Z[indexWord( 4, 2 )]; - shiftDist = 0; - if ( ! (sigZ & UINT64_C( 0x4000000000000000 )) ) { - --expZ; - shiftDist = -1; - } - if ( ! expC ) { - if ( ! sigC ) { - if ( shiftDist ) sigZ <<= 1; - goto sigZ; - } - normExpSig = softfloat_normSubnormalF64Sig( sigC ); - expC = normExpSig.exp; - sigC = normExpSig.sig; - } - sigC = (sigC | UINT64_C( 0x0010000000000000 ))<<10; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expDiff = expZ - expC; - if ( expDiff < 0 ) { - expZ = expC; - if ( (signZ == signC) || (expDiff < -1) ) { - shiftDist -= expDiff; - if ( shiftDist) { - sigZ = softfloat_shiftRightJam64( sigZ, shiftDist ); - } - } else { - if ( ! shiftDist ) { - softfloat_shortShiftRight128M( sig128Z, 1, sig128Z ); - } - } - } else { - if ( shiftDist ) softfloat_add128M( sig128Z, sig128Z, sig128Z ); - if ( ! expDiff ) { - sigZ = - (uint64_t) sig128Z[indexWord( 4, 3 )]<<32 - | sig128Z[indexWord( 4, 2 )]; - } else { - sig128C[indexWord( 4, 3 )] = sigC>>32; - sig128C[indexWord( 4, 2 )] = sigC; - sig128C[indexWord( 4, 1 )] = 0; - sig128C[indexWord( 4, 0 )] = 0; - softfloat_shiftRightJam128M( sig128C, expDiff, sig128C ); - } - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( signZ == signC ) { - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - if ( expDiff <= 0 ) { - sigZ += sigC; - } else { - softfloat_add128M( sig128Z, sig128C, sig128Z ); - sigZ = - (uint64_t) sig128Z[indexWord( 4, 3 )]<<32 - | sig128Z[indexWord( 4, 2 )]; - } - if ( sigZ & UINT64_C( 0x8000000000000000 ) ) { - ++expZ; - sigZ = softfloat_shortShiftRightJam64( sigZ, 1 ); - } - } else { - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - if ( expDiff < 0 ) { - signZ = signC; - if ( expDiff < -1 ) { - sigZ = sigC - sigZ; - if ( - sig128Z[indexWord( 4, 1 )] || sig128Z[indexWord( 4, 0 )] - ) { - sigZ = (sigZ - 1) | 1; - } - if ( ! (sigZ & UINT64_C( 0x4000000000000000 )) ) { - --expZ; - sigZ <<= 1; - } - goto roundPack; - } else { - sig128C[indexWord( 4, 3 )] = sigC>>32; - sig128C[indexWord( 4, 2 )] = sigC; - sig128C[indexWord( 4, 1 )] = 0; - sig128C[indexWord( 4, 0 )] = 0; - softfloat_sub128M( sig128C, sig128Z, sig128Z ); - } - } else if ( ! expDiff ) { - sigZ -= sigC; - if ( - ! sigZ && ! sig128Z[indexWord( 4, 1 )] - && ! sig128Z[indexWord( 4, 0 )] - ) { - goto completeCancellation; - } - sig128Z[indexWord( 4, 3 )] = sigZ>>32; - sig128Z[indexWord( 4, 2 )] = sigZ; - if ( sigZ & UINT64_C( 0x8000000000000000 ) ) { - signZ = ! signZ; - softfloat_negX128M( sig128Z ); - } - } else { - softfloat_sub128M( sig128Z, sig128C, sig128Z ); - if ( 1 < expDiff ) { - sigZ = - (uint64_t) sig128Z[indexWord( 4, 3 )]<<32 - | sig128Z[indexWord( 4, 2 )]; - if ( ! (sigZ & UINT64_C( 0x4000000000000000 )) ) { - --expZ; - sigZ <<= 1; - } - goto sigZ; - } - } - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - shiftDist = 0; - sigZ = - (uint64_t) sig128Z[indexWord( 4, 3 )]<<32 - | sig128Z[indexWord( 4, 2 )]; - if ( ! sigZ ) { - shiftDist = 64; - sigZ = - (uint64_t) sig128Z[indexWord( 4, 1 )]<<32 - | sig128Z[indexWord( 4, 0 )]; - } - shiftDist += softfloat_countLeadingZeros64( sigZ ) - 1; - if ( shiftDist ) { - expZ -= shiftDist; - softfloat_shiftLeft128M( sig128Z, shiftDist, sig128Z ); - sigZ = - (uint64_t) sig128Z[indexWord( 4, 3 )]<<32 - | sig128Z[indexWord( 4, 2 )]; - } - } - sigZ: - if ( sig128Z[indexWord( 4, 1 )] || sig128Z[indexWord( 4, 0 )] ) sigZ |= 1; - roundPack: - return softfloat_roundPackToF64( signZ, expZ - 1, sigZ ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - propagateNaN_ABC: - uiZ = softfloat_propagateNaNF64UI( uiA, uiB ); - goto propagateNaN_ZC; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - infProdArg: - if ( magBits ) { - uiZ = packToF64UI( signZ, 0x7FF, 0 ); - if ( expC != 0x7FF ) goto uiZ; - if ( sigC ) goto propagateNaN_ZC; - if ( signZ == signC ) goto uiZ; - } - softfloat_raiseFlags( softfloat_flag_invalid ); - uiZ = defaultNaNF64UI; - propagateNaN_ZC: - uiZ = softfloat_propagateNaNF64UI( uiZ, uiC ); - goto uiZ; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - zeroProd: - uiZ = uiC; - if ( ! (expC | sigC) && (signZ != signC) ) { - completeCancellation: - uiZ = - packToF64UI( - (softfloat_roundingMode == softfloat_round_min), 0, 0 ); - } - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - -#endif - diff --git a/outside/softfloat-3/source/s_negXM.c b/outside/softfloat-3/source/s_negXM.c deleted file mode 100644 index be7b215d3..000000000 --- a/outside/softfloat-3/source/s_negXM.c +++ /dev/null @@ -1,63 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "primitiveTypes.h" - -#ifndef softfloat_negXM - -void softfloat_negXM( uint_fast8_t size_words, uint32_t *zPtr ) -{ - unsigned int index, lastIndex; - uint_fast8_t carry; - uint32_t word; - - index = indexWordLo( size_words ); - lastIndex = indexWordHi( size_words ); - carry = 1; - for (;;) { - word = ~zPtr[index] + carry; - zPtr[index] = word; - if ( index == lastIndex ) break; - index += wordIncr; - if ( word ) carry = 0; - } - -} - -#endif - diff --git a/outside/softfloat-3/source/s_normExtF80SigM.c b/outside/softfloat-3/source/s_normExtF80SigM.c deleted file mode 100644 index 6dff69b71..000000000 --- a/outside/softfloat-3/source/s_normExtF80SigM.c +++ /dev/null @@ -1,52 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "internals.h" - -int softfloat_normExtF80SigM( uint64_t *sigPtr ) -{ - uint64_t sig; - int_fast8_t shiftDist; - - sig = *sigPtr; - shiftDist = softfloat_countLeadingZeros64( sig ); - *sigPtr = sig< -#include -#include "platform.h" -#include "internals.h" - -void - softfloat_normRoundPackMToExtF80M( - bool sign, - int32_t exp, - uint32_t *extSigPtr, - uint_fast8_t roundingPrecision, - struct extFloat80M *zSPtr - ) -{ - int_fast16_t shiftDist; - uint32_t wordSig; - - shiftDist = 0; - wordSig = extSigPtr[indexWord( 3, 2 )]; - if ( ! wordSig ) { - shiftDist = 32; - wordSig = extSigPtr[indexWord( 3, 1 )]; - if ( ! wordSig ) { - shiftDist = 64; - wordSig = extSigPtr[indexWord( 3, 0 )]; - if ( ! wordSig ) { - zSPtr->signExp = packToExtF80UI64( sign, 0 ); - zSPtr->signif = 0; - return; - } - } - } - shiftDist += softfloat_countLeadingZeros32( wordSig ); - if ( shiftDist ) { - exp -= shiftDist; - softfloat_shiftLeft96M( extSigPtr, shiftDist, extSigPtr ); - } - softfloat_roundPackMToExtF80M( - sign, exp, extSigPtr, roundingPrecision, zSPtr ); - -} - diff --git a/outside/softfloat-3/source/s_normRoundPackMToF128M.c b/outside/softfloat-3/source/s_normRoundPackMToF128M.c deleted file mode 100644 index 3f780bc4a..000000000 --- a/outside/softfloat-3/source/s_normRoundPackMToF128M.c +++ /dev/null @@ -1,73 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" - -void - softfloat_normRoundPackMToF128M( - bool sign, int32_t exp, uint32_t *extSigPtr, uint32_t *zWPtr ) -{ - const uint32_t *ptr; - int_fast16_t shiftDist; - uint32_t wordSig; - - ptr = extSigPtr + indexWordHi( 5 ); - shiftDist = 0; - for (;;) { - wordSig = *ptr; - if ( wordSig ) break; - shiftDist += 32; - if ( 160 <= shiftDist ) { - zWPtr[indexWordHi( 4 )] = packToF128UI96( sign, 0, 0 ); - zWPtr[indexWord( 4, 2 )] = 0; - zWPtr[indexWord( 4, 1 )] = 0; - zWPtr[indexWord( 4, 0 )] = 0; - return; - } - ptr -= wordIncr; - } - shiftDist += softfloat_countLeadingZeros32( wordSig ) - 15; - if ( shiftDist ) { - exp -= shiftDist; - softfloat_shiftLeft160M( extSigPtr, shiftDist, extSigPtr ); - } - softfloat_roundPackMToF128M( sign, exp, extSigPtr, zWPtr ); - -} - diff --git a/outside/softfloat-3/source/s_normRoundPackToExtF80.c b/outside/softfloat-3/source/s_normRoundPackToExtF80.c deleted file mode 100644 index 23916cb50..000000000 --- a/outside/softfloat-3/source/s_normRoundPackToExtF80.c +++ /dev/null @@ -1,71 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" - -extFloat80_t - softfloat_normRoundPackToExtF80( - bool sign, - int_fast32_t exp, - uint_fast64_t sig, - uint_fast64_t sigExtra, - uint_fast8_t roundingPrecision - ) -{ - int_fast8_t shiftDist; - struct uint128 sig128; - - if ( ! sig ) { - exp -= 64; - sig = sigExtra; - sigExtra = 0; - } - shiftDist = softfloat_countLeadingZeros64( sig ); - exp -= shiftDist; - if ( shiftDist ) { - sig128 = softfloat_shortShiftLeft128( sig, sigExtra, shiftDist ); - sig = sig128.v64; - sigExtra = sig128.v0; - } - return - softfloat_roundPackToExtF80( - sign, exp, sig, sigExtra, roundingPrecision ); - -} - diff --git a/outside/softfloat-3/source/s_normRoundPackToF128.c b/outside/softfloat-3/source/s_normRoundPackToF128.c deleted file mode 100644 index 72dc8d593..000000000 --- a/outside/softfloat-3/source/s_normRoundPackToF128.c +++ /dev/null @@ -1,81 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" - -float128_t - softfloat_normRoundPackToF128( - bool sign, int_fast32_t exp, uint_fast64_t sig64, uint_fast64_t sig0 ) -{ - int_fast8_t shiftDist; - struct uint128 sig128; - union ui128_f128 uZ; - uint_fast64_t sigExtra; - struct uint128_extra sig128Extra; - - if ( ! sig64 ) { - exp -= 64; - sig64 = sig0; - sig0 = 0; - } - shiftDist = softfloat_countLeadingZeros64( sig64 ) - 15; - exp -= shiftDist; - if ( 0 <= shiftDist ) { - if ( shiftDist ) { - sig128 = softfloat_shortShiftLeft128( sig64, sig0, shiftDist ); - sig64 = sig128.v64; - sig0 = sig128.v0; - } - if ( (uint32_t) exp < 0x7FFD ) { - uZ.ui.v64 = packToF128UI64( sign, sig64 | sig0 ? exp : 0, sig64 ); - uZ.ui.v0 = sig0; - return uZ.f; - } - sigExtra = 0; - } else { - sig128Extra = - softfloat_shortShiftRightJam128Extra( sig64, sig0, 0, -shiftDist ); - sig64 = sig128Extra.v.v64; - sig0 = sig128Extra.v.v0; - sigExtra = sig128Extra.extra; - } - return softfloat_roundPackToF128( sign, exp, sig64, sig0, sigExtra ); - -} - diff --git a/outside/softfloat-3/source/s_normRoundPackToF16.c b/outside/softfloat-3/source/s_normRoundPackToF16.c deleted file mode 100644 index 2e8a3879f..000000000 --- a/outside/softfloat-3/source/s_normRoundPackToF16.c +++ /dev/null @@ -1,58 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" - -float16_t - softfloat_normRoundPackToF16( bool sign, int_fast16_t exp, uint_fast16_t sig ) -{ - int_fast8_t shiftDist; - union ui16_f16 uZ; - - shiftDist = softfloat_countLeadingZeros16( sig ) - 1; - exp -= shiftDist; - if ( (4 <= shiftDist) && ((unsigned int) exp < 0x1D) ) { - uZ.ui = packToF16UI( sign, sig ? exp : 0, sig<<(shiftDist - 4) ); - return uZ.f; - } else { - return softfloat_roundPackToF16( sign, exp, sig< -#include -#include "platform.h" -#include "internals.h" - -float32_t - softfloat_normRoundPackToF32( bool sign, int_fast16_t exp, uint_fast32_t sig ) -{ - int_fast8_t shiftDist; - union ui32_f32 uZ; - - shiftDist = softfloat_countLeadingZeros32( sig ) - 1; - exp -= shiftDist; - if ( (7 <= shiftDist) && ((unsigned int) exp < 0xFD) ) { - uZ.ui = packToF32UI( sign, sig ? exp : 0, sig<<(shiftDist - 7) ); - return uZ.f; - } else { - return softfloat_roundPackToF32( sign, exp, sig< -#include -#include "platform.h" -#include "internals.h" - -float64_t - softfloat_normRoundPackToF64( bool sign, int_fast16_t exp, uint_fast64_t sig ) -{ - int_fast8_t shiftDist; - union ui64_f64 uZ; - - shiftDist = softfloat_countLeadingZeros64( sig ) - 1; - exp -= shiftDist; - if ( (10 <= shiftDist) && ((unsigned int) exp < 0x7FD) ) { - uZ.ui = packToF64UI( sign, sig ? exp : 0, sig<<(shiftDist - 10) ); - return uZ.f; - } else { - return softfloat_roundPackToF64( sign, exp, sig< -#include "platform.h" -#include "internals.h" - -struct exp32_sig64 softfloat_normSubnormalExtF80Sig( uint_fast64_t sig ) -{ - int_fast8_t shiftDist; - struct exp32_sig64 z; - - shiftDist = softfloat_countLeadingZeros64( sig ); - z.exp = -shiftDist; - z.sig = sig< -#include "platform.h" -#include "internals.h" - -struct exp32_sig128 - softfloat_normSubnormalF128Sig( uint_fast64_t sig64, uint_fast64_t sig0 ) -{ - int_fast8_t shiftDist; - struct exp32_sig128 z; - - if ( ! sig64 ) { - shiftDist = softfloat_countLeadingZeros64( sig0 ) - 15; - z.exp = -63 - shiftDist; - if ( shiftDist < 0 ) { - z.sig.v64 = sig0>>-shiftDist; - z.sig.v0 = sig0<<(shiftDist & 63); - } else { - z.sig.v64 = sig0< -#include "platform.h" -#include "internals.h" - -int softfloat_normSubnormalF128SigM( uint32_t *sigPtr ) -{ - const uint32_t *ptr; - int_fast16_t shiftDist; - uint32_t wordSig; - - ptr = sigPtr + indexWordHi( 4 ); - shiftDist = 0; - for (;;) { - wordSig = *ptr; - if ( wordSig ) break; - shiftDist += 32; - if ( 128 <= shiftDist ) return 1; - ptr -= wordIncr; - } - shiftDist += softfloat_countLeadingZeros32( wordSig ) - 15; - if ( shiftDist ) softfloat_shiftLeft128M( sigPtr, shiftDist, sigPtr ); - return 1 - shiftDist; - -} - diff --git a/outside/softfloat-3/source/s_normSubnormalF16Sig.c b/outside/softfloat-3/source/s_normSubnormalF16Sig.c deleted file mode 100644 index 197d041ee..000000000 --- a/outside/softfloat-3/source/s_normSubnormalF16Sig.c +++ /dev/null @@ -1,52 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "internals.h" - -struct exp8_sig16 softfloat_normSubnormalF16Sig( uint_fast16_t sig ) -{ - int_fast8_t shiftDist; - struct exp8_sig16 z; - - shiftDist = softfloat_countLeadingZeros16( sig ) - 5; - z.exp = 1 - shiftDist; - z.sig = sig< -#include "platform.h" -#include "internals.h" - -struct exp16_sig32 softfloat_normSubnormalF32Sig( uint_fast32_t sig ) -{ - int_fast8_t shiftDist; - struct exp16_sig32 z; - - shiftDist = softfloat_countLeadingZeros32( sig ) - 8; - z.exp = 1 - shiftDist; - z.sig = sig< -#include "platform.h" -#include "internals.h" - -struct exp16_sig64 softfloat_normSubnormalF64Sig( uint_fast64_t sig ) -{ - int_fast8_t shiftDist; - struct exp16_sig64 z; - - shiftDist = softfloat_countLeadingZeros64( sig ) - 11; - z.exp = 1 - shiftDist; - z.sig = sig< -#include "platform.h" -#include "primitiveTypes.h" - -#ifndef softfloat_remStepMBy32 - -void - softfloat_remStepMBy32( - uint_fast8_t size_words, - const uint32_t *remPtr, - uint_fast8_t dist, - const uint32_t *bPtr, - uint32_t q, - uint32_t *zPtr - ) -{ - unsigned int index, lastIndex; - uint64_t dwordProd; - uint32_t wordRem, wordShiftedRem, wordProd; - uint_fast8_t uNegDist, borrow; - - index = indexWordLo( size_words ); - lastIndex = indexWordHi( size_words ); - dwordProd = (uint64_t) bPtr[index] * q; - wordRem = remPtr[index]; - wordShiftedRem = wordRem<>(uNegDist & 31); - index += wordIncr; - dwordProd = (uint64_t) bPtr[index] * q + (dwordProd>>32); - wordRem = remPtr[index]; - wordShiftedRem |= wordRem< -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -int_fast64_t - softfloat_roundMToI64( - bool sign, uint32_t *extSigPtr, uint_fast8_t roundingMode, bool exact ) -{ - bool roundNearEven; - uint32_t sigExtra; - bool doIncrement; - uint64_t sig; - union { uint64_t ui; int64_t i; } uZ; - int64_t z; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - roundNearEven = (roundingMode == softfloat_round_near_even); - sigExtra = extSigPtr[indexWordLo( 3 )]; - doIncrement = (0x80000000 <= sigExtra); - if ( ! roundNearEven && (roundingMode != softfloat_round_near_maxMag) ) { - doIncrement = - (roundingMode - == (sign ? softfloat_round_min : softfloat_round_max)) - && sigExtra; - } - sig = - (uint64_t) extSigPtr[indexWord( 3, 2 )]<<32 - | extSigPtr[indexWord( 3, 1 )]; - if ( doIncrement ) { - ++sig; - if ( ! sig ) goto invalid; - if ( ! (sigExtra & 0x7FFFFFFF) && roundNearEven ) sig &= ~1; - } - uZ.ui = sign ? -sig : sig; - z = uZ.i; - if ( z && ((z < 0) ^ sign) ) goto invalid; - if ( exact && sigExtra ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; - } - return z; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - invalid: - softfloat_raiseFlags( softfloat_flag_invalid ); - return sign ? i64_fromNegOverflow : i64_fromPosOverflow; - -} - diff --git a/outside/softfloat-3/source/s_roundMToUI64.c b/outside/softfloat-3/source/s_roundMToUI64.c deleted file mode 100644 index d33c30322..000000000 --- a/outside/softfloat-3/source/s_roundMToUI64.c +++ /dev/null @@ -1,84 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the -University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -uint_fast64_t - softfloat_roundMToUI64( - bool sign, uint32_t *extSigPtr, uint_fast8_t roundingMode, bool exact ) -{ - bool roundNearEven; - uint32_t sigExtra; - bool doIncrement; - uint64_t sig; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - roundNearEven = (roundingMode == softfloat_round_near_even); - sigExtra = extSigPtr[indexWordLo( 3 )]; - doIncrement = (0x80000000 <= sigExtra); - if ( ! roundNearEven && (roundingMode != softfloat_round_near_maxMag) ) { - doIncrement = - (roundingMode - == (sign ? softfloat_round_min : softfloat_round_max)) - && sigExtra; - } - sig = - (uint64_t) extSigPtr[indexWord( 3, 2 )]<<32 - | extSigPtr[indexWord( 3, 1 )]; - if ( doIncrement ) { - ++sig; - if ( ! sig ) goto invalid; - if ( ! (sigExtra & 0x7FFFFFFF) && roundNearEven ) sig &= ~1; - } - if ( sign && sig ) goto invalid; - if ( exact && sigExtra ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; - } - return sig; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - invalid: - softfloat_raiseFlags( softfloat_flag_invalid ); - return sign ? ui64_fromNegOverflow : ui64_fromPosOverflow; - -} - diff --git a/outside/softfloat-3/source/s_roundPackMToExtF80M.c b/outside/softfloat-3/source/s_roundPackMToExtF80M.c deleted file mode 100644 index c4d396453..000000000 --- a/outside/softfloat-3/source/s_roundPackMToExtF80M.c +++ /dev/null @@ -1,256 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -void - softfloat_roundPackMToExtF80M( - bool sign, - int32_t exp, - uint32_t *extSigPtr, - uint_fast8_t roundingPrecision, - struct extFloat80M *zSPtr - ) -{ - uint_fast8_t roundingMode; - bool roundNearEven; - uint64_t sig, roundIncrement, roundMask, roundBits; - bool isTiny; - uint32_t sigExtra; - bool doIncrement; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - roundingMode = softfloat_roundingMode; - roundNearEven = (roundingMode == softfloat_round_near_even); - sig = - (uint64_t) extSigPtr[indexWord( 3, 2 )]<<32 - | extSigPtr[indexWord( 3, 1 )]; - if ( roundingPrecision == 80 ) goto precision80; - if ( roundingPrecision == 64 ) { - roundIncrement = UINT64_C( 0x0000000000000400 ); - roundMask = UINT64_C( 0x00000000000007FF ); - } else if ( roundingPrecision == 32 ) { - roundIncrement = UINT64_C( 0x0000008000000000 ); - roundMask = UINT64_C( 0x000000FFFFFFFFFF ); - } else { - goto precision80; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( extSigPtr[indexWordLo( 3 )] ) sig |= 1; - if ( ! roundNearEven && (roundingMode != softfloat_round_near_maxMag) ) { - roundIncrement = - (roundingMode - == (sign ? softfloat_round_min : softfloat_round_max)) - ? roundMask - : 0; - } - roundBits = sig & roundMask; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( 0x7FFD <= (uint32_t) (exp - 1) ) { - if ( exp <= 0 ) { - /*---------------------------------------------------------------- - *----------------------------------------------------------------*/ - isTiny = - (softfloat_detectTininess - == softfloat_tininess_beforeRounding) - || (exp < 0) - || (sig <= (uint64_t) (sig + roundIncrement)); - sig = softfloat_shiftRightJam64( sig, 1 - exp ); - roundBits = sig & roundMask; - if ( roundBits ) { - if ( isTiny ) softfloat_raiseFlags( softfloat_flag_underflow ); - softfloat_exceptionFlags |= softfloat_flag_inexact; -#ifdef SOFTFLOAT_ROUND_ODD - if ( roundingMode == softfloat_round_odd ) { - sig |= roundMask + 1; - } -#endif - } - sig += roundIncrement; - exp = ((sig & UINT64_C( 0x8000000000000000 )) != 0); - roundIncrement = roundMask + 1; - if ( roundNearEven && (roundBits<<1 == roundIncrement) ) { - roundMask |= roundIncrement; - } - sig &= ~roundMask; - goto packReturn; - } - if ( - (0x7FFE < exp) - || ((exp == 0x7FFE) && ((uint64_t) (sig + roundIncrement) < sig)) - ) { - goto overflow; - } - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( roundBits ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; -#ifdef SOFTFLOAT_ROUND_ODD - if ( roundingMode == softfloat_round_odd ) { - sig = (sig & ~roundMask) | (roundMask + 1); - goto packReturn; - } -#endif - } - sig += roundIncrement; - if ( sig < roundIncrement ) { - ++exp; - sig = UINT64_C( 0x8000000000000000 ); - } - roundIncrement = roundMask + 1; - if ( roundNearEven && (roundBits<<1 == roundIncrement) ) { - roundMask |= roundIncrement; - } - sig &= ~roundMask; - goto packReturn; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - precision80: - sigExtra = extSigPtr[indexWordLo( 3 )]; - doIncrement = (0x80000000 <= sigExtra); - if ( ! roundNearEven && (roundingMode != softfloat_round_near_maxMag) ) { - doIncrement = - (roundingMode - == (sign ? softfloat_round_min : softfloat_round_max)) - && sigExtra; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( 0x7FFD <= (uint32_t) (exp - 1) ) { - if ( exp <= 0 ) { - /*---------------------------------------------------------------- - *----------------------------------------------------------------*/ - isTiny = - (softfloat_detectTininess - == softfloat_tininess_beforeRounding) - || (exp < 0) - || ! doIncrement - || (sig < UINT64_C( 0xFFFFFFFFFFFFFFFF )); - softfloat_shiftRightJam96M( extSigPtr, 1 - exp, extSigPtr ); - exp = 0; - sig = - (uint64_t) extSigPtr[indexWord( 3, 2 )]<<32 - | extSigPtr[indexWord( 3, 1 )]; - sigExtra = extSigPtr[indexWordLo( 3 )]; - if ( sigExtra ) { - if ( isTiny ) softfloat_raiseFlags( softfloat_flag_underflow ); - softfloat_exceptionFlags |= softfloat_flag_inexact; -#ifdef SOFTFLOAT_ROUND_ODD - if ( roundingMode == softfloat_round_odd ) { - sig |= 1; - goto packReturn; - } -#endif - } - doIncrement = (0x80000000 <= sigExtra); - if ( - ! roundNearEven - && (roundingMode != softfloat_round_near_maxMag) - ) { - doIncrement = - (roundingMode - == (sign ? softfloat_round_min : softfloat_round_max)) - && sigExtra; - } - if ( doIncrement ) { - ++sig; - sig &= ~(uint64_t) (! (sigExtra & 0x7FFFFFFF) & roundNearEven); - exp = ((sig & UINT64_C( 0x8000000000000000 )) != 0); - } - goto packReturn; - } - if ( - (0x7FFE < exp) - || ((exp == 0x7FFE) && (sig == UINT64_C( 0xFFFFFFFFFFFFFFFF )) - && doIncrement) - ) { - /*---------------------------------------------------------------- - *----------------------------------------------------------------*/ - roundMask = 0; - overflow: - softfloat_raiseFlags( - softfloat_flag_overflow | softfloat_flag_inexact ); - if ( - roundNearEven - || (roundingMode == softfloat_round_near_maxMag) - || (roundingMode - == (sign ? softfloat_round_min : softfloat_round_max)) - ) { - exp = 0x7FFF; - sig = UINT64_C( 0x8000000000000000 ); - } else { - exp = 0x7FFE; - sig = ~roundMask; - } - goto packReturn; - } - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( sigExtra ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; -#ifdef SOFTFLOAT_ROUND_ODD - if ( roundingMode == softfloat_round_odd ) { - sig |= 1; - goto packReturn; - } -#endif - } - if ( doIncrement ) { - ++sig; - if ( ! sig ) { - ++exp; - sig = UINT64_C( 0x8000000000000000 ); - } else { - sig &= ~(uint64_t) (! (sigExtra & 0x7FFFFFFF) & roundNearEven); - } - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - packReturn: - zSPtr->signExp = packToExtF80UI64( sign, exp ); - zSPtr->signif = sig; - -} - diff --git a/outside/softfloat-3/source/s_roundPackMToF128M.c b/outside/softfloat-3/source/s_roundPackMToF128M.c deleted file mode 100644 index be715c5e1..000000000 --- a/outside/softfloat-3/source/s_roundPackMToF128M.c +++ /dev/null @@ -1,178 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -void - softfloat_roundPackMToF128M( - bool sign, int32_t exp, uint32_t *extSigPtr, uint32_t *zWPtr ) -{ - uint_fast8_t roundingMode; - bool roundNearEven; - uint32_t sigExtra; - bool doIncrement, isTiny; - static const uint32_t maxSig[4] = - INIT_UINTM4( 0x0001FFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF ); - uint32_t ui, uj; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - roundingMode = softfloat_roundingMode; - roundNearEven = (roundingMode == softfloat_round_near_even); - sigExtra = extSigPtr[indexWordLo( 5 )]; - doIncrement = (0x80000000 <= sigExtra); - if ( ! roundNearEven && (roundingMode != softfloat_round_near_maxMag) ) { - doIncrement = - (roundingMode - == (sign ? softfloat_round_min : softfloat_round_max)) - && sigExtra; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( 0x7FFD <= (uint32_t) exp ) { - if ( exp < 0 ) { - /*---------------------------------------------------------------- - *----------------------------------------------------------------*/ - isTiny = - (softfloat_detectTininess - == softfloat_tininess_beforeRounding) - || (exp < -1) - || ! doIncrement - || (softfloat_compare128M( - extSigPtr + indexMultiwordHi( 5, 4 ), maxSig ) - < 0); - softfloat_shiftRightJam160M( extSigPtr, -exp, extSigPtr ); - exp = 0; - sigExtra = extSigPtr[indexWordLo( 5 )]; - if ( isTiny && sigExtra ) { - softfloat_raiseFlags( softfloat_flag_underflow ); - } - doIncrement = (0x80000000 <= sigExtra); - if ( - ! roundNearEven - && (roundingMode != softfloat_round_near_maxMag) - ) { - doIncrement = - (roundingMode - == (sign ? softfloat_round_min : softfloat_round_max)) - && sigExtra; - } - } else if ( - (0x7FFD < exp) - || ((exp == 0x7FFD) && doIncrement - && (softfloat_compare128M( - extSigPtr + indexMultiwordHi( 5, 4 ), maxSig ) - == 0)) - ) { - /*---------------------------------------------------------------- - *----------------------------------------------------------------*/ - softfloat_raiseFlags( - softfloat_flag_overflow | softfloat_flag_inexact ); - if ( - roundNearEven - || (roundingMode == softfloat_round_near_maxMag) - || (roundingMode - == (sign ? softfloat_round_min : softfloat_round_max)) - ) { - ui = packToF128UI96( sign, 0x7FFF, 0 ); - uj = 0; - } else { - ui = packToF128UI96( sign, 0x7FFE, 0x0000FFFF ); - uj = 0xFFFFFFFF; - } - zWPtr[indexWordHi( 4 )] = ui; - zWPtr[indexWord( 4, 2 )] = uj; - zWPtr[indexWord( 4, 1 )] = uj; - zWPtr[indexWord( 4, 0 )] = uj; - return; - } - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - uj = extSigPtr[indexWord( 5, 1 )]; - if ( sigExtra ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; -#ifdef SOFTFLOAT_ROUND_ODD - if ( roundingMode == softfloat_round_odd ) { - uj |= 1; - goto noIncrementPackReturn; - } -#endif - } - if ( doIncrement ) { - ++uj; - if ( uj ) { - if ( ! (sigExtra & 0x7FFFFFFF) && roundNearEven ) uj &= ~1; - zWPtr[indexWord( 4, 2 )] = extSigPtr[indexWord( 5, 3 )]; - zWPtr[indexWord( 4, 1 )] = extSigPtr[indexWord( 5, 2 )]; - zWPtr[indexWord( 4, 0 )] = uj; - ui = extSigPtr[indexWordHi( 5 )]; - } else { - zWPtr[indexWord( 4, 0 )] = uj; - ui = extSigPtr[indexWord( 5, 2 )] + 1; - zWPtr[indexWord( 4, 1 )] = ui; - uj = extSigPtr[indexWord( 5, 3 )]; - if ( ui ) { - zWPtr[indexWord( 4, 2 )] = uj; - ui = extSigPtr[indexWordHi( 5 )]; - } else { - ++uj; - zWPtr[indexWord( 4, 2 )] = uj; - ui = extSigPtr[indexWordHi( 5 )]; - if ( ! uj ) ++ui; - } - } - } else { - noIncrementPackReturn: - zWPtr[indexWord( 4, 0 )] = uj; - ui = extSigPtr[indexWord( 5, 2 )]; - zWPtr[indexWord( 4, 1 )] = ui; - uj |= ui; - ui = extSigPtr[indexWord( 5, 3 )]; - zWPtr[indexWord( 4, 2 )] = ui; - uj |= ui; - ui = extSigPtr[indexWordHi( 5 )]; - uj |= ui; - if ( ! uj ) exp = 0; - } - zWPtr[indexWordHi( 4 )] = packToF128UI96( sign, exp, ui ); - -} - diff --git a/outside/softfloat-3/source/s_roundPackToExtF80.c b/outside/softfloat-3/source/s_roundPackToExtF80.c deleted file mode 100644 index 7b236d2f6..000000000 --- a/outside/softfloat-3/source/s_roundPackToExtF80.c +++ /dev/null @@ -1,256 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -extFloat80_t - softfloat_roundPackToExtF80( - bool sign, - int_fast32_t exp, - uint_fast64_t sig, - uint_fast64_t sigExtra, - uint_fast8_t roundingPrecision - ) -{ - uint_fast8_t roundingMode; - bool roundNearEven; - uint_fast64_t roundIncrement, roundMask, roundBits; - bool isTiny, doIncrement; - struct uint64_extra sig64Extra; - union { struct extFloat80M s; extFloat80_t f; } uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - roundingMode = softfloat_roundingMode; - roundNearEven = (roundingMode == softfloat_round_near_even); - if ( roundingPrecision == 80 ) goto precision80; - if ( roundingPrecision == 64 ) { - roundIncrement = UINT64_C( 0x0000000000000400 ); - roundMask = UINT64_C( 0x00000000000007FF ); - } else if ( roundingPrecision == 32 ) { - roundIncrement = UINT64_C( 0x0000008000000000 ); - roundMask = UINT64_C( 0x000000FFFFFFFFFF ); - } else { - goto precision80; - } - sig |= (sigExtra != 0); - if ( ! roundNearEven && (roundingMode != softfloat_round_near_maxMag) ) { - roundIncrement = - (roundingMode - == (sign ? softfloat_round_min : softfloat_round_max)) - ? roundMask - : 0; - } - roundBits = sig & roundMask; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( 0x7FFD <= (uint32_t) (exp - 1) ) { - if ( exp <= 0 ) { - /*---------------------------------------------------------------- - *----------------------------------------------------------------*/ - isTiny = - (softfloat_detectTininess - == softfloat_tininess_beforeRounding) - || (exp < 0) - || (sig <= (uint64_t) (sig + roundIncrement)); - sig = softfloat_shiftRightJam64( sig, 1 - exp ); - roundBits = sig & roundMask; - if ( roundBits ) { - if ( isTiny ) softfloat_raiseFlags( softfloat_flag_underflow ); - softfloat_exceptionFlags |= softfloat_flag_inexact; -#ifdef SOFTFLOAT_ROUND_ODD - if ( roundingMode == softfloat_round_odd ) { - sig |= roundMask + 1; - } -#endif - } - sig += roundIncrement; - exp = ((sig & UINT64_C( 0x8000000000000000 )) != 0); - roundIncrement = roundMask + 1; - if ( roundNearEven && (roundBits<<1 == roundIncrement) ) { - roundMask |= roundIncrement; - } - sig &= ~roundMask; - goto packReturn; - } - if ( - (0x7FFE < exp) - || ((exp == 0x7FFE) && ((uint64_t) (sig + roundIncrement) < sig)) - ) { - goto overflow; - } - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( roundBits ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; -#ifdef SOFTFLOAT_ROUND_ODD - if ( roundingMode == softfloat_round_odd ) { - sig = (sig & ~roundMask) | (roundMask + 1); - goto packReturn; - } -#endif - } - sig = (uint64_t) (sig + roundIncrement); - if ( sig < roundIncrement ) { - ++exp; - sig = UINT64_C( 0x8000000000000000 ); - } - roundIncrement = roundMask + 1; - if ( roundNearEven && (roundBits<<1 == roundIncrement) ) { - roundMask |= roundIncrement; - } - sig &= ~roundMask; - goto packReturn; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - precision80: - doIncrement = (UINT64_C( 0x8000000000000000 ) <= sigExtra); - if ( ! roundNearEven && (roundingMode != softfloat_round_near_maxMag) ) { - doIncrement = - (roundingMode - == (sign ? softfloat_round_min : softfloat_round_max)) - && sigExtra; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( 0x7FFD <= (uint32_t) (exp - 1) ) { - if ( exp <= 0 ) { - /*---------------------------------------------------------------- - *----------------------------------------------------------------*/ - isTiny = - (softfloat_detectTininess - == softfloat_tininess_beforeRounding) - || (exp < 0) - || ! doIncrement - || (sig < UINT64_C( 0xFFFFFFFFFFFFFFFF )); - sig64Extra = - softfloat_shiftRightJam64Extra( sig, sigExtra, 1 - exp ); - exp = 0; - sig = sig64Extra.v; - sigExtra = sig64Extra.extra; - if ( sigExtra ) { - if ( isTiny ) softfloat_raiseFlags( softfloat_flag_underflow ); - softfloat_exceptionFlags |= softfloat_flag_inexact; -#ifdef SOFTFLOAT_ROUND_ODD - if ( roundingMode == softfloat_round_odd ) { - sig |= 1; - goto packReturn; - } -#endif - } - doIncrement = (UINT64_C( 0x8000000000000000 ) <= sigExtra); - if ( - ! roundNearEven - && (roundingMode != softfloat_round_near_maxMag) - ) { - doIncrement = - (roundingMode - == (sign ? softfloat_round_min : softfloat_round_max)) - && sigExtra; - } - if ( doIncrement ) { - ++sig; - sig &= - ~(uint_fast64_t) - (! (sigExtra & UINT64_C( 0x7FFFFFFFFFFFFFFF )) - & roundNearEven); - exp = ((sig & UINT64_C( 0x8000000000000000 )) != 0); - } - goto packReturn; - } - if ( - (0x7FFE < exp) - || ((exp == 0x7FFE) && (sig == UINT64_C( 0xFFFFFFFFFFFFFFFF )) - && doIncrement) - ) { - /*---------------------------------------------------------------- - *----------------------------------------------------------------*/ - roundMask = 0; - overflow: - softfloat_raiseFlags( - softfloat_flag_overflow | softfloat_flag_inexact ); - if ( - roundNearEven - || (roundingMode == softfloat_round_near_maxMag) - || (roundingMode - == (sign ? softfloat_round_min : softfloat_round_max)) - ) { - exp = 0x7FFF; - sig = UINT64_C( 0x8000000000000000 ); - } else { - exp = 0x7FFE; - sig = ~roundMask; - } - goto packReturn; - } - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( sigExtra ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; -#ifdef SOFTFLOAT_ROUND_ODD - if ( roundingMode == softfloat_round_odd ) { - sig |= 1; - goto packReturn; - } -#endif - } - if ( doIncrement ) { - ++sig; - if ( ! sig ) { - ++exp; - sig = UINT64_C( 0x8000000000000000 ); - } else { - sig &= - ~(uint_fast64_t) - (! (sigExtra & UINT64_C( 0x7FFFFFFFFFFFFFFF )) - & roundNearEven); - } - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - packReturn: - uZ.s.signExp = packToExtF80UI64( sign, exp ); - uZ.s.signif = sig; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/s_roundPackToF128.c b/outside/softfloat-3/source/s_roundPackToF128.c deleted file mode 100644 index 13bbe4dff..000000000 --- a/outside/softfloat-3/source/s_roundPackToF128.c +++ /dev/null @@ -1,171 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -float128_t - softfloat_roundPackToF128( - bool sign, - int_fast32_t exp, - uint_fast64_t sig64, - uint_fast64_t sig0, - uint_fast64_t sigExtra - ) -{ - uint_fast8_t roundingMode; - bool roundNearEven, doIncrement, isTiny; - struct uint128_extra sig128Extra; - uint_fast64_t uiZ64, uiZ0; - struct uint128 sig128; - union ui128_f128 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - roundingMode = softfloat_roundingMode; - roundNearEven = (roundingMode == softfloat_round_near_even); - doIncrement = (UINT64_C( 0x8000000000000000 ) <= sigExtra); - if ( ! roundNearEven && (roundingMode != softfloat_round_near_maxMag) ) { - doIncrement = - (roundingMode - == (sign ? softfloat_round_min : softfloat_round_max)) - && sigExtra; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( 0x7FFD <= (uint32_t) exp ) { - if ( exp < 0 ) { - /*---------------------------------------------------------------- - *----------------------------------------------------------------*/ - isTiny = - (softfloat_detectTininess - == softfloat_tininess_beforeRounding) - || (exp < -1) - || ! doIncrement - || softfloat_lt128( - sig64, - sig0, - UINT64_C( 0x0001FFFFFFFFFFFF ), - UINT64_C( 0xFFFFFFFFFFFFFFFF ) - ); - sig128Extra = - softfloat_shiftRightJam128Extra( sig64, sig0, sigExtra, -exp ); - sig64 = sig128Extra.v.v64; - sig0 = sig128Extra.v.v0; - sigExtra = sig128Extra.extra; - exp = 0; - if ( isTiny && sigExtra ) { - softfloat_raiseFlags( softfloat_flag_underflow ); - } - doIncrement = (UINT64_C( 0x8000000000000000 ) <= sigExtra); - if ( - ! roundNearEven - && (roundingMode != softfloat_round_near_maxMag) - ) { - doIncrement = - (roundingMode - == (sign ? softfloat_round_min : softfloat_round_max)) - && sigExtra; - } - } else if ( - (0x7FFD < exp) - || ((exp == 0x7FFD) - && softfloat_eq128( - sig64, - sig0, - UINT64_C( 0x0001FFFFFFFFFFFF ), - UINT64_C( 0xFFFFFFFFFFFFFFFF ) - ) - && doIncrement) - ) { - /*---------------------------------------------------------------- - *----------------------------------------------------------------*/ - softfloat_raiseFlags( - softfloat_flag_overflow | softfloat_flag_inexact ); - if ( - roundNearEven - || (roundingMode == softfloat_round_near_maxMag) - || (roundingMode - == (sign ? softfloat_round_min : softfloat_round_max)) - ) { - uiZ64 = packToF128UI64( sign, 0x7FFF, 0 ); - uiZ0 = 0; - } else { - uiZ64 = - packToF128UI64( - sign, 0x7FFE, UINT64_C( 0x0000FFFFFFFFFFFF ) ); - uiZ0 = UINT64_C( 0xFFFFFFFFFFFFFFFF ); - } - goto uiZ; - } - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( sigExtra ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; -#ifdef SOFTFLOAT_ROUND_ODD - if ( roundingMode == softfloat_round_odd ) { - sig0 |= 1; - goto packReturn; - } -#endif - } - if ( doIncrement ) { - sig128 = softfloat_add128( sig64, sig0, 0, 1 ); - sig64 = sig128.v64; - sig0 = - sig128.v0 - & ~(uint64_t) - (! (sigExtra & UINT64_C( 0x7FFFFFFFFFFFFFFF )) - & roundNearEven); - } else { - if ( ! (sig64 | sig0) ) exp = 0; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - packReturn: - uiZ64 = packToF128UI64( sign, exp, sig64 ); - uiZ0 = sig0; - uiZ: - uZ.ui.v64 = uiZ64; - uZ.ui.v0 = uiZ0; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/s_roundPackToF16.c b/outside/softfloat-3/source/s_roundPackToF16.c deleted file mode 100644 index 22fb068d1..000000000 --- a/outside/softfloat-3/source/s_roundPackToF16.c +++ /dev/null @@ -1,113 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -float16_t - softfloat_roundPackToF16( bool sign, int_fast16_t exp, uint_fast16_t sig ) -{ - uint_fast8_t roundingMode; - bool roundNearEven; - uint_fast8_t roundIncrement, roundBits; - bool isTiny; - uint_fast16_t uiZ; - union ui16_f16 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - roundingMode = softfloat_roundingMode; - roundNearEven = (roundingMode == softfloat_round_near_even); - roundIncrement = 0x8; - if ( ! roundNearEven && (roundingMode != softfloat_round_near_maxMag) ) { - roundIncrement = - (roundingMode - == (sign ? softfloat_round_min : softfloat_round_max)) - ? 0xF - : 0; - } - roundBits = sig & 0xF; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( 0x1D <= (unsigned int) exp ) { - if ( exp < 0 ) { - /*---------------------------------------------------------------- - *----------------------------------------------------------------*/ - isTiny = - (softfloat_detectTininess == softfloat_tininess_beforeRounding) - || (exp < -1) || (sig + roundIncrement < 0x8000); - sig = softfloat_shiftRightJam32( sig, -exp ); - exp = 0; - roundBits = sig & 0xF; - if ( isTiny && roundBits ) { - softfloat_raiseFlags( softfloat_flag_underflow ); - } - } else if ( (0x1D < exp) || (0x8000 <= sig + roundIncrement) ) { - /*---------------------------------------------------------------- - *----------------------------------------------------------------*/ - softfloat_raiseFlags( - softfloat_flag_overflow | softfloat_flag_inexact ); - uiZ = packToF16UI( sign, 0x1F, 0 ) - ! roundIncrement; - goto uiZ; - } - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sig = (sig + roundIncrement)>>4; - if ( roundBits ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; -#ifdef SOFTFLOAT_ROUND_ODD - if ( roundingMode == softfloat_round_odd ) { - sig |= 1; - goto packReturn; - } -#endif - } - sig &= ~(uint_fast16_t) (! (roundBits ^ 8) & roundNearEven); - if ( ! sig ) exp = 0; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - packReturn: - uiZ = packToF16UI( sign, exp, sig ); - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/s_roundPackToF32.c b/outside/softfloat-3/source/s_roundPackToF32.c deleted file mode 100644 index 36ac11ec5..000000000 --- a/outside/softfloat-3/source/s_roundPackToF32.c +++ /dev/null @@ -1,113 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -float32_t - softfloat_roundPackToF32( bool sign, int_fast16_t exp, uint_fast32_t sig ) -{ - uint_fast8_t roundingMode; - bool roundNearEven; - uint_fast8_t roundIncrement, roundBits; - bool isTiny; - uint_fast32_t uiZ; - union ui32_f32 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - roundingMode = softfloat_roundingMode; - roundNearEven = (roundingMode == softfloat_round_near_even); - roundIncrement = 0x40; - if ( ! roundNearEven && (roundingMode != softfloat_round_near_maxMag) ) { - roundIncrement = - (roundingMode - == (sign ? softfloat_round_min : softfloat_round_max)) - ? 0x7F - : 0; - } - roundBits = sig & 0x7F; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( 0xFD <= (unsigned int) exp ) { - if ( exp < 0 ) { - /*---------------------------------------------------------------- - *----------------------------------------------------------------*/ - isTiny = - (softfloat_detectTininess == softfloat_tininess_beforeRounding) - || (exp < -1) || (sig + roundIncrement < 0x80000000); - sig = softfloat_shiftRightJam32( sig, -exp ); - exp = 0; - roundBits = sig & 0x7F; - if ( isTiny && roundBits ) { - softfloat_raiseFlags( softfloat_flag_underflow ); - } - } else if ( (0xFD < exp) || (0x80000000 <= sig + roundIncrement) ) { - /*---------------------------------------------------------------- - *----------------------------------------------------------------*/ - softfloat_raiseFlags( - softfloat_flag_overflow | softfloat_flag_inexact ); - uiZ = packToF32UI( sign, 0xFF, 0 ) - ! roundIncrement; - goto uiZ; - } - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sig = (sig + roundIncrement)>>7; - if ( roundBits ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; -#ifdef SOFTFLOAT_ROUND_ODD - if ( roundingMode == softfloat_round_odd ) { - sig |= 1; - goto packReturn; - } -#endif - } - sig &= ~(uint_fast32_t) (! (roundBits ^ 0x40) & roundNearEven); - if ( ! sig ) exp = 0; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - packReturn: - uiZ = packToF32UI( sign, exp, sig ); - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/s_roundPackToF64.c b/outside/softfloat-3/source/s_roundPackToF64.c deleted file mode 100644 index a804089ee..000000000 --- a/outside/softfloat-3/source/s_roundPackToF64.c +++ /dev/null @@ -1,117 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -float64_t - softfloat_roundPackToF64( bool sign, int_fast16_t exp, uint_fast64_t sig ) -{ - uint_fast8_t roundingMode; - bool roundNearEven; - uint_fast16_t roundIncrement, roundBits; - bool isTiny; - uint_fast64_t uiZ; - union ui64_f64 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - roundingMode = softfloat_roundingMode; - roundNearEven = (roundingMode == softfloat_round_near_even); - roundIncrement = 0x200; - if ( ! roundNearEven && (roundingMode != softfloat_round_near_maxMag) ) { - roundIncrement = - (roundingMode - == (sign ? softfloat_round_min : softfloat_round_max)) - ? 0x3FF - : 0; - } - roundBits = sig & 0x3FF; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - if ( 0x7FD <= (uint16_t) exp ) { - if ( exp < 0 ) { - /*---------------------------------------------------------------- - *----------------------------------------------------------------*/ - isTiny = - (softfloat_detectTininess == softfloat_tininess_beforeRounding) - || (exp < -1) - || (sig + roundIncrement < UINT64_C( 0x8000000000000000 )); - sig = softfloat_shiftRightJam64( sig, -exp ); - exp = 0; - roundBits = sig & 0x3FF; - if ( isTiny && roundBits ) { - softfloat_raiseFlags( softfloat_flag_underflow ); - } - } else if ( - (0x7FD < exp) - || (UINT64_C( 0x8000000000000000 ) <= sig + roundIncrement) - ) { - /*---------------------------------------------------------------- - *----------------------------------------------------------------*/ - softfloat_raiseFlags( - softfloat_flag_overflow | softfloat_flag_inexact ); - uiZ = packToF64UI( sign, 0x7FF, 0 ) - ! roundIncrement; - goto uiZ; - } - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - sig = (sig + roundIncrement)>>10; - if ( roundBits ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; -#ifdef SOFTFLOAT_ROUND_ODD - if ( roundingMode == softfloat_round_odd ) { - sig |= 1; - goto packReturn; - } -#endif - } - sig &= ~(uint_fast64_t) (! (roundBits ^ 0x200) & roundNearEven); - if ( ! sig ) exp = 0; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - packReturn: - uiZ = packToF64UI( sign, exp, sig ); - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/s_roundToI32.c b/outside/softfloat-3/source/s_roundToI32.c deleted file mode 100644 index 480076234..000000000 --- a/outside/softfloat-3/source/s_roundToI32.c +++ /dev/null @@ -1,84 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the -University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -int_fast32_t - softfloat_roundToI32( - bool sign, uint_fast64_t sig, uint_fast8_t roundingMode, bool exact ) -{ - bool roundNearEven; - uint_fast16_t roundIncrement, roundBits; - uint_fast32_t sig32; - union { uint32_t ui; int32_t i; } uZ; - int_fast32_t z; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - roundNearEven = (roundingMode == softfloat_round_near_even); - roundIncrement = 0x800; - if ( ! roundNearEven && (roundingMode != softfloat_round_near_maxMag) ) { - roundIncrement = - (roundingMode - == (sign ? softfloat_round_min : softfloat_round_max)) - ? 0xFFF - : 0; - } - roundBits = sig & 0xFFF; - sig += roundIncrement; - if ( sig & UINT64_C( 0xFFFFF00000000000 ) ) goto invalid; - sig32 = sig>>12; - sig32 &= ~(uint_fast32_t) (! (roundBits ^ 0x800) & roundNearEven); - uZ.ui = sign ? -sig32 : sig32; - z = uZ.i; - if ( z && ((z < 0) ^ sign) ) goto invalid; - if ( exact && roundBits ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; - } - return z; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - invalid: - softfloat_raiseFlags( softfloat_flag_invalid ); - return sign ? i32_fromNegOverflow : i32_fromPosOverflow; - -} - diff --git a/outside/softfloat-3/source/s_roundToI64.c b/outside/softfloat-3/source/s_roundToI64.c deleted file mode 100644 index 91603e379..000000000 --- a/outside/softfloat-3/source/s_roundToI64.c +++ /dev/null @@ -1,89 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the -University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -int_fast64_t - softfloat_roundToI64( - bool sign, - uint_fast64_t sig, - uint_fast64_t sigExtra, - uint_fast8_t roundingMode, - bool exact - ) -{ - bool roundNearEven, doIncrement; - union { uint64_t ui; int64_t i; } uZ; - int_fast64_t z; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - roundNearEven = (roundingMode == softfloat_round_near_even); - doIncrement = (UINT64_C( 0x8000000000000000 ) <= sigExtra); - if ( ! roundNearEven && (roundingMode != softfloat_round_near_maxMag) ) { - doIncrement = - (roundingMode - == (sign ? softfloat_round_min : softfloat_round_max)) - && sigExtra; - } - if ( doIncrement ) { - ++sig; - if ( ! sig ) goto invalid; - sig &= - ~(uint_fast64_t) - (! (sigExtra & UINT64_C( 0x7FFFFFFFFFFFFFFF )) - & roundNearEven); - } - uZ.ui = sign ? -sig : sig; - z = uZ.i; - if ( z && ((z < 0) ^ sign) ) goto invalid; - if ( exact && sigExtra ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; - } - return z; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - invalid: - softfloat_raiseFlags( softfloat_flag_invalid ); - return sign ? i64_fromNegOverflow : i64_fromPosOverflow; - -} - diff --git a/outside/softfloat-3/source/s_roundToUI32.c b/outside/softfloat-3/source/s_roundToUI32.c deleted file mode 100644 index 432777d10..000000000 --- a/outside/softfloat-3/source/s_roundToUI32.c +++ /dev/null @@ -1,80 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the -University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -uint_fast32_t - softfloat_roundToUI32( - bool sign, uint_fast64_t sig, uint_fast8_t roundingMode, bool exact ) -{ - bool roundNearEven; - uint_fast16_t roundIncrement, roundBits; - uint_fast32_t z; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - roundNearEven = (roundingMode == softfloat_round_near_even); - roundIncrement = 0x800; - if ( ! roundNearEven && (roundingMode != softfloat_round_near_maxMag) ) { - roundIncrement = - (roundingMode - == (sign ? softfloat_round_min : softfloat_round_max)) - ? 0xFFF - : 0; - } - roundBits = sig & 0xFFF; - sig += roundIncrement; - if ( sig & UINT64_C( 0xFFFFF00000000000 ) ) goto invalid; - z = sig>>12; - z &= ~(uint_fast32_t) (! (roundBits ^ 0x800) & roundNearEven); - if ( sign && z ) goto invalid; - if ( exact && roundBits ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; - } - return z; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - invalid: - softfloat_raiseFlags( softfloat_flag_invalid ); - return sign ? ui32_fromNegOverflow : ui32_fromPosOverflow; - -} - diff --git a/outside/softfloat-3/source/s_roundToUI64.c b/outside/softfloat-3/source/s_roundToUI64.c deleted file mode 100644 index 3f10207d6..000000000 --- a/outside/softfloat-3/source/s_roundToUI64.c +++ /dev/null @@ -1,85 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the -University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -uint_fast64_t - softfloat_roundToUI64( - bool sign, - uint_fast64_t sig, - uint_fast64_t sigExtra, - uint_fast8_t roundingMode, - bool exact - ) -{ - bool roundNearEven, doIncrement; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - roundNearEven = (roundingMode == softfloat_round_near_even); - doIncrement = (UINT64_C( 0x8000000000000000 ) <= sigExtra); - if ( ! roundNearEven && (roundingMode != softfloat_round_near_maxMag) ) { - doIncrement = - (roundingMode - == (sign ? softfloat_round_min : softfloat_round_max)) - && sigExtra; - } - if ( doIncrement ) { - ++sig; - if ( ! sig ) goto invalid; - sig &= - ~(uint_fast64_t) - (! (sigExtra & UINT64_C( 0x7FFFFFFFFFFFFFFF )) - & roundNearEven); - } - if ( sign && sig ) goto invalid; - if ( exact && sigExtra ) { - softfloat_exceptionFlags |= softfloat_flag_inexact; - } - return sig; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - invalid: - softfloat_raiseFlags( softfloat_flag_invalid ); - return sign ? ui64_fromNegOverflow : ui64_fromPosOverflow; - -} - diff --git a/outside/softfloat-3/source/s_shiftLeftM.c b/outside/softfloat-3/source/s_shiftLeftM.c deleted file mode 100644 index 266614e23..000000000 --- a/outside/softfloat-3/source/s_shiftLeftM.c +++ /dev/null @@ -1,91 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" - -#ifndef softfloat_shiftLeftM - -#define softfloat_shiftLeftM softfloat_shiftLeftM -#include "primitives.h" - -void - softfloat_shiftLeftM( - uint_fast8_t size_words, - const uint32_t *aPtr, - uint32_t dist, - uint32_t *zPtr - ) -{ - uint32_t wordDist; - uint_fast8_t innerDist; - uint32_t *destPtr; - uint_fast8_t i; - - wordDist = dist>>5; - if ( wordDist < size_words ) { - aPtr += indexMultiwordLoBut( size_words, wordDist ); - innerDist = dist & 31; - if ( innerDist ) { - softfloat_shortShiftLeftM( - size_words - wordDist, - aPtr, - innerDist, - zPtr + indexMultiwordHiBut( size_words, wordDist ) - ); - if ( ! wordDist ) return; - } else { - aPtr += indexWordHi( size_words - wordDist ); - destPtr = zPtr + indexWordHi( size_words ); - for ( i = size_words - wordDist; i; --i ) { - *destPtr = *aPtr; - aPtr -= wordIncr; - destPtr -= wordIncr; - } - } - zPtr += indexMultiwordLo( size_words, wordDist ); - } else { - wordDist = size_words; - } - do { - *zPtr++ = 0; - --wordDist; - } while ( wordDist ); - -} - -#endif - diff --git a/outside/softfloat-3/source/s_shiftNormSigF128M.c b/outside/softfloat-3/source/s_shiftNormSigF128M.c deleted file mode 100644 index c03237f85..000000000 --- a/outside/softfloat-3/source/s_shiftNormSigF128M.c +++ /dev/null @@ -1,78 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "internals.h" - -int - softfloat_shiftNormSigF128M( - const uint32_t *wPtr, uint_fast8_t shiftDist, uint32_t *sigPtr ) -{ - uint32_t wordSig; - int32_t exp; - uint32_t leadingBit; - - wordSig = wPtr[indexWordHi( 4 )]; - exp = expF128UI96( wordSig ); - if ( exp ) { - softfloat_shortShiftLeft128M( wPtr, shiftDist, sigPtr ); - leadingBit = 0x00010000< -#include "platform.h" -#include "primitiveTypes.h" - -#ifndef softfloat_shiftRightJam128 - -struct uint128 - softfloat_shiftRightJam128( uint64_t a64, uint64_t a0, uint_fast32_t dist ) -{ - uint_fast8_t u8NegDist; - struct uint128 z; - - if ( dist < 64 ) { - u8NegDist = -dist; - z.v64 = a64>>dist; - z.v0 = - a64<<(u8NegDist & 63) | a0>>dist - | ((uint64_t) (a0<<(u8NegDist & 63)) != 0); - } else { - z.v64 = 0; - z.v0 = - (dist < 127) - ? a64>>(dist & 63) - | (((a64 & (((uint_fast64_t) 1<<(dist & 63)) - 1)) | a0) - != 0) - : ((a64 | a0) != 0); - } - return z; - -} - -#endif - diff --git a/outside/softfloat-3/source/s_shiftRightJam128Extra.c b/outside/softfloat-3/source/s_shiftRightJam128Extra.c deleted file mode 100644 index 612faab87..000000000 --- a/outside/softfloat-3/source/s_shiftRightJam128Extra.c +++ /dev/null @@ -1,77 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "primitiveTypes.h" - -#ifndef softfloat_shiftRightJam128Extra - -struct uint128_extra - softfloat_shiftRightJam128Extra( - uint64_t a64, uint64_t a0, uint64_t extra, uint_fast32_t dist ) -{ - uint_fast8_t u8NegDist; - struct uint128_extra z; - - u8NegDist = -dist; - if ( dist < 64 ) { - z.v.v64 = a64>>dist; - z.v.v0 = a64<<(u8NegDist & 63) | a0>>dist; - z.extra = a0<<(u8NegDist & 63); - } else { - z.v.v64 = 0; - if ( dist == 64 ) { - z.v.v0 = a64; - z.extra = a0; - } else { - extra |= a0; - if ( dist < 128 ) { - z.v.v0 = a64>>(dist & 63); - z.extra = a64<<(u8NegDist & 63); - } else { - z.v.v0 = 0; - z.extra = (dist == 128) ? a64 : (a64 != 0); - } - } - } - z.extra |= (extra != 0); - return z; - -} - -#endif - diff --git a/outside/softfloat-3/source/s_shiftRightJam256M.c b/outside/softfloat-3/source/s_shiftRightJam256M.c deleted file mode 100644 index 88ac7fb0f..000000000 --- a/outside/softfloat-3/source/s_shiftRightJam256M.c +++ /dev/null @@ -1,126 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "primitiveTypes.h" - -#ifndef softfloat_shiftRightJam256M - -static - void - softfloat_shortShiftRightJamM( - uint_fast8_t size_words, - const uint64_t *aPtr, - uint_fast8_t dist, - uint64_t *zPtr - ) -{ - uint_fast8_t uNegDist; - unsigned int index, lastIndex; - uint64_t partWordZ, wordA; - - uNegDist = -dist; - index = indexWordLo( size_words ); - lastIndex = indexWordHi( size_words ); - wordA = aPtr[index]; - partWordZ = wordA>>dist; - if ( partWordZ<>dist; - } - zPtr[index] = partWordZ; - -} - -void - softfloat_shiftRightJam256M( - const uint64_t *aPtr, uint_fast32_t dist, uint64_t *zPtr ) -{ - uint64_t wordJam; - uint_fast32_t wordDist; - uint64_t *ptr; - uint_fast8_t i, innerDist; - - wordJam = 0; - wordDist = dist>>6; - if ( wordDist ) { - if ( 4 < wordDist ) wordDist = 4; - ptr = (uint64_t *) (aPtr + indexMultiwordLo( 4, wordDist )); - i = wordDist; - do { - wordJam = *ptr++; - if ( wordJam ) break; - --i; - } while ( i ); - ptr = zPtr; - } - if ( wordDist < 4 ) { - aPtr += indexMultiwordHiBut( 4, wordDist ); - innerDist = dist & 63; - if ( innerDist ) { - softfloat_shortShiftRightJamM( - 4 - wordDist, - aPtr, - innerDist, - zPtr + indexMultiwordLoBut( 4, wordDist ) - ); - if ( ! wordDist ) goto wordJam; - } else { - aPtr += indexWordLo( 4 - wordDist ); - ptr = zPtr + indexWordLo( 4 ); - for ( i = 4 - wordDist; i; --i ) { - *ptr = *aPtr; - aPtr += wordIncr; - ptr += wordIncr; - } - } - ptr = zPtr + indexMultiwordHi( 4, wordDist ); - } - do { - *ptr++ = 0; - --wordDist; - } while ( wordDist ); - wordJam: - if ( wordJam ) zPtr[indexWordLo( 4 )] |= 1; - -} - -#endif - diff --git a/outside/softfloat-3/source/s_shiftRightJam32.c b/outside/softfloat-3/source/s_shiftRightJam32.c deleted file mode 100644 index 9234f6b5f..000000000 --- a/outside/softfloat-3/source/s_shiftRightJam32.c +++ /dev/null @@ -1,51 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" - -#ifndef softfloat_shiftRightJam32 - -uint32_t softfloat_shiftRightJam32( uint32_t a, uint_fast16_t dist ) -{ - - return - (dist < 31) ? a>>dist | ((uint32_t) (a<<(-dist & 31)) != 0) : (a != 0); - -} - -#endif - diff --git a/outside/softfloat-3/source/s_shiftRightJam64.c b/outside/softfloat-3/source/s_shiftRightJam64.c deleted file mode 100644 index 044864274..000000000 --- a/outside/softfloat-3/source/s_shiftRightJam64.c +++ /dev/null @@ -1,51 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" - -#ifndef softfloat_shiftRightJam64 - -uint64_t softfloat_shiftRightJam64( uint64_t a, uint_fast32_t dist ) -{ - - return - (dist < 63) ? a>>dist | ((uint64_t) (a<<(-dist & 63)) != 0) : (a != 0); - -} - -#endif - diff --git a/outside/softfloat-3/source/s_shiftRightJam64Extra.c b/outside/softfloat-3/source/s_shiftRightJam64Extra.c deleted file mode 100644 index 163c32310..000000000 --- a/outside/softfloat-3/source/s_shiftRightJam64Extra.c +++ /dev/null @@ -1,62 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "primitiveTypes.h" - -#ifndef softfloat_shiftRightJam64Extra - -struct uint64_extra - softfloat_shiftRightJam64Extra( - uint64_t a, uint64_t extra, uint_fast32_t dist ) -{ - struct uint64_extra z; - - if ( dist < 64 ) { - z.v = a>>dist; - z.extra = a<<(-dist & 63); - } else { - z.v = 0; - z.extra = (dist == 64) ? a : (a != 0); - } - z.extra |= (extra != 0); - return z; - -} - -#endif - diff --git a/outside/softfloat-3/source/s_shiftRightJamM.c b/outside/softfloat-3/source/s_shiftRightJamM.c deleted file mode 100644 index 93bb54867..000000000 --- a/outside/softfloat-3/source/s_shiftRightJamM.c +++ /dev/null @@ -1,101 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" - -#ifndef softfloat_shiftRightJamM - -#define softfloat_shiftRightJamM softfloat_shiftRightJamM -#include "primitives.h" - -void - softfloat_shiftRightJamM( - uint_fast8_t size_words, - const uint32_t *aPtr, - uint32_t dist, - uint32_t *zPtr - ) -{ - uint32_t wordJam, wordDist, *ptr; - uint_fast8_t i, innerDist; - - wordJam = 0; - wordDist = dist>>5; - if ( wordDist ) { - if ( size_words < wordDist ) wordDist = size_words; - ptr = (uint32_t *) (aPtr + indexMultiwordLo( size_words, wordDist )); - i = wordDist; - do { - wordJam = *ptr++; - if ( wordJam ) break; - --i; - } while ( i ); - ptr = zPtr; - } - if ( wordDist < size_words ) { - aPtr += indexMultiwordHiBut( size_words, wordDist ); - innerDist = dist & 31; - if ( innerDist ) { - softfloat_shortShiftRightJamM( - size_words - wordDist, - aPtr, - innerDist, - zPtr + indexMultiwordLoBut( size_words, wordDist ) - ); - if ( ! wordDist ) goto wordJam; - } else { - aPtr += indexWordLo( size_words - wordDist ); - ptr = zPtr + indexWordLo( size_words ); - for ( i = size_words - wordDist; i; --i ) { - *ptr = *aPtr; - aPtr += wordIncr; - ptr += wordIncr; - } - } - ptr = zPtr + indexMultiwordHi( size_words, wordDist ); - } - do { - *ptr++ = 0; - --wordDist; - } while ( wordDist ); - wordJam: - if ( wordJam ) zPtr[indexWordLo( size_words )] |= 1; - -} - -#endif - diff --git a/outside/softfloat-3/source/s_shiftRightM.c b/outside/softfloat-3/source/s_shiftRightM.c deleted file mode 100644 index 3476cc9fc..000000000 --- a/outside/softfloat-3/source/s_shiftRightM.c +++ /dev/null @@ -1,91 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" - -#ifndef softfloat_shiftRightM - -#define softfloat_shiftRightM softfloat_shiftRightM -#include "primitives.h" - -void - softfloat_shiftRightM( - uint_fast8_t size_words, - const uint32_t *aPtr, - uint32_t dist, - uint32_t *zPtr - ) -{ - uint32_t wordDist; - uint_fast8_t innerDist; - uint32_t *destPtr; - uint_fast8_t i; - - wordDist = dist>>5; - if ( wordDist < size_words ) { - aPtr += indexMultiwordHiBut( size_words, wordDist ); - innerDist = dist & 31; - if ( innerDist ) { - softfloat_shortShiftRightM( - size_words - wordDist, - aPtr, - innerDist, - zPtr + indexMultiwordLoBut( size_words, wordDist ) - ); - if ( ! wordDist ) return; - } else { - aPtr += indexWordLo( size_words - wordDist ); - destPtr = zPtr + indexWordLo( size_words ); - for ( i = size_words - wordDist; i; --i ) { - *destPtr = *aPtr; - aPtr += wordIncr; - destPtr += wordIncr; - } - } - zPtr += indexMultiwordHi( size_words, wordDist ); - } else { - wordDist = size_words; - } - do { - *zPtr++ = 0; - --wordDist; - } while ( wordDist ); - -} - -#endif - diff --git a/outside/softfloat-3/source/s_shortShiftLeft128.c b/outside/softfloat-3/source/s_shortShiftLeft128.c deleted file mode 100644 index e0dd50f5e..000000000 --- a/outside/softfloat-3/source/s_shortShiftLeft128.c +++ /dev/null @@ -1,55 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "primitiveTypes.h" - -#ifndef softfloat_shortShiftLeft128 - -struct uint128 - softfloat_shortShiftLeft128( uint64_t a64, uint64_t a0, uint_fast8_t dist ) -{ - struct uint128 z; - - z.v64 = a64<>(-dist & 63); - z.v0 = a0< -#include "platform.h" -#include "primitiveTypes.h" - -#ifndef softfloat_shortShiftLeft64To96M - -void - softfloat_shortShiftLeft64To96M( - uint64_t a, uint_fast8_t dist, uint32_t *zPtr ) -{ - - zPtr[indexWord( 3, 0 )] = (uint32_t) a<>= 32 - dist; - zPtr[indexWord( 3, 2 )] = a>>32; - zPtr[indexWord( 3, 1 )] = a; - -} - -#endif - diff --git a/outside/softfloat-3/source/s_shortShiftLeftM.c b/outside/softfloat-3/source/s_shortShiftLeftM.c deleted file mode 100644 index 728b40a82..000000000 --- a/outside/softfloat-3/source/s_shortShiftLeftM.c +++ /dev/null @@ -1,70 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "primitiveTypes.h" - -#ifndef softfloat_shortShiftLeftM - -void - softfloat_shortShiftLeftM( - uint_fast8_t size_words, - const uint32_t *aPtr, - uint_fast8_t dist, - uint32_t *zPtr - ) -{ - uint_fast8_t uNegDist; - unsigned int index, lastIndex; - uint32_t partWordZ, wordA; - - uNegDist = -dist; - index = indexWordHi( size_words ); - lastIndex = indexWordLo( size_words ); - partWordZ = aPtr[index]<>(uNegDist & 31); - index -= wordIncr; - partWordZ = wordA< -#include "platform.h" -#include "primitiveTypes.h" - -#ifndef softfloat_shortShiftRight128 - -struct uint128 - softfloat_shortShiftRight128( uint64_t a64, uint64_t a0, uint_fast8_t dist ) -{ - struct uint128 z; - - z.v64 = a64>>dist; - z.v0 = a64<<(-dist & 63) | a0>>dist; - return z; - -} - -#endif - diff --git a/outside/softfloat-3/source/s_shortShiftRightExtendM.c b/outside/softfloat-3/source/s_shortShiftRightExtendM.c deleted file mode 100644 index 82a770e58..000000000 --- a/outside/softfloat-3/source/s_shortShiftRightExtendM.c +++ /dev/null @@ -1,73 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "primitiveTypes.h" - -#ifndef softfloat_shortShiftRightExtendM - -void - softfloat_shortShiftRightExtendM( - uint_fast8_t size_words, - const uint32_t *aPtr, - uint_fast8_t dist, - uint32_t *zPtr - ) -{ - uint_fast8_t uNegDist; - unsigned int indexA, lastIndexA; - uint32_t partWordZ, wordA; - - uNegDist = -dist; - indexA = indexWordLo( size_words ); - lastIndexA = indexWordHi( size_words ); - zPtr += indexWordLo( size_words + 1 ); - partWordZ = 0; - for (;;) { - wordA = aPtr[indexA]; - *zPtr = wordA<<(uNegDist & 31) | partWordZ; - zPtr += wordIncr; - partWordZ = wordA>>dist; - if ( indexA == lastIndexA ) break; - indexA += wordIncr; - } - *zPtr = partWordZ; - -} - -#endif - diff --git a/outside/softfloat-3/source/s_shortShiftRightJam128.c b/outside/softfloat-3/source/s_shortShiftRightJam128.c deleted file mode 100644 index 262439c1b..000000000 --- a/outside/softfloat-3/source/s_shortShiftRightJam128.c +++ /dev/null @@ -1,60 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "primitiveTypes.h" - -#ifndef softfloat_shortShiftRightJam128 - -struct uint128 - softfloat_shortShiftRightJam128( - uint64_t a64, uint64_t a0, uint_fast8_t dist ) -{ - uint_fast8_t uNegDist; - struct uint128 z; - - uNegDist = -dist; - z.v64 = a64>>dist; - z.v0 = - a64<<(uNegDist & 63) | a0>>dist - | ((uint64_t) (a0<<(uNegDist & 63)) != 0); - return z; - -} - -#endif - diff --git a/outside/softfloat-3/source/s_shortShiftRightJam128Extra.c b/outside/softfloat-3/source/s_shortShiftRightJam128Extra.c deleted file mode 100644 index 9ba2d01c3..000000000 --- a/outside/softfloat-3/source/s_shortShiftRightJam128Extra.c +++ /dev/null @@ -1,59 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "primitiveTypes.h" - -#ifndef softfloat_shortShiftRightJam128Extra - -struct uint128_extra - softfloat_shortShiftRightJam128Extra( - uint64_t a64, uint64_t a0, uint64_t extra, uint_fast8_t dist ) -{ - uint_fast8_t uNegDist; - struct uint128_extra z; - - uNegDist = -dist; - z.v.v64 = a64>>dist; - z.v.v0 = a64<<(uNegDist & 63) | a0>>dist; - z.extra = a0<<(uNegDist & 63) | (extra != 0); - return z; - -} - -#endif - diff --git a/outside/softfloat-3/source/s_shortShiftRightJam64.c b/outside/softfloat-3/source/s_shortShiftRightJam64.c deleted file mode 100644 index e4cecc0dc..000000000 --- a/outside/softfloat-3/source/s_shortShiftRightJam64.c +++ /dev/null @@ -1,50 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" - -#ifndef softfloat_shortShiftRightJam64 - -uint64_t softfloat_shortShiftRightJam64( uint64_t a, uint_fast8_t dist ) -{ - - return a>>dist | ((a & (((uint_fast64_t) 1< -#include "platform.h" -#include "primitiveTypes.h" - -#ifndef softfloat_shortShiftRightJam64Extra - -struct uint64_extra - softfloat_shortShiftRightJam64Extra( - uint64_t a, uint64_t extra, uint_fast8_t dist ) -{ - struct uint64_extra z; - - z.v = a>>dist; - z.extra = a<<(-dist & 63) | (extra != 0); - return z; - -} - -#endif - diff --git a/outside/softfloat-3/source/s_shortShiftRightJamM.c b/outside/softfloat-3/source/s_shortShiftRightJamM.c deleted file mode 100644 index 79cf42100..000000000 --- a/outside/softfloat-3/source/s_shortShiftRightJamM.c +++ /dev/null @@ -1,72 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "primitiveTypes.h" - -#ifndef softfloat_shortShiftRightJamM - -void - softfloat_shortShiftRightJamM( - uint_fast8_t size_words, - const uint32_t *aPtr, - uint_fast8_t dist, - uint32_t *zPtr - ) -{ - uint_fast8_t uNegDist; - unsigned int index, lastIndex; - uint32_t partWordZ, wordA; - - uNegDist = -dist; - index = indexWordLo( size_words ); - lastIndex = indexWordHi( size_words ); - wordA = aPtr[index]; - partWordZ = wordA>>dist; - if ( partWordZ<>dist; - } - zPtr[index] = partWordZ; - -} - -#endif - diff --git a/outside/softfloat-3/source/s_shortShiftRightM.c b/outside/softfloat-3/source/s_shortShiftRightM.c deleted file mode 100644 index c69e8a984..000000000 --- a/outside/softfloat-3/source/s_shortShiftRightM.c +++ /dev/null @@ -1,70 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "primitiveTypes.h" - -#ifndef softfloat_shortShiftRightM - -void - softfloat_shortShiftRightM( - uint_fast8_t size_words, - const uint32_t *aPtr, - uint_fast8_t dist, - uint32_t *zPtr - ) -{ - uint_fast8_t uNegDist; - unsigned int index, lastIndex; - uint32_t partWordZ, wordA; - - uNegDist = -dist; - index = indexWordLo( size_words ); - lastIndex = indexWordHi( size_words ); - partWordZ = aPtr[index]>>dist; - while ( index != lastIndex ) { - wordA = aPtr[index + wordIncr]; - zPtr[index] = wordA<<(uNegDist & 31) | partWordZ; - index += wordIncr; - partWordZ = wordA>>dist; - } - zPtr[index] = partWordZ; - -} - -#endif - diff --git a/outside/softfloat-3/source/s_sub128.c b/outside/softfloat-3/source/s_sub128.c deleted file mode 100644 index 0c59e0d55..000000000 --- a/outside/softfloat-3/source/s_sub128.c +++ /dev/null @@ -1,55 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "primitiveTypes.h" - -#ifndef softfloat_sub128 - -struct uint128 - softfloat_sub128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 ) -{ - struct uint128 z; - - z.v0 = a0 - b0; - z.v64 = a64 - b64 - (a0 < b0); - return z; - -} - -#endif - diff --git a/outside/softfloat-3/source/s_sub1XM.c b/outside/softfloat-3/source/s_sub1XM.c deleted file mode 100644 index ba52b93fd..000000000 --- a/outside/softfloat-3/source/s_sub1XM.c +++ /dev/null @@ -1,60 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "primitiveTypes.h" - -#ifndef softfloat_sub1XM - -void softfloat_sub1XM( uint_fast8_t size_words, uint32_t *zPtr ) -{ - unsigned int index, lastIndex; - uint32_t wordA; - - index = indexWordLo( size_words ); - lastIndex = indexWordHi( size_words ); - for (;;) { - wordA = zPtr[index]; - zPtr[index] = wordA - 1; - if ( wordA || (index == lastIndex) ) break; - index += wordIncr; - } - -} - -#endif - diff --git a/outside/softfloat-3/source/s_sub256M.c b/outside/softfloat-3/source/s_sub256M.c deleted file mode 100644 index dbef118a8..000000000 --- a/outside/softfloat-3/source/s_sub256M.c +++ /dev/null @@ -1,65 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "primitiveTypes.h" - -#ifndef softfloat_sub256M - -void - softfloat_sub256M( - const uint64_t *aPtr, const uint64_t *bPtr, uint64_t *zPtr ) -{ - unsigned int index; - uint_fast8_t borrow; - uint64_t wordA, wordB; - - index = indexWordLo( 4 ); - borrow = 0; - for (;;) { - wordA = aPtr[index]; - wordB = bPtr[index]; - zPtr[index] = wordA - wordB - borrow; - if ( index == indexWordHi( 4 ) ) break; - borrow = borrow ? (wordA <= wordB) : (wordA < wordB); - index += wordIncr; - } - -} - -#endif - diff --git a/outside/softfloat-3/source/s_subM.c b/outside/softfloat-3/source/s_subM.c deleted file mode 100644 index 693fa423f..000000000 --- a/outside/softfloat-3/source/s_subM.c +++ /dev/null @@ -1,70 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "primitiveTypes.h" - -#ifndef softfloat_subM - -void - softfloat_subM( - uint_fast8_t size_words, - const uint32_t *aPtr, - const uint32_t *bPtr, - uint32_t *zPtr - ) -{ - unsigned int index, lastIndex; - uint_fast8_t borrow; - uint32_t wordA, wordB; - - index = indexWordLo( size_words ); - lastIndex = indexWordHi( size_words ); - borrow = 0; - for (;;) { - wordA = aPtr[index]; - wordB = bPtr[index]; - zPtr[index] = wordA - wordB - borrow; - if ( index == lastIndex ) break; - borrow = borrow ? (wordA <= wordB) : (wordA < wordB); - index += wordIncr; - } - -} - -#endif - diff --git a/outside/softfloat-3/source/s_subMagsExtF80.c b/outside/softfloat-3/source/s_subMagsExtF80.c deleted file mode 100644 index 39b58c02b..000000000 --- a/outside/softfloat-3/source/s_subMagsExtF80.c +++ /dev/null @@ -1,158 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -extFloat80_t - softfloat_subMagsExtF80( - uint_fast16_t uiA64, - uint_fast64_t uiA0, - uint_fast16_t uiB64, - uint_fast64_t uiB0, - bool signZ - ) -{ - int_fast32_t expA; - uint_fast64_t sigA; - int_fast32_t expB; - uint_fast64_t sigB; - int_fast32_t expDiff; - uint_fast16_t uiZ64; - uint_fast64_t uiZ0; - int_fast32_t expZ; - uint_fast64_t sigExtra; - struct uint128 sig128, uiZ; - union { struct extFloat80M s; extFloat80_t f; } uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expA = expExtF80UI64( uiA64 ); - sigA = uiA0; - expB = expExtF80UI64( uiB64 ); - sigB = uiB0; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expDiff = expA - expB; - if ( 0 < expDiff ) goto expABigger; - if ( expDiff < 0 ) goto expBBigger; - if ( expA == 0x7FFF ) { - if ( (sigA | sigB) & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) { - goto propagateNaN; - } - softfloat_raiseFlags( softfloat_flag_invalid ); - uiZ64 = defaultNaNExtF80UI64; - uiZ0 = defaultNaNExtF80UI0; - goto uiZ; - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expZ = expA; - if ( ! expZ ) expZ = 1; - sigExtra = 0; - if ( sigB < sigA ) goto aBigger; - if ( sigA < sigB ) goto bBigger; - uiZ64 = - packToExtF80UI64( (softfloat_roundingMode == softfloat_round_min), 0 ); - uiZ0 = 0; - goto uiZ; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expBBigger: - if ( expB == 0x7FFF ) { - if ( sigB & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) goto propagateNaN; - uiZ64 = packToExtF80UI64( signZ ^ 1, 0x7FFF ); - uiZ0 = UINT64_C( 0x8000000000000000 ); - goto uiZ; - } - if ( ! expA ) { - ++expDiff; - sigExtra = 0; - if ( ! expDiff ) goto newlyAlignedBBigger; - } - sig128 = softfloat_shiftRightJam128( sigA, 0, -expDiff ); - sigA = sig128.v64; - sigExtra = sig128.v0; - newlyAlignedBBigger: - expZ = expB; - bBigger: - signZ = ! signZ; - sig128 = softfloat_sub128( sigB, 0, sigA, sigExtra ); - goto normRoundPack; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expABigger: - if ( expA == 0x7FFF ) { - if ( sigA & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) goto propagateNaN; - uiZ64 = uiA64; - uiZ0 = uiA0; - goto uiZ; - } - if ( ! expB ) { - --expDiff; - sigExtra = 0; - if ( ! expDiff ) goto newlyAlignedABigger; - } - sig128 = softfloat_shiftRightJam128( sigB, 0, expDiff ); - sigB = sig128.v64; - sigExtra = sig128.v0; - newlyAlignedABigger: - expZ = expA; - aBigger: - sig128 = softfloat_sub128( sigA, 0, sigB, sigExtra ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - normRoundPack: - return - softfloat_normRoundPackToExtF80( - signZ, expZ, sig128.v64, sig128.v0, extF80_roundingPrecision ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - propagateNaN: - uiZ = softfloat_propagateNaNExtF80UI( uiA64, uiA0, uiB64, uiB0 ); - uiZ64 = uiZ.v64; - uiZ0 = uiZ.v0; - uiZ: - uZ.s.signExp = uiZ64; - uZ.s.signif = uiZ0; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/s_subMagsF128.c b/outside/softfloat-3/source/s_subMagsF128.c deleted file mode 100644 index f41af5731..000000000 --- a/outside/softfloat-3/source/s_subMagsF128.c +++ /dev/null @@ -1,139 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -float128_t - softfloat_subMagsF128( - uint_fast64_t uiA64, - uint_fast64_t uiA0, - uint_fast64_t uiB64, - uint_fast64_t uiB0, - bool signZ - ) -{ - int_fast32_t expA; - struct uint128 sigA; - int_fast32_t expB; - struct uint128 sigB, sigZ; - int_fast32_t expDiff, expZ; - struct uint128 uiZ; - union ui128_f128 uZ; - - expA = expF128UI64( uiA64 ); - sigA.v64 = fracF128UI64( uiA64 ); - sigA.v0 = uiA0; - expB = expF128UI64( uiB64 ); - sigB.v64 = fracF128UI64( uiB64 ); - sigB.v0 = uiB0; - sigA = softfloat_shortShiftLeft128( sigA.v64, sigA.v0, 4 ); - sigB = softfloat_shortShiftLeft128( sigB.v64, sigB.v0, 4 ); - expDiff = expA - expB; - if ( 0 < expDiff ) goto expABigger; - if ( expDiff < 0 ) goto expBBigger; - if ( expA == 0x7FFF ) { - if ( sigA.v64 | sigA.v0 | sigB.v64 | sigB.v0 ) goto propagateNaN; - softfloat_raiseFlags( softfloat_flag_invalid ); - uiZ.v64 = defaultNaNF128UI64; - uiZ.v0 = defaultNaNF128UI0; - goto uiZ; - } - expZ = expA; - if ( ! expZ ) expZ = 1; - if ( sigB.v64 < sigA.v64 ) goto aBigger; - if ( sigA.v64 < sigB.v64 ) goto bBigger; - if ( sigB.v0 < sigA.v0 ) goto aBigger; - if ( sigA.v0 < sigB.v0 ) goto bBigger; - uiZ.v64 = - packToF128UI64( - (softfloat_roundingMode == softfloat_round_min), 0, 0 ); - uiZ.v0 = 0; - goto uiZ; - expBBigger: - if ( expB == 0x7FFF ) { - if ( sigB.v64 | sigB.v0 ) goto propagateNaN; - uiZ.v64 = packToF128UI64( signZ ^ 1, 0x7FFF, 0 ); - uiZ.v0 = 0; - goto uiZ; - } - if ( expA ) { - sigA.v64 |= UINT64_C( 0x0010000000000000 ); - } else { - ++expDiff; - if ( ! expDiff ) goto newlyAlignedBBigger; - } - sigA = softfloat_shiftRightJam128( sigA.v64, sigA.v0, -expDiff ); - newlyAlignedBBigger: - expZ = expB; - sigB.v64 |= UINT64_C( 0x0010000000000000 ); - bBigger: - signZ = ! signZ; - sigZ = softfloat_sub128( sigB.v64, sigB.v0, sigA.v64, sigA.v0 ); - goto normRoundPack; - expABigger: - if ( expA == 0x7FFF ) { - if ( sigA.v64 | sigA.v0 ) goto propagateNaN; - uiZ.v64 = uiA64; - uiZ.v0 = uiA0; - goto uiZ; - } - if ( expB ) { - sigB.v64 |= UINT64_C( 0x0010000000000000 ); - } else { - --expDiff; - if ( ! expDiff ) goto newlyAlignedABigger; - } - sigB = softfloat_shiftRightJam128( sigB.v64, sigB.v0, expDiff ); - newlyAlignedABigger: - expZ = expA; - sigA.v64 |= UINT64_C( 0x0010000000000000 ); - aBigger: - sigZ = softfloat_sub128( sigA.v64, sigA.v0, sigB.v64, sigB.v0 ); - normRoundPack: - return softfloat_normRoundPackToF128( signZ, expZ - 5, sigZ.v64, sigZ.v0 ); - propagateNaN: - uiZ = softfloat_propagateNaNF128UI( uiA64, uiA0, uiB64, uiB0 ); - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/s_subMagsF16.c b/outside/softfloat-3/source/s_subMagsF16.c deleted file mode 100644 index 94454d8d9..000000000 --- a/outside/softfloat-3/source/s_subMagsF16.c +++ /dev/null @@ -1,187 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the -University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -float16_t softfloat_subMagsF16( uint_fast16_t uiA, uint_fast16_t uiB ) -{ - int_fast8_t expA; - uint_fast16_t sigA; - int_fast8_t expB; - uint_fast16_t sigB; - int_fast8_t expDiff; - uint_fast16_t uiZ; - int_fast16_t sigDiff; - bool signZ; - int_fast8_t shiftDist, expZ; - uint_fast16_t sigZ, sigX, sigY; - uint_fast32_t sig32Z; - int_fast8_t roundingMode; - union ui16_f16 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expA = expF16UI( uiA ); - sigA = fracF16UI( uiA ); - expB = expF16UI( uiB ); - sigB = fracF16UI( uiB ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expDiff = expA - expB; - if ( ! expDiff ) { - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - if ( expA == 0x1F ) { - if ( sigA | sigB ) goto propagateNaN; - softfloat_raiseFlags( softfloat_flag_invalid ); - uiZ = defaultNaNF16UI; - goto uiZ; - } - sigDiff = sigA - sigB; - if ( ! sigDiff ) { - uiZ = - packToF16UI( - (softfloat_roundingMode == softfloat_round_min), 0, 0 ); - goto uiZ; - } - if ( expA ) --expA; - signZ = signF16UI( uiA ); - if ( sigDiff < 0 ) { - signZ = ! signZ; - sigDiff = -sigDiff; - } - shiftDist = softfloat_countLeadingZeros16( sigDiff ) - 5; - expZ = expA - shiftDist; - if ( expZ < 0 ) { - shiftDist = expA; - expZ = 0; - } - sigZ = sigDiff<>16; - if ( sig32Z & 0xFFFF ) { - sigZ |= 1; - } else { - if ( ! (sigZ & 0xF) && ((unsigned int) expZ < 0x1E) ) { - sigZ >>= 4; - goto pack; - } - } - return softfloat_roundPackToF16( signZ, expZ, sigZ ); - } - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - propagateNaN: - uiZ = softfloat_propagateNaNF16UI( uiA, uiB ); - goto uiZ; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - subEpsilon: - roundingMode = softfloat_roundingMode; - if ( roundingMode != softfloat_round_near_even ) { - if ( - (roundingMode == softfloat_round_minMag) - || (roundingMode - == (signF16UI( uiZ ) ? softfloat_round_max - : softfloat_round_min)) - ) { - --uiZ; - } -#ifdef SOFTFLOAT_ROUND_ODD - else if ( roundingMode == softfloat_round_odd ) { - uiZ = (uiZ - 1) | 1; - } -#endif - } - softfloat_exceptionFlags |= softfloat_flag_inexact; - goto uiZ; - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - pack: - uiZ = packToF16UI( signZ, expZ, sigZ ); - uiZ: - uZ.ui = uiZ; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/s_subMagsF32.c b/outside/softfloat-3/source/s_subMagsF32.c deleted file mode 100644 index e7f92f301..000000000 --- a/outside/softfloat-3/source/s_subMagsF32.c +++ /dev/null @@ -1,143 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -float32_t softfloat_subMagsF32( uint_fast32_t uiA, uint_fast32_t uiB ) -{ - int_fast16_t expA; - uint_fast32_t sigA; - int_fast16_t expB; - uint_fast32_t sigB; - int_fast16_t expDiff; - uint_fast32_t uiZ; - int_fast32_t sigDiff; - bool signZ; - int_fast8_t shiftDist; - int_fast16_t expZ; - uint_fast32_t sigX, sigY; - union ui32_f32 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expA = expF32UI( uiA ); - sigA = fracF32UI( uiA ); - expB = expF32UI( uiB ); - sigB = fracF32UI( uiB ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expDiff = expA - expB; - if ( ! expDiff ) { - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - if ( expA == 0xFF ) { - if ( sigA | sigB ) goto propagateNaN; - softfloat_raiseFlags( softfloat_flag_invalid ); - uiZ = defaultNaNF32UI; - goto uiZ; - } - sigDiff = sigA - sigB; - if ( ! sigDiff ) { - uiZ = - packToF32UI( - (softfloat_roundingMode == softfloat_round_min), 0, 0 ); - goto uiZ; - } - if ( expA ) --expA; - signZ = signF32UI( uiA ); - if ( sigDiff < 0 ) { - signZ = ! signZ; - sigDiff = -sigDiff; - } - shiftDist = softfloat_countLeadingZeros32( sigDiff ) - 8; - expZ = expA - shiftDist; - if ( expZ < 0 ) { - shiftDist = expA; - expZ = 0; - } - uiZ = packToF32UI( signZ, expZ, sigDiff< -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -float64_t - softfloat_subMagsF64( uint_fast64_t uiA, uint_fast64_t uiB, bool signZ ) -{ - int_fast16_t expA; - uint_fast64_t sigA; - int_fast16_t expB; - uint_fast64_t sigB; - int_fast16_t expDiff; - uint_fast64_t uiZ; - int_fast64_t sigDiff; - int_fast8_t shiftDist; - int_fast16_t expZ; - uint_fast64_t sigZ; - union ui64_f64 uZ; - - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expA = expF64UI( uiA ); - sigA = fracF64UI( uiA ); - expB = expF64UI( uiB ); - sigB = fracF64UI( uiB ); - /*------------------------------------------------------------------------ - *------------------------------------------------------------------------*/ - expDiff = expA - expB; - if ( ! expDiff ) { - /*-------------------------------------------------------------------- - *--------------------------------------------------------------------*/ - if ( expA == 0x7FF ) { - if ( sigA | sigB ) goto propagateNaN; - softfloat_raiseFlags( softfloat_flag_invalid ); - uiZ = defaultNaNF64UI; - goto uiZ; - } - sigDiff = sigA - sigB; - if ( ! sigDiff ) { - uiZ = - packToF64UI( - (softfloat_roundingMode == softfloat_round_min), 0, 0 ); - goto uiZ; - } - if ( expA ) --expA; - if ( sigDiff < 0 ) { - signZ = ! signZ; - sigDiff = -sigDiff; - } - shiftDist = softfloat_countLeadingZeros64( sigDiff ) - 11; - expZ = expA - shiftDist; - if ( expZ < 0 ) { - shiftDist = expA; - expZ = 0; - } - uiZ = packToF64UI( signZ, expZ, sigDiff< -#include "platform.h" -#include "internals.h" -#include "specialize.h" - -bool - softfloat_tryPropagateNaNExtF80M( - const struct extFloat80M *aSPtr, - const struct extFloat80M *bSPtr, - struct extFloat80M *zSPtr - ) -{ - uint_fast16_t ui64; - uint64_t ui0; - - ui64 = aSPtr->signExp; - ui0 = aSPtr->signif; - if ( isNaNExtF80UI( ui64, ui0 ) ) goto propagateNaN; - ui64 = bSPtr->signExp; - ui0 = bSPtr->signif; - if ( isNaNExtF80UI( ui64, ui0 ) ) goto propagateNaN; - return false; - propagateNaN: - softfloat_propagateNaNExtF80M( aSPtr, bSPtr, zSPtr ); - return true; - -} - diff --git a/outside/softfloat-3/source/s_tryPropagateNaNF128M.c b/outside/softfloat-3/source/s_tryPropagateNaNF128M.c deleted file mode 100644 index b87fdc3a0..000000000 --- a/outside/softfloat-3/source/s_tryPropagateNaNF128M.c +++ /dev/null @@ -1,55 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" - -bool - softfloat_tryPropagateNaNF128M( - const uint32_t *aWPtr, const uint32_t *bWPtr, uint32_t *zWPtr ) -{ - - if ( softfloat_isNaNF128M( aWPtr ) || softfloat_isNaNF128M( bWPtr ) ) { - softfloat_propagateNaNF128M( aWPtr, bWPtr, zWPtr ); - return true; - } - return false; - -} - diff --git a/outside/softfloat-3/source/softfloat_state.c b/outside/softfloat-3/source/softfloat_state.c deleted file mode 100644 index f93f94191..000000000 --- a/outside/softfloat-3/source/softfloat_state.c +++ /dev/null @@ -1,52 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All Rights Reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "internals.h" -#include "specialize.h" -#include "softfloat.h" - -#ifndef THREAD_LOCAL -#define THREAD_LOCAL -#endif - -THREAD_LOCAL uint_fast8_t softfloat_roundingMode = softfloat_round_near_even; -THREAD_LOCAL uint_fast8_t softfloat_detectTininess = init_detectTininess; -THREAD_LOCAL uint_fast8_t softfloat_exceptionFlags = 0; - -THREAD_LOCAL uint_fast8_t extF80_roundingPrecision = 80; - diff --git a/outside/softfloat-3/source/ui32_to_extF80.c b/outside/softfloat-3/source/ui32_to_extF80.c deleted file mode 100644 index f65d30cbd..000000000 --- a/outside/softfloat-3/source/ui32_to_extF80.c +++ /dev/null @@ -1,59 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All Rights Reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -extFloat80_t ui32_to_extF80( uint32_t a ) -{ - uint_fast16_t uiZ64; - int_fast8_t shiftDist; - union { struct extFloat80M s; extFloat80_t f; } uZ; - - uiZ64 = 0; - if ( a ) { - shiftDist = softfloat_countLeadingZeros32( a ); - uiZ64 = 0x401E - shiftDist; - a <<= shiftDist; - } - uZ.s.signExp = uiZ64; - uZ.s.signif = (uint_fast64_t) a<<32; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/ui32_to_extF80M.c b/outside/softfloat-3/source/ui32_to_extF80M.c deleted file mode 100644 index 3b63a8e2f..000000000 --- a/outside/softfloat-3/source/ui32_to_extF80M.c +++ /dev/null @@ -1,74 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All Rights Reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -void ui32_to_extF80M( uint32_t a, extFloat80_t *zPtr ) -{ - - *zPtr = ui32_to_extF80( a ); - -} - -#else - -void ui32_to_extF80M( uint32_t a, extFloat80_t *zPtr ) -{ - struct extFloat80M *zSPtr; - uint_fast16_t uiZ64; - uint64_t sigZ; - int_fast8_t shiftDist; - - zSPtr = (struct extFloat80M *) zPtr; - uiZ64 = 0; - sigZ = 0; - if ( a ) { - shiftDist = softfloat_countLeadingZeros32( a ); - uiZ64 = packToExtF80UI64( 0, 0x401E - shiftDist ); - sigZ = (uint64_t) (a<signExp = uiZ64; - zSPtr->signif = sigZ; - -} - -#endif - diff --git a/outside/softfloat-3/source/ui32_to_f128.c b/outside/softfloat-3/source/ui32_to_f128.c deleted file mode 100644 index 39be49783..000000000 --- a/outside/softfloat-3/source/ui32_to_f128.c +++ /dev/null @@ -1,60 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All Rights Reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -float128_t ui32_to_f128( uint32_t a ) -{ - uint_fast64_t uiZ64; - int_fast8_t shiftDist; - union ui128_f128 uZ; - - uiZ64 = 0; - if ( a ) { - shiftDist = softfloat_countLeadingZeros32( a ) + 17; - uiZ64 = - packToF128UI64( - 0, 0x402E - shiftDist, (uint_fast64_t) a< -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -void ui32_to_f128M( uint32_t a, float128_t *zPtr ) -{ - - *zPtr = ui32_to_f128( a ); - -} - -#else - -void ui32_to_f128M( uint32_t a, float128_t *zPtr ) -{ - uint32_t *zWPtr, uiZ96, uiZ64; - int_fast8_t shiftDist; - uint64_t normA; - - zWPtr = (uint32_t *) zPtr; - uiZ96 = 0; - uiZ64 = 0; - if ( a ) { - shiftDist = softfloat_countLeadingZeros32( a ) + 17; - normA = (uint64_t) a<>32 ); - uiZ64 = normA; - } - zWPtr[indexWord( 4, 3 )] = uiZ96; - zWPtr[indexWord( 4, 2 )] = uiZ64; - zWPtr[indexWord( 4, 1 )] = 0; - zWPtr[indexWord( 4, 0 )] = 0; - -} - -#endif - diff --git a/outside/softfloat-3/source/ui32_to_f16.c b/outside/softfloat-3/source/ui32_to_f16.c deleted file mode 100644 index 77dacae8b..000000000 --- a/outside/softfloat-3/source/ui32_to_f16.c +++ /dev/null @@ -1,65 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All Rights Reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -float16_t ui32_to_f16( uint32_t a ) -{ - int_fast8_t shiftDist; - union ui16_f16 u; - uint_fast16_t sig; - - shiftDist = softfloat_countLeadingZeros32( a ) - 21; - if ( 0 <= shiftDist ) { - u.ui = - a ? packToF16UI( - 0, 0x18 - shiftDist, (uint_fast16_t) a<>(-shiftDist) | ((uint32_t) (a<<(shiftDist & 31)) != 0) - : (uint_fast16_t) a< -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -float32_t ui32_to_f32( uint32_t a ) -{ - union ui32_f32 uZ; - - if ( ! a ) { - uZ.ui = 0; - return uZ.f; - } - if ( a & 0x80000000 ) { - return softfloat_roundPackToF32( 0, 0x9D, a>>1 | (a & 1) ); - } else { - return softfloat_normRoundPackToF32( 0, 0x9C, a ); - } - -} - diff --git a/outside/softfloat-3/source/ui32_to_f64.c b/outside/softfloat-3/source/ui32_to_f64.c deleted file mode 100644 index f3fc3f9e2..000000000 --- a/outside/softfloat-3/source/ui32_to_f64.c +++ /dev/null @@ -1,59 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All Rights Reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -float64_t ui32_to_f64( uint32_t a ) -{ - uint_fast64_t uiZ; - int_fast8_t shiftDist; - union ui64_f64 uZ; - - if ( ! a ) { - uiZ = 0; - } else { - shiftDist = softfloat_countLeadingZeros32( a ) + 21; - uiZ = - packToF64UI( 0, 0x432 - shiftDist, (uint_fast64_t) a< -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -extFloat80_t ui64_to_extF80( uint64_t a ) -{ - uint_fast16_t uiZ64; - int_fast8_t shiftDist; - union { struct extFloat80M s; extFloat80_t f; } uZ; - - uiZ64 = 0; - if ( a ) { - shiftDist = softfloat_countLeadingZeros64( a ); - uiZ64 = 0x403E - shiftDist; - a <<= shiftDist; - } - uZ.s.signExp = uiZ64; - uZ.s.signif = a; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/ui64_to_extF80M.c b/outside/softfloat-3/source/ui64_to_extF80M.c deleted file mode 100644 index 82d70eb24..000000000 --- a/outside/softfloat-3/source/ui64_to_extF80M.c +++ /dev/null @@ -1,74 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All Rights Reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -void ui64_to_extF80M( uint64_t a, extFloat80_t *zPtr ) -{ - - *zPtr = ui64_to_extF80( a ); - -} - -#else - -void ui64_to_extF80M( uint64_t a, extFloat80_t *zPtr ) -{ - struct extFloat80M *zSPtr; - uint_fast16_t uiZ64; - uint64_t sigZ; - int_fast8_t shiftDist; - - zSPtr = (struct extFloat80M *) zPtr; - uiZ64 = 0; - sigZ = 0; - if ( a ) { - shiftDist = softfloat_countLeadingZeros64( a ); - uiZ64 = packToExtF80UI64( 0, 0x403E - shiftDist ); - sigZ = a<signExp = uiZ64; - zSPtr->signif = sigZ; - -} - -#endif - diff --git a/outside/softfloat-3/source/ui64_to_f128.c b/outside/softfloat-3/source/ui64_to_f128.c deleted file mode 100644 index 2ce27b8b6..000000000 --- a/outside/softfloat-3/source/ui64_to_f128.c +++ /dev/null @@ -1,68 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All Rights Reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -float128_t ui64_to_f128( uint64_t a ) -{ - uint_fast64_t uiZ64, uiZ0; - int_fast8_t shiftDist; - struct uint128 zSig; - union ui128_f128 uZ; - - if ( ! a ) { - uiZ64 = 0; - uiZ0 = 0; - } else { - shiftDist = softfloat_countLeadingZeros64( a ) + 49; - if ( 64 <= shiftDist ) { - zSig.v64 = a<<(shiftDist - 64); - zSig.v0 = 0; - } else { - zSig = softfloat_shortShiftLeft128( 0, a, shiftDist ); - } - uiZ64 = packToF128UI64( 0, 0x406E - shiftDist, zSig.v64 ); - uiZ0 = zSig.v0; - } - uZ.ui.v64 = uiZ64; - uZ.ui.v0 = uiZ0; - return uZ.f; - -} - diff --git a/outside/softfloat-3/source/ui64_to_f128M.c b/outside/softfloat-3/source/ui64_to_f128M.c deleted file mode 100644 index b76944c1d..000000000 --- a/outside/softfloat-3/source/ui64_to_f128M.c +++ /dev/null @@ -1,86 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All Rights Reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -#ifdef SOFTFLOAT_FAST_INT64 - -void ui64_to_f128M( uint64_t a, float128_t *zPtr ) -{ - - *zPtr = ui64_to_f128( a ); - -} - -#else - -void ui64_to_f128M( uint64_t a, float128_t *zPtr ) -{ - uint32_t *zWPtr, uiZ96, uiZ64; - uint_fast8_t shiftDist; - uint32_t *ptr; - - zWPtr = (uint32_t *) zPtr; - uiZ96 = 0; - uiZ64 = 0; - zWPtr[indexWord( 4, 1 )] = 0; - zWPtr[indexWord( 4, 0 )] = 0; - if ( a ) { - shiftDist = softfloat_countLeadingZeros64( a ) + 17; - if ( shiftDist < 32 ) { - ptr = zWPtr + indexMultiwordHi( 4, 3 ); - ptr[indexWord( 3, 2 )] = 0; - ptr[indexWord( 3, 1 )] = a>>32; - ptr[indexWord( 3, 0 )] = a; - softfloat_shortShiftLeft96M( ptr, shiftDist, ptr ); - ptr[indexWordHi( 3 )] = - packToF128UI96( 0, 0x404E - shiftDist, ptr[indexWordHi( 3 )] ); - return; - } - a <<= shiftDist - 32; - uiZ96 = packToF128UI96( 0, 0x404E - shiftDist, a>>32 ); - uiZ64 = a; - } - zWPtr[indexWord( 4, 3 )] = uiZ96; - zWPtr[indexWord( 4, 2 )] = uiZ64; - -} - -#endif - diff --git a/outside/softfloat-3/source/ui64_to_f16.c b/outside/softfloat-3/source/ui64_to_f16.c deleted file mode 100644 index 03568922b..000000000 --- a/outside/softfloat-3/source/ui64_to_f16.c +++ /dev/null @@ -1,64 +0,0 @@ - -/*============================================================================ - -This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic -Package, Release 3c, by John R. Hauser. - -Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of -California. All Rights Reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions, and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - -=============================================================================*/ - -#include -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -float16_t ui64_to_f16( uint64_t a ) -{ - int_fast8_t shiftDist; - union ui16_f16 u; - uint_fast16_t sig; - - shiftDist = softfloat_countLeadingZeros64( a ) - 53; - if ( 0 <= shiftDist ) { - u.ui = - a ? packToF16UI( - 0, 0x18 - shiftDist, (uint_fast16_t) a< -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -float32_t ui64_to_f32( uint64_t a ) -{ - int_fast8_t shiftDist; - union ui32_f32 u; - uint_fast32_t sig; - - shiftDist = softfloat_countLeadingZeros64( a ) - 40; - if ( 0 <= shiftDist ) { - u.ui = - a ? packToF32UI( - 0, 0x95 - shiftDist, (uint_fast32_t) a< -#include "platform.h" -#include "internals.h" -#include "softfloat.h" - -float64_t ui64_to_f64( uint64_t a ) -{ - union ui64_f64 uZ; - - if ( ! a ) { - uZ.ui = 0; - return uZ.f; - } - if ( a & UINT64_C( 0x8000000000000000 ) ) { - return - softfloat_roundPackToF64( - 0, 0x43D, softfloat_shortShiftRightJam64( a, 1 ) ); - } else { - return softfloat_normRoundPackToF64( 0, 0x43C, a ); - } - -} - From 94ac10e29e1c7f5b8bddaab992a0c9817696815a Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 14:12:44 +0800 Subject: [PATCH 03/78] Remove telnet. Remove batz --- vere/ames.c | 8 +- vere/batz.c | 91 -------------------- vere/cttp.c | 10 +-- vere/http.c | 6 +- vere/loop.c | 5 +- vere/main.c | 4 +- vere/term.c | 243 ++-------------------------------------------------- 7 files changed, 23 insertions(+), 344 deletions(-) delete mode 100644 vere/batz.c diff --git a/vere/ames.c b/vere/ames.c index 63cba4809..45ab8a80c 100644 --- a/vere/ames.c +++ b/vere/ames.c @@ -210,6 +210,10 @@ u3_ames_ef_send(u3_noun lan, u3_noun pac) u3r_bytes(0, len_w, buf_y, pac); + if ( c3n == u3_Host.ops_u.net && 0x7f000001 != pip_w) { + return; // remote sending disabled + } + if ( 0 == pip_w ) { pip_w = 0x7f000001; por_s = u3_Host.sam_u.por_s; @@ -349,7 +353,9 @@ u3_ames_io_init() memset(&add_u, 0, sizeof(add_u)); add_u.sin_family = AF_INET; - add_u.sin_addr.s_addr = htonl(INADDR_ANY); + add_u.sin_addr.s_addr = _(u3_Host.ops_u.net) ? + htonl(INADDR_ANY) : + htonl(INADDR_LOOPBACK); add_u.sin_port = htons(por_s); int ret; diff --git a/vere/batz.c b/vere/batz.c deleted file mode 100644 index 4ec6e6a86..000000000 --- a/vere/batz.c +++ /dev/null @@ -1,91 +0,0 @@ -/* v/batz.c -** -** This file is in the public domain. -*/ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "all.h" -#include "vere/vere.h" - -/* u3_batz_io_init(): initialize batz timer. -*/ -void -u3_batz_io_init(void) -{ - u3_batz* beh_u = &u3_Host.beh_u; - - uv_timer_init(u3L, &beh_u->tim_u); - beh_u->alm = c3n; -} - -/* u3_batz_io_exit(): terminate timer. -*/ -void -u3_batz_io_exit(void) -{ -} - -/* _batz_time_cb(): timer callback. -*/ -static void -_batz_time_cb(uv_timer_t* tim_u) -{ - u3_batz* beh_u = &u3_Host.beh_u; - if(beh_u->run_w < 1024) { - beh_u->run_w++; - } - - u3_lo_open(); - { - u3v_plan - (u3nt(u3_blip, c3__batz, u3_nul), - u3nc(c3__wake, u3_nul)); - } - u3_lo_shut(c3n); -} - -/* u3_batz_io_poll(): update batz IO state. -*/ -void -u3_batz_io_poll(void) -{ - u3_batz* beh_u = &u3_Host.beh_u; - u3_noun wen = u3v_keep(u3nt(u3_blip, c3__batz, u3_nul)); - - if ( (u3_nul != wen) && - (c3y == u3du(wen)) && - (c3y == u3ud(u3t(wen))) ) - { - c3_d gap_d = u3_time_gap_ms(u3k(u3A->now), u3k(u3t(wen))); - - gap_d += beh_u->run_w; - - if ( c3y == beh_u->alm ) { - uv_timer_stop(&beh_u->tim_u); - } - else beh_u->alm = c3y; - - uv_timer_start(&beh_u->tim_u, _batz_time_cb, gap_d, 0); - } - else { - if ( c3y == beh_u->alm ) { - uv_timer_stop(&beh_u->tim_u); - } - beh_u->alm = c3n; - } - u3z(wen); -} diff --git a/vere/cttp.c b/vere/cttp.c index eae999c1a..e3025af68 100644 --- a/vere/cttp.c +++ b/vere/cttp.c @@ -22,7 +22,7 @@ #include #include -#include "../outside/jhttp/http_parser.h" // Joyent HTTP +#include #include "all.h" #include "vere/vere.h" @@ -1166,14 +1166,14 @@ _cttp_ccon_kick_read_cryp_cb(uv_stream_t* tcp_u, if ( siz_w == UV_EOF ) { #if 1 _cttp_ccon_fail(coc_u, c3n); -#else +#else // old workaround: // // https://github.com/urbit/urbit/issues/254 // uv_close((uv_handle_t*) tcp_u, NULL); #endif - } + } else if ( siz_w < 0 ) { uL(fprintf(uH, "cttp: read 2: %s\n", uv_strerror(siz_w))); _cttp_ccon_fail(coc_u, c3y); @@ -1222,7 +1222,7 @@ _cttp_ccon_kick_read_clyr_cb(uv_stream_t* tcp_u, if ( siz_w == UV_EOF ) { #if 1 _cttp_ccon_fail(coc_u, c3n); -#else +#else // old workaround: // // https://github.com/urbit/urbit/issues/254 @@ -1403,7 +1403,7 @@ _cttp_ccon(u3_noun sec, c3_s por_s, c3_c* hot_c) free(hot_c); return coc_c; } - else + else #endif return _cttp_ccon_new(sec, por_s, hot_c); } diff --git a/vere/http.c b/vere/http.c index 9a128034e..32aa6d08c 100644 --- a/vere/http.c +++ b/vere/http.c @@ -19,7 +19,7 @@ #include #include -#include "../outside/jhttp/http_parser.h" // Joyent HTTP +#include // Joyent HTTP #include "all.h" #include "vere/vere.h" @@ -587,7 +587,7 @@ _http_conn_read_cb(uv_stream_t* tcp_u, u3_lo_open(); { if ( siz_w == UV_EOF ) { - _http_conn_dead(hon_u); + _http_conn_dead(hon_u); } else if ( siz_w < 0 ) { uL(fprintf(uH, "http: read: %s\n", uv_strerror(siz_w))); _http_conn_dead(hon_u); @@ -891,7 +891,7 @@ _http_request(u3_hreq* req_u) _(req_u->hon_u->htp_u->lop) ? c3__chis : c3__this; - + u3v_plan(pox, u3nq(typ, req_u->hon_u->htp_u->sec, diff --git a/vere/loop.c b/vere/loop.c index 382964416..03a015b45 100644 --- a/vere/loop.c +++ b/vere/loop.c @@ -216,9 +216,6 @@ _lo_talk() u3_http_io_talk(); u3a_lop(cod_l); - cod_l = u3a_lush(c3__term); - u3_term_io_talk(); - u3a_lop(cod_l); } /* u3_lo_exit(): terminate I/O across the process. @@ -236,7 +233,7 @@ u3_lo_exit(void) u3_ames_io_exit(); u3a_lop(cod_l); - cod_l = u3a_lush(c3__term); + cod_l = u3a_lush(c3__term); u3_term_io_exit(); u3a_lop(cod_l); diff --git a/vere/main.c b/vere/main.c index 03352dbc5..f4071d029 100644 --- a/vere/main.c +++ b/vere/main.c @@ -322,16 +322,16 @@ u3_ve_usage(c3_i argc, c3_c** argv) "-c pier Create a new urbit in pier/\n", "-d Daemon mode\n", "-D Recompute from events\n", - "-F Fake keys\n", + "-F Fake keys; also disables networking\n", "-f Fuzz testing\n", "-g Set GC flag\n", "-H domain Set ames bootstrap domain (default urbit.org)\n", "-I galaxy Start as ~galaxy\n", "-k stage Start at Hoon kernel version stage\n", - "-L Local-only network\n", "-l port Initial peer port\n", "-M Memory madness\n", "-n host Set unix hostname\n", + "-N Enable networking in fake mode (-F)\n", "-p ames_port Set the HTTP port to bind to\n", "-P Profiling\n", "-q Quiet\n", diff --git a/vere/term.c b/vere/term.c index cb9a92e90..61be5be27 100644 --- a/vere/term.c +++ b/vere/term.c @@ -17,8 +17,6 @@ #include #include #include -#include -#include #include "all.h" #include "vere/vere.h" @@ -30,8 +28,7 @@ static void _term_read_cb(uv_stream_t* tcp_u, ssize_t siz_i, const uv_buf_t * buf_u); static inline void _term_suck(u3_utty*, const c3_y*, ssize_t); -static void _tel_event(telnet_nvt*, telnet_event*); -static void _tel_opt(telnet_nvt*, telnet_byte, telnet_telopt_event*); + #define _T_ECHO 1 // local echo #define _T_CTIM 3 // suppress GA/char-at-a-time @@ -91,16 +88,6 @@ _term_close_cb(uv_handle_t* han_t) free(tty_u); } -/* _tel_close_cb(): close telnet terminal -*/ -static void -_tel_close_cb(uv_handle_t* han_t) -{ - u3_utel* pty_u = (u3_utel*)(void*)han_t; - telnet_nvt_free(pty_u->tel_u); - _term_close_cb(han_t); -} - /* u3_term_io_init(): initialize terminal. */ void @@ -280,123 +267,6 @@ u3_term_io_init() } } } - -void -_term_listen_cb(uv_stream_t *wax_u, int sas_i) -{ - u3_utel* pty_u = calloc(1, sizeof(*pty_u)); - u3_utty* tty_u = &pty_u->uty_t; - uv_tcp_init(u3L, &tty_u->wax_u); - c3_w ret_w; - if ( 0 != (ret_w = uv_accept(wax_u, (uv_stream_t*)&tty_u->wax_u)) ) { - uL(fprintf(uH, "term: accept: %s\n", - uv_strerror(ret_w))); - - uv_close((uv_handle_t*)&tty_u->wax_u, NULL); - free(tty_u); - } - else { - uv_read_start((uv_stream_t*)&tty_u->wax_u, - _term_alloc, - _term_read_tn_cb); - - tty_u->ufo_u.out.clear_y = (const c3_y*)"\033[H\033[J"; - tty_u->ufo_u.out.el_y = (const c3_y*)"\033[K"; - tty_u->ufo_u.out.ed_y = (const c3_y*)"\033[J"; - tty_u->ufo_u.out.bel_y = (const c3_y*)"\007"; - tty_u->ufo_u.out.cub1_y = (const c3_y*)"\010"; - tty_u->ufo_u.out.cud1_y = (const c3_y*)"\033[B"; - tty_u->ufo_u.out.cuu1_y = (const c3_y*)"\033[A"; - tty_u->ufo_u.out.cuf1_y = (const c3_y*)"\033[C"; - - tty_u->ufo_u.inn.kcuu1_y = (const c3_y*)"\033[A"; - tty_u->ufo_u.inn.kcud1_y = (const c3_y*)"\033[B"; - tty_u->ufo_u.inn.kcuf1_y = (const c3_y*)"\033[C"; - tty_u->ufo_u.inn.kcub1_y = (const c3_y*)"\033[D"; - tty_u->ufo_u.inn.max_w = strlen("\033[D"); - - tty_u->fid_i = -1; - - tty_u->tat_u.mir.lin_w = 0; - tty_u->tat_u.mir.len_w = 0; - tty_u->tat_u.mir.cus_w = 0; - - tty_u->tat_u.esc.ape = c3n; - tty_u->tat_u.esc.bra = c3n; - - tty_u->tat_u.fut.len_w = 0; - tty_u->tat_u.fut.wid_w = 0; - - tty_u->tat_u.siz.col_l = 80; - tty_u->tat_u.siz.row_l = 25; - - tty_u->tid_l = u3_Host.uty_u->tid_l + 1; - tty_u->nex_u = u3_Host.uty_u; - u3_Host.uty_u = tty_u; - pty_u->tel_u = telnet_nvt_new(tty_u, _tel_event, _tel_opt, NULL); - - { - u3_noun tid = u3dc("scot", c3__ud, tty_u->tid_l); - u3_noun pax = u3nq(u3_blip, c3__term, tid, u3_nul); - // u3v_plan(u3k(pax), u3nq(c3__flow, c3__seat, c3__dojo, u3_nul)); - u3v_plan(u3k(pax), u3nc(c3__blew, u3nc(80, 25))); - u3v_plan(u3k(pax), u3nc(c3__hail, u3_nul)); - u3z(pax); - } - - telnet_telopt_enable(pty_u->tel_u, _T_ECHO, TELNET_LOCAL); - telnet_telopt_enable(pty_u->tel_u, _T_CTIM, TELNET_LOCAL); - telnet_telopt_enable(pty_u->tel_u, _T_NAWS, TELNET_REMOTE); - } -} - -void -u3_term_io_talk(void) -{ - struct sockaddr_in add_u; - u3_utel* tel_u = &u3_Host.tel_u; - - uv_tcp_init(u3L, &tel_u->uty_t.wax_u); - tel_u->por_s = 10023; - - memset(&add_u, 0, sizeof(add_u)); - add_u.sin_family = AF_INET; - add_u.sin_addr.s_addr = htonl(INADDR_LOOPBACK); - - /* Try ascending ports. - */ - while ( 1 ) { - add_u.sin_port = htons(tel_u->por_s); - - c3_w ret ; - if ( 0 != (ret = uv_tcp_bind(&tel_u->uty_t.wax_u, (const struct sockaddr*) & add_u, 0)) ) { - if ( UV_EADDRINUSE == ret ) { - tel_u->por_s++; - continue; - } - else { - uL(fprintf(uH, "term: bind: %s\n", uv_strerror(ret))); - } - } - c3_w ret_w; - if ( 0 != (ret_w = uv_listen((uv_stream_t*)&tel_u->uty_t.wax_u, - 16, _term_listen_cb)) ) - { - if ( UV_EADDRINUSE == ret_w ) { - tel_u->por_s++; - continue; - } - else { - uL(fprintf(uH, "term: listen: %s\n", uv_strerror(ret_w))); - } - } -#if 0 - uL(fprintf(uH, "term: live (but unsupported) on %d\n", tel_u->por_s)); -#endif - break; - } -} - /* u3_term_io_exit(): clean up terminal. */ void @@ -585,7 +455,6 @@ static void _term_it_show_blank(u3_utty* uty_u) { _term_it_write_txt(uty_u, uty_u->ufo_u.out.clear_y); - uty_u->tat_u.mir.cus_w = 0; } /* _term_it_show_cursor(): set current line, transferring pointer. @@ -724,80 +593,6 @@ _term_io_belt(u3_utty* uty_u, u3_noun blb) u3v_plan(pax, u3nc(c3__belt, blb)); } -/* _tel_event(): telnet sucker -*/ -#define _te_nvt telnet_nvt -#define _te_evt telnet_event -#define _te_dvt telnet_data_event -#define _te_svt telnet_send_event -static void -_tel_event(_te_nvt* nvt, _te_evt* evt) -{ - u3_utel* tel_u; - c3_assert(0 < telnet_get_userdata(nvt, (void**)&tel_u)); - switch (evt->type) - { - case TELNET_EV_DATA: - { - _te_dvt* dv = (_te_dvt*)evt; - _term_suck((u3_utty*)tel_u, dv->data, dv->length); - break; - } - - case TELNET_EV_SEND: - { - _te_svt* sv = (_te_svt*)evt; - _term_it_write_bytes((u3_utty*)tel_u, sv->length, sv->data); - break; - } - default: - { - break; - } - } -} - -#define _to_evt telnet_telopt_event -#define _to_dvt telnet_telopt_data_event -#define _to_tvt telnet_telopt_toggle_event -/* _tel_opt(): telnet event sucker -*/ -static void -_tel_opt(_te_nvt* nvt, telnet_byte opt, _to_evt* evt) -{ - switch (evt->type) - { - default: break; - case TELNET_EV_TELOPT_DATA: - { - _to_dvt* dv = (_to_dvt*)evt; - u3_utel* tel_u; - u3_noun pax; - u3_noun blu; - u3_noun tid; - c3_s col_s; - c3_s row_s; - - if ( opt != _T_NAWS ) { - return; - } - - c3_assert(0 < telnet_get_userdata(nvt, (void**)&tel_u)); - - col_s = dv->data[1] | (dv->data[0] << 8); - row_s = dv->data[3] | (dv->data[2] << 8); - - tel_u->uty_t.tat_u.siz.col_l = col_s; - tel_u->uty_t.tat_u.siz.row_l = row_s; - - tid = u3dc("scot", c3__ud, tel_u->uty_t.tid_l); - pax = u3nq(u3_blip, c3__term, tid, u3_nul); - blu = u3nc(col_s, row_s); - u3v_plan(pax, u3nc(c3__blew, blu)); - break; - } - } -} /* _term_io_suck_char(): process a single character. */ static void @@ -894,35 +689,6 @@ _term_io_suck_char(u3_utty* uty_u, c3_y cay_y) } } } - -/* _term_read_tn_cb(): telnet read callback. -*/ -static void -_term_read_tn_cb(uv_stream_t* tcp_u, - ssize_t siz_i, - const uv_buf_t * buf_u) -{ - u3_utel* pty_u = (u3_utel*)(void*) tcp_u; - - u3_lo_open(); - { - if ( siz_i == UV_EOF ) { - // nothing - } else if ( siz_i < 0 ) { - uL(fprintf(uH, "term teln: read: %s\n", uv_strerror(siz_i))); - uv_close((uv_handle_t*) tcp_u, _tel_close_cb); - goto err; - } - else { - telnet_receive(pty_u->tel_u, (const telnet_byte*) buf_u->base, siz_i, 0); - } - - err: - free(buf_u->base); - } - u3_lo_shut(c3y); -} - /* _term_suck(): process a chunk of input */ @@ -1229,6 +995,8 @@ u3_term_ef_ctlc(void) u3_noun pax = u3nq(u3_blip, c3__term, '1', u3_nul); u3v_plan(pax, u3nt(c3__belt, c3__ctl, 'c')); + + _term_it_refresh_line(_term_main()); } /* u3_term_ef_boil(): initial effects for loaded servers. @@ -1265,8 +1033,8 @@ u3_term_ef_ticket(c3_c* who_c, c3_c* tic_c) { u3_noun pax = u3nq(u3_blip, c3__term, '1', u3_nul); u3_noun who, tic; - u3_noun whu, tuc; - + u3_noun whu, tuc; + whu = u3dc("slaw", 'p', u3i_string(who_c)); if ( u3_nul == whu ) { fprintf(stderr, "ticket: invalid planet '%s'\r\n", who_c); @@ -1548,4 +1316,3 @@ u3_term_wall(u3_noun wol) u3z(wol); } - From aeb3a8c51ba0d4adb5c1cd8be868fc60ac191698 Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 14:13:24 +0800 Subject: [PATCH 04/78] Switch to softfloat3 --- jets/e/jam.c | 143 +++++++++++++++++++++++++++++++-------------------- jets/e/rd.c | 2 +- jets/e/rh.c | 8 +-- jets/e/rq.c | 2 +- jets/e/rs.c | 8 +-- 5 files changed, 98 insertions(+), 65 deletions(-) diff --git a/jets/e/jam.c b/jets/e/jam.c index 7751aa05c..a77391190 100644 --- a/jets/e/jam.c +++ b/jets/e/jam.c @@ -3,32 +3,19 @@ */ #include "all.h" - /* functions */ - static u3_noun - _jam_in(u3p(u3h_root) har_p, u3_atom, u3_atom, u3_noun); static u3_noun - _jam_in_pair(u3p(u3h_root) har_p, - u3_atom h_a, - u3_atom t_a, - u3_atom b, - u3_noun l) + _jam_pair(u3_noun x, u3_noun d, u3_noun e) { - u3_noun w = u3nc(u3nc(2, 1), u3k(l)); - u3_noun x = u3qa_add(2, b); - u3_noun d = _jam_in(har_p, h_a, x, w); - u3_noun p_d, q_d, r_d; - u3_noun r; - - u3r_trel(d, &p_d, &q_d, &r_d); + u3_noun r, p_d, q_d, r_d; + u3x_trel(d, &p_d, &q_d, &r_d); { u3_noun y = u3qa_add(x, p_d); - u3_noun e = _jam_in(har_p, t_a, y, q_d); u3_noun p_e, q_e, r_e; - u3r_trel(e, &p_e, &q_e, &r_e); + u3x_trel(e, &p_e, &q_e, &r_e); { u3_noun z = u3qa_add(p_d, p_e); @@ -36,20 +23,16 @@ u3z(z); } - u3z(e); u3z(y); } - u3z(d); u3z(x); - u3z(w); - + u3z(d); + u3z(e); return r; } static u3_noun - _jam_in_flat(u3p(u3h_root) har_p, - u3_atom a, - u3_noun l) + _jam_flat(u3_atom a, u3_noun l) { u3_noun d = u3qe_mat(a); u3_noun x = u3qa_add(1, u3h(d)); @@ -62,9 +45,7 @@ } static u3_noun - _jam_in_ptr(u3p(u3h_root) har_p, - u3_atom u_c, - u3_noun l) + _jam_ptr(u3_atom u_c, u3_noun l) { u3_noun d = u3qe_mat(u_c); u3_atom x = u3qc_lsh(0, 2, u3t(d)); @@ -78,45 +59,97 @@ return z; } - static u3_noun - _jam_in(u3p(u3h_root) har_p, - u3_noun a, - u3_atom b, - u3_noun l) + typedef struct { + u3_noun a; + u3_noun b; + u3_noun l; + u3_noun* r; + u3_noun hed; + u3_noun tel; + } jamframe; + + static inline void + _jam_push(u3_noun a, u3_noun b, u3_noun l, u3_noun *r) { - u3_noun c = u3h_get(har_p, a); - u3_noun x; + jamframe* fam = u3a_push(sizeof(jamframe)); + fam->a = a; + fam->b = b; + fam->l = l; + fam->r = r; + fam->hed = u3_none; + fam->tel = u3_none; + } - if ( u3_none == c ) { - u3h_put(har_p, a, u3k(b)); + static inline void + _jam_pop() + { + u3a_pop(sizeof(jamframe)); + } - if ( c3y == u3ud(a) ) { - x = _jam_in_flat(har_p, a, l); - } else { - x = _jam_in_pair(har_p, u3h(a), u3t(a), b, l); - } - } - else { - if ( c3y == u3ud(a) && u3r_met(0, a) <= u3r_met(0, c) ) { - x = _jam_in_flat(har_p, a, l); - } - else { - x = _jam_in_ptr(har_p, c, l); - } - } - return x; + static inline jamframe* + _jam_peek() + { + return (jamframe*) u3a_peek(sizeof(jamframe)); } u3_noun u3qe_jam(u3_atom a) { u3p(u3h_root) har_p = u3h_new(); + u3p(jamframe) empty = u3R->cap_p; + jamframe* fam; + u3_noun out, c, x, q, r; - u3_noun x = _jam_in(har_p, a, 0, u3_nul); - u3_noun q = u3qb_flop(u3h(u3t(x))); - u3_noun r = u3qc_can(0, q); + _jam_push(a, 0, u3_nul, &out); + while ( empty != u3R->cap_p ) { + fam = _jam_peek(); + if ( u3_none != fam->tel ) { + u3_noun z = u3qa_add(2, fam->b); + x = _jam_pair(z, fam->hed, fam->tel); + } + else if ( u3_none != fam->hed ) { + u3_noun p_d, q_d, r_d; + u3x_trel(fam->hed, &p_d, &q_d, &r_d); + { + u3_noun z = u3qa_add(2, fam->b); + u3_noun y = u3qa_add(z, p_d); + _jam_push(u3t(fam->a), y, q_d, &(fam->tel)); + u3z(z); + continue; + } + } + else { + a = fam->a; + c = u3h_get(har_p, a); + if ( u3_none != c ) { + if ( (c3y == u3ud(a)) && u3r_met(0, a) <= u3r_met(0, c) ) { + x = _jam_flat(a, fam->l); + } + else { + x = _jam_ptr(c, fam->l); + } + } + else { + u3h_put(har_p, a, u3k(fam->b)); + if ( c3y == u3ud(a) ) { + x = _jam_flat(a, fam->l); + } + else { + u3_noun z = u3qa_add(2, fam->b); + u3_noun w = u3nc(u3nc(2, 1), u3k(fam->l)); + _jam_push(u3h(a), z, w, &(fam->hed)); + continue; + } + } + } + *(fam->r) = x; + u3z(fam->b); + _jam_pop(); + } - u3z(x); + q = u3qb_flop(u3h(u3t(out))); + r = u3qc_can(0, q); + u3z(out); u3z(q); u3h_free(har_p); return r; diff --git a/jets/e/rd.c b/jets/e/rd.c index 04281147b..d4b44f778 100644 --- a/jets/e/rd.c +++ b/jets/e/rd.c @@ -2,7 +2,7 @@ ** */ #include "all.h" -#include "softfloat.h" +#include #define DOUBNAN 0x7ff8000000000000 diff --git a/jets/e/rh.c b/jets/e/rh.c index 96c2f2f74..472de374a 100644 --- a/jets/e/rh.c +++ b/jets/e/rh.c @@ -2,7 +2,7 @@ ** */ #include "all.h" -#include "softfloat.h" +#include #define HALFNAN 0x7e00 @@ -151,8 +151,8 @@ /* div */ u3_noun - u3qes_div(u3_atom a, - u3_atom b, + u3qes_div(u3_atom a, + u3_atom b, u3_atom r) { union half c, d, e; @@ -183,7 +183,7 @@ /* sqt */ u3_noun - u3qes_sqt(u3_atom a, + u3qes_sqt(u3_atom a, u3_atom r) { union half c, d; diff --git a/jets/e/rq.c b/jets/e/rq.c index f4c506c9a..19af6acc6 100644 --- a/jets/e/rq.c +++ b/jets/e/rq.c @@ -2,7 +2,7 @@ ** */ #include "all.h" -#include "softfloat.h" +#include #define QUADNAN 0x7fff800000000000 diff --git a/jets/e/rs.c b/jets/e/rs.c index d4ee29d7e..b0f2a4574 100644 --- a/jets/e/rs.c +++ b/jets/e/rs.c @@ -2,7 +2,7 @@ ** */ #include "all.h" -#include "softfloat.h" +#include #define SINGNAN 0x7fc00000 @@ -151,8 +151,8 @@ /* div */ u3_noun - u3qet_div(u3_atom a, - u3_atom b, + u3qet_div(u3_atom a, + u3_atom b, u3_atom r) { union sing c, d, e; @@ -183,7 +183,7 @@ /* sqt */ u3_noun - u3qet_sqt(u3_atom a, + u3qet_sqt(u3_atom a, u3_atom r) { union sing c, d; From bbce72a2ad4a77810bdbf3419dd9667186d8a7cb Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 14:13:47 +0800 Subject: [PATCH 05/78] New allocator --- noun/allocate.c | 52 +++++++ noun/retrieve.c | 351 +++++++++++++++++++----------------------------- 2 files changed, 192 insertions(+), 211 deletions(-) diff --git a/noun/allocate.c b/noun/allocate.c index f8dd50f31..92af40851 100644 --- a/noun/allocate.c +++ b/noun/allocate.c @@ -576,6 +576,58 @@ u3a_wealloc(void* lag_v, c3_w len_w) } } } +/* u3a_push(): allocate space on the road stack +*/ +void* +u3a_push(c3_w len_w) +{ + void *cur, *top = u3to(void, u3R->cap_p); + if ( c3y == u3a_is_north(u3R) ) { + top -= len_w; + cur = top; + u3p(void) cap_p = u3R->cap_p = u3of(void, top); + c3_assert(cap_p < u3R->mat_p); + c3_assert(cap_p > u3R->hat_p); + return cur; + } + else { + cur = top; + top += len_w; + u3R->cap_p = u3of(void, top); + u3p(void) cap_p = u3R->cap_p = u3of(void, top); + c3_assert(cap_p > u3R->mat_p); + c3_assert(cap_p < u3R->hat_p); + return cur; + } +} + +/* u3a_pop(): deallocate space on the road stack +*/ +void +u3a_pop(c3_w len_w) +{ + void* top = u3to(void, u3R->cap_p); + if ( c3y == u3a_is_north(u3R) ) { + top += len_w; + u3p(void) cap_p = u3R->cap_p = u3of(void, top); + c3_assert(cap_p <= u3R->mat_p); + c3_assert(cap_p > u3R->hat_p); + } + else { + top -= len_w; + u3p(void) cap_p = u3R->cap_p = u3of(void, top); + c3_assert(cap_p >= u3R->mat_p); + c3_assert(cap_p < u3R->hat_p); + } +} + +/* u3a_peek(): examine the top of the road stack +*/ +void* +u3a_peek(c3_w len_w) +{ + return u3to(void, u3R->cap_p) - (c3y == u3a_is_north(u3R) ? 0 : len_w); +} /* u3a_wfree(): free storage. */ diff --git a/noun/retrieve.c b/noun/retrieve.c index 400007489..e25965995 100644 --- a/noun/retrieve.c +++ b/noun/retrieve.c @@ -502,87 +502,39 @@ _sang_one(u3_noun* a, u3_noun* b) } } -/* _sang_x(): yes if a and b are the same noun, unifying but leaking. -*/ -static c3_o -_sang_x(u3_noun a, u3_noun b) +typedef struct { + u3_noun a; + u3_noun b; + c3_y sat_y; +} eqframe; + +static inline eqframe* +_eq_peek() { - if ( a == b ) { - return c3y; - } - else { - if ( _(u3a_is_atom(a)) ) { - u3a_atom* a_u = u3a_to_ptr(a); + return (eqframe*) u3a_peek(sizeof(eqframe)); +} - if ( !_(u3a_is_atom(b)) || - _(u3a_is_cat(a)) || - _(u3a_is_cat(b)) ) - { - return c3n; - } - else { - u3a_atom* b_u = u3a_to_ptr(b); +static inline void +_eq_push(u3_noun a, u3_noun b) +{ + eqframe* cur = (eqframe*) u3a_push(sizeof(eqframe)); + cur->a = a; + cur->b = b; + cur->sat_y = 0; +} - if ( a_u->mug_w && - b_u->mug_w && - (a_u->mug_w != b_u->mug_w) ) - { - return c3n; - } - else { - c3_w w_rez = a_u->len_w; - c3_w w_mox = b_u->len_w; +static inline void +_eq_pop() +{ + u3a_pop(sizeof(eqframe)); +} - if ( w_rez != w_mox ) { - return c3n; - } - else { - c3_w i_w; - - for ( i_w = 0; i_w < w_rez; i_w++ ) { - if ( a_u->buf_w[i_w] != b_u->buf_w[i_w] ) { - return c3n; - } - } - return c3y; - } - } - } - } - else { - if ( _(u3a_is_atom(b)) ) { - return c3n; - } - else { - u3a_cell* a_u = u3a_to_ptr(a); - u3a_cell* b_u = u3a_to_ptr(b); - - if ( a_u->mug_w && - b_u->mug_w && - (a_u->mug_w != b_u->mug_w) ) - { - return c3n; - } - else { - if ( c3n == _sang_x(a_u->hed, b_u->hed) ) { - return c3n; - } - else { - _sang_one(&a_u->hed, &b_u->hed); - - if ( c3n == _sang_x(a_u->tel, b_u->tel) ) { - return c3n; - } - else { - _sang_one(&a_u->tel, &b_u->tel); - - return c3y; - } - } - } - } - } - } +/* _sing_one(): do not pick a unified pointer for identical (a) and (b). +*/ +static void +_sing_one(u3_noun* a, u3_noun* b) +{ + // this space left intentionally blank } /* _sung_one(): pick a unified pointer for identical (a) and (b). @@ -669,168 +621,145 @@ _sung_one(u3_noun* a, u3_noun* b) } } -/* _sung_x(): yes if a and b are the same noun, unifying. -*/ -static c3_o -_sung_x(u3_noun a, u3_noun b) +static inline c3_o +_song_atom(u3_atom a, u3_atom b) { - if ( a == b ) { - return c3y; + u3a_atom* a_u = u3a_to_ptr(a); + + if ( !_(u3a_is_atom(b)) || + _(u3a_is_cat(a)) || + _(u3a_is_cat(b)) ) + { + return c3n; } else { - if ( _(u3a_is_atom(a)) ) { - u3a_atom* a_u = u3a_to_ptr(a); + u3a_atom* b_u = u3a_to_ptr(b); - if ( !_(u3a_is_atom(b)) || - _(u3a_is_cat(a)) || - _(u3a_is_cat(b)) ) - { - return c3n; - } - else { - u3a_atom* b_u = u3a_to_ptr(b); - - if ( a_u->mug_w && - b_u->mug_w && - (a_u->mug_w != b_u->mug_w) ) - { - return c3n; - } - else { - c3_w w_rez = a_u->len_w; - c3_w w_mox = b_u->len_w; - - if ( w_rez != w_mox ) { - return c3n; - } - else { - c3_w i_w; - - for ( i_w = 0; i_w < w_rez; i_w++ ) { - if ( a_u->buf_w[i_w] != b_u->buf_w[i_w] ) { - return c3n; - } - } - return c3y; - } - } - } + if ( a_u->mug_w && + b_u->mug_w && + (a_u->mug_w != b_u->mug_w) ) + { + return c3n; } else { - if ( _(u3a_is_atom(b)) ) { + c3_w w_rez = a_u->len_w; + c3_w w_mox = b_u->len_w; + + if ( w_rez != w_mox ) { return c3n; } else { - u3a_cell* a_u = u3a_to_ptr(a); - u3a_cell* b_u = u3a_to_ptr(b); + c3_w i_w; - if ( a_u->mug_w && - b_u->mug_w && - (a_u->mug_w != b_u->mug_w) ) - { - return c3n; - } - else { - if ( c3n == _sung_x(a_u->hed, b_u->hed) ) { + for ( i_w = 0; i_w < w_rez; i_w++ ) { + if ( a_u->buf_w[i_w] != b_u->buf_w[i_w] ) { return c3n; } - else { - _sung_one(&a_u->hed, &b_u->hed); - - if ( c3n == _sung_x(a_u->tel, b_u->tel) ) { - return c3n; - } - else { - _sung_one(&a_u->tel, &b_u->tel); - - return c3y; - } - } } } } } + return c3y; } -/* _sing_x(): -** -** Yes iff (a) and (b) are the same noun. +/* knob: set lower to get more/earlier memoize-by-pointer, + * higher to avoid allocating the u3h as often */ +#define EQ_WHISTLE 1024 + +/* _song_x(): yes if a and b are the same noun, use uni to unify */ static c3_o -_sing_x(u3_noun a, - u3_noun b) +_song_x(u3_noun a, u3_noun b, void (*uni)(u3_noun*, u3_noun*)) { - c3_assert(u3_none != a); - c3_assert(u3_none != b); + eqframe* fam; + u3p(eqframe) empty = u3R->cap_p; + c3_w wis_w = 0; + c3_o r_o = c3n; + u3p(u3h_root) har_p = 0; - if ( a == b ) { - return c3y; - } - else { - if ( _(u3a_is_atom(a)) ) { - u3a_atom* a_u = u3a_to_ptr(a); - - if ( !_(u3a_is_atom(b)) || - _(u3a_is_cat(a)) || - _(u3a_is_cat(b)) ) - { - return c3n; - } - else { - u3a_atom* b_u = u3a_to_ptr(b); - - if ( a_u->mug_w && - b_u->mug_w && - (a_u->mug_w != b_u->mug_w) ) - { - return c3n; - } - else { - c3_w w_rez = a_u->len_w; - c3_w w_mox = b_u->len_w; - - if ( w_rez != w_mox ) { - return c3n; - } - else { - c3_w i_w; - - for ( i_w = 0; i_w < w_rez; i_w++ ) { - if ( a_u->buf_w[i_w] != b_u->buf_w[i_w] ) { - return c3n; - } - } - return c3y; - } - } - } + _eq_push(a, b); + /* there's a while and a switch here. continues all mean "do the loop again" + ** and breaks all mean "fall through this switch case". There are no breaks + ** that early terminate the loop. + */ + while ( empty != u3R->cap_p ) { + fam = _eq_peek(); + if ( (a = fam->a) == (b = fam->b) ) { + r_o = c3y; + } + else if ( c3y == u3a_is_atom(a) ) { + r_o = _song_atom(a, b); + } + else if ( c3y == u3a_is_atom(b) ) { + r_o = c3n; } else { - if ( _(u3a_is_atom(b)) ) { - return c3n; - } - else { - u3a_cell* a_u = u3a_to_ptr(a); - u3a_cell* b_u = u3a_to_ptr(b); + u3a_cell* a_u = u3a_to_ptr(a); + u3a_cell* b_u = u3a_to_ptr(b); - if ( a_u->mug_w && - b_u->mug_w && - (a_u->mug_w != b_u->mug_w) ) - { - return c3n; - } - else { - if ( c3n == _sing_x(u3a_h(a), u3a_h(b)) ) { - return c3n; + switch ( fam->sat_y ) { + case 2: + uni(&(a_u->tel), &(b_u->tel)); + r_o = c3y; + break; + + case 1: + uni(&(a_u->hed), &(b_u->hed)); + _eq_push(a_u->tel, b_u->tel); + fam->sat_y = 2; + continue; + + case 0: { + if ( a_u->mug_w && + b_u->mug_w && + (a_u->mug_w != b_u->mug_w) ) { + r_o = c3n; + break; } - else if ( c3n == _sing_x(u3a_t(a), u3a_t(b)) ) { - return c3n; + else { + if ( har_p != 0 ) { + u3_noun key = u3nc(u3a_to_off(a), u3a_to_off(b)); + u3_noun got = u3h_get(har_p, key); + u3z(key); + if ( u3_none != got ) { + _eq_pop(); + continue; + } + } + _eq_push(a_u->hed, b_u->hed); + fam->sat_y = 1; + continue; } - return c3y; } + default: + c3_assert(0); } } + + if ( c3n == r_o ) { + if ( 0 != har_p ) { + u3h_free(har_p); + } + u3R->cap_p = empty; + return c3n; + } + else { + if ( 0 == har_p && (wis_w++ > EQ_WHISTLE) ) { + har_p = u3h_new(); + } + if ( 0 != har_p ) { + u3_noun key = u3nc(u3a_to_off(a), u3a_to_off(b)); + u3h_put(har_p, key, c3y); + u3z(key); + } + _eq_pop(); + } } + + if ( 0 != har_p ) { + u3h_free(har_p); + } + return c3y; } /* u3r_sang(): yes iff (a) and (b) are the same noun, unifying equals. @@ -838,7 +767,7 @@ _sing_x(u3_noun a, c3_o u3r_sang(u3_noun a, u3_noun b) { - return _sang_x(a, b); + return _song_x(a, b, &_sang_one); } /* u3r_sing(): @@ -863,7 +792,7 @@ u3r_sing(u3_noun a, u3_noun b) c3_o ret_o; u3t_on(euq_o); - ret_o = _sing_x(a, b); + ret_o = _song_x(a, b, &_sing_one); u3t_off(euq_o); return ret_o; @@ -875,7 +804,7 @@ u3r_sing(u3_noun a, u3_noun b) c3_o u3r_sung(u3_noun a, u3_noun b) { - return _sung_x(a, b); + return _song_x(a, b, &_sung_one); } c3_o From 29d792bd64306ab5273bc2dd4ce4f33c90e9710f Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 14:14:25 +0800 Subject: [PATCH 06/78] Switch to generated config header. New allocator --- include/all.h | 7 +++---- include/c/portable.h | 5 +++++ include/config.h.in | 13 +++++++++++++ include/noun/allocate.h | 16 ++++++++++++++++ include/version.h | 1 - 5 files changed, 37 insertions(+), 5 deletions(-) create mode 100644 include/config.h.in delete mode 100644 include/version.h diff --git a/include/all.h b/include/all.h index ed8608967..4f77916b1 100644 --- a/include/all.h +++ b/include/all.h @@ -2,7 +2,7 @@ ** ** This file is in the public domain. */ -# include "version.h" +# include "config.h" /** c3: C environment. **/ # include "c/portable.h" // C and OS portability @@ -12,7 +12,7 @@ /** u3: noun environment. **/ -# include "noun/aliases.h" // general u3 +# include "noun/aliases.h" // general u3 # include "noun/allocate.h" // u3a: allocation # include "noun/events.h" // u3e: persistence @@ -24,7 +24,7 @@ # include "noun/options.h" // u3o: config options # include "noun/retrieve.h" // u3r: noun access (error returns) # include "noun/trace.h" // u3t: profiling / tracing -# include "noun/xtract.h" // u3x: noun access (error crashes) +# include "noun/xtract.h" // u3x: noun access (error crashes) # include "noun/vortex.h" // u3v: arvo kernel # include "noun/zave.h" // u3z: memoization @@ -52,4 +52,3 @@ */ # define uH u3_term_io_hija() # define uL(x) u3_term_io_loja(x) - diff --git a/include/c/portable.h b/include/c/portable.h index 7ed2db664..0ef146026 100644 --- a/include/c/portable.h +++ b/include/c/portable.h @@ -4,10 +4,15 @@ */ /** Must be compiled on gcc with C99 support. **/ + +#include "config.h" + # ifndef __GNUC__ # error "port me" # endif +# ifndef _GNU_SOURCE # define _GNU_SOURCE +# endif /** System include files. diff --git a/include/config.h.in b/include/config.h.in new file mode 100644 index 000000000..66f778309 --- /dev/null +++ b/include/config.h.in @@ -0,0 +1,13 @@ +#ifndef CONFIG_H +#define CONFIG_H + +#mesondefine URBIT_VERSION + +#mesondefine U3_OS_linux +#mesondefine U3_OS_bsd +#mesondefine U3_OS_osx + +#mesondefine U3_OS_ENDIAN_little +#mesondefine U3_OS_ENDIAN_big + +#endif /*CONFIG_H*/ diff --git a/include/noun/allocate.h b/include/noun/allocate.h index 1549948f8..075b12d2f 100644 --- a/include/noun/allocate.h +++ b/include/noun/allocate.h @@ -291,6 +291,22 @@ void* u3a_wealloc(void* lag_v, c3_w len_w); + /* u3a_push(): allocate space on the road stack + */ + void* + u3a_push(c3_w len_w); + + /* u3a_pop(): deallocate space on the road stack + */ + void + u3a_pop(c3_w len_w); + + /* u3a_peek(): examine the top of the road stack + */ + void* + u3a_peek(c3_w len_w); + + /* C-style aligned allocation - *not* compatible with above. */ /* u3a_malloc(): aligned storage measured in bytes. diff --git a/include/version.h b/include/version.h deleted file mode 100644 index 8fcd4d24b..000000000 --- a/include/version.h +++ /dev/null @@ -1 +0,0 @@ -#define URBIT_VERSION "0.5.1" From 77d33bb795cc78976ccdb9843d63244697f67025 Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 14:14:47 +0800 Subject: [PATCH 07/78] Add meson.build --- meson.build | 273 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 273 insertions(+) create mode 100644 meson.build diff --git a/meson.build b/meson.build new file mode 100644 index 000000000..b18fb652c --- /dev/null +++ b/meson.build @@ -0,0 +1,273 @@ +project('urbit', 'c') + +jets_a_src = [ +'jets/a/add.c', +'jets/a/dec.c', +'jets/a/div.c', +'jets/a/gte.c', +'jets/a/gth.c', +'jets/a/lte.c', +'jets/a/lth.c', +'jets/a/mod.c', +'jets/a/mul.c', +'jets/a/sub.c',] + +jets_b_src = [ +'jets/b/bind.c', +'jets/b/clap.c', +'jets/b/drop.c', +'jets/b/flop.c', +'jets/b/lent.c', +'jets/b/levy.c', +'jets/b/lien.c', +'jets/b/murn.c', +'jets/b/need.c', +'jets/b/reap.c', +'jets/b/reel.c', +'jets/b/roll.c', +'jets/b/skid.c', +'jets/b/skim.c', +'jets/b/skip.c', +'jets/b/scag.c', +'jets/b/slag.c', +'jets/b/snag.c', +'jets/b/sort.c', +'jets/b/turn.c', + 'jets/b/weld.c' ] + +jets_c_src = [ +'jets/c/bex.c', +'jets/c/xeb.c', +'jets/c/can.c', +'jets/c/cap.c', +'jets/c/cat.c', +'jets/c/con.c', +'jets/c/cut.c', +'jets/c/dor.c', +'jets/c/dvr.c', +'jets/c/dis.c', +'jets/c/end.c', +'jets/c/gor.c', +'jets/c/hor.c', +'jets/c/lsh.c', +'jets/c/mas.c', +'jets/c/met.c', +'jets/c/mix.c', +'jets/c/mug.c', +'jets/c/muk.c', +'jets/c/peg.c', +'jets/c/po.c', +'jets/c/pow.c', +'jets/c/rap.c', +'jets/c/rep.c', +'jets/c/rip.c', +'jets/c/rsh.c', +'jets/c/sqt.c', +'jets/c/vor.c', +] + +jets_d_src = [ +'jets/d/in_has.c', +'jets/d/in_int.c', +'jets/d/in_gas.c', +'jets/d/in_mer.c', +'jets/d/in_put.c', +'jets/d/in_tap.c', +'jets/d/in_uni.c', +'jets/d/in_wyt.c', +'jets/d/in_bif.c', +'jets/d/in_dif.c', +'jets/d/by_gas.c', +'jets/d/by_get.c', +'jets/d/by_has.c', +'jets/d/by_int.c', +'jets/d/by_put.c', +'jets/d/by_uni.c', +'jets/d/by_bif.c', +'jets/d/by_dif.c' +] + +jets_e_src = [ +'jets/e/aes_ecb.c', +'jets/e/aes_cbc.c', +'jets/e/aesc.c', +'jets/e/cue.c', +'jets/e/fl.c', +'jets/e/jam.c', +'jets/e/mat.c', +'jets/e/mink.c', +'jets/e/mule.c', +'jets/e/parse.c', +'jets/e/rd.c', +'jets/e/rq.c', +'jets/e/rs.c', +'jets/e/rh.c', +'jets/e/rub.c', +'jets/e/scr.c', +'jets/e/shax.c', +'jets/e/lore.c', +'jets/e/loss.c', +'jets/e/lune.c', +'jets/e/trip.c' +] + +jets_e_ed_src = [ +'jets/e/ed_puck.c', +'jets/e/ed_sign.c', +'jets/e/ed_veri.c', +'jets/e/ed_shar.c' + +] +jets_f_src = [ +'jets/f/ap.c', +'jets/f/cell.c', +'jets/f/comb.c', +'jets/f/cons.c', +'jets/f/core.c', +'jets/f/face.c', +'jets/f/fitz.c', +'jets/f/flan.c', +'jets/f/flip.c', +'jets/f/flor.c', +'jets/f/fork.c', +'jets/f/help.c', +'jets/f/hike.c', +'jets/f/look.c', +'jets/f/loot.c' +] + +jets_f_ut_src = [ +'jets/f/ut.c', +'jets/f/ut_burn.c', +'jets/f/ut_buss.c', +'jets/f/ut_conk.c', +'jets/f/ut_crop.c', +'jets/f/ut_find.c', +'jets/f/ut_fire.c', +'jets/f/ut_fish.c', +'jets/f/ut_fuse.c', +'jets/f/ut_gain.c', +'jets/f/ut_lose.c', +'jets/f/ut_mint.c', +'jets/f/ut_mull.c', +'jets/f/ut_nest.c', +'jets/f/ut_peek.c', +'jets/f/ut_peel.c', +'jets/f/ut_play.c', +'jets/f/ut_repo.c', +'jets/f/ut_rest.c', +'jets/f/ut_tack.c', +'jets/f/ut_toss.c', +'jets/f/ut_wrap.c' +] + +jets_g_src = [ +'jets/g/down.c' +] + +jets_src = [ +'jets/tree.c' +] +noun_src = ['noun/allocate.c', + 'noun/events.c', + 'noun/hashtable.c', + 'noun/imprison.c', + 'noun/jets.c', + 'noun/manage.c', + 'noun/nock.c', + 'noun/retrieve.c', + 'noun/trace.c', + 'noun/vortex.c', + 'noun/xtract.c', + 'noun/zave.c'] + +vere_src = ['vere/ames.c', + 'vere/behn.c', + 'vere/cttp.c', + 'vere/http.c', + 'vere/loop.c', + 'vere/main.c', + 'vere/raft.c', + 'vere/reck.c', + 'vere/save.c', + 'vere/sist.c', + 'vere/term.c', + 'vere/time.c', + 'vere/unix.c', + 'vere/walk.c'] + +src_list = [ +vere_src, noun_src, +jets_a_src, jets_b_src, +jets_c_src, jets_d_src, +jets_e_src, jets_e_ed_src, jets_f_src, jets_f_ut_src, +jets_g_src, jets_src] + +sources = [] +foreach s : src_list + sources += s +endforeach + +incdir = include_directories('include/') + +conf_data = configuration_data() +conf_data.set('URBIT_VERSION', '"0.5.1"') + +osdet = build_machine.system() + +if osdet == 'linux' + conf_data.set('U3_OS_linux', true) +elif osdet == 'darwin' + conf_data.set('U3_OS_osx', true) +elif osdet == 'bsd' + conf_data.set('U3_OS_bsd', true) +else + error('Unsupported OS detected:' + osdet) +endif + +endian = build_machine.endian() + +if endian == 'little' + conf_data.set('U3_OS_ENDIAN_little', true) +else + error('Little endian encoding required') +endif + +configure_file(input : 'include/config.h.in', + output : 'config.h', + configuration : conf_data) + +# We expect these libs to supplied with the distribution +openssl_dep = dependency('openssl') +curl_dep = dependency('libcurl') +libuv_dep = dependency('libuv') +ncurses_dep = dependency('ncurses') + +gmp_dep = meson.get_compiler('c').find_library('gmp') +sigsegv_dep = meson.get_compiler('c').find_library('sigsegv') + + +# For these libs we provide fallback bundle +cmark_dep = dependency('libcmark', version: ['<0.13.0', '>=0.12.0'], fallback: ['commonmark-legacy', 'cmark_dep']) +urbitscrypt_dep = dependency('urbit-scrypt', fallback: ['urbit-scrypt', 'urbit_scrypt_dep']) +ed25519_dep = dependency('ed25519', fallback: ['ed25519', 'ed25519_dep']) +murmur3_dep = dependency('murmur3', fallback: ['murmur3', 'murmur3_dep']) +http_parser_dep = dependency('http-parser', version: '0.1.0', fallback: ['http-parser-legacy', 'http_parser_dep']) +softfloat3_dep = dependency('softfloat3', fallback: ['softfloat3', 'softfloat3_dep']) + + +executable('urbit', +sources : sources, +include_directories : incdir, +dependencies: [openssl_dep, + curl_dep, + libuv_dep, + cmark_dep, + ncurses_dep, + gmp_dep, + sigsegv_dep, + urbitscrypt_dep, + ed25519_dep, + murmur3_dep, + http_parser_dep, + softfloat3_dep]) From 7abbf6adad3ff53affc99bfab52966722ef7904f Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 14:14:55 +0800 Subject: [PATCH 08/78] Update .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index e6b87b0b9..f2d1c8137 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,4 @@ node_modules/ # ?? /inst cscope.* +build/ From e9cf9c777ce829d590877952b7b13520054e1f01 Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 14:15:05 +0800 Subject: [PATCH 09/78] Update README.md --- README.md | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index c1ed536da..66528ad95 100644 --- a/README.md +++ b/README.md @@ -16,13 +16,12 @@ If you're doing development on Urbit, keep reading. `vere`, the Urbit virtual machine, depends on the following: - C compiler ([gcc](https://gcc.gnu.org) or [clang](http://clang.llvm.org)) -- [GNU Make](https://www.gnu.org/software/make/) +- [Meson](http://mesonbuild.com/) - [GMP](https://gmplib.org) -- [CMake](https://cmake.org) -- automake, autoconf, and libtool - [OpenSSL](https://www.openssl.org) - [libsigsegv](https://www.gnu.org/software/libsigsegv/) - [libcurl](https://curl.haxx.se/libcurl/) +- [commonmark](commonmark.org/) - curses implementation (ncurses on Linux distributions, OS curses otherwise) - [Ragel](https://www.colm.net/open-source/ragel/) - [re2c](http://re2c.org) @@ -34,16 +33,26 @@ for future unbundling or removal wherever possible. ## Building -Our Makefile should handle the build smoothly on all supported platforms. It's -just a simple Makefile, written by hand for GNU Make, and the most complicated -parts of its internal machinery have to do with the varied build systems of the -bundled libraries. +Urbit uses Meson build system. -Useful targets are the default `all`, `clean`, and `distclean`. The last may not -produce an entirely clean distribution directory, and runs a bundled library's -configure script; `git clean` may be a better option. +Some libraries which are not found in major distributions: +- ed25519 +- http-parser legacy version 0.1.0 +- murmur3 +- softfloat3 +- urbit-scrypt +- commonmark legacy version 0.12.0 + +are included as git submodules. To build urbit from source, perform the following steps: + +1. Install all required dependencies. +2. `git submodule init` in the urbit repository +3. `git submodule update` +4. `meson build` +5. If the last step was successful, type `cd ./build` followed by `ninja` + to compile urbit. +6. The executable should appear in `./build` directory. -The `vere` binary is produced in `bin/urbit`. ## Building the Debian Package From d81c5aa11600b8606256f0b3da8f66bebb4b5156 Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 14:26:13 +0800 Subject: [PATCH 10/78] Bump commonmark-legacy. --- subprojects/commonmark-legacy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/commonmark-legacy b/subprojects/commonmark-legacy index f29c8f27b..ab5808124 160000 --- a/subprojects/commonmark-legacy +++ b/subprojects/commonmark-legacy @@ -1 +1 @@ -Subproject commit f29c8f27b63335ee9ed29a78cce507a013d49f88 +Subproject commit ab58081245b4998e92e1f31654335c218b417361 From 9bea7988920eac0fe6fe4e614fd66f977d9c1406 Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 14:32:41 +0800 Subject: [PATCH 11/78] Update .travis.yml to use meson --- .travis.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8063ec07f..cf6adfb24 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,10 @@ language: c -script: make && make test # no ./configure +script: meson build && cd ./build && ninja # Uncomment me if this gets annoying # -# notifications: -# email: false +# notifications: +# email: false addons: apt: @@ -12,16 +12,12 @@ addons: - libgmp3-dev - libsigsegv-dev - openssl + - libuv-dev - libssl-dev - libncurses5-dev - - make - - exuberant-ctags - - automake - - autoconf - - libtool + - meson - g++ - ragel - - cmake - re2c - libcurl4-gnutls-dev - python From 780a20cba544fb2fbe9d2ae53a4264d93f4be890 Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 14:33:10 +0800 Subject: [PATCH 12/78] Update .travis.yml to use meson --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index cf6adfb24..c3f83d26e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,7 +28,7 @@ deploy: prerelease: true # turn this off for official releases api_key: secure: V4E7784ECSS3MO6ZIRtang9XwibDyvDYGb0MoSaP2CTlmzIAhdokr4KJFM0qM4KRaaajCdQuqi0lojgOjwdxs7e0GkAwScb33LFxQ7Chj/QkFOY7V1AnSRLR5OsXnazB0nur5aSwvcvnggQ2XW3OeF7zIvGfs9aR97SEz/xCrVE= - file: bin/urbit # TODO upload package from before_deploy + file: ./build/urbit # TODO upload package from before_deploy on: repo: urbit/urbit tags: true From ff8f34e8d360fb4d97d33999395718c54f937d47 Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 14:38:53 +0800 Subject: [PATCH 13/78] Remove wrong subprojects. --- .gitmodules | 6 ------ subprojects/commonmark-legacy | 1 - subprojects/http-parser-legacy | 1 - 3 files changed, 8 deletions(-) delete mode 160000 subprojects/commonmark-legacy delete mode 160000 subprojects/http-parser-legacy diff --git a/.gitmodules b/.gitmodules index 87b3577d1..8e54196f8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,9 +10,3 @@ [submodule "subprojects/murmur3"] path = subprojects/murmur3 url = https://github.com/mikolajpp/murmur3.git -[submodule "subprojects/http-parser-legacy"] - path = subprojects/http-parser-legacy - url = git@github.com:mikolajpp/http-parser-legacy.git -[submodule "subprojects/commonmark-legacy"] - path = subprojects/commonmark-legacy - url = git@github.com:mikolajpp/commonmark-legacy.git diff --git a/subprojects/commonmark-legacy b/subprojects/commonmark-legacy deleted file mode 160000 index ab5808124..000000000 --- a/subprojects/commonmark-legacy +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ab58081245b4998e92e1f31654335c218b417361 diff --git a/subprojects/http-parser-legacy b/subprojects/http-parser-legacy deleted file mode 160000 index 1fa6899e3..000000000 --- a/subprojects/http-parser-legacy +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1fa6899e3641c4d447022caf6b4ddc78930d9e8b From 21e0b3c38a1544b411d134e18ba5bfea8499f90c Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 14:40:47 +0800 Subject: [PATCH 14/78] Fix deps git path --- .gitmodules | 6 ++++++ subprojects/commonmark-legacy | 1 + subprojects/http-parser-legacy | 1 + 3 files changed, 8 insertions(+) create mode 160000 subprojects/commonmark-legacy create mode 160000 subprojects/http-parser-legacy diff --git a/.gitmodules b/.gitmodules index 8e54196f8..3de73ead7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,3 +10,9 @@ [submodule "subprojects/murmur3"] path = subprojects/murmur3 url = https://github.com/mikolajpp/murmur3.git +[submodule "subprojects/commonmark-legacy"] + path = subprojects/commonmark-legacy + url = https://github.com/mikolajpp/commonmark-legacy.git +[submodule "subprojects/http-parser-legacy"] + path = subprojects/http-parser-legacy + url = https://github.com/mikolajpp/http-parser-legacy.git diff --git a/subprojects/commonmark-legacy b/subprojects/commonmark-legacy new file mode 160000 index 000000000..ab5808124 --- /dev/null +++ b/subprojects/commonmark-legacy @@ -0,0 +1 @@ +Subproject commit ab58081245b4998e92e1f31654335c218b417361 diff --git a/subprojects/http-parser-legacy b/subprojects/http-parser-legacy new file mode 160000 index 000000000..1fa6899e3 --- /dev/null +++ b/subprojects/http-parser-legacy @@ -0,0 +1 @@ +Subproject commit 1fa6899e3641c4d447022caf6b4ddc78930d9e8b From 8eace125a30a3fb304f9742dc3593ac91a2e57c9 Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 14:45:15 +0800 Subject: [PATCH 15/78] Fix .travis.yml --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c3f83d26e..eb16b0954 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,8 @@ script: meson build && cd ./build && ninja # email: false addons: + pip: + - meson apt: packages: - libgmp3-dev @@ -15,7 +17,7 @@ addons: - libuv-dev - libssl-dev - libncurses5-dev - - meson + - ninja-build - g++ - ragel - re2c From 88c28fe260672c092523f0e20e3b3a611eff50c3 Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 14:48:25 +0800 Subject: [PATCH 16/78] Fix .travis.yml --- .travis.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index eb16b0954..d4ad70a6f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,10 +5,13 @@ script: meson build && cd ./build && ninja # # notifications: # email: false +python: + 3.6 + +install: + - pip install meson addons: - pip: - - meson apt: packages: - libgmp3-dev From fc285b472cb155f1b4fcbf274cc5a58b8ae64524 Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 14:51:22 +0800 Subject: [PATCH 17/78] Fix travis python version. --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index d4ad70a6f..17c4a3b36 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,11 +5,9 @@ script: meson build && cd ./build && ninja # # notifications: # email: false -python: - 3.6 install: - - pip install meson + - pip3 install meson addons: apt: @@ -25,7 +23,9 @@ addons: - ragel - re2c - libcurl4-gnutls-dev + - meson - python + - python3 # before_deploy: "make deb" # TODO deploy: skip_cleanup: true From bb0d282716e348ecba27f06b05583a1793183335 Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 14:53:15 +0800 Subject: [PATCH 18/78] Remove meson from build dependency --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 17c4a3b36..f19a28bc4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,7 +23,6 @@ addons: - ragel - re2c - libcurl4-gnutls-dev - - meson - python - python3 # before_deploy: "make deb" # TODO From e2e8205bfb3bd87ad4b33c9a3b24077593a5e79a Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 14:55:33 +0800 Subject: [PATCH 19/78] Fix python version --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f19a28bc4..c2e30db96 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,7 +23,6 @@ addons: - ragel - re2c - libcurl4-gnutls-dev - - python - python3 # before_deploy: "make deb" # TODO deploy: From 6a31387e46cdb3f77084c012dfe00876ccbb34ab Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 14:56:26 +0800 Subject: [PATCH 20/78] Fix pip command --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c2e30db96..1e302a479 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ script: meson build && cd ./build && ninja # email: false install: - - pip3 install meson + - pip install meson addons: apt: From fecf7579b8288b6e0545ec2cbb277c9eabc4dd11 Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 15:00:58 +0800 Subject: [PATCH 21/78] Fix pip command --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1e302a479..af4568132 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ script: meson build && cd ./build && ninja # email: false install: - - pip install meson + - pip3 install meson addons: apt: @@ -24,6 +24,7 @@ addons: - re2c - libcurl4-gnutls-dev - python3 + - python3-pip # before_deploy: "make deb" # TODO deploy: skip_cleanup: true From 392041d04533044fcad5fbca433915ef28015379 Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 15:03:52 +0800 Subject: [PATCH 22/78] Install pip as user --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index af4568132..71e8c3b2c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ script: meson build && cd ./build && ninja # email: false install: - - pip3 install meson + - pip3 install --user meson addons: apt: From 21b7dc1abc57b32cf89cad1e4fcaf7066e22c44b Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 15:10:56 +0800 Subject: [PATCH 23/78] Bump commonmark-legacy --- subprojects/commonmark-legacy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/commonmark-legacy b/subprojects/commonmark-legacy index ab5808124..163bd5643 160000 --- a/subprojects/commonmark-legacy +++ b/subprojects/commonmark-legacy @@ -1 +1 @@ -Subproject commit ab58081245b4998e92e1f31654335c218b417361 +Subproject commit 163bd5643394b56e18ff19dbeef2e6277e1a55fa From 1973377165fd2ad8f4855723c982ea63a7052350 Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 15:14:38 +0800 Subject: [PATCH 24/78] Bump commonmark-legacy --- subprojects/commonmark-legacy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/commonmark-legacy b/subprojects/commonmark-legacy index 163bd5643..ef9042d78 160000 --- a/subprojects/commonmark-legacy +++ b/subprojects/commonmark-legacy @@ -1 +1 @@ -Subproject commit 163bd5643394b56e18ff19dbeef2e6277e1a55fa +Subproject commit ef9042d781f4c9f48a6da921cec0decf67f5c1e6 From 423d1a1b773da966c017ea4f62fa390392df4fa5 Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 15:18:02 +0800 Subject: [PATCH 25/78] Temporalily disable multiple cmark version constraints bc of meson bug --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index b18fb652c..86943475f 100644 --- a/meson.build +++ b/meson.build @@ -248,7 +248,7 @@ sigsegv_dep = meson.get_compiler('c').find_library('sigsegv') # For these libs we provide fallback bundle -cmark_dep = dependency('libcmark', version: ['<0.13.0', '>=0.12.0'], fallback: ['commonmark-legacy', 'cmark_dep']) +cmark_dep = dependency('libcmark', version: '0.12.0', fallback: ['commonmark-legacy', 'cmark_dep']) urbitscrypt_dep = dependency('urbit-scrypt', fallback: ['urbit-scrypt', 'urbit_scrypt_dep']) ed25519_dep = dependency('ed25519', fallback: ['ed25519', 'ed25519_dep']) murmur3_dep = dependency('murmur3', fallback: ['murmur3', 'murmur3_dep']) From 83fa6161bf6bea712c9995928832586d2045565f Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 15:27:27 +0800 Subject: [PATCH 26/78] Use binary ninja. --- .travis.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 71e8c3b2c..caf0b98ee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,10 @@ script: meson build && cd ./build && ninja # notifications: # email: false +before_install: + - wget https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip + - unzip ninja-linux.zip + - sudo mv ninja /usr/bin/ install: - pip3 install --user meson @@ -18,13 +22,13 @@ addons: - libuv-dev - libssl-dev - libncurses5-dev - - ninja-build - g++ - ragel - re2c - libcurl4-gnutls-dev - python3 - python3-pip + - unzip # before_deploy: "make deb" # TODO deploy: skip_cleanup: true From 68866209ad7ce4470d44f59b5c1be451c9816ba9 Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 15:31:56 +0800 Subject: [PATCH 27/78] Bump commonmark-legacy --- subprojects/commonmark-legacy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/commonmark-legacy b/subprojects/commonmark-legacy index ef9042d78..69bd31c36 160000 --- a/subprojects/commonmark-legacy +++ b/subprojects/commonmark-legacy @@ -1 +1 @@ -Subproject commit ef9042d781f4c9f48a6da921cec0decf67f5c1e6 +Subproject commit 69bd31c361e75080d00a2342dfb64f2ae2b41043 From 4ad937d222c4d276bce9830893c5926efc83be9b Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 15:37:18 +0800 Subject: [PATCH 28/78] Fix libuv version --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index caf0b98ee..bee35678d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,7 @@ addons: - libgmp3-dev - libsigsegv-dev - openssl - - libuv-dev + - libuv1-dev - libssl-dev - libncurses5-dev - g++ From f611e7c72aecdbdd32c9bb3caf813b50aaea07c7 Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 15:47:16 +0800 Subject: [PATCH 29/78] Update libuv for travis builds --- .travis.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index bee35678d..b967411fc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,14 @@ before_install: - wget https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip - unzip ninja-linux.zip - sudo mv ninja /usr/bin/ + - wget https://github.com/libuv/libuv/archive/v1.19.2.tar.gz + - tar -xvf v1.19.2.tar.gz + - cd libuv-1.19.2 + - sh autogen.sh + - ./configure --prefix=/usr + - make + - make check + - sudo make install install: - pip3 install --user meson @@ -19,9 +27,12 @@ addons: - libgmp3-dev - libsigsegv-dev - openssl - - libuv1-dev - libssl-dev - libncurses5-dev + - automake + - autoconf + - make + - libtool - g++ - ragel - re2c @@ -29,6 +40,7 @@ addons: - python3 - python3-pip - unzip + - gyp # before_deploy: "make deb" # TODO deploy: skip_cleanup: true From 342f8ac751537bad9dc666c763e1241b4c43b6a8 Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 15:53:17 +0800 Subject: [PATCH 30/78] Fix travis --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index b967411fc..898184283 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,6 @@ before_install: - sh autogen.sh - ./configure --prefix=/usr - make - - make check - sudo make install install: - pip3 install --user meson @@ -40,7 +39,6 @@ addons: - python3 - python3-pip - unzip - - gyp # before_deploy: "make deb" # TODO deploy: skip_cleanup: true From 24f6cd5e660373b31775853dd7766e978d49138b Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 15:55:40 +0800 Subject: [PATCH 31/78] Fix travis --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 898184283..056f10081 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,6 +17,7 @@ before_install: - ./configure --prefix=/usr - make - sudo make install + - cd .. install: - pip3 install --user meson From 4ba14cb4bc6c6abfca7fbd35a9e5e6b01f1f5e61 Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 16:02:18 +0800 Subject: [PATCH 32/78] Fix UV__* for new libuv --- vere/http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vere/http.c b/vere/http.c index 32aa6d08c..e3d003f7d 100644 --- a/vere/http.c +++ b/vere/http.c @@ -135,7 +135,7 @@ _http_write_cb(uv_write_t* wri_u, c3_i sas_i) { _u3_write_t* ruq_u = (void *)wri_u; - if ( (u3C.wag_w & u3o_verbose) && 0 != sas_i && UV__EPIPE != sas_i ) { + if ( (u3C.wag_w & u3o_verbose) && 0 != sas_i && UV_EPIPE != sas_i ) { uL(fprintf(uH, "http: write: ERROR %d\n", sas_i)); uL(fprintf(uH, " (%s)\n", uv_strerror(sas_i))); } From 1224d36d47ec5373cca63775ca2a41f64c05d064 Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 19:50:29 +0800 Subject: [PATCH 33/78] Bump subprojects --- subprojects/commonmark-legacy | 2 +- subprojects/ed25519 | 2 +- subprojects/http-parser-legacy | 2 +- subprojects/murmur3 | 2 +- subprojects/softfloat3 | 2 +- subprojects/urbit-scrypt | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/subprojects/commonmark-legacy b/subprojects/commonmark-legacy index 69bd31c36..64b7d8b2f 160000 --- a/subprojects/commonmark-legacy +++ b/subprojects/commonmark-legacy @@ -1 +1 @@ -Subproject commit 69bd31c361e75080d00a2342dfb64f2ae2b41043 +Subproject commit 64b7d8b2fb490f870ed6460b9fd4a5670b425ef0 diff --git a/subprojects/ed25519 b/subprojects/ed25519 index d2a134b1a..0450dec28 160000 --- a/subprojects/ed25519 +++ b/subprojects/ed25519 @@ -1 +1 @@ -Subproject commit d2a134b1a24c9021aaf4e154ee5f5dbaeab459aa +Subproject commit 0450dec289efad83293dc968a894f3b522ccb4a5 diff --git a/subprojects/http-parser-legacy b/subprojects/http-parser-legacy index 1fa6899e3..46e9322a2 160000 --- a/subprojects/http-parser-legacy +++ b/subprojects/http-parser-legacy @@ -1 +1 @@ -Subproject commit 1fa6899e3641c4d447022caf6b4ddc78930d9e8b +Subproject commit 46e9322a2bc46645724062cb529ea07c87fb7fdc diff --git a/subprojects/murmur3 b/subprojects/murmur3 index 53dec3429..615f1a1a4 160000 --- a/subprojects/murmur3 +++ b/subprojects/murmur3 @@ -1 +1 @@ -Subproject commit 53dec342963a90828fba27ec03b86a1dcca94db6 +Subproject commit 615f1a1a4bcdcc90e8ea83b955fd0f4cd7e502c4 diff --git a/subprojects/softfloat3 b/subprojects/softfloat3 index 32ff41602..ba248daf1 160000 --- a/subprojects/softfloat3 +++ b/subprojects/softfloat3 @@ -1 +1 @@ -Subproject commit 32ff41602f3d72295bc7a7d608787d1d85fadca1 +Subproject commit ba248daf121925c62207011115f3bd7e7eb9bd80 diff --git a/subprojects/urbit-scrypt b/subprojects/urbit-scrypt index 2fe918321..66444464f 160000 --- a/subprojects/urbit-scrypt +++ b/subprojects/urbit-scrypt @@ -1 +1 @@ -Subproject commit 2fe9183218ef33060141a7d7a8b7e24731fe2901 +Subproject commit 66444464f01ccf58d13d06a28b2707ec129be0c7 From df31426973dd58115111fbd31b3618bb85cd736d Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 19:54:50 +0800 Subject: [PATCH 34/78] Fix installation --- meson.build | 3 ++- subprojects/commonmark-legacy | 2 +- subprojects/http-parser-legacy | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index 86943475f..3f1449ca5 100644 --- a/meson.build +++ b/meson.build @@ -270,4 +270,5 @@ dependencies: [openssl_dep, ed25519_dep, murmur3_dep, http_parser_dep, - softfloat3_dep]) + softfloat3_dep], +install: true) diff --git a/subprojects/commonmark-legacy b/subprojects/commonmark-legacy index 64b7d8b2f..12b85b8e8 160000 --- a/subprojects/commonmark-legacy +++ b/subprojects/commonmark-legacy @@ -1 +1 @@ -Subproject commit 64b7d8b2fb490f870ed6460b9fd4a5670b425ef0 +Subproject commit 12b85b8e8a52b74d1502a1b2abc37e5c3fd4fd02 diff --git a/subprojects/http-parser-legacy b/subprojects/http-parser-legacy index 46e9322a2..90d2cd1a9 160000 --- a/subprojects/http-parser-legacy +++ b/subprojects/http-parser-legacy @@ -1 +1 @@ -Subproject commit 46e9322a2bc46645724062cb529ea07c87fb7fdc +Subproject commit 90d2cd1a9049a93c291b604fc3c9c4c84cf9bfe2 From 5868f1a058c80ac3c606dcdc991b84b2f52b75ba Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 20:00:47 +0800 Subject: [PATCH 35/78] Bump ed25519 --- subprojects/ed25519 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/ed25519 b/subprojects/ed25519 index 0450dec28..042c85322 160000 --- a/subprojects/ed25519 +++ b/subprojects/ed25519 @@ -1 +1 @@ -Subproject commit 0450dec289efad83293dc968a894f3b522ccb4a5 +Subproject commit 042c85322dcc229be2ab141e1f8ceb628ebcda48 From 7faf7292add46ebe7c3aa86bb8f76f7b5a1b4742 Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 20:17:41 +0800 Subject: [PATCH 36/78] Add platforms support --- meson.build | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 3f1449ca5..42e5cc045 100644 --- a/meson.build +++ b/meson.build @@ -214,13 +214,28 @@ conf_data = configuration_data() conf_data.set('URBIT_VERSION', '"0.5.1"') osdet = build_machine.system() +os_c_flags = [] +os_deps = [] +os_link_flags = [] if osdet == 'linux' conf_data.set('U3_OS_linux', true) + + pthread_dep = meson.get_compiler('c').find_library('pthread') + os_deps = os_deps + [pthread_dep] + elif osdet == 'darwin' conf_data.set('U3_OS_osx', true) + + os_c_flags = os_c_flags + ['-bind_at_load'] + os_link_flags = ['-framework CoreServices', '-framework CoreFoundation'] + elif osdet == 'bsd' conf_data.set('U3_OS_bsd', true) + + pthread_dep = meson.get_compiler('c').find_library('pthread') + kvm_dep = meson.get_compiler('c').find_library('kvm') + os_deps = os_deps + [kvm_dep, pthread_dep] else error('Unsupported OS detected:' + osdet) endif @@ -259,6 +274,8 @@ softfloat3_dep = dependency('softfloat3', fallback: ['softfloat3', 'softfloat3_d executable('urbit', sources : sources, include_directories : incdir, +c_flags : ['-O3'] + os_c_flags, +link_args: os_link_flags, dependencies: [openssl_dep, curl_dep, libuv_dep, @@ -270,5 +287,5 @@ dependencies: [openssl_dep, ed25519_dep, murmur3_dep, http_parser_dep, - softfloat3_dep], + softfloat3_dep] + os_deps, install: true) From 43cd572a3fece1b296b8cd65bc7d07967cee3995 Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 20:19:32 +0800 Subject: [PATCH 37/78] Remove now defunct Makefile --- Makefile | 552 ------------------------------------------------------- 1 file changed, 552 deletions(-) delete mode 100644 Makefile diff --git a/Makefile b/Makefile deleted file mode 100644 index 33b0853c9..000000000 --- a/Makefile +++ /dev/null @@ -1,552 +0,0 @@ -# A simple makefile. -# - -default: all --include .make.conf - -CORE=.MAKEFILE-VERSION - -# Pick one of: -# linux -# osx - -UNAME=$(shell uname) -ifeq ($(UNAME),Darwin) - OS=osx -else ifeq ($(UNAME),Linux) - OS=linux -else ifeq ($(UNAME),FreeBSD) - OS=bsd -else ifeq ($(UNAME),OpenBSD) - OS=bsd -else - $(error unknown unix) -endif - -# Pick one of: -# little -# big -# -ENDIAN=little - -# Binary directory - not in quotes. -# -BIN=bin - -# Only include/link with this if it exists. -# (Mac OS X El Capitan clean install does not have /opt) -ifneq (,$(wildcard /opt/local/.)) - OPTLOCALINC?=/opt/local/include - OPTLOCALLIB?=/opt/local/lib -endif - -# Only include/link with this if it exists. -# (`brew install openssl` on Mac OS X El Capitan puts openssl here) -ifneq (,$(wildcard /usr/local/opt/openssl/.)) - OPENSSLINC?=/usr/local/opt/openssl/include - OPENSSLLIB?=/usr/local/opt/openssl/lib -endif - -# can't have empty -I or -L options due to whitespace sensitivity -ifdef OPTLOCALINC - OPTLOCALIFLAGS=-I$(OPTLOCALINC) -endif -ifdef OPTLOCALLIB - OPTLOCALLFLAGS=-L$(OPTLOCALLIB) -endif -ifdef OPENSSLINC - OPENSSLIFLAGS=-I$(OPENSSLINC) -endif -ifdef OPENSSLLIB - OPENSSLLFLAGS=-L$(OPENSSLLIB) -endif - -CURLINC=$(shell curl-config --cflags) -CURLLIB=$(shell curl-config --libs) - -RM=rm -f -CC=cc -CXX=c++ -CXXFLAGS=$(CFLAGS) -CLD=c++ $(CFLAGS) -L/usr/local/lib $(OPTLOCALLFLAGS) $(OPENSSLLFLAGS) - -ifeq ($(OS),osx) - CLDOSFLAGS=-bind_at_load - OSLIBS=-framework CoreServices -framework CoreFoundation -endif -ifeq ($(OS),linux) - OSLIBS=-lpthread -lrt -lcurses - DEFINES=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -endif -ifeq ($(OS),bsd) - OSLIBS=-lpthread -lncurses -lkvm -endif - -ifeq ($(STATIC),yes) -LIBS=-lssl -lcrypto -lncurses /usr/local/lib/libsigsegv.a /usr/local/lib/libgmp.a $(CURLLIB) $(OSLIBS) -else -LIBS=-lssl -lcrypto -lgmp -lncurses -lsigsegv $(CURLLIB) $(OSLIBS) -endif - -INCLUDE=include -MDEFINES=-DU3_OS_$(OS) -DU3_OS_ENDIAN_$(ENDIAN) - -DEBUG=no - -ifeq ($(DEBUG),yes) -CFLAGS=-g -else -CFLAGS?=-O3 -endif - -LIBUV_VER=libuv-v1.7.5 - -LIBUV_CONFIGURE_OPTIONS=CC=$(CC) - -# NOTFORCHECKIN - restore -O3 -# -DGHETTO \ -# -DHUSH -CFLAGS+= $(COSFLAGS) -ffast-math \ - -funsigned-char \ - -I/usr/local/include \ - $(OPTLOCALIFLAGS) \ - $(OPENSSLIFLAGS) \ - $(CURLINC) \ - -I$(INCLUDE) \ - -Ioutside/$(LIBUV_VER)/include \ - -Ioutside/anachronism/include \ - -Ioutside/ed25519/src \ - -Ioutside/commonmark/src \ - -Ioutside/commonmark/build/src \ - -Ioutside/scrypt \ - -Ioutside/softfloat-3/source/include \ - -Ioutside/murmur3 \ - $(DEFINES) \ - $(MDEFINES) - -# TODO remove -Wno-* -CWFLAGS=-Wall \ - -Wextra \ - -Wno-sign-compare \ - -Wno-unused-parameter \ - -Wno-missing-field-initializers \ - -Wno-strict-aliasing \ - -Wno-error -ifneq ($(OS),bsd) - CWFLAGS+=-Wno-error=unused-result -endif - -# glibc 2.24 deprecates readdir_r; iff glibc >=2.24, -# don't upgrade 'deprecated declarations' warnings to errors -# dependency: `getconf`, which comes w/glibc -GLIBC := $(lastword $(shell getconf GNU_LIBC_VERSION 2>/dev/null)) -# dependency: none, uses make's native functions -GLIBC_MAJ := $(word 1, $(subst ., ,$(GLIBC))) -GLIBC_MIN := $(word 2, $(subst ., ,$(GLIBC))) -# dependency: `expr` shell built-in -GLIBC_GE_2_24 := $(shell expr $(GLIBC_MAJ) ">" 2 "|" \ - $(GLIBC_MAJ) "=" 2 "&" $(GLIBC_MIN) ">=" 24 2>/dev/null) -ifeq (1,$(GLIBC_GE_2_24)) - CWFLAGS+=-Wno-error=deprecated-declarations -endif - -ifdef NO_SILENT_RULES -%.o: %.c $(CORE) - $(CC) -c $(CWFLAGS) $(CFLAGS) -o $@ $< - @$(CC) -MM -MP $(CWFLAGS) $(CFLAGS) -MT $@ $< -MF .d/$*.d -else -%.o: %.c $(CORE) - @echo " CC $@" - @$(CC) -c $(CWFLAGS) $(CFLAGS) -o $@ $< - @$(CC) -MM -MP $(CWFLAGS) $(CFLAGS) -MT $@ $< -MF .d/$*.d -endif - -N_OFILES=\ - noun/allocate.o \ - noun/events.o \ - noun/hashtable.o \ - noun/imprison.o \ - noun/jets.o \ - noun/manage.o \ - noun/nock.o \ - noun/retrieve.o \ - noun/trace.o \ - noun/xtract.o \ - noun/vortex.o \ - noun/zave.o - -J_A_OFILES=\ - jets/a/add.o \ - jets/a/dec.o \ - jets/a/div.o \ - jets/a/gte.o \ - jets/a/gth.o \ - jets/a/lte.o \ - jets/a/lth.o \ - jets/a/mod.o \ - jets/a/mul.o \ - jets/a/sub.o - -J_B_OFILES=\ - jets/b/bind.o \ - jets/b/clap.o \ - jets/b/drop.o \ - jets/b/flop.o \ - jets/b/lent.o \ - jets/b/levy.o \ - jets/b/lien.o \ - jets/b/murn.o \ - jets/b/need.o \ - jets/b/reap.o \ - jets/b/reel.o \ - jets/b/roll.o \ - jets/b/skid.o \ - jets/b/skim.o \ - jets/b/skip.o \ - jets/b/scag.o \ - jets/b/slag.o \ - jets/b/snag.o \ - jets/b/sort.o \ - jets/b/turn.o \ - jets/b/weld.o - -J_C_OFILES=\ - jets/c/bex.o \ - jets/c/xeb.o \ - jets/c/can.o \ - jets/c/cap.o \ - jets/c/cat.o \ - jets/c/con.o \ - jets/c/cut.o \ - jets/c/dor.o \ - jets/c/dvr.o \ - jets/c/dis.o \ - jets/c/end.o \ - jets/c/gor.o \ - jets/c/hor.o \ - jets/c/lsh.o \ - jets/c/mas.o \ - jets/c/met.o \ - jets/c/mix.o \ - jets/c/mug.o \ - jets/c/muk.o \ - jets/c/peg.o \ - jets/c/po.o \ - jets/c/pow.o \ - jets/c/rap.o \ - jets/c/rep.o \ - jets/c/rip.o \ - jets/c/rsh.o \ - jets/c/sqt.o \ - jets/c/vor.o - -J_D_OFILES=\ - jets/d/in_has.o \ - jets/d/in_int.o \ - jets/d/in_gas.o \ - jets/d/in_mer.o \ - jets/d/in_put.o \ - jets/d/in_tap.o \ - jets/d/in_uni.o \ - jets/d/in_wyt.o \ - jets/d/in_bif.o \ - jets/d/in_dif.o \ - jets/d/by_gas.o \ - jets/d/by_get.o \ - jets/d/by_has.o \ - jets/d/by_int.o \ - jets/d/by_put.o \ - jets/d/by_uni.o \ - jets/d/by_bif.o \ - jets/d/by_dif.o - -J_E_OFILES=\ - jets/e/aes_ecb.o \ - jets/e/aes_cbc.o \ - jets/e/aesc.o \ - jets/e/cue.o \ - jets/e/fl.o \ - jets/e/jam.o \ - jets/e/mat.o \ - jets/e/mink.o \ - jets/e/mule.o \ - jets/e/parse.o \ - jets/e/rd.o \ - jets/e/rq.o \ - jets/e/rs.o \ - jets/e/rh.o \ - jets/e/rub.o \ - jets/e/scr.o \ - jets/e/shax.o \ - jets/e/lore.o \ - jets/e/loss.o \ - jets/e/lune.o \ - jets/e/trip.o - -J_E_OFILES_ED=\ - jets/e/ed_puck.o \ - jets/e/ed_sign.o \ - jets/e/ed_veri.o \ - jets/e/ed_shar.o - -J_F_OFILES=\ - jets/f/ap.o \ - jets/f/cell.o \ - jets/f/comb.o \ - jets/f/cons.o \ - jets/f/core.o \ - jets/f/face.o \ - jets/f/fitz.o \ - jets/f/flan.o \ - jets/f/flip.o \ - jets/f/flor.o \ - jets/f/fork.o \ - jets/f/help.o \ - jets/f/hike.o \ - jets/f/look.o \ - jets/f/loot.o - -J_F_OFILES_UT=\ - jets/f/ut.o \ - jets/f/ut_burn.o \ - jets/f/ut_buss.o \ - jets/f/ut_conk.o \ - jets/f/ut_crop.o \ - jets/f/ut_find.o \ - jets/f/ut_fire.o \ - jets/f/ut_fish.o \ - jets/f/ut_fuse.o \ - jets/f/ut_gain.o \ - jets/f/ut_lose.o \ - jets/f/ut_mint.o \ - jets/f/ut_mull.o \ - jets/f/ut_nest.o \ - jets/f/ut_peek.o \ - jets/f/ut_peel.o \ - jets/f/ut_play.o \ - jets/f/ut_repo.o \ - jets/f/ut_rest.o \ - jets/f/ut_tack.o \ - jets/f/ut_toss.o \ - jets/f/ut_wrap.o - -J_G_OFILES=\ - jets/g/down.o - -J_OFILES=\ - $(J_A_OFILES) \ - $(J_B_OFILES) \ - $(J_C_OFILES) \ - $(J_D_OFILES) \ - $(J_E_OFILES) \ - $(J_E_OFILES_ED) \ - $(J_F_OFILES) \ - $(J_F_OFILES_UT) \ - $(J_G_OFILES) \ - jets/tree.o - -BASE_OFILES=$(N_OFILES) $(J_OFILES) - -OUT_OFILES=\ - outside/jhttp/http_parser.o \ - outside/murmur3/MurmurHash3.o - -V_OFILES=\ - vere/ames.o \ - vere/behn.o \ - vere/cttp.o \ - vere/http.o \ - vere/loop.o \ - vere/raft.o \ - vere/reck.o \ - vere/sist.o \ - vere/term.o \ - vere/time.o \ - vere/unix.o \ - vere/save.o \ - vere/walk.o - -MAIN_FILE =\ - vere/main.o - -VERE_OFILES=\ - $(OUT_OFILES) \ - $(BASE_OFILES) \ - $(MAIN_FILE) \ - $(V_OFILES) - -VERE_DFILES=$(VERE_OFILES:%.o=.d/%.d) - --include $(VERE_DFILES) - -TEST_HASH_MAIN_FILE =\ - tests/hashtable_tests.o - -TEST_HASH_OFILES=\ - $(OUT_OFILES) \ - $(BASE_OFILES) \ - $(TEST_HASH_MAIN_FILE) \ - $(V_OFILES) - -TEST_HASH_DFILES=$(TEST_HASH_OFILES:%.o=.d/%.d) - --include $(TEST_HASH_DFILES) - -# This is a silly hack necessitated by the fact that libuv uses configure -# -# * Making 'all' obviously requires outside/libuv, -# which requires the libuv Makefile to be created. -# * Making distclean on outside/libuv destroys the makefile. -# * ...so configuring outside/libuv is parodoxically required -# in order to distclean it! -# * But what if developer types 'make distclean all' ? -# * first target makes libuv Makefile, then destroys it...and -# second target knows that it was made. -# * ...so second target borks. -# * Solution: make libuv not only depend on its own Makefile, -# but on a side effect of creating its own makefile. -# -LIBUV_MAKEFILE=outside/$(LIBUV_VER)/Makefile -LIBUV_MAKEFILE2=outside/$(LIBUV_VER)/config.log - -LIBUV=outside/$(LIBUV_VER)/.libs/libuv.a - -LIBED25519=outside/ed25519/ed25519.a - -LIBANACHRONISM=outside/anachronism/build/libanachronism.a - -LIBCOMMONMARK=outside/commonmark/build/src/libcmark.a - -LIBSCRYPT=outside/scrypt/scrypt.a - -LIBSOFTFLOAT=outside/softfloat-3/build/Linux-x86_64-GCC/softfloat.a - -TAGS=\ - .tags \ - .etags \ - GPATH GTAGS GRTAGS \ - cscope.in.out cscope.po.out cscope.out - -all: urbit - -.MAKEFILE-VERSION: Makefile .make.conf - @echo "Makefile update." - @touch .MAKEFILE-VERSION - -.make.conf: - @echo "# Set custom configuration here, please!" > ".make.conf" - -urbit: $(BIN)/urbit - -$(LIBUV_MAKEFILE) $(LIBUV_MAKEFILE2): - cd outside/$(LIBUV_VER) ; sh autogen.sh ; ./configure $(LIBUV_CONFIGURE_OPTIONS) - -# [h]act II: the plot thickens -# -# * Specifying two targets that each configure libuv works -# when the rules are executed sequentially, -# * but when attempting a parallel build, it is likely Make -# will try to configure libuv simultaneously. -# * We can specify a dependency between the two targets so -# that execution of their rule(s) is serialized. -# * Further, libuv does not seem to be friendly towards -# parallel builds either. A true fix is out of scope here -# * ...so we must instruct Make to only use one job when it -# attempts to build libuv. -# -$(LIBUV_MAKEFILE2): $(LIBUV_MAKEFILE) - -$(LIBUV): $(LIBUV_MAKEFILE) $(LIBUV_MAKEFILE2) - $(MAKE) -C outside/$(LIBUV_VER) all-am -j1 - -$(LIBED25519): - $(MAKE) -C outside/ed25519 - -$(LIBANACHRONISM): - $(MAKE) -C outside/anachronism static - -$(LIBCOMMONMARK): - $(MAKE) -C outside/commonmark - -$(LIBSCRYPT): - $(MAKE) -C outside/scrypt MDEFINES="$(MDEFINES)" - -$(LIBSOFTFLOAT): - $(MAKE) -C outside/softfloat-3/build/Linux-x86_64-GCC - -$(V_OFILES): include/vere/vere.h - -ifdef NO_SILENT_RULES -$(BIN)/urbit: $(LIBCOMMONMARK) $(VERE_OFILES) $(LIBUV) $(LIBED25519) $(LIBANACHRONISM) $(LIBSCRYPT) $(LIBSOFTFLOAT) - mkdir -p $(BIN) - $(CLD) $(CLDOSFLAGS) -o $(BIN)/urbit $(VERE_OFILES) $(LIBUV) $(LIBED25519) $(LIBANACHRONISM) $(LIBS) $(LIBCOMMONMARK) $(LIBSCRYPT) $(LIBSOFTFLOAT) -else -$(BIN)/urbit: $(LIBCOMMONMARK) $(VERE_OFILES) $(LIBUV) $(LIBED25519) $(LIBANACHRONISM) $(LIBSCRYPT) $(LIBSOFTFLOAT) - @echo " CCLD $(BIN)/urbit" - @mkdir -p $(BIN) - @$(CLD) $(CLDOSFLAGS) -o $(BIN)/urbit $(VERE_OFILES) $(LIBUV) $(LIBED25519) $(LIBANACHRONISM) $(LIBS) $(LIBCOMMONMARK) $(LIBSCRYPT) $(LIBSOFTFLOAT) -endif - -# This should start a comet or something -test: - @echo "FIXME no tests defined" - -test_hash: $(BIN)/test_hash - -ifdef NO_SILENT_RULES -$(BIN)/test_hash: $(LIBCOMMONMARK) $(TEST_HASH_OFILES) $(LIBUV) $(LIBED25519) $(LIBANACHRONISM) $(LIBSCRYPT) $(LIBSOFTFLOAT) - mkdir -p $(BIN) - $(CLD) $(CLDOSFLAGS) -o $(BIN)/test_hash $(TEST_HASH_OFILES) $(LIBUV) $(LIBED25519) $(LIBANACHRONISM) $(LIBS) $(LIBCOMMONMARK) $(LIBSCRYPT) $(LIBSOFTFLOAT) -else -$(BIN)/test_hash: $(LIBCOMMONMARK) $(TEST_HASH_OFILES) $(LIBUV) $(LIBED25519) $(LIBANACHRONISM) $(LIBSCRYPT) $(LIBSOFTFLOAT) - @echo "VERE_DFILES=$(VERE_DFILES)" - @echo " CCLD $(BIN)/test_hash" - @mkdir -p $(BIN) - @$(CLD) $(CLDOSFLAGS) -o $(BIN)/test_hash $(TEST_HASH_OFILES) $(LIBUV) $(LIBED25519) $(LIBANACHRONISM) $(LIBS) $(LIBCOMMONMARK) $(LIBSCRYPT) $(LIBSOFTFLOAT) -endif - -tags: ctags etags gtags cscope - -ctags: - @ctags -R -f .tags --exclude=root || true - -etags: - @etags -f .etags $$(find . -name '*.c' -or -name '*.h') || true - -gtags: - @gtags || true - -cscope: - @cscope -b -q -R || true - -osxpackage: - $(RM) -r inst - $(MAKE) distclean - $(MAKE) $(BIN)/urbit LIB=/usr/local/lib/urb STATIC=yes - mkdir -p inst/usr/local/lib/urb inst/usr/local/bin - cp $(BIN)/urbit inst/usr/local/bin - cp urb/urbit.pill inst/usr/local/lib/urb - pkgbuild --root inst --identifier org.urbit.urbit --version 0.2 urbit.pkg - -debbuild: - $(MAKE) $(BIN)/urbit LIB=/usr/share/urb - -debinstall: - mkdir -p $(DESTDIR)/usr/bin $(DESTDIR)/usr/share/urb - install -m755 $(BIN)/urbit $(DESTDIR)/usr/bin - cp urb/urbit.pill $(DESTDIR)/usr/share/urb - -clean: - $(RM) $(VERE_OFILES) $(BIN)/urbit urbit.pkg $(VERE_DFILES) $(TAGS) - $(RM) -r debian/files debian/urbit* - -# 'make distclean all -jn' ∀ n>1 still does not work because it is possible -# Make will attempt to build urbit while it is also cleaning urbit.. -distclean: clean $(LIBUV_MAKEFILE) - $(MAKE) -C outside/$(LIBUV_VER) distclean - $(MAKE) -C outside/ed25519 clean - $(MAKE) -C outside/anachronism clean - $(MAKE) -C outside/scrypt clean - $(MAKE) -C outside/softfloat-3/build/Linux-x86_64-GCC clean - -.PHONY: clean debbuild debinstalldistclean etags osxpackage tags test From 017b1e9b7ff97160c883ffd155171f4fafd70b4f Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 20:25:00 +0800 Subject: [PATCH 38/78] Add optimization option --- meson.build | 9 ++++++++- meson_options.txt | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 meson_options.txt diff --git a/meson.build b/meson.build index 42e5cc045..0646ec0fd 100644 --- a/meson.build +++ b/meson.build @@ -271,10 +271,17 @@ http_parser_dep = dependency('http-parser', version: '0.1.0', fallback: ['http-p softfloat3_dep = dependency('softfloat3', fallback: ['softfloat3', 'softfloat3_dep']) +opt_flags = [] +if get_option('debug') + opt_flags = ['-g'] +else + opt_flags = ['-O3'] +endif + executable('urbit', sources : sources, include_directories : incdir, -c_flags : ['-O3'] + os_c_flags, +c_flags : opt_flags + os_c_flags, link_args: os_link_flags, dependencies: [openssl_dep, curl_dep, diff --git a/meson_options.txt b/meson_options.txt new file mode 100644 index 000000000..378902f8d --- /dev/null +++ b/meson_options.txt @@ -0,0 +1 @@ +option('debug', type:'boolean', value: false) From ef8f131f79e452cb63ee7a65863751e5c7286c40 Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 20:32:54 +0800 Subject: [PATCH 39/78] More build options and instruction. --- README.md | 14 +++++++++++++- meson.build | 2 +- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 66528ad95..09d56dba9 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ If you're doing development on Urbit, keep reading. - [OpenSSL](https://www.openssl.org) - [libsigsegv](https://www.gnu.org/software/libsigsegv/) - [libcurl](https://curl.haxx.se/libcurl/) -- [commonmark](commonmark.org/) +- [libuv](http://libuv.org) - curses implementation (ncurses on Linux distributions, OS curses otherwise) - [Ragel](https://www.colm.net/open-source/ragel/) - [re2c](http://re2c.org) @@ -53,6 +53,18 @@ are included as git submodules. To build urbit from source, perform the followin to compile urbit. 6. The executable should appear in `./build` directory. +## Using meson & ninja + +To configure project, enter the build directory and user +`meson configure`. Without any arguments this command will display available +options. For example, to compile debug build of urbit, use +`meson configure -Ddebug=true`. +To set the prefix for installation use +`meson configure -Dprefix=/usr`, and so on. + +Once the project is configured, use `ninja` to build it. +To install it into the default prefix, use `ninja install`. +If you want to specify custom `DESTDIR`, use `DESTDIR=... ninja install`. ## Building the Debian Package diff --git a/meson.build b/meson.build index 0646ec0fd..e35e8b74e 100644 --- a/meson.build +++ b/meson.build @@ -281,7 +281,7 @@ endif executable('urbit', sources : sources, include_directories : incdir, -c_flags : opt_flags + os_c_flags, +c_args : opt_flags + os_c_flags, link_args: os_link_flags, dependencies: [openssl_dep, curl_dep, From d9f0e1e8074c97770135ac45f07b4f68a574fa05 Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 20:49:37 +0800 Subject: [PATCH 40/78] Fix ncurses on Mac --- meson.build | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index e35e8b74e..301a0dfc5 100644 --- a/meson.build +++ b/meson.build @@ -222,20 +222,25 @@ if osdet == 'linux' conf_data.set('U3_OS_linux', true) pthread_dep = meson.get_compiler('c').find_library('pthread') - os_deps = os_deps + [pthread_dep] + ncurses_dep = dependency('ncurses') + + os_deps = os_deps + [pthread_dep, ncurses] elif osdet == 'darwin' conf_data.set('U3_OS_osx', true) os_c_flags = os_c_flags + ['-bind_at_load'] os_link_flags = ['-framework CoreServices', '-framework CoreFoundation'] + ncurses_dep = meson.get_compiler('c').find_library('ncurses') + os_deps = os_deps + ncurses_dep elif osdet == 'bsd' conf_data.set('U3_OS_bsd', true) pthread_dep = meson.get_compiler('c').find_library('pthread') kvm_dep = meson.get_compiler('c').find_library('kvm') - os_deps = os_deps + [kvm_dep, pthread_dep] + ncurses_dep = dependency('ncurses') + os_deps = os_deps + [kvm_dep, pthread_dep, ncurses_dep] else error('Unsupported OS detected:' + osdet) endif @@ -256,7 +261,6 @@ configure_file(input : 'include/config.h.in', openssl_dep = dependency('openssl') curl_dep = dependency('libcurl') libuv_dep = dependency('libuv') -ncurses_dep = dependency('ncurses') gmp_dep = meson.get_compiler('c').find_library('gmp') sigsegv_dep = meson.get_compiler('c').find_library('sigsegv') @@ -287,7 +291,6 @@ dependencies: [openssl_dep, curl_dep, libuv_dep, cmark_dep, - ncurses_dep, gmp_dep, sigsegv_dep, urbitscrypt_dep, From 4c60efc6ae7f295cca75d679cdfbc220c5e0d715 Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 20:53:11 +0800 Subject: [PATCH 41/78] Fix meson.build --- meson.build | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 301a0dfc5..609635993 100644 --- a/meson.build +++ b/meson.build @@ -223,8 +223,7 @@ if osdet == 'linux' pthread_dep = meson.get_compiler('c').find_library('pthread') ncurses_dep = dependency('ncurses') - - os_deps = os_deps + [pthread_dep, ncurses] + os_deps = os_deps + [pthread_dep, ncurses_dep] elif osdet == 'darwin' conf_data.set('U3_OS_osx', true) From 21be3dbb482b953c4a9172c93e970f2e9b4c5e3a Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 20:58:24 +0800 Subject: [PATCH 42/78] Fix ncurses error --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 609635993..d1cb113d7 100644 --- a/meson.build +++ b/meson.build @@ -231,7 +231,7 @@ elif osdet == 'darwin' os_c_flags = os_c_flags + ['-bind_at_load'] os_link_flags = ['-framework CoreServices', '-framework CoreFoundation'] ncurses_dep = meson.get_compiler('c').find_library('ncurses') - os_deps = os_deps + ncurses_dep + os_deps = os_deps + [ncurses_dep] elif osdet == 'bsd' conf_data.set('U3_OS_bsd', true) From 49fc00e89a7a13737770507b7adea0210f839c2e Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 21:15:56 +0800 Subject: [PATCH 43/78] Force >=1.0.0 openssl version --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index d1cb113d7..c50b9741f 100644 --- a/meson.build +++ b/meson.build @@ -257,7 +257,7 @@ configure_file(input : 'include/config.h.in', configuration : conf_data) # We expect these libs to supplied with the distribution -openssl_dep = dependency('openssl') +openssl_dep = dependency('openssl', version: '>=1.0.0') curl_dep = dependency('libcurl') libuv_dep = dependency('libuv') From 29cba5eaaa701e60f4597ab4fed6cc5f16dcbcef Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 21:19:44 +0800 Subject: [PATCH 44/78] Fix openssl discovery on mac --- meson.build | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index c50b9741f..8714392f6 100644 --- a/meson.build +++ b/meson.build @@ -223,7 +223,9 @@ if osdet == 'linux' pthread_dep = meson.get_compiler('c').find_library('pthread') ncurses_dep = dependency('ncurses') - os_deps = os_deps + [pthread_dep, ncurses_dep] + openssl_dep = dependency('openssl', version: '>=1.0.0') + + os_deps = os_deps + [pthread_dep, ncurses_dep, openssl_dep] elif osdet == 'darwin' conf_data.set('U3_OS_osx', true) @@ -231,7 +233,8 @@ elif osdet == 'darwin' os_c_flags = os_c_flags + ['-bind_at_load'] os_link_flags = ['-framework CoreServices', '-framework CoreFoundation'] ncurses_dep = meson.get_compiler('c').find_library('ncurses') - os_deps = os_deps + [ncurses_dep] + openssl_dep = meson.get_compiler('c').find_library('openssl') + os_deps = os_deps + [ncurses_dep, openssl_dep] elif osdet == 'bsd' conf_data.set('U3_OS_bsd', true) @@ -239,7 +242,9 @@ elif osdet == 'bsd' pthread_dep = meson.get_compiler('c').find_library('pthread') kvm_dep = meson.get_compiler('c').find_library('kvm') ncurses_dep = dependency('ncurses') - os_deps = os_deps + [kvm_dep, pthread_dep, ncurses_dep] + openssl_dep = dependency('openssl', version: '>=1.0.0') + + os_deps = os_deps + [kvm_dep, pthread_dep, ncurses_dep, openssl_dep] else error('Unsupported OS detected:' + osdet) endif @@ -257,7 +262,6 @@ configure_file(input : 'include/config.h.in', configuration : conf_data) # We expect these libs to supplied with the distribution -openssl_dep = dependency('openssl', version: '>=1.0.0') curl_dep = dependency('libcurl') libuv_dep = dependency('libuv') @@ -286,8 +290,7 @@ sources : sources, include_directories : incdir, c_args : opt_flags + os_c_flags, link_args: os_link_flags, -dependencies: [openssl_dep, - curl_dep, +dependencies: [curl_dep, libuv_dep, cmark_dep, gmp_dep, From 43f3b4be7da1b33b810c41c91889e2767ced0ea3 Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 21:22:24 +0800 Subject: [PATCH 45/78] Revert to normal openssl detection --- meson.build | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/meson.build b/meson.build index 8714392f6..8e1efdaed 100644 --- a/meson.build +++ b/meson.build @@ -223,9 +223,7 @@ if osdet == 'linux' pthread_dep = meson.get_compiler('c').find_library('pthread') ncurses_dep = dependency('ncurses') - openssl_dep = dependency('openssl', version: '>=1.0.0') - - os_deps = os_deps + [pthread_dep, ncurses_dep, openssl_dep] + os_deps = os_deps + [pthread_dep, ncurses_dep] elif osdet == 'darwin' conf_data.set('U3_OS_osx', true) @@ -242,9 +240,7 @@ elif osdet == 'bsd' pthread_dep = meson.get_compiler('c').find_library('pthread') kvm_dep = meson.get_compiler('c').find_library('kvm') ncurses_dep = dependency('ncurses') - openssl_dep = dependency('openssl', version: '>=1.0.0') - - os_deps = os_deps + [kvm_dep, pthread_dep, ncurses_dep, openssl_dep] + os_deps = os_deps + [kvm_dep, pthread_dep, ncurses_dep] else error('Unsupported OS detected:' + osdet) endif @@ -262,6 +258,7 @@ configure_file(input : 'include/config.h.in', configuration : conf_data) # We expect these libs to supplied with the distribution +openssl_dep = dependency('openssl', version: '>=1.0.0') curl_dep = dependency('libcurl') libuv_dep = dependency('libuv') @@ -290,7 +287,8 @@ sources : sources, include_directories : incdir, c_args : opt_flags + os_c_flags, link_args: os_link_flags, -dependencies: [curl_dep, +dependencies: [openssl_dep, + curl_dep, libuv_dep, cmark_dep, gmp_dep, From 1d40d471125e2be9767e33fc39b41cf10c99f38d Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 21:25:18 +0800 Subject: [PATCH 46/78] Do not force openssl version --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 8e1efdaed..6c4b11b11 100644 --- a/meson.build +++ b/meson.build @@ -258,7 +258,7 @@ configure_file(input : 'include/config.h.in', configuration : conf_data) # We expect these libs to supplied with the distribution -openssl_dep = dependency('openssl', version: '>=1.0.0') +openssl_dep = dependency('openssl') curl_dep = dependency('libcurl') libuv_dep = dependency('libuv') From 2cc88de921421682eb342fd0addde7d3caff24a3 Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 21:41:53 +0800 Subject: [PATCH 47/78] Fix mac build --- meson.build | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 6c4b11b11..d1cb113d7 100644 --- a/meson.build +++ b/meson.build @@ -231,8 +231,7 @@ elif osdet == 'darwin' os_c_flags = os_c_flags + ['-bind_at_load'] os_link_flags = ['-framework CoreServices', '-framework CoreFoundation'] ncurses_dep = meson.get_compiler('c').find_library('ncurses') - openssl_dep = meson.get_compiler('c').find_library('openssl') - os_deps = os_deps + [ncurses_dep, openssl_dep] + os_deps = os_deps + [ncurses_dep] elif osdet == 'bsd' conf_data.set('U3_OS_bsd', true) From f059ba7f79a721b6c645b449f37568c8c5dd58b3 Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 21:59:13 +0800 Subject: [PATCH 48/78] Fix mac build --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index d1cb113d7..d947099fe 100644 --- a/meson.build +++ b/meson.build @@ -229,7 +229,7 @@ elif osdet == 'darwin' conf_data.set('U3_OS_osx', true) os_c_flags = os_c_flags + ['-bind_at_load'] - os_link_flags = ['-framework CoreServices', '-framework CoreFoundation'] + # os_link_flags = ['-framework CoreServices', '-framework CoreFoundation'] ncurses_dep = meson.get_compiler('c').find_library('ncurses') os_deps = os_deps + [ncurses_dep] From a51b6a61ad3fca4964a754324e7d6af85eb68f4e Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 22:05:48 +0800 Subject: [PATCH 49/78] Add macos pkg-config fix instructions --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 09d56dba9..7b09d4ae7 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,12 @@ Some libraries which are not found in major distributions: are included as git submodules. To build urbit from source, perform the following steps: +## MacOS specifics +On macos, you need to make sure `pkg-config` uses the correct homebrew path. + The `export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/opt/openssl/lib/pkgconfig/` + should setup the `pkg-config` path correctly, solving errors with homebrew package discovery (notably with `openssl` paths). + + 1. Install all required dependencies. 2. `git submodule init` in the urbit repository 3. `git submodule update` From d928626a3850350ca3bab61be01533d461ced41b Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 22:07:10 +0800 Subject: [PATCH 50/78] Add macos pkg-config fix instructions --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 7b09d4ae7..997d9baee 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,7 @@ On macos, you need to make sure `pkg-config` uses the correct homebrew path. The `export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/opt/openssl/lib/pkgconfig/` should setup the `pkg-config` path correctly, solving errors with homebrew package discovery (notably with `openssl` paths). +## Configuration & compilation 1. Install all required dependencies. 2. `git submodule init` in the urbit repository From d14e03135fa9669f93dbfe69899079330befc964 Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 22:08:07 +0800 Subject: [PATCH 51/78] Add macos pkg-config fix instructions --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 997d9baee..58553c4c7 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ are included as git submodules. To build urbit from source, perform the followin ## MacOS specifics On macos, you need to make sure `pkg-config` uses the correct homebrew path. - The `export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/opt/openssl/lib/pkgconfig/` + The `export PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig/` should setup the `pkg-config` path correctly, solving errors with homebrew package discovery (notably with `openssl` paths). ## Configuration & compilation From 537c7223f82ad54f98393a1477085fdc073edfbb Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 22:08:52 +0800 Subject: [PATCH 52/78] Add macos pkg-config fix instructions --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 58553c4c7..e56d6139a 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ are included as git submodules. To build urbit from source, perform the followin ## MacOS specifics On macos, you need to make sure `pkg-config` uses the correct homebrew path. - The `export PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig/` + The `export PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig/:$PKG_CONFIG_PATH` should setup the `pkg-config` path correctly, solving errors with homebrew package discovery (notably with `openssl` paths). ## Configuration & compilation From 08af567a4f011b762720773cf5c8cb82fc038e0b Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 22:22:42 +0800 Subject: [PATCH 53/78] Look for scrypt --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index d947099fe..780644c5b 100644 --- a/meson.build +++ b/meson.build @@ -267,7 +267,7 @@ sigsegv_dep = meson.get_compiler('c').find_library('sigsegv') # For these libs we provide fallback bundle cmark_dep = dependency('libcmark', version: '0.12.0', fallback: ['commonmark-legacy', 'cmark_dep']) -urbitscrypt_dep = dependency('urbit-scrypt', fallback: ['urbit-scrypt', 'urbit_scrypt_dep']) +urbitscrypt_dep = dependency('scrypt', fallback: ['urbit-scrypt', 'urbit_scrypt_dep']) ed25519_dep = dependency('ed25519', fallback: ['ed25519', 'ed25519_dep']) murmur3_dep = dependency('murmur3', fallback: ['murmur3', 'murmur3_dep']) http_parser_dep = dependency('http-parser', version: '0.1.0', fallback: ['http-parser-legacy', 'http_parser_dep']) From 71b83dc8cd4bd74398ee01d2ea226f58a6cca74b Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 22:55:52 +0800 Subject: [PATCH 54/78] scrypt -> libscrypt dependency --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 780644c5b..55163283b 100644 --- a/meson.build +++ b/meson.build @@ -267,7 +267,7 @@ sigsegv_dep = meson.get_compiler('c').find_library('sigsegv') # For these libs we provide fallback bundle cmark_dep = dependency('libcmark', version: '0.12.0', fallback: ['commonmark-legacy', 'cmark_dep']) -urbitscrypt_dep = dependency('scrypt', fallback: ['urbit-scrypt', 'urbit_scrypt_dep']) +urbitscrypt_dep = dependency('libscrypt', fallback: ['urbit-scrypt', 'urbit_scrypt_dep']) ed25519_dep = dependency('ed25519', fallback: ['ed25519', 'ed25519_dep']) murmur3_dep = dependency('murmur3', fallback: ['murmur3', 'murmur3_dep']) http_parser_dep = dependency('http-parser', version: '0.1.0', fallback: ['http-parser-legacy', 'http_parser_dep']) From e4d467ff24a047bf98c929b8b53a05b5ac73a752 Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 23:16:36 +0800 Subject: [PATCH 55/78] Use stock libscrypt --- jets/e/scr.c | 100 ++++++++++----------------------------------------- meson.build | 9 ++++- 2 files changed, 26 insertions(+), 83 deletions(-) diff --git a/jets/e/scr.c b/jets/e/scr.c index 9111f8a6c..1c6591cda 100644 --- a/jets/e/scr.c +++ b/jets/e/scr.c @@ -5,8 +5,16 @@ #include #include -#include +#include +/** + * PBKDF2_SHA256(passwd, passwdlen, salt, saltlen, c, buf, dkLen): + * Compute PBKDF2(passwd, salt, c, dkLen) using HMAC-SHA256 as the PRF, and + * write the output to buf. The value dkLen must be at most 32 * (2^32 - 1). + */ +void libscrypt_PBKDF2_SHA256(const uint8_t *, size_t, const uint8_t *, size_t, + uint64_t, uint8_t *, size_t); + static int _crypto_scrypt(const uint8_t *, size_t, const uint8_t *, size_t, uint64_t, uint32_t, uint32_t, uint8_t *, size_t); @@ -17,8 +25,8 @@ static int _crypto_scrypt(const uint8_t *, size_t, const uint8_t *, size_t, u3qes_hsl(u3_atom p, u3_atom pl, u3_atom s, u3_atom sl, u3_atom n, - u3_atom r, - u3_atom z, + u3_atom r, + u3_atom z, u3_atom d) { // asserting that n is power of 2 in _crypto_scrypt @@ -30,7 +38,7 @@ static int _crypto_scrypt(const uint8_t *, size_t, const uint8_t *, size_t, (((c3_d)r * 128 * ((c3_d)n + z - 1)) <= (1 << 30)))) return u3m_bail(c3__exit); - c3_y* b_p = u3a_malloc(pl + 1); c3_y* b_s= u3a_malloc(sl + 1); + c3_y* b_p = u3a_malloc(pl + 1); c3_y* b_s= u3a_malloc(sl + 1); u3r_bytes(0, pl, b_p, p); u3r_bytes(0, sl, b_s, s); b_p[pl] = 0; b_s[sl]=0; c3_y* buf = u3a_malloc(d); @@ -73,7 +81,7 @@ static int _crypto_scrypt(const uint8_t *, size_t, const uint8_t *, size_t, return u3m_bail(c3__exit); c3_w pl = u3r_met(3, p); c3_w sl = u3r_met(3, s); - c3_y* b_p = u3a_malloc(pl + 1); c3_y* b_s= u3a_malloc(sl + 1); + c3_y* b_p = u3a_malloc(pl + 1); c3_y* b_s= u3a_malloc(sl + 1); u3r_bytes(0, pl, b_p, p); u3r_bytes(0, sl, b_s, s); b_p[pl] = 0; b_s[sl]=0; c3_y* buf = u3a_malloc(d); @@ -112,12 +120,12 @@ static int _crypto_scrypt(const uint8_t *, size_t, const uint8_t *, size_t, (c != 0))) return u3m_bail(c3__exit); - c3_y* b_p = u3a_malloc(pl + 1); c3_y* b_s= u3a_malloc(pl + 1); + c3_y* b_p = u3a_malloc(pl + 1); c3_y* b_s= u3a_malloc(pl + 1); u3r_bytes(0, pl, b_p, p); u3r_bytes(0, sl, b_s, s); b_p[pl] = 0; b_s[sl]=0; c3_y* buf = u3a_malloc(d); - PBKDF2_SHA256(b_p, pl, b_s, sl, c, buf, d); + libscrypt_PBKDF2_SHA256(b_p, pl, b_s, sl, c, buf, d); u3_noun res = u3i_bytes(d, buf); u3a_free(b_p); u3a_free(b_s); u3a_free(buf); @@ -147,12 +155,12 @@ static int _crypto_scrypt(const uint8_t *, size_t, const uint8_t *, size_t, return u3m_bail(c3__exit); c3_w pl = u3r_met(3, p); c3_w sl = u3r_met(3, s); - c3_y* b_p = u3a_malloc(pl + 1); c3_y* b_s= u3a_malloc(pl + 1); + c3_y* b_p = u3a_malloc(pl + 1); c3_y* b_s= u3a_malloc(pl + 1); u3r_bytes(0, pl, b_p, p); u3r_bytes(0, sl, b_s, s); b_p[pl] = 0; b_s[sl]=0; c3_y* buf = u3a_malloc(d); - PBKDF2_SHA256(b_p, pl, b_s, sl, c, buf, d); + libscrypt_PBKDF2_SHA256(b_p, pl, b_s, sl, c, buf, d); u3_noun res = u3i_bytes(d, buf); u3a_free(b_p); u3a_free(b_s); u3a_free(buf); @@ -213,77 +221,5 @@ _crypto_scrypt(const uint8_t * passwd, size_t passwdlen, const uint8_t * salt, size_t saltlen, uint64_t N, uint32_t r, uint32_t p, uint8_t * buf, size_t buflen) { - void * B0, * V0, * XY0; - uint8_t * B; - uint32_t * V; - uint32_t * XY; - uint32_t i; - - if (((N & (N-1)) != 0) || N == 0) - goto err0; - - /* Sanity-check parameters. */ -#if SIZE_MAX > UINT32_MAX - if (buflen > (((uint64_t)(1) << 32) - 1) * 32) { - errno = EFBIG; - goto err0; - } -#endif - if ((uint64_t)(r) * (uint64_t)(p) >= (1 << 30)) { - errno = EFBIG; - goto err0; - } - if (((N & (N - 1)) != 0) || (N == 0)) { - errno = EINVAL; - goto err0; - } - int test_size_max = (r > SIZE_MAX / 128 / p) || (N > SIZE_MAX / 128 / r); - -#if SIZE_MAX / 256 <= UINT32_MAX - test_size_max = (r > (SIZE_MAX - 64) / 256) || test_size_max; -#endif - if(test_size_max) { - errno = ENOMEM; - goto err0; - } - - /* Allocate memory. */ - if ((B0 = u3a_malloc(128 * r * p + 63)) == NULL) - goto err0; - B = (uint8_t *)(((uintptr_t)(B0) + 63) & ~ (uintptr_t)(63)); - if ((XY0 = u3a_malloc(256 * r + 64 + 63)) == NULL) - goto err1; - XY = (uint32_t *)(((uintptr_t)(XY0) + 63) & ~ (uintptr_t)(63)); - if ((V0 = u3a_malloc(128 * r * N + 63)) == NULL) - goto err2; - V = (uint32_t *)(((uintptr_t)(V0) + 63) & ~ (uintptr_t)(63)); - - /* 1: (B_0 ... B_{p-1}) <-- PBKDF2(P, S, 1, p * MFLen) */ - PBKDF2_SHA256(passwd, passwdlen, salt, saltlen, 1, B, p * 128 * r); - - /* 2: for i = 0 to p - 1 do */ - for (i = 0; i < p; i++) { - /* 3: B_i <-- MF(B_i, N) */ - smix(&B[i * 128 * r], r, N, V, XY); - } - - /* 5: DK <-- PBKDF2(P, B, 1, dkLen) */ - PBKDF2_SHA256(passwd, passwdlen, B, p * 128 * r, 1, buf, buflen); - - /* Free memory. */ - - u3a_free(V0); - u3a_free(XY0); - u3a_free(B0); - - /* Success! */ - return (0); - -err2: - u3a_free(XY0); -err1: - u3a_free(B0); -err0: - /* Failure! */ - return (-1); + return libscrypt_scrypt(passwd, passwdlen, salt, saltlen, N, r, p, buf, buflen); } diff --git a/meson.build b/meson.build index 55163283b..c6de3a1d9 100644 --- a/meson.build +++ b/meson.build @@ -267,7 +267,14 @@ sigsegv_dep = meson.get_compiler('c').find_library('sigsegv') # For these libs we provide fallback bundle cmark_dep = dependency('libcmark', version: '0.12.0', fallback: ['commonmark-legacy', 'cmark_dep']) -urbitscrypt_dep = dependency('libscrypt', fallback: ['urbit-scrypt', 'urbit_scrypt_dep']) +compiler_scrypt = meson.get_compiler('c').find_library('libscrypt') + +if compiler_scrypt.found() + urbitscrypt_dep = compiler_scrypt +else + urbitscrypt_dep = dependency('libscrypt', fallback: ['urbit-scrypt', 'urbit_scrypt_dep']) +endif + ed25519_dep = dependency('ed25519', fallback: ['ed25519', 'ed25519_dep']) murmur3_dep = dependency('murmur3', fallback: ['murmur3', 'murmur3_dep']) http_parser_dep = dependency('http-parser', version: '0.1.0', fallback: ['http-parser-legacy', 'http_parser_dep']) From f826497d47c9d9dce019b892b893484d43f13fd2 Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 23:35:44 +0800 Subject: [PATCH 56/78] Migrate to stock libscrypt version with meson support --- .gitmodules | 6 +++--- jets/e/scr.c | 12 +++--------- subprojects/libscrypt | 1 + subprojects/urbit-scrypt | 1 - 4 files changed, 7 insertions(+), 13 deletions(-) create mode 160000 subprojects/libscrypt delete mode 160000 subprojects/urbit-scrypt diff --git a/.gitmodules b/.gitmodules index 3de73ead7..d4c81741d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,9 +4,6 @@ [submodule "subprojects/ed25519"] path = subprojects/ed25519 url = https://github.com/mikolajpp/ed25519.git -[submodule "subprojects/urbit-scrypt"] - path = subprojects/urbit-scrypt - url = https://github.com/mikolajpp/urbit-scrypt.git [submodule "subprojects/murmur3"] path = subprojects/murmur3 url = https://github.com/mikolajpp/murmur3.git @@ -16,3 +13,6 @@ [submodule "subprojects/http-parser-legacy"] path = subprojects/http-parser-legacy url = https://github.com/mikolajpp/http-parser-legacy.git +[submodule "subprojects/libscrypt"] + path = subprojects/libscrypt + url = git@github.com:mikolajpp/libscrypt.git diff --git a/jets/e/scr.c b/jets/e/scr.c index 1c6591cda..41fee4a6d 100644 --- a/jets/e/scr.c +++ b/jets/e/scr.c @@ -5,16 +5,10 @@ #include #include -#include -/** - * PBKDF2_SHA256(passwd, passwdlen, salt, saltlen, c, buf, dkLen): - * Compute PBKDF2(passwd, salt, c, dkLen) using HMAC-SHA256 as the PRF, and - * write the output to buf. The value dkLen must be at most 32 * (2^32 - 1). - */ -void libscrypt_PBKDF2_SHA256(const uint8_t *, size_t, const uint8_t *, size_t, - uint64_t, uint8_t *, size_t); - +#include +#include + static int _crypto_scrypt(const uint8_t *, size_t, const uint8_t *, size_t, uint64_t, uint32_t, uint32_t, uint8_t *, size_t); diff --git a/subprojects/libscrypt b/subprojects/libscrypt new file mode 160000 index 000000000..984fec910 --- /dev/null +++ b/subprojects/libscrypt @@ -0,0 +1 @@ +Subproject commit 984fec910a9df81bc645edea3002440c0ddd9b36 diff --git a/subprojects/urbit-scrypt b/subprojects/urbit-scrypt deleted file mode 160000 index 66444464f..000000000 --- a/subprojects/urbit-scrypt +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 66444464f01ccf58d13d06a28b2707ec129be0c7 From c9aa26ad44ff01a164e2d8fcc51cb580043cdfe8 Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 23:40:19 +0800 Subject: [PATCH 57/78] Fix libscrypt includes --- jets/e/scr.c | 4 ++-- meson.build | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/jets/e/scr.c b/jets/e/scr.c index 41fee4a6d..8a7251774 100644 --- a/jets/e/scr.c +++ b/jets/e/scr.c @@ -6,8 +6,8 @@ #include #include -#include -#include +#include +#include static int _crypto_scrypt(const uint8_t *, size_t, const uint8_t *, size_t, uint64_t, uint32_t, uint32_t, uint8_t *, size_t); diff --git a/meson.build b/meson.build index c6de3a1d9..175dc1bd1 100644 --- a/meson.build +++ b/meson.build @@ -267,12 +267,12 @@ sigsegv_dep = meson.get_compiler('c').find_library('sigsegv') # For these libs we provide fallback bundle cmark_dep = dependency('libcmark', version: '0.12.0', fallback: ['commonmark-legacy', 'cmark_dep']) -compiler_scrypt = meson.get_compiler('c').find_library('libscrypt') +compiler_scrypt = meson.get_compiler('c').find_library('libscrypt', required: false) if compiler_scrypt.found() urbitscrypt_dep = compiler_scrypt else - urbitscrypt_dep = dependency('libscrypt', fallback: ['urbit-scrypt', 'urbit_scrypt_dep']) + urbitscrypt_dep = dependency('libscrypt', fallback: ['libscrypt', 'libscrypt_dep']) endif ed25519_dep = dependency('ed25519', fallback: ['ed25519', 'ed25519_dep']) From 87fa889364deb07700e3d87a79f892116d6421b0 Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 23:45:02 +0800 Subject: [PATCH 58/78] Move to stock ed25519 --- .gitmodules | 6 +++--- subprojects/ed25519 | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitmodules b/.gitmodules index d4c81741d..69221c6ec 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,6 @@ [submodule "subprojects/softfloat3"] path = subprojects/softfloat3 url = https://github.com/mikolajpp/berkeley-softfloat-3.git -[submodule "subprojects/ed25519"] - path = subprojects/ed25519 - url = https://github.com/mikolajpp/ed25519.git [submodule "subprojects/murmur3"] path = subprojects/murmur3 url = https://github.com/mikolajpp/murmur3.git @@ -16,3 +13,6 @@ [submodule "subprojects/libscrypt"] path = subprojects/libscrypt url = git@github.com:mikolajpp/libscrypt.git +[submodule "subprojects/ed25519"] + path = subprojects/ed25519 + url = git@github.com:mikolajpp/ed25519.git diff --git a/subprojects/ed25519 b/subprojects/ed25519 index 042c85322..84731d522 160000 --- a/subprojects/ed25519 +++ b/subprojects/ed25519 @@ -1 +1 @@ -Subproject commit 042c85322dcc229be2ab141e1f8ceb628ebcda48 +Subproject commit 84731d522f43bad833ef9e66a7004017447889f1 From 23993c574bd1664373eecd9bad5b52e70d620e3d Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 23:49:01 +0800 Subject: [PATCH 59/78] Remove legacy copyright notice --- jets/e/scr.c | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/jets/e/scr.c b/jets/e/scr.c index 8a7251774..69d1cdecd 100644 --- a/jets/e/scr.c +++ b/jets/e/scr.c @@ -172,35 +172,6 @@ static int _crypto_scrypt(const uint8_t *, size_t, const uint8_t *, size_t, return u3qes_pbk(p, s, c, d); } -/*- - * Copyright 2009 Colin Percival - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * This file was originally written by Colin Percival as part of the Tarsnap - * online backup system. - */ - /** * crypto_scrypt(passwd, passwdlen, salt, saltlen, N, r, p, buf, buflen): * Compute scrypt(passwd[0 .. passwdlen - 1], salt[0 .. saltlen - 1], N, r, From 0344b951d9c6c1e5c87ffdc82408b1a086608267 Mon Sep 17 00:00:00 2001 From: mikolajp Date: Sun, 25 Feb 2018 23:51:36 +0800 Subject: [PATCH 60/78] Fix submodule git paths --- .gitmodules | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitmodules b/.gitmodules index 69221c6ec..75df221ba 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,9 +10,9 @@ [submodule "subprojects/http-parser-legacy"] path = subprojects/http-parser-legacy url = https://github.com/mikolajpp/http-parser-legacy.git -[submodule "subprojects/libscrypt"] - path = subprojects/libscrypt - url = git@github.com:mikolajpp/libscrypt.git [submodule "subprojects/ed25519"] path = subprojects/ed25519 - url = git@github.com:mikolajpp/ed25519.git + url = https://github.com/mikolajpp/ed25519-1.git +[submodule "subprojects/libscrypt"] + path = subprojects/libscrypt + url = https://github.com/mikolajpp/libscrypt.git From 4049d7fe42a658149b345f5c9b7724d25ddd0562 Mon Sep 17 00:00:00 2001 From: mikolajp Date: Mon, 26 Feb 2018 00:06:38 +0800 Subject: [PATCH 61/78] Move to cleaned up murmur3 --- .gitmodules | 6 +++--- jets/c/muk.c | 2 +- meson.build | 8 +------- subprojects/murmur3 | 2 +- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/.gitmodules b/.gitmodules index 75df221ba..4228ba323 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,6 @@ [submodule "subprojects/softfloat3"] path = subprojects/softfloat3 url = https://github.com/mikolajpp/berkeley-softfloat-3.git -[submodule "subprojects/murmur3"] - path = subprojects/murmur3 - url = https://github.com/mikolajpp/murmur3.git [submodule "subprojects/commonmark-legacy"] path = subprojects/commonmark-legacy url = https://github.com/mikolajpp/commonmark-legacy.git @@ -16,3 +13,6 @@ [submodule "subprojects/libscrypt"] path = subprojects/libscrypt url = https://github.com/mikolajpp/libscrypt.git +[submodule "subprojects/murmur3"] + path = subprojects/murmur3 + url = https://github.com/mikolajpp/murmur3.git diff --git a/jets/c/muk.c b/jets/c/muk.c index 60e0a6b41..6d71aed1c 100644 --- a/jets/c/muk.c +++ b/jets/c/muk.c @@ -2,7 +2,7 @@ ** */ #include "all.h" -#include +#include /* functions */ diff --git a/meson.build b/meson.build index 175dc1bd1..a68877fae 100644 --- a/meson.build +++ b/meson.build @@ -267,13 +267,7 @@ sigsegv_dep = meson.get_compiler('c').find_library('sigsegv') # For these libs we provide fallback bundle cmark_dep = dependency('libcmark', version: '0.12.0', fallback: ['commonmark-legacy', 'cmark_dep']) -compiler_scrypt = meson.get_compiler('c').find_library('libscrypt', required: false) - -if compiler_scrypt.found() - urbitscrypt_dep = compiler_scrypt -else - urbitscrypt_dep = dependency('libscrypt', fallback: ['libscrypt', 'libscrypt_dep']) -endif +urbitscrypt_dep = dependency('libscrypt', fallback: ['libscrypt', 'libscrypt_dep']) ed25519_dep = dependency('ed25519', fallback: ['ed25519', 'ed25519_dep']) murmur3_dep = dependency('murmur3', fallback: ['murmur3', 'murmur3_dep']) diff --git a/subprojects/murmur3 b/subprojects/murmur3 index 615f1a1a4..467680fc0 160000 --- a/subprojects/murmur3 +++ b/subprojects/murmur3 @@ -1 +1 @@ -Subproject commit 615f1a1a4bcdcc90e8ea83b955fd0f4cd7e502c4 +Subproject commit 467680fc088268207e9049bb3caf243bd5f2bc03 From 79e2350f352b247c6bf8d921fc4d0cb5a3c9434a Mon Sep 17 00:00:00 2001 From: mikolajp Date: Tue, 27 Feb 2018 12:35:15 +0800 Subject: [PATCH 62/78] Require meson version >=0.40.0 --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index a68877fae..4d4877075 100644 --- a/meson.build +++ b/meson.build @@ -1,4 +1,4 @@ -project('urbit', 'c') +project('urbit', 'c', meson_version: '>=0.40.0') jets_a_src = [ 'jets/a/add.c', From 47e374981a82b9133f2a289b0cf6670524bd9c0a Mon Sep 17 00:00:00 2001 From: mikolajp Date: Tue, 27 Feb 2018 12:43:32 +0800 Subject: [PATCH 63/78] Pin dependencies version. --- meson.build | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/meson.build b/meson.build index 4d4877075..775244572 100644 --- a/meson.build +++ b/meson.build @@ -257,9 +257,9 @@ configure_file(input : 'include/config.h.in', configuration : conf_data) # We expect these libs to supplied with the distribution -openssl_dep = dependency('openssl') -curl_dep = dependency('libcurl') -libuv_dep = dependency('libuv') +openssl_dep = dependency('openssl', version: '>=1.0.0') +curl_dep = dependency('libcurl', version: '>=7.47.0') +libuv_dep = dependency('libuv', version: '>=1.8.0') gmp_dep = meson.get_compiler('c').find_library('gmp') sigsegv_dep = meson.get_compiler('c').find_library('sigsegv') @@ -267,12 +267,12 @@ sigsegv_dep = meson.get_compiler('c').find_library('sigsegv') # For these libs we provide fallback bundle cmark_dep = dependency('libcmark', version: '0.12.0', fallback: ['commonmark-legacy', 'cmark_dep']) -urbitscrypt_dep = dependency('libscrypt', fallback: ['libscrypt', 'libscrypt_dep']) +urbitscrypt_dep = dependency('libscrypt', version: '>=0.1.21', fallback: ['libscrypt', 'libscrypt_dep']) -ed25519_dep = dependency('ed25519', fallback: ['ed25519', 'ed25519_dep']) -murmur3_dep = dependency('murmur3', fallback: ['murmur3', 'murmur3_dep']) -http_parser_dep = dependency('http-parser', version: '0.1.0', fallback: ['http-parser-legacy', 'http_parser_dep']) -softfloat3_dep = dependency('softfloat3', fallback: ['softfloat3', 'softfloat3_dep']) +ed25519_dep = dependency('ed25519', version: '>=0.1.0', fallback: ['ed25519', 'ed25519_dep']) +murmur3_dep = dependency('murmur3', version: '>=0.1.0', fallback: ['murmur3', 'murmur3_dep']) +http_parser_dep = dependency('http-parser', version: '0.1.0', fallback: ['http-parser-legacy', 'http_parser_dep']) +softfloat3_dep = dependency('softfloat3', version: '>=3.0.0', fallback: ['softfloat3', 'softfloat3_dep']) opt_flags = [] From 257e6420acfad98d17adab1f606bbce4aa54beca Mon Sep 17 00:00:00 2001 From: mikolajp Date: Tue, 27 Feb 2018 12:46:41 +0800 Subject: [PATCH 64/78] Downgrade libcurl to 7.35.0 --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 775244572..f7bb38e4b 100644 --- a/meson.build +++ b/meson.build @@ -258,7 +258,7 @@ configure_file(input : 'include/config.h.in', # We expect these libs to supplied with the distribution openssl_dep = dependency('openssl', version: '>=1.0.0') -curl_dep = dependency('libcurl', version: '>=7.47.0') +curl_dep = dependency('libcurl', version: '>=7.35.0') libuv_dep = dependency('libuv', version: '>=1.8.0') gmp_dep = meson.get_compiler('c').find_library('gmp') From 34ba547625af4a631f1985c6f592275a1683ac15 Mon Sep 17 00:00:00 2001 From: mikolajp Date: Mon, 5 Mar 2018 11:57:49 +0800 Subject: [PATCH 65/78] Remove leftovers or ragel. --- .travis.yml | 1 - README.md | 1 - 2 files changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 056f10081..7e9f79177 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,7 +34,6 @@ addons: - make - libtool - g++ - - ragel - re2c - libcurl4-gnutls-dev - python3 diff --git a/README.md b/README.md index e56d6139a..e41811432 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,6 @@ If you're doing development on Urbit, keep reading. - [libcurl](https://curl.haxx.se/libcurl/) - [libuv](http://libuv.org) - curses implementation (ncurses on Linux distributions, OS curses otherwise) -- [Ragel](https://www.colm.net/open-source/ragel/) - [re2c](http://re2c.org) Most of these dependencies are unfortunate; we aim to drastically shrink the From 06c8f268bd96e84f849e3d7f2e1036b3dcf50376 Mon Sep 17 00:00:00 2001 From: mikolajp Date: Mon, 5 Mar 2018 12:53:52 +0800 Subject: [PATCH 66/78] Update debian package deps --- debian/control | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/control b/debian/control index ee8711ca0..3a233ee2e 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,8 @@ Source: urbit Section: net Priority: extra Maintainer: Ted Blackman -Build-Depends: debhelper (>= 9), libgmp3-dev, libsigsegv-dev, openssl, libssl-dev, automake, autoconf, libtool, g++, ragel, cmake, re2c, libcurl4-gnutls-dev +Build-Depends: debhelper (>= 9), libgmp3-dev, libsigsegv-dev, openssl, libssl-dev,libtool, g++, meson, re2c, +libcurl4-gnutls-dev Standards-Version: 3.9.5 Homepage: http://urbit.org From b6339fdb04c7c4798452a5b0b370dc74802dcfe9 Mon Sep 17 00:00:00 2001 From: mikolajp Date: Mon, 5 Mar 2018 12:55:19 +0800 Subject: [PATCH 67/78] Update debian package deps --- debian/control | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/debian/control b/debian/control index 3a233ee2e..430ff65e3 100644 --- a/debian/control +++ b/debian/control @@ -2,8 +2,7 @@ Source: urbit Section: net Priority: extra Maintainer: Ted Blackman -Build-Depends: debhelper (>= 9), libgmp3-dev, libsigsegv-dev, openssl, libssl-dev,libtool, g++, meson, re2c, -libcurl4-gnutls-dev +Build-Depends: debhelper (>= 9), libgmp3-dev, libsigsegv-dev, openssl, libssl-dev,libtool, meson, re2c, libcurl4-gnutls-dev Standards-Version: 3.9.5 Homepage: http://urbit.org From cbccd2d5413df8aeeed6f4c5bc047db9ce00d075 Mon Sep 17 00:00:00 2001 From: mikolajp Date: Mon, 5 Mar 2018 13:41:26 +0800 Subject: [PATCH 68/78] Require python 3.6 --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7e9f79177..9fce5d458 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,8 @@ script: meson build && cd ./build && ninja # # notifications: # email: false +python: + - "3.6" before_install: - wget https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip @@ -19,7 +21,7 @@ before_install: - sudo make install - cd .. install: - - pip3 install --user meson + - pip install --user meson addons: apt: @@ -36,8 +38,6 @@ addons: - g++ - re2c - libcurl4-gnutls-dev - - python3 - - python3-pip - unzip # before_deploy: "make deb" # TODO deploy: From e30ad410035504ef4ab80fd46b5d6f01383f5861 Mon Sep 17 00:00:00 2001 From: mikolajp Date: Mon, 5 Mar 2018 13:45:19 +0800 Subject: [PATCH 69/78] Require python 3.5 --- .travis.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9fce5d458..63f56a43f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,8 +5,6 @@ script: meson build && cd ./build && ninja # # notifications: # email: false -python: - - "3.6" before_install: - wget https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip @@ -25,7 +23,10 @@ install: addons: apt: + sources: + - deadsnakes # source required so it finds the package definition packages: + - python3.5 - libgmp3-dev - libsigsegv-dev - openssl From 81c760e1a7d63f547b80618a1fedc4a85c63f50f Mon Sep 17 00:00:00 2001 From: mikolajp Date: Mon, 5 Mar 2018 13:51:31 +0800 Subject: [PATCH 70/78] Pin meson version at 0.44.1 --- .travis.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 63f56a43f..d7abee1d1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,14 +19,12 @@ before_install: - sudo make install - cd .. install: - - pip install --user meson + - pip install --user -I meson==0.44.1 addons: apt: - sources: - - deadsnakes # source required so it finds the package definition packages: - - python3.5 + - python3 - libgmp3-dev - libsigsegv-dev - openssl From 811d3a5956e7f42a381120ab47b464c690fc953c Mon Sep 17 00:00:00 2001 From: mikolajp Date: Mon, 5 Mar 2018 13:54:17 +0800 Subject: [PATCH 71/78] Use pip3 version of pathlib --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d7abee1d1..4da8a1b85 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,7 @@ before_install: - sudo make install - cd .. install: - - pip install --user -I meson==0.44.1 + - pip3 install --user -I meson==0.44.1 addons: apt: From b14b3216bae0756281b754e77d84d04900282a33 Mon Sep 17 00:00:00 2001 From: mikolajp Date: Mon, 5 Mar 2018 13:58:59 +0800 Subject: [PATCH 72/78] Add pip3 to travis --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 4da8a1b85..1147a2ee2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,6 +25,7 @@ addons: apt: packages: - python3 + - python3-pip - libgmp3-dev - libsigsegv-dev - openssl From 26fc29f2e4731ebf3c67c7841d2ba66e5af64ebf Mon Sep 17 00:00:00 2001 From: Elliot Glaysher Date: Thu, 15 Mar 2018 15:40:05 -0700 Subject: [PATCH 73/78] Make meson build work with version 0.29. --- README.md | 2 +- meson.build | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index e41811432..43e282837 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ On macos, you need to make sure `pkg-config` uses the correct homebrew path. 1. Install all required dependencies. 2. `git submodule init` in the urbit repository 3. `git submodule update` -4. `meson build` +4. `mkdir build && meson build` 5. If the last step was successful, type `cd ./build` followed by `ninja` to compile urbit. 6. The executable should appear in `./build` directory. diff --git a/meson.build b/meson.build index f7bb38e4b..4666e7984 100644 --- a/meson.build +++ b/meson.build @@ -1,4 +1,4 @@ -project('urbit', 'c', meson_version: '>=0.40.0') +project('urbit', 'c', meson_version: '>=0.29.0') jets_a_src = [ 'jets/a/add.c', @@ -221,7 +221,7 @@ os_link_flags = [] if osdet == 'linux' conf_data.set('U3_OS_linux', true) - pthread_dep = meson.get_compiler('c').find_library('pthread') + pthread_dep = find_library('pthread') ncurses_dep = dependency('ncurses') os_deps = os_deps + [pthread_dep, ncurses_dep] @@ -230,7 +230,7 @@ elif osdet == 'darwin' os_c_flags = os_c_flags + ['-bind_at_load'] # os_link_flags = ['-framework CoreServices', '-framework CoreFoundation'] - ncurses_dep = meson.get_compiler('c').find_library('ncurses') + ncurses_dep = find_library('ncurses') os_deps = os_deps + [ncurses_dep] elif osdet == 'bsd' @@ -261,8 +261,8 @@ openssl_dep = dependency('openssl', version: '>=1.0.0') curl_dep = dependency('libcurl', version: '>=7.35.0') libuv_dep = dependency('libuv', version: '>=1.8.0') -gmp_dep = meson.get_compiler('c').find_library('gmp') -sigsegv_dep = meson.get_compiler('c').find_library('sigsegv') +gmp_dep = find_library('gmp') +sigsegv_dep = find_library('sigsegv') # For these libs we provide fallback bundle From 5c160bebc1bf31393464a3c578827f32a7feaed3 Mon Sep 17 00:00:00 2001 From: Mikolaj Paraniak Date: Sat, 17 Mar 2018 11:07:59 +0800 Subject: [PATCH 74/78] Universal meson build. --- meson.build | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/meson.build b/meson.build index 4666e7984..cd18988fe 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,13 @@ project('urbit', 'c', meson_version: '>=0.29.0') +legacy_meson = false + +if(meson.version() == '0.29.0') + legacy_meson = true +elif(meson.version() != '0.45.0') + error('Meson 0.29.0 is last legacy version supported. Otherwise please upgrade to 0.45.0.') +endif + jets_a_src = [ 'jets/a/add.c', 'jets/a/dec.c', @@ -221,7 +229,12 @@ os_link_flags = [] if osdet == 'linux' conf_data.set('U3_OS_linux', true) - pthread_dep = find_library('pthread') + if(legacy_meson) + pthread_dep = find_library('pthread') + else + pthread_dep = meson.get_compiler('c').find_library('pthread') + endif + ncurses_dep = dependency('ncurses') os_deps = os_deps + [pthread_dep, ncurses_dep] @@ -230,7 +243,12 @@ elif osdet == 'darwin' os_c_flags = os_c_flags + ['-bind_at_load'] # os_link_flags = ['-framework CoreServices', '-framework CoreFoundation'] - ncurses_dep = find_library('ncurses') + if(legacy_meson) + ncurses_dep = find_library('ncurses') + else + ncurses_dep = meson.get_compiler('c').find_library('ncurses') + endif + os_deps = os_deps + [ncurses_dep] elif osdet == 'bsd' @@ -261,9 +279,13 @@ openssl_dep = dependency('openssl', version: '>=1.0.0') curl_dep = dependency('libcurl', version: '>=7.35.0') libuv_dep = dependency('libuv', version: '>=1.8.0') -gmp_dep = find_library('gmp') -sigsegv_dep = find_library('sigsegv') - +if(legacy_meson) + gmp_dep = find_library('gmp') + sigsegv_dep = find_library('sigsegv') +else + gmp_dep = meson.get_compiler('c').find_library('gmp') + sigsegv_dep = meson.get_compiler('c').find_library('sigsegv') +endif # For these libs we provide fallback bundle cmark_dep = dependency('libcmark', version: '0.12.0', fallback: ['commonmark-legacy', 'cmark_dep']) From 21e4af8edc402396ee1f945fbdb81edb65f23cde Mon Sep 17 00:00:00 2001 From: Mikolaj Paraniak Date: Sat, 17 Mar 2018 11:17:07 +0800 Subject: [PATCH 75/78] Fix legacy meson version detection. --- meson.build | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index cd18988fe..1f8e0ea98 100644 --- a/meson.build +++ b/meson.build @@ -2,10 +2,13 @@ project('urbit', 'c', meson_version: '>=0.29.0') legacy_meson = false -if(meson.version() == '0.29.0') +detect_meson_version = run_command('meson', '--version') +meson_ver = detect_meson_version.stdout() + +if(meson_ver == '0.29.0\n') legacy_meson = true -elif(meson.version() != '0.45.0') - error('Meson 0.29.0 is last legacy version supported. Otherwise please upgrade to 0.45.0.') +elif(meson_ver.version_compare('>=0.40.0')) + error('Meson 0.29.0 is last legacy version supported. Otherwise please upgrade to 0.40.0 or higher.') endif jets_a_src = [ From 9498d6baa97bc137094aef229f7709f495e5affc Mon Sep 17 00:00:00 2001 From: Mikolaj Paraniak Date: Sat, 17 Mar 2018 11:26:13 +0800 Subject: [PATCH 76/78] Fix new meson version check --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 1f8e0ea98..4f8011b23 100644 --- a/meson.build +++ b/meson.build @@ -7,7 +7,7 @@ meson_ver = detect_meson_version.stdout() if(meson_ver == '0.29.0\n') legacy_meson = true -elif(meson_ver.version_compare('>=0.40.0')) +elif(not meson.version().version_compare('>=0.40.0')) error('Meson 0.29.0 is last legacy version supported. Otherwise please upgrade to 0.40.0 or higher.') endif From fb2bc370d8df4bb4df182e7f4c8b9f0c128a4885 Mon Sep 17 00:00:00 2001 From: Mikolaj Paraniak Date: Sat, 17 Mar 2018 11:59:44 +0800 Subject: [PATCH 77/78] Add legacy meson instructions to README --- README.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 43e282837..0fd49ed84 100644 --- a/README.md +++ b/README.md @@ -50,24 +50,31 @@ On macos, you need to make sure `pkg-config` uses the correct homebrew path. should setup the `pkg-config` path correctly, solving errors with homebrew package discovery (notably with `openssl` paths). ## Configuration & compilation +(For instructions for legacy meson, also see below) 1. Install all required dependencies. 2. `git submodule init` in the urbit repository 3. `git submodule update` -4. `mkdir build && meson build` +4. `meson ./build` 5. If the last step was successful, type `cd ./build` followed by `ninja` to compile urbit. 6. The executable should appear in `./build` directory. -## Using meson & ninja - -To configure project, enter the build directory and user +### Using meson & ninja +To configure project, enter the build directory and enter `meson configure`. Without any arguments this command will display available options. For example, to compile debug build of urbit, use `meson configure -Ddebug=true`. To set the prefix for installation use `meson configure -Dprefix=/usr`, and so on. +## Configuration & compilation for legacy meson + +The syntax for legacy meson (Version `0.29`) is a bit different. +1. Manually create `build` directory and invoke meson as `meson . ./build` +2. If you want to set options, this is done in one step. + Use `meson -D [options] . ./build` to prepare customized build. + Once the project is configured, use `ninja` to build it. To install it into the default prefix, use `ninja install`. If you want to specify custom `DESTDIR`, use `DESTDIR=... ninja install`. From b1f66d15bf1ea895262e7fc0e35862aabdf85854 Mon Sep 17 00:00:00 2001 From: Elliot Glaysher Date: Mon, 19 Mar 2018 10:53:35 -0700 Subject: [PATCH 78/78] Take ownership of the submodule repositories. --- .gitmodules | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitmodules b/.gitmodules index 4228ba323..b56a2d94e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,18 +1,18 @@ [submodule "subprojects/softfloat3"] path = subprojects/softfloat3 - url = https://github.com/mikolajpp/berkeley-softfloat-3.git + url = https://github.com/urbit/berkeley-softfloat-3.git [submodule "subprojects/commonmark-legacy"] path = subprojects/commonmark-legacy - url = https://github.com/mikolajpp/commonmark-legacy.git + url = https://github.com/urbit/commonmark-legacy.git [submodule "subprojects/http-parser-legacy"] path = subprojects/http-parser-legacy - url = https://github.com/mikolajpp/http-parser-legacy.git + url = https://github.com/urbit/http-parser-legacy.git [submodule "subprojects/ed25519"] path = subprojects/ed25519 - url = https://github.com/mikolajpp/ed25519-1.git + url = https://github.com/urbit/ed25519.git [submodule "subprojects/libscrypt"] path = subprojects/libscrypt - url = https://github.com/mikolajpp/libscrypt.git + url = https://github.com/urbit/libscrypt.git [submodule "subprojects/murmur3"] path = subprojects/murmur3 - url = https://github.com/mikolajpp/murmur3.git + url = https://github.com/urbit/murmur3.git

    -This document gives information needed for compiling and/or porting Berkeley -SoftFloat, a library of C functions implementing binary floating-point -conforming to the IEEE Standard for Floating-Point Arithmetic. -For basic documentation about SoftFloat refer to -SoftFloat.html. -

    IlG||>&m()vh!j1bs%Xt$;1BU+W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;)dS* z)~h{5jm%t%v#saK?XZaI=}APgD`oe*pQpaQp2WgR?$1jPe*f1h!S7daDh&ju(rT~J zpRD*@5x&0LA#}8lV3dg8>{|O~INb-x%>Zi^r?^}ypn%|1E2$xW8PVHuEFm^^^UMo5 zvH87&rgyYI&r3h;*xBDIm$t?q{#(m`7x$?{K0l{|k?H*o!{_K?hNFcsXIFPE${qE6 zHW=$Y2oHv`_-I~(r>r6)+X67;mLf8uzxtPltL`~2 zv3tu_Z8CJTH>W^j&3Weg_UO@J+4Ccg!2Squ6tHJ{wCP)CA3pDnEuMZ9nVBNVg3F)- zsEpUUN@Ks2u%C!a{fY-c1yVeaHMLX~UmB+8as8sbM;vN}bU6FUr`X8C?S=9Jafy+& zoEfxk1WQ4v7wF=muB~R%1oW=V?UdNHVfrXn%NWSXxeEkt@xBJYXh8k?SF0|=?WlXK)*?&2CvBQet123; zWdY1ayhFkjI91?~bG=Fx%N#@AZK$b|Nxzr-OO5CV@+3p|^xMfWPNy{I%nhRAhyUIW zZtM+&*%hW82|i8N`LNdFq46mAZtz#1fMk)lO^uY7mYjTg*R@XZO`E$IpF`0ReV^`&nJ7Gi+H#_N?y7y!tCxF!4>Z&QPEAv7t#w)c4%YsSReXB21I0T7q4D5xLPN=}mOHl^WC3^A zLTVg$21YqRQH_qM|CP3b>OW&q&A$x=(RK#@=3>=Et8duB+bpd(82(MG9z^X7BnyC- zNpjMwu~T4ze`(5r-UXa`anDP42E;^Jr6HQpLDJkI9Y}(UuJBxQ(fU20s=}IH6&0d# zzz$R4|0jmE-2dssWYY95{8KQh!trth12388LtuF#Ie-{&xy3i+;J@4s1&(8DvC+BO zw6Etu$?v!VoB-giKJpd!UU&FM#lx@!H8JEfS^l*i417sEg0;{`r 0 if there is data available or < 0 on error. When we've - reached EOF, `nread` will be set to ``UV_EOF``. When `nread` < 0, - the `buf` parameter might not point to a valid buffer; in that case - `buf.len` and `buf.base` are both set to 0. - - .. note:: - `nread` might be 0, which does *not* indicate an error or EOF. This - is equivalent to ``EAGAIN`` or ``EWOULDBLOCK`` under ``read(2)``. - - The callee is responsible for stopping closing the stream when an error happens - by calling :c:func:`uv_read_stop` or :c:func:`uv_close`. Trying to read - from the stream again is undefined. - - The callee is responsible for freeing the buffer, libuv does not reuse it. - The buffer may be a null buffer (where buf->base=NULL and buf->len=0) on - error. - -.. c:type:: void (*uv_write_cb)(uv_write_t* req, int status) - - Callback called after data was written on a stream. `status` will be 0 in - case of success, < 0 otherwise. - -.. c:type:: void (*uv_connect_cb)(uv_connect_t* req, int status) - - Callback called after a connection started by :c:func:`uv_connect` is done. - `status` will be 0 in case of success, < 0 otherwise. - -.. c:type:: void (*uv_shutdown_cb)(uv_shutdown_t* req, int status) - - Callback called after s shutdown request has been completed. `status` will - be 0 in case of success, < 0 otherwise. - -.. c:type:: void (*uv_connection_cb)(uv_stream_t* server, int status) - - Callback called when a stream server has received an incoming connection. - The user can accept the connection by calling :c:func:`uv_accept`. - `status` will be 0 in case of success, < 0 otherwise. - - -Public members -^^^^^^^^^^^^^^ - -.. c:member:: size_t uv_stream_t.write_queue_size - - Contains the amount of queued bytes waiting to be sent. Readonly. - -.. c:member:: uv_stream_t* uv_connect_t.handle - - Pointer to the stream where this connection request is running. - -.. c:member:: uv_stream_t* uv_shutdown_t.handle - - Pointer to the stream where this shutdown request is running. - -.. c:member:: uv_stream_t* uv_write_t.handle - - Pointer to the stream where this write request is running. - -.. c:member:: uv_stream_t* uv_write_t.send_handle - - Pointer to the stream being sent using this write request.. - -.. seealso:: The :c:type:`uv_handle_t` members also apply. - - -API ---- - -.. c:function:: int uv_shutdown(uv_shutdown_t* req, uv_stream_t* handle, uv_shutdown_cb cb) - - Shutdown the outgoing (write) side of a duplex stream. It waits for pending - write requests to complete. The `handle` should refer to a initialized stream. - `req` should be an uninitialized shutdown request struct. The `cb` is called - after shutdown is complete. - -.. c:function:: int uv_listen(uv_stream_t* stream, int backlog, uv_connection_cb cb) - - Start listening for incoming connections. `backlog` indicates the number of - connections the kernel might queue, same as :man:`listen(2)`. When a new - incoming connection is received the :c:type:`uv_connection_cb` callback is - called. - -.. c:function:: int uv_accept(uv_stream_t* server, uv_stream_t* client) - - This call is used in conjunction with :c:func:`uv_listen` to accept incoming - connections. Call this function after receiving a :c:type:`uv_connection_cb` - to accept the connection. Before calling this function the client handle must - be initialized. < 0 return value indicates an error. - - When the :c:type:`uv_connection_cb` callback is called it is guaranteed that - this function will complete successfully the first time. If you attempt to use - it more than once, it may fail. It is suggested to only call this function once - per :c:type:`uv_connection_cb` call. - - .. note:: - `server` and `client` must be handles running on the same loop. - -.. c:function:: int uv_read_start(uv_stream_t* stream, uv_alloc_cb alloc_cb, uv_read_cb read_cb) - - Read data from an incoming stream. The :c:type:`uv_read_cb` callback will - be made several times until there is no more data to read or - :c:func:`uv_read_stop` is called. - -.. c:function:: int uv_read_stop(uv_stream_t*) - - Stop reading data from the stream. The :c:type:`uv_read_cb` callback will - no longer be called. - - This function is idempotent and may be safely called on a stopped stream. - -.. c:function:: int uv_write(uv_write_t* req, uv_stream_t* handle, const uv_buf_t bufs[], unsigned int nbufs, uv_write_cb cb) - - Write data to stream. Buffers are written in order. Example: - - :: - - uv_buf_t a[] = { - { .base = "1", .len = 1 }, - { .base = "2", .len = 1 } - }; - - uv_buf_t b[] = { - { .base = "3", .len = 1 }, - { .base = "4", .len = 1 } - }; - - uv_write_t req1; - uv_write_t req2; - - /* writes "1234" */ - uv_write(&req1, stream, a, 2); - uv_write(&req2, stream, b, 2); - -.. c:function:: int uv_write2(uv_write_t* req, uv_stream_t* handle, const uv_buf_t bufs[], unsigned int nbufs, uv_stream_t* send_handle, uv_write_cb cb) - - Extended write function for sending handles over a pipe. The pipe must be - initialized with `ipc` == 1. - - .. note:: - `send_handle` must be a TCP socket or pipe, which is a server or a connection (listening - or connected state). Bound sockets or pipes will be assumed to be servers. - -.. c:function:: int uv_try_write(uv_stream_t* handle, const uv_buf_t bufs[], unsigned int nbufs) - - Same as :c:func:`uv_write`, but won't queue a write request if it can't be - completed immediately. - - Will return either: - - * > 0: number of bytes written (can be less than the supplied buffer size). - * < 0: negative error code (``UV_EAGAIN`` is returned if no data can be sent - immediately). - -.. c:function:: int uv_is_readable(const uv_stream_t* handle) - - Returns 1 if the stream is readable, 0 otherwise. - -.. c:function:: int uv_is_writable(const uv_stream_t* handle) - - Returns 1 if the stream is writable, 0 otherwise. - -.. c:function:: int uv_stream_set_blocking(uv_stream_t* handle, int blocking) - - Enable or disable blocking mode for a stream. - - When blocking mode is enabled all writes complete synchronously. The - interface remains unchanged otherwise, e.g. completion or failure of the - operation will still be reported through a callback which is made - asynchronously. - - .. warning:: - Relying too much on this API is not recommended. It is likely to change - significantly in the future. - - Currently only works on Windows for :c:type:`uv_pipe_t` handles. - On UNIX platforms, all :c:type:`uv_stream_t` handles are supported. - - Also libuv currently makes no ordering guarantee when the blocking mode - is changed after write requests have already been submitted. Therefore it is - recommended to set the blocking mode immediately after opening or creating - the stream. - - .. versionchanged:: 1.4.0 UNIX implementation added. - -.. seealso:: The :c:type:`uv_handle_t` API functions also apply. diff --git a/outside/libuv-v1.7.5/docs/src/tcp.rst b/outside/libuv-v1.7.5/docs/src/tcp.rst deleted file mode 100644 index dd18522d9..000000000 --- a/outside/libuv-v1.7.5/docs/src/tcp.rst +++ /dev/null @@ -1,108 +0,0 @@ - -.. _tcp: - -:c:type:`uv_tcp_t` --- TCP handle -================================= - -TCP handles are used to represent both TCP streams and servers. - -:c:type:`uv_tcp_t` is a 'subclass' of :c:type:`uv_stream_t`. - - -Data types ----------- - -.. c:type:: uv_tcp_t - - TCP handle type. - - -Public members -^^^^^^^^^^^^^^ - -N/A - -.. seealso:: The :c:type:`uv_stream_t` members also apply. - - -API ---- - -.. c:function:: int uv_tcp_init(uv_loop_t* loop, uv_tcp_t* handle) - - Initialize the handle. No socket is created as of yet. - -.. c:function:: int uv_tcp_init_ex(uv_loop_t* loop, uv_tcp_t* handle, unsigned int flags) - - Initialize the handle with the specified flags. At the moment the lower 8 bits - of the `flags` parameter are used as the socket domain. A socket will be created - for the given domain. If the specified domain is ``AF_UNSPEC`` no socket is created, - just like :c:func:`uv_tcp_init`. - - .. versionadded:: 1.7.0 - -.. c:function:: int uv_tcp_open(uv_tcp_t* handle, uv_os_sock_t sock) - - Open an existing file descriptor or SOCKET as a TCP handle. - - .. versionchanged:: 1.2.1 the file descriptor is set to non-blocking mode. - - .. note:: - The passed file descriptor or SOCKET is not checked for its type, but - it's required that it represents a valid stream socket. - -.. c:function:: int uv_tcp_nodelay(uv_tcp_t* handle, int enable) - - Enable / disable Nagle's algorithm. - -.. c:function:: int uv_tcp_keepalive(uv_tcp_t* handle, int enable, unsigned int delay) - - Enable / disable TCP keep-alive. `delay` is the initial delay in seconds, - ignored when `enable` is zero. - -.. c:function:: int uv_tcp_simultaneous_accepts(uv_tcp_t* handle, int enable) - - Enable / disable simultaneous asynchronous accept requests that are - queued by the operating system when listening for new TCP connections. - - This setting is used to tune a TCP server for the desired performance. - Having simultaneous accepts can significantly improve the rate of accepting - connections (which is why it is enabled by default) but may lead to uneven - load distribution in multi-process setups. - -.. c:function:: int uv_tcp_bind(uv_tcp_t* handle, const struct sockaddr* addr, unsigned int flags) - - Bind the handle to an address and port. `addr` should point to an - initialized ``struct sockaddr_in`` or ``struct sockaddr_in6``. - - When the port is already taken, you can expect to see an ``UV_EADDRINUSE`` - error from either :c:func:`uv_tcp_bind`, :c:func:`uv_listen` or - :c:func:`uv_tcp_connect`. That is, a successful call to this function does - not guarantee that the call to :c:func:`uv_listen` or :c:func:`uv_tcp_connect` - will succeed as well. - - `flags` can contain ``UV_TCP_IPV6ONLY``, in which case dual-stack support - is disabled and only IPv6 is used. - -.. c:function:: int uv_tcp_getsockname(const uv_tcp_t* handle, struct sockaddr* name, int* namelen) - - Get the current address to which the handle is bound. `addr` must point to - a valid and big enough chunk of memory, ``struct sockaddr_storage`` is - recommended for IPv4 and IPv6 support. - -.. c:function:: int uv_tcp_getpeername(const uv_tcp_t* handle, struct sockaddr* name, int* namelen) - - Get the address of the peer connected to the handle. `addr` must point to - a valid and big enough chunk of memory, ``struct sockaddr_storage`` is - recommended for IPv4 and IPv6 support. - -.. c:function:: int uv_tcp_connect(uv_connect_t* req, uv_tcp_t* handle, const struct sockaddr* addr, uv_connect_cb cb) - - Establish an IPv4 or IPv6 TCP connection. Provide an initialized TCP handle - and an uninitialized :c:type:`uv_connect_t`. `addr` should point to an - initialized ``struct sockaddr_in`` or ``struct sockaddr_in6``. - - The callback is made when the connection has been established or when a - connection error happened. - -.. seealso:: The :c:type:`uv_stream_t` API functions also apply. diff --git a/outside/libuv-v1.7.5/docs/src/threading.rst b/outside/libuv-v1.7.5/docs/src/threading.rst deleted file mode 100644 index e876dde12..000000000 --- a/outside/libuv-v1.7.5/docs/src/threading.rst +++ /dev/null @@ -1,160 +0,0 @@ - -.. _threading: - -Threading and synchronization utilities -======================================= - -libuv provides cross-platform implementations for multiple threading and -synchronization primitives. The API largely follows the pthreads API. - - -Data types ----------- - -.. c:type:: uv_thread_t - - Thread data type. - -.. c:type:: void (*uv_thread_cb)(void* arg) - - Callback that is invoked to initialize thread execution. `arg` is the same - value that was passed to :c:func:`uv_thread_create`. - -.. c:type:: uv_key_t - - Thread-local key data type. - -.. c:type:: uv_once_t - - Once-only initializer data type. - -.. c:type:: uv_mutex_t - - Mutex data type. - -.. c:type:: uv_rwlock_t - - Read-write lock data type. - -.. c:type:: uv_sem_t - - Semaphore data type. - -.. c:type:: uv_cond_t - - Condition data type. - -.. c:type:: uv_barrier_t - - Barrier data type. - - -API ---- - -Threads -^^^^^^^ - -.. c:function:: int uv_thread_create(uv_thread_t* tid, uv_thread_cb entry, void* arg) - - .. versionchanged:: 1.4.1 returns a UV_E* error code on failure - -.. c:function:: uv_thread_t uv_thread_self(void) -.. c:function:: int uv_thread_join(uv_thread_t *tid) -.. c:function:: int uv_thread_equal(const uv_thread_t* t1, const uv_thread_t* t2) - -Thread-local storage -^^^^^^^^^^^^^^^^^^^^ - -.. note:: - The total thread-local storage size may be limited. That is, it may not be possible to - create many TLS keys. - -.. c:function:: int uv_key_create(uv_key_t* key) -.. c:function:: void uv_key_delete(uv_key_t* key) -.. c:function:: void* uv_key_get(uv_key_t* key) -.. c:function:: void uv_key_set(uv_key_t* key, void* value) - -Once-only initialization -^^^^^^^^^^^^^^^^^^^^^^^^ - -Runs a function once and only once. Concurrent calls to :c:func:`uv_once` with the -same guard will block all callers except one (it's unspecified which one). -The guard should be initialized statically with the UV_ONCE_INIT macro. - -.. c:function:: void uv_once(uv_once_t* guard, void (*callback)(void)) - -Mutex locks -^^^^^^^^^^^ - -Functions return 0 on success or an error code < 0 (unless the -return type is void, of course). - -.. c:function:: int uv_mutex_init(uv_mutex_t* handle) -.. c:function:: void uv_mutex_destroy(uv_mutex_t* handle) -.. c:function:: void uv_mutex_lock(uv_mutex_t* handle) -.. c:function:: int uv_mutex_trylock(uv_mutex_t* handle) -.. c:function:: void uv_mutex_unlock(uv_mutex_t* handle) - -Read-write locks -^^^^^^^^^^^^^^^^ - -Functions return 0 on success or an error code < 0 (unless the -return type is void, of course). - -.. c:function:: int uv_rwlock_init(uv_rwlock_t* rwlock) -.. c:function:: void uv_rwlock_destroy(uv_rwlock_t* rwlock) -.. c:function:: void uv_rwlock_rdlock(uv_rwlock_t* rwlock) -.. c:function:: int uv_rwlock_tryrdlock(uv_rwlock_t* rwlock) -.. c:function:: void uv_rwlock_rdunlock(uv_rwlock_t* rwlock) -.. c:function:: void uv_rwlock_wrlock(uv_rwlock_t* rwlock) -.. c:function:: int uv_rwlock_trywrlock(uv_rwlock_t* rwlock) -.. c:function:: void uv_rwlock_wrunlock(uv_rwlock_t* rwlock) - -Semaphores -^^^^^^^^^^ - -Functions return 0 on success or an error code < 0 (unless the -return type is void, of course). - -.. c:function:: int uv_sem_init(uv_sem_t* sem, unsigned int value) -.. c:function:: void uv_sem_destroy(uv_sem_t* sem) -.. c:function:: void uv_sem_post(uv_sem_t* sem) -.. c:function:: void uv_sem_wait(uv_sem_t* sem) -.. c:function:: int uv_sem_trywait(uv_sem_t* sem) - -Conditions -^^^^^^^^^^ - -Functions return 0 on success or an error code < 0 (unless the -return type is void, of course). - -.. note:: - Callers should be prepared to deal with spurious wakeups on :c:func:`uv_cond_wait` and - :c:func:`uv_cond_timedwait`. - -.. c:function:: int uv_cond_init(uv_cond_t* cond) -.. c:function:: void uv_cond_destroy(uv_cond_t* cond) -.. c:function:: void uv_cond_signal(uv_cond_t* cond) -.. c:function:: void uv_cond_broadcast(uv_cond_t* cond) -.. c:function:: void uv_cond_wait(uv_cond_t* cond, uv_mutex_t* mutex) -.. c:function:: int uv_cond_timedwait(uv_cond_t* cond, uv_mutex_t* mutex, uint64_t timeout) - -Barriers -^^^^^^^^ - -Functions return 0 on success or an error code < 0 (unless the -return type is void, of course). - -.. note:: - :c:func:`uv_barrier_wait` returns a value > 0 to an arbitrarily chosen "serializer" thread - to facilitate cleanup, i.e. - - :: - - if (uv_barrier_wait(&barrier) > 0) - uv_barrier_destroy(&barrier); - -.. c:function:: int uv_barrier_init(uv_barrier_t* barrier, unsigned int count) -.. c:function:: void uv_barrier_destroy(uv_barrier_t* barrier) -.. c:function:: int uv_barrier_wait(uv_barrier_t* barrier) diff --git a/outside/libuv-v1.7.5/docs/src/threadpool.rst b/outside/libuv-v1.7.5/docs/src/threadpool.rst deleted file mode 100644 index 18949507e..000000000 --- a/outside/libuv-v1.7.5/docs/src/threadpool.rst +++ /dev/null @@ -1,67 +0,0 @@ - -.. _threadpool: - -Thread pool work scheduling -=========================== - -libuv provides a threadpool which can be used to run user code and get notified -in the loop thread. This thread pool is internally used to run all filesystem -operations, as well as getaddrinfo and getnameinfo requests. - -Its default size is 4, but it can be changed at startup time by setting the -``UV_THREADPOOL_SIZE`` environment variable to any value (the absolute maximum -is 128). - -The threadpool is global and shared across all event loops. When a particular -function makes use of the threadpool (i.e. when using :c:func:`uv_queue_work`) -libuv preallocates and initializes the maximum number of threads allowed by -``UV_THREADPOOL_SIZE``. This causes a relatively minor memory overhead -(~1MB for 128 threads) but increases the performance of threading at runtime. - -.. note:: - Note that even though a global thread pool which is shared across all events - loops is used, the functions are not thread safe. - - -Data types ----------- - -.. c:type:: uv_work_t - - Work request type. - -.. c:type:: void (*uv_work_cb)(uv_work_t* req) - - Callback passed to :c:func:`uv_queue_work` which will be run on the thread - pool. - -.. c:type:: void (*uv_after_work_cb)(uv_work_t* req, int status) - - Callback passed to :c:func:`uv_queue_work` which will be called on the loop - thread after the work on the threadpool has been completed. If the work - was cancelled using :c:func:`uv_cancel` `status` will be ``UV_ECANCELED``. - - -Public members -^^^^^^^^^^^^^^ - -.. c:member:: uv_loop_t* uv_work_t.loop - - Loop that started this request and where completion will be reported. - Readonly. - -.. seealso:: The :c:type:`uv_req_t` members also apply. - - -API ---- - -.. c:function:: int uv_queue_work(uv_loop_t* loop, uv_work_t* req, uv_work_cb work_cb, uv_after_work_cb after_work_cb) - - Initializes a work request which will run the given `work_cb` in a thread - from the threadpool. Once `work_cb` is completed, `after_work_cb` will be - called on the loop thread. - - This request can be cancelled with :c:func:`uv_cancel`. - -.. seealso:: The :c:type:`uv_req_t` API functions also apply. diff --git a/outside/libuv-v1.7.5/docs/src/timer.rst b/outside/libuv-v1.7.5/docs/src/timer.rst deleted file mode 100644 index 31d733efc..000000000 --- a/outside/libuv-v1.7.5/docs/src/timer.rst +++ /dev/null @@ -1,76 +0,0 @@ - -.. _timer: - -:c:type:`uv_timer_t` --- Timer handle -===================================== - -Timer handles are used to schedule callbacks to be called in the future. - - -Data types ----------- - -.. c:type:: uv_timer_t - - Timer handle type. - -.. c:type:: void (*uv_timer_cb)(uv_timer_t* handle) - - Type definition for callback passed to :c:func:`uv_timer_start`. - - -Public members -^^^^^^^^^^^^^^ - -N/A - -.. seealso:: The :c:type:`uv_handle_t` members also apply. - - -API ---- - -.. c:function:: int uv_timer_init(uv_loop_t* loop, uv_timer_t* handle) - - Initialize the handle. - -.. c:function:: int uv_timer_start(uv_timer_t* handle, uv_timer_cb cb, uint64_t timeout, uint64_t repeat) - - Start the timer. `timeout` and `repeat` are in milliseconds. - - If `timeout` is zero, the callback fires on the next event loop iteration. - If `repeat` is non-zero, the callback fires first after `timeout` - milliseconds and then repeatedly after `repeat` milliseconds. - -.. c:function:: int uv_timer_stop(uv_timer_t* handle) - - Stop the timer, the callback will not be called anymore. - -.. c:function:: int uv_timer_again(uv_timer_t* handle) - - Stop the timer, and if it is repeating restart it using the repeat value - as the timeout. If the timer has never been started before it returns - UV_EINVAL. - -.. c:function:: void uv_timer_set_repeat(uv_timer_t* handle, uint64_t repeat) - - Set the repeat interval value in milliseconds. The timer will be scheduled - to run on the given interval, regardless of the callback execution - duration, and will follow normal timer semantics in the case of a - time-slice overrun. - - For example, if a 50ms repeating timer first runs for 17ms, it will be - scheduled to run again 33ms later. If other tasks consume more than the - 33ms following the first timer callback, then the callback will run as soon - as possible. - - .. note:: - If the repeat value is set from a timer callback it does not immediately take effect. - If the timer was non-repeating before, it will have been stopped. If it was repeating, - then the old repeat value will have been used to schedule the next timeout. - -.. c:function:: uint64_t uv_timer_get_repeat(const uv_timer_t* handle) - - Get the timer repeat value. - -.. seealso:: The :c:type:`uv_handle_t` API functions also apply. diff --git a/outside/libuv-v1.7.5/docs/src/tty.rst b/outside/libuv-v1.7.5/docs/src/tty.rst deleted file mode 100644 index 655dca9ca..000000000 --- a/outside/libuv-v1.7.5/docs/src/tty.rst +++ /dev/null @@ -1,93 +0,0 @@ - -.. _tty: - -:c:type:`uv_tty_t` --- TTY handle -================================= - -TTY handles represent a stream for the console. - -:c:type:`uv_tty_t` is a 'subclass' of :c:type:`uv_stream_t`. - - -Data types ----------- - -.. c:type:: uv_tty_t - - TTY handle type. - -.. c:type:: uv_tty_mode_t - - .. versionadded:: 1.2.0 - - TTY mode type: - - :: - - typedef enum { - /* Initial/normal terminal mode */ - UV_TTY_MODE_NORMAL, - /* Raw input mode (On Windows, ENABLE_WINDOW_INPUT is also enabled) */ - UV_TTY_MODE_RAW, - /* Binary-safe I/O mode for IPC (Unix-only) */ - UV_TTY_MODE_IO - } uv_tty_mode_t; - - - -Public members -^^^^^^^^^^^^^^ - -N/A - -.. seealso:: The :c:type:`uv_stream_t` members also apply. - - -API ---- - -.. c:function:: int uv_tty_init(uv_loop_t* loop, uv_tty_t* handle, uv_file fd, int readable) - - Initialize a new TTY stream with the given file descriptor. Usually the - file descriptor will be: - - * 0 = stdin - * 1 = stdout - * 2 = stderr - - `readable`, specifies if you plan on calling :c:func:`uv_read_start` with - this stream. stdin is readable, stdout is not. - - On Unix this function will try to open ``/dev/tty`` and use it if the passed - file descriptor refers to a TTY. This lets libuv put the tty in non-blocking - mode without affecting other processes that share the tty. - - .. note:: - If opening ``/dev/tty`` fails, libuv falls back to blocking writes for - non-readable TTY streams. - - .. versionchanged:: 1.5.0: trying to initialize a TTY stream with a file - descriptor that refers to a file returns `UV_EINVAL` - on UNIX. - -.. c:function:: int uv_tty_set_mode(uv_tty_t* handle, uv_tty_mode_t mode) - - .. versionchanged:: 1.2.0: the mode is specified as a - :c:type:`uv_tty_mode_t` value. - - Set the TTY using the specified terminal mode. - -.. c:function:: int uv_tty_reset_mode(void) - - To be called when the program exits. Resets TTY settings to default - values for the next process to take over. - - This function is async signal-safe on Unix platforms but can fail with error - code ``UV_EBUSY`` if you call it when execution is inside - :c:func:`uv_tty_set_mode`. - -.. c:function:: int uv_tty_get_winsize(uv_tty_t* handle, int* width, int* height) - - Gets the current Window size. On success it returns 0. - -.. seealso:: The :c:type:`uv_stream_t` API functions also apply. diff --git a/outside/libuv-v1.7.5/docs/src/udp.rst b/outside/libuv-v1.7.5/docs/src/udp.rst deleted file mode 100644 index dd4660339..000000000 --- a/outside/libuv-v1.7.5/docs/src/udp.rst +++ /dev/null @@ -1,295 +0,0 @@ - -.. _udp: - -:c:type:`uv_udp_t` --- UDP handle -================================= - -UDP handles encapsulate UDP communication for both clients and servers. - - -Data types ----------- - -.. c:type:: uv_udp_t - - UDP handle type. - -.. c:type:: uv_udp_send_t - - UDP send request type. - -.. c:type:: uv_udp_flags - - Flags used in :c:func:`uv_udp_bind` and :c:type:`uv_udp_recv_cb`.. - - :: - - enum uv_udp_flags { - /* Disables dual stack mode. */ - UV_UDP_IPV6ONLY = 1, - /* - * Indicates message was truncated because read buffer was too small. The - * remainder was discarded by the OS. Used in uv_udp_recv_cb. - */ - UV_UDP_PARTIAL = 2, - /* - * Indicates if SO_REUSEADDR will be set when binding the handle in - * uv_udp_bind. - * This sets the SO_REUSEPORT socket flag on the BSDs and OS X. On other - * Unix platforms, it sets the SO_REUSEADDR flag. What that means is that - * multiple threads or processes can bind to the same address without error - * (provided they all set the flag) but only the last one to bind will receive - * any traffic, in effect "stealing" the port from the previous listener. - */ - UV_UDP_REUSEADDR = 4 - }; - -.. c:type:: void (*uv_udp_send_cb)(uv_udp_send_t* req, int status) - - Type definition for callback passed to :c:func:`uv_udp_send`, which is - called after the data was sent. - -.. c:type:: void (*uv_udp_recv_cb)(uv_udp_t* handle, ssize_t nread, const uv_buf_t* buf, const struct sockaddr* addr, unsigned flags) - - Type definition for callback passed to :c:func:`uv_udp_recv_start`, which - is called when the endpoint receives data. - - * `handle`: UDP handle - * `nread`: Number of bytes that have been received. - 0 if there is no more data to read. You may discard or repurpose - the read buffer. Note that 0 may also mean that an empty datagram - was received (in this case `addr` is not NULL). < 0 if a transmission - error was detected. - * `buf`: :c:type:`uv_buf_t` with the received data. - * `addr`: ``struct sockaddr*`` containing the address of the sender. - Can be NULL. Valid for the duration of the callback only. - * `flags`: One or more or'ed UV_UDP_* constants. Right now only - ``UV_UDP_PARTIAL`` is used. - - .. note:: - The receive callback will be called with `nread` == 0 and `addr` == NULL when there is - nothing to read, and with `nread` == 0 and `addr` != NULL when an empty UDP packet is - received. - -.. c:type:: uv_membership - - Membership type for a multicast address. - - :: - - typedef enum { - UV_LEAVE_GROUP = 0, - UV_JOIN_GROUP - } uv_membership; - - -Public members -^^^^^^^^^^^^^^ - -.. c:member:: size_t uv_udp_t.send_queue_size - - Number of bytes queued for sending. This field strictly shows how much - information is currently queued. - -.. c:member:: size_t uv_udp_t.send_queue_count - - Number of send requests currently in the queue awaiting to be processed. - -.. c:member:: uv_udp_t* uv_udp_send_t.handle - - UDP handle where this send request is taking place. - -.. seealso:: The :c:type:`uv_handle_t` members also apply. - - -API ---- - -.. c:function:: int uv_udp_init(uv_loop_t* loop, uv_udp_t* handle) - - Initialize a new UDP handle. The actual socket is created lazily. - Returns 0 on success. - -.. c:function:: int uv_udp_init_ex(uv_loop_t* loop, uv_udp_t* handle, unsigned int flags) - - Initialize the handle with the specified flags. At the moment the lower 8 bits - of the `flags` parameter are used as the socket domain. A socket will be created - for the given domain. If the specified domain is ``AF_UNSPEC`` no socket is created, - just like :c:func:`uv_udp_init`. - - .. versionadded:: 1.7.0 - -.. c:function:: int uv_udp_open(uv_udp_t* handle, uv_os_sock_t sock) - - Opens an existing file descriptor or Windows SOCKET as a UDP handle. - - Unix only: - The only requirement of the `sock` argument is that it follows the datagram - contract (works in unconnected mode, supports sendmsg()/recvmsg(), etc). - In other words, other datagram-type sockets like raw sockets or netlink - sockets can also be passed to this function. - - .. versionchanged:: 1.2.1 the file descriptor is set to non-blocking mode. - - .. note:: - The passed file descriptor or SOCKET is not checked for its type, but - it's required that it represents a valid datagram socket. - -.. c:function:: int uv_udp_bind(uv_udp_t* handle, const struct sockaddr* addr, unsigned int flags) - - Bind the UDP handle to an IP address and port. - - :param handle: UDP handle. Should have been initialized with - :c:func:`uv_udp_init`. - - :param addr: `struct sockaddr_in` or `struct sockaddr_in6` - with the address and port to bind to. - - :param flags: Indicate how the socket will be bound, - ``UV_UDP_IPV6ONLY`` and ``UV_UDP_REUSEADDR`` are supported. - - :returns: 0 on success, or an error code < 0 on failure. - -.. c:function:: int uv_udp_getsockname(const uv_udp_t* handle, struct sockaddr* name, int* namelen) - - Get the local IP and port of the UDP handle. - - :param handle: UDP handle. Should have been initialized with - :c:func:`uv_udp_init` and bound. - - :param name: Pointer to the structure to be filled with the address data. - In order to support IPv4 and IPv6 `struct sockaddr_storage` should be - used. - - :param namelen: On input it indicates the data of the `name` field. On - output it indicates how much of it was filled. - - :returns: 0 on success, or an error code < 0 on failure. - -.. c:function:: int uv_udp_set_membership(uv_udp_t* handle, const char* multicast_addr, const char* interface_addr, uv_membership membership) - - Set membership for a multicast address - - :param handle: UDP handle. Should have been initialized with - :c:func:`uv_udp_init`. - - :param multicast_addr: Multicast address to set membership for. - - :param interface_addr: Interface address. - - :param membership: Should be ``UV_JOIN_GROUP`` or ``UV_LEAVE_GROUP``. - - :returns: 0 on success, or an error code < 0 on failure. - -.. c:function:: int uv_udp_set_multicast_loop(uv_udp_t* handle, int on) - - Set IP multicast loop flag. Makes multicast packets loop back to - local sockets. - - :param handle: UDP handle. Should have been initialized with - :c:func:`uv_udp_init`. - - :param on: 1 for on, 0 for off. - - :returns: 0 on success, or an error code < 0 on failure. - -.. c:function:: int uv_udp_set_multicast_ttl(uv_udp_t* handle, int ttl) - - Set the multicast ttl. - - :param handle: UDP handle. Should have been initialized with - :c:func:`uv_udp_init`. - - :param ttl: 1 through 255. - - :returns: 0 on success, or an error code < 0 on failure. - -.. c:function:: int uv_udp_set_multicast_interface(uv_udp_t* handle, const char* interface_addr) - - Set the multicast interface to send or receive data on. - - :param handle: UDP handle. Should have been initialized with - :c:func:`uv_udp_init`. - - :param interface_addr: interface address. - - :returns: 0 on success, or an error code < 0 on failure. - -.. c:function:: int uv_udp_set_broadcast(uv_udp_t* handle, int on) - - Set broadcast on or off. - - :param handle: UDP handle. Should have been initialized with - :c:func:`uv_udp_init`. - - :param on: 1 for on, 0 for off. - - :returns: 0 on success, or an error code < 0 on failure. - -.. c:function:: int uv_udp_set_ttl(uv_udp_t* handle, int ttl) - - Set the time to live. - - :param handle: UDP handle. Should have been initialized with - :c:func:`uv_udp_init`. - - :param ttl: 1 through 255. - - :returns: 0 on success, or an error code < 0 on failure. - -.. c:function:: int uv_udp_send(uv_udp_send_t* req, uv_udp_t* handle, const uv_buf_t bufs[], unsigned int nbufs, const struct sockaddr* addr, uv_udp_send_cb send_cb) - - Send data over the UDP socket. If the socket has not previously been bound - with :c:func:`uv_udp_bind` it will be bound to 0.0.0.0 - (the "all interfaces" IPv4 address) and a random port number. - - :param req: UDP request handle. Need not be initialized. - - :param handle: UDP handle. Should have been initialized with - :c:func:`uv_udp_init`. - - :param bufs: List of buffers to send. - - :param nbufs: Number of buffers in `bufs`. - - :param addr: `struct sockaddr_in` or `struct sockaddr_in6` with the - address and port of the remote peer. - - :param send_cb: Callback to invoke when the data has been sent out. - - :returns: 0 on success, or an error code < 0 on failure. - -.. c:function:: int uv_udp_try_send(uv_udp_t* handle, const uv_buf_t bufs[], unsigned int nbufs, const struct sockaddr* addr) - - Same as :c:func:`uv_udp_send`, but won't queue a send request if it can't - be completed immediately. - - :returns: >= 0: number of bytes sent (it matches the given buffer size). - < 0: negative error code (``UV_EAGAIN`` is returned when the message - can't be sent immediately). - -.. c:function:: int uv_udp_recv_start(uv_udp_t* handle, uv_alloc_cb alloc_cb, uv_udp_recv_cb recv_cb) - - Prepare for receiving data. If the socket has not previously been bound - with :c:func:`uv_udp_bind` it is bound to 0.0.0.0 (the "all interfaces" - IPv4 address) and a random port number. - - :param handle: UDP handle. Should have been initialized with - :c:func:`uv_udp_init`. - - :param alloc_cb: Callback to invoke when temporary storage is needed. - - :param recv_cb: Callback to invoke with received data. - - :returns: 0 on success, or an error code < 0 on failure. - -.. c:function:: int uv_udp_recv_stop(uv_udp_t* handle) - - Stop listening for incoming datagrams. - - :param handle: UDP handle. Should have been initialized with - :c:func:`uv_udp_init`. - - :returns: 0 on success, or an error code < 0 on failure. - -.. seealso:: The :c:type:`uv_handle_t` API functions also apply. diff --git a/outside/libuv-v1.7.5/docs/src/version.rst b/outside/libuv-v1.7.5/docs/src/version.rst deleted file mode 100644 index e1715b2d3..000000000 --- a/outside/libuv-v1.7.5/docs/src/version.rst +++ /dev/null @@ -1,60 +0,0 @@ - -.. _version: - -Version-checking macros and functions -===================================== - -Starting with version 1.0.0 libuv follows the `semantic versioning`_ -scheme. This means that new APIs can be introduced throughout the lifetime of -a major release. In this section you'll find all macros and functions that -will allow you to write or compile code conditionally, in order to work with -multiple libuv versions. - -.. _semantic versioning: http://semver.org - - -Macros ------- - -.. c:macro:: UV_VERSION_MAJOR - - libuv version's major number. - -.. c:macro:: UV_VERSION_MINOR - - libuv version's minor number. - -.. c:macro:: UV_VERSION_PATCH - - libuv version's patch number. - -.. c:macro:: UV_VERSION_IS_RELEASE - - Set to 1 to indicate a release version of libuv, 0 for a development - snapshot. - -.. c:macro:: UV_VERSION_SUFFIX - - libuv version suffix. Certain development releases such as Release Candidates - might have a suffix such as "rc". - -.. c:macro:: UV_VERSION_HEX - - Returns the libuv version packed into a single integer. 8 bits are used for - each component, with the patch number stored in the 8 least significant - bits. E.g. for libuv 1.2.3 this would be 0x010203. - - .. versionadded:: 1.7.0 - - -Functions ---------- - -.. c:function:: unsigned int uv_version(void) - - Returns :c:macro:`UV_VERSION_HEX`. - -.. c:function:: const char* uv_version_string(void) - - Returns the libuv version number as a string. For non-release versions the - version suffix is included. diff --git a/outside/libuv-v1.7.5/gyp_uv.py b/outside/libuv-v1.7.5/gyp_uv.py deleted file mode 100755 index 0491ff873..000000000 --- a/outside/libuv-v1.7.5/gyp_uv.py +++ /dev/null @@ -1,96 +0,0 @@ -#!/usr/bin/env python - -import os -import platform -import sys - -try: - import multiprocessing.synchronize - gyp_parallel_support = True -except ImportError: - gyp_parallel_support = False - - -CC = os.environ.get('CC', 'cc') -script_dir = os.path.dirname(__file__) -uv_root = os.path.normpath(script_dir) -output_dir = os.path.join(os.path.abspath(uv_root), 'out') - -sys.path.insert(0, os.path.join(uv_root, 'build', 'gyp', 'pylib')) -try: - import gyp -except ImportError: - print('You need to install gyp in build/gyp first. See the README.') - sys.exit(42) - - -def host_arch(): - machine = platform.machine() - if machine == 'i386': return 'ia32' - if machine == 'x86_64': return 'x64' - if machine.startswith('arm'): return 'arm' - if machine.startswith('mips'): return 'mips' - return machine # Return as-is and hope for the best. - - -def run_gyp(args): - rc = gyp.main(args) - if rc != 0: - print 'Error running GYP' - sys.exit(rc) - - -if __name__ == '__main__': - args = sys.argv[1:] - - # GYP bug. - # On msvs it will crash if it gets an absolute path. - # On Mac/make it will crash if it doesn't get an absolute path. - if sys.platform == 'win32': - args.append(os.path.join(uv_root, 'uv.gyp')) - common_fn = os.path.join(uv_root, 'common.gypi') - options_fn = os.path.join(uv_root, 'options.gypi') - # we force vs 2010 over 2008 which would otherwise be the default for gyp - if not os.environ.get('GYP_MSVS_VERSION'): - os.environ['GYP_MSVS_VERSION'] = '2010' - else: - args.append(os.path.join(os.path.abspath(uv_root), 'uv.gyp')) - common_fn = os.path.join(os.path.abspath(uv_root), 'common.gypi') - options_fn = os.path.join(os.path.abspath(uv_root), 'options.gypi') - - if os.path.exists(common_fn): - args.extend(['-I', common_fn]) - - if os.path.exists(options_fn): - args.extend(['-I', options_fn]) - - args.append('--depth=' + uv_root) - - # There's a bug with windows which doesn't allow this feature. - if sys.platform != 'win32': - if '-f' not in args: - args.extend('-f make'.split()) - if 'eclipse' not in args and 'ninja' not in args: - args.extend(['-Goutput_dir=' + output_dir]) - args.extend(['--generator-output', output_dir]) - - if not any(a.startswith('-Dhost_arch=') for a in args): - args.append('-Dhost_arch=%s' % host_arch()) - - if not any(a.startswith('-Dtarget_arch=') for a in args): - args.append('-Dtarget_arch=%s' % host_arch()) - - if not any(a.startswith('-Duv_library=') for a in args): - args.append('-Duv_library=static_library') - - if not any(a.startswith('-Dcomponent=') for a in args): - args.append('-Dcomponent=static_library') - - # Some platforms (OpenBSD for example) don't have multiprocessing.synchronize - # so gyp must be run with --no-parallel - if not gyp_parallel_support: - args.append('--no-parallel') - - gyp_args = list(args) - print gyp_args - run_gyp(gyp_args) diff --git a/outside/libuv-v1.7.5/img/banner.png b/outside/libuv-v1.7.5/img/banner.png deleted file mode 100644 index 7187daa2e574daa7aa84d81fbddcf6ec3e571d24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